Summery Summery

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

Syntax Syntax

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

Description Description

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

Parameters Parameters


(WP_Error) Error object to add validation errors to.


(array) Associative array of complete site data. See wp_insert_site() for the included data.


(WP_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 Source

File: wp-includes/ms-site.php


Changelog Changelog

Version Description
5.1.0 Introduced.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.