Set taxonomy label if none given.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-02-20 22:21:20 +00:00
parent 4d203a02c6
commit 94a42d9ba2
1 changed files with 4 additions and 0 deletions

View File

@ -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';