From 82e4791dade7817c487ed857c6307136e85d7484 Mon Sep 17 00:00:00 2001 From: crmv1 <128811084+crmv1@users.noreply.github.com> Date: Wed, 6 May 2026 18:43:31 -0400 Subject: [PATCH] Docs: Fix malformed nested DocBlock types for wp_register_ability() --- src/wp-includes/abilities-api.php | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/wp-includes/abilities-api.php b/src/wp-includes/abilities-api.php index 73ba658f3f10d..d7f5e18086b64 100644 --- a/src/wp-includes/abilities-api.php +++ b/src/wp-includes/abilities-api.php @@ -251,23 +251,16 @@ * @type array $output_schema Optional. JSON Schema definition for the ability's output. * Describes the structure of successful return values from * `execute_callback`. Used for documentation and validation. - * @type array $meta { - * Optional. Additional metadata for the ability. - * - * @type array $annotations { - * Optional. Semantic annotations describing the ability's behavioral characteristics. - * These annotations are hints for tooling and documentation. - * - * @type bool|null $readonly Optional. If true, the ability does not modify its environment. - * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its environment. - * If false, the ability performs only additive updates. - * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments - * will have no additional effect on its environment. - * } - * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. - * When true, the ability can be invoked via HTTP requests. - * Default false. - * } + * @type array $meta Optional. Additional metadata for the ability. + * @type array $annotations Optional. Semantic annotations describing the ability's behavioral + * characteristics. These annotations are hints for tooling and documentation. + * @type bool|null $readonly Optional. If true, the ability does not modify its environment. + * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its + * environment. If false, the ability performs only additive updates. + * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments + * will have no additional effect on its environment. + * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. When true, + * the ability can be invoked via HTTP requests. Default false. * @type string $ability_class Optional. Fully-qualified custom class name to instantiate * instead of the default `WP_Ability` class. The custom class * must extend `WP_Ability`. Useful for advanced customization