Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: editor.js
* WordPress dependencies
[16500] Fix | Delete
*/
[16501] Fix | Delete
[16502] Fix | Delete
[16503] Fix | Delete
[16504] Fix | Delete
[16505] Fix | Delete
[16506] Fix | Delete
[16507] Fix | Delete
[16508] Fix | Delete
[16509] Fix | Delete
/**
[16510] Fix | Delete
* Internal dependencies
[16511] Fix | Delete
*/
[16512] Fix | Delete
[16513] Fix | Delete
[16514] Fix | Delete
[16515] Fix | Delete
[16516] Fix | Delete
[16517] Fix | Delete
[16518] Fix | Delete
[16519] Fix | Delete
class PostPublishPanel extends external_wp_element_namespaceObject.Component {
[16520] Fix | Delete
constructor() {
[16521] Fix | Delete
super(...arguments);
[16522] Fix | Delete
this.onSubmit = this.onSubmit.bind(this);
[16523] Fix | Delete
}
[16524] Fix | Delete
componentDidUpdate(prevProps) {
[16525] Fix | Delete
// Automatically collapse the publish sidebar when a post
[16526] Fix | Delete
// is published and the user makes an edit.
[16527] Fix | Delete
if (prevProps.isPublished && !this.props.isSaving && this.props.isDirty) {
[16528] Fix | Delete
this.props.onClose();
[16529] Fix | Delete
}
[16530] Fix | Delete
}
[16531] Fix | Delete
onSubmit() {
[16532] Fix | Delete
const {
[16533] Fix | Delete
onClose,
[16534] Fix | Delete
hasPublishAction,
[16535] Fix | Delete
isPostTypeViewable
[16536] Fix | Delete
} = this.props;
[16537] Fix | Delete
if (!hasPublishAction || !isPostTypeViewable) {
[16538] Fix | Delete
onClose();
[16539] Fix | Delete
}
[16540] Fix | Delete
}
[16541] Fix | Delete
render() {
[16542] Fix | Delete
const {
[16543] Fix | Delete
forceIsDirty,
[16544] Fix | Delete
isBeingScheduled,
[16545] Fix | Delete
isPublished,
[16546] Fix | Delete
isPublishSidebarEnabled,
[16547] Fix | Delete
isScheduled,
[16548] Fix | Delete
isSaving,
[16549] Fix | Delete
isSavingNonPostEntityChanges,
[16550] Fix | Delete
onClose,
[16551] Fix | Delete
onTogglePublishSidebar,
[16552] Fix | Delete
PostPublishExtension,
[16553] Fix | Delete
PrePublishExtension,
[16554] Fix | Delete
...additionalProps
[16555] Fix | Delete
} = this.props;
[16556] Fix | Delete
const {
[16557] Fix | Delete
hasPublishAction,
[16558] Fix | Delete
isDirty,
[16559] Fix | Delete
isPostTypeViewable,
[16560] Fix | Delete
...propsForPanel
[16561] Fix | Delete
} = additionalProps;
[16562] Fix | Delete
const isPublishedOrScheduled = isPublished || isScheduled && isBeingScheduled;
[16563] Fix | Delete
const isPrePublish = !isPublishedOrScheduled && !isSaving;
[16564] Fix | Delete
const isPostPublish = isPublishedOrScheduled && !isSaving;
[16565] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16566] Fix | Delete
className: "editor-post-publish-panel",
[16567] Fix | Delete
...propsForPanel,
[16568] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16569] Fix | Delete
className: "editor-post-publish-panel__header",
[16570] Fix | Delete
children: isPostPublish ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[16571] Fix | Delete
onClick: onClose,
[16572] Fix | Delete
icon: close_small,
[16573] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Close panel')
[16574] Fix | Delete
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16575] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16576] Fix | Delete
className: "editor-post-publish-panel__header-publish-button",
[16577] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_publish_button, {
[16578] Fix | Delete
focusOnMount: true,
[16579] Fix | Delete
onSubmit: this.onSubmit,
[16580] Fix | Delete
forceIsDirty: forceIsDirty
[16581] Fix | Delete
})
[16582] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16583] Fix | Delete
className: "editor-post-publish-panel__header-cancel-button",
[16584] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[16585] Fix | Delete
__experimentalIsFocusable: true,
[16586] Fix | Delete
disabled: isSavingNonPostEntityChanges,
[16587] Fix | Delete
onClick: onClose,
[16588] Fix | Delete
variant: "secondary",
[16589] Fix | Delete
size: "compact",
[16590] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
[16591] Fix | Delete
})
[16592] Fix | Delete
})]
[16593] Fix | Delete
})
[16594] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16595] Fix | Delete
className: "editor-post-publish-panel__content",
[16596] Fix | Delete
children: [isPrePublish && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(prepublish, {
[16597] Fix | Delete
children: PrePublishExtension && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrePublishExtension, {})
[16598] Fix | Delete
}), isPostPublish && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(postpublish, {
[16599] Fix | Delete
focusOnMount: true,
[16600] Fix | Delete
children: PostPublishExtension && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostPublishExtension, {})
[16601] Fix | Delete
}), isSaving && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})]
[16602] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16603] Fix | Delete
className: "editor-post-publish-panel__footer",
[16604] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
[16605] Fix | Delete
__nextHasNoMarginBottom: true,
[16606] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Always show pre-publish checks.'),
[16607] Fix | Delete
checked: isPublishSidebarEnabled,
[16608] Fix | Delete
onChange: onTogglePublishSidebar
[16609] Fix | Delete
})
[16610] Fix | Delete
})]
[16611] Fix | Delete
});
[16612] Fix | Delete
}
[16613] Fix | Delete
}
[16614] Fix | Delete
/* harmony default export */ const post_publish_panel = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_data_namespaceObject.withSelect)(select => {
[16615] Fix | Delete
var _getCurrentPost$_link;
[16616] Fix | Delete
const {
[16617] Fix | Delete
getPostType
[16618] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[16619] Fix | Delete
const {
[16620] Fix | Delete
getCurrentPost,
[16621] Fix | Delete
getEditedPostAttribute,
[16622] Fix | Delete
isCurrentPostPublished,
[16623] Fix | Delete
isCurrentPostScheduled,
[16624] Fix | Delete
isEditedPostBeingScheduled,
[16625] Fix | Delete
isEditedPostDirty,
[16626] Fix | Delete
isAutosavingPost,
[16627] Fix | Delete
isSavingPost,
[16628] Fix | Delete
isSavingNonPostEntityChanges
[16629] Fix | Delete
} = select(store_store);
[16630] Fix | Delete
const {
[16631] Fix | Delete
isPublishSidebarEnabled
[16632] Fix | Delete
} = select(store_store);
[16633] Fix | Delete
const postType = getPostType(getEditedPostAttribute('type'));
[16634] Fix | Delete
return {
[16635] Fix | Delete
hasPublishAction: (_getCurrentPost$_link = getCurrentPost()._links?.['wp:action-publish']) !== null && _getCurrentPost$_link !== void 0 ? _getCurrentPost$_link : false,
[16636] Fix | Delete
isPostTypeViewable: postType?.viewable,
[16637] Fix | Delete
isBeingScheduled: isEditedPostBeingScheduled(),
[16638] Fix | Delete
isDirty: isEditedPostDirty(),
[16639] Fix | Delete
isPublished: isCurrentPostPublished(),
[16640] Fix | Delete
isPublishSidebarEnabled: isPublishSidebarEnabled(),
[16641] Fix | Delete
isSaving: isSavingPost() && !isAutosavingPost(),
[16642] Fix | Delete
isSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),
[16643] Fix | Delete
isScheduled: isCurrentPostScheduled()
[16644] Fix | Delete
};
[16645] Fix | Delete
}), (0,external_wp_data_namespaceObject.withDispatch)((dispatch, {
[16646] Fix | Delete
isPublishSidebarEnabled
[16647] Fix | Delete
}) => {
[16648] Fix | Delete
const {
[16649] Fix | Delete
disablePublishSidebar,
[16650] Fix | Delete
enablePublishSidebar
[16651] Fix | Delete
} = dispatch(store_store);
[16652] Fix | Delete
return {
[16653] Fix | Delete
onTogglePublishSidebar: () => {
[16654] Fix | Delete
if (isPublishSidebarEnabled) {
[16655] Fix | Delete
disablePublishSidebar();
[16656] Fix | Delete
} else {
[16657] Fix | Delete
enablePublishSidebar();
[16658] Fix | Delete
}
[16659] Fix | Delete
}
[16660] Fix | Delete
};
[16661] Fix | Delete
}), external_wp_components_namespaceObject.withFocusReturn, external_wp_components_namespaceObject.withConstrainedTabbing])(PostPublishPanel));
[16662] Fix | Delete
[16663] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cloud-upload.js
[16664] Fix | Delete
/**
[16665] Fix | Delete
* WordPress dependencies
[16666] Fix | Delete
*/
[16667] Fix | Delete
[16668] Fix | Delete
[16669] Fix | Delete
const cloudUpload = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[16670] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[16671] Fix | Delete
viewBox: "0 0 24 24",
[16672] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[16673] Fix | Delete
d: "M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"
[16674] Fix | Delete
})
[16675] Fix | Delete
});
[16676] Fix | Delete
/* harmony default export */ const cloud_upload = (cloudUpload);
[16677] Fix | Delete
[16678] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
[16679] Fix | Delete
/**
[16680] Fix | Delete
* WordPress dependencies
[16681] Fix | Delete
*/
[16682] Fix | Delete
[16683] Fix | Delete
[16684] Fix | Delete
/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
[16685] Fix | Delete
[16686] Fix | Delete
/**
[16687] Fix | Delete
* Return an SVG icon.
[16688] Fix | Delete
*
[16689] Fix | Delete
* @param {IconProps} props icon is the SVG component to render
[16690] Fix | Delete
* size is a number specifiying the icon size in pixels
[16691] Fix | Delete
* Other props will be passed to wrapped SVG component
[16692] Fix | Delete
* @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element.
[16693] Fix | Delete
*
[16694] Fix | Delete
* @return {JSX.Element} Icon component
[16695] Fix | Delete
*/
[16696] Fix | Delete
function Icon({
[16697] Fix | Delete
icon,
[16698] Fix | Delete
size = 24,
[16699] Fix | Delete
...props
[16700] Fix | Delete
}, ref) {
[16701] Fix | Delete
return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
[16702] Fix | Delete
width: size,
[16703] Fix | Delete
height: size,
[16704] Fix | Delete
...props,
[16705] Fix | Delete
ref
[16706] Fix | Delete
});
[16707] Fix | Delete
}
[16708] Fix | Delete
/* harmony default export */ const icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon));
[16709] Fix | Delete
[16710] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cloud.js
[16711] Fix | Delete
/**
[16712] Fix | Delete
* WordPress dependencies
[16713] Fix | Delete
*/
[16714] Fix | Delete
[16715] Fix | Delete
[16716] Fix | Delete
const cloud = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[16717] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[16718] Fix | Delete
viewBox: "0 0 24 24",
[16719] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[16720] Fix | Delete
d: "M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"
[16721] Fix | Delete
})
[16722] Fix | Delete
});
[16723] Fix | Delete
/* harmony default export */ const library_cloud = (cloud);
[16724] Fix | Delete
[16725] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-status/index.js
[16726] Fix | Delete
/**
[16727] Fix | Delete
* WordPress dependencies
[16728] Fix | Delete
*/
[16729] Fix | Delete
[16730] Fix | Delete
[16731] Fix | Delete
[16732] Fix | Delete
[16733] Fix | Delete
[16734] Fix | Delete
[16735] Fix | Delete
[16736] Fix | Delete
[16737] Fix | Delete
/**
[16738] Fix | Delete
* Internal dependencies
[16739] Fix | Delete
*/
[16740] Fix | Delete
[16741] Fix | Delete
[16742] Fix | Delete
[16743] Fix | Delete
[16744] Fix | Delete
[16745] Fix | Delete
[16746] Fix | Delete
[16747] Fix | Delete
const labels = {
[16748] Fix | Delete
'auto-draft': (0,external_wp_i18n_namespaceObject.__)('Draft'),
[16749] Fix | Delete
draft: (0,external_wp_i18n_namespaceObject.__)('Draft'),
[16750] Fix | Delete
pending: (0,external_wp_i18n_namespaceObject.__)('Pending'),
[16751] Fix | Delete
private: (0,external_wp_i18n_namespaceObject.__)('Private'),
[16752] Fix | Delete
future: (0,external_wp_i18n_namespaceObject.__)('Scheduled'),
[16753] Fix | Delete
publish: (0,external_wp_i18n_namespaceObject.__)('Published')
[16754] Fix | Delete
};
[16755] Fix | Delete
const STATUS_OPTIONS = [{
[16756] Fix | Delete
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16757] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('Draft'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
[16758] Fix | Delete
variant: "muted",
[16759] Fix | Delete
size: 12,
[16760] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Not ready to publish.')
[16761] Fix | Delete
})]
[16762] Fix | Delete
}),
[16763] Fix | Delete
value: 'draft'
[16764] Fix | Delete
}, {
[16765] Fix | Delete
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16766] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('Pending'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
[16767] Fix | Delete
variant: "muted",
[16768] Fix | Delete
size: 12,
[16769] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Waiting for review before publishing.')
[16770] Fix | Delete
})]
[16771] Fix | Delete
}),
[16772] Fix | Delete
value: 'pending'
[16773] Fix | Delete
}, {
[16774] Fix | Delete
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16775] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('Private'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
[16776] Fix | Delete
variant: "muted",
[16777] Fix | Delete
size: 12,
[16778] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Only visible to site admins and editors.')
[16779] Fix | Delete
})]
[16780] Fix | Delete
}),
[16781] Fix | Delete
value: 'private'
[16782] Fix | Delete
}, {
[16783] Fix | Delete
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16784] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('Scheduled'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
[16785] Fix | Delete
variant: "muted",
[16786] Fix | Delete
size: 12,
[16787] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Publish automatically on a chosen date.')
[16788] Fix | Delete
})]
[16789] Fix | Delete
}),
[16790] Fix | Delete
value: 'future'
[16791] Fix | Delete
}, {
[16792] Fix | Delete
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16793] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('Published'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
[16794] Fix | Delete
variant: "muted",
[16795] Fix | Delete
size: 12,
[16796] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Visible to everyone.')
[16797] Fix | Delete
})]
[16798] Fix | Delete
}),
[16799] Fix | Delete
value: 'publish'
[16800] Fix | Delete
}];
[16801] Fix | Delete
const DESIGN_POST_TYPES = [TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE, PATTERN_POST_TYPE, NAVIGATION_POST_TYPE];
[16802] Fix | Delete
function PostStatus() {
[16803] Fix | Delete
const {
[16804] Fix | Delete
status,
[16805] Fix | Delete
date,
[16806] Fix | Delete
password,
[16807] Fix | Delete
postId,
[16808] Fix | Delete
postType,
[16809] Fix | Delete
canEdit
[16810] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[16811] Fix | Delete
var _getCurrentPost$_link;
[16812] Fix | Delete
const {
[16813] Fix | Delete
getEditedPostAttribute,
[16814] Fix | Delete
getCurrentPostId,
[16815] Fix | Delete
getCurrentPostType,
[16816] Fix | Delete
getCurrentPost
[16817] Fix | Delete
} = select(store_store);
[16818] Fix | Delete
return {
[16819] Fix | Delete
status: getEditedPostAttribute('status'),
[16820] Fix | Delete
date: getEditedPostAttribute('date'),
[16821] Fix | Delete
password: getEditedPostAttribute('password'),
[16822] Fix | Delete
postId: getCurrentPostId(),
[16823] Fix | Delete
postType: getCurrentPostType(),
[16824] Fix | Delete
canEdit: (_getCurrentPost$_link = getCurrentPost()._links?.['wp:action-publish']) !== null && _getCurrentPost$_link !== void 0 ? _getCurrentPost$_link : false
[16825] Fix | Delete
};
[16826] Fix | Delete
}, []);
[16827] Fix | Delete
const [showPassword, setShowPassword] = (0,external_wp_element_namespaceObject.useState)(!!password);
[16828] Fix | Delete
const passwordInputId = (0,external_wp_compose_namespaceObject.useInstanceId)(PostStatus, 'editor-change-status__password-input');
[16829] Fix | Delete
const {
[16830] Fix | Delete
editEntityRecord
[16831] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
[16832] Fix | Delete
const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
[16833] Fix | Delete
// Memoize popoverProps to avoid returning a new object every time.
[16834] Fix | Delete
const popoverProps = (0,external_wp_element_namespaceObject.useMemo)(() => ({
[16835] Fix | Delete
// Anchor the popover to the middle of the entire row so that it doesn't
[16836] Fix | Delete
// move around when the label changes.
[16837] Fix | Delete
anchor: popoverAnchor,
[16838] Fix | Delete
'aria-label': (0,external_wp_i18n_namespaceObject.__)('Status & visibility'),
[16839] Fix | Delete
headerTitle: (0,external_wp_i18n_namespaceObject.__)('Status & visibility'),
[16840] Fix | Delete
placement: 'left-start',
[16841] Fix | Delete
offset: 36,
[16842] Fix | Delete
shift: true
[16843] Fix | Delete
}), [popoverAnchor]);
[16844] Fix | Delete
if (DESIGN_POST_TYPES.includes(postType)) {
[16845] Fix | Delete
return null;
[16846] Fix | Delete
}
[16847] Fix | Delete
const updatePost = ({
[16848] Fix | Delete
status: newStatus = status,
[16849] Fix | Delete
password: newPassword = password,
[16850] Fix | Delete
date: newDate = date
[16851] Fix | Delete
}) => {
[16852] Fix | Delete
editEntityRecord('postType', postType, postId, {
[16853] Fix | Delete
status: newStatus,
[16854] Fix | Delete
date: newDate,
[16855] Fix | Delete
password: newPassword
[16856] Fix | Delete
});
[16857] Fix | Delete
};
[16858] Fix | Delete
const handleTogglePassword = value => {
[16859] Fix | Delete
setShowPassword(value);
[16860] Fix | Delete
if (!value) {
[16861] Fix | Delete
updatePost({
[16862] Fix | Delete
password: ''
[16863] Fix | Delete
});
[16864] Fix | Delete
}
[16865] Fix | Delete
};
[16866] Fix | Delete
const handleStatus = value => {
[16867] Fix | Delete
let newDate = date;
[16868] Fix | Delete
let newPassword = password;
[16869] Fix | Delete
if (status === 'future' && new Date(date) > new Date()) {
[16870] Fix | Delete
newDate = null;
[16871] Fix | Delete
}
[16872] Fix | Delete
if (value === 'private' && password) {
[16873] Fix | Delete
newPassword = '';
[16874] Fix | Delete
}
[16875] Fix | Delete
updatePost({
[16876] Fix | Delete
status: value,
[16877] Fix | Delete
date: newDate,
[16878] Fix | Delete
password: newPassword
[16879] Fix | Delete
});
[16880] Fix | Delete
};
[16881] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_panel_row, {
[16882] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Status'),
[16883] Fix | Delete
ref: setPopoverAnchor,
[16884] Fix | Delete
children: canEdit ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
[16885] Fix | Delete
className: "editor-post-status",
[16886] Fix | Delete
contentClassName: "editor-change-status__content",
[16887] Fix | Delete
popoverProps: popoverProps,
[16888] Fix | Delete
focusOnMount: true,
[16889] Fix | Delete
renderToggle: ({
[16890] Fix | Delete
onToggle
[16891] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[16892] Fix | Delete
variant: "tertiary",
[16893] Fix | Delete
size: "compact",
[16894] Fix | Delete
onClick: onToggle,
[16895] Fix | Delete
"aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
[16896] Fix | Delete
// translators: %s: Current post status.
[16897] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Change post status: %s'), labels[status]),
[16898] Fix | Delete
children: labels[status]
[16899] Fix | Delete
}),
[16900] Fix | Delete
renderContent: ({
[16901] Fix | Delete
onClose
[16902] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16903] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalInspectorPopoverHeader, {
[16904] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Status & visibility'),
[16905] Fix | Delete
onClose: onClose
[16906] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
[16907] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[16908] Fix | Delete
spacing: 4,
[16909] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RadioControl, {
[16910] Fix | Delete
className: "editor-change-status__options",
[16911] Fix | Delete
hideLabelFromVision: true,
[16912] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Status'),
[16913] Fix | Delete
options: STATUS_OPTIONS,
[16914] Fix | Delete
onChange: handleStatus,
[16915] Fix | Delete
selected: status === 'auto-draft' ? 'draft' : status
[16916] Fix | Delete
}), status === 'future' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16917] Fix | Delete
className: "editor-change-status__publish-date-wrapper",
[16918] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrivatePostSchedule, {
[16919] Fix | Delete
showPopoverHeaderActions: false,
[16920] Fix | Delete
isCompact: true
[16921] Fix | Delete
})
[16922] Fix | Delete
}), status !== 'private' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[16923] Fix | Delete
as: "fieldset",
[16924] Fix | Delete
spacing: 4,
[16925] Fix | Delete
className: "editor-change-status__password-fieldset",
[16926] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
[16927] Fix | Delete
__nextHasNoMarginBottom: true,
[16928] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Password protected'),
[16929] Fix | Delete
help: (0,external_wp_i18n_namespaceObject.__)('Only visible to those who know the password'),
[16930] Fix | Delete
checked: showPassword,
[16931] Fix | Delete
onChange: handleTogglePassword
[16932] Fix | Delete
}), showPassword && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16933] Fix | Delete
className: "editor-change-status__password-input",
[16934] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
[16935] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Password'),
[16936] Fix | Delete
onChange: value => updatePost({
[16937] Fix | Delete
password: value
[16938] Fix | Delete
}),
[16939] Fix | Delete
value: password,
[16940] Fix | Delete
placeholder: (0,external_wp_i18n_namespaceObject.__)('Use a secure password'),
[16941] Fix | Delete
type: "text",
[16942] Fix | Delete
id: passwordInputId,
[16943] Fix | Delete
__next40pxDefaultSize: true,
[16944] Fix | Delete
__nextHasNoMarginBottom: true
[16945] Fix | Delete
})
[16946] Fix | Delete
})]
[16947] Fix | Delete
})]
[16948] Fix | Delete
})
[16949] Fix | Delete
})]
[16950] Fix | Delete
})
[16951] Fix | Delete
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16952] Fix | Delete
className: "editor-post-status is-read-only",
[16953] Fix | Delete
children: labels[status]
[16954] Fix | Delete
})
[16955] Fix | Delete
});
[16956] Fix | Delete
}
[16957] Fix | Delete
[16958] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-saved-state/index.js
[16959] Fix | Delete
/**
[16960] Fix | Delete
* External dependencies
[16961] Fix | Delete
*/
[16962] Fix | Delete
[16963] Fix | Delete
[16964] Fix | Delete
/**
[16965] Fix | Delete
* WordPress dependencies
[16966] Fix | Delete
*/
[16967] Fix | Delete
[16968] Fix | Delete
[16969] Fix | Delete
[16970] Fix | Delete
[16971] Fix | Delete
[16972] Fix | Delete
[16973] Fix | Delete
[16974] Fix | Delete
[16975] Fix | Delete
[16976] Fix | Delete
/**
[16977] Fix | Delete
* Internal dependencies
[16978] Fix | Delete
*/
[16979] Fix | Delete
[16980] Fix | Delete
[16981] Fix | Delete
[16982] Fix | Delete
/**
[16983] Fix | Delete
* Component showing whether the post is saved or not and providing save
[16984] Fix | Delete
* buttons.
[16985] Fix | Delete
*
[16986] Fix | Delete
* @param {Object} props Component props.
[16987] Fix | Delete
* @param {?boolean} props.forceIsDirty Whether to force the post to be marked
[16988] Fix | Delete
* as dirty.
[16989] Fix | Delete
* @return {import('react').ComponentType} The component.
[16990] Fix | Delete
*/
[16991] Fix | Delete
[16992] Fix | Delete
[16993] Fix | Delete
function PostSavedState({
[16994] Fix | Delete
forceIsDirty
[16995] Fix | Delete
}) {
[16996] Fix | Delete
const [forceSavedMessage, setForceSavedMessage] = (0,external_wp_element_namespaceObject.useState)(false);
[16997] Fix | Delete
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small');
[16998] Fix | Delete
const {
[16999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function