From 2d580bd616febcd8c70cb060d661d83f3e62756f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 17 Oct 2025 22:44:33 +0000 Subject: [PATCH] Coding Standards: Use more meaningful variable names in Media Library. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 [31037], [31041], [31562]. Props costdev, mukesh27. See #63168. Built from https://develop.svn.wordpress.org/trunk@60967 git-svn-id: http://core.svn.wordpress.org/trunk@60303 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/upload.php | 15 ++++++++------- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 7c1cd8551d..1110f63ce8 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -152,14 +152,15 @@ if ( 'grid' === $mode ) { 0 ); - $q = $_GET; + $query_string = $_GET; // Let JS handle this. - unset( $q['s'] ); - $vars = wp_edit_attachments_query_vars( $q ); - $ignore = array( 'mode', 'post_type', 'post_status', 'posts_per_page' ); - foreach ( $vars as $key => $value ) { + unset( $query_string['s'] ); + $query_vars = wp_edit_attachments_query_vars( $query_string ); + $ignore = array( 'mode', 'post_type', 'post_status', 'posts_per_page' ); + + foreach ( $query_vars as $key => $value ) { if ( ! $value || in_array( $key, $ignore, true ) ) { - unset( $vars[ $key ] ); + unset( $query_vars[ $key ] ); } } @@ -168,7 +169,7 @@ if ( 'grid' === $mode ) { '_wpMediaGridSettings', array( 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ), - 'queryVars' => (object) $vars, + 'queryVars' => (object) $query_vars, ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index d5eb29384d..12e39334ba 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60966'; +$wp_version = '6.9-alpha-60967'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.