Title: wp_get_abilities_item_include
Published: August 20, 2026

---

# apply_filters( ‘wp_get_abilities_item_include’, bool $include, WP_Ability $ability, array $args )

## In this article

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

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

Filters whether an individual ability should be included in the result set.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/wp_get_abilities_item_include/?output_format=md#description)󠁿

Fires after the declarative filters and the caller-scoped item_include_callback.

Plugins can use this to enforce universal inclusion rules regardless of what the
caller passed in $args.

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

 `$include`bool

Whether to include the ability. Default true (after declarative filters pass).

`$ability`[WP_Ability](https://developer.wordpress.org/reference/classes/wp_ability/)

The ability instance being evaluated.

`$args`array

The full $args array passed to [wp_get_abilities()](https://developer.wordpress.org/reference/functions/wp_get_abilities/).

More Arguments from wp_get_abilities( … $args )

Arguments to filter the returned abilities. Default empty array (returns all).

 * `category` string
 * Filter by category slug. Only abilities whose category exactly matches the given
   slug are included.
 * `namespace` string
 * Filter by ability namespace prefix. Pass the namespace without a trailing slash,
   e.g. `'woocommerce'` matches `'woocommerce/create-order'`.
 * `meta` array
 * Filter by meta key/value pairs. All conditions must match (AND logic). Supports
   nested arrays for structured meta, e.g. `array( 'mcp' => array( 'public' => true))`.
 * `item_include_callback` callable
 * Optional. A callback invoked per ability after declarative filters. Receives 
   a [WP_Ability](https://developer.wordpress.org/reference/classes/wp_ability/)
   instance, returns bool.
    Return true to include, false to exclude.
 * `result_callback` callable
 * Optional. A callback invoked once on the full matched array. Receives [WP_Ability](https://developer.wordpress.org/reference/classes/wp_ability/)[],
   must return [WP_Ability](https://developer.wordpress.org/reference/classes/wp_ability/)[].
   
   Use for sorting, slicing, or reshaping the result.

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

    ```php
    $include = (bool) apply_filters( 'wp_get_abilities_item_include', $include, $ability, $args );
    ```

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

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

| Used by | Description | 
| [wp_get_abilities()](https://developer.wordpress.org/reference/functions/wp_get_abilities/)`wp-includes/abilities-api.php` |

Retrieves registered abilities, optionally filtered by the given arguments.

  |

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

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

## User Contributed Notes

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