sanitize_title ( $title, $fallback_title = '', $context = 'save' )
- (string) title The string to be sanitized.
- (string) fallback_title Optional. A title to use if $title is empty. Default empty.
- (string) context Optional. The operation for which the string is sanitized. Default 'save'.
- (string) The sanitized string.
- Introduced in WordPress: 1.0.0
- Deprecated in WordPress: —
Sanitizes a string into a slug, which can be used in URLs or HTML attributes.By default, converts accent characters to ASCII characters and further
limits the output to alphanumeric characters, underscore (_) and dash (-)
through the Array filter.
If `$title` is empty and `$fallback_title` is set, the latter will be used.