PluginProbe ʕ •ᴥ•ʔ
Premium Addons for Elementor – Powerful Elementor Templates & Widgets / 4.11.77
Premium Addons for Elementor – Powerful Elementor Templates & Widgets v4.11.77
4.11.79 4.11.78 4.11.77 4.11.76 4.11.75 3.20.5 4.11.69 3.20.6 4.11.7 3.20.7 4.11.70 3.20.8 4.11.71 3.20.9 4.11.72 3.21.1 4.11.73 3.21.2 4.11.74 3.21.3 4.11.8 3.21.4 4.11.9 3.21.5 4.2.0 3.21.6 4.2.1 3.3.0 4.2.2 3.3.1 4.2.3 3.3.2 4.2.4 3.3.3 4.2.5 3.3.4 4.2.6 3.3.5 4.2.7 3.3.6 4.2.8 3.3.7 4.2.9 3.3.8 4.3.0 3.3.9 4.3.1 3.4.0 4.3.2 3.4.1 4.3.3 3.4.2 4.3.4 3.4.3 4.3.5 3.4.4 4.3.6 3.4.5 4.3.7 3.4.6 4.3.8 3.4.7 4.3.9 3.4.8 4.4.0 3.4.9 4.4.1 3.5.0 4.4.2 3.5.1 4.4.3 3.5.2 4.4.4 3.5.3 4.4.5 3.5.4 4.4.6 3.5.5 4.4.7 3.5.6 4.4.8 3.5.7 4.4.9 3.5.8 4.5.0 3.5.9 4.5.1 3.6.0 4.5.2 3.6.1 4.5.3 3.6.2 4.5.4 3.6.3 4.5.5 3.6.4 4.5.6 3.6.5 4.5.7 3.6.6 4.5.8 3.6.7 4.5.9 3.6.8 4.6.0 3.6.9 4.6.1 3.7.0 4.7.0 3.7.1 4.7.1 3.7.2 4.7.2 3.7.3 4.7.3 3.7.4 4.7.4 3.7.5 4.7.5 3.7.6 4.7.6 3.7.7 4.7.7 3.7.8 4.7.8 3.7.9 4.7.9 3.8.0 4.8.0 3.8.1 4.8.1 3.8.2 4.8.10 3.8.3 4.8.11 3.8.4 4.8.2 3.8.5 4.8.3 3.8.6 4.8.4 3.8.7 4.8.5 3.8.8 4.8.6 3.8.9 4.8.7 3.9.0 4.8.8 3.9.1 4.8.9 3.9.2 4.9.0 3.9.3 4.9.0-beta1 3.9.4 4.9.0-beta2 3.9.5 4.9.1 3.9.6 4.9.10 3.9.7 4.9.11 3.9.8 4.9.12 3.9.9 4.9.13 4.0.1 4.9.14 4.0.3 4.9.15 4.0.4 4.9.16 4.0.5 4.9.17 4.0.6 4.9.18 4.0.7 4.9.19 4.0.8 4.9.2 4.0.9 4.9.20 4.1.0 4.9.21 4.1.1 4.9.22 4.1.2 4.9.23 4.1.3 4.9.24 trunk 4.1.4 4.9.25 1.0 4.1.5 4.9.26 1.01 4.1.6 4.9.27 1.02 4.1.7 4.9.28 1.03 4.1.8 4.9.29 1.04 4.1.9 4.9.3 1.05 4.10.0 4.9.30 1.06 4.10.1 4.9.31 1.07 4.10.10 4.9.32 1.08 4.10.11 4.9.33 1.09 4.10.12 4.9.34 2.0 4.10.13 4.9.35 2.0.1 4.10.14 4.9.36 2.0.2 4.10.15 4.9.37 2.0.3 4.10.16 4.9.38 2.0.4 4.10.17 4.9.39 2.0.5 4.10.18 4.9.4 2.0.6 4.10.19 4.9.40 2.0.7 4.10.2 4.9.41 2.0.8 4.10.20 4.9.42 2.0.9 4.10.21 4.9.43 2.1.0 4.10.22 4.9.45 2.1.1 4.10.23 4.9.46 2.1.2 4.10.24 4.9.47 2.1.3 4.10.25 4.9.48 2.1.4 4.10.26 4.9.49 2.1.5 4.10.27 4.9.5 2.1.5-beta1 4.10.28 4.9.50 2.1.6 4.10.29 4.9.51 2.1.7 4.10.3 4.9.52 2.1.8 4.10.30 4.9.53 2.1.9 4.10.31 4.9.54 2.2.0 4.10.32 4.9.55 2.2.1 4.10.33 4.9.56 2.2.2 4.10.34 4.9.57 2.2.3 4.10.35 4.9.6 2.2.4 4.10.36 4.9.7 2.2.5 4.10.37 4.9.8 2.2.6 4.10.38 4.9.9 2.2.7 4.10.39 2.2.8 4.10.4 2.2.9 4.10.40 2.3.0 4.10.41 2.3.1 4.10.42 2.3.2 4.10.43 2.3.3 4.10.44 2.3.4 4.10.45 2.3.5 4.10.46 2.3.6 4.10.47 2.3.7 4.10.48 2.3.8 4.10.49 2.3.9 4.10.5 2.4.0 4.10.50 2.4.1 4.10.51 2.5.0 4.10.52 2.5.1 4.10.53 2.5.2 4.10.54 2.5.3 4.10.55 2.5.4 4.10.56 2.5.5 4.10.57 2.5.6 4.10.58 2.5.7 4.10.59 2.5.8 4.10.6 2.5.9 4.10.60 2.6.0 4.10.61 2.6.1 4.10.62 2.6.2 4.10.63 2.6.3 4.10.64 2.6.4 4.10.65 2.6.5 4.10.66 2.6.6 4.10.67 2.6.7 4.10.68 2.6.8 4.10.69 2.6.9 4.10.7 2.7.0 4.10.70 2.7.1 4.10.71 2.7.2 4.10.72 2.7.3 4.10.73 2.7.4 4.10.74 2.7.5 4.10.75 2.7.6 4.10.76 2.7.7 4.10.77 2.7.8 4.10.78 2.7.9 4.10.79 2.8.0 4.10.8 2.8.1 4.10.80 2.8.2 4.10.81 2.8.3 4.10.82 2.8.4 4.10.83 2.8.5 4.10.84 2.8.6 4.10.85 2.8.7 4.10.86 2.8.8 4.10.87 2.8.9 4.10.88 2.9.0 4.10.89 2.9.1 4.10.9 2.9.2 4.10.90 2.9.3 4.11.0 2.9.4 4.11.1 2.9.5 4.11.10 2.9.6 4.11.11 2.9.7 4.11.12 2.9.8 4.11.13 2.9.9 4.11.14 3.0.0 4.11.15 3.0.1 4.11.16 3.0.2 4.11.17 3.0.3 4.11.18 3.0.4 4.11.19 3.0.5 4.11.2 3.0.6 4.11.20 3.0.7 4.11.21 3.0.8 4.11.22 3.0.9 4.11.23 3.1.0 4.11.24 3.1.1 4.11.25 3.1.2 4.11.26 3.1.3 4.11.27 3.1.4 4.11.28 3.1.5 4.11.29 3.1.6 4.11.3 3.1.7 4.11.30 3.1.8 4.11.31 3.1.9 4.11.32 3.10.0 4.11.33 3.10.1 4.11.34 3.10.2 4.11.35 3.10.3 4.11.36 3.10.4 4.11.37 3.10.5 4.11.38 3.10.6 4.11.39 3.10.7 4.11.4 3.10.8 4.11.40 3.10.9 4.11.41 3.11.0 4.11.42 3.11.1 4.11.43 3.11.2 4.11.44 3.11.3 4.11.45 3.11.4 4.11.46 3.11.5 4.11.47 3.11.6 4.11.48 3.11.7 4.11.49 3.11.8 4.11.5 3.11.9 4.11.50 3.12.0 4.11.51 3.12.1 4.11.52 3.12.2 4.11.53 3.12.3 4.11.54 3.2.0 4.11.55 3.2.1 4.11.56 3.2.2 4.11.57 3.2.3 4.11.58 3.2.4 4.11.59 3.2.5 4.11.6 3.2.6 4.11.60 3.2.7 4.11.61 3.2.8 4.11.62 3.2.9 4.11.63 3.20.0 4.11.64 3.20.1 4.11.65 3.20.2 4.11.66 3.20.3 4.11.67 3.20.4 4.11.68
premium-addons-for-elementor / widgets / premium-banner.php
premium-addons-for-elementor / widgets Last commit date
dep 1 month ago premium-banner.php 3 weeks ago premium-blog.php 3 weeks ago premium-button.php 3 weeks ago premium-carousel.php 3 weeks ago premium-contactform.php 3 weeks ago premium-countdown.php 3 weeks ago premium-counter.php 3 weeks ago premium-dual-header.php 3 weeks ago premium-fancytext.php 3 weeks ago premium-grid.php 3 weeks ago premium-icon-list.php 3 weeks ago premium-image-button.php 3 weeks ago premium-image-scroll.php 3 weeks ago premium-image-separator.php 3 weeks ago premium-lottie.php 3 weeks ago premium-maps.php 3 weeks ago premium-media-wheel.php 3 weeks ago premium-mobile-menu.php 3 weeks ago premium-modalbox.php 3 weeks ago premium-nav-menu.php 3 weeks ago premium-notifications.php 3 weeks ago premium-person.php 3 weeks ago premium-pinterest-feed.php 3 weeks ago premium-post-ticker.php 3 weeks ago premium-pricing-table.php 3 weeks ago premium-progressbar.php 3 weeks ago premium-search-form.php 3 weeks ago premium-svg-drawer.php 3 weeks ago premium-tcloud.php 3 weeks ago premium-testimonials.php 3 weeks ago premium-textual-showcase.php 3 weeks ago premium-tiktok-feed.php 3 weeks ago premium-title.php 3 weeks ago premium-videobox.php 3 weeks ago premium-vscroll.php 3 weeks ago premium-weather.php 3 weeks ago premium-world-clock.php 3 weeks ago
premium-banner.php
1671 lines
1 <?php
2 /**
3 * Premium Banner.
4 */
5
6 namespace PremiumAddons\Widgets;
7
8 // Elementor Classes.
9 use Elementor\Plugin;
10 use Elementor\Widget_Base;
11 use Elementor\Utils;
12 use Elementor\Control_Media;
13 use Elementor\Controls_Manager;
14 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
15 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
16 use Elementor\Group_Control_Border;
17 use Elementor\Group_Control_Image_Size;
18 use Elementor\Group_Control_Typography;
19 use Elementor\Group_Control_Css_Filter;
20 use Elementor\Group_Control_Box_Shadow;
21 use Elementor\Group_Control_Text_Shadow;
22
23 // PremiumAddons Classes.
24 use PremiumAddons\Includes\Helper_Functions;
25 use PremiumAddons\Includes\Controls\Premium_Background;
26 use PremiumAddons\Includes\Controls\Premium_Post_Filter;
27
28 if ( ! defined( 'ABSPATH' ) ) {
29 exit; // If this file is called directly, abort.
30 }
31
32 /**
33 * Class Premium_Banner
34 */
35 class Premium_Banner extends Widget_Base {
36
37 /**
38 * Retrieve Widget Name.
39 *
40 * @since 1.0.0
41 * @access public
42 */
43 public function get_name() {
44 return 'premium-addon-banner';
45 }
46
47 /**
48 * Retrieve Widget Title.
49 *
50 * @since 1.0.0
51 * @access public
52 */
53 public function get_title() {
54 return __( 'Banner', 'premium-addons-for-elementor' );
55 }
56
57 /**
58 * Retrieve Widget Icon.
59 *
60 * @since 1.0.0
61 * @access public
62 *
63 * @return string widget icon.
64 */
65 public function get_icon() {
66 return 'pa-banner';
67 }
68
69 /**
70 * Retrieve Widget Keywords.
71 *
72 * @since 1.0.0
73 * @access public
74 *
75 * @return string Widget keywords.
76 */
77 public function get_keywords() {
78 return array( 'pa', 'premium', 'premium banner', 'image', 'box', 'info', 'cta' );
79 }
80
81 protected function is_dynamic_content(): bool {
82 return false;
83 }
84
85 public function has_widget_inner_wrapper(): bool {
86 return ! Helper_Functions::check_elementor_experiment( 'e_optimized_markup' );
87 }
88
89 /**
90 * Retrieve Widget Categories.
91 *
92 * @since 1.5.1
93 * @access public
94 *
95 * @return array Widget categories.
96 */
97 public function get_categories() {
98 return array( 'premium-elements' );
99 }
100
101 /**
102 * Retrieve Widget Dependent CSS.
103 *
104 * @since 1.0.0
105 * @access public
106 *
107 * @return array CSS style handles.
108 */
109 public function get_style_depends() {
110 return array(
111 'pa-btn',
112 'premium-addons',
113 );
114 }
115
116 /**
117 * Retrieve Widget Dependent JS.
118 *
119 * @since 1.0.0
120 * @access public
121 *
122 * @return array JS script handles.
123 */
124 public function get_script_depends() {
125
126 $is_edit = Helper_Functions::is_edit_mode();
127
128 $scripts = array();
129 if ( $is_edit || ( ! $is_edit && 'yes' === $this->get_settings( 'mouse_tilt' ) ) ) {
130 $scripts[] = 'pa-tilt';
131 }
132
133 $scripts[] = 'premium-addons';
134
135 return $scripts;
136 }
137
138 /**
139 * Retrieve Widget Support URL.
140 *
141 * @access public
142 *
143 * @return string support URL.
144 */
145 public function get_custom_help_url() {
146 return 'https://premiumaddons.com/support/';
147 }
148
149 /**
150 * Register Banner controls.
151 *
152 * @since 1.0.0
153 * @access protected
154 */
155 protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
156
157 $this->register_image_controls();
158
159 $this->register_content_controls();
160
161 $this->register_button_controls();
162
163 $this->register_display_options_controls();
164
165 $this->register_responsive_controls();
166
167 $this->register_docs_controls();
168
169 $this->register_style_controls();
170 }
171
172 private function register_image_controls() {
173
174 $this->start_controls_section(
175 'premium_banner_global_settings',
176 array(
177 'label' => __( 'Image', 'premium-addons-for-elementor' ),
178 )
179 );
180
181 $demo = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/banner-widget-for-elementor-page-builder/', 'banner', 'wp-editor', 'demo' );
182 Helper_Functions::add_templates_controls( $this, 'banner', $demo );
183
184 $this->add_control(
185 'premium_banner_image',
186 array(
187 'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),
188 'type' => Controls_Manager::MEDIA,
189 'dynamic' => array( 'active' => true ),
190 'default' => array(
191 'url' => Utils::get_placeholder_image_src(),
192 ),
193 )
194 );
195
196 $this->add_group_control(
197 Group_Control_Image_Size::get_type(),
198 array(
199 'name' => 'thumbnail',
200 'default' => 'full',
201 'separator' => 'none',
202 )
203 );
204
205 $this->add_control(
206 'premium_banner_image_animation',
207 array(
208 'label' => __( 'Banner Effect', 'premium-addons-for-elementor' ),
209 'type' => Controls_Manager::SELECT,
210 'default' => 'animation1',
211 'options' => array(
212 'animation1' => __( 'Effect 1', 'premium-addons-for-elementor' ),
213 'animation5' => __( 'Effect 2', 'premium-addons-for-elementor' ),
214 'animation13' => __( 'Effect 3', 'premium-addons-for-elementor' ),
215 'animation2' => __( 'Effect 4', 'premium-addons-for-elementor' ),
216 'animation4' => __( 'Effect 5', 'premium-addons-for-elementor' ),
217 'animation6' => __( 'Effect 6', 'premium-addons-for-elementor' ),
218 'animation7' => __( 'Effect 7', 'premium-addons-for-elementor' ),
219 'animation8' => __( 'Effect 8', 'premium-addons-for-elementor' ),
220 'animation9' => __( 'Effect 9', 'premium-addons-for-elementor' ),
221 'animation10' => __( 'Effect 10', 'premium-addons-for-elementor' ),
222 'animation11' => __( 'Effect 11', 'premium-addons-for-elementor' ),
223 ),
224 )
225 );
226
227 $this->add_control(
228 'premium_banner_hover_effect',
229 array(
230 'label' => __( 'Image Hover Effect', 'premium-addons-for-elementor' ),
231 'type' => Controls_Manager::SELECT,
232 'options' => array(
233 'none' => __( 'None', 'premium-addons-for-elementor' ),
234 'zoomin' => __( 'Zoom In', 'premium-addons-for-elementor' ),
235 'zoomout' => __( 'Zoom Out', 'premium-addons-for-elementor' ),
236 'scale' => __( 'Scale', 'premium-addons-for-elementor' ),
237 'grayscale' => __( 'Grayscale', 'premium-addons-for-elementor' ),
238 'blur' => __( 'Blur', 'premium-addons-for-elementor' ),
239 'bright' => __( 'Bright', 'premium-addons-for-elementor' ),
240 'sepia' => __( 'Sepia', 'premium-addons-for-elementor' ),
241 ),
242 'default' => 'none',
243 )
244 );
245
246 $this->add_control(
247 'premium_banner_link_url_switch',
248 array(
249 'label' => __( 'Link', 'premium-addons-for-elementor' ),
250 'type' => Controls_Manager::SWITCHER,
251 'separator' => 'before',
252 )
253 );
254
255 $this->add_control(
256 'premium_banner_image_link_switcher',
257 array(
258 'label' => __( 'Custom Link', 'premium-addons-for-elementor' ),
259 'type' => Controls_Manager::SWITCHER,
260 'condition' => array(
261 'premium_banner_link_url_switch' => 'yes',
262 ),
263 )
264 );
265
266 $this->add_control(
267 'premium_banner_image_custom_link',
268 array(
269 'label' => __( 'Link URL', 'premium-addons-for-elementor' ),
270 'type' => Controls_Manager::URL,
271 'dynamic' => array( 'active' => true ),
272 'condition' => array(
273 'premium_banner_image_link_switcher' => 'yes',
274 'premium_banner_link_url_switch' => 'yes',
275 ),
276 'show_external' => false,
277 )
278 );
279
280 $this->add_control(
281 'premium_banner_image_existing_page_link',
282 array(
283 'label' => __( 'Existing Page', 'premium-addons-for-elementor' ),
284 'type' => Premium_Post_Filter::TYPE,
285 'label_block' => true,
286 'multiple' => false,
287 'source' => array( 'post', 'page' ),
288 'condition' => array(
289 'premium_banner_image_link_switcher!' => 'yes',
290 'premium_banner_link_url_switch' => 'yes',
291 ),
292 )
293 );
294
295 $this->end_controls_section();
296 }
297
298 private function register_content_controls() {
299
300 $this->start_controls_section(
301 'content_section',
302 array(
303 'label' => __( 'Content', 'premium-addons-for-elementor' ),
304 )
305 );
306
307 $this->add_control(
308 'premium_banner_title',
309 array(
310 'label' => __( 'Title', 'premium-addons-for-elementor' ),
311 'placeholder' => __( 'Give a title to this banner', 'premium-addons-for-elementor' ),
312 'type' => Controls_Manager::TEXT,
313 'dynamic' => array( 'active' => true ),
314 'default' => __( 'Premium Banner', 'premium-addons-for-elementor' ),
315 'label_block' => false,
316 )
317 );
318
319 $this->add_control(
320 'premium_banner_title_tag',
321 array(
322 'label' => __( 'Title HTML Tag', 'premium-addons-for-elementor' ),
323 'type' => Controls_Manager::SELECT,
324 'options' => array(
325 'h1' => 'H1',
326 'h2' => 'H2',
327 'h3' => 'H3',
328 'h4' => 'H4',
329 'h5' => 'H5',
330 'h6' => 'H6',
331 'div' => 'div',
332 'span' => 'span',
333 'p' => 'p',
334 ),
335 'default' => 'h3',
336 )
337 );
338
339 $this->add_control(
340 'premium_banner_description',
341 array(
342 'label' => __( 'Description', 'premium-addons-for-elementor' ),
343 'type' => Controls_Manager::WYSIWYG,
344 'dynamic' => array( 'active' => true ),
345 'default' => __( 'Premium Banner gives you a wide range of styles and options that you will definitely fall in love with', 'premium-addons-for-elementor' ),
346 'label_block' => true,
347 )
348 );
349
350 $this->end_controls_section();
351 }
352
353 private function register_button_controls() {
354
355 $this->start_controls_section(
356 'button_section',
357 array(
358 'label' => __( 'Button', 'premium-addons-for-elementor' ),
359 'condition' => array(
360 'premium_banner_link_url_switch!' => 'yes',
361 ),
362 )
363 );
364
365 $this->add_control(
366 'premium_banner_link_switcher',
367 array(
368 'label' => __( 'Button', 'premium-addons-for-elementor' ),
369 'type' => Controls_Manager::SWITCHER,
370 )
371 );
372
373 $this->add_control(
374 'premium_banner_more_text',
375 array(
376 'label' => __( 'Text', 'premium-addons-for-elementor' ),
377 'type' => Controls_Manager::TEXT,
378 'dynamic' => array( 'active' => true ),
379 'default' => 'Click Here',
380 'condition' => array(
381 'premium_banner_link_switcher' => 'yes',
382 ),
383 )
384 );
385
386 $this->add_control(
387 'premium_banner_link_selection',
388 array(
389 'label' => __( 'Link Type', 'premium-addons-for-elementor' ),
390 'type' => Controls_Manager::SELECT,
391 'options' => array(
392 'url' => __( 'URL', 'premium-addons-for-elementor' ),
393 'link' => __( 'Existing Page', 'premium-addons-for-elementor' ),
394 ),
395 'default' => 'url',
396 'label_block' => true,
397 'condition' => array(
398 'premium_banner_link_switcher' => 'yes',
399 ),
400 )
401 );
402
403 $this->add_control(
404 'premium_banner_link',
405 array(
406 'label' => __( 'Link', 'premium-addons-for-elementor' ),
407 'type' => Controls_Manager::URL,
408 'dynamic' => array( 'active' => true ),
409 'default' => array(
410 'url' => '#',
411 ),
412 'placeholder' => 'https://premiumaddons.com/',
413 'label_block' => true,
414 'condition' => array(
415 'premium_banner_link_selection' => 'url',
416 'premium_banner_link_switcher' => 'yes',
417 ),
418 )
419 );
420
421 $this->add_control(
422 'premium_banner_existing_link',
423 array(
424 'label' => __( 'Existing Page', 'premium-addons-for-elementor' ),
425 'type' => Premium_Post_Filter::TYPE,
426 'label_block' => true,
427 'multiple' => false,
428 'source' => array( 'post', 'page' ),
429 'condition' => array(
430 'premium_banner_link_selection' => 'link',
431 'premium_banner_link_switcher' => 'yes',
432 ),
433 )
434 );
435
436 Helper_Functions::add_btn_hover_controls( $this, array( 'premium_banner_link_switcher' => 'yes' ) );
437
438 $this->end_controls_section();
439 }
440
441 private function register_display_options_controls() {
442
443 $this->start_controls_section(
444 'display_options_section',
445 array(
446 'label' => __( 'Display Options', 'premium-addons-for-elementor' ),
447 )
448 );
449
450 $this->add_control(
451 'premium_banner_active',
452 array(
453 'label' => __( 'Always Hovered', 'premium-addons-for-elementor' ),
454 'type' => Controls_Manager::SWITCHER,
455 )
456 );
457
458 $this->add_control(
459 'premium_banner_title_text_align',
460 array(
461 'label' => __( 'Content Alignment', 'premium-addons-for-elementor' ),
462 'type' => Controls_Manager::CHOOSE,
463 'options' => array(
464 'left' => array(
465 'title' => __( 'Left', 'premium-addons-for-elementor' ),
466 'icon' => 'eicon-text-align-left',
467 ),
468 'center' => array(
469 'title' => __( 'Center', 'premium-addons-for-elementor' ),
470 'icon' => 'eicon-text-align-center',
471 ),
472 'right' => array(
473 'title' => __( 'Right', 'premium-addons-for-elementor' ),
474 'icon' => 'eicon-text-align-right',
475 ),
476 ),
477 'default' => 'left',
478 'toggle' => false,
479 'selectors' => array(
480 '{{WRAPPER}} .premium-banner-ib-title, {{WRAPPER}} .premium-banner-ib-content, {{WRAPPER}} .premium-banner-read-more' => 'text-align: {{VALUE}} ;',
481 ),
482 )
483 );
484
485 $this->add_responsive_control(
486 'premium_banner_custom_height',
487 array(
488 'label' => __( 'Minimum Height', 'premium-addons-for-elementor' ),
489 'type' => Controls_Manager::SLIDER,
490 'size_units' => array( 'px', 'em', 'vh', 'custom' ),
491 'range' => array(
492 'px' => array(
493 'min' => 1,
494 'max' => 600,
495 ),
496 ),
497 'selectors' => array(
498 '{{WRAPPER}} .premium-banner-ib img' => 'height: {{SIZE}}{{UNIT}};',
499 ),
500 )
501 );
502
503 $this->add_control(
504 'image_fit',
505 array(
506 'label' => __( 'Image Fit', 'premium-addons-for-elementor' ),
507 'type' => Controls_Manager::SELECT,
508 'options' => array(
509 'cover' => __( 'Cover', 'premium-addons-for-elementor' ),
510 'fill' => __( 'Fill', 'premium-addons-for-elementor' ),
511 'contain' => __( 'Contain', 'premium-addons-for-elementor' ),
512 ),
513 'default' => 'fill',
514 'selectors' => array(
515 '{{WRAPPER}} .premium-banner-ib img' => 'object-fit: {{VALUE}}',
516 ),
517 'condition' => array(
518 'premium_banner_custom_height[size]!' => '',
519 ),
520 )
521 );
522
523 $this->add_control(
524 'mouse_tilt',
525 array(
526 'label' => __( 'Mouse Tilt', 'premium-addons-for-elementor' ),
527 'type' => Controls_Manager::SWITCHER,
528 'prefix_class' => 'premium-banner-tilt-',
529 'render_type' => 'template',
530 )
531 );
532
533 $this->end_controls_section();
534 }
535
536 private function register_responsive_controls() {
537
538 $this->start_controls_section(
539 'premium_banner_responsive_section',
540 array(
541 'label' => __( 'Responsive', 'premium-addons-for-elementor' ),
542 )
543 );
544
545 $this->add_control(
546 'premium_banner_responsive_switcher',
547 array(
548 'label' => __( 'Responsive', 'premium-addons-for-elementor' ),
549 'type' => Controls_Manager::SWITCHER,
550 'description' => __( 'If the description text is not suiting well on mobile devices, you can enable this option to hide it.', 'premium-addons-for-elementor' ),
551 'prefix_class' => 'premium-banner-responsive-',
552 )
553 );
554
555 $this->end_controls_section();
556 }
557
558 private function register_docs_controls() {
559
560 $this->start_controls_section(
561 'section_pa_docs',
562 array(
563 'label' => __( 'Help & Docs', 'premium-addons-for-elementor' ),
564 )
565 );
566
567 $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/elementor-banner-widget-tutorial/', 'banner-widget', 'wp-editor', 'get-support' );
568
569 $this->add_control(
570 'doc_1',
571 array(
572 'type' => Controls_Manager::RAW_HTML,
573 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url, __( 'Getting started »', 'premium-addons-for-elementor' ) ),
574 'content_classes' => 'editor-pa-doc',
575 )
576 );
577
578 Helper_Functions::register_element_feedback_controls( $this );
579
580 $this->end_controls_section();
581
582 Helper_Functions::register_papro_promotion_controls( $this, 'banner' );
583 }
584
585 private function register_style_controls() {
586
587 $this->start_controls_section(
588 'premium_banner_opacity_style',
589 array(
590 'label' => __( 'General', 'premium-addons-for-elementor' ),
591 'tab' => Controls_Manager::TAB_STYLE,
592 )
593 );
594
595 $this->add_control(
596 'premium_banner_image_opacity',
597 array(
598 'label' => __( 'Image Opacity', 'premium-addons-for-elementor' ),
599 'type' => Controls_Manager::SLIDER,
600 'default' => array(
601 'size' => 1,
602 ),
603 'range' => array(
604 'px' => array(
605 'min' => 0,
606 'max' => 1,
607 'step' => .1,
608 ),
609 ),
610 'selectors' => array(
611 '{{WRAPPER}} .premium-banner-ib img' => 'opacity: {{SIZE}};',
612 ),
613 )
614 );
615
616 $this->add_control(
617 'premium_banner_image_bg_color',
618 array(
619 'label' => __( 'Overlay Color', 'premium-addons-for-elementor' ),
620 'type' => Controls_Manager::COLOR,
621 'selectors' => array(
622 '{{WRAPPER}} .premium-banner-ib' => 'background: {{VALUE}};',
623 ),
624 )
625 );
626
627 $this->add_control(
628 'premium_banner_image_hover_opacity',
629 array(
630 'label' => __( 'Hover Opacity', 'premium-addons-for-elementor' ),
631 'type' => Controls_Manager::SLIDER,
632 'default' => array(
633 'size' => 1,
634 ),
635 'range' => array(
636 'px' => array(
637 'min' => 0,
638 'max' => 1,
639 'step' => .1,
640 ),
641 ),
642 'selectors' => array(
643 '{{WRAPPER}}:hover .premium-banner-ib img' => 'opacity: {{SIZE}};',
644 ),
645 )
646 );
647
648 $this->add_control(
649 'premium_banner_title_border_width',
650 array(
651 'label' => __( 'Hover Border Width', 'premium-addons-for-elementor' ),
652 'type' => Controls_Manager::SLIDER,
653 'size_units' => array( 'px', '%', 'em' ),
654 'condition' => array(
655 'premium_banner_image_animation' => array( 'animation13', 'animation9', 'animation10' ),
656 ),
657 'selectors' => array(
658 '{{WRAPPER}} .premium-banner-animation13 .premium-banner-ib-title::after' => 'height: {{size}}{{unit}};',
659 '{{WRAPPER}} .premium-banner-animation9 .premium-banner-ib-desc::before, {{WRAPPER}} .premium-banner-animation9 .premium-banner-ib-desc::after' => 'height: {{size}}{{unit}};',
660 '{{WRAPPER}} .premium-banner-animation10 .premium-banner-ib-title::after' => 'height: {{size}}{{unit}};',
661 ),
662 )
663 );
664
665 $this->add_control(
666 'premium_banner_style3_title_border',
667 array(
668 'label' => __( 'Hover Border Color', 'premium-addons-for-elementor' ),
669 'type' => Controls_Manager::COLOR,
670 'condition' => array(
671 'premium_banner_image_animation' => array( 'animation13', 'animation9', 'animation10' ),
672 ),
673 'separator' => 'after',
674 'selectors' => array(
675 '{{WRAPPER}} .premium-banner-animation13 .premium-banner-ib-title::after' => 'background: {{VALUE}};',
676 '{{WRAPPER}} .premium-banner-animation9 .premium-banner-ib-desc::before, {{WRAPPER}} .premium-banner-animation9 .premium-banner-ib-desc::after' => 'background: {{VALUE}};',
677 '{{WRAPPER}} .premium-banner-animation10 .premium-banner-ib-title::after' => 'background: {{VALUE}};',
678 ),
679 )
680 );
681
682 $this->add_control(
683 'premium_banner_inner_border_width',
684 array(
685 'label' => __( 'Hover Border Width', 'premium-addons-for-elementor' ),
686 'type' => Controls_Manager::SLIDER,
687 'size_units' => array( 'px', '%', 'em' ),
688 'condition' => array(
689 'premium_banner_image_animation' => array( 'animation4', 'animation6', 'animation7', 'animation8' ),
690 ),
691 'selectors' => array(
692 '{{WRAPPER}} .premium-banner-animation4 .premium-banner-ib-desc::after, {{WRAPPER}} .premium-banner-animation4 .premium-banner-ib-desc::before, {{WRAPPER}} .premium-banner-animation6 .premium-banner-ib-desc::before' => 'border-width: {{size}}{{unit}};',
693 '{{WRAPPER}} .premium-banner-animation7 .premium-banner-br.premium-banner-bleft, {{WRAPPER}} .premium-banner-animation7 .premium-banner-br.premium-banner-bright , {{WRAPPER}} .premium-banner-animation8 .premium-banner-br.premium-banner-bright,{{WRAPPER}} .premium-banner-animation8 .premium-banner-br.premium-banner-bleft' => 'width: {{size}}{{unit}};',
694 '{{WRAPPER}} .premium-banner-animation7 .premium-banner-br.premium-banner-btop, {{WRAPPER}} .premium-banner-animation7 .premium-banner-br.premium-banner-bottom , {{WRAPPER}} .premium-banner-animation8 .premium-banner-br.premium-banner-bottom,{{WRAPPER}} .premium-banner-animation8 .premium-banner-br.premium-banner-btop ' => 'height: {{size}}{{unit}};',
695 ),
696 )
697 );
698
699 $this->add_control(
700 'premium_banner_scaled_border_color',
701 array(
702 'label' => __( 'Hover Border Color', 'premium-addons-for-elementor' ),
703 'type' => Controls_Manager::COLOR,
704 'condition' => array(
705 'premium_banner_image_animation' => array( 'animation4', 'animation6', 'animation7', 'animation8' ),
706 ),
707 'separator' => 'after',
708 'selectors' => array(
709 '{{WRAPPER}} .premium-banner-animation4 .premium-banner-ib-desc::after, {{WRAPPER}} .premium-banner-animation4 .premium-banner-ib-desc::before, {{WRAPPER}} .premium-banner-animation6 .premium-banner-ib-desc::before' => 'border-color: {{VALUE}};',
710 '{{WRAPPER}} .premium-banner-animation7 .premium-banner-br, {{WRAPPER}} .premium-banner-animation8 .premium-banner-br' => 'background-color: {{VALUE}};',
711 ),
712 )
713 );
714
715 $this->add_group_control(
716 Group_Control_Css_Filter::get_type(),
717 array(
718 'name' => 'css_filters',
719 'selector' => '{{WRAPPER}} .premium-banner-ib img',
720 )
721 );
722
723 $this->add_group_control(
724 Group_Control_Css_Filter::get_type(),
725 array(
726 'name' => 'hover_css_filters',
727 'label' => __( 'Hover CSS Filters', 'premium-addons-for-elementor' ),
728 'selector' => '{{WRAPPER}}:hover .premium-banner-ib img',
729 )
730 );
731
732 $this->add_group_control(
733 Group_Control_Border::get_type(),
734 array(
735 'name' => 'premium_banner_image_border',
736 'selector' => '{{WRAPPER}} .premium-banner-ib',
737 )
738 );
739
740 $this->add_control(
741 'premium_banner_image_border_radius',
742 array(
743 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
744 'type' => Controls_Manager::SLIDER,
745 'size_units' => array( 'px', '%', 'em' ),
746 'selectors' => array(
747 '{{WRAPPER}} .premium-banner-ib' => 'border-radius: {{SIZE}}{{UNIT}};',
748 ),
749 'condition' => array(
750 'image_adv_radius!' => 'yes',
751 ),
752 )
753 );
754
755 $this->add_control(
756 'image_adv_radius',
757 array(
758 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
759 'type' => Controls_Manager::SWITCHER,
760 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>' . __( '. See ', 'premium-addons-for-elementor' ) . '<a href="https://www.youtube.com/watch?v=S0BJazLHV-M" target="_blank">tutorial</a>',
761 )
762 );
763
764 $this->add_control(
765 'image_adv_radius_value',
766 array(
767 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
768 'type' => Controls_Manager::TEXT,
769 'dynamic' => array( 'active' => true ),
770 'selectors' => array(
771 '{{WRAPPER}} .premium-banner-ib' => 'border-radius: {{VALUE}};',
772 ),
773 'condition' => array(
774 'image_adv_radius' => 'yes',
775 ),
776 'ai' => array(
777 'active' => false,
778 ),
779 )
780 );
781
782 $this->add_control(
783 'blend_mode',
784 array(
785 'label' => __( 'Blend Mode', 'premium-addons-for-elementor' ),
786 'type' => Controls_Manager::SELECT,
787 'options' => array(
788 '' => __( 'Normal', 'premium-addons-for-elementor' ),
789 'multiply' => 'Multiply',
790 'screen' => 'Screen',
791 'overlay' => 'Overlay',
792 'darken' => 'Darken',
793 'lighten' => 'Lighten',
794 'color-dodge' => 'Color Dodge',
795 'saturation' => 'Saturation',
796 'color' => 'Color',
797 'luminosity' => 'Luminosity',
798 ),
799 'separator' => 'before',
800 'selectors' => array(
801 '{{WRAPPER}} .premium-banner-ib' => 'mix-blend-mode: {{VALUE}}',
802 ),
803 )
804 );
805
806 $this->end_controls_section();
807
808 $this->start_controls_section(
809 'premium_banner_title_style',
810 array(
811 'label' => __( 'Title', 'premium-addons-for-elementor' ),
812 'tab' => Controls_Manager::TAB_STYLE,
813 )
814 );
815
816 $this->add_control(
817 'premium_banner_color_of_title',
818 array(
819 'label' => __( 'Color', 'premium-addons-for-elementor' ),
820 'type' => Controls_Manager::COLOR,
821 'global' => array(
822 'default' => Global_Colors::COLOR_PRIMARY,
823 ),
824 'selectors' => array(
825 '{{WRAPPER}} .premium-banner-ib-desc .premium_banner_title' => 'color: {{VALUE}};',
826 ),
827 )
828 );
829
830 $this->add_group_control(
831 Group_Control_Typography::get_type(),
832 array(
833 'name' => 'premium_banner_title_typography',
834 'selector' => '{{WRAPPER}} .premium-banner-ib-desc .premium_banner_title',
835 'global' => array(
836 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
837 ),
838 )
839 );
840
841 $this->add_control(
842 'premium_banner_style2_title_bg',
843 array(
844 'label' => __( 'Background', 'premium-addons-for-elementor' ),
845 'type' => Controls_Manager::COLOR,
846 'default' => '#f2f2f2',
847 'description' => __( 'Choose a background color for the title', 'premium-addons-for-elementor' ),
848 'condition' => array(
849 'premium_banner_image_animation' => 'animation5',
850 ),
851 'selectors' => array(
852 '{{WRAPPER}} .premium-banner-animation5 .premium-banner-ib-desc' => 'background-color: {{VALUE}};',
853 ),
854 )
855 );
856
857 $this->add_group_control(
858 Group_Control_Text_Shadow::get_type(),
859 array(
860 'name' => 'premium_banner_title_shadow',
861 'selector' => '{{WRAPPER}} .premium-banner-ib-desc .premium_banner_title',
862 )
863 );
864
865 $this->add_responsive_control(
866 'premium_banner_title_margin',
867 array(
868 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
869 'type' => Controls_Manager::DIMENSIONS,
870 'size_units' => array( 'px', 'em', '%' ),
871 'selectors' => array(
872 '{{WRAPPER}} .premium-banner-ib-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
873 ),
874 )
875 );
876
877 $this->end_controls_section();
878
879 $this->start_controls_section(
880 'premium_banner_styles_of_content',
881 array(
882 'label' => __( 'Description', 'premium-addons-for-elementor' ),
883 'tab' => Controls_Manager::TAB_STYLE,
884 )
885 );
886
887 $this->add_control(
888 'premium_banner_color_of_content',
889 array(
890 'label' => __( 'Color', 'premium-addons-for-elementor' ),
891 'type' => Controls_Manager::COLOR,
892 'global' => array(
893 'default' => Global_Colors::COLOR_TEXT,
894 ),
895 'selectors' => array(
896 '{{WRAPPER}} .premium_banner_content' => 'color: {{VALUE}};',
897 ),
898 )
899 );
900
901 $this->add_group_control(
902 Group_Control_Typography::get_type(),
903 array(
904 'name' => 'premium_banner_content_typhography',
905 'selector' => '{{WRAPPER}} .premium_banner_content',
906 'global' => array(
907 'default' => Global_Typography::TYPOGRAPHY_TEXT,
908 ),
909 )
910 );
911
912 $this->add_group_control(
913 Group_Control_Text_Shadow::get_type(),
914 array(
915 'name' => 'premium_banner_description_shadow',
916 'selector' => '{{WRAPPER}} .premium_banner_content',
917 )
918 );
919
920 $this->add_responsive_control(
921 'premium_banner_desc_margin',
922 array(
923 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
924 'type' => Controls_Manager::DIMENSIONS,
925 'size_units' => array( 'px', 'em', '%' ),
926 'selectors' => array(
927 '{{WRAPPER}} .premium-banner-ib-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
928 ),
929 )
930 );
931
932 $this->end_controls_section();
933
934 $this->start_controls_section(
935 'button_style_section',
936 array(
937 'label' => __( 'Button', 'premium-addons-for-elementor' ),
938 'tab' => Controls_Manager::TAB_STYLE,
939 'condition' => array(
940 'premium_banner_link_switcher' => 'yes',
941 'premium_banner_link_url_switch!' => 'yes',
942 ),
943 )
944 );
945
946 $this->add_group_control(
947 Group_Control_Typography::get_type(),
948 array(
949 'name' => 'premium_banner_button_typhography',
950 'global' => array(
951 'default' => Global_Typography::TYPOGRAPHY_TEXT,
952 ),
953 'selector' => '{{WRAPPER}} .premium-banner-link',
954 )
955 );
956
957 $this->start_controls_tabs( 'button_style_tabs' );
958
959 $this->start_controls_tab(
960 'button_style_normal',
961 array(
962 'label' => __( 'Normal', 'premium-addons-for-elementor' ),
963 )
964 );
965
966 $this->add_control(
967 'premium_banner_color_of_button',
968 array(
969 'label' => __( 'Color', 'premium-addons-for-elementor' ),
970 'type' => Controls_Manager::COLOR,
971 'global' => array(
972 'default' => Global_Colors::COLOR_TEXT,
973 ),
974 'selectors' => array(
975 '{{WRAPPER}} .premium-banner-link' => 'color: {{VALUE}};',
976 ),
977 )
978 );
979
980 $this->add_control(
981 'premium_banner_backcolor_of_button',
982 array(
983 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
984 'type' => Controls_Manager::COLOR,
985 'selectors' => array(
986 '{{WRAPPER}} .premium-banner-link, {{WRAPPER}} .premium-button-style1:before, {{WRAPPER}} .premium-button-style2-shutinhor:before, {{WRAPPER}} .premium-button-style2-shutouthor:before, {{WRAPPER}} .premium-button-style2-shutoutver:before, {{WRAPPER}} .premium-button-style2-shutinver:before, {{WRAPPER}} .premium-button-style2-dshutinver:before, {{WRAPPER}} .premium-button-style2-dshutinhor:before, {{WRAPPER}} .premium-button-style2-sshutinver:before, {{WRAPPER}} .premium-button-style2-sshutinhor:before, {{WRAPPER}} .premium-button-style2-scshutouthor:before, {{WRAPPER}} .premium-button-style2-scshutoutver:before, {{WRAPPER}} .premium-button-style5-radialin:before, {{WRAPPER}} .premium-button-style5-rectin:before, {{WRAPPER}} .premium-button-style5-radialout:before, {{WRAPPER}} .premium-button-style5-rectout:before, {{WRAPPER}} .premium-button-style6:before' => 'background-color: {{VALUE}};',
987 ),
988 )
989 );
990
991 $this->add_group_control(
992 Group_Control_Border::get_type(),
993 array(
994 'name' => 'premium_banner_button_border',
995 'selector' => '{{WRAPPER}} .premium-banner-link',
996 )
997 );
998
999 $this->add_control(
1000 'premium_banner_button_border_radius',
1001 array(
1002 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1003 'type' => Controls_Manager::SLIDER,
1004 'size_units' => array( 'px', '%', 'em' ),
1005 'selectors' => array(
1006 '{{WRAPPER}} .premium-banner-link' => 'border-radius: {{SIZE}}{{UNIT}};',
1007 ),
1008 'condition' => array(
1009 'button_adv_radius!' => 'yes',
1010 ),
1011 )
1012 );
1013
1014 $this->add_control(
1015 'button_adv_radius',
1016 array(
1017 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
1018 'type' => Controls_Manager::SWITCHER,
1019 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>' . __( '. See ', 'premium-addons-for-elementor' ) . '<a href="https://www.youtube.com/watch?v=S0BJazLHV-M" target="_blank">tutorial</a>',
1020 )
1021 );
1022
1023 $this->add_control(
1024 'button_adv_radius_value',
1025 array(
1026 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1027 'type' => Controls_Manager::TEXT,
1028 'dynamic' => array( 'active' => true ),
1029 'selectors' => array(
1030 '{{WRAPPER}} .premium-banner-link' => 'border-radius: {{VALUE}};',
1031 ),
1032 'condition' => array(
1033 'button_adv_radius' => 'yes',
1034 ),
1035 'ai' => array(
1036 'active' => false,
1037 ),
1038 )
1039 );
1040
1041 $this->add_group_control(
1042 Group_Control_Text_Shadow::get_type(),
1043 array(
1044 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
1045 'name' => 'premium_banner_button_shadow',
1046 'selector' => '{{WRAPPER}} .premium-banner-link',
1047 )
1048 );
1049
1050 $this->add_responsive_control(
1051 'premium_banner_button_margin',
1052 array(
1053 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1054 'type' => Controls_Manager::DIMENSIONS,
1055 'size_units' => array( 'px', 'em', '%' ),
1056 'selectors' => array(
1057 '{{WRAPPER}} .premium-banner-read-more' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1058 ),
1059 )
1060 );
1061
1062 $this->add_responsive_control(
1063 'premium_banner_button_padding',
1064 array(
1065 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1066 'type' => Controls_Manager::DIMENSIONS,
1067 'size_units' => array( 'px', 'em', '%' ),
1068 'default' => array(
1069 'top' => 0,
1070 'right' => 0,
1071 'bottom' => 0,
1072 'left' => 0,
1073 'unit' => 'px',
1074 'isLinked' => true,
1075 ),
1076 'selectors' => array(
1077 '{{WRAPPER}} .premium-banner-link, {{WRAPPER}} .premium-button-line6::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1078 ),
1079 )
1080 );
1081
1082 $this->end_controls_tab();
1083
1084 $this->start_controls_tab(
1085 'button_style_hover',
1086 array(
1087 'label' => __( 'Hover', 'premium-addons-for-elementor' ),
1088 )
1089 );
1090
1091 $this->add_control(
1092 'premium_banner_hover_color_of_button',
1093 array(
1094 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1095 'type' => Controls_Manager::COLOR,
1096 'global' => array(
1097 'default' => Global_Colors::COLOR_TEXT,
1098 ),
1099 'selectors' => array(
1100 '{{WRAPPER}} .premium-banner-link:hover, {{WRAPPER}} .premium-button-line6::after' => 'color: {{VALUE}};',
1101 ),
1102 )
1103 );
1104
1105 $this->add_control(
1106 'underline_color',
1107 array(
1108 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
1109 'type' => Controls_Manager::COLOR,
1110 'global' => array(
1111 'default' => Global_Colors::COLOR_SECONDARY,
1112 ),
1113 'selectors' => array(
1114 '{{WRAPPER}} .premium-btn-svg' => 'stroke: {{VALUE}};',
1115 '{{WRAPPER}} .premium-button-line2::before, {{WRAPPER}} .premium-button-line4::before, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after, {{WRAPPER}} .premium-button-line6::before, {{WRAPPER}} .premium-button-line7::before' => 'background-color: {{VALUE}};',
1116 ),
1117 'condition' => array(
1118 'premium_button_hover_effect' => 'style8',
1119 ),
1120 )
1121 );
1122
1123 $this->add_control(
1124 'first_layer_hover',
1125 array(
1126 'label' => __( 'Layer #1 Color', 'premium-addons-for-elementor' ),
1127 'type' => Controls_Manager::COLOR,
1128 'global' => array(
1129 'default' => Global_Colors::COLOR_SECONDARY,
1130 ),
1131 'selectors' => array(
1132 '{{WRAPPER}} .premium-button-style7 .premium-button-text-icon-wrapper:before' => 'background-color: {{VALUE}}',
1133 ),
1134 'condition' => array(
1135 'premium_button_hover_effect' => 'style7',
1136
1137 ),
1138 )
1139 );
1140
1141 $this->add_control(
1142 'second_layer_hover',
1143 array(
1144 'label' => __( 'Layer #2 Color', 'premium-addons-for-elementor' ),
1145 'type' => Controls_Manager::COLOR,
1146 'global' => array(
1147 'default' => Global_Colors::COLOR_TEXT,
1148 ),
1149 'selectors' => array(
1150 '{{WRAPPER}} .premium-button-style7 .premium-button-text-icon-wrapper:after' => 'background-color: {{VALUE}}',
1151 ),
1152 'condition' => array(
1153 'premium_button_hover_effect' => 'style7',
1154 ),
1155 )
1156 );
1157
1158 $this->add_control(
1159 'premium_banner_hover_backcolor_of_button',
1160 array(
1161 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1162 'type' => Controls_Manager::COLOR,
1163 'selectors' => array(
1164 '{{WRAPPER}} .premium-button-none:hover, {{WRAPPER}} .premium-button-style8:hover, {{WRAPPER}} .premium-button-style1:before, {{WRAPPER}} .premium-button-style2-shutouthor:before, {{WRAPPER}} .premium-button-style2-shutoutver:before, {{WRAPPER}} .premium-button-style2-shutinhor:hover:before, {{WRAPPER}} .premium-button-style2-shutinver:hover:before, {{WRAPPER}} .premium-button-style2-dshutinhor:before, {{WRAPPER}} .premium-button-style2-dshutinver:before, {{WRAPPER}} .premium-button-style2-sshutinhor:hover:before, {{WRAPPER}} .premium-button-style2-sshutinver:hover:before, {{WRAPPER}} .premium-button-style2-scshutouthor:before, {{WRAPPER}} .premium-button-style2-scshutoutver:before, {{WRAPPER}} .premium-button-style5-radialin, {{WRAPPER}} .premium-button-style5-radialout:before, {{WRAPPER}} .premium-button-style5-rectin, {{WRAPPER}} .premium-button-style5-rectout:before, {{WRAPPER}} .premium-button-style6:hover:before' => 'background-color: {{VALUE}};',
1165 ),
1166 'condition' => array(
1167 'premium_button_hover_effect!' => 'style7',
1168 ),
1169 )
1170 );
1171
1172 $this->add_group_control(
1173 Group_Control_Border::get_type(),
1174 array(
1175 'name' => 'button_border_hover',
1176 'selector' => '{{WRAPPER}} .premium-banner-link:hover',
1177 )
1178 );
1179
1180 $this->add_control(
1181 'button_border_radius_hover',
1182 array(
1183 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1184 'type' => Controls_Manager::SLIDER,
1185 'size_units' => array( 'px', 'em', '%' ),
1186 'selectors' => array(
1187 '{{WRAPPER}} .premium-banner-link:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
1188 ),
1189 )
1190 );
1191
1192 $this->add_group_control(
1193 Group_Control_Box_Shadow::get_type(),
1194 array(
1195 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
1196 'name' => 'button_shadow_hover',
1197 'selector' => '{{WRAPPER}} .premium-banner-link:hover',
1198 )
1199 );
1200
1201 $this->add_responsive_control(
1202 'button_margin_hover',
1203 array(
1204 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1205 'type' => Controls_Manager::DIMENSIONS,
1206 'size_units' => array( 'px', 'em', '%' ),
1207 'selectors' => array(
1208 '{{WRAPPER}} .premium-banner-link:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1209 ),
1210 )
1211 );
1212
1213 $this->add_responsive_control(
1214 'button_padding_hover',
1215 array(
1216 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1217 'type' => Controls_Manager::DIMENSIONS,
1218 'size_units' => array( 'px', 'em', '%' ),
1219 'selectors' => array(
1220 '{{WRAPPER}} .premium-banner-link:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1221 ),
1222 )
1223 );
1224
1225 $this->end_controls_tab();
1226
1227 $this->end_controls_tabs();
1228
1229 $this->end_controls_section();
1230
1231 $this->start_controls_section(
1232 'premium_banner_container_style',
1233 array(
1234 'label' => __( 'Container', 'premium-addons-for-elementor' ),
1235 'tab' => Controls_Manager::TAB_STYLE,
1236 )
1237 );
1238
1239 $this->add_group_control(
1240 Group_Control_Border::get_type(),
1241 array(
1242 'name' => 'premium_banner_border',
1243 'selector' => '{{WRAPPER}}',
1244 )
1245 );
1246
1247 $this->add_control(
1248 'premium_banner_border_radius',
1249 array(
1250 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1251 'type' => Controls_Manager::DIMENSIONS,
1252 'size_units' => array( 'px', '%', 'em' ),
1253 'selectors' => array(
1254 '{{WRAPPER}}' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1255 ),
1256 )
1257 );
1258
1259 $this->add_group_control(
1260 Group_Control_Box_Shadow::get_type(),
1261 array(
1262 'name' => 'premium_banner_shadow',
1263 'selector' => '{{WRAPPER}}',
1264 )
1265 );
1266
1267 $this->add_group_control(
1268 Premium_Background::get_type(),
1269 array(
1270 'name' => 'gradient_color',
1271 'types' => array( 'gradient' ),
1272 'separator' => 'before',
1273 'selector' => '{{WRAPPER}} .premium-banner-gradient:before, {{WRAPPER}} .premium-banner-gradient:after',
1274 'condition' => array(
1275 'premium_banner_image_animation' => 'animation11',
1276 ),
1277 )
1278 );
1279
1280 $this->add_control(
1281 'first_layer_speed',
1282 array(
1283 'label' => __( 'First Layer Transition Speed (sec)', 'premium-addons-for-elementor' ),
1284 'type' => Controls_Manager::SLIDER,
1285 'default' => array(
1286 'size' => 0.3,
1287 ),
1288 'range' => array(
1289 'px' => array(
1290 'min' => 0,
1291 'max' => 3,
1292 'step' => .1,
1293 ),
1294 ),
1295 'selectors' => array(
1296 '{{WRAPPER}} .premium-banner-animation11:hover .premium-banner-gradient:after' => 'transition-delay: {{SIZE}}s',
1297 '{{WRAPPER}} .premium-banner-animation11 .premium-banner-gradient:before' => 'transition: transform 0.3s ease-out {{SIZE}}s',
1298 ),
1299 'condition' => array(
1300 'premium_banner_image_animation' => 'animation11',
1301 ),
1302 )
1303 );
1304
1305 $this->add_control(
1306 'second_layer_speed',
1307 array(
1308 'label' => __( 'Second Layer Transition Delay (sec)', 'premium-addons-for-elementor' ),
1309 'type' => Controls_Manager::SLIDER,
1310 'default' => array(
1311 'size' => 0.15,
1312 ),
1313 'range' => array(
1314 'px' => array(
1315 'min' => 0,
1316 'max' => 3,
1317 'step' => .1,
1318 ),
1319 ),
1320 'selectors' => array(
1321 '{{WRAPPER}} .premium-banner-animation11:hover .premium-banner-gradient:before' => 'transition-delay: {{SIZE}}s',
1322 '{{WRAPPER}} .premium-banner-animation11 .premium-banner-gradient:after' => 'transition: transform 0.3s ease-out {{SIZE}}s',
1323
1324 ),
1325 'condition' => array(
1326 'premium_banner_image_animation' => 'animation11',
1327 ),
1328 )
1329 );
1330
1331 $this->end_controls_section();
1332 }
1333
1334 /**
1335 * Render Banner widget output on the frontend.
1336 *
1337 * Written in PHP and used to generate the final HTML.
1338 *
1339 * @since 1.0.0
1340 * @access protected
1341 */
1342 protected function render() {
1343
1344 $settings = $this->get_settings_for_display();
1345
1346 $this->add_inline_editing_attributes( 'premium_banner_title' );
1347 $this->add_render_attribute(
1348 'premium_banner_title',
1349 'class',
1350 array(
1351 'premium-banner-ib-title',
1352 'premium_banner_title',
1353 )
1354 );
1355
1356 $this->add_inline_editing_attributes( 'premium_banner_description', 'advanced' );
1357 $this->add_render_attribute(
1358 'premium_banner_description',
1359 'class',
1360 array(
1361 'premium-banner-ib-content',
1362 'premium_banner_content',
1363 )
1364 );
1365
1366 if ( 'yes' === $settings['premium_banner_link_url_switch'] ) {
1367
1368 if ( 'yes' === $settings['premium_banner_image_link_switcher'] ) {
1369 $this->add_link_attributes( 'link', $settings['premium_banner_image_custom_link'] );
1370 } else {
1371 $this->add_render_attribute( 'link', 'href', get_permalink( $settings['premium_banner_image_existing_page_link'] ) );
1372 }
1373
1374 $this->add_render_attribute( 'link', 'class', 'premium-banner-ib-link' );
1375 }
1376
1377 $animation_class = 'premium-banner-' . $settings['premium_banner_image_animation'];
1378 $img_hover = ' ' . $settings['premium_banner_hover_effect'];
1379 $active = 'yes' === $settings['premium_banner_active'] ? ' active' : '';
1380 $effect_type_class = ' premium-banner__effect-type' . ( in_array( $settings['premium_banner_image_animation'], array( 'animation2', 'animation5', 'animation6' ), true ) ? '1' : '2' );
1381 $full_class = $animation_class . $img_hover . $active . $effect_type_class;
1382
1383 if ( 'yes' === $settings['premium_banner_link_switcher'] ) {
1384
1385 $banner_url = 'url' === $settings['premium_banner_link_selection'] ? $settings['premium_banner_link'] : get_permalink( $settings['premium_banner_existing_link'] );
1386
1387 if ( 'url' === $settings['premium_banner_link_selection'] ) {
1388 $this->add_link_attributes( 'button', $banner_url );
1389 } else {
1390 $this->add_render_attribute( 'button', 'href', $banner_url );
1391 }
1392
1393 $effect_class = Helper_Functions::get_button_class( $settings );
1394
1395 $this->add_render_attribute(
1396 'button',
1397 array(
1398 'class' => array(
1399 'premium-banner-link',
1400 $effect_class,
1401 ),
1402 'data-text' => $settings['premium_banner_more_text'],
1403 )
1404 );
1405
1406 }
1407
1408 $image_html = '';
1409
1410 if ( ! empty( $settings['premium_banner_image']['url'] ) ) {
1411
1412 $image_id = apply_filters( 'wpml_object_id', $settings['premium_banner_image']['id'], 'attachment', true );
1413
1414 $settings['premium_banner_image']['id'] = $image_id;
1415
1416 $image_html = Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'premium_banner_image' );
1417
1418 }
1419
1420 $this->add_render_attribute(
1421 'banner_inner',
1422 array(
1423 'class' => array(
1424 'premium-banner-ib',
1425 'premium-banner-min-height',
1426 $full_class,
1427 ),
1428 )
1429 );
1430
1431 ?>
1432 <div <?php $this->print_render_attribute_string( 'banner_inner' ); ?>>
1433 <?php if ( 'animation7' === $settings['premium_banner_image_animation'] || 'animation8' === $settings['premium_banner_image_animation'] ) : ?>
1434 <div class="premium-banner-border">
1435 <div class="premium-banner-br premium-banner-bleft premium-banner-brlr"></div>
1436 <div class="premium-banner-br premium-banner-bright premium-banner-brlr"></div>
1437 <div class="premium-banner-br premium-banner-btop premium-banner-brtb"></div>
1438 <div class="premium-banner-br premium-banner-bottom premium-banner-brtb"></div>
1439 </div>
1440 <?php endif; ?>
1441 <?php if ( ! empty( $settings['premium_banner_image']['url'] ) ) : ?>
1442 <?php echo wp_kses_post( $image_html ); ?>
1443 <?php endif; ?>
1444 <?php if ( 'animation11' === $settings['premium_banner_image_animation'] ) : ?>
1445 <div class="premium-banner-gradient"></div>
1446 <?php endif; ?>
1447 <div class="premium-banner-ib-desc">
1448 <?php if ( 'animation7' === $settings['premium_banner_image_animation'] ) : ?>
1449 <div class="premium-banner-desc-centered">
1450 <?php endif; ?>
1451
1452 <?php if ( ! empty( $settings['premium_banner_title'] ) ) : ?>
1453 <<?php echo wp_kses_post( Helper_Functions::validate_html_tag( $settings['premium_banner_title_tag'] ) . ' ' . $this->get_render_attribute_string( 'premium_banner_title' ) ); ?>>
1454 <?php echo wp_kses_post( $settings['premium_banner_title'] ); ?>
1455 </<?php echo wp_kses_post( Helper_Functions::validate_html_tag( $settings['premium_banner_title_tag'] ) ); ?>>
1456 <?php endif; ?>
1457
1458 <?php
1459 if ( ! empty( $settings['premium_banner_description'] ) ) :
1460 ?>
1461 <div <?php $this->print_render_attribute_string( 'premium_banner_description' ); ?>>
1462 <?php echo $this->parse_text_editor( $settings['premium_banner_description'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
1463 </div>
1464 <?php endif; ?>
1465
1466 <?php if ( 'yes' === $settings['premium_banner_link_switcher'] && ! empty( $settings['premium_banner_more_text'] ) ) : ?>
1467 <div class="premium-banner-read-more">
1468 <a <?php $this->print_render_attribute_string( 'button' ); ?>>
1469 <div class="premium-button-text-icon-wrapper">
1470 <span><?php echo esc_html( $settings['premium_banner_more_text'] ); ?></span>
1471 </div>
1472
1473 <?php if ( 'style6' === $settings['premium_button_hover_effect'] && 'yes' === $settings['mouse_detect'] ) : ?>
1474 <span class="premium-button-style6-bg"></span>
1475 <?php endif; ?>
1476
1477 <?php if ( 'style8' === $settings['premium_button_hover_effect'] ) : ?>
1478 <?php echo Helper_Functions::get_btn_svgs( $settings['underline_style'] ); ?>
1479 <?php endif; ?>
1480
1481 </a>
1482 </div>
1483 <?php endif; ?>
1484
1485 <?php if ( 'animation7' === $settings['premium_banner_image_animation'] ) : ?>
1486 </div>
1487 <?php endif; ?>
1488 </div>
1489 <?php
1490 if ( 'yes' === $settings['premium_banner_link_url_switch'] && ( ! empty( $settings['premium_banner_image_custom_link']['url'] ) || ! empty( $settings['premium_banner_image_existing_page_link'] ) ) ) :
1491 ?>
1492 <a <?php $this->print_render_attribute_string( 'link' ); ?>></a>
1493 <?php endif; ?>
1494 </div>
1495
1496 <?php
1497 }
1498
1499 /**
1500 * Render Banner widget output in the editor.
1501 *
1502 * Written as a Backbone JavaScript template and used to generate the live preview.
1503 *
1504 * @since 1.0.0
1505 * @access protected
1506 */
1507 protected function content_template() {
1508 ?>
1509 <#
1510
1511 var active = 'yes' === settings.premium_banner_active ? 'active' : '';
1512
1513 view.addRenderAttribute( 'banner_inner', 'class', [
1514 'premium-banner-ib',
1515 'premium-banner-min-height',
1516 'premium-banner-' + settings.premium_banner_image_animation,
1517 settings.premium_banner_hover_effect,
1518 'premium-banner__effect-type' + ( [ 'animation2', 'animation5', 'animation6' ].includes( settings.premium_banner_image_animation ) ? '1' : '2' ),
1519 active
1520 ] );
1521
1522 var titleTag = elementor.helpers.validateHTMLTag( settings.premium_banner_title_tag ),
1523 title = settings.premium_banner_title;
1524
1525 view.addRenderAttribute( 'premium_banner_title', 'class', [
1526 'premium-banner-ib-title',
1527 'premium_banner_title'
1528 ] );
1529
1530 view.addInlineEditingAttributes( 'premium_banner_title' );
1531
1532 view.addInlineEditingAttributes( 'premium_banner_description', 'advanced' );
1533 view.addRenderAttribute( 'premium_banner_description', 'class', [
1534 'premium-banner-ib-content',
1535 'premium_banner_content',
1536 ] );
1537
1538 var linkSwitcher = settings.premium_banner_link_switcher,
1539 readMore = settings.premium_banner_more_text,
1540 bannerUrl = 'url' === settings.premium_banner_link_selection ? settings.premium_banner_link.url : settings.premium_banner_existing_link;
1541
1542 var bannerLink = 'yes' === settings.premium_banner_image_link_switcher ? settings.premium_banner_image_custom_link.url : settings.premium_banner_image_existing_page_link;
1543
1544 var imageHtml = '';
1545 if ( settings.premium_banner_image.url ) {
1546 var image = {
1547 id: settings.premium_banner_image.id,
1548 url: settings.premium_banner_image.url,
1549 size: settings.thumbnail_size,
1550 dimension: settings.thumbnail_custom_dimension,
1551 model: view.getEditModel()
1552 };
1553
1554 var image_url = elementor.imagesManager.getImageUrl( image );
1555
1556 }
1557
1558 #>
1559
1560 <div {{{ view.getRenderAttributeString( 'banner_inner' ) }}}>
1561 <# if (settings.premium_banner_image_animation ==='animation7' || settings.premium_banner_image_animation ==='animation8'){ #>
1562 <div class="premium-banner-border">
1563 <div class="premium-banner-br premium-banner-bleft premium-banner-brlr"></div>
1564 <div class="premium-banner-br premium-banner-bright premium-banner-brlr"></div>
1565 <div class="premium-banner-br premium-banner-btop premium-banner-brtb"></div>
1566 <div class="premium-banner-br premium-banner-bottom premium-banner-brtb"></div>
1567 </div>
1568 <# } #>
1569 <# if( '' !== settings.premium_banner_image.url ) { #>
1570 <img src="{{ image_url }}"/>
1571 <# } #>
1572 <# if( 'animation11' === settings.premium_banner_image_animation ) { #>
1573 <div class="premium-banner-gradient"></div>
1574 <# } #>
1575 <div class="premium-banner-ib-desc">
1576 <# if( 'animation7' === settings.premium_banner_image_animation ) { #>
1577 <div class="premium-banner-desc-centered">
1578 <# } #>
1579 <# if( '' !== title ) { #>
1580 <{{{titleTag}}} {{{ view.getRenderAttributeString('premium_banner_title') }}}>{{{ title }}}</{{{titleTag}}}>
1581 <# } #>
1582 <# if( '' !== settings.premium_banner_description ) { #>
1583 <div {{{ view.getRenderAttributeString( 'premium_banner_description' ) }}}>{{{ settings.premium_banner_description }}}</div>
1584 <# } #>
1585 <# if( 'yes' === linkSwitcher && '' !== readMore ) {
1586
1587 var btnClass = '';
1588
1589 if ( 'none' === settings.premium_button_hover_effect ) {
1590 btnClass = 'premium-button-none';
1591 } else if ( 'style1' === settings.premium_button_hover_effect ) {
1592 btnClass = 'premium-button-style1-' + settings.premium_button_style1_dir;
1593 } else if ( 'style2' === settings.premium_button_hover_effect ) {
1594 btnClass = 'premium-button-style2-' + settings.premium_button_style2_dir;
1595 } else if ( 'style5' === settings.premium_button_hover_effect ) {
1596 btnClass = 'premium-button-style5-' + settings.premium_button_style5_dir;
1597 } else if ( 'style6' === settings.premium_button_hover_effect ) {
1598 btnClass = 'premium-button-style6';
1599 } else if ( 'style7' === settings.premium_button_hover_effect ) {
1600 btnClass = 'premium-button-style7-' + settings.premium_button_style7_dir;
1601 } else if ( 'style8' === settings.premium_button_hover_effect ) {
1602 btnClass = 'premium-button-' + settings.underline_style;
1603
1604 var btnSVG = '';
1605 switch ( settings.underline_style ) {
1606 case 'line1':
1607 btnSVG = '<div class="premium-btn-line-wrap"><svg class="premium-btn-svg" aria-hidden="true" width="100%" height="9" viewBox="0 0 101 9"><path d="M.426 1.973C4.144 1.567 17.77-.514 21.443 1.48 24.296 3.026 24.844 4.627 27.5 7c3.075 2.748 6.642-4.141 10.066-4.688 7.517-1.2 13.237 5.425 17.59 2.745C58.5 3 60.464-1.786 66 2c1.996 1.365 3.174 3.737 5.286 4.41 5.423 1.727 25.34-7.981 29.14-1.294" pathLength="1"></path></svg></div>';
1608 break;
1609
1610 case 'line3':
1611 btnSVG = '<div class="premium-btn-line-wrap"><svg class="premium-btn-svg" aria-hidden="true" width="100%" height="18" viewBox="0 0 59 18"><path d="M.945.149C12.3 16.142 43.573 22.572 58.785 10.842" pathLength="1"></path></svg></div>';
1612 break;
1613
1614 case 'line4':
1615 btnSVG = '<svg class="premium-btn-svg" aria-hidden="true" width="300%" height="100%" viewBox="0 0 1200 60" preserveAspectRatio="none"><path d="M0,56.5c0,0,298.666,0,399.333,0C448.336,56.5,513.994,46,597,46c77.327,0,135,10.5,200.999,10.5c95.996,0,402.001,0,402.001,0"></path></svg>';
1616 break;
1617
1618 default:
1619 break;
1620 }
1621
1622 }
1623
1624 btnClass = 'premium-button-' + settings.premium_button_hover_effect + ' ' + btnClass;
1625
1626 view.addRenderAttribute( 'button', {
1627 'class': [
1628 'premium-banner-link',
1629 btnClass,
1630 ],
1631 'href': bannerUrl,
1632 'data-text': readMore,
1633 });
1634
1635 #>
1636 <div class="premium-banner-read-more">
1637 <a {{{ view.getRenderAttributeString('button') }}}>
1638 <div class="premium-button-text-icon-wrapper">
1639 <span>{{{ readMore }}}</span>
1640 </div>
1641
1642 <# if ( 'style6' === settings.premium_button_hover_effect && 'yes' === settings.mouse_detect ) { #>
1643 <span class="premium-button-style6-bg"></span>
1644 <# } #>
1645
1646 <# if( 'style8' === settings.premium_button_hover_effect ) { #>
1647 {{{ btnSVG }}}
1648 <# } #>
1649
1650 </a>
1651 </div>
1652 <# } #>
1653 <# if( 'animation7' === settings.premium_banner_image_animation ) { #>
1654 </div>
1655 <# } #>
1656 </div>
1657 <# if( 'yes' === settings.premium_banner_link_url_switch && ( '' !== settings.premium_banner_image_custom_link.url || '' !== settings.premium_banner_image_existing_page_link ) ) {
1658
1659 view.addRenderAttribute( 'banner_link', {
1660 'class': 'premium-banner-ib-link',
1661 'href': bannerLink,
1662 });
1663
1664 #>
1665 <a {{{ view.getRenderAttributeString('banner_link') }}}></a>
1666 <# } #>
1667 </div>
1668 <?php
1669 }
1670 }
1671