fix: Complete memory leak fix for shortcode context handling
All checks were successful
Create Release Package / build-release (push) Successful in 58s

- Changed shortcode context from boolean to depth counter for nested shortcodes
- Added shortcode context protection to template-wrapper.php for single page views
- Fixes remaining recursion path in single FediStream post views

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-02 16:52:13 +01:00
parent fedab21c2a
commit 166a5e6f7c
4 changed files with 30 additions and 11 deletions

View File

@@ -13,6 +13,9 @@ if ( ! defined( 'ABSPATH' ) ) {
use WP_FediStream\Plugin;
use WP_FediStream\Frontend\TemplateLoader;
// Enter shortcode context to prevent recursive shortcode processing in post content.
TemplateLoader::enter_shortcode_context();
// Get template context.
$context = TemplateLoader::get_context();
@@ -75,4 +78,7 @@ get_header();
</main>
<?php
// Exit shortcode context.
TemplateLoader::exit_shortcode_context();
get_footer();