diff --git a/wp-content/plugins/wds-citytech/build/index.asset.php b/wp-content/plugins/wds-citytech/build/index.asset.php
index f376ad905c..244c6cd54c 100644
--- a/wp-content/plugins/wds-citytech/build/index.asset.php
+++ b/wp-content/plugins/wds-citytech/build/index.asset.php
@@ -1 +1 @@
- array('react', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-plugins'), 'version' => 'fb68da4319d0c9e960fc');
+ array('react', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-plugins'), 'version' => 'ded45caf4356ef6d9659');
diff --git a/wp-content/plugins/wds-citytech/build/index.js b/wp-content/plugins/wds-citytech/build/index.js
index 444bc8fafa..7249eab611 100644
--- a/wp-content/plugins/wds-citytech/build/index.js
+++ b/wp-content/plugins/wds-citytech/build/index.js
@@ -26,7 +26,7 @@ __webpack_require__.r(__webpack_exports__);
-const PostSharingOptions = ({}) => {
+const PostSharingOptions = () => {
const {
blogPublic,
shareOnlyWithGroup
@@ -43,7 +43,7 @@ const PostSharingOptions = ({}) => {
return {
postVisibility: postMeta.openlab_post_visibility || defaultVisibility
};
- });
+ }, [blogPublicInt]);
if (blogPublicInt < -1) {
return null;
}
@@ -79,7 +79,7 @@ const PostSharingOptions = ({}) => {
className: "editor-post-visibility__fieldset"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.VisuallyHidden, {
as: "legend"
- }, "Sharing"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, 'Control who can see this post.'), visibilityOptions.map(option => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(PostSharingChoice, {
+ }, "Sharing"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Control who can see this post."), visibilityOptions.map(option => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(PostSharingChoice, {
key: option.value,
instanceId: "post-sharing-options",
value: option.value,
@@ -116,13 +116,13 @@ function PostSharingChoice({
}
const registerPostVisibility = () => {
const post = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.select)('core/editor').getCurrentPost();
- if (post) {
+ if (post && post.id) {
(0,_wordpress_plugins__WEBPACK_IMPORTED_MODULE_3__.registerPlugin)('post-sharing-options', {
render: PostSharingOptions
});
}
};
-registerPostVisibility();
+wp.domReady(registerPostVisibility);
/***/ }),
diff --git a/wp-content/plugins/wds-citytech/build/index.js.map b/wp-content/plugins/wds-citytech/build/index.js.map
index d6116349b1..b9d1cc276f 100644
--- a/wp-content/plugins/wds-citytech/build/index.js.map
+++ b/wp-content/plugins/wds-citytech/build/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEsD;AACW;AACd;AACa;AAEhE,MAAMM,kBAAkB,GAAGA,CAAC,CAAC,CAAC,KAAK;EAClC,MAAM;IAAEC,UAAU;IAAEC;EAAmB,CAAC,GAAGC,2BAA2B;EAEtE,MAAM;IAAEC;EAAS,CAAC,GAAGN,4DAAW,CAAE,aAAc,CAAC;EAEjD,MAAMO,aAAa,GAAGC,QAAQ,CAAEL,UAAW,CAAC;EAE5C,MAAM;IAAEM;EAAe,CAAC,GAAGR,0DAAS,CAAIS,SAAS,IAAM;IACtD,MAAMC,QAAQ,GAAGD,SAAS,CAAE,aAAc,CAAC,CAACE,sBAAsB,CAAE,MAAO,CAAC;IAE5E,MAAMC,iBAAiB,GAAGN,aAAa,IAAI,CAAC,GAAG,SAAS,GAAG,cAAc;IAEzE,OAAO;MACNE,cAAc,EAAEE,QAAQ,CAACG,uBAAuB,IAAID;IACrD,CAAC;EACF,CAAE,CAAC;EAEH,IAAKN,aAAa,GAAG,CAAC,CAAC,EAAG;IACzB,OAAO,IAAI;EACZ;EAEA,MAAMQ,QAAQ,GAAKC,KAAK,IAAM;IAC7BV,QAAQ,CAAE;MAAEW,IAAI,EAAE;QAAE,yBAAyB,EAAED;MAAM;IAAE,CAAE,CAAC;EAC3D,CAAC;EAED,MAAME,oBAAo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B;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;ACNA;AACA","sources":["webpack://wds-citytech/./src/components/post-sharing-options.js","webpack://wds-citytech/external window \"React\"","webpack://wds-citytech/external window [\"wp\",\"components\"]","webpack://wds-citytech/external window [\"wp\",\"data\"]","webpack://wds-citytech/external window [\"wp\",\"editPost\"]","webpack://wds-citytech/external window [\"wp\",\"plugins\"]","webpack://wds-citytech/webpack/bootstrap","webpack://wds-citytech/webpack/runtime/compat get default export","webpack://wds-citytech/webpack/runtime/define property getters","webpack://wds-citytech/webpack/runtime/hasOwnProperty shorthand","webpack://wds-citytech/webpack/runtime/make namespace object","webpack://wds-citytech/./src/index.js"],"sourcesContent":["/* global openlabBlocksPostVisibility */\n\nimport { VisuallyHidden } from '@wordpress/components'\nimport { PluginDocumentSettingPanel } from '@wordpress/edit-post'\nimport { registerPlugin } from '@wordpress/plugins'\nimport { select, useDispatch, useSelect } from '@wordpress/data'\n\nconst PostSharingOptions = ({}) => {\n\tconst { blogPublic, shareOnlyWithGroup } = openlabBlocksPostVisibility\n\n\tconst { editPost } = useDispatch( 'core/editor' )\n\n\tconst blogPublicInt = parseInt( blogPublic )\n\n\tconst { postVisibility } = useSelect( ( selectObj ) => {\n\t\tconst postMeta = selectObj( 'core/editor' ).getEditedPostAttribute( 'meta' )\n\n\t\tconst defaultVisibility = blogPublicInt >= 0 ? 'default' : 'members-only'\n\n\t\treturn {\n\t\t\tpostVisibility: postMeta.openlab_post_visibility || defaultVisibility\n\t\t}\n\t} )\n\n\tif ( blogPublicInt < -1 ) {\n\t\treturn null\n\t}\n\n\tconst onChange = ( value ) => {\n\t\teditPost( { meta: { 'openlab_post_visibility': value } } )\n\t}\n\n\tconst publicOverrideString = 'This will override the Public visibility setting above.'\n\n\tconst visibilityOptions = [\n\t\t{\n\t\t\tvalue: 'group-members-only',\n\t\t\tlabel: 'Site Members',\n\t\t\tinfo: shareOnlyWithGroup + ' ' + publicOverrideString\n\t\t},\n\t\t{\n\t\t\tvalue: 'members-only',\n\t\t\tlabel: 'OpenLab members only',\n\t\t\tinfo: 'Only logged-in OpenLab members can see this post. ' + publicOverrideString\n\t\t}\n\t]\n\n\tif ( blogPublicInt >= 0 ) {\n\t\tvisibilityOptions.push( {\n\t\t\tvalue: 'default',\n\t\t\tlabel: 'Everyone',\n\t\t\tinfo: 'Everyone who can view this site can see this post.'\n\t\t} )\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t)\n}\n\nfunction PostSharingChoice( { instanceId, value, label, info, ...props } ) {\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t{ info }\n\t\t\t
\n\t\t
\n\t);\n}\n\nconst registerPostVisibility = () => {\n const post = select( 'core/editor' ).getCurrentPost();\n\tif ( post ) {\n\t\tregisterPlugin(\n\t\t\t'post-sharing-options',\n\t\t\t{ render: PostSharingOptions }\n\t\t)\n\t}\n};\nregisterPostVisibility();\n","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"editPost\"];","module.exports = window[\"wp\"][\"plugins\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","//import './blocks/openlab-help'\n//import './blocks/openlab-support'\n\nimport './components/post-sharing-options'\n"],"names":["VisuallyHidden","PluginDocumentSettingPanel","registerPlugin","select","useDispatch","useSelect","PostSharingOptions","blogPublic","shareOnlyWithGroup","openlabBlocksPostVisibility","editPost","blogPublicInt","parseInt","postVisibility","selectObj","postMeta","getEditedPostAttribute","defaultVisibility","openlab_post_visibility","onChange","value","meta","publicOverrideString","visibilityOptions","label","info","push","createElement","name","title","className","as","map","option","PostSharingChoice","key","instanceId","event","target","checked","props","type","id","htmlFor","registerPostVisibility","post","getCurrentPost","render"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEuD;AACW;AACd;AACa;AAEjE,MAAMM,kBAAkB,GAAGA,CAAA,KAAM;EAC/B,MAAM;IAAEC,UAAU;IAAEC;EAAmB,CAAC,GAAGC,2BAA2B;EACtE,MAAM;IAAEC;EAAS,CAAC,GAAGN,4DAAW,CAAE,aAAc,CAAC;EAEjD,MAAMO,aAAa,GAAGC,QAAQ,CAAEL,UAAW,CAAC;EAE5C,MAAM;IAAEM;EAAe,CAAC,GAAGR,0DAAS,CAAIS,SAAS,IAAM;IACrD,MAAMC,QAAQ,GAAGD,SAAS,CAAE,aAAc,CAAC,CAACE,sBAAsB,CAAE,MAAO,CAAC;IAC5E,MAA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C/B,CAAC;EACH;AACF,CAAC;AAED0C,EAAE,CAACC,QAAQ,CAAEL,sBAAuB,CAAC;;;;;;;;;;ACtHrC;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;ACNA;AACA","sources":["webpack://wds-citytech/./src/components/post-sharing-options.js","webpack://wds-citytech/external window \"React\"","webpack://wds-citytech/external window [\"wp\",\"components\"]","webpack://wds-citytech/external window [\"wp\",\"data\"]","webpack://wds-citytech/external window [\"wp\",\"editPost\"]","webpack://wds-citytech/external window [\"wp\",\"plugins\"]","webpack://wds-citytech/webpack/bootstrap","webpack://wds-citytech/webpack/runtime/compat get default export","webpack://wds-citytech/webpack/runtime/define property getters","webpack://wds-citytech/webpack/runtime/hasOwnProperty shorthand","webpack://wds-citytech/webpack/runtime/make namespace object","webpack://wds-citytech/./src/index.js"],"sourcesContent":["/* global openlabBlocksPostVisibility */\n\nimport { VisuallyHidden } from '@wordpress/components';\nimport { PluginDocumentSettingPanel } from '@wordpress/edit-post';\nimport { registerPlugin } from '@wordpress/plugins';\nimport { select, useDispatch, useSelect } from '@wordpress/data';\n\nconst PostSharingOptions = () => {\n const { blogPublic, shareOnlyWithGroup } = openlabBlocksPostVisibility;\n const { editPost } = useDispatch( 'core/editor' );\n\n const blogPublicInt = parseInt( blogPublic );\n\n const { postVisibility } = useSelect( ( selectObj ) => {\n const postMeta = selectObj( 'core/editor' ).getEditedPostAttribute( 'meta' );\n const defaultVisibility = blogPublicInt >= 0 ? 'default' : 'members-only';\n\n return {\n postVisibility: postMeta.openlab_post_visibility || defaultVisibility,\n };\n }, [ blogPublicInt ] );\n\n if ( blogPublicInt < -1 ) {\n return null;\n }\n\n const onChange = ( value ) => {\n editPost( { meta: { 'openlab_post_visibility': value } } );\n };\n\n const publicOverrideString = 'This will override the Public visibility setting above.';\n\n const visibilityOptions = [\n {\n value: 'group-members-only',\n label: 'Site Members',\n info: shareOnlyWithGroup + ' ' + publicOverrideString,\n },\n {\n value: 'members-only',\n label: 'OpenLab members only',\n info: 'Only logged-in OpenLab members can see this post. ' + publicOverrideString,\n },\n ];\n\n if ( blogPublicInt >= 0 ) {\n visibilityOptions.push({\n value: 'default',\n label: 'Everyone',\n info: 'Everyone who can view this site can see this post.',\n });\n }\n\n return (\n \n \n \n );\n};\n\nfunction PostSharingChoice( { instanceId, value, label, info, ...props } ) {\n return (\n \n
\n
\n
\n { info }\n
\n
\n );\n}\n\nconst registerPostVisibility = () => {\n const post = select( 'core/editor' ).getCurrentPost();\n if ( post && post.id ) {\n registerPlugin(\n 'post-sharing-options',\n { render: PostSharingOptions }\n );\n }\n};\n\nwp.domReady( registerPostVisibility );\n","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"editPost\"];","module.exports = window[\"wp\"][\"plugins\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","//import './blocks/openlab-help'\n//import './blocks/openlab-support'\n\nimport './components/post-sharing-options'\n"],"names":["VisuallyHidden","PluginDocumentSettingPanel","registerPlugin","select","useDispatch","useSelect","PostSharingOptions","blogPublic","shareOnlyWithGroup","openlabBlocksPostVisibility","editPost","blogPublicInt","parseInt","postVisibility","selectObj","postMeta","getEditedPostAttribute","defaultVisibility","openlab_post_visibility","onChange","value","meta","publicOverrideString","visibilityOptions","label","info","push","createElement","name","title","className","as","map","option","PostSharingChoice","key","instanceId","event","target","checked","props","type","id","htmlFor","registerPostVisibility","post","getCurrentPost","render","wp","domReady"],"sourceRoot":""}
\ No newline at end of file