update_archived() WordPress Function

The WordPress update_archived() function is used to update an archived post or page. This function takes two arguments: the post ID and the new post status. The post status can be 'publish', 'draft', 'pending', 'future', 'private', 'trash', or 'delete'.

update_archived( int $id, string $archived ) #

Update the ‘archived’ status of a particular blog.


Parameters

$id

(int)(Required)Blog ID.

$archived

(string)(Required)The new status.


Top ↑

Return

(string) $archived


Top ↑

Source

File: wp-includes/ms-blogs.php

function update_archived( $id, $archived ) {
	update_blog_status( $id, 'archived', $archived );
	return $archived;
}


Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.