Changeset 39578
- Timestamp:
- 12/12/2016 05:46:37 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r39475 r39578 1878 1878 $object_ids = array_map('intval', $object_ids); 1879 1879 1880 $args = wp_parse_args( $args ); 1881 1880 1882 $args['taxonomy'] = $taxonomies; 1881 1883 $args['object_ids'] = $object_ids; -
trunk/tests/phpunit/tests/term/wpGetObjectTerms.php
r38667 r39578 691 691 return $terms; 692 692 } 693 694 public function test_verify_args_parameter_can_be_string() { 695 $p = self::factory()->post->create(); 696 697 $t1 = self::factory()->term->create( array( 698 'taxonomy' => $this->taxonomy, 699 'name' => 'AAA', 700 ) ); 701 $t2 = self::factory()->term->create( array( 702 'taxonomy' => $this->taxonomy, 703 'name' => 'ZZZ', 704 ) ); 705 $t3 = self::factory()->term->create( array( 706 'taxonomy' => $this->taxonomy, 707 'name' => 'JJJ', 708 ) ); 709 710 wp_set_object_terms( $p, array( $t1, $t2, $t3 ), $this->taxonomy ); 711 712 $found = wp_get_object_terms( $p, $this->taxonomy, 'orderby=name&fields=ids' ); 713 714 $this->assertEquals( array( $t1, $t3, $t2 ), $found ); 715 } 693 716 }
Note: See TracChangeset
for help on using the changeset viewer.