Make WordPress Core


Ignore:
Timestamp:
06/23/2023 05:47:34 PM (3 years ago)
Author:
joedolson
Message:

Administration: Backwards compatibility for new sortable keys.

Replace use of list to parse array keys into variables. list throws errors if the keys don't exist, and many extenders will not define the new array keys. The code path already falls back effectively for empty values.

Also add translator comments to screen reader hidden text, fix a docblock, and fix an HTML error.

Follow up to [r55971].

Props kebbet, chouby, joedolson.
Fixes #32170.

File:
1 edited

Legend:

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

    r55971 r56004  
    584584                if ( ! isset( $_GET['orderby'] ) ) {
    585585                        // In the initial view, Comments are ordered by comment's date but there's no column for that.
    586                         echo '<caption class="screen-reader-text">' . __( 'Ordered by Comment Date, descending.' ) . '</p>';
     586                        echo '<caption class="screen-reader-text">' .
     587                        /* translators: Hidden accessibility text. */
     588                        __( 'Ordered by Comment Date, descending.' ) .
     589                        '</caption>';
    587590                } else {
    588591                        $this->print_table_description();
Note: See TracChangeset for help on using the changeset viewer.