Make WordPress Core

Changeset 40957


Ignore:
Timestamp:
06/27/2017 12:33:31 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Administration: In taxonomy list tables, display a dash instead of a blank space and add "No description" as a screen reader text when the term description is blank.

Props pratikgandhi, yahil.
Fixes #40659.

File:
1 edited

Legend:

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

    r38698 r40957  
    502502     */
    503503    public function column_description( $tag ) {
    504         return $tag->description;
     504        if ( $tag->description ) {
     505            return $tag->description;
     506        } else {
     507            return '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . __( 'No description' ) . '</span>';
     508        }
    505509    }
    506510
Note: See TracChangeset for help on using the changeset viewer.