WP_REST_Controller::sanitize_slug( string $slug )

Sanitizes the slug value.


Description

See also


Parameters

$slug

(Required) Slug value passed in request.


Return

(string) Sanitized value for the slug.


Source

File: wp-includes/rest-api/endpoints/class-wp-rest-controller.php

	public function sanitize_slug( $slug ) {
		return sanitize_title( $slug );
	}


Changelog

Changelog
Version Description
WP-4.7.0 Introduced.