Definition:
function register_taxonomy_for_object_type( $taxonomy, $object_type) {}
Add an already registered taxonomy to an object type.
Parameters
- string $taxonomy: Name of taxonomy object
- array|string $object_type: Name of the object type
Return values
returns:True if successful, false if not
Source code
function register_taxonomy_for_object_type( $taxonomy, $object_type) {
global $wp_taxonomies;
if ( !isset($wp_taxonomies[$taxonomy]) )
return false;
if ( ! get_post_type_object($object_type) )
return false;
if ( ! in_array( $object_type, $wp_taxonomies[$taxonomy]->object_type ) )
$wp_taxonomies[$taxonomy]->object_type[] = $object_type;
return true;
}
2687

February 12, 2011 


No comments yet... Be the first to leave a reply!