is_patchstack_active() ) { // In case Patchstack is active, do not continue. return; } // Auto-update WordPress core. update_site_option( 'auto_update_core_major', 'enabled' ); // Auto-update plugins. $all_plugins = apply_filters( 'all_plugins', get_plugins() ); update_site_option( 'auto_update_plugins', array_keys( $all_plugins ) ); // Auto-update themes. $all_themes = wp_get_themes(); update_site_option( 'auto_update_themes', array_keys( $all_themes ) ); } /** * On plugin activation, add to auto-updated list of plugins. * * This is skipped if Patchstack is active on the site. */ public function plugin_activation_hook( $plugin ) { if ( $this->is_patchstack_active() ) { // In case Patchstack is active, do not continue. return; } $auto_updated_plugins = (array) get_site_option( 'auto_update_plugins', array() ); $auto_updated_plugins[] = $plugin; update_site_option( 'auto_update_plugins', array_unique( $auto_updated_plugins ) ); } /** * On theme switch, enable auto-update for all themes. * * This is skipped if Patchstack is active on the site. */ public function theme_switch_hook( $theme ) { if ( $this->is_patchstack_active() ) { // In case Patchstack is active, do not continue. return; } $all_themes = wp_get_themes(); update_site_option( 'auto_update_themes', array_keys( $all_themes ) ); } } $hosting_support_1984 = new HostingSupport1984(); define( 'A1984_HOSTING_SUPPORT_BASE_FILE', __FILE__ ); require_once __DIR__ . '/1984-hosting-support-ui.php';