Sanitizes the slug value.
Description
{@internal We can’t use sanitize_title() directly, as the second parameter is the fallback title, which would end up being set to the request object.}
Parameters
$slugstringrequired- Slug value passed in request.
Source
public function sanitize_slug( $slug ) {
return sanitize_title( $slug );
}
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.