do_action( ‘deactivate_blog’, int $id )

Fires before a network site is deactivated.

Parameters

$idint
The ID of the site being deactivated.

Source

do_action( 'deactivate_blog', $id );

Changelog

VersionDescription
MU (3.0.0)Introduced.

User Contributed Notes

  1. Skip to note 2 content

    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.