3

Is it possible to hide just update messages for deactivated plugins in WP 3.4+?

  • 2
    yes, it is possible (answer above), but that doesn't address the problem. a plugin, even deactivated, can pose a security issue if left out of date. if you don't need the plugin, best to remove it from the site all together. – Norcross Dec 24 '12 at 19:15
6

Yep Its possible if you hook a function to site_transient_update_plugins filter hook and check if plugin is activated using is_plugin_active like this:

add_filter('site_transient_update_plugins', 'remove_update_nag_for_deactivated');
function remove_update_nag_for_deactivated($value) {
    foreach($value->response as $key => $val){
        if (!is_plugin_active($val))
            unset($value->response[ $key]);
    }   
    return $value;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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