Version Description
- Tweak: CSS files loaded only when required to enhance plugin performance.
- Tweak: Unnecessary functions removed from Banner, Dual Heading and Title widgets to enhance performance.
Download this release
Release Info
Developer | leap13 |
Plugin | Premium Addons for Elementor |
Version | 2.9.0 |
Comparing to | |
See all releases |
Code changes from version 2.8.9 to 2.9.0
- admin/settings/version-control.php +1 -1
- assets/css/ajax-loader.gif +0 -0
- assets/css/premium-addons.css +1 -0
- assets/images/premium-addons-logo.png +0 -0
- includes/class-addons-integration.php +45 -17
- premium-addons-for-elementor.php +3 -3
- readme.txt +7 -2
- widgets/premium-banner.php +157 -197
- widgets/premium-dual-header.php +335 -344
- widgets/premium-grid.php +7 -1
- widgets/premium-title.php +388 -383
admin/settings/version-control.php
CHANGED
@@ -79,7 +79,7 @@ class PA_Version_Control {
|
|
79 |
<tr class="pa-roll-row">
|
80 |
<th>Rollback Version</th>
|
81 |
<td>
|
82 |
-
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.8.
|
83 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
84 |
</td>
|
85 |
</tr>
|
79 |
<tr class="pa-roll-row">
|
80 |
<th>Rollback Version</th>
|
81 |
<td>
|
82 |
+
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.8.9</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
|
83 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
84 |
</td>
|
85 |
</tr>
|
assets/css/ajax-loader.gif
DELETED
Binary file
|
assets/css/premium-addons.css
CHANGED
@@ -1238,6 +1238,7 @@ button.premium-modal-box-modal-close {
|
|
1238 |
/* prevent Scroll on body */
|
1239 |
.premium-modal-open {
|
1240 |
overflow: hidden;
|
|
|
1241 |
}
|
1242 |
@media (min-width:768px) {
|
1243 |
.premium-modal-box-modal-dialog {
|
1238 |
/* prevent Scroll on body */
|
1239 |
.premium-modal-open {
|
1240 |
overflow: hidden;
|
1241 |
+
height: 100vh;
|
1242 |
}
|
1243 |
@media (min-width:768px) {
|
1244 |
.premium-modal-box-modal-dialog {
|
assets/images/premium-addons-logo.png
DELETED
Binary file
|
includes/class-addons-integration.php
CHANGED
@@ -14,15 +14,20 @@ class Premium_Addons_Integration {
|
|
14 |
* @return void
|
15 |
*/
|
16 |
public function __construct() {
|
|
|
17 |
add_action( 'elementor/editor/before_enqueue_styles', array( $this, 'premium_font_setup' ) );
|
18 |
-
|
19 |
-
add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'premium_required_assets' ) );
|
20 |
|
21 |
add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_widgets_area' ) );
|
22 |
|
23 |
-
add_action(
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
add_action('elementor/
|
|
|
|
|
26 |
|
27 |
add_action('wp_enqueue_scripts', array($this, 'premium_maps_required_script'));
|
28 |
}
|
@@ -38,14 +43,44 @@ class Premium_Addons_Integration {
|
|
38 |
'premium-addons-font',
|
39 |
PREMIUM_ADDONS_URL . 'admin/assets/pa-elements-font/css/pa-elements.css'
|
40 |
);
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
44 |
-
*
|
45 |
-
* @since
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
* @access public
|
47 |
*/
|
48 |
-
public function
|
|
|
49 |
wp_enqueue_style(
|
50 |
'premium-addons',
|
51 |
PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css',
|
@@ -54,11 +89,6 @@ class Premium_Addons_Integration {
|
|
54 |
'all'
|
55 |
);
|
56 |
|
57 |
-
$check_grid_active = PA_admin_settings::get_enabled_keys()['premium-grid'];
|
58 |
-
if( $check_grid_active ){
|
59 |
-
wp_enqueue_style('pa-prettyphoto', PREMIUM_ADDONS_URL . 'assets/css/prettyphoto.css', array(), PREMIUM_ADDONS_VERSION, 'all');
|
60 |
-
}
|
61 |
-
|
62 |
}
|
63 |
|
64 |
/** Load widgets require function
|
@@ -94,20 +124,18 @@ class Premium_Addons_Integration {
|
|
94 |
* @since 1.0.0
|
95 |
* @access public
|
96 |
*/
|
97 |
-
public function
|
98 |
|
99 |
$check_component_active = PA_admin_settings::get_enabled_keys();
|
100 |
wp_register_script('waypoints-js', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
101 |
-
if ( $check_component_active['premium-progressbar'] || $check_component_active['premium-videobox'] || $check_component_active['premium-grid'] || $check_component_active['premium-fancytext'] || $check_component_active['premium-countdown'] || $check_component_active['premium-carousel'] || $check_component_active['premium-banner'] || $check_component_active['premium-maps'] || $check_component_active['premium-modalbox'] || $check_component_active['premium-blog'] || $check_component_active['premium-counter'] ) {
|
102 |
|
103 |
-
|
104 |
-
}
|
105 |
|
106 |
if ( $check_component_active['premium-counter'] ) {
|
107 |
wp_register_script('counter-up-js', PREMIUM_ADDONS_URL . 'assets/js/lib/countUpmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
108 |
}
|
109 |
|
110 |
-
if ( $check_component_active['premium-grid']) {
|
111 |
wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
112 |
wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
113 |
}
|
14 |
* @return void
|
15 |
*/
|
16 |
public function __construct() {
|
17 |
+
|
18 |
add_action( 'elementor/editor/before_enqueue_styles', array( $this, 'premium_font_setup' ) );
|
|
|
|
|
19 |
|
20 |
add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_widgets_area' ) );
|
21 |
|
22 |
+
add_action('elementor/editor/before_enqueue_scripts', array( $this,'premium_maps_get_address') );
|
23 |
+
|
24 |
+
add_action( 'elementor/preview/enqueue_styles', array( $this, 'premium_enqueue_preview_styles' ) );
|
25 |
+
|
26 |
+
add_action( 'elementor/frontend/after_register_styles', array( $this, 'premium_register_frontend_styles' ) );
|
27 |
|
28 |
+
add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'premium_enqueue_frontend_styles' ) );
|
29 |
+
|
30 |
+
add_action( 'elementor/frontend/after_register_scripts', array( $this, 'premium_register_frontend_scripts' ) );
|
31 |
|
32 |
add_action('wp_enqueue_scripts', array($this, 'premium_maps_required_script'));
|
33 |
}
|
43 |
'premium-addons-font',
|
44 |
PREMIUM_ADDONS_URL . 'admin/assets/pa-elements-font/css/pa-elements.css'
|
45 |
);
|
46 |
+
|
47 |
}
|
48 |
|
49 |
/**
|
50 |
+
* Register Frontend CSS files
|
51 |
+
* @since 2.9.0
|
52 |
+
* @access public
|
53 |
+
*/
|
54 |
+
public function premium_register_frontend_styles() {
|
55 |
+
|
56 |
+
wp_register_style(
|
57 |
+
'pa-prettyphoto',
|
58 |
+
PREMIUM_ADDONS_URL . 'assets/css/prettyphoto.css',
|
59 |
+
array(),
|
60 |
+
PREMIUM_ADDONS_VERSION,
|
61 |
+
'all'
|
62 |
+
);
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Enqueue Preview CSS files
|
68 |
+
* @since 2.9.0
|
69 |
+
* @access public
|
70 |
+
*/
|
71 |
+
public function premium_enqueue_preview_styles() {
|
72 |
+
|
73 |
+
wp_enqueue_style('pa-prettyphoto');
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Enqueue Widgets` CSS file
|
79 |
+
* @since 2.9.0
|
80 |
* @access public
|
81 |
*/
|
82 |
+
public function premium_enqueue_frontend_styles() {
|
83 |
+
|
84 |
wp_enqueue_style(
|
85 |
'premium-addons',
|
86 |
PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css',
|
89 |
'all'
|
90 |
);
|
91 |
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
/** Load widgets require function
|
124 |
* @since 1.0.0
|
125 |
* @access public
|
126 |
*/
|
127 |
+
public function premium_register_frontend_scripts() {
|
128 |
|
129 |
$check_component_active = PA_admin_settings::get_enabled_keys();
|
130 |
wp_register_script('waypoints-js', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
|
|
131 |
|
132 |
+
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
|
|
133 |
|
134 |
if ( $check_component_active['premium-counter'] ) {
|
135 |
wp_register_script('counter-up-js', PREMIUM_ADDONS_URL . 'assets/js/lib/countUpmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
136 |
}
|
137 |
|
138 |
+
if ( $check_component_active['premium-grid'] ) {
|
139 |
wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
140 |
wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
141 |
}
|
premium-addons-for-elementor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
-
Version: 2.
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
@@ -22,12 +22,12 @@ if (! function_exists('add_action')) {
|
|
22 |
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
-
define('PREMIUM_ADDONS_VERSION', '2.
|
26 |
define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
|
27 |
define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
|
28 |
define('PREMIUM_ADDONS_FILE', __FILE__);
|
29 |
define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
|
30 |
-
define('PREMIUM_ADDONS_STABLE_VERSION', '2.8.
|
31 |
|
32 |
if( ! class_exists('Premium_Addons_Elementor') ) {
|
33 |
/*
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
+
Version: 2.9.0
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
22 |
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
+
define('PREMIUM_ADDONS_VERSION', '2.9.0');
|
26 |
define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
|
27 |
define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
|
28 |
define('PREMIUM_ADDONS_FILE', __FILE__);
|
29 |
define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
|
30 |
+
define('PREMIUM_ADDONS_STABLE_VERSION', '2.8.9');
|
31 |
|
32 |
if( ! class_exists('Premium_Addons_Elementor') ) {
|
33 |
/*
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: leap13
|
|
3 |
Tags: Elementor, Elementor Page Builder, Elements, Elementor Addons, Add-ons, page builder
|
4 |
Donate link: http://premiumaddons.com
|
5 |
Requires at least: 4.5
|
6 |
-
Tested up to: 5.0.
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 2.
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
@@ -137,6 +137,11 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
|
|
137 |
|
138 |
== Changelog ==
|
139 |
|
|
|
|
|
|
|
|
|
|
|
140 |
= 2.8.9 =
|
141 |
|
142 |
- Fixed: Notice: Undefined property: PremiumAddons\Plugin::$settings
|
3 |
Tags: Elementor, Elementor Page Builder, Elements, Elementor Addons, Add-ons, page builder
|
4 |
Donate link: http://premiumaddons.com
|
5 |
Requires at least: 4.5
|
6 |
+
Tested up to: 5.0.1
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 2.9.0
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
= 2.9.0 =
|
141 |
+
|
142 |
+
- Tweak: CSS files loaded only when required to enhance plugin performance.
|
143 |
+
- Tweak: Unnecessary functions removed from Banner, Dual Heading and Title widgets to enhance performance.
|
144 |
+
|
145 |
= 2.8.9 =
|
146 |
|
147 |
- Fixed: Notice: Undefined property: PremiumAddons\Plugin::$settings
|
widgets/premium-banner.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
<?php
|
|
|
2 |
namespace Elementor;
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
@@ -36,15 +37,13 @@ class Premium_Banner extends Widget_Base {
|
|
36 |
// This will controls the animation, colors and background, dimensions etc
|
37 |
protected function _register_controls() {
|
38 |
|
39 |
-
$this->start_controls_section(
|
40 |
-
'premium_banner_global_settings',
|
41 |
[
|
42 |
-
'label'
|
43 |
]
|
44 |
);
|
45 |
|
46 |
-
$this->add_control(
|
47 |
-
'premium_banner_image',
|
48 |
[
|
49 |
'label' => esc_html__( 'Upload Image', 'premium-addons-for-elementor' ),
|
50 |
'description' => esc_html__( 'Select an image for the Banner', 'premium-addons-for-elementor' ),
|
@@ -58,18 +57,16 @@ class Premium_Banner extends Widget_Base {
|
|
58 |
);
|
59 |
|
60 |
$this->add_control('premium_banner_link_url_switch',
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
|
67 |
-
$this->add_control(
|
68 |
-
'premium_banner_image_link_switcher',
|
69 |
[
|
70 |
'label' => esc_html__( 'Custom Link', 'premium-addons-for-elementor' ),
|
71 |
'type' => Controls_Manager::SWITCHER,
|
72 |
-
'default' => '',
|
73 |
'description' => esc_html__( 'Add a custom link to the banner', 'premium-addons-for-elementor' ),
|
74 |
'condition' => [
|
75 |
'premium_banner_link_url_switch' => 'yes',
|
@@ -77,63 +74,56 @@ class Premium_Banner extends Widget_Base {
|
|
77 |
]
|
78 |
);
|
79 |
|
80 |
-
$this->add_control(
|
81 |
-
'premium_banner_image_custom_link',
|
82 |
[
|
83 |
'label' => esc_html__( 'Set custom Link', 'premium-addons-for-elementor' ),
|
84 |
'type' => Controls_Manager::URL,
|
85 |
'description' => esc_html__( 'What custom link you want to set to banner?', 'premium-addons-for-elementor' ),
|
86 |
'condition' => [
|
87 |
'premium_banner_image_link_switcher' => 'yes',
|
88 |
-
'premium_banner_link_url_switch' => 'yes'
|
89 |
],
|
90 |
-
'show_external' => false
|
91 |
]
|
92 |
);
|
93 |
|
94 |
-
$this->add_control(
|
95 |
-
'premium_banner_image_existing_page_link',
|
96 |
[
|
97 |
'label' => esc_html__( 'Existing Page', 'premium-addons-for-elementor' ),
|
98 |
'type' => Controls_Manager::SELECT2,
|
99 |
'description' => esc_html__( 'Link the banner with an existing page', 'premium-addons-for-elementor' ),
|
100 |
'condition' => [
|
101 |
'premium_banner_image_link_switcher!' => 'yes',
|
102 |
-
'premium_banner_link_url_switch' => 'yes'
|
103 |
],
|
104 |
'multiple' => false,
|
105 |
'options' => $this->getTemplateInstance()->get_all_post()
|
106 |
]
|
107 |
);
|
108 |
|
109 |
-
$this->add_control(
|
110 |
-
'premium_banner_image_link_open_new_tab',
|
111 |
[
|
112 |
'label' => esc_html__( 'New Tab', 'premium-addons-for-elementor' ),
|
113 |
'type' => Controls_Manager::SWITCHER,
|
114 |
-
'default' => '',
|
115 |
'description' => esc_html__( 'Choose if you want the link be opened in a new tab or not', 'premium-addons-for-elementor' ),
|
116 |
'condition' => [
|
117 |
-
'premium_banner_link_url_switch' => 'yes'
|
118 |
-
]
|
119 |
]
|
120 |
);
|
121 |
|
122 |
-
$this->add_control(
|
123 |
-
'premium_banner_image_link_add_nofollow',
|
124 |
[
|
125 |
'label' => esc_html__( 'Nofollow Option', 'premium-addons-for-elementor' ),
|
126 |
'type' => Controls_Manager::SWITCHER,
|
127 |
-
'default' => '',
|
128 |
'description' => esc_html__('if you choose yes, the link will not be counted in search engines', 'premium-addons-for-elementor' ),
|
129 |
'condition' => [
|
130 |
-
'premium_banner_link_url_switch' => 'yes'
|
131 |
-
]
|
132 |
]
|
133 |
);
|
134 |
|
135 |
-
$this->add_control(
|
136 |
-
'premium_banner_image_animation',
|
137 |
[
|
138 |
'label' => esc_html__( 'Effect', 'premium-addons-for-elementor' ),
|
139 |
'type' => Controls_Manager::SELECT,
|
@@ -150,52 +140,46 @@ class Premium_Banner extends Widget_Base {
|
|
150 |
]
|
151 |
);
|
152 |
|
153 |
-
$this->add_control(
|
154 |
-
'premium_banner_active',
|
155 |
[
|
156 |
'label' => esc_html__( 'Always Hovered', 'premium-addons-for-elementor' ),
|
157 |
'type' => Controls_Manager::SWITCHER,
|
158 |
-
'description' => esc_html__( 'Choose if you want the effect to be always triggered', 'premium-addons-for-elementor' )
|
159 |
-
|
160 |
]
|
161 |
);
|
162 |
|
163 |
-
$this->add_control(
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
'
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
);
|
181 |
|
182 |
-
$this->add_control(
|
183 |
-
'premium_banner_height',
|
184 |
[
|
185 |
'label' => esc_html__( 'Height', 'premium-addons-for-elementor' ),
|
186 |
'type' => Controls_Manager::SELECT,
|
187 |
'options' => [
|
188 |
'default' => 'Default',
|
189 |
-
'custom' => 'Custom'
|
190 |
],
|
191 |
'default' => 'default',
|
192 |
-
'description' => esc_html__( 'Choose if you want to set a custom height for the banner or keep it as it is', 'premium-addons-for-elementor' )
|
193 |
-
|
194 |
]
|
195 |
);
|
196 |
|
197 |
-
$this->add_responsive_control(
|
198 |
-
'premium_banner_custom_height',
|
199 |
[
|
200 |
'label' => esc_html__( 'Min Height', 'premium-addons-for-elementor' ),
|
201 |
'type' => Controls_Manager::NUMBER,
|
@@ -209,8 +193,7 @@ class Premium_Banner extends Widget_Base {
|
|
209 |
]
|
210 |
);
|
211 |
|
212 |
-
$this->add_responsive_control(
|
213 |
-
'premium_banner_img_vertical_align',
|
214 |
[
|
215 |
'label' => esc_html__( 'Vertical Align', 'premium-addons-for-elementor' ),
|
216 |
'type' => Controls_Manager::SELECT,
|
@@ -221,7 +204,7 @@ class Premium_Banner extends Widget_Base {
|
|
221 |
'flex-start' => esc_html__('Top', 'premium-addons-for-elementor'),
|
222 |
'center' => esc_html__('Middle', 'premium-addons-for-elementor'),
|
223 |
'flex-end' => esc_html__('Bottom', 'premium-addons-for-elementor'),
|
224 |
-
'inherit' => esc_html__('Full', 'premium-addons-for-elementor')
|
225 |
],
|
226 |
'default' => 'flex-start',
|
227 |
'selectors' => [
|
@@ -230,31 +213,27 @@ class Premium_Banner extends Widget_Base {
|
|
230 |
]
|
231 |
);
|
232 |
|
233 |
-
$this->add_control(
|
234 |
-
'premium_banner_extra_class',
|
235 |
[
|
236 |
'label' => esc_html__( 'Extra Class', 'premium-addons-for-elementor' ),
|
237 |
'type' => Controls_Manager::TEXT,
|
238 |
-
'description' => esc_html__( 'Add extra class name that will be applied to the banner, and you can use this class for your customizations.', 'premium-addons-for-elementor' )
|
239 |
]
|
240 |
);
|
241 |
|
242 |
|
243 |
$this->end_controls_section();
|
244 |
|
245 |
-
$this->start_controls_section(
|
246 |
-
'premium_banner_image_section',
|
247 |
[
|
248 |
'label' => esc_html__( 'Content', 'premium-addons-for-elementor' )
|
249 |
]
|
250 |
);
|
251 |
|
252 |
-
$this->add_control(
|
253 |
-
'premium_banner_title',
|
254 |
[
|
255 |
'label' => esc_html__( 'Title', 'premium-addons-for-elementor' ),
|
256 |
'placeholder' => esc_html__( 'Give a title to this banner', 'premium-addons-for-elementor' ),
|
257 |
-
'description' => esc_html__( 'Give a title to this banner', 'premium-addons-for-elementor' ),
|
258 |
'type' => Controls_Manager::TEXT,
|
259 |
'dynamic' => [ 'active' => true ],
|
260 |
'default' => esc_html__( 'Premium Banner', 'premium-addons-for-elementor' ),
|
@@ -262,36 +241,33 @@ class Premium_Banner extends Widget_Base {
|
|
262 |
]
|
263 |
);
|
264 |
|
265 |
-
$this->add_control(
|
266 |
-
'premium_banner_title_tag',
|
267 |
[
|
268 |
'label' => esc_html__( 'HTML Tag', 'premium-addons-for-elementor' ),
|
269 |
'description' => esc_html__( 'Select a heading tag for the title. Headings are defined with H1 to H6 tags', 'premium-addons-for-elementor' ),
|
270 |
'type' => Controls_Manager::SELECT,
|
271 |
'default' => 'h3',
|
272 |
'options' => [
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
'label_block' => true,
|
281 |
]
|
282 |
);
|
283 |
|
284 |
|
285 |
-
$this->add_control(
|
286 |
-
'premium_banner_description_hint',
|
287 |
[
|
288 |
'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
|
289 |
'type' => Controls_Manager::HEADING,
|
290 |
]
|
291 |
);
|
292 |
|
293 |
-
$this->add_control(
|
294 |
-
'premium_banner_description',
|
295 |
[
|
296 |
'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
|
297 |
'description' => esc_html__( 'Give the description to this banner', 'premium-addons-for-elementor' ),
|
@@ -302,8 +278,7 @@ class Premium_Banner extends Widget_Base {
|
|
302 |
]
|
303 |
);
|
304 |
|
305 |
-
$this->add_control(
|
306 |
-
'premium_banner_link_switcher',
|
307 |
[
|
308 |
'label' => esc_html__('Button', 'premium-addons-for-elementor'),
|
309 |
'type' => Controls_Manager::SWITCHER,
|
@@ -314,8 +289,7 @@ class Premium_Banner extends Widget_Base {
|
|
314 |
);
|
315 |
|
316 |
|
317 |
-
$this->add_control(
|
318 |
-
'premium_banner_more_text',
|
319 |
[
|
320 |
'label' => esc_html__('Text','premium-addons-for-elementor'),
|
321 |
'type' => Controls_Manager::TEXT,
|
@@ -328,8 +302,7 @@ class Premium_Banner extends Widget_Base {
|
|
328 |
]
|
329 |
);
|
330 |
|
331 |
-
$this->add_control(
|
332 |
-
'premium_banner_link_selection',
|
333 |
[
|
334 |
'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
|
335 |
'type' => Controls_Manager::SELECT,
|
@@ -346,14 +319,13 @@ class Premium_Banner extends Widget_Base {
|
|
346 |
]
|
347 |
);
|
348 |
|
349 |
-
$this->add_control(
|
350 |
-
'premium_banner_link',
|
351 |
[
|
352 |
'label' => esc_html__('Link', 'premium-addons-for-elementor'),
|
353 |
'type' => Controls_Manager::URL,
|
354 |
'default' => [
|
355 |
'url' => '#',
|
356 |
-
|
357 |
'placeholder' => 'https://premiumaddons.com/',
|
358 |
'label_block' => true,
|
359 |
'condition' => [
|
@@ -364,8 +336,7 @@ class Premium_Banner extends Widget_Base {
|
|
364 |
]
|
365 |
);
|
366 |
|
367 |
-
$this->add_control(
|
368 |
-
'premium_banner_existing_link',
|
369 |
[
|
370 |
'label' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
|
371 |
'type' => Controls_Manager::SELECT2,
|
@@ -376,7 +347,7 @@ class Premium_Banner extends Widget_Base {
|
|
376 |
'premium_banner_link_switcher' => 'yes',
|
377 |
'premium_banner_link_url_switch!' => 'yes'
|
378 |
],
|
379 |
-
'label_block' => true
|
380 |
]
|
381 |
);
|
382 |
|
@@ -405,21 +376,23 @@ class Premium_Banner extends Widget_Base {
|
|
405 |
'{{WRAPPER}} .premium_addons-banner-ib-title, {{WRAPPER}} .premium_addons-banner-ib-content, {{WRAPPER}} .premium-banner-read-more' => 'text-align: {{VALUE}};',
|
406 |
]
|
407 |
]
|
408 |
-
|
409 |
|
410 |
$this->end_controls_section();
|
411 |
|
412 |
$this->start_controls_section('premium_banner_responsive_section',
|
413 |
[
|
414 |
'label' => esc_html__('Responsive', 'premium-addons-for-elementor'),
|
415 |
-
]
|
|
|
416 |
|
417 |
$this->add_control('premium_banner_responsive_switcher',
|
418 |
[
|
419 |
'label' => esc_html__('Responsive Controls', 'premium-addons-for-elementor'),
|
420 |
'type' => Controls_Manager::SWITCHER,
|
421 |
'description' => esc_html__('If the description text is not suiting well on specific screen sizes, you may enable this option which will hide the description text.', 'premium-addons-for-elementor')
|
422 |
-
]
|
|
|
423 |
|
424 |
$this->add_control('premium_banner_min_range',
|
425 |
[
|
@@ -430,7 +403,8 @@ class Premium_Banner extends Widget_Base {
|
|
430 |
'condition' => [
|
431 |
'premium_banner_responsive_switcher' => 'yes'
|
432 |
],
|
433 |
-
]
|
|
|
434 |
|
435 |
$this->add_control('premium_banner_max_range',
|
436 |
[
|
@@ -441,79 +415,76 @@ class Premium_Banner extends Widget_Base {
|
|
441 |
'condition' => [
|
442 |
'premium_banner_responsive_switcher' => 'yes'
|
443 |
],
|
444 |
-
]
|
|
|
445 |
|
446 |
$this->end_controls_section();
|
447 |
|
448 |
-
$this->start_controls_section(
|
449 |
-
'premium_banner_opacity_style',
|
450 |
[
|
451 |
'label' => esc_html__( 'Image', 'premium-addons-for-elementor' ),
|
452 |
'tab' => Controls_Manager::TAB_STYLE
|
453 |
]
|
454 |
);
|
455 |
|
456 |
-
$this->add_control(
|
457 |
-
'premium_banner_image_bg_color',
|
458 |
[
|
459 |
'label' => esc_html__( 'Background Color', 'premium-addons-for-elementor' ),
|
460 |
'type' => Controls_Manager::COLOR,
|
461 |
'selectors' => [
|
462 |
-
'{{WRAPPER}} .premium_addons-banner-ib' => 'background: {{VALUE}};'
|
463 |
]
|
464 |
]
|
465 |
);
|
466 |
|
467 |
-
$this->add_control(
|
468 |
-
'premium_banner_image_opacity',
|
469 |
[
|
470 |
'label' => esc_html__( 'Image Opacity', 'premium-addons-for-elementor' ),
|
471 |
'type' => Controls_Manager::SLIDER,
|
472 |
'default' => [
|
473 |
-
'size' => 1
|
474 |
],
|
475 |
'range' => [
|
476 |
'px' => [
|
477 |
'min' => 0,
|
478 |
'max' => 1,
|
479 |
-
'step' => .1
|
480 |
]
|
481 |
],
|
482 |
'selectors' => [
|
483 |
-
'{{WRAPPER}} .premium_addons-banner-ib .premium_addons-banner-ib-img' => 'opacity: {{SIZE}};'
|
484 |
-
]
|
485 |
]
|
486 |
);
|
487 |
|
488 |
|
489 |
-
$this->add_control(
|
490 |
-
'premium_banner_image_hover_opacity',
|
491 |
[
|
492 |
'label' => esc_html__( 'Hover Opacity', 'premium-addons-for-elementor' ),
|
493 |
'type' => Controls_Manager::SLIDER,
|
494 |
'default' => [
|
495 |
-
'size' => 1
|
496 |
],
|
497 |
'range' => [
|
498 |
'px' => [
|
499 |
'min' => 0,
|
500 |
'max' => 1,
|
501 |
-
'step' => .1
|
502 |
]
|
503 |
],
|
504 |
'selectors' => [
|
505 |
-
'{{WRAPPER}} .premium_addons-banner-ib .premium_addons-banner-ib-img.active' => 'opacity: {{SIZE}};'
|
506 |
-
]
|
507 |
]
|
508 |
);
|
509 |
|
510 |
$this->add_group_control(
|
511 |
Group_Control_Border::get_type(),
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
|
518 |
$this->add_responsive_control(
|
519 |
'premium_banner_image_border_radius',
|
@@ -522,38 +493,35 @@ class Premium_Banner extends Widget_Base {
|
|
522 |
'type' => Controls_Manager::SLIDER,
|
523 |
'size_units' => ['px', '%' ,'em'],
|
524 |
'selectors' => [
|
525 |
-
'{{WRAPPER}} .premium_addons-banner-ib' => 'border-radius: {{SIZE}}{{UNIT}};'
|
526 |
-
]
|
527 |
]
|
528 |
);
|
529 |
|
530 |
$this->end_controls_section();
|
531 |
|
532 |
-
$this->start_controls_section(
|
533 |
-
'premium_banner_title_style',
|
534 |
[
|
535 |
'label' => esc_html__( 'Title', 'premium-addons-for-elementor' ),
|
536 |
'tab' => Controls_Manager::TAB_STYLE
|
537 |
]
|
538 |
);
|
539 |
|
540 |
-
$this->add_control(
|
541 |
-
'premium_banner_color_of_title',
|
542 |
[
|
543 |
'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
|
544 |
'type' => Controls_Manager::COLOR,
|
545 |
'scheme' => [
|
546 |
'type' => Scheme_Color::get_type(),
|
547 |
-
'value' => Scheme_Color::COLOR_1
|
548 |
],
|
549 |
'selectors' => [
|
550 |
'{{WRAPPER}} .premium_addons-banner-ib-desc .premium_banner_title' => 'color: {{VALUE}};'
|
551 |
-
]
|
552 |
]
|
553 |
);
|
554 |
|
555 |
-
$this->add_control(
|
556 |
-
'premium_banner_style2_title_bg',
|
557 |
[
|
558 |
'label' => esc_html__( 'Title Background', 'premium-addons-for-elementor' ),
|
559 |
'type' => Controls_Manager::COLOR,
|
@@ -564,7 +532,7 @@ class Premium_Banner extends Widget_Base {
|
|
564 |
],
|
565 |
'selectors' => [
|
566 |
'{{WRAPPER}} .premium_banner_animation5 .premium_addons-banner-ib-desc' => 'background: {{VALUE}};',
|
567 |
-
]
|
568 |
]
|
569 |
);
|
570 |
|
@@ -573,7 +541,7 @@ class Premium_Banner extends Widget_Base {
|
|
573 |
[
|
574 |
'name' => 'premium_banner_title_typography',
|
575 |
'selector' => '{{WRAPPER}} .premium_addons-banner-ib-desc .premium_banner_title',
|
576 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1
|
577 |
]
|
578 |
);
|
579 |
|
@@ -582,28 +550,26 @@ class Premium_Banner extends Widget_Base {
|
|
582 |
[
|
583 |
'label' => esc_html__('Shadow','premium-addons-for-elementor'),
|
584 |
'name' => 'premium_banner_title_shadow',
|
585 |
-
'selector' => '{{WRAPPER}} .premium_addons-banner-ib-desc .premium_banner_title'
|
586 |
]
|
587 |
-
|
588 |
|
589 |
$this->end_controls_section();
|
590 |
|
591 |
-
$this->start_controls_section(
|
592 |
-
'premium_banner_styles_of_content',
|
593 |
[
|
594 |
'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
|
595 |
'tab' => Controls_Manager::TAB_STYLE
|
596 |
]
|
597 |
);
|
598 |
|
599 |
-
$this->add_control(
|
600 |
-
'premium_banner_color_of_content',
|
601 |
[
|
602 |
'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
|
603 |
'type' => Controls_Manager::COLOR,
|
604 |
'scheme' => [
|
605 |
'type' => Scheme_Color::get_type(),
|
606 |
-
'value' => Scheme_Color::COLOR_3
|
607 |
],
|
608 |
'selectors' => [
|
609 |
'{{WRAPPER}} .premium_banner .premium_banner_content' => 'color: {{VALUE}};'
|
@@ -627,12 +593,11 @@ class Premium_Banner extends Widget_Base {
|
|
627 |
'name' => 'premium_banner_description_shadow',
|
628 |
'selector' => '{{WRAPPER}} .premium_banner .premium_banner_content',
|
629 |
]
|
630 |
-
|
631 |
|
632 |
$this->end_controls_section();
|
633 |
|
634 |
-
$this->start_controls_section(
|
635 |
-
'premium_banner_styles_of_button',
|
636 |
[
|
637 |
'label' => esc_html__( 'Button', 'premium-addons-for-elementor' ),
|
638 |
'tab' => Controls_Manager::TAB_STYLE,
|
@@ -643,23 +608,21 @@ class Premium_Banner extends Widget_Base {
|
|
643 |
]
|
644 |
);
|
645 |
|
646 |
-
$this->add_control(
|
647 |
-
'premium_banner_color_of_button',
|
648 |
[
|
649 |
'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
|
650 |
'type' => Controls_Manager::COLOR,
|
651 |
'scheme' => [
|
652 |
'type' => Scheme_Color::get_type(),
|
653 |
-
'value' => Scheme_Color::COLOR_3
|
654 |
],
|
655 |
'selectors' => [
|
656 |
'{{WRAPPER}} .premium_banner .premium-banner-link' => 'color: {{VALUE}};'
|
657 |
-
]
|
658 |
]
|
659 |
);
|
660 |
|
661 |
-
$this->add_control(
|
662 |
-
'premium_banner_hover_color_of_button',
|
663 |
[
|
664 |
'label' => esc_html__( 'Hover Color', 'premium-addons-for-elementor' ),
|
665 |
'type' => Controls_Manager::COLOR,
|
@@ -669,7 +632,7 @@ class Premium_Banner extends Widget_Base {
|
|
669 |
],
|
670 |
'selectors' => [
|
671 |
'{{WRAPPER}} .premium_banner .premium-banner-link:hover' => 'color: {{VALUE}};'
|
672 |
-
]
|
673 |
]
|
674 |
);
|
675 |
|
@@ -693,35 +656,34 @@ class Premium_Banner extends Widget_Base {
|
|
693 |
]
|
694 |
);
|
695 |
|
696 |
-
$this->add_control(
|
697 |
-
'premium_banner_hover_backcolor_of_button',
|
698 |
[
|
699 |
'label' => esc_html__( 'Hover Background Color', 'premium-addons-for-elementor' ),
|
700 |
'type' => Controls_Manager::COLOR,
|
701 |
'selectors' => [
|
702 |
'{{WRAPPER}} .premium_banner .premium-banner-link:hover' => 'background-color: {{VALUE}};'
|
703 |
-
]
|
704 |
]
|
705 |
);
|
706 |
|
707 |
$this->add_group_control(
|
708 |
Group_Control_Border::get_type(),
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
|
715 |
$this->add_control('premium_banner_button_border_radius',
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
]
|
723 |
]
|
724 |
-
|
|
|
725 |
|
726 |
$this->add_group_control(
|
727 |
Group_Control_Text_Shadow::get_type(),
|
@@ -730,17 +692,18 @@ class Premium_Banner extends Widget_Base {
|
|
730 |
'name' => 'premium_banner_button_shadow',
|
731 |
'selector' => '{{WRAPPER}} .premium_banner .premium-banner-link',
|
732 |
]
|
733 |
-
|
734 |
|
735 |
$this->add_responsive_control('premium_banner_button_padding',
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
|
|
744 |
|
745 |
$this->end_controls_section();
|
746 |
|
@@ -756,7 +719,7 @@ class Premium_Banner extends Widget_Base {
|
|
756 |
$title = $settings[ 'premium_banner_title' ];
|
757 |
$full_title = '<'. $title_tag . ' class="premium_addons-banner-ib-title ult-responsive premium_banner_title"><div '. $this->get_render_attribute_string('premium_banner_title') .'>' .$title. '</div></'.$title_tag.'>';
|
758 |
|
759 |
-
$link =
|
760 |
|
761 |
$link_title = $settings['premium_banner_image_link_switcher'] != 'yes' ? get_the_title( $settings['premium_banner_image_existing_page_link'] ) : '';
|
762 |
|
@@ -765,30 +728,28 @@ class Premium_Banner extends Widget_Base {
|
|
765 |
$full_link = '<a class="premium_addons-banner-ib-link" href="'. $link .'" title="'. $link_title .'"'. $open_new_tab . $nofollow_link . '></a>';
|
766 |
$animation_class = $settings['premium_banner_image_animation'];
|
767 |
$hover_class = ' ' . $settings['premium_banner_hover_effect'];
|
768 |
-
$extra_class =
|
769 |
$active = $settings['premium_banner_active'] == 'yes' ? ' active' : '';
|
770 |
$full_class = $animation_class.$hover_class.$extra_class.$active;
|
771 |
-
$min_size = $settings['premium_banner_min_range'].'px';
|
772 |
-
$max_size = $settings['premium_banner_max_range'].'px';
|
773 |
|
774 |
|
775 |
$banner_url = 'url' == $settings['premium_banner_link_selection'] ? $settings['premium_banner_link']['url'] : get_permalink($settings['premium_banner_existing_link']);
|
776 |
|
777 |
$alt = esc_attr( Control_Media::get_image_alt( $settings['premium_banner_image'] ) );
|
778 |
|
779 |
-
|
780 |
-
ob_start();
|
781 |
-
?>
|
782 |
<div class="premium_banner" id="premium-banner-<?php echo esc_attr($this->get_id()); ?>">
|
783 |
<div class="premium_addons-banner-ib <?php echo $full_class; ?> premium-banner-min-height">
|
784 |
-
<?php if(
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
<?php endif; ?>
|
793 |
<div class="premium_addons-banner-ib-desc">
|
794 |
<?php echo $full_title; ?>
|
@@ -804,7 +765,7 @@ class Premium_Banner extends Widget_Base {
|
|
804 |
<?php endif; ?>
|
805 |
</div>
|
806 |
<?php
|
807 |
-
if( $settings['premium_banner_link_url_switch'] == 'yes' && (!empty( $settings['premium_banner_image_custom_link']['url'] ) || !empty($settings['premium_banner_image_existing_page_link'] )) ) {
|
808 |
echo $full_link;
|
809 |
}
|
810 |
?>
|
@@ -820,8 +781,7 @@ class Premium_Banner extends Widget_Base {
|
|
820 |
<?php endif; ?>
|
821 |
|
822 |
</div>
|
823 |
-
<?php
|
824 |
-
echo $output;
|
825 |
}
|
826 |
|
827 |
protected function content_template() {
|
1 |
+
<?php
|
2 |
+
|
3 |
namespace Elementor;
|
4 |
|
5 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
37 |
// This will controls the animation, colors and background, dimensions etc
|
38 |
protected function _register_controls() {
|
39 |
|
40 |
+
$this->start_controls_section('premium_banner_global_settings',
|
|
|
41 |
[
|
42 |
+
'label' => esc_html__( 'Image', 'premium-addons-for-elementor' )
|
43 |
]
|
44 |
);
|
45 |
|
46 |
+
$this->add_control('premium_banner_image',
|
|
|
47 |
[
|
48 |
'label' => esc_html__( 'Upload Image', 'premium-addons-for-elementor' ),
|
49 |
'description' => esc_html__( 'Select an image for the Banner', 'premium-addons-for-elementor' ),
|
57 |
);
|
58 |
|
59 |
$this->add_control('premium_banner_link_url_switch',
|
60 |
+
[
|
61 |
+
'label' => esc_html__('Link', 'premium-addons-for-elementor'),
|
62 |
+
'type' => Controls_Manager::SWITCHER
|
63 |
+
]
|
64 |
+
);
|
65 |
|
66 |
+
$this->add_control('premium_banner_image_link_switcher',
|
|
|
67 |
[
|
68 |
'label' => esc_html__( 'Custom Link', 'premium-addons-for-elementor' ),
|
69 |
'type' => Controls_Manager::SWITCHER,
|
|
|
70 |
'description' => esc_html__( 'Add a custom link to the banner', 'premium-addons-for-elementor' ),
|
71 |
'condition' => [
|
72 |
'premium_banner_link_url_switch' => 'yes',
|
74 |
]
|
75 |
);
|
76 |
|
77 |
+
$this->add_control('premium_banner_image_custom_link',
|
|
|
78 |
[
|
79 |
'label' => esc_html__( 'Set custom Link', 'premium-addons-for-elementor' ),
|
80 |
'type' => Controls_Manager::URL,
|
81 |
'description' => esc_html__( 'What custom link you want to set to banner?', 'premium-addons-for-elementor' ),
|
82 |
'condition' => [
|
83 |
'premium_banner_image_link_switcher' => 'yes',
|
84 |
+
'premium_banner_link_url_switch' => 'yes'
|
85 |
],
|
86 |
+
'show_external' => false
|
87 |
]
|
88 |
);
|
89 |
|
90 |
+
$this->add_control('premium_banner_image_existing_page_link',
|
|
|
91 |
[
|
92 |
'label' => esc_html__( 'Existing Page', 'premium-addons-for-elementor' ),
|
93 |
'type' => Controls_Manager::SELECT2,
|
94 |
'description' => esc_html__( 'Link the banner with an existing page', 'premium-addons-for-elementor' ),
|
95 |
'condition' => [
|
96 |
'premium_banner_image_link_switcher!' => 'yes',
|
97 |
+
'premium_banner_link_url_switch' => 'yes'
|
98 |
],
|
99 |
'multiple' => false,
|
100 |
'options' => $this->getTemplateInstance()->get_all_post()
|
101 |
]
|
102 |
);
|
103 |
|
104 |
+
$this->add_control('premium_banner_image_link_open_new_tab',
|
|
|
105 |
[
|
106 |
'label' => esc_html__( 'New Tab', 'premium-addons-for-elementor' ),
|
107 |
'type' => Controls_Manager::SWITCHER,
|
|
|
108 |
'description' => esc_html__( 'Choose if you want the link be opened in a new tab or not', 'premium-addons-for-elementor' ),
|
109 |
'condition' => [
|
110 |
+
'premium_banner_link_url_switch' => 'yes'
|
111 |
+
]
|
112 |
]
|
113 |
);
|
114 |
|
115 |
+
$this->add_control('premium_banner_image_link_add_nofollow',
|
|
|
116 |
[
|
117 |
'label' => esc_html__( 'Nofollow Option', 'premium-addons-for-elementor' ),
|
118 |
'type' => Controls_Manager::SWITCHER,
|
|
|
119 |
'description' => esc_html__('if you choose yes, the link will not be counted in search engines', 'premium-addons-for-elementor' ),
|
120 |
'condition' => [
|
121 |
+
'premium_banner_link_url_switch' => 'yes'
|
122 |
+
]
|
123 |
]
|
124 |
);
|
125 |
|
126 |
+
$this->add_control('premium_banner_image_animation',
|
|
|
127 |
[
|
128 |
'label' => esc_html__( 'Effect', 'premium-addons-for-elementor' ),
|
129 |
'type' => Controls_Manager::SELECT,
|
140 |
]
|
141 |
);
|
142 |
|
143 |
+
$this->add_control('premium_banner_active',
|
|
|
144 |
[
|
145 |
'label' => esc_html__( 'Always Hovered', 'premium-addons-for-elementor' ),
|
146 |
'type' => Controls_Manager::SWITCHER,
|
147 |
+
'description' => esc_html__( 'Choose if you want the effect to be always triggered', 'premium-addons-for-elementor' )
|
|
|
148 |
]
|
149 |
);
|
150 |
|
151 |
+
$this->add_control('premium_banner_hover_effect',
|
152 |
+
[
|
153 |
+
'label' => esc_html__('Hover Effect', 'premium-addons-for-elementor'),
|
154 |
+
'type' => Controls_Manager::SELECT,
|
155 |
+
'options' => [
|
156 |
+
'none' => esc_html__('None', 'premium-addons-for-elementor'),
|
157 |
+
'zoomin' => esc_html__('Zoom In', 'premium-addons-for-elementor'),
|
158 |
+
'zoomout' => esc_html__('Zoom Out', 'premium-addons-for-elementor'),
|
159 |
+
'scale' => esc_html__('Scale', 'premium-addons-for-elementor'),
|
160 |
+
'grayscale' => esc_html__('Grayscale', 'premium-addons-for-elementor'),
|
161 |
+
'blur' => esc_html__('Blur', 'premium-addons-for-elementor'),
|
162 |
+
'bright' => esc_html__('Bright', 'premium-addons-for-elementor'),
|
163 |
+
'sepia' => esc_html__('Sepia', 'premium-addons-for-elementor'),
|
164 |
+
],
|
165 |
+
'default' => 'none',
|
166 |
+
]
|
167 |
+
);
|
|
|
168 |
|
169 |
+
$this->add_control('premium_banner_height',
|
|
|
170 |
[
|
171 |
'label' => esc_html__( 'Height', 'premium-addons-for-elementor' ),
|
172 |
'type' => Controls_Manager::SELECT,
|
173 |
'options' => [
|
174 |
'default' => 'Default',
|
175 |
+
'custom' => 'Custom'
|
176 |
],
|
177 |
'default' => 'default',
|
178 |
+
'description' => esc_html__( 'Choose if you want to set a custom height for the banner or keep it as it is', 'premium-addons-for-elementor' )
|
|
|
179 |
]
|
180 |
);
|
181 |
|
182 |
+
$this->add_responsive_control('premium_banner_custom_height',
|
|
|
183 |
[
|
184 |
'label' => esc_html__( 'Min Height', 'premium-addons-for-elementor' ),
|
185 |
'type' => Controls_Manager::NUMBER,
|
193 |
]
|
194 |
);
|
195 |
|
196 |
+
$this->add_responsive_control('premium_banner_img_vertical_align',
|
|
|
197 |
[
|
198 |
'label' => esc_html__( 'Vertical Align', 'premium-addons-for-elementor' ),
|
199 |
'type' => Controls_Manager::SELECT,
|
204 |
'flex-start' => esc_html__('Top', 'premium-addons-for-elementor'),
|
205 |
'center' => esc_html__('Middle', 'premium-addons-for-elementor'),
|
206 |
'flex-end' => esc_html__('Bottom', 'premium-addons-for-elementor'),
|
207 |
+
'inherit' => esc_html__('Full', 'premium-addons-for-elementor')
|
208 |
],
|
209 |
'default' => 'flex-start',
|
210 |
'selectors' => [
|
213 |
]
|
214 |
);
|
215 |
|
216 |
+
$this->add_control('premium_banner_extra_class',
|
|
|
217 |
[
|
218 |
'label' => esc_html__( 'Extra Class', 'premium-addons-for-elementor' ),
|
219 |
'type' => Controls_Manager::TEXT,
|
220 |
+
'description' => esc_html__( 'Add extra class name that will be applied to the banner, and you can use this class for your customizations.', 'premium-addons-for-elementor' )
|
221 |
]
|
222 |
);
|
223 |
|
224 |
|
225 |
$this->end_controls_section();
|
226 |
|
227 |
+
$this->start_controls_section('premium_banner_image_section',
|
|
|
228 |
[
|
229 |
'label' => esc_html__( 'Content', 'premium-addons-for-elementor' )
|
230 |
]
|
231 |
);
|
232 |
|
233 |
+
$this->add_control('premium_banner_title',
|
|
|
234 |
[
|
235 |
'label' => esc_html__( 'Title', 'premium-addons-for-elementor' ),
|
236 |
'placeholder' => esc_html__( 'Give a title to this banner', 'premium-addons-for-elementor' ),
|
|
|
237 |
'type' => Controls_Manager::TEXT,
|
238 |
'dynamic' => [ 'active' => true ],
|
239 |
'default' => esc_html__( 'Premium Banner', 'premium-addons-for-elementor' ),
|
241 |
]
|
242 |
);
|
243 |
|
244 |
+
$this->add_control('premium_banner_title_tag',
|
|
|
245 |
[
|
246 |
'label' => esc_html__( 'HTML Tag', 'premium-addons-for-elementor' ),
|
247 |
'description' => esc_html__( 'Select a heading tag for the title. Headings are defined with H1 to H6 tags', 'premium-addons-for-elementor' ),
|
248 |
'type' => Controls_Manager::SELECT,
|
249 |
'default' => 'h3',
|
250 |
'options' => [
|
251 |
+
'h1' => 'H1',
|
252 |
+
'h2' => 'H2',
|
253 |
+
'h3' => 'H3',
|
254 |
+
'h4' => 'H4',
|
255 |
+
'h5' => 'H5',
|
256 |
+
'h6' => 'H6',
|
257 |
+
],
|
258 |
'label_block' => true,
|
259 |
]
|
260 |
);
|
261 |
|
262 |
|
263 |
+
$this->add_control('premium_banner_description_hint',
|
|
|
264 |
[
|
265 |
'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
|
266 |
'type' => Controls_Manager::HEADING,
|
267 |
]
|
268 |
);
|
269 |
|
270 |
+
$this->add_control('premium_banner_description',
|
|
|
271 |
[
|
272 |
'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
|
273 |
'description' => esc_html__( 'Give the description to this banner', 'premium-addons-for-elementor' ),
|
278 |
]
|
279 |
);
|
280 |
|
281 |
+
$this->add_control('premium_banner_link_switcher',
|
|
|
282 |
[
|
283 |
'label' => esc_html__('Button', 'premium-addons-for-elementor'),
|
284 |
'type' => Controls_Manager::SWITCHER,
|
289 |
);
|
290 |
|
291 |
|
292 |
+
$this->add_control('premium_banner_more_text',
|
|
|
293 |
[
|
294 |
'label' => esc_html__('Text','premium-addons-for-elementor'),
|
295 |
'type' => Controls_Manager::TEXT,
|
302 |
]
|
303 |
);
|
304 |
|
305 |
+
$this->add_control('premium_banner_link_selection',
|
|
|
306 |
[
|
307 |
'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
|
308 |
'type' => Controls_Manager::SELECT,
|
319 |
]
|
320 |
);
|
321 |
|
322 |
+
$this->add_control('premium_banner_link',
|
|
|
323 |
[
|
324 |
'label' => esc_html__('Link', 'premium-addons-for-elementor'),
|
325 |
'type' => Controls_Manager::URL,
|
326 |
'default' => [
|
327 |
'url' => '#',
|
328 |
+
],
|
329 |
'placeholder' => 'https://premiumaddons.com/',
|
330 |
'label_block' => true,
|
331 |
'condition' => [
|
336 |
]
|
337 |
);
|
338 |
|
339 |
+
$this->add_control('premium_banner_existing_link',
|
|
|
340 |
[
|
341 |
'label' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
|
342 |
'type' => Controls_Manager::SELECT2,
|
347 |
'premium_banner_link_switcher' => 'yes',
|
348 |
'premium_banner_link_url_switch!' => 'yes'
|
349 |
],
|
350 |
+
'label_block' => true
|
351 |
]
|
352 |
);
|
353 |
|
376 |
'{{WRAPPER}} .premium_addons-banner-ib-title, {{WRAPPER}} .premium_addons-banner-ib-content, {{WRAPPER}} .premium-banner-read-more' => 'text-align: {{VALUE}};',
|
377 |
]
|
378 |
]
|
379 |
+
);
|
380 |
|
381 |
$this->end_controls_section();
|
382 |
|
383 |
$this->start_controls_section('premium_banner_responsive_section',
|
384 |
[
|
385 |
'label' => esc_html__('Responsive', 'premium-addons-for-elementor'),
|
386 |
+
]
|
387 |
+
);
|
388 |
|
389 |
$this->add_control('premium_banner_responsive_switcher',
|
390 |
[
|
391 |
'label' => esc_html__('Responsive Controls', 'premium-addons-for-elementor'),
|
392 |
'type' => Controls_Manager::SWITCHER,
|
393 |
'description' => esc_html__('If the description text is not suiting well on specific screen sizes, you may enable this option which will hide the description text.', 'premium-addons-for-elementor')
|
394 |
+
]
|
395 |
+
);
|
396 |
|
397 |
$this->add_control('premium_banner_min_range',
|
398 |
[
|
403 |
'condition' => [
|
404 |
'premium_banner_responsive_switcher' => 'yes'
|
405 |
],
|
406 |
+
]
|
407 |
+
);
|
408 |
|
409 |
$this->add_control('premium_banner_max_range',
|
410 |
[
|
415 |
'condition' => [
|
416 |
'premium_banner_responsive_switcher' => 'yes'
|
417 |
],
|
418 |
+
]
|
419 |
+
);
|
420 |
|
421 |
$this->end_controls_section();
|
422 |
|
423 |
+
$this->start_controls_section('premium_banner_opacity_style',
|
|
|
424 |
[
|
425 |
'label' => esc_html__( 'Image', 'premium-addons-for-elementor' ),
|
426 |
'tab' => Controls_Manager::TAB_STYLE
|
427 |
]
|
428 |
);
|
429 |
|
430 |
+
$this->add_control('premium_banner_image_bg_color',
|
|
|
431 |
[
|
432 |
'label' => esc_html__( 'Background Color', 'premium-addons-for-elementor' ),
|
433 |
'type' => Controls_Manager::COLOR,
|
434 |
'selectors' => [
|
435 |
+
'{{WRAPPER}} .premium_addons-banner-ib' => 'background: {{VALUE}};'
|
436 |
]
|
437 |
]
|
438 |
);
|
439 |
|
440 |
+
$this->add_control('premium_banner_image_opacity',
|
|
|
441 |
[
|
442 |
'label' => esc_html__( 'Image Opacity', 'premium-addons-for-elementor' ),
|
443 |
'type' => Controls_Manager::SLIDER,
|
444 |
'default' => [
|
445 |
+
'size' => 1
|
446 |
],
|
447 |
'range' => [
|
448 |
'px' => [
|
449 |
'min' => 0,
|
450 |
'max' => 1,
|
451 |
+
'step' => .1
|
452 |
]
|
453 |
],
|
454 |
'selectors' => [
|
455 |
+
'{{WRAPPER}} .premium_addons-banner-ib .premium_addons-banner-ib-img' => 'opacity: {{SIZE}};'
|
456 |
+
]
|
457 |
]
|
458 |
);
|
459 |
|
460 |
|
461 |
+
$this->add_control('premium_banner_image_hover_opacity',
|
|
|
462 |
[
|
463 |
'label' => esc_html__( 'Hover Opacity', 'premium-addons-for-elementor' ),
|
464 |
'type' => Controls_Manager::SLIDER,
|
465 |
'default' => [
|
466 |
+
'size' => 1
|
467 |
],
|
468 |
'range' => [
|
469 |
'px' => [
|
470 |
'min' => 0,
|
471 |
'max' => 1,
|
472 |
+
'step' => .1
|
473 |
]
|
474 |
],
|
475 |
'selectors' => [
|
476 |
+
'{{WRAPPER}} .premium_addons-banner-ib .premium_addons-banner-ib-img.active' => 'opacity: {{SIZE}};'
|
477 |
+
]
|
478 |
]
|
479 |
);
|
480 |
|
481 |
$this->add_group_control(
|
482 |
Group_Control_Border::get_type(),
|
483 |
+
[
|
484 |
+
'name' => 'premium_banner_image_border',
|
485 |
+
'selector' => '{{WRAPPER}} .premium_addons-banner-ib'
|
486 |
+
]
|
487 |
+
);
|
488 |
|
489 |
$this->add_responsive_control(
|
490 |
'premium_banner_image_border_radius',
|
493 |
'type' => Controls_Manager::SLIDER,
|
494 |
'size_units' => ['px', '%' ,'em'],
|
495 |
'selectors' => [
|
496 |
+
'{{WRAPPER}} .premium_addons-banner-ib' => 'border-radius: {{SIZE}}{{UNIT}};'
|
497 |
+
]
|
498 |
]
|
499 |
);
|
500 |
|
501 |
$this->end_controls_section();
|
502 |
|
503 |
+
$this->start_controls_section('premium_banner_title_style',
|
|
|
504 |
[
|
505 |
'label' => esc_html__( 'Title', 'premium-addons-for-elementor' ),
|
506 |
'tab' => Controls_Manager::TAB_STYLE
|
507 |
]
|
508 |
);
|
509 |
|
510 |
+
$this->add_control('premium_banner_color_of_title',
|
|
|
511 |
[
|
512 |
'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
|
513 |
'type' => Controls_Manager::COLOR,
|
514 |
'scheme' => [
|
515 |
'type' => Scheme_Color::get_type(),
|
516 |
+
'value' => Scheme_Color::COLOR_1
|
517 |
],
|
518 |
'selectors' => [
|
519 |
'{{WRAPPER}} .premium_addons-banner-ib-desc .premium_banner_title' => 'color: {{VALUE}};'
|
520 |
+
]
|
521 |
]
|
522 |
);
|
523 |
|
524 |
+
$this->add_control('premium_banner_style2_title_bg',
|
|
|
525 |
[
|
526 |
'label' => esc_html__( 'Title Background', 'premium-addons-for-elementor' ),
|
527 |
'type' => Controls_Manager::COLOR,
|
532 |
],
|
533 |
'selectors' => [
|
534 |
'{{WRAPPER}} .premium_banner_animation5 .premium_addons-banner-ib-desc' => 'background: {{VALUE}};',
|
535 |
+
]
|
536 |
]
|
537 |
);
|
538 |
|
541 |
[
|
542 |
'name' => 'premium_banner_title_typography',
|
543 |
'selector' => '{{WRAPPER}} .premium_addons-banner-ib-desc .premium_banner_title',
|
544 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1
|
545 |
]
|
546 |
);
|
547 |
|
550 |
[
|
551 |
'label' => esc_html__('Shadow','premium-addons-for-elementor'),
|
552 |
'name' => 'premium_banner_title_shadow',
|
553 |
+
'selector' => '{{WRAPPER}} .premium_addons-banner-ib-desc .premium_banner_title'
|
554 |
]
|
555 |
+
);
|
556 |
|
557 |
$this->end_controls_section();
|
558 |
|
559 |
+
$this->start_controls_section('premium_banner_styles_of_content',
|
|
|
560 |
[
|
561 |
'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
|
562 |
'tab' => Controls_Manager::TAB_STYLE
|
563 |
]
|
564 |
);
|
565 |
|
566 |
+
$this->add_control('premium_banner_color_of_content',
|
|
|
567 |
[
|
568 |
'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
|
569 |
'type' => Controls_Manager::COLOR,
|
570 |
'scheme' => [
|
571 |
'type' => Scheme_Color::get_type(),
|
572 |
+
'value' => Scheme_Color::COLOR_3
|
573 |
],
|
574 |
'selectors' => [
|
575 |
'{{WRAPPER}} .premium_banner .premium_banner_content' => 'color: {{VALUE}};'
|
593 |
'name' => 'premium_banner_description_shadow',
|
594 |
'selector' => '{{WRAPPER}} .premium_banner .premium_banner_content',
|
595 |
]
|
596 |
+
);
|
597 |
|
598 |
$this->end_controls_section();
|
599 |
|
600 |
+
$this->start_controls_section('premium_banner_styles_of_button',
|
|
|
601 |
[
|
602 |
'label' => esc_html__( 'Button', 'premium-addons-for-elementor' ),
|
603 |
'tab' => Controls_Manager::TAB_STYLE,
|
608 |
]
|
609 |
);
|
610 |
|
611 |
+
$this->add_control('premium_banner_color_of_button',
|
|
|
612 |
[
|
613 |
'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
|
614 |
'type' => Controls_Manager::COLOR,
|
615 |
'scheme' => [
|
616 |
'type' => Scheme_Color::get_type(),
|
617 |
+
'value' => Scheme_Color::COLOR_3
|
618 |
],
|
619 |
'selectors' => [
|
620 |
'{{WRAPPER}} .premium_banner .premium-banner-link' => 'color: {{VALUE}};'
|
621 |
+
]
|
622 |
]
|
623 |
);
|
624 |
|
625 |
+
$this->add_control('premium_banner_hover_color_of_button',
|
|
|
626 |
[
|
627 |
'label' => esc_html__( 'Hover Color', 'premium-addons-for-elementor' ),
|
628 |
'type' => Controls_Manager::COLOR,
|
632 |
],
|
633 |
'selectors' => [
|
634 |
'{{WRAPPER}} .premium_banner .premium-banner-link:hover' => 'color: {{VALUE}};'
|
635 |
+
]
|
636 |
]
|
637 |
);
|
638 |
|
656 |
]
|
657 |
);
|
658 |
|
659 |
+
$this->add_control('premium_banner_hover_backcolor_of_button',
|
|
|
660 |
[
|
661 |
'label' => esc_html__( 'Hover Background Color', 'premium-addons-for-elementor' ),
|
662 |
'type' => Controls_Manager::COLOR,
|
663 |
'selectors' => [
|
664 |
'{{WRAPPER}} .premium_banner .premium-banner-link:hover' => 'background-color: {{VALUE}};'
|
665 |
+
]
|
666 |
]
|
667 |
);
|
668 |
|
669 |
$this->add_group_control(
|
670 |
Group_Control_Border::get_type(),
|
671 |
+
[
|
672 |
+
'name' => 'premium_banner_button_border',
|
673 |
+
'selector' => '{{WRAPPER}} .premium_banner .premium-banner-link'
|
674 |
+
]
|
675 |
+
);
|
676 |
|
677 |
$this->add_control('premium_banner_button_border_radius',
|
678 |
+
[
|
679 |
+
'label' => esc_html__('Border Radius', 'premium-addons-for-elementor'),
|
680 |
+
'type' => Controls_Manager::SLIDER,
|
681 |
+
'size_units' => ['px', '%' ,'em'],
|
682 |
+
'selectors' => [
|
683 |
+
'{{WRAPPER}} .premium_banner .premium-banner-link' => 'border-radius: {{SIZE}}{{UNIT}};'
|
|
|
684 |
]
|
685 |
+
]
|
686 |
+
);
|
687 |
|
688 |
$this->add_group_control(
|
689 |
Group_Control_Text_Shadow::get_type(),
|
692 |
'name' => 'premium_banner_button_shadow',
|
693 |
'selector' => '{{WRAPPER}} .premium_banner .premium-banner-link',
|
694 |
]
|
695 |
+
);
|
696 |
|
697 |
$this->add_responsive_control('premium_banner_button_padding',
|
698 |
+
[
|
699 |
+
'label' => esc_html__('Padding', 'premium-addons-for-elementor'),
|
700 |
+
'type' => Controls_Manager::DIMENSIONS,
|
701 |
+
'size_units' => ['px', 'em', '%'],
|
702 |
+
'selectors' => [
|
703 |
+
'{{WRAPPER}} .premium_banner .premium-banner-link' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
|
704 |
+
]
|
705 |
+
]
|
706 |
+
);
|
707 |
|
708 |
$this->end_controls_section();
|
709 |
|
719 |
$title = $settings[ 'premium_banner_title' ];
|
720 |
$full_title = '<'. $title_tag . ' class="premium_addons-banner-ib-title ult-responsive premium_banner_title"><div '. $this->get_render_attribute_string('premium_banner_title') .'>' .$title. '</div></'.$title_tag.'>';
|
721 |
|
722 |
+
$link = 'yes' == $settings['premium_banner_image_link_switcher'] ? $settings['premium_banner_image_custom_link']['url'] : get_permalink( $settings['premium_banner_image_existing_page_link'] );
|
723 |
|
724 |
$link_title = $settings['premium_banner_image_link_switcher'] != 'yes' ? get_the_title( $settings['premium_banner_image_existing_page_link'] ) : '';
|
725 |
|
728 |
$full_link = '<a class="premium_addons-banner-ib-link" href="'. $link .'" title="'. $link_title .'"'. $open_new_tab . $nofollow_link . '></a>';
|
729 |
$animation_class = $settings['premium_banner_image_animation'];
|
730 |
$hover_class = ' ' . $settings['premium_banner_hover_effect'];
|
731 |
+
$extra_class = ! empty( $settings['premium_banner_extra_class'] ) ? ' '. $settings['premium_banner_extra_class'] : '';
|
732 |
$active = $settings['premium_banner_active'] == 'yes' ? ' active' : '';
|
733 |
$full_class = $animation_class.$hover_class.$extra_class.$active;
|
734 |
+
$min_size = $settings['premium_banner_min_range'] .'px';
|
735 |
+
$max_size = $settings['premium_banner_max_range'] .'px';
|
736 |
|
737 |
|
738 |
$banner_url = 'url' == $settings['premium_banner_link_selection'] ? $settings['premium_banner_link']['url'] : get_permalink($settings['premium_banner_existing_link']);
|
739 |
|
740 |
$alt = esc_attr( Control_Media::get_image_alt( $settings['premium_banner_image'] ) );
|
741 |
|
742 |
+
?>
|
|
|
|
|
743 |
<div class="premium_banner" id="premium-banner-<?php echo esc_attr($this->get_id()); ?>">
|
744 |
<div class="premium_addons-banner-ib <?php echo $full_class; ?> premium-banner-min-height">
|
745 |
+
<?php if( !empty( $settings['premium_banner_image']['url'] ) ) : ?>
|
746 |
+
<?php if( $settings['premium_banner_height'] == 'custom' ) : ?>
|
747 |
+
<div class="premium_addons-banner-img-wrap">
|
748 |
+
<?php endif; ?>
|
749 |
+
<img class="premium_addons-banner-ib-img" alt="<?php echo $alt; ?>" src="<?php echo $settings['premium_banner_image']['url']; ?>">
|
750 |
+
<?php if( $settings['premium_banner_height'] == 'custom' ): ?>
|
751 |
+
</div>
|
752 |
+
<?php endif; ?>
|
753 |
<?php endif; ?>
|
754 |
<div class="premium_addons-banner-ib-desc">
|
755 |
<?php echo $full_title; ?>
|
765 |
<?php endif; ?>
|
766 |
</div>
|
767 |
<?php
|
768 |
+
if( $settings['premium_banner_link_url_switch'] == 'yes' && ( ! empty( $settings['premium_banner_image_custom_link']['url'] ) || !empty( $settings['premium_banner_image_existing_page_link'] ) ) ) {
|
769 |
echo $full_link;
|
770 |
}
|
771 |
?>
|
781 |
<?php endif; ?>
|
782 |
|
783 |
</div>
|
784 |
+
<?php
|
|
|
785 |
}
|
786 |
|
787 |
protected function content_template() {
|
widgets/premium-dual-header.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
namespace Elementor;
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
@@ -33,449 +34,435 @@ class Premium_Dual_Header extends Widget_Base {
|
|
33 |
|
34 |
/*Start General Section*/
|
35 |
$this->start_controls_section('premium_dual_header_general_settings',
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
|
41 |
/*First Header*/
|
42 |
$this->add_control('premium_dual_header_first_header_text',
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
/* First Wrapper*/
|
53 |
-
/*$this->add_control('premium_dual_header_first_wrap',
|
54 |
-
[
|
55 |
-
'label' => esc_html__('Wrapper Tag', 'premium-addons-for-elementor'),
|
56 |
-
'type' => Controls_Manager::SELECT,
|
57 |
-
'default' => 'div',
|
58 |
-
'options' => [
|
59 |
-
'div' => 'div',
|
60 |
-
'span' => 'span',
|
61 |
-
],
|
62 |
-
'label_block' => true,
|
63 |
-
]
|
64 |
-
);*/
|
65 |
-
|
66 |
/*Second Header*/
|
67 |
$this->add_control('premium_dual_header_second_header_text',
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
|
77 |
/*Title Tag*/
|
78 |
$this->add_control('premium_dual_header_first_header_tag',
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
|
97 |
/*Text Align*/
|
98 |
$this->add_control('premium_dual_header_position',
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
|
114 |
$this->add_control('premium_dual_header_link_switcher',
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
|
122 |
$this->add_control('premium_dual_heading_link_selection',
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
|
138 |
$this->add_control('premium_dual_heading_link',
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
|
155 |
$this->add_control('premium_dual_heading_existing_link',
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
|
170 |
/*Text Align*/
|
171 |
$this->add_responsive_control('premium_dual_header_text_align',
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
],
|
188 |
-
],
|
189 |
-
'default' => 'center',
|
190 |
-
'selectors' => [
|
191 |
-
'{{WRAPPER}} .premium-dual-header-container' => 'text-align: {{VALUE}};',
|
192 |
-
],
|
193 |
]
|
194 |
-
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
/*End General Settings Section*/
|
197 |
$this->end_controls_section();
|
198 |
|
199 |
/*Start First Header Styling Section*/
|
200 |
$this->start_controls_section('premium_dual_header_first_style',
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
|
207 |
/*First Typography*/
|
208 |
$this->add_group_control(
|
209 |
Group_Control_Typography::get_type(),
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
|
217 |
$this->add_control('premium_dual_header_first_animated',
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
/*First Coloring Style*/
|
225 |
$this->add_control('premium_dual_header_first_back_clip',
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
/*First Color*/
|
240 |
$this->add_control('premium_dual_header_first_color',
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
|
257 |
/*First Background Color*/
|
258 |
$this->add_group_control(
|
259 |
Group_Control_Background::get_type(),
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
|
270 |
/*First Clip*/
|
271 |
$this->add_group_control(
|
272 |
Group_Control_Background::get_type(),
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
|
283 |
/*First Border*/
|
284 |
$this->add_group_control(
|
285 |
Group_Control_Border::get_type(),
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
|
292 |
/*First Border Radius*/
|
293 |
$this->add_control('premium_dual_header_first_border_radius',
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
|
304 |
/*First Text Shadow*/
|
305 |
$this->add_group_control(
|
306 |
Group_Control_Text_Shadow::get_type(),
|
307 |
[
|
308 |
-
'label'
|
309 |
-
'name'
|
310 |
-
'selector'
|
311 |
]
|
312 |
-
|
313 |
|
314 |
/*First Margin*/
|
315 |
$this->add_responsive_control('premium_dual_header_first_margin',
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
|
326 |
/*First Padding*/
|
327 |
$this->add_responsive_control('premium_dual_header_first_padding',
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
|
338 |
/*End First Header Styling Section*/
|
339 |
$this->end_controls_section();
|
340 |
|
341 |
/*Start First Header Styling Section*/
|
342 |
$this->start_controls_section('premium_dual_header_second_style',
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
|
349 |
/*Second Typography*/
|
350 |
$this->add_group_control(
|
351 |
Group_Control_Typography::get_type(),
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
|
359 |
$this->add_control('premium_dual_header_second_animated',
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
|
366 |
/*Second Coloring Style*/
|
367 |
$this->add_control('premium_dual_header_second_back_clip',
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
|
381 |
/*Second Color*/
|
382 |
$this->add_control('premium_dual_header_second_color',
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
|
399 |
/*Second Background Color*/
|
400 |
$this->add_group_control(
|
401 |
Group_Control_Background::get_type(),
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
|
412 |
/*Second Clip*/
|
413 |
$this->add_group_control(
|
414 |
Group_Control_Background::get_type(),
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
|
425 |
/*Second Border*/
|
426 |
$this->add_group_control(
|
427 |
Group_Control_Border::get_type(),
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
|
434 |
/*Second Border Radius*/
|
435 |
$this->add_control('premium_dual_header_second_border_radius',
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
]
|
443 |
]
|
444 |
-
|
|
|
445 |
|
446 |
/*Second Text Shadow*/
|
447 |
$this->add_group_control(
|
448 |
Group_Control_Text_Shadow::get_type(),
|
449 |
[
|
450 |
-
'label'
|
451 |
-
'name'
|
452 |
-
'selector'
|
453 |
]
|
454 |
-
|
455 |
|
456 |
/*Second Margin*/
|
457 |
$this->add_responsive_control('premium_dual_header_second_margin',
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
|
468 |
/*Second Padding*/
|
469 |
$this->add_responsive_control('premium_dual_header_second_padding',
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
|
480 |
/*End Second Header Styling Section*/
|
481 |
$this->end_controls_section();
|
@@ -510,22 +497,26 @@ class Premium_Dual_Header extends Widget_Base {
|
|
510 |
|
511 |
$full_first_title_tag = '<' . $first_title_tag . ' class="premium-dual-header-first-header ' . $first_clip . $first_grad . '"><span class="premium-dual-header-first-span">'. $first_title_text . '</span><span class="premium-dual-header-second-header ' . $second_clip . $second_grad . '">'. $second_title_text . '</span></' . $settings['premium_dual_header_first_header_tag'] . '> ';
|
512 |
|
513 |
-
|
514 |
-
|
515 |
-
|
|
|
516 |
$link = $settings['premium_dual_heading_link']['url'];
|
517 |
}
|
518 |
-
|
|
|
519 |
|
520 |
-
<div class="premium-dual-header-container">
|
521 |
-
|
522 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
<?php endif; ?>
|
524 |
-
|
525 |
-
<?php if( $settings['premium_dual_header_link_switcher'] == 'yes' && ( !empty( $settings['premium_dual_heading_link']['url'] ) || !empty( $settings['premium_dual_heading_existing_link'] ) ) ) : ?>
|
526 |
-
</a>
|
527 |
-
<?php endif; ?>
|
528 |
-
</div>
|
529 |
|
530 |
<?php
|
531 |
}
|
1 |
<?php
|
2 |
+
|
3 |
namespace Elementor;
|
4 |
|
5 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
34 |
|
35 |
/*Start General Section*/
|
36 |
$this->start_controls_section('premium_dual_header_general_settings',
|
37 |
+
[
|
38 |
+
'label' => esc_html__('Dual Heading', 'premium-addons-for-elementor')
|
39 |
+
]
|
40 |
+
);
|
41 |
|
42 |
/*First Header*/
|
43 |
$this->add_control('premium_dual_header_first_header_text',
|
44 |
+
[
|
45 |
+
'label' => esc_html__('First Heading', 'premium-addons-for-elementor'),
|
46 |
+
'type' => Controls_Manager::TEXT,
|
47 |
+
'dynamic' => [ 'active' => true ],
|
48 |
+
'default' => esc_html__('Premium', 'premium-addons-for-elementor'),
|
49 |
+
'label_block' => true,
|
50 |
+
]
|
51 |
+
);
|
52 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
/*Second Header*/
|
54 |
$this->add_control('premium_dual_header_second_header_text',
|
55 |
+
[
|
56 |
+
'label' => esc_html__('Second Heading', 'premium-addons-for-elementor'),
|
57 |
+
'type' => Controls_Manager::TEXT,
|
58 |
+
'dynamic' => [ 'active' => true ],
|
59 |
+
'default' => esc_html__('Addons', 'premium-addons-for-elementor'),
|
60 |
+
'label_block' => true,
|
61 |
+
]
|
62 |
+
);
|
63 |
|
64 |
/*Title Tag*/
|
65 |
$this->add_control('premium_dual_header_first_header_tag',
|
66 |
+
[
|
67 |
+
'label' => esc_html__('HTML Tag', 'premium-addons-for-elementor'),
|
68 |
+
'type' => Controls_Manager::SELECT,
|
69 |
+
'default' => 'h2',
|
70 |
+
'options' => [
|
71 |
+
'h1' => 'H1',
|
72 |
+
'h2' => 'H2',
|
73 |
+
'h3' => 'H3',
|
74 |
+
'h4' => 'H4',
|
75 |
+
'h5' => 'H5',
|
76 |
+
'h6' => 'H6',
|
77 |
+
'p' => 'p',
|
78 |
+
'span' => 'span',
|
79 |
+
],
|
80 |
+
'label_block' => true,
|
81 |
+
]
|
82 |
+
);
|
83 |
|
84 |
/*Text Align*/
|
85 |
$this->add_control('premium_dual_header_position',
|
86 |
+
[
|
87 |
+
'label' => esc_html__( 'Display', 'premium-addons-for-elementor' ),
|
88 |
+
'type' => Controls_Manager::SELECT,
|
89 |
+
'options' => [
|
90 |
+
'inline'=> esc_html__('Inline', 'premium-addons-for-elementor'),
|
91 |
+
'block' => esc_html__('Block', 'premium-addons-for-elementor'),
|
92 |
+
],
|
93 |
+
'default' => 'inline',
|
94 |
+
'selectors' => [
|
95 |
+
'{{WRAPPER}} .premium-dual-header-first-container span, {{WRAPPER}} .premium-dual-header-second-container' => 'display: {{VALUE}};',
|
96 |
+
],
|
97 |
+
'label_block' => true
|
98 |
+
]
|
99 |
+
);
|
100 |
|
101 |
$this->add_control('premium_dual_header_link_switcher',
|
102 |
+
[
|
103 |
+
'label' => esc_html__('Link', 'premium-addons-for-elementor'),
|
104 |
+
'type' => Controls_Manager::SWITCHER,
|
105 |
+
'description' => esc_html__('Enable or disable link','premium-addons-for-elementor'),
|
106 |
+
]
|
107 |
+
);
|
108 |
|
109 |
$this->add_control('premium_dual_heading_link_selection',
|
110 |
+
[
|
111 |
+
'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
|
112 |
+
'type' => Controls_Manager::SELECT,
|
113 |
+
'options' => [
|
114 |
+
'url' => esc_html__('URL', 'premium-addons-for-elementor'),
|
115 |
+
'link' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
|
116 |
+
],
|
117 |
+
'default' => 'url',
|
118 |
+
'label_block' => true,
|
119 |
+
'condition' => [
|
120 |
+
'premium_dual_header_link_switcher' => 'yes',
|
121 |
+
]
|
122 |
+
]
|
123 |
+
);
|
124 |
|
125 |
$this->add_control('premium_dual_heading_link',
|
126 |
+
[
|
127 |
+
'label' => esc_html__('Link', 'premium-addons-for-elementor'),
|
128 |
+
'type' => Controls_Manager::URL,
|
129 |
+
'default' => [
|
130 |
+
'url' => '#',
|
131 |
+
],
|
132 |
+
'placeholder' => 'https://premiumaddons.com/',
|
133 |
+
'label_block' => true,
|
134 |
+
'separator' => 'after',
|
135 |
+
'condition' => [
|
136 |
+
'premium_dual_header_link_switcher' => 'yes',
|
137 |
+
'premium_dual_heading_link_selection' => 'url'
|
138 |
+
]
|
139 |
+
]
|
140 |
+
);
|
141 |
|
142 |
$this->add_control('premium_dual_heading_existing_link',
|
143 |
+
[
|
144 |
+
'label' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
|
145 |
+
'type' => Controls_Manager::SELECT2,
|
146 |
+
'options' => $this->getTemplateInstance()->get_all_post(),
|
147 |
+
'condition' => [
|
148 |
+
'premium_dual_header_link_switcher' => 'yes',
|
149 |
+
'premium_dual_heading_link_selection' => 'link',
|
150 |
+
],
|
151 |
+
'multiple' => false,
|
152 |
+
'separator' => 'after',
|
153 |
+
'label_block' => true,
|
154 |
+
]
|
155 |
+
);
|
156 |
|
157 |
/*Text Align*/
|
158 |
$this->add_responsive_control('premium_dual_header_text_align',
|
159 |
+
[
|
160 |
+
'label' => esc_html__( 'Alignment', 'premium-addons-for-elementor' ),
|
161 |
+
'type' => Controls_Manager::CHOOSE,
|
162 |
+
'options' => [
|
163 |
+
'left' => [
|
164 |
+
'title'=> esc_html__( 'Left', 'premium-addons-for-elementor' ),
|
165 |
+
'icon' => 'fa fa-align-left',
|
166 |
+
],
|
167 |
+
'center' => [
|
168 |
+
'title'=> esc_html__( 'Center', 'premium-addons-for-elementor' ),
|
169 |
+
'icon' => 'fa fa-align-center',
|
170 |
+
],
|
171 |
+
'right' => [
|
172 |
+
'title'=> esc_html__( 'Right', 'premium-addons-for-elementor' ),
|
173 |
+
'icon' => 'fa fa-align-right'
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
]
|
175 |
+
],
|
176 |
+
'default' => 'center',
|
177 |
+
'selectors' => [
|
178 |
+
'{{WRAPPER}} .premium-dual-header-container' => 'text-align: {{VALUE}};'
|
179 |
+
],
|
180 |
+
]
|
181 |
+
);
|
182 |
+
|
183 |
/*End General Settings Section*/
|
184 |
$this->end_controls_section();
|
185 |
|
186 |
/*Start First Header Styling Section*/
|
187 |
$this->start_controls_section('premium_dual_header_first_style',
|
188 |
+
[
|
189 |
+
'label' => esc_html__('First Heading', 'premium-addons-for-elementor'),
|
190 |
+
'tab' => Controls_Manager::TAB_STYLE
|
191 |
+
]
|
192 |
+
);
|
193 |
|
194 |
/*First Typography*/
|
195 |
$this->add_group_control(
|
196 |
Group_Control_Typography::get_type(),
|
197 |
+
[
|
198 |
+
'name' => 'first_header_typography',
|
199 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
200 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-first-span'
|
201 |
+
]
|
202 |
+
);
|
203 |
|
204 |
$this->add_control('premium_dual_header_first_animated',
|
205 |
+
[
|
206 |
+
'label' => esc_html__('Animated Background', 'premium-addons-for-elementor'),
|
207 |
+
'type' => Controls_Manager::SWITCHER
|
208 |
+
]
|
209 |
+
);
|
210 |
+
|
211 |
/*First Coloring Style*/
|
212 |
$this->add_control('premium_dual_header_first_back_clip',
|
213 |
+
[
|
214 |
+
'label' => esc_html__('Background Style', 'premium-addons-for-elementor'),
|
215 |
+
'type' => Controls_Manager::SELECT,
|
216 |
+
'default' => 'color',
|
217 |
+
'description' => esc_html__('Choose ‘Normal’ style to put a background behind the text. Choose ‘Clipped’ style so the background will be clipped on the text.','premium-addons-for-elementor'),
|
218 |
+
'options' => [
|
219 |
+
'color' => esc_html__('Normal Background', 'premium-addons-for-elementor'),
|
220 |
+
'clipped' => esc_html__('Clipped Background', 'premium-addons-for-elementor'),
|
221 |
+
],
|
222 |
+
'label_block' => true
|
223 |
+
]
|
224 |
+
);
|
225 |
+
|
226 |
/*First Color*/
|
227 |
$this->add_control('premium_dual_header_first_color',
|
228 |
+
[
|
229 |
+
'label' => esc_html__('Text Color', 'premium-addons-for-elementor'),
|
230 |
+
'type' => Controls_Manager::COLOR,
|
231 |
+
'scheme' => [
|
232 |
+
'type' => Scheme_Color::get_type(),
|
233 |
+
'value' => Scheme_Color::COLOR_1
|
234 |
+
],
|
235 |
+
'condition' => [
|
236 |
+
'premium_dual_header_first_back_clip' => 'color'
|
237 |
+
],
|
238 |
+
'selectors' => [
|
239 |
+
'{{WRAPPER}} .premium-dual-header-first-span' => 'color: {{VALUE}};'
|
240 |
+
]
|
241 |
+
]
|
242 |
+
);
|
243 |
|
244 |
/*First Background Color*/
|
245 |
$this->add_group_control(
|
246 |
Group_Control_Background::get_type(),
|
247 |
+
[
|
248 |
+
'name' => 'premium_dual_header_first_background',
|
249 |
+
'types' => [ 'classic' , 'gradient' ],
|
250 |
+
'condition' => [
|
251 |
+
'premium_dual_header_first_back_clip' => 'color'
|
252 |
+
],
|
253 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-first-span'
|
254 |
+
]
|
255 |
+
);
|
256 |
|
257 |
/*First Clip*/
|
258 |
$this->add_group_control(
|
259 |
Group_Control_Background::get_type(),
|
260 |
+
[
|
261 |
+
'name' => 'premium_dual_header_first_clipped_background',
|
262 |
+
'types' => [ 'classic' , 'gradient' ],
|
263 |
+
'condition' => [
|
264 |
+
'premium_dual_header_first_back_clip' => 'clipped'
|
265 |
+
],
|
266 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-first-span'
|
267 |
+
]
|
268 |
+
);
|
269 |
|
270 |
/*First Border*/
|
271 |
$this->add_group_control(
|
272 |
Group_Control_Border::get_type(),
|
273 |
+
[
|
274 |
+
'name' => 'first_header_border',
|
275 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-first-span'
|
276 |
+
]
|
277 |
+
);
|
278 |
|
279 |
/*First Border Radius*/
|
280 |
$this->add_control('premium_dual_header_first_border_radius',
|
281 |
+
[
|
282 |
+
'label' => esc_html__('Border Radius', 'premium-addons-for-elementor'),
|
283 |
+
'type' => Controls_Manager::SLIDER,
|
284 |
+
'size_units' => ['px', '%', 'em'],
|
285 |
+
'selectors' => [
|
286 |
+
'{{WRAPPER}} .premium-dual-header-first-span' => 'border-radius: {{SIZE}}{{UNIT}};'
|
287 |
+
]
|
288 |
+
]
|
289 |
+
);
|
290 |
|
291 |
/*First Text Shadow*/
|
292 |
$this->add_group_control(
|
293 |
Group_Control_Text_Shadow::get_type(),
|
294 |
[
|
295 |
+
'label' => esc_html__('Shadow','premium-addons-for-elementor'),
|
296 |
+
'name' => 'premium_dual_header_first_text_shadow',
|
297 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-first-span'
|
298 |
]
|
299 |
+
);
|
300 |
|
301 |
/*First Margin*/
|
302 |
$this->add_responsive_control('premium_dual_header_first_margin',
|
303 |
+
[
|
304 |
+
'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
|
305 |
+
'type' => Controls_Manager::DIMENSIONS,
|
306 |
+
'size_units' => [ 'px', 'em', '%' ],
|
307 |
+
'selectors' => [
|
308 |
+
'{{WRAPPER}} .premium-dual-header-first-span' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}'
|
309 |
+
]
|
310 |
+
]
|
311 |
+
);
|
312 |
|
313 |
/*First Padding*/
|
314 |
$this->add_responsive_control('premium_dual_header_first_padding',
|
315 |
+
[
|
316 |
+
'label' => esc_html__('Padding', 'premium-addons-for-elementor'),
|
317 |
+
'type' => Controls_Manager::DIMENSIONS,
|
318 |
+
'size_units' => [ 'px', 'em', '%' ],
|
319 |
+
'selectors' => [
|
320 |
+
'{{WRAPPER}} .premium-dual-header-first-span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}'
|
321 |
+
]
|
322 |
+
]
|
323 |
+
);
|
324 |
|
325 |
/*End First Header Styling Section*/
|
326 |
$this->end_controls_section();
|
327 |
|
328 |
/*Start First Header Styling Section*/
|
329 |
$this->start_controls_section('premium_dual_header_second_style',
|
330 |
+
[
|
331 |
+
'label' => esc_html__('Second Heading', 'premium-addons-for-elementor'),
|
332 |
+
'tab' => Controls_Manager::TAB_STYLE
|
333 |
+
]
|
334 |
+
);
|
335 |
|
336 |
/*Second Typography*/
|
337 |
$this->add_group_control(
|
338 |
Group_Control_Typography::get_type(),
|
339 |
+
[
|
340 |
+
'name' => 'second_header_typography',
|
341 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
342 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-second-header'
|
343 |
+
]
|
344 |
+
);
|
345 |
|
346 |
$this->add_control('premium_dual_header_second_animated',
|
347 |
+
[
|
348 |
+
'label' => esc_html__('Animated Background', 'premium-addons-for-elementor'),
|
349 |
+
'type' => Controls_Manager::SWITCHER
|
350 |
+
]
|
351 |
+
);
|
352 |
|
353 |
/*Second Coloring Style*/
|
354 |
$this->add_control('premium_dual_header_second_back_clip',
|
355 |
+
[
|
356 |
+
'label' => esc_html__('Background Style', 'premium-addons-for-elementor'),
|
357 |
+
'type' => Controls_Manager::SELECT,
|
358 |
+
'default' => 'color',
|
359 |
+
'description' => esc_html__('Choose ‘Normal’ style to put a background behind the text. Choose ‘Clipped’ style so the background will be clipped on the text.','premium-addons-for-elementor'),
|
360 |
+
'options' => [
|
361 |
+
'color' => esc_html__('Normal Background', 'premium-addons-for-elementor'),
|
362 |
+
'clipped' => esc_html__('Clipped Background', 'premium-addons-for-elementor')
|
363 |
+
],
|
364 |
+
'label_block' => true
|
365 |
+
]
|
366 |
+
);
|
367 |
|
368 |
/*Second Color*/
|
369 |
$this->add_control('premium_dual_header_second_color',
|
370 |
+
[
|
371 |
+
'label' => esc_html__('Text Color', 'premium-addons-for-elementor'),
|
372 |
+
'type' => Controls_Manager::COLOR,
|
373 |
+
'scheme' => [
|
374 |
+
'type' => Scheme_Color::get_type(),
|
375 |
+
'value' => Scheme_Color::COLOR_2
|
376 |
+
],
|
377 |
+
'condition' => [
|
378 |
+
'premium_dual_header_second_back_clip' => 'color'
|
379 |
+
],
|
380 |
+
'selectors' => [
|
381 |
+
'{{WRAPPER}} .premium-dual-header-second-header' => 'color: {{VALUE}};'
|
382 |
+
]
|
383 |
+
]
|
384 |
+
);
|
385 |
|
386 |
/*Second Background Color*/
|
387 |
$this->add_group_control(
|
388 |
Group_Control_Background::get_type(),
|
389 |
+
[
|
390 |
+
'name' => 'premium_dual_header_second_background',
|
391 |
+
'types' => [ 'classic' , 'gradient' ],
|
392 |
+
'condition' => [
|
393 |
+
'premium_dual_header_second_back_clip' => 'color'
|
394 |
+
],
|
395 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-second-header'
|
396 |
+
]
|
397 |
+
);
|
398 |
|
399 |
/*Second Clip*/
|
400 |
$this->add_group_control(
|
401 |
Group_Control_Background::get_type(),
|
402 |
+
[
|
403 |
+
'name' => 'premium_dual_header_second_clipped_background',
|
404 |
+
'types' => [ 'classic' , 'gradient' ],
|
405 |
+
'condition' => [
|
406 |
+
'premium_dual_header_second_back_clip' => 'clipped'
|
407 |
+
],
|
408 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-second-header'
|
409 |
+
]
|
410 |
+
);
|
411 |
|
412 |
/*Second Border*/
|
413 |
$this->add_group_control(
|
414 |
Group_Control_Border::get_type(),
|
415 |
+
[
|
416 |
+
'name' => 'second_header_border',
|
417 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-second-header'
|
418 |
+
]
|
419 |
+
);
|
420 |
|
421 |
/*Second Border Radius*/
|
422 |
$this->add_control('premium_dual_header_second_border_radius',
|
423 |
+
[
|
424 |
+
'label' => esc_html__('Border Radius', 'premium-addons-for-elementor'),
|
425 |
+
'type' => Controls_Manager::SLIDER,
|
426 |
+
'size_units' => ['px', '%', 'em'],
|
427 |
+
'selectors' => [
|
428 |
+
'{{WRAPPER}} .premium-dual-header-second-header' => 'border-radius: {{SIZE}}{{UNIT}};'
|
|
|
429 |
]
|
430 |
+
]
|
431 |
+
);
|
432 |
|
433 |
/*Second Text Shadow*/
|
434 |
$this->add_group_control(
|
435 |
Group_Control_Text_Shadow::get_type(),
|
436 |
[
|
437 |
+
'label' => esc_html__('Shadow','premium-addons-for-elementor'),
|
438 |
+
'name' => 'premium_dual_header_second_text_shadow',
|
439 |
+
'selector' => '{{WRAPPER}} .premium-dual-header-second-header'
|
440 |
]
|
441 |
+
);
|
442 |
|
443 |
/*Second Margin*/
|
444 |
$this->add_responsive_control('premium_dual_header_second_margin',
|
445 |
+
[
|
446 |
+
'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
|
447 |
+
'type' => Controls_Manager::DIMENSIONS,
|
448 |
+
'size_units' => [ 'px', 'em', '%' ],
|
449 |
+
'selectors' => [
|
450 |
+
'{{WRAPPER}} .premium-dual-header-second-header' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}'
|
451 |
+
]
|
452 |
+
]
|
453 |
+
);
|
454 |
|
455 |
/*Second Padding*/
|
456 |
$this->add_responsive_control('premium_dual_header_second_padding',
|
457 |
+
[
|
458 |
+
'label' => esc_html__('Padding', 'premium-addons-for-elementor'),
|
459 |
+
'type' => Controls_Manager::DIMENSIONS,
|
460 |
+
'size_units' => [ 'px', 'em', '%' ],
|
461 |
+
'selectors' => [
|
462 |
+
'{{WRAPPER}} .premium-dual-header-second-header' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
463 |
+
]
|
464 |
+
]
|
465 |
+
);
|
466 |
|
467 |
/*End Second Header Styling Section*/
|
468 |
$this->end_controls_section();
|
497 |
|
498 |
$full_first_title_tag = '<' . $first_title_tag . ' class="premium-dual-header-first-header ' . $first_clip . $first_grad . '"><span class="premium-dual-header-first-span">'. $first_title_text . '</span><span class="premium-dual-header-second-header ' . $second_clip . $second_grad . '">'. $second_title_text . '</span></' . $settings['premium_dual_header_first_header_tag'] . '> ';
|
499 |
|
500 |
+
$link = '';
|
501 |
+
if( $settings['premium_dual_header_link_switcher'] == 'yes' && $settings['premium_dual_heading_link_selection'] == 'link' ) {
|
502 |
+
$link = get_permalink( $settings['premium_dual_heading_existing_link'] );
|
503 |
+
} elseif( $settings['premium_dual_header_link_switcher'] == 'yes' && $settings['premium_dual_heading_link_selection'] == 'url' ) {
|
504 |
$link = $settings['premium_dual_heading_link']['url'];
|
505 |
}
|
506 |
+
|
507 |
+
?>
|
508 |
|
509 |
+
<div class="premium-dual-header-container">
|
510 |
+
<?php if( ! empty ( $link ) ) : ?>
|
511 |
+
<a href="<?php echo esc_attr( $link ); ?>" <?php if( ! empty( $settings['premium_dual_heading_link']['is_external'] ) ) : ?> target="_blank" <?php endif; ?><?php if( ! empty( $settings['premium_dual_heading_link']['nofollow'] ) ) : ?> rel="nofollow" <?php endif; ?>>
|
512 |
+
<?php endif; ?>
|
513 |
+
<div class="premium-dual-header-first-container">
|
514 |
+
<?php echo $full_first_title_tag; ?>
|
515 |
+
</div>
|
516 |
+
<?php if( ! empty ( $link ) ) : ?>
|
517 |
+
</a>
|
518 |
<?php endif; ?>
|
519 |
+
</div>
|
|
|
|
|
|
|
|
|
520 |
|
521 |
<?php
|
522 |
}
|
widgets/premium-grid.php
CHANGED
@@ -22,12 +22,18 @@ class Premium_Grid extends Widget_Base {
|
|
22 |
return 'pa-grid-icon';
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
public function get_script_depends(){
|
26 |
return [
|
27 |
'prettyPhoto-js',
|
28 |
'isotope-js',
|
29 |
'premium-addons-js'
|
30 |
-
|
31 |
}
|
32 |
|
33 |
public function is_reload_preview_required(){
|
22 |
return 'pa-grid-icon';
|
23 |
}
|
24 |
|
25 |
+
public function get_style_depends(){
|
26 |
+
return [
|
27 |
+
'pa-prettyphoto',
|
28 |
+
];
|
29 |
+
}
|
30 |
+
|
31 |
public function get_script_depends(){
|
32 |
return [
|
33 |
'prettyPhoto-js',
|
34 |
'isotope-js',
|
35 |
'premium-addons-js'
|
36 |
+
];
|
37 |
}
|
38 |
|
39 |
public function is_reload_preview_required(){
|
widgets/premium-title.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
namespace Elementor;
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
@@ -26,276 +27,276 @@ class Premium_Title extends Widget_Base {
|
|
26 |
|
27 |
/* Start Title General Settings Section */
|
28 |
$this->start_controls_section('premium_title_content',
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
|
34 |
/*Title Text*/
|
35 |
$this->add_control('premium_title_text',
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
|
45 |
/*Title Style*/
|
46 |
$this->add_control('premium_title_style',
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
/*Icon Switcher*/
|
65 |
$this->add_control('premium_title_icon_switcher',
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
|
72 |
/*Icon*/
|
73 |
$this->add_control('premium_title_icon',
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
]
|
81 |
]
|
82 |
-
|
|
|
83 |
|
84 |
/*Title HTML TAG*/
|
85 |
$this->add_control('premium_title_tag',
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
|
101 |
/*Title Align*/
|
102 |
$this->add_responsive_control('premium_title_align',
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
],
|
111 |
-
'center' => [
|
112 |
-
'title'=> esc_html__( 'Center', 'premium-addons-for-elementor' ),
|
113 |
-
'icon' => 'fa fa-align-center',
|
114 |
-
],
|
115 |
-
'right' => [
|
116 |
-
'title'=> esc_html__( 'Right', 'premium-addons-for-elementor' ),
|
117 |
-
'icon' => 'fa fa-align-right',
|
118 |
-
],
|
119 |
],
|
120 |
-
'
|
121 |
-
|
122 |
-
'
|
123 |
],
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
|
128 |
|
129 |
/*Style 8*/
|
130 |
/*Strip Width*/
|
131 |
$this->add_control('premium_title_style7_strip_width',
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
],
|
147 |
]
|
148 |
-
|
|
|
149 |
|
150 |
/*Strip Height*/
|
151 |
$this->add_control('premium_title_style7_strip_height',
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
],
|
167 |
]
|
168 |
-
|
|
|
169 |
|
170 |
/*Strip Top Spacing*/
|
171 |
$this->add_control('premium_title_style7_strip_top_spacing',
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
|
186 |
/*Strip Bottom Spacing*/
|
187 |
$this->add_control('premium_title_style7_strip_bottom_spacing',
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
],
|
199 |
]
|
200 |
-
|
|
|
201 |
|
202 |
/*Title Align*/
|
203 |
$this->add_responsive_control('premium_title_style7_strip_align',
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
],
|
212 |
-
'none' => [
|
213 |
-
'title'=> esc_html__( 'Center', 'premium-addons-for-elementor' ),
|
214 |
-
'icon' => 'fa fa-align-center',
|
215 |
-
],
|
216 |
-
'right' => [
|
217 |
-
'title'=> esc_html__( 'Right', 'premium-addons-for-elementor' ),
|
218 |
-
'icon' => 'fa fa-align-right',
|
219 |
-
],
|
220 |
-
],
|
221 |
-
'default' => 'none',
|
222 |
-
'selectors' => [
|
223 |
-
'{{WRAPPER}} .premium-title-style7-strip:before' => 'float: {{VALUE}};',
|
224 |
],
|
225 |
-
'
|
226 |
-
'
|
227 |
-
|
228 |
-
|
229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
/*End Title General Settings Section*/
|
232 |
$this->end_controls_section();
|
233 |
|
234 |
/*Start Styling Section*/
|
235 |
$this->start_controls_section('premium_title_style_section',
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
|
242 |
/*Title Color*/
|
243 |
$this->add_control('premium_title_color',
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
|
257 |
|
258 |
/*Title Typography*/
|
259 |
$this->add_group_control(
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
|
268 |
/*Style 1*/
|
269 |
/*Style 1 Border*/
|
270 |
$this->add_group_control(
|
271 |
Group_Control_Border::get_type(),
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
|
281 |
/*Style 2*/
|
282 |
/*Background Color*/
|
283 |
$this->add_control('premium_title_style2_background_color',
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
|
300 |
/*Style 2*/
|
301 |
|
@@ -303,245 +304,243 @@ class Premium_Title extends Widget_Base {
|
|
303 |
/*Style 3*/
|
304 |
/*Background Color*/
|
305 |
$this->add_control('premium_title_style3_background_color',
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
|
322 |
|
323 |
/*Style 5*/
|
324 |
/*Header Line Color*/
|
325 |
$this->add_control('premium_title_style5_header_line_color',
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
|
342 |
/*Container Line Color*/
|
343 |
$this->add_group_control(
|
344 |
Group_Control_Border::get_type(),
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
],
|
351 |
]
|
352 |
-
|
|
|
353 |
|
354 |
/*Style 7*/
|
355 |
/*Header Line Color*/
|
356 |
$this->add_control('premium_title_style6_header_line_color',
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
|
373 |
/*Triangle Color*/
|
374 |
$this->add_control('premium_title_style6_triangle_color',
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
|
393 |
/*Strip Color*/
|
394 |
$this->add_control('premium_title_style7_strip_color',
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
|
411 |
/*Title Margin*/
|
412 |
$this->add_responsive_control('premium_title_margin',
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
]
|
420 |
]
|
421 |
-
|
|
|
422 |
|
423 |
/*Title Text Shadow*/
|
424 |
$this->add_group_control(
|
425 |
Group_Control_Text_Shadow::get_type(),
|
426 |
[
|
427 |
-
'label'
|
428 |
-
'name'
|
429 |
-
'selector'
|
430 |
]
|
431 |
-
|
432 |
|
433 |
/*End Title Style Section*/
|
434 |
$this->end_controls_section();
|
435 |
|
436 |
/*Start Icon Style Section*/
|
437 |
$this->start_controls_section('premium_title_icon_style_section',
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
]
|
444 |
]
|
445 |
-
|
|
|
446 |
|
447 |
/*Icon Color*/
|
448 |
$this->add_control('premium_title_icon_color',
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
|
462 |
/*Icon Size*/
|
463 |
$this->add_control('premium_title_icon_size',
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
|
474 |
/*Icon Background*/
|
475 |
$this->add_group_control(
|
476 |
Group_Control_Background::get_type(),
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
|
484 |
/*Icon Border*/
|
485 |
$this->add_group_control(
|
486 |
Group_Control_Border::get_type(),
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
|
493 |
/*Icon Border Radius*/
|
494 |
$this->add_control('premium_title_icon_border_radius',
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
|
505 |
/*Icon Margin*/
|
506 |
$this->add_responsive_control('premium_title_icon_margin',
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
|
517 |
/*Icon Padding*/
|
518 |
$this->add_responsive_control('premium_title_icon_padding',
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
|
529 |
/*Icon Text Shadow*/
|
530 |
$this->add_group_control(
|
531 |
Group_Control_Text_Shadow::get_type(),
|
532 |
[
|
533 |
-
'label'
|
534 |
-
'name'
|
535 |
-
'selector'
|
536 |
]
|
537 |
-
|
538 |
|
539 |
/*End Progress Bar Section*/
|
540 |
$this->end_controls_section();
|
541 |
|
542 |
}
|
543 |
|
544 |
-
protected function render(
|
545 |
// get our input from the widget settings.
|
546 |
$settings = $this->get_settings_for_display();
|
547 |
|
@@ -550,19 +549,25 @@ class Premium_Title extends Widget_Base {
|
|
550 |
$title_tag = $settings['premium_title_tag'];
|
551 |
|
552 |
$selected_style = $settings['premium_title_style'];
|
|
|
|
|
|
|
|
|
553 |
?>
|
554 |
|
555 |
-
<div
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
</
|
|
|
|
|
566 |
|
567 |
<?php
|
568 |
}
|
1 |
<?php
|
2 |
+
|
3 |
namespace Elementor;
|
4 |
|
5 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
27 |
|
28 |
/* Start Title General Settings Section */
|
29 |
$this->start_controls_section('premium_title_content',
|
30 |
+
[
|
31 |
+
'label' => esc_html__('Title', 'premium-addons-for-elementor'),
|
32 |
+
]
|
33 |
+
);
|
34 |
|
35 |
/*Title Text*/
|
36 |
$this->add_control('premium_title_text',
|
37 |
+
[
|
38 |
+
'label' => esc_html__('Title', 'premium-addons-for-elementor'),
|
39 |
+
'type' => Controls_Manager::TEXT,
|
40 |
+
'default' => esc_html__('Premium Title','premium-addons-for-elementor'),
|
41 |
+
'label_block' => true,
|
42 |
+
'dynamic' => [ 'active' => true ]
|
43 |
+
]
|
44 |
+
);
|
45 |
|
46 |
/*Title Style*/
|
47 |
$this->add_control('premium_title_style',
|
48 |
+
[
|
49 |
+
'label' => esc_html__('Style', 'premium-addons-for-elementor'),
|
50 |
+
'type' => Controls_Manager::SELECT,
|
51 |
+
'default' => 'style1',
|
52 |
+
'options' => [
|
53 |
+
'style1' => esc_html__('Style1'),
|
54 |
+
'style2' => esc_html__('Style2'),
|
55 |
+
'style3' => esc_html__('Style3'),
|
56 |
+
'style4' => esc_html__('Style4'),
|
57 |
+
'style5' => esc_html__('Style5'),
|
58 |
+
'style6' => esc_html__('Style6'),
|
59 |
+
'style7' => esc_html__('Style7'),
|
60 |
+
],
|
61 |
+
'label_block' => true,
|
62 |
+
]
|
63 |
+
);
|
64 |
|
65 |
/*Icon Switcher*/
|
66 |
$this->add_control('premium_title_icon_switcher',
|
67 |
+
[
|
68 |
+
'label' => esc_html__('Icon', 'premium-addons-for-elementor'),
|
69 |
+
'type' => Controls_Manager::SWITCHER,
|
70 |
+
]
|
71 |
+
);
|
72 |
|
73 |
/*Icon*/
|
74 |
$this->add_control('premium_title_icon',
|
75 |
+
[
|
76 |
+
'label' => esc_html__('Font Awesome Icon', 'premium-addons-for-elementor'),
|
77 |
+
'type' => Controls_Manager::ICON,
|
78 |
+
'label_block' => true,
|
79 |
+
'condition' => [
|
80 |
+
'premium_title_icon_switcher' => 'yes',
|
|
|
81 |
]
|
82 |
+
]
|
83 |
+
);
|
84 |
|
85 |
/*Title HTML TAG*/
|
86 |
$this->add_control('premium_title_tag',
|
87 |
+
[
|
88 |
+
'label' => esc_html__('HTML Tag', 'premium-addons-for-elementor'),
|
89 |
+
'type' => Controls_Manager::SELECT,
|
90 |
+
'default' => esc_html__('h2','premium-addons-for-elementor'),
|
91 |
+
'options' => [
|
92 |
+
'h1' => 'H1',
|
93 |
+
'h2' => 'H2',
|
94 |
+
'h3' => 'H3',
|
95 |
+
'h4' => 'H4',
|
96 |
+
'h5' => 'H5',
|
97 |
+
'h6' => 'H6',
|
98 |
+
],
|
99 |
+
]
|
100 |
+
);
|
101 |
|
102 |
/*Title Align*/
|
103 |
$this->add_responsive_control('premium_title_align',
|
104 |
+
[
|
105 |
+
'label' => esc_html__( 'Alignment', 'premium-addons-for-elementor' ),
|
106 |
+
'type' => Controls_Manager::CHOOSE,
|
107 |
+
'options' => [
|
108 |
+
'left' => [
|
109 |
+
'title'=> esc_html__( 'Left', 'premium-addons-for-elementor' ),
|
110 |
+
'icon' => 'fa fa-align-left',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
],
|
112 |
+
'center' => [
|
113 |
+
'title'=> esc_html__( 'Center', 'premium-addons-for-elementor' ),
|
114 |
+
'icon' => 'fa fa-align-center',
|
115 |
],
|
116 |
+
'right' => [
|
117 |
+
'title'=> esc_html__( 'Right', 'premium-addons-for-elementor' ),
|
118 |
+
'icon' => 'fa fa-align-right',
|
119 |
+
],
|
120 |
+
],
|
121 |
+
'default' => 'left',
|
122 |
+
'selectors' => [
|
123 |
+
'{{WRAPPER}} .premium-title-container' => 'text-align: {{VALUE}};',
|
124 |
+
],
|
125 |
+
]
|
126 |
+
);
|
127 |
|
128 |
|
129 |
|
130 |
/*Style 8*/
|
131 |
/*Strip Width*/
|
132 |
$this->add_control('premium_title_style7_strip_width',
|
133 |
+
[
|
134 |
+
'label' => esc_html__('Strip Width (PX)', 'premium-addons-for-elementor'),
|
135 |
+
'type' => Controls_Manager::SLIDER,
|
136 |
+
'size_units' => ['px', '%', 'em'],
|
137 |
+
'default' => [
|
138 |
+
'unit' => 'px',
|
139 |
+
'size' => '120',
|
140 |
+
],
|
141 |
+
'selectors' => [
|
142 |
+
'{{WRAPPER}} .premium-title-style7-strip:before' => 'width: {{SIZE}}{{UNIT}};',
|
143 |
+
],
|
144 |
+
'label_block' => true,
|
145 |
+
'condition' => [
|
146 |
+
'premium_title_style' => 'style7',
|
|
|
147 |
]
|
148 |
+
]
|
149 |
+
);
|
150 |
|
151 |
/*Strip Height*/
|
152 |
$this->add_control('premium_title_style7_strip_height',
|
153 |
+
[
|
154 |
+
'label' => esc_html__('Strip Height (PX)', 'premium-addons-for-elementor'),
|
155 |
+
'type' => Controls_Manager::SLIDER,
|
156 |
+
'size_units' => ['px', 'em'],
|
157 |
+
'default' => [
|
158 |
+
'unit' => 'px',
|
159 |
+
'size' => '5',
|
160 |
+
],
|
161 |
+
'label_block' => true,
|
162 |
+
'selectors' => [
|
163 |
+
'{{WRAPPER}} .premium-title-style7-strip,{{WRAPPER}} .premium-title-style7-strip:before ' => 'height: {{SIZE}}{{UNIT}};',
|
164 |
+
],
|
165 |
+
'condition' => [
|
166 |
+
'premium_title_style' => 'style7',
|
|
|
167 |
]
|
168 |
+
]
|
169 |
+
);
|
170 |
|
171 |
/*Strip Top Spacing*/
|
172 |
$this->add_control('premium_title_style7_strip_top_spacing',
|
173 |
+
[
|
174 |
+
'label' => esc_html__('Strip Top Spacing (PX)', 'premium-addons-for-elementor'),
|
175 |
+
'type' => Controls_Manager::SLIDER,
|
176 |
+
'size_units' => ['px', '%', 'em'],
|
177 |
+
'selectors' => [
|
178 |
+
'{{WRAPPER}} .premium-title-style7-strip' => 'margin-top: {{SIZE}}{{UNIT}};',
|
179 |
+
],
|
180 |
+
'label_block' => true,
|
181 |
+
'condition' => [
|
182 |
+
'premium_title_style' => 'style7',
|
183 |
+
],
|
184 |
+
]
|
185 |
+
);
|
186 |
|
187 |
/*Strip Bottom Spacing*/
|
188 |
$this->add_control('premium_title_style7_strip_bottom_spacing',
|
189 |
+
[
|
190 |
+
'label' => esc_html__('Strip Bottom Spacing (PX)', 'premium-addons-for-elementor'),
|
191 |
+
'type' => Controls_Manager::SLIDER,
|
192 |
+
'size_units' => ['px', '%', 'em'],
|
193 |
+
'label_block' => true,
|
194 |
+
'selectors' => [
|
195 |
+
'{{WRAPPER}} .premium-title-style7-strip' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
196 |
+
],
|
197 |
+
'condition' => [
|
198 |
+
'premium_title_style' => 'style7',
|
|
|
199 |
]
|
200 |
+
]
|
201 |
+
);
|
202 |
|
203 |
/*Title Align*/
|
204 |
$this->add_responsive_control('premium_title_style7_strip_align',
|
205 |
+
[
|
206 |
+
'label' => esc_html__( 'Align', 'premium-addons-for-elementor' ),
|
207 |
+
'type' => Controls_Manager::CHOOSE,
|
208 |
+
'options' => [
|
209 |
+
'left' => [
|
210 |
+
'title'=> esc_html__( 'Left', 'premium-addons-for-elementor' ),
|
211 |
+
'icon' => 'fa fa-align-left',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
],
|
213 |
+
'none' => [
|
214 |
+
'title'=> esc_html__( 'Center', 'premium-addons-for-elementor' ),
|
215 |
+
'icon' => 'fa fa-align-center',
|
216 |
+
],
|
217 |
+
'right' => [
|
218 |
+
'title'=> esc_html__( 'Right', 'premium-addons-for-elementor' ),
|
219 |
+
'icon' => 'fa fa-align-right',
|
220 |
+
],
|
221 |
+
],
|
222 |
+
'default' => 'none',
|
223 |
+
'selectors' => [
|
224 |
+
'{{WRAPPER}} .premium-title-style7-strip:before' => 'float: {{VALUE}};',
|
225 |
+
],
|
226 |
+
'condition' => [
|
227 |
+
'premium_title_style' => 'style7',
|
228 |
+
]
|
229 |
+
]
|
230 |
+
);
|
231 |
|
232 |
/*End Title General Settings Section*/
|
233 |
$this->end_controls_section();
|
234 |
|
235 |
/*Start Styling Section*/
|
236 |
$this->start_controls_section('premium_title_style_section',
|
237 |
+
[
|
238 |
+
'label' => esc_html__('Title', 'premium-addons-for-elementor'),
|
239 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
240 |
+
]
|
241 |
+
);
|
242 |
|
243 |
/*Title Color*/
|
244 |
$this->add_control('premium_title_color',
|
245 |
+
[
|
246 |
+
'label' => esc_html__('Color', 'premium-addons-for-elementor'),
|
247 |
+
'type' => Controls_Manager::COLOR,
|
248 |
+
'scheme' => [
|
249 |
+
'type' => Scheme_Color::get_type(),
|
250 |
+
'value' => Scheme_Color::COLOR_1,
|
251 |
+
],
|
252 |
+
'selectors' => [
|
253 |
+
'{{WRAPPER}} .premium-title-header' => 'color: {{VALUE}};',
|
254 |
+
],
|
255 |
+
]
|
256 |
+
);
|
257 |
|
258 |
|
259 |
/*Title Typography*/
|
260 |
$this->add_group_control(
|
261 |
+
Group_Control_Typography::get_type(),
|
262 |
+
[
|
263 |
+
'name' => 'title_typography',
|
264 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
265 |
+
'selector' => '{{WRAPPER}} .premium-title-header',
|
266 |
+
]
|
267 |
+
);
|
268 |
|
269 |
/*Style 1*/
|
270 |
/*Style 1 Border*/
|
271 |
$this->add_group_control(
|
272 |
Group_Control_Border::get_type(),
|
273 |
+
[
|
274 |
+
'name' => 'style_one_border',
|
275 |
+
'selector' => '{{WRAPPER}} .premium-title-style1',
|
276 |
+
'condition' => [
|
277 |
+
'premium_title_style' => 'style1',
|
278 |
+
],
|
279 |
+
]
|
280 |
+
);
|
281 |
|
282 |
/*Style 2*/
|
283 |
/*Background Color*/
|
284 |
$this->add_control('premium_title_style2_background_color',
|
285 |
+
[
|
286 |
+
'label' => esc_html__('Background Color', 'premium-addons-for-elementor'),
|
287 |
+
'type' => Controls_Manager::COLOR,
|
288 |
+
'scheme' => [
|
289 |
+
'type' => Scheme_Color::get_type(),
|
290 |
+
'value' => Scheme_Color::COLOR_2,
|
291 |
+
],
|
292 |
+
'selectors' => [
|
293 |
+
'{{WRAPPER}} .premium-title-style2' => 'background-color: {{VALUE}};',
|
294 |
+
],
|
295 |
+
'condition' => [
|
296 |
+
'premium_title_style' => 'style2',
|
297 |
+
],
|
298 |
+
]
|
299 |
+
);
|
300 |
|
301 |
/*Style 2*/
|
302 |
|
304 |
/*Style 3*/
|
305 |
/*Background Color*/
|
306 |
$this->add_control('premium_title_style3_background_color',
|
307 |
+
[
|
308 |
+
'label' => esc_html__('Background Color', 'premium-addons-for-elementor'),
|
309 |
+
'type' => Controls_Manager::COLOR,
|
310 |
+
'scheme' => [
|
311 |
+
'type' => Scheme_Color::get_type(),
|
312 |
+
'value' => Scheme_Color::COLOR_2
|
313 |
+
],
|
314 |
+
'selectors' => [
|
315 |
+
'{{WRAPPER}} .premium-title-style3' => 'background-color: {{VALUE}};'
|
316 |
+
],
|
317 |
+
'condition' => [
|
318 |
+
'premium_title_style' => 'style3'
|
319 |
+
]
|
320 |
+
]
|
321 |
+
);
|
322 |
|
323 |
|
324 |
/*Style 5*/
|
325 |
/*Header Line Color*/
|
326 |
$this->add_control('premium_title_style5_header_line_color',
|
327 |
+
[
|
328 |
+
'label' => esc_html__('Line Color', 'premium-addons-for-elementor'),
|
329 |
+
'type' => Controls_Manager::COLOR,
|
330 |
+
'scheme' => [
|
331 |
+
'type' => Scheme_Color::get_type(),
|
332 |
+
'value' => Scheme_Color::COLOR_1
|
333 |
+
],
|
334 |
+
'selectors' => [
|
335 |
+
'{{WRAPPER}} .premium-title-style5' => 'border-bottom: 2px solid {{VALUE}};'
|
336 |
+
],
|
337 |
+
'condition' => [
|
338 |
+
'premium_title_style' => 'style5'
|
339 |
+
]
|
340 |
+
]
|
341 |
+
);
|
342 |
|
343 |
/*Container Line Color*/
|
344 |
$this->add_group_control(
|
345 |
Group_Control_Border::get_type(),
|
346 |
+
[
|
347 |
+
'name' => 'style_five_border',
|
348 |
+
'selector' => '{{WRAPPER}} .premium-title-container',
|
349 |
+
'condition' => [
|
350 |
+
'premium_title_style' => ['style2','style4','style5','style6']
|
|
|
351 |
]
|
352 |
+
]
|
353 |
+
);
|
354 |
|
355 |
/*Style 7*/
|
356 |
/*Header Line Color*/
|
357 |
$this->add_control('premium_title_style6_header_line_color',
|
358 |
+
[
|
359 |
+
'label' => esc_html__('Line Color', 'premium-addons-for-elementor'),
|
360 |
+
'type' => Controls_Manager::COLOR,
|
361 |
+
'scheme' => [
|
362 |
+
'type' => Scheme_Color::get_type(),
|
363 |
+
'value' => Scheme_Color::COLOR_1
|
364 |
+
],
|
365 |
+
'selectors' => [
|
366 |
+
'{{WRAPPER}} .premium-title-style6' => 'border-bottom: 2px solid {{VALUE}};'
|
367 |
+
],
|
368 |
+
'condition' => [
|
369 |
+
'premium_title_style' => 'style6'
|
370 |
+
]
|
371 |
+
]
|
372 |
+
);
|
373 |
|
374 |
/*Triangle Color*/
|
375 |
$this->add_control('premium_title_style6_triangle_color',
|
376 |
+
[
|
377 |
+
'label' => esc_html__('Triangle Color', 'premium-addons-for-elementor'),
|
378 |
+
'type' => Controls_Manager::COLOR,
|
379 |
+
'scheme' => [
|
380 |
+
'type' => Scheme_Color::get_type(),
|
381 |
+
'value' => Scheme_Color::COLOR_1
|
382 |
+
],
|
383 |
+
'selectors' => [
|
384 |
+
'{{WRAPPER}} .premium-title-style6:before' => 'border-bottom-color: {{VALUE}};'
|
385 |
+
],
|
386 |
+
'condition' => [
|
387 |
+
'premium_title_style' => 'style6'
|
388 |
+
]
|
389 |
+
]
|
390 |
+
);
|
|
|
|
|
391 |
|
392 |
/*Strip Color*/
|
393 |
$this->add_control('premium_title_style7_strip_color',
|
394 |
+
[
|
395 |
+
'label' => esc_html__('Strip Color', 'premium-addons-for-elementor'),
|
396 |
+
'type' => Controls_Manager::COLOR,
|
397 |
+
'scheme' => [
|
398 |
+
'type' => Scheme_Color::get_type(),
|
399 |
+
'value' => Scheme_Color::COLOR_1
|
400 |
+
],
|
401 |
+
'selectors' => [
|
402 |
+
'{{WRAPPER}} .premium-title-style7-strip:before' => 'background-color: {{VALUE}};'
|
403 |
+
],
|
404 |
+
'condition' => [
|
405 |
+
'premium_title_style' => 'style7'
|
406 |
+
]
|
407 |
+
]
|
408 |
+
);
|
409 |
|
410 |
/*Title Margin*/
|
411 |
$this->add_responsive_control('premium_title_margin',
|
412 |
+
[
|
413 |
+
'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
|
414 |
+
'type' => Controls_Manager::DIMENSIONS,
|
415 |
+
'size_units' => ['px', 'em', '%'],
|
416 |
+
'selectors' => [
|
417 |
+
'{{WRAPPER}} .premium-title-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
|
|
418 |
]
|
419 |
+
]
|
420 |
+
);
|
421 |
|
422 |
/*Title Text Shadow*/
|
423 |
$this->add_group_control(
|
424 |
Group_Control_Text_Shadow::get_type(),
|
425 |
[
|
426 |
+
'label' => esc_html__('Shadow','premium-addons-for-elementor'),
|
427 |
+
'name' => 'premium_title_text_shadow',
|
428 |
+
'selector' => '{{WRAPPER}} .premium-title-header'
|
429 |
]
|
430 |
+
);
|
431 |
|
432 |
/*End Title Style Section*/
|
433 |
$this->end_controls_section();
|
434 |
|
435 |
/*Start Icon Style Section*/
|
436 |
$this->start_controls_section('premium_title_icon_style_section',
|
437 |
+
[
|
438 |
+
'label' => esc_html__('Icon Style', 'premium-addons-for-elementor'),
|
439 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
440 |
+
'condition' => [
|
441 |
+
'premium_title_icon_switcher' => 'yes'
|
|
|
442 |
]
|
443 |
+
]
|
444 |
+
);
|
445 |
|
446 |
/*Icon Color*/
|
447 |
$this->add_control('premium_title_icon_color',
|
448 |
+
[
|
449 |
+
'label' => esc_html__('Icon Color', 'premium-addons-for-elementor'),
|
450 |
+
'type' => Controls_Manager::COLOR,
|
451 |
+
'scheme' => [
|
452 |
+
'type' => Scheme_Color::get_type(),
|
453 |
+
'value' => Scheme_Color::COLOR_1
|
454 |
+
],
|
455 |
+
'selectors' => [
|
456 |
+
'{{WRAPPER}} .premium-title-icon' => 'color: {{VALUE}};'
|
457 |
+
]
|
458 |
+
]
|
459 |
+
);
|
460 |
|
461 |
/*Icon Size*/
|
462 |
$this->add_control('premium_title_icon_size',
|
463 |
+
[
|
464 |
+
'label' => esc_html__('Icon Size', 'premium-addons-for-elementor'),
|
465 |
+
'type' => Controls_Manager::SLIDER,
|
466 |
+
'size_units' => ['px', 'em', '%'],
|
467 |
+
'selectors' => [
|
468 |
+
'{{WRAPPER}} .premium-title-icon' => 'font-size: {{SIZE}}{{UNIT}}'
|
469 |
+
]
|
470 |
+
]
|
471 |
+
);
|
472 |
|
473 |
/*Icon Background*/
|
474 |
$this->add_group_control(
|
475 |
Group_Control_Background::get_type(),
|
476 |
+
[
|
477 |
+
'name' => 'premium_title_icon_background',
|
478 |
+
'types' => [ 'classic' , 'gradient' ],
|
479 |
+
'selector' => '{{WRAPPER}} .premium-title-icon'
|
480 |
+
]
|
481 |
+
);
|
482 |
|
483 |
/*Icon Border*/
|
484 |
$this->add_group_control(
|
485 |
Group_Control_Border::get_type(),
|
486 |
+
[
|
487 |
+
'name' => 'premium_title_icon_border',
|
488 |
+
'selector' => '{{WRAPPER}} .premium-title-icon'
|
489 |
+
]
|
490 |
+
);
|
491 |
|
492 |
/*Icon Border Radius*/
|
493 |
$this->add_control('premium_title_icon_border_radius',
|
494 |
+
[
|
495 |
+
'label' => esc_html__('Border Radius', 'premium-addons-for-elementor'),
|
496 |
+
'type' => Controls_Manager::SLIDER,
|
497 |
+
'size_units' => ['px', '%', 'em'],
|
498 |
+
'selectors' => [
|
499 |
+
'{{WRAPPER}} .premium-title-icon' => 'border-radius: {{SIZE}}{{UNIT}};'
|
500 |
+
]
|
501 |
+
]
|
502 |
+
);
|
503 |
|
504 |
/*Icon Margin*/
|
505 |
$this->add_responsive_control('premium_title_icon_margin',
|
506 |
+
[
|
507 |
+
'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
|
508 |
+
'type' => Controls_Manager::DIMENSIONS,
|
509 |
+
'size_units' => [ 'px', 'em', '%' ],
|
510 |
+
'selectors' => [
|
511 |
+
'{{WRAPPER}} .premium-title-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}'
|
512 |
+
]
|
513 |
+
]
|
514 |
+
);
|
515 |
|
516 |
/*Icon Padding*/
|
517 |
$this->add_responsive_control('premium_title_icon_padding',
|
518 |
+
[
|
519 |
+
'label' => esc_html__('Padding', 'premium-addons-for-elementor'),
|
520 |
+
'type' => Controls_Manager::DIMENSIONS,
|
521 |
+
'size_units' => [ 'px', 'em', '%' ],
|
522 |
+
'selectors' => [
|
523 |
+
'{{WRAPPER}} .premium-title-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}'
|
524 |
+
]
|
525 |
+
]
|
526 |
+
);
|
527 |
|
528 |
/*Icon Text Shadow*/
|
529 |
$this->add_group_control(
|
530 |
Group_Control_Text_Shadow::get_type(),
|
531 |
[
|
532 |
+
'label' => esc_html__('Icon Shadow', 'premium-addons-for-elementor'),
|
533 |
+
'name' => 'premium_title_icon_text_shadow',
|
534 |
+
'selector' => '{{WRAPPER}} .premium-title-icon'
|
535 |
]
|
536 |
+
);
|
537 |
|
538 |
/*End Progress Bar Section*/
|
539 |
$this->end_controls_section();
|
540 |
|
541 |
}
|
542 |
|
543 |
+
protected function render() {
|
544 |
// get our input from the widget settings.
|
545 |
$settings = $this->get_settings_for_display();
|
546 |
|
549 |
$title_tag = $settings['premium_title_tag'];
|
550 |
|
551 |
$selected_style = $settings['premium_title_style'];
|
552 |
+
|
553 |
+
$this->add_render_attribute( 'container', 'class', [ 'premium-title-container', $selected_style ] );
|
554 |
+
|
555 |
+
$this->add_render_attribute( 'title', 'class', [ 'premium-title-header', 'premium-title-' . $selected_style ] );
|
556 |
?>
|
557 |
|
558 |
+
<div <?php echo $this->get_render_attribute_string('container'); ?>>
|
559 |
+
<<?php echo $title_tag . ' ' . $this->get_render_attribute_string('title') ; ?>>
|
560 |
+
<?php if ( $settings['premium_title_style'] === 'style7' ) : ?>
|
561 |
+
<span class="premium-title-style7-strip"></span>
|
562 |
+
<?php endif; ?>
|
563 |
+
<?php if( ! empty( $settings['premium_title_icon'] ) ) : ?>
|
564 |
+
<i class="premium-title-icon <?php echo $settings['premium_title_icon'];?>"></i>
|
565 |
+
<?php endif; ?>
|
566 |
+
<span <?php echo $this->get_render_attribute_string('premium_title_text'); ?>>
|
567 |
+
<?php echo esc_html($settings['premium_title_text']); ?>
|
568 |
+
</span>
|
569 |
+
</<?php echo $title_tag; ?>>
|
570 |
+
</div>
|
571 |
|
572 |
<?php
|
573 |
}
|