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
[8000] Fix | Delete
[8001] Fix | Delete
[8002] Fix | Delete
[8003] Fix | Delete
[8004] Fix | Delete
[8005] Fix | Delete
[8006] Fix | Delete
[8007] Fix | Delete
[8008] Fix | Delete
[8009] Fix | Delete
/**
[8010] Fix | Delete
* Internal dependencies
[8011] Fix | Delete
*/
[8012] Fix | Delete
[8013] Fix | Delete
[8014] Fix | Delete
[8015] Fix | Delete
[8016] Fix | Delete
[8017] Fix | Delete
const TYPE_LABELS = {
[8018] Fix | Delete
// translators: 1: Pattern title.
[8019] Fix | Delete
wp_pattern: (0,external_wp_i18n_namespaceObject.__)('Editing pattern: %s'),
[8020] Fix | Delete
// translators: 1: Navigation menu title.
[8021] Fix | Delete
wp_navigation: (0,external_wp_i18n_namespaceObject.__)('Editing navigation menu: %s'),
[8022] Fix | Delete
// translators: 1: Template title.
[8023] Fix | Delete
wp_template: (0,external_wp_i18n_namespaceObject.__)('Editing template: %s'),
[8024] Fix | Delete
// translators: 1: Template part title.
[8025] Fix | Delete
wp_template_part: (0,external_wp_i18n_namespaceObject.__)('Editing template part: %s')
[8026] Fix | Delete
};
[8027] Fix | Delete
const MotionButton = (0,external_wp_components_namespaceObject.__unstableMotion)(external_wp_components_namespaceObject.Button);
[8028] Fix | Delete
[8029] Fix | Delete
/**
[8030] Fix | Delete
* This component renders a navigation bar at the top of the editor. It displays the title of the current document,
[8031] Fix | Delete
* a back button (if applicable), and a command center button. It also handles different states of the document,
[8032] Fix | Delete
* such as "not found" or "unsynced".
[8033] Fix | Delete
*
[8034] Fix | Delete
* @example
[8035] Fix | Delete
* ```jsx
[8036] Fix | Delete
* <DocumentBar />
[8037] Fix | Delete
* ```
[8038] Fix | Delete
*
[8039] Fix | Delete
* @return {JSX.Element} The rendered DocumentBar component.
[8040] Fix | Delete
*/
[8041] Fix | Delete
function DocumentBar() {
[8042] Fix | Delete
const {
[8043] Fix | Delete
postType,
[8044] Fix | Delete
documentTitle,
[8045] Fix | Delete
isNotFound,
[8046] Fix | Delete
isUnsyncedPattern,
[8047] Fix | Delete
templateIcon,
[8048] Fix | Delete
templateTitle,
[8049] Fix | Delete
onNavigateToPreviousEntityRecord
[8050] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[8051] Fix | Delete
const {
[8052] Fix | Delete
getCurrentPostType,
[8053] Fix | Delete
getCurrentPostId,
[8054] Fix | Delete
getEditorSettings,
[8055] Fix | Delete
__experimentalGetTemplateInfo: getTemplateInfo
[8056] Fix | Delete
} = select(store_store);
[8057] Fix | Delete
const {
[8058] Fix | Delete
getEditedEntityRecord,
[8059] Fix | Delete
isResolving: isResolvingSelector
[8060] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[8061] Fix | Delete
const _postType = getCurrentPostType();
[8062] Fix | Delete
const _postId = getCurrentPostId();
[8063] Fix | Delete
const _document = getEditedEntityRecord('postType', _postType, _postId);
[8064] Fix | Delete
const _templateInfo = getTemplateInfo(_document);
[8065] Fix | Delete
return {
[8066] Fix | Delete
postType: _postType,
[8067] Fix | Delete
documentTitle: _document.title,
[8068] Fix | Delete
isNotFound: !_document && !isResolvingSelector('getEditedEntityRecord', 'postType', _postType, _postId),
[8069] Fix | Delete
isUnsyncedPattern: _document?.wp_pattern_sync_status === 'unsynced',
[8070] Fix | Delete
templateIcon: unlock(select(store_store)).getPostIcon(_postType, {
[8071] Fix | Delete
area: _document?.area
[8072] Fix | Delete
}),
[8073] Fix | Delete
templateTitle: _templateInfo.title,
[8074] Fix | Delete
onNavigateToPreviousEntityRecord: getEditorSettings().onNavigateToPreviousEntityRecord
[8075] Fix | Delete
};
[8076] Fix | Delete
}, []);
[8077] Fix | Delete
const {
[8078] Fix | Delete
open: openCommandCenter
[8079] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_commands_namespaceObject.store);
[8080] Fix | Delete
const isReducedMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
[8081] Fix | Delete
const isTemplate = TEMPLATE_POST_TYPES.includes(postType);
[8082] Fix | Delete
const isGlobalEntity = GLOBAL_POST_TYPES.includes(postType);
[8083] Fix | Delete
const hasBackButton = !!onNavigateToPreviousEntityRecord;
[8084] Fix | Delete
const title = isTemplate ? templateTitle : documentTitle;
[8085] Fix | Delete
const mounted = (0,external_wp_element_namespaceObject.useRef)(false);
[8086] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[8087] Fix | Delete
mounted.current = true;
[8088] Fix | Delete
}, []);
[8089] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[8090] Fix | Delete
className: dist_clsx('editor-document-bar', {
[8091] Fix | Delete
'has-back-button': hasBackButton,
[8092] Fix | Delete
'is-global': isGlobalEntity && !isUnsyncedPattern
[8093] Fix | Delete
}),
[8094] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
[8095] Fix | Delete
children: hasBackButton && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MotionButton, {
[8096] Fix | Delete
className: "editor-document-bar__back",
[8097] Fix | Delete
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right_small : chevron_left_small,
[8098] Fix | Delete
onClick: event => {
[8099] Fix | Delete
event.stopPropagation();
[8100] Fix | Delete
onNavigateToPreviousEntityRecord();
[8101] Fix | Delete
},
[8102] Fix | Delete
size: "compact",
[8103] Fix | Delete
initial: mounted.current ? {
[8104] Fix | Delete
opacity: 0,
[8105] Fix | Delete
transform: 'translateX(15%)'
[8106] Fix | Delete
} : false // Don't show entry animation when DocumentBar mounts.
[8107] Fix | Delete
,
[8108] Fix | Delete
animate: {
[8109] Fix | Delete
opacity: 1,
[8110] Fix | Delete
transform: 'translateX(0%)'
[8111] Fix | Delete
},
[8112] Fix | Delete
exit: {
[8113] Fix | Delete
opacity: 0,
[8114] Fix | Delete
transform: 'translateX(15%)'
[8115] Fix | Delete
},
[8116] Fix | Delete
transition: isReducedMotion ? {
[8117] Fix | Delete
duration: 0
[8118] Fix | Delete
} : undefined,
[8119] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Back')
[8120] Fix | Delete
})
[8121] Fix | Delete
}), isNotFound ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
[8122] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Document not found')
[8123] Fix | Delete
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Button, {
[8124] Fix | Delete
className: "editor-document-bar__command",
[8125] Fix | Delete
onClick: () => openCommandCenter(),
[8126] Fix | Delete
size: "compact",
[8127] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__unstableMotion.div, {
[8128] Fix | Delete
className: "editor-document-bar__title"
[8129] Fix | Delete
// Force entry animation when the back button is added or removed.
[8130] Fix | Delete
,
[8131] Fix | Delete
[8132] Fix | Delete
initial: mounted.current ? {
[8133] Fix | Delete
opacity: 0,
[8134] Fix | Delete
transform: hasBackButton ? 'translateX(15%)' : 'translateX(-15%)'
[8135] Fix | Delete
} : false // Don't show entry animation when DocumentBar mounts.
[8136] Fix | Delete
,
[8137] Fix | Delete
animate: {
[8138] Fix | Delete
opacity: 1,
[8139] Fix | Delete
transform: 'translateX(0%)'
[8140] Fix | Delete
},
[8141] Fix | Delete
transition: isReducedMotion ? {
[8142] Fix | Delete
duration: 0
[8143] Fix | Delete
} : undefined,
[8144] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
[8145] Fix | Delete
icon: templateIcon
[8146] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
[8147] Fix | Delete
size: "body",
[8148] Fix | Delete
as: "h1",
[8149] Fix | Delete
"aria-label": TYPE_LABELS[postType] ?
[8150] Fix | Delete
// eslint-disable-next-line @wordpress/valid-sprintf
[8151] Fix | Delete
(0,external_wp_i18n_namespaceObject.sprintf)(TYPE_LABELS[postType], title) : undefined,
[8152] Fix | Delete
children: title ? (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) : (0,external_wp_i18n_namespaceObject.__)('No Title')
[8153] Fix | Delete
})]
[8154] Fix | Delete
}, hasBackButton), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[8155] Fix | Delete
className: "editor-document-bar__shortcut",
[8156] Fix | Delete
children: external_wp_keycodes_namespaceObject.displayShortcut.primary('k')
[8157] Fix | Delete
})]
[8158] Fix | Delete
})]
[8159] Fix | Delete
});
[8160] Fix | Delete
}
[8161] Fix | Delete
[8162] Fix | Delete
;// CONCATENATED MODULE: external ["wp","richText"]
[8163] Fix | Delete
const external_wp_richText_namespaceObject = window["wp"]["richText"];
[8164] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/item.js
[8165] Fix | Delete
/**
[8166] Fix | Delete
* External dependencies
[8167] Fix | Delete
*/
[8168] Fix | Delete
[8169] Fix | Delete
[8170] Fix | Delete
[8171] Fix | Delete
const TableOfContentsItem = ({
[8172] Fix | Delete
children,
[8173] Fix | Delete
isValid,
[8174] Fix | Delete
level,
[8175] Fix | Delete
href,
[8176] Fix | Delete
onSelect
[8177] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
[8178] Fix | Delete
className: dist_clsx('document-outline__item', `is-${level.toLowerCase()}`, {
[8179] Fix | Delete
'is-invalid': !isValid
[8180] Fix | Delete
}),
[8181] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
[8182] Fix | Delete
href: href,
[8183] Fix | Delete
className: "document-outline__button",
[8184] Fix | Delete
onClick: onSelect,
[8185] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[8186] Fix | Delete
className: "document-outline__emdash",
[8187] Fix | Delete
"aria-hidden": "true"
[8188] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("strong", {
[8189] Fix | Delete
className: "document-outline__level",
[8190] Fix | Delete
children: level
[8191] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[8192] Fix | Delete
className: "document-outline__item-content",
[8193] Fix | Delete
children: children
[8194] Fix | Delete
})]
[8195] Fix | Delete
})
[8196] Fix | Delete
});
[8197] Fix | Delete
/* harmony default export */ const document_outline_item = (TableOfContentsItem);
[8198] Fix | Delete
[8199] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/index.js
[8200] Fix | Delete
/**
[8201] Fix | Delete
* WordPress dependencies
[8202] Fix | Delete
*/
[8203] Fix | Delete
[8204] Fix | Delete
[8205] Fix | Delete
[8206] Fix | Delete
[8207] Fix | Delete
[8208] Fix | Delete
[8209] Fix | Delete
[8210] Fix | Delete
/**
[8211] Fix | Delete
* Internal dependencies
[8212] Fix | Delete
*/
[8213] Fix | Delete
[8214] Fix | Delete
[8215] Fix | Delete
[8216] Fix | Delete
/**
[8217] Fix | Delete
* Module constants
[8218] Fix | Delete
*/
[8219] Fix | Delete
[8220] Fix | Delete
[8221] Fix | Delete
const emptyHeadingContent = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("em", {
[8222] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('(Empty heading)')
[8223] Fix | Delete
});
[8224] Fix | Delete
const incorrectLevelContent = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}, "incorrect-break"), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("em", {
[8225] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('(Incorrect heading level)')
[8226] Fix | Delete
}, "incorrect-message")];
[8227] Fix | Delete
const singleH1Headings = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}, "incorrect-break-h1"), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("em", {
[8228] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('(Your theme may already use a H1 for the post title)')
[8229] Fix | Delete
}, "incorrect-message-h1")];
[8230] Fix | Delete
const multipleH1Headings = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}, "incorrect-break-multiple-h1"), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("em", {
[8231] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('(Multiple H1 headings are not recommended)')
[8232] Fix | Delete
}, "incorrect-message-multiple-h1")];
[8233] Fix | Delete
function EmptyOutlineIllustration() {
[8234] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, {
[8235] Fix | Delete
width: "138",
[8236] Fix | Delete
height: "148",
[8237] Fix | Delete
viewBox: "0 0 138 148",
[8238] Fix | Delete
fill: "none",
[8239] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[8240] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
[8241] Fix | Delete
width: "138",
[8242] Fix | Delete
height: "148",
[8243] Fix | Delete
rx: "4",
[8244] Fix | Delete
fill: "#F0F6FC"
[8245] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Line, {
[8246] Fix | Delete
x1: "44",
[8247] Fix | Delete
y1: "28",
[8248] Fix | Delete
x2: "24",
[8249] Fix | Delete
y2: "28",
[8250] Fix | Delete
stroke: "#DDDDDD"
[8251] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
[8252] Fix | Delete
x: "48",
[8253] Fix | Delete
y: "16",
[8254] Fix | Delete
width: "27",
[8255] Fix | Delete
height: "23",
[8256] Fix | Delete
rx: "4",
[8257] Fix | Delete
fill: "#DDDDDD"
[8258] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[8259] Fix | Delete
d: "M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",
[8260] Fix | Delete
fill: "black"
[8261] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Line, {
[8262] Fix | Delete
x1: "55",
[8263] Fix | Delete
y1: "59",
[8264] Fix | Delete
x2: "24",
[8265] Fix | Delete
y2: "59",
[8266] Fix | Delete
stroke: "#DDDDDD"
[8267] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
[8268] Fix | Delete
x: "59",
[8269] Fix | Delete
y: "47",
[8270] Fix | Delete
width: "29",
[8271] Fix | Delete
height: "23",
[8272] Fix | Delete
rx: "4",
[8273] Fix | Delete
fill: "#DDDDDD"
[8274] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[8275] Fix | Delete
d: "M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",
[8276] Fix | Delete
fill: "black"
[8277] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Line, {
[8278] Fix | Delete
x1: "80",
[8279] Fix | Delete
y1: "90",
[8280] Fix | Delete
x2: "24",
[8281] Fix | Delete
y2: "90",
[8282] Fix | Delete
stroke: "#DDDDDD"
[8283] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
[8284] Fix | Delete
x: "84",
[8285] Fix | Delete
y: "78",
[8286] Fix | Delete
width: "30",
[8287] Fix | Delete
height: "23",
[8288] Fix | Delete
rx: "4",
[8289] Fix | Delete
fill: "#F0B849"
[8290] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[8291] Fix | Delete
d: "M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",
[8292] Fix | Delete
fill: "black"
[8293] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Line, {
[8294] Fix | Delete
x1: "66",
[8295] Fix | Delete
y1: "121",
[8296] Fix | Delete
x2: "24",
[8297] Fix | Delete
y2: "121",
[8298] Fix | Delete
stroke: "#DDDDDD"
[8299] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Rect, {
[8300] Fix | Delete
x: "70",
[8301] Fix | Delete
y: "109",
[8302] Fix | Delete
width: "29",
[8303] Fix | Delete
height: "23",
[8304] Fix | Delete
rx: "4",
[8305] Fix | Delete
fill: "#DDDDDD"
[8306] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[8307] Fix | Delete
d: "M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",
[8308] Fix | Delete
fill: "black"
[8309] Fix | Delete
})]
[8310] Fix | Delete
});
[8311] Fix | Delete
}
[8312] Fix | Delete
[8313] Fix | Delete
/**
[8314] Fix | Delete
* Returns an array of heading blocks enhanced with the following properties:
[8315] Fix | Delete
* level - An integer with the heading level.
[8316] Fix | Delete
* isEmpty - Flag indicating if the heading has no content.
[8317] Fix | Delete
*
[8318] Fix | Delete
* @param {?Array} blocks An array of blocks.
[8319] Fix | Delete
*
[8320] Fix | Delete
* @return {Array} An array of heading blocks enhanced with the properties described above.
[8321] Fix | Delete
*/
[8322] Fix | Delete
const computeOutlineHeadings = (blocks = []) => {
[8323] Fix | Delete
return blocks.flatMap((block = {}) => {
[8324] Fix | Delete
if (block.name === 'core/heading') {
[8325] Fix | Delete
return {
[8326] Fix | Delete
...block,
[8327] Fix | Delete
level: block.attributes.level,
[8328] Fix | Delete
isEmpty: isEmptyHeading(block)
[8329] Fix | Delete
};
[8330] Fix | Delete
}
[8331] Fix | Delete
return computeOutlineHeadings(block.innerBlocks);
[8332] Fix | Delete
});
[8333] Fix | Delete
};
[8334] Fix | Delete
const isEmptyHeading = heading => !heading.attributes.content || heading.attributes.content.trim().length === 0;
[8335] Fix | Delete
[8336] Fix | Delete
/**
[8337] Fix | Delete
* Renders a document outline component.
[8338] Fix | Delete
*
[8339] Fix | Delete
* @param {Object} props Props.
[8340] Fix | Delete
* @param {Function} props.onSelect Function to be called when an outline item is selected.
[8341] Fix | Delete
* @param {boolean} props.isTitleSupported Indicates whether the title is supported.
[8342] Fix | Delete
* @param {boolean} props.hasOutlineItemsDisabled Indicates whether the outline items are disabled.
[8343] Fix | Delete
*
[8344] Fix | Delete
* @return {Component} The component to be rendered.
[8345] Fix | Delete
*/
[8346] Fix | Delete
function DocumentOutline({
[8347] Fix | Delete
onSelect,
[8348] Fix | Delete
isTitleSupported,
[8349] Fix | Delete
hasOutlineItemsDisabled
[8350] Fix | Delete
}) {
[8351] Fix | Delete
const {
[8352] Fix | Delete
selectBlock
[8353] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
[8354] Fix | Delete
const {
[8355] Fix | Delete
blocks,
[8356] Fix | Delete
title
[8357] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[8358] Fix | Delete
var _postType$supports$ti;
[8359] Fix | Delete
const {
[8360] Fix | Delete
getBlocks
[8361] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[8362] Fix | Delete
const {
[8363] Fix | Delete
getEditedPostAttribute
[8364] Fix | Delete
} = select(store_store);
[8365] Fix | Delete
const {
[8366] Fix | Delete
getPostType
[8367] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[8368] Fix | Delete
const postType = getPostType(getEditedPostAttribute('type'));
[8369] Fix | Delete
return {
[8370] Fix | Delete
title: getEditedPostAttribute('title'),
[8371] Fix | Delete
blocks: getBlocks(),
[8372] Fix | Delete
isTitleSupported: (_postType$supports$ti = postType?.supports?.title) !== null && _postType$supports$ti !== void 0 ? _postType$supports$ti : false
[8373] Fix | Delete
};
[8374] Fix | Delete
});
[8375] Fix | Delete
const headings = computeOutlineHeadings(blocks);
[8376] Fix | Delete
if (headings.length < 1) {
[8377] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[8378] Fix | Delete
className: "editor-document-outline has-no-headings",
[8379] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EmptyOutlineIllustration, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[8380] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Navigate the structure of your document and address issues like empty or incorrect heading levels.')
[8381] Fix | Delete
})]
[8382] Fix | Delete
});
[8383] Fix | Delete
}
[8384] Fix | Delete
let prevHeadingLevel = 1;
[8385] Fix | Delete
[8386] Fix | Delete
// Not great but it's the simplest way to locate the title right now.
[8387] Fix | Delete
const titleNode = document.querySelector('.editor-post-title__input');
[8388] Fix | Delete
const hasTitle = isTitleSupported && title && titleNode;
[8389] Fix | Delete
const countByLevel = headings.reduce((acc, heading) => ({
[8390] Fix | Delete
...acc,
[8391] Fix | Delete
[heading.level]: (acc[heading.level] || 0) + 1
[8392] Fix | Delete
}), {});
[8393] Fix | Delete
const hasMultipleH1 = countByLevel[1] > 1;
[8394] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[8395] Fix | Delete
className: "document-outline",
[8396] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("ul", {
[8397] Fix | Delete
children: [hasTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(document_outline_item, {
[8398] Fix | Delete
level: (0,external_wp_i18n_namespaceObject.__)('Title'),
[8399] Fix | Delete
isValid: true,
[8400] Fix | Delete
onSelect: onSelect,
[8401] Fix | Delete
href: `#${titleNode.id}`,
[8402] Fix | Delete
isDisabled: hasOutlineItemsDisabled,
[8403] Fix | Delete
children: title
[8404] Fix | Delete
}), headings.map((item, index) => {
[8405] Fix | Delete
// Headings remain the same, go up by one, or down by any amount.
[8406] Fix | Delete
// Otherwise there are missing levels.
[8407] Fix | Delete
const isIncorrectLevel = item.level > prevHeadingLevel + 1;
[8408] Fix | Delete
const isValid = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle);
[8409] Fix | Delete
prevHeadingLevel = item.level;
[8410] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(document_outline_item, {
[8411] Fix | Delete
level: `H${item.level}`,
[8412] Fix | Delete
isValid: isValid,
[8413] Fix | Delete
isDisabled: hasOutlineItemsDisabled,
[8414] Fix | Delete
href: `#block-${item.clientId}`,
[8415] Fix | Delete
onSelect: () => {
[8416] Fix | Delete
selectBlock(item.clientId);
[8417] Fix | Delete
onSelect?.();
[8418] Fix | Delete
},
[8419] Fix | Delete
children: [item.isEmpty ? emptyHeadingContent : (0,external_wp_richText_namespaceObject.getTextContent)((0,external_wp_richText_namespaceObject.create)({
[8420] Fix | Delete
html: item.attributes.content
[8421] Fix | Delete
})), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings]
[8422] Fix | Delete
}, index);
[8423] Fix | Delete
})]
[8424] Fix | Delete
})
[8425] Fix | Delete
});
[8426] Fix | Delete
}
[8427] Fix | Delete
[8428] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/check.js
[8429] Fix | Delete
/**
[8430] Fix | Delete
* WordPress dependencies
[8431] Fix | Delete
*/
[8432] Fix | Delete
[8433] Fix | Delete
[8434] Fix | Delete
[8435] Fix | Delete
/**
[8436] Fix | Delete
* Component check if there are any headings (core/heading blocks) present in the document.
[8437] Fix | Delete
*
[8438] Fix | Delete
* @param {Object} props Props.
[8439] Fix | Delete
* @param {Element} props.children Children to be rendered.
[8440] Fix | Delete
*
[8441] Fix | Delete
* @return {Component|null} The component to be rendered or null if there are headings.
[8442] Fix | Delete
*/
[8443] Fix | Delete
function DocumentOutlineCheck({
[8444] Fix | Delete
children
[8445] Fix | Delete
}) {
[8446] Fix | Delete
const hasHeadings = (0,external_wp_data_namespaceObject.useSelect)(select => {
[8447] Fix | Delete
const {
[8448] Fix | Delete
getGlobalBlockCount
[8449] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[8450] Fix | Delete
return getGlobalBlockCount('core/heading') > 0;
[8451] Fix | Delete
});
[8452] Fix | Delete
if (hasHeadings) {
[8453] Fix | Delete
return null;
[8454] Fix | Delete
}
[8455] Fix | Delete
return children;
[8456] Fix | Delete
}
[8457] Fix | Delete
[8458] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/register-shortcuts.js
[8459] Fix | Delete
/**
[8460] Fix | Delete
* WordPress dependencies
[8461] Fix | Delete
*/
[8462] Fix | Delete
[8463] Fix | Delete
[8464] Fix | Delete
[8465] Fix | Delete
[8466] Fix | Delete
[8467] Fix | Delete
[8468] Fix | Delete
[8469] Fix | Delete
/**
[8470] Fix | Delete
* Component for registering editor keyboard shortcuts.
[8471] Fix | Delete
*
[8472] Fix | Delete
* @return {Element} The component to be rendered.
[8473] Fix | Delete
*/
[8474] Fix | Delete
[8475] Fix | Delete
function EditorKeyboardShortcutsRegister() {
[8476] Fix | Delete
// Registering the shortcuts.
[8477] Fix | Delete
const {
[8478] Fix | Delete
registerShortcut
[8479] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
[8480] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[8481] Fix | Delete
registerShortcut({
[8482] Fix | Delete
name: 'core/editor/toggle-mode',
[8483] Fix | Delete
category: 'global',
[8484] Fix | Delete
description: (0,external_wp_i18n_namespaceObject.__)('Switch between visual editor and code editor.'),
[8485] Fix | Delete
keyCombination: {
[8486] Fix | Delete
modifier: 'secondary',
[8487] Fix | Delete
character: 'm'
[8488] Fix | Delete
}
[8489] Fix | Delete
});
[8490] Fix | Delete
registerShortcut({
[8491] Fix | Delete
name: 'core/editor/save',
[8492] Fix | Delete
category: 'global',
[8493] Fix | Delete
description: (0,external_wp_i18n_namespaceObject.__)('Save your changes.'),
[8494] Fix | Delete
keyCombination: {
[8495] Fix | Delete
modifier: 'primary',
[8496] Fix | Delete
character: 's'
[8497] Fix | Delete
}
[8498] Fix | Delete
});
[8499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function