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.
$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 de la fonction get_site
$result = get_site($site = null);
if ($result) {
// Votre logique ici
}
Chargement des actualités...