Support » Plugin: Emoji Settings » Keep old smilies

  • Resolved Ammaletu



    I’m trying to get rid of the call, that’s why I tried out your plugin. I don’t care about emojis, but want to keep my old smilies as images. Now the function “wp430_support” disables the smilies when I disable emojis. As I understand it, these are two distinct features, and when I comment your function out, everything seems to work as intended. Can you give some more information what the function’s docblock means by “This Prevents unreadable character output caused by ‘use_smilies’ option”? Thanks a lot!


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sybre Waaijer


    Hi Johannes,

    Thanks for reaching out, and my apologies for such a late reply!

    In the 1.0.5 update, it reads (I should’ve used a spellchecker…):

    Fixed: New WordPress installations (4.3 and up) don’t have the option to turn off smileys. This leads to incorrect character encoding of smiley abbrev[i]ations, like πŸ™‚ and :D. Therefor[e] the whole function to encode characters will be removed if emojis are set to “disabled”.
    Fixed: Old WordPress installations with WordPress 4.3 and up will automatically set the smileys to off if Emoji support is disabled for the same reason as above. This only has effect after updating the page for the first time.

    To summarize, it means that there’s a discrepancy between old and new WordPress installations, and that function accounts for it as a catch-all; so to alleviate confusion and general annoyance: People who use this plugin often don’t want smileys at all.

    Nevertheless, you can override the [ cw_emoji_settings(), 'wp430_support' ] callback like so (code ref):

    // Adds a sanitation filter to the 'enable_emoji' setting; runs right after it's done sanitizing (priority 11).
    add_filter( 'sanitize_option_enable_emoji', function( $options ) {
    	// Reenable the option after Emoji Settings disables it.
    	if ( isset( $_POST['use_smilies'] ) && '1' === $_POST['use_smilies'] )
    		update_option( 'use_smilies', '1' );
    	// Return the Emoji Settings options.
    	return $options;
    }, 11 );

    I hope this helps πŸ™‚ Cheers!

    • This reply was modified 2 years, 7 months ago by Sybre Waaijer. Reason: Added POST value check for the option
    Thread Starter Ammaletu



    thanks for the reply and the added filter possibility! I ended up deactivating the emoji support manually for now, but it’s nice to know that I could still use your plugin if disabling the emojis would change in future WordPress versions. Also, my smilies all have “noses”, so that’s probably why I don’t have any encoding problems so far. πŸ™‚


    Plugin Author Sybre Waaijer


    It’s nice to know this wasn’t a big hindrance after all; I’m glad you’ve found a workaround πŸ™‚ Have a great week!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Keep old smilies’ is closed to new replies.