[wp-trac] [WordPress Trac] #48325: Additional filter in media-template.php. Let developers to hide attachment page link.
WordPress Trac
noreply at wordpress.org
Sun Aug 30 22:33:21 UTC 2020
#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: Future Release
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: ui
-------------------------+-----------------------------
Changes (by Mista-Flo):
* keywords: needs-patch => has-patch
Comment:
All right, I have combined both requests.
I have created a hook and checked if data.link is set.
I used a boolean to check the filter value, so if you want to disable it
from a theme/plugin, you would do it like this:
{{{#!php
<?php
add_filter( 'disable_attachment_page_link', '__return_true' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48325#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list