wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_pre_execute_ability › WordPress Filter Hooks
Since7.1.0
Deprecatedn/a
› apply_filters( 'wp_pre_execute_ability', $pre_execute_sentinel, $this->name, $input, $this )
| Parameters: (4) |
|
| Defined at: | |
| Codex: |
Filters whether to short-circuit ability execution.
Returning a value other than the received default bypasses the rest of `execute()` — input normalization, input validation, permission checks, the registered execute callback, output validation, and the surrounding actions — and the value is returned to the caller as-is. Useful for cached responses, rate limiting, maintenance mode, and test mocking. To continue with normal execution, return `$pre` unchanged. This preserves any value (including `null`, `false`, or arbitrary objects) as a valid short-circuit result. Because validation is bypassed, callers that short-circuit are responsible for the integrity of any value they consume from `$input`.Related Functions: wp_register_ability, wp_get_ability, wp_unregister_ability, wp_get_abilities, wp_has_ability, wp_parse_slug_list