activate_blog
Action HookDescription
Fires after a network site is activated.Hook Information
File Location |
wp-admin/network/sites.php
View on GitHub
|
Hook Type | Action |
Line Number | 280 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$id
|
The ID of the activated site. |
Usage Examples
Basic Usage
<?php
// Hook into activate_blog
add_action('activate_blog', 'my_custom_function', 10, 1);
function my_custom_function($id) {
// Your custom code here
}
Source Code Context
wp-admin/network/sites.php:280
- How this hook is used in WordPress core
<?php
275 *
276 * @since MU (3.0.0)
277 *
278 * @param int $id The ID of the activated site.
279 */
280 do_action( 'activate_blog', $id );
281 break;
282
283 case 'deactivateblog':
284 /**
285 * Fires before a network site is deactivated.
PHP Documentation
<?php
/**
* Fires after a network site is activated.
*
* @since MU (3.0.0)
*
* @param int $id The ID of the activated site.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-admin/network/sites.php
Related Hooks
Related hooks will be displayed here in future updates.