WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running this code to tell me what plugins need updating:

$update_plugins = get_site_transient('update_plugins');

Here is an example return:

    [login-lockdown/loginlockdown.php] => stdClass Object
            [id] => 3760
            [slug] => login-lockdown
            [new_version] => v1.5
            [url] => http://wordpress.org/extend/plugins/login-lockdown/
            [package] => http://downloads.wordpress.org/plugin/login-lockdown.1.5.zip


From that it doesn't tell me the name of the plugin that needs updating. Is there a WordPress function that you can feed the plugin file name like: ogin-lockdown/loginlockdown.php and return the plugin name? In this case I'd want Login LockDown to be returned.

share|improve this question
up vote 1 down vote accepted

I think you'll have to work via get_plugins(). It will return a list of all plugins in your plugin folder, indexed by plugin location - which is the same as your array index. This is also what the plugin administration table uses.

If you only need the data from one file you could also call get_plugin_data() directly. get_plugins() basically just calls that function in a loop, and caches the result.

share|improve this answer

Link to the plugin that displays a table listing all plugins that need an update in the admin footer: https://gist.github.com/995560

share|improve this answer
Thanks kaiser for the fully fledged code but I was already able to get done what I needed from Jan's answer. – Brady May 27 '11 at 16:15
n/p. Another plugin :) – kaiser May 27 '11 at 16:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.