Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to write some code to sms me whenever someone updates/installs a plugin, or updates the WP core, but I can't seem to find a hook that gets fired when this happens. Does anyone know if there are any hooks that I can plug into that will get fired when this happens?

Thanks!

share|improve this question
1  
see this question –  Milo Sep 19 '12 at 21:20

2 Answers 2

A chance is the update_feedback filter hook. He is usable after core and plugin update, I think. You can hook in and start your custom doing. See the follow example, but only a code for understand my bad english; he don't work.

add_filter( 'update_feedback', 'fb_add_feedback' );
function fb_add_feedback( $feedback ) {

    // start my custom fuction for remove plugin foo
    fb_remove_plugin_foo();

    return $feedback;
}
share|improve this answer

Also look at the upgrader_post_install hook. It's at the end of the install_package function, see also the rather bland WP developer page on this hook -- but of course you'll want to run tests yourself to ensure this hook indeed fires when WP core, any plugin, or any theme is upgraded.

In general, I'm finding Adam Brown's WP hooks database the most comprehensive resource to learn about WP's hooks (and how these change over each WP version). But it comes with zero documentation, so you've got to rely on the hook names and browsing through the relevant source code in order to understand what they're for.

share|improve this answer

Your Answer

 
discard

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.