execute_deactivate(); } /** * Execute upgrade routine. * * @param int $old_version */ public function execute_upgrade( $old_version ) { if ( $old_version < 4079 ) { wp_clear_scheduled_hook( 'itsec_vm_outdated_wp_check' ); wp_clear_scheduled_hook( 'itsec_vm_outdated_check' ); wp_clear_scheduled_hook( 'itsec_vm_scan_for_old_sites' ); } if ( $old_version < 4098 ) { $settings = ITSEC_Modules::get_settings( 'version-management' ); if ( is_bool( $settings['plugin_automatic_updates'] ) ) { $settings['plugin_automatic_updates'] = $settings['plugin_automatic_updates'] ? 'all' : 'none'; } if ( is_bool( $settings['theme_automatic_updates'] ) ) { $settings['theme_automatic_updates'] = $settings['theme_automatic_updates'] ? 'all' : 'none'; } ITSEC_Modules::set_settings( 'version-management', $settings ); } if ( ( $old_version < 4122 ) && null === get_site_option( 'auto_update_core_major', null ) ) { update_site_option( 'auto_update_core_major', ITSEC_Modules::get_setting( 'version-management', 'wordpress_automatic_updates' ) ? 'enabled' : 'unset' ); } } } new ITSEC_Version_Management_Setup();