WP_REST_Global_Styles_Controller::_sanitize_global_styles_callback()publicWP 5.9.0

Sanitize the global styles ID or stylesheet to decode endpoint. For example, wp/v2/global-styles/twentytwentytwo%200.4.0 would be decoded to twentytwentytwo 0.4.0.

{} It's a method of the class: WP_REST_Global_Styles_Controller{}

No Hooks.

Return

String. Sanitized global styles ID or stylesheet.

Usage

$WP_REST_Global_Styles_Controller = new WP_REST_Global_Styles_Controller();
$WP_REST_Global_Styles_Controller->_sanitize_global_styles_callback( $id_or_stylesheet );
$id_or_stylesheet(string) (required)
Global styles ID or stylesheet.

Changelog

Since 5.9.0 Introduced.

Code of WP_REST_Global_Styles_Controller::_sanitize_global_styles_callback() WP 6.0

public function _sanitize_global_styles_callback( $id_or_stylesheet ) {
	return urldecode( $id_or_stylesheet );
}