Introduce a `no_terms` label for taxonomies. This label is used when indicating that there are no terms in the given taxonomy associated with an object.
Fixes #32150 Props afercia Built from https://develop.svn.wordpress.org/trunk@32933 git-svn-id: http://core.svn.wordpress.org/trunk@32904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
af4f2bd1e8
commit
b5973e92ec
|
@ -509,7 +509,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
||||||
/* translators: used between list items, there is a space after the comma */
|
/* translators: used between list items, there is a space after the comma */
|
||||||
echo join( __( ', ' ), $out );
|
echo join( __( ', ' ), $out );
|
||||||
} else {
|
} else {
|
||||||
echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . get_taxonomy( $taxonomy )->labels->not_found . '</span>';
|
echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . get_taxonomy( $taxonomy )->labels->no_terms . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -903,7 +903,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||||
/* translators: used between list items, there is a space after the comma */
|
/* translators: used between list items, there is a space after the comma */
|
||||||
echo join( __( ', ' ), $out );
|
echo join( __( ', ' ), $out );
|
||||||
} else {
|
} else {
|
||||||
echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . $taxonomy_object->labels->not_found . '</span>';
|
echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . $taxonomy_object->labels->no_terms . '</span>';
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -472,12 +472,14 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||||
* - add_or_remove_items - This string isn't used on hierarchical taxonomies. Default is "Add or remove tags", used in the meta box when JavaScript is disabled.
|
* - add_or_remove_items - This string isn't used on hierarchical taxonomies. Default is "Add or remove tags", used in the meta box when JavaScript is disabled.
|
||||||
* - choose_from_most_used - This string isn't used on hierarchical taxonomies. Default is "Choose from the most used tags", used in the meta box.
|
* - choose_from_most_used - This string isn't used on hierarchical taxonomies. Default is "Choose from the most used tags", used in the meta box.
|
||||||
* - not_found - Default is "No tags found"/"No categories found", used in the meta box and taxonomy list table.
|
* - not_found - Default is "No tags found"/"No categories found", used in the meta box and taxonomy list table.
|
||||||
|
* - no_terms - Default is "No tags"/"No categories", used in the posts and media list tables.
|
||||||
*
|
*
|
||||||
* Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories).
|
* Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories).
|
||||||
*
|
*
|
||||||
* @todo Better documentation for the labels array.
|
* @todo Better documentation for the labels array.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
|
* @since 4.3.0 Added the `no_terms` label.
|
||||||
*
|
*
|
||||||
* @param object $tax Taxonomy object.
|
* @param object $tax Taxonomy object.
|
||||||
* @return object object with all the labels as member variables.
|
* @return object object with all the labels as member variables.
|
||||||
|
@ -508,6 +510,7 @@ function get_taxonomy_labels( $tax ) {
|
||||||
'add_or_remove_items' => array( __( 'Add or remove tags' ), null ),
|
'add_or_remove_items' => array( __( 'Add or remove tags' ), null ),
|
||||||
'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ),
|
'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ),
|
||||||
'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
|
'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
|
||||||
|
'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ),
|
||||||
);
|
);
|
||||||
$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
|
$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-alpha-32932';
|
$wp_version = '4.3-alpha-32933';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue