wpmu_update_blogs_date() WordPress Function

This function updates the date of a blog. It is useful for keeping your blog fresh and up to date, and for preventing search engines from thinking your site is stale. This function can be used in conjunction with the wpmu_update_blogs_date_on_update option.

wpmu_update_blogs_date() #

Update the last_updated field for the current site.


Source

File: wp-includes/ms-blogs.php

function wpmu_update_blogs_date() {
	$site_id = get_current_blog_id();

	update_blog_details( $site_id, array( 'last_updated' => current_time( 'mysql', true ) ) );
	/**
	 * Fires after the blog details are updated.
	 *
	 * @since MU (3.0.0)
	 *
	 * @param int $blog_id Site ID.
	 */
	do_action( 'wpmu_blog_updated', $site_id );
}


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.