WordPress.org

Make WordPress Core

Changeset 32933


Ignore:
Timestamp:
06/25/2015 12:15:46 AM (4 years ago)
Author:
johnbillion
Message:

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

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r32805 r32933  
    510510                echo join( __( ', ' ), $out );
    511511            } else {
    512                 echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . get_taxonomy( $taxonomy )->labels->not_found . '</span>';
     512                echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . get_taxonomy( $taxonomy )->labels->no_terms . '</span>';
    513513            }
    514514
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r32903 r32933  
    904904                echo join( __( ', ' ), $out );
    905905            } else {
    906                 echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . $taxonomy_object->labels->not_found . '</span>';
     906                echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . $taxonomy_object->labels->no_terms . '</span>';
    907907            }
    908908            return;
  • trunk/src/wp-includes/taxonomy.php

    r32910 r32933  
    473473 * - 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.
    474474 * - not_found - Default is "No tags found"/"No categories found", used in the meta box and taxonomy list table.
     475 * - no_terms - Default is "No tags"/"No categories", used in the posts and media list tables.
    475476 *
    476477 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories).
     
    479480 *
    480481 * @since 3.0.0
     482 * @since 4.3.0 Added the `no_terms` label.
    481483 *
    482484 * @param object $tax Taxonomy object.
     
    509511        'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ),
    510512        'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
     513        'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ),
    511514    );
    512515    $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
Note: See TracChangeset for help on using the changeset viewer.