Skip to content
Snippets Groups Projects
Commit 827275a8 authored by Erick Hitter's avatar Erick Hitter
Browse files

Fix syntax

parent aeeb9827
No related branches found
No related tags found
1 merge request!5Add block-editor support
Pipeline #4969 passed with stages
in 2 minutes and 15 seconds
<?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');
(()=>{"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))})})(); (()=>{"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 \ No newline at end of file
...@@ -30,20 +30,18 @@ const View = ( { disabled, hasQuicktag, setDisabled } ) => ( ...@@ -30,20 +30,18 @@ const View = ( { disabled, hasQuicktag, setDisabled } ) => (
) } ) }
{ ! hasQuicktag && ( { ! hasQuicktag && (
<> <ToggleControl
<ToggleControl label={ __(
label={ __( 'Disable autopaging for this post?',
'Disable autopaging for this post?', 'autopaging'
'autopaging' ) }
) } help={ __(
help={ __( 'Check the box above to prevent this post from automatically being split over multiple pages.',
'Check the box above to prevent this post from automatically being split over multiple pages.', 'autopaging'
'autopaging' ) }
) } checked={ disabled }
checked={ disabled } onChange={ setDisabled }
onChange={ setDisabled } />
/>
</>
) } ) }
</> </>
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment