WP_REST_Controller::sanitize_slug( string $slug ): string

Sanitizes the slug value.


Description

Top ↑

See also


Top ↑

Parameters

$slug string Required
Slug value passed in request.

Top ↑

Return

string Sanitized value for the slug.


Top ↑

Source

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

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


Top ↑

Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes

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