Ticket #6357: 6357-multitype.diff
File 6357-multitype.diff, 2.0 KB (added by , 16 years ago) |
---|
-
wp-includes/taxonomy.php
34 34 * 35 35 * @uses $wp_taxonomies 36 36 * 37 * @param string $object_type Name of the type of taxonomy object37 * @param array|string $object_type Name of the type of taxonomy object 38 38 * @return array The names of all taxonomy of $object_type. 39 39 */ 40 40 function get_object_taxonomies($object_type) { … … 42 42 43 43 $taxonomies = array(); 44 44 foreach ( $wp_taxonomies as $taxonomy ) { 45 if ( $object_type === $taxonomy->object_type)45 if ( in_array($object_type, (array) $taxonomy->object_type) ) 46 46 $taxonomies[] = $taxonomy->name; 47 47 } 48 48 … … 141 141 * @uses $wp_taxonomies Inserts new taxonomy object into the list 142 142 * 143 143 * @param string $taxonomy Name of taxonomy object 144 * @param string $object_type Name of the object type for the taxonomy object.144 * @param array|string $object_type Name of the object type for the taxonomy object. 145 145 * @param array|string $args See above description for the two keys values. 146 146 */ 147 147 function register_taxonomy( $taxonomy, $object_type, $args = array() ) { … … 1556 1556 * Passes, function params in same order. 1557 1557 * 1558 1558 * @param int|array $object_ids Single or list of term object ID(s) 1559 * @param string $object_type The taxonomy object type1559 * @param array|string $object_type The taxonomy object type 1560 1560 */ 1561 1561 function clean_object_term_cache($object_ids, $object_type) { 1562 1562 if ( !is_array($object_ids) ) … … 1652 1652 * @uses wp_get_object_terms() Used to get terms from the database to update 1653 1653 * 1654 1654 * @param string|array $object_ids Single or list of term object ID(s) 1655 * @param string $object_type The taxonomy object type1655 * @param array|string $object_type The taxonomy object type 1656 1656 * @return null|bool Null value is given with empty $object_ids. False if 1657 1657 */ 1658 1658 function update_object_term_cache($object_ids, $object_type) {