mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Allow passing false
for the meta_box_cb
arg in register_taxonomy()
to turn off the meta box display entirely. fixes #21543.
Built from https://develop.svn.wordpress.org/trunk@25948 git-svn-id: http://core.svn.wordpress.org/trunk@25907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a59389fc06
commit
7fa704d972
@ -157,7 +157,8 @@ foreach ( get_object_taxonomies( $post ) as $tax_name ) {
|
|||||||
else
|
else
|
||||||
$tax_meta_box_id = $tax_name . 'div';
|
$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') )
|
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.
|
* * If not set, the default is inherited from public.
|
||||||
* - show_tagcloud - Whether to list the taxonomy in the Tag Cloud Widget.
|
* - show_tagcloud - Whether to list the taxonomy in the Tag Cloud Widget.
|
||||||
* * If not set, the default is inherited from show_ui.
|
* * If not set, the default is inherited from show_ui.
|
||||||
* - meta_box_cb - Provide a callback function for the meta box display. Defaults to
|
* - meta_box_cb - Provide a callback function for the meta box display.
|
||||||
* post_categories_meta_box for hierarchical taxonomies and post_tags_meta_box for non-hierarchical.
|
* * 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.
|
* - capabilities - Array of capabilities for this taxonomy.
|
||||||
* * You can see accepted values in this function.
|
* * You can see accepted values in this function.
|
||||||
* - rewrite - Triggers the handling of rewrites for this taxonomy. Defaults to true, using $taxonomy as slug.
|
* - rewrite - Triggers the handling of rewrites for this taxonomy. Defaults to true, using $taxonomy as slug.
|
||||||
|
Loading…
Reference in New Issue
Block a user