Use the 'not_found'
label when there are no items for a taxonomy in the terms list table.
Props SergeyBiryukov. Fixes #30586. git-svn-id: https://develop.svn.wordpress.org/trunk@31035 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
47f2c42528
commit
ca8fe1a7a4
@ -112,6 +112,10 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function no_items() {
|
||||
echo get_taxonomy( $this->screen->taxonomy )->labels->not_found;
|
||||
}
|
||||
|
||||
protected function get_bulk_actions() {
|
||||
$actions = array();
|
||||
$actions['delete'] = __( 'Delete' );
|
||||
|
@ -450,7 +450,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||
* - separate_items_with_commas - This string isn't used on hierarchical taxonomies. Default is "Separate tags with commas", used in the meta box.
|
||||
* - 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.
|
||||
* - not_found - This string isn't used on hierarchical taxonomies. Default is "No tags found", used in the meta box.
|
||||
* - not_found - Default is "No tags found"/"No categories found", used in the meta box and taxonomy list table.
|
||||
*
|
||||
* Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories).
|
||||
*
|
||||
@ -484,7 +484,7 @@ function get_taxonomy_labels( $tax ) {
|
||||
'separate_items_with_commas' => array( __( 'Separate tags with commas' ), null ),
|
||||
'add_or_remove_items' => array( __( 'Add or remove tags' ), null ),
|
||||
'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ),
|
||||
'not_found' => array( __( 'No tags found.' ), null ),
|
||||
'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
|
||||
);
|
||||
$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user