api-settings.php
2 years ago
dashboard.php
2 years ago
elements.php
2 years ago
features.php
2 years ago
features_bkp.php
2 years ago
go-premium.php
2 years ago
integration.php
2 years ago
sidebar.php
2 years ago
features.php
137 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) { |
| 3 | exit; // Exit if accessed directly |
| 4 | } |
| 5 | |
| 6 | use SPEL\includes\Admin\Module_Settings; |
| 7 | |
| 8 | $elements = Module_Settings::get_widget_settings(); |
| 9 | ?> |
| 10 | <div id="features" class="spe-tab-box"> |
| 11 | <div class="spe_elements_tab_menu"> |
| 12 | <div class="spe_tab_content"> |
| 13 | <div class="icon"> |
| 14 | <i class="icon-feature_two"></i> |
| 15 | </div> |
| 16 | <div class="content"> |
| 17 | <h3><?php esc_html_e('Features', 'spider-elements'); ?></h3> |
| 18 | </div> |
| 19 | </div> |
| 20 | <div class="menu_right_content"> |
| 21 | <div class="plugin_active_switcher"> |
| 22 | <label class="toggler" id="disable"><?php esc_html_e('Disable All', 'spider-elements'); ?></label> |
| 23 | <div class="toggle"> |
| 24 | <input type="checkbox" id="f_switcher" class="check"> |
| 25 | <label class="b switch" for="f_switcher"></label> |
| 26 | </div> |
| 27 | <label class="toggler" id="enabled"><?php esc_html_e('Enabled All', 'spider-elements'); ?></label> |
| 28 | </div> |
| 29 | <button type="submit" name="features-submit" class="spe_dashboard_btn"> |
| 30 | <?php esc_html_e('Save Changes', 'spider-elements'); ?> |
| 31 | </button> |
| 32 | </div> |
| 33 | </div> |
| 34 | |
| 35 | <div class="spe_elements_tab" id="features_filter"> |
| 36 | <div class="spe_fiter_data active" data-filter="*"> |
| 37 | <i class="icon-star"></i> |
| 38 | <?php esc_html_e('All', 'spider-elements'); ?> |
| 39 | </div> |
| 40 | <div class="spe_fiter_data" data-filter=".f_free"> |
| 41 | <i class="icon-gift"></i> |
| 42 | <?php esc_html_e('Free', 'spider-elements'); ?> |
| 43 | </div> |
| 44 | <div class="spe_fiter_data" data-filter=".f_pro"> |
| 45 | <i class="icon-pro-badge"></i> |
| 46 | <?php esc_html_e('Pro', 'spider-elements'); ?> |
| 47 | </div> |
| 48 | </div> |
| 49 | |
| 50 | <div class="spe_filter_content ezd-d-flex" id="features_gallery"> |
| 51 | <?php |
| 52 | if (isset($elements[ 'spider_elements_features' ]) && is_array($elements[ 'spider_elements_features' ])) { |
| 53 | foreach ( $elements[ 'spider_elements_features' ] as $item ) { |
| 54 | $widget_type = $item[ 'widget_type' ] ?? ''; |
| 55 | $is_pro_widget = $widget_type === 'pro' ? ' class=pro_popup' : ''; |
| 56 | $is_pro_widget_enabled = $widget_type === 'pro' ? ' disabled' : ''; |
| 57 | |
| 58 | $elements_opt = get_option( 'spel_features_settings' ); |
| 59 | $opt_name = $item[ 'name' ] ?? ''; |
| 60 | |
| 61 | |
| 62 | // By default, all the switcher is checked |
| 63 | $opt_input = $elements_opt[ $opt_name ] ?? ''; |
| 64 | $is_checked = ! empty ( $opt_input == 'on' ) ? ' checked' : ''; |
| 65 | $checked = ! isset ( $elements_opt[ $opt_name ] ) ? ' checked' : $is_checked; |
| 66 | ?> |
| 67 | <div class="ezd-colum-space-4 f_free"> |
| 68 | <div class="spe_element_box spe_element_switch"> |
| 69 | <div class="spe_element_content"> |
| 70 | <?php |
| 71 | if (isset($item[ 'icon' ]) && !empty($item[ 'icon' ])) { ?> |
| 72 | <i class="<?php echo esc_attr($item[ 'icon' ]) ?>"></i> |
| 73 | <?php |
| 74 | } |
| 75 | if (isset($item[ 'label' ]) && !empty($item[ 'label' ])) { ?> |
| 76 | <label for="spe-elementor-video"><?php echo esc_html($item[ 'label' ]) ?></label> |
| 77 | <?php |
| 78 | } |
| 79 | ?> |
| 80 | </div> |
| 81 | <div class="spe_element_right"> |
| 82 | <?php |
| 83 | if (!empty($item[ 'label' ])) { |
| 84 | ?> |
| 85 | <div class="spe_link"> |
| 86 | <a href="<?php echo esc_url($item[ 'demo_url' ]) ?>" class="tooltip-top" |
| 87 | data-tooltip="<?php printf(esc_attr__('View %s Feature Demo', 'spider-elements'), $item[ 'label' ]) ?>" |
| 88 | target="_blank"> |
| 89 | <img src="<?php echo esc_url( SPEL_IMG . '/icon1.svg') ?>" |
| 90 | alt="<?php esc_attr_e('Widget Demo', 'spider-elements'); ?>"> |
| 91 | </a> |
| 92 | <a href="<?php echo esc_url($item[ 'video_url' ]) ?>" class="tooltip-top" |
| 93 | data-tooltip="<?php printf(esc_attr__('View %s Video Tutorial', 'spider-elements'), $item[ 'label' ]) ?>" |
| 94 | target="_blank"> |
| 95 | <img src="<?php echo esc_url( SPEL_IMG . '/icon2.svg') ?>" |
| 96 | alt="<?php esc_attr_e('Video Tutorial', 'spider-elements'); ?>"> |
| 97 | </a> |
| 98 | </div> |
| 99 | <?php |
| 100 | } |
| 101 | ?> |
| 102 | <label<?php echo esc_attr($is_pro_widget) ?> class="spe-switch"> |
| 103 | <input type="checkbox" class="spe_widget_checkbox spe-widget-list" |
| 104 | name="<?php echo esc_attr($item[ 'name' ]) ?>" |
| 105 | id="<?php echo esc_attr($item[ 'name' ]) ?>" <?php echo esc_attr($checked . $is_pro_widget_enabled); ?>> |
| 106 | <span class="spe_widget_switcher"></span> |
| 107 | </label> |
| 108 | </div> |
| 109 | </div> |
| 110 | </div> |
| 111 | <?php |
| 112 | } |
| 113 | } |
| 114 | ?> |
| 115 | </div> |
| 116 | </div> |
| 117 | |
| 118 | |
| 119 | <div id="elements_popup1" class="elements_pro_popup"> |
| 120 | <div class="message_content ezd-text-center"> |
| 121 | <div class="close-pro"> |
| 122 | <img class="pro-close" src="<?php echo esc_url(SPEL_IMG . '/dashboard-img/modal-close.png') ?>" |
| 123 | alt="<?php esc_attr_e('Popup Close', 'spider-elements'); ?>"> |
| 124 | </div> |
| 125 | <div class="pro-icon"> |
| 126 | <img class="pro-image" src="<?php echo esc_url(SPEL_IMG . '/dashboard-img/dimond.png') ?>" |
| 127 | alt="<?php esc_attr_e('Popup Pro Diamond', 'spider-elements'); ?>"> |
| 128 | </div> |
| 129 | <div class="pro-content"> |
| 130 | <h3><?php esc_html_e('Go Pro', 'spider-elements'); ?></h3> |
| 131 | <p><?php esc_html_e('Upgrade to Pro Version for Unlock more features!', 'spider-elements'); ?></p> |
| 132 | <a href="#" class="spe_dashboard_btn" target="_blank"> |
| 133 | <?php esc_html_e('Confirm', 'spider-elements'); ?> |
| 134 | </a> |
| 135 | </div> |
| 136 | </div> |
| 137 | </div> |