update_blog_public
Update this blog's 'public' setting in the global blogs table.
Description
Public blogs have a setting of 1, private blogs are 0.
Parameters (2)
- 0. $old_value (int)
- The old value.
- 1. $value (int)
- The new public value
Usage
if ( !function_exists( 'update_blog_public' ) ) { require_once ABSPATH . WPINC . '/ms-functions.php'; } // The old value. $old_value = -1; // The new public value $value = -1; // NOTICE! Understand what this does before running. $result = update_blog_public($old_value, $value);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/ms-functions.php
- function update_blog_public( $old_value, $value ) {
- update_blog_status( get_current_blog_id(), 'public', (int) $value );
- }