Thank you for using AutoQuiz! You are awesome.

user_email); } if (get_option('ai_quiz_api_key') === false) { add_option('ai_quiz_api_key', 0); } if (get_option('ai_quiz_language') === false) { add_option('ai_quiz_language', 'en_US'); } //Colors //Question if (get_option('ai_quiz_bg_font') === false) { add_option('ai_quiz_bg_font', '#000000'); } if (get_option('ai_quiz_bg_color') === false) { add_option('ai_quiz_bg_color', '#f2f4ff'); } //Option if (get_option('ai_quiz_option_font') === false) { add_option('ai_quiz_option_font', '#646464'); } if (get_option('ai_quiz_option_color') === false) { add_option('ai_quiz_option_color', '#ffffff'); } //Selected option if (get_option('ai_quiz_selected_option_font') === false) { add_option('ai_quiz_selected_option_font', '#ffffff'); } if (get_option('ai_quiz_selected_option_color') === false) { add_option('ai_quiz_selected_option_color', '#459aed'); } //Failed option if (get_option('ai_quiz_failed_option_font') === false) { add_option('ai_quiz_failed_option_font', '#c40000'); } if (get_option('ai_quiz_failed_option_color') === false) { add_option('ai_quiz_failed_option_color', '#ffb2b2'); } //Success option if (get_option('ai_quiz_success_option_font') === false) { add_option('ai_quiz_success_option_font', '#32c400'); } if (get_option('ai_quiz_success_option_color') === false) { add_option('ai_quiz_success_option_color', '#d7ffbf'); } //Primary if (get_option('ai_quiz_primary_font') === false) { add_option('ai_quiz_primary_font', '#ffffff'); } if (get_option('ai_quiz_primary_color') === false) { add_option('ai_quiz_primary_color', '#000080'); } if (get_option('ai_quiz_phrase') === false) { add_option('ai_quiz_phrase', 'How Much Do You Really Know? Find Out Now!'); } } function ai_quiz_create_tables() { global $wpdb; $charset_collate = $wpdb->get_charset_collate(); $exams_table_name = $wpdb->prefix . 'ai_quizs'; $options_table_name = $wpdb->prefix . 'ai_quiz_options'; $questions_table_name = $wpdb->prefix . 'ai_quiz_questions'; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); // Check if the exams table already exists if($wpdb->get_var("SHOW TABLES LIKE '$exams_table_name'") != $exams_table_name) { $sql = "CREATE TABLE $exams_table_name ( id bigint(20) NOT NULL AUTO_INCREMENT, user_id bigint(20) DEFAULT NULL, post_id bigint(20) DEFAULT NULL, name varchar(255) DEFAULT NULL, type varchar(20) DEFAULT NULL, length int(11) DEFAULT NULL, level int(11) NOT NULL DEFAULT '0', status varchar(20) DEFAULT NULL, creation_date timestamp NULL DEFAULT NULL, PRIMARY KEY (id) ) $charset_collate;"; dbDelta($sql); } // Check if the options table already exists if($wpdb->get_var("SHOW TABLES LIKE '$options_table_name'") != $options_table_name) { $sql = "CREATE TABLE $options_table_name ( id bigint(20) NOT NULL AUTO_INCREMENT, question_id bigint(20) DEFAULT NULL, answer longtext, answer_bin tinyint(1) DEFAULT NULL, PRIMARY KEY (id) ) $charset_collate;"; dbDelta($sql); } // Check if the questions table already exists if($wpdb->get_var("SHOW TABLES LIKE '$questions_table_name'") != $questions_table_name) { $sql = "CREATE TABLE $questions_table_name ( id bigint(20) NOT NULL AUTO_INCREMENT, user_id int(11) DEFAULT NULL, quiz_id bigint(20) DEFAULT NULL, question text, type varchar(255) DEFAULT NULL, explanation text, PRIMARY KEY (id) ) $charset_collate;"; dbDelta($sql); } } // Plugin files require_once(ai_quiz_PLUGIN_DIR . '/functions.php'); require_once(ai_quiz_PLUGIN_DIR . '/inc/insert-body-header.php'); require_once(ai_quiz_PLUGIN_DIR . '/inc/insert-body-presentation.php'); require_once( ai_quiz_PLUGIN_DIR . '/inc/insert-head.php' ); // Insert code (head) require_once( ai_quiz_PLUGIN_DIR . '/inc/insert-body.php' ); // Insert code (body) require_once( ai_quiz_PLUGIN_DIR . '/inc/insert-body-video-academy.php' ); // Insert code (body) require_once( ai_quiz_PLUGIN_DIR . '/inc/insert-body-buy-tokens.php' ); // Insert code (body) require_once( ai_quiz_PLUGIN_DIR . '/inc/insert-body-style.php' ); // Insert code (body) require_once( ai_quiz_PLUGIN_DIR . '/inc/insert-body-settings.php' ); // Insert code (body)