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: edit-post.js
isFullscreen
[2500] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[2501] Fix | Delete
const {
[2502] Fix | Delete
get
[2503] Fix | Delete
} = select(external_wp_preferences_namespaceObject.store);
[2504] Fix | Delete
return {
[2505] Fix | Delete
isFullscreen: get('core/edit-post', 'fullscreenMode')
[2506] Fix | Delete
};
[2507] Fix | Delete
}, []);
[2508] Fix | Delete
const {
[2509] Fix | Delete
toggle
[2510] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
[2511] Fix | Delete
const {
[2512] Fix | Delete
createInfoNotice
[2513] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[2514] Fix | Delete
(0,external_wp_commands_namespaceObject.useCommand)({
[2515] Fix | Delete
name: 'core/toggle-fullscreen-mode',
[2516] Fix | Delete
label: isFullscreen ? (0,external_wp_i18n_namespaceObject.__)('Exit fullscreen') : (0,external_wp_i18n_namespaceObject.__)('Enter fullscreen'),
[2517] Fix | Delete
icon: library_fullscreen,
[2518] Fix | Delete
callback: ({
[2519] Fix | Delete
close
[2520] Fix | Delete
}) => {
[2521] Fix | Delete
toggle('core/edit-post', 'fullscreenMode');
[2522] Fix | Delete
close();
[2523] Fix | Delete
createInfoNotice(isFullscreen ? (0,external_wp_i18n_namespaceObject.__)('Fullscreen off.') : (0,external_wp_i18n_namespaceObject.__)('Fullscreen on.'), {
[2524] Fix | Delete
id: 'core/edit-post/toggle-fullscreen-mode/notice',
[2525] Fix | Delete
type: 'snackbar',
[2526] Fix | Delete
actions: [{
[2527] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
[2528] Fix | Delete
onClick: () => {
[2529] Fix | Delete
toggle('core/edit-post', 'fullscreenMode');
[2530] Fix | Delete
}
[2531] Fix | Delete
}]
[2532] Fix | Delete
});
[2533] Fix | Delete
}
[2534] Fix | Delete
});
[2535] Fix | Delete
}
[2536] Fix | Delete
[2537] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/use-padding-appender.js
[2538] Fix | Delete
/**
[2539] Fix | Delete
* WordPress dependencies
[2540] Fix | Delete
*/
[2541] Fix | Delete
[2542] Fix | Delete
[2543] Fix | Delete
[2544] Fix | Delete
[2545] Fix | Delete
function usePaddingAppender() {
[2546] Fix | Delete
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
[2547] Fix | Delete
return (0,external_wp_compose_namespaceObject.useRefEffect)(node => {
[2548] Fix | Delete
function onMouseDown(event) {
[2549] Fix | Delete
if (event.target !== node) {
[2550] Fix | Delete
return;
[2551] Fix | Delete
}
[2552] Fix | Delete
const {
[2553] Fix | Delete
ownerDocument
[2554] Fix | Delete
} = node;
[2555] Fix | Delete
const {
[2556] Fix | Delete
defaultView
[2557] Fix | Delete
} = ownerDocument;
[2558] Fix | Delete
const pseudoHeight = defaultView.parseInt(defaultView.getComputedStyle(node, ':after').height, 10);
[2559] Fix | Delete
if (!pseudoHeight) {
[2560] Fix | Delete
return;
[2561] Fix | Delete
}
[2562] Fix | Delete
[2563] Fix | Delete
// Only handle clicks under the last child.
[2564] Fix | Delete
const lastChild = node.lastElementChild;
[2565] Fix | Delete
if (!lastChild) {
[2566] Fix | Delete
return;
[2567] Fix | Delete
}
[2568] Fix | Delete
const lastChildRect = lastChild.getBoundingClientRect();
[2569] Fix | Delete
if (event.clientY < lastChildRect.bottom) {
[2570] Fix | Delete
return;
[2571] Fix | Delete
}
[2572] Fix | Delete
event.stopPropagation();
[2573] Fix | Delete
const blockOrder = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder('');
[2574] Fix | Delete
const lastBlockClientId = blockOrder[blockOrder.length - 1];
[2575] Fix | Delete
const lastBlock = registry.select(external_wp_blockEditor_namespaceObject.store).getBlock(lastBlockClientId);
[2576] Fix | Delete
const {
[2577] Fix | Delete
selectBlock,
[2578] Fix | Delete
insertDefaultBlock
[2579] Fix | Delete
} = registry.dispatch(external_wp_blockEditor_namespaceObject.store);
[2580] Fix | Delete
if (lastBlock && (0,external_wp_blocks_namespaceObject.isUnmodifiedDefaultBlock)(lastBlock)) {
[2581] Fix | Delete
selectBlock(lastBlockClientId);
[2582] Fix | Delete
} else {
[2583] Fix | Delete
insertDefaultBlock();
[2584] Fix | Delete
}
[2585] Fix | Delete
}
[2586] Fix | Delete
node.addEventListener('mousedown', onMouseDown);
[2587] Fix | Delete
return () => {
[2588] Fix | Delete
node.removeEventListener('mousedown', onMouseDown);
[2589] Fix | Delete
};
[2590] Fix | Delete
}, [registry]);
[2591] Fix | Delete
}
[2592] Fix | Delete
[2593] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/use-should-iframe.js
[2594] Fix | Delete
/**
[2595] Fix | Delete
* WordPress dependencies
[2596] Fix | Delete
*/
[2597] Fix | Delete
[2598] Fix | Delete
[2599] Fix | Delete
[2600] Fix | Delete
[2601] Fix | Delete
/**
[2602] Fix | Delete
* Internal dependencies
[2603] Fix | Delete
*/
[2604] Fix | Delete
[2605] Fix | Delete
const isGutenbergPlugin = false ? 0 : false;
[2606] Fix | Delete
function useShouldIframe() {
[2607] Fix | Delete
const {
[2608] Fix | Delete
isBlockBasedTheme,
[2609] Fix | Delete
hasV3BlocksOnly,
[2610] Fix | Delete
isEditingTemplate,
[2611] Fix | Delete
hasMetaBoxes
[2612] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[2613] Fix | Delete
const {
[2614] Fix | Delete
getEditorSettings,
[2615] Fix | Delete
getCurrentPostType
[2616] Fix | Delete
} = select(external_wp_editor_namespaceObject.store);
[2617] Fix | Delete
const {
[2618] Fix | Delete
getBlockTypes
[2619] Fix | Delete
} = select(external_wp_blocks_namespaceObject.store);
[2620] Fix | Delete
const editorSettings = getEditorSettings();
[2621] Fix | Delete
return {
[2622] Fix | Delete
isBlockBasedTheme: editorSettings.__unstableIsBlockBasedTheme,
[2623] Fix | Delete
hasV3BlocksOnly: getBlockTypes().every(type => {
[2624] Fix | Delete
return type.apiVersion >= 3;
[2625] Fix | Delete
}),
[2626] Fix | Delete
isEditingTemplate: getCurrentPostType() === 'wp_template',
[2627] Fix | Delete
hasMetaBoxes: select(store).hasMetaBoxes()
[2628] Fix | Delete
};
[2629] Fix | Delete
}, []);
[2630] Fix | Delete
return (hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme) && !hasMetaBoxes || isEditingTemplate;
[2631] Fix | Delete
}
[2632] Fix | Delete
[2633] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/index.js
[2634] Fix | Delete
/**
[2635] Fix | Delete
* External dependencies
[2636] Fix | Delete
*/
[2637] Fix | Delete
[2638] Fix | Delete
[2639] Fix | Delete
/**
[2640] Fix | Delete
* WordPress dependencies
[2641] Fix | Delete
*/
[2642] Fix | Delete
[2643] Fix | Delete
[2644] Fix | Delete
[2645] Fix | Delete
[2646] Fix | Delete
[2647] Fix | Delete
[2648] Fix | Delete
[2649] Fix | Delete
[2650] Fix | Delete
[2651] Fix | Delete
[2652] Fix | Delete
[2653] Fix | Delete
[2654] Fix | Delete
[2655] Fix | Delete
[2656] Fix | Delete
/**
[2657] Fix | Delete
* Internal dependencies
[2658] Fix | Delete
*/
[2659] Fix | Delete
[2660] Fix | Delete
[2661] Fix | Delete
[2662] Fix | Delete
[2663] Fix | Delete
[2664] Fix | Delete
[2665] Fix | Delete
[2666] Fix | Delete
[2667] Fix | Delete
[2668] Fix | Delete
[2669] Fix | Delete
[2670] Fix | Delete
[2671] Fix | Delete
[2672] Fix | Delete
[2673] Fix | Delete
[2674] Fix | Delete
const {
[2675] Fix | Delete
getLayoutStyles
[2676] Fix | Delete
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
[2677] Fix | Delete
const {
[2678] Fix | Delete
useCommands: layout_useCommands
[2679] Fix | Delete
} = unlock(external_wp_coreCommands_namespaceObject.privateApis);
[2680] Fix | Delete
const {
[2681] Fix | Delete
useCommandContext
[2682] Fix | Delete
} = unlock(external_wp_commands_namespaceObject.privateApis);
[2683] Fix | Delete
const {
[2684] Fix | Delete
EditorInterface,
[2685] Fix | Delete
FullscreenMode,
[2686] Fix | Delete
Sidebar
[2687] Fix | Delete
} = unlock(external_wp_editor_namespaceObject.privateApis);
[2688] Fix | Delete
const {
[2689] Fix | Delete
BlockKeyboardShortcuts
[2690] Fix | Delete
} = unlock(external_wp_blockLibrary_namespaceObject.privateApis);
[2691] Fix | Delete
const DESIGN_POST_TYPES = ['wp_template', 'wp_template_part', 'wp_block', 'wp_navigation'];
[2692] Fix | Delete
function useEditorStyles() {
[2693] Fix | Delete
const {
[2694] Fix | Delete
hasThemeStyleSupport,
[2695] Fix | Delete
editorSettings,
[2696] Fix | Delete
isZoomedOutView,
[2697] Fix | Delete
renderingMode,
[2698] Fix | Delete
postType
[2699] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[2700] Fix | Delete
const {
[2701] Fix | Delete
__unstableGetEditorMode
[2702] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[2703] Fix | Delete
const {
[2704] Fix | Delete
getCurrentPostType,
[2705] Fix | Delete
getRenderingMode
[2706] Fix | Delete
} = select(external_wp_editor_namespaceObject.store);
[2707] Fix | Delete
const _postType = getCurrentPostType();
[2708] Fix | Delete
return {
[2709] Fix | Delete
hasThemeStyleSupport: select(store).isFeatureActive('themeStyles'),
[2710] Fix | Delete
editorSettings: select(external_wp_editor_namespaceObject.store).getEditorSettings(),
[2711] Fix | Delete
isZoomedOutView: __unstableGetEditorMode() === 'zoom-out',
[2712] Fix | Delete
renderingMode: getRenderingMode(),
[2713] Fix | Delete
postType: _postType
[2714] Fix | Delete
};
[2715] Fix | Delete
}, []);
[2716] Fix | Delete
[2717] Fix | Delete
// Compute the default styles.
[2718] Fix | Delete
return (0,external_wp_element_namespaceObject.useMemo)(() => {
[2719] Fix | Delete
var _editorSettings$style, _editorSettings$style2, _editorSettings$style3;
[2720] Fix | Delete
const presetStyles = (_editorSettings$style = editorSettings.styles?.filter(style => style.__unstableType && style.__unstableType !== 'theme')) !== null && _editorSettings$style !== void 0 ? _editorSettings$style : [];
[2721] Fix | Delete
const defaultEditorStyles = [...editorSettings.defaultEditorStyles, ...presetStyles];
[2722] Fix | Delete
[2723] Fix | Delete
// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).
[2724] Fix | Delete
const hasThemeStyles = hasThemeStyleSupport && presetStyles.length !== ((_editorSettings$style2 = editorSettings.styles?.length) !== null && _editorSettings$style2 !== void 0 ? _editorSettings$style2 : 0);
[2725] Fix | Delete
[2726] Fix | Delete
// If theme styles are not present or displayed, ensure that
[2727] Fix | Delete
// base layout styles are still present in the editor.
[2728] Fix | Delete
if (!editorSettings.disableLayoutStyles && !hasThemeStyles) {
[2729] Fix | Delete
defaultEditorStyles.push({
[2730] Fix | Delete
css: getLayoutStyles({
[2731] Fix | Delete
style: {},
[2732] Fix | Delete
selector: 'body',
[2733] Fix | Delete
hasBlockGapSupport: false,
[2734] Fix | Delete
hasFallbackGapSupport: true,
[2735] Fix | Delete
fallbackGapValue: '0.5em'
[2736] Fix | Delete
})
[2737] Fix | Delete
});
[2738] Fix | Delete
}
[2739] Fix | Delete
const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
[2740] Fix | Delete
[2741] Fix | Delete
// Add a space for the typewriter effect. When typing in the last block,
[2742] Fix | Delete
// there needs to be room to scroll up.
[2743] Fix | Delete
if (!isZoomedOutView && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
[2744] Fix | Delete
return [...baseStyles, {
[2745] Fix | Delete
css: ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}'
[2746] Fix | Delete
}];
[2747] Fix | Delete
}
[2748] Fix | Delete
return baseStyles;
[2749] Fix | Delete
}, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport, postType]);
[2750] Fix | Delete
}
[2751] Fix | Delete
function Layout({
[2752] Fix | Delete
initialPost
[2753] Fix | Delete
}) {
[2754] Fix | Delete
layout_useCommands();
[2755] Fix | Delete
useCommands();
[2756] Fix | Delete
const paddingAppenderRef = usePaddingAppender();
[2757] Fix | Delete
const shouldIframe = useShouldIframe();
[2758] Fix | Delete
const {
[2759] Fix | Delete
createErrorNotice
[2760] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[2761] Fix | Delete
const {
[2762] Fix | Delete
mode,
[2763] Fix | Delete
isFullscreenActive,
[2764] Fix | Delete
hasActiveMetaboxes,
[2765] Fix | Delete
hasBlockSelected,
[2766] Fix | Delete
showIconLabels,
[2767] Fix | Delete
isDistractionFree,
[2768] Fix | Delete
showMetaBoxes,
[2769] Fix | Delete
hasHistory,
[2770] Fix | Delete
isEditingTemplate,
[2771] Fix | Delete
isWelcomeGuideVisible
[2772] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[2773] Fix | Delete
const {
[2774] Fix | Delete
get
[2775] Fix | Delete
} = select(external_wp_preferences_namespaceObject.store);
[2776] Fix | Delete
const {
[2777] Fix | Delete
getEditorSettings
[2778] Fix | Delete
} = select(external_wp_editor_namespaceObject.store);
[2779] Fix | Delete
const {
[2780] Fix | Delete
isFeatureActive
[2781] Fix | Delete
} = select(store);
[2782] Fix | Delete
return {
[2783] Fix | Delete
mode: select(external_wp_editor_namespaceObject.store).getEditorMode(),
[2784] Fix | Delete
isFullscreenActive: select(store).isFeatureActive('fullscreenMode'),
[2785] Fix | Delete
hasActiveMetaboxes: select(store).hasMetaBoxes(),
[2786] Fix | Delete
hasBlockSelected: !!select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart(),
[2787] Fix | Delete
showIconLabels: get('core', 'showIconLabels'),
[2788] Fix | Delete
isDistractionFree: get('core', 'distractionFree'),
[2789] Fix | Delete
showMetaBoxes: select(external_wp_editor_namespaceObject.store).getRenderingMode() === 'post-only',
[2790] Fix | Delete
hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord,
[2791] Fix | Delete
isEditingTemplate: select(external_wp_editor_namespaceObject.store).getCurrentPostType() === 'wp_template',
[2792] Fix | Delete
isWelcomeGuideVisible: isFeatureActive('welcomeGuide')
[2793] Fix | Delete
};
[2794] Fix | Delete
}, []);
[2795] Fix | Delete
[2796] Fix | Delete
// Set the right context for the command palette
[2797] Fix | Delete
const commandContext = hasBlockSelected ? 'block-selection-edit' : 'entity-edit';
[2798] Fix | Delete
useCommandContext(commandContext);
[2799] Fix | Delete
const styles = useEditorStyles();
[2800] Fix | Delete
[2801] Fix | Delete
// We need to add the show-icon-labels class to the body element so it is applied to modals.
[2802] Fix | Delete
if (showIconLabels) {
[2803] Fix | Delete
document.body.classList.add('show-icon-labels');
[2804] Fix | Delete
} else {
[2805] Fix | Delete
document.body.classList.remove('show-icon-labels');
[2806] Fix | Delete
}
[2807] Fix | Delete
const className = dist_clsx('edit-post-layout', 'is-mode-' + mode, {
[2808] Fix | Delete
'has-metaboxes': hasActiveMetaboxes
[2809] Fix | Delete
});
[2810] Fix | Delete
function onPluginAreaError(name) {
[2811] Fix | Delete
createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: plugin name */
[2812] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
[2813] Fix | Delete
}
[2814] Fix | Delete
const {
[2815] Fix | Delete
createSuccessNotice
[2816] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[2817] Fix | Delete
const onActionPerformed = (0,external_wp_element_namespaceObject.useCallback)((actionId, items) => {
[2818] Fix | Delete
switch (actionId) {
[2819] Fix | Delete
case 'move-to-trash':
[2820] Fix | Delete
{
[2821] Fix | Delete
document.location.href = (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
[2822] Fix | Delete
trashed: 1,
[2823] Fix | Delete
post_type: items[0].type,
[2824] Fix | Delete
ids: items[0].id
[2825] Fix | Delete
});
[2826] Fix | Delete
}
[2827] Fix | Delete
break;
[2828] Fix | Delete
case 'duplicate-post':
[2829] Fix | Delete
{
[2830] Fix | Delete
const newItem = items[0];
[2831] Fix | Delete
const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
[2832] Fix | Delete
createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
[2833] Fix | Delete
// translators: %s: Title of the created post e.g: "Post 1".
[2834] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('"%s" successfully created.'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)), {
[2835] Fix | Delete
type: 'snackbar',
[2836] Fix | Delete
id: 'duplicate-post-action',
[2837] Fix | Delete
actions: [{
[2838] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Edit'),
[2839] Fix | Delete
onClick: () => {
[2840] Fix | Delete
const postId = newItem.id;
[2841] Fix | Delete
document.location.href = (0,external_wp_url_namespaceObject.addQueryArgs)('post.php', {
[2842] Fix | Delete
post: postId,
[2843] Fix | Delete
action: 'edit'
[2844] Fix | Delete
});
[2845] Fix | Delete
}
[2846] Fix | Delete
}]
[2847] Fix | Delete
});
[2848] Fix | Delete
}
[2849] Fix | Delete
break;
[2850] Fix | Delete
}
[2851] Fix | Delete
}, [createSuccessNotice]);
[2852] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[2853] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FullscreenMode, {
[2854] Fix | Delete
isActive: isFullscreenActive
[2855] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(browser_url, {
[2856] Fix | Delete
hasHistory: hasHistory
[2857] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.UnsavedChangesWarning, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.AutosaveMonitor, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.LocalAutosaveMonitor, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EditorKeyboardShortcutsRegister, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InitPatternModal, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_plugins_namespaceObject.PluginArea, {
[2858] Fix | Delete
onError: onPluginAreaError
[2859] Fix | Delete
}), !isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Sidebar, {
[2860] Fix | Delete
onActionPerformed: onActionPerformed,
[2861] Fix | Delete
extraPanels: !isEditingTemplate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, {
[2862] Fix | Delete
location: "side"
[2863] Fix | Delete
})
[2864] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(more_menu, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(back_button, {
[2865] Fix | Delete
initialPost: initialPost
[2866] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EditorSnackbars, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditorInterface, {
[2867] Fix | Delete
className: className,
[2868] Fix | Delete
styles: styles,
[2869] Fix | Delete
forceIsDirty: hasActiveMetaboxes,
[2870] Fix | Delete
contentRef: paddingAppenderRef,
[2871] Fix | Delete
disableIframe: !shouldIframe
[2872] Fix | Delete
// We should auto-focus the canvas (title) on load.
[2873] Fix | Delete
// eslint-disable-next-line jsx-a11y/no-autofocus
[2874] Fix | Delete
,
[2875] Fix | Delete
autoFocus: !isWelcomeGuideVisible,
[2876] Fix | Delete
children: !isDistractionFree && showMetaBoxes && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[2877] Fix | Delete
className: "edit-post-layout__metaboxes",
[2878] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, {
[2879] Fix | Delete
location: "normal"
[2880] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, {
[2881] Fix | Delete
location: "advanced"
[2882] Fix | Delete
})]
[2883] Fix | Delete
})
[2884] Fix | Delete
})]
[2885] Fix | Delete
});
[2886] Fix | Delete
}
[2887] Fix | Delete
/* harmony default export */ const layout = (Layout);
[2888] Fix | Delete
[2889] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/listener-hooks.js
[2890] Fix | Delete
/**
[2891] Fix | Delete
* WordPress dependencies
[2892] Fix | Delete
*/
[2893] Fix | Delete
[2894] Fix | Delete
[2895] Fix | Delete
[2896] Fix | Delete
[2897] Fix | Delete
/**
[2898] Fix | Delete
* Internal dependencies
[2899] Fix | Delete
*/
[2900] Fix | Delete
[2901] Fix | Delete
[2902] Fix | Delete
/**
[2903] Fix | Delete
* This listener hook monitors any change in permalink and updates the view
[2904] Fix | Delete
* post link in the admin bar.
[2905] Fix | Delete
*/
[2906] Fix | Delete
const useUpdatePostLinkListener = () => {
[2907] Fix | Delete
const {
[2908] Fix | Delete
newPermalink
[2909] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
[2910] Fix | Delete
newPermalink: select(external_wp_editor_namespaceObject.store).getCurrentPost().link
[2911] Fix | Delete
}), []);
[2912] Fix | Delete
const nodeToUpdate = (0,external_wp_element_namespaceObject.useRef)();
[2913] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[2914] Fix | Delete
nodeToUpdate.current = document.querySelector(VIEW_AS_PREVIEW_LINK_SELECTOR) || document.querySelector(VIEW_AS_LINK_SELECTOR);
[2915] Fix | Delete
}, []);
[2916] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[2917] Fix | Delete
if (!newPermalink || !nodeToUpdate.current) {
[2918] Fix | Delete
return;
[2919] Fix | Delete
}
[2920] Fix | Delete
nodeToUpdate.current.setAttribute('href', newPermalink);
[2921] Fix | Delete
}, [newPermalink]);
[2922] Fix | Delete
};
[2923] Fix | Delete
[2924] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/index.js
[2925] Fix | Delete
/**
[2926] Fix | Delete
* Internal dependencies
[2927] Fix | Delete
*/
[2928] Fix | Delete
[2929] Fix | Delete
[2930] Fix | Delete
/**
[2931] Fix | Delete
* Data component used for initializing the editor and re-initializes
[2932] Fix | Delete
* when postId changes or on unmount.
[2933] Fix | Delete
*
[2934] Fix | Delete
* @return {null} This is a data component so does not render any ui.
[2935] Fix | Delete
*/
[2936] Fix | Delete
function EditorInitialization() {
[2937] Fix | Delete
useUpdatePostLinkListener();
[2938] Fix | Delete
return null;
[2939] Fix | Delete
}
[2940] Fix | Delete
[2941] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/use-navigate-to-entity-record.js
[2942] Fix | Delete
/**
[2943] Fix | Delete
* WordPress dependencies
[2944] Fix | Delete
*/
[2945] Fix | Delete
[2946] Fix | Delete
[2947] Fix | Delete
[2948] Fix | Delete
[2949] Fix | Delete
/**
[2950] Fix | Delete
* A hook that records the 'entity' history in the post editor as a user
[2951] Fix | Delete
* navigates between editing a post and editing the post template or patterns.
[2952] Fix | Delete
*
[2953] Fix | Delete
* Implemented as a stack, so a little similar to the browser history API.
[2954] Fix | Delete
*
[2955] Fix | Delete
* Used to control displaying UI elements like the back button.
[2956] Fix | Delete
*
[2957] Fix | Delete
* @param {number} initialPostId The post id of the post when the editor loaded.
[2958] Fix | Delete
* @param {string} initialPostType The post type of the post when the editor loaded.
[2959] Fix | Delete
* @param {string} defaultRenderingMode The rendering mode to switch to when navigating.
[2960] Fix | Delete
*
[2961] Fix | Delete
* @return {Object} An object containing the `currentPost` variable and
[2962] Fix | Delete
* `onNavigateToEntityRecord` and `onNavigateToPreviousEntityRecord` functions.
[2963] Fix | Delete
*/
[2964] Fix | Delete
function useNavigateToEntityRecord(initialPostId, initialPostType, defaultRenderingMode) {
[2965] Fix | Delete
const [postHistory, dispatch] = (0,external_wp_element_namespaceObject.useReducer)((historyState, {
[2966] Fix | Delete
type,
[2967] Fix | Delete
post,
[2968] Fix | Delete
previousRenderingMode
[2969] Fix | Delete
}) => {
[2970] Fix | Delete
if (type === 'push') {
[2971] Fix | Delete
return [...historyState, {
[2972] Fix | Delete
post,
[2973] Fix | Delete
previousRenderingMode
[2974] Fix | Delete
}];
[2975] Fix | Delete
}
[2976] Fix | Delete
if (type === 'pop') {
[2977] Fix | Delete
// Try to leave one item in the history.
[2978] Fix | Delete
if (historyState.length > 1) {
[2979] Fix | Delete
return historyState.slice(0, -1);
[2980] Fix | Delete
}
[2981] Fix | Delete
}
[2982] Fix | Delete
return historyState;
[2983] Fix | Delete
}, [{
[2984] Fix | Delete
post: {
[2985] Fix | Delete
postId: initialPostId,
[2986] Fix | Delete
postType: initialPostType
[2987] Fix | Delete
}
[2988] Fix | Delete
}]);
[2989] Fix | Delete
const {
[2990] Fix | Delete
post,
[2991] Fix | Delete
previousRenderingMode
[2992] Fix | Delete
} = postHistory[postHistory.length - 1];
[2993] Fix | Delete
const {
[2994] Fix | Delete
getRenderingMode
[2995] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_editor_namespaceObject.store);
[2996] Fix | Delete
const {
[2997] Fix | Delete
setRenderingMode
[2998] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
[2999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function