Changeset 56004
- Timestamp:
- 06/23/2023 05:47:34 PM (23 months ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-comments-list-table.php
r55971 r56004 584 584 if ( ! isset( $_GET['orderby'] ) ) { 585 585 // 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>'; 587 590 } else { 588 591 $this->print_table_description(); -
trunk/src/wp-admin/includes/class-wp-list-table.php
r55971 r56004 1362 1362 1363 1363 if ( isset( $sortable[ $column_key ] ) ) { 1364 list( $orderby, $desc_first, $abbr, $orderby_text, $initial_order ) = $sortable[ $column_key ]; 1364 $orderby = isset( $sortable[ $column_key ][0] ) ? $sortable[ $column_key ][0] : ''; 1365 $desc_first = isset( $sortable[ $column_key ][1] ) ? $sortable[ $column_key ][1] : false; 1366 $abbr = isset( $sortable[ $column_key ][2] ) ? $sortable[ $column_key ][2] : ''; 1367 $orderby_text = isset( $sortable[ $column_key ][3] ) ? $sortable[ $column_key ][3] : ''; 1368 $initial_order = isset( $sortable[ $column_key ][4] ) ? $sortable[ $column_key ][4] : ''; 1365 1369 1366 1370 /* … … 1398 1402 } 1399 1403 1400 $class[] = 'sortable'; 1401 $class[] = 'desc' === $order ? 'asc' : 'desc'; 1402 $order_text = 'asc' === $order ? __( 'Sort ascending.' ) : __( 'Sort descending.' ); 1404 $class[] = 'sortable'; 1405 $class[] = 'desc' === $order ? 'asc' : 'desc'; 1406 /* translators: Hidden accessibility text. */ 1407 $asc_text = __( 'Sort ascending.' ); 1408 /* translators: Hidden accessibility text. */ 1409 $desc_text = __( 'Sort descending.' ); 1410 $order_text = 'asc' === $order ? $asc_text : $desc_text; 1403 1411 } 1404 1412 if ( '' !== $order_text ) { … … 1429 1437 * should be provided via get_sortable_columns(). 1430 1438 * 1431 * @since 4.3.01439 * @since 6.3.0 1432 1440 * @access public 1433 1441 */ … … 1458 1466 1459 1467 if ( isset( $sortable[ $column_key ] ) ) { 1460 1461 list( $orderby, $desc_first, $abbr, $orderby_text, $initial_order ) = $sortable[ $column_key ]; 1468 $orderby = isset( $sortable[ $column_key ][0] ) ? $sortable[ $column_key ][0] : ''; 1469 $desc_first = isset( $sortable[ $column_key ][1] ) ? $sortable[ $column_key ][1] : false; 1470 $abbr = isset( $sortable[ $column_key ][2] ) ? $sortable[ $column_key ][2] : ''; 1471 $orderby_text = isset( $sortable[ $column_key ][3] ) ? $sortable[ $column_key ][3] : ''; 1472 $initial_order = isset( $sortable[ $column_key ][4] ) ? $sortable[ $column_key ][4] : ''; 1462 1473 1463 1474 if ( ! is_string( $orderby_text ) || '' === $orderby_text ) { … … 1480 1491 */ 1481 1492 if ( $current_orderby == $orderby ) { 1482 $order_text = 'asc' === $current_order ? __( 'Ascending.' ) : __( 'Descending.' ); 1483 echo '<caption class="screen-reader-text">' . $orderby_text . ' ' . $order_text . '</p>'; 1493 /* translators: Hidden accessibility text. */ 1494 $asc_text = __( 'Ascending.' ); 1495 /* translators: Hidden accessibility text. */ 1496 $desc_text = __( 'Descending.' ); 1497 $order_text = 'asc' === $current_order ? $asc_text : $desc_text; 1498 echo '<caption class="screen-reader-text">' . $orderby_text . ' ' . $order_text . '</caption>'; 1484 1499 1485 1500 return;
Note: See TracChangeset
for help on using the changeset viewer.