Make WordPress Core

Opened 5 weeks ago

#48325 assigned enhancement

Additional filter in media-template.php. Let developers to hide attachment page link.

Reported by: limera1n Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: ui Cc:
PR Number:



currently there is no easy way to hide "View attachment page" link from "media-modal" window. I think it would be great to add simple filter to disable this link and also add some HTML markups for "|" separators which can help users to use CSS selectors and style them. For example:

media-template.php, lines from 428

<div class="actions">
if ( ! apply_filters( 'disable_attachment_page_link', '' ) ) : ?>
<a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a>
<span class="links-separator">|</span>
<?php endif; ?>

I think this feature is especially important when we don't want allow our users to access this type of pages.


Change History (0)

Note: See TracTickets for help on using tickets.