elements.php
3 months ago
features.php
6 months ago
integration.php
6 months ago
popup-pro.php
6 months ago
sidebar.php
6 months ago
welcome.php
6 months ago
welcome.php
305 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; |
| 4 | } // Exit if accessed directly |
| 5 | |
| 6 | use SPEL\includes\Admin\Module_Settings; |
| 7 | |
| 8 | $php_version = phpversion(); |
| 9 | $memory_limit = ini_get( 'memory_limit' ); |
| 10 | $max_execution_time = ini_get( 'max_execution_time' ); |
| 11 | $post_limit = ini_get( 'post_max_size' ); |
| 12 | $uploads = wp_upload_dir(); |
| 13 | $upload_path = $uploads['basedir']; |
| 14 | $check_icon = '<span class="valid"><i class="icon-check"></i></span>'; |
| 15 | $close_icon = '<span class="invalid"><i class="icon-close"></i></span>'; |
| 16 | $environment = spel_get_environment_info(); |
| 17 | |
| 18 | // Get widget and feature stats |
| 19 | $widget_settings = Module_Settings::get_widget_settings(); |
| 20 | $widget_opt = get_option( 'spe_widget_settings' ); |
| 21 | $feature_opt = get_option( 'spel_features_settings' ); |
| 22 | |
| 23 | // Count active widgets and features |
| 24 | $total_widgets = isset( $widget_settings['spider_elements_widgets'] ) ? count( $widget_settings['spider_elements_widgets'] ) : 0; |
| 25 | $total_features = isset( $widget_settings['spider_elements_features'] ) ? count( $widget_settings['spider_elements_features'] ) : 0; |
| 26 | |
| 27 | $active_widgets = 0; |
| 28 | if ( isset( $widget_settings['spider_elements_widgets'] ) ) { |
| 29 | foreach ( $widget_settings['spider_elements_widgets'] as $widget ) { |
| 30 | $widget_name = $widget['name'] ?? ''; |
| 31 | if ( ! isset( $widget_opt[ $widget_name ] ) || $widget_opt[ $widget_name ] === 'on' ) { |
| 32 | if ( $widget['widget_type'] !== 'pro' || spel_is_premium() ) { |
| 33 | ++$active_widgets; |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | $active_features = 0; |
| 40 | if ( isset( $widget_settings['spider_elements_features'] ) ) { |
| 41 | foreach ( $widget_settings['spider_elements_features'] as $feature ) { |
| 42 | $feature_name = $feature['name'] ?? ''; |
| 43 | if ( ! isset( $feature_opt[ $feature_name ] ) || $feature_opt[ $feature_name ] === 'on' ) { |
| 44 | if ( $feature['feature_type'] !== 'pro' || spel_is_premium() ) { |
| 45 | ++$active_features; |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // Count pro widgets |
| 52 | $pro_widgets = 0; |
| 53 | if ( isset( $widget_settings['spider_elements_widgets'] ) ) { |
| 54 | foreach ( $widget_settings['spider_elements_widgets'] as $widget ) { |
| 55 | if ( $widget['widget_type'] === 'pro' ) { |
| 56 | ++$pro_widgets; |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | $free_widgets = $total_widgets - $pro_widgets; |
| 62 | ?> |
| 63 | <div id="welcome" class="tab-box active"> |
| 64 | |
| 65 | <!-- Enhanced Dashboard Banner --> |
| 66 | <div class="dashboard_banner"> |
| 67 | <div class="banner_content"> |
| 68 | <span class="version_badge"> |
| 69 | <i class="icon-star"></i> |
| 70 | <?php echo esc_html( sprintf( __( 'Version %s', 'spider-elements' ), SPEL_VERSION ) ); ?> |
| 71 | </span> |
| 72 | <h2><?php esc_html_e( 'Welcome to Spider Elements', 'spider-elements' ); ?></h2> |
| 73 | <p><?php esc_html_e( 'The ultimate Elementor addon bundle packed with powerful widgets and features to create stunning websites effortlessly.', 'spider-elements' ); ?></p> |
| 74 | </div> |
| 75 | <img src="<?php echo esc_url( SPEL_IMG . '/dashboard/logo.png' ); ?>" alt="<?php esc_attr_e( 'Spider Elements Logo', 'spider-elements' ); ?>"> |
| 76 | </div> |
| 77 | |
| 78 | <!-- Quick Stats Section --> |
| 79 | <div class="quick_stats"> |
| 80 | <div class="stat_card stat_elements"> |
| 81 | <div class="stat_header"> |
| 82 | <span class="stat_icon"> |
| 83 | <i class="icon-element"></i> |
| 84 | </span> |
| 85 | <span class="stat_trend trend_info"> |
| 86 | <i class="icon-star"></i> <?php esc_html_e( 'Widgets', 'spider-elements' ); ?> |
| 87 | </span> |
| 88 | </div> |
| 89 | <div class="stat_value"><?php echo esc_html( $total_widgets ); ?></div> |
| 90 | <div class="stat_label"><?php esc_html_e( 'Total Widgets Available', 'spider-elements' ); ?></div> |
| 91 | </div> |
| 92 | |
| 93 | <div class="stat_card stat_active"> |
| 94 | <div class="stat_header"> |
| 95 | <span class="stat_icon"> |
| 96 | <i class="icon-check"></i> |
| 97 | </span> |
| 98 | <span class="stat_trend trend_up"> |
| 99 | <i class="icon-star"></i> <?php esc_html_e( 'Active', 'spider-elements' ); ?> |
| 100 | </span> |
| 101 | </div> |
| 102 | <div class="stat_value"><?php echo esc_html( $active_widgets ); ?></div> |
| 103 | <div class="stat_label"><?php esc_html_e( 'Active Widgets', 'spider-elements' ); ?></div> |
| 104 | </div> |
| 105 | |
| 106 | <div class="stat_card stat_features"> |
| 107 | <div class="stat_header"> |
| 108 | <span class="stat_icon"> |
| 109 | <i class="icon-feature_two"></i> |
| 110 | </span> |
| 111 | <span class="stat_trend trend_info"> |
| 112 | <i class="icon-star"></i> <?php esc_html_e( 'Features', 'spider-elements' ); ?> |
| 113 | </span> |
| 114 | </div> |
| 115 | <div class="stat_value"><?php echo esc_html( $total_features ); ?></div> |
| 116 | <div class="stat_label"><?php esc_html_e( 'Total Features', 'spider-elements' ); ?></div> |
| 117 | </div> |
| 118 | |
| 119 | <div class="stat_card stat_pro"> |
| 120 | <div class="stat_header"> |
| 121 | <span class="stat_icon"> |
| 122 | <i class="icon-premium"></i> |
| 123 | </span> |
| 124 | <span class="stat_trend trend_info"> |
| 125 | <i class="icon-diamond"></i> <?php esc_html_e( 'Pro', 'spider-elements' ); ?> |
| 126 | </span> |
| 127 | </div> |
| 128 | <div class="stat_value"><?php echo esc_html( $pro_widgets ); ?></div> |
| 129 | <div class="stat_label"><?php esc_html_e( 'Pro Widgets', 'spider-elements' ); ?></div> |
| 130 | </div> |
| 131 | </div> |
| 132 | |
| 133 | <!-- System Requirement Section --> |
| 134 | <div class="ezd-grid ezd-grid-cols-12"> |
| 135 | <div class="ezd-lg-col-12"> |
| 136 | <div class="support_item"> |
| 137 | <div class="section_header has_flex"> |
| 138 | <h2 class="dashboard_title"><?php esc_html_e( 'System Requirements', 'spider-elements' ); ?></h2> |
| 139 | <span class="requirement_status badge_success"> |
| 140 | <i class="icon-check"></i> |
| 141 | <?php esc_html_e( 'All Good', 'spider-elements' ); ?> |
| 142 | </span> |
| 143 | </div> |
| 144 | <div class="ezd-grid ezd-grid-cols-12"> |
| 145 | |
| 146 | <ul class="list-unstyled requirement_list ezd-lg-col-6"> |
| 147 | <li> |
| 148 | <strong><?php esc_html_e( 'PHP Version:', 'spider-elements' ); ?></strong> |
| 149 | <?php |
| 150 | if ( version_compare( $php_version, '7.4', '<' ) ) { |
| 151 | echo '<span title="' . esc_attr__( 'Minimum: 7.4 Recommended', 'spider-elements' ) . '">' |
| 152 | . wp_kses_post( $close_icon ) . esc_html__( 'Currently:', 'spider-elements' ) . ' ' . esc_html( $php_version ) . '</span>'; |
| 153 | } else { |
| 154 | echo '<span>' . wp_kses_post( $check_icon ) . esc_html__( 'Currently:', 'spider-elements' ) . ' ' . esc_html( $php_version ) . '</span>'; |
| 155 | } |
| 156 | ?> |
| 157 | </li> |
| 158 | <li> |
| 159 | <strong><?php esc_html_e( 'Memory Limit:', 'spider-elements' ); ?></strong> |
| 160 | <?php |
| 161 | if ( intval( $memory_limit ) < 512 ) { |
| 162 | echo '<span title="' . esc_attr__( 'Minimum 512M Recommended', 'spider-elements' ) . '">' |
| 163 | . wp_kses_post( $close_icon ) . esc_html__( 'Currently:', 'spider-elements' ) . ' ' . esc_html( $memory_limit ) . '</span>'; |
| 164 | } else { |
| 165 | echo '<span>' . wp_kses_post( $check_icon ) . esc_html__( 'Currently:', 'spider-elements' ) . ' ' . esc_html( $memory_limit ) . '</span>'; |
| 166 | } |
| 167 | ?> |
| 168 | </li> |
| 169 | <li> |
| 170 | <strong><?php esc_html_e( 'Uploads Folder Writable:', 'spider-elements' ); ?></strong> |
| 171 | <?php |
| 172 | if ( ! is_writable( $upload_path ) ) { |
| 173 | echo wp_kses_post( $close_icon ); |
| 174 | } else { |
| 175 | echo wp_kses_post( $check_icon ); |
| 176 | } |
| 177 | ?> |
| 178 | </li> |
| 179 | <li> |
| 180 | <strong><?php esc_html_e( 'GZip Enabled:', 'spider-elements' ); ?></strong> |
| 181 | <?php |
| 182 | if ( $environment['gzip_enabled'] ) { |
| 183 | echo wp_kses_post( $check_icon ); |
| 184 | } else { |
| 185 | echo wp_kses_post( $close_icon ); |
| 186 | } |
| 187 | ?> |
| 188 | </li> |
| 189 | </ul> |
| 190 | |
| 191 | <ul class="list-unstyled requirement_list ezd-lg-col-6"> |
| 192 | <li> |
| 193 | <strong><?php esc_html_e( 'Max Execution Time:', 'spider-elements' ); ?></strong> |
| 194 | <?php |
| 195 | if ( intval( $max_execution_time ) < 90 ) { |
| 196 | echo '<span title="' . esc_attr__( 'Minimum 90 Recommended', 'spider-elements' ) . '">' |
| 197 | . wp_kses_post( $close_icon ) . esc_html__( 'Currently:', 'spider-elements' ) . ' ' . esc_html( $max_execution_time ) . '</span>'; |
| 198 | } else { |
| 199 | echo '<span>' . wp_kses_post( $check_icon ) . esc_html__( 'Currently:', 'spider-elements' ) . ' ' . esc_html( $max_execution_time ) . '</span>'; |
| 200 | } |
| 201 | ?> |
| 202 | </li> |
| 203 | <li> |
| 204 | <strong><?php esc_html_e( 'Max Post Limit:', 'spider-elements' ); ?></strong> |
| 205 | <?php |
| 206 | if ( intval( $post_limit ) < 32 ) { |
| 207 | echo '<span title="' . esc_attr__( 'Minimum 32M Recommended', 'spider-elements' ) . '">' |
| 208 | . wp_kses_post( $close_icon ) . esc_html__( 'Currently:', 'spider-elements' ) . ' ' . esc_html( $post_limit ) . '</span>'; |
| 209 | } else { |
| 210 | echo '<span>' . wp_kses_post( $check_icon ) . esc_html__( 'Currently:', 'spider-elements' ) . ' ' . esc_html( $post_limit ) . '</span>'; |
| 211 | } |
| 212 | ?> |
| 213 | </li> |
| 214 | <li> |
| 215 | <strong><?php esc_html_e( 'Multisite:', 'spider-elements' ); ?></strong> |
| 216 | <?php |
| 217 | if ( $environment['wp_multisite'] ) { |
| 218 | echo '<span>' . wp_kses_post( $check_icon ) . esc_html__( 'Multisite', 'spider-elements' ) . '</span>'; |
| 219 | } else { |
| 220 | echo '<span>' . wp_kses_post( $close_icon ) . esc_html__( 'No Multisite', 'spider-elements' ) . '</span>'; |
| 221 | } |
| 222 | ?> |
| 223 | </li> |
| 224 | <li> |
| 225 | <strong><?php esc_html_e( 'Debug Mode:', 'spider-elements' ); ?></strong> |
| 226 | <?php |
| 227 | if ( $environment['wp_debug_mode'] ) { |
| 228 | echo '<span>' . wp_kses_post( $check_icon ) . esc_html__( 'Currently Turned On', 'spider-elements' ) . '</span>'; |
| 229 | } else { |
| 230 | echo '<span>' . wp_kses_post( $close_icon ) . esc_html__( 'Currently Turned Off', 'spider-elements' ) . '</span>'; |
| 231 | } |
| 232 | ?> |
| 233 | </li> |
| 234 | </ul> |
| 235 | </div> |
| 236 | |
| 237 | <div class="note"> |
| 238 | <i class="dashicons dashicons-info-outline"></i> |
| 239 | <p> |
| 240 | <?php |
| 241 | printf( |
| 242 | /* translators: %1$s and %2$s are opening and closing strong HTML tags. */ |
| 243 | esc_html__( |
| 244 | 'Note: If you have multiple addons like %1$s Spider Elements %2$s, you may need more resources. Ensure you allocate more memory for other addons as well.', |
| 245 | 'spider-elements' |
| 246 | ), |
| 247 | '<strong>', |
| 248 | '</strong>' |
| 249 | ); |
| 250 | ?> |
| 251 | </p> |
| 252 | </div> |
| 253 | </div> |
| 254 | </div> |
| 255 | </div> |
| 256 | |
| 257 | <!-- Quick Links Section --> |
| 258 | <div class="ezd-grid ezd-grid-cols-12 quick_links_grid"> |
| 259 | <div class="ezd-lg-col-6"> |
| 260 | <div class="support_item"> |
| 261 | <span class="icon icon-documentation"></span> |
| 262 | <h2 class="dashboard_title"><?php esc_html_e( 'Documentation', 'spider-elements' ); ?></h2> |
| 263 | <p><?php esc_html_e( 'Get detailed and guided instruction to level up your website with the necessary set up.', 'spider-elements' ); ?></p> |
| 264 | <a href="https://helpdesk.spider-themes.net/docs/spider-elements" class="dashboard_btn" target="_blank"> |
| 265 | <i class="icon-document"></i> |
| 266 | <?php esc_html_e( 'Read Documentation', 'spider-elements' ); ?> |
| 267 | </a> |
| 268 | </div> |
| 269 | </div> |
| 270 | <div class="ezd-lg-col-6"> |
| 271 | <div class="support_item"> |
| 272 | <span class="icon icon-help"></span> |
| 273 | <h2 class="dashboard_title"><?php esc_html_e( 'Need Help?', 'spider-elements' ); ?></h2> |
| 274 | <p><?php esc_html_e( 'If you are stuck at anything while using our product, reach out to us immediately!', 'spider-elements' ); ?></p> |
| 275 | <a href="https://wordpress.org/support/plugin/spider-elements/" class="dashboard_btn" target="_blank"> |
| 276 | <i class="icon-bubble"></i> |
| 277 | <?php esc_html_e( 'Get Priority Support', 'spider-elements' ); ?> |
| 278 | </a> |
| 279 | </div> |
| 280 | </div> |
| 281 | <div class="ezd-lg-col-6"> |
| 282 | <div class="support_item"> |
| 283 | <span class="icon icon-love"></span> |
| 284 | <h2 class="dashboard_title"><?php esc_html_e( 'Love Spider Elements?', 'spider-elements' ); ?></h2> |
| 285 | <p><?php echo esc_html__( 'Leave your feedback to help us out if you liked our product and customer service.', 'spider-elements' ); ?></p> |
| 286 | <a href="https://wordpress.org/support/plugin/spider-elements/reviews/#new-post" class="dashboard_btn" target="_blank"> |
| 287 | <i class="icon-star"></i> |
| 288 | <?php esc_html_e( 'Leave a Review', 'spider-elements' ); ?> |
| 289 | </a> |
| 290 | </div> |
| 291 | </div> |
| 292 | <div class="ezd-lg-col-6"> |
| 293 | <div class="support_item"> |
| 294 | <span class="icon icon-debug"></span> |
| 295 | <h2 class="dashboard_title"> <?php esc_html_e( 'Found a Bug?', 'spider-elements' ); ?> </h2> |
| 296 | <p> <?php echo esc_html__( "Think you've spotted a bug? Please let us know! Your feedback helps us make improvements.", 'spider-elements' ); ?> </p> |
| 297 | <a href="https://github.com/spider-themes/spider-elements/issues/new" class="dashboard_btn" target="_blank"> |
| 298 | <i class="icon-github"></i> |
| 299 | <?php esc_html_e( 'Report on GitHub', 'spider-elements' ); ?> |
| 300 | </a> |
| 301 | </div> |
| 302 | </div> |
| 303 | </div> |
| 304 | |
| 305 | </div> |