Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/essential-addons-for-elementor-lite/essential_adons_elementor.php
+++ b/essential-addons-for-elementor-lite/essential_adons_elementor.php
@@ -4,14 +4,14 @@
* Description: The Essential plugin you install after Elementor! Packed with 100+ stunning elements like Data Table, Event Calendar, Filterable Gallery, WooCommerce.
* Plugin URI: https://essential-addons.com/
* Author: WPDeveloper
- * Version: 6.5.13
+ * Version: 6.6.0
* Author URI: https://wpdeveloper.com/
* Text Domain: essential-addons-for-elementor-lite
* Domain Path: /languages
*
* WC tested up to: 10.0
- * Elementor tested up to: 3.35
- * Elementor Pro tested up to: 3.35
+ * Elementor tested up to: 4.0
+ * Elementor Pro tested up to: 4.0
*/
if (!defined('ABSPATH')) {
@@ -27,7 +27,7 @@
define('EAEL_PLUGIN_BASENAME', plugin_basename(__FILE__));
define('EAEL_PLUGIN_PATH', trailingslashit(plugin_dir_path(__FILE__)));
define('EAEL_PLUGIN_URL', trailingslashit(plugins_url('/', __FILE__)));
-define('EAEL_PLUGIN_VERSION', '6.5.13');
+define('EAEL_PLUGIN_VERSION', '6.6.0');
define('EAEL_ASSET_PATH', wp_upload_dir()['basedir'] . '/essential-addons-elementor');
define('EAEL_ASSET_URL', wp_upload_dir()['baseurl'] . '/essential-addons-elementor');
/**
--- a/essential-addons-for-elementor-lite/includes/Elements/Adv_Accordion.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Adv_Accordion.php
@@ -78,7 +78,14 @@
if( Plugin::$instance->editor->is_edit_mode() ) {
return false;
}
- $accordion_tabs = $this->get_settings('eael_adv_accordion_tab');
+
+ $settings = $this->get_data( 'settings' );
+
+ if ( empty( $settings ) || ! is_array( $settings ) ) {
+ return false;
+ }
+
+ $accordion_tabs = $settings['eael_adv_accordion_tab'] ?? [];
$is_dynamic_content = false;
if( ! empty( $accordion_tabs ) ){
foreach( $accordion_tabs as $accordion_tab ){
@@ -90,7 +97,7 @@
}
if( ! $is_dynamic_content ) {
- $is_dynamic_content = 'yes' === $this->get_settings( 'eael_adv_accordion_faq_schema_show' );
+ $is_dynamic_content = 'yes' === sanitize_text_field( $settings['eael_adv_accordion_faq_schema_show'] ?? '' );
}
return $is_dynamic_content;
@@ -1813,8 +1820,12 @@
echo '<div '; $this->print_render_attribute_string($tab_content_setting_key); echo '>';
if ('content' == $tab['eael_adv_accordion_text_type']) {
+ $tab_content = $tab['eael_adv_accordion_tab_content'];
+ if ( ! apply_filters( 'eael/advanced_accordion/allow_dangerous_html', false ) ) {
+ $tab_content = wp_kses( $tab_content, Helper::eael_allowed_tags() );
+ }
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $this->parse_text_editor( wp_kses( $tab['eael_adv_accordion_tab_content'], Helper::eael_allowed_tags() ) );
+ echo $this->parse_text_editor( $tab_content );
} elseif ('template' == $tab['eael_adv_accordion_text_type']) {
if ( ! empty( $tab['eael_primary_templates'] ) && Helper::is_elementor_publish_template( $tab['eael_primary_templates'] ) ) {
// WPML Compatibility
--- a/essential-addons-for-elementor-lite/includes/Elements/Adv_Tabs.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Adv_Tabs.php
@@ -65,7 +65,14 @@
if( Plugin::$instance->editor->is_edit_mode() ) {
return false;
}
- $tabs = $this->get_settings('eael_adv_tabs_tab');
+
+ $settings = $this->get_data( 'settings' );
+
+ if ( empty( $settings ) || ! is_array( $settings ) ) {
+ return false;
+ }
+
+ $tabs = $settings['eael_adv_tabs_tab'] ?? [];
$is_dynamic_content = false;
if( ! empty( $tabs ) ){
foreach( $tabs as $tab ){
@@ -1449,8 +1456,12 @@
<div id="<?php echo esc_attr( $tab_id ); ?>" class="clearfix eael-tab-content-item <?php echo esc_attr($content_active_class); ?>" data-title-link="<?php echo esc_attr( $tab_id ); ?>">
<?php
if ('content' == $tab['eael_adv_tabs_text_type']) :
+ $tab_content = $tab['eael_adv_tabs_tab_content'];
+ if ( ! apply_filters( 'eael/advanced_tabs/allow_dangerous_html', false ) ) {
+ $tab_content = wp_kses( $tab_content, Helper::eael_allowed_tags() );
+ }
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $this->parse_text_editor( wp_kses( $tab['eael_adv_tabs_tab_content'] , Helper::eael_allowed_tags() ) );
+ echo $this->parse_text_editor( $tab_content );
elseif ('template' == $tab['eael_adv_tabs_text_type']) :
if ( ! empty( $tab['eael_primary_templates'] ) ) {
--- a/essential-addons-for-elementor-lite/includes/Elements/Betterdocs_Search_Form.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Betterdocs_Search_Form.php
@@ -583,14 +583,16 @@
{
if (!defined('BETTERDOCS_URL')) return;
$settings = $this->get_settings_for_display();
- $shortcode = sprintf('[betterdocs_search_form placeholder="' . esc_html( $settings['section_search_field_placeholder'] ) . '"]', apply_filters('eael_betterdocs_search_form_params', []));
+ $placeholder = isset( $settings['section_search_field_placeholder'] ) ? $settings['section_search_field_placeholder'] : '';
+ $shortcode = sprintf('[betterdocs_search_form placeholder="' . esc_html( $placeholder ) . '"]', apply_filters('eael_betterdocs_search_form_params', []));
echo do_shortcode(shortcode_unautop($shortcode));
}
public function render_plain_content()
{
$settings = $this->get_settings_for_display();
+ $placeholder = isset( $settings['section_search_field_placeholder'] ) ? $settings['section_search_field_placeholder'] : '';
// In plain mode, render without shortcode
- echo '[betterdocs_search_form placeholder="' . esc_html( $settings['section_search_field_placeholder'] ) . '"]';
+ echo '[betterdocs_search_form placeholder="' . esc_html( $placeholder ) . '"]';
}
}
--- a/essential-addons-for-elementor-lite/includes/Elements/Business_Reviews.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Business_Reviews.php
@@ -114,7 +114,8 @@
);
$google_api_options = apply_filters('eael/business_reviews/google_api_options', [
- 'places' => __( 'Google Places API', 'essential-addons-for-elementor-lite' ),
+ 'places' => __( 'Google Places API', 'essential-addons-for-elementor-lite' ),
+ 'places-new' => __( 'Google Places API (New)', 'essential-addons-for-elementor-lite' ),
]);
$this->add_control(
@@ -141,7 +142,7 @@
'content_classes' => 'eael-warning',
'condition' => [
'eael_business_reviews_sources' => 'google-reviews',
- 'eael_business_reviews_google_api_type' => 'places',
+ 'eael_business_reviews_google_api_type' => [ 'places', 'places-new' ],
],
] );
}
@@ -166,7 +167,7 @@
],
'condition' => [
'eael_business_reviews_sources' => 'google-reviews',
- 'eael_business_reviews_google_api_type' => 'places',
+ 'eael_business_reviews_google_api_type' => [ 'places', 'places-new' ],
],
'ai' => [
'active' => true,
@@ -201,7 +202,7 @@
'description' => __( 'Max 5 reviews, please specify amount.', 'essential-addons-for-elementor-lite' ),
'condition' => [
'eael_business_reviews_sources' => 'google-reviews',
- 'eael_business_reviews_google_api_type' => 'places',
+ 'eael_business_reviews_google_api_type' => [ 'places', 'places-new' ],
],
]
);
@@ -2790,51 +2791,102 @@
public function fetch_google_reviews_from_api( $business_reviews_settings ) {
$business_reviews = $business_reviews_settings;
+ $error_message = '';
+ $response = false;
- $url = "https://maps.googleapis.com/maps/api/place/details/json";
- $param = array();
- $error_message = '';
+ if ( 'places-new' === $business_reviews['google_api_type'] ) {
+ $url = "https://places.googleapis.com/v1/places/" . sanitize_text_field( $business_reviews['place_id'] );
+ $headers = array(
+ 'Content-Type' => 'application/json',
+ 'X-Goog-Api-Key' => sanitize_text_field( $business_reviews['api_key'] ),
+ 'X-Goog-FieldMask' => 'id,displayName,formattedAddress,internationalPhoneNumber,rating,userRatingCount,websiteUri,googleMapsUri,photos,reviews',
+ );
- $api_fields = 'formatted_address,international_phone_number,name,rating,reviews,url,user_ratings_total,website,photos';
- $api_fields = $business_reviews['localbusiness_schema'] ? 'address_components,' . $api_fields : $api_fields;
-
- $args = array(
- 'key' => sanitize_text_field( $business_reviews['api_key'] ),
- 'placeid' => sanitize_text_field( $business_reviews['place_id'] ),
- 'reviews_no_translations' => intval( $business_reviews['review_text_translation'] ) ? false : true,
- 'fields' => sanitize_text_field( $api_fields ),
- );
+ $response = wp_remote_get( $url, array(
+ 'headers' => $headers,
+ 'timeout' => 240,
+ ) );
- if ( ! empty( $business_reviews['reviews_sort'] ) ) {
- $args['reviews_sort'] = $business_reviews['reviews_sort'];
- }
+ if ( is_wp_error( $response ) ) {
+ $error_message = $response->get_error_message();
+ } else {
+ $body = json_decode( wp_remote_retrieve_body( $response ) );
+
+ if ( ! empty( $body->error ) ) {
+ $error_message = ! empty( $body->error->message ) ? $body->error->message : __( 'An error occurred while fetching data from Google Places API.', 'essential-addons-for-elementor-lite' );
+ } elseif ( ! empty( $body ) ) {
+ // Map New API response to Legacy structure
+ $mapped_result = new stdClass();
+ $mapped_result->name = ! empty( $body->displayName->text ) ? $body->displayName->text : '';
+ $mapped_result->formatted_address = ! empty( $body->formattedAddress ) ? $body->formattedAddress : '';
+ $mapped_result->international_phone_number = ! empty( $body->internationalPhoneNumber ) ? $body->internationalPhoneNumber : '';
+ $mapped_result->rating = ! empty( $body->rating ) ? $body->rating : 0;
+ $mapped_result->user_ratings_total = ! empty( $body->userRatingCount ) ? $body->userRatingCount : 0;
+ $mapped_result->website = ! empty( $body->websiteUri ) ? $body->websiteUri : '';
+ $mapped_result->url = ! empty( $body->googleMapsUri ) ? $body->googleMapsUri : '';
+ $mapped_result->photos = ! empty( $body->photos ) ? $body->photos : [];
+
+ $mapped_reviews = [];
+ if ( ! empty( $body->reviews ) ) {
+ foreach ( $body->reviews as $review ) {
+ $m_review = new stdClass();
+ $m_review->author_name = ! empty( $review->authorAttribution->displayName ) ? $review->authorAttribution->displayName : '';
+ $m_review->author_url = ! empty( $review->authorAttribution->uri ) ? $review->authorAttribution->uri : '';
+ $m_review->profile_photo_url = ! empty( $review->authorAttribution->photoUri ) ? $review->authorAttribution->photoUri : '';
+ $m_review->rating = ! empty( $review->rating ) ? $review->rating : 0;
+ $m_review->relative_time_description = ! empty( $review->relativePublishTimeDescription ) ? $review->relativePublishTimeDescription : '';
+ $m_review->text = ! empty( $review->text->text ) ? $review->text->text : '';
+ $mapped_reviews[] = $m_review;
+ }
+ }
+ $mapped_result->reviews = $mapped_reviews;
+
+ $response = $mapped_result;
+ set_transient( $business_reviews['cache_key'], $response, $business_reviews['expiration'] );
+ }
+ }
+ } else {
+ $url = "https://maps.googleapis.com/maps/api/place/details/json";
+ $param = array();
- $param = array_merge( $param, $args );
+ $api_fields = 'formatted_address,international_phone_number,name,rating,reviews,url,user_ratings_total,website,photos';
+ $api_fields = $business_reviews['localbusiness_schema'] ? 'address_components,' . $api_fields : $api_fields;
- $headers = array(
- 'headers' => array(
- 'Content-Type' => 'application/json',
- )
- );
- $options = array(
- 'timeout' => 240
- );
+ $args = array(
+ 'key' => sanitize_text_field( $business_reviews['api_key'] ),
+ 'placeid' => sanitize_text_field( $business_reviews['place_id'] ),
+ 'reviews_no_translations' => intval( $business_reviews['review_text_translation'] ) ? false : true,
+ 'fields' => sanitize_text_field( $api_fields ),
+ );
- $options = array_merge( $headers, $options );
+ if ( ! empty( $business_reviews['reviews_sort'] ) ) {
+ $args['reviews_sort'] = $business_reviews['reviews_sort'];
+ }
- if ( empty( $error_message ) ) {
- $response = wp_remote_get(
+ $param = array_merge( $param, $args );
+ $options = array(
+ 'timeout' => 240,
+ 'headers' => array(
+ 'Content-Type' => 'application/json',
+ )
+ );
+
+ $res = wp_remote_get(
esc_url_raw( add_query_arg( $param, $url ) ),
$options
);
- $body = json_decode( wp_remote_retrieve_body( $response ) );
- $response = 'OK' === $body->status ? $body->result : false;
-
- if ( ! empty( $response ) ) {
- set_transient( $business_reviews['cache_key'], $response, $business_reviews['expiration'] );
+ if ( is_wp_error( $res ) ) {
+ $error_message = $res->get_error_message();
} else {
- $error_message = $this->fetch_google_place_response_error_message( $body->status );
+ $body = json_decode( wp_remote_retrieve_body( $res ) );
+ $response = 'OK' === $body->status ? $body->result : false;
+
+ if ( ! empty( $response ) ) {
+ set_transient( $business_reviews['cache_key'], $response, $business_reviews['expiration'] );
+ } else {
+ $error_message = $this->fetch_google_place_response_error_message( $body->status );
+ }
}
}
--- a/essential-addons-for-elementor-lite/includes/Elements/Countdown.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Countdown.php
@@ -59,7 +59,14 @@
if( Plugin::$instance->editor->is_edit_mode() ) {
return false;
}
- $expire_type = $this->get_settings('countdown_expire_type');
+
+ $settings = $this->get_data( 'settings' );
+
+ if ( empty( $settings ) || ! is_array( $settings ) ) {
+ return false;
+ }
+
+ $expire_type = sanitize_text_field( $settings['countdown_expire_type'] ?? '' );
$is_dynamic_content = 'template' === $expire_type;
return $is_dynamic_content;
--- a/essential-addons-for-elementor-lite/includes/Elements/Creative_Button.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Creative_Button.php
@@ -228,6 +228,8 @@
'{{WRAPPER}} .eael-creative-button-icon-right' => 'margin-left: {{SIZE}}px;',
'{{WRAPPER}} .eael-creative-button-icon-left' => 'margin-right: {{SIZE}}px;',
'{{WRAPPER}} .eael-creative-button--shikoba i' => 'left: {{SIZE}}%;',
+ '{{WRAPPER}} .eael-creative-button--winona.eael-cb-icon-position-left::after' => 'left: {{SIZE}}px;',
+ '{{WRAPPER}} .eael-creative-button--winona.eael-cb-icon-position-right::after' => 'left: -{{SIZE}}px;',
],
]
);
@@ -1164,7 +1166,7 @@
$icon_is_new = empty($settings['eael_creative_button_icon']);
$this->add_render_attribute('eael_creative_button', [
- 'class' => ['eael-creative-button', esc_attr($settings['creative_button_effect'])],
+ 'class' => ['eael-creative-button', esc_attr($settings['creative_button_effect']) , 'eael-cb-icon-position-' . $settings['eael_creative_button_icon_alignment'] ],
]);
if ( ! empty( $settings['creative_button_link_url']['url'] ) ) {
--- a/essential-addons-for-elementor-lite/includes/Elements/Cta_Box.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Cta_Box.php
@@ -64,7 +64,14 @@
if( Plugin::$instance->editor->is_edit_mode() ) {
return false;
}
- $content_type = $this->get_settings('eael_cta_title_content_type');
+
+ $settings = $this->get_data( 'settings' );
+
+ if ( empty( $settings ) || ! is_array( $settings ) ) {
+ return false;
+ }
+
+ $content_type = sanitize_text_field( $settings['eael_cta_title_content_type'] ?? '' );
$is_dynamic_content = 'template' === $content_type;
return $is_dynamic_content;
--- a/essential-addons-for-elementor-lite/includes/Elements/Data_Table.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Data_Table.php
@@ -62,8 +62,14 @@
if( Plugin::$instance->editor->is_edit_mode() ) {
return false;
}
-
- $table_rows = $this->get_settings('eael_data_table_content_rows');
+
+ $settings = $this->get_data( 'settings' );
+
+ if ( empty( $settings ) || ! is_array( $settings ) ) {
+ return false;
+ }
+
+ $table_rows = $settings['eael_data_table_content_rows'] ?? [];
$is_dynamic_content = false;
if( ! empty( $table_rows ) ){
--- a/essential-addons-for-elementor-lite/includes/Elements/Event_Calendar.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Event_Calendar.php
@@ -286,6 +286,27 @@
]
);
+ $repeater->add_control(
+ 'eael_event_location',
+ [
+ 'label' => __('Location', 'essential-addons-for-elementor-lite'),
+ 'type' => Controls_Manager::TEXT,
+ 'dynamic' => [ 'active' => true ],
+ 'label_block' => true,
+ ]
+ );
+
+ $repeater->add_control(
+ 'eael_event_category',
+ [
+ 'label' => __('Category', 'essential-addons-for-elementor-lite'),
+ 'type' => Controls_Manager::TEXT,
+ 'dynamic' => [ 'active' => true ],
+ 'label_block' => true,
+ ]
+ );
+
+
$repeater->end_controls_tab();
$repeater->start_controls_tab(
@@ -708,6 +729,32 @@
]
);
+ $this->add_control(
+ 'eael_event_calendar_show_search',
+ [
+ 'label' => esc_html__( 'Show Search', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::SWITCHER,
+ 'label_on' => esc_html__( 'Yes', 'essential-addons-for-elementor-lite' ),
+ 'label_off' => esc_html__( 'No', 'essential-addons-for-elementor-lite' ),
+ 'return_value' => 'yes',
+ 'default' => 'no',
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_search_placeholder',
+ [
+ 'label' => esc_html__( 'Search Placeholder', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::TEXT,
+ 'placeholder' => esc_html__( 'Search', 'essential-addons-for-elementor-lite' ),
+ 'default' => esc_html__( 'Search', 'essential-addons-for-elementor-lite' ),
+ 'condition' => [
+ 'eael_event_calendar_show_search' => 'yes'
+ ]
+ ]
+ );
+
+
if (apply_filters('eael/is_plugin_active', 'eventON/eventon.php') && apply_filters('eael/pro_enabled', false)) {
$this->add_control(
'eael_event_on_featured_color',
@@ -3488,6 +3535,271 @@
);
$this->end_controls_section();
+
+ /**
+ * Calendar Layout design Search
+ */
+ $this->start_controls_section(
+ 'eael_event_calendar_search_calendar_input_styling',
+ [
+ 'label' => __( 'Search Input', 'essential-addons-for-elementor-lite' ),
+ 'tab' => Controls_Manager::TAB_STYLE,
+ 'condition' => [
+ 'eael_event_display_layout' => 'calendar',
+ 'eael_event_calendar_show_search' => 'yes'
+ ]
+ ]
+ );
+
+ $this->add_responsive_control(
+ 'eael_event_calendar_search_calendar_input_width',
+ [
+ 'label' => esc_html__( 'Width', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::SLIDER,
+ 'size_units' => [ 'px', '%', 'em' ],
+ 'range' => [
+ 'px' => [
+ 'min' => 0,
+ 'max' => 1000,
+ 'step' => 5,
+ ],
+ '%' => [
+ 'min' => 0,
+ 'max' => 100,
+ ],
+ ],
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-wrapper .eael-event-calendar-search .eael-event-calendar-search-input' => 'width: {{SIZE}}{{UNIT}};',
+ ],
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Typography::get_type(),
+ [
+ 'name' => 'eael_event_calendar_search_calendar_input_typography',
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-input',
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_search_calendar_input_text_color',
+ [
+ 'label' => esc_html__( 'Text Color', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::COLOR,
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-input' => 'color: {{VALUE}};',
+ ],
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_search_calendar_input_placeholder_color',
+ [
+ 'label' => esc_html__( 'Placeholder Color', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::COLOR,
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-input::placeholder' => 'color: {{VALUE}};',
+ ],
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Background::get_type(),
+ [
+ 'name' => 'eael_event_calendar_search_calendar_input_background',
+ 'types' => [ 'classic', 'gradient' ],
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-input',
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Border::get_type(),
+ [
+ 'name' => 'eael_event_calendar_search_calendar_input_border',
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-input',
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_search_calendar_input_border_radius',
+ [
+ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::DIMENSIONS,
+ 'size_units' => [ 'px', '%', 'em' ],
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
+ ],
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Box_Shadow::get_type(),
+ [
+ 'name' => 'eael_event_calendar_search_calendar_input_box_shadow',
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-input',
+ ]
+ );
+
+ $this->add_responsive_control(
+ 'eael_event_calendar_search_calendar_input_padding',
+ [
+ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::DIMENSIONS,
+ 'size_units' => [ 'px', '%', 'em' ],
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
+ ],
+ ]
+ );
+
+ $this->add_responsive_control(
+ 'eael_event_calendar_search_calendar_input_margin',
+ [
+ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::DIMENSIONS,
+ 'size_units' => [ 'px', '%', 'em' ],
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
+ ],
+ ]
+ );
+
+ $this->end_controls_section();
+
+ /**
+ * Search Suggestions design Search
+ */
+ $this->start_controls_section(
+ 'eael_event_calendar_search_suggestions_styling',
+ [
+ 'label' => __( 'Search Suggestions', 'essential-addons-for-elementor-lite' ),
+ 'tab' => Controls_Manager::TAB_STYLE,
+ 'condition' => [
+ 'eael_event_display_layout' => 'calendar',
+ 'eael_event_calendar_show_search' => 'yes'
+ ]
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_suggestions_container_heading',
+ [
+ 'label' => esc_html__( 'Container', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::HEADING,
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Background::get_type(),
+ [
+ 'name' => 'eael_event_calendar_suggestions_background',
+ 'types' => [ 'classic', 'gradient' ],
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-suggestions',
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Border::get_type(),
+ [
+ 'name' => 'eael_event_calendar_suggestions_border',
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-suggestions',
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_suggestions_border_radius',
+ [
+ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::DIMENSIONS,
+ 'size_units' => [ 'px', '%', 'em' ],
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-suggestions' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
+ ],
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Box_Shadow::get_type(),
+ [
+ 'name' => 'eael_event_calendar_suggestions_box_shadow',
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-suggestions',
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_suggestion_item_heading',
+ [
+ 'label' => esc_html__( 'Suggestion Item', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::HEADING,
+ 'separator' => 'before',
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Typography::get_type(),
+ [
+ 'name' => 'eael_event_calendar_suggestion_title_typography',
+ 'label' => esc_html__( 'Title Typography', 'essential-addons-for-elementor-lite' ),
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-suggestions .suggestion-item .suggestion-title',
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_suggestion_title_color',
+ [
+ 'label' => esc_html__( 'Title Color', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::COLOR,
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-suggestions .suggestion-item .suggestion-title' => 'color: {{VALUE}};',
+ ],
+ ]
+ );
+
+ $this->add_group_control(
+ Group_Control_Typography::get_type(),
+ [
+ 'name' => 'eael_event_calendar_suggestion_meta_typography',
+ 'label' => esc_html__( 'Meta Typography', 'essential-addons-for-elementor-lite' ),
+ 'selector' => '{{WRAPPER}} .eael-event-calendar-search-suggestions .suggestion-item .suggestion-meta',
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_suggestion_meta_color',
+ [
+ 'label' => esc_html__( 'Meta Color', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::COLOR,
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-suggestions .suggestion-item .suggestion-meta' => 'color: {{VALUE}};',
+ ],
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_suggestion_item_hover_bg',
+ [
+ 'label' => esc_html__( 'Hover Background color', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::COLOR,
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-suggestions .suggestion-item:hover' => 'background: {{VALUE}};',
+ ],
+ ]
+ );
+
+ $this->add_control(
+ 'eael_event_calendar_suggestion_item_padding',
+ [
+ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::DIMENSIONS,
+ 'size_units' => [ 'px', '%', 'em' ],
+ 'selectors' => [
+ '{{WRAPPER}} .eael-event-calendar-search-suggestions .suggestion-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
+ ],
+ ]
+ );
+
+ $this->end_controls_section();
}
protected function render() {
@@ -3519,6 +3831,16 @@
];
echo '<div class="eael-event-calendar-wrapper layout-' . esc_attr( $settings['eael_event_display_layout'] ) . '">';
+
+ if ( $settings['eael_event_display_layout'] === 'calendar' && $settings['eael_event_calendar_show_search'] === 'yes' ) {
+ ?>
+ <div class="eael-event-calendar-search-wrap eael-event-calendar-search">
+ <input type="search" id="eael-event-calendar-search-input-<?php echo esc_attr( $this->get_id() ) ?>" placeholder="<?php echo esc_html( $settings['eael_event_calendar_search_placeholder'] )?>" class="eael-event-calendar-search-input">
+ <div class="eael-event-calendar-search-suggestions"></div>
+ </div>
+ <?php
+ }
+
if ( $settings['eael_event_display_layout'] === 'calendar' ) {
echo '<div id="eael-event-calendar-' . esc_attr( $this->get_id() ) . '" class="eael-event-calendar-cls"
@@ -3886,6 +4208,8 @@
'nofollow' => $event['eael_event_link']['nofollow'],
'is_redirect' => $event['eael_event_redirection'],
'custom_attributes' => $custom_attributes,
+ 'location' => sanitize_text_field( $event['eael_event_location'] ),
+ 'category' => sanitize_text_field( $event['eael_event_category'] ),
'event_link' => $event['eael_event_link']
];
@@ -4135,6 +4459,8 @@
'external' => 'on',
'nofollow' => 'on',
'imageUrl' => get_the_post_thumbnail_url($event->ID, 'full'),
+ 'location' => function_exists('tribe_get_venue') ? tribe_get_venue($event->ID) : '',
+ 'category' => function_exists('tribe_get_event_categories') ? wp_strip_all_tags(tribe_get_event_categories($event->ID, ['label' => '', 'label_before' => '', 'label_after' => ''])) : '',
];
}
--- a/essential-addons-for-elementor-lite/includes/Elements/Filterable_Gallery.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Filterable_Gallery.php
@@ -521,6 +521,38 @@
'default' => 'yes',
]
);
+
+ $this->add_control(
+ 'eael_fg_mobile_scroll_to_top',
+ [
+ 'label' => __('Scroll to Items on Mobile', 'essential-addons-for-elementor-lite'),
+ 'type' => Controls_Manager::SWITCHER,
+ 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
+ 'label_off' => __('No', 'essential-addons-for-elementor-lite'),
+ 'return_value' => 'yes',
+ 'default' => '',
+ 'description' => __('Enable this to automatically scroll to the items of the gallery on mobile devices after selecting a filter.', 'essential-addons-for-elementor-lite'),
+ ]
+ );
+
+ $this->add_control(
+ 'eael_fg_mobile_scroll_offset',
+ [
+ 'label' => __('Scroll Offset (px)', 'essential-addons-for-elementor-lite'),
+ 'type' => Controls_Manager::NUMBER,
+ 'default' => 0,
+ 'min' => -500,
+ 'max' => 500,
+ 'step' => 1,
+ 'condition' => [
+ 'eael_fg_mobile_scroll_to_top' => 'yes',
+ ],
+ 'ai' => [
+ 'active' => false,
+ ],
+ ]
+ );
+
$this->add_control(
'eael_fg_all_label_text',
@@ -755,6 +787,20 @@
]
);
+ $this->add_control(
+ 'eael_fg_use_video_tag',
+ [
+ 'label' => __( 'Use Video Tag', 'essential-addons-for-elementor-lite' ),
+ 'type' => Controls_Manager::SWITCHER,
+ 'return_value' => 'yes',
+ 'default' => '',
+ 'description' => __( 'Enable this to use an HTML5 video tag instead of iframe for self-hosted videos. Recommended for iOS devices.', 'essential-addons-for-elementor-lite' ),
+ 'condition' => [
+ 'eael_fg_caption_style!' => [ 'grid_flow_gallery', 'harmonic_gallery' ],
+ ],
+ ]
+ );
+
$repeater = new Repeater();
$repeater->add_control(
@@ -828,7 +874,7 @@
'label' => esc_html__('Link', 'essential-addons-for-elementor-lite'),
'type' => Controls_Manager::TEXT,
'label_block' => true,
- 'default' => 'https://www.youtube.com/watch?v = kB4U67tiQLA',
+ 'default' => 'https://www.youtube.com/watch?v=kB4U67tiQLA',
'condition' => [
'fg_video_gallery_switch' => 'true',
],
@@ -4321,6 +4367,8 @@
'gallery_enabled' => $settings['photo_gallery'],
'video_gallery_yt_privacy' => $settings['video_gallery_yt_privacy'],
'control_all_text' => $settings['eael_fg_all_label_text'],
+ 'mobile_scroll_to_top' => $settings['eael_fg_mobile_scroll_to_top'],
+ 'mobile_scroll_offset' => isset( $settings['eael_fg_mobile_scroll_offset'] ) ? (int) $settings['eael_fg_mobile_scroll_offset'] : 0,
];
if ( Plugin::$instance->editor->is_edit_mode()) {
@@ -4360,6 +4408,10 @@
$this->add_render_attribute( 'gallery-items-wrap', 'data-privacy-notice', esc_html( $settings['eael_privacy_notice'] ) );
}
+ if ( 'yes' === $settings['eael_fg_use_video_tag'] ) {
+ $this->add_render_attribute( 'gallery-items-wrap', 'data-use-video-tag', 'yes' );
+ }
+
$html_json = wp_json_encode( $gallery_items );
$json_base64 = base64_encode( $html_json );
--- a/essential-addons-for-elementor-lite/includes/Elements/Flip_Box.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Flip_Box.php
@@ -69,9 +69,15 @@
if( Plugin::$instance->editor->is_edit_mode() ) {
return false;
}
-
- $front_content_type = $this->get_settings('eael_flipbox_front_content_type');
- $back_content_type = $this->get_settings('eael_flipbox_back_content_type');
+
+ $settings = $this->get_data( 'settings' );
+
+ if ( empty( $settings ) || ! is_array( $settings ) ) {
+ return false;
+ }
+
+ $front_content_type = sanitize_text_field( $settings['eael_flipbox_front_content_type'] ?? '' );
+ $back_content_type = sanitize_text_field( $settings['eael_flipbox_back_content_type'] ?? '' );
$is_dynamic_content = 'template' === $front_content_type || 'template' === $back_content_type;
return $is_dynamic_content;
--- a/essential-addons-for-elementor-lite/includes/Elements/Info_Box.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Info_Box.php
@@ -64,7 +64,14 @@
if( Plugin::$instance->editor->is_edit_mode() ) {
return false;
}
- $content_type = $this->get_settings('eael_infobox_text_type');
+
+ $settings = $this->get_data( 'settings' );
+
+ if ( empty( $settings ) || ! is_array( $settings ) ) {
+ return false;
+ }
+
+ $content_type = sanitize_text_field( $settings['eael_infobox_text_type'] ?? '' );
$is_dynamic_content = 'template' === $content_type;
return $is_dynamic_content;
--- a/essential-addons-for-elementor-lite/includes/Elements/Login_Register.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Login_Register.php
@@ -6627,12 +6627,13 @@
foreach ( $this->ds['register_fields'] as $f_index => $field ) :
$field_type = $field['field_type'];
$dynamic_field_name = "{$field_type}_exists";
+ if( ! isset( $$dynamic_field_name ) ){
+ $$dynamic_field_name = 0;
+ }
$$dynamic_field_name ++; //NOTE, double $$ intentional. Dynamically update the var check eg. $username_exists++ to prevent user from using the same field twice
// is same field repeated?
- if( isset( $$dynamic_field_name ) ){
- if ( $$dynamic_field_name > 1 ) {
- $repeated_f_labels[] = $f_labels[ $field_type ];
- }
+ if ( $$dynamic_field_name > 1 ) {
+ $repeated_f_labels[] = $f_labels[ $field_type ];
}
if ( 'password' === $field_type ) {
--- a/essential-addons-for-elementor-lite/includes/Elements/Simple_Menu.php
+++ b/essential-addons-for-elementor-lite/includes/Elements/Simple_Menu.php
@@ -1637,7 +1637,7 @@
}
$menu_classes = ['eael-simple-menu', $settings['eael_simple_menu_dropdown_animation'], 'eael-simple-menu-indicator', $settings['eael_hamburger_menu_item_alignment']];
- $container_classes = ['eael-simple-menu-container', $align, $fullWidth, $settings['eael_simple_menu_dropdown_item_alignment'], $settings['eael_simple_menu_preset']];
+ $container_classes = ['eael-simple-menu-container', 'eael-simple-menu--loading', $align, $fullWidth, $settings['eael_simple_menu_dropdown_item_alignment'], $settings['eael_simple_menu_preset']];
if ($settings['eael_simple_menu_layout'] == 'horizontal') {
$menu_classes[] = 'eael-simple-menu-horizontal';
@@ -1704,6 +1704,16 @@
}
}
}
+ .eael-simple-menu-container.eael-simple-menu--loading > ul {
+ display: -webkit-box !important;
+ display: -ms-flexbox !important;
+ display: flex !important;
+ list-style: none !important;
+ }
+ .eael-simple-menu-container.eael-simple-menu--loading li ul {
+ visibility: hidden !important;
+ opacity: 0 !important;
+ }
</style>";
}
?>
--- a/essential-addons-for-elementor-lite/includes/Traits/Elements.php
+++ b/essential-addons-for-elementor-lite/includes/Traits/Elements.php
@@ -377,6 +377,10 @@
$config['promotionWidgets'] = $combine_array;
+ if ( isset( $config['promotion']['elements']['action_button'] ) && empty( $config['promotion']['elements']['action_button']['url'] ) ) {
+ $config['promotion']['elements']['action_button']['url'] = 'https://wpdeveloper.com/upgrade/ea-pro';
+ }
+
return $config;
}
--- a/essential-addons-for-elementor-lite/includes/Traits/Login_Registration.php
+++ b/essential-addons-for-elementor-lite/includes/Traits/Login_Registration.php
@@ -595,24 +595,35 @@
$custom_redirect_url = ! empty( $settings['register_redirect_url_prev_page'] ) && $settings['register_redirect_url_prev_page'] === 'yes' ? $previous_page_url : $custom_redirect_url;
if ( ! empty( $settings['register_user_role'] ) ) {
- $user_data['role'] = sanitize_text_field( $settings['register_user_role'] );
- }
-
- if ( ! empty( $user_data['role'] ) && strtolower( $user_data['role'] ) === 'administrator' ) {
- $err_msg = __( 'Invalid Role!', 'essential-addons-for-elementor-lite' );
+ $requested_role = sanitize_text_field( $settings['register_user_role'] );
- if ( $ajax ) {
- wp_send_json_error( $err_msg );
+ // Verify the post was last saved by an administrator before trusting
+ $last_editor_id = (int) get_post_meta( $page_id, '_edit_last', true );
+ if ( ! $last_editor_id ) {
+ $last_editor_id = (int) get_post_field( 'post_author', $page_id );
}
-
- setcookie( 'eael_register_errors_' . $widget_id, $err_msg );
+ $last_editor = $last_editor_id ? get_userdata( $last_editor_id ) : false;
+ $saved_by_admin = $last_editor && in_array( 'administrator', (array) $last_editor->roles, true );
- if ( isset( $_SERVER['HTTP_REFERER'] ) ) {
- wp_safe_redirect( $_SERVER['HTTP_REFERER'] ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
- exit();
+ if ( $saved_by_admin ) {
+ // Reject any role that carries privileged capabilities,
+ $wp_role = get_role( $requested_role );
+ $privileged_caps = [ 'manage_options', 'edit_users', 'delete_users', 'promote_users' ];
+ $is_safe_role = ( $wp_role !== null );
+
+ if ( $is_safe_role ) {
+ foreach ( $privileged_caps as $cap ) {
+ if ( ! empty( $wp_role->capabilities[ $cap ] ) ) {
+ $is_safe_role = false;
+ break;
+ }
+ }
+ }
+
+ if ( $is_safe_role ) {
+ $user_data['role'] = $requested_role;
+ }
}
-
- return false;
}
// set email related stuff