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



wp_ability_validate_input › WordPress Filter Hooks

Since7.1.0
Deprecatedn/a
apply_filters( 'wp_ability_validate_input', $is_valid, $input, $this->name )
Parameters: (3)
  • () is_valid The validation result from default validation.
    Required: Yes
  • () input The input data being validated.
    Required: Yes
  • () ability_name The name of the ability.
    Required: Yes
Defined at:
Codex:

Filters the input validation result for an ability.

Allows developers to add custom validation logic on top of the default JSON Schema validation. If default validation already failed, the filter receives the WP_Error object and can add additional error information or override it. If default validation passed, the filter can add additional validation checks and return a WP_Error if those checks fail.




Source

$validity = apply_filters( 'wp_ability_validate_input', $is_valid, $input, $this->name );