WP_REST_Global_Styles_Controller::_sanitize_global_styles_callback()
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.
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. |
WP_REST_Global_Styles_Controller::_sanitize_global_styles_callback() WP REST Global Styles Controller:: sanitize global styles callback code WP 6.6.2
public function _sanitize_global_styles_callback( $id_or_stylesheet ) { return urldecode( $id_or_stylesheet ); }