Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




update_nag [ WordPress Function ]

update_nag ( No parameters )
Defined at:



No description yet.

Source


<?php
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->currentnetwork_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 zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics