Make WordPress Core


Ignore:
Timestamp:
02/13/2024 03:10:37 PM (3 years ago)
Author:
davidbaumwald
Message:

REST API: Revert the refactor of global styles endpoints in REST API in [57624].

[57624] introduced some E2E test failures which are the result of an incompatibility with the Gutenberg plugin.

Props jorbin, spacedmonkey, swissspidy, hellofromTonya, youknowriad, costdev.
See #60131.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r57624 r57628  
    474474                'wp_global_styles',
    475475                array(
    476                         'label'                           => _x( 'Global Styles', 'post type general name' ),
    477                         'description'                     => __( 'Global styles to include in themes.' ),
    478                         'public'                          => false,
    479                         '_builtin'                        => true, /* internal use only. don't use this when registering your own post type. */
    480                         '_edit_link'                      => '/site-editor.php?canvas=edit', /* internal use only. don't use this when registering your own post type. */
    481                         'show_ui'                         => false,
    482                         'show_in_rest'                    => true,
    483                         'rewrite'                         => false,
    484                         'rest_base'                       => 'global-styles',
    485                         'rest_controller_class'           => 'WP_REST_Global_Styles_Controller',
    486                         'revisions_rest_controller_class' => 'WP_REST_Global_Styles_Revisions_Controller',
    487                         'late_route_registration'         => true,
    488                         'capabilities'                    => array(
     476                        'label'        => _x( 'Global Styles', 'post type general name' ),
     477                        'description'  => __( 'Global styles to include in themes.' ),
     478                        'public'       => false,
     479                        '_builtin'     => true, /* internal use only. don't use this when registering your own post type. */
     480                        '_edit_link'   => '/site-editor.php?canvas=edit', /* internal use only. don't use this when registering your own post type. */
     481                        'show_ui'      => false,
     482                        'show_in_rest' => false,
     483                        'rewrite'      => false,
     484                        'capabilities' => array(
    489485                                'read'                   => 'edit_theme_options',
    490486                                'create_posts'           => 'edit_theme_options',
    … …  
    495491                                'delete_others_posts'    => 'edit_theme_options',
    496492                        ),
    497                         'map_meta_cap'                    => true,
    498                         'supports'                        => array(
     493                        'map_meta_cap' => true,
     494                        'supports'     => array(
    499495                                'title',
    500496                                'editor',
Note: See TracChangeset for help on using the changeset viewer.