Sanitizes the slug value.
$slugstringrequired
public function sanitize_slug( $slug ) {
return sanitize_title( $slug );
}
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_controller/sanitize_slug