admin管理员组文章数量:1392088
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 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?
Share Improve this question edited Feb 3, 2020 at 11:07 DevBeppe asked Feb 3, 2020 at 10:14 DevBeppeDevBeppe 477 bronze badges 6- I don't see why not. Have you tried it? – Jacob Peattie Commented Feb 3, 2020 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 Commented Feb 3, 2020 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 Commented Feb 3, 2020 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 Commented Feb 3, 2020 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 Commented Feb 3, 2020 at 11:00
1 Answer
Reset to default 0If 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/questions/17897044/wordpress-how-to-disable-plugin-update
本文标签: How do I stop plugins and themes from getting updated in a new plugin
版权声明:本文标题:How do I stop plugins and themes from getting updated in a new plugin? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744781408a2624738.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论