wpseek.com
A WordPress-centric search engine for devs and theme authors



sanitize_title › WordPress Function

Since1.0.0
Deprecatedn/a
sanitize_title ( $title, $fallback_title = '', $context = 'save' )
Parameters: (3)
  • (string) $title The string to be sanitized.
    Required: Yes
  • (string) $fallback_title Optional. A title to use if $title is empty. Default empty.
    Required: No
    Default: (empty)
  • (string) $context Optional. The operation for which the string is sanitized. When set to 'save', the string runs through remove_accents(). Default 'save'.
    Required: No
    Default: 'save'
Returns:
  • (string) The sanitized string.
Defined at:
Codex:

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 {@see 'sanitize_title'} filter. If $title is empty and $fallback_title is set, the latter will be used.


Source

Soon...