Commit Graph

2 Commits

Author SHA1 Message Date
Sergey Biryukov 4e78b0acd9 Themes: Allow template loading functions to pass additional arguments to the template via the `$args` parameter.
This affects:
* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`
* `locate_template()`
* `load_template()`

Note: `get_search_form()` already passes additional arguments to the template as of [44956].

Props enrico.sorcinelli, sc0ttkclark, scribu, nacin, wonderboymusic, GeertDD, beatpanda, amaschas, mintindeed, ysalame, caiocrcosta, bigdawggi, julianm, eddiemoya, shawnz, sayedwp, shamai, mboynes, mihai2u, guidobras, Mte90, apedog, stuffradio, overclokk, johnbillion, joyously, afercia, audrasjb, justlevine, SergeyBiryukov.
See #21676.

git-svn-id: https://develop.svn.wordpress.org/trunk@48370 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 11:00:21 +00:00
John Blackbourn 6b983b1d5c Themes: Add a test to ensure `get_template_part()` does not return a value.
This function must not be modified to return anything due to existing themes which output the return value, for example via `echo get_template_part( ... )`.

See #40969


git-svn-id: https://develop.svn.wordpress.org/trunk@46328 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-26 20:25:59 +00:00