wp_update_blog_public_option_on_site_update() WordPress Function

The wp_update_blog_public_option_on_site_update() function is used to update the "Public" option for a site when the site is updated. This function is only used for sites that are not public.

wp_update_blog_public_option_on_site_update( int $site_id, string $public ) #

Updates the blog_public option for a given site ID.


Parameters

$site_id

(int)(Required)Site ID.

$public

(string)(Required)The value of the site status.


Top ↑

Source

File: wp-includes/ms-site.php

function wp_update_blog_public_option_on_site_update( $site_id, $public ) {

	// Bail if the site's database tables do not exist (yet).
	if ( ! wp_is_site_initialized( $site_id ) ) {
		return;
	}

	update_blog_option( $site_id, 'blog_public', $public );
}


Top ↑

Changelog

Changelog
VersionDescription
5.1.0Introduced.

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.