Coding Standards: Use more meaningful variable names in Media Library.

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
This commit is contained in:
Sergey Biryukov
2025-10-17 22:44:33 +00:00
parent bc0d7962db
commit 2d580bd616
2 changed files with 9 additions and 8 deletions

View File

@@ -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,
)
);

View File

@@ -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.