get_site

FUNCTION wp-includes\ms-site.php (ligne 226) github
Fires before a site should be deleted from the database. Plugins should amend the `$errors` object via its `WP_Error::add()` method. If any errors are present, the site will not be deleted.

Paramètres

Entrée :
$site = null
Sortie :
@param WP_Error $errors   Error object to add validation errors to.
@param WP_Site  $old_site The site object to be deleted.
@param int  $site_id The site ID.
@param bool $drop    True if site's table should be dropped. Default false.
@param WP_Site $old_site Deleted site object.
@param WP_Site $old_site Deleted site object.
@param int  $site_id The site ID.
@param bool $drop    True if site's tables should be dropped. Default false.
@param WP_Site|int|null $site Optional. Site to retrieve. Default is the current site.
@return WP_Site|null The site object or null if not found.

Utilisation

// Utilisation de la fonction get_site
$result = get_site($site = null);

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

Actualités

Chargement des actualités...