views:

25

answers:

2

Hello! First time here, so please be gentle.

Does anyone know how to replicate the built-in functionality of WordPress whereby the admin is informed of when updates for plugins are available - i.e. when one (more more) is available, an icon appears over the plugins menu which contains the number of available updates.

The plugin that I am writing could really benefit, from a UI perspective, with having a feature very similar to this.

Does anyone know if there are any hooks which I can use, or any function which I can call?

Any help on this is greatly appreciated!

Thank you very much in advance,

Richard

A: 

There's a API hook called get_plugin_data and lots of info in this thread at WordPress on using and implementing.

songdogtech
That thread unfortunately is 2 years old and doesn't offer much advice as it was closed when the functionality got added to 2.3. The get_plugin_data action is relatively useful however, thanks. That being said...
A: 

I've kind of answered my own question here...

$friendly_contact_add_main_page = add_menu_page('Contact Form', "Contact<span class='update-plugins count-$my_var'><span class='plugin-count'>$my_var</span></span>", 10, __FILE__, 'friendly_contact_main_page',$icon_url);

add_action( "admin_print_scripts-$friendly_contact_add_main_page", 'friendly_contact_main_page_head_scripts' );

The $my_var can be anything you want -- you decide how your script returns whether you have updates or not. Pretty simple, really! :)