| 1 |
<?php |
| 2 |
/** |
| 3 |
* Overrides Core's wp-includes/rest-api.php and registers the new endpoint for WP 6.0. |
| 4 |
* |
| 5 |
* @package gutenberg |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Registers the Global Styles REST API routes. |
| 10 |
*/ |
| 11 |
function gutenberg_register_global_styles_endpoints() { |
| 12 |
$editor_settings = new Gutenberg_REST_Global_Styles_Controller(); |
| 13 |
$editor_settings->register_routes(); |
| 14 |
} |
| 15 |
add_action( 'rest_api_init', 'gutenberg_register_global_styles_endpoints' ); |
| 16 |
|