[wp-trac] [WordPress Trac] #42688: Option to make get_template_part return instead of require
WordPress Trac
noreply at wordpress.org
Wed Nov 29 09:53:33 UTC 2017
#42688: Option to make get_template_part return instead of require
-----------------------------+------------------------------
Reporter: mclaurent | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 4.9
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses: template
-----------------------------+------------------------------
Comment (by mclaurent):
Thanks @dd32 that makes sense. I agree that it isn't much extra work work
at all to use the get_template_part within a shortcode. I guess that I
feel the function name to be misleading as it begins with "get_" and
implies that something is returned rather than echoed.
Would you consider a patch for a new function
`get_template_part_shortcode( $slug, $name = null )` or an updated
function `get_template_part( $slug, $name = null, $echo = true )` ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42688#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list