From 827275a83b94865cc1243d36d30b82f044fce35d Mon Sep 17 00:00:00 2001 From: Erick Hitter <git-contrib@ethitter.com> Date: Tue, 28 Jun 2022 21:00:05 -0700 Subject: [PATCH] Fix syntax --- assets/build/index.asset.php | 2 +- assets/build/index.js | 2 +- assets/src/js/panel-body.js | 26 ++++++++++++-------------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/assets/build/index.asset.php b/assets/build/index.asset.php index 9a3f8ee..f27808a 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 f63a341..bf18729 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 35fb697..44b1377 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 } + /> ) } </> ); -- GitLab