Media: remove any `attachment-filter` query param when switching views.

Fix an issue where the media attachment filter no longer worked after switching to list view, filtering by a media type then switching back to the grid view.

Props itzmekhokan, netsurfer2705, zodiac1978.
Fixes #43656.


Built from https://develop.svn.wordpress.org/trunk@47915


git-svn-id: http://core.svn.wordpress.org/trunk@47689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Adam Silverstein 2020-06-05 21:13:10 +00:00
parent f546fe5aa5
commit 0b9a800512
2 changed files with 2 additions and 2 deletions

View File

@ -640,7 +640,7 @@ class WP_List_Table {
}
printf(
"<a href='%s' class='%s' id='view-switch-$mode'$aria_current><span class='screen-reader-text'>%s</span></a>\n",
esc_url( add_query_arg( 'mode', $mode ) ),
esc_url( remove_query_arg( 'attachment-filter', add_query_arg( 'mode', $mode ) ) ),
implode( ' ', $classes ),
$title
);

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-47914';
$wp_version = '5.5-alpha-47915';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.