wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_pre_execute_ability › Filtr WordPress Hooks

Od7.1.0
Przestarzałyn/a
› apply_filters( 'wp_pre_execute_ability', $pre_execute_sentinel, $this->name, $input, $this )
Parametry: (4)
  • () pre The pre-computed result. Return this value unchanged to continue execution. Default `WP_Filter_Sentinel` instance unique to this invocation.
    Wymagane: Tak
  • () ability_name The name of the ability.
    Wymagane: Tak
  • () input The raw input passed to `execute()`.
    Wymagane: Tak
  • () ability The ability instance.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Filters whether to short-circuit ability execution.

Returning a value other than the received default bypasses the rest of `execute()` — input preparation, 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`.




Źródło

$pre = apply_filters( 'wp_pre_execute_ability', $pre_execute_sentinel, $this->name, $input, $this );