[wp-trac] [WordPress Trac] #48325: Additional filter in media-template.php. Let developers to hide attachment page link.
WordPress Trac
noreply at wordpress.org
Wed Oct 16 13:17:31 UTC 2019
#48325: Additional filter in media-template.php. Let developers to hide attachment
page link.
-------------------------+-----------------------------
Reporter: limera1n | Owner: (none)
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords:
Focuses: ui |
-------------------------+-----------------------------
Hi,
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
{{{#!php
<div class="actions">
<?php
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.
[[Image(https://i.imgur.com/C0AcLAG.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48325>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list