Skip to content

Commit f584f79

Browse files
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
1 parent 85d00ec commit f584f79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wp-admin/includes/class-wp-list-table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,11 +763,11 @@ protected function months_dropdown( $post_type ) {
763763
return;
764764
}
765765

766-
$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
766+
$selected_month = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
767767
?>
768768
<label for="filter-by-date" class="screen-reader-text"><?php echo get_post_type_object( $post_type )->labels->filter_by_date; ?></label>
769769
<select name="m" id="filter-by-date">
770-
<option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
770+
<option<?php selected( $selected_month, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
771771
<?php
772772
foreach ( $months as $arc_row ) {
773773
if ( 0 === (int) $arc_row->year ) {
@@ -779,7 +779,7 @@ protected function months_dropdown( $post_type ) {
779779

780780
printf(
781781
"<option %s value='%s'>%s</option>\n",
782-
selected( $m, $year . $month, false ),
782+
selected( $selected_month, $year . $month, false ),
783783
esc_attr( $arc_row->year . $month ),
784784
/* translators: 1: Month name, 2: 4-digit year. */
785785
sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )

0 commit comments

Comments
 (0)