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.
  • (string) context Optional. The operation for which the string is sanitized
  • (string) The sanitized string.
Defined at:


Sanitizes a title, or returns a fallback title.Specifically, HTML and PHP tags are stripped. Further actions can be added via the plugin API. If $title is empty and $fallback_title is set, the latter will be used.

Related Functions

sanitize_term, sanitize_url, sanitize_key, sanitize_option, sanitize_file_name

Top Google Results

User discussions

wpseek mobile