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.

Метод класса: WP_REST_Global_Styles_Controller{}

Хуков нет.

Возвращает

Строку. Sanitized global styles ID or stylesheet.

Использование

$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(строка) (обязательный)
Global styles ID or stylesheet.

Список изменений

С версии 5.9.0 Введена.

Код WP_REST_Global_Styles_Controller::_sanitize_global_styles_callback() WP 6.8

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