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

Add PluginDocumentSettingPanel in template inspector controls #60961

Merged
merged 3 commits into from
Apr 23, 2024
Merged
Changes from 1 commit
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 @@ -8,10 +8,16 @@
import { store as editorStore } from '@wordpress/editor';
import { useSelect } from '@wordpress/data';
import { createSlotFill } from '@wordpress/components';
import deprecated from '@wordpress/deprecated';

const { Fill, Slot } = createSlotFill( 'PluginTemplateSettingPanel' );

const PluginTemplateSettingPanel = ( { children } ) => {
deprecated( 'wp.editSite.PluginTemplateSettingPanel', {
since: '6.6',
version: '6.8',
alternative: 'wp.editor.PluginDocumentSettingPanel',
} );
const isCurrentEntityTemplate = useSelect(
( select ) =>
select( editorStore ).getCurrentPostType() === 'wp_template',
Expand All @@ -29,6 +35,8 @@ PluginTemplateSettingPanel.Slot = Slot;
* Renders items in the Template Sidebar below the main information
* like the Template Card.
*
* @deprecated since 6.6. Use `wp.editor.PluginDocumentSettingPanel` instead.
*
* @example
* ```jsx
* // Using ESNext syntax
Expand Down
Loading