PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.1
Forumax – AI Powered Advanced Community Forum Plugin v2.5.1
2.5.1 2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 All 31 releases
← All changes | includes/fse-compatibility.php +6 -3 2.5.0 → 2.5.1 View file →
@@ -342,8 +342,10 @@
342 342 }
343 343 }
344 344
345 345 if ( $has_bbpress_shortcode ) {
346 + $GLOBALS['forumax_is_shortcode_page'] = true;
347 +
346 348 // Add body class for styling.
347 349 add_filter( 'body_class', function( $classes ) {
348 350 $classes[] = 'forumax-shortcode-page';
349 351 $classes[] = 'forumax-fse';
@@ -409,9 +411,9 @@
409 411 }
410 412
411 413 // Check for bbPress page OR shortcode page.
412 414 $is_bbpress_page = function_exists( 'is_bbpress' ) && is_bbpress();
413 - $is_shortcode_page = in_array( 'forumax-shortcode-page', get_body_class(), true );
415 + $is_shortcode_page = ! empty( $GLOBALS['forumax_is_shortcode_page'] );
414 416
415 417 if ( ! $is_bbpress_page && ! $is_shortcode_page ) {
416 418 return;
417 419 }
@@ -480,11 +482,12 @@
480 482 return;
481 483 }
482 484
483 485 // Check for bbPress page OR shortcode page.
484 - $is_bbpress_page = function_exists( 'is_bbpress' ) && is_bbpress();
486 + $is_bbpress_page = function_exists( 'is_bbpress' ) && is_bbpress();
487 + $is_shortcode_page = ! empty( $GLOBALS['forumax_is_shortcode_page'] );
485 488
486 - if ( ! $is_bbpress_page ) {
489 + if ( ! $is_bbpress_page && ! $is_shortcode_page ) {
487 490 return;
488 491 }
489 492
490 493 // Ensure bbPress default styles are loaded.