@@ -192,8 +192,44 @@ public function __construct( string $name, array $args ) {
192192 *
193193 * @see WP_Abilities_Registry::register()
194194 *
195- * @param array<string, mixed> $args An associative array of arguments used to instantiate the class.
196- * @return array<string, mixed> The validated and prepared properties.
195+ * @param array<string, mixed> $args {
196+ * An associative array of arguments used to instantiate the ability class.
197+ *
198+ * @type string $label The human-readable label for the ability.
199+ * @type string $description A detailed description of what the ability does.
200+ * @type string $category The category slug this ability belongs to.
201+ * @type callable $execute_callback A callback function to execute when the ability is invoked.
202+ * Receives optional mixed input and returns mixed result or WP_Error.
203+ * @type callable $permission_callback A callback function to check permissions before execution.
204+ * Receives optional mixed input and returns bool or WP_Error.
205+ * @type array<string, mixed> $input_schema Optional. JSON Schema definition for the ability's input.
206+ * @type array<string, mixed> $output_schema Optional. JSON Schema definition for the ability's output.
207+ * @type array<string, mixed> $meta {
208+ * Optional. Additional metadata for the ability.
209+ *
210+ * @type array<string, bool|string> $annotations Optional. Annotation metadata for the ability.
211+ * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. Default false.
212+ * }
213+ * }
214+ * @return array<string, mixed> {
215+ * An associative array of arguments with validated and prepared properties for the ability class.
216+ *
217+ * @type string $label The human-readable label for the ability.
218+ * @type string $description A detailed description of what the ability does.
219+ * @type string $category The category slug this ability belongs to.
220+ * @type callable $execute_callback A callback function to execute when the ability is invoked.
221+ * Receives optional mixed input and returns mixed result or WP_Error.
222+ * @type callable $permission_callback A callback function to check permissions before execution.
223+ * Receives optional mixed input and returns bool or WP_Error.
224+ * @type array<string, mixed> $input_schema Optional. JSON Schema definition for the ability's input.
225+ * @type array<string, mixed> $output_schema Optional. JSON Schema definition for the ability's output.
226+ * @type array<string, mixed> $meta {
227+ * Additional metadata for the ability.
228+ *
229+ * @type array<string, bool|string> $annotations Optional. Annotation metadata for the ability.
230+ * @type bool $show_in_rest Whether to expose this ability in the REST API. Default false.
231+ * }
232+ * }
197233 * @throws InvalidArgumentException if an argument is invalid.
198234 *
199235 * @phpstan-return array{
0 commit comments