HEX
Server: Apache
System: Linux hp3-wp-1011494.hostingp3.local 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64
User: csh2729955 (2121743)
PHP: 7.4.33
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: /home/storage/162/3480162/user/htdocs/wp-content/plugins/enlighter/modules/extensions/BBPress.php
<?php

namespace Enlighter\extensions;

class BBPress{

    public static function init($markdown=false, $shortcode=false){

        // markdown enabled ?
        if ($markdown){
            // add filter to hook into the section post-processing
            // user defined filters will have prio 10 by default
            add_filter('enlighter_gfm_filters', function($sections){
                // add BuddyPress Sections
                $sections[] = 'bbp_get_reply_content';
                $sections[] = 'bbp_get_topic_content';

                return $sections;
            }, 5);
        }

        // shortcodes enabled ?
        if ($shortcode){
            // add filter to hook into the section post-processing
            // user defined filters will have prio 10 by default
            add_filter('enlighter_shortcode_filters', function($sections){
                // add BuddyPress Sections
                $sections[] = 'bbp_get_reply_content';
                $sections[] = 'bbp_get_topic_content';

                return $sections;
            }, 5);
        }

        // markdown or shortcodes enabled ? -> disable bbpress code filters
        if ($shortcode || $markdown){
            // revert the code filter changes temporary - allows the use of triple backticks
            add_filter('bbp_get_reply_content', 'bbp_code_trick_reverse', 0);
            add_filter('bbp_get_topic_content', 'bbp_code_trick_reverse', 0);
        }
    }
}