update_blog_public
Fires after the current blog's 'public' setting is updated.
Usage
add_action( 'update_blog_public', 'wp_kama_update_blog_public_action', 10, 2 ); /** * Function for `update_blog_public` action-hook. * * @param int $site_id Site ID. * @param string $is_public Whether the site is public. A numeric string, for compatibility reasons. Accepts '1' or '0'. * * @return void */ function wp_kama_update_blog_public_action( $site_id, $is_public ){ // action... }
- $site_id(int)
- Site ID.
- $is_public(string)
- Whether the site is public. A numeric string, for compatibility reasons. Accepts '1' or '0'.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
update_blog_public
wp-includes/ms-site.php 1263
do_action( 'update_blog_public', $site_id, $new_site->public );
Where the hook is used in WordPress
wp-includes/ms-default-filters.php 55
add_action( 'update_blog_public', 'wp_update_blog_public_option_on_site_update', 1, 2 );