wp_register_ability_category_args
Filters the ability category arguments before they are validated and used to instantiate the ability category.
Usage
add_filter( 'wp_register_ability_category_args', 'wp_kama_register_ability_category_args_filter', 10, 2 ); /** * Function for `wp_register_ability_category_args` filter-hook. * * @param array$args The arguments used to instantiate the ability category. * @param string $slug The slug of the ability category. * * @return array */ function wp_kama_register_ability_category_args_filter( $args, $slug ){ // filter... return $args; }
- $args(array<string, mixed>)
The arguments used to instantiate the ability category.
-
label(string)
The human-readable label for the ability category. -
description(string)
A description of the ability category. - mixed>(array<string,)
$meta Optional. Additional metadata for the ability category.
-
- $slug(string)
- The slug of the ability category.
Changelog
| Since 6.9.0 | Introduced. |
Where the hook is called
wp_register_ability_category_args
wp-includes/abilities-api/class-wp-ability-categories-registry.php 91
$args = apply_filters( 'wp_register_ability_category_args', $args, $slug );