forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query Loop: Default to querying posts when on singular content (WordP…
…ress#65067) * Fix linter warnings * Replace the postType if current post type is different * Remove currentPostType logic * Default to posts if is_singular * Update test_rendering_post_template_with_main_query_loop_already_started test * Add test for query loop not inside a singular query * Revert changes to QueryContent * Show query type control only when on a template * Move template logic to QueryInspectorControls * Ensure inherit value is updated when not in a template * Update comment * Rename showDefaultControl to isTemplate * Get postType from context * Add a check for singular content based on available post type * Move inherit reset to a useEffect * Move isTemplate logic to QueryContent * Fix lint warnings Unlinked contributors: alaczek, autumnfjeld. Co-authored-by: mikachan <[email protected]> Co-authored-by: fabiankaegy <[email protected]> Co-authored-by: creativecoder <[email protected]> Co-authored-by: jameskoster <[email protected]> Co-authored-by: richtabor <[email protected]> Co-authored-by: jasmussen <[email protected]>
- Loading branch information
1 parent
bf63906
commit 623f268
Showing
5 changed files
with
122 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters