set_vars( $cab_booking_config ); $this->init(); } /** * Set some settings * @since 1.0.0 * @param $cab_booking_config Our config parameters */ public function set_vars( $cab_booking_config ) { if( isset( $cab_booking_config['page_slug'] ) ) { $this->page_slug = esc_attr( $cab_booking_config['page_slug'] ); } if( isset( $cab_booking_config['page_title'] ) ) { $this->page_title = esc_attr( $cab_booking_config['page_title'] ); } if( isset( $cab_booking_config['steps'] ) ) { $this->config_steps = $cab_booking_config['steps']; } $current_theme = wp_get_theme(); $this->theme_title = $current_theme->get( 'Name' ); $this->theme_name = strtolower( preg_replace( '#[^a-zA-Z]#', '', $current_theme->get( 'Name' ) ) ); $this->page_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_page_slug', $this->theme_name . '-demoimport' ); $this->parent_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_parent_slug', '' ); } /** * Hooks and filters * @since 1.0.0 */ public function init() { add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'admin_menu', array( $this, 'menu_page' ) ); add_action( 'wp_ajax_setup_widgets', array( $this, 'setup_widgets' ) ); } public function enqueue_scripts() { wp_enqueue_style( 'demo-import-style', get_template_directory_uri() . '/demo-import/assets/css/demo-import-style.css'); wp_register_script( 'demo-import-script', get_template_directory_uri() . '/demo-import/assets/js/demo-import-script.js', array( 'jquery' ), time() ); wp_localize_script( 'demo-import-script', 'cab_booking_whizzie_params', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'wpnonce' => wp_create_nonce( 'whizzie_nonce' ), 'verify_text' => esc_html( 'verifying', 'cab-booking' ) ) ); wp_enqueue_script( 'demo-import-script' ); } /** Make a modal screen for the wizard **/ public function menu_page() { add_menu_page( esc_html( $this->page_title ), esc_html( $this->page_title ), 'manage_options', $this->page_slug, array( $this, 'cab_booking_guide' ) ,'',40); } /** Make an interface for the wizard **/ public function wizard_page() { /* If we arrive here, we have the filesystem */ ?>
'; // The wizard is a list with only one item visible at a time $steps = $this->get_steps(); echo ''; echo ''; ?>
';?>
config_steps; $steps = array( 'widgets' => array( 'id' => 'widgets', 'title' => __( 'Customizer', 'cab-booking' ), 'icon' => 'welcome-widgets-menus', 'view' => 'get_step_widgets', 'callback' => 'install_widgets', 'button_text_one' => __( 'Import Demo', 'cab-booking' ), 'can_skip' => true, 'icon_text' => 'Import Demo' ), 'done' => array( 'id' => 'done', 'title' => __( 'All Done', 'cab-booking' ), 'icon' => 'yes', 'view' => 'get_step_done', 'callback' => '', 'icon_text' => 'Done' ) ); // Iterate through each step and replace with dev config values if( $dev_steps ) { // Configurable elements - these are the only ones the dev can update from config.php $can_config = array( 'title', 'icon', 'button_text', 'can_skip' ); foreach( $dev_steps as $dev_step ) { // We can only proceed if an ID exists and matches one of our IDs if( isset( $dev_step['id'] ) ) { $cab_booking_id = $dev_step['id']; if( isset( $steps[$cab_booking_id] ) ) { foreach( $can_config as $element ) { if( isset( $dev_step[$element] ) ) { $steps[$cab_booking_id][$element] = $dev_step[$element]; } } } } } } return $steps; } /** Print the content for the intro step **/ public function get_step_importer() { ?>

__('Home', 'cab-booking'), 'menu-item-classes' => 'home', 'menu-item-url' => home_url('/'), 'menu-item-status' => 'publish' )); // About $cab_booking_page_about = get_page_by_path('about'); if($cab_booking_page_about){ wp_update_nav_menu_item($cab_booking_menu_id, 0, array( 'menu-item-title' => __('About', 'cab-booking'), 'menu-item-classes' => 'about', 'menu-item-url' => get_permalink($cab_booking_page_about), 'menu-item-status' => 'publish' )); } // Services $cab_booking_page_services = get_page_by_path('services'); if($cab_booking_page_services){ wp_update_nav_menu_item($cab_booking_menu_id, 0, array( 'menu-item-title' => __('Services', 'cab-booking'), 'menu-item-classes' => 'services', 'menu-item-url' => get_permalink($cab_booking_page_services), 'menu-item-status' => 'publish' )); } // Blog $cab_booking_page_blog = get_page_by_path('blog'); if($cab_booking_page_blog){ wp_update_nav_menu_item($cab_booking_menu_id, 0, array( 'menu-item-title' => __('Blog', 'cab-booking'), 'menu-item-classes' => 'blog', 'menu-item-url' => get_permalink($cab_booking_page_blog), 'menu-item-status' => 'publish' )); } // Contact Us $cab_booking_page_contact = get_page_by_path('contact'); if($cab_booking_page_contact){ wp_update_nav_menu_item($cab_booking_menu_id, 0, array( 'menu-item-title' => __('Contact Us', 'cab-booking'), 'menu-item-classes' => 'contact', 'menu-item-url' => get_permalink($cab_booking_page_contact), 'menu-item-status' => 'publish' )); } // Assign menu to location if not set if (!has_nav_menu($cab_booking_menulocation)) { $cab_booking_locations = get_theme_mod('nav_menu_locations'); $cab_booking_locations[$cab_booking_menulocation] = $cab_booking_menu_id; // Use $cab_booking_menu_id here set_theme_mod('nav_menu_locations', $cab_booking_locations); } } } public function cab_booking_social_menu() { // ------- Create Social Menu -------- $cab_booking_menuname = $cab_booking_themename . 'Social Menu'; $cab_booking_menulocation = 'social-menu'; $cab_booking_menu_exists = wp_get_nav_menu_object( $cab_booking_menuname ); if( !$cab_booking_menu_exists){ $cab_booking_menu_id = wp_create_nav_menu($cab_booking_menuname); wp_update_nav_menu_item( $cab_booking_menu_id, 0, array( 'menu-item-title' => __( 'Facebook', 'cab-booking' ), 'menu-item-url' => 'https://www.facebook.com', 'menu-item-status' => 'publish', ) ); wp_update_nav_menu_item( $cab_booking_menu_id, 0, array( 'menu-item-title' => __( 'Pinterest', 'cab-booking' ), 'menu-item-url' => 'https://www.pinterest.com', 'menu-item-status' => 'publish', ) ); wp_update_nav_menu_item( $cab_booking_menu_id, 0, array( 'menu-item-title' => __( 'Twitter', 'cab-booking' ), 'menu-item-url' => 'https://www.twitter.com', 'menu-item-status' => 'publish', ) ); wp_update_nav_menu_item( $cab_booking_menu_id, 0, array( 'menu-item-title' => __( 'Youtube', 'cab-booking' ), 'menu-item-url' => 'https://www.youtube.com', 'menu-item-status' => 'publish', ) ); wp_update_nav_menu_item( $cab_booking_menu_id, 0, array( 'menu-item-title' => __( 'Instagram', 'cab-booking' ), 'menu-item-url' => 'https://www.instagram.com', 'menu-item-status' => 'publish', ) ); if( !has_nav_menu( $cab_booking_menulocation ) ){ $locations = get_theme_mod('nav_menu_locations'); $locations[$cab_booking_menulocation] = $cab_booking_menu_id; set_theme_mod( 'nav_menu_locations', $locations ); } } } /** * Imports the Demo Content * @since 1.1.0 */ public function setup_widgets() { //................................................. MENU PAGES .................................................// $cab_booking_home_id=''; $cab_booking_home_content = ''; $cab_booking_home_title = 'Home'; $cab_booking_home = array( 'post_type' => 'page', 'post_title' => $cab_booking_home_title, 'post_content' => $cab_booking_home_content, 'post_status' => 'publish', 'post_author' => 1, 'post_slug' => 'home' ); $cab_booking_home_id = wp_insert_post($cab_booking_home); //Set the home page template add_post_meta( $cab_booking_home_id, '_wp_page_template', 'revolution-home.php' ); //Set the static front page $cab_booking_home = get_page_by_title( 'Home' ); update_option( 'page_on_front', $cab_booking_home->ID ); update_option( 'show_on_front', 'page' ); // Create a posts page and assign the template $cab_booking_blog_title = 'Blog'; $cab_booking_blog_check = get_page_by_path('blog'); if (!$cab_booking_blog_check) { $cab_booking_blog = array( 'post_type' => 'page', 'post_title' => $cab_booking_blog_title, 'post_status' => 'publish', 'post_author' => 1, 'post_name' => 'blog' // Unique slug for the blog page ); $cab_booking_blog_id = wp_insert_post($cab_booking_blog); // Set the posts page if (!is_wp_error($cab_booking_blog_id)) { update_option('page_for_posts', $cab_booking_blog_id); } } // Create a Contact Us page and assign the template $cab_booking_contact_title = 'Contact Us'; $cab_booking_contact_check = get_page_by_path('contact'); if (!$cab_booking_contact_check) { $cab_booking_contact = array( 'post_type' => 'page', 'post_title' => $cab_booking_contact_title, 'post_content' => '"More About The Free Cab WordPress Theme" The Free Cab WordPress Theme delves into functionality, providing a comprehensive toolkit for transportation service websites. Its uses extend to various aspects of managing a cab service, from showcasing available vehicles to facilitating smooth booking processes. The theme acts as a virtual storefront, allowing cab providers to present their offerings effectively and users to navigate seamlessly through the available options. In terms of design, the Free Cab WordPress Theme integrates user-centric elements, such as clear calls-to-action and straightforward menus, ensuring that the booking process is intuitive and accessible. The theme employs an organized layout, presenting essential information in a structured manner. The visual design elements, including color schemes and imagery, contribute to creating a trustworthy and inviting atmosphere for users. The Free Cab WordPress Theme delves into functionality, providing a comprehensive toolkit for transportation service websites. Its uses extend to various aspects of managing a cab service, from showcasing available vehicles to facilitating smooth booking processes. The theme acts as a virtual storefront, allowing cab providers to present their offerings effectively and users to navigate seamlessly through the available options. In terms of design, the Free Cab WordPress Theme integrates user-centric elements, such as clear calls-to-action and straightforward menus, ensuring that the booking process is intuitive and accessible. The theme employs an organized layout, presenting essential information in a structured manner. The visual design elements, including color schemes and imagery, contribute to creating a trustworthy and inviting atmosphere for users. Beyond the user-facing elements, the Free Cab WordPress Theme often comes equipped with features that aid cab service providers in managing their operations effectively. This includes tools for tracking bookings, managing vehicle availability, and even integrating with payment systems for a secure and efficient transaction process. Furthermore, the theme’s versatility allows for customization, enabling cab service providers to align the website with their brand identity. Customizable elements may include color schemes, logos, and other visual elements, allowing businesses to maintain a consistent brand image across online platforms. The Free Cab WordPress Theme stands out as a comprehensive solution for transportation businesses, offering a seamless blend of user-friendly design and robust functionality. Its uses span from presenting cab services in an appealing manner to facilitating a smooth and secure booking process. The theme’s modern design, responsive layout, and customizable features make it an invaluable tool for cab service providers aiming to establish a strong and trustworthy online presence.', 'post_status' => 'publish', 'post_author' => 1, 'post_name' => 'contact' // Unique slug for the Contact Us page ); wp_insert_post($cab_booking_contact); } // Create a About page and assign the template $cab_booking_about_title = 'About'; $cab_booking_about_check = get_page_by_path('about'); if (!$cab_booking_about_check) { $cab_booking_about = array( 'post_type' => 'page', 'post_title' => $cab_booking_about_title, 'post_content' => '"More About The Free Cab WordPress Theme" The Free Cab WordPress Theme delves into functionality, providing a comprehensive toolkit for transportation service websites. Its uses extend to various aspects of managing a cab service, from showcasing available vehicles to facilitating smooth booking processes. The theme acts as a virtual storefront, allowing cab providers to present their offerings effectively and users to navigate seamlessly through the available options. In terms of design, the Free Cab WordPress Theme integrates user-centric elements, such as clear calls-to-action and straightforward menus, ensuring that the booking process is intuitive and accessible. The theme employs an organized layout, presenting essential information in a structured manner. The visual design elements, including color schemes and imagery, contribute to creating a trustworthy and inviting atmosphere for users. The Free Cab WordPress Theme delves into functionality, providing a comprehensive toolkit for transportation service websites. Its uses extend to various aspects of managing a cab service, from showcasing available vehicles to facilitating smooth booking processes. The theme acts as a virtual storefront, allowing cab providers to present their offerings effectively and users to navigate seamlessly through the available options. In terms of design, the Free Cab WordPress Theme integrates user-centric elements, such as clear calls-to-action and straightforward menus, ensuring that the booking process is intuitive and accessible. The theme employs an organized layout, presenting essential information in a structured manner. The visual design elements, including color schemes and imagery, contribute to creating a trustworthy and inviting atmosphere for users. Beyond the user-facing elements, the Free Cab WordPress Theme often comes equipped with features that aid cab service providers in managing their operations effectively. This includes tools for tracking bookings, managing vehicle availability, and even integrating with payment systems for a secure and efficient transaction process. Furthermore, the theme’s versatility allows for customization, enabling cab service providers to align the website with their brand identity. Customizable elements may include color schemes, logos, and other visual elements, allowing businesses to maintain a consistent brand image across online platforms. The Free Cab WordPress Theme stands out as a comprehensive solution for transportation businesses, offering a seamless blend of user-friendly design and robust functionality. Its uses span from presenting cab services in an appealing manner to facilitating a smooth and secure booking process. The theme’s modern design, responsive layout, and customizable features make it an invaluable tool for cab service providers aiming to establish a strong and trustworthy online presence.', 'post_status' => 'publish', 'post_author' => 1, 'post_name' => 'about' // Unique slug for the About page ); wp_insert_post($cab_booking_about); } // Create a Services page and assign the template $cab_booking_services_title = 'Services'; $cab_booking_services_check = get_page_by_path('services'); if (!$cab_booking_services_check) { $cab_booking_services = array( 'post_type' => 'page', 'post_title' => $cab_booking_services_title, 'post_content' => '"More About The Free Cab WordPress Theme" The Free Cab WordPress Theme delves into functionality, providing a comprehensive toolkit for transportation service websites. Its uses extend to various aspects of managing a cab service, from showcasing available vehicles to facilitating smooth booking processes. The theme acts as a virtual storefront, allowing cab providers to present their offerings effectively and users to navigate seamlessly through the available options. In terms of design, the Free Cab WordPress Theme integrates user-centric elements, such as clear calls-to-action and straightforward menus, ensuring that the booking process is intuitive and accessible. The theme employs an organized layout, presenting essential information in a structured manner. The visual design elements, including color schemes and imagery, contribute to creating a trustworthy and inviting atmosphere for users. The Free Cab WordPress Theme delves into functionality, providing a comprehensive toolkit for transportation service websites. Its uses extend to various aspects of managing a cab service, from showcasing available vehicles to facilitating smooth booking processes. The theme acts as a virtual storefront, allowing cab providers to present their offerings effectively and users to navigate seamlessly through the available options. In terms of design, the Free Cab WordPress Theme integrates user-centric elements, such as clear calls-to-action and straightforward menus, ensuring that the booking process is intuitive and accessible. The theme employs an organized layout, presenting essential information in a structured manner. The visual design elements, including color schemes and imagery, contribute to creating a trustworthy and inviting atmosphere for users. Beyond the user-facing elements, the Free Cab WordPress Theme often comes equipped with features that aid cab service providers in managing their operations effectively. This includes tools for tracking bookings, managing vehicle availability, and even integrating with payment systems for a secure and efficient transaction process. Furthermore, the theme’s versatility allows for customization, enabling cab service providers to align the website with their brand identity. Customizable elements may include color schemes, logos, and other visual elements, allowing businesses to maintain a consistent brand image across online platforms. The Free Cab WordPress Theme stands out as a comprehensive solution for transportation businesses, offering a seamless blend of user-friendly design and robust functionality. Its uses span from presenting cab services in an appealing manner to facilitating a smooth and secure booking process. The theme’s modern design, responsive layout, and customizable features make it an invaluable tool for cab service providers aiming to establish a strong and trustworthy online presence.', 'post_status' => 'publish', 'post_author' => 1, 'post_name' => 'services' // Unique slug for the Services page ); wp_insert_post($cab_booking_services); } // ------------------------------------------ Header -------------------------------------- // set_theme_mod('cab_booking_phone_number','900-300-600'); // ------------------------------------------ Slider Section -------------------------------------- // set_theme_mod('cab_booking_enable_slider',1); set_theme_mod('cab_booking_enable_project',1); set_theme_mod('cab_booking_slide_number','3'); for($cab_booking_i=1;$cab_booking_i<=3;$cab_booking_i++){ set_theme_mod( 'cab_booking_slider_image'.$cab_booking_i,get_template_directory_uri().'/revolution/assets/images/slider'.$cab_booking_i.'.png' ); set_theme_mod( 'cab_booking_slider_heading'.$cab_booking_i, '20% OFF FOR Online BOOKING' ); set_theme_mod( 'cab_booking_slider_text'.$cab_booking_i, 'From as low as $10 per day with limited time offer discounts' ); set_theme_mod( 'cab_booking_slider_button1_text'.$cab_booking_i, 'LEARN MORE' ); set_theme_mod( 'cab_booking_slider_button1_link'.$cab_booking_i, '#' ); } // ------------------------------------------ Services Section -------------------------------------- // $cab_booking_icon=array('fa fa-car','fa fa-wallet','fa fa-users'); $cab_booking_heading=array('Variety Of Cars','Best Rates','Satisfied Clients'); set_theme_mod('cab_booking_services_number','3'); for($cab_booking_i=1;$cab_booking_i<=3;$cab_booking_i++) { set_theme_mod( 'cab_booking_services_icon'.$cab_booking_i, $cab_booking_icon[$cab_booking_i-1] ); set_theme_mod( 'cab_booking_services_heading'.$cab_booking_i, $cab_booking_heading[$cab_booking_i-1] ); set_theme_mod( 'cab_booking_services_text'.$cab_booking_i, 'Lorem ipsum dolor sit' ); } // ------------------------------------------ Popular Cars Section -------------------------------------- // set_theme_mod('cab_booking_popular_car_heading','Popular Cars'); set_theme_mod('cab_booking_popular_number','6 '); $cab_booking_cab_headings = array( 'Mercedes Luxury Car', 'BMW Series 5', 'Audi A6 Premium', 'Tesla Model 3', 'Lexus ES 350', 'Jaguar XF Sedan' ); $cab_booking_cab_prices = array( '$180', '$220', '$200', '$250', '$210', '$230' ); for ($cab_booking_i = 1; $cab_booking_i <= 6; $cab_booking_i++) { set_theme_mod('cab_booking_popular_car_image' . $cab_booking_i, get_template_directory_uri() . '/revolution/assets/images/cars' . $cab_booking_i . '.png'); set_theme_mod('cab_booking_popular_car_price' . $cab_booking_i, $cab_booking_cab_prices[$cab_booking_i - 1]); set_theme_mod('cab_booking_popular_car_duration' . $cab_booking_i, '/Day'); set_theme_mod('cab_booking_popular_car_heading' . $cab_booking_i, $cab_booking_cab_headings[$cab_booking_i - 1]); set_theme_mod('cab_booking_popular_car_seats' . $cab_booking_i, '4 Seats'); set_theme_mod('cab_booking_popular_car_types' . $cab_booking_i, 'Automatic'); set_theme_mod('cab_booking_popular_car_year' . $cab_booking_i, '2018'); set_theme_mod('cab_booking_services_mode' . $cab_booking_i, 'A/C'); set_theme_mod('cab_booking_popular_car_button_text' . $cab_booking_i, 'RENT A CAR'); set_theme_mod('cab_booking_popular_car_button_link' . $cab_booking_i, '#'); } $this->cab_booking_customizer_nav_menu(); $this->cab_booking_social_menu(); } public function cab_booking_guide() { $display_string = ''; $return = add_query_arg( array()) ; $theme = wp_get_theme( 'cab-booking' ); ?>

Version:

wizard_page(); ?>