@@ -17,7 +17,7 @@ static function init() {
17
17
private function __construct () {
18
18
$ this ->updates_allowed = Jetpack_Options::get_option ( 'json_api_full_management ' , false );
19
19
20
- if ( $ this ->updates_allowed ) {
20
+ if ( $ this ->updates_allowed ) {
21
21
add_filter ( 'auto_update_plugin ' , array ( $ this , 'autoupdate_plugin ' ), 10 , 2 );
22
22
add_filter ( 'auto_update_theme ' , array ( $ this , 'autoupdate_theme ' ), 10 , 2 );
23
23
add_filter ( 'auto_update_core ' , array ( $ this , 'autoupdate_core ' ), 10 , 2 );
@@ -26,7 +26,7 @@ private function __construct() {
26
26
27
27
function autoupdate_plugin ( $ update , $ item ) {
28
28
$ autoupdate_plugin_list = Jetpack_Options::get_option ( 'autoupdate_plugins ' , array () );
29
- if ( in_array ( $ item ->plugin , $ autoupdate_plugin_list ) ) {
29
+ if ( in_array ( $ item ->plugin , $ autoupdate_plugin_list ) ) {
30
30
return true ;
31
31
}
32
32
@@ -35,13 +35,17 @@ function autoupdate_plugin( $update, $item ) {
35
35
36
36
function autoupdate_theme ( $ update , $ item ) {
37
37
$ autoupdate_theme_list = Jetpack_Options::get_option ( 'autoupdate_themes ' , array () );
38
- if ( in_array ( $ item ->theme , $ autoupdate_theme_list ) ) {
38
+ if ( in_array ( $ item ->theme , $ autoupdate_theme_list ) ) {
39
39
return true ;
40
40
}
41
41
return $ update ;
42
42
}
43
43
44
44
function autoupdate_core ( $ update , $ item ) {
45
+ $ autoupdate_core = Jetpack_Options::get_option ( 'autoupdate_core ' , false );
46
+ if ( $ autoupdate_core ) {
47
+ return $ autoupdate_core ;
48
+ }
45
49
return $ update ;
46
50
}
47
51
}
0 commit comments