mirror of
git://develop.git.wordpress.org/
synced 2025-03-23 05:20:01 +01:00
Allow passing false
for the meta_box_cb
arg in register_taxonomy()
to turn off the meta box display entirely. fixes #21543.
git-svn-id: https://develop.svn.wordpress.org/trunk@25948 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6af7557201
commit
b2e15261ba
@ -157,7 +157,8 @@ foreach ( get_object_taxonomies( $post ) as $tax_name ) {
|
||||
else
|
||||
$tax_meta_box_id = $tax_name . 'div';
|
||||
|
||||
add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) );
|
||||
if ( false !== $taxonomy->meta_box_cb )
|
||||
add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) );
|
||||
}
|
||||
|
||||
if ( post_type_supports($post_type, 'page-attributes') )
|
||||
|
@ -289,8 +289,10 @@ function is_taxonomy_hierarchical($taxonomy) {
|
||||
* * If not set, the default is inherited from public.
|
||||
* - show_tagcloud - Whether to list the taxonomy in the Tag Cloud Widget.
|
||||
* * If not set, the default is inherited from show_ui.
|
||||
* - meta_box_cb - Provide a callback function for the meta box display. Defaults to
|
||||
* post_categories_meta_box for hierarchical taxonomies and post_tags_meta_box for non-hierarchical.
|
||||
* - meta_box_cb - Provide a callback function for the meta box display.
|
||||
* * If not set, defaults to post_categories_meta_box for hierarchical taxonomies
|
||||
* and post_tags_meta_box for non-hierarchical.
|
||||
* * If false, no meta box is shown.
|
||||
* - capabilities - Array of capabilities for this taxonomy.
|
||||
* * You can see accepted values in this function.
|
||||
* - rewrite - Triggers the handling of rewrites for this taxonomy. Defaults to true, using $taxonomy as slug.
|
||||
|
Loading…
x
Reference in New Issue
Block a user