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
* WordPress dependencies
[22500] Fix | Delete
*/
[22501] Fix | Delete
[22502] Fix | Delete
[22503] Fix | Delete
[22504] Fix | Delete
[22505] Fix | Delete
[22506] Fix | Delete
[22507] Fix | Delete
[22508] Fix | Delete
[22509] Fix | Delete
[22510] Fix | Delete
[22511] Fix | Delete
/**
[22512] Fix | Delete
* Internal dependencies
[22513] Fix | Delete
*/
[22514] Fix | Delete
[22515] Fix | Delete
[22516] Fix | Delete
[22517] Fix | Delete
[22518] Fix | Delete
[22519] Fix | Delete
function CreateTemplatePartModal({
[22520] Fix | Delete
modalTitle,
[22521] Fix | Delete
...restProps
[22522] Fix | Delete
}) {
[22523] Fix | Delete
const defaultModalTitle = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getPostType(TEMPLATE_PART_POST_TYPE)?.labels?.add_new_item, []);
[22524] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
[22525] Fix | Delete
title: modalTitle || defaultModalTitle,
[22526] Fix | Delete
onRequestClose: restProps.closeModal,
[22527] Fix | Delete
overlayClassName: "editor-create-template-part-modal",
[22528] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CreateTemplatePartModalContents, {
[22529] Fix | Delete
...restProps
[22530] Fix | Delete
})
[22531] Fix | Delete
});
[22532] Fix | Delete
}
[22533] Fix | Delete
function CreateTemplatePartModalContents({
[22534] Fix | Delete
defaultArea = TEMPLATE_PART_AREA_DEFAULT_CATEGORY,
[22535] Fix | Delete
blocks = [],
[22536] Fix | Delete
confirmLabel = (0,external_wp_i18n_namespaceObject.__)('Add'),
[22537] Fix | Delete
closeModal,
[22538] Fix | Delete
onCreate,
[22539] Fix | Delete
onError,
[22540] Fix | Delete
defaultTitle = ''
[22541] Fix | Delete
}) {
[22542] Fix | Delete
const {
[22543] Fix | Delete
createErrorNotice
[22544] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[22545] Fix | Delete
const {
[22546] Fix | Delete
saveEntityRecord
[22547] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
[22548] Fix | Delete
const existingTemplateParts = useExistingTemplateParts();
[22549] Fix | Delete
const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)(defaultTitle);
[22550] Fix | Delete
const [area, setArea] = (0,external_wp_element_namespaceObject.useState)(defaultArea);
[22551] Fix | Delete
const [isSubmitting, setIsSubmitting] = (0,external_wp_element_namespaceObject.useState)(false);
[22552] Fix | Delete
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(CreateTemplatePartModal);
[22553] Fix | Delete
const templatePartAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).__experimentalGetDefaultTemplatePartAreas(), []);
[22554] Fix | Delete
async function createTemplatePart() {
[22555] Fix | Delete
if (!title || isSubmitting) {
[22556] Fix | Delete
return;
[22557] Fix | Delete
}
[22558] Fix | Delete
try {
[22559] Fix | Delete
setIsSubmitting(true);
[22560] Fix | Delete
const uniqueTitle = getUniqueTemplatePartTitle(title, existingTemplateParts);
[22561] Fix | Delete
const cleanSlug = getCleanTemplatePartSlug(uniqueTitle);
[22562] Fix | Delete
const templatePart = await saveEntityRecord('postType', TEMPLATE_PART_POST_TYPE, {
[22563] Fix | Delete
slug: cleanSlug,
[22564] Fix | Delete
title: uniqueTitle,
[22565] Fix | Delete
content: (0,external_wp_blocks_namespaceObject.serialize)(blocks),
[22566] Fix | Delete
area
[22567] Fix | Delete
}, {
[22568] Fix | Delete
throwOnError: true
[22569] Fix | Delete
});
[22570] Fix | Delete
await onCreate(templatePart);
[22571] Fix | Delete
[22572] Fix | Delete
// TODO: Add a success notice?
[22573] Fix | Delete
} catch (error) {
[22574] Fix | Delete
const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while creating the template part.');
[22575] Fix | Delete
createErrorNotice(errorMessage, {
[22576] Fix | Delete
type: 'snackbar'
[22577] Fix | Delete
});
[22578] Fix | Delete
onError?.();
[22579] Fix | Delete
} finally {
[22580] Fix | Delete
setIsSubmitting(false);
[22581] Fix | Delete
}
[22582] Fix | Delete
}
[22583] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
[22584] Fix | Delete
onSubmit: async event => {
[22585] Fix | Delete
event.preventDefault();
[22586] Fix | Delete
await createTemplatePart();
[22587] Fix | Delete
},
[22588] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[22589] Fix | Delete
spacing: "4",
[22590] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
[22591] Fix | Delete
__next40pxDefaultSize: true,
[22592] Fix | Delete
__nextHasNoMarginBottom: true,
[22593] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Name'),
[22594] Fix | Delete
value: title,
[22595] Fix | Delete
onChange: setTitle,
[22596] Fix | Delete
required: true
[22597] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl, {
[22598] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Area'),
[22599] Fix | Delete
id: `editor-create-template-part-modal__area-selection-${instanceId}`,
[22600] Fix | Delete
className: "editor-create-template-part-modal__area-base-control",
[22601] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalRadioGroup, {
[22602] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Area'),
[22603] Fix | Delete
className: "editor-create-template-part-modal__area-radio-group",
[22604] Fix | Delete
id: `editor-create-template-part-modal__area-selection-${instanceId}`,
[22605] Fix | Delete
onChange: setArea,
[22606] Fix | Delete
checked: area,
[22607] Fix | Delete
children: templatePartAreas.map(({
[22608] Fix | Delete
icon,
[22609] Fix | Delete
label,
[22610] Fix | Delete
area: value,
[22611] Fix | Delete
description
[22612] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalRadio, {
[22613] Fix | Delete
value: value,
[22614] Fix | Delete
className: "editor-create-template-part-modal__area-radio",
[22615] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, {
[22616] Fix | Delete
align: "start",
[22617] Fix | Delete
justify: "start",
[22618] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
[22619] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
[22620] Fix | Delete
icon: icon
[22621] Fix | Delete
})
[22622] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.FlexBlock, {
[22623] Fix | Delete
className: "editor-create-template-part-modal__option-label",
[22624] Fix | Delete
children: [label, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[22625] Fix | Delete
children: description
[22626] Fix | Delete
})]
[22627] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
[22628] Fix | Delete
className: "editor-create-template-part-modal__checkbox",
[22629] Fix | Delete
children: area === value && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
[22630] Fix | Delete
icon: library_check
[22631] Fix | Delete
})
[22632] Fix | Delete
})]
[22633] Fix | Delete
})
[22634] Fix | Delete
}, label))
[22635] Fix | Delete
})
[22636] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
[22637] Fix | Delete
justify: "right",
[22638] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[22639] Fix | Delete
__next40pxDefaultSize: true,
[22640] Fix | Delete
variant: "tertiary",
[22641] Fix | Delete
onClick: () => {
[22642] Fix | Delete
closeModal();
[22643] Fix | Delete
},
[22644] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
[22645] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[22646] Fix | Delete
__next40pxDefaultSize: true,
[22647] Fix | Delete
variant: "primary",
[22648] Fix | Delete
type: "submit",
[22649] Fix | Delete
"aria-disabled": !title || isSubmitting,
[22650] Fix | Delete
isBusy: isSubmitting,
[22651] Fix | Delete
children: confirmLabel
[22652] Fix | Delete
})]
[22653] Fix | Delete
})]
[22654] Fix | Delete
})
[22655] Fix | Delete
});
[22656] Fix | Delete
}
[22657] Fix | Delete
[22658] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/next.js
[22659] Fix | Delete
/**
[22660] Fix | Delete
* WordPress dependencies
[22661] Fix | Delete
*/
[22662] Fix | Delete
[22663] Fix | Delete
[22664] Fix | Delete
const next = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[22665] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[22666] Fix | Delete
viewBox: "0 0 24 24",
[22667] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[22668] Fix | Delete
d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"
[22669] Fix | Delete
})
[22670] Fix | Delete
});
[22671] Fix | Delete
/* harmony default export */ const library_next = (next);
[22672] Fix | Delete
[22673] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/previous.js
[22674] Fix | Delete
/**
[22675] Fix | Delete
* WordPress dependencies
[22676] Fix | Delete
*/
[22677] Fix | Delete
[22678] Fix | Delete
[22679] Fix | Delete
const previous = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[22680] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[22681] Fix | Delete
viewBox: "0 0 24 24",
[22682] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[22683] Fix | Delete
d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"
[22684] Fix | Delete
})
[22685] Fix | Delete
});
[22686] Fix | Delete
/* harmony default export */ const library_previous = (previous);
[22687] Fix | Delete
[22688] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/collapsible-block-toolbar/index.js
[22689] Fix | Delete
/**
[22690] Fix | Delete
* External dependencies
[22691] Fix | Delete
*/
[22692] Fix | Delete
[22693] Fix | Delete
[22694] Fix | Delete
/**
[22695] Fix | Delete
* WordPress dependencies
[22696] Fix | Delete
*/
[22697] Fix | Delete
[22698] Fix | Delete
[22699] Fix | Delete
[22700] Fix | Delete
[22701] Fix | Delete
[22702] Fix | Delete
[22703] Fix | Delete
[22704] Fix | Delete
/**
[22705] Fix | Delete
* Internal dependencies
[22706] Fix | Delete
*/
[22707] Fix | Delete
[22708] Fix | Delete
[22709] Fix | Delete
[22710] Fix | Delete
[22711] Fix | Delete
const {
[22712] Fix | Delete
useHasBlockToolbar
[22713] Fix | Delete
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
[22714] Fix | Delete
function CollapsableBlockToolbar({
[22715] Fix | Delete
isCollapsed,
[22716] Fix | Delete
onToggle
[22717] Fix | Delete
}) {
[22718] Fix | Delete
const {
[22719] Fix | Delete
blockSelectionStart
[22720] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[22721] Fix | Delete
return {
[22722] Fix | Delete
blockSelectionStart: select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart()
[22723] Fix | Delete
};
[22724] Fix | Delete
}, []);
[22725] Fix | Delete
const hasBlockToolbar = useHasBlockToolbar();
[22726] Fix | Delete
const hasBlockSelection = !!blockSelectionStart;
[22727] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[22728] Fix | Delete
// If we have a new block selection, show the block tools
[22729] Fix | Delete
if (blockSelectionStart) {
[22730] Fix | Delete
onToggle(false);
[22731] Fix | Delete
}
[22732] Fix | Delete
}, [blockSelectionStart, onToggle]);
[22733] Fix | Delete
if (!hasBlockToolbar) {
[22734] Fix | Delete
return null;
[22735] Fix | Delete
}
[22736] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[22737] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[22738] Fix | Delete
className: dist_clsx('editor-collapsible-block-toolbar', {
[22739] Fix | Delete
'is-collapsed': isCollapsed || !hasBlockSelection
[22740] Fix | Delete
}),
[22741] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockToolbar, {
[22742] Fix | Delete
hideDragHandle: true
[22743] Fix | Delete
})
[22744] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Popover.Slot, {
[22745] Fix | Delete
name: "block-toolbar"
[22746] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[22747] Fix | Delete
className: "editor-collapsible-block-toolbar__toggle",
[22748] Fix | Delete
icon: isCollapsed ? library_next : library_previous,
[22749] Fix | Delete
onClick: () => {
[22750] Fix | Delete
onToggle(!isCollapsed);
[22751] Fix | Delete
},
[22752] Fix | Delete
label: isCollapsed ? (0,external_wp_i18n_namespaceObject.__)('Show block tools') : (0,external_wp_i18n_namespaceObject.__)('Hide block tools'),
[22753] Fix | Delete
size: "compact"
[22754] Fix | Delete
})]
[22755] Fix | Delete
});
[22756] Fix | Delete
}
[22757] Fix | Delete
/* harmony default export */ const collapsible_block_toolbar = (CollapsableBlockToolbar);
[22758] Fix | Delete
[22759] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
[22760] Fix | Delete
/**
[22761] Fix | Delete
* WordPress dependencies
[22762] Fix | Delete
*/
[22763] Fix | Delete
[22764] Fix | Delete
[22765] Fix | Delete
const plus = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[22766] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[22767] Fix | Delete
viewBox: "0 0 24 24",
[22768] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[22769] Fix | Delete
d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"
[22770] Fix | Delete
})
[22771] Fix | Delete
});
[22772] Fix | Delete
/* harmony default export */ const library_plus = (plus);
[22773] Fix | Delete
[22774] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-tools/index.js
[22775] Fix | Delete
/**
[22776] Fix | Delete
* External dependencies
[22777] Fix | Delete
*/
[22778] Fix | Delete
[22779] Fix | Delete
[22780] Fix | Delete
/**
[22781] Fix | Delete
* WordPress dependencies
[22782] Fix | Delete
*/
[22783] Fix | Delete
[22784] Fix | Delete
[22785] Fix | Delete
[22786] Fix | Delete
[22787] Fix | Delete
[22788] Fix | Delete
[22789] Fix | Delete
[22790] Fix | Delete
[22791] Fix | Delete
[22792] Fix | Delete
[22793] Fix | Delete
/**
[22794] Fix | Delete
* Internal dependencies
[22795] Fix | Delete
*/
[22796] Fix | Delete
[22797] Fix | Delete
[22798] Fix | Delete
[22799] Fix | Delete
[22800] Fix | Delete
[22801] Fix | Delete
[22802] Fix | Delete
[22803] Fix | Delete
function DocumentTools({
[22804] Fix | Delete
className,
[22805] Fix | Delete
disableBlockTools = false
[22806] Fix | Delete
}) {
[22807] Fix | Delete
const {
[22808] Fix | Delete
setIsInserterOpened,
[22809] Fix | Delete
setIsListViewOpened
[22810] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[22811] Fix | Delete
const {
[22812] Fix | Delete
isDistractionFree,
[22813] Fix | Delete
isInserterOpened,
[22814] Fix | Delete
isListViewOpen,
[22815] Fix | Delete
listViewShortcut,
[22816] Fix | Delete
inserterSidebarToggleRef,
[22817] Fix | Delete
listViewToggleRef,
[22818] Fix | Delete
hasFixedToolbar,
[22819] Fix | Delete
showIconLabels
[22820] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[22821] Fix | Delete
const {
[22822] Fix | Delete
getSettings
[22823] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[22824] Fix | Delete
const {
[22825] Fix | Delete
get
[22826] Fix | Delete
} = select(external_wp_preferences_namespaceObject.store);
[22827] Fix | Delete
const {
[22828] Fix | Delete
isListViewOpened,
[22829] Fix | Delete
getEditorMode,
[22830] Fix | Delete
getInserterSidebarToggleRef,
[22831] Fix | Delete
getListViewToggleRef
[22832] Fix | Delete
} = unlock(select(store_store));
[22833] Fix | Delete
const {
[22834] Fix | Delete
getShortcutRepresentation
[22835] Fix | Delete
} = select(external_wp_keyboardShortcuts_namespaceObject.store);
[22836] Fix | Delete
const {
[22837] Fix | Delete
__unstableGetEditorMode
[22838] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[22839] Fix | Delete
return {
[22840] Fix | Delete
isInserterOpened: select(store_store).isInserterOpened(),
[22841] Fix | Delete
isListViewOpen: isListViewOpened(),
[22842] Fix | Delete
listViewShortcut: getShortcutRepresentation('core/editor/toggle-list-view'),
[22843] Fix | Delete
inserterSidebarToggleRef: getInserterSidebarToggleRef(),
[22844] Fix | Delete
listViewToggleRef: getListViewToggleRef(),
[22845] Fix | Delete
hasFixedToolbar: getSettings().hasFixedToolbar,
[22846] Fix | Delete
showIconLabels: get('core', 'showIconLabels'),
[22847] Fix | Delete
isDistractionFree: get('core', 'distractionFree'),
[22848] Fix | Delete
isVisualMode: getEditorMode() === 'visual',
[22849] Fix | Delete
isZoomedOutView: __unstableGetEditorMode() === 'zoom-out'
[22850] Fix | Delete
};
[22851] Fix | Delete
}, []);
[22852] Fix | Delete
const preventDefault = event => {
[22853] Fix | Delete
// Because the inserter behaves like a dialog,
[22854] Fix | Delete
// if the inserter is opened already then when we click on the toggle button
[22855] Fix | Delete
// then the initial click event will close the inserter and then be propagated
[22856] Fix | Delete
// to the inserter toggle and it will open it again.
[22857] Fix | Delete
// To prevent this we need to stop the propagation of the event.
[22858] Fix | Delete
// This won't be necessary when the inserter no longer behaves like a dialog.
[22859] Fix | Delete
[22860] Fix | Delete
if (isInserterOpened) {
[22861] Fix | Delete
event.preventDefault();
[22862] Fix | Delete
}
[22863] Fix | Delete
};
[22864] Fix | Delete
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
[22865] Fix | Delete
const isWideViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('wide');
[22866] Fix | Delete
[22867] Fix | Delete
/* translators: accessibility text for the editor toolbar */
[22868] Fix | Delete
const toolbarAriaLabel = (0,external_wp_i18n_namespaceObject.__)('Document tools');
[22869] Fix | Delete
const toggleListView = (0,external_wp_element_namespaceObject.useCallback)(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
[22870] Fix | Delete
const toggleInserter = (0,external_wp_element_namespaceObject.useCallback)(() => setIsInserterOpened(!isInserterOpened), [isInserterOpened, setIsInserterOpened]);
[22871] Fix | Delete
[22872] Fix | Delete
/* translators: button label text should, if possible, be under 16 characters. */
[22873] Fix | Delete
const longLabel = (0,external_wp_i18n_namespaceObject._x)('Toggle block inserter', 'Generic label for block inserter button');
[22874] Fix | Delete
const shortLabel = !isInserterOpened ? (0,external_wp_i18n_namespaceObject.__)('Add') : (0,external_wp_i18n_namespaceObject.__)('Close');
[22875] Fix | Delete
return (
[22876] Fix | Delete
/*#__PURE__*/
[22877] Fix | Delete
// Some plugins expect and use the `edit-post-header-toolbar` CSS class to
[22878] Fix | Delete
// find the toolbar and inject UI elements into it. This is not officially
[22879] Fix | Delete
// supported, but we're keeping it in the list of class names for backwards
[22880] Fix | Delete
// compatibility.
[22881] Fix | Delete
(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.NavigableToolbar, {
[22882] Fix | Delete
className: dist_clsx('editor-document-tools', 'edit-post-header-toolbar', className),
[22883] Fix | Delete
"aria-label": toolbarAriaLabel,
[22884] Fix | Delete
variant: "unstyled",
[22885] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[22886] Fix | Delete
className: "editor-document-tools__left",
[22887] Fix | Delete
children: [!isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
[22888] Fix | Delete
ref: inserterSidebarToggleRef,
[22889] Fix | Delete
as: external_wp_components_namespaceObject.Button,
[22890] Fix | Delete
className: "editor-document-tools__inserter-toggle",
[22891] Fix | Delete
variant: "primary",
[22892] Fix | Delete
isPressed: isInserterOpened,
[22893] Fix | Delete
onMouseDown: preventDefault,
[22894] Fix | Delete
onClick: toggleInserter,
[22895] Fix | Delete
disabled: disableBlockTools,
[22896] Fix | Delete
icon: library_plus,
[22897] Fix | Delete
label: showIconLabels ? shortLabel : longLabel,
[22898] Fix | Delete
showTooltip: !showIconLabels,
[22899] Fix | Delete
"aria-expanded": isInserterOpened
[22900] Fix | Delete
}), (isWideViewport || !showIconLabels) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[22901] Fix | Delete
children: [isLargeViewport && !hasFixedToolbar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
[22902] Fix | Delete
as: external_wp_blockEditor_namespaceObject.ToolSelector,
[22903] Fix | Delete
showTooltip: !showIconLabels,
[22904] Fix | Delete
variant: showIconLabels ? 'tertiary' : undefined,
[22905] Fix | Delete
disabled: disableBlockTools,
[22906] Fix | Delete
size: "compact"
[22907] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
[22908] Fix | Delete
as: editor_history_undo,
[22909] Fix | Delete
showTooltip: !showIconLabels,
[22910] Fix | Delete
variant: showIconLabels ? 'tertiary' : undefined,
[22911] Fix | Delete
size: "compact"
[22912] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
[22913] Fix | Delete
as: editor_history_redo,
[22914] Fix | Delete
showTooltip: !showIconLabels,
[22915] Fix | Delete
variant: showIconLabels ? 'tertiary' : undefined,
[22916] Fix | Delete
size: "compact"
[22917] Fix | Delete
}), !isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
[22918] Fix | Delete
as: external_wp_components_namespaceObject.Button,
[22919] Fix | Delete
className: "editor-document-tools__document-overview-toggle",
[22920] Fix | Delete
icon: list_view,
[22921] Fix | Delete
disabled: disableBlockTools,
[22922] Fix | Delete
isPressed: isListViewOpen
[22923] Fix | Delete
/* translators: button label text should, if possible, be under 16 characters. */,
[22924] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Document Overview'),
[22925] Fix | Delete
onClick: toggleListView,
[22926] Fix | Delete
shortcut: listViewShortcut,
[22927] Fix | Delete
showTooltip: !showIconLabels,
[22928] Fix | Delete
variant: showIconLabels ? 'tertiary' : undefined,
[22929] Fix | Delete
"aria-expanded": isListViewOpen,
[22930] Fix | Delete
ref: listViewToggleRef,
[22931] Fix | Delete
size: "compact"
[22932] Fix | Delete
})]
[22933] Fix | Delete
})]
[22934] Fix | Delete
})
[22935] Fix | Delete
})
[22936] Fix | Delete
);
[22937] Fix | Delete
}
[22938] Fix | Delete
/* harmony default export */ const document_tools = (DocumentTools);
[22939] Fix | Delete
[22940] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
[22941] Fix | Delete
/**
[22942] Fix | Delete
* WordPress dependencies
[22943] Fix | Delete
*/
[22944] Fix | Delete
[22945] Fix | Delete
[22946] Fix | Delete
const moreVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[22947] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[22948] Fix | Delete
viewBox: "0 0 24 24",
[22949] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[22950] Fix | Delete
d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
[22951] Fix | Delete
})
[22952] Fix | Delete
});
[22953] Fix | Delete
/* harmony default export */ const more_vertical = (moreVertical);
[22954] Fix | Delete
[22955] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/more-menu/copy-content-menu-item.js
[22956] Fix | Delete
/**
[22957] Fix | Delete
* WordPress dependencies
[22958] Fix | Delete
*/
[22959] Fix | Delete
[22960] Fix | Delete
[22961] Fix | Delete
[22962] Fix | Delete
[22963] Fix | Delete
[22964] Fix | Delete
[22965] Fix | Delete
[22966] Fix | Delete
[22967] Fix | Delete
/**
[22968] Fix | Delete
* Internal dependencies
[22969] Fix | Delete
*/
[22970] Fix | Delete
[22971] Fix | Delete
[22972] Fix | Delete
function CopyContentMenuItem() {
[22973] Fix | Delete
const {
[22974] Fix | Delete
createNotice
[22975] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[22976] Fix | Delete
const {
[22977] Fix | Delete
getCurrentPostId,
[22978] Fix | Delete
getCurrentPostType
[22979] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store_store);
[22980] Fix | Delete
const {
[22981] Fix | Delete
getEditedEntityRecord
[22982] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store);
[22983] Fix | Delete
function getText() {
[22984] Fix | Delete
const record = getEditedEntityRecord('postType', getCurrentPostType(), getCurrentPostId());
[22985] Fix | Delete
if (!record) {
[22986] Fix | Delete
return '';
[22987] Fix | Delete
}
[22988] Fix | Delete
if (typeof record.content === 'function') {
[22989] Fix | Delete
return record.content(record);
[22990] Fix | Delete
} else if (record.blocks) {
[22991] Fix | Delete
return (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(record.blocks);
[22992] Fix | Delete
} else if (record.content) {
[22993] Fix | Delete
return record.content;
[22994] Fix | Delete
}
[22995] Fix | Delete
}
[22996] Fix | Delete
function onSuccess() {
[22997] Fix | Delete
createNotice('info', (0,external_wp_i18n_namespaceObject.__)('All content copied.'), {
[22998] Fix | Delete
isDismissible: true,
[22999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function