wp_update_site

FUNCTION wp-includes\ms-site.php (ligne 82) github
Fires once a site has been inserted into the database.

Paramètres

Entrée :
$site_id, array $data
Sortie :
@param WP_Site $new_site New site object.
@param WP_Site $new_site New site object.
@param array   $args     Arguments for the initialization.
@param int    $site_id    Site ID.
@param int    $user_id    User ID.
@param string $domain     Site domain.
@param string $path       Site path.
@param int    $network_id Network ID. Only relevant on multi-network installations.
@param array  $meta       Meta data. Used to set initial site options.
@param int   $site_id ID of the site that should be updated.
@param array $data    Site data to update. See {@see wp_insert_site()} for the list of supported keys.
@return int|WP_Error The updated site's ID on success, or error object on failure.

Utilisation

// Utilisation de la fonction wp_update_site
$result = wp_update_site($site_id, array $data);

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

Actualités

Chargement des actualités...