Add sage/template_data filter so developers can pass data within template_include
This commit is contained in:
@@ -47,7 +47,7 @@ array_map(function ($type) {
|
|||||||
* Render page using Blade
|
* Render page using Blade
|
||||||
*/
|
*/
|
||||||
add_filter('template_include', function ($template) {
|
add_filter('template_include', function ($template) {
|
||||||
echo template($template);
|
echo template($template, apply_filters('sage/template_data', []));
|
||||||
|
|
||||||
// Return a blank file to make WordPress happy
|
// Return a blank file to make WordPress happy
|
||||||
return get_template_directory() . '/index.php';
|
return get_template_directory() . '/index.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user