WP_REST_Controller::sanitize_slug( string $slug )
Sanitizes the slug value.
Description Description
See also See also
Parameters Parameters
- $slug
-
(string) (Required) Slug value passed in request.
Return Return
(string) Sanitized value for the slug.
Source Source
File: wp-includes/rest-api/endpoints/class-wp-rest-controller.php
public function sanitize_slug( $slug ) { return sanitize_title( $slug ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |