Uses
Uses | Description |
---|---|
wp-includes/formatting.php: sanitize_title() | Sanitizes a string into a slug, which can be used in URLs or HTML attributes. |
Sanitizes the slug value.
(string) (Required) Slug value passed in request.
(string) Sanitized value for the slug.
File: wp-includes/rest-api/endpoints/class-wp-rest-controller.php
public function sanitize_slug( $slug ) { return sanitize_title( $slug ); }
Version | Description |
---|---|
4.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_controller/sanitize_slug