do_action( ‘wp_validate_site_data’, WP_Error $errors, array $data, WP_Site|null $old_site )

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

Description

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

Parameters

$errorsWP_Error
Error object to add validation errors to.
$dataarray
Associative array of complete site data. See wp_insert_site() for the included data.
$old_siteWP_Site|null
The old site object if the data belongs to a site being updated, or null if it is a new site being inserted.

Source

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

Changelog

VersionDescription
5.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.