update_nag [ WordPress Functions ]
update_nag ( No parameters )
| Defined at: |
|
| Codex |
No description yet.
Source
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>";
}Examples [ wp-snippets.com ]
Top Google Search Results
- Disabling the update nag in WordPress • Yoast
Nov 26, 2008 ... Sometimes you don't want your users or clients to see the update nag for WordPress and its plugins, these simple lines of code disable them.
yoast.com - update_nag (WordPress Function) - WPSeek.com
Jun 9, 2013 ... WordPress lookup for update_nag, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - Hide the Wordpress Update Nag - JDM
Oct 2, 2011 ... Sometimes in developing themes and really cool functionality for clients' Wordpress websites you'll find yourself in a situation where updating ...
jdm-digital.com - Forrst | Remove Update Nag from WordPress - Some code from ...
If for some reason you don't want to update (perhaps your plugins aren't all 3.0- compatible) you can toss this in your functions file to hide the update nag. For MU ...
forrst.com
