| 1 |
<?php |
| 2 |
namespace Easyel\EasyElements\Admin; |
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
class Admin_Settings { |
| 8 |
|
| 9 |
// Singleton instance |
| 10 |
private static $instance = null; |
| 11 |
|
| 12 |
private function __construct() { |
| 13 |
// Hooks |
| 14 |
|
| 15 |
// Custom Font Load Free |
| 16 |
|
| 17 |
add_action( 'admin_menu', array( $this, 'easyel_elements_settings_menu' ) ); |
| 18 |
add_action( 'admin_menu', array( $this, 'easyel_elements_settings_menu2' ) ,999 ); |
| 19 |
add_action( 'admin_enqueue_scripts', array( $this, 'easyel_enqueue_upgrade_menu_assets' ) ); |
| 20 |
add_action( 'admin_init', array( $this, 'easyel_elements_register_settings' ) ); |
| 21 |
|
| 22 |
add_action( 'easyel_smooth_scroller_popup', array( $this, 'easyel_smooth_scroller_popup_callback' ), 5 ); |
| 23 |
add_action( 'easyel_reading_progress_bar_popup', array( $this, 'easyel_reading_progressbar_popup_callback' ), 6 ); |
| 24 |
add_action( 'easyel_scroll_top_popup', array( $this, 'easyel_scroll_top_popup_callback' ), 7 ); |
| 25 |
add_action( 'easyel_preloader_popup', array( $this, 'easyel_preloader_popup_callback' ), 8 ); |
| 26 |
|
| 27 |
add_action( "admin_footer", array( $this,"easyel_settings_toggle_popup_modal" ) ); |
| 28 |
|
| 29 |
$this->easyel_settings_ajax(); |
| 30 |
|
| 31 |
} |
| 32 |
|
| 33 |
public function easyel_settings_ajax( ) { |
| 34 |
|
| 35 |
// AJAX handler for saving minify js option |
| 36 |
|
| 37 |
add_action('wp_ajax_easy_elements_save_widget_setting', array( $this, "easy_elements_save_widget_setting" ) ); |
| 38 |
add_action('wp_ajax_easy_elements_bulk_action', array( $this, 'easy_elements_bulk_action') ); |
| 39 |
|
| 40 |
add_action('wp_ajax_easy_elements_save_global_extensions', array( $this, 'easy_elements_save_global_extensions') ) ; |
| 41 |
add_action('wp_ajax_easy_elements_save_global_extensions_bulk', array( $this, 'easy_elements_save_global_extensions_bulk') ) ; |
| 42 |
|
| 43 |
add_action('wp_ajax_easy_elements_bulk_group_action', [$this, 'easy_elements_bulk_group_action']); |
| 44 |
|
| 45 |
add_action('admin_enqueue_scripts', array( $this, 'easyel_elements_enqueue_admin_assets') ); |
| 46 |
add_action( 'admin_head', array( $this, 'easyel_hide_admin_notices' ) ); |
| 47 |
|
| 48 |
add_action('wp_ajax_easyel_save_user_data', array( $this, 'easyel_save_user_data_callback') ); |
| 49 |
|
| 50 |
add_action('wp_ajax_save_smooth_scroll_settings', array( $this, 'save_smooth_scroll_settings')); |
| 51 |
add_action('wp_ajax_nopriv_save_smooth_scroll_settings', array( $this, 'save_smooth_scroll_settings') ); |
| 52 |
|
| 53 |
add_action('wp_ajax_save_reading_progressbar_settings', array( $this, 'save_reading_progressbar_settings')); |
| 54 |
add_action('wp_ajax_nopriv_save_reading_progressbar_settings', array( $this, 'save_reading_progressbar_settings') ); |
| 55 |
|
| 56 |
add_action('wp_ajax_save_scroll_top_settings', array( $this, 'save_scroll_top_settings')); |
| 57 |
add_action('wp_ajax_nopriv_save_scroll_top_settings', array( $this, 'save_scroll_top_settings') ); |
| 58 |
|
| 59 |
add_action('wp_ajax_easyel_save_preloader_settings', array( $this, 'easyel_save_preloader_settings' ) ); |
| 60 |
|
| 61 |
} |
| 62 |
|
| 63 |
// Singleton get_instance |
| 64 |
public static function get_instance() { |
| 65 |
if (self::$instance === null) { |
| 66 |
self::$instance = new self(); |
| 67 |
} |
| 68 |
return self::$instance; |
| 69 |
} |
| 70 |
|
| 71 |
public function easyel_save_user_data_callback() { |
| 72 |
|
| 73 |
if ( ! current_user_can( 'manage_options' ) ) { |
| 74 |
wp_send_json_error( ['msg' => 'Unauthorized'], 403 ); |
| 75 |
} |
| 76 |
|
| 77 |
check_ajax_referer('easy_elements_nonce', 'security'); |
| 78 |
|
| 79 |
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 80 |
$posted = $_POST['settings'] ?? []; |
| 81 |
$settings = map_deep( wp_unslash( $posted ), 'sanitize_text_field' ); |
| 82 |
|
| 83 |
update_option( 'easy_element_user_data', $settings ); |
| 84 |
|
| 85 |
wp_send_json_success(['message' => 'Saved successfully!']); |
| 86 |
} |
| 87 |
|
| 88 |
public function easyel_elements_settings_menu() { |
| 89 |
|
| 90 |
// Main Menu |
| 91 |
add_menu_page( |
| 92 |
__('Easy Elements', 'easy-elements'), |
| 93 |
__('Easy Elements', 'easy-elements'), |
| 94 |
'manage_options', |
| 95 |
'easy-elements-dashboard', |
| 96 |
array( $this, 'easyel_elements_settings_callback' ), |
| 97 |
'dashicons-admin-generic', |
| 98 |
59 |
| 99 |
); |
| 100 |
|
| 101 |
global $submenu; |
| 102 |
|
| 103 |
// Main slug |
| 104 |
$slug = 'easy-elements-dashboard'; |
| 105 |
|
| 106 |
$submenu[$slug][] = [ __('Overview', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#overview' ]; |
| 107 |
$submenu[$slug][] = [ __('Widgets', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#widget' ]; |
| 108 |
$submenu[$slug][] = [ __('All Extensions', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#extensions' ]; |
| 109 |
|
| 110 |
if ( ! function_exists( 'is_plugin_active' ) ) { |
| 111 |
require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 112 |
} |
| 113 |
if ( did_action( 'elementor/loaded' ) || is_plugin_active( 'elementor/elementor.php' ) ) { |
| 114 |
add_submenu_page( |
| 115 |
'easy-elements-dashboard', |
| 116 |
__('Header & Footer', 'easy-elements'), |
| 117 |
__('Header & Footer', 'easy-elements'), |
| 118 |
'manage_options', |
| 119 |
'edit.php?post_type=ee-elementor-hf' |
| 120 |
); |
| 121 |
} |
| 122 |
|
| 123 |
// Upload Custom Fonts Submenu |
| 124 |
add_submenu_page( |
| 125 |
'easy-elements-dashboard', |
| 126 |
__('Upload Custom Fonts', 'easy-elements'), |
| 127 |
__('Upload Custom Fonts', 'easy-elements'), |
| 128 |
'manage_options', |
| 129 |
'easyel-custom-fonts', |
| 130 |
array( $this, 'easyel_custom_fonts_page_html' ) |
| 131 |
); |
| 132 |
|
| 133 |
// Off Canvas Submenu |
| 134 |
add_submenu_page( |
| 135 |
'easy-elements-dashboard', |
| 136 |
__('Off Canvas', 'easy-elements'), |
| 137 |
__('Off Canvas', 'easy-elements'), |
| 138 |
'manage_options', |
| 139 |
'edit.php?post_type=easy-offcanvas' |
| 140 |
); |
| 141 |
|
| 142 |
$flush_needed = get_option( 'easyel_flush_rewrite_rules', true ); |
| 143 |
|
| 144 |
if ( $flush_needed ) { |
| 145 |
flush_rewrite_rules(); // Flush permalink |
| 146 |
update_option( 'easyel_flush_rewrite_rules', false ); // Mark as flushed |
| 147 |
} |
| 148 |
|
| 149 |
|
| 150 |
} |
| 151 |
|
| 152 |
public function easyel_settings_toggle_popup_modal( ) { ?> |
| 153 |
|
| 154 |
<div id="easyel-admin-toggle-pro-upgrade-modal" class="easyel-admin-toggle-pro-modal" style="display:none;"> |
| 155 |
<div class="easyel-admin-toggle-pro-modal-overlay"></div> |
| 156 |
|
| 157 |
<div class="easyel-admin-toggle-pro-modal-content"> |
| 158 |
<button class="easyel-admin-toggle-pro-modal-close">×</button> |
| 159 |
|
| 160 |
<span class="easyel-admin-toggle-pro-badge">PRO</span> |
| 161 |
|
| 162 |
<h2>Unlock the PRO Features 🚀</h2> |
| 163 |
|
| 164 |
<p> |
| 165 |
This widget is available in <strong>Easy Elements Pro</strong>. |
| 166 |
Upgrade now to unlock advanced widgets, premium features, and priority support. |
| 167 |
</p> |
| 168 |
|
| 169 |
<ul class="easyel-admin-toggle-pro-feature-list"> |
| 170 |
<li> ✔ Advanced Elementor Widgets </li> |
| 171 |
<li> ✔ Premium Effects & Controls </li> |
| 172 |
<li> ✔ Faster Performance </li> |
| 173 |
<li> ✔ Priority Support </li> |
| 174 |
</ul> |
| 175 |
|
| 176 |
<div class="easyel-admin-toggle-pro-actions"> |
| 177 |
<a href="https://wpeasyelements.com/pricing/" |
| 178 |
target="_blank" |
| 179 |
class="easyel-admin-toggle-pro-upgrade-btn"> |
| 180 |
Upgrade to Pro |
| 181 |
</a> |
| 182 |
|
| 183 |
<button class="easyel-admin-toggle-pro-modal-cancel"> |
| 184 |
Maybe Later |
| 185 |
</button> |
| 186 |
</div> |
| 187 |
</div> |
| 188 |
</div> |
| 189 |
|
| 190 |
|
| 191 |
<?php } |
| 192 |
|
| 193 |
public function easyel_elements_settings_menu2() { |
| 194 |
|
| 195 |
global $submenu; |
| 196 |
|
| 197 |
// Main slug |
| 198 |
$slug = 'easy-elements-dashboard'; |
| 199 |
|
| 200 |
if ( 'valid' !== easyel_get_license_status() ) { |
| 201 |
|
| 202 |
$submenu[ $slug ][] = [ |
| 203 |
__( 'Upgrade to Pro', 'easy-elements' ), |
| 204 |
'manage_options', |
| 205 |
'https://wpeasyelements.com/pricing/', |
| 206 |
'', |
| 207 |
'', |
| 208 |
]; |
| 209 |
} |
| 210 |
} |
| 211 |
|
| 212 |
public function easyel_enqueue_upgrade_menu_assets() { |
| 213 |
|
| 214 |
if ( 'valid' === easyel_get_license_status() ) { |
| 215 |
return; |
| 216 |
} |
| 217 |
|
| 218 |
wp_enqueue_style( |
| 219 |
'easy-elements-upgrade-menu', |
| 220 |
EASYELEMENTS_DIR_URL . 'assets/css/admin/upgrade-menu.css', |
| 221 |
array(), |
| 222 |
EASYELEMENTS_VER |
| 223 |
); |
| 224 |
|
| 225 |
wp_enqueue_script( |
| 226 |
'easy-elements-upgrade-menu', |
| 227 |
EASYELEMENTS_DIR_URL . 'assets/js/admin-upgrade-menu.js', |
| 228 |
array( 'jquery' ), |
| 229 |
EASYELEMENTS_VER, |
| 230 |
true |
| 231 |
); |
| 232 |
} |
| 233 |
|
| 234 |
public function easyel_elements_register_settings() { |
| 235 |
register_setting( 'easyel_elements_extensions_group', 'easyel_enable_js_animation', [ |
| 236 |
'sanitize_callback' => 'absint', |
| 237 |
'default' => 0, |
| 238 |
] ); |
| 239 |
|
| 240 |
// Cursor setting register |
| 241 |
register_setting( 'easyel_elements_extensions_group', 'easyel_enable_cursor', [ |
| 242 |
'sanitize_callback' => 'absint', |
| 243 |
'default' => 0, |
| 244 |
] ); |
| 245 |
} |
| 246 |
|
| 247 |
public function easy_elements_bulk_group_action() { |
| 248 |
|
| 249 |
if (!current_user_can('manage_options')) { |
| 250 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 251 |
} |
| 252 |
|
| 253 |
check_ajax_referer('easy_elements_bulk_action_nonce', 'nonce'); |
| 254 |
|
| 255 |
$group = isset($_POST['group']) ? sanitize_text_field(wp_unslash($_POST['group'])) : ''; |
| 256 |
$tab = isset($_POST['tab']) ? sanitize_text_field(wp_unslash($_POST['tab'])) : 'widget'; |
| 257 |
$status = isset($_POST['status']) && $_POST['status'] == 1 ? '1' : '0'; |
| 258 |
|
| 259 |
$available_elements = $this->easyel_elements_get_available_widgets(); |
| 260 |
$updated_count = 0; |
| 261 |
|
| 262 |
$is_pro_active = easyel_premium_addon_active(); |
| 263 |
|
| 264 |
foreach ($available_elements as $key => $widget) { |
| 265 |
|
| 266 |
if (!isset($widget['tab']) || $widget['tab'] !== $tab) { |
| 267 |
continue; |
| 268 |
} |
| 269 |
|
| 270 |
$group_slug = strtolower(trim($group)); |
| 271 |
|
| 272 |
$widget_group = isset( $widget['group'] ) ? $widget['group'] : 'General Widgets'; |
| 273 |
|
| 274 |
$widget_group_slug = strtolower(trim(str_replace(' ', '-', $widget_group ) ) ); |
| 275 |
|
| 276 |
if ($widget_group_slug !== $group_slug) { |
| 277 |
continue; |
| 278 |
} |
| 279 |
|
| 280 |
$option_name = 'easy_element_' . $tab . '_' . $key; |
| 281 |
|
| 282 |
if (!$is_pro_active && isset($widget['is_pro']) && $widget['is_pro']) { |
| 283 |
update_option($option_name, '0'); |
| 284 |
} else { |
| 285 |
update_option($option_name, $status); |
| 286 |
} |
| 287 |
|
| 288 |
$updated_count++; |
| 289 |
} |
| 290 |
|
| 291 |
wp_send_json_success([ |
| 292 |
'message' => sprintf('%d widgets %s successfully', $updated_count, $status ? 'activated' : 'deactivated'), |
| 293 |
'count' => $updated_count, |
| 294 |
'is_pro_active' => $is_pro_active, |
| 295 |
'status' => $status |
| 296 |
]); |
| 297 |
} |
| 298 |
|
| 299 |
public function easy_elements_save_global_extensions_bulk() { |
| 300 |
if ( ! current_user_can( 'manage_options' ) ) { |
| 301 |
wp_send_json_error( __( 'Unauthorized', 'easy-elements' ) ); |
| 302 |
} |
| 303 |
|
| 304 |
check_ajax_referer( 'easy_elements_widget_settings_nonce', 'nonce' ); |
| 305 |
|
| 306 |
$tab = isset( $_POST['tab'] ) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'extensions'; |
| 307 |
$keys = isset( $_POST['keys'] ) ? array_map( 'sanitize_text_field', (array) wp_unslash( $_POST['keys'] ) ) : []; |
| 308 |
$status = isset( $_POST['status'] ) ? intval( wp_unslash( $_POST['status'] ) ) : 0; |
| 309 |
$group_slug = isset( $_POST['group'] ) ? sanitize_text_field( wp_unslash( $_POST['group'] ) ) : ''; |
| 310 |
|
| 311 |
if ( empty( $keys ) ) { |
| 312 |
wp_send_json_error( [ 'message' => __( 'No keys provided', 'easy-elements' ) ] ); |
| 313 |
} |
| 314 |
|
| 315 |
$settings = get_option( 'easy_element_' . $tab, [] ); |
| 316 |
|
| 317 |
foreach ( $keys as $key ) { |
| 318 |
$key = sanitize_text_field( $key ); |
| 319 |
$settings[ $key ] = $status; |
| 320 |
} |
| 321 |
|
| 322 |
update_option( 'easy_element_' . $tab, $settings ); |
| 323 |
|
| 324 |
if ( $group_slug ) { |
| 325 |
update_option( 'easy_element_group_' . $group_slug, $status ); |
| 326 |
} |
| 327 |
|
| 328 |
wp_send_json_success( [ 'message' => __( 'Bulk settings updated', 'easy-elements' ) ] ); |
| 329 |
} |
| 330 |
|
| 331 |
public function easy_elements_save_global_extensions() { |
| 332 |
if (!current_user_can('manage_options')) { |
| 333 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 334 |
} |
| 335 |
|
| 336 |
check_ajax_referer('easy_elements_widget_settings_nonce', 'nonce'); |
| 337 |
|
| 338 |
$tab = isset( $_POST['tab'] ) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'extensions'; |
| 339 |
$key = isset($_POST['key']) ? sanitize_text_field( wp_unslash( $_POST['key'] )) : ''; |
| 340 |
$status = isset( $_POST['status'] ) ? intval( wp_unslash( $_POST['status'] ) ) : 0; |
| 341 |
|
| 342 |
if (!$key) { |
| 343 |
wp_send_json_error(['message' => __('Invalid key', 'easy-elements')]); |
| 344 |
} |
| 345 |
|
| 346 |
if ( function_exists( 'easyel_get_extension_fields' ) ) { |
| 347 |
$extension_fields = easyel_get_extension_fields(); |
| 348 |
if ( |
| 349 |
isset( $extension_fields[ $key ] ) |
| 350 |
&& ! empty( $extension_fields[ $key ]['is_pro'] ) |
| 351 |
&& ! easyel_premium_addon_active() |
| 352 |
) { |
| 353 |
wp_send_json_error( [ |
| 354 |
'message' => '', |
| 355 |
'requires_addon' => true, |
| 356 |
] ); |
| 357 |
} |
| 358 |
} |
| 359 |
|
| 360 |
$settings = get_option('easy_element_' . $tab, []); |
| 361 |
$settings[$key] = $status; |
| 362 |
|
| 363 |
update_option('easy_element_' . $tab, $settings); |
| 364 |
|
| 365 |
wp_send_json_success(['message' => __('Settings updated', 'easy-elements')]); |
| 366 |
} |
| 367 |
|
| 368 |
|
| 369 |
// AJAX handler for saving individual widget settings |
| 370 |
|
| 371 |
public function easy_elements_save_widget_setting() { |
| 372 |
if (!current_user_can('manage_options')) { |
| 373 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 374 |
} |
| 375 |
check_ajax_referer('easy_elements_widget_settings_nonce', 'nonce'); |
| 376 |
|
| 377 |
$widget_key = isset($_POST['widget_key']) ? sanitize_text_field( wp_unslash($_POST['widget_key'] ) ) : ''; |
| 378 |
$status = isset($_POST['status']) && $_POST['status'] === '1' ? '1' : '0'; |
| 379 |
$tab_slug = isset($_POST['tab']) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'widget'; |
| 380 |
|
| 381 |
if ( empty( $widget_key ) ) { |
| 382 |
wp_send_json_error(['message' => __('Invalid widget key', 'easy-elements')]); |
| 383 |
} |
| 384 |
|
| 385 |
$available_elements = $this->easyel_elements_get_available_widgets(); |
| 386 |
if ( |
| 387 |
isset( $available_elements[ $widget_key ] ) |
| 388 |
&& ! empty( $available_elements[ $widget_key ]['is_pro'] ) |
| 389 |
&& ! easyel_premium_addon_active() |
| 390 |
) { |
| 391 |
wp_send_json_error( [ |
| 392 |
'message' => '', |
| 393 |
'requires_addon' => true, |
| 394 |
] ); |
| 395 |
} |
| 396 |
|
| 397 |
$option_name = 'easy_element_' . $tab_slug . '_' . $widget_key; |
| 398 |
update_option($option_name, $status); |
| 399 |
|
| 400 |
wp_send_json_success([ |
| 401 |
'message' => __('Widget setting updated successfully', 'easy-elements'), |
| 402 |
'status' => $status, |
| 403 |
]); |
| 404 |
} |
| 405 |
|
| 406 |
// AJAX handler for bulk actions |
| 407 |
public function easy_elements_bulk_action() { |
| 408 |
if (!current_user_can('manage_options')) { |
| 409 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 410 |
} |
| 411 |
check_ajax_referer('easy_elements_bulk_action_nonce', 'nonce'); |
| 412 |
|
| 413 |
$bulk_action = isset($_POST['bulk_action']) ? sanitize_text_field(wp_unslash($_POST['bulk_action'])) : ''; |
| 414 |
$tab = isset($_POST['tab']) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'widget'; |
| 415 |
$status = $bulk_action === 'activate_all' ? '1' : '0'; |
| 416 |
|
| 417 |
$available_elements = $this->easyel_elements_get_available_widgets(); |
| 418 |
$updated_count = 0; |
| 419 |
|
| 420 |
$is_pro_active = easyel_premium_addon_active(); |
| 421 |
|
| 422 |
foreach ($available_elements as $key => $widget) { |
| 423 |
if (isset($widget['tab']) && $widget['tab'] === $tab) { |
| 424 |
$option_name = 'easy_element_' . $tab . '_' . $key; |
| 425 |
|
| 426 |
if (!$is_pro_active && isset($widget['is_pro']) && $widget['is_pro']) { |
| 427 |
update_option($option_name, '0'); |
| 428 |
} else { |
| 429 |
$status = $bulk_action === 'activate_all' ? '1' : '0'; |
| 430 |
update_option($option_name, $status); |
| 431 |
} |
| 432 |
} |
| 433 |
} |
| 434 |
|
| 435 |
wp_send_json_success([ |
| 436 |
'message' => sprintf('%d widgets %s successfully', $updated_count, $status ? 'activated' : 'deactivated'), |
| 437 |
'count' => $updated_count, |
| 438 |
'is_pro_active' => $is_pro_active |
| 439 |
]); |
| 440 |
} |
| 441 |
|
| 442 |
|
| 443 |
public function easyel_elements_settings_callback() { |
| 444 |
$available_elements = $this->easyel_elements_get_available_widgets(); |
| 445 |
|
| 446 |
$easyel_tabs = [ |
| 447 |
'overview' => __('Overview', 'easy-elements'), |
| 448 |
'widget' => __('All Widgets', 'easy-elements'), |
| 449 |
'extensions' => __('All Extensions', 'easy-elements'), |
| 450 |
'advsettings' => __('Advanced Settings', 'easy-elements'), |
| 451 |
'userData' => __('API Settings', 'easy-elements'), |
| 452 |
]; |
| 453 |
|
| 454 |
// Extensions (e.g. the companion Pro plugin) can append tabs here. |
| 455 |
$easyel_tabs = (array) apply_filters( 'easyel_all_tab_list', $easyel_tabs ); |
| 456 |
|
| 457 |
?> |
| 458 |
<div class="easyel-plugin-main-settings-page"> |
| 459 |
<div class="easyel-saving-indicator"> |
| 460 |
Saving... |
| 461 |
</div> |
| 462 |
<div class="easyel-overview-header"> |
| 463 |
<img src="<?php echo esc_url( EASYELEMENTS_DIR_URL . 'includes/Admin/img/easy-logo.png' ); ?>" alt="<?php echo esc_attr( 'logo' ); ?>"> |
| 464 |
|
| 465 |
</div> |
| 466 |
<div class=" easyel-plugin-settings-wrapper"> |
| 467 |
<div class="easyel-nav-tab-item"> |
| 468 |
<div class="easyel-nav-tab-wrapper easyel-border-radius-20"> |
| 469 |
<a href="#overview" class="easyel-nav-tab easyel-nav-tab-active" data-tab="overview"><i class="easyelIcon-home"></i> <?php esc_html_e ('Overview','easy-elements'); ?></a> |
| 470 |
<a href="#widget" class="easyel-nav-tab" data-tab="widget"><i class="easyelIcon-widgets"></i><?php esc_html_e('All Widgets','easy-elements'); ?></a> |
| 471 |
<a href="#extensions" class="easyel-nav-tab" data-tab="extensions"><i class="easyelIcon-extension"></i><?php esc_html_e('All Extensions','easy-elements'); ?></a> |
| 472 |
<a href="#userData" class="easyel-nav-tab" data-tab="userData"><i class="easyelIcon-setting"></i><?php esc_html_e('API Settings','easy-elements'); ?></a> |
| 473 |
<?php |
| 474 |
|
| 475 |
if ( ! function_exists( 'is_plugin_active' ) ) { |
| 476 |
require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 477 |
} |
| 478 |
$easyel_elementor_active = did_action( 'elementor/loaded' ) || is_plugin_active( 'elementor/elementor.php' ); |
| 479 |
if ( $easyel_elementor_active ) : ?> |
| 480 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=starter-templates-dashboard' ) ); ?>" class="easyel-nav-tab"><i class="easyelIcon-monitor"></i><?php esc_html_e('Starter Templates','easy-elements'); ?></a> |
| 481 |
<?php endif; ?> |
| 482 |
<?php |
| 483 |
/** |
| 484 |
* Render extra nav-tab links. |
| 485 |
* |
| 486 |
* Free plugin renders nothing; the companion Pro plugin |
| 487 |
* hooks in to draw its Activate License tab link. |
| 488 |
*/ |
| 489 |
do_action( 'easyel_render_settings_extra_tabs' ); |
| 490 |
?> |
| 491 |
<div class="easyel-tab-pro-link"> |
| 492 |
<a href="https://wpeasyelements.com/pricing/" class="easyel-nav-tab-pro" target="_blank"> |
| 493 |
<i class="easyelIcon-crown"></i> |
| 494 |
<?php esc_html_e('Go Premium','easy-elements'); ?> |
| 495 |
</a> |
| 496 |
</div> |
| 497 |
</div> |
| 498 |
</div> |
| 499 |
<!-- Status Messages --> |
| 500 |
<div id="bulk-action-message" class="notice" style="display: none;"></div> |
| 501 |
|
| 502 |
<!-- Tab Content --> |
| 503 |
<div id="easyel-tab-content"> |
| 504 |
<?php foreach ( $easyel_tabs as $tab_slug => $tab_label ) : ?> |
| 505 |
<div id="tab-<?php echo esc_attr($tab_slug); ?>" |
| 506 |
class="easyel-tab-panel easyel-border-radius-20 <?php echo esc_attr($tab_slug); ?>" |
| 507 |
style="<?php echo $tab_slug === 'overview' ? '' : 'display:none;'; ?>"> |
| 508 |
|
| 509 |
<?php |
| 510 |
if ( $tab_slug === 'widget' ) : ?> |
| 511 |
<div class="easyel-addon-search easyel-dflex easyel-justify-between"> |
| 512 |
<div class="easyel-widget-filter"> |
| 513 |
<h1 class="easyel-dashboard-heading"><?php esc_html_e('Widgets','easy-elements');?></h1> |
| 514 |
<div class="easyel-widget-filter-button"> |
| 515 |
<button type="button" id="easyel_all" class="easyel-action-btn active" data-filter="easyel_all"><?php esc_html_e('All', 'easy-elements'); ?></button> |
| 516 |
<button type="button" id="easyel_free" class="easyel-action-btn" data-filter="easyel_free"><?php esc_html_e('Free', 'easy-elements'); ?></button> |
| 517 |
<button type="button" id="easyel_pro" class="easyel-action-btn" data-filter="easyel_pro"><?php esc_html_e('Pro', 'easy-elements'); ?></button> |
| 518 |
</div> |
| 519 |
</div> |
| 520 |
<div class="easyel-widget-search-enable"> |
| 521 |
<div class="easyel-widget-activeDeactivate-button"> |
| 522 |
<button type="button" id="activate-all-btn"><?php esc_html_e('Activate All', 'easy-elements'); ?></button> |
| 523 |
<button type="button" id="deactivate-all-btn"><?php esc_html_e('Deactivate All', 'easy-elements'); ?></button> |
| 524 |
</div> |
| 525 |
<?php if ( $tab_slug === 'widget' ) { ?> |
| 526 |
<input type="text" id="element-search" placeholder="<?php esc_attr_e('Search widgets...', 'easy-elements'); ?>"> |
| 527 |
<?php } ?> |
| 528 |
</div> |
| 529 |
</div> |
| 530 |
<?php endif; ?> |
| 531 |
<?php |
| 532 |
|
| 533 |
$tab_slug_safe = preg_replace( '/[^a-zA-Z0-9_-]/', '', (string) $tab_slug ); |
| 534 |
$tabs_root = realpath( EASYELEMENTS_DIR_PATH . 'includes/Admin/settingstab' ); |
| 535 |
$tab_target = ( '' !== $tab_slug_safe && false !== $tabs_root ) |
| 536 |
? realpath( $tabs_root . DIRECTORY_SEPARATOR . 'tab-' . $tab_slug_safe . '.php' ) |
| 537 |
: false; |
| 538 |
|
| 539 |
if ( false !== $tab_target |
| 540 |
&& false !== $tabs_root |
| 541 |
&& 0 === strpos( $tab_target, $tabs_root . DIRECTORY_SEPARATOR ) |
| 542 |
&& substr( $tab_target, -4 ) === '.php' |
| 543 |
) { |
| 544 |
include $tab_target; |
| 545 |
} |
| 546 |
|
| 547 |
if ( $tab_slug === 'activate_license' ) { |
| 548 |
/** |
| 549 |
* Render the Activate License panel. |
| 550 |
* |
| 551 |
* Free plugin renders nothing; the companion Pro plugin |
| 552 |
* hooks in to draw its own license UI. |
| 553 |
*/ |
| 554 |
do_action( 'easyel_render_license_page' ); |
| 555 |
} |
| 556 |
|
| 557 |
?> |
| 558 |
</div> |
| 559 |
<?php endforeach; ?> |
| 560 |
</div> |
| 561 |
|
| 562 |
</div> |
| 563 |
</div> |
| 564 |
|
| 565 |
<!-- JavaScript functionality is handled by admin.js --> |
| 566 |
<?php |
| 567 |
} |
| 568 |
|
| 569 |
////////****************** AJAX Toggle ******************************** |
| 570 |
|
| 571 |
public function easyel_elements_enqueue_admin_assets($hook) { |
| 572 |
|
| 573 |
wp_enqueue_style( 'wp-color-picker' ); |
| 574 |
wp_enqueue_script( 'wp-color-picker' ); |
| 575 |
|
| 576 |
wp_enqueue_script( |
| 577 |
'easy-elements-select2-js', |
| 578 |
EASYELEMENTS_DIR_URL . 'assets/js/select2.min.js', |
| 579 |
['jquery'], |
| 580 |
'1.0.0', |
| 581 |
true |
| 582 |
); |
| 583 |
if (strpos($hook, 'easy-elements') === false) { |
| 584 |
return; |
| 585 |
} |
| 586 |
|
| 587 |
wp_enqueue_media(); |
| 588 |
|
| 589 |
// Enqueue admin JavaScript |
| 590 |
wp_enqueue_script( |
| 591 |
'easy-elements-admin', |
| 592 |
EASYELEMENTS_DIR_URL . 'assets/js/admin.js', |
| 593 |
['jquery'], |
| 594 |
EASYELEMENTS_VER, |
| 595 |
true |
| 596 |
); |
| 597 |
|
| 598 |
|
| 599 |
|
| 600 |
|
| 601 |
|
| 602 |
// Localize script with all necessary data |
| 603 |
wp_localize_script('easy-elements-admin', 'easyElementsData', [ |
| 604 |
'ajaxurl' => admin_url('admin-ajax.php'), |
| 605 |
'nonce' => wp_create_nonce('easy_elements_nonce'), |
| 606 |
'widget_settings_nonce' => wp_create_nonce('easy_elements_widget_settings_nonce'), |
| 607 |
'bulk_action_nonce' => wp_create_nonce('easy_elements_bulk_action_nonce'), |
| 608 |
'advance_settings_nonce' => wp_create_nonce('easy_elements_save_advance_settings_nonce'), |
| 609 |
'js_animation_nonce' => wp_create_nonce('easyel_js_animation_nonce'), |
| 610 |
'strings' => [ |
| 611 |
'confirm_activate_all' => __('Are you sure you want to activate all widgets?', 'easy-elements'), |
| 612 |
'confirm_deactivate_all' => __('Are you sure you want to deactivate all widgets?', 'easy-elements'), |
| 613 |
'processing' => __('Processing...', 'easy-elements'), |
| 614 |
'saving' => __('Saving...', 'easy-elements'), |
| 615 |
'saved' => __('Saved!', 'easy-elements'), |
| 616 |
'error' => __('Error!', 'easy-elements'), |
| 617 |
'updated' => __('Updated!', 'easy-elements'), |
| 618 |
] |
| 619 |
]); |
| 620 |
} |
| 621 |
|
| 622 |
function easyel_elements_get_available_widgets() { |
| 623 |
$widgets = [ |
| 624 |
'heading' => [ |
| 625 |
'icon' => 'easyelIcon-heading', |
| 626 |
'title' => 'Heading', |
| 627 |
'description' => 'Add customizable headings with style options.', |
| 628 |
'demo_url' => 'https://wpeasyelements.com/heading/', |
| 629 |
'docx_url' => 'https://wpeasyelements.com/docs/heading/', |
| 630 |
'is_pro' => false, |
| 631 |
'tab' => 'widget', |
| 632 |
], |
| 633 |
'clients_logo' => [ |
| 634 |
'icon' => 'easyelIcon-clients-logo-grid', |
| 635 |
'title' => 'Clients Logo Grid', |
| 636 |
'description' => 'Showcase client logos in a neat grid layout.', |
| 637 |
'demo_url' => 'https://wpeasyelements.com/clients-logo-grid/', |
| 638 |
'docx_url' => 'https://wpeasyelements.com/docs/clients-logo-grid', |
| 639 |
'is_pro' => false, |
| 640 |
'tab' => 'widget', |
| 641 |
], |
| 642 |
'clients_logo_slider' => [ |
| 643 |
'icon' => 'easyelIcon-clients-logo-slider', |
| 644 |
'title' => 'Clients Logo Slider', |
| 645 |
'description' => 'Display client logos in a slider format.', |
| 646 |
'demo_url' => 'https://wpeasyelements.com/clients-logo-slider/', |
| 647 |
'docx_url' => 'https://wpeasyelements.com/docs/clients-logo-slider/', |
| 648 |
'is_pro' => true, |
| 649 |
'group' => 'Creative Widgets', |
| 650 |
'tab' => 'widget', |
| 651 |
], |
| 652 |
'simple_tab' => [ |
| 653 |
'icon' => 'easyelIcon-tab', |
| 654 |
'title' => 'Tab', |
| 655 |
'description' => 'Add simple tab content.', |
| 656 |
'demo_url' => 'https://wpeasyelements.com/tab', |
| 657 |
'docx_url' => 'https://wpeasyelements.com/docs/tab', |
| 658 |
'is_pro' => false, |
| 659 |
'tab' => 'widget', |
| 660 |
], |
| 661 |
'tab_advance' => [ |
| 662 |
'icon' => 'easyelIcon-tab', |
| 663 |
'title' => 'Advanced Tab', |
| 664 |
'description' => 'Create advanced tab content.', |
| 665 |
'demo_url' => 'https://wpeasyelements.com/advanced-tab/', |
| 666 |
'docx_url' => 'https://wpeasyelements.com/docs/advanced-tab/', |
| 667 |
'is_pro' => true, |
| 668 |
'tab' => 'widget', |
| 669 |
], |
| 670 |
'testimonials' => [ |
| 671 |
'icon' => 'easyelIcon-testimonials-grid', |
| 672 |
'title' => 'Testimonials Grid', |
| 673 |
'description' => 'Show testimonials in a grid format.', |
| 674 |
'demo_url' => 'https://wpeasyelements.com/testimonials-grid', |
| 675 |
'docx_url' => 'https://wpeasyelements.com/docs/testimonials-grid', |
| 676 |
'is_pro' => false, |
| 677 |
'tab' => 'widget', |
| 678 |
], |
| 679 |
'testimonials_slider' => [ |
| 680 |
'icon' => 'easyelIcon-testimonials-slider', |
| 681 |
'title' => 'Testimonials Slider', |
| 682 |
'description' => 'Display testimonials in a slider format.', |
| 683 |
'demo_url' => 'https://wpeasyelements.com/testimonials-slider/', |
| 684 |
'docx_url' => 'https://wpeasyelements.com/docs/testimonials-slider/', |
| 685 |
'is_pro' => true, |
| 686 |
'tab' => 'widget', |
| 687 |
], |
| 688 |
'image_carousel' => [ |
| 689 |
'icon' => 'easyelIcon-image-carousel', |
| 690 |
'title' => 'Image Carousel', |
| 691 |
'description' => 'Create an image slider with multiple images.', |
| 692 |
'demo_url' => 'https://wpeasyelements.com/image-carousel/', |
| 693 |
'docx_url' => 'https://wpeasyelements.com/docs/image-carousel', |
| 694 |
'is_pro' => true, |
| 695 |
'tab' => 'widget', |
| 696 |
], |
| 697 |
'image_reveal' => [ |
| 698 |
'icon' => 'easyelIcon-marquee-logo', |
| 699 |
'title' => 'Reveal Image', |
| 700 |
'description' => 'reveal Image Here', |
| 701 |
'demo_url' => 'https://wpeasyelements.com/reveal-image/', |
| 702 |
'docx_url' => 'https://wpeasyelements.com/docs/reveal-image/', |
| 703 |
'is_pro' => true, |
| 704 |
'tab' => 'widget', |
| 705 |
], |
| 706 |
'rotate_text' => [ |
| 707 |
'icon' => 'easyelIcon-heading', |
| 708 |
'title' => 'Rotate Text', |
| 709 |
'description' => 'rotate text here', |
| 710 |
'demo_url' => 'https://wpeasyelements.com/rotate-text/', |
| 711 |
'docx_url' => 'https://wpeasyelements.com/docs/rotate-text/', |
| 712 |
'is_pro' => true, |
| 713 |
'tab' => 'widget', |
| 714 |
], |
| 715 |
'icon_box' => [ |
| 716 |
'icon' => 'easyelIcon-iconbox', |
| 717 |
'title' => 'Info Box', |
| 718 |
'description' => 'Display content with an icon.', |
| 719 |
'demo_url' => 'https://wpeasyelements.com/info-box', |
| 720 |
'docx_url' => 'https://wpeasyelements.com/docs/info-box', |
| 721 |
'is_pro' => false, |
| 722 |
'tab' => 'widget', |
| 723 |
], |
| 724 |
'process_grid' => [ |
| 725 |
'icon' => 'easyelIcon-process-grid', |
| 726 |
'title' => 'Process Grid', |
| 727 |
'description' => 'Show process steps in a grid format.', |
| 728 |
'demo_url' => 'https://wpeasyelements.com/process-grid', |
| 729 |
'docx_url' => 'https://wpeasyelements.com/docs/process-grid', |
| 730 |
'is_pro' => false, |
| 731 |
'tab' => 'widget', |
| 732 |
], |
| 733 |
'process_slider' => [ |
| 734 |
'icon' => 'easyelIcon-process-slider', |
| 735 |
'title' => 'Process Slider', |
| 736 |
'description' => 'Show process steps in a slider.', |
| 737 |
'demo_url' => 'https://wpeasyelements.com/process-slider/', |
| 738 |
'docx_url' => 'https://wpeasyelements.com/docs/process-slider/', |
| 739 |
'is_pro' => true, |
| 740 |
'tab' => 'widget', |
| 741 |
], |
| 742 |
'team_grid' => [ |
| 743 |
'icon' => 'easyelIcon-team-grid', |
| 744 |
'title' => 'Team Grid', |
| 745 |
'description' => 'Display team members in a grid format.', |
| 746 |
'demo_url' => 'https://wpeasyelements.com/team-grid', |
| 747 |
'docx_url' => 'https://wpeasyelements.com/docs/team-grid', |
| 748 |
'is_pro' => false, |
| 749 |
'tab' => 'widget', |
| 750 |
], |
| 751 |
'team_slider' => [ |
| 752 |
'icon' => 'easyelIcon-team-slider', |
| 753 |
'title' => 'Team Slider', |
| 754 |
'description' => 'Showcase team members in a slider format.', |
| 755 |
'demo_url' => 'https://wpeasyelements.com/team-slider', |
| 756 |
'docx_url' => 'https://wpeasyelements.com/docs/team-slider', |
| 757 |
'is_pro' => true, |
| 758 |
'tab' => 'widget', |
| 759 |
], |
| 760 |
'image_comparison' => [ |
| 761 |
'icon' => 'easyelIcon-image-carousel', |
| 762 |
'title' => 'Image Comparison', |
| 763 |
'description' => 'Create an Image Comparison.', |
| 764 |
'demo_url' => 'https://wpeasyelements.com/image-comparison/', |
| 765 |
'docx_url' => 'https://wpeasyelements.com/docs/image-comparison/', |
| 766 |
'is_pro' => false, |
| 767 |
'tab' => 'widget', |
| 768 |
], |
| 769 |
'contact_box' => [ |
| 770 |
'icon' => 'easyelIcon-contact-box', |
| 771 |
'title' => 'Contact Box', |
| 772 |
'description' => 'Contact Box.', |
| 773 |
'demo_url' => 'https://wpeasyelements.com/contact-box', |
| 774 |
'docx_url' => 'https://wpeasyelements.com/docs/contact-box', |
| 775 |
'is_pro' => false, |
| 776 |
'tab' => 'widget', |
| 777 |
], |
| 778 |
'icon_box_slider' => [ |
| 779 |
'icon' => 'easyelIcon-icon-box-slider', |
| 780 |
'title' => 'Info Box Slider', |
| 781 |
'description' => 'Info Box Slider.', |
| 782 |
'demo_url' => 'https://wpeasyelements.com/info-box-slider/', |
| 783 |
'docx_url' => 'https://wpeasyelements.com/docs/info-box-slider/', |
| 784 |
'is_pro' => true, |
| 785 |
'tab' => 'widget', |
| 786 |
], |
| 787 |
'timeline_slider' => [ |
| 788 |
'icon' => 'easyelIcon-timeline-slider', |
| 789 |
'title' => 'Timeline Slider', |
| 790 |
'description' => 'Timeline Slider.', |
| 791 |
'demo_url' => 'https://wpeasyelements.com/timeline-slider/', |
| 792 |
'docx_url' => 'https://wpeasyelements.com/docs/timeline-slider', |
| 793 |
'is_pro' => true, |
| 794 |
'group' => 'Creative Widgets', |
| 795 |
'tab' => 'widget', |
| 796 |
], |
| 797 |
'faq' => [ |
| 798 |
'icon' => 'easyelIcon-faq-1', |
| 799 |
'title' => 'FAQ', |
| 800 |
'description' => 'FAQ.', |
| 801 |
'demo_url' => 'https://wpeasyelements.com/faq', |
| 802 |
'docx_url' => 'https://wpeasyelements.com/docs/faq', |
| 803 |
'is_pro' => false, |
| 804 |
'tab' => 'widget', |
| 805 |
], |
| 806 |
'blog_grid' => [ |
| 807 |
'icon' => 'easyelIcon-post-grid', |
| 808 |
'title' => 'Post Grid', |
| 809 |
'description' => 'Post.', |
| 810 |
'demo_url' => 'https://wpeasyelements.com/post-grid', |
| 811 |
'docx_url' => 'https://wpeasyelements.com/docs/post-grid', |
| 812 |
'is_pro' => false, |
| 813 |
'tab' => 'widget', |
| 814 |
], |
| 815 |
'post_slider' => [ |
| 816 |
'icon' => 'easyelIcon-post-slider', |
| 817 |
'title' => 'Post Slider', |
| 818 |
'description' => 'Post Slider.', |
| 819 |
'demo_url' => 'https://wpeasyelements.com/post-slider/', |
| 820 |
'docx_url' => 'https://wpeasyelements.com/docs/post-slider/', |
| 821 |
'is_pro' => true, |
| 822 |
'tab' => 'widget', |
| 823 |
], |
| 824 |
'post_list' => [ |
| 825 |
'icon' => 'easyelIcon-post-grid', |
| 826 |
'title' => 'Post List', |
| 827 |
'description' => 'Post List.', |
| 828 |
'demo_url' => 'https://wpeasyelements.com/post-list/', |
| 829 |
'docx_url' => 'https://wpeasyelements.com/docs/post-list/', |
| 830 |
'is_pro' => true, |
| 831 |
'tab' => 'widget', |
| 832 |
], |
| 833 |
'easy_cf7' => [ |
| 834 |
'icon' => 'easyelIcon-contact-form', |
| 835 |
'title' => 'Contact Form 7', |
| 836 |
'description' => 'Contact form 7.', |
| 837 |
'demo_url' => 'https://wpeasyelements.com/contact-form-7', |
| 838 |
'docx_url' => 'https://wpeasyelements.com/docs/contact-form-7', |
| 839 |
'is_pro' => false, |
| 840 |
'group' => 'Form Widgets', |
| 841 |
'tab' => 'widget', |
| 842 |
], |
| 843 |
'video' => [ |
| 844 |
'icon' => 'easyelIcon-video', |
| 845 |
'title' => 'Video', |
| 846 |
'description' => 'Video.', |
| 847 |
'demo_url' => 'https://wpeasyelements.com/video', |
| 848 |
'docx_url' => 'https://wpeasyelements.com/docs/video', |
| 849 |
'is_pro' => false, |
| 850 |
'tab' => 'widget', |
| 851 |
], |
| 852 |
'pricing_table' => [ |
| 853 |
'icon' => 'easyelIcon-pricing-table', |
| 854 |
'title' => 'Pricing Table', |
| 855 |
'description' => 'Pricing Table.', |
| 856 |
'demo_url' => 'https://wpeasyelements.com/pricing-table', |
| 857 |
'docx_url' => 'https://wpeasyelements.com/docs/pricing-table', |
| 858 |
'is_pro' => false, |
| 859 |
'group' => 'Marketing Widgets', |
| 860 |
'tab' => 'widget', |
| 861 |
], |
| 862 |
'pricing_list' => [ |
| 863 |
'icon' => 'easyelIcon-pricing-list', |
| 864 |
'title' => 'Pricing List', |
| 865 |
'description' => 'Pricing List.', |
| 866 |
'demo_url' => 'https://wpeasyelements.com/pricing-list/', |
| 867 |
'docx_url' => 'https://wpeasyelements.com/docs/pricing-list/', |
| 868 |
'is_pro' => true, |
| 869 |
'group' => 'Marketing Widgets', |
| 870 |
'tab' => 'widget', |
| 871 |
], |
| 872 |
'pricing_tab' => [ |
| 873 |
'icon' => 'easyelIcon-pricing-table', |
| 874 |
'title' => 'Pricing Tab', |
| 875 |
'description' => 'Pricing Tab.', |
| 876 |
'demo_url' => 'https://wpeasyelements.com/pricing-tab/', |
| 877 |
'docx_url' => 'https://wpeasyelements.com/docs/pricing-tab/', |
| 878 |
'is_pro' => true, |
| 879 |
'group' => 'Marketing Widgets', |
| 880 |
'tab' => 'widget', |
| 881 |
], |
| 882 |
'service_list' => [ |
| 883 |
'icon' => 'easyelIcon-service-list', |
| 884 |
'title' => 'Service List', |
| 885 |
'description' => 'Service List.', |
| 886 |
'demo_url' => 'https://wpeasyelements.com/service-list', |
| 887 |
'docx_url' => 'https://wpeasyelements.com/docs/service-list/', |
| 888 |
'is_pro' => false, |
| 889 |
'tab' => 'widget', |
| 890 |
], |
| 891 |
'advance_service' => [ |
| 892 |
'icon' => 'easyelIcon-service-list', |
| 893 |
'title' => 'Advance Service', |
| 894 |
'description' => 'Advance Service.', |
| 895 |
'demo_url' => 'https://wpeasyelements.com/advance-service', |
| 896 |
'docx_url' => 'https://wpeasyelements.com/docs/advance-service/', |
| 897 |
'is_pro' => true, |
| 898 |
'tab' => 'widget', |
| 899 |
], |
| 900 |
'service_card' => [ |
| 901 |
'icon' => 'easyelIcon-service-list', |
| 902 |
'title' => 'Service Card', |
| 903 |
'description' => 'Service Card.', |
| 904 |
'demo_url' => 'https://wpeasyelements.com/service-card', |
| 905 |
'docx_url' => 'https://wpeasyelements.com/docs/service-card/', |
| 906 |
'is_pro' => true, |
| 907 |
'tab' => 'widget', |
| 908 |
], |
| 909 |
'feature_list' => [ |
| 910 |
'icon' => 'easyelIcon-service-list', |
| 911 |
'title' => 'Feature List', |
| 912 |
'description' => 'Feature List.', |
| 913 |
'demo_url' => 'https://wpeasyelements.com/features-list', |
| 914 |
'docx_url' => 'https://wpeasyelements.com/docs/features-list/', |
| 915 |
'is_pro' => false, |
| 916 |
'tab' => 'widget', |
| 917 |
], |
| 918 |
'process_list' => [ |
| 919 |
'icon' => 'easyelIcon-process-list', |
| 920 |
'title' => 'Process List', |
| 921 |
'description' => 'Process List.', |
| 922 |
'demo_url' => 'https://wpeasyelements.com/process-list/', |
| 923 |
'docx_url' => 'https://wpeasyelements.com/docs/process-list/', |
| 924 |
'is_pro' => false, |
| 925 |
'tab' => 'widget', |
| 926 |
], |
| 927 |
'marquee_logo' => [ |
| 928 |
'icon' => 'easyelIcon-marquee-logo', |
| 929 |
'title' => 'Marquee', |
| 930 |
'description' => 'Marquee.', |
| 931 |
'demo_url' => 'https://wpeasyelements.com/marquee/', |
| 932 |
'docx_url' => 'https://wpeasyelements.com/docs/marquee/', |
| 933 |
'is_pro' => true, |
| 934 |
'tab' => 'widget', |
| 935 |
], |
| 936 |
'button' => [ |
| 937 |
'icon' => 'easyelIcon-button', |
| 938 |
'title' => 'Button', |
| 939 |
'description' => 'Button.', |
| 940 |
'demo_url' => 'https://wpeasyelements.com/button/', |
| 941 |
'docx_url' => 'https://wpeasyelements.com/docs/button', |
| 942 |
'is_pro' => false, |
| 943 |
'tab' => 'widget', |
| 944 |
], |
| 945 |
'copyright' => [ |
| 946 |
'icon' => 'easyelIcon-copyright', |
| 947 |
'title' => 'Copyright', |
| 948 |
'description' => 'Display copyright text with auto-updating year for the footer.', |
| 949 |
'demo_url' => 'https://wpeasyelements.com/copyright/', |
| 950 |
'docx_url' => 'https://wpeasyelements.com/docs/copyright', |
| 951 |
'is_pro' => false, |
| 952 |
'tab' => 'widget', |
| 953 |
], |
| 954 |
'social_share' => [ |
| 955 |
'icon' => 'easyelIcon-social-share', |
| 956 |
'title' => 'Social Share', |
| 957 |
'description' => 'Social Share.', |
| 958 |
'demo_url' => 'https://wpeasyelements.com/docs/social-share/', |
| 959 |
'docx_url' => 'https://wpeasyelements.com/docs/social-share/', |
| 960 |
'is_pro' => false, |
| 961 |
'tab' => 'widget', |
| 962 |
], |
| 963 |
'social_icon' => [ |
| 964 |
'icon' => 'easyelIcon-social-icons', |
| 965 |
'title' => 'Social Icon', |
| 966 |
'description' => 'Social Icon.', |
| 967 |
'demo_url' => 'https://wpeasyelements.com/social-icon', |
| 968 |
'docx_url' => 'https://wpeasyelements.com/docs/social-icon', |
| 969 |
'is_pro' => false, |
| 970 |
'tab' => 'widget', |
| 971 |
], |
| 972 |
'breadcrumb' => [ |
| 973 |
'icon' => 'easyelIcon-breadcumb', |
| 974 |
'title' => 'Breadcrumb', |
| 975 |
'description' => 'Breadcrumb.', |
| 976 |
'demo_url' => 'https://wpeasyelements.com/breadcrumb', |
| 977 |
'docx_url' => 'https://wpeasyelements.com/docs/breadcrumb', |
| 978 |
'is_pro' => false, |
| 979 |
'tab' => 'widget', |
| 980 |
], |
| 981 |
'easy_slider' => [ |
| 982 |
'icon' => 'easyelIcon-slider', |
| 983 |
'title' => 'Slider', |
| 984 |
'description' => 'Slider.', |
| 985 |
'demo_url' => 'https://wpeasyelements.com/slider', |
| 986 |
'docx_url' => 'https://wpeasyelements.com/docs/slider', |
| 987 |
'is_pro' => true, |
| 988 |
'tab' => 'widget', |
| 989 |
], |
| 990 |
'image_accordion' => [ |
| 991 |
'icon' => 'easyelIcon-image-accordion', |
| 992 |
'title' => 'Image Accordion', |
| 993 |
'description' => 'Image Accordion', |
| 994 |
'demo_url' => 'https://wpeasyelements.com/image-accordion/', |
| 995 |
'docx_url' => 'https://wpeasyelements.com/docs/image-accordion/', |
| 996 |
'is_pro' => true, |
| 997 |
'tab' => 'widget', |
| 998 |
], |
| 999 |
'domain_search' => [ |
| 1000 |
'icon' => 'easyelIcon-domain-search', |
| 1001 |
'title' => 'Domain Search', |
| 1002 |
'description' => 'Domain Search.', |
| 1003 |
'demo_url' => 'https://wpeasyelements.com/domain-search/', |
| 1004 |
'docx_url' => 'https://wpeasyelements.com/docs/domain-search/', |
| 1005 |
'is_pro' => false, |
| 1006 |
'group' => 'Form Widgets', |
| 1007 |
'tab' => 'widget', |
| 1008 |
], |
| 1009 |
'featured_project' => [ |
| 1010 |
'icon' => 'easyelIcon-custom-projects', |
| 1011 |
'title' => 'Custom Projects', |
| 1012 |
'description' => 'Custom Projects.', |
| 1013 |
'demo_url' => '#', |
| 1014 |
'docx_url' => '#', |
| 1015 |
'is_pro' => true, |
| 1016 |
'tab' => 'widget', |
| 1017 |
], |
| 1018 |
'advance_button' => [ |
| 1019 |
'icon' => 'easyelIcon-button', |
| 1020 |
'title' => 'Advance Button', |
| 1021 |
'description' => 'Advance Button.', |
| 1022 |
'demo_url' => 'https://wpeasyelements.com/advance-button/', |
| 1023 |
'docx_url' => 'https://wpeasyelements.com/docs/advance-button', |
| 1024 |
'is_pro' => true, |
| 1025 |
'tab' => 'widget', |
| 1026 |
], |
| 1027 |
'hr_image_scroll' => [ |
| 1028 |
'icon' => 'easyelIcon-image-horizontal-scroll', |
| 1029 |
'title' => 'Horizontal Scroll', |
| 1030 |
'description' => 'Horizontal Scroll.', |
| 1031 |
'demo_url' => 'https://wpeasyelements.com/horizontal-scroll/', |
| 1032 |
'docx_url' => 'https://wpeasyelements.com/docs/horizontal-scroll/', |
| 1033 |
'is_pro' => true, |
| 1034 |
'tab' => 'widget', |
| 1035 |
], |
| 1036 |
'scrolltrigger_title' => [ |
| 1037 |
'icon' => 'easyelIcon-title-scrolltrigger', |
| 1038 |
'title' => 'Content ScrollTrigger', |
| 1039 |
'description' => 'Content ScrollTrigger.', |
| 1040 |
'demo_url' => 'https://wpeasyelements.com/title-scrolltrigger/', |
| 1041 |
'docx_url' => 'https://wpeasyelements.com/docs/title-scrolltrigger/', |
| 1042 |
'is_pro' => true, |
| 1043 |
'tab' => 'widget', |
| 1044 |
], |
| 1045 |
'Flip_Box' => [ |
| 1046 |
'icon' => 'easyelIcon-flip-box', |
| 1047 |
'title' => 'Flip Box', |
| 1048 |
'description' => 'Flip Box.', |
| 1049 |
'demo_url' => 'https://wpeasyelements.com/flip-box', |
| 1050 |
'docx_url' => 'https://wpeasyelements.com/docs/flip-box', |
| 1051 |
'is_pro' => true, |
| 1052 |
'group' => 'Creative Widgets', |
| 1053 |
'tab' => 'widget', |
| 1054 |
], |
| 1055 |
'easy_offcanvas' => [ |
| 1056 |
'icon' => 'easyelIcon-canvas', |
| 1057 |
'title' => 'Offcanvas', |
| 1058 |
'description' => 'Offcanvas.', |
| 1059 |
'demo_url' => 'https://wpeasyelements.com/offcanvas', |
| 1060 |
'docx_url' => 'https://wpeasyelements.com/docs/offcanvas', |
| 1061 |
'is_pro' => false, |
| 1062 |
'group' => 'Header & Footer Widget', |
| 1063 |
'tab' => 'widget', |
| 1064 |
], |
| 1065 |
'site_logo' => [ |
| 1066 |
'icon' => 'easyelIcon-site-logo', |
| 1067 |
'title' => 'Site Logo', |
| 1068 |
'description' => 'Display your website logo easily with this widget.', |
| 1069 |
'demo_url' => 'https://wpeasyelements.com/site-logo/', |
| 1070 |
'docx_url' => 'https://wpeasyelements.com/docs/site-logo/', |
| 1071 |
'is_pro' => false, |
| 1072 |
'group' => 'Header & Footer Widget', |
| 1073 |
'tab' => 'widget', |
| 1074 |
], |
| 1075 |
'search' => [ |
| 1076 |
'icon' => 'easyelIcon-search', |
| 1077 |
'title' => 'Simple Search', |
| 1078 |
'description' => 'Search All Content.', |
| 1079 |
'demo_url' => 'https://wpeasyelements.com/search', |
| 1080 |
'docx_url' => 'https://wpeasyelements.com/docs/search', |
| 1081 |
'is_pro' => false, |
| 1082 |
'group' => 'Form Widgets', |
| 1083 |
'tab' => 'widget', |
| 1084 |
], |
| 1085 |
'navigation_menu' => [ |
| 1086 |
'icon' => 'easyelIcon-navigation', |
| 1087 |
'title' => 'Navigation Menu', |
| 1088 |
'description' => 'Navigation Menu.', |
| 1089 |
'demo_url' => 'https://wpeasyelements.com/', |
| 1090 |
'docx_url' => '#', |
| 1091 |
'is_pro' => false, |
| 1092 |
'group' => 'Header & Footer Widget', |
| 1093 |
'tab' => 'widget', |
| 1094 |
], |
| 1095 |
'single_navigation_menu' => [ |
| 1096 |
'icon' => 'easyelIcon-navigation', |
| 1097 |
'title' => 'Single Navigation Menu', |
| 1098 |
'description' => 'SingleNavigation Menu.', |
| 1099 |
'demo_url' => 'https://wpeasyelements.com/single-navigation/', |
| 1100 |
'docx_url' => 'https://www.youtube.com/watch?v=d-lz-EfK9eA', |
| 1101 |
'is_pro' => false, |
| 1102 |
'group' => 'Header & Footer Widget', |
| 1103 |
'tab' => 'widget', |
| 1104 |
], |
| 1105 |
'mega_menu_widget' => [ |
| 1106 |
'icon' => 'easyelIcon-navigation', |
| 1107 |
'title' => 'Mega Menu', |
| 1108 |
'description' => 'Mega Menu.', |
| 1109 |
'demo_url' => 'https://wpeasyelements.com/megamenu-builder/', |
| 1110 |
'docx_url' => 'https://wpeasyelements.com/docs/megamenu-builder/', |
| 1111 |
'is_pro' => true, |
| 1112 |
'group' => 'Header & Footer Widget', |
| 1113 |
'tab' => 'widget', |
| 1114 |
], |
| 1115 |
'vertical_navigation_menu' => [ |
| 1116 |
'icon' => 'easyelIcon-navigation', |
| 1117 |
'title' => 'Vertical Menu', |
| 1118 |
'description' => 'Vertical Menu.', |
| 1119 |
'demo_url' => 'https://wpeasyelements.com/vertical-menu/', |
| 1120 |
'docx_url' => 'https://wpeasyelements.com/docs/vertical-menu/', |
| 1121 |
'is_pro' => false, |
| 1122 |
'group' => 'Header & Footer Widget', |
| 1123 |
'tab' => 'widget', |
| 1124 |
], |
| 1125 |
'page_title' => [ |
| 1126 |
'icon' => 'easyelIcon-page-title', |
| 1127 |
'title' => 'Page Title', |
| 1128 |
'description' => 'Page Title.', |
| 1129 |
'demo_url' => 'https://wpeasyelements.com/docs/page-title/', |
| 1130 |
'docx_url' => 'https://wpeasyelements.com/docs/page-title/', |
| 1131 |
'is_pro' => false, |
| 1132 |
'group' => 'Header & Footer Widget', |
| 1133 |
'tab' => 'widget', |
| 1134 |
], |
| 1135 |
'post_tags' => [ |
| 1136 |
'icon' => 'easyelIcon-post-tag', |
| 1137 |
'title' => 'Current Post Tags', |
| 1138 |
'description' => 'Current Post Tags.', |
| 1139 |
'demo_url' => 'https://wpeasyelements.com/maximize-value-from-your-marketing-subscription/#single__link', |
| 1140 |
'docx_url' => 'https://wpeasyelements.com/maximize-value-from-your-marketing-subscription/', |
| 1141 |
'is_pro' => false, |
| 1142 |
'group' => 'Theme Builder Widget', |
| 1143 |
'tab' => 'widget', |
| 1144 |
], |
| 1145 |
'post_author' => [ |
| 1146 |
'icon' => 'easyelIcon-author', |
| 1147 |
'title' => 'Post Author Info', |
| 1148 |
'description' => 'Post Author Info.', |
| 1149 |
'demo_url' => 'https://wpeasyelements.com/maximize-value-from-your-marketing-subscription/#single__link', |
| 1150 |
'docx_url' => 'https://wpeasyelements.com/maximize-value-from-your-marketing-subscription/', |
| 1151 |
'is_pro' => false, |
| 1152 |
'group' => 'Theme Builder Widget', |
| 1153 |
'tab' => 'widget', |
| 1154 |
], |
| 1155 |
'post_title' => [ |
| 1156 |
'icon' => 'easyelIcon-post-title', |
| 1157 |
'title' => 'Post Title', |
| 1158 |
'description' => 'Post Title.', |
| 1159 |
'demo_url' => 'https://wpeasyelements.com/docs/post-title/', |
| 1160 |
'docx_url' => 'https://wpeasyelements.com/docs/post-title/', |
| 1161 |
'is_pro' => false, |
| 1162 |
'group' => 'Theme Builder Widget', |
| 1163 |
'tab' => 'widget', |
| 1164 |
], |
| 1165 |
'post_content' => [ |
| 1166 |
'icon' => 'easyelIcon-post-content', |
| 1167 |
'title' => 'Post Content', |
| 1168 |
'description' => 'Post Content.', |
| 1169 |
'demo_url' => 'https://wpeasyelements.com/maximize-value-from-your-marketing-subscription/', |
| 1170 |
'docx_url' => 'https://wpeasyelements.com/maximize-value-from-your-marketing-subscription/', |
| 1171 |
'is_pro' => false, |
| 1172 |
'group' => 'Theme Builder Widget', |
| 1173 |
'tab' => 'widget', |
| 1174 |
], |
| 1175 |
'excerpt' => [ |
| 1176 |
'icon' => 'easyelIcon-post-excerpt', |
| 1177 |
'title' => 'Post Excerpt', |
| 1178 |
'description' => 'Post Excerpt.', |
| 1179 |
'demo_url' => 'https://wpeasyelements.com/docs/post-excerpt/', |
| 1180 |
'docx_url' => 'https://wpeasyelements.com/docs/post-excerpt/', |
| 1181 |
'is_pro' => false, |
| 1182 |
'group' => 'Theme Builder Widget', |
| 1183 |
'tab' => 'widget', |
| 1184 |
], |
| 1185 |
'related_post' => [ |
| 1186 |
'icon' => 'easyelIcon-related-post', |
| 1187 |
'title' => 'Related Post', |
| 1188 |
'description' => 'Related Post.', |
| 1189 |
'demo_url' => 'https://wpeasyelements.com/docs/related-post/', |
| 1190 |
'docx_url' => 'https://wpeasyelements.com/docs/related-post/', |
| 1191 |
'is_pro' => true, |
| 1192 |
'group' => 'Theme Builder Widget', |
| 1193 |
'tab' => 'widget', |
| 1194 |
], |
| 1195 |
'post_pagination' => [ |
| 1196 |
'icon' => 'easyelIcon-pagination', |
| 1197 |
'title' => 'Post Pagination', |
| 1198 |
'description' => 'Post Pagination.', |
| 1199 |
'demo_url' => 'https://wpeasyelements.com/docs/post-pagination/', |
| 1200 |
'docx_url' => 'https://wpeasyelements.com/docs/post-pagination/', |
| 1201 |
'is_pro' => false, |
| 1202 |
'group' => 'Theme Builder Widget', |
| 1203 |
'tab' => 'widget', |
| 1204 |
], |
| 1205 |
'post_meta' => [ |
| 1206 |
'icon' => 'easyelIcon-meta', |
| 1207 |
'title' => 'Post Meta', |
| 1208 |
'description' => 'Post Meta.', |
| 1209 |
'demo_url' => 'https://wpeasyelements.com/docs/post-meta/', |
| 1210 |
'docx_url' => 'https://wpeasyelements.com/docs/post-meta/', |
| 1211 |
'is_pro' => false, |
| 1212 |
'group' => 'Theme Builder Widget', |
| 1213 |
'tab' => 'widget', |
| 1214 |
], |
| 1215 |
'post_comments' => [ |
| 1216 |
'icon' => 'easyelIcon-comments', |
| 1217 |
'title' => 'Post Comments', |
| 1218 |
'description' => 'Post Comments.', |
| 1219 |
'demo_url' => 'https://wpeasyelements.com/maximize-value-from-your-marketing-subscription/#single__link', |
| 1220 |
'docx_url' => 'https://wpeasyelements.com/maximize-value-from-your-marketing-subscription/#single__link', |
| 1221 |
'is_pro' => false, |
| 1222 |
'group' => 'Theme Builder Widget', |
| 1223 |
'tab' => 'widget', |
| 1224 |
], |
| 1225 |
'featured_image' => [ |
| 1226 |
'icon' => 'easyelIcon-image-carousel', |
| 1227 |
'title' => 'Featured Image', |
| 1228 |
'description' => 'Featured Image.', |
| 1229 |
'demo_url' => 'https://wpeasyelements.com/docs/featured-image/', |
| 1230 |
'docx_url' => 'https://wpeasyelements.com/docs/featured-image/', |
| 1231 |
'is_pro' => false, |
| 1232 |
'group' => 'Theme Builder Widget', |
| 1233 |
'tab' => 'widget', |
| 1234 |
], |
| 1235 |
'easy_scroll_to_top' => [ |
| 1236 |
'icon' => 'easyelIcon-scroll-top', |
| 1237 |
'title' => 'Scroll Top', |
| 1238 |
'description' => 'Scroll Top.', |
| 1239 |
'demo_url' => 'https://wpeasyelements.com/docs/scroll-to-top/', |
| 1240 |
'docx_url' => 'https://wpeasyelements.com/docs/scroll-to-top/', |
| 1241 |
'is_pro' => false, |
| 1242 |
'group' => 'Theme Builder Widget', |
| 1243 |
'tab' => 'widget', |
| 1244 |
], |
| 1245 |
'easy_table' => [ |
| 1246 |
'icon' => 'easyelIcon-clients-logo-grid', |
| 1247 |
'title' => 'Table', |
| 1248 |
'description' => 'Table.', |
| 1249 |
'demo_url' => 'https://wpeasyelements.com/table', |
| 1250 |
'docx_url' => 'https://wpeasyelements.com/docs/table', |
| 1251 |
'is_pro' => false, |
| 1252 |
'tab' => 'widget', |
| 1253 |
], |
| 1254 |
'advance_image' => [ |
| 1255 |
'icon' => 'easyelIcon-image-carousel', |
| 1256 |
'title' => 'Advance Image', |
| 1257 |
'description' => 'Advance Image Here.', |
| 1258 |
'demo_url' => 'https://wpeasyelements.com/advance-image/', |
| 1259 |
'docx_url' => 'https://wpeasyelements.com/docs/advance-image/', |
| 1260 |
'is_pro' => true, |
| 1261 |
'group' => 'Animations', |
| 1262 |
'tab' => 'widget', |
| 1263 |
], |
| 1264 |
'bmi_calculator' => [ |
| 1265 |
'icon' => 'easyelIcon-calculator', |
| 1266 |
'title' => 'BMI Calculator', |
| 1267 |
'description' => 'BMI Calculator.', |
| 1268 |
'demo_url' => 'https://wpeasyelements.com/bmi-calculator/', |
| 1269 |
'docx_url' => 'https://wpeasyelements.com/docs/bmi-calculator/', |
| 1270 |
'is_pro' => true, |
| 1271 |
'group' => 'Creative Widgets', |
| 1272 |
'tab' => 'widget', |
| 1273 |
], |
| 1274 |
'typewriter' => [ |
| 1275 |
'icon' => 'easyelIcon-heading', |
| 1276 |
'title' => 'Typewriter', |
| 1277 |
'description' => 'Animated typewriter text effect.', |
| 1278 |
'demo_url' => 'https://wpeasyelements.com/typewriter/', |
| 1279 |
'docx_url' => 'https://wpeasyelements.com/docs/typewriter/', |
| 1280 |
'is_pro' => true, |
| 1281 |
'group' => 'Animations', |
| 1282 |
'tab' => 'widget', |
| 1283 |
], |
| 1284 |
'animated_title' => [ |
| 1285 |
'icon' => 'easyelIcon-animated-title', |
| 1286 |
'title' => 'Animated Title', |
| 1287 |
'description' => 'Animated title text effect.', |
| 1288 |
'demo_url' => 'https://wpeasyelements.com/animated-title/', |
| 1289 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 1290 |
'is_pro' => true, |
| 1291 |
'group' => 'Animations', |
| 1292 |
'tab' => 'widget', |
| 1293 |
], |
| 1294 |
'easytext_animation' => [ |
| 1295 |
'icon' => 'easyelIcon-heading', |
| 1296 |
'title' => 'Animated Text', |
| 1297 |
'description' => 'Animated text animation effect.', |
| 1298 |
'demo_url' => 'https://wpeasyelements.com/text-animation/', |
| 1299 |
'docx_url' => 'https://wpeasyelements.com/docs/text-animation/', |
| 1300 |
'is_pro' => true, |
| 1301 |
'group' => 'Animations', |
| 1302 |
'tab' => 'widget', |
| 1303 |
], |
| 1304 |
'easy_feature' => [ |
| 1305 |
'icon' => 'easyelIcon-marquee-logo', |
| 1306 |
'title' => 'Hover Image Box', |
| 1307 |
'description' => 'Hover image box content.', |
| 1308 |
'demo_url' => 'https://wpeasyelements.com/hover-image-box/', |
| 1309 |
'docx_url' => 'https://wpeasyelements.com/docs/hover-image-box/', |
| 1310 |
'is_pro' => true, |
| 1311 |
'tab' => 'widget', |
| 1312 |
], |
| 1313 |
'easy_gallery' => [ |
| 1314 |
'icon' => 'easyelIcon-marquee-logo', |
| 1315 |
'title' => 'Simple Gallery', |
| 1316 |
'description' => 'Gallery', |
| 1317 |
'demo_url' => 'https://wpeasyelements.com/simple-gallery/', |
| 1318 |
'docx_url' => 'https://wpeasyelements.com/docs/simple-gallery/', |
| 1319 |
'is_pro' => false, |
| 1320 |
'tab' => 'widget', |
| 1321 |
], |
| 1322 |
'image_gallery_filter' => [ |
| 1323 |
'icon' => 'easyelIcon-filterable-gallery', |
| 1324 |
'title' => 'Filterable Gallery', |
| 1325 |
'description' => 'filterable Gallery', |
| 1326 |
'demo_url' => 'https://wpeasyelements.com/gallery-filter/', |
| 1327 |
'docx_url' => 'https://wpeasyelements.com/gallery-filter/', |
| 1328 |
'is_pro' => true, |
| 1329 |
'group' => 'Creative Widgets', |
| 1330 |
'tab' => 'widget', |
| 1331 |
], |
| 1332 |
'masonry_gallery' => [ |
| 1333 |
'icon' => 'easyelIcon-filterable-gallery', |
| 1334 |
'title' => 'Masonry Gallery', |
| 1335 |
'description' => 'Masonry Gallery', |
| 1336 |
'demo_url' => 'https://wpeasyelements.com/masonry-gallery/', |
| 1337 |
'docx_url' => 'https://wpeasyelements.com/masonry-gallery/', |
| 1338 |
'is_pro' => true, |
| 1339 |
'group' => 'Creative Widgets', |
| 1340 |
'tab' => 'widget', |
| 1341 |
], |
| 1342 |
'portfolio_pro' => [ |
| 1343 |
'icon' => 'easyelIcon-marquee-logo', |
| 1344 |
'title' => 'Portfolio', |
| 1345 |
'description' => 'Portfolio', |
| 1346 |
'demo_url' => 'https://wpeasyelements.com/portfolio/', |
| 1347 |
'docx_url' => 'https://wpeasyelements.com/docs/portfolio/', |
| 1348 |
'is_pro' => true, |
| 1349 |
'tab' => 'widget', |
| 1350 |
], |
| 1351 |
'portfolio_filter' => [ |
| 1352 |
'icon' => 'easyelIcon-marquee-logo', |
| 1353 |
'title' => 'Portfolio Filter', |
| 1354 |
'description' => 'Portfolio filter', |
| 1355 |
'demo_url' => 'https://wpeasyelements.com/portfolio-filter/', |
| 1356 |
'docx_url' => 'https://wpeasyelements.com/docs/portfolio-filter/', |
| 1357 |
'is_pro' => true, |
| 1358 |
'tab' => 'widget', |
| 1359 |
], |
| 1360 |
'protected_content' => [ |
| 1361 |
'icon' => 'easyelIcon-protected-content', |
| 1362 |
'title' => 'Protected Content', |
| 1363 |
'description' => 'This Widget is protected content', |
| 1364 |
'demo_url' => 'https://wpeasyelements.com/protected-contents/', |
| 1365 |
'docx_url' => 'https://wpeasyelements.com/docs/protected-contents/', |
| 1366 |
'is_pro' => true, |
| 1367 |
'group' => 'Creative Widgets', |
| 1368 |
'tab' => 'widget', |
| 1369 |
], |
| 1370 |
'advanced_search' => [ |
| 1371 |
'icon' => 'easyelIcon-advance-search', |
| 1372 |
'title' => 'Advanced Search', |
| 1373 |
'description' => 'This Widget is advanced search', |
| 1374 |
'demo_url' => 'https://wpeasyelements.com/advanced-search/', |
| 1375 |
'docx_url' => 'https://wpeasyelements.com/docs/advanced-search/', |
| 1376 |
'is_pro' => true, |
| 1377 |
'tab' => 'widget', |
| 1378 |
], |
| 1379 |
'enable_image_hover_effect' => [ |
| 1380 |
'icon' => 'easyelIcon-marquee-logo', |
| 1381 |
'title' => 'Image Hover Effect', |
| 1382 |
'description' => 'This Widget is image hover effect', |
| 1383 |
'demo_url' => 'https://wpeasyelements.com/image-hover-effect/', |
| 1384 |
'docx_url' => 'https://wpeasyelements.com/docs/image-hover-effect/', |
| 1385 |
'is_pro' => true, |
| 1386 |
'group' => 'Creative Widgets', |
| 1387 |
'tab' => 'widget', |
| 1388 |
], |
| 1389 |
'image_hotspot' => [ |
| 1390 |
'icon' => 'easyelIcon-marquee-logo', |
| 1391 |
'title' => 'image Hotspot', |
| 1392 |
'description' => 'This Widget is Image Hotspot', |
| 1393 |
'demo_url' => 'https://wpeasyelements.com/image-hotspot/', |
| 1394 |
'docx_url' => 'https://wpeasyelements.com/docs/image-hotspot/', |
| 1395 |
'is_pro' => true, |
| 1396 |
'group' => 'Creative Widgets', |
| 1397 |
'tab' => 'widget', |
| 1398 |
], |
| 1399 |
'hr_image_scroll' => [ |
| 1400 |
'icon' => 'easyelIcon-image-horizontal-scroll', |
| 1401 |
'title' => 'ScrollTrigger', |
| 1402 |
'description' => 'This Widget is image hover effect', |
| 1403 |
'demo_url' => 'https://wpeasyelements.com/horizontal-scroll/', |
| 1404 |
'docx_url' => 'https://wpeasyelements.com/docs/horizontal-scroll/', |
| 1405 |
'is_pro' => true, |
| 1406 |
'group' => 'Animations', |
| 1407 |
'tab' => 'widget', |
| 1408 |
], |
| 1409 |
'archive_post' => [ |
| 1410 |
'icon' => 'easyelIcon-post-grid', |
| 1411 |
'title' => 'Archive Post', |
| 1412 |
'description' => 'This Widget is archive post widget', |
| 1413 |
'demo_url' => 'https://wpeasyelements.com/post-grid/', |
| 1414 |
'docx_url' => 'https://wpeasyelements.com/docs/post-grid/', |
| 1415 |
'is_pro' => false, |
| 1416 |
'tab' => 'widget', |
| 1417 |
], |
| 1418 |
'counter' => [ |
| 1419 |
'icon' => 'easyelIcon-counter', |
| 1420 |
'title' => 'Counter', |
| 1421 |
'description' => 'This is a widget that counts up.', |
| 1422 |
'demo_url' => 'https://wpeasyelements.com/counter/', |
| 1423 |
'docx_url' => 'https://wpeasyelements.com/docs/counter/', |
| 1424 |
'is_pro' => false, |
| 1425 |
'group' => 'Creative Widgets', |
| 1426 |
'tab' => 'widget', |
| 1427 |
], |
| 1428 |
'countdown' => [ |
| 1429 |
'icon' => 'easyelIcon-countdown', |
| 1430 |
'title' => 'Countdown', |
| 1431 |
'description' => 'This is a countdown widget.', |
| 1432 |
'demo_url' => 'https://wpeasyelements.com/countdown/', |
| 1433 |
'docx_url' => 'https://wpeasyelements.com/docs/countdown/', |
| 1434 |
'is_pro' => false, |
| 1435 |
'group' => 'Creative Widgets', |
| 1436 |
'tab' => 'widget', |
| 1437 |
], |
| 1438 |
'easy_progress' => [ |
| 1439 |
'icon' => 'easyelIcon-progress-bar', |
| 1440 |
'title' => 'Progress Bar', |
| 1441 |
'description' => 'This is a Progress bar widget.', |
| 1442 |
'demo_url' => 'https://wpeasyelements.com/progressbar/', |
| 1443 |
'docx_url' => 'https://wpeasyelements.com/docs/progressbar/', |
| 1444 |
'is_pro' => false, |
| 1445 |
'group' => 'Creative Widgets', |
| 1446 |
'tab' => 'widget', |
| 1447 |
], |
| 1448 |
'facebook_feed' => [ |
| 1449 |
'icon' => 'easyelIcon-facebook-feed', |
| 1450 |
'title' => 'Facebook Feed', |
| 1451 |
'description' => 'This Widget is facebook feeds', |
| 1452 |
'demo_url' => 'https://wpeasyelements.com/facebook-feed/', |
| 1453 |
'docx_url' => 'https://wpeasyelements.com/docs/facebook-feed/', |
| 1454 |
'is_pro' => true, |
| 1455 |
'group' => 'Social Media Feeds', |
| 1456 |
'tab' => 'widget', |
| 1457 |
], |
| 1458 |
'instagram_feed' => [ |
| 1459 |
'icon' => 'easyelIcon-instagram-feed', |
| 1460 |
'title' => 'Instagram Feed', |
| 1461 |
'description' => 'This Widget is instagram feeds', |
| 1462 |
'demo_url' => 'https://wpeasyelements.com/instagram-feed/', |
| 1463 |
'docx_url' => 'https://wpeasyelements.com/docs/instagram-feed/', |
| 1464 |
'is_pro' => true, |
| 1465 |
'group' => 'Social Media Feeds', |
| 1466 |
'tab' => 'widget', |
| 1467 |
], |
| 1468 |
'login_register' => [ |
| 1469 |
'icon' => 'easyelIcon-login', |
| 1470 |
'title' => 'Login / Register', |
| 1471 |
'description' => 'This Widget is login and register form', |
| 1472 |
'demo_url' => 'https://wpeasyelements.com/register/', |
| 1473 |
'docx_url' => 'https://wpeasyelements.com/docs/login-register/', |
| 1474 |
'is_pro' => false, |
| 1475 |
'group' => 'Form Widgets', |
| 1476 |
'tab' => 'widget', |
| 1477 |
], |
| 1478 |
'table_of_content' => [ |
| 1479 |
'icon' => 'easyelIcon-pricing-list', |
| 1480 |
'title' => 'Table Of Content', |
| 1481 |
'description' => 'This is a widget that creates a table of content.', |
| 1482 |
'demo_url' => 'https://wpeasyelements.com/table-of-content/', |
| 1483 |
'docx_url' => 'https://wpeasyelements.com/docs/table-of-content/', |
| 1484 |
'is_pro' => true, |
| 1485 |
'group' => 'Creative Widgets', |
| 1486 |
'tab' => 'widget', |
| 1487 |
], |
| 1488 |
'product_grid_lite' => [ |
| 1489 |
'icon' => 'easyelIcon-process-grid', |
| 1490 |
'title' => 'Product Grid Lite', |
| 1491 |
'description' => 'Display WooCommerce products in a responsive grid (lite version).', |
| 1492 |
'demo_url' => 'https://wpeasyelements.com/product-grid-lite/', |
| 1493 |
'docx_url' => 'https://wpeasyelements.com/docs/product-grid-lite/', |
| 1494 |
'is_pro' => false, |
| 1495 |
'group' => 'WooCommerce Widgets', |
| 1496 |
'tab' => 'widget', |
| 1497 |
], |
| 1498 |
'product_grid' => [ |
| 1499 |
'icon' => 'easyelIcon-process-grid', |
| 1500 |
'title' => 'Product Grid', |
| 1501 |
'description' => 'Advanced WooCommerce product grid with filter tabs, quick view, compare and wishlist.', |
| 1502 |
'demo_url' => 'https://wpeasyelements.com/product-grid/', |
| 1503 |
'docx_url' => 'https://wpeasyelements.com/docs/product-grid/', |
| 1504 |
'is_pro' => true, |
| 1505 |
'group' => 'WooCommerce Widgets', |
| 1506 |
'tab' => 'widget', |
| 1507 |
], |
| 1508 |
'product_list' => [ |
| 1509 |
'icon' => 'easyelIcon-process-list', |
| 1510 |
'title' => 'Product List', |
| 1511 |
'description' => 'Display WooCommerce products in a list layout with details and actions.', |
| 1512 |
'demo_url' => 'https://wpeasyelements.com/product-list/', |
| 1513 |
'docx_url' => 'https://wpeasyelements.com/docs/product-list/', |
| 1514 |
'is_pro' => true, |
| 1515 |
'group' => 'WooCommerce Widgets', |
| 1516 |
'tab' => 'widget', |
| 1517 |
], |
| 1518 |
'product_slider' => [ |
| 1519 |
'icon' => 'easyelIcon-process-slider', |
| 1520 |
'title' => 'Product Slider', |
| 1521 |
'description' => 'Showcase WooCommerce products in a responsive slider/carousel.', |
| 1522 |
'demo_url' => 'https://wpeasyelements.com/product-slider/', |
| 1523 |
'docx_url' => 'https://wpeasyelements.com/docs/product-slider/', |
| 1524 |
'is_pro' => true, |
| 1525 |
'group' => 'WooCommerce Widgets', |
| 1526 |
'tab' => 'widget', |
| 1527 |
], |
| 1528 |
'product_categories' => [ |
| 1529 |
'icon' => 'easyelIcon-filterable-gallery', |
| 1530 |
'title' => 'Product Categories', |
| 1531 |
'description' => 'Display WooCommerce product categories in a clean grid.', |
| 1532 |
'demo_url' => 'https://wpeasyelements.com/product-categories/', |
| 1533 |
'docx_url' => 'https://wpeasyelements.com/docs/product-categories/', |
| 1534 |
'is_pro' => true, |
| 1535 |
'group' => 'WooCommerce Widgets', |
| 1536 |
'tab' => 'widget', |
| 1537 |
], |
| 1538 |
'product_categories_slider' => [ |
| 1539 |
'icon' => 'easyelIcon-filterable-gallery', |
| 1540 |
'title' => 'Product Categories Slider', |
| 1541 |
'description' => 'Showcase WooCommerce product categories in a slider.', |
| 1542 |
'demo_url' => 'https://wpeasyelements.com/product-categories-slider/', |
| 1543 |
'docx_url' => 'https://wpeasyelements.com/docs/product-categories-slider/', |
| 1544 |
'is_pro' => true, |
| 1545 |
'group' => 'WooCommerce Widgets', |
| 1546 |
'tab' => 'widget', |
| 1547 |
], |
| 1548 |
'product_category_tab' => [ |
| 1549 |
'icon' => 'easyelIcon-process-grid', |
| 1550 |
'title' => 'Product Category Tab', |
| 1551 |
'description' => 'Tabbed WooCommerce categories with a banner and product cards per tab.', |
| 1552 |
'demo_url' => 'https://wpeasyelements.com/product-category-tab/', |
| 1553 |
'docx_url' => 'https://wpeasyelements.com/docs/product-category-tab/', |
| 1554 |
'is_pro' => true, |
| 1555 |
'group' => 'WooCommerce Widgets', |
| 1556 |
'tab' => 'widget', |
| 1557 |
], |
| 1558 |
'product_collections' => [ |
| 1559 |
'icon' => 'easyelIcon-process-grid', |
| 1560 |
'title' => 'Product Collection', |
| 1561 |
'description' => 'Curate WooCommerce product collections as a grid.', |
| 1562 |
'demo_url' => 'https://wpeasyelements.com/product-collections/', |
| 1563 |
'docx_url' => 'https://wpeasyelements.com/docs/product-collections/', |
| 1564 |
'is_pro' => true, |
| 1565 |
'group' => 'WooCommerce Widgets', |
| 1566 |
'tab' => 'widget', |
| 1567 |
], |
| 1568 |
'product_collections_slider' => [ |
| 1569 |
'icon' => 'easyelIcon-process-slider', |
| 1570 |
'title' => 'Product Collections Slider', |
| 1571 |
'description' => 'Curate WooCommerce product collections as a slider.', |
| 1572 |
'demo_url' => 'https://wpeasyelements.com/product-collections-slider/', |
| 1573 |
'docx_url' => 'https://wpeasyelements.com/docs/product-collections-slider/', |
| 1574 |
'is_pro' => true, |
| 1575 |
'group' => 'WooCommerce Widgets', |
| 1576 |
'tab' => 'widget', |
| 1577 |
], |
| 1578 |
'mini_cart' => [ |
| 1579 |
'icon' => 'easyelIcon-canvas', |
| 1580 |
'title' => 'Mini Cart', |
| 1581 |
'description' => 'Compact WooCommerce mini cart with dropdown preview.', |
| 1582 |
'demo_url' => 'https://wpeasyelements.com/mini-cart/', |
| 1583 |
'docx_url' => 'https://wpeasyelements.com/docs/mini-cart/', |
| 1584 |
'is_pro' => false, |
| 1585 |
'group' => 'WooCommerce Widgets', |
| 1586 |
'tab' => 'widget', |
| 1587 |
], |
| 1588 |
]; |
| 1589 |
|
| 1590 |
$feature_widget_map = [ |
| 1591 |
'enable_megamenu_builder' => 'mega_menu_widget', |
| 1592 |
]; |
| 1593 |
|
| 1594 |
// Condition apply |
| 1595 |
if ( function_exists( 'easy_element_is_enabled' ) ) { |
| 1596 |
foreach ( $feature_widget_map as $feature => $widget_key ) { |
| 1597 |
if ( ! easy_element_is_enabled( $feature ) ) { |
| 1598 |
unset( $widgets[ $widget_key ] ); |
| 1599 |
} |
| 1600 |
} |
| 1601 |
} |
| 1602 |
|
| 1603 |
return apply_filters( 'easyel_available_widgets', $widgets ); |
| 1604 |
|
| 1605 |
} |
| 1606 |
|
| 1607 |
/** |
| 1608 |
* Admin page HTML |
| 1609 |
*/ |
| 1610 |
function easyel_custom_fonts_page_html() { |
| 1611 |
if ( ! current_user_can( 'manage_options' ) ) return; |
| 1612 |
|
| 1613 |
if ( ! defined( 'EASY_ELEMENTS_PRO_ACTIVE' ) || ! EASY_ELEMENTS_PRO_ACTIVE ) { ?> |
| 1614 |
<div class="easyel-custom-font-page"> |
| 1615 |
<div class="easyel-custom-font-banner"> |
| 1616 |
<div class="easyel-custom-font-banner-content"> |
| 1617 |
<h1><?php esc_html_e( 'Custom Fonts', 'easy-elements' ); ?></h1> |
| 1618 |
|
| 1619 |
<p> |
| 1620 |
<?php esc_html_e( |
| 1621 |
'Upload and manage custom fonts.', |
| 1622 |
'easy-elements' |
| 1623 |
); ?> |
| 1624 |
</p> |
| 1625 |
<p>Upload TTF, OTF, WOFF</p> |
| 1626 |
<a |
| 1627 |
href="https://wpeasyelements.com/pricing/" |
| 1628 |
target="_blank" |
| 1629 |
class="easyel-upgrade-btn-custom-font" |
| 1630 |
> |
| 1631 |
<?php esc_html_e( 'Upgrade to Pro', 'easy-elements' ); ?> |
| 1632 |
</a> |
| 1633 |
</div> |
| 1634 |
</div> |
| 1635 |
</div> |
| 1636 |
<?php |
| 1637 |
return; |
| 1638 |
} |
| 1639 |
|
| 1640 |
$pro_version = easyel_get_pro_clean_version(); |
| 1641 |
|
| 1642 |
if ( |
| 1643 |
$pro_version && |
| 1644 |
version_compare( $pro_version, '1.0.8', '>=' ) |
| 1645 |
) { |
| 1646 |
if ( |
| 1647 |
did_action( 'plugins_loaded' ) && |
| 1648 |
class_exists( '\EasyElements_Elementor\Pro\CustomFont\FontUploader' ) ) { |
| 1649 |
$manager = \EasyElements_Elementor\Pro\CustomFont\FontUploader::get_instance(); |
| 1650 |
|
| 1651 |
if ( method_exists( $manager, 'easyel_pro_custom_fonts_page' ) ) { |
| 1652 |
$manager->easyel_pro_custom_fonts_page(); |
| 1653 |
} |
| 1654 |
} |
| 1655 |
} else { |
| 1656 |
easyel_pro_custom_fonts_page(); |
| 1657 |
} |
| 1658 |
|
| 1659 |
} |
| 1660 |
|
| 1661 |
/** |
| 1662 |
* Hide admin notices on the Easy Elements dashboard page. |
| 1663 |
*/ |
| 1664 |
function easyel_hide_admin_notices() { |
| 1665 |
$screen = get_current_screen(); |
| 1666 |
|
| 1667 |
if ( $screen && 'toplevel_page_easy-elements-dashboard' === $screen->id ) { |
| 1668 |
|
| 1669 |
$custom_css = ' |
| 1670 |
/* Hide all common notices */ |
| 1671 |
.notice, |
| 1672 |
.updated, |
| 1673 |
.error, |
| 1674 |
.update-nag, |
| 1675 |
.notice-success, |
| 1676 |
.notice-error, |
| 1677 |
.notice-warning { |
| 1678 |
display: none !important; |
| 1679 |
} |
| 1680 |
|
| 1681 |
/* But allow EasyEL notice */ |
| 1682 |
.easyel-promo-notice { |
| 1683 |
display: block !important; |
| 1684 |
} |
| 1685 |
'; |
| 1686 |
|
| 1687 |
$handle = 'easyel-admin-hide-notices'; |
| 1688 |
wp_register_style( $handle, false, [], EASYELEMENTS_VER ); |
| 1689 |
wp_enqueue_style( $handle ); |
| 1690 |
wp_add_inline_style( $handle, $custom_css ); |
| 1691 |
} |
| 1692 |
} |
| 1693 |
|
| 1694 |
public function easyel_smooth_scroller_popup_display() { |
| 1695 |
|
| 1696 |
$options = get_option('easyel_scroll_smoother_settings', []); |
| 1697 |
|
| 1698 |
|
| 1699 |
?> |
| 1700 |
<div class="easyel-smooth-scroll-popup"> |
| 1701 |
<div class="ajax-search-close-icon"> |
| 1702 |
<a class="easyel-smooth-scroll-popup-close-icon rbt-round-btn" href="#"> |
| 1703 |
<svg width="14" height="14" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 1704 |
<path d="M9.08366 1.73916L8.26116 0.916656L5.00033 4.17749L1.73949 0.916656L0.916992 1.73916L4.17783 4.99999L0.916992 8.26082L1.73949 9.08332L5.00033 5.82249L8.26116 9.08332L9.08366 8.26082L5.82283 4.99999L9.08366 1.73916Z" fill="currentColor"></path> |
| 1705 |
</svg> |
| 1706 |
</a> |
| 1707 |
</div> |
| 1708 |
|
| 1709 |
<div class="wrapper"> |
| 1710 |
<h2 class="easyel-smooth-scroll-heading"><?php echo esc_html__("Smooth Scroll Settings","easy-elements"); ?></h2> |
| 1711 |
<form method="post" action=""> |
| 1712 |
<div class="easyel-smooth-scroll-settings-main-wrapper"> |
| 1713 |
|
| 1714 |
<!-- Smooth Speed --> |
| 1715 |
<div class="easyel-smooth-scroll-item"> |
| 1716 |
<span class="easy-field-label"><?php echo esc_html__("Speed (2.0–5):","easy-elements"); ?></span> |
| 1717 |
<label class="easy-field-item"> |
| 1718 |
<input type="number" |
| 1719 |
name="smooth_scroll_speed" |
| 1720 |
min="0.1" max="5" step="0.1" |
| 1721 |
value="<?php echo isset($options['smooth_scroll_speed']) ? esc_attr($options['smooth_scroll_speed']) : '2.5'; ?>"> |
| 1722 |
</label> |
| 1723 |
</div> |
| 1724 |
|
| 1725 |
<!-- Normalize Scroll --> |
| 1726 |
<div class="easyel-smooth-scroll-item"> |
| 1727 |
<span class="easy-field-label"><?php echo esc_html__("Normalize Scroll","easy-elements"); ?></span> |
| 1728 |
<label class="easy-field-item easy-toggle-switch"> |
| 1729 |
<input type="checkbox" |
| 1730 |
name="smooth_scroll_normalize" |
| 1731 |
value="1" |
| 1732 |
<?php checked( isset($options['smooth_scroll_normalize']) ? $options['smooth_scroll_normalize'] : 0, 1 ); ?>> |
| 1733 |
<span class="slider round"></span> |
| 1734 |
</label> |
| 1735 |
</div> |
| 1736 |
|
| 1737 |
<!-- Enable on Mobile --> |
| 1738 |
<div class="easyel-smooth-scroll-item"> |
| 1739 |
<span class="easy-field-label"><?php echo esc_html__("Enable on Mobile Devices","easy-elements"); ?></span> |
| 1740 |
<label class="easy-field-item easy-toggle-switch"> |
| 1741 |
<input type="checkbox" |
| 1742 |
name="smooth_scroll_enable_mobile" |
| 1743 |
value="1" |
| 1744 |
<?php checked( isset($options['smooth_scroll_enable_mobile']) ? $options['smooth_scroll_enable_mobile'] : 0, 1 ); ?>> |
| 1745 |
<span class="slider round"></span> |
| 1746 |
</label> |
| 1747 |
</div> |
| 1748 |
|
| 1749 |
<!-- Disable on Editor Mode --> |
| 1750 |
<div class="easyel-smooth-scroll-item"> |
| 1751 |
<span class="easy-field-label"><?php echo esc_html__("Disable on Editor Mode","easy-elements"); ?></span> |
| 1752 |
<label class="easy-field-item easy-toggle-switch"> |
| 1753 |
<input type="checkbox" |
| 1754 |
name="smooth_scroll_disable_editor_mode" |
| 1755 |
value="1" |
| 1756 |
<?php checked( isset($options['smooth_scroll_disable_editor_mode']) ? $options['smooth_scroll_disable_editor_mode'] : 0, 1 ); ?>> |
| 1757 |
<span class="slider round"></span> |
| 1758 |
</label> |
| 1759 |
</div> |
| 1760 |
|
| 1761 |
<div class="easyel-smooth-scroll-item"> |
| 1762 |
<span class="easy-field-label"><?php echo esc_html__("Width","easy-elements"); ?></span> |
| 1763 |
<label class="easy-field-item"> |
| 1764 |
<input type="number" |
| 1765 |
name="smooth_scroll_width" |
| 1766 |
value="<?php echo isset($options['smooth_scroll_width']) ? esc_attr($options['smooth_scroll_width']) : ''; ?>"> |
| 1767 |
</label> |
| 1768 |
</div> |
| 1769 |
|
| 1770 |
<div class="easyel-smooth-scroll-item"> |
| 1771 |
<span class="easy-field-label"> |
| 1772 |
<?php echo esc_html__("Normal Color","easy-elements"); ?> |
| 1773 |
</span> |
| 1774 |
<label class="easy-field-item"> |
| 1775 |
<input type="text" class="easyel-smooth-scroll-color" |
| 1776 |
name="smooth_scroll_normal_color" |
| 1777 |
value="<?php echo isset($options['smooth_scroll_normal_color']) ? esc_attr($options['smooth_scroll_normal_color']) : ''; ?>"> |
| 1778 |
</label> |
| 1779 |
</div> |
| 1780 |
|
| 1781 |
<div class="easyel-smooth-scroll-item"> |
| 1782 |
<span class="easy-field-label"> |
| 1783 |
<?php echo esc_html__("Highlight Color","easy-elements"); ?> |
| 1784 |
</span> |
| 1785 |
<label class="easy-field-item"> |
| 1786 |
<input type="text" class="easyel-smooth-scroll-color" |
| 1787 |
name="smooth_scroll_highlight_color" |
| 1788 |
value="<?php echo isset($options['smooth_scroll_highlight_color']) ? esc_attr($options['smooth_scroll_highlight_color']) : ''; ?>"> |
| 1789 |
</label> |
| 1790 |
</div> |
| 1791 |
</div> |
| 1792 |
|
| 1793 |
<div class="easyel-smooth-scroll-save"> |
| 1794 |
<input type="submit" |
| 1795 |
class="smooth_scroll_popup_item_save" |
| 1796 |
name="smooth_scroll_popup_item_save" |
| 1797 |
value="<?php echo esc_attr__('Save Changes', 'easy-elements'); ?>"> |
| 1798 |
</div> |
| 1799 |
</form> |
| 1800 |
</div> |
| 1801 |
|
| 1802 |
</div> |
| 1803 |
<?php |
| 1804 |
} |
| 1805 |
|
| 1806 |
public function easyel_reading_progressbar_popup_display() { |
| 1807 |
|
| 1808 |
$options = get_option('easyel_reading_progressbar_settings', []); |
| 1809 |
|
| 1810 |
$display_options = [ |
| 1811 |
'global' => __( 'Entire Site', 'easy-elements' ), |
| 1812 |
'all-posts' => __( 'Posts Only', 'easy-elements' ), |
| 1813 |
'all-pages' => __( 'Pages Only', 'easy-elements' ), |
| 1814 |
'all-pages-post' => __( 'All Pages & Posts', 'easy-elements' ), |
| 1815 |
'blog-page' => __( 'Blog Page', 'easy-elements' ), |
| 1816 |
]; |
| 1817 |
|
| 1818 |
if ( ! apply_filters( 'easyel/pro_enabled', false ) ) { |
| 1819 |
foreach ( $display_options as $key => $label ) { |
| 1820 |
if ( $key !== 'global' ) { |
| 1821 |
$display_options[ $key ] = $label . ' (Pro)'; |
| 1822 |
} |
| 1823 |
} |
| 1824 |
} |
| 1825 |
|
| 1826 |
$pages = get_pages(); |
| 1827 |
|
| 1828 |
?> |
| 1829 |
<div class="easyel-reading-progressbar-popup"> |
| 1830 |
<div class="ajax-search-close-icon"> |
| 1831 |
<a class="easyel-reading-progressbar-popup-close-icon rbt-round-btn" href="#"> |
| 1832 |
<svg width="14" height="14" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 1833 |
<path d="M9.08366 1.73916L8.26116 0.916656L5.00033 4.17749L1.73949 0.916656L0.916992 1.73916L4.17783 4.99999L0.916992 8.26082L1.73949 9.08332L5.00033 5.82249L8.26116 9.08332L9.08366 8.26082L5.82283 4.99999L9.08366 1.73916Z" fill="currentColor"></path> |
| 1834 |
</svg> |
| 1835 |
</a> |
| 1836 |
</div> |
| 1837 |
|
| 1838 |
<div class="wrapper"> |
| 1839 |
<h2 class="easyel-reading-progressbar-heading"><?php echo esc_html__("Reading Progress bar Settings","easy-elements"); ?></h2> |
| 1840 |
<form method="post" action=""> |
| 1841 |
<div class="easyel-reading-progressbar-settings-main-wrapper"> |
| 1842 |
|
| 1843 |
<div class="easyel-reading-progressbar-item"> |
| 1844 |
<span class="easy-field-label"> |
| 1845 |
<?php echo esc_html__( "Progressbar Position", "easy-elements" ); ?> |
| 1846 |
</span> |
| 1847 |
|
| 1848 |
<label class="easy-field-item"> |
| 1849 |
<select class="easyel-reading-progressbar-select" |
| 1850 |
name="reading_progressbar_position"> |
| 1851 |
<option value="top" |
| 1852 |
<?php selected( $options['reading_progressbar_position'] ?? 'top', 'top' ); ?>> |
| 1853 |
<?php esc_html_e( 'Top', 'easy-elements' ); ?> |
| 1854 |
</option> |
| 1855 |
<option value="bottom" |
| 1856 |
<?php selected( $options['reading_progressbar_position'] ?? 'top', 'bottom' ); ?>> |
| 1857 |
<?php esc_html_e( 'Bottom', 'easy-elements' ); ?> |
| 1858 |
</option> |
| 1859 |
</select> |
| 1860 |
</label> |
| 1861 |
</div> |
| 1862 |
|
| 1863 |
<div class="easyel-reading-progressbar-item"> |
| 1864 |
<span class="easy-field-label"> |
| 1865 |
<?php esc_html_e( 'Display Progressbar On', 'easy-elements' ); ?> |
| 1866 |
</span> |
| 1867 |
|
| 1868 |
<div class="easyel-checkbox-group"> |
| 1869 |
<?php foreach ( $display_options as $key => $label ) : ?> |
| 1870 |
<label class="easyel-checkbox-item"> |
| 1871 |
<input type="checkbox" |
| 1872 |
name="reading_progressbar_display[]" |
| 1873 |
value="<?php echo esc_attr( $key ); ?>" |
| 1874 |
<?php |
| 1875 |
if ( ! empty( $options['reading_progressbar_display'] ) && |
| 1876 |
in_array( $key, (array) $options['reading_progressbar_display'], true ) |
| 1877 |
) { |
| 1878 |
checked( true ); |
| 1879 |
} |
| 1880 |
?> |
| 1881 |
<?php |
| 1882 |
if ( ! apply_filters( 'easyel/pro_enabled', false ) && $key !== 'global' ) { |
| 1883 |
echo ' disabled'; |
| 1884 |
} |
| 1885 |
?> |
| 1886 |
> |
| 1887 |
<?php echo esc_html( $label ); ?> |
| 1888 |
</label> |
| 1889 |
<?php endforeach; ?> |
| 1890 |
</div> |
| 1891 |
</div> |
| 1892 |
|
| 1893 |
<!-- Specific Page Select --> |
| 1894 |
<div class="easyel-reading-progressbar-item"> |
| 1895 |
<span class="easy-field-label"><?php esc_html_e( 'Specific Page', 'easy-elements' ); ?></span> |
| 1896 |
<div class="easy-field-content"> |
| 1897 |
<select |
| 1898 |
class="easyel-readingprogress-barselect2" |
| 1899 |
name="reading_progressbar_specific_page[]" |
| 1900 |
multiple |
| 1901 |
<?php if ( ! apply_filters( 'easyel/pro_enabled', false ) ) echo 'disabled'; ?> |
| 1902 |
> |
| 1903 |
<option value=""><?php esc_html_e( 'Select a page', 'easy-elements' ); ?></option> |
| 1904 |
<?php foreach( $pages as $page ): ?> |
| 1905 |
<option value="<?php echo esc_attr( $page->ID ); ?>" |
| 1906 |
<?php |
| 1907 |
if ( ! empty( $options['reading_progressbar_specific_page'] ) && |
| 1908 |
in_array( $page->ID, (array) $options['reading_progressbar_specific_page'], true ) |
| 1909 |
) { |
| 1910 |
echo 'selected'; |
| 1911 |
} |
| 1912 |
?> |
| 1913 |
> |
| 1914 |
<?php echo esc_html( $page->post_title ); ?> |
| 1915 |
</option> |
| 1916 |
<?php endforeach; ?> |
| 1917 |
</select> |
| 1918 |
|
| 1919 |
<?php if ( ! apply_filters( 'easyel/pro_enabled', false ) ) : ?> |
| 1920 |
<p class="easyel-pro-notice"><?php esc_html_e( 'Available in Pro.', 'easy-elements' ); ?></p> |
| 1921 |
<?php endif; ?> |
| 1922 |
</div> |
| 1923 |
</div> |
| 1924 |
|
| 1925 |
|
| 1926 |
<div class="easyel-reading-progressbar-item"> |
| 1927 |
<span class="easy-field-label"> |
| 1928 |
<?php esc_html_e( 'Bar Color', 'easy-elements' ); ?> |
| 1929 |
</span> |
| 1930 |
<input type="text" class="easyel-color-picker" |
| 1931 |
name="reading_progressbar_color" |
| 1932 |
value="<?php echo esc_attr( $options['reading_progressbar_color'] ?? '' ); ?>"> |
| 1933 |
</div> |
| 1934 |
<div class="easyel-reading-progressbar-item"> |
| 1935 |
<span class="easy-field-label"> |
| 1936 |
<?php esc_html_e( 'Height (px)', 'easy-elements' ); ?> |
| 1937 |
</span> |
| 1938 |
<input type="number" |
| 1939 |
name="reading_progressbar_height" |
| 1940 |
min="1" max="100" |
| 1941 |
value="<?php echo esc_attr( $options['reading_progressbar_height'] ?? '' ); ?>"> |
| 1942 |
</div> |
| 1943 |
</div> |
| 1944 |
<div class="easyel-reading-progressbar-save"> |
| 1945 |
<input type="submit" |
| 1946 |
class="reading_progressbar_popup_item_save" |
| 1947 |
name="reading_progressbar_popup_item_save" |
| 1948 |
value="<?php echo esc_attr__('Save Changes', 'easy-elements'); ?>"> |
| 1949 |
</div> |
| 1950 |
</form> |
| 1951 |
</div> |
| 1952 |
|
| 1953 |
</div> |
| 1954 |
<?php |
| 1955 |
} |
| 1956 |
|
| 1957 |
public function easyel_smooth_scroller_popup_callback() { |
| 1958 |
$this->easyel_smooth_scroller_popup_display(); |
| 1959 |
} |
| 1960 |
|
| 1961 |
public function easyel_reading_progressbar_popup_callback() { |
| 1962 |
$this->easyel_reading_progressbar_popup_display(); |
| 1963 |
} |
| 1964 |
|
| 1965 |
public function save_smooth_scroll_settings() { |
| 1966 |
|
| 1967 |
// Permission check |
| 1968 |
if ( ! current_user_can('manage_options') ) { |
| 1969 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 1970 |
} |
| 1971 |
|
| 1972 |
check_ajax_referer('easy_elements_nonce', 'nonce'); |
| 1973 |
|
| 1974 |
if ( ! isset($_POST['settings']) ) { |
| 1975 |
wp_send_json_error(['message' => 'No settings received']); |
| 1976 |
} |
| 1977 |
|
| 1978 |
$settings = map_deep( wp_unslash( $_POST['settings'] ), 'sanitize_text_field'); |
| 1979 |
|
| 1980 |
update_option('easyel_scroll_smoother_settings', $settings); |
| 1981 |
|
| 1982 |
wp_send_json_success(['message' => 'Saved successfully']); |
| 1983 |
} |
| 1984 |
|
| 1985 |
public function save_reading_progressbar_settings() { |
| 1986 |
|
| 1987 |
if ( ! current_user_can('manage_options') ) { |
| 1988 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 1989 |
} |
| 1990 |
|
| 1991 |
check_ajax_referer('easy_elements_nonce', 'nonce'); |
| 1992 |
|
| 1993 |
if ( ! isset($_POST['settings']) ) { |
| 1994 |
wp_send_json_error(['message' => 'No settings received']); |
| 1995 |
} |
| 1996 |
|
| 1997 |
$settings = map_deep( wp_unslash( $_POST['settings'] ), 'sanitize_text_field'); |
| 1998 |
|
| 1999 |
if ( isset($settings['reading_progressbar_display']) && is_array($settings['reading_progressbar_display']) ) { |
| 2000 |
$settings['reading_progressbar_display'] = array_map('sanitize_text_field', $settings['reading_progressbar_display']); |
| 2001 |
} |
| 2002 |
|
| 2003 |
if ( isset($settings['reading_progressbar_specific_page']) && is_array($settings['reading_progressbar_specific_page']) ) { |
| 2004 |
$settings['reading_progressbar_specific_page'] = array_map('absint', $settings['reading_progressbar_specific_page']); |
| 2005 |
} else { |
| 2006 |
$settings['reading_progressbar_specific_page'] = []; |
| 2007 |
} |
| 2008 |
|
| 2009 |
update_option('easyel_reading_progressbar_settings', $settings); |
| 2010 |
|
| 2011 |
wp_send_json_success(['message' => 'Saved successfully']); |
| 2012 |
} |
| 2013 |
|
| 2014 |
public function easyel_scroll_top_popup_callback() { |
| 2015 |
$this->easyel_scroll_top_popup_display(); |
| 2016 |
} |
| 2017 |
|
| 2018 |
public function easyel_scroll_top_popup_display() { |
| 2019 |
|
| 2020 |
$options = get_option( 'easyel_scroll_top_settings', [] ); |
| 2021 |
|
| 2022 |
?> |
| 2023 |
<div class="easyel-scroll-top-popup"> |
| 2024 |
<div class="ajax-search-close-icon"> |
| 2025 |
<a class="easyel-scroll-top-popup-close-icon rbt-round-btn" href="#"> |
| 2026 |
<svg width="14" height="14" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 2027 |
<path d="M9.08366 1.73916L8.26116 0.916656L5.00033 4.17749L1.73949 0.916656L0.916992 1.73916L4.17783 4.99999L0.916992 8.26082L1.73949 9.08332L5.00033 5.82249L8.26116 9.08332L9.08366 8.26082L5.82283 4.99999L9.08366 1.73916Z" fill="currentColor"></path> |
| 2028 |
</svg> |
| 2029 |
</a> |
| 2030 |
</div> |
| 2031 |
|
| 2032 |
<div class="wrapper"> |
| 2033 |
<h2 class="easyel-scroll-top-heading"><?php echo esc_html__( 'Scroll Top Settings', 'easy-elements' ); ?></h2> |
| 2034 |
<form method="post" action=""> |
| 2035 |
<div class="easyel-reading-progressbar-settings-main-wrapper"> |
| 2036 |
|
| 2037 |
<div class="easyel-reading-progressbar-item"> |
| 2038 |
<span class="easy-field-label"> |
| 2039 |
<?php echo esc_html__( 'Icon Type', 'easy-elements' ); ?> |
| 2040 |
</span> |
| 2041 |
<label class="easy-field-item"> |
| 2042 |
<select class="easyel-scroll-top-select" name="scroll_top_icon" id="scroll_top_icon_select"> |
| 2043 |
<option value="arrow" <?php selected( $options['scroll_top_icon'] ?? 'arrow', 'arrow' ); ?>> |
| 2044 |
<?php esc_html_e( 'Arrow', 'easy-elements' ); ?> |
| 2045 |
</option> |
| 2046 |
<option value="chevron" <?php selected( $options['scroll_top_icon'] ?? 'arrow', 'chevron' ); ?>> |
| 2047 |
<?php esc_html_e( 'Chevron', 'easy-elements' ); ?> |
| 2048 |
</option> |
| 2049 |
<option value="double" <?php selected( $options['scroll_top_icon'] ?? 'arrow', 'double' ); ?>> |
| 2050 |
<?php esc_html_e( 'Double Arrow', 'easy-elements' ); ?> |
| 2051 |
</option> |
| 2052 |
<option value="custom_icon" <?php selected( $options['scroll_top_icon'] ?? 'arrow', 'custom_icon' ); ?>> |
| 2053 |
<?php esc_html_e( 'Custom Icon Class', 'easy-elements' ); ?> |
| 2054 |
</option> |
| 2055 |
<option value="custom_image" <?php selected( $options['scroll_top_icon'] ?? 'arrow', 'custom_image' ); ?>> |
| 2056 |
<?php esc_html_e( 'Custom Image', 'easy-elements' ); ?> |
| 2057 |
</option> |
| 2058 |
</select> |
| 2059 |
</label> |
| 2060 |
</div> |
| 2061 |
|
| 2062 |
<div class="easyel-reading-progressbar-item easyel-scroll-top-custom-icon-row" style="<?php echo ( ($options['scroll_top_icon'] ?? '') === 'custom_icon' ) ? '' : 'display:none;'; ?>"> |
| 2063 |
<span class="easy-field-label"> |
| 2064 |
<?php esc_html_e( 'Icon Class', 'easy-elements' ); ?> |
| 2065 |
</span> |
| 2066 |
<input type="text" name="scroll_top_custom_icon" |
| 2067 |
placeholder="e.g. fas fa-arrow-up" |
| 2068 |
value="<?php echo esc_attr( $options['scroll_top_custom_icon'] ?? '' ); ?>"> |
| 2069 |
</div> |
| 2070 |
|
| 2071 |
<div class="easyel-reading-progressbar-item easyel-scroll-top-custom-image-row" style="<?php echo ( ($options['scroll_top_icon'] ?? '') === 'custom_image' ) ? '' : 'display:none;'; ?>"> |
| 2072 |
<span class="easy-field-label"> |
| 2073 |
<?php esc_html_e( 'Upload Image', 'easy-elements' ); ?> |
| 2074 |
</span> |
| 2075 |
<div style="display:flex; align-items:center; gap:10px;"> |
| 2076 |
<input type="hidden" name="scroll_top_custom_image" id="scroll_top_custom_image" |
| 2077 |
value="<?php echo esc_attr( $options['scroll_top_custom_image'] ?? '' ); ?>"> |
| 2078 |
<button type="button" class="button easyel-scroll-top-upload-btn"> |
| 2079 |
<?php esc_html_e( 'Upload', 'easy-elements' ); ?> |
| 2080 |
</button> |
| 2081 |
<button type="button" class="button easyel-scroll-top-remove-btn" style="<?php echo empty( $options['scroll_top_custom_image'] ) ? 'display:none;' : ''; ?>"> |
| 2082 |
<?php esc_html_e( 'Remove', 'easy-elements' ); ?> |
| 2083 |
</button> |
| 2084 |
</div> |
| 2085 |
<?php if ( ! empty( $options['scroll_top_custom_image'] ) ) : ?> |
| 2086 |
<img src="<?php echo esc_url( $options['scroll_top_custom_image'] ); ?>" class="easyel-scroll-top-image-preview" style="max-width:50px; max-height:50px; margin-top:8px;"> |
| 2087 |
<?php else : ?> |
| 2088 |
<img src="" class="easyel-scroll-top-image-preview" style="max-width:50px; max-height:50px; margin-top:8px; display:none;"> |
| 2089 |
<?php endif; ?> |
| 2090 |
</div> |
| 2091 |
|
| 2092 |
<div class="easyel-reading-progressbar-item"> |
| 2093 |
<span class="easy-field-label"> |
| 2094 |
<?php echo esc_html__( 'Position', 'easy-elements' ); ?> |
| 2095 |
</span> |
| 2096 |
<label class="easy-field-item"> |
| 2097 |
<select class="easyel-scroll-top-select" name="scroll_top_position"> |
| 2098 |
<option value="left" <?php selected( $options['scroll_top_position'] ?? 'right', 'left' ); ?>> |
| 2099 |
<?php esc_html_e( 'Left', 'easy-elements' ); ?> |
| 2100 |
</option> |
| 2101 |
<option value="center" <?php selected( $options['scroll_top_position'] ?? 'right', 'center' ); ?>> |
| 2102 |
<?php esc_html_e( 'Center', 'easy-elements' ); ?> |
| 2103 |
</option> |
| 2104 |
<option value="right" <?php selected( $options['scroll_top_position'] ?? 'right', 'right' ); ?>> |
| 2105 |
<?php esc_html_e( 'Right', 'easy-elements' ); ?> |
| 2106 |
</option> |
| 2107 |
</select> |
| 2108 |
</label> |
| 2109 |
</div> |
| 2110 |
|
| 2111 |
<div class="easyel-reading-progressbar-item"> |
| 2112 |
<span class="easy-field-label"> |
| 2113 |
<?php esc_html_e( 'Background Color', 'easy-elements' ); ?> |
| 2114 |
</span> |
| 2115 |
<input type="text" class="easyel-color-picker" |
| 2116 |
name="scroll_top_bg_color" |
| 2117 |
value="<?php echo esc_attr( $options['scroll_top_bg_color'] ?? '#333333' ); ?>"> |
| 2118 |
</div> |
| 2119 |
|
| 2120 |
<div class="easyel-reading-progressbar-item"> |
| 2121 |
<span class="easy-field-label"> |
| 2122 |
<?php esc_html_e( 'Icon Color', 'easy-elements' ); ?> |
| 2123 |
</span> |
| 2124 |
<input type="text" class="easyel-color-picker" |
| 2125 |
name="scroll_top_icon_color" |
| 2126 |
value="<?php echo esc_attr( $options['scroll_top_icon_color'] ?? '#ffffff' ); ?>"> |
| 2127 |
</div> |
| 2128 |
|
| 2129 |
<div class="easyel-reading-progressbar-item"> |
| 2130 |
<span class="easy-field-label"> |
| 2131 |
<?php esc_html_e( 'Size (px)', 'easy-elements' ); ?> |
| 2132 |
</span> |
| 2133 |
<input type="number" name="scroll_top_size" |
| 2134 |
min="30" max="80" |
| 2135 |
value="<?php echo esc_attr( $options['scroll_top_size'] ?? '45' ); ?>"> |
| 2136 |
</div> |
| 2137 |
|
| 2138 |
<div class="easyel-reading-progressbar-item"> |
| 2139 |
<span class="easy-field-label"> |
| 2140 |
<?php esc_html_e( 'Border Radius (%)', 'easy-elements' ); ?> |
| 2141 |
</span> |
| 2142 |
<input type="number" name="scroll_top_radius" |
| 2143 |
min="0" max="50" |
| 2144 |
value="<?php echo esc_attr( $options['scroll_top_radius'] ?? '50' ); ?>"> |
| 2145 |
</div> |
| 2146 |
|
| 2147 |
<div class="easyel-reading-progressbar-item"> |
| 2148 |
<span class="easy-field-label"> |
| 2149 |
<?php esc_html_e( 'Border Width (px)', 'easy-elements' ); ?> |
| 2150 |
</span> |
| 2151 |
<input type="number" name="scroll_top_border_width" |
| 2152 |
min="0" max="10" |
| 2153 |
value="<?php echo esc_attr( $options['scroll_top_border_width'] ?? '0' ); ?>"> |
| 2154 |
</div> |
| 2155 |
|
| 2156 |
<div class="easyel-reading-progressbar-item"> |
| 2157 |
<span class="easy-field-label"> |
| 2158 |
<?php esc_html_e( 'Border Color', 'easy-elements' ); ?> |
| 2159 |
</span> |
| 2160 |
<input type="text" class="easyel-color-picker" |
| 2161 |
name="scroll_top_border_color" |
| 2162 |
value="<?php echo esc_attr( $options['scroll_top_border_color'] ?? '#cccccc' ); ?>"> |
| 2163 |
</div> |
| 2164 |
|
| 2165 |
<div class="easyel-reading-progressbar-item"> |
| 2166 |
<span class="easy-field-label"> |
| 2167 |
<?php esc_html_e( 'Hover Background Color', 'easy-elements' ); ?> |
| 2168 |
</span> |
| 2169 |
<input type="text" class="easyel-color-picker" |
| 2170 |
name="scroll_top_hover_bg_color" |
| 2171 |
value="<?php echo esc_attr( $options['scroll_top_hover_bg_color'] ?? '#000000' ); ?>"> |
| 2172 |
</div> |
| 2173 |
|
| 2174 |
<div class="easyel-reading-progressbar-item"> |
| 2175 |
<span class="easy-field-label"> |
| 2176 |
<?php esc_html_e( 'Hover Icon Color', 'easy-elements' ); ?> |
| 2177 |
</span> |
| 2178 |
<input type="text" class="easyel-color-picker" |
| 2179 |
name="scroll_top_hover_icon_color" |
| 2180 |
value="<?php echo esc_attr( $options['scroll_top_hover_icon_color'] ?? '#ffffff' ); ?>"> |
| 2181 |
</div> |
| 2182 |
|
| 2183 |
<div class="easyel-reading-progressbar-item"> |
| 2184 |
<span class="easy-field-label"> |
| 2185 |
<?php esc_html_e( 'Hover Border Color', 'easy-elements' ); ?> |
| 2186 |
</span> |
| 2187 |
<input type="text" class="easyel-color-picker" |
| 2188 |
name="scroll_top_hover_border_color" |
| 2189 |
value="<?php echo esc_attr( $options['scroll_top_hover_border_color'] ?? '#cccccc' ); ?>"> |
| 2190 |
</div> |
| 2191 |
|
| 2192 |
<div class="easyel-reading-progressbar-item"> |
| 2193 |
<span class="easy-field-label"> |
| 2194 |
<?php esc_html_e( 'Show After Scroll (px)', 'easy-elements' ); ?> |
| 2195 |
</span> |
| 2196 |
<input type="number" name="scroll_top_offset" |
| 2197 |
min="0" max="2000" |
| 2198 |
value="<?php echo esc_attr( $options['scroll_top_offset'] ?? '300' ); ?>"> |
| 2199 |
</div> |
| 2200 |
|
| 2201 |
</div> |
| 2202 |
<div class="easyel-reading-progressbar-save"> |
| 2203 |
<input type="submit" |
| 2204 |
class="scroll_top_popup_item_save" |
| 2205 |
name="scroll_top_popup_item_save" |
| 2206 |
value="<?php echo esc_attr__( 'Save Changes', 'easy-elements' ); ?>"> |
| 2207 |
</div> |
| 2208 |
</form> |
| 2209 |
</div> |
| 2210 |
</div> |
| 2211 |
<?php |
| 2212 |
} |
| 2213 |
|
| 2214 |
public function save_scroll_top_settings() { |
| 2215 |
|
| 2216 |
if ( ! current_user_can( 'manage_options' ) ) { |
| 2217 |
wp_send_json_error( __( 'Unauthorized', 'easy-elements' ) ); |
| 2218 |
} |
| 2219 |
|
| 2220 |
check_ajax_referer( 'easy_elements_nonce', 'nonce' ); |
| 2221 |
|
| 2222 |
if ( ! isset( $_POST['settings'] ) ) { |
| 2223 |
wp_send_json_error( [ 'message' => 'No settings received' ] ); |
| 2224 |
} |
| 2225 |
|
| 2226 |
$settings = map_deep( wp_unslash( $_POST['settings'] ), 'sanitize_text_field' ); |
| 2227 |
|
| 2228 |
update_option( 'easyel_scroll_top_settings', $settings ); |
| 2229 |
|
| 2230 |
wp_send_json_success( [ 'message' => 'Saved successfully' ] ); |
| 2231 |
} |
| 2232 |
|
| 2233 |
/** |
| 2234 |
* Render Preloader settings popup callback (free extension). |
| 2235 |
*/ |
| 2236 |
public function easyel_preloader_popup_callback() { |
| 2237 |
$this->easyel_preloader_popup_display(); |
| 2238 |
} |
| 2239 |
|
| 2240 |
/** |
| 2241 |
* Render the Preloader settings modal markup. |
| 2242 |
*/ |
| 2243 |
public function easyel_preloader_popup_display() { |
| 2244 |
|
| 2245 |
$defaults = array( |
| 2246 |
'preloader_style' => 'circle', |
| 2247 |
'preloader_bg_color' => '#ffffff', |
| 2248 |
'preloader_color' => '#5933ff', |
| 2249 |
'preloader_secondary_color' => '#e0e0e0', |
| 2250 |
'preloader_size' => 60, |
| 2251 |
'preloader_speed' => 1.0, |
| 2252 |
'preloader_min_time' => 500, |
| 2253 |
'preloader_fadeout_time' => 600, |
| 2254 |
'preloader_logo' => '', |
| 2255 |
'preloader_logo_width' => 36, |
| 2256 |
'preloader_logo_height' => 36, |
| 2257 |
'preloader_disable_mobile' => 0, |
| 2258 |
); |
| 2259 |
|
| 2260 |
$saved = get_option( 'easyel_preloader_settings', array() ); |
| 2261 |
$options = wp_parse_args( is_array( $saved ) ? $saved : array(), $defaults ); |
| 2262 |
|
| 2263 |
$styles = array( |
| 2264 |
'circle' => __( 'Circle Spinner', 'easy-elements' ), |
| 2265 |
'dotted_circle' => __( 'Dotted Circle Spinner', 'easy-elements' ), |
| 2266 |
'dots' => __( 'Bouncing Dots', 'easy-elements' ), |
| 2267 |
'bars' => __( 'Audio Bars', 'easy-elements' ), |
| 2268 |
'pulse' => __( 'Pulse', 'easy-elements' ), |
| 2269 |
'custom_logo' => __( 'Custom Logo', 'easy-elements' ), |
| 2270 |
); |
| 2271 |
?> |
| 2272 |
<div class="easyel-preloader-popup"> |
| 2273 |
<div class="ajax-search-close-icon"> |
| 2274 |
<a class="easyel-preloader-popup-close-icon rbt-round-btn" href="#"> |
| 2275 |
<svg width="14" height="14" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 2276 |
<path d="M9.08366 1.73916L8.26116 0.916656L5.00033 4.17749L1.73949 0.916656L0.916992 1.73916L4.17783 4.99999L0.916992 8.26082L1.73949 9.08332L5.00033 5.82249L8.26116 9.08332L9.08366 8.26082L5.82283 4.99999L9.08366 1.73916Z" fill="currentColor"></path> |
| 2277 |
</svg> |
| 2278 |
</a> |
| 2279 |
</div> |
| 2280 |
|
| 2281 |
<div class="wrapper"> |
| 2282 |
<h2 class="easyel-preloader-heading"><?php esc_html_e( 'Preloader Settings', 'easy-elements' ); ?></h2> |
| 2283 |
<form method="post" action=""> |
| 2284 |
<div class="easyel-reading-progressbar-settings-main-wrapper"> |
| 2285 |
|
| 2286 |
<div class="easyel-reading-progressbar-item"> |
| 2287 |
<span class="easy-field-label"><?php esc_html_e( 'Style', 'easy-elements' ); ?></span> |
| 2288 |
<label class="easy-field-item"> |
| 2289 |
<select class="easyel-preloader-select" name="preloader_style"> |
| 2290 |
<?php foreach ( $styles as $value => $label ) : ?> |
| 2291 |
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $options['preloader_style'], $value ); ?>> |
| 2292 |
<?php echo esc_html( $label ); ?> |
| 2293 |
</option> |
| 2294 |
<?php endforeach; ?> |
| 2295 |
</select> |
| 2296 |
</label> |
| 2297 |
</div> |
| 2298 |
|
| 2299 |
<div class="easyel-reading-progressbar-item easyel-preloader-field-logo-only"> |
| 2300 |
<span class="easy-field-label"><?php esc_html_e( 'Logo Image URL', 'easy-elements' ); ?></span> |
| 2301 |
<div style="display:flex; align-items:center; gap:10px;"> |
| 2302 |
<input type="text" class="easyel-preloader-logo-input" |
| 2303 |
name="preloader_logo" |
| 2304 |
placeholder="https://example.com/logo.png" |
| 2305 |
value="<?php echo esc_attr( $options['preloader_logo'] ); ?>"> |
| 2306 |
<button type="button" class="button easyel-preloader-upload-btn"> |
| 2307 |
<?php esc_html_e( 'Upload', 'easy-elements' ); ?> |
| 2308 |
</button> |
| 2309 |
<button type="button" class="button easyel-preloader-remove-btn" style="<?php echo empty( $options['preloader_logo'] ) ? 'display:none;' : ''; ?>"> |
| 2310 |
<?php esc_html_e( 'Remove', 'easy-elements' ); ?> |
| 2311 |
</button> |
| 2312 |
</div> |
| 2313 |
</div> |
| 2314 |
|
| 2315 |
<div class="easyel-reading-progressbar-item easyel-preloader-field-logo-only"> |
| 2316 |
<span class="easy-field-label"><?php esc_html_e( 'Logo Width (px)', 'easy-elements' ); ?></span> |
| 2317 |
<input type="number" name="preloader_logo_width" |
| 2318 |
min="5" max="500" step="1" |
| 2319 |
value="<?php echo esc_attr( $options['preloader_logo_width'] ); ?>"> |
| 2320 |
</div> |
| 2321 |
|
| 2322 |
<div class="easyel-reading-progressbar-item easyel-preloader-field-logo-only"> |
| 2323 |
<span class="easy-field-label"><?php esc_html_e( 'Logo Height (px)', 'easy-elements' ); ?></span> |
| 2324 |
<input type="number" name="preloader_logo_height" |
| 2325 |
min="5" max="500" step="1" |
| 2326 |
value="<?php echo esc_attr( $options['preloader_logo_height'] ); ?>"> |
| 2327 |
</div> |
| 2328 |
|
| 2329 |
<div class="easyel-reading-progressbar-item"> |
| 2330 |
<span class="easy-field-label"><?php esc_html_e( 'Background Color', 'easy-elements' ); ?></span> |
| 2331 |
<input type="text" class="easyel-color-picker" |
| 2332 |
name="preloader_bg_color" |
| 2333 |
value="<?php echo esc_attr( $options['preloader_bg_color'] ); ?>"> |
| 2334 |
</div> |
| 2335 |
|
| 2336 |
<div class="easyel-reading-progressbar-item"> |
| 2337 |
<span class="easy-field-label"><?php esc_html_e( 'Spinner Color', 'easy-elements' ); ?></span> |
| 2338 |
<input type="text" class="easyel-color-picker" |
| 2339 |
name="preloader_color" |
| 2340 |
value="<?php echo esc_attr( $options['preloader_color'] ); ?>"> |
| 2341 |
</div> |
| 2342 |
|
| 2343 |
<div class="easyel-reading-progressbar-item easyel-preloader-field-secondary-only"> |
| 2344 |
<span class="easy-field-label"><?php esc_html_e( 'Spinner Secondary Color', 'easy-elements' ); ?></span> |
| 2345 |
<input type="text" class="easyel-color-picker" |
| 2346 |
name="preloader_secondary_color" |
| 2347 |
value="<?php echo esc_attr( $options['preloader_secondary_color'] ); ?>"> |
| 2348 |
</div> |
| 2349 |
|
| 2350 |
<div class="easyel-reading-progressbar-item"> |
| 2351 |
<span class="easy-field-label"><?php esc_html_e( 'Size (px)', 'easy-elements' ); ?></span> |
| 2352 |
<input type="number" name="preloader_size" |
| 2353 |
min="10" max="200" step="1" |
| 2354 |
value="<?php echo esc_attr( $options['preloader_size'] ); ?>"> |
| 2355 |
</div> |
| 2356 |
|
| 2357 |
<div class="easyel-reading-progressbar-item"> |
| 2358 |
<span class="easy-field-label"><?php esc_html_e( 'Animation Speed (s)', 'easy-elements' ); ?></span> |
| 2359 |
<input type="number" name="preloader_speed" |
| 2360 |
min="0.1" max="5" step="0.1" |
| 2361 |
value="<?php echo esc_attr( $options['preloader_speed'] ); ?>"> |
| 2362 |
</div> |
| 2363 |
|
| 2364 |
<div class="easyel-reading-progressbar-item"> |
| 2365 |
<span class="easy-field-label"><?php esc_html_e( 'Minimum Display Time (ms)', 'easy-elements' ); ?></span> |
| 2366 |
<input type="number" name="preloader_min_time" |
| 2367 |
min="0" max="10000" step="50" |
| 2368 |
value="<?php echo esc_attr( $options['preloader_min_time'] ); ?>"> |
| 2369 |
</div> |
| 2370 |
|
| 2371 |
<div class="easyel-reading-progressbar-item"> |
| 2372 |
<span class="easy-field-label"><?php esc_html_e( 'Fade Out Duration (ms)', 'easy-elements' ); ?></span> |
| 2373 |
<input type="number" name="preloader_fadeout_time" |
| 2374 |
min="0" max="3000" step="50" |
| 2375 |
value="<?php echo esc_attr( $options['preloader_fadeout_time'] ); ?>"> |
| 2376 |
</div> |
| 2377 |
|
| 2378 |
<div class="easyel-smooth-scroll-item"> |
| 2379 |
<span class="easy-field-label"><?php esc_html_e( 'Disable on Mobile', 'easy-elements' ); ?></span> |
| 2380 |
<label class="easy-field-item easy-toggle-switch"> |
| 2381 |
<input type="checkbox" name="preloader_disable_mobile" value="1" |
| 2382 |
<?php checked( ! empty( $options['preloader_disable_mobile'] ), true ); ?>> |
| 2383 |
<span class="slider round"></span> |
| 2384 |
</label> |
| 2385 |
</div> |
| 2386 |
|
| 2387 |
</div> |
| 2388 |
<div class="easyel-reading-progressbar-save"> |
| 2389 |
<input type="submit" |
| 2390 |
class="easyel_preloader_popup_item_save" |
| 2391 |
name="easyel_preloader_popup_item_save" |
| 2392 |
value="<?php echo esc_attr__( 'Save Changes', 'easy-elements' ); ?>"> |
| 2393 |
</div> |
| 2394 |
</form> |
| 2395 |
</div> |
| 2396 |
</div> |
| 2397 |
<?php |
| 2398 |
} |
| 2399 |
|
| 2400 |
/** |
| 2401 |
* AJAX handler to save Preloader settings. |
| 2402 |
*/ |
| 2403 |
public function easyel_save_preloader_settings() { |
| 2404 |
|
| 2405 |
if ( ! current_user_can( 'manage_options' ) ) { |
| 2406 |
wp_send_json_error( __( 'Unauthorized', 'easy-elements' ) ); |
| 2407 |
} |
| 2408 |
|
| 2409 |
check_ajax_referer( 'easy_elements_nonce', 'nonce' ); |
| 2410 |
|
| 2411 |
if ( ! isset( $_POST['settings'] ) ) { |
| 2412 |
wp_send_json_error( array( 'message' => __( 'No settings received', 'easy-elements' ) ) ); |
| 2413 |
} |
| 2414 |
|
| 2415 |
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 2416 |
$raw = wp_unslash( $_POST['settings'] ); |
| 2417 |
if ( ! is_array( $raw ) ) { |
| 2418 |
$raw = array(); |
| 2419 |
} |
| 2420 |
|
| 2421 |
$allowed_styles = array( 'circle', 'dotted_circle', 'dots', 'bars', 'pulse', 'custom_logo' ); |
| 2422 |
|
| 2423 |
$clean = array( |
| 2424 |
'preloader_style' => isset( $raw['preloader_style'] ) && in_array( $raw['preloader_style'], $allowed_styles, true ) |
| 2425 |
? $raw['preloader_style'] |
| 2426 |
: 'circle', |
| 2427 |
'preloader_bg_color' => isset( $raw['preloader_bg_color'] ) |
| 2428 |
? ( sanitize_hex_color( $raw['preloader_bg_color'] ) ? sanitize_hex_color( $raw['preloader_bg_color'] ) : '#ffffff' ) |
| 2429 |
: '#ffffff', |
| 2430 |
'preloader_color' => isset( $raw['preloader_color'] ) |
| 2431 |
? ( sanitize_hex_color( $raw['preloader_color'] ) ? sanitize_hex_color( $raw['preloader_color'] ) : '#5933ff' ) |
| 2432 |
: '#5933ff', |
| 2433 |
'preloader_secondary_color' => isset( $raw['preloader_secondary_color'] ) |
| 2434 |
? ( sanitize_hex_color( $raw['preloader_secondary_color'] ) ? sanitize_hex_color( $raw['preloader_secondary_color'] ) : '#e0e0e0' ) |
| 2435 |
: '#e0e0e0', |
| 2436 |
'preloader_size' => isset( $raw['preloader_size'] ) ? max( 10, min( 200, absint( $raw['preloader_size'] ) ) ) : 60, |
| 2437 |
'preloader_speed' => isset( $raw['preloader_speed'] ) ? max( 0.1, min( 5, (float) $raw['preloader_speed'] ) ) : 1.0, |
| 2438 |
'preloader_min_time' => isset( $raw['preloader_min_time'] ) ? max( 0, min( 10000, absint( $raw['preloader_min_time'] ) ) ) : 500, |
| 2439 |
'preloader_fadeout_time' => isset( $raw['preloader_fadeout_time'] ) ? max( 0, min( 3000, absint( $raw['preloader_fadeout_time'] ) ) ) : 600, |
| 2440 |
'preloader_logo' => isset( $raw['preloader_logo'] ) ? esc_url_raw( $raw['preloader_logo'] ) : '', |
| 2441 |
'preloader_logo_width' => isset( $raw['preloader_logo_width'] ) ? max( 5, min( 500, absint( $raw['preloader_logo_width'] ) ) ) : 36, |
| 2442 |
'preloader_logo_height' => isset( $raw['preloader_logo_height'] ) ? max( 5, min( 500, absint( $raw['preloader_logo_height'] ) ) ) : 36, |
| 2443 |
'preloader_disable_mobile' => ! empty( $raw['preloader_disable_mobile'] ) ? 1 : 0, |
| 2444 |
); |
| 2445 |
|
| 2446 |
update_option( 'easyel_preloader_settings', $clean ); |
| 2447 |
|
| 2448 |
wp_send_json_success( array( 'message' => __( 'Saved successfully', 'easy-elements' ) ) ); |
| 2449 |
} |
| 2450 |
|
| 2451 |
} |
| 2452 |
|
| 2453 |
// Initialize the plugin |
| 2454 |
Admin_Settings::get_instance(); |