[wp-trac] [WordPress Trac] #48325: Additional filter in media-template.php. Let developers to hide attachment page link.

WordPress Trac noreply at wordpress.org
Thu Jan 9 14:57:16 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:  needs-patch  |     Focuses:  ui
-------------------------+-----------------------------
Changes (by joemcgill):

 * keywords:   => needs-patch
 * milestone:  Awaiting Review => Future Release


Comment:

 Hi @limera1n,

 Thanks for this report. I agree that this is not an easy thing to override
 at the moment. You would either need to override the whole template, or
 hide that link with CSS—neither a good option.

 Allowing that template code to be filtered is one option for how to solve
 this, but I wonder if a better approach would be to update that template
 to check for the existence of a `data.link` value before printing the link
 so that this won't show up if the link value isn't available for any
 reason?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48325#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list