0

I found this 2 filters to add in my functions.php of the Theme:

add_filter( 'auto_update_plugin', '__return_false' );

add_filter( 'auto_update_theme', '__return_false' );

But I need to do totally block the updates this to multiple WP sites. So I thought to build a plugin that I install where I need instead go every time to change function.php. But is possible to do that with the plugin?

  • I don't see why not. Have you tried it? – Jacob Peattie Feb 3 at 10:21
  • i added these in a normal php page, creating a standard plugin. for some work (wp tell me there is a new version and ask if i want update) but for others not – DevBeppe Feb 3 at 10:33
  • Well the code in your question doesn't include anything for Wordpress core, and you specifically don't mention anything eccept themes and plugins. So what's your actual question here? Whether you can add that code to a plugin? Or how to stop all updates with a plugin? It's very important that you actually ask the question you want answered. – Jacob Peattie Feb 3 at 10:49
  • yes , sorry i was editing it. I expressed myself badly and notice after while while looking for other material about it. I'm only finding methods to disable auto updates, but I would need to block them for plugin and themes while my plug in is active. I hope it is clear now, sorry for my english – DevBeppe Feb 3 at 10:58
  • 1
    Ok, so back to my first question: Have you tried adding these methods to a simple plugin? If it doesn't work the way you expect, what isn't working? – Jacob Peattie Feb 3 at 11:00
0

If I understand your question right, you want to disallow updates of themes and updates at all.

If I'm right, then this is basically a duplicate of this: https://stackoverflow.com/questions/17897044/wordpress-how-to-disable-plugin-update

  • 1
    I managed to get what I wanted by using parts in this thread, thanks – DevBeppe Feb 3 at 13:11

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.