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: block-editor.js
[38500] Fix | Delete
/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
[38501] Fix | Delete
[38502] Fix | Delete
/**
[38503] Fix | Delete
* Creates a blocks repeater for replacing the current block with a selected block type.
[38504] Fix | Delete
*
[38505] Fix | Delete
* @return {WPCompleter} A blocks completer.
[38506] Fix | Delete
*/
[38507] Fix | Delete
function createBlockCompleter() {
[38508] Fix | Delete
return {
[38509] Fix | Delete
name: 'blocks',
[38510] Fix | Delete
className: 'block-editor-autocompleters__block',
[38511] Fix | Delete
triggerPrefix: '/',
[38512] Fix | Delete
useItems(filterValue) {
[38513] Fix | Delete
const {
[38514] Fix | Delete
rootClientId,
[38515] Fix | Delete
selectedBlockName,
[38516] Fix | Delete
prioritizedBlocks
[38517] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[38518] Fix | Delete
const {
[38519] Fix | Delete
getSelectedBlockClientId,
[38520] Fix | Delete
getBlockName,
[38521] Fix | Delete
getBlockListSettings,
[38522] Fix | Delete
getBlockRootClientId
[38523] Fix | Delete
} = select(store);
[38524] Fix | Delete
const selectedBlockClientId = getSelectedBlockClientId();
[38525] Fix | Delete
const _rootClientId = getBlockRootClientId(selectedBlockClientId);
[38526] Fix | Delete
return {
[38527] Fix | Delete
selectedBlockName: selectedBlockClientId ? getBlockName(selectedBlockClientId) : null,
[38528] Fix | Delete
rootClientId: _rootClientId,
[38529] Fix | Delete
prioritizedBlocks: getBlockListSettings(_rootClientId)?.prioritizedInserterBlocks
[38530] Fix | Delete
};
[38531] Fix | Delete
}, []);
[38532] Fix | Delete
const [items, categories, collections] = use_block_types_state(rootClientId, block_noop, true);
[38533] Fix | Delete
const filteredItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
[38534] Fix | Delete
const initialFilteredItems = !!filterValue.trim() ? searchBlockItems(items, categories, collections, filterValue) : orderInserterBlockItems(orderBy(items, 'frecency', 'desc'), prioritizedBlocks);
[38535] Fix | Delete
return initialFilteredItems.filter(item => item.name !== selectedBlockName).slice(0, SHOWN_BLOCK_TYPES);
[38536] Fix | Delete
}, [filterValue, selectedBlockName, items, categories, collections, prioritizedBlocks]);
[38537] Fix | Delete
const options = (0,external_wp_element_namespaceObject.useMemo)(() => filteredItems.map(blockItem => {
[38538] Fix | Delete
const {
[38539] Fix | Delete
title,
[38540] Fix | Delete
icon,
[38541] Fix | Delete
isDisabled
[38542] Fix | Delete
} = blockItem;
[38543] Fix | Delete
return {
[38544] Fix | Delete
key: `block-${blockItem.id}`,
[38545] Fix | Delete
value: blockItem,
[38546] Fix | Delete
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[38547] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
[38548] Fix | Delete
icon: icon,
[38549] Fix | Delete
showColors: true
[38550] Fix | Delete
}, "icon"), title]
[38551] Fix | Delete
}),
[38552] Fix | Delete
isDisabled
[38553] Fix | Delete
};
[38554] Fix | Delete
}), [filteredItems]);
[38555] Fix | Delete
return [options];
[38556] Fix | Delete
},
[38557] Fix | Delete
allowContext(before, after) {
[38558] Fix | Delete
return !(/\S/.test(before) || /\S/.test(after));
[38559] Fix | Delete
},
[38560] Fix | Delete
getOptionCompletion(inserterItem) {
[38561] Fix | Delete
const {
[38562] Fix | Delete
name,
[38563] Fix | Delete
initialAttributes,
[38564] Fix | Delete
innerBlocks,
[38565] Fix | Delete
syncStatus,
[38566] Fix | Delete
content
[38567] Fix | Delete
} = inserterItem;
[38568] Fix | Delete
return {
[38569] Fix | Delete
action: 'replace',
[38570] Fix | Delete
value: syncStatus === 'unsynced' ? (0,external_wp_blocks_namespaceObject.parse)(content, {
[38571] Fix | Delete
__unstableSkipMigrationLogs: true
[38572] Fix | Delete
}) : (0,external_wp_blocks_namespaceObject.createBlock)(name, initialAttributes, (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(innerBlocks))
[38573] Fix | Delete
};
[38574] Fix | Delete
}
[38575] Fix | Delete
};
[38576] Fix | Delete
}
[38577] Fix | Delete
[38578] Fix | Delete
/**
[38579] Fix | Delete
* Creates a blocks repeater for replacing the current block with a selected block type.
[38580] Fix | Delete
*
[38581] Fix | Delete
* @return {WPCompleter} A blocks completer.
[38582] Fix | Delete
*/
[38583] Fix | Delete
/* harmony default export */ const block = (createBlockCompleter());
[38584] Fix | Delete
[38585] Fix | Delete
;// CONCATENATED MODULE: external ["wp","apiFetch"]
[38586] Fix | Delete
const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
[38587] Fix | Delete
var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
[38588] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/post.js
[38589] Fix | Delete
/**
[38590] Fix | Delete
* WordPress dependencies
[38591] Fix | Delete
*/
[38592] Fix | Delete
[38593] Fix | Delete
[38594] Fix | Delete
const post = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[38595] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[38596] Fix | Delete
viewBox: "0 0 24 24",
[38597] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[38598] Fix | Delete
d: "m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"
[38599] Fix | Delete
})
[38600] Fix | Delete
});
[38601] Fix | Delete
/* harmony default export */ const library_post = (post);
[38602] Fix | Delete
[38603] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/autocompleters/link.js
[38604] Fix | Delete
/**
[38605] Fix | Delete
* WordPress dependencies
[38606] Fix | Delete
*/
[38607] Fix | Delete
// Disable Reason: Needs to be refactored.
[38608] Fix | Delete
// eslint-disable-next-line no-restricted-imports
[38609] Fix | Delete
[38610] Fix | Delete
[38611] Fix | Delete
[38612] Fix | Delete
[38613] Fix | Delete
[38614] Fix | Delete
[38615] Fix | Delete
const SHOWN_SUGGESTIONS = 10;
[38616] Fix | Delete
[38617] Fix | Delete
/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
[38618] Fix | Delete
[38619] Fix | Delete
/**
[38620] Fix | Delete
* Creates a suggestion list for links to posts or pages.
[38621] Fix | Delete
*
[38622] Fix | Delete
* @return {WPCompleter} A links completer.
[38623] Fix | Delete
*/
[38624] Fix | Delete
function createLinkCompleter() {
[38625] Fix | Delete
return {
[38626] Fix | Delete
name: 'links',
[38627] Fix | Delete
className: 'block-editor-autocompleters__link',
[38628] Fix | Delete
triggerPrefix: '[[',
[38629] Fix | Delete
options: async letters => {
[38630] Fix | Delete
let options = await external_wp_apiFetch_default()({
[38631] Fix | Delete
path: (0,external_wp_url_namespaceObject.addQueryArgs)('/wp/v2/search', {
[38632] Fix | Delete
per_page: SHOWN_SUGGESTIONS,
[38633] Fix | Delete
search: letters,
[38634] Fix | Delete
type: 'post',
[38635] Fix | Delete
order_by: 'menu_order'
[38636] Fix | Delete
})
[38637] Fix | Delete
});
[38638] Fix | Delete
options = options.filter(option => option.title !== '');
[38639] Fix | Delete
return options;
[38640] Fix | Delete
},
[38641] Fix | Delete
getOptionKeywords(item) {
[38642] Fix | Delete
const expansionWords = item.title.split(/\s+/);
[38643] Fix | Delete
return [...expansionWords];
[38644] Fix | Delete
},
[38645] Fix | Delete
getOptionLabel(item) {
[38646] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[38647] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
[38648] Fix | Delete
icon: item.subtype === 'page' ? library_page : library_post
[38649] Fix | Delete
}, "icon"), item.title]
[38650] Fix | Delete
});
[38651] Fix | Delete
},
[38652] Fix | Delete
getOptionCompletion(item) {
[38653] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
[38654] Fix | Delete
href: item.url,
[38655] Fix | Delete
children: item.title
[38656] Fix | Delete
});
[38657] Fix | Delete
}
[38658] Fix | Delete
};
[38659] Fix | Delete
}
[38660] Fix | Delete
[38661] Fix | Delete
/**
[38662] Fix | Delete
* Creates a suggestion list for links to posts or pages..
[38663] Fix | Delete
*
[38664] Fix | Delete
* @return {WPCompleter} A link completer.
[38665] Fix | Delete
*/
[38666] Fix | Delete
/* harmony default export */ const autocompleters_link = (createLinkCompleter());
[38667] Fix | Delete
[38668] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/autocomplete/index.js
[38669] Fix | Delete
/**
[38670] Fix | Delete
* WordPress dependencies
[38671] Fix | Delete
*/
[38672] Fix | Delete
[38673] Fix | Delete
[38674] Fix | Delete
[38675] Fix | Delete
[38676] Fix | Delete
[38677] Fix | Delete
/**
[38678] Fix | Delete
* Internal dependencies
[38679] Fix | Delete
*/
[38680] Fix | Delete
[38681] Fix | Delete
[38682] Fix | Delete
[38683] Fix | Delete
[38684] Fix | Delete
/**
[38685] Fix | Delete
* Shared reference to an empty array for cases where it is important to avoid
[38686] Fix | Delete
* returning a new array reference on every invocation.
[38687] Fix | Delete
*
[38688] Fix | Delete
* @type {Array}
[38689] Fix | Delete
*/
[38690] Fix | Delete
[38691] Fix | Delete
const autocomplete_EMPTY_ARRAY = [];
[38692] Fix | Delete
function useCompleters({
[38693] Fix | Delete
completers = autocomplete_EMPTY_ARRAY
[38694] Fix | Delete
}) {
[38695] Fix | Delete
const {
[38696] Fix | Delete
name
[38697] Fix | Delete
} = useBlockEditContext();
[38698] Fix | Delete
return (0,external_wp_element_namespaceObject.useMemo)(() => {
[38699] Fix | Delete
let filteredCompleters = [...completers, autocompleters_link];
[38700] Fix | Delete
if (name === (0,external_wp_blocks_namespaceObject.getDefaultBlockName)() || (0,external_wp_blocks_namespaceObject.getBlockSupport)(name, '__experimentalSlashInserter', false)) {
[38701] Fix | Delete
filteredCompleters = [...filteredCompleters, block];
[38702] Fix | Delete
}
[38703] Fix | Delete
if ((0,external_wp_hooks_namespaceObject.hasFilter)('editor.Autocomplete.completers')) {
[38704] Fix | Delete
// Provide copies so filters may directly modify them.
[38705] Fix | Delete
if (filteredCompleters === completers) {
[38706] Fix | Delete
filteredCompleters = filteredCompleters.map(completer => ({
[38707] Fix | Delete
...completer
[38708] Fix | Delete
}));
[38709] Fix | Delete
}
[38710] Fix | Delete
filteredCompleters = (0,external_wp_hooks_namespaceObject.applyFilters)('editor.Autocomplete.completers', filteredCompleters, name);
[38711] Fix | Delete
}
[38712] Fix | Delete
return filteredCompleters;
[38713] Fix | Delete
}, [completers, name]);
[38714] Fix | Delete
}
[38715] Fix | Delete
function useBlockEditorAutocompleteProps(props) {
[38716] Fix | Delete
return (0,external_wp_components_namespaceObject.__unstableUseAutocompleteProps)({
[38717] Fix | Delete
...props,
[38718] Fix | Delete
completers: useCompleters(props)
[38719] Fix | Delete
});
[38720] Fix | Delete
}
[38721] Fix | Delete
[38722] Fix | Delete
/**
[38723] Fix | Delete
* Wrap the default Autocomplete component with one that supports a filter hook
[38724] Fix | Delete
* for customizing its list of autocompleters.
[38725] Fix | Delete
*
[38726] Fix | Delete
* @type {import('react').FC}
[38727] Fix | Delete
*/
[38728] Fix | Delete
function BlockEditorAutocomplete(props) {
[38729] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Autocomplete, {
[38730] Fix | Delete
...props,
[38731] Fix | Delete
completers: useCompleters(props)
[38732] Fix | Delete
});
[38733] Fix | Delete
}
[38734] Fix | Delete
[38735] Fix | Delete
/**
[38736] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/autocomplete/README.md
[38737] Fix | Delete
*/
[38738] Fix | Delete
/* harmony default export */ const autocomplete = (BlockEditorAutocomplete);
[38739] Fix | Delete
[38740] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
[38741] Fix | Delete
/**
[38742] Fix | Delete
* WordPress dependencies
[38743] Fix | Delete
*/
[38744] Fix | Delete
[38745] Fix | Delete
[38746] Fix | Delete
const fullscreen = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[38747] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[38748] Fix | Delete
viewBox: "0 0 24 24",
[38749] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[38750] Fix | Delete
d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"
[38751] Fix | Delete
})
[38752] Fix | Delete
});
[38753] Fix | Delete
/* harmony default export */ const library_fullscreen = (fullscreen);
[38754] Fix | Delete
[38755] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-full-height-alignment-control/index.js
[38756] Fix | Delete
/**
[38757] Fix | Delete
* WordPress dependencies
[38758] Fix | Delete
*/
[38759] Fix | Delete
[38760] Fix | Delete
[38761] Fix | Delete
[38762] Fix | Delete
[38763] Fix | Delete
function BlockFullHeightAlignmentControl({
[38764] Fix | Delete
isActive,
[38765] Fix | Delete
label = (0,external_wp_i18n_namespaceObject.__)('Toggle full height'),
[38766] Fix | Delete
onToggle,
[38767] Fix | Delete
isDisabled
[38768] Fix | Delete
}) {
[38769] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
[38770] Fix | Delete
isActive: isActive,
[38771] Fix | Delete
icon: library_fullscreen,
[38772] Fix | Delete
label: label,
[38773] Fix | Delete
onClick: () => onToggle(!isActive),
[38774] Fix | Delete
disabled: isDisabled
[38775] Fix | Delete
});
[38776] Fix | Delete
}
[38777] Fix | Delete
/* harmony default export */ const block_full_height_alignment_control = (BlockFullHeightAlignmentControl);
[38778] Fix | Delete
[38779] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-matrix-control/index.js
[38780] Fix | Delete
/**
[38781] Fix | Delete
* WordPress dependencies
[38782] Fix | Delete
*/
[38783] Fix | Delete
[38784] Fix | Delete
[38785] Fix | Delete
[38786] Fix | Delete
[38787] Fix | Delete
const block_alignment_matrix_control_noop = () => {};
[38788] Fix | Delete
function BlockAlignmentMatrixControl(props) {
[38789] Fix | Delete
const {
[38790] Fix | Delete
label = (0,external_wp_i18n_namespaceObject.__)('Change matrix alignment'),
[38791] Fix | Delete
onChange = block_alignment_matrix_control_noop,
[38792] Fix | Delete
value = 'center',
[38793] Fix | Delete
isDisabled
[38794] Fix | Delete
} = props;
[38795] Fix | Delete
const icon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalAlignmentMatrixControl.Icon, {
[38796] Fix | Delete
value: value
[38797] Fix | Delete
});
[38798] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
[38799] Fix | Delete
popoverProps: {
[38800] Fix | Delete
placement: 'bottom-start'
[38801] Fix | Delete
},
[38802] Fix | Delete
renderToggle: ({
[38803] Fix | Delete
onToggle,
[38804] Fix | Delete
isOpen
[38805] Fix | Delete
}) => {
[38806] Fix | Delete
const openOnArrowDown = event => {
[38807] Fix | Delete
if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
[38808] Fix | Delete
event.preventDefault();
[38809] Fix | Delete
onToggle();
[38810] Fix | Delete
}
[38811] Fix | Delete
};
[38812] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
[38813] Fix | Delete
onClick: onToggle,
[38814] Fix | Delete
"aria-haspopup": "true",
[38815] Fix | Delete
"aria-expanded": isOpen,
[38816] Fix | Delete
onKeyDown: openOnArrowDown,
[38817] Fix | Delete
label: label,
[38818] Fix | Delete
icon: icon,
[38819] Fix | Delete
showTooltip: true,
[38820] Fix | Delete
disabled: isDisabled
[38821] Fix | Delete
});
[38822] Fix | Delete
},
[38823] Fix | Delete
renderContent: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalAlignmentMatrixControl, {
[38824] Fix | Delete
hasFocusBorder: false,
[38825] Fix | Delete
onChange: onChange,
[38826] Fix | Delete
value: value
[38827] Fix | Delete
})
[38828] Fix | Delete
});
[38829] Fix | Delete
}
[38830] Fix | Delete
/* harmony default export */ const block_alignment_matrix_control = (BlockAlignmentMatrixControl);
[38831] Fix | Delete
[38832] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-title/use-block-display-title.js
[38833] Fix | Delete
/**
[38834] Fix | Delete
* WordPress dependencies
[38835] Fix | Delete
*/
[38836] Fix | Delete
[38837] Fix | Delete
[38838] Fix | Delete
[38839] Fix | Delete
/**
[38840] Fix | Delete
* Internal dependencies
[38841] Fix | Delete
*/
[38842] Fix | Delete
[38843] Fix | Delete
[38844] Fix | Delete
/**
[38845] Fix | Delete
* Returns the block's configured title as a string, or empty if the title
[38846] Fix | Delete
* cannot be determined.
[38847] Fix | Delete
*
[38848] Fix | Delete
* @example
[38849] Fix | Delete
*
[38850] Fix | Delete
* ```js
[38851] Fix | Delete
* useBlockDisplayTitle( { clientId: 'afd1cb17-2c08-4e7a-91be-007ba7ddc3a1', maximumLength: 17 } );
[38852] Fix | Delete
* ```
[38853] Fix | Delete
*
[38854] Fix | Delete
* @param {Object} props
[38855] Fix | Delete
* @param {string} props.clientId Client ID of block.
[38856] Fix | Delete
* @param {number|undefined} props.maximumLength The maximum length that the block title string may be before truncated.
[38857] Fix | Delete
* @param {string|undefined} props.context The context to pass to `getBlockLabel`.
[38858] Fix | Delete
* @return {?string} Block title.
[38859] Fix | Delete
*/
[38860] Fix | Delete
function useBlockDisplayTitle({
[38861] Fix | Delete
clientId,
[38862] Fix | Delete
maximumLength,
[38863] Fix | Delete
context
[38864] Fix | Delete
}) {
[38865] Fix | Delete
const blockTitle = (0,external_wp_data_namespaceObject.useSelect)(select => {
[38866] Fix | Delete
if (!clientId) {
[38867] Fix | Delete
return null;
[38868] Fix | Delete
}
[38869] Fix | Delete
const {
[38870] Fix | Delete
getBlockName,
[38871] Fix | Delete
getBlockAttributes
[38872] Fix | Delete
} = select(store);
[38873] Fix | Delete
const {
[38874] Fix | Delete
getBlockType,
[38875] Fix | Delete
getActiveBlockVariation
[38876] Fix | Delete
} = select(external_wp_blocks_namespaceObject.store);
[38877] Fix | Delete
const blockName = getBlockName(clientId);
[38878] Fix | Delete
const blockType = getBlockType(blockName);
[38879] Fix | Delete
if (!blockType) {
[38880] Fix | Delete
return null;
[38881] Fix | Delete
}
[38882] Fix | Delete
const attributes = getBlockAttributes(clientId);
[38883] Fix | Delete
const label = (0,external_wp_blocks_namespaceObject.__experimentalGetBlockLabel)(blockType, attributes, context);
[38884] Fix | Delete
// If the label is defined we prioritize it over a possible block variation title match.
[38885] Fix | Delete
if (label !== blockType.title) {
[38886] Fix | Delete
return label;
[38887] Fix | Delete
}
[38888] Fix | Delete
const match = getActiveBlockVariation(blockName, attributes);
[38889] Fix | Delete
// Label will fallback to the title if no label is defined for the current label context.
[38890] Fix | Delete
return match?.title || blockType.title;
[38891] Fix | Delete
}, [clientId, context]);
[38892] Fix | Delete
if (!blockTitle) {
[38893] Fix | Delete
return null;
[38894] Fix | Delete
}
[38895] Fix | Delete
if (maximumLength && maximumLength > 0 && blockTitle.length > maximumLength) {
[38896] Fix | Delete
const omission = '...';
[38897] Fix | Delete
return blockTitle.slice(0, maximumLength - omission.length) + omission;
[38898] Fix | Delete
}
[38899] Fix | Delete
return blockTitle;
[38900] Fix | Delete
}
[38901] Fix | Delete
[38902] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-title/index.js
[38903] Fix | Delete
/**
[38904] Fix | Delete
* Internal dependencies
[38905] Fix | Delete
*/
[38906] Fix | Delete
[38907] Fix | Delete
[38908] Fix | Delete
[38909] Fix | Delete
/**
[38910] Fix | Delete
* Renders the block's configured title as a string, or empty if the title
[38911] Fix | Delete
* cannot be determined.
[38912] Fix | Delete
*
[38913] Fix | Delete
* @example
[38914] Fix | Delete
*
[38915] Fix | Delete
* ```jsx
[38916] Fix | Delete
* <BlockTitle clientId="afd1cb17-2c08-4e7a-91be-007ba7ddc3a1" maximumLength={ 17 }/>
[38917] Fix | Delete
* ```
[38918] Fix | Delete
*
[38919] Fix | Delete
* @param {Object} props
[38920] Fix | Delete
* @param {string} props.clientId Client ID of block.
[38921] Fix | Delete
* @param {number|undefined} props.maximumLength The maximum length that the block title string may be before truncated.
[38922] Fix | Delete
* @param {string|undefined} props.context The context to pass to `getBlockLabel`.
[38923] Fix | Delete
*
[38924] Fix | Delete
* @return {JSX.Element} Block title.
[38925] Fix | Delete
*/
[38926] Fix | Delete
function BlockTitle({
[38927] Fix | Delete
clientId,
[38928] Fix | Delete
maximumLength,
[38929] Fix | Delete
context
[38930] Fix | Delete
}) {
[38931] Fix | Delete
return useBlockDisplayTitle({
[38932] Fix | Delete
clientId,
[38933] Fix | Delete
maximumLength,
[38934] Fix | Delete
context
[38935] Fix | Delete
});
[38936] Fix | Delete
}
[38937] Fix | Delete
[38938] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-breadcrumb/index.js
[38939] Fix | Delete
/**
[38940] Fix | Delete
* WordPress dependencies
[38941] Fix | Delete
*/
[38942] Fix | Delete
[38943] Fix | Delete
[38944] Fix | Delete
[38945] Fix | Delete
[38946] Fix | Delete
[38947] Fix | Delete
/**
[38948] Fix | Delete
* Internal dependencies
[38949] Fix | Delete
*/
[38950] Fix | Delete
[38951] Fix | Delete
[38952] Fix | Delete
[38953] Fix | Delete
[38954] Fix | Delete
/**
[38955] Fix | Delete
* Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.
[38956] Fix | Delete
*
[38957] Fix | Delete
* @param {Object} props Component props.
[38958] Fix | Delete
* @param {string} props.rootLabelText Translated label for the root element of the breadcrumb trail.
[38959] Fix | Delete
* @return {Element} Block Breadcrumb.
[38960] Fix | Delete
*/
[38961] Fix | Delete
[38962] Fix | Delete
[38963] Fix | Delete
function BlockBreadcrumb({
[38964] Fix | Delete
rootLabelText
[38965] Fix | Delete
}) {
[38966] Fix | Delete
const {
[38967] Fix | Delete
selectBlock,
[38968] Fix | Delete
clearSelectedBlock
[38969] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[38970] Fix | Delete
const {
[38971] Fix | Delete
clientId,
[38972] Fix | Delete
parents,
[38973] Fix | Delete
hasSelection
[38974] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[38975] Fix | Delete
const {
[38976] Fix | Delete
getSelectionStart,
[38977] Fix | Delete
getSelectedBlockClientId,
[38978] Fix | Delete
getEnabledBlockParents
[38979] Fix | Delete
} = unlock(select(store));
[38980] Fix | Delete
const selectedBlockClientId = getSelectedBlockClientId();
[38981] Fix | Delete
return {
[38982] Fix | Delete
parents: getEnabledBlockParents(selectedBlockClientId),
[38983] Fix | Delete
clientId: selectedBlockClientId,
[38984] Fix | Delete
hasSelection: !!getSelectionStart().clientId
[38985] Fix | Delete
};
[38986] Fix | Delete
}, []);
[38987] Fix | Delete
const rootLabel = rootLabelText || (0,external_wp_i18n_namespaceObject.__)('Document');
[38988] Fix | Delete
[38989] Fix | Delete
/*
[38990] Fix | Delete
* Disable reason: The `list` ARIA role is redundant but
[38991] Fix | Delete
* Safari+VoiceOver won't announce the list otherwise.
[38992] Fix | Delete
*/
[38993] Fix | Delete
/* eslint-disable jsx-a11y/no-redundant-roles */
[38994] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("ul", {
[38995] Fix | Delete
className: "block-editor-block-breadcrumb",
[38996] Fix | Delete
role: "list",
[38997] Fix | Delete
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Block breadcrumb'),
[38998] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", {
[38999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function