whether it should autoload. */ private static $options = array( 'sxa_settings' => true, 'sxa_db_version' => true, 'sxa_visitor_salt' => false, 'sxa_caps_granted' => false, 'sxa_plugin_version' => false, 'sxa_last_rollup' => false, 'sxa_geoip_version' => false, 'sxa_gsc_last_ingest' => false, 'sxa_connections' => false, 'sxa_uptime' => false, ); /** Old transients (just dropped; they rebuild themselves). */ private static $transients = array( 'sxa_fresh_lock', 'sxa_geoip_notice', 'sxa_update_notice', 'sxa_update_manifest', 'sxa_pairing_code' ); /** Old cron hooks. */ private static $cron = array( 'sxa_rollup_cron', 'sxa_salt_cron', 'sxa_geoip_update' ); public static function run() { if ( get_option( self::DONE_OPTION ) ) { return; } foreach ( self::$options as $old => $autoload ) { $value = get_option( $old, null ); if ( null === $value ) { continue; } $new = 'sxanl_' . substr( $old, 4 ); if ( null === get_option( $new, null ) ) { add_option( $new, $value, '', $autoload ? 'yes' : 'no' ); } delete_option( $old ); } foreach ( self::$transients as $old ) { delete_transient( $old ); } foreach ( self::$cron as $hook ) { wp_clear_scheduled_hook( $hook ); // the sxanl_ events are scheduled on init } update_option( self::DONE_OPTION, 1, false ); } }