do_action( 'deactivate_blog', int $id )

Fires before a network site is deactivated.


Parameters

$id int
The ID of the site being deactivated.

Top ↑

Source

File: wp-admin/network/sites.php. View all references

do_action( 'deactivate_blog', $id );

Top ↑

Changelog

Changelog
Version Description
MU (3.0.0) Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by Steven Lin

    Example migrated from Codex:

    /**
     * Example of deactivate_blog usage
     * 
     * @param int    $id Blog ID of the blog being deactivated.
     */
    function wporg_deactivate_blog_example( $id ) {
    	if ( 5 == $id ) {
    		// Update some option or something
    	}
    }
    add_action( 'deactivate_blog', 'wporg_deactivate_blog_example' );

You must log in before being able to contribute a note or feedback.