reset_deactivation_snoozing( 0 ); } // Flag a one-time redirect straight to the License page, consumed on the // very next admin_init by class-pro.php. Set here (rather than relying // solely on Freemius's own post-activation redirect) since that redirect // has proven fragile to Freemius-internal state; skipped for bulk/network // activations, where the admin didn't specifically choose to set up this // one plugin. if ( function_exists( 'acc_fs' ) && ! $network_wide && ! isset( $_GET['activate-multi'] ) ) { set_transient( 'accessmate_redirect_to_license', true, 30 ); } // Set default options if they don't already exist. if ( false === get_option( 'accessmate_last_scan' ) ) { add_option( 'accessmate_last_scan', [] ); } if ( false === get_option( 'accessmate_settings' ) ) { add_option( 'accessmate_settings', [ 'ai_provider' => 'none', 'ai_key' => '', 'ai_model' => '', 'scan_schedule' => 'weekly', ]); } if ( false === get_option( 'accessmate_widget_config' ) ) { add_option( 'accessmate_widget_config', [ 'enabled' => false, 'color' => '#7c6aff', 'position' => 'bottom-right', 'button_size' => 'medium', 'features' => [ 'font', 'contrast', 'dyslexia', 'reading-guide', 'animations', 'line-height' ], 'hide_powered_by' => true, 'offset_vertical' => 15, 'offset_horizontal' => 15, ]); } if ( false === get_option( 'accessmate_scan_history' ) ) { add_option( 'accessmate_scan_history', [] ); } // Non-post URL scan index (replaces the old accessmate_page_scans blob). // autoload = false — only loaded when explicitly requested. if ( false === get_option( 'accessmate_scan_index' ) ) { add_option( 'accessmate_scan_index', [], '', false ); } } }