Core Function
View Source on Trac ↗ wp_prepare_site_data()
wp_prepare_site_data( mixed $data, mixed $defaults, mixed $old_site = null ) Prepares site data for insertion or update in the database.
Parameters 3 required
| Name / Type | Description |
|---|---|
| array | $data Associative array of site data passed to the respective function. See {@see wp_insert_site()} for the possibly included data. Required |
| $defaults array | Site data defaults to parse $data against. Required |
| mixed | (WP_Site | null) $old_site Optional. Old site object if an update, or null if an insertion. Default null. Required |
Return Value
((array)
(array | WP_Error) Site data ready for a database transaction, or WP_Error in case a validation
error occurred.
Function Information
Since Version
5.1.0
Source File
wp-includes/ms-site.php
Advertisement