Set taxonomy label if none given.
git-svn-id: https://develop.svn.wordpress.org/trunk@13258 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f97af13505
commit
63238b1667
@ -209,6 +209,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||
'query_var' => $taxonomy,
|
||||
'public' => true,
|
||||
'show_ui' => null,
|
||||
'label' => null,
|
||||
'_builtin' => false
|
||||
);
|
||||
$args = wp_parse_args($args, $defaults);
|
||||
@ -234,6 +235,9 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||
if ( is_null($args['show_ui']) )
|
||||
$args['show_ui'] = $args['public'];
|
||||
|
||||
if ( is_null($args['label'] ) )
|
||||
$args['label'] = $taxonomy;
|
||||
|
||||
foreach ( array('manage_cap', 'edit_cap', 'delete_cap') as $cap ) {
|
||||
if ( empty($args[$cap]) )
|
||||
$args[$cap] = 'manage_categories';
|
||||
|
Loading…
Reference in New Issue
Block a user