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
const {
[24500] Fix | Delete
selectBlock
[24501] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
[24502] Fix | Delete
return (0,external_wp_compose_namespaceObject.useRefEffect)(element => {
[24503] Fix | Delete
if (!isEnabled) {
[24504] Fix | Delete
return;
[24505] Fix | Delete
}
[24506] Fix | Delete
const selectNearestEditableBlock = (x, y) => {
[24507] Fix | Delete
const editableBlockClientIds = getEnabledClientIdsTree().flatMap(({
[24508] Fix | Delete
clientId
[24509] Fix | Delete
}) => {
[24510] Fix | Delete
const blockName = getBlockName(clientId);
[24511] Fix | Delete
if (blockName === 'core/template-part') {
[24512] Fix | Delete
return [];
[24513] Fix | Delete
}
[24514] Fix | Delete
if (blockName === 'core/post-content') {
[24515] Fix | Delete
const innerBlocks = getBlockOrder(clientId);
[24516] Fix | Delete
if (innerBlocks.length) {
[24517] Fix | Delete
return innerBlocks;
[24518] Fix | Delete
}
[24519] Fix | Delete
}
[24520] Fix | Delete
return [clientId];
[24521] Fix | Delete
});
[24522] Fix | Delete
let nearestDistance = Infinity,
[24523] Fix | Delete
nearestClientId = null;
[24524] Fix | Delete
for (const clientId of editableBlockClientIds) {
[24525] Fix | Delete
const block = element.querySelector(`[data-block="${clientId}"]`);
[24526] Fix | Delete
if (!block) {
[24527] Fix | Delete
continue;
[24528] Fix | Delete
}
[24529] Fix | Delete
const rect = block.getBoundingClientRect();
[24530] Fix | Delete
const distance = distanceFromRect(x, y, rect);
[24531] Fix | Delete
if (distance < nearestDistance && distance < DISTANCE_THRESHOLD) {
[24532] Fix | Delete
nearestDistance = distance;
[24533] Fix | Delete
nearestClientId = clientId;
[24534] Fix | Delete
}
[24535] Fix | Delete
}
[24536] Fix | Delete
if (nearestClientId) {
[24537] Fix | Delete
selectBlock(nearestClientId);
[24538] Fix | Delete
}
[24539] Fix | Delete
};
[24540] Fix | Delete
const handleClick = event => {
[24541] Fix | Delete
const shouldSelect = event.target === element || event.target.classList.contains('is-root-container');
[24542] Fix | Delete
if (shouldSelect) {
[24543] Fix | Delete
selectNearestEditableBlock(event.clientX, event.clientY);
[24544] Fix | Delete
}
[24545] Fix | Delete
};
[24546] Fix | Delete
element.addEventListener('click', handleClick);
[24547] Fix | Delete
return () => element.removeEventListener('click', handleClick);
[24548] Fix | Delete
}, [isEnabled]);
[24549] Fix | Delete
}
[24550] Fix | Delete
[24551] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/visual-editor/index.js
[24552] Fix | Delete
/**
[24553] Fix | Delete
* External dependencies
[24554] Fix | Delete
*/
[24555] Fix | Delete
[24556] Fix | Delete
[24557] Fix | Delete
/**
[24558] Fix | Delete
* WordPress dependencies
[24559] Fix | Delete
*/
[24560] Fix | Delete
[24561] Fix | Delete
[24562] Fix | Delete
[24563] Fix | Delete
[24564] Fix | Delete
[24565] Fix | Delete
[24566] Fix | Delete
[24567] Fix | Delete
/**
[24568] Fix | Delete
* Internal dependencies
[24569] Fix | Delete
*/
[24570] Fix | Delete
[24571] Fix | Delete
[24572] Fix | Delete
[24573] Fix | Delete
[24574] Fix | Delete
[24575] Fix | Delete
[24576] Fix | Delete
[24577] Fix | Delete
[24578] Fix | Delete
[24579] Fix | Delete
[24580] Fix | Delete
const {
[24581] Fix | Delete
LayoutStyle,
[24582] Fix | Delete
useLayoutClasses,
[24583] Fix | Delete
useLayoutStyles,
[24584] Fix | Delete
ExperimentalBlockCanvas: BlockCanvas,
[24585] Fix | Delete
useFlashEditableBlocks
[24586] Fix | Delete
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
[24587] Fix | Delete
[24588] Fix | Delete
/**
[24589] Fix | Delete
* These post types have a special editor where they don't allow you to fill the title
[24590] Fix | Delete
* and they don't apply the layout styles.
[24591] Fix | Delete
*/
[24592] Fix | Delete
const visual_editor_DESIGN_POST_TYPES = [PATTERN_POST_TYPE, TEMPLATE_POST_TYPE, NAVIGATION_POST_TYPE, TEMPLATE_PART_POST_TYPE];
[24593] Fix | Delete
[24594] Fix | Delete
/**
[24595] Fix | Delete
* Given an array of nested blocks, find the first Post Content
[24596] Fix | Delete
* block inside it, recursing through any nesting levels,
[24597] Fix | Delete
* and return its attributes.
[24598] Fix | Delete
*
[24599] Fix | Delete
* @param {Array} blocks A list of blocks.
[24600] Fix | Delete
*
[24601] Fix | Delete
* @return {Object | undefined} The Post Content block.
[24602] Fix | Delete
*/
[24603] Fix | Delete
function getPostContentAttributes(blocks) {
[24604] Fix | Delete
for (let i = 0; i < blocks.length; i++) {
[24605] Fix | Delete
if (blocks[i].name === 'core/post-content') {
[24606] Fix | Delete
return blocks[i].attributes;
[24607] Fix | Delete
}
[24608] Fix | Delete
if (blocks[i].innerBlocks.length) {
[24609] Fix | Delete
const nestedPostContent = getPostContentAttributes(blocks[i].innerBlocks);
[24610] Fix | Delete
if (nestedPostContent) {
[24611] Fix | Delete
return nestedPostContent;
[24612] Fix | Delete
}
[24613] Fix | Delete
}
[24614] Fix | Delete
}
[24615] Fix | Delete
}
[24616] Fix | Delete
function checkForPostContentAtRootLevel(blocks) {
[24617] Fix | Delete
for (let i = 0; i < blocks.length; i++) {
[24618] Fix | Delete
if (blocks[i].name === 'core/post-content') {
[24619] Fix | Delete
return true;
[24620] Fix | Delete
}
[24621] Fix | Delete
}
[24622] Fix | Delete
return false;
[24623] Fix | Delete
}
[24624] Fix | Delete
function VisualEditor({
[24625] Fix | Delete
// Ideally as we unify post and site editors, we won't need these props.
[24626] Fix | Delete
autoFocus,
[24627] Fix | Delete
styles,
[24628] Fix | Delete
disableIframe = false,
[24629] Fix | Delete
iframeProps,
[24630] Fix | Delete
contentRef,
[24631] Fix | Delete
className
[24632] Fix | Delete
}) {
[24633] Fix | Delete
const [resizeObserver, sizes] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
[24634] Fix | Delete
const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('small', '<');
[24635] Fix | Delete
const {
[24636] Fix | Delete
renderingMode,
[24637] Fix | Delete
postContentAttributes,
[24638] Fix | Delete
editedPostTemplate = {},
[24639] Fix | Delete
wrapperBlockName,
[24640] Fix | Delete
wrapperUniqueId,
[24641] Fix | Delete
deviceType,
[24642] Fix | Delete
isFocusedEntity,
[24643] Fix | Delete
isDesignPostType,
[24644] Fix | Delete
postType,
[24645] Fix | Delete
isPreview
[24646] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[24647] Fix | Delete
const {
[24648] Fix | Delete
getCurrentPostId,
[24649] Fix | Delete
getCurrentPostType,
[24650] Fix | Delete
getCurrentTemplateId,
[24651] Fix | Delete
getEditorSettings,
[24652] Fix | Delete
getRenderingMode,
[24653] Fix | Delete
getDeviceType
[24654] Fix | Delete
} = select(store_store);
[24655] Fix | Delete
const {
[24656] Fix | Delete
getPostType,
[24657] Fix | Delete
canUser,
[24658] Fix | Delete
getEditedEntityRecord
[24659] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[24660] Fix | Delete
const postTypeSlug = getCurrentPostType();
[24661] Fix | Delete
const _renderingMode = getRenderingMode();
[24662] Fix | Delete
let _wrapperBlockName;
[24663] Fix | Delete
if (postTypeSlug === PATTERN_POST_TYPE) {
[24664] Fix | Delete
_wrapperBlockName = 'core/block';
[24665] Fix | Delete
} else if (_renderingMode === 'post-only') {
[24666] Fix | Delete
_wrapperBlockName = 'core/post-content';
[24667] Fix | Delete
}
[24668] Fix | Delete
const editorSettings = getEditorSettings();
[24669] Fix | Delete
const supportsTemplateMode = editorSettings.supportsTemplateMode;
[24670] Fix | Delete
const postTypeObject = getPostType(postTypeSlug);
[24671] Fix | Delete
const canEditTemplate = canUser('create', 'templates');
[24672] Fix | Delete
const currentTemplateId = getCurrentTemplateId();
[24673] Fix | Delete
const template = currentTemplateId ? getEditedEntityRecord('postType', TEMPLATE_POST_TYPE, currentTemplateId) : undefined;
[24674] Fix | Delete
return {
[24675] Fix | Delete
renderingMode: _renderingMode,
[24676] Fix | Delete
postContentAttributes: editorSettings.postContentAttributes,
[24677] Fix | Delete
isDesignPostType: visual_editor_DESIGN_POST_TYPES.includes(postTypeSlug),
[24678] Fix | Delete
// Post template fetch returns a 404 on classic themes, which
[24679] Fix | Delete
// messes with e2e tests, so check it's a block theme first.
[24680] Fix | Delete
editedPostTemplate: postTypeObject?.viewable && supportsTemplateMode && canEditTemplate ? template : undefined,
[24681] Fix | Delete
wrapperBlockName: _wrapperBlockName,
[24682] Fix | Delete
wrapperUniqueId: getCurrentPostId(),
[24683] Fix | Delete
deviceType: getDeviceType(),
[24684] Fix | Delete
isFocusedEntity: !!editorSettings.onNavigateToPreviousEntityRecord,
[24685] Fix | Delete
postType: postTypeSlug,
[24686] Fix | Delete
isPreview: editorSettings.__unstableIsPreviewMode
[24687] Fix | Delete
};
[24688] Fix | Delete
}, []);
[24689] Fix | Delete
const {
[24690] Fix | Delete
isCleanNewPost
[24691] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store_store);
[24692] Fix | Delete
const {
[24693] Fix | Delete
hasRootPaddingAwareAlignments,
[24694] Fix | Delete
themeHasDisabledLayoutStyles,
[24695] Fix | Delete
themeSupportsLayout,
[24696] Fix | Delete
isZoomOutMode
[24697] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[24698] Fix | Delete
const {
[24699] Fix | Delete
getSettings,
[24700] Fix | Delete
__unstableGetEditorMode
[24701] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[24702] Fix | Delete
const _settings = getSettings();
[24703] Fix | Delete
return {
[24704] Fix | Delete
themeHasDisabledLayoutStyles: _settings.disableLayoutStyles,
[24705] Fix | Delete
themeSupportsLayout: _settings.supportsLayout,
[24706] Fix | Delete
hasRootPaddingAwareAlignments: _settings.__experimentalFeatures?.useRootPaddingAwareAlignments,
[24707] Fix | Delete
isZoomOutMode: __unstableGetEditorMode() === 'zoom-out'
[24708] Fix | Delete
};
[24709] Fix | Delete
}, []);
[24710] Fix | Delete
const deviceStyles = (0,external_wp_blockEditor_namespaceObject.__experimentalUseResizeCanvas)(deviceType);
[24711] Fix | Delete
const [globalLayoutSettings] = (0,external_wp_blockEditor_namespaceObject.useSettings)('layout');
[24712] Fix | Delete
[24713] Fix | Delete
// fallbackLayout is used if there is no Post Content,
[24714] Fix | Delete
// and for Post Title.
[24715] Fix | Delete
const fallbackLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
[24716] Fix | Delete
if (renderingMode !== 'post-only' || isDesignPostType) {
[24717] Fix | Delete
return {
[24718] Fix | Delete
type: 'default'
[24719] Fix | Delete
};
[24720] Fix | Delete
}
[24721] Fix | Delete
if (themeSupportsLayout) {
[24722] Fix | Delete
// We need to ensure support for wide and full alignments,
[24723] Fix | Delete
// so we add the constrained type.
[24724] Fix | Delete
return {
[24725] Fix | Delete
...globalLayoutSettings,
[24726] Fix | Delete
type: 'constrained'
[24727] Fix | Delete
};
[24728] Fix | Delete
}
[24729] Fix | Delete
// Set default layout for classic themes so all alignments are supported.
[24730] Fix | Delete
return {
[24731] Fix | Delete
type: 'default'
[24732] Fix | Delete
};
[24733] Fix | Delete
}, [renderingMode, themeSupportsLayout, globalLayoutSettings, isDesignPostType]);
[24734] Fix | Delete
const newestPostContentAttributes = (0,external_wp_element_namespaceObject.useMemo)(() => {
[24735] Fix | Delete
if (!editedPostTemplate?.content && !editedPostTemplate?.blocks && postContentAttributes) {
[24736] Fix | Delete
return postContentAttributes;
[24737] Fix | Delete
}
[24738] Fix | Delete
// When in template editing mode, we can access the blocks directly.
[24739] Fix | Delete
if (editedPostTemplate?.blocks) {
[24740] Fix | Delete
return getPostContentAttributes(editedPostTemplate?.blocks);
[24741] Fix | Delete
}
[24742] Fix | Delete
// If there are no blocks, we have to parse the content string.
[24743] Fix | Delete
// Best double-check it's a string otherwise the parse function gets unhappy.
[24744] Fix | Delete
const parseableContent = typeof editedPostTemplate?.content === 'string' ? editedPostTemplate?.content : '';
[24745] Fix | Delete
return getPostContentAttributes((0,external_wp_blocks_namespaceObject.parse)(parseableContent)) || {};
[24746] Fix | Delete
}, [editedPostTemplate?.content, editedPostTemplate?.blocks, postContentAttributes]);
[24747] Fix | Delete
const hasPostContentAtRootLevel = (0,external_wp_element_namespaceObject.useMemo)(() => {
[24748] Fix | Delete
if (!editedPostTemplate?.content && !editedPostTemplate?.blocks) {
[24749] Fix | Delete
return false;
[24750] Fix | Delete
}
[24751] Fix | Delete
// When in template editing mode, we can access the blocks directly.
[24752] Fix | Delete
if (editedPostTemplate?.blocks) {
[24753] Fix | Delete
return checkForPostContentAtRootLevel(editedPostTemplate?.blocks);
[24754] Fix | Delete
}
[24755] Fix | Delete
// If there are no blocks, we have to parse the content string.
[24756] Fix | Delete
// Best double-check it's a string otherwise the parse function gets unhappy.
[24757] Fix | Delete
const parseableContent = typeof editedPostTemplate?.content === 'string' ? editedPostTemplate?.content : '';
[24758] Fix | Delete
return checkForPostContentAtRootLevel((0,external_wp_blocks_namespaceObject.parse)(parseableContent)) || false;
[24759] Fix | Delete
}, [editedPostTemplate?.content, editedPostTemplate?.blocks]);
[24760] Fix | Delete
const {
[24761] Fix | Delete
layout = {},
[24762] Fix | Delete
align = ''
[24763] Fix | Delete
} = newestPostContentAttributes || {};
[24764] Fix | Delete
const postContentLayoutClasses = useLayoutClasses(newestPostContentAttributes, 'core/post-content');
[24765] Fix | Delete
const blockListLayoutClass = dist_clsx({
[24766] Fix | Delete
'is-layout-flow': !themeSupportsLayout
[24767] Fix | Delete
}, themeSupportsLayout && postContentLayoutClasses, align && `align${align}`);
[24768] Fix | Delete
const postContentLayoutStyles = useLayoutStyles(newestPostContentAttributes, 'core/post-content', '.block-editor-block-list__layout.is-root-container');
[24769] Fix | Delete
[24770] Fix | Delete
// Update type for blocks using legacy layouts.
[24771] Fix | Delete
const postContentLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
[24772] Fix | Delete
return layout && (layout?.type === 'constrained' || layout?.inherit || layout?.contentSize || layout?.wideSize) ? {
[24773] Fix | Delete
...globalLayoutSettings,
[24774] Fix | Delete
...layout,
[24775] Fix | Delete
type: 'constrained'
[24776] Fix | Delete
} : {
[24777] Fix | Delete
...globalLayoutSettings,
[24778] Fix | Delete
...layout,
[24779] Fix | Delete
type: 'default'
[24780] Fix | Delete
};
[24781] Fix | Delete
}, [layout?.type, layout?.inherit, layout?.contentSize, layout?.wideSize, globalLayoutSettings]);
[24782] Fix | Delete
[24783] Fix | Delete
// If there is a Post Content block we use its layout for the block list;
[24784] Fix | Delete
// if not, this must be a classic theme, in which case we use the fallback layout.
[24785] Fix | Delete
const blockListLayout = postContentAttributes ? postContentLayout : fallbackLayout;
[24786] Fix | Delete
const postEditorLayout = blockListLayout?.type === 'default' && !hasPostContentAtRootLevel ? fallbackLayout : blockListLayout;
[24787] Fix | Delete
const observeTypingRef = (0,external_wp_blockEditor_namespaceObject.__unstableUseTypingObserver)();
[24788] Fix | Delete
const titleRef = (0,external_wp_element_namespaceObject.useRef)();
[24789] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[24790] Fix | Delete
if (!autoFocus || !isCleanNewPost()) {
[24791] Fix | Delete
return;
[24792] Fix | Delete
}
[24793] Fix | Delete
titleRef?.current?.focus();
[24794] Fix | Delete
}, [autoFocus, isCleanNewPost]);
[24795] Fix | Delete
[24796] Fix | Delete
// Add some styles for alignwide/alignfull Post Content and its children.
[24797] Fix | Delete
const alignCSS = `.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
[24798] Fix | Delete
.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
[24799] Fix | Delete
.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
[24800] Fix | Delete
.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`;
[24801] Fix | Delete
const localRef = (0,external_wp_element_namespaceObject.useRef)();
[24802] Fix | Delete
const typewriterRef = (0,external_wp_blockEditor_namespaceObject.__unstableUseTypewriter)();
[24803] Fix | Delete
contentRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([localRef, contentRef, renderingMode === 'post-only' ? typewriterRef : null, useFlashEditableBlocks({
[24804] Fix | Delete
isEnabled: renderingMode === 'template-locked'
[24805] Fix | Delete
}), useSelectNearestEditableBlock({
[24806] Fix | Delete
isEnabled: renderingMode === 'template-locked'
[24807] Fix | Delete
})]);
[24808] Fix | Delete
const zoomOutProps = isZoomOutMode ? {
[24809] Fix | Delete
scale: 'default',
[24810] Fix | Delete
frameSize: '20px'
[24811] Fix | Delete
} : {};
[24812] Fix | Delete
const forceFullHeight = postType === NAVIGATION_POST_TYPE;
[24813] Fix | Delete
const enableResizing = [NAVIGATION_POST_TYPE, TEMPLATE_PART_POST_TYPE, PATTERN_POST_TYPE].includes(postType) &&
[24814] Fix | Delete
// Disable in previews / view mode.
[24815] Fix | Delete
!isPreview &&
[24816] Fix | Delete
// Disable resizing in mobile viewport.
[24817] Fix | Delete
!isMobileViewport &&
[24818] Fix | Delete
// Dsiable resizing in zoomed-out mode.
[24819] Fix | Delete
!isZoomOutMode;
[24820] Fix | Delete
const shouldIframe = !disableIframe || ['Tablet', 'Mobile'].includes(deviceType);
[24821] Fix | Delete
const iframeStyles = (0,external_wp_element_namespaceObject.useMemo)(() => {
[24822] Fix | Delete
return [...(styles !== null && styles !== void 0 ? styles : []), {
[24823] Fix | Delete
css: `.is-root-container{display:flow-root;${
[24824] Fix | Delete
// Some themes will have `min-height: 100vh` for the root container,
[24825] Fix | Delete
// which isn't a requirement in auto resize mode.
[24826] Fix | Delete
enableResizing ? 'min-height:0!important;' : ''}}`
[24827] Fix | Delete
}];
[24828] Fix | Delete
}, [styles, enableResizing]);
[24829] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[24830] Fix | Delete
className: dist_clsx('editor-visual-editor',
[24831] Fix | Delete
// this class is here for backward compatibility reasons.
[24832] Fix | Delete
'edit-post-visual-editor', className, {
[24833] Fix | Delete
'has-padding': isFocusedEntity || enableResizing,
[24834] Fix | Delete
'is-resizable': enableResizing,
[24835] Fix | Delete
'is-iframed': shouldIframe
[24836] Fix | Delete
}),
[24837] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(resizable_editor, {
[24838] Fix | Delete
enableResizing: enableResizing,
[24839] Fix | Delete
height: sizes.height && !forceFullHeight ? sizes.height : '100%',
[24840] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(BlockCanvas, {
[24841] Fix | Delete
shouldIframe: shouldIframe,
[24842] Fix | Delete
contentRef: contentRef,
[24843] Fix | Delete
styles: iframeStyles,
[24844] Fix | Delete
height: "100%",
[24845] Fix | Delete
iframeProps: {
[24846] Fix | Delete
...iframeProps,
[24847] Fix | Delete
...zoomOutProps,
[24848] Fix | Delete
style: {
[24849] Fix | Delete
...iframeProps?.style,
[24850] Fix | Delete
...deviceStyles
[24851] Fix | Delete
}
[24852] Fix | Delete
},
[24853] Fix | Delete
children: [themeSupportsLayout && !themeHasDisabledLayoutStyles && renderingMode === 'post-only' && !isDesignPostType && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[24854] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LayoutStyle, {
[24855] Fix | Delete
selector: ".editor-visual-editor__post-title-wrapper",
[24856] Fix | Delete
layout: fallbackLayout
[24857] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LayoutStyle, {
[24858] Fix | Delete
selector: ".block-editor-block-list__layout.is-root-container",
[24859] Fix | Delete
layout: postEditorLayout
[24860] Fix | Delete
}), align && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LayoutStyle, {
[24861] Fix | Delete
css: alignCSS
[24862] Fix | Delete
}), postContentLayoutStyles && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LayoutStyle, {
[24863] Fix | Delete
layout: postContentLayout,
[24864] Fix | Delete
css: postContentLayoutStyles
[24865] Fix | Delete
})]
[24866] Fix | Delete
}), renderingMode === 'post-only' && !isDesignPostType && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[24867] Fix | Delete
className: dist_clsx('editor-visual-editor__post-title-wrapper',
[24868] Fix | Delete
// The following class is only here for backward comapatibility
[24869] Fix | Delete
// some themes might be using it to style the post title.
[24870] Fix | Delete
'edit-post-visual-editor__post-title-wrapper', {
[24871] Fix | Delete
'has-global-padding': hasRootPaddingAwareAlignments
[24872] Fix | Delete
}),
[24873] Fix | Delete
contentEditable: false,
[24874] Fix | Delete
ref: observeTypingRef,
[24875] Fix | Delete
style: {
[24876] Fix | Delete
// This is using inline styles
[24877] Fix | Delete
// so it's applied for both iframed and non iframed editors.
[24878] Fix | Delete
marginTop: '4rem'
[24879] Fix | Delete
},
[24880] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_title, {
[24881] Fix | Delete
ref: titleRef
[24882] Fix | Delete
})
[24883] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.RecursionProvider, {
[24884] Fix | Delete
blockName: wrapperBlockName,
[24885] Fix | Delete
uniqueId: wrapperUniqueId,
[24886] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, {
[24887] Fix | Delete
className: dist_clsx('is-' + deviceType.toLowerCase() + '-preview', renderingMode !== 'post-only' || isDesignPostType ? 'wp-site-blocks' : `${blockListLayoutClass} wp-block-post-content` // Ensure root level blocks receive default/flow blockGap styling rules.
[24888] Fix | Delete
),
[24889] Fix | Delete
layout: blockListLayout,
[24890] Fix | Delete
dropZoneElement:
[24891] Fix | Delete
// When iframed, pass in the html element of the iframe to
[24892] Fix | Delete
// ensure the drop zone extends to the edges of the iframe.
[24893] Fix | Delete
disableIframe ? localRef.current : localRef.current?.parentNode,
[24894] Fix | Delete
__unstableDisableDropZone:
[24895] Fix | Delete
// In template preview mode, disable drop zones at the root of the template.
[24896] Fix | Delete
renderingMode === 'template-locked' ? true : false
[24897] Fix | Delete
}), renderingMode === 'template-locked' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditTemplateBlocksNotification, {
[24898] Fix | Delete
contentRef: localRef
[24899] Fix | Delete
})]
[24900] Fix | Delete
}),
[24901] Fix | Delete
// Avoid resize listeners when not needed,
[24902] Fix | Delete
// these will trigger unnecessary re-renders
[24903] Fix | Delete
// when animating the iframe width.
[24904] Fix | Delete
enableResizing && resizeObserver]
[24905] Fix | Delete
})
[24906] Fix | Delete
})
[24907] Fix | Delete
});
[24908] Fix | Delete
}
[24909] Fix | Delete
/* harmony default export */ const visual_editor = (VisualEditor);
[24910] Fix | Delete
[24911] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-interface/index.js
[24912] Fix | Delete
/**
[24913] Fix | Delete
* External dependencies
[24914] Fix | Delete
*/
[24915] Fix | Delete
[24916] Fix | Delete
[24917] Fix | Delete
/**
[24918] Fix | Delete
* WordPress dependencies
[24919] Fix | Delete
*/
[24920] Fix | Delete
[24921] Fix | Delete
[24922] Fix | Delete
[24923] Fix | Delete
[24924] Fix | Delete
[24925] Fix | Delete
[24926] Fix | Delete
[24927] Fix | Delete
[24928] Fix | Delete
[24929] Fix | Delete
/**
[24930] Fix | Delete
* Internal dependencies
[24931] Fix | Delete
*/
[24932] Fix | Delete
[24933] Fix | Delete
[24934] Fix | Delete
[24935] Fix | Delete
[24936] Fix | Delete
[24937] Fix | Delete
[24938] Fix | Delete
[24939] Fix | Delete
[24940] Fix | Delete
[24941] Fix | Delete
[24942] Fix | Delete
[24943] Fix | Delete
[24944] Fix | Delete
const interfaceLabels = {
[24945] Fix | Delete
/* translators: accessibility text for the editor top bar landmark region. */
[24946] Fix | Delete
header: (0,external_wp_i18n_namespaceObject.__)('Editor top bar'),
[24947] Fix | Delete
/* translators: accessibility text for the editor content landmark region. */
[24948] Fix | Delete
body: (0,external_wp_i18n_namespaceObject.__)('Editor content'),
[24949] Fix | Delete
/* translators: accessibility text for the editor settings landmark region. */
[24950] Fix | Delete
sidebar: (0,external_wp_i18n_namespaceObject.__)('Editor settings'),
[24951] Fix | Delete
/* translators: accessibility text for the editor publish landmark region. */
[24952] Fix | Delete
actions: (0,external_wp_i18n_namespaceObject.__)('Editor publish'),
[24953] Fix | Delete
/* translators: accessibility text for the editor footer landmark region. */
[24954] Fix | Delete
footer: (0,external_wp_i18n_namespaceObject.__)('Editor footer')
[24955] Fix | Delete
};
[24956] Fix | Delete
function EditorInterface({
[24957] Fix | Delete
className,
[24958] Fix | Delete
enableRegionNavigation,
[24959] Fix | Delete
styles,
[24960] Fix | Delete
children,
[24961] Fix | Delete
forceIsDirty,
[24962] Fix | Delete
contentRef,
[24963] Fix | Delete
disableIframe,
[24964] Fix | Delete
autoFocus,
[24965] Fix | Delete
customSaveButton,
[24966] Fix | Delete
customSavePanel,
[24967] Fix | Delete
forceDisableBlockTools,
[24968] Fix | Delete
title,
[24969] Fix | Delete
iframeProps
[24970] Fix | Delete
}) {
[24971] Fix | Delete
const {
[24972] Fix | Delete
mode,
[24973] Fix | Delete
isRichEditingEnabled,
[24974] Fix | Delete
isInserterOpened,
[24975] Fix | Delete
isListViewOpened,
[24976] Fix | Delete
isDistractionFree,
[24977] Fix | Delete
isPreviewMode,
[24978] Fix | Delete
previousShortcut,
[24979] Fix | Delete
nextShortcut,
[24980] Fix | Delete
showBlockBreadcrumbs,
[24981] Fix | Delete
documentLabel,
[24982] Fix | Delete
blockEditorMode
[24983] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[24984] Fix | Delete
const {
[24985] Fix | Delete
get
[24986] Fix | Delete
} = select(external_wp_preferences_namespaceObject.store);
[24987] Fix | Delete
const {
[24988] Fix | Delete
getEditorSettings,
[24989] Fix | Delete
getPostTypeLabel
[24990] Fix | Delete
} = select(store_store);
[24991] Fix | Delete
const editorSettings = getEditorSettings();
[24992] Fix | Delete
const postTypeLabel = getPostTypeLabel();
[24993] Fix | Delete
return {
[24994] Fix | Delete
mode: select(store_store).getEditorMode(),
[24995] Fix | Delete
isRichEditingEnabled: editorSettings.richEditingEnabled,
[24996] Fix | Delete
isInserterOpened: select(store_store).isInserterOpened(),
[24997] Fix | Delete
isListViewOpened: select(store_store).isListViewOpened(),
[24998] Fix | Delete
isDistractionFree: get('core', 'distractionFree'),
[24999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function