Best way of removing emoji support from url / slug only

Couldn’t find anything on the topic.

I guess something could be done with the 'wp_unique_post_slug' filter but how would I go about just removing the emojis from the slug?

I’ve tried all kinds of things with this filter but can’t seem to remove only the emoji part whilst retaining the functionality of WP numbering the slugs ID-titlecount (or whatever it is) in case there’s nothing left after non unicodes and emojis are stripped.

Has anyone have happened to work with this and have a snippet handy? 🙂

0

Leave a Comment