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



customize_validate_{$this->id} ›

Since4.6.0
已弃用n/a
apply_filters( "customize_validate_{$this->id}", $validity, $value, $this )
参数: (3)
  • (WP_Error) $validity Filtered from `true` to `WP_Error` when invalid.
    Required: Yes
  • (mixed) $value Value of the setting.
    Required: Yes
  • (WP_Customize_Setting) $this WP_Customize_Setting instance.
    Required: Yes
定义在:
文档:

Validates a Customize setting value.

Plugins should amend the $validity object via its WP_Error::add() method.

The dynamic portion of the hook name, $this->ID, refers to the setting ID.





源码

$validity = apply_filters( "customize_validate_{$this->id}", $validity, $value, $this );