do_action( 'deactivate_blog', string $id )

Fires before a network site is deactivated.

Parameters Parameters


(string) The ID of the site being deactivated.

Top ↑

Source Source

File: wp-admin/network/sites.php

View on Trac

Top ↑

Changelog Changelog

Version Description
MU (3.0.0) Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by stevenlinx

    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.