You've already forked wp-fedistream
fix: Hard main template rendering lock
Some checks failed
Create Release Package / build-release (push) Failing after 53s
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:
@@ -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">';
|
||||
|
||||
Reference in New Issue
Block a user