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. git-svn-id: https://develop.svn.wordpress.org/trunk@47915 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2071347eac
commit
803eab428d
@ -640,7 +640,7 @@ class WP_List_Table {
|
|||||||
}
|
}
|
||||||
printf(
|
printf(
|
||||||
"<a href='%s' class='%s' id='view-switch-$mode'$aria_current><span class='screen-reader-text'>%s</span></a>\n",
|
"<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 ),
|
implode( ' ', $classes ),
|
||||||
$title
|
$title
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user