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
children: newTermSubmitLabel
[16000] Fix | Delete
})
[16001] Fix | Delete
})]
[16002] Fix | Delete
})
[16003] Fix | Delete
})]
[16004] Fix | Delete
});
[16005] Fix | Delete
}
[16006] Fix | Delete
/* harmony default export */ const hierarchical_term_selector = ((0,external_wp_components_namespaceObject.withFilters)('editor.PostTaxonomyType')(HierarchicalTermSelector));
[16007] Fix | Delete
[16008] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-category-panel.js
[16009] Fix | Delete
/**
[16010] Fix | Delete
* WordPress dependencies
[16011] Fix | Delete
*/
[16012] Fix | Delete
[16013] Fix | Delete
[16014] Fix | Delete
[16015] Fix | Delete
[16016] Fix | Delete
[16017] Fix | Delete
[16018] Fix | Delete
/**
[16019] Fix | Delete
* Internal dependencies
[16020] Fix | Delete
*/
[16021] Fix | Delete
[16022] Fix | Delete
[16023] Fix | Delete
[16024] Fix | Delete
[16025] Fix | Delete
function MaybeCategoryPanel() {
[16026] Fix | Delete
const hasNoCategory = (0,external_wp_data_namespaceObject.useSelect)(select => {
[16027] Fix | Delete
const postType = select(store_store).getCurrentPostType();
[16028] Fix | Delete
const {
[16029] Fix | Delete
canUser,
[16030] Fix | Delete
getEntityRecord,
[16031] Fix | Delete
getTaxonomy
[16032] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[16033] Fix | Delete
const categoriesTaxonomy = getTaxonomy('category');
[16034] Fix | Delete
const defaultCategoryId = canUser('read', 'settings') ? getEntityRecord('root', 'site')?.default_category : undefined;
[16035] Fix | Delete
const defaultCategory = defaultCategoryId ? getEntityRecord('taxonomy', 'category', defaultCategoryId) : undefined;
[16036] Fix | Delete
const postTypeSupportsCategories = categoriesTaxonomy && categoriesTaxonomy.types.some(type => type === postType);
[16037] Fix | Delete
const categories = categoriesTaxonomy && select(store_store).getEditedPostAttribute(categoriesTaxonomy.rest_base);
[16038] Fix | Delete
[16039] Fix | Delete
// This boolean should return true if everything is loaded
[16040] Fix | Delete
// ( categoriesTaxonomy, defaultCategory )
[16041] Fix | Delete
// and the post has not been assigned a category different than "uncategorized".
[16042] Fix | Delete
return !!categoriesTaxonomy && !!defaultCategory && postTypeSupportsCategories && (categories?.length === 0 || categories?.length === 1 && defaultCategory?.id === categories[0]);
[16043] Fix | Delete
}, []);
[16044] Fix | Delete
const [shouldShowPanel, setShouldShowPanel] = (0,external_wp_element_namespaceObject.useState)(false);
[16045] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[16046] Fix | Delete
// We use state to avoid hiding the panel if the user edits the categories
[16047] Fix | Delete
// and adds one within the panel itself (while visible).
[16048] Fix | Delete
if (hasNoCategory) {
[16049] Fix | Delete
setShouldShowPanel(true);
[16050] Fix | Delete
}
[16051] Fix | Delete
}, [hasNoCategory]);
[16052] Fix | Delete
if (!shouldShowPanel) {
[16053] Fix | Delete
return null;
[16054] Fix | Delete
}
[16055] Fix | Delete
const panelBodyTitle = [(0,external_wp_i18n_namespaceObject.__)('Suggestion:'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[16056] Fix | Delete
className: "editor-post-publish-panel__link",
[16057] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Assign a category')
[16058] Fix | Delete
}, "label")];
[16059] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
[16060] Fix | Delete
initialOpen: false,
[16061] Fix | Delete
title: panelBodyTitle,
[16062] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[16063] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.')
[16064] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(hierarchical_term_selector, {
[16065] Fix | Delete
slug: "category"
[16066] Fix | Delete
})]
[16067] Fix | Delete
});
[16068] Fix | Delete
}
[16069] Fix | Delete
/* harmony default export */ const maybe_category_panel = (MaybeCategoryPanel);
[16070] Fix | Delete
[16071] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/maybe-upload-media.js
[16072] Fix | Delete
/**
[16073] Fix | Delete
* WordPress dependencies
[16074] Fix | Delete
*/
[16075] Fix | Delete
[16076] Fix | Delete
[16077] Fix | Delete
[16078] Fix | Delete
[16079] Fix | Delete
[16080] Fix | Delete
[16081] Fix | Delete
[16082] Fix | Delete
/**
[16083] Fix | Delete
* Internal dependencies
[16084] Fix | Delete
*/
[16085] Fix | Delete
[16086] Fix | Delete
[16087] Fix | Delete
[16088] Fix | Delete
function flattenBlocks(blocks) {
[16089] Fix | Delete
const result = [];
[16090] Fix | Delete
blocks.forEach(block => {
[16091] Fix | Delete
result.push(block);
[16092] Fix | Delete
result.push(...flattenBlocks(block.innerBlocks));
[16093] Fix | Delete
});
[16094] Fix | Delete
return result;
[16095] Fix | Delete
}
[16096] Fix | Delete
function Image(block) {
[16097] Fix | Delete
const {
[16098] Fix | Delete
selectBlock
[16099] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
[16100] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.img, {
[16101] Fix | Delete
tabIndex: 0,
[16102] Fix | Delete
role: "button",
[16103] Fix | Delete
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Select image block.'),
[16104] Fix | Delete
onClick: () => {
[16105] Fix | Delete
selectBlock(block.clientId);
[16106] Fix | Delete
},
[16107] Fix | Delete
onKeyDown: event => {
[16108] Fix | Delete
if (event.key === 'Enter' || event.key === ' ') {
[16109] Fix | Delete
selectBlock(block.clientId);
[16110] Fix | Delete
event.preventDefault();
[16111] Fix | Delete
}
[16112] Fix | Delete
},
[16113] Fix | Delete
alt: block.attributes.alt,
[16114] Fix | Delete
src: block.attributes.url,
[16115] Fix | Delete
animate: {
[16116] Fix | Delete
opacity: 1
[16117] Fix | Delete
},
[16118] Fix | Delete
exit: {
[16119] Fix | Delete
opacity: 0,
[16120] Fix | Delete
scale: 0
[16121] Fix | Delete
},
[16122] Fix | Delete
style: {
[16123] Fix | Delete
width: '36px',
[16124] Fix | Delete
height: '36px',
[16125] Fix | Delete
objectFit: 'cover',
[16126] Fix | Delete
borderRadius: '2px',
[16127] Fix | Delete
cursor: 'pointer'
[16128] Fix | Delete
},
[16129] Fix | Delete
whileHover: {
[16130] Fix | Delete
scale: 1.08
[16131] Fix | Delete
}
[16132] Fix | Delete
}, block.clientId);
[16133] Fix | Delete
}
[16134] Fix | Delete
function maybe_upload_media_PostFormatPanel() {
[16135] Fix | Delete
const [isUploading, setIsUploading] = (0,external_wp_element_namespaceObject.useState)(false);
[16136] Fix | Delete
const {
[16137] Fix | Delete
editorBlocks,
[16138] Fix | Delete
mediaUpload
[16139] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
[16140] Fix | Delete
editorBlocks: select(store_store).getEditorBlocks(),
[16141] Fix | Delete
mediaUpload: select(external_wp_blockEditor_namespaceObject.store).getSettings().mediaUpload
[16142] Fix | Delete
}), []);
[16143] Fix | Delete
const externalImages = flattenBlocks(editorBlocks).filter(block => block.name === 'core/image' && block.attributes.url && !block.attributes.id);
[16144] Fix | Delete
const {
[16145] Fix | Delete
updateBlockAttributes
[16146] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
[16147] Fix | Delete
if (!mediaUpload || !externalImages.length) {
[16148] Fix | Delete
return null;
[16149] Fix | Delete
}
[16150] Fix | Delete
const panelBodyTitle = [(0,external_wp_i18n_namespaceObject.__)('Suggestion:'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[16151] Fix | Delete
className: "editor-post-publish-panel__link",
[16152] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('External media')
[16153] Fix | Delete
}, "label")];
[16154] Fix | Delete
function uploadImages() {
[16155] Fix | Delete
setIsUploading(true);
[16156] Fix | Delete
Promise.all(externalImages.map(image => window.fetch(image.attributes.url.includes('?') ? image.attributes.url : image.attributes.url + '?').then(response => response.blob()).then(blob => new Promise((resolve, reject) => {
[16157] Fix | Delete
mediaUpload({
[16158] Fix | Delete
filesList: [blob],
[16159] Fix | Delete
onFileChange: ([media]) => {
[16160] Fix | Delete
if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
[16161] Fix | Delete
return;
[16162] Fix | Delete
}
[16163] Fix | Delete
updateBlockAttributes(image.clientId, {
[16164] Fix | Delete
id: media.id,
[16165] Fix | Delete
url: media.url
[16166] Fix | Delete
});
[16167] Fix | Delete
resolve();
[16168] Fix | Delete
},
[16169] Fix | Delete
onError() {
[16170] Fix | Delete
reject();
[16171] Fix | Delete
}
[16172] Fix | Delete
});
[16173] Fix | Delete
})))).finally(() => {
[16174] Fix | Delete
setIsUploading(false);
[16175] Fix | Delete
});
[16176] Fix | Delete
}
[16177] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
[16178] Fix | Delete
initialOpen: true,
[16179] Fix | Delete
title: panelBodyTitle,
[16180] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[16181] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.')
[16182] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16183] Fix | Delete
style: {
[16184] Fix | Delete
display: 'inline-flex',
[16185] Fix | Delete
flexWrap: 'wrap',
[16186] Fix | Delete
gap: '8px'
[16187] Fix | Delete
},
[16188] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
[16189] Fix | Delete
children: externalImages.map(image => {
[16190] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Image, {
[16191] Fix | Delete
...image
[16192] Fix | Delete
}, image.clientId);
[16193] Fix | Delete
})
[16194] Fix | Delete
}), isUploading ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[16195] Fix | Delete
variant: "primary",
[16196] Fix | Delete
onClick: uploadImages,
[16197] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Upload')
[16198] Fix | Delete
})]
[16199] Fix | Delete
})]
[16200] Fix | Delete
});
[16201] Fix | Delete
}
[16202] Fix | Delete
[16203] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/prepublish.js
[16204] Fix | Delete
/**
[16205] Fix | Delete
* WordPress dependencies
[16206] Fix | Delete
*/
[16207] Fix | Delete
[16208] Fix | Delete
[16209] Fix | Delete
[16210] Fix | Delete
[16211] Fix | Delete
[16212] Fix | Delete
[16213] Fix | Delete
[16214] Fix | Delete
[16215] Fix | Delete
/**
[16216] Fix | Delete
* Internal dependencies
[16217] Fix | Delete
*/
[16218] Fix | Delete
[16219] Fix | Delete
[16220] Fix | Delete
[16221] Fix | Delete
[16222] Fix | Delete
[16223] Fix | Delete
[16224] Fix | Delete
[16225] Fix | Delete
[16226] Fix | Delete
[16227] Fix | Delete
[16228] Fix | Delete
[16229] Fix | Delete
[16230] Fix | Delete
function PostPublishPanelPrepublish({
[16231] Fix | Delete
children
[16232] Fix | Delete
}) {
[16233] Fix | Delete
const {
[16234] Fix | Delete
isBeingScheduled,
[16235] Fix | Delete
isRequestingSiteIcon,
[16236] Fix | Delete
hasPublishAction,
[16237] Fix | Delete
siteIconUrl,
[16238] Fix | Delete
siteTitle,
[16239] Fix | Delete
siteHome
[16240] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[16241] Fix | Delete
var _getCurrentPost$_link;
[16242] Fix | Delete
const {
[16243] Fix | Delete
getCurrentPost,
[16244] Fix | Delete
isEditedPostBeingScheduled
[16245] Fix | Delete
} = select(store_store);
[16246] Fix | Delete
const {
[16247] Fix | Delete
getEntityRecord,
[16248] Fix | Delete
isResolving
[16249] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[16250] Fix | Delete
const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
[16251] Fix | Delete
return {
[16252] Fix | Delete
hasPublishAction: (_getCurrentPost$_link = getCurrentPost()._links?.['wp:action-publish']) !== null && _getCurrentPost$_link !== void 0 ? _getCurrentPost$_link : false,
[16253] Fix | Delete
isBeingScheduled: isEditedPostBeingScheduled(),
[16254] Fix | Delete
isRequestingSiteIcon: isResolving('getEntityRecord', ['root', '__unstableBase', undefined]),
[16255] Fix | Delete
siteIconUrl: siteData.site_icon_url,
[16256] Fix | Delete
siteTitle: siteData.name,
[16257] Fix | Delete
siteHome: siteData.home && (0,external_wp_url_namespaceObject.filterURLForDisplay)(siteData.home)
[16258] Fix | Delete
};
[16259] Fix | Delete
}, []);
[16260] Fix | Delete
let siteIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
[16261] Fix | Delete
className: "components-site-icon",
[16262] Fix | Delete
size: "36px",
[16263] Fix | Delete
icon: library_wordpress
[16264] Fix | Delete
});
[16265] Fix | Delete
if (siteIconUrl) {
[16266] Fix | Delete
siteIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
[16267] Fix | Delete
alt: (0,external_wp_i18n_namespaceObject.__)('Site Icon'),
[16268] Fix | Delete
className: "components-site-icon",
[16269] Fix | Delete
src: siteIconUrl
[16270] Fix | Delete
});
[16271] Fix | Delete
}
[16272] Fix | Delete
if (isRequestingSiteIcon) {
[16273] Fix | Delete
siteIcon = null;
[16274] Fix | Delete
}
[16275] Fix | Delete
let prePublishTitle, prePublishBodyText;
[16276] Fix | Delete
if (!hasPublishAction) {
[16277] Fix | Delete
prePublishTitle = (0,external_wp_i18n_namespaceObject.__)('Are you ready to submit for review?');
[16278] Fix | Delete
prePublishBodyText = (0,external_wp_i18n_namespaceObject.__)('When you’re ready, submit your work for review, and an Editor will be able to approve it for you.');
[16279] Fix | Delete
} else if (isBeingScheduled) {
[16280] Fix | Delete
prePublishTitle = (0,external_wp_i18n_namespaceObject.__)('Are you ready to schedule?');
[16281] Fix | Delete
prePublishBodyText = (0,external_wp_i18n_namespaceObject.__)('Your work will be published at the specified date and time.');
[16282] Fix | Delete
} else {
[16283] Fix | Delete
prePublishTitle = (0,external_wp_i18n_namespaceObject.__)('Are you ready to publish?');
[16284] Fix | Delete
prePublishBodyText = (0,external_wp_i18n_namespaceObject.__)('Double-check your settings before publishing.');
[16285] Fix | Delete
}
[16286] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16287] Fix | Delete
className: "editor-post-publish-panel__prepublish",
[16288] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16289] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("strong", {
[16290] Fix | Delete
children: prePublishTitle
[16291] Fix | Delete
})
[16292] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[16293] Fix | Delete
children: prePublishBodyText
[16294] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16295] Fix | Delete
className: "components-site-card",
[16296] Fix | Delete
children: [siteIcon, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16297] Fix | Delete
className: "components-site-info",
[16298] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[16299] Fix | Delete
className: "components-site-name",
[16300] Fix | Delete
children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(siteTitle) || (0,external_wp_i18n_namespaceObject.__)('(Untitled)')
[16301] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[16302] Fix | Delete
className: "components-site-home",
[16303] Fix | Delete
children: siteHome
[16304] Fix | Delete
})]
[16305] Fix | Delete
})]
[16306] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(maybe_upload_media_PostFormatPanel, {}), hasPublishAction && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16307] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
[16308] Fix | Delete
initialOpen: false,
[16309] Fix | Delete
title: [(0,external_wp_i18n_namespaceObject.__)('Visibility:'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[16310] Fix | Delete
className: "editor-post-publish-panel__link",
[16311] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostVisibilityLabel, {})
[16312] Fix | Delete
}, "label")],
[16313] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostVisibility, {})
[16314] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
[16315] Fix | Delete
initialOpen: false,
[16316] Fix | Delete
title: [(0,external_wp_i18n_namespaceObject.__)('Publish:'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[16317] Fix | Delete
className: "editor-post-publish-panel__link",
[16318] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostScheduleLabel, {})
[16319] Fix | Delete
}, "label")],
[16320] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostSchedule, {})
[16321] Fix | Delete
})]
[16322] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostFormatPanel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(maybe_tags_panel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(maybe_category_panel, {}), children]
[16323] Fix | Delete
});
[16324] Fix | Delete
}
[16325] Fix | Delete
/* harmony default export */ const prepublish = (PostPublishPanelPrepublish);
[16326] Fix | Delete
[16327] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/postpublish.js
[16328] Fix | Delete
/**
[16329] Fix | Delete
* WordPress dependencies
[16330] Fix | Delete
*/
[16331] Fix | Delete
[16332] Fix | Delete
[16333] Fix | Delete
[16334] Fix | Delete
[16335] Fix | Delete
[16336] Fix | Delete
[16337] Fix | Delete
[16338] Fix | Delete
[16339] Fix | Delete
[16340] Fix | Delete
/**
[16341] Fix | Delete
* Internal dependencies
[16342] Fix | Delete
*/
[16343] Fix | Delete
[16344] Fix | Delete
[16345] Fix | Delete
[16346] Fix | Delete
[16347] Fix | Delete
[16348] Fix | Delete
const POSTNAME = '%postname%';
[16349] Fix | Delete
const PAGENAME = '%pagename%';
[16350] Fix | Delete
[16351] Fix | Delete
/**
[16352] Fix | Delete
* Returns URL for a future post.
[16353] Fix | Delete
*
[16354] Fix | Delete
* @param {Object} post Post object.
[16355] Fix | Delete
*
[16356] Fix | Delete
* @return {string} PostPublish URL.
[16357] Fix | Delete
*/
[16358] Fix | Delete
[16359] Fix | Delete
const getFuturePostUrl = post => {
[16360] Fix | Delete
const {
[16361] Fix | Delete
slug
[16362] Fix | Delete
} = post;
[16363] Fix | Delete
if (post.permalink_template.includes(POSTNAME)) {
[16364] Fix | Delete
return post.permalink_template.replace(POSTNAME, slug);
[16365] Fix | Delete
}
[16366] Fix | Delete
if (post.permalink_template.includes(PAGENAME)) {
[16367] Fix | Delete
return post.permalink_template.replace(PAGENAME, slug);
[16368] Fix | Delete
}
[16369] Fix | Delete
return post.permalink_template;
[16370] Fix | Delete
};
[16371] Fix | Delete
function postpublish_CopyButton({
[16372] Fix | Delete
text,
[16373] Fix | Delete
onCopy,
[16374] Fix | Delete
children
[16375] Fix | Delete
}) {
[16376] Fix | Delete
const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text, onCopy);
[16377] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[16378] Fix | Delete
variant: "secondary",
[16379] Fix | Delete
ref: ref,
[16380] Fix | Delete
children: children
[16381] Fix | Delete
});
[16382] Fix | Delete
}
[16383] Fix | Delete
class PostPublishPanelPostpublish extends external_wp_element_namespaceObject.Component {
[16384] Fix | Delete
constructor() {
[16385] Fix | Delete
super(...arguments);
[16386] Fix | Delete
this.state = {
[16387] Fix | Delete
showCopyConfirmation: false
[16388] Fix | Delete
};
[16389] Fix | Delete
this.onCopy = this.onCopy.bind(this);
[16390] Fix | Delete
this.onSelectInput = this.onSelectInput.bind(this);
[16391] Fix | Delete
this.postLink = (0,external_wp_element_namespaceObject.createRef)();
[16392] Fix | Delete
}
[16393] Fix | Delete
componentDidMount() {
[16394] Fix | Delete
if (this.props.focusOnMount) {
[16395] Fix | Delete
this.postLink.current.focus();
[16396] Fix | Delete
}
[16397] Fix | Delete
}
[16398] Fix | Delete
componentWillUnmount() {
[16399] Fix | Delete
clearTimeout(this.dismissCopyConfirmation);
[16400] Fix | Delete
}
[16401] Fix | Delete
onCopy() {
[16402] Fix | Delete
this.setState({
[16403] Fix | Delete
showCopyConfirmation: true
[16404] Fix | Delete
});
[16405] Fix | Delete
clearTimeout(this.dismissCopyConfirmation);
[16406] Fix | Delete
this.dismissCopyConfirmation = setTimeout(() => {
[16407] Fix | Delete
this.setState({
[16408] Fix | Delete
showCopyConfirmation: false
[16409] Fix | Delete
});
[16410] Fix | Delete
}, 4000);
[16411] Fix | Delete
}
[16412] Fix | Delete
onSelectInput(event) {
[16413] Fix | Delete
event.target.select();
[16414] Fix | Delete
}
[16415] Fix | Delete
render() {
[16416] Fix | Delete
const {
[16417] Fix | Delete
children,
[16418] Fix | Delete
isScheduled,
[16419] Fix | Delete
post,
[16420] Fix | Delete
postType
[16421] Fix | Delete
} = this.props;
[16422] Fix | Delete
const postLabel = postType?.labels?.singular_name;
[16423] Fix | Delete
const viewPostLabel = postType?.labels?.view_item;
[16424] Fix | Delete
const addNewPostLabel = postType?.labels?.add_new_item;
[16425] Fix | Delete
const link = post.status === 'future' ? getFuturePostUrl(post) : post.link;
[16426] Fix | Delete
const addLink = (0,external_wp_url_namespaceObject.addQueryArgs)('post-new.php', {
[16427] Fix | Delete
post_type: post.type
[16428] Fix | Delete
});
[16429] Fix | Delete
const postPublishNonLinkHeader = isScheduled ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[16430] Fix | Delete
children: [(0,external_wp_i18n_namespaceObject.__)('is now scheduled. It will go live on'), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostScheduleLabel, {}), "."]
[16431] Fix | Delete
}) : (0,external_wp_i18n_namespaceObject.__)('is now live.');
[16432] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16433] Fix | Delete
className: "post-publish-panel__postpublish",
[16434] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
[16435] Fix | Delete
className: "post-publish-panel__postpublish-header",
[16436] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
[16437] Fix | Delete
ref: this.postLink,
[16438] Fix | Delete
href: link,
[16439] Fix | Delete
children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(post.title) || (0,external_wp_i18n_namespaceObject.__)('(no title)')
[16440] Fix | Delete
}), ' ', postPublishNonLinkHeader]
[16441] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, {
[16442] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[16443] Fix | Delete
className: "post-publish-panel__postpublish-subheader",
[16444] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("strong", {
[16445] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('What’s next?')
[16446] Fix | Delete
})
[16447] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16448] Fix | Delete
className: "post-publish-panel__postpublish-post-address-container",
[16449] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
[16450] Fix | Delete
__nextHasNoMarginBottom: true,
[16451] Fix | Delete
className: "post-publish-panel__postpublish-post-address",
[16452] Fix | Delete
readOnly: true,
[16453] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: post type singular name */
[16454] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('%s address'), postLabel),
[16455] Fix | Delete
value: (0,external_wp_url_namespaceObject.safeDecodeURIComponent)(link),
[16456] Fix | Delete
onFocus: this.onSelectInput
[16457] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[16458] Fix | Delete
className: "post-publish-panel__postpublish-post-address__copy-button-wrap",
[16459] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(postpublish_CopyButton, {
[16460] Fix | Delete
text: link,
[16461] Fix | Delete
onCopy: this.onCopy,
[16462] Fix | Delete
children: this.state.showCopyConfirmation ? (0,external_wp_i18n_namespaceObject.__)('Copied!') : (0,external_wp_i18n_namespaceObject.__)('Copy')
[16463] Fix | Delete
})
[16464] Fix | Delete
})]
[16465] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[16466] Fix | Delete
className: "post-publish-panel__postpublish-buttons",
[16467] Fix | Delete
children: [!isScheduled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[16468] Fix | Delete
variant: "primary",
[16469] Fix | Delete
href: link,
[16470] Fix | Delete
children: viewPostLabel
[16471] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[16472] Fix | Delete
variant: isScheduled ? 'primary' : 'secondary',
[16473] Fix | Delete
href: addLink,
[16474] Fix | Delete
children: addNewPostLabel
[16475] Fix | Delete
})]
[16476] Fix | Delete
})]
[16477] Fix | Delete
}), children]
[16478] Fix | Delete
});
[16479] Fix | Delete
}
[16480] Fix | Delete
}
[16481] Fix | Delete
/* harmony default export */ const postpublish = ((0,external_wp_data_namespaceObject.withSelect)(select => {
[16482] Fix | Delete
const {
[16483] Fix | Delete
getEditedPostAttribute,
[16484] Fix | Delete
getCurrentPost,
[16485] Fix | Delete
isCurrentPostScheduled
[16486] Fix | Delete
} = select(store_store);
[16487] Fix | Delete
const {
[16488] Fix | Delete
getPostType
[16489] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[16490] Fix | Delete
return {
[16491] Fix | Delete
post: getCurrentPost(),
[16492] Fix | Delete
postType: getPostType(getEditedPostAttribute('type')),
[16493] Fix | Delete
isScheduled: isCurrentPostScheduled()
[16494] Fix | Delete
};
[16495] Fix | Delete
})(PostPublishPanelPostpublish));
[16496] Fix | Delete
[16497] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-publish-panel/index.js
[16498] Fix | Delete
/**
[16499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function