/* Plugin Name: One Click Demo Import Plugin URI: https://wordpress.org/plugins/one-click-demo-import/ Description: Import your content, widgets and theme settings with one click. Theme authors! Enable simple demo import for your theme demo data. Version: 3.3.0 Requires at least: 5.5 Requires PHP: 5.6 Author: OCDI Author URI: https://ocdi.com License: GPL3 License URI: http://www.gnu.org/licenses/gpl.html Text Domain: one-click-demo-import Domain Path: /languages */ // Block direct access to the main plugin file. defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); /** * Main plugin class with initialization tasks. */ class OCDI_Plugin { /** * Constructor for this class. */ public function __construct() { /** * Display admin error message if PHP version is older than 5.6. * Otherwise execute the main plugin class. */ if ( version_compare( phpversion(), '5.6', '<' ) ) { add_action( 'admin_notices', array( $this, 'old_php_admin_error_notice' ) ); } else { // Set plugin constants. $this->set_plugin_constants(); // Composer autoloader. require_once OCDI_PATH . 'vendor/autoload.php'; // Instantiate the main plugin class *Singleton*. $one_click_demo_import = OCDI\OneClickDemoImport::get_instance(); // Register WP CLI commands if ( defined( 'WP_CLI' ) && WP_CLI ) { WP_CLI::add_command( 'ocdi list', array( 'OCDI\WPCLICommands', 'list_predefined' ) ); WP_CLI::add_command( 'ocdi import', array( 'OCDI\WPCLICommands', 'import' ) ); } } } /** * Display an admin error notice when PHP is older the version 5.6. * Hook it to the 'admin_notices' action. */ public function old_php_admin_error_notice() { /* translators: %1$s - the PHP version, %2$s and %3$s - strong HTML tags, %4$s - br HTMl tag. */ $message = sprintf( esc_html__( 'The %2$sOne Click Demo Import%3$s plugin requires %2$sPHP 5.6+%3$s to run properly. Please contact your hosting company and ask them to update the PHP version of your site to at least PHP 7.4%4$s Your current version of PHP: %2$s%1$s%3$s', 'one-click-demo-import' ), phpversion(), '', '', '
' ); printf( '

%1$s

', wp_kses_post( $message ) ); } /** * Set plugin constants. * * Path/URL to root of this plugin, with trailing slash and plugin version. */ private function set_plugin_constants() { // Path/URL to root of this plugin, with trailing slash. if ( ! defined( 'OCDI_PATH' ) ) { define( 'OCDI_PATH', plugin_dir_path( __FILE__ ) ); } if ( ! defined( 'OCDI_URL' ) ) { define( 'OCDI_URL', plugin_dir_url( __FILE__ ) ); } // Used for backward compatibility. if ( ! defined( 'PT_OCDI_PATH' ) ) { define( 'PT_OCDI_PATH', plugin_dir_path( __FILE__ ) ); } if ( ! defined( 'PT_OCDI_URL' ) ) { define( 'PT_OCDI_URL', plugin_dir_url( __FILE__ ) ); } // Action hook to set the plugin version constant. add_action( 'admin_init', array( $this, 'set_plugin_version_constant' ) ); } /** * Set plugin version constant -> OCDI_VERSION. */ public function set_plugin_version_constant() { $plugin_data = get_plugin_data( __FILE__ ); if ( ! defined( 'OCDI_VERSION' ) ) { define( 'OCDI_VERSION', $plugin_data['Version'] ); } // Used for backward compatibility. if ( ! defined( 'PT_OCDI_VERSION' ) ) { define( 'PT_OCDI_VERSION', $plugin_data['Version'] ); } } } // Instantiate the plugin class. $ocdi_plugin = new OCDI_Plugin();{ "content": [ { "id": "71b12d12", "settings": [], "elements": [ { "id": "1bb2702a", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "a9dc3ac", "settings": { "title": "Biology Quiz", "title_color": "#0D1427", "typography_typography": "custom", "typography_font_family": "IBM Plex Sans", "typography_font_size": { "unit": "px", "size": 26, "sizes": [] }, "typography_font_weight": "bold" }, "elements": [], "isInner": false, "widgetType": "heading", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "48f60cc4", "settings": [], "elements": [ { "id": "77d9d597", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "58f0bda4", "settings": { "title": "For every correct answer, you will receive 20 points out of 100.", "title_color": "#54565C", "typography_typography": "custom", "typography_font_family": "IBM Plex Sans", "typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, "typography_font_weight": "normal" }, "elements": [], "isInner": false, "widgetType": "heading", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "3c0d62fd", "settings": [], "elements": [ { "id": "6e00f0b6", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "2c5e68fe", "settings": { "text": "Divider", "color": "#EAECF1" }, "elements": [], "isInner": false, "widgetType": "divider", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "4d9bfae4", "settings": { "structure": "20" }, "elements": [ { "id": "534110ec", "settings": { "_column_size": 50, "_inline_size": null }, "elements": [ { "id": "6499cfff", "settings": { "mf_input_name": "mf-first-name", "mf_input_label": "First Name", "mf_input_placeholder": "Xpeed", "mf_input_required": "yes", "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_label_color": "#0D1427", "mf_input_label_typography_typography": "custom", "mf_input_label_typography_font_family": "IBM Plex Sans", "mf_input_label_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_label_typography_font_weight": "500", "mf_input_label_padding": { "unit": "px", "top": "0", "right": "0", "bottom": "0", "left": "0", "isLinked": true }, "mf_input_label_margin": { "unit": "px", "top": "0", "right": "0", "bottom": "10", "left": "0", "isLinked": false }, "mf_input_border_radius": { "unit": "px", "size": 4, "sizes": [] }, "mf_input_place_holder_typography_typography": "custom", "mf_input_place_holder_typography_font_family": "IBM Plex Sans", "mf_input_place_holder_typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, "mf_input_place_holder_typography_font_weight": "500", "mf_input_placeholder_color": "#878990" }, "elements": [], "isInner": false, "widgetType": "mf-text", "elType": "widget" } ], "isInner": false, "elType": "column" }, { "id": "71a78412", "settings": { "_column_size": 50, "_inline_size": null }, "elements": [ { "id": "1054b813", "settings": { "mf_input_name": "mf-last-name", "mf_input_label": "Last Name", "mf_input_placeholder": "Studio", "mf_input_required": "yes", "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_label_color": "#0D1427", "mf_input_label_typography_typography": "custom", "mf_input_label_typography_font_family": "IBM Plex Sans", "mf_input_label_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_label_typography_font_weight": "500", "mf_input_label_margin": { "unit": "px", "top": "0", "right": "0", "bottom": "10", "left": "0", "isLinked": false }, "mf_input_border_radius": { "unit": "px", "size": 4, "sizes": [] }, "mf_input_place_holder_typography_typography": "custom", "mf_input_place_holder_typography_font_family": "IBM Plex Sans", "mf_input_place_holder_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_place_holder_typography_font_weight": "normal", "mf_input_placeholder_color": "#878990" }, "elements": [], "isInner": false, "widgetType": "mf-text", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "75630664", "settings": [], "elements": [ { "id": "5b120613", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "37153ccc", "settings": { "mf_input_label": "Student ID", "mf_input_name": "mf-student-id", "mf_input_placeholder": "******", "mf_input_required": "yes", "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_label_color": "#0D1427", "mf_input_label_typography_typography": "custom", "mf_input_label_typography_font_family": "IBM Plex Sans", "mf_input_label_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_label_typography_font_weight": "500", "mf_input_label_margin": { "unit": "px", "top": "0", "right": "0", "bottom": "10", "left": "0", "isLinked": false }, "mf_input_border_radius": { "unit": "px", "size": 4, "sizes": [] }, "mf_input_place_holder_typography_typography": "custom", "mf_input_place_holder_typography_font_family": "IBM Plex Sans", "mf_input_place_holder_typography_font_size": { "unit": "px", "size": 18, "sizes": [] }, "mf_input_place_holder_typography_font_weight": "normal", "mf_input_placeholder_color": "#878990" }, "elements": [], "isInner": false, "widgetType": "mf-password", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "54878f8f", "settings": [], "elements": [ { "id": "242591fb", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "32d41711", "settings": { "mf_input_label": "1. What is Mitosis?", "mf_input_name": "mf-mitosis", "mf_input_placeholder": "Enter your answer", "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_label_color": "#0D1427", "mf_input_label_typography_typography": "custom", "mf_input_label_typography_font_family": "IBM Plex Sans", "mf_input_label_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_label_typography_font_weight": "500", "mf_input_label_margin": { "unit": "px", "top": "0", "right": "0", "bottom": "10", "left": "0", "isLinked": false }, "mf_textarea_field_height": { "unit": "px", "size": 70, "sizes": [] }, "mf_input_border_radius": { "unit": "px", "size": 4, "sizes": [] }, "mf_input_place_holder_typography_typography": "custom", "mf_input_place_holder_typography_font_family": "IBM Plex Sans", "mf_input_place_holder_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_place_holder_typography_font_weight": "normal", "mf_input_placeholder_color": "#878990" }, "elements": [], "isInner": false, "widgetType": "mf-textarea", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "36176bc", "settings": [], "elements": [ { "id": "71aeb6f6", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "7e5364b6", "settings": { "mf_input_name": "mf-radio", "mf_input_label": "2. The term 'Deoxyribonucleic Acid' is used to describe the genetic code that decides the unique features of each species", "mf_input_list": [ { "mf_input_option_text": "True", "mf_input_option_value": "value-1", "_id": "54d2fe0" }, { "mf_input_option_text": "False", "mf_input_option_value": "value-2", "_id": "81a0e17" } ], "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_label_typography_typography": "custom", "mf_input_label_typography_font_family": "IBM Plex Sans", "mf_input_label_typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, "mf_input_label_typography_font_weight": "500", "__globals__": { "mf_input_label_typography_typography": "" }, "mf_input_typgraphy_text_typography": "custom", "mf_input_typgraphy_text_font_family": "IBM Plex Sans", "mf_input_typgraphy_text_font_size": { "unit": "px", "size": 16, "sizes": [] }, "mf_input_typgraphy_text_font_weight": "500" }, "elements": [], "isInner": false, "widgetType": "mf-radio", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "6aaa7bf7", "settings": [], "elements": [ { "id": "27c7a788", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "1bbb6164", "settings": { "title": "3. List out the phases of mitosis, order and briefly explain them.", "title_color": "#0D1427", "typography_typography": "custom", "typography_font_family": "IBM Plex Sans", "typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, "typography_font_weight": "500" }, "elements": [], "isInner": false, "widgetType": "heading", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "4330f641", "settings": { "structure": "20" }, "elements": [ { "id": "52229533", "settings": { "_column_size": 50, "_inline_size": null }, "elements": [ { "id": "175a30de", "settings": { "mf_input_name": "mf-select", "mf_input_label": "Phase Order ", "mf_input_placeholder": "Please Select", "mf_input_list": [ { "mf_input_option_text": "Phase 1", "mf_input_option_value": "value-1", "_id": "a6a9005" }, { "mf_input_option_text": "Phase 2", "mf_input_option_value": "value-2", "_id": "0c9642f" }, { "mf_input_option_text": "Phase 3", "mf_input_option_value": "value-3", "_id": "ad42fa0" }, { "_id": "5dcc3b4", "mf_input_option_text": "Phase 4", "mf_input_option_value": "Option Value" }, { "_id": "a7b2883", "mf_input_option_text": "Phase 5", "mf_input_option_value": "Option Value" } ], "mf_input_required": "yes", "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_label_color": "#0D1427", "mf_input_label_typography_typography": "custom", "mf_input_label_typography_font_family": "IBM Plex Sans", "mf_input_label_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_label_typography_font_weight": "500", "mf_input_label_margin": { "unit": "px", "top": "0", "right": "0", "bottom": "10", "left": "0", "isLinked": false }, "mf_input_border_radius": { "unit": "px", "size": 4, "sizes": [] }, "mf_input_place_holder_typography_typography": "custom", "mf_input_place_holder_typography_font_family": "IBM Plex Sans", "mf_input_place_holder_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_place_holder_typography_font_weight": "normal", "mf_input_placeholder_color": "#878990" }, "elements": [], "isInner": false, "widgetType": "mf-select", "elType": "widget" } ], "isInner": false, "elType": "column" }, { "id": "7fd5934f", "settings": { "_column_size": 50, "_inline_size": null }, "elements": [ { "id": "218d0622", "settings": { "mf_input_name": "mf-phase-name", "mf_input_label": "Phase Name", "mf_input_placeholder": "Write the phase name here", "mf_input_required": "yes", "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_label_color": "#0D1427", "mf_input_label_typography_typography": "custom", "mf_input_label_typography_font_family": "IBM Plex Sans", "mf_input_label_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_label_typography_font_weight": "500", "mf_input_label_margin": { "unit": "px", "top": "0", "right": "0", "bottom": "10", "left": "0", "isLinked": false }, "mf_input_border_radius": { "unit": "px", "size": 4, "sizes": [] }, "mf_input_place_holder_typography_typography": "custom", "mf_input_place_holder_typography_font_family": "IBM Plex Sans", "mf_input_place_holder_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_place_holder_typography_font_weight": "normal", "mf_input_placeholder_color": "#878990" }, "elements": [], "isInner": false, "widgetType": "mf-text", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "47fd402e", "settings": [], "elements": [ { "id": "6ff6d829", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "410e45b2", "settings": { "mf_input_label": "", "mf_input_name": "mf-simple-repeater", "mf_input_repeater_add_btn_txt": "Add", "mf_input_repeater_remove_btn_txt": "Delete", "mf_input_repeater": [ { "mf_input_repeater_label": "Explanation", "mf_input_repeater_type": "textarea", "_id": "e7e3e33", "mf_input_repeater_name": "repeater-input-name-1692182251", "mf_input_repeater_range_min": "1", "mf_input_repeater_range_max": "100", "mf_input_repeater_range_step": "1", "mf_input_repeater_placeholder": "Briefly explain the phase" } ], "mf_conditional_logic_form_list": [], "mf_field_input_label_typography_typography": "custom", "mf_field_input_label_typography_font_family": "IBM Plex Sans", "mf_field_input_label_typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, "mf_field_input_label_typography_font_weight": "500", "mf_field_input_typgraphy_typography": "custom", "mf_field_input_typgraphy_font_family": "IBM Plex Sans", "mf_field_input_typgraphy_font_size": { "unit": "px", "size": 16, "sizes": [] }, "mf_field_input_typgraphy_font_weight": "500", "mf_repeater_add_new_btn_typography_typography": "custom", "mf_repeater_add_new_btn_typography_font_family": "IBM Plex Sans", "mf_repeater_add_new_btn_typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, "mf_repeater_add_new_btn_typography_line_height": { "unit": "px", "size": 16, "sizes": [] }, "mf_repeater_addnew_btn_text_padding": { "unit": "px", "top": "9.5", "right": "12", "bottom": "9.5", "left": "12", "isLinked": false }, "mf_repeater_addnew_btn_text_color": "#000000", "mf_repeater_addnew_btn_bg_color_color": "#EAEDF4", "mf_repeater_addnew_btn_hover_color": "#000000", "mf_repeater_addnew_btn_bg_hover_color_color": "#EAEDF4" }, "elements": [], "isInner": false, "widgetType": "mf-simple-repeater", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "6b4e525a", "settings": [], "elements": [ { "id": "5d9efe99", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "20a6fdf5", "settings": { "title": "4. During the ______ stage of mitosis, the sister chromatids line up at the ______ (two words)", "title_color": "#0D1427", "typography_typography": "custom", "typography_font_family": "IBM Plex Sans", "typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, "typography_font_weight": "500" }, "elements": [], "isInner": false, "widgetType": "heading", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "3e69a387", "settings": [], "elements": [ { "id": "30ae9005", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "453d55d6", "settings": { "mf_input_name": "mf-word", "mf_input_label": "", "mf_input_placeholder": "Word 1 \/ Word 2", "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_border_radius": { "unit": "px", "size": 4, "sizes": [] }, "mf_input_place_holder_typography_typography": "custom", "mf_input_place_holder_typography_font_family": "IBM Plex Sans", "mf_input_place_holder_typography_font_size": { "unit": "px", "size": 14, "sizes": [] }, "mf_input_place_holder_typography_font_weight": "normal", "_element_width": "initial", "_element_custom_width": { "unit": "px", "size": 400, "sizes": [] } }, "elements": [], "isInner": false, "widgetType": "mf-text", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "13151b5c", "settings": [], "elements": [ { "id": "161c3852", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "6617083a", "settings": { "mf_input_name": "mf-radio-two", "mf_input_label": "5. Which phase occurs directly after metaphase??", "mf_input_display_option": "block", "mf_input_list": [ { "mf_input_option_text": "Prophase", "mf_input_option_value": "Prophase", "_id": "bab68e2" }, { "mf_input_option_text": "Metaphase", "mf_input_option_value": "Metaphase", "_id": "894c810" }, { "mf_input_option_text": "Anaphase", "mf_input_option_value": "Anaphase", "_id": "21ac1c2" }, { "_id": "ee302da", "mf_input_option_text": "Telophase", "mf_input_option_value": "Telophase" } ], "mf_input_validation_warning_message": "This field is required.", "mf_conditional_logic_form_list": [], "mf_input_label_color": "#0D1427", "mf_input_label_typography_typography": "custom", "mf_input_label_typography_font_family": "IBM Plex Sans", "mf_input_label_typography_font_size": { "unit": "px", "size": 16, "sizes": [] }, "mf_input_label_typography_font_weight": "500", "mf_input_label_margin": { "unit": "px", "top": "0", "right": "0", "bottom": "15", "left": "0", "isLinked": false }, "mf_input_option_color": "#0D1427", "mf_input_typgraphy_text_typography": "custom", "mf_input_typgraphy_text_font_family": "IBM Plex Sans", "mf_input_typgraphy_text_font_size": { "unit": "px", "size": 16, "sizes": [] }, "mf_input_typgraphy_text_font_weight": "normal" }, "elements": [], "isInner": false, "widgetType": "mf-radio", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" }, { "id": "7cf35616", "settings": [], "elements": [ { "id": "137f97fb", "settings": { "_column_size": 100, "_inline_size": null }, "elements": [ { "id": "963e3e8", "settings": { "mf_btn_text": "Submit", "mf_btn_align": "left", "mf_conditional_logic_form_list": [], "mf_hidden_input": [], "mf_btn_text_padding": { "unit": "px", "top": "16", "right": "26", "bottom": "17", "left": "26", "isLinked": false }, "mf_btn_box_shadow_group_box_shadow_type": "yes", "mf_btn_box_shadow_group_box_shadow": { "horizontal": 0, "vertical": 0, "blur": 0, "spread": 0, "color": "rgba(0,0,0,0.5)" } }, "elements": [], "isInner": false, "widgetType": "mf-button", "elType": "widget" } ], "isInner": false, "elType": "column" } ], "isInner": false, "elType": "section" } ], "page_settings": [], "version": "0.4", "title": "Biolog Quiz Form", "type": "page" }