Changeset 38337
- Timestamp:
- 08/23/2016 02:44:19 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-term-query.php
r38275 r38337 209 209 'update_term_meta_cache' => true, 210 210 'meta_query' => '', 211 'meta_key' => '', 212 'meta_value' => '', 213 'meta_type' => '', 214 'meta_compare' => '', 211 215 ); 212 216 -
trunk/tests/phpunit/tests/term/getTerms.php
r37634 r38337 10 10 _clean_term_filters(); 11 11 wp_cache_delete( 'last_changed', 'terms' ); 12 } 13 14 /** 15 * @ticket 37568 16 */ 17 public function test_meta_query_args_only() { 18 register_taxonomy( 'wptests_tax', 'post', array( 'hierarchical' => true ) ); 19 20 $term1 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 21 $term2 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax' ) ); 22 23 $post = self::factory()->post->create( array( 'post_type' => 'post' ) ); 24 25 update_term_meta( $term1, 'somekey', 'thevalue' ); 26 27 wp_set_post_terms( $post, array( $term1, $term2 ), 'wptests_tax' ); 28 29 $found = get_terms( array( 30 'meta_key' => 'somekey', 31 'meta_value' => 'thevalue', 32 ) ); 33 34 $this->assertEqualSets( array( $term1 ), wp_list_pluck( $found, 'term_id' ) ); 12 35 } 13 36
Note: See TracChangeset
for help on using the changeset viewer.