wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_ability_normalize_input › WordPress过滤钩子

Since7.1.0
已弃用n/a
› apply_filters( 'wp_ability_normalize_input', $input, $this->name, $this )
参数: (3)
  • () input The normalized input data.
    Required: Yes
  • () ability_name The name of the ability.
    Required: Yes
  • () ability The ability instance.
    Required: Yes
定义在:
文档:

Filters the normalized input for an ability.

Fires after `normalize_input()` has applied any default value declared in the input schema, giving plugins a chance to adjust the input before it is consumed downstream. Common uses include defaulting beyond what JSON Schema can express, prompt enrichment, and injecting caller metadata. Returning a `WP_Error` causes callers that propagate it (such as `execute()`) to halt before validation, permission checks, and the registered execute callback.




源码

return apply_filters( 'wp_ability_normalize_input', $input, $this->name, $this );