redux-extension-metaboxes.min.js (1467B)
1 jQuery(function(s){"use strict";var c=!1;s.reduxMetaBoxes=s.reduxMetaBoxes||{},s(document).ready(function(){s.reduxMetaBoxes.init(),s("body").hasClass("block-editor-page")&&(c=!0)}),setTimeout(function(){!0===c&&s(".postbox .toggle-indicator").removeClass("toggle-indicator").addClass("el"),s("#publishing-action .button, #save-action .button, .editor-post-publish-button").click(function(){s(".redux-save-warn").slideUp(),window.onbeforeunload=null})},1e3),s.reduxMetaBoxes.init=function(){s.reduxMetaBoxes.notLoaded=!0,s.redux.initFields(),s("body").hasClass("block-editor-page")&&(c=!0),c?setTimeout(function(){s.reduxMetaBoxes.checkBoxVisibility(),s(".editor-post-format__content select").change(function(){s.reduxMetaBoxes.checkBoxVisibility("post_format")})},1e3):(s.reduxMetaBoxes.checkBoxVisibility(),s("#page_template").change(function(){s.reduxMetaBoxes.checkBoxVisibility("page_template")}),s('input[name="post_format"]:radio').change(function(){s.reduxMetaBoxes.checkBoxVisibility("post_format")}))},s.reduxMetaBoxes.checkBoxVisibility=function(n){0!==reduxMetaboxes.length&&s.each(reduxMetaboxes,function(a,e){s.each(e,function(e,t){var o,i=!1;e!==n&&n||(o="post_format"===e?c?s(" .editor-post-format__content select option:selected").val():s('input:radio[name="post_format"]:checked').val():s("#"+e).val())&&(s.each(t,function(e,t){t===o&&(i=!0)}),(i||s.reduxMetaBoxes.notLoaded)&&i?(s("#"+a).fadeIn("300"),s.redux.initFields()):s("#"+a).hide())})})}});