Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
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 @@ -55,8 +55,8 @@ export default function TermsQueryInspectorControls( {
templateSlug?.startsWith( 'taxonomy-' ) ||
templateSlug?.startsWith( 'category-' ) ||
templateSlug?.startsWith( 'tag-' );
// Only display the showNested control if the taxonomy is hierarchical and not inheriting.
const displayShowNestedControl = isTaxonomyHierarchical && ! inheritQuery;
// Display the showNested control if the taxonomy is hierarchical.
const displayShowNestedControl = isTaxonomyHierarchical;
const hasIncludeFilter = !! include?.length;

// Labels shared between ToolsPanelItem and its child control.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ export default function InheritControl( { value, onChange, label } ) {
onChange={ ( newValue ) => {
onChange( {
inherit: newValue === 'default',
// When enabling inherit, hierarchical is not supported.
...( newValue === 'default' ? { showNested: false } : {} ),
} );
} }
help={
value
? __(
'Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows direct children of the current term. For non-hierarchical taxonomies, shows all terms.'
'Display terms based on the current taxonomy archive. For hierarchical taxonomies, choose between showing nested terms or only direct children.'
)
: __( 'Display terms based on specific criteria.' )
}
Expand Down
Loading