Changeset 61077 for trunk/src/wp-includes/blocks/term-template.php
- Timestamp:
- 10/28/2025 12:24:06 PM (10 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/term-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/term-template.php
r61009 r61077 39 39 $queried_object = get_queried_object(); 40 40 41 // For hierarchical taxonomies, show directchildren of the current term.41 // For hierarchical taxonomies, show children of the current term. 42 42 // For non-hierarchical taxonomies, show all terms (don't set parent). 43 43 if ( is_taxonomy_hierarchical( $queried_object->taxonomy ) ) { 44 $query_args['parent'] = $queried_object->term_id; 44 // If showNested is true, use child_of to include nested terms. 45 // Otherwise, use parent to show only direct children. 46 if ( ! empty( $query['showNested'] ) ) { 47 $query_args['child_of'] = $queried_object->term_id; 48 } else { 49 $query_args['parent'] = $queried_object->term_id; 50 } 45 51 } 46 52 $query_args['taxonomy'] = $queried_object->taxonomy;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)