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
...props
[7500] Fix | Delete
}) {
[7501] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
[7502] Fix | Delete
className: dist_clsx('interface-navigable-region', className),
[7503] Fix | Delete
"aria-label": ariaLabel,
[7504] Fix | Delete
role: "region",
[7505] Fix | Delete
tabIndex: "-1",
[7506] Fix | Delete
...props,
[7507] Fix | Delete
children: children
[7508] Fix | Delete
});
[7509] Fix | Delete
}
[7510] Fix | Delete
[7511] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js
[7512] Fix | Delete
/**
[7513] Fix | Delete
* External dependencies
[7514] Fix | Delete
*/
[7515] Fix | Delete
[7516] Fix | Delete
[7517] Fix | Delete
/**
[7518] Fix | Delete
* WordPress dependencies
[7519] Fix | Delete
*/
[7520] Fix | Delete
[7521] Fix | Delete
[7522] Fix | Delete
[7523] Fix | Delete
[7524] Fix | Delete
[7525] Fix | Delete
/**
[7526] Fix | Delete
* Internal dependencies
[7527] Fix | Delete
*/
[7528] Fix | Delete
[7529] Fix | Delete
[7530] Fix | Delete
[7531] Fix | Delete
const interface_skeleton_ANIMATION_DURATION = 0.25;
[7532] Fix | Delete
const commonTransition = {
[7533] Fix | Delete
type: 'tween',
[7534] Fix | Delete
duration: interface_skeleton_ANIMATION_DURATION,
[7535] Fix | Delete
ease: [0.6, 0, 0.4, 1]
[7536] Fix | Delete
};
[7537] Fix | Delete
function useHTMLClass(className) {
[7538] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[7539] Fix | Delete
const element = document && document.querySelector(`html:not(.${className})`);
[7540] Fix | Delete
if (!element) {
[7541] Fix | Delete
return;
[7542] Fix | Delete
}
[7543] Fix | Delete
element.classList.toggle(className);
[7544] Fix | Delete
return () => {
[7545] Fix | Delete
element.classList.toggle(className);
[7546] Fix | Delete
};
[7547] Fix | Delete
}, [className]);
[7548] Fix | Delete
}
[7549] Fix | Delete
const headerVariants = {
[7550] Fix | Delete
hidden: {
[7551] Fix | Delete
opacity: 1,
[7552] Fix | Delete
marginTop: -60
[7553] Fix | Delete
},
[7554] Fix | Delete
visible: {
[7555] Fix | Delete
opacity: 1,
[7556] Fix | Delete
marginTop: 0
[7557] Fix | Delete
},
[7558] Fix | Delete
distractionFreeHover: {
[7559] Fix | Delete
opacity: 1,
[7560] Fix | Delete
marginTop: 0,
[7561] Fix | Delete
transition: {
[7562] Fix | Delete
...commonTransition,
[7563] Fix | Delete
delay: 0.2,
[7564] Fix | Delete
delayChildren: 0.2
[7565] Fix | Delete
}
[7566] Fix | Delete
},
[7567] Fix | Delete
distractionFreeHidden: {
[7568] Fix | Delete
opacity: 0,
[7569] Fix | Delete
marginTop: -60
[7570] Fix | Delete
},
[7571] Fix | Delete
distractionFreeDisabled: {
[7572] Fix | Delete
opacity: 0,
[7573] Fix | Delete
marginTop: 0,
[7574] Fix | Delete
transition: {
[7575] Fix | Delete
...commonTransition,
[7576] Fix | Delete
delay: 0.8,
[7577] Fix | Delete
delayChildren: 0.8
[7578] Fix | Delete
}
[7579] Fix | Delete
}
[7580] Fix | Delete
};
[7581] Fix | Delete
function InterfaceSkeleton({
[7582] Fix | Delete
isDistractionFree,
[7583] Fix | Delete
footer,
[7584] Fix | Delete
header,
[7585] Fix | Delete
editorNotices,
[7586] Fix | Delete
sidebar,
[7587] Fix | Delete
secondarySidebar,
[7588] Fix | Delete
content,
[7589] Fix | Delete
actions,
[7590] Fix | Delete
labels,
[7591] Fix | Delete
className,
[7592] Fix | Delete
enableRegionNavigation = true,
[7593] Fix | Delete
// Todo: does this need to be a prop.
[7594] Fix | Delete
// Can we use a dependency to keyboard-shortcuts directly?
[7595] Fix | Delete
shortcuts
[7596] Fix | Delete
}, ref) {
[7597] Fix | Delete
const [secondarySidebarResizeListener, secondarySidebarSize] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
[7598] Fix | Delete
const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
[7599] Fix | Delete
const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
[7600] Fix | Delete
const defaultTransition = {
[7601] Fix | Delete
type: 'tween',
[7602] Fix | Delete
duration: disableMotion ? 0 : interface_skeleton_ANIMATION_DURATION,
[7603] Fix | Delete
ease: [0.6, 0, 0.4, 1]
[7604] Fix | Delete
};
[7605] Fix | Delete
const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)(shortcuts);
[7606] Fix | Delete
useHTMLClass('interface-interface-skeleton__html-container');
[7607] Fix | Delete
const defaultLabels = {
[7608] Fix | Delete
/* translators: accessibility text for the top bar landmark region. */
[7609] Fix | Delete
header: (0,external_wp_i18n_namespaceObject._x)('Header', 'header landmark area'),
[7610] Fix | Delete
/* translators: accessibility text for the content landmark region. */
[7611] Fix | Delete
body: (0,external_wp_i18n_namespaceObject.__)('Content'),
[7612] Fix | Delete
/* translators: accessibility text for the secondary sidebar landmark region. */
[7613] Fix | Delete
secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'),
[7614] Fix | Delete
/* translators: accessibility text for the settings landmark region. */
[7615] Fix | Delete
sidebar: (0,external_wp_i18n_namespaceObject.__)('Settings'),
[7616] Fix | Delete
/* translators: accessibility text for the publish landmark region. */
[7617] Fix | Delete
actions: (0,external_wp_i18n_namespaceObject.__)('Publish'),
[7618] Fix | Delete
/* translators: accessibility text for the footer landmark region. */
[7619] Fix | Delete
footer: (0,external_wp_i18n_namespaceObject.__)('Footer')
[7620] Fix | Delete
};
[7621] Fix | Delete
const mergedLabels = {
[7622] Fix | Delete
...defaultLabels,
[7623] Fix | Delete
...labels
[7624] Fix | Delete
};
[7625] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[7626] Fix | Delete
...(enableRegionNavigation ? navigateRegionsProps : {}),
[7627] Fix | Delete
ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, enableRegionNavigation ? navigateRegionsProps.ref : undefined]),
[7628] Fix | Delete
className: dist_clsx(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer'),
[7629] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[7630] Fix | Delete
className: "interface-interface-skeleton__editor",
[7631] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
[7632] Fix | Delete
initial: false,
[7633] Fix | Delete
children: !!header && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
[7634] Fix | Delete
as: external_wp_components_namespaceObject.__unstableMotion.div,
[7635] Fix | Delete
className: "interface-interface-skeleton__header",
[7636] Fix | Delete
"aria-label": mergedLabels.header,
[7637] Fix | Delete
initial: isDistractionFree ? 'distractionFreeHidden' : 'hidden',
[7638] Fix | Delete
whileHover: isDistractionFree ? 'distractionFreeHover' : 'visible',
[7639] Fix | Delete
animate: isDistractionFree ? 'distractionFreeDisabled' : 'visible',
[7640] Fix | Delete
exit: isDistractionFree ? 'distractionFreeHidden' : 'hidden',
[7641] Fix | Delete
variants: headerVariants,
[7642] Fix | Delete
transition: defaultTransition,
[7643] Fix | Delete
children: header
[7644] Fix | Delete
})
[7645] Fix | Delete
}), isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[7646] Fix | Delete
className: "interface-interface-skeleton__header",
[7647] Fix | Delete
children: editorNotices
[7648] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[7649] Fix | Delete
className: "interface-interface-skeleton__body",
[7650] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
[7651] Fix | Delete
initial: false,
[7652] Fix | Delete
children: !!secondarySidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
[7653] Fix | Delete
className: "interface-interface-skeleton__secondary-sidebar",
[7654] Fix | Delete
ariaLabel: mergedLabels.secondarySidebar,
[7655] Fix | Delete
as: external_wp_components_namespaceObject.__unstableMotion.div,
[7656] Fix | Delete
initial: "closed",
[7657] Fix | Delete
animate: isMobileViewport ? 'mobileOpen' : 'open',
[7658] Fix | Delete
exit: "closed",
[7659] Fix | Delete
variants: {
[7660] Fix | Delete
open: {
[7661] Fix | Delete
width: secondarySidebarSize.width
[7662] Fix | Delete
},
[7663] Fix | Delete
closed: {
[7664] Fix | Delete
width: 0
[7665] Fix | Delete
},
[7666] Fix | Delete
mobileOpen: {
[7667] Fix | Delete
width: '100vw'
[7668] Fix | Delete
}
[7669] Fix | Delete
},
[7670] Fix | Delete
transition: defaultTransition,
[7671] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[7672] Fix | Delete
style: {
[7673] Fix | Delete
position: 'absolute',
[7674] Fix | Delete
width: isMobileViewport ? '100vw' : 'fit-content',
[7675] Fix | Delete
height: '100%',
[7676] Fix | Delete
right: 0
[7677] Fix | Delete
},
[7678] Fix | Delete
children: [secondarySidebarResizeListener, secondarySidebar]
[7679] Fix | Delete
})
[7680] Fix | Delete
})
[7681] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
[7682] Fix | Delete
className: "interface-interface-skeleton__content",
[7683] Fix | Delete
ariaLabel: mergedLabels.body,
[7684] Fix | Delete
children: content
[7685] Fix | Delete
}), !!sidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
[7686] Fix | Delete
className: "interface-interface-skeleton__sidebar",
[7687] Fix | Delete
ariaLabel: mergedLabels.sidebar,
[7688] Fix | Delete
children: sidebar
[7689] Fix | Delete
}), !!actions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
[7690] Fix | Delete
className: "interface-interface-skeleton__actions",
[7691] Fix | Delete
ariaLabel: mergedLabels.actions,
[7692] Fix | Delete
children: actions
[7693] Fix | Delete
})]
[7694] Fix | Delete
})]
[7695] Fix | Delete
}), !!footer && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
[7696] Fix | Delete
className: "interface-interface-skeleton__footer",
[7697] Fix | Delete
ariaLabel: mergedLabels.footer,
[7698] Fix | Delete
children: footer
[7699] Fix | Delete
})]
[7700] Fix | Delete
});
[7701] Fix | Delete
}
[7702] Fix | Delete
/* harmony default export */ const interface_skeleton = ((0,external_wp_element_namespaceObject.forwardRef)(InterfaceSkeleton));
[7703] Fix | Delete
[7704] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
[7705] Fix | Delete
[7706] Fix | Delete
[7707] Fix | Delete
[7708] Fix | Delete
[7709] Fix | Delete
[7710] Fix | Delete
[7711] Fix | Delete
[7712] Fix | Delete
[7713] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
[7714] Fix | Delete
[7715] Fix | Delete
[7716] Fix | Delete
[7717] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/index.js
[7718] Fix | Delete
/**
[7719] Fix | Delete
* WordPress dependencies
[7720] Fix | Delete
*/
[7721] Fix | Delete
[7722] Fix | Delete
[7723] Fix | Delete
[7724] Fix | Delete
[7725] Fix | Delete
[7726] Fix | Delete
/**
[7727] Fix | Delete
* Internal dependencies
[7728] Fix | Delete
*/
[7729] Fix | Delete
[7730] Fix | Delete
[7731] Fix | Delete
/**
[7732] Fix | Delete
* Component handles the keyboard shortcuts for the editor.
[7733] Fix | Delete
*
[7734] Fix | Delete
* It provides functionality for various keyboard shortcuts such as toggling editor mode,
[7735] Fix | Delete
* toggling distraction-free mode, undo/redo, saving the post, toggling list view,
[7736] Fix | Delete
* and toggling the sidebar.
[7737] Fix | Delete
*/
[7738] Fix | Delete
function EditorKeyboardShortcuts() {
[7739] Fix | Delete
const isModeToggleDisabled = (0,external_wp_data_namespaceObject.useSelect)(select => {
[7740] Fix | Delete
const {
[7741] Fix | Delete
richEditingEnabled,
[7742] Fix | Delete
codeEditingEnabled
[7743] Fix | Delete
} = select(store_store).getEditorSettings();
[7744] Fix | Delete
return !richEditingEnabled || !codeEditingEnabled;
[7745] Fix | Delete
}, []);
[7746] Fix | Delete
const {
[7747] Fix | Delete
getBlockSelectionStart
[7748] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
[7749] Fix | Delete
const {
[7750] Fix | Delete
getActiveComplementaryArea
[7751] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[7752] Fix | Delete
const {
[7753] Fix | Delete
enableComplementaryArea,
[7754] Fix | Delete
disableComplementaryArea
[7755] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[7756] Fix | Delete
const {
[7757] Fix | Delete
redo,
[7758] Fix | Delete
undo,
[7759] Fix | Delete
savePost,
[7760] Fix | Delete
setIsListViewOpened,
[7761] Fix | Delete
switchEditorMode,
[7762] Fix | Delete
toggleDistractionFree
[7763] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[7764] Fix | Delete
const {
[7765] Fix | Delete
isEditedPostDirty,
[7766] Fix | Delete
isPostSavingLocked,
[7767] Fix | Delete
isListViewOpened,
[7768] Fix | Delete
getEditorMode
[7769] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store_store);
[7770] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/toggle-mode', () => {
[7771] Fix | Delete
switchEditorMode(getEditorMode() === 'visual' ? 'text' : 'visual');
[7772] Fix | Delete
}, {
[7773] Fix | Delete
isDisabled: isModeToggleDisabled
[7774] Fix | Delete
});
[7775] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/toggle-distraction-free', () => {
[7776] Fix | Delete
toggleDistractionFree();
[7777] Fix | Delete
});
[7778] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/undo', event => {
[7779] Fix | Delete
undo();
[7780] Fix | Delete
event.preventDefault();
[7781] Fix | Delete
});
[7782] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/redo', event => {
[7783] Fix | Delete
redo();
[7784] Fix | Delete
event.preventDefault();
[7785] Fix | Delete
});
[7786] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/save', event => {
[7787] Fix | Delete
event.preventDefault();
[7788] Fix | Delete
[7789] Fix | Delete
/**
[7790] Fix | Delete
* Do not save the post if post saving is locked.
[7791] Fix | Delete
*/
[7792] Fix | Delete
if (isPostSavingLocked()) {
[7793] Fix | Delete
return;
[7794] Fix | Delete
}
[7795] Fix | Delete
[7796] Fix | Delete
// TODO: This should be handled in the `savePost` effect in
[7797] Fix | Delete
// considering `isSaveable`. See note on `isEditedPostSaveable`
[7798] Fix | Delete
// selector about dirtiness and meta-boxes.
[7799] Fix | Delete
//
[7800] Fix | Delete
// See: `isEditedPostSaveable`
[7801] Fix | Delete
if (!isEditedPostDirty()) {
[7802] Fix | Delete
return;
[7803] Fix | Delete
}
[7804] Fix | Delete
savePost();
[7805] Fix | Delete
});
[7806] Fix | Delete
[7807] Fix | Delete
// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.
[7808] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/toggle-list-view', event => {
[7809] Fix | Delete
if (!isListViewOpened()) {
[7810] Fix | Delete
event.preventDefault();
[7811] Fix | Delete
setIsListViewOpened(true);
[7812] Fix | Delete
}
[7813] Fix | Delete
});
[7814] Fix | Delete
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/editor/toggle-sidebar', event => {
[7815] Fix | Delete
// This shortcut has no known clashes, but use preventDefault to prevent any
[7816] Fix | Delete
// obscure shortcuts from triggering.
[7817] Fix | Delete
event.preventDefault();
[7818] Fix | Delete
const isEditorSidebarOpened = ['edit-post/document', 'edit-post/block'].includes(getActiveComplementaryArea('core'));
[7819] Fix | Delete
if (isEditorSidebarOpened) {
[7820] Fix | Delete
disableComplementaryArea('core');
[7821] Fix | Delete
} else {
[7822] Fix | Delete
const sidebarToOpen = getBlockSelectionStart() ? 'edit-post/block' : 'edit-post/document';
[7823] Fix | Delete
enableComplementaryArea('core', sidebarToOpen);
[7824] Fix | Delete
}
[7825] Fix | Delete
});
[7826] Fix | Delete
return null;
[7827] Fix | Delete
}
[7828] Fix | Delete
[7829] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js
[7830] Fix | Delete
[7831] Fix | Delete
[7832] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js
[7833] Fix | Delete
/**
[7834] Fix | Delete
* WordPress dependencies
[7835] Fix | Delete
*/
[7836] Fix | Delete
[7837] Fix | Delete
[7838] Fix | Delete
[7839] Fix | Delete
[7840] Fix | Delete
[7841] Fix | Delete
/**
[7842] Fix | Delete
* Internal dependencies
[7843] Fix | Delete
*/
[7844] Fix | Delete
[7845] Fix | Delete
class AutosaveMonitor extends external_wp_element_namespaceObject.Component {
[7846] Fix | Delete
constructor(props) {
[7847] Fix | Delete
super(props);
[7848] Fix | Delete
this.needsAutosave = !!(props.isDirty && props.isAutosaveable);
[7849] Fix | Delete
}
[7850] Fix | Delete
componentDidMount() {
[7851] Fix | Delete
if (!this.props.disableIntervalChecks) {
[7852] Fix | Delete
this.setAutosaveTimer();
[7853] Fix | Delete
}
[7854] Fix | Delete
}
[7855] Fix | Delete
componentDidUpdate(prevProps) {
[7856] Fix | Delete
if (this.props.disableIntervalChecks) {
[7857] Fix | Delete
if (this.props.editsReference !== prevProps.editsReference) {
[7858] Fix | Delete
this.props.autosave();
[7859] Fix | Delete
}
[7860] Fix | Delete
return;
[7861] Fix | Delete
}
[7862] Fix | Delete
if (this.props.interval !== prevProps.interval) {
[7863] Fix | Delete
clearTimeout(this.timerId);
[7864] Fix | Delete
this.setAutosaveTimer();
[7865] Fix | Delete
}
[7866] Fix | Delete
if (!this.props.isDirty) {
[7867] Fix | Delete
this.needsAutosave = false;
[7868] Fix | Delete
return;
[7869] Fix | Delete
}
[7870] Fix | Delete
if (this.props.isAutosaving && !prevProps.isAutosaving) {
[7871] Fix | Delete
this.needsAutosave = false;
[7872] Fix | Delete
return;
[7873] Fix | Delete
}
[7874] Fix | Delete
if (this.props.editsReference !== prevProps.editsReference) {
[7875] Fix | Delete
this.needsAutosave = true;
[7876] Fix | Delete
}
[7877] Fix | Delete
}
[7878] Fix | Delete
componentWillUnmount() {
[7879] Fix | Delete
clearTimeout(this.timerId);
[7880] Fix | Delete
}
[7881] Fix | Delete
setAutosaveTimer(timeout = this.props.interval * 1000) {
[7882] Fix | Delete
this.timerId = setTimeout(() => {
[7883] Fix | Delete
this.autosaveTimerHandler();
[7884] Fix | Delete
}, timeout);
[7885] Fix | Delete
}
[7886] Fix | Delete
autosaveTimerHandler() {
[7887] Fix | Delete
if (!this.props.isAutosaveable) {
[7888] Fix | Delete
this.setAutosaveTimer(1000);
[7889] Fix | Delete
return;
[7890] Fix | Delete
}
[7891] Fix | Delete
if (this.needsAutosave) {
[7892] Fix | Delete
this.needsAutosave = false;
[7893] Fix | Delete
this.props.autosave();
[7894] Fix | Delete
}
[7895] Fix | Delete
this.setAutosaveTimer();
[7896] Fix | Delete
}
[7897] Fix | Delete
render() {
[7898] Fix | Delete
return null;
[7899] Fix | Delete
}
[7900] Fix | Delete
}
[7901] Fix | Delete
[7902] Fix | Delete
/**
[7903] Fix | Delete
* Monitors the changes made to the edited post and triggers autosave if necessary.
[7904] Fix | Delete
*
[7905] Fix | Delete
* The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.
[7906] Fix | Delete
* The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as
[7907] Fix | Delete
* the specific way of detecting changes.
[7908] Fix | Delete
*
[7909] Fix | Delete
* There are two caveats:
[7910] Fix | Delete
* * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.
[7911] Fix | Delete
* * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.
[7912] Fix | Delete
*
[7913] Fix | Delete
* @param {Object} props - The properties passed to the component.
[7914] Fix | Delete
* @param {Function} props.autosave - The function to call when changes need to be saved.
[7915] Fix | Delete
* @param {number} props.interval - The maximum time in seconds between an unsaved change and an autosave.
[7916] Fix | Delete
* @param {boolean} props.isAutosaveable - If false, the check for changes is retried every second.
[7917] Fix | Delete
* @param {boolean} props.disableIntervalChecks - If true, disables the timer and any change will immediately trigger `props.autosave()`.
[7918] Fix | Delete
* @param {boolean} props.isDirty - Indicates if there are unsaved changes.
[7919] Fix | Delete
*
[7920] Fix | Delete
* @example
[7921] Fix | Delete
* ```jsx
[7922] Fix | Delete
* <AutosaveMonitor interval={30000} />
[7923] Fix | Delete
* ```
[7924] Fix | Delete
*/
[7925] Fix | Delete
/* harmony default export */ const autosave_monitor = ((0,external_wp_compose_namespaceObject.compose)([(0,external_wp_data_namespaceObject.withSelect)((select, ownProps) => {
[7926] Fix | Delete
const {
[7927] Fix | Delete
getReferenceByDistinctEdits
[7928] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[7929] Fix | Delete
const {
[7930] Fix | Delete
isEditedPostDirty,
[7931] Fix | Delete
isEditedPostAutosaveable,
[7932] Fix | Delete
isAutosavingPost,
[7933] Fix | Delete
getEditorSettings
[7934] Fix | Delete
} = select(store_store);
[7935] Fix | Delete
const {
[7936] Fix | Delete
interval = getEditorSettings().autosaveInterval
[7937] Fix | Delete
} = ownProps;
[7938] Fix | Delete
return {
[7939] Fix | Delete
editsReference: getReferenceByDistinctEdits(),
[7940] Fix | Delete
isDirty: isEditedPostDirty(),
[7941] Fix | Delete
isAutosaveable: isEditedPostAutosaveable(),
[7942] Fix | Delete
isAutosaving: isAutosavingPost(),
[7943] Fix | Delete
interval
[7944] Fix | Delete
};
[7945] Fix | Delete
}), (0,external_wp_data_namespaceObject.withDispatch)((dispatch, ownProps) => ({
[7946] Fix | Delete
autosave() {
[7947] Fix | Delete
const {
[7948] Fix | Delete
autosave = dispatch(store_store).autosave
[7949] Fix | Delete
} = ownProps;
[7950] Fix | Delete
autosave();
[7951] Fix | Delete
}
[7952] Fix | Delete
}))])(AutosaveMonitor));
[7953] Fix | Delete
[7954] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right-small.js
[7955] Fix | Delete
/**
[7956] Fix | Delete
* WordPress dependencies
[7957] Fix | Delete
*/
[7958] Fix | Delete
[7959] Fix | Delete
[7960] Fix | Delete
const chevronRightSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[7961] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[7962] Fix | Delete
viewBox: "0 0 24 24",
[7963] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[7964] Fix | Delete
d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"
[7965] Fix | Delete
})
[7966] Fix | Delete
});
[7967] Fix | Delete
/* harmony default export */ const chevron_right_small = (chevronRightSmall);
[7968] Fix | Delete
[7969] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left-small.js
[7970] Fix | Delete
/**
[7971] Fix | Delete
* WordPress dependencies
[7972] Fix | Delete
*/
[7973] Fix | Delete
[7974] Fix | Delete
[7975] Fix | Delete
const chevronLeftSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[7976] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[7977] Fix | Delete
viewBox: "0 0 24 24",
[7978] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[7979] Fix | Delete
d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"
[7980] Fix | Delete
})
[7981] Fix | Delete
});
[7982] Fix | Delete
/* harmony default export */ const chevron_left_small = (chevronLeftSmall);
[7983] Fix | Delete
[7984] Fix | Delete
;// CONCATENATED MODULE: external ["wp","keycodes"]
[7985] Fix | Delete
const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
[7986] Fix | Delete
;// CONCATENATED MODULE: external ["wp","commands"]
[7987] Fix | Delete
const external_wp_commands_namespaceObject = window["wp"]["commands"];
[7988] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-bar/index.js
[7989] Fix | Delete
/**
[7990] Fix | Delete
* External dependencies
[7991] Fix | Delete
*/
[7992] Fix | Delete
[7993] Fix | Delete
[7994] Fix | Delete
/**
[7995] Fix | Delete
* WordPress dependencies
[7996] Fix | Delete
*/
[7997] Fix | Delete
[7998] Fix | Delete
[7999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function