diff --git a/assets/build/index.asset.php b/assets/build/index.asset.php index 9a3f8ee8bbd01fae954d8ff47dc5cd3fab28fe7f..f27808a47aa437c61ca7ce841559e0fff1728b75 100644 --- a/assets/build/index.asset.php +++ b/assets/build/index.asset.php @@ -1 +1 @@ -<?php return array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'ea759c794441056cd75f'); +<?php return array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '6599c3d81e6a88ab5187'); diff --git a/assets/build/index.js b/assets/build/index.js index f63a3413fb8c9350af515e78a157f15da09aa4ae..bf18729710342529686ec545d50162cddebdff06 100644 --- a/assets/build/index.js +++ b/assets/build/index.js @@ -1 +1 @@ -(()=>{"use strict";const e=window.wp.element,t=window.wp.editPost,n=window.wp.i18n,a=window.wp.primitives,i=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M7.8 6c0-.7.6-1.2 1.2-1.2h6c.7 0 1.2.6 1.2 1.2v3h1.5V6c0-1.5-1.2-2.8-2.8-2.8H9C7.5 3.2 6.2 4.5 6.2 6v3h1.5V6zm8.4 11c0 .7-.6 1.2-1.2 1.2H9c-.7 0-1.2-.6-1.2-1.2v-3H6.2v3c0 1.5 1.2 2.8 2.8 2.8h6c1.5 0 2.8-1.2 2.8-2.8v-3h-1.5v3zM4 11v1h16v-1H4z"})),o=window.wp.plugins,l=window.wp.components,s=window.wp.compose,g=window.wp.data,{metaKey:c}=autopagingSettings,r=(0,s.compose)([(0,g.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),n=t("content");return{disabled:!!t("meta")[c],hasQuicktag:-1!==n.indexOf("wp:nextpage")}})),(0,g.withDispatch)((e=>{const{editPost:t}=e("core/editor");return{setDisabled:e=>{t({meta:{[c]:!!e}})}}}))])((t=>{let{disabled:a,hasQuicktag:i,setDisabled:o}=t;return(0,e.createElement)(e.Fragment,null,i&&(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,n.__)("Autopaging is disabled because the <em>Page Break</em> block is used.","autopaging")}}),!i&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l.ToggleControl,{label:(0,n.__)("Disable autopaging for this post?","autopaging"),help:(0,n.__)("Check the box above to prevent this post from automatically being split over multiple pages.","autopaging"),checked:a,onChange:o})))})),p="autopaging";(0,o.registerPlugin)(p,{icon:i,render:()=>(0,e.createElement)(t.PluginDocumentSettingPanel,{name:p,title:(0,n.__)("Autopaging","autopaging"),className:p},(0,e.createElement)(r,null))})})(); \ No newline at end of file +(()=>{"use strict";const e=window.wp.element,t=window.wp.editPost,n=window.wp.i18n,a=window.wp.primitives,i=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M7.8 6c0-.7.6-1.2 1.2-1.2h6c.7 0 1.2.6 1.2 1.2v3h1.5V6c0-1.5-1.2-2.8-2.8-2.8H9C7.5 3.2 6.2 4.5 6.2 6v3h1.5V6zm8.4 11c0 .7-.6 1.2-1.2 1.2H9c-.7 0-1.2-.6-1.2-1.2v-3H6.2v3c0 1.5 1.2 2.8 2.8 2.8h6c1.5 0 2.8-1.2 2.8-2.8v-3h-1.5v3zM4 11v1h16v-1H4z"})),o=window.wp.plugins,s=window.wp.components,l=window.wp.compose,g=window.wp.data,{metaKey:c}=autopagingSettings,p=(0,l.compose)([(0,g.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),n=t("content");return{disabled:!!t("meta")[c],hasQuicktag:-1!==n.indexOf("wp:nextpage")}})),(0,g.withDispatch)((e=>{const{editPost:t}=e("core/editor");return{setDisabled:e=>{t({meta:{[c]:!!e}})}}}))])((t=>{let{disabled:a,hasQuicktag:i,setDisabled:o}=t;return(0,e.createElement)(e.Fragment,null,i&&(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,n.__)("Autopaging is disabled because the <em>Page Break</em> block is used.","autopaging")}}),!i&&(0,e.createElement)(s.ToggleControl,{label:(0,n.__)("Disable autopaging for this post?","autopaging"),help:(0,n.__)("Check the box above to prevent this post from automatically being split over multiple pages.","autopaging"),checked:a,onChange:o}))})),r="autopaging";(0,o.registerPlugin)(r,{icon:i,render:()=>(0,e.createElement)(t.PluginDocumentSettingPanel,{name:r,title:(0,n.__)("Autopaging","autopaging"),className:r},(0,e.createElement)(p,null))})})(); \ No newline at end of file diff --git a/assets/src/js/panel-body.js b/assets/src/js/panel-body.js index 35fb697c079ee6d7e09d7092ed3a8475d67c2d33..44b1377ad2109ed39b1b414e670405959ebfeea6 100644 --- a/assets/src/js/panel-body.js +++ b/assets/src/js/panel-body.js @@ -30,20 +30,18 @@ const View = ( { disabled, hasQuicktag, setDisabled } ) => ( ) } { ! hasQuicktag && ( - <> - <ToggleControl - label={ __( - 'Disable autopaging for this post?', - 'autopaging' - ) } - help={ __( - 'Check the box above to prevent this post from automatically being split over multiple pages.', - 'autopaging' - ) } - checked={ disabled } - onChange={ setDisabled } - /> - </> + <ToggleControl + label={ __( + 'Disable autopaging for this post?', + 'autopaging' + ) } + help={ __( + 'Check the box above to prevent this post from automatically being split over multiple pages.', + 'autopaging' + ) } + checked={ disabled } + onChange={ setDisabled } + /> ) } </> );