skip to Main Content

I am looking for a code in PHP to stop all WordPress template upgrade notifications without making any changes that harm the template I made on my imtilak.
and may I want the steps to put this code in my theme.
Someone to give me PHP code.

2

Answers


  1. Updating notifications serve an important purpose in WordPress, so you should think whether you really want to disable them. But if you have determined to go forward, please use the following :

    Disable WordPress Update Notification Emails

    Add the following to functions.php

    add_filter( 'auto_core_update_send_email', '__return_false' );
    add_filter( 'auto_plugin_update_send_email', '__return_false' );
    add_filter( 'auto_theme_update_send_email', '__return_false' );
    

    Hide Update Notifications In Dashboard

    Add the following to functions.php

    function essam_hide_update_nag() {
    remove_action( 'admin_notices', 'update_nag', 3 );
    }
    
    add_action('admin_menu','essam_hide_update_nag');
    
    Login or Signup to reply.
  2. Add the following code to your wp-config.php file:

    define( 'WP_AUTO_UPDATE_CORE', false );
    

    To disable automatic plugin updates, add this filter:

    add_filter( 'auto_update_plugin', '__return_false' );
    

    To disable automatic theme updates, add this filter:

    add_filter( 'auto_update_theme', '__return_false' );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search