Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editor: Add Page Attributes panel #57151

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { store as interfaceStore } from '@wordpress/interface';
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
import {
store as editorStore,
PageAttributesPanel,
PostDiscussionPanel,
PostExcerptPanel,
PostFeaturedImagePanel,
Expand All @@ -25,7 +26,6 @@ import {
*/
import SettingsHeader from '../settings-header';
import PostStatus from '../post-status';
import PageAttributes from '../page-attributes';
import MetaBoxes from '../../meta-boxes';
import PluginDocumentSettingPanel from '../plugin-document-setting-panel';
import PluginSidebarEditPost from '../plugin-sidebar';
Expand Down Expand Up @@ -86,7 +86,7 @@ const SidebarContent = ( {
<PostFeaturedImagePanel />
<PostExcerptPanel />
<PostDiscussionPanel />
<PageAttributes />
<PageAttributesPanel />
<MetaBoxes location="side" />
</>
) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { decodeEntities } from '@wordpress/html-entities';
import {
PageAttributesPanel,
PostDiscussionPanel,
PostExcerptPanel,
PostFeaturedImagePanel,
Expand Down Expand Up @@ -106,6 +107,7 @@ export default function PagePanels() {
<PostFeaturedImagePanel />
<PostExcerptPanel />
<PostDiscussionPanel />
<PageAttributesPanel />
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { useSelect } from '@wordpress/data';
import { PanelBody } from '@wordpress/components';
import {
PageAttributesPanel,
PostDiscussionPanel,
PostExcerptPanel,
PostFeaturedImagePanel,
Expand Down Expand Up @@ -70,6 +71,7 @@ export default function TemplatePanel() {
<PostFeaturedImagePanel />
<PostExcerptPanel />
<PostDiscussionPanel />
<PageAttributesPanel />
</>
);
}
1 change: 1 addition & 0 deletions packages/editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export { default as ErrorBoundary } from './error-boundary';
export { default as LocalAutosaveMonitor } from './local-autosave-monitor';
export { default as PageAttributesCheck } from './page-attributes/check';
export { default as PageAttributesOrder } from './page-attributes/order';
export { default as PageAttributesPanel } from './page-attributes/panel';
export { default as PageAttributesParent } from './page-attributes/parent';
export { default as PageTemplate } from './post-template/classic-theme';
export { default as PostTemplatePanel } from './post-template/panel';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
*/
import { __ } from '@wordpress/i18n';
import { PanelBody, PanelRow } from '@wordpress/components';
import {
store as editorStore,
PageAttributesCheck,
PageAttributesOrder,
PageAttributesParent,
} from '@wordpress/editor';

import { useSelect, useDispatch } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';

/**
* Module Constants
* Internal dependencies
*/
import { store as editorStore } from '../../store';
import PageAttributesCheck from './check';
import PageAttributesOrder from './order';
import PageAttributesParent from './parent';

const PANEL_NAME = 'page-attributes';

export function PageAttributes() {
export function PageAttributesPanel() {
const { isEnabled, isOpened, postType } = useSelect( ( select ) => {
const {
getEditedPostAttribute,
Expand Down Expand Up @@ -59,4 +59,4 @@ export function PageAttributes() {
);
}

export default PageAttributes;
export default PageAttributesPanel;
Loading