- Timestamp:
- 11/03/2019 11:12:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r46609 r46646 270 270 271 271 $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) ); 272 273 if ( ! empty( $request['tax_relation'] ) ) { 274 $query_args['tax_query'] = array( 'relation' => $request['tax_relation'] ); 275 } 272 276 273 277 foreach ( $taxonomies as $taxonomy ) { … … 2532 2536 $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) ); 2533 2537 2538 if ( ! empty( $taxonomies ) ) { 2539 $query_params['tax_relation'] = array( 2540 'description' => __( 'Limit result set based on relationship between multiple taxonomies.' ), 2541 'type' => 'string', 2542 'enum' => array( 'AND', 'OR' ), 2543 ); 2544 } 2545 2534 2546 foreach ( $taxonomies as $taxonomy ) { 2535 2547 $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name;
Note: See TracChangeset
for help on using the changeset viewer.