| @@ -12,9 +12,9 @@ | ||
| 12 | 12 | use Elementor\Group_Control_Text_Shadow; |
| 13 | 13 | use Elementor\Group_Control_Background; |
| 14 | 14 | use Elementor\Group_Control_Border; |
| 15 | 15 | use Elementor\Icons_Manager; |
| 16 | - use Elementor\Utils; | |
| 16 | + use UltimateStoreKit\Classes\Utils; | |
| 17 | 17 | |
| 18 | 18 | if (! defined('ABSPATH')) { |
| 19 | 19 | exit; |
| 20 | 20 | } // Exit if accessed directly |
| @@ -58,8 +58,16 @@ | ||
| 58 | 58 | public function get_custom_help_url() { |
| 59 | 59 | return 'https://youtu.be/vVCYUAPuqcg?si=ld1BjZ6KIy3OU62Y'; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + public function has_widget_inner_wrapper(): bool { | |
| 63 | + return ! \Elementor\Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ); | |
| 64 | + } | |
| 65 | + | |
| 66 | + protected function is_dynamic_content(): bool { | |
| 67 | + return false; | |
| 68 | + } | |
| 69 | + | |
| 62 | 70 | protected function register_controls() { |
| 63 | 71 | |
| 64 | 72 | $this->start_controls_section( |
| 65 | 73 | 'usk_section_list', |
| @@ -715,22 +723,19 @@ | ||
| 715 | 723 | if (! $settings['show_title']) { |
| 716 | 724 | return; |
| 717 | 725 | } |
| 718 | 726 | |
| 719 | - $this->add_render_attribute( | |
| 720 | - [ | |
| 721 | - 'title-link' => [ | |
| 722 | - 'href' => isset($item['title_link']['url']) && !empty($item['title_link']['url']) ? esc_url($item['title_link']['url']) : 'javascript:void(0);', | |
| 723 | - 'target' => $item['title_link']['is_external'] ? '_blank' : '_self' | |
| 724 | - ] | |
| 725 | - ], | |
| 726 | - '', | |
| 727 | - '', | |
| 728 | - true | |
| 729 | - ); | |
| 727 | + if ( !empty($item['title']) && !empty($item['title_link']['url']) ) { | |
| 728 | + $this->add_link_attributes('title-link', $item['title_link'], true); | |
| 729 | + } | |
| 730 | 730 | |
| 731 | 731 | if (!empty($item['title'])) { |
| 732 | - printf('<%1$s class="usk-info-list-title"><a %2$s title="%3$s">%3$s</a></%1$s>', esc_attr($settings['title_tag']), wp_kses_post($this->get_render_attribute_string('title-link')), wp_kses_post($item['title'])); | |
| 732 | + printf( | |
| 733 | + '<%1$s class="usk-info-list-title"><a %2$s title="%3$s">%3$s</a></%1$s>', | |
| 734 | + esc_attr( Utils::get_valid_html_tag($settings['title_tag']) ), | |
| 735 | + $this->get_render_attribute_string('title-link'), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 736 | + esc_attr($item['title']) | |
| 737 | + ); | |
| 733 | 738 | } |
| 734 | 739 | } |
| 735 | 740 | |
| 736 | 741 | public function render_text($item) |