Changeset 56260
- Timestamp:
- 07/18/2023 02:03:57 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r56174 r56260 1116 1116 * In the second format, passing true as second parameter will make the initial 1117 1117 * sorting order be descending. Following parameters add a short column name to 1118 * be used as 'abbr' attribute, a translatable string for the current sorting 1118 * be used as 'abbr' attribute, a translatable string for the current sorting, 1119 1119 * and the initial order for the initial sorted column, 'asc' or 'desc' (default: false). 1120 1120 * … … 1326 1326 1327 1327 // Not in the initial view and descending order. 1328 if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] ) {1328 if ( isset( $_GET['order'] ) && 'desc' === $_GET['order'] ) { 1329 1329 $current_order = 'desc'; 1330 1330 } else { 1331 // The initial view is not always 'asc' we'll take care of this below.1331 // The initial view is not always 'asc', we'll take care of this below. 1332 1332 $current_order = 'asc'; 1333 1333 } … … 1389 1389 if ( $current_orderby === $orderby ) { 1390 1390 // The sorted column. The `aria-sort` attribute must be set only on the sorted column. 1391 if ( 'asc' == $current_order ) {1391 if ( 'asc' === $current_order ) { 1392 1392 $order = 'desc'; 1393 1393 $aria_sort_attr = ' aria-sort="ascending"'; … … 1396 1396 $aria_sort_attr = ' aria-sort="descending"'; 1397 1397 } 1398 1398 1399 $class[] = 'sorted'; 1399 1400 $class[] = $current_order; … … 1408 1409 $class[] = 'sortable'; 1409 1410 $class[] = 'desc' === $order ? 'asc' : 'desc'; 1411 1410 1412 /* translators: Hidden accessibility text. */ 1411 1413 $asc_text = __( 'Sort ascending.' ); … … 1414 1416 $order_text = 'asc' === $order ? $asc_text : $desc_text; 1415 1417 } 1418 1416 1419 if ( '' !== $order_text ) { 1417 1420 $order_text = ' <span class="screen-reader-text">' . $order_text . '</span>'; … … 1460 1463 1461 1464 // Not in the initial view and descending order. 1462 if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] ) {1465 if ( isset( $_GET['order'] ) && 'desc' === $_GET['order'] ) { 1463 1466 $current_order = 'desc'; 1464 1467 } else { 1465 // The initial view is not always 'asc' we'll take care of this below.1468 // The initial view is not always 'asc', we'll take care of this below. 1466 1469 $current_order = 'asc'; 1467 1470 } … … 1494 1497 * and true in the sorted views when the actual $_GET['orderby'] is equal to $orderby. 1495 1498 */ 1496 if ( $current_orderby == $orderby ) {1499 if ( $current_orderby === $orderby ) { 1497 1500 /* translators: Hidden accessibility text. */ 1498 1501 $asc_text = __( 'Ascending.' );
Note: See TracChangeset
for help on using the changeset viewer.