# gutenberg/12.6.0/lib/compat/wordpress-6.0/rest-api.php

Gutenberg, version 12.6.0. 16 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/12.6.0/code/lib/compat/wordpress-6.0/rest-api.php
- Raw: https://pluginprobe.com/plugins/gutenberg/12.6.0/raw/lib/compat/wordpress-6.0/rest-api.php
- Modified: 2022-02-02T16:18:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/gutenberg/12.6.0/code/lib/compat/wordpress-6.0/rest-api.php#L10-L20`.

```php
<?php
/**
 * Overrides Core's wp-includes/rest-api.php and registers the new endpoint for WP 6.0.
 *
 * @package gutenberg
 */

/**
 * Registers the Global Styles REST API routes.
 */
function gutenberg_register_global_styles_endpoints() {
	$editor_settings = new Gutenberg_REST_Global_Styles_Controller();
	$editor_settings->register_routes();
}
add_action( 'rest_api_init', 'gutenberg_register_global_styles_endpoints' );

```
