wp_prepare_site_data
wp_prepare_site_data ( $data, $defaults, $old_site = null )
Parameters:- (array) data Associative array of site data passed to the respective function. See {@see} for the possibly included data.
- (array) defaults Site data defaults to parse $data against.
- (WP_Site|null) old_site Optional. Old site object if an update, or null if an insertion. Default null.
Returns:- (array|WP_Error) Site data ready for a database transaction, or WP_Error in case a validation error occurred.
Defined at: - Introduced in WordPress: 5.1.0
- Deprecated in WordPress: —
Description
Prepares site data for insertion or update in the database.