register_taxonomy_for_object_type [ WordPress Function ]
register_taxonomy_for_object_type ( $taxonomy, $object_type )
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: register_taxonomy, register_post_type, register_theme_directory, wp_get_term_taxonomy_parent_id, register_admin_color_schemes
Add an already registered taxonomy to an object type.
Source
<?php
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;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/register taxonomy for object type « WordPress ...
Description. This function adds an already registered taxonomy to an (custom) object type. It takes in a name, an object name that it affects. It returns true on ...
codex.wordpress.org - (register_taxonomy_for_object_type('post_tag' - WordPress Trac
register_taxonomy_for_object_type('post_tag', 'page') does not include all ... I use register_taxonomy_for_object_type('post_tag', 'page'); in my plugin ...
core.trac.wordpress.org - Adding Categories And Post Tags Boxes For Custom Post Type In ...
Jul 4, 2010 ... To solve this problem, you can add them (categories and post tags boxes) later using register_taxonomy_for_object_type() function like this: ...
www.deluxeblogtips.com - Add Tags and Categories to Your WordPress Page
Sep 29, 2010 ... Note – As pointed out by XYDAC metaboxes automatically get added as part of the register_taxonomy_for_object_type function. Therefore, we ...
shibashake.com