[wp-trac] [WordPress Trac] #40969: RFE: get_template_part() to return something or warn when nothing found
WordPress Trac
noreply at wordpress.org
Wed Feb 6 18:36:54 UTC 2019
#40969: RFE: get_template_part() to return something or warn when nothing found
-------------------------+-----------------------
Reporter: sphakka | Owner: pento
Type: enhancement | Status: reopened
Priority: high | Milestone: 5.1
Component: Themes | Version:
Severity: major | Resolution:
Keywords: revert | Focuses: template
-------------------------+-----------------------
Comment (by desrosj):
In [changeset:"44725" 44725]:
{{{
#!CommitTicketReference repository="" revision="44725"
Themes: Revert returning the value of `locate_template()` in functions
that call it.
Because the names of the `get_header()`, `get_footer()`, `get_sidebar()`,
and `get_template_part()` functions indicate that a value is returned,
some plugins and themes already have `echo get_template_part()` in their
codebase. Adding a return value to these functions using the approach in
[44678] will cause the two unintended side effects of unexpected content
being sent to the browser, and accidental path disclosure.
Reverts [44678].
Props davidbinda.
See #40969.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40969#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list