PluginProbe
Gutenberg / 19.6.1
Gutenberg v19.6.1
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
← All changes | lib/rest-api.php +6 -14 23.1.019.6.1 View file →
@@ -18,16 +18,17 @@
18 18 *
19 19 * @return array Array of arguments for registering a post type.
20 20 */
21 21 function gutenberg_override_global_styles_endpoint( array $args ): array {
22 - $args['rest_controller_class'] = 'WP_REST_Global_Styles_Controller_Gutenberg';
23 - $args['late_route_registration'] = true;
24 - $args['show_in_rest'] = true;
25 - $args['rest_base'] = 'global-styles';
22 + $args['rest_controller_class'] = 'WP_REST_Global_Styles_Controller_Gutenberg';
23 + $args['revisions_rest_controller_class'] = 'Gutenberg_REST_Global_Styles_Revisions_Controller_6_6';
24 + $args['late_route_registration'] = true;
25 + $args['show_in_rest'] = true;
26 + $args['rest_base'] = 'global-styles';
26 27
27 28 return $args;
28 29 }
29 -add_filter( 'register_wp_global_styles_post_type_args', 'gutenberg_override_global_styles_endpoint' );
30 +add_filter( 'register_wp_global_styles_post_type_args', 'gutenberg_override_global_styles_endpoint', 10, 2 );
30 31
31 32 /**
32 33 * Registers the Edit Site Export REST API routes.
33 34 */
@@ -35,13 +36,4 @@
35 36 $edit_site_export_controller = new WP_REST_Edit_Site_Export_Controller_Gutenberg();
36 37 $edit_site_export_controller->register_routes();
37 38 }
38 39 add_action( 'rest_api_init', 'gutenberg_register_edit_site_export_controller_endpoints' );
39 -
40 -/**
41 - * Registers the Icons Registry REST API routes.
42 - */
43 -function gutenberg_register_icon_controller_endpoints() {
44 - $icons_controller = new WP_REST_Icons_Controller_Gutenberg();
45 - $icons_controller->register_routes();
46 -}
47 -add_action( 'rest_api_init', 'gutenberg_register_icon_controller_endpoints' );