Action hook 'wp_validate_site_deletion'

in WP Core File wp-includes/ms-site.php at line 237

Description

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.

Occurrences

Filename Line Number
wp-includes/ms-site.php 237

Parameters

Type Name Description
WP_Error $errors Error object to add validation errors to.
WP_Site $old_site The site object to be deleted.

PHP Doc

/**
	 * 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.
	 *
	 * @since 5.1.0
	 *
	 * @param WP_Error $errors   Error object to add validation errors to.
	 * @param WP_Site  $old_site The site object to be deleted.
	 */