Substituting Smilies
Perhaps Wordpress has changed with 4.7. My site has the global option use_smilies enabled.
The text...
:D
...is replaced with...
img draggable="false" class="emoji" alt="" src="https://s.w.org/images/core/emoji/2.2.1/svg/1f600.svg"
But I want to substitute my own smilies so I have the following code from the Codex, which, previously did work. But now it does not substitute my image. The default image is, instead, displayed.
add_filter( 'smilies_src', 'my_custom_smilies_src', 10, 3 );
function my_custom_smilies_src($img_src, $img, $siteurl){
return $siteurl.'/wp-content/images/smilies/'.$img;
}
It appears that the filter is not firing for common smilies like :) and :D but -does- work for :mrgreen:
I also tried adding this following code to my functions.php.
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
Oddly, it changes the substituted text to true emoji chars and -not- imgs.
Why has my filter stopped working?
Why is Wordpress pulling the images from that CDN instead of locally as per the Codex?
Very confused as to why there are both 'emojis' and 'smilies', but mainly, I want to have my substitute smilies start working again.