Make WordPress Core


Ignore:
Timestamp:
10/14/2026 06:47:16 PM (3 days ago)
Author:
jorgefilipecosta
Message:

Abilities API: Add the core/users-query ability.

Adds a read-only core/users-query ability that returns a page of users, optionally filtered by IDs, slugs, usernames, roles, or published-post authorship. Until now, the only user ability was core/get-user-info, which returns the current user's own profile. The code lives in the new private WP_Abilities_Users class.
The input has three members: where selects the users, fields the fields returned for each one, and pagination the page. The output always holds the users in items, ordered by username, and the totals in pagination.

Developed in ​https://github.com/WordPress/ai/pull/774, and ​https://github.com/WordPress/wordpress-develop/pull/10775.

Props jorgefilipecosta, gziolo, justlevine, peterwilsoncc, dkotter, jason_the_adams, ugyensupport, iamadisingh, sangu3105.
Fixes #64657.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/abilities/class-wp-abilities-settings.php

    r64311 r64346  
    1717 * future write-oriented `core/settings-update` ability.
    1818 *
    19  * Unlike the other core abilities, which are self-contained closures registered directly
    20  * in wp_register_core_abilities(), the settings abilities live in a dedicated class
     19 * Unlike the core abilities registered directly in wp_register_core_abilities() as
     20 * self-contained closures, the settings abilities live in a dedicated class
    2121 * because they share state: the set of exposed settings is computed once at registration
    2222 * and reused by the input schema, the output schema, and the execute callback, and the
Note: See TracChangeset for help on using the changeset viewer.