[wp-trac] [WordPress Trac] #45708: Allow retrieving adjacent image link markup without echoing it
WordPress Trac
noreply at wordpress.org
Wed Dec 19 17:22:15 UTC 2018
#45708: Allow retrieving adjacent image link markup without echoing it
-----------------------------------+------------------------------
Reporter: flixos90 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch | Focuses: template
-----------------------------------+------------------------------
Changes (by flixos90):
* keywords: needs-patch 2nd-opinion => 2nd-opinion has-patch
Comment:
[attachment:"45708.diff"] introduces the following functions:
* `get_adjacent_image_link()`
* `get_next_image_link()`
* `get_previous_image_link()`
Their whole code is what was previously part of the respective function
without the `get_` prefix, with the only exception that the result is
returned instead of echoed. The existing functions are now simply wrappers
echoing the output of the new `get_*()` functions.
This is in line with how other templating functions act.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45708#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list