You've already forked wp-fedistream
fix: Block shortcode rendering during page template loading
All checks were successful
Create Release Package / build-release (push) Successful in 1m2s
All checks were successful
Create Release Package / build-release (push) Successful in 1m2s
- Added $loading_page_template flag in TemplateLoader - template-wrapper.php sets flag before loading theme header/footer - Shortcodes::render_template() returns early if flag is set - Prevents recursion from theme components, widgets, or other plugins Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -552,6 +552,12 @@ class Shortcodes {
|
||||
* @return string
|
||||
*/
|
||||
private function render_template( string $template, array $context ): string {
|
||||
// Block shortcode rendering while loading page template to prevent recursion.
|
||||
// This catches any shortcodes triggered by theme header/footer, widgets, etc.
|
||||
if ( TemplateLoader::is_loading_page_template() ) {
|
||||
return '<!-- FediStream: shortcode blocked during page template loading -->';
|
||||
}
|
||||
|
||||
// Check for unlicensed mode.
|
||||
if ( $this->unlicensed_mode ) {
|
||||
return $this->get_unlicensed_message();
|
||||
|
||||
Reference in New Issue
Block a user