Changeset 7507

Show
Ignore:
Timestamp:
03/24/08 22:43:20 (5 months ago)
Author:
ryan
Message:

Accept array of object types when registering a taxonomy. Props andy. see #6357

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/taxonomy.php

    r7491 r7507  
    3535 * @uses $wp_taxonomies 
    3636 * 
    37  * @param string $object_type Name of the type of taxonomy object 
     37 * @param array|string $object_type Name of the type of taxonomy object 
    3838 * @return array The names of all taxonomy of $object_type. 
    3939 */ 
     
    4343    $taxonomies = array(); 
    4444    foreach ( $wp_taxonomies as $taxonomy ) { 
    45         if ( $object_type === $taxonomy->object_type
     45        if ( in_array($object_type, (array) $taxonomy->object_type)
    4646            $taxonomies[] = $taxonomy->name; 
    4747    } 
     
    142142 * 
    143143 * @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. 
    145145 * @param array|string $args See above description for the two keys values. 
    146146 */ 
     
    15571557 * 
    15581558 * @param int|array $object_ids Single or list of term object ID(s) 
    1559  * @param string $object_type The taxonomy object type 
     1559 * @param array|string $object_type The taxonomy object type 
    15601560 */ 
    15611561function clean_object_term_cache($object_ids, $object_type) { 
     
    16531653 * 
    16541654 * @param string|array $object_ids Single or list of term object ID(s) 
    1655  * @param string $object_type The taxonomy object type 
     1655 * @param array|string $object_type The taxonomy object type 
    16561656 * @return null|bool Null value is given with empty $object_ids. False if 
    16571657 */