update_nag

Definition:
function update_nag() {}

Source code

function update_nag() {

	if ( is_multisite() && !current_user_can('update_core') )

		return false;



	global $pagenow;



	if ( 'update-core.php' == $pagenow )

		return;



	$cur = get_preferred_from_update_core();



	if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )

		return false;



	if ( current_user_can('update_core') ) {

		$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) );

	} else {

		$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );

	}

	echo "<div class='update-nag'>$msg</div>";

}

3181

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: