-2

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

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.