Skip to content

Commit bfd2237

Browse files
committed
fix: Add recursion protection for title shortcode processing
1 parent f742176 commit bfd2237

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

wordpress-date-shortcodes.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ function infinitnet_process_meta_content( $content ) {
7474

7575
// Filter for processing shortcodes in all titles
7676
function infinitnet_process_all_titles( $title ) {
77-
if ( ! is_admin() ) {
78-
return do_shortcode( $title );
77+
static $processing = false;
78+
if ( ! is_admin() && ! $processing ) {
79+
$processing = true;
80+
$title = do_shortcode( $title );
81+
$processing = false;
7982
}
8083
return $title;
8184
}

0 commit comments

Comments
 (0)