Introduce Custom Taxonomies Translation strings, Correctly identifies the taxonomy in the Strings of the edit pages. See #11838
git-svn-id: https://develop.svn.wordpress.org/trunk@13083 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a719ecc0a2
commit
d8006b5939
@ -18,6 +18,7 @@ function create_initial_taxonomies() {
|
|||||||
register_taxonomy( 'category', 'post', array( 'hierarchical' => true,
|
register_taxonomy( 'category', 'post', array( 'hierarchical' => true,
|
||||||
'update_count_callback' => '_update_post_term_count',
|
'update_count_callback' => '_update_post_term_count',
|
||||||
'label' => __('Categories'),
|
'label' => __('Categories'),
|
||||||
|
'singular_label' => __('Category'),
|
||||||
'query_var' => false,
|
'query_var' => false,
|
||||||
'rewrite' => false
|
'rewrite' => false
|
||||||
) ) ;
|
) ) ;
|
||||||
@ -26,6 +27,7 @@ function create_initial_taxonomies() {
|
|||||||
'hierarchical' => false,
|
'hierarchical' => false,
|
||||||
'update_count_callback' => '_update_post_term_count',
|
'update_count_callback' => '_update_post_term_count',
|
||||||
'label' => __('Post Tags'),
|
'label' => __('Post Tags'),
|
||||||
|
'singular_label' => __('Post Tag'),
|
||||||
'query_var' => false,
|
'query_var' => false,
|
||||||
'rewrite' => false
|
'rewrite' => false
|
||||||
) ) ;
|
) ) ;
|
||||||
@ -212,6 +214,9 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
|||||||
if ( empty($args[$cap]) )
|
if ( empty($args[$cap]) )
|
||||||
$args[$cap] = 'manage_categories';
|
$args[$cap] = 'manage_categories';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( empty($args['singular_label']) )
|
||||||
|
$args['singular_label'] = $args['label'];
|
||||||
|
|
||||||
$args['name'] = $taxonomy;
|
$args['name'] = $taxonomy;
|
||||||
$args['object_type'] = (array) $object_type;
|
$args['object_type'] = (array) $object_type;
|
||||||
|
Loading…
Reference in New Issue
Block a user