wp_prepare_site_data

SummerySummery

Prepares site data for insertion or update in the database.

Syntax

wp_prepare_site_data( array $data, array $defaults, WP_Site|null $old_site = null )

ParametersParameters

$data

(array) (Required) Associative array of site data passed to the respective function. See wp_insert_site() for the possibly included data.

$defaults

(array) (Required) Site data defaults to parse $data against.

$old_site

(WP_Site|null) (Optional) Old site object if an update, or null if an insertion.

Default value: null

ReturnReturn

(array|WP_Error) Site data ready for a database transaction, or WP_Error in case a validation error occurred.

SourceSource

File: wp-includes/ms-site.php


			

ChangelogChangelog

Changelog
Version Description
5.1.0 Introduced.
Scroll to Top