apply_filters( 'wp_register_ability_category_args', \array<string, , string $slug )
- Since
- 6.9.0
Filters the ability category arguments before they are validated and used to instantiate the ability category.
Compatibility
- WordPress
- since 6.9.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in 3 of the 5 tracked releases, added in 6.9.0.
Parameters
\array<string,- mixed> $args { The arguments used to instantiate the ability category.
@type string $label The human-readable label for the ability category.
@type string $description A description of the ability category.
@type array<string, mixed> $meta Optional. Additional metadata for the ability category.
}$labelstringThe human-readable label for the ability category.$descriptionstringA description of the ability category.mixedarray<string,> $meta Optional. Additional metadata for the ability category.
$slugstring- The slug of the ability category.
Where this hook fires · 1
wp-includes/abilities-api/class-wp-ability-categories-registry.php:91WP_Ability_Categories_Registry::register()
Source code
* @type string $label The human-readable label for the ability category. * @type string $description A description of the ability category. * @type array<string, mixed> $meta Optional. Additional metadata for the ability category. * } * @param string $slug The slug of the ability category. */ $args = apply_filters( 'wp_register_ability_category_args', $args, $slug ); try { // WP_Ability_Category::prepare_properties() will throw an exception if the properties are invalid. $category = new WP_Ability_Category( $slug, $args ); } catch ( InvalidArgumentException $e ) { _doing_it_wrong(Changelog
Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.