[wp-trac] [WordPress Trac] #54824: Hide "view" link from Media Library List Mode if empty string passed to attachment_link
WordPress Trac
noreply at wordpress.org
Fri Jan 14 20:34:40 UTC 2022
#54824: Hide "view" link from Media Library List Mode if empty string passed to
attachment_link
--------------------------+-----------------------------
Reporter: oh_hello | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
As of WP 5.6.0, an empty string can be passed to `attachment_link` which
will disable the view attachment page link on the media modal. That's
great. Ref:
https://developer.wordpress.org/reference/hooks/attachment_link/.
However, there's another link that should also be disabled in this
scenario.
That's the "View" link that appears when hovering over a media item when
browsing the Media Library in "List Mode" instead of "Grid Mode".
Currently, that "View" link is just empty. The code generated is:
{{{
<a href="" aria-label="View “title of media item”" rel="bookmark">View</a>
}}}
Ideally that "View" link would be removed entirely.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54824>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list