diff --git a/assets/js/create-podcast-show.js b/assets/js/create-podcast-show.js index c54c3db..6c7fdfd 100644 --- a/assets/js/create-podcast-show.js +++ b/assets/js/create-podcast-show.js @@ -1,5 +1,5 @@ import { registerPlugin } from "@wordpress/plugins"; -import { PluginDocumentSettingPanel, store as editPostStore } from '@wordpress/edit-post'; +import { store as editPostStore } from '@wordpress/edit-post'; import { __ } from "@wordpress/i18n"; import { Button, @@ -15,6 +15,10 @@ import { import { MediaUpload, MediaUploadCheck } from '@wordpress/block-editor'; import { useState, useEffect } from "@wordpress/element"; import { useSelect, dispatch } from "@wordpress/data"; + +// Once WordPress 6.6 becomes our minimum, change this back to `import { PluginDocumentSettingPanel } from '@wordpress/editor';`. +const PluginDocumentSettingPanel = wp.editor?.PluginDocumentSettingPanel ?? ( wp.editPost?.PluginDocumentSettingPanel ?? wp.editSite?.PluginDocumentSettingPanel ); + // Due to unsupported versions of React, we're importing stores from the // `wp` namespace instead of @wordpress NPM packages for the following. const { store: editorStore } = wp.editor;