deactivate_blog
Action HookDescription
Fires before a network site is deactivated.Hook Information
File Location |
wp-admin/network/sites.php
View on GitHub
|
Hook Type | Action |
Line Number | 291 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$id
|
The ID of the site being deactivated. |
Usage Examples
Basic Usage
<?php
// Hook into deactivate_blog
add_action('deactivate_blog', 'my_custom_function', 10, 1);
function my_custom_function($id) {
// Your custom code here
}
Source Code Context
wp-admin/network/sites.php:291
- How this hook is used in WordPress core
<?php
286 *
287 * @since MU (3.0.0)
288 *
289 * @param int $id The ID of the site being deactivated.
290 */
291 do_action( 'deactivate_blog', $id );
292
293 update_blog_status( $id, 'deleted', '1' );
294 break;
295
296 case 'unspamblog':
PHP Documentation
<?php
/**
* Fires before a network site is deactivated.
*
* @since MU (3.0.0)
*
* @param int $id The ID of the site being deactivated.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-admin/network/sites.php
Related Hooks
Related hooks will be displayed here in future updates.