mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 15:47:38 +02:00
Use the 'not_found'
label when there are no items for a taxonomy in the terms list table.
Props SergeyBiryukov. Fixes #30586. Built from https://develop.svn.wordpress.org/trunk@31035 git-svn-id: http://core.svn.wordpress.org/trunk@31016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
af0e5cc851
commit
190165cb32
@ -112,6 +112,10 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function no_items() {
|
||||||
|
echo get_taxonomy( $this->screen->taxonomy )->labels->not_found;
|
||||||
|
}
|
||||||
|
|
||||||
protected function get_bulk_actions() {
|
protected function get_bulk_actions() {
|
||||||
$actions = array();
|
$actions = array();
|
||||||
$actions['delete'] = __( 'Delete' );
|
$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.
|
* - 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.
|
* - 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 - 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).
|
* 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 ),
|
'separate_items_with_commas' => array( __( 'Separate tags with commas' ), null ),
|
||||||
'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.' ), null ),
|
'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
|
||||||
);
|
);
|
||||||
$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.2-alpha-31034';
|
$wp_version = '4.2-alpha-31035';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user