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
This commit is contained in:
Sergey Biryukov
2020-07-07 11:00:21 +00:00
parent 3eb2bd9f5b
commit 4e78b0acd9
4 changed files with 74 additions and 27 deletions

View File

@@ -1 +1,3 @@
Template Part
<?php echo json_encode( $args ); ?>