Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/bdthemes-element-pack-lite/admin/admin-api-biggopti.php
+++ b/bdthemes-element-pack-lite/admin/admin-api-biggopti.php
@@ -17,13 +17,13 @@
}
public function __construct() {
- add_action('wp_ajax_bdt_admin_api_biggopti_dismiss', [$this, 'bdt_admin_api_biggopti_dismiss']);
+ add_action('wp_ajax_ep_admin_api_biggopti_dismiss', [$this, 'ep_admin_api_biggopti_dismiss']);
}
/**
* Dismiss Admin API Biggopti.
*/
- public function bdt_admin_api_biggopti_dismiss() {
+ public function ep_admin_api_biggopti_dismiss() {
$nonce = (isset($_POST['_wpnonce'])) ? sanitize_text_field($_POST['_wpnonce']) : '';
$display_id = (isset($_POST['display_id'])) ? sanitize_text_field($_POST['display_id']) : '';
$id = (isset($_POST['id'])) ? esc_attr($_POST['id']) : '';
--- a/bdthemes-element-pack-lite/admin/admin-feeds.php
+++ b/bdthemes-element-pack-lite/admin/admin-feeds.php
@@ -68,7 +68,7 @@
<p>
<?php echo wp_kses_post( wp_trim_words( wp_strip_all_tags( $feed->content ), 50 ) ); ?>
<a href="<?php echo esc_url( $feed->demo_link ); ?>" target="_blank">
- <?php esc_html_e( 'Learn more...', 'bdthemes-element-pack' ); ?>
+ <?php esc_html_e( 'Learn more...', $this->settings['text_domain'] ); ?>
</a>
</p>
</div>
@@ -130,7 +130,7 @@
$rss = fetch_feed( $this->settings['feed_link'] );
if ( is_wp_error( $rss ) ) {
- return '<li>' . esc_html__( 'Items Not Found', 'bdthemes-element-pack' ) . '.</li>';
+ return '<li>' . esc_html__( 'Items Not Found', $this->settings['text_domain'] ) . '.</li>';
}
$maxitems = $rss->get_item_quantity( 5 );
@@ -154,21 +154,24 @@
ob_start();
?>
- <div class="rss-widget">
+ <div class="bdt-widget">
<ul>
<?php if ( empty( $rss_items ) ) : ?>
- <li><?php esc_html_e( 'Items Not Found', 'bdthemes-element-pack' ); ?>.</li>
+ <li><?php esc_html_e( 'Items Not Found', $this->settings['text_domain'] ); ?>.</li>
<?php else : ?>
<?php foreach ( $rss_items as $item ) : ?>
<li>
<a target="_blank" href="<?php echo esc_url( $item['link'] ); ?>"
title="<?php echo esc_html( $item['date'] ); ?>">
+ <?php if ( $this->is_feed_item_new( $item['date'] ) ) : ?>
+ <span class="bdt-feed-badge bdt-feed-badge--new"><?php esc_html_e( 'New', $this->settings['text_domain'] ); ?></span>
+ <?php endif; ?>
<?php echo esc_html( $item['title'] ); ?>
</a>
- <span class="rss-date" style="display: block; margin: 0;">
- <?php echo esc_html( human_time_diff( $item['date'], current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'bdthemes-element-pack' ) ); ?>
+ <span class="bdt-date" style="display: block; margin: 0;">
+ <?php echo esc_html( human_time_diff( $item['date'], current_time( 'timestamp' ) ) . ' ' . __( 'ago', $this->settings['text_domain'] ) ); ?>
</span>
- <div class="rss-summary">
+ <div class="bdt-summary">
<?php echo esc_html( wp_html_excerpt( $item['content'], 120 ) . ' [...]' ); ?>
</div>
</li>
@@ -194,6 +197,21 @@
<?php
return ob_get_clean();
}
+
+ /**
+ * Check if a feed item is "new" (published within the last 7 days).
+ *
+ * @param int|string $date Unix timestamp.
+ * @return bool
+ */
+ private function is_feed_item_new( $date ) {
+ $timestamp = is_numeric( $date ) ? (int) $date : strtotime( $date );
+ if ( ! $timestamp ) {
+ return false;
+ }
+ $cutoff = time() - ( 7 * DAY_IN_SECONDS );
+ return $timestamp >= $cutoff;
+ }
}
$settings = array(
@@ -201,7 +219,7 @@
'transient_key' => 'bdthemes_product_feeds',
'feed_link' => 'https://bdthemes.com/feed',
'remote_feed_link' => 'https://dashboard.bdthemes.io/wp-json/bdthemes/v1/product-feed/?product_category=element-pack',
- 'text_domain' => 'bdthemes-element-pack',
+ 'text_domain' => 'bdthemes',
'footer_links' => [
[
'url' => 'https://bdthemes.com/blog/',
@@ -223,3 +241,4 @@
);
new Admin_Feeds( $settings );
+
--- a/bdthemes-element-pack-lite/admin/admin.php
+++ b/bdthemes-element-pack-lite/admin/admin.php
@@ -43,11 +43,10 @@
public function enqueue_styles() {
$direction_suffix = is_rtl() ? '.rtl' : '';
- $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_style('bdt-uikit', BDTEP_ASSETS_URL . 'css/bdt-uikit' . $direction_suffix . '.css', [], '3.21.7');
- wp_enqueue_style('ep-editor', BDTEP_ASSETS_URL . 'css/ep-editor' . $direction_suffix . '.css', [], BDTEP_VER);
- wp_enqueue_style('ep-admin', BDTEP_ADMIN_URL . 'assets/css/ep-admin' . $direction_suffix . '.css', [], BDTEP_VER);
+ wp_enqueue_style('ep-editor', BDTEP_ASSETS_URL . 'css/ep-editor.css', [], BDTEP_VER);
+ wp_enqueue_style('ep-admin', BDTEP_ADMIN_URL . 'assets/css/ep-admin.css', [], BDTEP_VER);
wp_enqueue_script('bdt-uikit', BDTEP_ASSETS_URL . 'js/bdt-uikit.min.js', ['jquery'], '3.21.7');
}
@@ -123,6 +122,8 @@
wp_enqueue_style( 'ep-biggopti', BDTEP_ADMIN_URL . 'assets/css/ep-biggopti.css', [], BDTEP_VER, 'all' );
wp_enqueue_script( 'ep-biggopti', BDTEP_ADMIN_URL . 'assets/js/ep-biggopti.min.js', [ 'jquery' ], BDTEP_VER, true );
+ wp_enqueue_style( 'bdt-product-feed', BDTEP_ADMIN_URL . 'assets/css/ep-product-feed.css', [], BDTEP_VER, 'all' );
+
wp_enqueue_style( 'ep-admin-api-biggopti', BDTEP_ADMIN_URL . 'assets/css/ep-admin-api-biggopti.css', [], BDTEP_VER, 'all' );
wp_enqueue_script( 'ep-admin-api-biggopti', BDTEP_ADMIN_URL . 'assets/js/ep-admin-api-biggopti.min.js', [ 'jquery' ], BDTEP_VER, true );
--- a/bdthemes-element-pack-lite/admin/optimizer/asset-minifier-manager.php
+++ b/bdthemes-element-pack-lite/admin/optimizer/asset-minifier-manager.php
@@ -71,11 +71,10 @@
$widgets = $this->getWidgetIds();
$scripts = [];
- $direction = is_rtl() ? '.rtl' : '';
foreach ( $widgets as $widget ) {
$jsPath = BDTEP_PATH . 'assets/js/modules/ep-' . $widget . '.min.js';
- $cssPath = BDTEP_PATH . 'assets/css/ep-' . $widget . $direction . '.css';
+ $cssPath = BDTEP_PATH . 'assets/css/ep-' . $widget . '.css';
$script = [];
if ( file_exists($jsPath) ) {
--- a/bdthemes-element-pack-lite/bdthemes-element-pack-lite.php
+++ b/bdthemes-element-pack-lite/bdthemes-element-pack-lite.php
@@ -4,14 +4,14 @@
* Plugin Name: Element Pack Lite - Addons for Elementor
* Plugin URI: http://elementpack.pro/
* Description: The all-new <a href="https://elementpack.pro/">Element Pack</a> brings incredibly advanced, and super-flexible widgets, and A to Z essential addons to the Elementor page builder for WordPress. Explore expertly-coded widgets with first-class support by experts.
- * Version: 8.4.2
+ * Version: 8.5.0
* Author: BdThemes
* Author URI: https://bdthemes.com/
* Text Domain: bdthemes-element-pack
* Domain Path: /languages
* License: GPL3
* Elementor requires at least: 3.28
- * Elementor tested up to: 3.35.5
+ * Elementor tested up to: 3.35.9
*/
@@ -82,7 +82,7 @@
if ( ! element_pack_pro_installed() ) {
// Some pre defined value for easy use
- define( 'BDTEP_VER', '8.4.2' );
+ define( 'BDTEP_VER', '8.5.0' );
define( 'BDTEP_TPL_DB_VER', '1.0.0' );
define( 'BDTEP__FILE__', __FILE__ );
if ( ! defined( 'BDTEP_TITLE' ) ) {
--- a/bdthemes-element-pack-lite/includes/class-duplicator.php
+++ b/bdthemes-element-pack-lite/includes/class-duplicator.php
@@ -135,18 +135,18 @@
}
if ( isset( $bdt_post_meta_infos ) && is_array( $bdt_post_meta_infos ) ) {
- $bdt_sql_query = "INSERT INTO {$wpdb->postmeta} ( post_id, meta_key, meta_value ) VALUES ";
- $bdt_sql_query_sel = [];
-
foreach ( $bdt_post_meta_infos as $bdt_meta_info ) {
- $bdt_meta_value = wp_slash( $bdt_meta_info->meta_value );
- $bdt_sql_query_sel[] = "( $bdt_new_post_id, '{$bdt_meta_info->meta_key}', '{$bdt_meta_value}' )";
+ $wpdb->insert(
+ $wpdb->postmeta,
+ array(
+ 'post_id' => $bdt_new_post_id,
+ 'meta_key' => $bdt_meta_info->meta_key,
+ 'meta_value' => $bdt_meta_info->meta_value,
+ ),
+ array( '%d', '%s', '%s' )
+ );
}
- $bdt_sql_query .= implode( ', ', $bdt_sql_query_sel ) . ';';
- // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
- $wpdb->query( $bdt_sql_query );
-
/**
* fix template type issues
*/
@@ -171,7 +171,7 @@
$current_post_type = get_post_type( $post_id );
if ( is_array( $bdt_names ) && in_array( $current_post_type, $bdt_names ) ) {
- wp_redirect( admin_url( 'edit.php?post_type=' . $current_post_type ) );
+ wp_safe_redirect( admin_url( 'edit.php?post_type=' . $current_post_type ) );
}
exit;
--- a/bdthemes-element-pack-lite/includes/controls/select-input/dynamic-select-input-module.php
+++ b/bdthemes-element-pack-lite/includes/controls/select-input/dynamic-select-input-module.php
@@ -385,7 +385,7 @@
$args = [
'taxonomy' => $taxonomies,
- 'hide_empty' => false,
+ 'hide_empty' => true,
];
if (!empty($include)) {
@@ -440,7 +440,7 @@
$args = [
'taxonomy' => $taxonomies,
- 'hide_empty' => false,
+ 'hide_empty' => true,
];
// if (!empty($include)) {
--- a/bdthemes-element-pack-lite/includes/feedback-hub/rc-biggopti.php
+++ b/bdthemes-element-pack-lite/includes/feedback-hub/rc-biggopti.php
@@ -213,7 +213,7 @@
* @since 1.0.0
*/
public function rc_enqueue_scripts() {
- wp_enqueue_style( 'rc-sdk', plugins_url( 'assets/css/rc.css', __FILE__ ), array(), '1.0.0' );
+ wp_enqueue_style( 'rc-sdk', plugins_url( 'assets/css/feedback-hub.css', __FILE__ ), array(), '1.0.0' );
wp_enqueue_script( 'rc-sdk', plugins_url( 'assets/js/rc.min.js', __FILE__ ), array( 'jquery' ), '1.0.0', true );
// Add inline style to hide all but the first biggopti on page load
--- a/bdthemes-element-pack-lite/includes/helper.php
+++ b/bdthemes-element-pack-lite/includes/helper.php
@@ -422,10 +422,15 @@
return;
}
- if ( is_front_page() ) {
- $paged = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1;
+ /** Use the passed query's current page so the active bullet matches (e.g. current_query source) */
+ if ( isset( $wp_query->query_vars['paged'] ) && $wp_query->query_vars['paged'] > 0 ) {
+ $paged = (int) $wp_query->query_vars['paged'];
+ } elseif ( isset( $wp_query->query_vars['page'] ) && $wp_query->query_vars['page'] > 0 ) {
+ $paged = (int) $wp_query->query_vars['page'];
+ } elseif ( is_front_page() ) {
+ $paged = ( get_query_var( 'page' ) ) ? (int) get_query_var( 'page' ) : 1;
} else {
- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
+ $paged = ( get_query_var( 'paged' ) ) ? (int) get_query_var( 'paged' ) : 1;
}
$max = intval( $wp_query->max_num_pages );
--- a/bdthemes-element-pack-lite/includes/setup-wizard/class-remote-data-handler.php
+++ b/bdthemes-element-pack-lite/includes/setup-wizard/class-remote-data-handler.php
@@ -38,7 +38,6 @@
add_action('init', [__CLASS__, 'schedule_cron']);
add_action(self::CRON_HOOK, [__CLASS__, 'cron_fetch_plugins']);
add_action('wp_ajax_ep_get_plugins', [__CLASS__, 'ajax_get_plugins']);
- add_action('wp_ajax_nopriv_ep_get_plugins', [__CLASS__, 'ajax_get_plugins']);
}
/**
--- a/bdthemes-element-pack-lite/includes/setup-wizard/element-pack-others-plugin.php
+++ b/bdthemes-element-pack-lite/includes/setup-wizard/element-pack-others-plugin.php
@@ -24,7 +24,6 @@
public function __construct() {
// Add AJAX handlers
add_action('wp_ajax_ep_get_plugins', [$this, 'ajax_get_plugins']);
- add_action('wp_ajax_nopriv_ep_get_plugins', [$this, 'ajax_get_plugins']);
add_action('wp_ajax_ep_install_plugin', [$this, 'install_plugin_ajax']);
}
--- a/bdthemes-element-pack-lite/includes/template-library/editor/editor-manager.php
+++ b/bdthemes-element-pack-lite/includes/template-library/editor/editor-manager.php
@@ -34,10 +34,9 @@
}
public function editor_styles() {
- $direction_suffix = is_rtl() ? '.rtl' : '';
wp_enqueue_style( 'bdt-template-library-editor-style',
- BDTEP_URL . 'includes/template-library/editor/assets/css/editor-template-library' . $direction_suffix . '.css',
+ BDTEP_URL . 'includes/template-library/editor/assets/css/editor-template-library.css',
array(),
BDTEP_VER
);
@@ -45,10 +44,8 @@
public function preview_styles() {
- $direction_suffix = is_rtl() ? '.rtl' : '';
-
wp_enqueue_style( 'bdt-template-library-preview-style',
- BDTEP_URL . 'includes/template-library/editor/assets/css/editor-template-preview' . $direction_suffix . '.css',
+ BDTEP_URL . 'includes/template-library/editor/assets/css/editor-template-preview.css',
array(),
BDTEP_VER
);
--- a/bdthemes-element-pack-lite/includes/template-library/editor/init.php
+++ b/bdthemes-element-pack-lite/includes/template-library/editor/init.php
@@ -38,11 +38,10 @@
}
public function editor_styles() {
- $direction_suffix = is_rtl() ? '.rtl' : '';
wp_enqueue_style(
'bdt-template-library-editor-style',
- BDTEP_URL . 'includes/template-library/editor/assets/css/editor-template-library' . $direction_suffix . '.css',
+ BDTEP_URL . 'includes/template-library/editor/assets/css/editor-template-library.css',
array(),
BDTEP_VER
);
@@ -50,11 +49,9 @@
public function preview_styles() {
- $direction_suffix = is_rtl() ? '.rtl' : '';
-
wp_enqueue_style(
'bdt-template-library-preview-style',
- BDTEP_URL . 'includes/template-library/editor/assets/css/editor-template-preview' . $direction_suffix . '.css',
+ BDTEP_URL . 'includes/template-library/editor/assets/css/editor-template-preview.css',
array(),
BDTEP_VER
);
--- a/bdthemes-element-pack-lite/loader.php
+++ b/bdthemes-element-pack-lite/loader.php
@@ -284,9 +284,9 @@
/**
* ?TODO: Need to separate wc widget css
*/
- wp_register_style('ep-tutor-lms', BDTEP_ASSETS_URL . 'css/ep-tutor-lms' . $direction_suffix . '.css', [], BDTEP_VER);
+ wp_register_style('ep-tutor-lms', BDTEP_ASSETS_URL . 'css/ep-tutor-lms.css', [], BDTEP_VER);
// Vendor style register
- wp_register_style('tippy', BDTEP_ASSETS_URL . 'css/tippy' . $direction_suffix . '.css', [], BDTEP_VER);
+ wp_register_style('tippy', BDTEP_ASSETS_URL . 'css/tippy.css', [], BDTEP_VER);
}
/**
@@ -298,7 +298,7 @@
$direction_suffix = is_rtl() ? '.rtl' : '';
wp_register_style('bdt-uikit', BDTEP_ASSETS_URL . 'css/bdt-uikit' . $direction_suffix . '.css', [], '3.21.7');
- wp_register_style('ep-helper', BDTEP_ASSETS_URL . 'css/ep-helper' . $direction_suffix . '.css', [], BDTEP_VER);
+ wp_register_style('ep-helper', BDTEP_ASSETS_URL . 'css/ep-helper.css', [], BDTEP_VER);
wp_enqueue_style( 'bdt-uikit' );
wp_enqueue_style( 'ep-helper' );
@@ -449,22 +449,19 @@
* @return [type] [description]
*/
public function enqueue_preview_styles() {
- $direction_suffix = is_rtl() ? '.rtl' : '';
- wp_enqueue_style('ep-preview', BDTEP_ASSETS_URL . 'css/ep-preview' . $direction_suffix . '.css', '', BDTEP_VER);
+ wp_enqueue_style('ep-preview', BDTEP_ASSETS_URL . 'css/ep-preview.css', '', BDTEP_VER);
}
public function enqueue_editor_styles() {
- $direction_suffix = is_rtl() ? '.rtl' : '';
- wp_register_style('ep-editor', BDTEP_ASSETS_URL . 'css/ep-editor' . $direction_suffix . '.css', '', BDTEP_VER);
+ wp_register_style('ep-editor', BDTEP_ASSETS_URL . 'css/ep-editor.css', '', BDTEP_VER);
wp_enqueue_style('ep-editor');
}
public function enqueue_minified_css() {
- $direction_suffix = is_rtl() ? '.rtl' : '';
$upload_dir = $this->get_upload_dir() . 'css/ep-styles.css';
$version = get_option('element-pack-minified-asset-manager-version');
@@ -473,8 +470,8 @@
$upload_url = $this->get_upload_url() . 'css/ep-styles.css';
wp_register_style('ep-styles', $upload_url, [], $version);
} else {
- wp_register_style('ep-styles', BDTEP_URL . 'assets/css/ep-styles' . $direction_suffix . '.css', [], BDTEP_VER);
- wp_register_style('ep-font', BDTEP_ASSETS_URL . 'css/ep-font' . $direction_suffix . '.css', [], BDTEP_VER);
+ wp_register_style('ep-styles', BDTEP_URL . 'assets/css/ep-styles.css', [], BDTEP_VER);
+ wp_register_style('ep-font', BDTEP_ASSETS_URL . 'css/ep-font.css', [], BDTEP_VER);
}
if (element_pack_is_asset_optimization_enabled()) {
--- a/bdthemes-element-pack-lite/modules/age-gate/widgets/age-gate.php
+++ b/bdthemes-element-pack-lite/modules/age-gate/widgets/age-gate.php
@@ -408,7 +408,7 @@
$this->start_controls_section(
'section_modal_additional',
[
- 'label' => esc_html__( 'Additional', 'bdthemes-element-pack' ),
+ 'label' => esc_html__( 'Additional Options', 'bdthemes-element-pack' ),
]
);
@@ -432,6 +432,9 @@
[
'label' => esc_html__( 'Close Button Delay Show', 'bdthemes-element-pack' ),
'type' => Controls_Manager::SWITCHER,
+ 'condition' => [
+ 'close_button!' => 'none',
+ ],
]
);
@@ -451,6 +454,7 @@
],
'condition' => [
'close_btn_delay_show' => 'yes',
+ 'close_button!' => 'none',
],
]
);
--- a/bdthemes-element-pack-lite/modules/animated-card/widgets/animated-card.php
+++ b/bdthemes-element-pack-lite/modules/animated-card/widgets/animated-card.php
@@ -200,13 +200,13 @@
'default' => 'style-1',
'options' => [
'style-2' => [
- 'title' => esc_html__( 'Left', 'bdthemes-element-pack' ),
- 'icon' => 'eicon-h-align-left',
- ],
- 'style-1' => [
'title' => esc_html__( 'Right', 'bdthemes-element-pack' ),
'icon' => 'eicon-h-align-right',
],
+ 'style-1' => [
+ 'title' => esc_html__( 'Left', 'bdthemes-element-pack' ),
+ 'icon' => 'eicon-h-align-left',
+ ],
],
]
);
@@ -397,8 +397,8 @@
'readmore_text!' => '',
],
'selectors' => [
- '{{WRAPPER}} .bdt-ep-animated-card-btn .bdt-button-icon-align-right' => is_rtl() ? 'margin-right: {{SIZE}}{{UNIT}};' : 'margin-left: {{SIZE}}{{UNIT}};',
- '{{WRAPPER}} .bdt-ep-animated-card-btn .bdt-button-icon-align-left' => is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-ep-animated-card-btn .bdt-button-icon-align-right' => is_rtl() ? 'margin-inline-end: {{SIZE}}{{UNIT}};' : 'margin-inline-start: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-ep-animated-card-btn .bdt-button-icon-align-left' => is_rtl() ? 'margin-inline-start: {{SIZE}}{{UNIT}};' : 'margin-inline-end: {{SIZE}}{{UNIT}};',
],
]
);
@@ -461,7 +461,7 @@
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%' ],
'selectors' => [
- '{{WRAPPER}} .bdt-ep-animated-card-circle' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-ep-animated-card-circle::before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
@@ -655,8 +655,8 @@
],
],
'selectors' => [
- '{{WRAPPER}} .bdt-style-1:hover .bdt-ep-animated-card-img' => 'left: {{SIZE}}{{UNIT}};',
- '{{WRAPPER}} .bdt-style-2:hover .bdt-ep-animated-card-img' => 'right: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-style-1:hover .bdt-ep-animated-card-img' => 'inset-inline-end: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-style-2:hover .bdt-ep-animated-card-img' => 'inset-inline-start: {{SIZE}}{{UNIT}};',
],
]
);
--- a/bdthemes-element-pack-lite/modules/backdrop-filter/module.php
+++ b/bdthemes-element-pack-lite/modules/backdrop-filter/module.php
@@ -392,7 +392,7 @@
public function should_script_enqueue( $element ) {
$settings = $element->get_settings_for_display();
- if ('liquid_glass' === $settings['element_pack_backdrop_filter_type'] ) {
+ if ( ! empty( $settings['element_pack_backdrop_filter_type'] ) && 'liquid_glass' === $settings['element_pack_backdrop_filter_type'] ) {
echo $this->bdt_liquid_glass_effects_svg();
}
}
--- a/bdthemes-element-pack-lite/modules/background-overlay/module.php
+++ b/bdthemes-element-pack-lite/modules/background-overlay/module.php
@@ -141,7 +141,7 @@
'size_units' => [ 'px', '%' ],
'separator' => 'before',
'selectors' => [
- '{{WRAPPER}}' => '--ep-overlay-margin-top: {{TOP}}{{UNIT}}; --ep-overlay-margin-right: {{RIGHT}}{{UNIT}}; --ep-overlay-margin-bottom: {{BOTTOM}}{{UNIT}}; --ep-overlay-margin-left: {{LEFT}}{{UNIT}};',
+ '{{WRAPPER}}.bdt-background-overlay-yes:before' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
@@ -223,7 +223,7 @@
],
'separator' => 'before',
'selectors' => [
- '{{WRAPPER}}.bdt-background-overlay-yes:before' => 'transition: background {{SIZE}}s;',
+ '{{WRAPPER}}.bdt-background-overlay-yes:before' => 'transition: all {{SIZE}}s ease-in-out;',
]
]
);
--- a/bdthemes-element-pack-lite/modules/brand-grid/widgets/brand-grid.php
+++ b/bdthemes-element-pack-lite/modules/brand-grid/widgets/brand-grid.php
@@ -278,10 +278,10 @@
'type' => Controls_Manager::SELECT,
'default' => 'bottom-left',
'options' => [
- 'top-left' => esc_html__('Top Left', 'bdthemes-element-pack'),
- 'top-right' => esc_html__('Top Right', 'bdthemes-element-pack'),
- 'bottom-left' => esc_html__('Bottom Left', 'bdthemes-element-pack'),
- 'bottom-right' => esc_html__('Bottom Right', 'bdthemes-element-pack'),
+ 'top-left' => esc_html__('Top Start', 'bdthemes-element-pack'),
+ 'top-right' => esc_html__('Top End', 'bdthemes-element-pack'),
+ 'bottom-left' => esc_html__('Bottom Start', 'bdthemes-element-pack'),
+ 'bottom-right' => esc_html__('Bottom End', 'bdthemes-element-pack'),
'center-center' => esc_html__('Center Center', 'bdthemes-element-pack'),
],
'prefix_class' => 'bdt-ep-icon--',
--- a/bdthemes-element-pack-lite/modules/business-hours/widgets/business-hours.php
+++ b/bdthemes-element-pack-lite/modules/business-hours/widgets/business-hours.php
@@ -1170,14 +1170,120 @@
return $data;
}
+ /**
+ * Normalize Elementor background video start/end (seconds), matching Group_Control_Background keys.
+ *
+ * @param array $settings Widget display settings.
+ * @return int[] { 0 => start seconds, 1 => end seconds (0 = not set) }
+ */
+ protected function get_background_video_time_range( array $settings ) {
+ $start_raw = $settings['background_video_start'] ?? null;
+ $end_raw = $settings['background_video_end'] ?? null;
+ $start = ( null !== $start_raw && '' !== $start_raw ) ? (int) $start_raw : 0;
+ $end = ( null !== $end_raw && '' !== $end_raw ) ? (int) $end_raw : 0;
+ if ( $start < 0 ) {
+ $start = 0;
+ }
+ if ( $end < 0 ) {
+ $end = 0;
+ }
+ if ( $end > 0 && $end <= $start ) {
+ $end = 0;
+ }
+ return [ $start, $end ];
+ }
+
+ protected function render_header_background_video( array $settings ) {
+ if ( 'video' !== ( $settings['background_background'] ?? '' ) ) {
+ return;
+ }
+
+ $raw = $settings['background_video_link'] ?? '';
+ if ( is_array( $raw ) && ! empty( $raw['url'] ) ) {
+ $raw = $raw['url'];
+ }
+ $url = trim( (string) $raw );
+ if ( '' === $url ) {
+ return;
+ }
+
+ list( $t_start, $t_end ) = $this->get_background_video_time_range( $settings );
+
+ $wrap_class = 'bdt-ep-bh-v-wrap';
+ if ( empty( $settings['background_play_on_mobile'] ) ) {
+ $wrap_class .= ' bdt-ep-bh-v-wrap--hide-mobile';
+ }
+ $once = ( 'yes' === ( $settings['background_play_once'] ?? '' ) );
+ $priv = ( 'yes' === ( $settings['background_privacy_mode'] ?? '' ) );
+
+ echo '<div class="' . esc_attr( $wrap_class ) . '">';
+
+ if ( preg_match( '/(?:youtube.com/(?:watch?(?:[^#&]*&)?v=|embed/)|youtu.be/)([a-z0-9_-]{6,})/i', $url, $yt ) ) {
+ $id = $yt[1];
+ $host = $priv ? 'https://www.youtube-nocookie.com' : 'https://www.youtube.com';
+ $qs = 'autoplay=1&mute=1&controls=0&playsinline=1&rel=0';
+ if ( ! $once ) {
+ $qs .= '&loop=1&playlist=' . rawurlencode( $id );
+ }
+ if ( $t_start > 0 ) {
+ $qs .= '&start=' . $t_start;
+ }
+ if ( $t_end > 0 ) {
+ $qs .= '&end=' . $t_end;
+ }
+ $src = $host . '/embed/' . rawurlencode( $id ) . '?' . $qs;
+ printf(
+ '<iframe class="bdt-ep-bh-v" src="%s" allow="autoplay; encrypted-media" loading="lazy" title=""></iframe>',
+ esc_url( $src )
+ );
+ } elseif ( preg_match( '/vimeo.com/(?:video/)?(d+)/i', $url, $vm ) ) {
+ $loop = $once ? '0' : '1';
+ $dnt = $priv ? '1' : '0';
+ $vimeo_params = [
+ 'background' => '1',
+ 'autoplay' => '1',
+ 'muted' => '1',
+ 'loop' => $loop,
+ 'dnt' => $dnt,
+ ];
+ if ( $t_start > 0 ) {
+ $vimeo_params['start_time'] = (string) $t_start;
+ }
+ if ( $t_end > 0 ) {
+ $vimeo_params['end_time'] = (string) $t_end;
+ if ( ! isset( $vimeo_params['start_time'] ) ) {
+ $vimeo_params['start_time'] = '0';
+ }
+ }
+ $src = 'https://player.vimeo.com/video/' . rawurlencode( $vm[1] ) . '?' . http_build_query( $vimeo_params, '', '&', PHP_QUERY_RFC3986 );
+ printf(
+ '<iframe class="bdt-ep-bh-v" src="%s" allow="autoplay" loading="lazy" title=""></iframe>',
+ esc_url( $src )
+ );
+ } else {
+ $loop_attr = $once ? '' : ' loop';
+ $file_url = $url;
+ if ( $t_start > 0 || $t_end > 0 ) {
+ $file_url .= '#t=' . $t_start;
+ if ( $t_end > 0 ) {
+ $file_url .= ',' . $t_end;
+ }
+ }
+ printf(
+ '<video class="bdt-ep-bh-v" src="%s" autoplay muted playsinline%s></video>',
+ esc_url( $file_url ),
+ $loop_attr // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- literal attribute
+ );
+ }
+
+ echo '</div>';
+ }
public function render() {
$settings = $this->get_settings_for_display();
$timeNotation = (get_option('time_format') == 'H:i') ? '24h' : '12h';
$ct_input = get_option('gmt_offset');
- // echo $ct_input;
-
if($settings['dynamic_timezone'] == 'custom'){
$ct_input = (isset($settings['custom_timezone_input']) && !empty($settings['custom_timezone_input'])) ? $settings['custom_timezone_input'] : '+6';
}else{
@@ -1210,6 +1316,8 @@
<?php if ('yes' == $settings['show_header']) : ?>
<div class="bdt-ep-business-hours-header">
+ <?php $this->render_header_background_video( $settings ); ?>
+
<?php if ('yes' == $settings['show_current_time']) : ?>
<div class="bdt-ep-business-hours-current-time">
<?php
@@ -1420,7 +1528,7 @@
$officeStatus = $settings['dynamic_open_day'];
$officeStatusLogic = 'open';
-$exStats = explode('-', $availabelStatus);
+$exStats = explode('-', $availabelStatus ?? '');
if(isset($exStats['1'])){
if($exStats['0'] == 'Closed'){
$closeDay = ucwords(substr($exStats['1'], 0,3));
--- a/bdthemes-element-pack-lite/modules/countdown/module.php
+++ b/bdthemes-element-pack-lite/modules/countdown/module.php
@@ -29,7 +29,11 @@
}
- public function countdown_end(){
+ public function countdown_end(){
+ if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'element-pack-site' ) ) {
+ wp_die( 'Security check failed' );
+ }
+
$wp_current_time = current_time( 'timestamp' ) - ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
$end_time = isset($_POST['endTime']) ? (int) $_POST['endTime'] : 0;
--- a/bdthemes-element-pack-lite/modules/countdown/skins/skin-event-countdown.php
+++ b/bdthemes-element-pack-lite/modules/countdown/skins/skin-event-countdown.php
@@ -8,9 +8,13 @@
use ElementorIcons_Manager;
use ElementorSkin_Base as Elementor_Skin_Base;
+use ElementPackModulesCountdownWidgetsCountdown;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
+/**
+ * @property Countdown $parent
+ */
class Skin_Event_Countdown extends Elementor_Skin_Base {
public function _register_controls_actions() {
parent::_register_controls_actions();
@@ -528,14 +532,19 @@
$datetime = new DateTime($with_gmt_time);
$final_time = $datetime->format('c');
+ $countdown_classes = [
+ 'bdt-grid',
+ 'bdt-flex-middle bdt-flex-' . esc_attr($settings['alignment']),
+ $this->get_instance_value('column_gap') ? 'bdt-grid-'.$this->get_instance_value('column_gap') : '',
+ ];
+ if ( ! empty( $settings['glassmorphism_effect'] ) && $settings['glassmorphism_effect'] === 'yes' ) {
+ $countdown_classes[] = 'bdt-countdown-glassmorphism-yes';
+ }
+
$this->parent->add_render_attribute(
[
'countdown' => [
- 'class' => [
- 'bdt-grid',
- 'bdt-flex-middle bdt-flex-' . esc_attr($settings['alignment']),
- $this->get_instance_value('column_gap') ? 'bdt-grid-'.$this->get_instance_value('column_gap') : '',
- ],
+ 'class' => $countdown_classes,
'data-bdt-countdown' => [
'date: ' . $final_time
],
--- a/bdthemes-element-pack-lite/modules/countdown/skins/skin-tiny-countdown.php
+++ b/bdthemes-element-pack-lite/modules/countdown/skins/skin-tiny-countdown.php
@@ -11,9 +11,13 @@
use ElementPackUtils;
use ElementorSkin_Base as Elementor_Skin_Base;
+use ElementPackModulesCountdownWidgetsCountdown;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
+/**
+ * @property Countdown $parent
+ */
class Skin_Tiny_Countdown extends Elementor_Skin_Base {
public function get_id() {
@@ -34,10 +38,16 @@
$final_time = $datetime->format('c');
+ $countdown_classes = [];
+ if ( ! empty( $settings['glassmorphism_effect'] ) && $settings['glassmorphism_effect'] === 'yes' ) {
+ $countdown_classes[] = 'bdt-countdown-glassmorphism-yes';
+ }
+
$this->parent->add_render_attribute(
[
'countdown' => [
'id' => 'bdt-countdown-' . $this->get_id() . '-timer',
+ 'class' => $countdown_classes,
'data-bdt-countdown' => [
isset($settings['loop_time']) && ($settings['loop_time'] == 'yes') ? '' : 'date: ' . $final_time
],
--- a/bdthemes-element-pack-lite/modules/countdown/widgets/countdown.php
+++ b/bdthemes-element-pack-lite/modules/countdown/widgets/countdown.php
@@ -113,7 +113,7 @@
$this->add_control(
'loop_time',
[
- 'label' => esc_html__( 'Loop Time', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Loop Time', 'bdthemes-element-pack' ),
'type' => Controls_Manager::SWITCHER,
'condition' => [
'_skin!' => 'bdt-event-countdown',
@@ -124,7 +124,7 @@
$this->add_control(
'loop_hours',
[
- 'label' => esc_html__( 'Input Loop Time (Hours)', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Input Loop Time (Hours)', 'bdthemes-element-pack' ),
'type' => Controls_Manager::NUMBER,
'default' => '3',
'conditions' => [
@@ -550,7 +550,7 @@
$this->add_control(
'show_separator',
[
- 'label' => esc_html__( 'Show Separator', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Show Separator', 'bdthemes-element-pack' ),
'type' => Controls_Manager::SWITCHER,
'separator' => 'before',
]
@@ -573,7 +573,7 @@
$this->start_controls_section(
'section_end_action',
[
- 'label' => __( 'End Action', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => __( 'End Action', 'bdthemes-element-pack' ),
'tab' => Controls_Manager::TAB_CONTENT,
'condition' => [
'loop_time!' => 'yes',
@@ -688,7 +688,7 @@
$this->add_control(
'glassmorphism_effect',
[
- 'label' => esc_html__( 'Glassmorphism', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Glassmorphism', 'bdthemes-element-pack' ),
'type' => Controls_Manager::SWITCHER,
// translators: %1s: Opening anchor tag with link to MDN backdrop-filter documentation, %2s: Closing anchor tag
'description' => sprintf( __( 'This feature will not work in the Firefox browser untill you enable browser compatibility so please %1s look here %2s', 'bdthemes-element-pack' ), '<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility" target="_blank">', '</a>' ),
@@ -712,7 +712,7 @@
'size' => 5
],
'selectors' => [
- '{{WRAPPER}} .bdt-countdown-item' => 'backdrop-filter: blur({{SIZE}}px); -webkit-backdrop-filter: blur({{SIZE}}px);'
+ '{{WRAPPER}} .bdt-countdown-item' => '--ep-countdown-glass-blur: {{SIZE}}px;'
],
'condition' => [
'glassmorphism_effect' => 'yes',
@@ -865,7 +865,7 @@
Group_Control_Text_Shadow::get_type(),
[
'name' => 'text_shadow',
- 'label' => __( 'Text Shadow', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => __( 'Text Shadow', 'bdthemes-element-pack' ),
'selector' => '{{WRAPPER}} .bdt-countdown-number',
]
);
@@ -957,7 +957,7 @@
$this->add_responsive_control(
'label_margin',
[
- 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
@@ -970,7 +970,7 @@
Group_Control_Text_Shadow::get_type(),
[
'name' => 'label_shadow',
- 'label' => __( 'Text Shadow', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => __( 'Text Shadow', 'bdthemes-element-pack' ),
'selector' => '{{WRAPPER}} .bdt-countdown-label',
]
);
@@ -996,7 +996,7 @@
$this->start_controls_section(
'section_days_style',
[
- 'label' => esc_html__( 'Days Style', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Days Style', 'bdthemes-element-pack' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'show_days' => 'yes',
@@ -1226,7 +1226,7 @@
$this->add_responsive_control(
'days_label_margin',
[
- 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
@@ -1281,7 +1281,7 @@
$this->start_controls_section(
'section_hours_style',
[
- 'label' => esc_html__( 'Hours Style', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Hours Style', 'bdthemes-element-pack' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'show_hours' => 'yes',
@@ -1511,7 +1511,7 @@
$this->add_responsive_control(
'hours_label_margin',
[
- 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
@@ -1566,7 +1566,7 @@
$this->start_controls_section(
'section_minutes_style',
[
- 'label' => esc_html__( 'Minutes Style', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Minutes Style', 'bdthemes-element-pack' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'show_minutes' => 'yes',
@@ -1796,7 +1796,7 @@
$this->add_responsive_control(
'minutes_label_margin',
[
- 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
@@ -1851,7 +1851,7 @@
$this->start_controls_section(
'section_seconds_style',
[
- 'label' => esc_html__( 'Seconds Style', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Seconds Style', 'bdthemes-element-pack' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'show_seconds' => 'yes',
@@ -2081,7 +2081,7 @@
$this->add_responsive_control(
'seconds_label_margin',
[
- 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Margin', 'bdthemes-element-pack' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em' ],
'selectors' => [
@@ -2137,7 +2137,7 @@
$this->start_controls_section(
'section_separator_style',
[
- 'label' => esc_html__( 'Separator', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Separator', 'bdthemes-element-pack' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'show_separator' => 'yes',
@@ -2247,7 +2247,7 @@
$this->start_controls_section(
'section_end_message_style',
[
- 'label' => esc_html__( 'End Message', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'End Message', 'bdthemes-element-pack' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'end_action_type' => 'message',
@@ -2452,11 +2452,16 @@
$ended_message = 'ended';
}
+ $countdown_grid_classes = [ 'bdt-countdown-grid' ];
+ if ( ! empty( $settings['glassmorphism_effect'] ) && $settings['glassmorphism_effect'] === 'yes' ) {
+ $countdown_grid_classes[] = 'bdt-countdown-glassmorphism-yes';
+ }
+
$this->add_render_attribute(
[
'countdown' => [
'id' => 'bdt-countdown-' . $this->get_id() . '-timer',
- 'class' => [ 'bdt-countdown-grid' ],
+ 'class' => $countdown_grid_classes,
'data-bdt-countdown' => [
isset( $settings['loop_time'] ) && ( $settings['loop_time'] == 'yes' ) ? '' : 'date: ' . $final_time
],
--- a/bdthemes-element-pack-lite/modules/creative-button/widgets/creative-button.php
+++ b/bdthemes-element-pack-lite/modules/creative-button/widgets/creative-button.php
@@ -76,7 +76,7 @@
$this->add_control(
'button_style',
[
- 'label' => esc_html__( 'Style', 'bdthemes-element-pack' ) . BDTEP_UC,
+ 'label' => esc_html__( 'Style', 'bdthemes-element-pack' ),
'type' => Controls_Manager::SELECT,
'default' => 'anthe',
'options' => [
--- a/bdthemes-element-pack-lite/modules/cursor-effects/module.php
+++ b/bdthemes-element-pack-lite/modules/cursor-effects/module.php
@@ -3,7 +3,6 @@
namespace ElementPackModulesCursorEffects;
use ElementorControls_Manager;
-use ElementorUtils;
use ElementorGroup_Control_Typography;
use ElementorGroup_Control_Border;
use ElementorGroup_Control_Background;
@@ -51,6 +50,21 @@
'render_type' => 'template',
]
);
+
+ $section->add_control(
+ 'important_note',
+ [
+ 'type' => Controls_Manager::RAW_HTML,
+ 'raw' => esc_html__( 'If the cursor icon is not visible in the editor or preview, please navigate to Elementor Settings and enable Font Awesome support.', 'bdthemes-element-pack' ),
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
+ 'condition' => [
+ 'element_pack_cursor_effects_show' => 'yes',
+ 'element_pack_cursor_effects_source' => 'icons'
+ ],
+ 'separator' => 'before',
+ ]
+ );
+
$section->start_controls_tabs(
'element_pack_cursor_effects_tabs'
);
--- a/bdthemes-element-pack-lite/modules/document-viewer/widgets/document-viewer.php
+++ b/bdthemes-element-pack-lite/modules/document-viewer/widgets/document-viewer.php
@@ -133,17 +133,16 @@
$file_ext = strtolower($file_ext);
if ($viewer_type === 'google_docs') {
- // Google Docs viewer (for public URLs only)
- // $viewer_base = 'https://docs.google.com/viewer?';
- // $query_params = http_build_query([
- // 'url' => $source_url,
- // 'embedded' => 'true'
- // ]);
-
- // Special case: if it's a Google Sheets link
- if (strpos($source_url, 'docs.google.com/spreadsheets') !== false) {
+ // Native Google Doc: use /preview for embedding (edit URLs return full editor HTML)
+ if (preg_match('#docs.google.com/document/d/([a-zA-Z0-9_-]+)#', $source_url, $doc_matches)) {
+ $final_url = 'https://docs.google.com/document/d/' . $doc_matches[1] . '/preview';
+ }
+ // Google Sheets: use widget params for embed
+ elseif (strpos($source_url, 'docs.google.com/spreadsheets') !== false) {
$final_url = $source_url . (strpos($source_url, '?') === false ? '?' : '&') . 'widget=true&headers=false';
- } else {
+ }
+ // External document (PDF, etc.): use Google Docs viewer
+ else {
$viewer_base = 'https://docs.google.com/viewer?';
$query_params = http_build_query([
'url' => $source_url,
--- a/bdthemes-element-pack-lite/modules/dual-button/widgets/dual-button.php
+++ b/bdthemes-element-pack-lite/modules/dual-button/widgets/dual-button.php
@@ -263,19 +263,22 @@
'label' => esc_html__( 'Alignment', 'bdthemes-element-pack' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
- 'start' => [
- 'title' => esc_html__( 'Start', 'bdthemes-element-pack' ),
+ 'left' => [
+ 'title' => esc_html__( 'Left', 'bdthemes-element-pack' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'bdthemes-element-pack' ),
'icon' => 'eicon-text-align-center',
],
- 'end' => [
- 'title' => esc_html__( 'End', 'bdthemes-element-pack' ),
+ 'right' => [
+ 'title' => esc_html__( 'Right', 'bdthemes-element-pack' ),
'icon' => 'eicon-text-align-right',
],
],
+ 'selectors' => [
+ '{{WRAPPER}} .bdt-dual-button .bdt-btn-a, {{WRAPPER}} .bdt-btn-a .bdt-btn-icon' => 'justify-content: {{VALUE}};',
+ ],
]
);
@@ -425,19 +428,22 @@
'label' => esc_html__( 'Alignment', 'bdthemes-element-pack' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
- 'start' => [
- 'title' => esc_html__( 'Start', 'bdthemes-element-pack' ),
+ 'left' => [
+ 'title' => esc_html__( 'Left', 'bdthemes-element-pack' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'bdthemes-element-pack' ),
'icon' => 'eicon-text-align-center',
],
- 'end' => [
- 'title' => esc_html__( 'End', 'bdthemes-element-pack' ),
+ 'right' => [
+ 'title' => esc_html__( 'Right', 'bdthemes-element-pack' ),
'icon' => 'eicon-text-align-right',
],
],
+ 'selectors' => [
+ '{{WRAPPER}} .bdt-dual-button .bdt-btn-b, {{WRAPPER}} .bdt-btn-b .bdt-btn-icon' => 'justify-content: {{VALUE}};',
+ ],
]
);
@@ -1402,7 +1408,6 @@
if ( 'left' == $settings['button_a_icon_align'] or 'right' == $settings['button_a_icon_align'] ) {
$this->add_render_attribute( 'content-wrapper-a', 'class', 'bdt-flex bdt-flex-middle' );
}
- $this->add_render_attribute( 'content-wrapper-a', 'class', 'bdt-flex-' . $settings['button_a_align'] );
$this->add_render_attribute( 'content-wrapper-a', 'class', ( 'top' == $settings['button_a_icon_align'] ) ? 'bdt-flex bdt-flex-column' : '' );
$this->add_render_attribute( 'content-wrapper-a', 'class', ( 'bottom' == $settings['button_a_icon_align'] ) ? 'bdt-flex bdt-flex-column-reverse' : '' );
@@ -1445,7 +1450,6 @@
if ( 'left' == $settings['button_b_icon_align'] or 'right' == $settings['button_b_icon_align'] ) {
$this->add_render_attribute( 'content-wrapper-b', 'class', 'bdt-flex bdt-flex-middle' );
}
- $this->add_render_attribute( 'content-wrapper-b', 'class', 'bdt-flex-' . $settings['button_b_align'] );
$this->add_render_attribute( 'content-wrapper-b', 'class', ( 'top' == $settings['button_b_icon_align'] ) ? 'bdt-flex bdt-flex-column' : '' );
$this->add_render_attribute( 'content-wrapper-b', 'class', ( 'bottom' == $settings['button_b_icon_align'] ) ? 'bdt-flex bdt-flex-column-reverse' : '' );
--- a/bdthemes-element-pack-lite/modules/equal-height/module.php
+++ b/bdthemes-element-pack-lite/modules/equal-height/module.php
@@ -43,7 +43,7 @@
'label' => esc_html__('Enable Equal Height', 'bdthemes-element-pack'),
'type' => Controls_Manager::SWITCHER,
'return_value' => 'yes',
- 'description' => esc_html__('You can equal your column/widgets height equal by enable this option.', 'bdthemes-element-pack'),
+ 'description' => esc_html__('You can make your columns or widgets have equal height by enabling this option.', 'bdthemes-element-pack'),
]
);
@@ -80,6 +80,19 @@
],
]
);
+
+ $section->add_control(
+ 'equal_height_important_note',
+ [
+ 'type' => Controls_Manager::RAW_HTML,
+ 'raw' => esc_html__( 'If the Equal Height feature is not visible in the editor, please visit the preview page to see the changes.', 'bdthemes-element-pack' ),
+ 'separator' => 'before',
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
+ 'condition' => [
+ 'section_equal_height_on' => 'yes',
+ ]
+ ]
+ );
}
--- a/bdthemes-element-pack-lite/modules/featured-box/widgets/featured-box.php
+++ b/bdthemes-element-pack-lite/modules/featured-box/widgets/featured-box.php
@@ -380,8 +380,7 @@
'readmore_text!' => '',
],
'selectors' => [
- '{{WRAPPER}} .bdt-ep-featured-box-readmore .bdt-button-icon-align-right' => is_rtl() ? 'margin-right: {{SIZE}}{{UNIT}};' : 'margin-left: {{SIZE}}{{UNIT}};',
- '{{WRAPPER}} .bdt-ep-featured-box-readmore .bdt-button-icon-align-left' => is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-ep-featured-box-readmore' => 'gap: {{SIZE}}{{UNIT}};',
],
]
);
@@ -1540,7 +1539,7 @@
$this->add_inline_editing_attributes( 'title_text', 'none' );
$this->add_inline_editing_attributes( 'description_text' );
- $this->add_render_attribute( 'readmore', 'class', [ 'bdt-ep-featured-box-readmore', 'bdt-display-inline-block' ] );
+ $this->add_render_attribute( 'readmore', 'class', [ 'bdt-ep-featured-box-readmore' ] );
if ( ! empty( $settings['readmore_link']['url'] ) ) {
$this->add_link_attributes( 'readmore', $settings['readmore_link'] );
}
@@ -1577,9 +1576,16 @@
<?php if ( ! empty( $settings['readmore'] ) && $settings['readmore'] === 'yes' ) : ?>
<div class="bdt-ep-featured-box-button">
<a <?php $this->print_render_attribute_string( 'readmore' ); ?>>
+ <?php if ( ! empty( $settings['advanced_readmore_icon']['value'] ) && isset( $settings['readmore_icon_align'] ) && 'left' === $settings['readmore_icon_align'] ) : ?>
+ <span class="bdt-button-icon-align-left">
+ <?php Icons_Manager::render_icon( $settings['advanced_readmore_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] ); ?>
+ </span>
+ <?php endif; ?>
+
<?php echo esc_html( isset( $settings['readmore_text'] ) ? $settings['readmore_text'] : __( 'Read More', 'bdthemes-element-pack' ) ); ?>
- <?php if ( ! empty( $settings['advanced_readmore_icon']['value'] ) ) : ?>
- <span class="bdt-button-icon-align-<?php echo esc_attr( isset( $settings['readmore_icon_align'] ) ? $settings['readmore_icon_align'] : 'right' ); ?>">
+
+ <?php if ( ! empty( $settings['advanced_readmore_icon']['value'] ) && ( ! isset( $settings['readmore_icon_align'] ) || 'right' === $settings['readmore_icon_align'] ) ) : ?>
+ <span class="bdt-button-icon-align-right">
<?php Icons_Manager::render_icon( $settings['advanced_readmore_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] ); ?>
</span>
<?php endif; ?>
--- a/bdthemes-element-pack-lite/modules/navbar/widgets/navbar.php
+++ b/bdthemes-element-pack-lite/modules/navbar/widgets/navbar.php
@@ -396,7 +396,7 @@
$this->add_responsive_control(
'menu_bottom_spacing',
[
- 'label' => esc_html__( 'Row Gap', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Row Gap', 'bdthemes-element-pack' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
@@ -459,7 +459,7 @@
$this->add_control(
'auto_hiding_menu_both_side_color',
[
- 'label' => esc_html__( 'Auto Hiding Menu Shadow', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Auto Hiding Menu Shadow', 'bdthemes-element-pack' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .bdt-auto-hide-menu .bdt-cd-secondary-nav::before' => 'background: linear-gradient(to right, {{VALUE}}, rgba(37,40,61,0));',
@@ -648,7 +648,7 @@
$this->add_control(
'individuL_menu_style',
[
- 'label' => esc_html__( 'Individual Menu Style', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Individual Menu Style', 'bdthemes-element-pack' ),
'type' => Controls_Manager::SWITCHER,
'separator' => 'before',
]
@@ -659,7 +659,7 @@
$this->start_controls_section(
'section_individual_menu_style',
[
- 'label' => esc_html__( 'Individual Menu Item', 'bdthemes-element-pack' ) . BDTEP_NC,
+ 'label' => esc_html__( 'Individual Menu Item', 'bdthemes-element-pack' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => ['individuL_menu_style' => 'yes'],
]
--- a/bdthemes-element-pack-lite/modules/panel-slider/widgets/panel-slider.php
+++ b/bdthemes-element-pack-lite/modules/panel-slider/widgets/panel-slider.php
@@ -482,8 +482,7 @@
'panel_slider_icon[value]!' => '',
],
'selectors' => [
- '{{WRAPPER}} .bdt-panel-slider .bdt-button-icon-align-right' => is_rtl() ? 'margin-right: {{SIZE}}{{UNIT}};' : 'margin-left: {{SIZE}}{{UNIT}};',
- '{{WRAPPER}} .bdt-panel-slider .bdt-button-icon-align-left' => is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-panel-slider .bdt-panel-slide-link' => 'gap: {{SIZE}}{{UNIT}};',
],
]
);
@@ -1140,11 +1139,22 @@
<?php if ( ! empty( $item['tab_link']['url'] ) ) : ?>
<?php if ( $settings['button'] == 'yes' ) : ?>
<a <?php $this->print_render_attribute_string( $element_key ); ?>>
+ <?php if ( ! empty( $settings['panel_slider_icon']['value'] ) && isset( $settings['icon_align'] ) && 'left' === $settings['icon_align'] ) : ?>
+ <span class="bdt-button-icon-align-left">
+
+ <?php if ( $is_new || $migrated ) :
+ Icons_Manager::render_icon( $settings['panel_slider_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] );
+ else : ?>
+ <i class="<?php echo esc_attr( $settings['icon'] ); ?>" aria-hidden="true"></i>
+ <?php endif; ?>
+
+ </span>
+ <?php endif; ?>
<span>
<?php echo esc_html( $settings['button_text'] ); ?>
</span>
- <?php if ( $settings['panel_slider_icon']['value'] ) : ?>
- <span class="bdt-button-icon-align-<?php echo esc_attr( $settings['icon_align'] ); ?>">
+ <?php if ( ! empty( $settings['panel_slider_icon']['value'] ) && ( ! isset( $settings['icon_align'] ) || 'right' === $settings['icon_align'] ) ) : ?>
+ <span class="bdt-button-icon-align-right">
<?php if ( $is_new || $migrated ) :
Icons_Manager::render_icon( $settings['panel_slider_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] );
--- a/bdthemes-element-pack-lite/modules/product-carousel/widgets/product-carousel.php
+++ b/bdthemes-element-pack-lite/modules/product-carousel/widgets/product-carousel.php
@@ -486,8 +486,7 @@
'readmore_icon[value]!' => '',
],
'selectors' => [
- '{{WRAPPER}} .bdt-ep-product-carousel-readmore .bdt-button-icon-align-right' => is_rtl() ? 'margin-right: {{SIZE}}{{UNIT}};' : 'margin-left: {{SIZE}}{{UNIT}};',
- '{{WRAPPER}} .bdt-ep-product-carousel-readmore .bdt-button-icon-align-left' => is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-ep-product-carousel-readmore' => 'gap: {{SIZE}}{{UNIT}};',
],
]
);
@@ -1632,9 +1631,16 @@
<?php if ( ! empty( $item['readmore_link']['url'] ) && ( $settings['readmore_link_to'] ?? '' ) === 'button' ) : ?>
<div class="bdt-ep-product-carousel-readmore-wrap">
<a <?php $this->print_render_attribute_string( $readmore_key ); ?>>
+ <?php if ( ! empty( $settings['readmore_icon']['value'] ) && 'left' === $icon_align ) : ?>
+ <span class="bdt-button-icon-align-left">
+ <?php Icons_Manager::render_icon( $settings['readmore_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] ); ?>
+ </span>
+ <?php endif; ?>
+
<?php echo esc_html( $readmore_text ); ?>
- <?php if ( ! empty( $settings['readmore_icon']['value'] ) ) : ?>
- <span class="bdt-button-icon-align-<?php echo esc_attr( $icon_align ); ?>">
+
+ <?php if ( ! empty( $settings['readmore_icon']['value'] ) && 'right' === $icon_align ) : ?>
+ <span class="bdt-button-icon-align-right">
<?php Icons_Manager::render_icon( $settings['readmore_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] ); ?>
</span>
<?php endif; ?>
--- a/bdthemes-element-pack-lite/modules/product-grid/widgets/product-grid.php
+++ b/bdthemes-element-pack-lite/modules/product-grid/widgets/product-grid.php
@@ -651,8 +651,7 @@
'readmore_icon[value]!' => '',
],
'selectors' => [
- '{{WRAPPER}} .bdt-ep-product-grid-readmore .bdt-button-icon-align-right' => is_rtl() ? 'margin-right: {{SIZE}}{{UNIT}};' : 'margin-left: {{SIZE}}{{UNIT}};',
- '{{WRAPPER}} .bdt-ep-product-grid-readmore .bdt-button-icon-align-left' => is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-ep-product-grid-readmore' => 'gap: {{SIZE}}{{UNIT}};',
],
]
);
@@ -1832,6 +1831,7 @@
}
public function render_readmore( $item, $readmore_key, $settings ) {
+ $icon_align = $settings['icon_align'] ?? 'right';
$this->add_render_attribute(
[
@@ -1851,9 +1851,16 @@
<?php if ( ( ! empty( $item['readmore_link']['url'] ) ) && ( $settings['readmore_link_to'] == 'button' ) ) : ?>
<div class="bdt-ep-product-grid-readmore-wrap">
<a <?php $this->print_render_attribute_string( $readmore_key ); ?>>
+ <?php if ( ! empty( $settings['readmore_icon']['value'] ) && 'left' === $icon_align ) : ?>
+ <span class="bdt-button-icon-align-left">
+ <?php Icons_Manager::render_icon( $settings['readmore_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] ); ?>
+ </span>
+ <?php endif; ?>
+
<?php echo esc_html( $settings['readmore_text'] ); ?>
- <?php if ( $settings['readmore_icon']['value'] ) : ?>
- <span class="bdt-button-icon-align-<?php echo esc_attr( $settings['icon_align'] ); ?>">
+
+ <?php if ( ! empty( $settings['readmore_icon']['value'] ) && 'right' === $icon_align ) : ?>
+ <span class="bdt-button-icon-align-right">
<?php Icons_Manager::render_icon( $settings['readmore_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] ); ?>
</span>
<?php endif; ?>
--- a/bdthemes-element-pack-lite/modules/scrollnav/widgets/scrollnav.php
+++ b/bdthemes-element-pack-lite/modules/scrollnav/widgets/scrollnav.php
@@ -330,8 +330,7 @@
],
],
'selectors' => [
- '{{WRAPPER}} .bdt-scrollnav .bdt-button-icon-align-right' => 'margin-left: {{SIZE}}{{UNIT}};',
- '{{WRAPPER}} .bdt-scrollnav .bdt-button-icon-align-left' => 'margin-right: {{SIZE}}{{UNIT}};',
+ '{{WRAPPER}} .bdt-scrollnav .bdt-navbar-nav > li > a' => 'gap: {{SIZE}}{{UNIT}};',
],
'condition' => [
'nav_style' => 'default',
@@ -1146,16 +1145,25 @@
?>
<li>
<a <?php $this->print_render_attribute_string( $link_key ); ?>>
- <?php echo esc_attr( $nav['nav_title'] ); ?>
- <?php if ( $nav['scroll_nav_icon']['value'] ) : ?>
- <span class="bdt-button-icon-align-<?php echo esc_attr( $settings['icon_align'] ); ?>">
-
+ <?php if ( ! empty( $nav['scroll_nav_icon']['value'] ) && 'left' === $settings['icon_align'] ) : ?>
+ <span class="bdt-button-icon-align-left">
<?php if ( $is_new || $migrated ) :
Icons_Manager::render_icon( $nav['scroll_nav_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] );
else : ?>
<i class="<?php echo esc_attr( $nav['nav_icon'] ); ?>" aria-hidden="true"></i>
<?php endif; ?>
+ </span>
+ <?php endif; ?>
+ <?php echo esc_html( $nav['nav_title'] ); ?>
+
+ <?php if ( ! empty( $nav['scroll_nav_icon']['value'] ) && 'right' === $settings['icon_align'] ) : ?>
+ <span class="bdt-button-icon-align-right">
+ <?php if ( $is_new || $migrated ) :
+ Icons_Manager::render_icon( $nav['scroll_nav_icon'], [ 'aria-hidden' => 'true', 'class' => 'fa-fw' ] );
+ else : ?>
+ <i class="<?php echo esc_attr( $nav['nav_icon'] ); ?>" aria-hidden="true"></i>
+ <?php endif; ?>
</span>
<?php endif; ?>
</a>
--- a/bdthemes-element-pack-lite/modules/search/module.php
+++ b/bdthemes-element-pack-lite/modules/search/module.php
@@ -53,14 +53,22 @@
public function element_pack_ajax_search() {
global $post;
+ if ( ! isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( sanitize_key( $_REQUEST['nonce'] ), 'element-pack-site' ) ) {
+ die( json_encode( array( 'results' => array() ) ) );
+ }
+
$result = array( 'results' => array() );
$search_input = isset( $_REQUEST['s'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ) : '';
- $settings = isset( $_POST['settings'] ) ? wp_unslash( $_POST['settings'] ) : [];
+ $settings = isset( $_POST['settings'] ) ? array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['settings'] ) ) : [];
if ( strlen( $search_input ) >= 3 ) {
+ $allowed_post_types = get_post_types( array( 'public' => true ) );
+ $requested_type = isset( $settings['post_type'] ) ? $settings['post_type'] : 'post';
+ $post_type = isset( $allowed_post_types[ $requested_type ] ) ? $requested_type : 'post';
+
$query_args = [
- 'post_type' => isset( $settings['post_type'] ) ? $settings['post_type'] : 'post',
+ 'post_type' => $post_type,
's' => sanitize_text_field( $search_input ),
'posts_per_page' => ( $settings['per_page'] ) ? sanitize_text_field( $settings['per_page'] ) : 5,
'post_status' => 'publish',
--- a/bdthemes