Make WordPress Core


Ignore:
Timestamp:
11/09/2021 02:15:23 AM (3 years ago)
Author:
noisysocks
Message:

Add Site Editor and PHP changes from Gutenberg 10.1 - 11.9

  • First pass at adding the site editor from the Gutenberg plugin to wp-admin/site-editor.php.
  • Adds miscellaneous PHP changes from Gutenberg 10.1 - 11.9.

Follows [52042].
See #54337.
Props youknowriad, aristath, hellofromtonya, gziolo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r51943 r52069  
    312312        }
    313313
     314        if ( ! empty( $request['has_published_posts'] ) ) {
     315            $prepared_args['has_published_posts'] = ( true === $request['has_published_posts'] )
     316                ? get_post_types( array( 'show_in_rest' => true ), 'names' )
     317                : (array) $request['has_published_posts'];
     318        }
     319
    314320        if ( ! empty( $prepared_args['search'] ) ) {
    315321            $prepared_args['search'] = '*' . $prepared_args['search'] . '*';
     
    15811587        );
    15821588
     1589        $query_params['has_published_posts'] = array(
     1590            'description' => __( 'Limit result set to users who have published posts.' ),
     1591            'type'        => array( 'boolean', 'array' ),
     1592            'items'       => array(
     1593                'type' => 'string',
     1594                'enum' => get_post_types( array( 'show_in_rest' => true ), 'names' ),
     1595            ),
     1596        );
     1597
    15831598        /**
    15841599         * Filters REST API collection parameters for the users controller.
Note: See TracChangeset for help on using the changeset viewer.