_wp_to_kebab_case ( $input_string )


This function is trying to replicate what lodash's kebabCase (JS library) does in the client.The reason we need this function is that we do some processing in both the client and the server (e.g.: we generate preset classes from preset slugs) that needs to create the same output. We can't remove or update the client's library due to backward compatibility (some of the output of lodash's kebabCase is saved in the post content). We have to make the server behave like the client. Changes to this function should follow updates in the client with the same logic.

Related Functions

_wp_sidebars_changed, wp_revoke_user, wp_restore_image, wp_list_cats, _wp_customize_publish_changeset

Top Google Results

User discussions

wpseek mobile