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
onUpdate((0,external_wp_richText_namespaceObject.toHTMLString)({
[18000] Fix | Delete
value: newValue
[18001] Fix | Delete
}));
[18002] Fix | Delete
setSelection({
[18003] Fix | Delete
start: newValue.start,
[18004] Fix | Delete
end: newValue.end
[18005] Fix | Delete
});
[18006] Fix | Delete
}
[18007] Fix | Delete
}
[18008] Fix | Delete
const decodedPlaceholder = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(placeholder) || (0,external_wp_i18n_namespaceObject.__)('Add title');
[18009] Fix | Delete
const {
[18010] Fix | Delete
ref: richTextRef
[18011] Fix | Delete
} = (0,external_wp_richText_namespaceObject.__unstableUseRichText)({
[18012] Fix | Delete
value: title,
[18013] Fix | Delete
onChange,
[18014] Fix | Delete
placeholder: decodedPlaceholder,
[18015] Fix | Delete
selectionStart: selection.start,
[18016] Fix | Delete
selectionEnd: selection.end,
[18017] Fix | Delete
onSelectionChange(newStart, newEnd) {
[18018] Fix | Delete
setSelection(sel => {
[18019] Fix | Delete
const {
[18020] Fix | Delete
start,
[18021] Fix | Delete
end
[18022] Fix | Delete
} = sel;
[18023] Fix | Delete
if (start === newStart && end === newEnd) {
[18024] Fix | Delete
return sel;
[18025] Fix | Delete
}
[18026] Fix | Delete
return {
[18027] Fix | Delete
start: newStart,
[18028] Fix | Delete
end: newEnd
[18029] Fix | Delete
};
[18030] Fix | Delete
});
[18031] Fix | Delete
},
[18032] Fix | Delete
__unstableDisableFormats: false
[18033] Fix | Delete
});
[18034] Fix | Delete
[18035] Fix | Delete
// The wp-block className is important for editor styles.
[18036] Fix | Delete
// This same block is used in both the visual and the code editor.
[18037] Fix | Delete
const className = dist_clsx(DEFAULT_CLASSNAMES, {
[18038] Fix | Delete
'is-selected': isSelected,
[18039] Fix | Delete
'has-fixed-toolbar': hasFixedToolbar
[18040] Fix | Delete
});
[18041] Fix | Delete
return (
[18042] Fix | Delete
/*#__PURE__*/
[18043] Fix | Delete
/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
[18044] Fix | Delete
(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_type_support_check, {
[18045] Fix | Delete
supportKeys: "title",
[18046] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
[18047] Fix | Delete
ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([richTextRef, focusRef]),
[18048] Fix | Delete
contentEditable: true,
[18049] Fix | Delete
className: className,
[18050] Fix | Delete
"aria-label": decodedPlaceholder,
[18051] Fix | Delete
role: "textbox",
[18052] Fix | Delete
"aria-multiline": "true",
[18053] Fix | Delete
onFocus: onSelect,
[18054] Fix | Delete
onBlur: onUnselect,
[18055] Fix | Delete
onKeyDown: onKeyDown,
[18056] Fix | Delete
onKeyPress: onUnselect,
[18057] Fix | Delete
onPaste: onPaste
[18058] Fix | Delete
})
[18059] Fix | Delete
})
[18060] Fix | Delete
/* eslint-enable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */
[18061] Fix | Delete
);
[18062] Fix | Delete
}
[18063] Fix | Delete
[18064] Fix | Delete
/**
[18065] Fix | Delete
* Renders the `PostTitle` component.
[18066] Fix | Delete
*
[18067] Fix | Delete
* @param {Object} _ Unused parameter.
[18068] Fix | Delete
* @param {Element} forwardedRef Forwarded ref for the component.
[18069] Fix | Delete
*
[18070] Fix | Delete
* @return {Component} The rendered PostTitle component.
[18071] Fix | Delete
*/
[18072] Fix | Delete
/* harmony default export */ const post_title = ((0,external_wp_element_namespaceObject.forwardRef)(PostTitle));
[18073] Fix | Delete
[18074] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-title/post-title-raw.js
[18075] Fix | Delete
/**
[18076] Fix | Delete
* External dependencies
[18077] Fix | Delete
*/
[18078] Fix | Delete
[18079] Fix | Delete
[18080] Fix | Delete
/**
[18081] Fix | Delete
* WordPress dependencies
[18082] Fix | Delete
*/
[18083] Fix | Delete
[18084] Fix | Delete
[18085] Fix | Delete
[18086] Fix | Delete
[18087] Fix | Delete
[18088] Fix | Delete
[18089] Fix | Delete
[18090] Fix | Delete
/**
[18091] Fix | Delete
* Internal dependencies
[18092] Fix | Delete
*/
[18093] Fix | Delete
[18094] Fix | Delete
[18095] Fix | Delete
[18096] Fix | Delete
[18097] Fix | Delete
/**
[18098] Fix | Delete
* Renders a raw post title input field.
[18099] Fix | Delete
*
[18100] Fix | Delete
* @param {Object} _ Unused parameter.
[18101] Fix | Delete
* @param {Element} forwardedRef Reference to the component's DOM node.
[18102] Fix | Delete
*
[18103] Fix | Delete
* @return {Component} The rendered component.
[18104] Fix | Delete
*/
[18105] Fix | Delete
[18106] Fix | Delete
function PostTitleRaw(_, forwardedRef) {
[18107] Fix | Delete
const {
[18108] Fix | Delete
placeholder,
[18109] Fix | Delete
hasFixedToolbar
[18110] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[18111] Fix | Delete
const {
[18112] Fix | Delete
getSettings
[18113] Fix | Delete
} = select(external_wp_blockEditor_namespaceObject.store);
[18114] Fix | Delete
const {
[18115] Fix | Delete
titlePlaceholder,
[18116] Fix | Delete
hasFixedToolbar: _hasFixedToolbar
[18117] Fix | Delete
} = getSettings();
[18118] Fix | Delete
return {
[18119] Fix | Delete
placeholder: titlePlaceholder,
[18120] Fix | Delete
hasFixedToolbar: _hasFixedToolbar
[18121] Fix | Delete
};
[18122] Fix | Delete
}, []);
[18123] Fix | Delete
const [isSelected, setIsSelected] = (0,external_wp_element_namespaceObject.useState)(false);
[18124] Fix | Delete
const {
[18125] Fix | Delete
title,
[18126] Fix | Delete
setTitle: onUpdate
[18127] Fix | Delete
} = usePostTitle();
[18128] Fix | Delete
const {
[18129] Fix | Delete
ref: focusRef
[18130] Fix | Delete
} = usePostTitleFocus(forwardedRef);
[18131] Fix | Delete
function onChange(value) {
[18132] Fix | Delete
onUpdate(value.replace(REGEXP_NEWLINES, ' '));
[18133] Fix | Delete
}
[18134] Fix | Delete
function onSelect() {
[18135] Fix | Delete
setIsSelected(true);
[18136] Fix | Delete
}
[18137] Fix | Delete
function onUnselect() {
[18138] Fix | Delete
setIsSelected(false);
[18139] Fix | Delete
}
[18140] Fix | Delete
[18141] Fix | Delete
// The wp-block className is important for editor styles.
[18142] Fix | Delete
// This same block is used in both the visual and the code editor.
[18143] Fix | Delete
const className = dist_clsx(DEFAULT_CLASSNAMES, {
[18144] Fix | Delete
'is-selected': isSelected,
[18145] Fix | Delete
'has-fixed-toolbar': hasFixedToolbar,
[18146] Fix | Delete
'is-raw-text': true
[18147] Fix | Delete
});
[18148] Fix | Delete
const decodedPlaceholder = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(placeholder) || (0,external_wp_i18n_namespaceObject.__)('Add title');
[18149] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextareaControl, {
[18150] Fix | Delete
ref: focusRef,
[18151] Fix | Delete
value: title,
[18152] Fix | Delete
onChange: onChange,
[18153] Fix | Delete
onFocus: onSelect,
[18154] Fix | Delete
onBlur: onUnselect,
[18155] Fix | Delete
label: placeholder,
[18156] Fix | Delete
className: className,
[18157] Fix | Delete
placeholder: decodedPlaceholder,
[18158] Fix | Delete
hideLabelFromVision: true,
[18159] Fix | Delete
autoComplete: "off",
[18160] Fix | Delete
dir: "auto",
[18161] Fix | Delete
rows: 1,
[18162] Fix | Delete
__nextHasNoMarginBottom: true
[18163] Fix | Delete
});
[18164] Fix | Delete
}
[18165] Fix | Delete
/* harmony default export */ const post_title_raw = ((0,external_wp_element_namespaceObject.forwardRef)(PostTitleRaw));
[18166] Fix | Delete
[18167] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-trash/index.js
[18168] Fix | Delete
/**
[18169] Fix | Delete
* WordPress dependencies
[18170] Fix | Delete
*/
[18171] Fix | Delete
[18172] Fix | Delete
[18173] Fix | Delete
[18174] Fix | Delete
[18175] Fix | Delete
[18176] Fix | Delete
/**
[18177] Fix | Delete
* Internal dependencies
[18178] Fix | Delete
*/
[18179] Fix | Delete
[18180] Fix | Delete
[18181] Fix | Delete
[18182] Fix | Delete
[18183] Fix | Delete
function PostTrash() {
[18184] Fix | Delete
const {
[18185] Fix | Delete
isNew,
[18186] Fix | Delete
isDeleting,
[18187] Fix | Delete
postId
[18188] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[18189] Fix | Delete
const store = select(store_store);
[18190] Fix | Delete
return {
[18191] Fix | Delete
isNew: store.isEditedPostNew(),
[18192] Fix | Delete
isDeleting: store.isDeletingPost(),
[18193] Fix | Delete
postId: store.getCurrentPostId()
[18194] Fix | Delete
};
[18195] Fix | Delete
}, []);
[18196] Fix | Delete
const {
[18197] Fix | Delete
trashPost
[18198] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[18199] Fix | Delete
const [showConfirmDialog, setShowConfirmDialog] = (0,external_wp_element_namespaceObject.useState)(false);
[18200] Fix | Delete
if (isNew || !postId) {
[18201] Fix | Delete
return null;
[18202] Fix | Delete
}
[18203] Fix | Delete
const handleConfirm = () => {
[18204] Fix | Delete
setShowConfirmDialog(false);
[18205] Fix | Delete
trashPost();
[18206] Fix | Delete
};
[18207] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[18208] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[18209] Fix | Delete
__next40pxDefaultSize: true,
[18210] Fix | Delete
className: "editor-post-trash",
[18211] Fix | Delete
isDestructive: true,
[18212] Fix | Delete
variant: "secondary",
[18213] Fix | Delete
isBusy: isDeleting,
[18214] Fix | Delete
"aria-disabled": isDeleting,
[18215] Fix | Delete
onClick: isDeleting ? undefined : () => setShowConfirmDialog(true),
[18216] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Move to trash')
[18217] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
[18218] Fix | Delete
isOpen: showConfirmDialog,
[18219] Fix | Delete
onConfirm: handleConfirm,
[18220] Fix | Delete
onCancel: () => setShowConfirmDialog(false),
[18221] Fix | Delete
confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Move to trash'),
[18222] Fix | Delete
size: "medium",
[18223] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to move this post to the trash?')
[18224] Fix | Delete
})]
[18225] Fix | Delete
});
[18226] Fix | Delete
}
[18227] Fix | Delete
[18228] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-trash/check.js
[18229] Fix | Delete
/**
[18230] Fix | Delete
* WordPress dependencies
[18231] Fix | Delete
*/
[18232] Fix | Delete
[18233] Fix | Delete
[18234] Fix | Delete
[18235] Fix | Delete
/**
[18236] Fix | Delete
* Internal dependencies
[18237] Fix | Delete
*/
[18238] Fix | Delete
[18239] Fix | Delete
function PostTrashCheck({
[18240] Fix | Delete
children
[18241] Fix | Delete
}) {
[18242] Fix | Delete
const {
[18243] Fix | Delete
canTrashPost
[18244] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[18245] Fix | Delete
const {
[18246] Fix | Delete
isEditedPostNew,
[18247] Fix | Delete
getCurrentPostId,
[18248] Fix | Delete
getCurrentPostType
[18249] Fix | Delete
} = select(store_store);
[18250] Fix | Delete
const {
[18251] Fix | Delete
getPostType,
[18252] Fix | Delete
canUser
[18253] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[18254] Fix | Delete
const postType = getPostType(getCurrentPostType());
[18255] Fix | Delete
const postId = getCurrentPostId();
[18256] Fix | Delete
const isNew = isEditedPostNew();
[18257] Fix | Delete
const resource = postType?.rest_base || ''; // eslint-disable-line camelcase
[18258] Fix | Delete
const canUserDelete = postId && resource ? canUser('delete', resource, postId) : false;
[18259] Fix | Delete
return {
[18260] Fix | Delete
canTrashPost: (!isNew || postId) && canUserDelete
[18261] Fix | Delete
};
[18262] Fix | Delete
}, []);
[18263] Fix | Delete
if (!canTrashPost) {
[18264] Fix | Delete
return null;
[18265] Fix | Delete
}
[18266] Fix | Delete
return children;
[18267] Fix | Delete
}
[18268] Fix | Delete
[18269] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/copy-small.js
[18270] Fix | Delete
/**
[18271] Fix | Delete
* WordPress dependencies
[18272] Fix | Delete
*/
[18273] Fix | Delete
[18274] Fix | Delete
[18275] Fix | Delete
const copySmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[18276] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[18277] Fix | Delete
viewBox: "0 0 24 24",
[18278] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[18279] Fix | Delete
fillRule: "evenodd",
[18280] Fix | Delete
clipRule: "evenodd",
[18281] Fix | Delete
d: "M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"
[18282] Fix | Delete
})
[18283] Fix | Delete
});
[18284] Fix | Delete
/* harmony default export */ const copy_small = (copySmall);
[18285] Fix | Delete
[18286] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-url/index.js
[18287] Fix | Delete
/**
[18288] Fix | Delete
* WordPress dependencies
[18289] Fix | Delete
*/
[18290] Fix | Delete
[18291] Fix | Delete
[18292] Fix | Delete
[18293] Fix | Delete
[18294] Fix | Delete
[18295] Fix | Delete
[18296] Fix | Delete
[18297] Fix | Delete
[18298] Fix | Delete
[18299] Fix | Delete
[18300] Fix | Delete
[18301] Fix | Delete
/**
[18302] Fix | Delete
* Internal dependencies
[18303] Fix | Delete
*/
[18304] Fix | Delete
[18305] Fix | Delete
[18306] Fix | Delete
/**
[18307] Fix | Delete
* Renders the `PostURL` component.
[18308] Fix | Delete
*
[18309] Fix | Delete
* @example
[18310] Fix | Delete
* ```jsx
[18311] Fix | Delete
* <PostURL />
[18312] Fix | Delete
* ```
[18313] Fix | Delete
*
[18314] Fix | Delete
* @param {Function} onClose Callback function to be executed when the popover is closed.
[18315] Fix | Delete
*
[18316] Fix | Delete
* @return {Component} The rendered PostURL component.
[18317] Fix | Delete
*/
[18318] Fix | Delete
[18319] Fix | Delete
[18320] Fix | Delete
function PostURL({
[18321] Fix | Delete
onClose
[18322] Fix | Delete
}) {
[18323] Fix | Delete
const {
[18324] Fix | Delete
isEditable,
[18325] Fix | Delete
postSlug,
[18326] Fix | Delete
postLink,
[18327] Fix | Delete
permalinkPrefix,
[18328] Fix | Delete
permalinkSuffix,
[18329] Fix | Delete
permalink
[18330] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[18331] Fix | Delete
var _post$_links$wpActio;
[18332] Fix | Delete
const post = select(store_store).getCurrentPost();
[18333] Fix | Delete
const postTypeSlug = select(store_store).getCurrentPostType();
[18334] Fix | Delete
const postType = select(external_wp_coreData_namespaceObject.store).getPostType(postTypeSlug);
[18335] Fix | Delete
const permalinkParts = select(store_store).getPermalinkParts();
[18336] Fix | Delete
const hasPublishAction = (_post$_links$wpActio = post?._links?.['wp:action-publish']) !== null && _post$_links$wpActio !== void 0 ? _post$_links$wpActio : false;
[18337] Fix | Delete
return {
[18338] Fix | Delete
isEditable: select(store_store).isPermalinkEditable() && hasPublishAction,
[18339] Fix | Delete
postSlug: (0,external_wp_url_namespaceObject.safeDecodeURIComponent)(select(store_store).getEditedPostSlug()),
[18340] Fix | Delete
viewPostLabel: postType?.labels.view_item,
[18341] Fix | Delete
postLink: post.link,
[18342] Fix | Delete
permalinkPrefix: permalinkParts?.prefix,
[18343] Fix | Delete
permalinkSuffix: permalinkParts?.suffix,
[18344] Fix | Delete
permalink: (0,external_wp_url_namespaceObject.safeDecodeURIComponent)(select(store_store).getPermalink())
[18345] Fix | Delete
};
[18346] Fix | Delete
}, []);
[18347] Fix | Delete
const {
[18348] Fix | Delete
editPost
[18349] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[18350] Fix | Delete
const {
[18351] Fix | Delete
createNotice
[18352] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[18353] Fix | Delete
const [forceEmptyField, setForceEmptyField] = (0,external_wp_element_namespaceObject.useState)(false);
[18354] Fix | Delete
const copyButtonRef = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(permalink, () => {
[18355] Fix | Delete
createNotice('info', (0,external_wp_i18n_namespaceObject.__)('Copied URL to clipboard.'), {
[18356] Fix | Delete
isDismissible: true,
[18357] Fix | Delete
type: 'snackbar'
[18358] Fix | Delete
});
[18359] Fix | Delete
});
[18360] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[18361] Fix | Delete
className: "editor-post-url",
[18362] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalInspectorPopoverHeader, {
[18363] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Link'),
[18364] Fix | Delete
onClose: onClose
[18365] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[18366] Fix | Delete
spacing: 3,
[18367] Fix | Delete
children: [isEditable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[18368] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('Customize the last part of the URL. '), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
[18369] Fix | Delete
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'),
[18370] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Learn more.')
[18371] Fix | Delete
})]
[18372] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[18373] Fix | Delete
children: [isEditable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalInputControl, {
[18374] Fix | Delete
__next40pxDefaultSize: true,
[18375] Fix | Delete
prefix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalInputControlPrefixWrapper, {
[18376] Fix | Delete
children: "/"
[18377] Fix | Delete
}),
[18378] Fix | Delete
suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[18379] Fix | Delete
icon: copy_small,
[18380] Fix | Delete
ref: copyButtonRef,
[18381] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Copy')
[18382] Fix | Delete
}),
[18383] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Link'),
[18384] Fix | Delete
hideLabelFromVision: true,
[18385] Fix | Delete
value: forceEmptyField ? '' : postSlug,
[18386] Fix | Delete
autoComplete: "off",
[18387] Fix | Delete
spellCheck: "false",
[18388] Fix | Delete
type: "text",
[18389] Fix | Delete
className: "editor-post-url__input",
[18390] Fix | Delete
onChange: newValue => {
[18391] Fix | Delete
editPost({
[18392] Fix | Delete
slug: newValue
[18393] Fix | Delete
});
[18394] Fix | Delete
// When we delete the field the permalink gets
[18395] Fix | Delete
// reverted to the original value.
[18396] Fix | Delete
// The forceEmptyField logic allows the user to have
[18397] Fix | Delete
// the field temporarily empty while typing.
[18398] Fix | Delete
if (!newValue) {
[18399] Fix | Delete
if (!forceEmptyField) {
[18400] Fix | Delete
setForceEmptyField(true);
[18401] Fix | Delete
}
[18402] Fix | Delete
return;
[18403] Fix | Delete
}
[18404] Fix | Delete
if (forceEmptyField) {
[18405] Fix | Delete
setForceEmptyField(false);
[18406] Fix | Delete
}
[18407] Fix | Delete
},
[18408] Fix | Delete
onBlur: event => {
[18409] Fix | Delete
editPost({
[18410] Fix | Delete
slug: (0,external_wp_url_namespaceObject.cleanForSlug)(event.target.value)
[18411] Fix | Delete
});
[18412] Fix | Delete
if (forceEmptyField) {
[18413] Fix | Delete
setForceEmptyField(false);
[18414] Fix | Delete
}
[18415] Fix | Delete
},
[18416] Fix | Delete
help: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ExternalLink, {
[18417] Fix | Delete
className: "editor-post-url__link",
[18418] Fix | Delete
href: postLink,
[18419] Fix | Delete
target: "_blank",
[18420] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[18421] Fix | Delete
className: "editor-post-url__link-prefix",
[18422] Fix | Delete
children: permalinkPrefix
[18423] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[18424] Fix | Delete
className: "editor-post-url__link-slug",
[18425] Fix | Delete
children: postSlug
[18426] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[18427] Fix | Delete
className: "editor-post-url__link-suffix",
[18428] Fix | Delete
children: permalinkSuffix
[18429] Fix | Delete
})]
[18430] Fix | Delete
})
[18431] Fix | Delete
}), !isEditable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
[18432] Fix | Delete
className: "editor-post-url__link",
[18433] Fix | Delete
href: postLink,
[18434] Fix | Delete
target: "_blank",
[18435] Fix | Delete
children: postLink
[18436] Fix | Delete
})]
[18437] Fix | Delete
})]
[18438] Fix | Delete
})]
[18439] Fix | Delete
});
[18440] Fix | Delete
}
[18441] Fix | Delete
[18442] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-url/check.js
[18443] Fix | Delete
/**
[18444] Fix | Delete
* WordPress dependencies
[18445] Fix | Delete
*/
[18446] Fix | Delete
[18447] Fix | Delete
[18448] Fix | Delete
[18449] Fix | Delete
/**
[18450] Fix | Delete
* Internal dependencies
[18451] Fix | Delete
*/
[18452] Fix | Delete
[18453] Fix | Delete
[18454] Fix | Delete
/**
[18455] Fix | Delete
* Check if the post URL is valid and visible.
[18456] Fix | Delete
*
[18457] Fix | Delete
* @param {Object} props The component props.
[18458] Fix | Delete
* @param {Element} props.children The child components.
[18459] Fix | Delete
*
[18460] Fix | Delete
* @return {Component|null} The child components if the post URL is valid and visible, otherwise null.
[18461] Fix | Delete
*/
[18462] Fix | Delete
function PostURLCheck({
[18463] Fix | Delete
children
[18464] Fix | Delete
}) {
[18465] Fix | Delete
const isVisible = (0,external_wp_data_namespaceObject.useSelect)(select => {
[18466] Fix | Delete
const postTypeSlug = select(store_store).getCurrentPostType();
[18467] Fix | Delete
const postType = select(external_wp_coreData_namespaceObject.store).getPostType(postTypeSlug);
[18468] Fix | Delete
if (!postType?.viewable) {
[18469] Fix | Delete
return false;
[18470] Fix | Delete
}
[18471] Fix | Delete
const post = select(store_store).getCurrentPost();
[18472] Fix | Delete
if (!post.link) {
[18473] Fix | Delete
return false;
[18474] Fix | Delete
}
[18475] Fix | Delete
const permalinkParts = select(store_store).getPermalinkParts();
[18476] Fix | Delete
if (!permalinkParts) {
[18477] Fix | Delete
return false;
[18478] Fix | Delete
}
[18479] Fix | Delete
return true;
[18480] Fix | Delete
}, []);
[18481] Fix | Delete
if (!isVisible) {
[18482] Fix | Delete
return null;
[18483] Fix | Delete
}
[18484] Fix | Delete
return children;
[18485] Fix | Delete
}
[18486] Fix | Delete
[18487] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-url/label.js
[18488] Fix | Delete
/**
[18489] Fix | Delete
* WordPress dependencies
[18490] Fix | Delete
*/
[18491] Fix | Delete
[18492] Fix | Delete
[18493] Fix | Delete
[18494] Fix | Delete
/**
[18495] Fix | Delete
* Internal dependencies
[18496] Fix | Delete
*/
[18497] Fix | Delete
[18498] Fix | Delete
[18499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function