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
return null;
[20000] Fix | Delete
}
[20001] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(RenamePatternModal, {
[20002] Fix | Delete
onClose: closeModal,
[20003] Fix | Delete
pattern: record
[20004] Fix | Delete
});
[20005] Fix | Delete
}
[20006] Fix | Delete
[20007] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/pattern-duplicate-modal/index.js
[20008] Fix | Delete
/**
[20009] Fix | Delete
* WordPress dependencies
[20010] Fix | Delete
*/
[20011] Fix | Delete
[20012] Fix | Delete
[20013] Fix | Delete
[20014] Fix | Delete
[20015] Fix | Delete
[20016] Fix | Delete
/**
[20017] Fix | Delete
* Internal dependencies
[20018] Fix | Delete
*/
[20019] Fix | Delete
[20020] Fix | Delete
[20021] Fix | Delete
[20022] Fix | Delete
[20023] Fix | Delete
const {
[20024] Fix | Delete
DuplicatePatternModal
[20025] Fix | Delete
} = unlock(external_wp_patterns_namespaceObject.privateApis);
[20026] Fix | Delete
const pattern_duplicate_modal_modalName = 'editor/pattern-duplicate';
[20027] Fix | Delete
function PatternDuplicateModal() {
[20028] Fix | Delete
const {
[20029] Fix | Delete
record,
[20030] Fix | Delete
postType
[20031] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[20032] Fix | Delete
const {
[20033] Fix | Delete
getCurrentPostType,
[20034] Fix | Delete
getCurrentPostId
[20035] Fix | Delete
} = select(store_store);
[20036] Fix | Delete
const {
[20037] Fix | Delete
getEditedEntityRecord
[20038] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[20039] Fix | Delete
const _postType = getCurrentPostType();
[20040] Fix | Delete
return {
[20041] Fix | Delete
record: getEditedEntityRecord('postType', _postType, getCurrentPostId()),
[20042] Fix | Delete
postType: _postType
[20043] Fix | Delete
};
[20044] Fix | Delete
}, []);
[20045] Fix | Delete
const {
[20046] Fix | Delete
closeModal
[20047] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[20048] Fix | Delete
const isActive = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isModalActive(pattern_duplicate_modal_modalName));
[20049] Fix | Delete
if (!isActive || postType !== PATTERN_POST_TYPE) {
[20050] Fix | Delete
return null;
[20051] Fix | Delete
}
[20052] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DuplicatePatternModal, {
[20053] Fix | Delete
onClose: closeModal,
[20054] Fix | Delete
onSuccess: () => closeModal(),
[20055] Fix | Delete
pattern: record
[20056] Fix | Delete
});
[20057] Fix | Delete
}
[20058] Fix | Delete
[20059] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/commands/index.js
[20060] Fix | Delete
/**
[20061] Fix | Delete
* WordPress dependencies
[20062] Fix | Delete
*/
[20063] Fix | Delete
[20064] Fix | Delete
[20065] Fix | Delete
[20066] Fix | Delete
[20067] Fix | Delete
[20068] Fix | Delete
[20069] Fix | Delete
[20070] Fix | Delete
[20071] Fix | Delete
[20072] Fix | Delete
[20073] Fix | Delete
/**
[20074] Fix | Delete
* Internal dependencies
[20075] Fix | Delete
*/
[20076] Fix | Delete
[20077] Fix | Delete
[20078] Fix | Delete
[20079] Fix | Delete
[20080] Fix | Delete
function useEditorCommandLoader() {
[20081] Fix | Delete
const {
[20082] Fix | Delete
editorMode,
[20083] Fix | Delete
isListViewOpen,
[20084] Fix | Delete
showBlockBreadcrumbs,
[20085] Fix | Delete
isDistractionFree,
[20086] Fix | Delete
isTopToolbar,
[20087] Fix | Delete
isFocusMode,
[20088] Fix | Delete
isPreviewMode,
[20089] Fix | Delete
isViewable,
[20090] Fix | Delete
isCodeEditingEnabled,
[20091] Fix | Delete
isRichEditingEnabled,
[20092] Fix | Delete
isPublishSidebarEnabled
[20093] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[20094] Fix | Delete
var _get, _getPostType$viewable;
[20095] Fix | Delete
const {
[20096] Fix | Delete
get
[20097] Fix | Delete
} = select(external_wp_preferences_namespaceObject.store);
[20098] Fix | Delete
const {
[20099] Fix | Delete
isListViewOpened,
[20100] Fix | Delete
getCurrentPostType,
[20101] Fix | Delete
getEditorSettings
[20102] Fix | Delete
} = select(store_store);
[20103] Fix | Delete
const {
[20104] Fix | Delete
getSettings
[20105] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[20106] Fix | Delete
const {
[20107] Fix | Delete
getPostType
[20108] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[20109] Fix | Delete
return {
[20110] Fix | Delete
editorMode: (_get = get('core', 'editorMode')) !== null && _get !== void 0 ? _get : 'visual',
[20111] Fix | Delete
isListViewOpen: isListViewOpened(),
[20112] Fix | Delete
showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
[20113] Fix | Delete
isDistractionFree: get('core', 'distractionFree'),
[20114] Fix | Delete
isFocusMode: get('core', 'focusMode'),
[20115] Fix | Delete
isTopToolbar: get('core', 'fixedToolbar'),
[20116] Fix | Delete
isPreviewMode: getSettings().__unstableIsPreviewMode,
[20117] Fix | Delete
isViewable: (_getPostType$viewable = getPostType(getCurrentPostType())?.viewable) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false,
[20118] Fix | Delete
isCodeEditingEnabled: getEditorSettings().codeEditingEnabled,
[20119] Fix | Delete
isRichEditingEnabled: getEditorSettings().richEditingEnabled,
[20120] Fix | Delete
isPublishSidebarEnabled: select(store_store).isPublishSidebarEnabled()
[20121] Fix | Delete
};
[20122] Fix | Delete
}, []);
[20123] Fix | Delete
const {
[20124] Fix | Delete
getActiveComplementaryArea
[20125] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[20126] Fix | Delete
const {
[20127] Fix | Delete
toggle
[20128] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
[20129] Fix | Delete
const {
[20130] Fix | Delete
createInfoNotice
[20131] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[20132] Fix | Delete
const {
[20133] Fix | Delete
__unstableSaveForPreview,
[20134] Fix | Delete
setIsListViewOpened,
[20135] Fix | Delete
switchEditorMode,
[20136] Fix | Delete
toggleDistractionFree
[20137] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[20138] Fix | Delete
const {
[20139] Fix | Delete
openModal,
[20140] Fix | Delete
enableComplementaryArea,
[20141] Fix | Delete
disableComplementaryArea
[20142] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[20143] Fix | Delete
const {
[20144] Fix | Delete
getCurrentPostId
[20145] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store_store);
[20146] Fix | Delete
const allowSwitchEditorMode = isCodeEditingEnabled && isRichEditingEnabled;
[20147] Fix | Delete
if (isPreviewMode) {
[20148] Fix | Delete
return {
[20149] Fix | Delete
commands: [],
[20150] Fix | Delete
isLoading: false
[20151] Fix | Delete
};
[20152] Fix | Delete
}
[20153] Fix | Delete
const commands = [];
[20154] Fix | Delete
commands.push({
[20155] Fix | Delete
name: 'core/open-shortcut-help',
[20156] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'),
[20157] Fix | Delete
icon: library_keyboard,
[20158] Fix | Delete
callback: () => {
[20159] Fix | Delete
openModal('editor/keyboard-shortcut-help');
[20160] Fix | Delete
}
[20161] Fix | Delete
});
[20162] Fix | Delete
commands.push({
[20163] Fix | Delete
name: 'core/toggle-distraction-free',
[20164] Fix | Delete
label: isDistractionFree ? (0,external_wp_i18n_namespaceObject.__)('Exit Distraction Free') : (0,external_wp_i18n_namespaceObject.__)('Enter Distraction Free'),
[20165] Fix | Delete
callback: ({
[20166] Fix | Delete
close
[20167] Fix | Delete
}) => {
[20168] Fix | Delete
toggleDistractionFree();
[20169] Fix | Delete
close();
[20170] Fix | Delete
}
[20171] Fix | Delete
});
[20172] Fix | Delete
commands.push({
[20173] Fix | Delete
name: 'core/open-preferences',
[20174] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Editor preferences'),
[20175] Fix | Delete
callback: () => {
[20176] Fix | Delete
openModal('editor/preferences');
[20177] Fix | Delete
}
[20178] Fix | Delete
});
[20179] Fix | Delete
commands.push({
[20180] Fix | Delete
name: 'core/toggle-spotlight-mode',
[20181] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Toggle spotlight'),
[20182] Fix | Delete
callback: ({
[20183] Fix | Delete
close
[20184] Fix | Delete
}) => {
[20185] Fix | Delete
toggle('core', 'focusMode');
[20186] Fix | Delete
close();
[20187] Fix | Delete
createInfoNotice(isFocusMode ? (0,external_wp_i18n_namespaceObject.__)('Spotlight off.') : (0,external_wp_i18n_namespaceObject.__)('Spotlight on.'), {
[20188] Fix | Delete
id: 'core/editor/toggle-spotlight-mode/notice',
[20189] Fix | Delete
type: 'snackbar',
[20190] Fix | Delete
actions: [{
[20191] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
[20192] Fix | Delete
onClick: () => {
[20193] Fix | Delete
toggle('core', 'focusMode');
[20194] Fix | Delete
}
[20195] Fix | Delete
}]
[20196] Fix | Delete
});
[20197] Fix | Delete
}
[20198] Fix | Delete
});
[20199] Fix | Delete
commands.push({
[20200] Fix | Delete
name: 'core/toggle-list-view',
[20201] Fix | Delete
label: isListViewOpen ? (0,external_wp_i18n_namespaceObject.__)('Close List View') : (0,external_wp_i18n_namespaceObject.__)('Open List View'),
[20202] Fix | Delete
icon: list_view,
[20203] Fix | Delete
callback: ({
[20204] Fix | Delete
close
[20205] Fix | Delete
}) => {
[20206] Fix | Delete
setIsListViewOpened(!isListViewOpen);
[20207] Fix | Delete
close();
[20208] Fix | Delete
createInfoNotice(isListViewOpen ? (0,external_wp_i18n_namespaceObject.__)('List View off.') : (0,external_wp_i18n_namespaceObject.__)('List View on.'), {
[20209] Fix | Delete
id: 'core/editor/toggle-list-view/notice',
[20210] Fix | Delete
type: 'snackbar'
[20211] Fix | Delete
});
[20212] Fix | Delete
}
[20213] Fix | Delete
});
[20214] Fix | Delete
commands.push({
[20215] Fix | Delete
name: 'core/toggle-top-toolbar',
[20216] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Toggle top toolbar'),
[20217] Fix | Delete
callback: ({
[20218] Fix | Delete
close
[20219] Fix | Delete
}) => {
[20220] Fix | Delete
toggle('core', 'fixedToolbar');
[20221] Fix | Delete
if (isDistractionFree) {
[20222] Fix | Delete
toggleDistractionFree();
[20223] Fix | Delete
}
[20224] Fix | Delete
close();
[20225] Fix | Delete
createInfoNotice(isTopToolbar ? (0,external_wp_i18n_namespaceObject.__)('Top toolbar off.') : (0,external_wp_i18n_namespaceObject.__)('Top toolbar on.'), {
[20226] Fix | Delete
id: 'core/editor/toggle-top-toolbar/notice',
[20227] Fix | Delete
type: 'snackbar',
[20228] Fix | Delete
actions: [{
[20229] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
[20230] Fix | Delete
onClick: () => {
[20231] Fix | Delete
toggle('core', 'fixedToolbar');
[20232] Fix | Delete
}
[20233] Fix | Delete
}]
[20234] Fix | Delete
});
[20235] Fix | Delete
}
[20236] Fix | Delete
});
[20237] Fix | Delete
if (allowSwitchEditorMode) {
[20238] Fix | Delete
commands.push({
[20239] Fix | Delete
name: 'core/toggle-code-editor',
[20240] Fix | Delete
label: editorMode === 'visual' ? (0,external_wp_i18n_namespaceObject.__)('Open code editor') : (0,external_wp_i18n_namespaceObject.__)('Exit code editor'),
[20241] Fix | Delete
icon: library_code,
[20242] Fix | Delete
callback: ({
[20243] Fix | Delete
close
[20244] Fix | Delete
}) => {
[20245] Fix | Delete
switchEditorMode(editorMode === 'visual' ? 'text' : 'visual');
[20246] Fix | Delete
close();
[20247] Fix | Delete
}
[20248] Fix | Delete
});
[20249] Fix | Delete
}
[20250] Fix | Delete
commands.push({
[20251] Fix | Delete
name: 'core/toggle-breadcrumbs',
[20252] Fix | Delete
label: showBlockBreadcrumbs ? (0,external_wp_i18n_namespaceObject.__)('Hide block breadcrumbs') : (0,external_wp_i18n_namespaceObject.__)('Show block breadcrumbs'),
[20253] Fix | Delete
callback: ({
[20254] Fix | Delete
close
[20255] Fix | Delete
}) => {
[20256] Fix | Delete
toggle('core', 'showBlockBreadcrumbs');
[20257] Fix | Delete
close();
[20258] Fix | Delete
createInfoNotice(showBlockBreadcrumbs ? (0,external_wp_i18n_namespaceObject.__)('Breadcrumbs hidden.') : (0,external_wp_i18n_namespaceObject.__)('Breadcrumbs visible.'), {
[20259] Fix | Delete
id: 'core/editor/toggle-breadcrumbs/notice',
[20260] Fix | Delete
type: 'snackbar'
[20261] Fix | Delete
});
[20262] Fix | Delete
}
[20263] Fix | Delete
});
[20264] Fix | Delete
commands.push({
[20265] Fix | Delete
name: 'core/open-settings-sidebar',
[20266] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Toggle settings sidebar'),
[20267] Fix | Delete
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? drawer_left : drawer_right,
[20268] Fix | Delete
callback: ({
[20269] Fix | Delete
close
[20270] Fix | Delete
}) => {
[20271] Fix | Delete
const activeSidebar = getActiveComplementaryArea('core');
[20272] Fix | Delete
close();
[20273] Fix | Delete
if (activeSidebar === 'edit-post/document') {
[20274] Fix | Delete
disableComplementaryArea('core');
[20275] Fix | Delete
} else {
[20276] Fix | Delete
enableComplementaryArea('core', 'edit-post/document');
[20277] Fix | Delete
}
[20278] Fix | Delete
}
[20279] Fix | Delete
});
[20280] Fix | Delete
commands.push({
[20281] Fix | Delete
name: 'core/open-block-inspector',
[20282] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Toggle block inspector'),
[20283] Fix | Delete
icon: block_default,
[20284] Fix | Delete
callback: ({
[20285] Fix | Delete
close
[20286] Fix | Delete
}) => {
[20287] Fix | Delete
const activeSidebar = getActiveComplementaryArea('core');
[20288] Fix | Delete
close();
[20289] Fix | Delete
if (activeSidebar === 'edit-post/block') {
[20290] Fix | Delete
disableComplementaryArea('core');
[20291] Fix | Delete
} else {
[20292] Fix | Delete
enableComplementaryArea('core', 'edit-post/block');
[20293] Fix | Delete
}
[20294] Fix | Delete
}
[20295] Fix | Delete
});
[20296] Fix | Delete
commands.push({
[20297] Fix | Delete
name: 'core/toggle-publish-sidebar',
[20298] Fix | Delete
label: isPublishSidebarEnabled ? (0,external_wp_i18n_namespaceObject.__)('Disable pre-publish checks') : (0,external_wp_i18n_namespaceObject.__)('Enable pre-publish checks'),
[20299] Fix | Delete
icon: format_list_bullets,
[20300] Fix | Delete
callback: ({
[20301] Fix | Delete
close
[20302] Fix | Delete
}) => {
[20303] Fix | Delete
close();
[20304] Fix | Delete
toggle('core', 'isPublishSidebarEnabled');
[20305] Fix | Delete
createInfoNotice(isPublishSidebarEnabled ? (0,external_wp_i18n_namespaceObject.__)('Pre-publish checks disabled.') : (0,external_wp_i18n_namespaceObject.__)('Pre-publish checks enabled.'), {
[20306] Fix | Delete
id: 'core/editor/publish-sidebar/notice',
[20307] Fix | Delete
type: 'snackbar'
[20308] Fix | Delete
});
[20309] Fix | Delete
}
[20310] Fix | Delete
});
[20311] Fix | Delete
if (isViewable) {
[20312] Fix | Delete
commands.push({
[20313] Fix | Delete
name: 'core/preview-link',
[20314] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Preview in a new tab'),
[20315] Fix | Delete
icon: library_external,
[20316] Fix | Delete
callback: async ({
[20317] Fix | Delete
close
[20318] Fix | Delete
}) => {
[20319] Fix | Delete
close();
[20320] Fix | Delete
const postId = getCurrentPostId();
[20321] Fix | Delete
const link = await __unstableSaveForPreview();
[20322] Fix | Delete
window.open(link, `wp-preview-${postId}`);
[20323] Fix | Delete
}
[20324] Fix | Delete
});
[20325] Fix | Delete
}
[20326] Fix | Delete
return {
[20327] Fix | Delete
commands,
[20328] Fix | Delete
isLoading: false
[20329] Fix | Delete
};
[20330] Fix | Delete
}
[20331] Fix | Delete
function useEditedEntityContextualCommands() {
[20332] Fix | Delete
const {
[20333] Fix | Delete
postType
[20334] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[20335] Fix | Delete
const {
[20336] Fix | Delete
getCurrentPostType
[20337] Fix | Delete
} = select(store_store);
[20338] Fix | Delete
return {
[20339] Fix | Delete
postType: getCurrentPostType()
[20340] Fix | Delete
};
[20341] Fix | Delete
}, []);
[20342] Fix | Delete
const {
[20343] Fix | Delete
openModal
[20344] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[20345] Fix | Delete
const commands = [];
[20346] Fix | Delete
if (postType === PATTERN_POST_TYPE) {
[20347] Fix | Delete
commands.push({
[20348] Fix | Delete
name: 'core/rename-pattern',
[20349] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Rename pattern'),
[20350] Fix | Delete
icon: edit,
[20351] Fix | Delete
callback: ({
[20352] Fix | Delete
close
[20353] Fix | Delete
}) => {
[20354] Fix | Delete
openModal(modalName);
[20355] Fix | Delete
close();
[20356] Fix | Delete
}
[20357] Fix | Delete
});
[20358] Fix | Delete
commands.push({
[20359] Fix | Delete
name: 'core/duplicate-pattern',
[20360] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Duplicate pattern'),
[20361] Fix | Delete
icon: library_symbol,
[20362] Fix | Delete
callback: ({
[20363] Fix | Delete
close
[20364] Fix | Delete
}) => {
[20365] Fix | Delete
openModal(pattern_duplicate_modal_modalName);
[20366] Fix | Delete
close();
[20367] Fix | Delete
}
[20368] Fix | Delete
});
[20369] Fix | Delete
}
[20370] Fix | Delete
return {
[20371] Fix | Delete
isLoading: false,
[20372] Fix | Delete
commands
[20373] Fix | Delete
};
[20374] Fix | Delete
}
[20375] Fix | Delete
function useCommands() {
[20376] Fix | Delete
(0,external_wp_commands_namespaceObject.useCommandLoader)({
[20377] Fix | Delete
name: 'core/editor/edit-ui',
[20378] Fix | Delete
hook: useEditorCommandLoader
[20379] Fix | Delete
});
[20380] Fix | Delete
(0,external_wp_commands_namespaceObject.useCommandLoader)({
[20381] Fix | Delete
name: 'core/editor/contextual-commands',
[20382] Fix | Delete
hook: useEditedEntityContextualCommands,
[20383] Fix | Delete
context: 'entity-edit'
[20384] Fix | Delete
});
[20385] Fix | Delete
}
[20386] Fix | Delete
[20387] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/block-removal-warnings/index.js
[20388] Fix | Delete
/**
[20389] Fix | Delete
* WordPress dependencies
[20390] Fix | Delete
*/
[20391] Fix | Delete
[20392] Fix | Delete
[20393] Fix | Delete
[20394] Fix | Delete
[20395] Fix | Delete
[20396] Fix | Delete
[20397] Fix | Delete
/**
[20398] Fix | Delete
* Internal dependencies
[20399] Fix | Delete
*/
[20400] Fix | Delete
[20401] Fix | Delete
[20402] Fix | Delete
[20403] Fix | Delete
const {
[20404] Fix | Delete
BlockRemovalWarningModal
[20405] Fix | Delete
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
[20406] Fix | Delete
[20407] Fix | Delete
// Prevent accidental removal of certain blocks, asking the user for confirmation first.
[20408] Fix | Delete
const TEMPLATE_BLOCKS = ['core/post-content', 'core/post-template', 'core/query'];
[20409] Fix | Delete
const BLOCK_REMOVAL_RULES = [{
[20410] Fix | Delete
// Template blocks.
[20411] Fix | Delete
// The warning is only shown when a user manipulates templates or template parts.
[20412] Fix | Delete
postTypes: ['wp_template', 'wp_template_part'],
[20413] Fix | Delete
callback(removedBlocks) {
[20414] Fix | Delete
const removedTemplateBlocks = removedBlocks.filter(({
[20415] Fix | Delete
name
[20416] Fix | Delete
}) => TEMPLATE_BLOCKS.includes(name));
[20417] Fix | Delete
if (removedTemplateBlocks.length) {
[20418] Fix | Delete
return (0,external_wp_i18n_namespaceObject._n)('Deleting this block will stop your post or page content from displaying on this template. It is not recommended.', 'Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.', removedBlocks.length);
[20419] Fix | Delete
}
[20420] Fix | Delete
}
[20421] Fix | Delete
}, {
[20422] Fix | Delete
// Pattern overrides.
[20423] Fix | Delete
// The warning is only shown when the user edits a pattern.
[20424] Fix | Delete
postTypes: ['wp_block'],
[20425] Fix | Delete
callback(removedBlocks) {
[20426] Fix | Delete
const removedBlocksWithOverrides = removedBlocks.filter(({
[20427] Fix | Delete
attributes
[20428] Fix | Delete
}) => attributes?.metadata?.bindings && Object.values(attributes.metadata.bindings).some(binding => binding.source === 'core/pattern-overrides'));
[20429] Fix | Delete
if (removedBlocksWithOverrides.length) {
[20430] Fix | Delete
return (0,external_wp_i18n_namespaceObject._n)('The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?', 'Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?', removedBlocks.length);
[20431] Fix | Delete
}
[20432] Fix | Delete
}
[20433] Fix | Delete
}];
[20434] Fix | Delete
function BlockRemovalWarnings() {
[20435] Fix | Delete
const currentPostType = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getCurrentPostType(), []);
[20436] Fix | Delete
const removalRulesForPostType = (0,external_wp_element_namespaceObject.useMemo)(() => BLOCK_REMOVAL_RULES.filter(rule => rule.postTypes.includes(currentPostType)), [currentPostType]);
[20437] Fix | Delete
[20438] Fix | Delete
// `BlockRemovalWarnings` is rendered in the editor provider, a shared component
[20439] Fix | Delete
// across react native and web. However, `BlockRemovalWarningModal` is web only.
[20440] Fix | Delete
// Check it exists before trying to render it.
[20441] Fix | Delete
if (!BlockRemovalWarningModal) {
[20442] Fix | Delete
return null;
[20443] Fix | Delete
}
[20444] Fix | Delete
if (!removalRulesForPostType) {
[20445] Fix | Delete
return null;
[20446] Fix | Delete
}
[20447] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockRemovalWarningModal, {
[20448] Fix | Delete
rules: removalRulesForPostType
[20449] Fix | Delete
});
[20450] Fix | Delete
}
[20451] Fix | Delete
[20452] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/start-page-options/index.js
[20453] Fix | Delete
/**
[20454] Fix | Delete
* WordPress dependencies
[20455] Fix | Delete
*/
[20456] Fix | Delete
[20457] Fix | Delete
[20458] Fix | Delete
[20459] Fix | Delete
[20460] Fix | Delete
[20461] Fix | Delete
[20462] Fix | Delete
[20463] Fix | Delete
[20464] Fix | Delete
[20465] Fix | Delete
/**
[20466] Fix | Delete
* Internal dependencies
[20467] Fix | Delete
*/
[20468] Fix | Delete
[20469] Fix | Delete
[20470] Fix | Delete
[20471] Fix | Delete
function useStartPatterns() {
[20472] Fix | Delete
// A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,
[20473] Fix | Delete
// and it has no postTypes declared and the current post type is page or if
[20474] Fix | Delete
// the current post type is part of the postTypes declared.
[20475] Fix | Delete
const {
[20476] Fix | Delete
blockPatternsWithPostContentBlockType,
[20477] Fix | Delete
postType
[20478] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[20479] Fix | Delete
const {
[20480] Fix | Delete
getPatternsByBlockTypes,
[20481] Fix | Delete
getBlocksByName
[20482] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[20483] Fix | Delete
const {
[20484] Fix | Delete
getCurrentPostType,
[20485] Fix | Delete
getRenderingMode
[20486] Fix | Delete
} = select(store_store);
[20487] Fix | Delete
const rootClientId = getRenderingMode() === 'post-only' ? '' : getBlocksByName('core/post-content')?.[0];
[20488] Fix | Delete
return {
[20489] Fix | Delete
blockPatternsWithPostContentBlockType: getPatternsByBlockTypes('core/post-content', rootClientId),
[20490] Fix | Delete
postType: getCurrentPostType()
[20491] Fix | Delete
};
[20492] Fix | Delete
}, []);
[20493] Fix | Delete
return (0,external_wp_element_namespaceObject.useMemo)(() => {
[20494] Fix | Delete
// filter patterns without postTypes declared if the current postType is page
[20495] Fix | Delete
// or patterns that declare the current postType in its post type array.
[20496] Fix | Delete
return blockPatternsWithPostContentBlockType.filter(pattern => {
[20497] Fix | Delete
return postType === 'page' && !pattern.postTypes || Array.isArray(pattern.postTypes) && pattern.postTypes.includes(postType);
[20498] Fix | Delete
});
[20499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function