I am looking for a feature where i can bake in my code itself that wordpress update can be disabled from wordpress UI. I dont want to use any plugin definitely dont want to stop wordpress core security updates as well. Do we know if there is any other option like flywheel (which is a wordpress service) doesn't show wordpress core update on wordpress wp-admin pannel
Asked
Active
Viewed 151 times
1 Answers
1
Create a menu item using add_menu_page()
function. In it there will be a parameter that asks for the function to be called when this menu is clicked. You can simply create a form on the page with a button like:
<input type="submit" name="disable_update">
and the code php will be like
PHP Code:
if(isset($_POST['disable_update'])){
disable_updates();
}
function disable_updates() {
define( 'WP_AUTO_UPDATE_CORE', false );
}
Note: Use POST as method for the form

Asfand Yar Ali Khan
- 23
- 5