Skip to content

Commit

Permalink
update internal usage of publishpanel slot fills
Browse files Browse the repository at this point in the history
  • Loading branch information
gaambo committed Apr 10, 2024
1 parent c06104a commit 6c15226
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { blockDefault } from '@wordpress/icons';
import CompactList from '../../components/compact-list';
import { store as blockDirectoryStore } from '../../store';

// We shouldn't import the edit-post package directly
// because it would include the wp-edit-post in all pages loading the block-directory script.
const { PluginPrePublishPanel } = window?.wp?.editPost ?? {};
// We shouldn't import the editor package directly
// because it would include the wp-editor in all pages loading the block-directory script.
const { PluginPrePublishPanel } = window?.wp?.editor ?? {};

export default function InstalledBlocksPrePublishPanel() {
const newBlockTypes = useSelect(
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/plugins/plugins-api/publish-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
const Fragment = wp.element.Fragment;
const __ = wp.i18n.__;
const registerPlugin = wp.plugins.registerPlugin;
const PluginPostPublishPanel = wp.editPost.PluginPostPublishPanel;
const PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;
const PluginPostPublishPanel = wp.editor.PluginPostPublishPanel;
const PluginPrePublishPanel = wp.editor.PluginPrePublishPanel;

function PanelContent() {
return el( 'p', {}, __( 'Here is the panel content!' ) );
Expand Down

0 comments on commit 6c15226

Please sign in to comment.