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
getEditorSettings: _getEditorSettings
[11500] Fix | Delete
} = unlock(select(store_store));
[11501] Fix | Delete
const editorSettings = _getEditorSettings();
[11502] Fix | Delete
return {
[11503] Fix | Delete
isTemplateHidden: getRenderingMode() === 'post-only',
[11504] Fix | Delete
onNavigateToEntityRecord: editorSettings.onNavigateToEntityRecord,
[11505] Fix | Delete
getEditorSettings: _getEditorSettings,
[11506] Fix | Delete
hasGoBack: editorSettings.hasOwnProperty('onNavigateToPreviousEntityRecord')
[11507] Fix | Delete
};
[11508] Fix | Delete
}, []);
[11509] Fix | Delete
const {
[11510] Fix | Delete
editedRecord: template,
[11511] Fix | Delete
hasResolved
[11512] Fix | Delete
} = (0,external_wp_coreData_namespaceObject.useEntityRecord)('postType', 'wp_template', id);
[11513] Fix | Delete
const {
[11514] Fix | Delete
createSuccessNotice
[11515] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[11516] Fix | Delete
const {
[11517] Fix | Delete
setRenderingMode
[11518] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[11519] Fix | Delete
const canCreateTemplate = (0,external_wp_data_namespaceObject.useSelect)(select => {
[11520] Fix | Delete
var _select$canUser;
[11521] Fix | Delete
return (_select$canUser = select(external_wp_coreData_namespaceObject.store).canUser('create', 'templates')) !== null && _select$canUser !== void 0 ? _select$canUser : false;
[11522] Fix | Delete
});
[11523] Fix | Delete
if (!hasResolved) {
[11524] Fix | Delete
return null;
[11525] Fix | Delete
}
[11526] Fix | Delete
[11527] Fix | Delete
// The site editor does not have a `onNavigateToPreviousEntityRecord` setting as it uses its own routing
[11528] Fix | Delete
// and assigns its own backlink to focusMode pages.
[11529] Fix | Delete
const notificationAction = hasGoBack ? [{
[11530] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Go back'),
[11531] Fix | Delete
onClick: () => getEditorSettings().onNavigateToPreviousEntityRecord()
[11532] Fix | Delete
}] : undefined;
[11533] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
[11534] Fix | Delete
popoverProps: block_theme_POPOVER_PROPS,
[11535] Fix | Delete
focusOnMount: true,
[11536] Fix | Delete
toggleProps: {
[11537] Fix | Delete
size: 'compact',
[11538] Fix | Delete
variant: 'tertiary',
[11539] Fix | Delete
tooltipPosition: 'middle left'
[11540] Fix | Delete
},
[11541] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Template options'),
[11542] Fix | Delete
text: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(template.title),
[11543] Fix | Delete
icon: null,
[11544] Fix | Delete
children: ({
[11545] Fix | Delete
onClose
[11546] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[11547] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
[11548] Fix | Delete
children: [canCreateTemplate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
[11549] Fix | Delete
onClick: () => {
[11550] Fix | Delete
onNavigateToEntityRecord({
[11551] Fix | Delete
postId: template.id,
[11552] Fix | Delete
postType: 'wp_template'
[11553] Fix | Delete
});
[11554] Fix | Delete
onClose();
[11555] Fix | Delete
createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Editing template. Changes made here affect all posts and pages that use the template.'), {
[11556] Fix | Delete
type: 'snackbar',
[11557] Fix | Delete
actions: notificationAction
[11558] Fix | Delete
});
[11559] Fix | Delete
},
[11560] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Edit template')
[11561] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SwapTemplateButton, {
[11562] Fix | Delete
onClick: onClose
[11563] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResetDefaultTemplate, {
[11564] Fix | Delete
onClick: onClose
[11565] Fix | Delete
}), canCreateTemplate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CreateNewTemplate, {
[11566] Fix | Delete
onClick: onClose
[11567] Fix | Delete
})]
[11568] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
[11569] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
[11570] Fix | Delete
icon: !isTemplateHidden ? library_check : undefined,
[11571] Fix | Delete
isSelected: !isTemplateHidden,
[11572] Fix | Delete
role: "menuitemcheckbox",
[11573] Fix | Delete
onClick: () => {
[11574] Fix | Delete
setRenderingMode(isTemplateHidden ? 'template-locked' : 'post-only');
[11575] Fix | Delete
},
[11576] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Show template')
[11577] Fix | Delete
})
[11578] Fix | Delete
})]
[11579] Fix | Delete
})
[11580] Fix | Delete
});
[11581] Fix | Delete
}
[11582] Fix | Delete
[11583] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-template/panel.js
[11584] Fix | Delete
/**
[11585] Fix | Delete
* WordPress dependencies
[11586] Fix | Delete
*/
[11587] Fix | Delete
[11588] Fix | Delete
[11589] Fix | Delete
[11590] Fix | Delete
[11591] Fix | Delete
/**
[11592] Fix | Delete
* Internal dependencies
[11593] Fix | Delete
*/
[11594] Fix | Delete
[11595] Fix | Delete
[11596] Fix | Delete
[11597] Fix | Delete
[11598] Fix | Delete
[11599] Fix | Delete
/**
[11600] Fix | Delete
* Displays the template controls based on the current editor settings and user permissions.
[11601] Fix | Delete
*
[11602] Fix | Delete
* @return {JSX.Element|null} The rendered PostTemplatePanel component.
[11603] Fix | Delete
*/
[11604] Fix | Delete
[11605] Fix | Delete
function PostTemplatePanel() {
[11606] Fix | Delete
const {
[11607] Fix | Delete
templateId,
[11608] Fix | Delete
isBlockTheme
[11609] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[11610] Fix | Delete
const {
[11611] Fix | Delete
getCurrentTemplateId,
[11612] Fix | Delete
getEditorSettings
[11613] Fix | Delete
} = select(store_store);
[11614] Fix | Delete
return {
[11615] Fix | Delete
templateId: getCurrentTemplateId(),
[11616] Fix | Delete
isBlockTheme: getEditorSettings().__unstableIsBlockBasedTheme
[11617] Fix | Delete
};
[11618] Fix | Delete
}, []);
[11619] Fix | Delete
const isVisible = (0,external_wp_data_namespaceObject.useSelect)(select => {
[11620] Fix | Delete
var _select$canUser;
[11621] Fix | Delete
const postTypeSlug = select(store_store).getCurrentPostType();
[11622] Fix | Delete
const postType = select(external_wp_coreData_namespaceObject.store).getPostType(postTypeSlug);
[11623] Fix | Delete
if (!postType?.viewable) {
[11624] Fix | Delete
return false;
[11625] Fix | Delete
}
[11626] Fix | Delete
const settings = select(store_store).getEditorSettings();
[11627] Fix | Delete
const hasTemplates = !!settings.availableTemplates && Object.keys(settings.availableTemplates).length > 0;
[11628] Fix | Delete
if (hasTemplates) {
[11629] Fix | Delete
return true;
[11630] Fix | Delete
}
[11631] Fix | Delete
if (!settings.supportsTemplateMode) {
[11632] Fix | Delete
return false;
[11633] Fix | Delete
}
[11634] Fix | Delete
const canCreateTemplates = (_select$canUser = select(external_wp_coreData_namespaceObject.store).canUser('create', 'templates')) !== null && _select$canUser !== void 0 ? _select$canUser : false;
[11635] Fix | Delete
return canCreateTemplates;
[11636] Fix | Delete
}, []);
[11637] Fix | Delete
const canViewTemplates = (0,external_wp_data_namespaceObject.useSelect)(select => {
[11638] Fix | Delete
var _select$canUser2;
[11639] Fix | Delete
return (_select$canUser2 = select(external_wp_coreData_namespaceObject.store).canUser('read', 'templates')) !== null && _select$canUser2 !== void 0 ? _select$canUser2 : false;
[11640] Fix | Delete
}, []);
[11641] Fix | Delete
if ((!isBlockTheme || !canViewTemplates) && isVisible) {
[11642] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_panel_row, {
[11643] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Template'),
[11644] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(classic_theme, {})
[11645] Fix | Delete
});
[11646] Fix | Delete
}
[11647] Fix | Delete
if (isBlockTheme && !!templateId) {
[11648] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_panel_row, {
[11649] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Template'),
[11650] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockThemeControl, {
[11651] Fix | Delete
id: templateId
[11652] Fix | Delete
})
[11653] Fix | Delete
});
[11654] Fix | Delete
}
[11655] Fix | Delete
return null;
[11656] Fix | Delete
}
[11657] Fix | Delete
[11658] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/constants.js
[11659] Fix | Delete
const BASE_QUERY = {
[11660] Fix | Delete
_fields: 'id,name',
[11661] Fix | Delete
context: 'view' // Allows non-admins to perform requests.
[11662] Fix | Delete
};
[11663] Fix | Delete
const AUTHORS_QUERY = {
[11664] Fix | Delete
who: 'authors',
[11665] Fix | Delete
per_page: 50,
[11666] Fix | Delete
...BASE_QUERY
[11667] Fix | Delete
};
[11668] Fix | Delete
[11669] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/hook.js
[11670] Fix | Delete
/**
[11671] Fix | Delete
* WordPress dependencies
[11672] Fix | Delete
*/
[11673] Fix | Delete
[11674] Fix | Delete
[11675] Fix | Delete
[11676] Fix | Delete
[11677] Fix | Delete
[11678] Fix | Delete
/**
[11679] Fix | Delete
* Internal dependencies
[11680] Fix | Delete
*/
[11681] Fix | Delete
[11682] Fix | Delete
[11683] Fix | Delete
function useAuthorsQuery(search) {
[11684] Fix | Delete
const {
[11685] Fix | Delete
authorId,
[11686] Fix | Delete
authors,
[11687] Fix | Delete
postAuthor
[11688] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[11689] Fix | Delete
const {
[11690] Fix | Delete
getUser,
[11691] Fix | Delete
getUsers
[11692] Fix | Delete
} = select(external_wp_coreData_namespaceObject.store);
[11693] Fix | Delete
const {
[11694] Fix | Delete
getEditedPostAttribute
[11695] Fix | Delete
} = select(store_store);
[11696] Fix | Delete
const _authorId = getEditedPostAttribute('author');
[11697] Fix | Delete
const query = {
[11698] Fix | Delete
...AUTHORS_QUERY
[11699] Fix | Delete
};
[11700] Fix | Delete
if (search) {
[11701] Fix | Delete
query.search = search;
[11702] Fix | Delete
}
[11703] Fix | Delete
return {
[11704] Fix | Delete
authorId: _authorId,
[11705] Fix | Delete
authors: getUsers(query),
[11706] Fix | Delete
postAuthor: getUser(_authorId, BASE_QUERY)
[11707] Fix | Delete
};
[11708] Fix | Delete
}, [search]);
[11709] Fix | Delete
const authorOptions = (0,external_wp_element_namespaceObject.useMemo)(() => {
[11710] Fix | Delete
const fetchedAuthors = (authors !== null && authors !== void 0 ? authors : []).map(author => {
[11711] Fix | Delete
return {
[11712] Fix | Delete
value: author.id,
[11713] Fix | Delete
label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(author.name)
[11714] Fix | Delete
};
[11715] Fix | Delete
});
[11716] Fix | Delete
[11717] Fix | Delete
// Ensure the current author is included in the dropdown list.
[11718] Fix | Delete
const foundAuthor = fetchedAuthors.findIndex(({
[11719] Fix | Delete
value
[11720] Fix | Delete
}) => postAuthor?.id === value);
[11721] Fix | Delete
if (foundAuthor < 0 && postAuthor) {
[11722] Fix | Delete
return [{
[11723] Fix | Delete
value: postAuthor.id,
[11724] Fix | Delete
label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(postAuthor.name)
[11725] Fix | Delete
}, ...fetchedAuthors];
[11726] Fix | Delete
}
[11727] Fix | Delete
return fetchedAuthors;
[11728] Fix | Delete
}, [authors, postAuthor]);
[11729] Fix | Delete
return {
[11730] Fix | Delete
authorId,
[11731] Fix | Delete
authorOptions,
[11732] Fix | Delete
postAuthor
[11733] Fix | Delete
};
[11734] Fix | Delete
}
[11735] Fix | Delete
[11736] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/combobox.js
[11737] Fix | Delete
/**
[11738] Fix | Delete
* WordPress dependencies
[11739] Fix | Delete
*/
[11740] Fix | Delete
[11741] Fix | Delete
[11742] Fix | Delete
[11743] Fix | Delete
[11744] Fix | Delete
[11745] Fix | Delete
[11746] Fix | Delete
/**
[11747] Fix | Delete
* Internal dependencies
[11748] Fix | Delete
*/
[11749] Fix | Delete
[11750] Fix | Delete
[11751] Fix | Delete
[11752] Fix | Delete
function PostAuthorCombobox() {
[11753] Fix | Delete
const [fieldValue, setFieldValue] = (0,external_wp_element_namespaceObject.useState)();
[11754] Fix | Delete
const {
[11755] Fix | Delete
editPost
[11756] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[11757] Fix | Delete
const {
[11758] Fix | Delete
authorId,
[11759] Fix | Delete
authorOptions
[11760] Fix | Delete
} = useAuthorsQuery(fieldValue);
[11761] Fix | Delete
[11762] Fix | Delete
/**
[11763] Fix | Delete
* Handle author selection.
[11764] Fix | Delete
*
[11765] Fix | Delete
* @param {number} postAuthorId The selected Author.
[11766] Fix | Delete
*/
[11767] Fix | Delete
const handleSelect = postAuthorId => {
[11768] Fix | Delete
if (!postAuthorId) {
[11769] Fix | Delete
return;
[11770] Fix | Delete
}
[11771] Fix | Delete
editPost({
[11772] Fix | Delete
author: postAuthorId
[11773] Fix | Delete
});
[11774] Fix | Delete
};
[11775] Fix | Delete
[11776] Fix | Delete
/**
[11777] Fix | Delete
* Handle user input.
[11778] Fix | Delete
*
[11779] Fix | Delete
* @param {string} inputValue The current value of the input field.
[11780] Fix | Delete
*/
[11781] Fix | Delete
const handleKeydown = inputValue => {
[11782] Fix | Delete
setFieldValue(inputValue);
[11783] Fix | Delete
};
[11784] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ComboboxControl, {
[11785] Fix | Delete
__nextHasNoMarginBottom: true,
[11786] Fix | Delete
__next40pxDefaultSize: true,
[11787] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Author'),
[11788] Fix | Delete
options: authorOptions,
[11789] Fix | Delete
value: authorId,
[11790] Fix | Delete
onFilterValueChange: (0,external_wp_compose_namespaceObject.debounce)(handleKeydown, 300),
[11791] Fix | Delete
onChange: handleSelect,
[11792] Fix | Delete
allowReset: false,
[11793] Fix | Delete
hideLabelFromVision: true
[11794] Fix | Delete
});
[11795] Fix | Delete
}
[11796] Fix | Delete
[11797] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/select.js
[11798] Fix | Delete
/**
[11799] Fix | Delete
* WordPress dependencies
[11800] Fix | Delete
*/
[11801] Fix | Delete
[11802] Fix | Delete
[11803] Fix | Delete
[11804] Fix | Delete
[11805] Fix | Delete
/**
[11806] Fix | Delete
* Internal dependencies
[11807] Fix | Delete
*/
[11808] Fix | Delete
[11809] Fix | Delete
[11810] Fix | Delete
[11811] Fix | Delete
function PostAuthorSelect() {
[11812] Fix | Delete
const {
[11813] Fix | Delete
editPost
[11814] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
[11815] Fix | Delete
const {
[11816] Fix | Delete
authorId,
[11817] Fix | Delete
authorOptions
[11818] Fix | Delete
} = useAuthorsQuery();
[11819] Fix | Delete
const setAuthorId = value => {
[11820] Fix | Delete
const author = Number(value);
[11821] Fix | Delete
editPost({
[11822] Fix | Delete
author
[11823] Fix | Delete
});
[11824] Fix | Delete
};
[11825] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
[11826] Fix | Delete
__next40pxDefaultSize: true,
[11827] Fix | Delete
__nextHasNoMarginBottom: true,
[11828] Fix | Delete
className: "post-author-selector",
[11829] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Author'),
[11830] Fix | Delete
options: authorOptions,
[11831] Fix | Delete
onChange: setAuthorId,
[11832] Fix | Delete
value: authorId,
[11833] Fix | Delete
hideLabelFromVision: true
[11834] Fix | Delete
});
[11835] Fix | Delete
}
[11836] Fix | Delete
[11837] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/index.js
[11838] Fix | Delete
/**
[11839] Fix | Delete
* WordPress dependencies
[11840] Fix | Delete
*/
[11841] Fix | Delete
[11842] Fix | Delete
[11843] Fix | Delete
[11844] Fix | Delete
/**
[11845] Fix | Delete
* Internal dependencies
[11846] Fix | Delete
*/
[11847] Fix | Delete
[11848] Fix | Delete
[11849] Fix | Delete
[11850] Fix | Delete
[11851] Fix | Delete
const minimumUsersForCombobox = 25;
[11852] Fix | Delete
[11853] Fix | Delete
/**
[11854] Fix | Delete
* Renders the component for selecting the post author.
[11855] Fix | Delete
*
[11856] Fix | Delete
* @return {Component} The component to be rendered.
[11857] Fix | Delete
*/
[11858] Fix | Delete
function PostAuthor() {
[11859] Fix | Delete
const showCombobox = (0,external_wp_data_namespaceObject.useSelect)(select => {
[11860] Fix | Delete
const authors = select(external_wp_coreData_namespaceObject.store).getUsers(AUTHORS_QUERY);
[11861] Fix | Delete
return authors?.length >= minimumUsersForCombobox;
[11862] Fix | Delete
}, []);
[11863] Fix | Delete
if (showCombobox) {
[11864] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostAuthorCombobox, {});
[11865] Fix | Delete
}
[11866] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostAuthorSelect, {});
[11867] Fix | Delete
}
[11868] Fix | Delete
/* harmony default export */ const post_author = (PostAuthor);
[11869] Fix | Delete
[11870] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/check.js
[11871] Fix | Delete
/**
[11872] Fix | Delete
* WordPress dependencies
[11873] Fix | Delete
*/
[11874] Fix | Delete
[11875] Fix | Delete
[11876] Fix | Delete
[11877] Fix | Delete
/**
[11878] Fix | Delete
* Internal dependencies
[11879] Fix | Delete
*/
[11880] Fix | Delete
[11881] Fix | Delete
[11882] Fix | Delete
[11883] Fix | Delete
[11884] Fix | Delete
/**
[11885] Fix | Delete
* Wrapper component that renders its children only if the post type supports the author.
[11886] Fix | Delete
*
[11887] Fix | Delete
* @param {Object} props The component props.
[11888] Fix | Delete
* @param {Element} props.children Children to be rendered.
[11889] Fix | Delete
*
[11890] Fix | Delete
* @return {Component|null} The component to be rendered. Return `null` if the post type doesn't
[11891] Fix | Delete
* supports the author or if there are no authors available.
[11892] Fix | Delete
*/
[11893] Fix | Delete
[11894] Fix | Delete
function PostAuthorCheck({
[11895] Fix | Delete
children
[11896] Fix | Delete
}) {
[11897] Fix | Delete
const {
[11898] Fix | Delete
hasAssignAuthorAction,
[11899] Fix | Delete
hasAuthors
[11900] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[11901] Fix | Delete
var _post$_links$wpActio;
[11902] Fix | Delete
const post = select(store_store).getCurrentPost();
[11903] Fix | Delete
const authors = select(external_wp_coreData_namespaceObject.store).getUsers(AUTHORS_QUERY);
[11904] Fix | Delete
return {
[11905] Fix | Delete
hasAssignAuthorAction: (_post$_links$wpActio = post._links?.['wp:action-assign-author']) !== null && _post$_links$wpActio !== void 0 ? _post$_links$wpActio : false,
[11906] Fix | Delete
hasAuthors: authors?.length >= 1
[11907] Fix | Delete
};
[11908] Fix | Delete
}, []);
[11909] Fix | Delete
if (!hasAssignAuthorAction || !hasAuthors) {
[11910] Fix | Delete
return null;
[11911] Fix | Delete
}
[11912] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_type_support_check, {
[11913] Fix | Delete
supportKeys: "author",
[11914] Fix | Delete
children: children
[11915] Fix | Delete
});
[11916] Fix | Delete
}
[11917] Fix | Delete
[11918] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/panel.js
[11919] Fix | Delete
/**
[11920] Fix | Delete
* WordPress dependencies
[11921] Fix | Delete
*/
[11922] Fix | Delete
[11923] Fix | Delete
[11924] Fix | Delete
[11925] Fix | Delete
[11926] Fix | Delete
[11927] Fix | Delete
/**
[11928] Fix | Delete
* Internal dependencies
[11929] Fix | Delete
*/
[11930] Fix | Delete
[11931] Fix | Delete
[11932] Fix | Delete
[11933] Fix | Delete
[11934] Fix | Delete
[11935] Fix | Delete
[11936] Fix | Delete
function PostAuthorToggle({
[11937] Fix | Delete
isOpen,
[11938] Fix | Delete
onClick
[11939] Fix | Delete
}) {
[11940] Fix | Delete
const {
[11941] Fix | Delete
postAuthor
[11942] Fix | Delete
} = useAuthorsQuery();
[11943] Fix | Delete
const authorName = postAuthor?.name || '';
[11944] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[11945] Fix | Delete
size: "compact",
[11946] Fix | Delete
className: "editor-post-author__panel-toggle",
[11947] Fix | Delete
variant: "tertiary",
[11948] Fix | Delete
"aria-expanded": isOpen
[11949] Fix | Delete
// translators: %s: Current post link.
[11950] Fix | Delete
,
[11951] Fix | Delete
"aria-label": (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('Change author: %s'), authorName),
[11952] Fix | Delete
onClick: onClick,
[11953] Fix | Delete
children: authorName
[11954] Fix | Delete
});
[11955] Fix | Delete
}
[11956] Fix | Delete
[11957] Fix | Delete
/**
[11958] Fix | Delete
* Renders the Post Author Panel component.
[11959] Fix | Delete
*
[11960] Fix | Delete
* @return {Component} The component to be rendered.
[11961] Fix | Delete
*/
[11962] Fix | Delete
function panel_PostAuthor() {
[11963] Fix | Delete
// Use internal state instead of a ref to make sure that the component
[11964] Fix | Delete
// re-renders when the popover's anchor updates.
[11965] Fix | Delete
const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
[11966] Fix | Delete
// Memoize popoverProps to avoid returning a new object every time.
[11967] Fix | Delete
const popoverProps = (0,external_wp_element_namespaceObject.useMemo)(() => ({
[11968] Fix | Delete
// Anchor the popover to the middle of the entire row so that it doesn't
[11969] Fix | Delete
// move around when the label changes.
[11970] Fix | Delete
anchor: popoverAnchor,
[11971] Fix | Delete
placement: 'left-start',
[11972] Fix | Delete
offset: 36,
[11973] Fix | Delete
shift: true
[11974] Fix | Delete
}), [popoverAnchor]);
[11975] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostAuthorCheck, {
[11976] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_panel_row, {
[11977] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Author'),
[11978] Fix | Delete
ref: setPopoverAnchor,
[11979] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
[11980] Fix | Delete
popoverProps: popoverProps,
[11981] Fix | Delete
contentClassName: "editor-post-author__panel-dialog",
[11982] Fix | Delete
focusOnMount: true,
[11983] Fix | Delete
renderToggle: ({
[11984] Fix | Delete
isOpen,
[11985] Fix | Delete
onToggle
[11986] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PostAuthorToggle, {
[11987] Fix | Delete
isOpen: isOpen,
[11988] Fix | Delete
onClick: onToggle
[11989] Fix | Delete
}),
[11990] Fix | Delete
renderContent: ({
[11991] Fix | Delete
onClose
[11992] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[11993] Fix | Delete
className: "editor-post-author",
[11994] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalInspectorPopoverHeader, {
[11995] Fix | Delete
title: (0,external_wp_i18n_namespaceObject.__)('Author'),
[11996] Fix | Delete
onClose: onClose
[11997] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(post_author, {
[11998] Fix | Delete
onClose: onClose
[11999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function