Title: site_admin_notice
Published: April 25, 2014
Last modified: May 20, 2026

---

# site_admin_notice(): void|false

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#wp--skip-link--target)

Displays an admin notice to upgrade all sites after a core upgrade.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#return)󠁿

 void|false Void on success. False if the current user is not a super admin.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#source)󠁿

    ```php
    function site_admin_notice() {
    	global $wp_db_version, $pagenow;

    	if ( ! current_user_can( 'upgrade_network' ) ) {
    		return false;
    	}

    	if ( 'upgrade.php' === $pagenow ) {
    		return;
    	}

    	if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) {
    		$upgrade_network_message = sprintf(
    			/* translators: %s: URL to Upgrade Network screen. */
    			__( 'Thank you for Updating! Please visit the <a href="%s">Upgrade Network</a> page to update all your sites.' ),
    			esc_url( network_admin_url( 'upgrade.php' ) )
    		);

    		wp_admin_notice(
    			$upgrade_network_message,
    			array(
    				'type'               => 'warning',
    				'additional_classes' => array( 'update-nag', 'inline' ),
    				'paragraph_wrap'     => false,
    			)
    		);
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/ms.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/ms.php#L681)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/ms.php#L681-L708)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_admin_notice()](https://developer.wordpress.org/reference/functions/wp_admin_notice/)`wp-includes/functions.php` |

Outputs an admin notice.

  | 
| [network_admin_url()](https://developer.wordpress.org/reference/functions/network_admin_url/)`wp-includes/link-template.php` |

Retrieves the URL to the admin area for the network.

  | 
| [current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)`wp-includes/capabilities.php` |

Returns whether the current user has the specified capability.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [esc_url()](https://developer.wordpress.org/reference/functions/esc_url/)`wp-includes/formatting.php` |

Checks and cleans a URL.

  | 
| [get_site_option()](https://developer.wordpress.org/reference/functions/get_site_option/)`wp-includes/option.php` |

Retrieve an option value for the current network based on name of option.

  |

[Show 4 more](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/site_admin_notice/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fsite_admin_notice%2F)
before being able to contribute a note or feedback.