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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40957 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2017-06-27 00:33:31 +00:00
parent c0dc34d4c7
commit 6fa3e5c883

View File

@ -501,7 +501,11 @@ class WP_Terms_List_Table extends WP_List_Table {
* @return string
*/
public function column_description( $tag ) {
return $tag->description;
if ( $tag->description ) {
return $tag->description;
} else {
return '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . __( 'No description' ) . '</span>';
}
}
/**