WPDev.one
Core Function
View Source on Trac ↗

sanitize_title_with_dashes()

sanitize_title_with_dashes( mixed $title, mixed $raw_title = '', mixed $context = 'display' )

Sanitizes a title, replacing whitespace and a few other characters with dashes.

Parameters 2 required

Name / Type Description
$title
string

The title to be sanitized.

Required
$raw_title
string

Optional. Not used. Default empty.

string

$context Optional. The operation for which the string is sanitized. When set to 'save', additional entities are converted to hyphens or stripped entirely. Default 'display'.

Required

Return Value

(string)
The sanitized title.

Function Information

Since Version
1.2.0
Source File
wp-includes/formatting.php
Advertisement