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
[27000] Fix | Delete
[27001] Fix | Delete
[27002] Fix | Delete
[27003] Fix | Delete
[27004] Fix | Delete
[27005] Fix | Delete
[27006] Fix | Delete
[27007] Fix | Delete
[27008] Fix | Delete
[27009] Fix | Delete
[27010] Fix | Delete
[27011] Fix | Delete
[27012] Fix | Delete
[27013] Fix | Delete
[27014] Fix | Delete
[27015] Fix | Delete
[27016] Fix | Delete
[27017] Fix | Delete
[27018] Fix | Delete
/**
[27019] Fix | Delete
* Module Constants
[27020] Fix | Delete
*/
[27021] Fix | Delete
[27022] Fix | Delete
[27023] Fix | Delete
[27024] Fix | Delete
const post_summary_PANEL_NAME = 'post-status';
[27025] Fix | Delete
function PostSummary({
[27026] Fix | Delete
onActionPerformed
[27027] Fix | Delete
}) {
[27028] Fix | Delete
const {
[27029] Fix | Delete
isRemovedPostStatusPanel
[27030] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[27031] Fix | Delete
// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
[27032] Fix | Delete
// not use isEditorPanelEnabled since this panel should not be disabled through the UI.
[27033] Fix | Delete
const {
[27034] Fix | Delete
isEditorPanelRemoved,
[27035] Fix | Delete
getCurrentPostType
[27036] Fix | Delete
} = select(store_store);
[27037] Fix | Delete
return {
[27038] Fix | Delete
isRemovedPostStatusPanel: isEditorPanelRemoved(post_summary_PANEL_NAME),
[27039] Fix | Delete
postType: getCurrentPostType()
[27040] Fix | Delete
};
[27041] Fix | Delete
}, []);
[27042] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_panel_section, {
[27043] Fix | Delete
className: "editor-post-summary",
[27044] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(plugin_post_status_info.Slot, {
[27045] Fix | Delete
children: fills => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[27046] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[27047] Fix | Delete
spacing: 4,
[27048] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostCardPanel, {
[27049] Fix | Delete
actions: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostActions, {
[27050] Fix | Delete
onActionPerformed: onActionPerformed
[27051] Fix | Delete
})
[27052] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostFeaturedImagePanel, {
[27053] Fix | Delete
withPanelBody: false
[27054] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrivatePostExcerptPanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[27055] Fix | Delete
spacing: 1,
[27056] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostContentInformation, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostLastEditedPanel, {})]
[27057] Fix | Delete
}), !isRemovedPostStatusPanel && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[27058] Fix | Delete
spacing: 2,
[27059] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[27060] Fix | Delete
spacing: 1,
[27061] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostStatus, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostSchedulePanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostURLPanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(panel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostTemplatePanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostDiscussionPanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrivatePostLastRevision, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PageAttributesPanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostSyncStatus, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlogTitle, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostsPerPage, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SiteDiscussion, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_format_panel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostSticky, {})]
[27062] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplateAreas, {}), fills]
[27063] Fix | Delete
})]
[27064] Fix | Delete
})
[27065] Fix | Delete
})
[27066] Fix | Delete
})
[27067] Fix | Delete
});
[27068] Fix | Delete
}
[27069] Fix | Delete
[27070] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-transform-panel/hooks.js
[27071] Fix | Delete
/**
[27072] Fix | Delete
* WordPress dependencies
[27073] Fix | Delete
*/
[27074] Fix | Delete
[27075] Fix | Delete
[27076] Fix | Delete
[27077] Fix | Delete
[27078] Fix | Delete
[27079] Fix | Delete
[27080] Fix | Delete
/**
[27081] Fix | Delete
* Internal dependencies
[27082] Fix | Delete
*/
[27083] Fix | Delete
[27084] Fix | Delete
[27085] Fix | Delete
const {
[27086] Fix | Delete
EXCLUDED_PATTERN_SOURCES,
[27087] Fix | Delete
PATTERN_TYPES: hooks_PATTERN_TYPES
[27088] Fix | Delete
} = unlock(external_wp_patterns_namespaceObject.privateApis);
[27089] Fix | Delete
function injectThemeAttributeInBlockTemplateContent(block, currentThemeStylesheet) {
[27090] Fix | Delete
block.innerBlocks = block.innerBlocks.map(innerBlock => {
[27091] Fix | Delete
return injectThemeAttributeInBlockTemplateContent(innerBlock, currentThemeStylesheet);
[27092] Fix | Delete
});
[27093] Fix | Delete
if (block.name === 'core/template-part' && block.attributes.theme === undefined) {
[27094] Fix | Delete
block.attributes.theme = currentThemeStylesheet;
[27095] Fix | Delete
}
[27096] Fix | Delete
return block;
[27097] Fix | Delete
}
[27098] Fix | Delete
[27099] Fix | Delete
/**
[27100] Fix | Delete
* Filter all patterns and return only the ones that are compatible with the current template.
[27101] Fix | Delete
*
[27102] Fix | Delete
* @param {Array} patterns An array of patterns.
[27103] Fix | Delete
* @param {Object} template The current template.
[27104] Fix | Delete
* @return {Array} Array of patterns that are compatible with the current template.
[27105] Fix | Delete
*/
[27106] Fix | Delete
function filterPatterns(patterns, template) {
[27107] Fix | Delete
// Filter out duplicates.
[27108] Fix | Delete
const filterOutDuplicatesByName = (currentItem, index, items) => index === items.findIndex(item => currentItem.name === item.name);
[27109] Fix | Delete
[27110] Fix | Delete
// Filter out core/directory patterns not included in theme.json.
[27111] Fix | Delete
const filterOutExcludedPatternSources = pattern => !EXCLUDED_PATTERN_SOURCES.includes(pattern.source);
[27112] Fix | Delete
[27113] Fix | Delete
// Looks for patterns that have the same template type as the current template,
[27114] Fix | Delete
// or have a block type that matches the current template area.
[27115] Fix | Delete
const filterCompatiblePatterns = pattern => pattern.templateTypes?.includes(template.slug) || pattern.blockTypes?.includes('core/template-part/' + template.area);
[27116] Fix | Delete
return patterns.filter((pattern, index, items) => {
[27117] Fix | Delete
return filterOutDuplicatesByName(pattern, index, items) && filterOutExcludedPatternSources(pattern) && filterCompatiblePatterns(pattern);
[27118] Fix | Delete
});
[27119] Fix | Delete
}
[27120] Fix | Delete
function preparePatterns(patterns, currentThemeStylesheet) {
[27121] Fix | Delete
return patterns.map(pattern => ({
[27122] Fix | Delete
...pattern,
[27123] Fix | Delete
keywords: pattern.keywords || [],
[27124] Fix | Delete
type: hooks_PATTERN_TYPES.theme,
[27125] Fix | Delete
blocks: (0,external_wp_blocks_namespaceObject.parse)(pattern.content, {
[27126] Fix | Delete
__unstableSkipMigrationLogs: true
[27127] Fix | Delete
}).map(block => injectThemeAttributeInBlockTemplateContent(block, currentThemeStylesheet))
[27128] Fix | Delete
}));
[27129] Fix | Delete
}
[27130] Fix | Delete
function useAvailablePatterns(template) {
[27131] Fix | Delete
const {
[27132] Fix | Delete
blockPatterns,
[27133] Fix | Delete
restBlockPatterns,
[27134] Fix | Delete
currentThemeStylesheet
[27135] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[27136] Fix | Delete
var _settings$__experimen;
[27137] Fix | Delete
const {
[27138] Fix | Delete
getEditorSettings
[27139] Fix | Delete
} = select(store_store);
[27140] Fix | Delete
const settings = getEditorSettings();
[27141] Fix | Delete
return {
[27142] Fix | Delete
blockPatterns: (_settings$__experimen = settings.__experimentalAdditionalBlockPatterns) !== null && _settings$__experimen !== void 0 ? _settings$__experimen : settings.__experimentalBlockPatterns,
[27143] Fix | Delete
restBlockPatterns: select(external_wp_coreData_namespaceObject.store).getBlockPatterns(),
[27144] Fix | Delete
currentThemeStylesheet: select(external_wp_coreData_namespaceObject.store).getCurrentTheme().stylesheet
[27145] Fix | Delete
};
[27146] Fix | Delete
}, []);
[27147] Fix | Delete
return (0,external_wp_element_namespaceObject.useMemo)(() => {
[27148] Fix | Delete
const mergedPatterns = [...(blockPatterns || []), ...(restBlockPatterns || [])];
[27149] Fix | Delete
const filteredPatterns = filterPatterns(mergedPatterns, template);
[27150] Fix | Delete
return preparePatterns(filteredPatterns, template, currentThemeStylesheet);
[27151] Fix | Delete
}, [blockPatterns, restBlockPatterns, template, currentThemeStylesheet]);
[27152] Fix | Delete
}
[27153] Fix | Delete
[27154] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-transform-panel/index.js
[27155] Fix | Delete
/**
[27156] Fix | Delete
* WordPress dependencies
[27157] Fix | Delete
*/
[27158] Fix | Delete
[27159] Fix | Delete
[27160] Fix | Delete
[27161] Fix | Delete
[27162] Fix | Delete
[27163] Fix | Delete
[27164] Fix | Delete
[27165] Fix | Delete
[27166] Fix | Delete
/**
[27167] Fix | Delete
* Internal dependencies
[27168] Fix | Delete
*/
[27169] Fix | Delete
[27170] Fix | Delete
[27171] Fix | Delete
[27172] Fix | Delete
[27173] Fix | Delete
function post_transform_panel_TemplatesList({
[27174] Fix | Delete
availableTemplates,
[27175] Fix | Delete
onSelect
[27176] Fix | Delete
}) {
[27177] Fix | Delete
const shownTemplates = (0,external_wp_compose_namespaceObject.useAsyncList)(availableTemplates);
[27178] Fix | Delete
if (!availableTemplates || availableTemplates?.length === 0) {
[27179] Fix | Delete
return null;
[27180] Fix | Delete
}
[27181] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, {
[27182] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Templates'),
[27183] Fix | Delete
blockPatterns: availableTemplates,
[27184] Fix | Delete
shownPatterns: shownTemplates,
[27185] Fix | Delete
onClickPattern: onSelect,
[27186] Fix | Delete
showTitlesAsTooltip: true
[27187] Fix | Delete
});
[27188] Fix | Delete
}
[27189] Fix | Delete
function PostTransform() {
[27190] Fix | Delete
const {
[27191] Fix | Delete
record,
[27192] Fix | Delete
postType,
[27193] Fix | Delete
postId
[27194] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[27195] Fix | Delete
const {
[27196] Fix | Delete
getCurrentPostType,
[27197] Fix | Delete
getCurrentPostId
[27198] Fix | Delete
} = select(store_store);
[27199] Fix | Delete
const {
[27200] Fix | Delete
getEditedEntityRecord
[27201] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[27202] Fix | Delete
const type = getCurrentPostType();
[27203] Fix | Delete
const id = getCurrentPostId();
[27204] Fix | Delete
return {
[27205] Fix | Delete
postType: type,
[27206] Fix | Delete
postId: id,
[27207] Fix | Delete
record: getEditedEntityRecord('postType', type, id)
[27208] Fix | Delete
};
[27209] Fix | Delete
}, []);
[27210] Fix | Delete
const {
[27211] Fix | Delete
editEntityRecord
[27212] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
[27213] Fix | Delete
const availablePatterns = useAvailablePatterns(record);
[27214] Fix | Delete
const onTemplateSelect = async selectedTemplate => {
[27215] Fix | Delete
await editEntityRecord('postType', postType, postId, {
[27216] Fix | Delete
blocks: selectedTemplate.blocks,
[27217] Fix | Delete
content: (0,external_wp_blocks_namespaceObject.serialize)(selectedTemplate.blocks)
[27218] Fix | Delete
});
[27219] Fix | Delete
};
[27220] Fix | Delete
if (!availablePatterns?.length) {
[27221] Fix | Delete
return null;
[27222] Fix | Delete
}
[27223] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
[27224] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Design'),
[27225] Fix | Delete
initialOpen: record.type === TEMPLATE_PART_POST_TYPE,
[27226] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_transform_panel_TemplatesList, {
[27227] Fix | Delete
availableTemplates: availablePatterns,
[27228] Fix | Delete
onSelect: onTemplateSelect
[27229] Fix | Delete
})
[27230] Fix | Delete
});
[27231] Fix | Delete
}
[27232] Fix | Delete
function PostTransformPanel() {
[27233] Fix | Delete
const {
[27234] Fix | Delete
postType
[27235] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[27236] Fix | Delete
const {
[27237] Fix | Delete
getCurrentPostType
[27238] Fix | Delete
} = select(store_store);
[27239] Fix | Delete
return {
[27240] Fix | Delete
postType: getCurrentPostType()
[27241] Fix | Delete
};
[27242] Fix | Delete
}, []);
[27243] Fix | Delete
if (![TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE].includes(postType)) {
[27244] Fix | Delete
return null;
[27245] Fix | Delete
}
[27246] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostTransform, {});
[27247] Fix | Delete
}
[27248] Fix | Delete
[27249] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/sidebar/constants.js
[27250] Fix | Delete
const sidebars = {
[27251] Fix | Delete
document: 'edit-post/document',
[27252] Fix | Delete
block: 'edit-post/block'
[27253] Fix | Delete
};
[27254] Fix | Delete
[27255] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/sidebar/header.js
[27256] Fix | Delete
/**
[27257] Fix | Delete
* WordPress dependencies
[27258] Fix | Delete
*/
[27259] Fix | Delete
[27260] Fix | Delete
[27261] Fix | Delete
[27262] Fix | Delete
[27263] Fix | Delete
[27264] Fix | Delete
/**
[27265] Fix | Delete
* Internal dependencies
[27266] Fix | Delete
*/
[27267] Fix | Delete
[27268] Fix | Delete
[27269] Fix | Delete
[27270] Fix | Delete
[27271] Fix | Delete
[27272] Fix | Delete
const {
[27273] Fix | Delete
Tabs: header_Tabs
[27274] Fix | Delete
} = unlock(external_wp_components_namespaceObject.privateApis);
[27275] Fix | Delete
const SidebarHeader = (_, ref) => {
[27276] Fix | Delete
const {
[27277] Fix | Delete
documentLabel
[27278] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[27279] Fix | Delete
const {
[27280] Fix | Delete
getPostTypeLabel
[27281] Fix | Delete
} = select(store_store);
[27282] Fix | Delete
return {
[27283] Fix | Delete
// translators: Default label for the Document sidebar tab, not selected.
[27284] Fix | Delete
documentLabel: getPostTypeLabel() || (0,external_wp_i18n_namespaceObject._x)('Document', 'noun')
[27285] Fix | Delete
};
[27286] Fix | Delete
}, []);
[27287] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(header_Tabs.TabList, {
[27288] Fix | Delete
ref: ref,
[27289] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header_Tabs.Tab, {
[27290] Fix | Delete
tabId: sidebars.document
[27291] Fix | Delete
// Used for focus management in the SettingsSidebar component.
[27292] Fix | Delete
,
[27293] Fix | Delete
"data-tab-id": sidebars.document,
[27294] Fix | Delete
children: documentLabel
[27295] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header_Tabs.Tab, {
[27296] Fix | Delete
tabId: sidebars.block
[27297] Fix | Delete
// Used for focus management in the SettingsSidebar component.
[27298] Fix | Delete
,
[27299] Fix | Delete
"data-tab-id": sidebars.block,
[27300] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Block')
[27301] Fix | Delete
})]
[27302] Fix | Delete
});
[27303] Fix | Delete
};
[27304] Fix | Delete
/* harmony default export */ const sidebar_header = ((0,external_wp_element_namespaceObject.forwardRef)(SidebarHeader));
[27305] Fix | Delete
[27306] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/template-content-panel/index.js
[27307] Fix | Delete
/**
[27308] Fix | Delete
* WordPress dependencies
[27309] Fix | Delete
*/
[27310] Fix | Delete
[27311] Fix | Delete
[27312] Fix | Delete
[27313] Fix | Delete
[27314] Fix | Delete
[27315] Fix | Delete
/**
[27316] Fix | Delete
* Internal dependencies
[27317] Fix | Delete
*/
[27318] Fix | Delete
[27319] Fix | Delete
[27320] Fix | Delete
const {
[27321] Fix | Delete
BlockQuickNavigation
[27322] Fix | Delete
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
[27323] Fix | Delete
const PAGE_CONTENT_BLOCKS = ['core/post-content', 'core/post-featured-image', 'core/post-title'];
[27324] Fix | Delete
function TemplateContentPanel() {
[27325] Fix | Delete
const clientIds = (0,external_wp_data_namespaceObject.useSelect)(select => {
[27326] Fix | Delete
const {
[27327] Fix | Delete
getBlocksByName
[27328] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[27329] Fix | Delete
return getBlocksByName(PAGE_CONTENT_BLOCKS);
[27330] Fix | Delete
}, []);
[27331] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
[27332] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Content'),
[27333] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockQuickNavigation, {
[27334] Fix | Delete
clientIds: clientIds
[27335] Fix | Delete
})
[27336] Fix | Delete
});
[27337] Fix | Delete
}
[27338] Fix | Delete
[27339] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/use-auto-switch-editor-sidebars.js
[27340] Fix | Delete
/**
[27341] Fix | Delete
* WordPress dependencies
[27342] Fix | Delete
*/
[27343] Fix | Delete
[27344] Fix | Delete
[27345] Fix | Delete
[27346] Fix | Delete
[27347] Fix | Delete
[27348] Fix | Delete
[27349] Fix | Delete
/**
[27350] Fix | Delete
* This listener hook monitors for block selection and triggers the appropriate
[27351] Fix | Delete
* sidebar state.
[27352] Fix | Delete
*/
[27353] Fix | Delete
function useAutoSwitchEditorSidebars() {
[27354] Fix | Delete
const {
[27355] Fix | Delete
hasBlockSelection
[27356] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[27357] Fix | Delete
return {
[27358] Fix | Delete
hasBlockSelection: !!select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart()
[27359] Fix | Delete
};
[27360] Fix | Delete
}, []);
[27361] Fix | Delete
const {
[27362] Fix | Delete
getActiveComplementaryArea
[27363] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[27364] Fix | Delete
const {
[27365] Fix | Delete
enableComplementaryArea
[27366] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[27367] Fix | Delete
const {
[27368] Fix | Delete
get: getPreference
[27369] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_preferences_namespaceObject.store);
[27370] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[27371] Fix | Delete
const activeGeneralSidebar = getActiveComplementaryArea('core');
[27372] Fix | Delete
const isEditorSidebarOpened = ['edit-post/document', 'edit-post/block'].includes(activeGeneralSidebar);
[27373] Fix | Delete
const isDistractionFree = getPreference('core', 'distractionFree');
[27374] Fix | Delete
if (!isEditorSidebarOpened || isDistractionFree) {
[27375] Fix | Delete
return;
[27376] Fix | Delete
}
[27377] Fix | Delete
if (hasBlockSelection) {
[27378] Fix | Delete
enableComplementaryArea('core', 'edit-post/block');
[27379] Fix | Delete
} else {
[27380] Fix | Delete
enableComplementaryArea('core', 'edit-post/document');
[27381] Fix | Delete
}
[27382] Fix | Delete
}, [hasBlockSelection, getActiveComplementaryArea, enableComplementaryArea, getPreference]);
[27383] Fix | Delete
}
[27384] Fix | Delete
/* harmony default export */ const use_auto_switch_editor_sidebars = (useAutoSwitchEditorSidebars);
[27385] Fix | Delete
[27386] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/sidebar/index.js
[27387] Fix | Delete
/**
[27388] Fix | Delete
* WordPress dependencies
[27389] Fix | Delete
*/
[27390] Fix | Delete
[27391] Fix | Delete
[27392] Fix | Delete
[27393] Fix | Delete
[27394] Fix | Delete
[27395] Fix | Delete
[27396] Fix | Delete
[27397] Fix | Delete
[27398] Fix | Delete
[27399] Fix | Delete
/**
[27400] Fix | Delete
* Internal dependencies
[27401] Fix | Delete
*/
[27402] Fix | Delete
[27403] Fix | Delete
[27404] Fix | Delete
[27405] Fix | Delete
[27406] Fix | Delete
[27407] Fix | Delete
[27408] Fix | Delete
[27409] Fix | Delete
[27410] Fix | Delete
[27411] Fix | Delete
[27412] Fix | Delete
[27413] Fix | Delete
[27414] Fix | Delete
[27415] Fix | Delete
[27416] Fix | Delete
[27417] Fix | Delete
const {
[27418] Fix | Delete
Tabs: sidebar_Tabs
[27419] Fix | Delete
} = unlock(external_wp_components_namespaceObject.privateApis);
[27420] Fix | Delete
const SIDEBAR_ACTIVE_BY_DEFAULT = external_wp_element_namespaceObject.Platform.select({
[27421] Fix | Delete
web: true,
[27422] Fix | Delete
native: false
[27423] Fix | Delete
});
[27424] Fix | Delete
const SidebarContent = ({
[27425] Fix | Delete
tabName,
[27426] Fix | Delete
keyboardShortcut,
[27427] Fix | Delete
renderingMode,
[27428] Fix | Delete
onActionPerformed,
[27429] Fix | Delete
extraPanels
[27430] Fix | Delete
}) => {
[27431] Fix | Delete
const tabListRef = (0,external_wp_element_namespaceObject.useRef)(null);
[27432] Fix | Delete
// Because `PluginSidebar` renders a `ComplementaryArea`, we
[27433] Fix | Delete
// need to forward the `Tabs` context so it can be passed through the
[27434] Fix | Delete
// underlying slot/fill.
[27435] Fix | Delete
const tabsContextValue = (0,external_wp_element_namespaceObject.useContext)(sidebar_Tabs.Context);
[27436] Fix | Delete
[27437] Fix | Delete
// This effect addresses a race condition caused by tabbing from the last
[27438] Fix | Delete
// block in the editor into the settings sidebar. Without this effect, the
[27439] Fix | Delete
// selected tab and browser focus can become separated in an unexpected way
[27440] Fix | Delete
// (e.g the "block" tab is focused, but the "post" tab is selected).
[27441] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[27442] Fix | Delete
const tabsElements = Array.from(tabListRef.current?.querySelectorAll('[role="tab"]') || []);
[27443] Fix | Delete
const selectedTabElement = tabsElements.find(
[27444] Fix | Delete
// We are purposefully using a custom `data-tab-id` attribute here
[27445] Fix | Delete
// because we don't want rely on any assumptions about `Tabs`
[27446] Fix | Delete
// component internals.
[27447] Fix | Delete
element => element.getAttribute('data-tab-id') === tabName);
[27448] Fix | Delete
const activeElement = selectedTabElement?.ownerDocument.activeElement;
[27449] Fix | Delete
const tabsHasFocus = tabsElements.some(element => {
[27450] Fix | Delete
return activeElement && activeElement.id === element.id;
[27451] Fix | Delete
});
[27452] Fix | Delete
if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
[27453] Fix | Delete
selectedTabElement?.focus();
[27454] Fix | Delete
}
[27455] Fix | Delete
}, [tabName]);
[27456] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PluginSidebar, {
[27457] Fix | Delete
identifier: tabName,
[27458] Fix | Delete
header: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(sidebar_Tabs.Context.Provider, {
[27459] Fix | Delete
value: tabsContextValue,
[27460] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(sidebar_header, {
[27461] Fix | Delete
ref: tabListRef
[27462] Fix | Delete
})
[27463] Fix | Delete
}),
[27464] Fix | Delete
closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close Settings')
[27465] Fix | Delete
// This classname is added so we can apply a corrective negative
[27466] Fix | Delete
// margin to the panel.
[27467] Fix | Delete
// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049
[27468] Fix | Delete
,
[27469] Fix | Delete
className: "editor-sidebar__panel",
[27470] Fix | Delete
headerClassName: "editor-sidebar__panel-tabs"
[27471] Fix | Delete
/* translators: button label text should, if possible, be under 16 characters. */,
[27472] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
[27473] Fix | Delete
toggleShortcut: keyboardShortcut,
[27474] Fix | Delete
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? drawer_left : drawer_right,
[27475] Fix | Delete
isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
[27476] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(sidebar_Tabs.Context.Provider, {
[27477] Fix | Delete
value: tabsContextValue,
[27478] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(sidebar_Tabs.TabPanel, {
[27479] Fix | Delete
tabId: sidebars.document,
[27480] Fix | Delete
focusable: false,
[27481] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostSummary, {
[27482] Fix | Delete
onActionPerformed: onActionPerformed
[27483] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(plugin_document_setting_panel.Slot, {}), renderingMode !== 'post-only' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplateContentPanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostTransformPanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_taxonomies_panel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternOverridesPanel, {}), extraPanels]
[27484] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(sidebar_Tabs.TabPanel, {
[27485] Fix | Delete
tabId: sidebars.block,
[27486] Fix | Delete
focusable: false,
[27487] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockInspector, {})
[27488] Fix | Delete
})]
[27489] Fix | Delete
})
[27490] Fix | Delete
});
[27491] Fix | Delete
};
[27492] Fix | Delete
const Sidebar = ({
[27493] Fix | Delete
extraPanels,
[27494] Fix | Delete
onActionPerformed
[27495] Fix | Delete
}) => {
[27496] Fix | Delete
use_auto_switch_editor_sidebars();
[27497] Fix | Delete
const {
[27498] Fix | Delete
tabName,
[27499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function