wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_ability_permission_result › WordPress Filter Hooks

Since7.1.0
Deprecatedn/a
apply_filters( 'wp_ability_permission_result', $permission, $this->name, $input, $this )
Parameters: (4)
  • () permission The permission result returned by `permission_callback`.
    Required: Yes
  • () ability_name The name of the ability.
    Required: Yes
  • () input The input data for the permission check.
    Required: Yes
  • () ability The ability instance.
    Required: Yes
Defined at:
Codex:

Filters the result of an ability's permission check.

Fires after the registered `permission_callback` returns. Plugins can use this to layer additional authorization rules on top of the ability's own permission logic — for example, multi-factor authorization gates or temporary permission elevation for trusted contexts. Filters can return `true` to grant, `false` to deny, or a `WP_Error` to deny with a specific error code and message. The filter receives whatever the `permission_callback` produced. Any other return value is coerced to `false`.




Source

$result = apply_filters( 'wp_ability_permission_result', $permission, $this->name, $input, $this );