There are a lot of question on how to disable updates and/or removing update notifications. But all solutions that disable the update also disable the update notifications.
But I want to disable the possibility to update while still being notified about available updates.
Currently I use define( 'DISALLOW_FILE_MODS', true );
Codex
The problem with this is that it not only disables the update process but also the notifications.
Edit: Okay I went down the rabbit hole a bit myself. I guess I also should clarify that I am not (only) talking about core updates but also plugins and themes.
If I understand it correctly this is because at /wp-admin/includes/update.php:250 the function returns early.
So I see two options:
- re-add the
update_plugins
option which kind of defeats the purpose plus I am not sure of the side effects - add my own hook to
admin_init
kind of replicatingwp_plugin_update_rows
. I tried that but it still doesn't look all the same. There seems to be some more to it, also it doesn't feel like a very clean way to do this.
EDIT: There is a ticket covering this issue in case you feel like working on it: https://core.trac.wordpress.org/ticket/25219