- Timestamp:
- 05/26/2021 02:15:51 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r51000 r51026 2942 2942 $terms = array(); 2943 2943 $include_children = false; 2944 $operator = 'IN'; 2944 2945 2945 2946 if ( rest_is_array( $tax_include ) ) { … … 2948 2949 $terms = empty( $tax_include['terms'] ) ? array() : $tax_include['terms']; 2949 2950 $include_children = ! empty( $tax_include['include_children'] ); 2951 2952 if ( isset( $tax_include['operator'] ) && 'AND' === $tax_include['operator'] ) { 2953 $operator = 'AND'; 2954 } 2950 2955 } 2951 2956 … … 2956 2961 'terms' => $terms, 2957 2962 'include_children' => $include_children, 2963 'operator' => $operator, 2958 2964 ); 2959 2965 } … … 3049 3055 $limit_schema 3050 3056 ); 3057 // 'operator' is supported only for 'include' queries. 3058 $include_schema['oneOf'][1]['properties']['operator'] = array( 3059 'description' => __( 'Whether items must be assigned all or any of the specified terms.' ), 3060 'type' => 'string', 3061 'enum' => array( 'AND', 'OR' ), 3062 'default' => 'OR', 3063 ); 3064 3051 3065 $exclude_schema = array_merge( 3052 3066 array(
Note: See TracChangeset
for help on using the changeset viewer.