|
44 | 44 | * @type string $ability_class Optional. Custom class to instantiate instead of WP_Ability. |
45 | 45 | * } |
46 | 46 | * @return WP_Ability|null An instance of registered ability on success, null on failure. |
47 | | - * |
48 | | - * @phpstan-param array{ |
49 | | - * label?: string, |
50 | | - * description?: string, |
51 | | - * category?: string, |
52 | | - * execute_callback?: callable( mixed $input= ): (mixed|WP_Error), |
53 | | - * permission_callback?: callable( mixed $input= ): (bool|WP_Error), |
54 | | - * input_schema?: array<string, mixed>, |
55 | | - * output_schema?: array<string, mixed>, |
56 | | - * meta?: array{ |
57 | | - * annotations?: array<string, (bool|string)>, |
58 | | - * show_in_rest?: bool, |
59 | | - * ...<string, mixed>, |
60 | | - * }, |
61 | | - * ability_class?: class-string<WP_Ability>, |
62 | | - * ...<string, mixed> |
63 | | - * } $args |
64 | 47 | */ |
65 | 48 | function wp_register_ability( string $name, array $args ): ?WP_Ability { |
66 | 49 | if ( ! did_action( 'wp_abilities_api_init' ) ) { |
@@ -138,13 +121,6 @@ function wp_get_abilities(): array { |
138 | 121 | * @type array<string, mixed> $meta Optional. Additional metadata for the category. |
139 | 122 | * } |
140 | 123 | * @return WP_Ability_Category|null The registered category instance on success, null on failure. |
141 | | - * |
142 | | - * @phpstan-param array{ |
143 | | - * label: string, |
144 | | - * description: string, |
145 | | - * meta?: array<string, mixed>, |
146 | | - * ...<string, mixed> |
147 | | - * } $args |
148 | 124 | */ |
149 | 125 | function wp_register_ability_category( string $slug, array $args ): ?WP_Ability_Category { |
150 | 126 | return WP_Abilities_Category_Registry::get_instance()->register( $slug, $args ); |
|
0 commit comments