WP_REST_Global_Styles_Controller::_sanitize_global_styles_callback() – Sanitize the global styles ID or stylesheet to decode endpoint.

You appear to be a bot. Output may be restricted

Description

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`.

Usage

$string = WP_REST_Global_Styles_Controller::_sanitize_global_styles_callback( $id_or_stylesheet );

Parameters

$id_or_stylesheet
( string ) required – Global styles ID or stylesheet.

Returns

string Sanitized global styles ID or stylesheet.

Source

File name: wordpress/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
Lines:

1 to 3 of 3
  public function _sanitize_global_styles_callback( $id_or_stylesheet ) {
    return urldecode( $id_or_stylesheet );
  }
 

 View on GitHub View on Trac