Summery Summery

Validates data for a site prior to inserting or updating in the database.

Syntax Syntax

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

Parameters Parameters


(WP_Error) (Required) Error object, passed by reference. Will contain validation errors if any occurred.


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


(WP_Site|null) (Optional) The old site object if the data belongs to a site being updated, or null if it is a new site being inserted.

Default value: null

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.