Ben Lobaugh Online

I think, therefore I am. I am, therefore I sail

Prevent WordPress plugins from requesting updates

Ever need to “lock” a plugin into a specific version and do not want it showing in the updates list and getting accidentally updated?

This quick snippet allows you to specify a plugin(s) that should not appear in the update list. This will effectively block them from updating through WordPress itself. Manual updates/changes to the plugin(s) is still possible however.

add_filter( 'site_transient_update_plugins', array( 'no_updates_for_you' ) );

function no_updates_for_you( $value ) {
    $plugin = '[plugin_folder]/[plugin_file].php';
    if ( empty( $value ) || empty( $value->response[$plugin] ) ) {
      return $value;
    }
    unset( $value->response[$plugin] );
    return $value;
}

Be sure to change [plugin_folder]/[plugin_file].php to the plugin you want to prevent updating.

Previous

2015 Year in Review

Next

How to get rid of black algae in an aquarium

1 Comment

  1. Debra

    I have 10 gallon and have black algae what can i do i have 4 Cat Cora’s and 5 tetra is it because i have to many fish or what please help me

Leave a Reply

Your email address will not be published. Required fields are marked *