WP_REST_Controller::sanitize_slug( string $slug )

Sanitizes the slug value.


Description

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

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

Top ↑

Changelog

Version Description
4.7.0 Introduced.