summaryrefslogtreecommitdiffstats
path: root/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-upstream/6.6.1+dfsg1.tar.xz
wordpress-upstream/6.6.1+dfsg1.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php')
-rw-r--r--wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
index c2e0db8..c8d9b11 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
@@ -25,6 +25,14 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
protected $meta;
/**
+ * Whether the controller supports batching.
+ *
+ * @since 6.6.0
+ * @var array
+ */
+ protected $allow_batch = array( 'v1' => true );
+
+ /**
* Constructor.
*
* @since 4.7.0
@@ -61,7 +69,8 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
'permission_callback' => array( $this, 'create_item_permissions_check' ),
'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
),
- 'schema' => array( $this, 'get_public_item_schema' ),
+ 'allow_batch' => $this->allow_batch,
+ 'schema' => array( $this, 'get_public_item_schema' ),
)
);
@@ -69,7 +78,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
$this->namespace,
'/' . $this->rest_base . '/(?P<id>[\d]+)',
array(
- 'args' => array(
+ 'args' => array(
'id' => array(
'description' => __( 'Unique identifier for the user.' ),
'type' => 'integer',
@@ -107,7 +116,8 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
),
),
),
- 'schema' => array( $this, 'get_public_item_schema' ),
+ 'allow_batch' => $this->allow_batch,
+ 'schema' => array( $this, 'get_public_item_schema' ),
)
);