Skip to content

Commit

Permalink
Merge pull request #268 from 10up/fix/267
Browse files Browse the repository at this point in the history
Ensure all Podcast terms show in the editor sidebar
  • Loading branch information
Sidsector9 authored Jan 11, 2024
2 parents c1b2270 + 321befc commit 566573e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion assets/js/create-podcast-show.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ import { useSelect, dispatch } from "@wordpress/data";
// `wp` namespace instead of @wordpress NPM packages for the following.
const { store: editorStore } = wp.editor;
const { store: coreDataStore } = wp.coreData;
const DEFAULT_QUERY = {
per_page: -1,
orderby: 'name',
order: 'asc',
_fields: 'id,name,parent',
context: 'view',
};

const CreatePodcastShowModal = ( { isModalOpen, closeModal } ) => {
const [ showName, setShowName ] = useState( '' );
Expand Down Expand Up @@ -238,7 +245,7 @@ const CreatePodcastShowPlugin = () => {
const { getCurrentPostId } = select( editorStore );

return {
allPodcasts: getEntityRecords( 'taxonomy', 'podcasting_podcasts' ) || [],
allPodcasts: getEntityRecords( 'taxonomy', 'podcasting_podcasts', DEFAULT_QUERY ) || [],
attachedPodcasts: getEntityRecords( 'taxonomy', 'podcasting_podcasts', { post: getCurrentPostId() } ) || [],
currentPostId: getCurrentPostId(),
}
Expand Down

0 comments on commit 566573e

Please sign in to comment.