update_archived

Update the 'archived' status of a particular blog.

Description

(string) update_archived( (int) $id, (string) $archived ); 

Returns (string)

$archived

Parameters (2)

0. $id (int)
The blog id
1. $archived (string)
The new status

Usage

  1. if ( !function_exists( 'update_archived' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-blogs.php'; 
  3.  
  4. // The blog id 
  5. $id = -1; 
  6.  
  7. // The new status 
  8. $archived = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = update_archived($id, $archived); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-blogs.php  
  1. function update_archived( $id, $archived ) { 
  2. update_blog_status($id, 'archived', $archived); 
  3. return $archived;