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



wp_validate_site_data › WordPress动作钩子

Since5.1.0
已弃用n/a
do_action( 'wp_validate_site_data', $errors, $data, $old_site )
参数: (3)
  • (WP_Error) $errors Error object to add validation errors to.
    Required: Yes
  • (array) $data Associative array of complete site data. See {@see wp_insert_site()} for the included data.
    Required: Yes
  • (WP_Site|null) $old_site The old site object if the data belongs to a site being updated, or null if it is a new site being inserted.
    Required: Yes
定义在:
文档:

Fires when data should be validated for a site prior to inserting or updating in the database.

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





源码

do_action( 'wp_validate_site_data', $errors, $data, $old_site );