This page redirects to an external site: https://developer.wordpress.org/reference/functions/sanitize_title_with_dashes
Sanitizes title, replacing whitespace with dashes.
Limits the output to alphanumeric characters, underscore (_) and dash (-). Whitespace becomes a dash.
Note that it does not replace special accented characters (see plugins such as [1] to fix that).
<?php sanitize_title_with_dashes( $title, $unused, $context = 'display' ) ?>
<?php
echo sanitize_title_with_dashes("I'm in LOVE with WordPress!!!1");
// this will print: im-in-love-with-wordpress1
?>
Does not apply the sanitize_title filter to the title.
Since: 1.2.0
sanitize_title_with_dashes() is located in wp-includes/formatting.php.
sanitize_title_with_dashes() is in a class of functions that help you sanitize potentially unsafe data which allow you to pass an arbitrary variable and receive the clean version based on data type. Others include: