exclude bogo plugin from auto update.

This commit is contained in:
CBS Information System 2020-12-16 12:20:32 +09:00
parent fed0681af9
commit 6c26b056dd

View File

@ -6,7 +6,12 @@ defined('ABSPATH') || exit();
add_filter('allow_major_auto_core_updates', '__return_true'); add_filter('allow_major_auto_core_updates', '__return_true');
add_filter('allow_minor_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_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 // remove parent theme defined filters and actions
add_action('after_setup_theme', 'cbsonline_disable_parent_defines'); add_action('after_setup_theme', 'cbsonline_disable_parent_defines');