fix: Hard main template rendering lock
Some checks failed
Create Release Package / build-release (push) Failing after 53s

- Added $rendering_main_template flag that blocks all other renders
- Reduced MAX_RENDER_DEPTH from 5 to 2
- template-wrapper.php passes is_main_template=true to enable hard lock
- Any render attempt during main template rendering is blocked

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-02 19:55:23 +01:00
parent a41eddbc49
commit b592e45d58
4 changed files with 40 additions and 5 deletions

View File

@@ -60,7 +60,8 @@ get_header();
if ( $template_name ) {
try {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $plugin->render( $template_name, $context );
// Pass true for is_main_template to set the hard rendering lock.
echo $plugin->render( $template_name, $context, true );
} catch ( \Exception $e ) {
if ( WP_DEBUG ) {
echo '<div class="fedistream-error">';