From 6c26b056ddf85c399c586c6443e9b64d96b93060 Mon Sep 17 00:00:00 2001 From: NIU Administrator Date: Wed, 16 Dec 2020 12:20:32 +0900 Subject: [PATCH] exclude bogo plugin from auto update. --- functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 16834d7..4154c7b 100644 --- a/functions.php +++ b/functions.php @@ -6,7 +6,12 @@ defined('ABSPATH') || exit(); add_filter('allow_major_auto_core_updates', '__return_true'); add_filter('allow_minor_auto_core_updates', '__return_true'); add_filter('auto_update_theme', '__return_true'); -add_filter('auto_update_plugin', '__return_true'); +add_filter('auto_update_plugin', 'cbsonline_exclude_plugins_from_auto_update', 10, 2); +function cbsonline_exclude_plugins_from_auto_update($update, $item) +{ + return !in_array($item->slug, ['bogo']); +} + // remove parent theme defined filters and actions add_action('after_setup_theme', 'cbsonline_disable_parent_defines');