sanitize_title


sanitize_title ( $title, $fallback_title = '', $context = 'save' )

Parameters:
  • (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
Returns:
  • (string) The sanitized string.
Defined at:

Description

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