[wp-trac] [WordPress Trac] #43656: Media attachment filter does not work after switching list mode to grid for image attachment filter
WordPress Trac
noreply at wordpress.org
Sat Apr 25 13:25:46 UTC 2020
#43656: Media attachment filter does not work after switching list mode to grid for
image attachment filter
-------------------------------------------------+-------------------------
Reporter: itzmekhokan | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Media | Version: 4.9.4
Severity: major | Resolution:
Keywords: has-screenshots needs-patch dev- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Comment (by zodiac1978):
We could remove the filter in the `view_switcher` function in `/wp-
admin/inludes/class-wp-list-table.php`
{{{#!php
<?php
printf(
"<a href='%s' class='%s' id='view-
switch-$mode'$aria_current><span class='screen-reader-
text'>%s</span></a>\n",
esc_url( remove_query_arg( 'attachment-
filter', add_query_arg( 'mode', $mode ) ) ),
implode( ' ', $classes ),
$title
);
}}}
This would at least solve the mismatch between the dropdown and the
display of media.
As an alternative we could covert the filter to the correct dropdown
setting. But this converting would need some JS, I think.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43656#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list