Convert emoticons like :-) and :-P to graphics on display

I’m answering this old question because I didn’t find anything better. WordPress 5.9 wp-admin\options.php line 165 checks database version (when WP was originally installed) against a number to show or not those options. if ( get_site_option( ‘initial_db_version’ ) < 32453 ) { $allowed_options[‘writing’][] = ‘use_smilies’; $allowed_options[‘writing’][] = ‘use_balanceTags’; } Not actually a solution, but maybe … Read more

Prevent WordPress from convert ✔ (& other text symbols/emoji) to SVG [duplicate]

The code from this page solved the problem for me. /** * Disable the emoji’s */ function disable_emojis() { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ ); add_filter( ‘tiny_mce_plugins’, ‘disable_emojis_tinymce’ ); add_filter( ‘wp_resource_hints’, ‘disable_emojis_remove_dns_prefetch’, … Read more

How do I override the emoji url?

Looking at the code, you should be able to filter it. Something like the following should do it: add_filter( ’emoji_url’, ‘wpse_232874_emoji_cdn_url’ ); function wpse_232874_emoji_cdn_url( $url ) { return ‘http://example.com/my/cdn/url/’; } …replacing http://example.com/my/cdn/url/ with whatever URL you want to use. Reference Plugin API

Check if emojis is disabled

To completely remove emojis this is the code: remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); So to check if any of those are active you could use has_action() like this: $emoji_script front = has_action( ‘wp_head’, ‘print_emoji_detection_script’ ); if( $emoji_script_front ) { // The emoji script … Read more