Title: wp_register_ability_args
Published: February 24, 2026

---

# apply_filters( ‘wp_register_ability_args’, array<string, , string $name )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#wp--skip-link--target)

Filters the ability arguments before they are validated and used to instantiate 
the ability.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#parameters)󠁿

mixed> $args { An associative array of arguments for the ability.
 @type string 
$label The human-readable label for the ability. @type string $description A detailed
description of what the ability does. @type string $category The ability category
slug this ability belongs to. @type callable $execute_callback A callback function
to execute when the ability is invoked. Receives optional mixed input and returns
mixed result or [WP_Error](https://developer.wordpress.org/reference/classes/wp_error/).
@type callable $permission_callback A callback function to check permissions before
execution. Receives optional mixed input and returns bool or [WP_Error](https://developer.wordpress.org/reference/classes/wp_error/).
@type array<string, mixed> $input_schema Optional. JSON Schema definition for the
ability’s input. @type array<string, mixed> $output_schema Optional. JSON Schema
definition for the ability’s output. @type array<string, mixed> $meta { Optional.
Additional metadata for the ability. @type array<string, `bool|string`> $annotations
Optional. Annotation metadata for the ability. @type bool $show_in_rest Optional.
Whether to expose this ability in the REST API. Default false. } @type string $ability_class
Optional. Custom class to instantiate instead of [WP_Ability](https://developer.wordpress.org/reference/classes/wp_ability/).}

`$name`string

The name of the ability, with its namespace.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#source)󠁿

    ```php
    $args = apply_filters( 'wp_register_ability_args', $args, $name );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/abilities-api/class-wp-abilities-registry.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/abilities-api/class-wp-abilities-registry.php#L129)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/abilities-api/class-wp-abilities-registry.php#L129-L129)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Abilities_Registry::register()](https://developer.wordpress.org/reference/classes/wp_abilities_registry/register/)`wp-includes/abilities-api/class-wp-abilities-registry.php` |

Registers a new ability.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_register_ability_args/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.9.0](https://developer.wordpress.org/reference/since/6.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_register_ability_args%2F)
before being able to contribute a note or feedback.