Skip to content

Commit 43e2ff9

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60967 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4bd4c0b commit 43e2ff9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/wp-admin/upload.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,15 @@ function () {
152152
0
153153
);
154154

155-
$q = $_GET;
155+
$query_string = $_GET;
156156
// Let JS handle this.
157-
unset( $q['s'] );
158-
$vars = wp_edit_attachments_query_vars( $q );
159-
$ignore = array( 'mode', 'post_type', 'post_status', 'posts_per_page' );
160-
foreach ( $vars as $key => $value ) {
157+
unset( $query_string['s'] );
158+
$query_vars = wp_edit_attachments_query_vars( $query_string );
159+
$ignore = array( 'mode', 'post_type', 'post_status', 'posts_per_page' );
160+
161+
foreach ( $query_vars as $key => $value ) {
161162
if ( ! $value || in_array( $key, $ignore, true ) ) {
162-
unset( $vars[ $key ] );
163+
unset( $query_vars[ $key ] );
163164
}
164165
}
165166

@@ -168,7 +169,7 @@ function () {
168169
'_wpMediaGridSettings',
169170
array(
170171
'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ),
171-
'queryVars' => (object) $vars,
172+
'queryVars' => (object) $query_vars,
172173
)
173174
);
174175

0 commit comments

Comments
 (0)