Skip to content
Merged
Changes from all 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
Query Loop: Fix condition for displaying 'parents' control
The logical NOT here is a typo. The Query Loop block should display the filter for hierarchical post types; unless the `allowedControls` list omits the control filter.
  • Loading branch information
Mamaduka committed Oct 2, 2022
commit 5b4da51acb5de5d2f337a6e8c76189f20745bf60
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,7 @@ export default function QueryInspectorControls( {
</ToolsPanelItem>
) }
{ isPostTypeHierarchical &&
! isControlAllowed(
allowedControls,
'parents'
) && (
isControlAllowed( allowedControls, 'parents' ) && (
<ToolsPanelItem
hasValue={ () => !! parents?.length }
label={ __( 'Parents' ) }
Expand Down