Coding Standards: Use a more meaningful variable name in WP_List_Table::months_dropdown().

As per the [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#naming-conventions Naming Conventions]:
> Don't abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting.

Follow-up to [8646], [15491].

See #62279.

git-svn-id: https://develop.svn.wordpress.org/trunk@59755 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2025-02-03 23:41:43 +00:00
parent 85d00ec54c
commit f584f791f3

View File

@ -763,11 +763,11 @@ class WP_List_Table {
return;
}
$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
$selected_month = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
?>
<label for="filter-by-date" class="screen-reader-text"><?php echo get_post_type_object( $post_type )->labels->filter_by_date; ?></label>
<select name="m" id="filter-by-date">
<option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
<option<?php selected( $selected_month, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
<?php
foreach ( $months as $arc_row ) {
if ( 0 === (int) $arc_row->year ) {
@ -779,7 +779,7 @@ class WP_List_Table {
printf(
"<option %s value='%s'>%s</option>\n",
selected( $m, $year . $month, false ),
selected( $selected_month, $year . $month, false ),
esc_attr( $arc_row->year . $month ),
/* translators: 1: Month name, 2: 4-digit year. */
sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )