diff --git a/app/filters.php b/app/filters.php index a612a42..60ef08f 100644 --- a/app/filters.php +++ b/app/filters.php @@ -72,10 +72,14 @@ add_filter('comments_template', function ($comments_template) { $comments_template ); + $data = collect(get_body_class())->reduce(function ($data, $class) use ($comments_template) { + return apply_filters("sage/template/{$class}/data", $data, $comments_template); + }, []); + $theme_template = locate_template(["views/{$comments_template}", $comments_template]); if ($theme_template) { - echo template($theme_template); + echo template($theme_template, $data); return get_stylesheet_directory().'/index.php'; }