Can anybody provide me with a function to generate slugs?

Question

The functions WordPress uses to generate slugs are scattered in several functions and filters. I cannot find them all. Can anybody provide me a single php function to generate slugs? I do not need all the functionalities of WordPress, just need to encode non-latin characters and remove illegal characters that are not allowed in url.

This post provides a function, but it cannot handle non-latin characters.

Thanks!

0
William 3 months 2020-12-30T08:11:13-05:00 0 Answers 3 views 0

Leave an answer

Browse
Browse