Advertisements

wp_admin_bar_updates_menu

Definition:
function wp_admin_bar_updates_menu( $wp_admin_bar ) {}

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

Parameters

  • $wp_admin_bar

Source code

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'],

		),

	) );

}

10595

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: