Make WordPress Core

Changeset 47915


Ignore:
Timestamp:
06/05/2020 09:11:02 PM (4 years ago)
Author:
adamsilverstein
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r47550 r47915  
    641641            printf(
    642642                "<a href='%s' class='%s' id='view-switch-$mode'$aria_current><span class='screen-reader-text'>%s</span></a>\n",
    643                 esc_url( add_query_arg( 'mode', $mode ) ),
     643                esc_url( remove_query_arg( 'attachment-filter', add_query_arg( 'mode', $mode ) ) ),
    644644                implode( ' ', $classes ),
    645645                $title
Note: See TracChangeset for help on using the changeset viewer.