wp_normalize_site_data

FUNCTION wp-includes\ms-site.php (ligne 474) github
Filters passed site data in order to normalize it.

Paramètres

Entrée :
$data
Sortie :
@param array $data Associative array of site data passed to the respective function.
@param WP_Error     $errors   Error object to add validation errors to.
@param array        $data     Associative array of complete site data. See {@see wp_insert_site()}
@param WP_Site|null $old_site The old site object if the data belongs to a site being updated,
@param array $data Associative array of site data passed to the respective function.
@return array Normalized site data.

Utilisation

// Utilisation de la fonction wp_normalize_site_data
$result = wp_normalize_site_data($data);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...