Codex tools: Log in
Contents |
sanitize_title is a filter applied to a value to be cleaned up for use in a URL by the function sanitize_title().
function my_sanitize_title($title, $raw_title, $context) {
# ...
}
add_filter('sanitize_title', 'my_sanitize_title', 10, 3);
sanitize_title().
Require URL component be lower-cased:
add_filter('sanitize_title', 'strtolower');
Replace plusses with dashes:
function plush_to_dash($title) {
return str_replace('+', '-', $title);
}
add_filter('sanitize_title', 'plus_to_dash');
This filter is applied by: