| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
class Easyel_Elements { |
| 7 |
|
| 8 |
// Singleton instance |
| 9 |
private static $instance = null; |
| 10 |
|
| 11 |
private function __construct() { |
| 12 |
// Hooks |
| 13 |
|
| 14 |
// Custom Font Load Free |
| 15 |
|
| 16 |
add_action( 'admin_menu', array( $this, 'easyel_elements_settings_menu' ) ); |
| 17 |
add_action( 'admin_init', array( $this, 'easyel_elements_register_settings' ) ); |
| 18 |
|
| 19 |
add_action( 'easyel_smooth_scroller_popup', array( $this, 'easyel_smooth_scroller_popup_callback' ), 5 ); |
| 20 |
|
| 21 |
$this->easyel_settings_ajax(); |
| 22 |
|
| 23 |
} |
| 24 |
|
| 25 |
public function easyel_settings_ajax( ) { |
| 26 |
|
| 27 |
// AJAX handler for saving minify js option |
| 28 |
|
| 29 |
add_action('wp_ajax_easy_elements_save_widget_setting', array( $this, "easy_elements_save_widget_setting" ) ); |
| 30 |
add_action('wp_ajax_easy_elements_bulk_action', array( $this, 'easy_elements_bulk_action') ); |
| 31 |
|
| 32 |
add_action('wp_ajax_easy_elements_save_global_extensions', array( $this, 'easy_elements_save_global_extensions') ) ; |
| 33 |
add_action('wp_ajax_easy_elements_save_global_extensions_bulk', array( $this, 'easy_elements_save_global_extensions_bulk') ) ; |
| 34 |
|
| 35 |
add_action('wp_ajax_easy_elements_bulk_group_action', [$this, 'easy_elements_bulk_group_action']); |
| 36 |
|
| 37 |
add_action('admin_enqueue_scripts', array( $this, 'easyel_elements_enqueue_admin_assets') ); |
| 38 |
add_action( 'admin_head', array( $this, 'easyel_hide_admin_notices' ) ); |
| 39 |
|
| 40 |
add_action('wp_ajax_easyel_save_user_data', array( $this, 'easyel_save_user_data_callback') ); |
| 41 |
|
| 42 |
add_action('wp_ajax_save_smooth_scroll_settings', array( $this, 'save_smooth_scroll_settings')); |
| 43 |
add_action('wp_ajax_nopriv_save_smooth_scroll_settings', array( $this, 'save_smooth_scroll_settings') ); |
| 44 |
|
| 45 |
} |
| 46 |
|
| 47 |
// Singleton get_instance |
| 48 |
public static function get_instance() { |
| 49 |
if (self::$instance === null) { |
| 50 |
self::$instance = new self(); |
| 51 |
} |
| 52 |
return self::$instance; |
| 53 |
} |
| 54 |
|
| 55 |
public function easyel_save_user_data_callback() { |
| 56 |
|
| 57 |
check_ajax_referer('easy_elements_nonce', 'security'); |
| 58 |
|
| 59 |
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 60 |
$posted = $_POST['settings'] ?? []; |
| 61 |
$settings = map_deep( wp_unslash( $posted ), 'sanitize_text_field' ); |
| 62 |
|
| 63 |
update_option( 'easy_element_user_data', $settings ); |
| 64 |
|
| 65 |
wp_send_json_success(['message' => 'Saved successfully!']); |
| 66 |
} |
| 67 |
|
| 68 |
public function easyel_elements_settings_menu() { |
| 69 |
|
| 70 |
// Main Menu |
| 71 |
add_menu_page( |
| 72 |
__('Easy Elements', 'easy-elements'), |
| 73 |
__('Easy Elements', 'easy-elements'), |
| 74 |
'manage_options', |
| 75 |
'easy-elements-dashboard', |
| 76 |
array( $this, 'easyel_elements_settings_callback' ), |
| 77 |
'dashicons-admin-generic', |
| 78 |
59 |
| 79 |
); |
| 80 |
|
| 81 |
global $submenu; |
| 82 |
|
| 83 |
// Main slug |
| 84 |
$slug = 'easy-elements-dashboard'; |
| 85 |
|
| 86 |
$submenu[$slug][] = [ __('Overview', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#overview' ]; |
| 87 |
$submenu[$slug][] = [ __('Widgets', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#widget' ]; |
| 88 |
$submenu[$slug][] = [ __('All Extensions', 'easy-elements'), 'manage_options', 'admin.php?page='.$slug.'#extensions' ]; |
| 89 |
|
| 90 |
// Header & Footer Submenu |
| 91 |
add_submenu_page( |
| 92 |
'easy-elements-dashboard', |
| 93 |
__('Header & Footer', 'easy-elements'), |
| 94 |
__('Header & Footer', 'easy-elements'), |
| 95 |
'manage_options', |
| 96 |
'edit.php?post_type=ee-elementor-hf' |
| 97 |
); |
| 98 |
|
| 99 |
// Upload Custom Fonts Submenu |
| 100 |
add_submenu_page( |
| 101 |
'easy-elements-dashboard', |
| 102 |
__('Upload Custom Fonts', 'easy-elements'), |
| 103 |
__('Upload Custom Fonts', 'easy-elements'), |
| 104 |
'manage_options', |
| 105 |
'easyel-custom-fonts', |
| 106 |
array( $this, 'easyel_custom_fonts_page_html' ) |
| 107 |
); |
| 108 |
|
| 109 |
// Off Canvas Submenu |
| 110 |
add_submenu_page( |
| 111 |
'easy-elements-dashboard', |
| 112 |
__('Off Canvas', 'easy-elements'), |
| 113 |
__('Off Canvas', 'easy-elements'), |
| 114 |
'manage_options', |
| 115 |
'edit.php?post_type=easy-offcanvas' |
| 116 |
); |
| 117 |
} |
| 118 |
|
| 119 |
public function easyel_elements_register_settings() { |
| 120 |
register_setting( 'easyel_elements_extensions_group', 'easyel_enable_js_animation', [ |
| 121 |
'sanitize_callback' => 'absint', |
| 122 |
'default' => 0, |
| 123 |
] ); |
| 124 |
|
| 125 |
// Cursor setting register |
| 126 |
register_setting( 'easyel_elements_extensions_group', 'easyel_enable_cursor', [ |
| 127 |
'sanitize_callback' => 'absint', |
| 128 |
'default' => 0, |
| 129 |
] ); |
| 130 |
} |
| 131 |
|
| 132 |
public function easy_elements_bulk_group_action() { |
| 133 |
|
| 134 |
if (!current_user_can('manage_options')) { |
| 135 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 136 |
} |
| 137 |
|
| 138 |
check_ajax_referer('easy_elements_bulk_action_nonce', 'nonce'); |
| 139 |
|
| 140 |
$group = isset($_POST['group']) ? sanitize_text_field(wp_unslash($_POST['group'])) : ''; |
| 141 |
$tab = isset($_POST['tab']) ? sanitize_text_field(wp_unslash($_POST['tab'])) : 'widget'; |
| 142 |
$status = isset($_POST['status']) && $_POST['status'] == 1 ? '1' : '0'; |
| 143 |
|
| 144 |
$available_elements = $this->easyel_elements_get_available_widgets(); |
| 145 |
$updated_count = 0; |
| 146 |
|
| 147 |
$is_pro_active = class_exists('Easy_Elements_Pro'); |
| 148 |
|
| 149 |
foreach ($available_elements as $key => $widget) { |
| 150 |
|
| 151 |
if (!isset($widget['tab']) || $widget['tab'] !== $tab) { |
| 152 |
continue; |
| 153 |
} |
| 154 |
|
| 155 |
$group_slug = strtolower(trim($group)); |
| 156 |
|
| 157 |
$widget_group = isset( $widget['group'] ) ? $widget['group'] : 'General Widgets'; |
| 158 |
|
| 159 |
$widget_group_slug = strtolower(trim(str_replace(' ', '-', $widget_group ) ) ); |
| 160 |
|
| 161 |
if ($widget_group_slug !== $group_slug) { |
| 162 |
continue; |
| 163 |
} |
| 164 |
|
| 165 |
$option_name = 'easy_element_' . $tab . '_' . $key; |
| 166 |
|
| 167 |
if (!$is_pro_active && isset($widget['is_pro']) && $widget['is_pro']) { |
| 168 |
update_option($option_name, '0'); |
| 169 |
} else { |
| 170 |
update_option($option_name, $status); |
| 171 |
} |
| 172 |
|
| 173 |
$updated_count++; |
| 174 |
} |
| 175 |
|
| 176 |
wp_send_json_success([ |
| 177 |
'message' => sprintf('%d widgets %s successfully', $updated_count, $status ? 'activated' : 'deactivated'), |
| 178 |
'count' => $updated_count, |
| 179 |
'is_pro_active' => $is_pro_active, |
| 180 |
'status' => $status |
| 181 |
]); |
| 182 |
} |
| 183 |
|
| 184 |
public function easy_elements_save_global_extensions_bulk() { |
| 185 |
if ( ! current_user_can( 'manage_options' ) ) { |
| 186 |
wp_send_json_error( __( 'Unauthorized', 'easy-elements' ) ); |
| 187 |
} |
| 188 |
|
| 189 |
check_ajax_referer( 'easy_elements_widget_settings_nonce', 'nonce' ); |
| 190 |
|
| 191 |
$tab = isset( $_POST['tab'] ) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'extensions'; |
| 192 |
$keys = isset( $_POST['keys'] ) ? array_map( 'sanitize_text_field', (array) wp_unslash( $_POST['keys'] ) ) : []; |
| 193 |
$status = isset( $_POST['status'] ) ? intval( wp_unslash( $_POST['status'] ) ) : 0; |
| 194 |
$group_slug = isset( $_POST['group'] ) ? sanitize_text_field( wp_unslash( $_POST['group'] ) ) : ''; |
| 195 |
|
| 196 |
if ( empty( $keys ) ) { |
| 197 |
wp_send_json_error( [ 'message' => __( 'No keys provided', 'easy-elements' ) ] ); |
| 198 |
} |
| 199 |
|
| 200 |
$settings = get_option( 'easy_element_' . $tab, [] ); |
| 201 |
|
| 202 |
foreach ( $keys as $key ) { |
| 203 |
$key = sanitize_text_field( $key ); |
| 204 |
$settings[ $key ] = $status; |
| 205 |
} |
| 206 |
|
| 207 |
update_option( 'easy_element_' . $tab, $settings ); |
| 208 |
|
| 209 |
if ( $group_slug ) { |
| 210 |
update_option( 'easy_element_group_' . $group_slug, $status ); |
| 211 |
} |
| 212 |
|
| 213 |
wp_send_json_success( [ 'message' => __( 'Bulk settings updated', 'easy-elements' ) ] ); |
| 214 |
} |
| 215 |
|
| 216 |
public function easy_elements_save_global_extensions() { |
| 217 |
if (!current_user_can('manage_options')) { |
| 218 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 219 |
} |
| 220 |
|
| 221 |
check_ajax_referer('easy_elements_widget_settings_nonce', 'nonce'); |
| 222 |
|
| 223 |
$tab = isset( $_POST['tab'] ) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'extensions'; |
| 224 |
$key = isset($_POST['key']) ? sanitize_text_field( wp_unslash( $_POST['key'] )) : ''; |
| 225 |
$status = isset( $_POST['status'] ) ? intval( wp_unslash( $_POST['status'] ) ) : 0; |
| 226 |
|
| 227 |
if (!$key) { |
| 228 |
wp_send_json_error(['message' => __('Invalid key', 'easy-elements')]); |
| 229 |
} |
| 230 |
|
| 231 |
$settings = get_option('easy_element_' . $tab, []); |
| 232 |
$settings[$key] = $status; |
| 233 |
|
| 234 |
update_option('easy_element_' . $tab, $settings); |
| 235 |
|
| 236 |
wp_send_json_success(['message' => __('Settings updated', 'easy-elements')]); |
| 237 |
} |
| 238 |
|
| 239 |
|
| 240 |
// AJAX handler for saving individual widget settings |
| 241 |
|
| 242 |
public function easy_elements_save_widget_setting() { |
| 243 |
if (!current_user_can('manage_options')) { |
| 244 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 245 |
} |
| 246 |
check_ajax_referer('easy_elements_widget_settings_nonce', 'nonce'); |
| 247 |
|
| 248 |
$widget_key = isset($_POST['widget_key']) ? sanitize_text_field( wp_unslash($_POST['widget_key'] ) ) : ''; |
| 249 |
$status = isset($_POST['status']) && $_POST['status'] === '1' ? '1' : '0'; |
| 250 |
$tab_slug = isset($_POST['tab']) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'widget'; |
| 251 |
|
| 252 |
if (!empty( $widget_key ) ) { |
| 253 |
$option_name = 'easy_element_' . $tab_slug . '_' . $widget_key; |
| 254 |
|
| 255 |
update_option($option_name, $status); |
| 256 |
|
| 257 |
wp_send_json_success([ |
| 258 |
'message' => __('Widget setting updated successfully', 'easy-elements'), |
| 259 |
'status' => $status, |
| 260 |
]); |
| 261 |
} else { |
| 262 |
wp_send_json_error(['message' => __('Invalid widget key', 'easy-elements')]); |
| 263 |
} |
| 264 |
} |
| 265 |
|
| 266 |
// AJAX handler for bulk actions |
| 267 |
public function easy_elements_bulk_action() { |
| 268 |
if (!current_user_can('manage_options')) { |
| 269 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 270 |
} |
| 271 |
check_ajax_referer('easy_elements_bulk_action_nonce', 'nonce'); |
| 272 |
|
| 273 |
$bulk_action = isset($_POST['bulk_action']) ? sanitize_text_field(wp_unslash($_POST['bulk_action'])) : ''; |
| 274 |
$tab = isset($_POST['tab']) ? sanitize_text_field( wp_unslash( $_POST['tab'] ) ) : 'widget'; |
| 275 |
$status = $bulk_action === 'activate_all' ? '1' : '0'; |
| 276 |
|
| 277 |
$available_elements = $this->easyel_elements_get_available_widgets(); |
| 278 |
$updated_count = 0; |
| 279 |
|
| 280 |
$is_pro_active = class_exists('Easy_Elements_Pro'); |
| 281 |
|
| 282 |
foreach ($available_elements as $key => $widget) { |
| 283 |
if (isset($widget['tab']) && $widget['tab'] === $tab) { |
| 284 |
$option_name = 'easy_element_' . $tab . '_' . $key; |
| 285 |
|
| 286 |
if (!$is_pro_active && isset($widget['is_pro']) && $widget['is_pro']) { |
| 287 |
update_option($option_name, '0'); |
| 288 |
} else { |
| 289 |
$status = $bulk_action === 'activate_all' ? '1' : '0'; |
| 290 |
update_option($option_name, $status); |
| 291 |
} |
| 292 |
} |
| 293 |
} |
| 294 |
|
| 295 |
wp_send_json_success([ |
| 296 |
'message' => sprintf('%d widgets %s successfully', $updated_count, $status ? 'activated' : 'deactivated'), |
| 297 |
'count' => $updated_count, |
| 298 |
'is_pro_active' => $is_pro_active |
| 299 |
]); |
| 300 |
} |
| 301 |
|
| 302 |
|
| 303 |
function easyel_elements_settings_callback() { |
| 304 |
$available_elements = $this->easyel_elements_get_available_widgets(); |
| 305 |
|
| 306 |
$easyel_tabs = [ |
| 307 |
'overview' => __('Overview', 'easy-elements'), |
| 308 |
'widget' => __('All Widgets', 'easy-elements'), |
| 309 |
'extensions' => __('All Extensions', 'easy-elements'), |
| 310 |
'advsettings' => __('Advanced Settings', 'easy-elements'), |
| 311 |
'userData' => __('API Settings', 'easy-elements'), |
| 312 |
]; |
| 313 |
|
| 314 |
$easyel_tab_list = apply_filters("easyel_all_tab_list", $easyel_tabs ); |
| 315 |
|
| 316 |
?> |
| 317 |
<div class="easyel-overview-header"> |
| 318 |
<img src="<?php echo esc_url( EASYELEMENTS_DIR_URL . 'admin/img/easy-logo.png' ); ?>" alt="<?php echo esc_attr( 'logo' ); ?>"> |
| 319 |
|
| 320 |
</div> |
| 321 |
<div class=" easyel-plugin-settings-wrapper"> |
| 322 |
<div class="easyel-nav-tab-item"> |
| 323 |
<div class="easyel-nav-tab-wrapper easyel-border-radius-20"> |
| 324 |
<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> |
| 325 |
<a href="#widget" class="easyel-nav-tab" data-tab="widget"><i class="easyelIcon-widgets"></i><?php esc_html_e('All Widgets','easy-elements'); ?></a> |
| 326 |
<a href="#extensions" class="easyel-nav-tab" data-tab="extensions"><i class="easyelIcon-extension"></i><?php esc_html_e('All Extensions','easy-elements'); ?></a> |
| 327 |
<a href="#userData" class="easyel-nav-tab" data-tab="userData"><i class="easyelIcon-setting"></i><?php esc_html_e('API Settings','easy-elements'); ?></a> |
| 328 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=easy-elements-license' ) ); ?>" |
| 329 |
class="easyel-nav-tab" |
| 330 |
data-tab="activate_license"> |
| 331 |
<i class="easyelIcon-license-pro"></i> |
| 332 |
<?php esc_html_e('Activate License','easy-elements'); ?> |
| 333 |
</a> |
| 334 |
<div class="easyel-tab-pro-link"> |
| 335 |
<a href="https://wpeasyelements.com/pricing/" class="easyel-nav-tab-pro" target="_blank"> |
| 336 |
<i class="easyelIcon-crown"></i> |
| 337 |
<?php esc_html_e('Go Premium','easy-elements'); ?> |
| 338 |
</a> |
| 339 |
</div> |
| 340 |
</div> |
| 341 |
</div> |
| 342 |
<!-- Status Messages --> |
| 343 |
<div id="bulk-action-message" class="notice" style="display: none;"></div> |
| 344 |
|
| 345 |
<!-- Tab Content --> |
| 346 |
<div id="easyel-tab-content"> |
| 347 |
<?php foreach ( $easyel_tabs as $tab_slug => $tab_label ) : ?> |
| 348 |
<div id="tab-<?php echo esc_attr($tab_slug); ?>" |
| 349 |
class="easyel-tab-panel easyel-border-radius-20 <?php echo esc_attr($tab_slug); ?>" |
| 350 |
style="<?php echo $tab_slug === 'overview' ? '' : 'display:none;'; ?>"> |
| 351 |
|
| 352 |
<?php |
| 353 |
if ( $tab_slug === 'widget' ) : ?> |
| 354 |
<div class="easyel-addon-search easyel-dflex easyel-justify-between"> |
| 355 |
<div class="easyel-widget-filter"> |
| 356 |
<h1 class="easyel-dashboard-heading"><?php esc_html_e('Widgets','easy-elements');?></h1> |
| 357 |
<div class="easyel-widget-filter-button"> |
| 358 |
<button type="button" id="easyel_all" class="easyel-action-btn active" data-filter="easyel_all"><?php esc_html_e('All', 'easy-elements'); ?></button> |
| 359 |
<button type="button" id="easyel_free" class="easyel-action-btn" data-filter="easyel_free"><?php esc_html_e('Free', 'easy-elements'); ?></button> |
| 360 |
<button type="button" id="easyel_pro" class="easyel-action-btn" data-filter="easyel_pro"><?php esc_html_e('Pro', 'easy-elements'); ?></button> |
| 361 |
</div> |
| 362 |
</div> |
| 363 |
<div class="easyel-widget-search-enable"> |
| 364 |
<div class="easyel-widget-activeDeactivate-button"> |
| 365 |
<button type="button" id="activate-all-btn"><?php esc_html_e('Activate All', 'easy-elements'); ?></button> |
| 366 |
<button type="button" id="deactivate-all-btn"><?php esc_html_e('Deactivate All', 'easy-elements'); ?></button> |
| 367 |
</div> |
| 368 |
<?php if ( $tab_slug === 'widget' ) { ?> |
| 369 |
<input type="text" id="element-search" placeholder="<?php esc_attr_e('Search widgets...', 'easy-elements'); ?>"> |
| 370 |
<?php } ?> |
| 371 |
</div> |
| 372 |
</div> |
| 373 |
<?php endif; ?> |
| 374 |
<?php |
| 375 |
$tab_file = EASYELEMENTS_DIR_PATH . '/admin/settingstab/tab-' . $tab_slug . '.php'; |
| 376 |
|
| 377 |
if ( file_exists( $tab_file ) ) { |
| 378 |
include $tab_file; |
| 379 |
} |
| 380 |
?> |
| 381 |
</div> |
| 382 |
<?php endforeach; ?> |
| 383 |
</div> |
| 384 |
|
| 385 |
</div> |
| 386 |
|
| 387 |
<!-- JavaScript functionality is handled by admin.js --> |
| 388 |
<?php |
| 389 |
} |
| 390 |
|
| 391 |
////////****************** AJAX Toggle ******************************** |
| 392 |
|
| 393 |
public function Easyel_Elements_enqueue_admin_assets($hook) { |
| 394 |
if (strpos($hook, 'easy-elements') === false) { |
| 395 |
return; |
| 396 |
} |
| 397 |
|
| 398 |
// Enqueue admin JavaScript |
| 399 |
wp_enqueue_script( |
| 400 |
'easy-elements-admin', |
| 401 |
plugin_dir_url(__DIR__) . 'assets/js/admin.js', |
| 402 |
['jquery'], |
| 403 |
'1.0.0', |
| 404 |
true |
| 405 |
); |
| 406 |
|
| 407 |
|
| 408 |
// Localize script with all necessary data |
| 409 |
wp_localize_script('easy-elements-admin', 'easyElementsData', [ |
| 410 |
'ajaxurl' => admin_url('admin-ajax.php'), |
| 411 |
'nonce' => wp_create_nonce('easy_elements_nonce'), |
| 412 |
'widget_settings_nonce' => wp_create_nonce('easy_elements_widget_settings_nonce'), |
| 413 |
'bulk_action_nonce' => wp_create_nonce('easy_elements_bulk_action_nonce'), |
| 414 |
'advance_settings_nonce' => wp_create_nonce('easy_elements_save_advance_settings_nonce'), |
| 415 |
'js_animation_nonce' => wp_create_nonce('easyel_js_animation_nonce'), |
| 416 |
'strings' => [ |
| 417 |
'confirm_activate_all' => __('Are you sure you want to activate all widgets?', 'easy-elements'), |
| 418 |
'confirm_deactivate_all' => __('Are you sure you want to deactivate all widgets?', 'easy-elements'), |
| 419 |
'processing' => __('Processing...', 'easy-elements'), |
| 420 |
'saving' => __('Saving...', 'easy-elements'), |
| 421 |
'saved' => __('Saved!', 'easy-elements'), |
| 422 |
'error' => __('Error!', 'easy-elements'), |
| 423 |
'updated' => __('Updated!', 'easy-elements'), |
| 424 |
] |
| 425 |
]); |
| 426 |
} |
| 427 |
|
| 428 |
function easyel_elements_get_available_widgets() { |
| 429 |
$widgets = [ |
| 430 |
'heading' => [ |
| 431 |
'icon' => 'easyelIcon-heading', |
| 432 |
'title' => 'Heading', |
| 433 |
'description' => 'Add customizable headings with style options.', |
| 434 |
'demo_url' => 'https://wpeasyelements.com/heading/', |
| 435 |
'docx_url' => 'https://wpeasyelements.com/docs/heading/', |
| 436 |
'is_pro' => false, |
| 437 |
'tab' => 'widget', |
| 438 |
], |
| 439 |
'clients_logo' => [ |
| 440 |
'icon' => 'easyelIcon-clients-logo-grid', |
| 441 |
'title' => 'Clients Logo Grid', |
| 442 |
'description' => 'Showcase client logos in a neat grid layout.', |
| 443 |
'demo_url' => 'https://wpeasyelements.com/clients-logo-grid/', |
| 444 |
'docx_url' => 'https://wpeasyelements.com/docs/clients-logo-grid', |
| 445 |
'is_pro' => false, |
| 446 |
'tab' => 'widget', |
| 447 |
], |
| 448 |
'clients_logo_slider' => [ |
| 449 |
'icon' => 'easyelIcon-clients-logo-slider', |
| 450 |
'title' => 'Clients Logo Slider', |
| 451 |
'description' => 'Display client logos in a slider format.', |
| 452 |
'demo_url' => 'https://wpeasyelements.com/clients-logo-slider/', |
| 453 |
'docx_url' => 'https://wpeasyelements.com/docs/clients-logo-slider/', |
| 454 |
'is_pro' => true, |
| 455 |
'group' => 'Creative Widgets', |
| 456 |
'tab' => 'widget', |
| 457 |
], |
| 458 |
'simple_tab' => [ |
| 459 |
'icon' => 'easyelIcon-tab', |
| 460 |
'title' => 'Tab', |
| 461 |
'description' => 'Add simple tab content.', |
| 462 |
'demo_url' => 'https://wpeasyelements.com/tab', |
| 463 |
'docx_url' => 'https://wpeasyelements.com/docs/tab', |
| 464 |
'is_pro' => false, |
| 465 |
'tab' => 'widget', |
| 466 |
], |
| 467 |
'tab_advance' => [ |
| 468 |
'icon' => 'easyelIcon-tab', |
| 469 |
'title' => 'Advanced Tab', |
| 470 |
'description' => 'Create advanced tab content.', |
| 471 |
'demo_url' => 'https://wpeasyelements.com/advanced-tab/', |
| 472 |
'docx_url' => 'https://wpeasyelements.com/docs/advanced-tab/', |
| 473 |
'is_pro' => true, |
| 474 |
'tab' => 'widget', |
| 475 |
], |
| 476 |
'testimonials' => [ |
| 477 |
'icon' => 'easyelIcon-testimonials-grid', |
| 478 |
'title' => 'Testimonials Grid', |
| 479 |
'description' => 'Show testimonials in a grid format.', |
| 480 |
'demo_url' => 'https://wpeasyelements.com/testimonials-grid', |
| 481 |
'docx_url' => 'https://wpeasyelements.com/docs/testimonials-grid', |
| 482 |
'is_pro' => false, |
| 483 |
'tab' => 'widget', |
| 484 |
], |
| 485 |
'testimonials_slider' => [ |
| 486 |
'icon' => 'easyelIcon-testimonials-slider', |
| 487 |
'title' => 'Testimonials Slider', |
| 488 |
'description' => 'Display testimonials in a slider format.', |
| 489 |
'demo_url' => 'https://wpeasyelements.com/testimonials-slider/', |
| 490 |
'docx_url' => 'https://wpeasyelements.com/docs/testimonials-slider/', |
| 491 |
'is_pro' => true, |
| 492 |
'tab' => 'widget', |
| 493 |
], |
| 494 |
'image_carousel' => [ |
| 495 |
'icon' => 'easyelIcon-image-carousel', |
| 496 |
'title' => 'Image Carousel', |
| 497 |
'description' => 'Create an image slider with multiple images.', |
| 498 |
'demo_url' => 'https://wpeasyelements.com/image-carousel/', |
| 499 |
'docx_url' => 'https://wpeasyelements.com/docs/image-carousel', |
| 500 |
'is_pro' => true, |
| 501 |
'tab' => 'widget', |
| 502 |
], |
| 503 |
'image_reveal' => [ |
| 504 |
'icon' => 'easyelIcon-marquee-logo', |
| 505 |
'title' => 'Reveal Image', |
| 506 |
'description' => 'reveal Image Here', |
| 507 |
'demo_url' => 'https://wpeasyelements.com/reveal-image/', |
| 508 |
'docx_url' => 'https://wpeasyelements.com/docs/reveal-image/', |
| 509 |
'is_pro' => true, |
| 510 |
'tab' => 'widget', |
| 511 |
], |
| 512 |
'rotate_text' => [ |
| 513 |
'icon' => 'easyelIcon-heading', |
| 514 |
'title' => 'Rotate Text', |
| 515 |
'description' => 'rotate text here', |
| 516 |
'demo_url' => 'https://wpeasyelements.com/rotate-text/', |
| 517 |
'docx_url' => 'https://wpeasyelements.com/docs/rotate-text/', |
| 518 |
'is_pro' => true, |
| 519 |
'tab' => 'widget', |
| 520 |
], |
| 521 |
'icon_box' => [ |
| 522 |
'icon' => 'easyelIcon-iconbox', |
| 523 |
'title' => 'Info Box', |
| 524 |
'description' => 'Display content with an icon.', |
| 525 |
'demo_url' => 'https://wpeasyelements.com/info-box', |
| 526 |
'docx_url' => 'https://wpeasyelements.com/docs/info-box', |
| 527 |
'is_pro' => false, |
| 528 |
'tab' => 'widget', |
| 529 |
], |
| 530 |
'process_grid' => [ |
| 531 |
'icon' => 'easyelIcon-process-grid', |
| 532 |
'title' => 'Process Grid', |
| 533 |
'description' => 'Show process steps in a grid format.', |
| 534 |
'demo_url' => 'https://wpeasyelements.com/process-grid', |
| 535 |
'docx_url' => 'https://wpeasyelements.com/docs/process-grid', |
| 536 |
'is_pro' => false, |
| 537 |
'tab' => 'widget', |
| 538 |
], |
| 539 |
'process_slider' => [ |
| 540 |
'icon' => 'easyelIcon-process-slider', |
| 541 |
'title' => 'Process Slider', |
| 542 |
'description' => 'Show process steps in a slider.', |
| 543 |
'demo_url' => 'https://wpeasyelements.com/process-slider/', |
| 544 |
'docx_url' => 'https://wpeasyelements.com/docs/process-slider/', |
| 545 |
'is_pro' => true, |
| 546 |
'tab' => 'widget', |
| 547 |
], |
| 548 |
'team_grid' => [ |
| 549 |
'icon' => 'easyelIcon-team-grid', |
| 550 |
'title' => 'Team Grid', |
| 551 |
'description' => 'Display team members in a grid format.', |
| 552 |
'demo_url' => 'https://wpeasyelements.com/team-grid', |
| 553 |
'docx_url' => 'https://wpeasyelements.com/docs/team-grid', |
| 554 |
'is_pro' => false, |
| 555 |
'tab' => 'widget', |
| 556 |
], |
| 557 |
'team_slider' => [ |
| 558 |
'icon' => 'easyelIcon-team-slider', |
| 559 |
'title' => 'Team Slider', |
| 560 |
'description' => 'Showcase team members in a slider format.', |
| 561 |
'demo_url' => 'https://wpeasyelements.com/team-slider', |
| 562 |
'docx_url' => 'https://wpeasyelements.com/docs/team-slider', |
| 563 |
'is_pro' => true, |
| 564 |
'tab' => 'widget', |
| 565 |
], |
| 566 |
'contact_box' => [ |
| 567 |
'icon' => 'easyelIcon-contact-box', |
| 568 |
'title' => 'Contact Box', |
| 569 |
'description' => 'Contact Box.', |
| 570 |
'demo_url' => 'https://wpeasyelements.com/contact-box', |
| 571 |
'docx_url' => 'https://wpeasyelements.com/docs/contact-box', |
| 572 |
'is_pro' => false, |
| 573 |
'tab' => 'widget', |
| 574 |
], |
| 575 |
'icon_box_slider' => [ |
| 576 |
'icon' => 'easyelIcon-icon-box-slider', |
| 577 |
'title' => 'Info Box Slider', |
| 578 |
'description' => 'Info Box Slider.', |
| 579 |
'demo_url' => 'https://wpeasyelements.com/info-box-slider/', |
| 580 |
'docx_url' => 'https://wpeasyelements.com/docs/info-box-slider/', |
| 581 |
'is_pro' => true, |
| 582 |
'tab' => 'widget', |
| 583 |
], |
| 584 |
'timeline_slider' => [ |
| 585 |
'icon' => 'easyelIcon-timeline-slider', |
| 586 |
'title' => 'Timeline Slider', |
| 587 |
'description' => 'Timeline Slider.', |
| 588 |
'demo_url' => 'https://wpeasyelements.com/timeline-slider/', |
| 589 |
'docx_url' => 'https://wpeasyelements.com/docs/timeline-slider', |
| 590 |
'is_pro' => true, |
| 591 |
'group' => 'Creative Widgets', |
| 592 |
'tab' => 'widget', |
| 593 |
], |
| 594 |
'faq' => [ |
| 595 |
'icon' => 'easyelIcon-faq-1', |
| 596 |
'title' => 'FAQ', |
| 597 |
'description' => 'FAQ.', |
| 598 |
'demo_url' => 'https://wpeasyelements.com/faq', |
| 599 |
'docx_url' => 'https://wpeasyelements.com/docs/faq', |
| 600 |
'is_pro' => false, |
| 601 |
'tab' => 'widget', |
| 602 |
], |
| 603 |
'blog_grid' => [ |
| 604 |
'icon' => 'easyelIcon-post-grid', |
| 605 |
'title' => 'Post Grid', |
| 606 |
'description' => 'Post.', |
| 607 |
'demo_url' => 'https://wpeasyelements.com/post-grid', |
| 608 |
'docx_url' => 'https://wpeasyelements.com/docs/post-grid', |
| 609 |
'is_pro' => false, |
| 610 |
'tab' => 'widget', |
| 611 |
], |
| 612 |
'post_slider' => [ |
| 613 |
'icon' => 'easyelIcon-post-slider', |
| 614 |
'title' => 'Post Slider', |
| 615 |
'description' => 'Post Slider.', |
| 616 |
'demo_url' => 'https://wpeasyelements.com/post-slider/', |
| 617 |
'docx_url' => 'https://wpeasyelements.com/docs/post-slider/', |
| 618 |
'is_pro' => true, |
| 619 |
'tab' => 'widget', |
| 620 |
], |
| 621 |
'easy_cf7' => [ |
| 622 |
'icon' => 'easyelIcon-contact-form', |
| 623 |
'title' => 'Contact Form 7', |
| 624 |
'description' => 'Contact form 7.', |
| 625 |
'demo_url' => 'https://wpeasyelements.com/contact-form-7', |
| 626 |
'docx_url' => 'https://wpeasyelements.com/docs/contact-form-7', |
| 627 |
'is_pro' => false, |
| 628 |
'tab' => 'widget', |
| 629 |
], |
| 630 |
'video' => [ |
| 631 |
'icon' => 'easyelIcon-video', |
| 632 |
'title' => 'Video', |
| 633 |
'description' => 'Video.', |
| 634 |
'demo_url' => 'https://wpeasyelements.com/video', |
| 635 |
'docx_url' => 'https://wpeasyelements.com/docs/video', |
| 636 |
'is_pro' => false, |
| 637 |
'tab' => 'widget', |
| 638 |
], |
| 639 |
'pricing_table' => [ |
| 640 |
'icon' => 'easyelIcon-pricing-table', |
| 641 |
'title' => 'Pricing Table', |
| 642 |
'description' => 'Pricing Table.', |
| 643 |
'demo_url' => 'https://wpeasyelements.com/pricing-table', |
| 644 |
'docx_url' => 'https://wpeasyelements.com/docs/pricing-table', |
| 645 |
'is_pro' => false, |
| 646 |
'group' => 'Marketing Widgets', |
| 647 |
'tab' => 'widget', |
| 648 |
], |
| 649 |
'pricing_list' => [ |
| 650 |
'icon' => 'easyelIcon-pricing-list', |
| 651 |
'title' => 'Pricing List', |
| 652 |
'description' => 'Pricing List.', |
| 653 |
'demo_url' => 'https://wpeasyelements.com/pricing-list/', |
| 654 |
'docx_url' => 'https://wpeasyelements.com/docs/pricing-list/', |
| 655 |
'is_pro' => true, |
| 656 |
'group' => 'Marketing Widgets', |
| 657 |
'tab' => 'widget', |
| 658 |
], |
| 659 |
'pricing_tab' => [ |
| 660 |
'icon' => 'easyelIcon-pricing-table', |
| 661 |
'title' => 'Pricing Tab', |
| 662 |
'description' => 'Pricing Tab.', |
| 663 |
'demo_url' => 'https://wpeasyelements.com/pricing-tab/', |
| 664 |
'docx_url' => 'https://wpeasyelements.com/docs/pricing-tab/', |
| 665 |
'is_pro' => true, |
| 666 |
'group' => 'Marketing Widgets', |
| 667 |
'tab' => 'widget', |
| 668 |
], |
| 669 |
'service_list' => [ |
| 670 |
'icon' => 'easyelIcon-service-list', |
| 671 |
'title' => 'Service List', |
| 672 |
'description' => 'Service List.', |
| 673 |
'demo_url' => 'https://wpeasyelements.com/service-list', |
| 674 |
'docx_url' => 'https://wpeasyelements.com/docs/service-list/', |
| 675 |
'is_pro' => false, |
| 676 |
'tab' => 'widget', |
| 677 |
], |
| 678 |
'process_list' => [ |
| 679 |
'icon' => 'easyelIcon-process-list', |
| 680 |
'title' => 'Process List', |
| 681 |
'description' => 'Process List.', |
| 682 |
'demo_url' => 'https://wpeasyelements.com/process-list/', |
| 683 |
'docx_url' => 'https://wpeasyelements.com/docs/process-list/', |
| 684 |
'is_pro' => false, |
| 685 |
'tab' => 'widget', |
| 686 |
], |
| 687 |
'marquee_logo' => [ |
| 688 |
'icon' => 'easyelIcon-marquee-logo', |
| 689 |
'title' => 'Marquee', |
| 690 |
'description' => 'Marquee.', |
| 691 |
'demo_url' => 'https://wpeasyelements.com/marquee/', |
| 692 |
'docx_url' => 'https://wpeasyelements.com/docs/marquee/', |
| 693 |
'is_pro' => true, |
| 694 |
'tab' => 'widget', |
| 695 |
], |
| 696 |
'button' => [ |
| 697 |
'icon' => 'easyelIcon-button', |
| 698 |
'title' => 'Button', |
| 699 |
'description' => 'Button.', |
| 700 |
'demo_url' => 'https://wpeasyelements.com/button/', |
| 701 |
'docx_url' => 'https://wpeasyelements.com/docs/button', |
| 702 |
'is_pro' => false, |
| 703 |
'tab' => 'widget', |
| 704 |
], |
| 705 |
'social_share' => [ |
| 706 |
'icon' => 'easyelIcon-social-share', |
| 707 |
'title' => 'Social Share', |
| 708 |
'description' => 'Social Share.', |
| 709 |
'demo_url' => 'https://wpeasyelements.com/', |
| 710 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 711 |
'is_pro' => false, |
| 712 |
'tab' => 'widget', |
| 713 |
], |
| 714 |
'social_icon' => [ |
| 715 |
'icon' => 'easyelIcon-social-icons', |
| 716 |
'title' => 'Social Icon', |
| 717 |
'description' => 'Social Icon.', |
| 718 |
'demo_url' => 'https://wpeasyelements.com/social-icon', |
| 719 |
'docx_url' => 'https://wpeasyelements.com/docs/social-icon', |
| 720 |
'is_pro' => false, |
| 721 |
'tab' => 'widget', |
| 722 |
], |
| 723 |
'breadcrumb' => [ |
| 724 |
'icon' => 'easyelIcon-breadcumb', |
| 725 |
'title' => 'Breadcrumb', |
| 726 |
'description' => 'Breadcrumb.', |
| 727 |
'demo_url' => 'https://wpeasyelements.com/breadcrumb', |
| 728 |
'docx_url' => 'https://wpeasyelements.com/docs/breadcrumb', |
| 729 |
'is_pro' => false, |
| 730 |
'tab' => 'widget', |
| 731 |
], |
| 732 |
'easy_slider' => [ |
| 733 |
'icon' => 'easyelIcon-slider', |
| 734 |
'title' => 'Slider', |
| 735 |
'description' => 'Slider.', |
| 736 |
'demo_url' => 'https://wpeasyelements.com/slider', |
| 737 |
'docx_url' => 'https://wpeasyelements.com/docs/slider', |
| 738 |
'is_pro' => true, |
| 739 |
'tab' => 'widget', |
| 740 |
], |
| 741 |
'image_accordion' => [ |
| 742 |
'icon' => 'easyelIcon-image-accordion', |
| 743 |
'title' => 'Image Accordion', |
| 744 |
'description' => 'Image Accordion', |
| 745 |
'demo_url' => 'https://wpeasyelements.com/image-accordion/', |
| 746 |
'docx_url' => 'https://wpeasyelements.com/docs/image-accordion/', |
| 747 |
'is_pro' => true, |
| 748 |
'tab' => 'widget', |
| 749 |
], |
| 750 |
'domain_search' => [ |
| 751 |
'icon' => 'easyelIcon-domain-search', |
| 752 |
'title' => 'Domain Search', |
| 753 |
'description' => 'Domain Search.', |
| 754 |
'demo_url' => 'https://wpeasyelements.com/', |
| 755 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 756 |
'is_pro' => false, |
| 757 |
'tab' => 'widget', |
| 758 |
], |
| 759 |
'featured_project' => [ |
| 760 |
'icon' => 'easyelIcon-custom-projects', |
| 761 |
'title' => 'Custom Projects', |
| 762 |
'description' => 'Custom Projects.', |
| 763 |
'demo_url' => 'https://wpeasyelements.com/', |
| 764 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 765 |
'is_pro' => true, |
| 766 |
'tab' => 'widget', |
| 767 |
], |
| 768 |
'advance_button' => [ |
| 769 |
'icon' => 'easyelIcon-button', |
| 770 |
'title' => 'Advance Button', |
| 771 |
'description' => 'Advance Button.', |
| 772 |
'demo_url' => 'https://wpeasyelements.com/advance-button/', |
| 773 |
'docx_url' => 'https://wpeasyelements.com/docs/advance-button', |
| 774 |
'is_pro' => true, |
| 775 |
'tab' => 'widget', |
| 776 |
], |
| 777 |
'hr_image_scroll' => [ |
| 778 |
'icon' => 'easyelIcon-image-horizontal-scroll', |
| 779 |
'title' => 'Horizontal Scroll', |
| 780 |
'description' => 'Horizontal Scroll.', |
| 781 |
'demo_url' => 'https://wpeasyelements.com/horizontal-scroll/', |
| 782 |
'docx_url' => 'https://wpeasyelements.com/docs/horizontal-scroll/', |
| 783 |
'is_pro' => true, |
| 784 |
'tab' => 'widget', |
| 785 |
], |
| 786 |
'scrolltrigger_title' => [ |
| 787 |
'icon' => 'easyelIcon-title-scrolltrigger', |
| 788 |
'title' => 'Content ScrollTrigger', |
| 789 |
'description' => 'Content ScrollTrigger.', |
| 790 |
'demo_url' => 'https://wpeasyelements.com/title-scrolltrigger/', |
| 791 |
'docx_url' => 'https://wpeasyelements.com/docs/title-scrolltrigger/', |
| 792 |
'is_pro' => true, |
| 793 |
'tab' => 'widget', |
| 794 |
], |
| 795 |
'Flip_Box' => [ |
| 796 |
'icon' => 'easyelIcon-flip-box', |
| 797 |
'title' => 'Flip Box', |
| 798 |
'description' => 'Flip Box.', |
| 799 |
'demo_url' => 'https://wpeasyelements.com/flip-box', |
| 800 |
'docx_url' => 'https://wpeasyelements.com/docs/flip-box', |
| 801 |
'is_pro' => true, |
| 802 |
'group' => 'Creative Widgets', |
| 803 |
'tab' => 'widget', |
| 804 |
], |
| 805 |
'easy_offcanvas' => [ |
| 806 |
'icon' => 'easyelIcon-canvas', |
| 807 |
'title' => 'Offcanvas', |
| 808 |
'description' => 'Offcanvas.', |
| 809 |
'demo_url' => 'https://wpeasyelements.com/offcanvas', |
| 810 |
'docx_url' => 'https://wpeasyelements.com/docs/offcanvas', |
| 811 |
'is_pro' => false, |
| 812 |
'group' => 'Header & Footer Widget', |
| 813 |
'tab' => 'widget', |
| 814 |
], |
| 815 |
'site_logo' => [ |
| 816 |
'icon' => 'easyelIcon-site-logo', |
| 817 |
'title' => 'Site Logo', |
| 818 |
'description' => 'Display your website logo easily with this widget.', |
| 819 |
'demo_url' => 'https://wpeasyelements.com/site-logo/', |
| 820 |
'docx_url' => 'https://wpeasyelements.com/docs/site-logo/', |
| 821 |
'is_pro' => false, |
| 822 |
'group' => 'Header & Footer Widget', |
| 823 |
'tab' => 'widget', |
| 824 |
], |
| 825 |
'search' => [ |
| 826 |
'icon' => 'easyelIcon-search', |
| 827 |
'title' => 'Simple Search', |
| 828 |
'description' => 'Search All Content.', |
| 829 |
'demo_url' => 'https://wpeasyelements.com/search', |
| 830 |
'docx_url' => 'https://wpeasyelements.com/docs/search', |
| 831 |
'is_pro' => false, |
| 832 |
'group' => 'Header & Footer Widget', |
| 833 |
'tab' => 'widget', |
| 834 |
], |
| 835 |
'navigation_menu' => [ |
| 836 |
'icon' => 'easyelIcon-navigation', |
| 837 |
'title' => 'Navigation Menu', |
| 838 |
'description' => 'Navigation Menu.', |
| 839 |
'demo_url' => 'https://wpeasyelements.com/', |
| 840 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 841 |
'is_pro' => false, |
| 842 |
'group' => 'Header & Footer Widget', |
| 843 |
'tab' => 'widget', |
| 844 |
], |
| 845 |
'page_title' => [ |
| 846 |
'icon' => 'easyelIcon-page-title', |
| 847 |
'title' => 'Page Title', |
| 848 |
'description' => 'Page Title.', |
| 849 |
'demo_url' => 'https://wpeasyelements.com/', |
| 850 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 851 |
'is_pro' => false, |
| 852 |
'group' => 'Header & Footer Widget', |
| 853 |
'tab' => 'widget', |
| 854 |
], |
| 855 |
'post_tags' => [ |
| 856 |
'icon' => 'easyelIcon-post-tag', |
| 857 |
'title' => 'Current Post Tags', |
| 858 |
'description' => 'Current Post Tags.', |
| 859 |
'demo_url' => 'https://wpeasyelements.com/', |
| 860 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 861 |
'is_pro' => false, |
| 862 |
'group' => 'Theme Builder Widget', |
| 863 |
'tab' => 'widget', |
| 864 |
], |
| 865 |
'post_author' => [ |
| 866 |
'icon' => 'easyelIcon-author', |
| 867 |
'title' => 'Post Author Info', |
| 868 |
'description' => 'Post Author Info.', |
| 869 |
'demo_url' => 'https://wpeasyelements.com/', |
| 870 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 871 |
'is_pro' => false, |
| 872 |
'group' => 'Theme Builder Widget', |
| 873 |
'tab' => 'widget', |
| 874 |
], |
| 875 |
'post_title' => [ |
| 876 |
'icon' => 'easyelIcon-post-title', |
| 877 |
'title' => 'Post Title', |
| 878 |
'description' => 'Post Title.', |
| 879 |
'demo_url' => 'https://wpeasyelements.com/', |
| 880 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 881 |
'is_pro' => false, |
| 882 |
'group' => 'Theme Builder Widget', |
| 883 |
'tab' => 'widget', |
| 884 |
], |
| 885 |
'post_content' => [ |
| 886 |
'icon' => 'easyelIcon-post-content', |
| 887 |
'title' => 'Post Content', |
| 888 |
'description' => 'Post Content.', |
| 889 |
'demo_url' => 'https://wpeasyelements.com/', |
| 890 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 891 |
'is_pro' => false, |
| 892 |
'group' => 'Theme Builder Widget', |
| 893 |
'tab' => 'widget', |
| 894 |
], |
| 895 |
'excerpt' => [ |
| 896 |
'icon' => 'easyelIcon-post-excerpt', |
| 897 |
'title' => 'Post Excerpt', |
| 898 |
'description' => 'Post Excerpt.', |
| 899 |
'demo_url' => 'https://wpeasyelements.com/', |
| 900 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 901 |
'is_pro' => false, |
| 902 |
'group' => 'Theme Builder Widget', |
| 903 |
'tab' => 'widget', |
| 904 |
], |
| 905 |
'related_post' => [ |
| 906 |
'icon' => 'easyelIcon-related-post', |
| 907 |
'title' => 'Related Post', |
| 908 |
'description' => 'Related Post.', |
| 909 |
'demo_url' => 'https://wpeasyelements.com/', |
| 910 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 911 |
'is_pro' => true, |
| 912 |
'group' => 'Theme Builder Widget', |
| 913 |
'tab' => 'widget', |
| 914 |
], |
| 915 |
'post_pagination' => [ |
| 916 |
'icon' => 'easyelIcon-pagination', |
| 917 |
'title' => 'Post Pagination', |
| 918 |
'description' => 'Post Pagination.', |
| 919 |
'demo_url' => 'https://wpeasyelements.com/', |
| 920 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 921 |
'is_pro' => false, |
| 922 |
'group' => 'Theme Builder Widget', |
| 923 |
'tab' => 'widget', |
| 924 |
], |
| 925 |
'post_meta' => [ |
| 926 |
'icon' => 'easyelIcon-meta', |
| 927 |
'title' => 'Post Meta', |
| 928 |
'description' => 'Post Meta.', |
| 929 |
'demo_url' => 'https://wpeasyelements.com/', |
| 930 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 931 |
'is_pro' => false, |
| 932 |
'group' => 'Theme Builder Widget', |
| 933 |
'tab' => 'widget', |
| 934 |
], |
| 935 |
'post_comments' => [ |
| 936 |
'icon' => 'easyelIcon-comments', |
| 937 |
'title' => 'Post Comments', |
| 938 |
'description' => 'Post Comments.', |
| 939 |
'demo_url' => 'https://wpeasyelements.com/', |
| 940 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 941 |
'is_pro' => false, |
| 942 |
'group' => 'Theme Builder Widget', |
| 943 |
'tab' => 'widget', |
| 944 |
], |
| 945 |
'featured_image' => [ |
| 946 |
'icon' => 'easyelIcon-image-carousel', |
| 947 |
'title' => 'Featured Image', |
| 948 |
'description' => 'Featured Image.', |
| 949 |
'demo_url' => 'https://wpeasyelements.com/', |
| 950 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 951 |
'is_pro' => false, |
| 952 |
'group' => 'Theme Builder Widget', |
| 953 |
'tab' => 'widget', |
| 954 |
], |
| 955 |
'easy_scroll_to_top' => [ |
| 956 |
'icon' => 'easyelIcon-scroll-top', |
| 957 |
'title' => 'Scroll Top', |
| 958 |
'description' => 'Scroll Top.', |
| 959 |
'demo_url' => 'https://wpeasyelements.com/docs/scroll-to-top/', |
| 960 |
'docx_url' => 'https://wpeasyelements.com/docs/scroll-to-top/', |
| 961 |
'is_pro' => false, |
| 962 |
'group' => 'Theme Builder Widget', |
| 963 |
'tab' => 'widget', |
| 964 |
], |
| 965 |
'easy_table' => [ |
| 966 |
'icon' => 'easyelIcon-clients-logo-grid', |
| 967 |
'title' => 'Table', |
| 968 |
'description' => 'Table.', |
| 969 |
'demo_url' => 'https://wpeasyelements.com/table', |
| 970 |
'docx_url' => 'https://wpeasyelements.com/docs/table', |
| 971 |
'is_pro' => false, |
| 972 |
'tab' => 'widget', |
| 973 |
], |
| 974 |
'advance_image' => [ |
| 975 |
'icon' => 'easyelIcon-image-carousel', |
| 976 |
'title' => 'Advance Image', |
| 977 |
'description' => 'Advance Image Here.', |
| 978 |
'demo_url' => 'https://wpeasyelements.com/advance-image/', |
| 979 |
'docx_url' => 'https://wpeasyelements.com/docs/advance-image/', |
| 980 |
'is_pro' => true, |
| 981 |
'group' => 'Animations', |
| 982 |
'tab' => 'widget', |
| 983 |
], |
| 984 |
'bmi_calculator' => [ |
| 985 |
'icon' => 'easyelIcon-calculator', |
| 986 |
'title' => 'BMI Calculator', |
| 987 |
'description' => 'BMI Calculator.', |
| 988 |
'demo_url' => 'https://wpeasyelements.com/bmi-calculator/', |
| 989 |
'docx_url' => 'https://wpeasyelements.com/docs/bmi-calculator/', |
| 990 |
'is_pro' => true, |
| 991 |
'group' => 'Creative Widgets', |
| 992 |
'tab' => 'widget', |
| 993 |
], |
| 994 |
'typewriter' => [ |
| 995 |
'icon' => 'easyelIcon-heading', |
| 996 |
'title' => 'Typewriter', |
| 997 |
'description' => 'Animated typewriter text effect.', |
| 998 |
'demo_url' => 'https://wpeasyelements.com/', |
| 999 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 1000 |
'is_pro' => true, |
| 1001 |
'group' => 'Animations', |
| 1002 |
'tab' => 'widget', |
| 1003 |
], |
| 1004 |
'animated_title' => [ |
| 1005 |
'icon' => 'easyelIcon-animated-title', |
| 1006 |
'title' => 'Animated Title', |
| 1007 |
'description' => 'Animated title text effect.', |
| 1008 |
'demo_url' => 'https://wpeasyelements.com/animated-title/', |
| 1009 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 1010 |
'is_pro' => true, |
| 1011 |
'group' => 'Animations', |
| 1012 |
'tab' => 'widget', |
| 1013 |
], |
| 1014 |
'easytext_animation' => [ |
| 1015 |
'icon' => 'easyelIcon-heading', |
| 1016 |
'title' => 'Animated Text', |
| 1017 |
'description' => 'Animated text animation effect.', |
| 1018 |
'demo_url' => 'https://wpeasyelements.com/', |
| 1019 |
'docx_url' => 'https://wpeasyelements.com/docs/', |
| 1020 |
'is_pro' => true, |
| 1021 |
'group' => 'Animations', |
| 1022 |
'tab' => 'widget', |
| 1023 |
], |
| 1024 |
'easy_feature' => [ |
| 1025 |
'icon' => 'easyelIcon-marquee-logo', |
| 1026 |
'title' => 'Hover Image Box', |
| 1027 |
'description' => 'Hover image box content.', |
| 1028 |
'demo_url' => 'https://wpeasyelements.com/hover-image-box/', |
| 1029 |
'docx_url' => 'https://wpeasyelements.com/docs/hover-image-box/', |
| 1030 |
'is_pro' => true, |
| 1031 |
'tab' => 'widget', |
| 1032 |
], |
| 1033 |
'easy_gallery' => [ |
| 1034 |
'icon' => 'easyelIcon-marquee-logo', |
| 1035 |
'title' => 'Simple Gallery', |
| 1036 |
'description' => 'Gallery', |
| 1037 |
'demo_url' => 'https://wpeasyelements.com/simple-gallery/', |
| 1038 |
'docx_url' => 'https://wpeasyelements.com/docs/simple-gallery/', |
| 1039 |
'is_pro' => false, |
| 1040 |
'tab' => 'widget', |
| 1041 |
], |
| 1042 |
'image_gallery_filter' => [ |
| 1043 |
'icon' => 'easyelIcon-filterable-gallery', |
| 1044 |
'title' => 'Filterable Gallery', |
| 1045 |
'description' => 'filterable Gallery', |
| 1046 |
'demo_url' => 'https://wpeasyelements.com/gallery-filter/', |
| 1047 |
'docx_url' => 'https://wpeasyelements.com/gallery-filter/', |
| 1048 |
'is_pro' => true, |
| 1049 |
'group' => 'Creative Widgets', |
| 1050 |
'tab' => 'widget', |
| 1051 |
], |
| 1052 |
'portfolio_pro' => [ |
| 1053 |
'icon' => 'easyelIcon-marquee-logo', |
| 1054 |
'title' => 'Portfolio', |
| 1055 |
'description' => 'Portfolio', |
| 1056 |
'demo_url' => 'https://wpeasyelements.com/portfolio/', |
| 1057 |
'docx_url' => 'https://wpeasyelements.com/docs/portfolio/', |
| 1058 |
'is_pro' => true, |
| 1059 |
'tab' => 'widget', |
| 1060 |
], |
| 1061 |
'protected_content' => [ |
| 1062 |
'icon' => 'easyelIcon-protected-content', |
| 1063 |
'title' => 'Protected Content', |
| 1064 |
'description' => 'This Widget is protected content', |
| 1065 |
'demo_url' => 'https://wpeasyelements.com/protected-contents/', |
| 1066 |
'docx_url' => 'https://wpeasyelements.com/docs/protected-contents/', |
| 1067 |
'is_pro' => true, |
| 1068 |
'group' => 'Creative Widgets', |
| 1069 |
'tab' => 'widget', |
| 1070 |
], |
| 1071 |
'advanced_search' => [ |
| 1072 |
'icon' => 'easyelIcon-advance-search', |
| 1073 |
'title' => 'Advanced Search', |
| 1074 |
'description' => 'This Widget is advanced search', |
| 1075 |
'demo_url' => 'https://wpeasyelements.com/advanced-search/', |
| 1076 |
'docx_url' => 'https://wpeasyelements.com/docs/advanced-search/', |
| 1077 |
'is_pro' => true, |
| 1078 |
'tab' => 'widget', |
| 1079 |
], |
| 1080 |
'enable_image_hover_effect' => [ |
| 1081 |
'icon' => 'easyelIcon-marquee-logo', |
| 1082 |
'title' => 'Image Hover Effect', |
| 1083 |
'description' => 'This Widget is image hover effect', |
| 1084 |
'demo_url' => 'https://wpeasyelements.com/image-hover-effect/', |
| 1085 |
'docx_url' => 'https://wpeasyelements.com/docs/image-hover-effect/', |
| 1086 |
'is_pro' => true, |
| 1087 |
'group' => 'Creative Widgets', |
| 1088 |
'tab' => 'widget', |
| 1089 |
], |
| 1090 |
'hr_image_scroll' => [ |
| 1091 |
'icon' => 'easyelIcon-image-horizontal-scroll', |
| 1092 |
'title' => 'ScrollTrigger', |
| 1093 |
'description' => 'This Widget is image hover effect', |
| 1094 |
'demo_url' => 'https://wpeasyelements.com/horizontal-scroll/', |
| 1095 |
'docx_url' => 'https://wpeasyelements.com/docs/horizontal-scroll/', |
| 1096 |
'is_pro' => true, |
| 1097 |
'group' => 'Animations', |
| 1098 |
'tab' => 'widget', |
| 1099 |
], |
| 1100 |
'archive_post' => [ |
| 1101 |
'icon' => 'easyelIcon-post-grid', |
| 1102 |
'title' => 'Archive Post', |
| 1103 |
'description' => 'This Widget is archive post widget', |
| 1104 |
'demo_url' => 'https://wpeasyelements.com/post-grid/', |
| 1105 |
'docx_url' => 'https://wpeasyelements.com/docs/post-grid/', |
| 1106 |
'is_pro' => false, |
| 1107 |
'tab' => 'widget', |
| 1108 |
], |
| 1109 |
'counter' => [ |
| 1110 |
'icon' => 'easyelIcon-counter', |
| 1111 |
'title' => 'Counter', |
| 1112 |
'description' => 'This is a widget that counts up.', |
| 1113 |
'demo_url' => 'https://wpeasyelements.com/counter/', |
| 1114 |
'docx_url' => 'https://wpeasyelements.com/docs/counter/', |
| 1115 |
'is_pro' => false, |
| 1116 |
'group' => 'Creative Widgets', |
| 1117 |
'tab' => 'widget', |
| 1118 |
], |
| 1119 |
'countdown' => [ |
| 1120 |
'icon' => 'easyelIcon-countdown', |
| 1121 |
'title' => 'Countdown', |
| 1122 |
'description' => 'This is a countdown widget.', |
| 1123 |
'demo_url' => 'https://wpeasyelements.com/countdown/', |
| 1124 |
'docx_url' => 'https://wpeasyelements.com/docs/countdown/', |
| 1125 |
'is_pro' => false, |
| 1126 |
'group' => 'Creative Widgets', |
| 1127 |
'tab' => 'widget', |
| 1128 |
], |
| 1129 |
'easy_progress' => [ |
| 1130 |
'icon' => 'easyelIcon-progress-bar', |
| 1131 |
'title' => 'Progress Bar', |
| 1132 |
'description' => 'This is a Progress bar widget.', |
| 1133 |
'demo_url' => 'https://wpeasyelements.com/progressbar/', |
| 1134 |
'docx_url' => 'https://wpeasyelements.com/docs/progressbar/', |
| 1135 |
'is_pro' => false, |
| 1136 |
'group' => 'Creative Widgets', |
| 1137 |
'tab' => 'widget', |
| 1138 |
], |
| 1139 |
'facebook_feed' => [ |
| 1140 |
'icon' => 'easyelIcon-facebook-feed', |
| 1141 |
'title' => 'Facebook Feed', |
| 1142 |
'description' => 'This Widget is facebook feeds', |
| 1143 |
'demo_url' => 'https://wpeasyelements.com/facebook-feed/', |
| 1144 |
'docx_url' => 'https://wpeasyelements.com/docs/facebook-feed/', |
| 1145 |
'is_pro' => true, |
| 1146 |
'group' => 'Social Media Feeds', |
| 1147 |
'tab' => 'widget', |
| 1148 |
], |
| 1149 |
'instagram_feed' => [ |
| 1150 |
'icon' => 'easyelIcon-instagram-feed', |
| 1151 |
'title' => 'Instagram Feed', |
| 1152 |
'description' => 'This Widget is instagram feeds', |
| 1153 |
'demo_url' => 'https://wpeasyelements.com/instagram-feed/', |
| 1154 |
'docx_url' => 'https://wpeasyelements.com/docs/instagram-feed/', |
| 1155 |
'is_pro' => true, |
| 1156 |
'group' => 'Social Media Feeds', |
| 1157 |
'tab' => 'widget', |
| 1158 |
], |
| 1159 |
'login_register' => [ |
| 1160 |
'icon' => 'easyelIcon-login', |
| 1161 |
'title' => 'Login / Register', |
| 1162 |
'description' => 'This Widget is login and register form', |
| 1163 |
'demo_url' => 'https://wpeasyelements.com/register/', |
| 1164 |
'docx_url' => 'https://wpeasyelements.com/docs/login-register/', |
| 1165 |
'is_pro' => false, |
| 1166 |
'group' => 'Form Widgets', |
| 1167 |
'tab' => 'widget', |
| 1168 |
], |
| 1169 |
]; |
| 1170 |
return apply_filters( 'easyel_available_widgets', $widgets ); |
| 1171 |
} |
| 1172 |
|
| 1173 |
/** |
| 1174 |
* Admin page HTML |
| 1175 |
*/ |
| 1176 |
function easyel_custom_fonts_page_html() { |
| 1177 |
if ( ! current_user_can( 'manage_options' ) ) return; |
| 1178 |
|
| 1179 |
if ( ! defined( 'EASY_ELEMENTS_PRO_ACTIVE' ) || ! EASY_ELEMENTS_PRO_ACTIVE ) { |
| 1180 |
echo '<div class="wrap"><h1>' . esc_html__( 'Upload Custom Fonts', 'easy-elements' ) . '</h1>'; |
| 1181 |
echo '<p>' . esc_html__( 'This feature is available in Easy Elements Pro. Please install and activate the Pro version to use it.', 'easy-elements' ) . '</p>'; |
| 1182 |
echo '</div>'; |
| 1183 |
return; |
| 1184 |
} |
| 1185 |
|
| 1186 |
easyel_pro_custom_fonts_page(); |
| 1187 |
} |
| 1188 |
|
| 1189 |
/** |
| 1190 |
* Hide admin notices on the Easy Elements dashboard page. |
| 1191 |
*/ |
| 1192 |
function easyel_hide_admin_notices() { |
| 1193 |
$screen = get_current_screen(); |
| 1194 |
|
| 1195 |
if ( $screen && 'toplevel_page_easy-elements-dashboard' === $screen->id ) { |
| 1196 |
|
| 1197 |
$custom_css = ' |
| 1198 |
/* Hide all common notices */ |
| 1199 |
.notice, |
| 1200 |
.updated, |
| 1201 |
.error, |
| 1202 |
.update-nag, |
| 1203 |
.notice-success, |
| 1204 |
.notice-error, |
| 1205 |
.notice-warning { |
| 1206 |
display: none !important; |
| 1207 |
} |
| 1208 |
|
| 1209 |
/* But allow EasyEL notice */ |
| 1210 |
.easyel-promo-notice { |
| 1211 |
display: block !important; |
| 1212 |
} |
| 1213 |
'; |
| 1214 |
|
| 1215 |
$handle = 'easyel-admin-hide-notices'; |
| 1216 |
wp_register_style( $handle, false, [], EASYELEMENTS_VER ); |
| 1217 |
wp_enqueue_style( $handle ); |
| 1218 |
wp_add_inline_style( $handle, $custom_css ); |
| 1219 |
} |
| 1220 |
} |
| 1221 |
|
| 1222 |
public function easyel_smooth_scroller_popup_display() { |
| 1223 |
|
| 1224 |
$options = get_option('easyel_scroll_smoother_settings', []); |
| 1225 |
|
| 1226 |
?> |
| 1227 |
<div class="easyel-smooth-scroll-popup"> |
| 1228 |
<div class="ajax-search-close-icon"> |
| 1229 |
<a class="easyel-smooth-scroll-popup-close-icon rbt-round-btn" href="#"> |
| 1230 |
<svg width="14" height="14" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 1231 |
<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> |
| 1232 |
</svg> |
| 1233 |
</a> |
| 1234 |
</div> |
| 1235 |
|
| 1236 |
<div class="wrapper"> |
| 1237 |
<h2 class="easyel-smooth-scroll-heading">Smooth Scroll Settings</h2> |
| 1238 |
<form method="post" action=""> |
| 1239 |
<div class="easyel-smooth-scroll-settings-main-wrapper"> |
| 1240 |
|
| 1241 |
<!-- Smooth Speed --> |
| 1242 |
<div class="easyel-smooth-scroll-item"> |
| 1243 |
<span class="easy-field-label">Smooth Speed (0.1–5):</span> |
| 1244 |
<label class="easy-field-item"> |
| 1245 |
<input type="number" |
| 1246 |
name="smooth_scroll_speed" |
| 1247 |
min="0.1" max="5" step="0.1" |
| 1248 |
value="<?php echo isset($options['smooth_scroll_speed']) ? esc_attr($options['smooth_scroll_speed']) : '1.2'; ?>"> |
| 1249 |
</label> |
| 1250 |
</div> |
| 1251 |
|
| 1252 |
<!-- Step Size --> |
| 1253 |
<div class="easyel-smooth-scroll-item"> |
| 1254 |
<span class="easy-field-label">Scroll Step Size (px)</span> |
| 1255 |
<label class="easy-field-item"> |
| 1256 |
<input type="number" |
| 1257 |
name="smooth_scroll_step_size" |
| 1258 |
min="1" max="200" step="1" |
| 1259 |
value="<?php echo isset($options['smooth_scroll_step_size']) ? esc_attr($options['smooth_scroll_step_size']) : '5'; ?>"> |
| 1260 |
</label> |
| 1261 |
</div> |
| 1262 |
|
| 1263 |
<div class="easyel-smooth-scroll-item"> |
| 1264 |
<span class="easy-field-label">Animation Time</span> |
| 1265 |
<label class="easy-field-item"> |
| 1266 |
<input type="text" |
| 1267 |
name="animationTime" |
| 1268 |
value="<?php echo isset($options['animationTime']) ? esc_attr($options['animationTime']) : '80'; ?>"> |
| 1269 |
</label> |
| 1270 |
</div> |
| 1271 |
|
| 1272 |
<!-- Enable Pulse Algorithm --> |
| 1273 |
<div class="easyel-smooth-scroll-item"> |
| 1274 |
<span class="easy-field-label">Enable Pulse Algorithm</span> |
| 1275 |
<label class="easy-field-item easy-toggle-switch"> |
| 1276 |
<input type="checkbox" |
| 1277 |
name="smooth_scroll_pulse" |
| 1278 |
value="1" |
| 1279 |
<?php checked( isset($options['smooth_scroll_pulse']) ? $options['smooth_scroll_pulse'] : 1, 1 ); ?>> |
| 1280 |
<span class="slider round"></span> |
| 1281 |
</label> |
| 1282 |
</div> |
| 1283 |
|
| 1284 |
<!-- Normalize Scroll --> |
| 1285 |
<div class="easyel-smooth-scroll-item"> |
| 1286 |
<span class="easy-field-label">Normalize Scroll</span> |
| 1287 |
<label class="easy-field-item easy-toggle-switch"> |
| 1288 |
<input type="checkbox" |
| 1289 |
name="smooth_scroll_normalize" |
| 1290 |
value="1" |
| 1291 |
<?php checked( isset($options['smooth_scroll_normalize']) ? $options['smooth_scroll_normalize'] : 1, 1 ); ?>> |
| 1292 |
<span class="slider round"></span> |
| 1293 |
</label> |
| 1294 |
</div> |
| 1295 |
|
| 1296 |
<!-- Enable on Mobile --> |
| 1297 |
<div class="easyel-smooth-scroll-item"> |
| 1298 |
<span class="easy-field-label">Enable on Mobile Devices</span> |
| 1299 |
<label class="easy-field-item easy-toggle-switch"> |
| 1300 |
<input type="checkbox" |
| 1301 |
name="smooth_scroll_enable_mobile" |
| 1302 |
value="1" |
| 1303 |
<?php checked( isset($options['smooth_scroll_enable_mobile']) ? $options['smooth_scroll_enable_mobile'] : 0, 1 ); ?>> |
| 1304 |
<span class="slider round"></span> |
| 1305 |
</label> |
| 1306 |
</div> |
| 1307 |
|
| 1308 |
<!-- Disable on Editor Mode --> |
| 1309 |
<div class="easyel-smooth-scroll-item"> |
| 1310 |
<span class="easy-field-label">Disable on Editor Mode</span> |
| 1311 |
<label class="easy-field-item easy-toggle-switch"> |
| 1312 |
<input type="checkbox" |
| 1313 |
name="smooth_scroll_disable_editor_mode" |
| 1314 |
value="1" |
| 1315 |
<?php checked( isset($options['smooth_scroll_disable_editor_mode']) ? $options['smooth_scroll_disable_editor_mode'] : 0, 1 ); ?>> |
| 1316 |
<span class="slider round"></span> |
| 1317 |
</label> |
| 1318 |
</div> |
| 1319 |
|
| 1320 |
<!-- Excluded Selectors --> |
| 1321 |
<div class="easyel-smooth-scroll-item"> |
| 1322 |
<span class="easy-field-label">Excluded Selectors (CSS)</span> |
| 1323 |
<label class="easy-field-item"> |
| 1324 |
<input type="text" |
| 1325 |
name="smooth_scroll_excluded" |
| 1326 |
placeholder=".no-scroll, #skip-section" |
| 1327 |
value="<?php echo isset($options['smooth_scroll_excluded']) ? esc_attr($options['smooth_scroll_excluded']) : ''; ?>"> |
| 1328 |
</label> |
| 1329 |
</div> |
| 1330 |
|
| 1331 |
</div> |
| 1332 |
|
| 1333 |
<div class="easyel-smooth-scroll-save"> |
| 1334 |
<input type="submit" |
| 1335 |
class="smooth_scroll_popup_item_save" |
| 1336 |
name="smooth_scroll_popup_item_save" |
| 1337 |
value="<?php echo esc_attr__('Save Changes', 'easy-elements'); ?>"> |
| 1338 |
</div> |
| 1339 |
</form> |
| 1340 |
</div> |
| 1341 |
|
| 1342 |
</div> |
| 1343 |
<?php |
| 1344 |
} |
| 1345 |
|
| 1346 |
public function easyel_smooth_scroller_popup_callback() { |
| 1347 |
$this->easyel_smooth_scroller_popup_display(); |
| 1348 |
} |
| 1349 |
|
| 1350 |
function save_smooth_scroll_settings() { |
| 1351 |
|
| 1352 |
// Permission check |
| 1353 |
if ( ! current_user_can('manage_options') ) { |
| 1354 |
wp_send_json_error(__('Unauthorized', 'easy-elements')); |
| 1355 |
} |
| 1356 |
|
| 1357 |
// Nonce check |
| 1358 |
check_ajax_referer('easy_elements_nonce', 'nonce'); |
| 1359 |
|
| 1360 |
if ( ! isset($_POST['settings']) ) { |
| 1361 |
wp_send_json_error(['message' => 'No settings received']); |
| 1362 |
} |
| 1363 |
|
| 1364 |
// Sanitize deeply |
| 1365 |
$settings = map_deep( wp_unslash( $_POST['settings'] ), 'sanitize_text_field'); |
| 1366 |
|
| 1367 |
// Save all settings under one option name |
| 1368 |
update_option('easyel_scroll_smoother_settings', $settings); |
| 1369 |
|
| 1370 |
wp_send_json_success(['message' => 'Saved successfully']); |
| 1371 |
} |
| 1372 |
|
| 1373 |
} |
| 1374 |
|
| 1375 |
// Initialize the plugin |
| 1376 |
Easyel_Elements::get_instance(); |