Make WordPress Core


Ignore:
Timestamp:
02/13/2024 03:10:37 PM (3 months 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/class-wp-post-type.php

    r57624 r57628  
    914914     *
    915915     * @since 6.4.0
    916      * @since 6.5.0 Prevents autosave class instantiation for wp_global_styles post types.
    917916     *
    918917     * @return WP_REST_Controller|null The controller instance, or null if the post type
     
    924923        }
    925924
    926         if ( in_array( $this->name, array( 'attachment', 'wp_global_styles' ), true ) ) {
     925        if ( 'attachment' === $this->name ) {
    927926            return null;
    928927        }
Note: See TracChangeset for help on using the changeset viewer.