# gutenberg/18.1.2/lib/rest-api.php

Gutenberg, version 18.1.2. 21 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/18.1.2/code/lib/rest-api.php
- Raw: https://pluginprobe.com/plugins/gutenberg/18.1.2/raw/lib/rest-api.php
- Modified: 2023-08-23T15:11:56+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/18.1.2/code/lib/rest-api.php#L10-L20`.

```php
<?php
/**
 * PHP and WordPress configuration compatibility functions for the Gutenberg
 * editor plugin changes related to REST API.
 *
 * @package gutenberg
 */

if ( ! defined( 'ABSPATH' ) ) {
	die( 'Silence is golden.' );
}

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

```
