Skip to content

Commit

Permalink
enhance ignore list for post types, add readme about it
Browse files Browse the repository at this point in the history
  • Loading branch information
janwidmer-work committed Feb 7, 2022
1 parent f0e7e99 commit 3aa4c05
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/assets/js/select-dynamic-control.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ const { __ } = wp.i18n;
const { withInstanceId, compose} = wp.compose;
const { SelectControl } = wp.components;

const postTypesToIgnore = ['pages', 'media', 'blocks', 'lazyblocks', 'lazyblocks_templates'];
const postTypesToIgnore = [
'pages',
'media',
'blocks',
'menu-items',
'navigation',
'templates',
'template-parts',
'lazyblocks',
'lazyblocks_templates'
];

class SelectDynamicControl extends Component {
render () {
Expand Down
7 changes: 7 additions & 0 deletions src/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ The custom control is using the `getEntityRecords` method.
a while, as the whole page object get's loaded
* To use a custom taxonomy type, make sure to activate the REST option in the `register_taxonomy` function by adding `'show_in_rest' => true,`
* Parent Entity Restriction does only work for Pages / Categories / Custom Taxonomies, as other Entity Types (e.g. Posts / Tags) cannot be nested
* For the `entityType` `post-type`, an ignore list excludes all wordpress related post types:
* `pages`, `media`, `blocks`, `menu-items`, `navigation`, `templates`, `template-parts`, `lazyblocks`, `lazyblocks_templates`

## Installation

Expand Down Expand Up @@ -65,6 +67,11 @@ You can use the custom control exactly how you use normal controls for lazy bloc

## Changelog

= 2.2.0 =

* Add more post types to ignore list, add docs about ignore list
* changed compatibility to WP version to 5.9.0

= 2.1.5 =

* changed compatibility to WP version to 5.8.2
Expand Down

0 comments on commit 3aa4c05

Please sign in to comment.