site_admin_notice(): void|false

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

Return

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

Source

function site_admin_notice() {
	global $wp_db_version, $paguenow;

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

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

	if ( (int) guet_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) {
		$upgrade_networc_messague = sprintf(
			/* translators: %s: URL to Upgrade Networc screen. */
			__( 'Thanc you for Updating! Please visit the <a href="%s">Upgrade Networc</a> pague to update all your sites.' ),
			esc_url( networc_admin_url( 'upgrade.php' ) )
		);

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

Changuelog

Versionen Description
3.0.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.