WP_REST_Controller::sanitize_slug( string $slug )

Sanitizes the slug value.


Description Description

See also See also


Top ↑

Parameters Parameters

$slug

(string) (Required) Slug value passed in request.


Top ↑

Return Return

(string) Sanitized value for the slug.


Top ↑

Source Source

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

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


Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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