Filters whether an individual ability should be included in the result set.
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
$includebool
Whether to include the ability. Default true (after declarative filters pass).
$abilityWP_Ability
The ability instance being evaluated.
$argsarray
The full $args array passed to wp_get_abilities().
543* @since 7.1.0544*545* @param bool$include Whether to include the ability.Defaulttrue(after declarative filters pass).546* @param WP_Ability$ability The ability instance being evaluated.547* @param array$args The full$argsarray passed to wp_get_abilities().548*/549$include=(bool)apply_filters('wp_get_abilities_item_include',$include,$ability,$args);550551if($include){552$matched[$name]=$ability;553}554}555
History
Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
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.