WP_REST_Controller::sanitize_slug( string $slug ): string

Sanitizes the slug value.

Description

See also

Parameters

$slugstringrequired
Slug value passed in request.

Return

string Sanitized value for the slug.

Source

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

Changelog

VersionDescription
4.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.