wp_validate_site_deletion action-hook . WP 5.1.0
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.
Usage
add_action( 'wp_validate_site_deletion', 'action_function_name_2468', 10, 2 ); function action_function_name_2468( $errors, $old_site ){ // action... }
- $errors(WP_Error)
- Error object to add validation errors to.
- $old_site(WP_Site)
- The site object to be deleted.
Changelog
Since 5.1.0 | Introduced. |
Where the hook is called
wp-includes/ms-site.php 235
do_action( 'wp_validate_site_deletion', $errors, $old_site );