WP_REST_Global_Styles_Controller::_sanitize_global_styles_callback( string $id_or_stylesheet ): string

Sanitize the global styles ID or stylesheet to decode endpoint.


Description

For example, wp/v2/global-styles/twentytwentytwo%200.4.0 would be decoded to twentytwentytwo 0.4.0.


Top ↑

Parameters

$id_or_stylesheet string Required
Global styles ID or stylesheet.

Top ↑

Return

string Sanitized global styles ID or stylesheet.


Top ↑

Source

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

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

Top ↑

Changelog

Changelog
Version Description
5.9.0 Introduced.

Top ↑

User Contributed Notes

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