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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52069 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson
2021-11-09 02:15:23 +00:00
parent ecf1d6a158
commit f034bc832e
59 changed files with 4240 additions and 168 deletions

View File

@@ -311,6 +311,12 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
$prepared_args['has_published_posts'] = get_post_types( array( 'show_in_rest' => true ), 'names' );
}
if ( ! empty( $request['has_published_posts'] ) ) {
$prepared_args['has_published_posts'] = ( true === $request['has_published_posts'] )
? get_post_types( array( 'show_in_rest' => true ), 'names' )
: (array) $request['has_published_posts'];
}
if ( ! empty( $prepared_args['search'] ) ) {
$prepared_args['search'] = '*' . $prepared_args['search'] . '*';
}
@@ -1580,6 +1586,15 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
),
);
$query_params['has_published_posts'] = array(
'description' => __( 'Limit result set to users who have published posts.' ),
'type' => array( 'boolean', 'array' ),
'items' => array(
'type' => 'string',
'enum' => get_post_types( array( 'show_in_rest' => true ), 'names' ),
),
);
/**
* Filters REST API collection parameters for the users controller.
*