Hello knowitallninja,
BadgeOS loads two js files on front-end for CKeditor
- Standard CKeditor js file
- Custom js file to call it
Their function is to add valuable formatting options to the user when submitting submission / commenting. See screenshot
Although it is not recommended, you can add below snippet to your active theme’s functions.php file to dequeue it.
function dequeue_ckeditor_front_end() {
if ( is_admin() ) {
return;
}
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 );