From 63238b1667ea1b03befe0954120678e54b667c01 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 20 Feb 2010 22:21:20 +0000 Subject: [PATCH] Set taxonomy label if none given. git-svn-id: https://develop.svn.wordpress.org/trunk@13258 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/taxonomy.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 3bc5b81526..2036017576 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -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';