Description
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.
Occurrences
Filename | Line Number |
---|---|
wp-includes/ms-site.php | 502 |
Parameters
Type | Name | Description |
---|---|---|
WP_Error | $errors | Error object to add validation errors to. |
array | $data | Associative array of complete site data. See {@see wp_insert_site()} for the included data. |
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. |
PHP Doc
/**
* 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.
*
* @since 5.1.0
*
* @param WP_Error $errors Error object to add validation errors to.
* @param array $data Associative array of complete site data. See {@see wp_insert_site()}
* for the included data.
* @param 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.
*/