Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
* Definitions mirror core's default ability category registration
* (wordpress-develop trunk, wp_register_core_ability_categories()) verbatim,
* including being passed through the `default` text domain at declaration
* time, so the package's declarations are indistinguishable from core's own
* on 7.2+ hosts — with one exception: the `media` category is package-authored
* (core trunk registers no media category; nothing to copy verbatim from
* trunk). This is not a general category registry: keep an entry in
* time, so the package's declarations match core's own on 7.2+ hosts.
* The `media` and `site-editing` categories are package-authored because
* core does not register them. This is not a general category registry: keep an entry in
* this table only for as long as the manifest declares a category that
* needs it, and keep the strings in sync when a trunk refresh changes them.
*
Expand All @@ -40,15 +39,19 @@ final class Categories {
* @var array<string, array{label: string, description: string}>
*/
private const DEFINITIONS = array(
'site' => array(
'site-editing' => array(
'label' => 'Site Editing',
'description' => 'Abilities that retrieve or modify site structure and presentation.',
),
'site' => array(
'label' => 'Site',
'description' => 'Abilities that retrieve or modify site information and settings.',
),
'user' => array(
'user' => array(
'label' => 'User',
'description' => 'Abilities that retrieve or modify user information and settings.',
),
'content' => array(
'content' => array(
'label' => 'Content',
'description' => 'Abilities that retrieve or manage posts and other content.',
),
Expand All @@ -60,7 +63,7 @@ final class Categories {
* with the same trunk refresh cadence as the entries above. If core lands
* a media category, replace this definition with core's verbatim strings.
*/
'media' => array(
'media' => array(
'label' => 'Media',
'description' => 'Abilities that retrieve or manage media items and attachments.',
),
Expand Down
47 changes: 29 additions & 18 deletions src/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,18 @@ private function __construct() {}
*/
public static function all(): array {
return array(
'core/content-query' => array(
'wp/navigation-menus-query' => array(
'name' => 'wp/navigation-menus-query',
'class' => Navigation_Menus\Navigation_Menus_Query::class,
'category' => 'site-editing',
'tier' => self::TIER_EXPERIMENTAL,
'min_wp_version' => '6.9',
'core_since' => null,
'requires' => array(),
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/858',
),
'core/content-query' => array(
'name' => 'core/content-query',
/*
* `::class` resolves to the FQCN without loading the class,
Expand All @@ -60,7 +71,7 @@ public static function all(): array {
// the landed core work (wordpress-develop PR 12195) before release.
'proposal' => 'https://github.com/WordPress/wordpress-develop/pull/12195',
),
'core/settings-get' => array(
'core/settings-get' => array(
'name' => 'core/settings-get',
'class' => Settings\Settings_Get::class,
'category' => 'site',
Expand All @@ -72,7 +83,7 @@ public static function all(): array {
// Landed in trunk as b6512b1e8c (Trac #64605), developed in this PR.
'proposal' => 'https://github.com/WordPress/wordpress-develop/pull/12141',
),
'core/users-query' => array(
'core/users-query' => array(
'name' => 'core/users-query',
'class' => Users\Users_Query::class,
'category' => 'user',
Expand All @@ -93,7 +104,7 @@ public static function all(): array {
* filing). The entries flip to core with `core_since` set once
* the abilities land in an actual WordPress release.
*/
'core/content-create' => array(
'core/content-create' => array(
'name' => 'core/content-create',
'class' => Content\Content_Create::class,
'category' => 'content',
Expand All @@ -104,7 +115,7 @@ public static function all(): array {
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/1025',
),
'core/content-update' => array(
'core/content-update' => array(
'name' => 'core/content-update',
'class' => Content\Content_Update::class,
'category' => 'content',
Expand All @@ -115,7 +126,7 @@ public static function all(): array {
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/1025',
),
'core/content-delete' => array(
'core/content-delete' => array(
'name' => 'core/content-delete',
'class' => Content\Content_Delete::class,
'category' => 'content',
Expand All @@ -137,7 +148,7 @@ public static function all(): array {
* the package-authored `media` ability category (core trunk has no
* media category; see Categories).
*/
'wp/media-query' => array(
'wp/media-query' => array(
'name' => 'wp/media-query',
'class' => Media\Media_Query::class,
'category' => 'media',
Expand All @@ -161,7 +172,7 @@ public static function all(): array {
* They use the package-authored `media` ability category (see
* Categories).
*/
'wp/media-upload' => array(
'wp/media-upload' => array(
'name' => 'wp/media-upload',
'class' => Media\Media_Upload::class,
'category' => 'media',
Expand All @@ -172,7 +183,7 @@ public static function all(): array {
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/1104',
),
'wp/media-update' => array(
'wp/media-update' => array(
'name' => 'wp/media-update',
'class' => Media\Media_Update::class,
'category' => 'media',
Expand All @@ -183,7 +194,7 @@ public static function all(): array {
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/1104',
),
'wp/media-delete' => array(
'wp/media-delete' => array(
'name' => 'wp/media-delete',
'class' => Media\Media_Delete::class,
'category' => 'media',
Expand All @@ -208,7 +219,7 @@ public static function all(): array {
* core (`core_since` stays null and flips when core lands it), so its
* name and schema carry no promises yet (NAME-LIFECYCLE.md).
*/
'wp/settings-update' => array(
'wp/settings-update' => array(
'name' => 'wp/settings-update',
'class' => Settings\Settings_Update::class,
'category' => 'site',
Expand All @@ -233,7 +244,7 @@ public static function all(): array {
* core (`core_since` stays null and flips when core lands them), so
* their names and schemas carry no promises yet (NAME-LIFECYCLE.md).
*/
'wp/user-create' => array(
'wp/user-create' => array(
'name' => 'wp/user-create',
'class' => Users\User_Create::class,
'category' => 'user',
Expand All @@ -244,7 +255,7 @@ public static function all(): array {
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/1105',
),
'wp/user-update' => array(
'wp/user-update' => array(
'name' => 'wp/user-update',
'class' => Users\User_Update::class,
'category' => 'user',
Expand All @@ -255,7 +266,7 @@ public static function all(): array {
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/1105',
),
'wp/user-delete' => array(
'wp/user-delete' => array(
'name' => 'wp/user-delete',
'class' => Users\User_Delete::class,
'category' => 'user',
Expand All @@ -278,7 +289,7 @@ public static function all(): array {
* pre-7.2 hosts), and the taxonomy opt-in `show_in_abilities` is
* native on 7.2+ and polyfilled on 6.9-7.1.
*/
'wp/terms-query' => array(
'wp/terms-query' => array(
'name' => 'wp/terms-query',
'class' => Terms\Terms_Query::class,
'category' => 'content',
Expand Down Expand Up @@ -312,7 +323,7 @@ public static function all(): array {
* it on pre-7.2 hosts), and the taxonomy opt-in they ride is the
* `taxonomy_show_in_abilities` support feature, as for the query.
*/
'wp/term-create' => array(
'wp/term-create' => array(
'name' => 'wp/term-create',
'class' => Terms\Term_Create::class,
'category' => 'content',
Expand All @@ -323,7 +334,7 @@ public static function all(): array {
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/1103',
),
'wp/term-update' => array(
'wp/term-update' => array(
'name' => 'wp/term-update',
'class' => Terms\Term_Update::class,
'category' => 'content',
Expand All @@ -334,7 +345,7 @@ public static function all(): array {
'renamed_from' => null,
'proposal' => 'https://github.com/WordPress/ai/pull/1103',
),
'wp/term-delete' => array(
'wp/term-delete' => array(
'name' => 'wp/term-delete',
'class' => Terms\Term_Delete::class,
'category' => 'content',
Expand Down
Loading
Loading