Add sage/template_data filter so developers can pass data within template_include

This commit is contained in:
QWp6t
2016-12-10 06:07:26 -08:00
parent 7af96ac311
commit 354c32e0de

View File

@@ -47,7 +47,7 @@ array_map(function ($type) {
* Render page using Blade
*/
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 get_template_directory() . '/index.php';