You've already forked wp-bootstrap
feat: add wp_bootstrap_should_render_template filter for plugin decoupling (v1.0.4)
Allows plugins and child themes to prevent the theme's TemplateController from rendering specific requests, enabling clean separation of concerns. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,11 @@ class TemplateController
|
||||
return;
|
||||
}
|
||||
|
||||
// Allow plugins or child themes to prevent rendering for this request.
|
||||
if (! apply_filters('wp_bootstrap_should_render_template', true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$template = $this->resolveTemplate();
|
||||
if (! $template) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user