[wp-trac] [WordPress Trac] #40969: RFE: get_template_part() to return something or warn when nothing found
WordPress Trac
noreply at wordpress.org
Fri Jun 22 10:41:21 UTC 2018
#40969: RFE: get_template_part() to return something or warn when nothing found
-------------------------+------------------------------
Reporter: sphakka | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses: template
-------------------------+------------------------------
Comment (by tferry):
I agree with @sphakka - I've also run into this issue and it would be
useful for get_template_part not to fail silently, so we have the option
to check the return value.
I've attached a patch to pass on the return value from locate_template, as
suggested.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40969#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list