This plugin is broken as %#@@ in front-end usage
– Enable the visual editor in theme’s functions.php (Or create your own plugin file)
function bbp_enable_visual_editor( $args = array() ) {
$args[‘tinymce’] = true;
$args[‘teeny’] = true;
return $args;
}
add_filter( ‘bbp_after_get_the_content_parse_args’, ‘bbp_enable_visual_editor’ );
This is a bbPress issue since they got rid of the ckEditor.
Next, fix this plugin so that it works properly in backend and frontend
native-emoji.php
Don’t use nep_plugin_js_vars, it’s rubbish. Change this line to use nep_register_and_enqueue_files.
foreach ( array(‘post.php’,’post-new.php’, ‘index.php’) as $hook ) {
add_action( “admin_head-$hook”, array( $this, ‘nep_register_and_enqueue_files’ ) );
}
The “Admin styles” are actually required and don’t seem to involve anything admin-related, so change this line:
add_action( ‘admin_enqueue_scripts’, array( $this, ‘nep_register_and_enqueue_admin_files’ ) );
To
add_action( ‘wp_enqueue_scripts’, array( $this, ‘nep_register_and_enqueue_admin_files’ ) );
This will get the scripts loaded in frontend use.
Delete the function nep_plugin_js_vars, it’s terrible and just ECHOs crap into the HTML stream directly, before the <!doctype even.
Next, remove this piece of code in native-emoji.php
// Enqueue required files
if ( comments_open() || get_comments_number() ) {
wp_enqueue_style( ‘nep_native_emoji’ );
if(!get_option(‘nep_plugin_site_use_jquery’)){
wp_enqueue_script( ‘jquery’ );
}
wp_enqueue_script( ‘nep_native_emoji’ );
}
and replace it with
// wp_enqueue_script( ‘jquery’ );
wp_enqueue_style( ‘nep_native_emoji’ );
wp_enqueue_script( ‘nep_native_emoji’ );
If you still need jQuery loaded, uncomment the one line.
Just replace this entire function
function nep_register_and_enqueue_admin_files(){
wp_register_style( ‘nep_native_emoji_admin’, plugins_url(‘/css/native_emoji_admin.css’,__FILE__), false, ‘3.0’, ‘all’ );
wp_enqueue_style( ‘nep_native_emoji_admin’ );
}
Fix this broken piece of code in native_emoji_tinymce-plugin.js
‘nep_frequently_used’ : {
‘name’ : nep_plugin_vars.nep_frequently_used,
‘codes’ : nep_frequently_used,
},
Finally, search and replace “$(” with “jQuery(” in the .js files because a lot of themes don’t use $ notation for jQuery
If anyone needs this update for their site, I can do it for $75.
-
This reply was modified 6 years, 7 months ago by pd9soft.