Home Experience & Tips Sharing Standard Post

Standard Post

WordPress Disable Update Notifications for Specific Plugins

In some cases, you may not need a certain plugin to check for updates. Then you can use the following WordPress code to disable specific plugin update notifications. You just need to modify the code below and add it to your theme's functions file. Safe way to add code to functions.php: Code Snippets // Screen...

Updated on December 6, 2019 About 2 minutes read
WordPress禁用特定插件的更新提示

In some cases, you may not need a certain plugin to check for updates, so you can use the following WordPress code to disable specific plugin update notifications.

You just need to modify the code below and add it to your theme's functions file.Safe Method to Add Code to the functions.php File: Code Snippets

//屏蔽插件更新通知 https://blog.naibabiji.com/skill/wordpress-jin-zhi-cha-jian-geng-xin-ti-xing.html

function wcr_remove_update_notifications($value) {
    // 要屏蔽的插件位置 (从wp-content/plugins文件夹下)
    $plugins = array(
        'wpjam-basic/wpjam-basic.php'
    );
    
    foreach ($plugins as $key => $plugin) {
        if (empty($value->response[$plugin])) {
            continue;
        }
        
        unset($value->response[$plugin]);
    }
    
    return $value;
}

add_filter('site_transient_update_plugins', 'wcr_remove_update_notifications');

Of course, keeping plugins updated isone of the WordPress security factors. Without a specific reason, do not arbitrarily disable update notifications.

Related articles:

Rate this article post
Previous Want to optimize WordPress loading speed? Let gtmetrix help Continue reading content around the same timeline. Next How to Display the Last Updated Time for Posts in WordPress View the next related tutorial or experience.

AI Website Building Assistant

🤖
Hello! I am the Naibabiji AI Assistant. How can I help you?
Quick Consultation: