Switch language

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




wp_admin_bar_updates_menu [ WordPress Function ]

wp_admin_bar_updates_menu ( $wp_admin_bar )
Defined at:



Provide an update link if theme/plugin/core updates are available.

Source


<?php
function wp_admin_bar_updates_menu$wp_admin_bar ) {

    
$update_data wp_get_update_data();

    if ( !
$update_data['counts']['total'] )
        return;

    
$title '<span class="ab-icon"></span><span class="ab-label">' number_format_i18n$update_data['counts']['total'] ) . '</span>';

    
$wp_admin_bar->add_menu( array(
        
'id'    => 'updates',
        
'title' => $title,
        
'href'  => network_admin_url'update-core.php' ),
        
'meta'  => array(
            
'title' => $update_data['title'],
        ),
    ) );
}
?>

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