• Resolved tomtc

    (@tomtc)


    I am using Byddyboss User Blog plugin for frontend post editor. After installing BadgeOS I suddenly get a “new” Rich text editor in my User Blog front end editor? Any ideas for why this is happening and if there is a fix.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Wooninjas

    (@wooninjas)

    Hello @tomtc

    BadgeOS loads two js files on front-end for CKeditor

    1. Standard CKeditor js file
    2. Custom js file to call it

    Their function is to add valuable formatting options to the user when submitting submission / commenting. See screenshot

    Does your “new” Rich text editor looks like the same on your User Blog front-end editor?

    Thread Starter tomtc

    (@tomtc)

    Hi
    Yes the unwanted rich text editor looks like you screen shot and messes with the UI of the front end editor. Can something bedone so that CKeditor does not load on certain pages or how do you sugggest?

    Plugin Contributor Wooninjas

    (@wooninjas)

    Hello @tomtc

    Paste the below snippet to your active theme’s functions.php file and replace the id of the page as per your requirement.

    /**
     * Dequeue ckeditor js on specific page
     */
    function dequeue_ckeditor_front_end() {
    
        if ( is_admin() ) {
            return;
        }
        
        global $post;
        if( 469 == $post->ID ) {
            global $GLOBALS;
            $wp_footer = $GLOBALS["wp_filter"]["wp_footer"];
            if(is_object(  $wp_footer ) && !empty( $wp_footer )) {
                $new_array = array();
                foreach( $wp_footer as $key => $frontend_script ) {
                    if( $key != 10 ) {
                        $new_array[$key] = $frontend_script;
                    }
                }
            }
    
            $new_data = new WP_Hook;
            $new_data->callbacks = $new_array;
            $GLOBALS["wp_filter"]["wp_footer"] = $new_data;
    
            $handle = 'custom_script';
            $list = 'enqueued';
            if (wp_script_is( $handle, $list )) {
                wp_dequeue_script( 'custom_script' );
                wp_deregister_script( 'custom_script' );
            }
    
            $handle = 'ck_editor_cdn';
            $list = 'enqueued';
            if (wp_script_is( $handle, $list )) {
                wp_dequeue_script( 'ck_editor_cdn' );
                wp_deregister_script( 'ck_editor_cdn' );
            }
        }
    }
    add_action( 'wp_print_scripts', 'dequeue_ckeditor_front_end', 100 );
    Thread Starter tomtc

    (@tomtc)

    That worked. Thank you very much!

    Plugin Contributor Wooninjas

    (@wooninjas)

    @tomtc

    Glad to hear that!
    Please add a review here for us.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Buddyboss User Blog front end editor incompatibility’ is closed to new replies.