Adv_Accordion.php
2 months ago
Adv_Tabs.php
2 months ago
Advanced_Data_Table.php
2 weeks ago
Better_Payment.php
4 years ago
Betterdocs_Category_Box.php
3 months ago
Betterdocs_Category_Grid.php
3 months ago
Betterdocs_Search_Form.php
2 months ago
Breadcrumbs.php
2 months ago
Business_Reviews.php
6 days ago
Caldera_Forms.php
2 months ago
Career_Page.php
4 years ago
Code_Snippet.php
4 months ago
Contact_Form_7.php
2 months ago
Content_Ticker.php
4 months ago
Countdown.php
2 months ago
Creative_Button.php
1 month ago
Cta_Box.php
2 months ago
Data_Table.php
2 months ago
Dual_Color_Header.php
6 days ago
EmbedPress.php
4 years ago
Event_Calendar.php
1 week ago
Facebook_Feed.php
4 months ago
Fancy_Text.php
2 months ago
Feature_List.php
4 months ago
Filterable_Gallery.php
6 days ago
Flip_Box.php
2 months ago
FluentForm.php
2 months ago
Formstack.php
2 months ago
GravityForms.php
6 days ago
Image_Accordion.php
2 months ago
Info_Box.php
6 days ago
Interactive_Circle.php
2 months ago
Login_Register.php
6 days ago
NFT_Gallery.php
4 months ago
NinjaForms.php
2 months ago
Post_Grid.php
4 months ago
Post_Timeline.php
10 months ago
Pricing_Table.php
2 months ago
Product_Grid.php
3 weeks ago
Progress_Bar.php
2 months ago
SVG_Draw.php
4 months ago
Simple_Menu.php
6 days ago
Sticky_Video.php
4 months ago
Team_Member.php
4 months ago
Testimonial.php
2 months ago
Tooltip.php
2 months ago
Twitter_Feed.php
4 months ago
TypeForm.php
5 months ago
WeForms.php
1 year ago
Woo_Add_To_Cart.php
2 months ago
Woo_Cart.php
4 months ago
Woo_Checkout.php
4 months ago
Woo_Product_Carousel.php
1 month ago
Woo_Product_Compare.php
1 year ago
Woo_Product_Gallery.php
4 months ago
Woo_Product_Images.php
1 month ago
Woo_Product_List.php
2 months ago
Woo_Product_Price.php
2 months ago
Woo_Product_Rating.php
2 months ago
WpForms.php
2 months ago
index.php
3 years ago
Info_Box.php
2720 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Essential_Addons_Elementor\Elements; |
| 4 | |
| 5 | // If this file is called directly, abort. |
| 6 | if (!defined('ABSPATH')) { |
| 7 | exit; |
| 8 | } |
| 9 | |
| 10 | use \Elementor\Controls_Manager; |
| 11 | use \Elementor\Group_Control_Border; |
| 12 | use \Elementor\Group_Control_Box_Shadow; |
| 13 | use \Elementor\Group_Control_Image_Size; |
| 14 | use \Elementor\Group_Control_Typography; |
| 15 | use Elementor\Icons_Manager; |
| 16 | use \Elementor\Plugin; |
| 17 | use \Elementor\Utils; |
| 18 | use \Elementor\Widget_Base; |
| 19 | use \Essential_Addons_Elementor\Classes\Helper; |
| 20 | use Essential_Addons_Elementor\Traits\Helper as HelperTrait; |
| 21 | use Essential_Addons_Elementor\Controls\EAEL_Gradient_Text; |
| 22 | |
| 23 | class Info_Box extends Widget_Base |
| 24 | { |
| 25 | use HelperTrait; |
| 26 | public function get_name() |
| 27 | { |
| 28 | return 'eael-info-box'; |
| 29 | } |
| 30 | |
| 31 | public function get_title() |
| 32 | { |
| 33 | return esc_html__('Info Box', 'essential-addons-for-elementor-lite'); |
| 34 | } |
| 35 | |
| 36 | public function get_icon() |
| 37 | { |
| 38 | return 'eaicon-info-box'; |
| 39 | } |
| 40 | |
| 41 | public function get_categories() |
| 42 | { |
| 43 | return ['essential-addons-elementor']; |
| 44 | } |
| 45 | |
| 46 | public function get_keywords() |
| 47 | { |
| 48 | return [ |
| 49 | 'info', |
| 50 | 'ea infobox', |
| 51 | 'ea info box', |
| 52 | 'box', |
| 53 | 'ea box', |
| 54 | 'info box', |
| 55 | 'card', |
| 56 | 'ea', |
| 57 | 'essential addons', |
| 58 | 'Glassmorphism', |
| 59 | 'Liquid Glass Effect', |
| 60 | 'Frost Effect', |
| 61 | ]; |
| 62 | } |
| 63 | |
| 64 | protected function is_dynamic_content():bool { |
| 65 | if( Plugin::$instance->editor->is_edit_mode() ) { |
| 66 | return false; |
| 67 | } |
| 68 | |
| 69 | $settings = $this->get_data( 'settings' ); |
| 70 | |
| 71 | if ( empty( $settings ) || ! is_array( $settings ) ) { |
| 72 | return false; |
| 73 | } |
| 74 | |
| 75 | $content_type = sanitize_text_field( $settings['eael_infobox_text_type'] ?? '' ); |
| 76 | $is_dynamic_content = 'template' === $content_type; |
| 77 | |
| 78 | return $is_dynamic_content; |
| 79 | } |
| 80 | |
| 81 | public function has_widget_inner_wrapper(): bool { |
| 82 | return ! Helper::eael_e_optimized_markup(); |
| 83 | } |
| 84 | |
| 85 | public function get_custom_help_url() |
| 86 | { |
| 87 | return 'https://essential-addons.com/elementor/docs/info-box/'; |
| 88 | } |
| 89 | |
| 90 | protected function register_controls() |
| 91 | { |
| 92 | |
| 93 | /** |
| 94 | * Infobox Image Settings |
| 95 | */ |
| 96 | $this->start_controls_section( |
| 97 | 'eael_section_infobox_content_settings', |
| 98 | [ |
| 99 | 'label' => esc_html__('Image', 'essential-addons-for-elementor-lite'), |
| 100 | ] |
| 101 | ); |
| 102 | |
| 103 | $this->add_control( |
| 104 | 'eael_infobox_img_type', |
| 105 | [ |
| 106 | 'label' => esc_html__('Type', 'essential-addons-for-elementor-lite'), |
| 107 | 'type' => Controls_Manager::SELECT, |
| 108 | 'default' => 'img-on-top', |
| 109 | 'label_block' => false, |
| 110 | 'options' => [ |
| 111 | 'img-on-top' => esc_html__('Image/Icon On Top', 'essential-addons-for-elementor-lite'), |
| 112 | 'img-on-bottom' => esc_html__('Image/Icon On Bottom', 'essential-addons-for-elementor-lite'), |
| 113 | 'img-on-left' => esc_html__('Image/Icon On Left', 'essential-addons-for-elementor-lite'), |
| 114 | 'img-on-right' => esc_html__('Image/Icon On Right', 'essential-addons-for-elementor-lite'), |
| 115 | ], |
| 116 | ] |
| 117 | ); |
| 118 | |
| 119 | $this->add_responsive_control( |
| 120 | 'eael_infobox_img_or_icon', |
| 121 | [ |
| 122 | 'label' => esc_html__('Image or Icon', 'essential-addons-for-elementor-lite'), |
| 123 | 'type' => Controls_Manager::CHOOSE, |
| 124 | 'label_block' => true, |
| 125 | 'options' => [ |
| 126 | 'none' => [ |
| 127 | 'title' => esc_html__('None', 'essential-addons-for-elementor-lite'), |
| 128 | 'icon' => 'fa fa-ban', |
| 129 | ], |
| 130 | 'number' => [ |
| 131 | 'title' => esc_html__('Number', 'essential-addons-for-elementor-lite'), |
| 132 | 'icon' => 'eicon-number-field', |
| 133 | ], |
| 134 | 'icon' => [ |
| 135 | 'title' => esc_html__('Icon', 'essential-addons-for-elementor-lite'), |
| 136 | 'icon' => 'fa fa-info-circle', |
| 137 | ], |
| 138 | 'img' => [ |
| 139 | 'title' => esc_html__('Image', 'essential-addons-for-elementor-lite'), |
| 140 | 'icon' => 'eicon-image-bold', |
| 141 | ], |
| 142 | ], |
| 143 | 'default' => 'icon', |
| 144 | ] |
| 145 | ); |
| 146 | |
| 147 | $this->add_responsive_control( |
| 148 | 'icon_vertical_position', |
| 149 | [ |
| 150 | 'label' => __('Icon Position', 'essential-addons-for-elementor-lite'), |
| 151 | 'type' => Controls_Manager::CHOOSE, |
| 152 | 'default' => 'top', |
| 153 | 'condition' => [ |
| 154 | 'eael_infobox_img_type!' => ['img-on-top', 'img-on-bottom'], |
| 155 | ], |
| 156 | 'options' => [ |
| 157 | 'top' => [ |
| 158 | 'title' => __('Top', 'essential-addons-for-elementor-lite'), |
| 159 | 'icon' => 'eicon-v-align-top', |
| 160 | ], |
| 161 | 'middle' => [ |
| 162 | 'title' => __('Middle', 'essential-addons-for-elementor-lite'), |
| 163 | 'icon' => 'eicon-v-align-middle', |
| 164 | ], |
| 165 | 'bottom' => [ |
| 166 | 'title' => __('Bottom', 'essential-addons-for-elementor-lite'), |
| 167 | 'icon' => 'eicon-v-align-bottom', |
| 168 | ], |
| 169 | ], |
| 170 | 'selectors' => [ |
| 171 | '{{WRAPPER}} .eael-infobox .infobox-icon' => 'align-self: {{VALUE}};', |
| 172 | ], |
| 173 | 'selectors_dictionary' => [ |
| 174 | 'top' => 'baseline', |
| 175 | 'middle' => 'center', |
| 176 | 'bottom' => 'flex-end', |
| 177 | ], |
| 178 | ] |
| 179 | ); |
| 180 | |
| 181 | $this->add_responsive_control( |
| 182 | 'icon_vertical_position_top_bottom', |
| 183 | [ |
| 184 | 'label' => __('Icon Position', 'essential-addons-for-elementor-lite'), |
| 185 | 'type' => Controls_Manager::CHOOSE, |
| 186 | 'default' => 'middle', |
| 187 | 'condition' => [ |
| 188 | 'eael_infobox_img_type!' => ['img-on-left', 'img-on-right'], |
| 189 | ], |
| 190 | 'options' => [ |
| 191 | 'top' => [ |
| 192 | 'title' => __('Left', 'essential-addons-for-elementor-lite'), |
| 193 | 'icon' => 'eicon-h-align-left', |
| 194 | ], |
| 195 | 'middle' => [ |
| 196 | 'title' => __('Middle', 'essential-addons-for-elementor-lite'), |
| 197 | 'icon' => 'eicon-v-align-middle', |
| 198 | ], |
| 199 | 'bottom' => [ |
| 200 | 'title' => __('Right', 'essential-addons-for-elementor-lite'), |
| 201 | 'icon' => 'eicon-h-align-right', |
| 202 | ], |
| 203 | ], |
| 204 | 'selectors' => [ |
| 205 | '{{WRAPPER}} .eael-infobox .infobox-icon' => 'align-self: {{VALUE}};', |
| 206 | ], |
| 207 | 'selectors_dictionary' => [ |
| 208 | 'top' => 'flex-start', |
| 209 | 'middle' => 'center', |
| 210 | 'bottom' => 'flex-end', |
| 211 | ], |
| 212 | ] |
| 213 | ); |
| 214 | |
| 215 | /** |
| 216 | * Condition: 'eael_infobox_img_or_icon' => 'img' |
| 217 | */ |
| 218 | $this->add_control( |
| 219 | 'eael_infobox_image', |
| 220 | [ |
| 221 | 'label' => esc_html__('Image', 'essential-addons-for-elementor-lite'), |
| 222 | 'type' => Controls_Manager::MEDIA, |
| 223 | 'default' => [ |
| 224 | 'url' => Utils::get_placeholder_image_src(), |
| 225 | ], |
| 226 | 'condition' => [ |
| 227 | 'eael_infobox_img_or_icon' => 'img', |
| 228 | ], |
| 229 | 'ai' => [ |
| 230 | 'active' => false, |
| 231 | ], |
| 232 | ] |
| 233 | ); |
| 234 | |
| 235 | /** |
| 236 | * Condition: 'eael_infobox_img_or_icon' => 'icon' |
| 237 | */ |
| 238 | $this->add_control( |
| 239 | 'eael_infobox_icon_new', |
| 240 | [ |
| 241 | 'label' => esc_html__('Icon', 'essential-addons-for-elementor-lite'), |
| 242 | 'type' => Controls_Manager::ICONS, |
| 243 | 'fa4compatibility' => 'eael_infobox_icon', |
| 244 | 'default' => [ |
| 245 | 'value' => 'fas fa-building', |
| 246 | 'library' => 'fa-solid', |
| 247 | ], |
| 248 | 'condition' => [ |
| 249 | 'eael_infobox_img_or_icon' => 'icon', |
| 250 | ], |
| 251 | ] |
| 252 | ); |
| 253 | |
| 254 | /** |
| 255 | * Condition: 'eael_infobox_img_or_icon' => 'number' |
| 256 | */ |
| 257 | $this->add_control( |
| 258 | 'eael_infobox_number', |
| 259 | [ |
| 260 | 'label' => esc_html__('Number', 'essential-addons-for-elementor-lite'), |
| 261 | 'type' => Controls_Manager::TEXT, |
| 262 | 'dynamic' => [ 'active' => true ], |
| 263 | 'condition' => [ |
| 264 | 'eael_infobox_img_or_icon' => 'number', |
| 265 | ], |
| 266 | 'ai' => [ |
| 267 | 'active' => true, |
| 268 | ], |
| 269 | ] |
| 270 | ); |
| 271 | |
| 272 | $this->end_controls_section(); |
| 273 | |
| 274 | /** |
| 275 | * Infobox Content |
| 276 | */ |
| 277 | $this->start_controls_section( |
| 278 | 'eael_infobox_content', |
| 279 | [ |
| 280 | 'label' => esc_html__('Content', 'essential-addons-for-elementor-lite'), |
| 281 | ] |
| 282 | ); |
| 283 | $this->add_control( |
| 284 | 'eael_infobox_title', |
| 285 | [ |
| 286 | 'label' => esc_html__('Title', 'essential-addons-for-elementor-lite'), |
| 287 | 'type' => Controls_Manager::TEXT, |
| 288 | 'label_block' => true, |
| 289 | 'dynamic' => [ |
| 290 | 'active' => true, |
| 291 | ], |
| 292 | 'default' => esc_html__('This is an icon box', 'essential-addons-for-elementor-lite'), |
| 293 | 'ai' => [ |
| 294 | 'active' => true, |
| 295 | ], |
| 296 | ] |
| 297 | ); |
| 298 | $this->add_control( |
| 299 | 'eael_infobox_title_tag', |
| 300 | [ |
| 301 | 'label' => __('Title Tag', 'essential-addons-for-elementor-lite'), |
| 302 | 'type' => Controls_Manager::SELECT, |
| 303 | 'default' => 'h2', |
| 304 | 'options' => [ |
| 305 | 'h1' => __('H1', 'essential-addons-for-elementor-lite'), |
| 306 | 'h2' => __('H2', 'essential-addons-for-elementor-lite'), |
| 307 | 'h3' => __('H3', 'essential-addons-for-elementor-lite'), |
| 308 | 'h4' => __('H4', 'essential-addons-for-elementor-lite'), |
| 309 | 'h5' => __('H5', 'essential-addons-for-elementor-lite'), |
| 310 | 'h6' => __('H6', 'essential-addons-for-elementor-lite'), |
| 311 | 'span' => __('Span', 'essential-addons-for-elementor-lite'), |
| 312 | 'p' => __('P', 'essential-addons-for-elementor-lite'), |
| 313 | 'div' => __('Div', 'essential-addons-for-elementor-lite'), |
| 314 | ], |
| 315 | ] |
| 316 | ); |
| 317 | |
| 318 | $this->add_control( |
| 319 | 'eael_infobox_show_sub_title', |
| 320 | [ |
| 321 | 'label' => esc_html__( 'Sub Title', 'essential-addons-for-elementor-lite' ), |
| 322 | 'type' => Controls_Manager::SWITCHER, |
| 323 | 'label_on' => esc_html__( 'Show', 'essential-addons-for-elementor-lite' ), |
| 324 | 'label_off' => esc_html__( 'Hide', 'essential-addons-for-elementor-lite' ), |
| 325 | 'return_value' => 'yes', |
| 326 | ] |
| 327 | ); |
| 328 | |
| 329 | $this->add_control( |
| 330 | 'eael_infobox_show_sub_title_after', |
| 331 | [ |
| 332 | 'label' => esc_html__( 'Position', 'essential-addons-for-elementor-lite' ), |
| 333 | 'type' => Controls_Manager::CHOOSE, |
| 334 | 'options' => [ |
| 335 | 'column' => [ |
| 336 | 'title' => esc_html__( 'Top', 'essential-addons-for-elementor-lite' ), |
| 337 | 'icon' => 'eicon-arrow-up', |
| 338 | ], |
| 339 | 'column-reverse' => [ |
| 340 | 'title' => esc_html__( 'Bottom', 'essential-addons-for-elementor-lite' ), |
| 341 | 'icon' => 'eicon-arrow-down', |
| 342 | ], |
| 343 | ], |
| 344 | 'default' => 'column', |
| 345 | 'selectors' => [ |
| 346 | '{{WRAPPER}} .infobox-content .infobox-title-section' => 'flex-direction: {{VALUE}};', |
| 347 | ], |
| 348 | 'condition' => [ |
| 349 | 'eael_infobox_show_sub_title' => 'yes', |
| 350 | ], |
| 351 | ] |
| 352 | ); |
| 353 | |
| 354 | $this->add_control( |
| 355 | 'eael_infobox_sub_title', |
| 356 | [ |
| 357 | 'label' => esc_html__('Sub Title', 'essential-addons-for-elementor-lite'), |
| 358 | 'type' => Controls_Manager::TEXT, |
| 359 | 'label_block' => true, |
| 360 | 'dynamic' => [ |
| 361 | 'active' => true, |
| 362 | ], |
| 363 | 'default' => esc_html__('This is a sub title', 'essential-addons-for-elementor-lite'), |
| 364 | 'ai' => [ |
| 365 | 'active' => true, |
| 366 | ], |
| 367 | 'condition' => [ |
| 368 | 'eael_infobox_show_sub_title' => 'yes', |
| 369 | ], |
| 370 | ] |
| 371 | ); |
| 372 | |
| 373 | $this->add_control( |
| 374 | 'eael_infobox_sub_title_tag', |
| 375 | [ |
| 376 | 'label' => __('Sub Title Tag', 'essential-addons-for-elementor-lite'), |
| 377 | 'type' => Controls_Manager::SELECT, |
| 378 | 'default' => 'h4', |
| 379 | 'options' => [ |
| 380 | 'h1' => __('H1', 'essential-addons-for-elementor-lite'), |
| 381 | 'h2' => __('H2', 'essential-addons-for-elementor-lite'), |
| 382 | 'h3' => __('H3', 'essential-addons-for-elementor-lite'), |
| 383 | 'h4' => __('H4', 'essential-addons-for-elementor-lite'), |
| 384 | 'h5' => __('H5', 'essential-addons-for-elementor-lite'), |
| 385 | 'h6' => __('H6', 'essential-addons-for-elementor-lite'), |
| 386 | 'span' => __('Span', 'essential-addons-for-elementor-lite'), |
| 387 | 'p' => __('P', 'essential-addons-for-elementor-lite'), |
| 388 | 'div' => __('Div', 'essential-addons-for-elementor-lite'), |
| 389 | ], |
| 390 | 'condition' => [ |
| 391 | 'eael_infobox_show_sub_title' => 'yes', |
| 392 | ], |
| 393 | ] |
| 394 | ); |
| 395 | |
| 396 | $this->add_control( |
| 397 | 'eael_infobox_text_type', |
| 398 | [ |
| 399 | 'label' => __('Content Type', 'essential-addons-for-elementor-lite'), |
| 400 | 'type' => Controls_Manager::SELECT, |
| 401 | 'options' => [ |
| 402 | 'content' => __('Content', 'essential-addons-for-elementor-lite'), |
| 403 | 'template' => __('Saved Templates', 'essential-addons-for-elementor-lite'), |
| 404 | ], |
| 405 | 'default' => 'content', |
| 406 | ] |
| 407 | ); |
| 408 | |
| 409 | $this->add_control( |
| 410 | 'eael_primary_templates', |
| 411 | [ |
| 412 | 'label' => __('Choose Template', 'essential-addons-for-elementor-lite'), |
| 413 | 'label_block' => true, |
| 414 | 'type' => 'eael-select2', |
| 415 | 'source_name' => 'post_type', |
| 416 | 'source_type' => 'elementor_library', |
| 417 | 'condition' => [ |
| 418 | 'eael_infobox_text_type' => 'template', |
| 419 | ], |
| 420 | ] |
| 421 | ); |
| 422 | $this->add_control( |
| 423 | 'eael_infobox_text', |
| 424 | [ |
| 425 | 'label' => esc_html__('Content', 'essential-addons-for-elementor-lite'), |
| 426 | 'type' => Controls_Manager::WYSIWYG, |
| 427 | 'label_block' => true, |
| 428 | 'dynamic' => [ |
| 429 | 'active' => true, |
| 430 | ], |
| 431 | 'ai' => [ |
| 432 | 'active' => false, |
| 433 | ], |
| 434 | /* translators: Description text for the default content. HTML <p> tag is added outside. */ |
| 435 | 'default' => '<p>' . esc_html__( 'Write a short description, that will describe the title or something informational and useful.', 'essential-addons-for-elementor-lite' ) . '</p>', |
| 436 | 'condition' => [ |
| 437 | 'eael_infobox_text_type' => 'content', |
| 438 | ], |
| 439 | ] |
| 440 | ); |
| 441 | $this->add_control( |
| 442 | 'eael_show_infobox_content', |
| 443 | [ |
| 444 | 'label' => __('Show Content', 'essential-addons-for-elementor-lite'), |
| 445 | 'type' => Controls_Manager::SWITCHER, |
| 446 | 'default' => 'yes', |
| 447 | 'label_on' => __('Show', 'essential-addons-for-elementor-lite'), |
| 448 | 'label_off' => __('Hide', 'essential-addons-for-elementor-lite'), |
| 449 | 'return_value' => 'yes', |
| 450 | ] |
| 451 | ); |
| 452 | $this->add_responsive_control( |
| 453 | 'eael_infobox_content_alignment', |
| 454 | [ |
| 455 | 'label' => esc_html__('Alignment', 'essential-addons-for-elementor-lite'), |
| 456 | 'type' => Controls_Manager::CHOOSE, |
| 457 | 'label_block' => true, |
| 458 | 'options' => [ |
| 459 | 'left' => [ |
| 460 | 'title' => esc_html__('Left', 'essential-addons-for-elementor-lite'), |
| 461 | 'icon' => 'eicon-text-align-left', |
| 462 | ], |
| 463 | 'center' => [ |
| 464 | 'title' => esc_html__('Center', 'essential-addons-for-elementor-lite'), |
| 465 | 'icon' => 'eicon-text-align-center', |
| 466 | ], |
| 467 | 'right' => [ |
| 468 | 'title' => esc_html__('Right', 'essential-addons-for-elementor-lite'), |
| 469 | 'icon' => 'eicon-text-align-right', |
| 470 | ], |
| 471 | ], |
| 472 | 'default' => 'center', |
| 473 | 'devices' => [ 'desktop', 'tablet', 'mobile' ], |
| 474 | 'prefix_class' => 'eael-infobox-content-align-%s-', |
| 475 | 'condition' => [ |
| 476 | 'eael_infobox_img_type' => ['img-on-top'], |
| 477 | ], |
| 478 | ] |
| 479 | ); |
| 480 | |
| 481 | $this->add_responsive_control( |
| 482 | 'eael_infobox_content_alignment_left_right', |
| 483 | [ |
| 484 | 'label' => esc_html__('Content Alignment', 'essential-addons-for-elementor-lite'), |
| 485 | 'type' => Controls_Manager::CHOOSE, |
| 486 | 'label_block' => true, |
| 487 | 'options' => [ |
| 488 | 'left' => [ |
| 489 | 'title' => esc_html__('Left', 'essential-addons-for-elementor-lite'), |
| 490 | 'icon' => 'eicon-text-align-left', |
| 491 | ], |
| 492 | 'center' => [ |
| 493 | 'title' => esc_html__('Center', 'essential-addons-for-elementor-lite'), |
| 494 | 'icon' => 'eicon-text-align-center', |
| 495 | ], |
| 496 | 'right' => [ |
| 497 | 'title' => esc_html__('Right', 'essential-addons-for-elementor-lite'), |
| 498 | 'icon' => 'eicon-text-align-right', |
| 499 | ], |
| 500 | ], |
| 501 | 'devices' => [ 'desktop', 'tablet', 'mobile' ], |
| 502 | 'prefix_class' => 'eael-infobox-content-align-%s-', |
| 503 | 'condition' => [ |
| 504 | 'eael_infobox_img_type' => ['img-on-left', 'img-on-right'], |
| 505 | ], |
| 506 | ] |
| 507 | ); |
| 508 | |
| 509 | $this->add_control( |
| 510 | 'content_height', |
| 511 | [ |
| 512 | 'label' => esc_html__('Content Height', 'essential-addons-for-elementor-lite'), |
| 513 | 'type' => Controls_Manager::SLIDER, |
| 514 | 'size_units' => ['px', '%', 'em'], |
| 515 | 'range' => [ |
| 516 | 'px' => ['max' => 300], |
| 517 | '%' => ['max' => 100], |
| 518 | ], |
| 519 | 'selectors' => [ |
| 520 | '{{WRAPPER}} .infobox-content' => 'height: {{SIZE}}{{UNIT}};', |
| 521 | ], |
| 522 | ] |
| 523 | ); |
| 524 | |
| 525 | $this->end_controls_section(); |
| 526 | |
| 527 | /** |
| 528 | * ---------------------------------------------- |
| 529 | * Infobox Button |
| 530 | * ---------------------------------------------- |
| 531 | */ |
| 532 | $this->start_controls_section( |
| 533 | 'eael_infobox_button', |
| 534 | [ |
| 535 | 'label' => esc_html__('Button', 'essential-addons-for-elementor-lite'), |
| 536 | ] |
| 537 | ); |
| 538 | |
| 539 | $this->add_control( |
| 540 | 'eael_show_infobox_button', |
| 541 | [ |
| 542 | 'label' => __('Show Button', 'essential-addons-for-elementor-lite'), |
| 543 | 'type' => Controls_Manager::SWITCHER, |
| 544 | 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'), |
| 545 | 'label_off' => __('No', 'essential-addons-for-elementor-lite'), |
| 546 | 'condition' => [ |
| 547 | 'eael_show_infobox_clickable!' => 'yes', |
| 548 | ], |
| 549 | ] |
| 550 | ); |
| 551 | |
| 552 | $this->add_control( |
| 553 | 'eael_wd_liquid_glass_effect_switch', |
| 554 | [ |
| 555 | 'label' => __( 'Enable Liquid Glass Effects', 'essential-addons-for-elementor-lite' ), |
| 556 | 'type' => Controls_Manager::SWITCHER, |
| 557 | 'condition' => [ |
| 558 | 'eael_show_infobox_button' => 'yes', |
| 559 | ], |
| 560 | ] |
| 561 | ); |
| 562 | |
| 563 | $this->add_control( |
| 564 | 'eael_show_infobox_clickable', |
| 565 | [ |
| 566 | 'label' => __('Infobox Clickable', 'essential-addons-for-elementor-lite'), |
| 567 | 'type' => Controls_Manager::SWITCHER, |
| 568 | 'default' => 'no', |
| 569 | 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'), |
| 570 | 'label_off' => __('No', 'essential-addons-for-elementor-lite'), |
| 571 | 'return_value' => 'yes', |
| 572 | 'condition' => [ |
| 573 | 'eael_show_infobox_button!' => 'yes', |
| 574 | ], |
| 575 | ] |
| 576 | ); |
| 577 | |
| 578 | $this->add_control( |
| 579 | 'eael_show_infobox_clickable_link', |
| 580 | [ |
| 581 | 'label' => esc_html__('Infobox Link', 'essential-addons-for-elementor-lite'), |
| 582 | 'type' => Controls_Manager::URL, |
| 583 | 'dynamic' => ['active' => true], |
| 584 | 'label_block' => true, |
| 585 | 'default' => [ |
| 586 | 'url' => 'http://', |
| 587 | 'is_external' => '', |
| 588 | ], |
| 589 | 'show_external' => true, |
| 590 | 'condition' => [ |
| 591 | 'eael_show_infobox_clickable' => 'yes', |
| 592 | ], |
| 593 | ] |
| 594 | ); |
| 595 | |
| 596 | $this->add_control( |
| 597 | 'infobox_button_text', |
| 598 | [ |
| 599 | 'label' => __('Button Text', 'essential-addons-for-elementor-lite'), |
| 600 | 'type' => Controls_Manager::TEXT, |
| 601 | 'dynamic' => [ |
| 602 | 'active' => true |
| 603 | ], |
| 604 | 'label_block' => true, |
| 605 | 'default' => 'Click Me!', |
| 606 | 'separator' => 'before', |
| 607 | 'placeholder' => __('Enter button text', 'essential-addons-for-elementor-lite'), |
| 608 | 'title' => __('Enter button text here', 'essential-addons-for-elementor-lite'), |
| 609 | 'condition' => [ |
| 610 | 'eael_show_infobox_button' => 'yes', |
| 611 | ], |
| 612 | 'ai' => [ |
| 613 | 'active' => true, |
| 614 | ], |
| 615 | ] |
| 616 | ); |
| 617 | |
| 618 | $this->add_control( |
| 619 | 'infobox_button_link_url', |
| 620 | [ |
| 621 | 'label' => __('Link URL', 'essential-addons-for-elementor-lite'), |
| 622 | 'type' => Controls_Manager::URL, |
| 623 | 'dynamic' => ['active' => true], |
| 624 | 'label_block' => true, |
| 625 | 'placeholder' => __('Enter link URL for the button', 'essential-addons-for-elementor-lite'), |
| 626 | 'show_external' => true, |
| 627 | 'default' => [ |
| 628 | 'url' => '#', |
| 629 | ], |
| 630 | 'title' => __('Enter heading for the button', 'essential-addons-for-elementor-lite'), |
| 631 | 'condition' => [ |
| 632 | 'eael_show_infobox_button' => 'yes', |
| 633 | ], |
| 634 | ] |
| 635 | ); |
| 636 | |
| 637 | $this->add_control( |
| 638 | 'eael_infobox_button_icon_new', |
| 639 | [ |
| 640 | 'label' => esc_html__('Icon', 'essential-addons-for-elementor-lite'), |
| 641 | 'type' => Controls_Manager::ICONS, |
| 642 | 'fa4compatibility' => 'eael_infobox_button_icon', |
| 643 | 'condition' => [ |
| 644 | 'eael_show_infobox_button' => 'yes', |
| 645 | ], |
| 646 | ] |
| 647 | ); |
| 648 | |
| 649 | $this->add_control( |
| 650 | 'eael_infobox_button_icon_alignment', |
| 651 | [ |
| 652 | 'label' => esc_html__('Icon Position', 'essential-addons-for-elementor-lite'), |
| 653 | 'type' => Controls_Manager::SELECT, |
| 654 | 'default' => 'left', |
| 655 | 'options' => [ |
| 656 | 'left' => esc_html__('Before', 'essential-addons-for-elementor-lite'), |
| 657 | 'right' => esc_html__('After', 'essential-addons-for-elementor-lite'), |
| 658 | ], |
| 659 | 'condition' => [ |
| 660 | 'eael_infobox_button_icon_new!' => '', |
| 661 | 'eael_show_infobox_button' => 'yes', |
| 662 | ], |
| 663 | ] |
| 664 | ); |
| 665 | |
| 666 | $this->add_control( |
| 667 | 'eael_infobox_button_icon_indent', |
| 668 | [ |
| 669 | 'label' => esc_html__('Icon Spacing', 'essential-addons-for-elementor-lite'), |
| 670 | 'type' => Controls_Manager::SLIDER, |
| 671 | 'range' => [ |
| 672 | 'px' => [ |
| 673 | 'max' => 60, |
| 674 | ], |
| 675 | ], |
| 676 | 'condition' => [ |
| 677 | 'eael_infobox_button_icon_new!' => '', |
| 678 | 'eael_show_infobox_button' => 'yes', |
| 679 | ], |
| 680 | 'selectors' => [ |
| 681 | '{{WRAPPER}} .eael_infobox_button_icon_right' => 'margin-left: {{SIZE}}px;', |
| 682 | '{{WRAPPER}} .eael_infobox_button_icon_left' => 'margin-right: {{SIZE}}px;', |
| 683 | ], |
| 684 | ] |
| 685 | ); |
| 686 | |
| 687 | $this->add_control( |
| 688 | 'eael_infobox_button_icon_rotate', |
| 689 | [ |
| 690 | 'label' => esc_html__('Rotation', 'essential-addons-for-elementor-lite'), |
| 691 | 'type' => Controls_Manager::SLIDER, |
| 692 | 'range' => [ |
| 693 | 'deg' => [ |
| 694 | 'min' => -360, |
| 695 | 'max' => 360, |
| 696 | 'step' => 1, |
| 697 | ], |
| 698 | ], |
| 699 | 'default' => [ |
| 700 | 'unit' => 'deg', |
| 701 | 'size' => 0, |
| 702 | ], |
| 703 | 'condition' => [ |
| 704 | 'eael_infobox_button_icon_new!' => '', |
| 705 | 'eael_show_infobox_button' => 'yes', |
| 706 | ], |
| 707 | 'selectors' => [ |
| 708 | '{{WRAPPER}} .eael-infobox .infobox-button .eael-infobox-button svg' => 'rotate: {{SIZE}}deg;', |
| 709 | '{{WRAPPER}} .eael-infobox .infobox-button .eael-infobox-button i' => 'rotate: {{SIZE}}deg;', |
| 710 | ], |
| 711 | ] |
| 712 | ); |
| 713 | |
| 714 | $this->end_controls_section(); |
| 715 | |
| 716 | if (!apply_filters('eael/pro_enabled', false)) { |
| 717 | $this->start_controls_section( |
| 718 | 'eael_section_pro', |
| 719 | [ |
| 720 | 'label' => __('Go Premium for More Features', 'essential-addons-for-elementor-lite'), |
| 721 | ] |
| 722 | ); |
| 723 | |
| 724 | $this->add_control( |
| 725 | 'eael_control_get_pro', |
| 726 | [ |
| 727 | 'label' => __('Unlock more possibilities', 'essential-addons-for-elementor-lite'), |
| 728 | 'type' => Controls_Manager::CHOOSE, |
| 729 | 'options' => [ |
| 730 | '1' => [ |
| 731 | 'title' => '', |
| 732 | 'icon' => 'fa fa-unlock-alt', |
| 733 | ], |
| 734 | ], |
| 735 | 'default' => '1', |
| 736 | 'description' => '<span class="pro-feature"> Get the <a href="https://wpdeveloper.com/upgrade/ea-pro" target="_blank">Pro version</a> for more stunning elements and customization options.</span>', |
| 737 | ] |
| 738 | ); |
| 739 | |
| 740 | $this->end_controls_section(); |
| 741 | } |
| 742 | |
| 743 | //Style Container |
| 744 | $this->start_controls_section( |
| 745 | 'eael_section_infobox_container', |
| 746 | [ |
| 747 | 'label' => esc_html__( 'Container', 'essential-addons-for-elementor-lite' ), |
| 748 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 749 | ] |
| 750 | ); |
| 751 | |
| 752 | $this->add_control( |
| 753 | 'eael_section_infobox_container_bg', |
| 754 | [ |
| 755 | 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), |
| 756 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 757 | 'selectors' => [ |
| 758 | '{{WRAPPER}} .eael-infobox' => 'background-color: {{VALUE}}', |
| 759 | ], |
| 760 | ] |
| 761 | ); |
| 762 | |
| 763 | $this->add_responsive_control( |
| 764 | 'eael_section_infobox_container_margin', |
| 765 | [ |
| 766 | 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), |
| 767 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 768 | 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], |
| 769 | 'selectors' => [ |
| 770 | '{{WRAPPER}} .eael-infobox' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 771 | ], |
| 772 | ] |
| 773 | ); |
| 774 | |
| 775 | $this->add_responsive_control( |
| 776 | 'eael_section_infobox_container_padding', |
| 777 | [ |
| 778 | 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), |
| 779 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 780 | 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], |
| 781 | 'selectors' => [ |
| 782 | '{{WRAPPER}} .eael-infobox' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 783 | ], |
| 784 | ] |
| 785 | ); |
| 786 | |
| 787 | $this->add_group_control( |
| 788 | \Elementor\Group_Control_Border::get_type(), |
| 789 | [ |
| 790 | 'name' => 'eael_section_infobox_container_border', |
| 791 | 'selector' => '{{WRAPPER}} .eael-infobox', |
| 792 | ] |
| 793 | ); |
| 794 | |
| 795 | $this->add_control( |
| 796 | 'eael_section_infobox_container_border_radius', |
| 797 | [ |
| 798 | 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), |
| 799 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 800 | 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], |
| 801 | 'selectors' => [ |
| 802 | '{{WRAPPER}} .eael-infobox' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 803 | ], |
| 804 | ] |
| 805 | ); |
| 806 | |
| 807 | $this->end_controls_section(); |
| 808 | |
| 809 | /** |
| 810 | * ------------------------------------------- |
| 811 | * Tab Style (Info Box Image) |
| 812 | * ------------------------------------------- |
| 813 | */ |
| 814 | $this->start_controls_section( |
| 815 | 'eael_section_infobox_imgae_style_settings', |
| 816 | [ |
| 817 | 'label' => esc_html__('Image', 'essential-addons-for-elementor-lite'), |
| 818 | 'tab' => Controls_Manager::TAB_STYLE, |
| 819 | 'condition' => [ |
| 820 | 'eael_infobox_img_or_icon' => 'img', |
| 821 | ], |
| 822 | ] |
| 823 | ); |
| 824 | |
| 825 | $this->add_control( |
| 826 | 'eael_infobox_image_icon_hover_animation', |
| 827 | [ |
| 828 | 'label' => esc_html__('Hover Animation', 'essential-addons-for-elementor-lite'), |
| 829 | 'type' => Controls_Manager::HOVER_ANIMATION, |
| 830 | ] |
| 831 | ); |
| 832 | |
| 833 | $this->start_controls_tabs('eael_infobox_image_style'); |
| 834 | |
| 835 | $this->start_controls_tab( |
| 836 | 'eael_infobox_image_icon_normal', |
| 837 | [ |
| 838 | 'label' => __('Normal', 'essential-addons-for-elementor-lite'), |
| 839 | ] |
| 840 | ); |
| 841 | |
| 842 | $this->add_control( |
| 843 | 'eael_infobox_image_icon_bg_color', |
| 844 | [ |
| 845 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 846 | 'type' => Controls_Manager::COLOR, |
| 847 | 'default' => '', |
| 848 | 'selectors' => [ |
| 849 | '{{WRAPPER}} .eael-infobox .infobox-icon img' => 'background-color: {{VALUE}};', |
| 850 | ], |
| 851 | ] |
| 852 | ); |
| 853 | |
| 854 | $this->add_group_control( |
| 855 | Group_Control_Box_Shadow::get_type(), |
| 856 | [ |
| 857 | 'name' => 'eael_infobox_image_icon_shadow', |
| 858 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon img', |
| 859 | ] |
| 860 | ); |
| 861 | |
| 862 | $this->add_group_control( |
| 863 | Group_Control_Border::get_type(), |
| 864 | [ |
| 865 | 'name' => 'eael_infobox_image_border', |
| 866 | 'label' => esc_html__('Border', 'essential-addons-for-elementor-lite'), |
| 867 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon img', |
| 868 | ] |
| 869 | ); |
| 870 | |
| 871 | $this->add_control( |
| 872 | 'eael_infobox_img_shape', |
| 873 | [ |
| 874 | 'label' => esc_html__('Shape', 'essential-addons-for-elementor-lite'), |
| 875 | 'type' => Controls_Manager::SELECT, |
| 876 | 'default' => 'square', |
| 877 | 'label_block' => false, |
| 878 | 'options' => [ |
| 879 | 'square' => esc_html__('Square', 'essential-addons-for-elementor-lite'), |
| 880 | 'circle' => esc_html__('Circle', 'essential-addons-for-elementor-lite'), |
| 881 | 'radius' => esc_html__('Radius', 'essential-addons-for-elementor-lite'), |
| 882 | ], |
| 883 | 'prefix_class' => 'eael-infobox-shape-', |
| 884 | 'condition' => [ |
| 885 | 'eael_infobox_img_or_icon' => 'img', |
| 886 | ], |
| 887 | ] |
| 888 | ); |
| 889 | |
| 890 | $this->add_control( |
| 891 | 'custom_panel_alert', |
| 892 | [ |
| 893 | 'type' => \Elementor\Controls_Manager::ALERT, |
| 894 | 'alert_type' => 'info', |
| 895 | 'content' => esc_html__( 'Select Shape to Radius if border radius is needed', 'essential-addons-for-elementor-lite' ), |
| 896 | 'condition' => [ |
| 897 | 'eael_infobox_img_shape!' => 'radius', |
| 898 | 'eael_infobox_img_or_icon' => 'img', |
| 899 | ], |
| 900 | ] |
| 901 | ); |
| 902 | |
| 903 | $this->add_control( |
| 904 | 'eael_infobox_img_shape_radius', |
| 905 | [ |
| 906 | 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), |
| 907 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 908 | 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], |
| 909 | 'selectors' => [ |
| 910 | '{{WRAPPER}} .eael-infobox .infobox-icon img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 911 | ], |
| 912 | 'condition' => [ |
| 913 | 'eael_infobox_img_shape' => 'radius', |
| 914 | 'eael_infobox_img_or_icon' => 'img', |
| 915 | ], |
| 916 | ] |
| 917 | ); |
| 918 | |
| 919 | $this->end_controls_tab(); |
| 920 | |
| 921 | $this->start_controls_tab( |
| 922 | 'eael_infobox_image_icon_hover', |
| 923 | [ |
| 924 | 'label' => __('Hover', 'essential-addons-for-elementor-lite'), |
| 925 | ] |
| 926 | ); |
| 927 | |
| 928 | $this->add_control( |
| 929 | 'eael_infobox_image_icon_bg_color_hover', |
| 930 | [ |
| 931 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 932 | 'type' => Controls_Manager::COLOR, |
| 933 | 'default' => '', |
| 934 | 'selectors' => [ |
| 935 | '{{WRAPPER}} .eael-infobox .infobox-icon:hover img' => 'background-color: {{VALUE}};', |
| 936 | ], |
| 937 | ] |
| 938 | ); |
| 939 | |
| 940 | $this->add_group_control( |
| 941 | Group_Control_Box_Shadow::get_type(), |
| 942 | [ |
| 943 | 'name' => 'eael_infobox_image_icon_hover_shadow', |
| 944 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon:hover img', |
| 945 | ] |
| 946 | ); |
| 947 | |
| 948 | $this->add_group_control( |
| 949 | Group_Control_Border::get_type(), |
| 950 | [ |
| 951 | 'name' => 'eael_infobox_hover_image_border', |
| 952 | 'label' => esc_html__('Border', 'essential-addons-for-elementor-lite'), |
| 953 | 'selector' => '{{WRAPPER}} .eael-infobox:hover .infobox-icon img', |
| 954 | ] |
| 955 | ); |
| 956 | |
| 957 | $this->add_control( |
| 958 | 'eael_infobox_hover_img_shape', |
| 959 | [ |
| 960 | 'label' => esc_html__('Shape', 'essential-addons-for-elementor-lite'), |
| 961 | 'type' => Controls_Manager::SELECT, |
| 962 | 'default' => 'square', |
| 963 | 'label_block' => false, |
| 964 | 'options' => [ |
| 965 | 'square' => esc_html__('Square', 'essential-addons-for-elementor-lite'), |
| 966 | 'circle' => esc_html__('Circle', 'essential-addons-for-elementor-lite'), |
| 967 | 'radius' => esc_html__('Radius', 'essential-addons-for-elementor-lite'), |
| 968 | ], |
| 969 | 'prefix_class' => 'eael-infobox-hover-img-shape-', |
| 970 | 'condition' => [ |
| 971 | 'eael_infobox_img_or_icon' => 'img', |
| 972 | ], |
| 973 | ] |
| 974 | ); |
| 975 | |
| 976 | $this->add_control( |
| 977 | 'eael_infobox_img_shape_radius_hover', |
| 978 | [ |
| 979 | 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), |
| 980 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 981 | 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], |
| 982 | 'selectors' => [ |
| 983 | '{{WRAPPER}} .eael-infobox:hover .infobox-icon img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 984 | ], |
| 985 | 'condition' => [ |
| 986 | 'eael_infobox_hover_img_shape' => 'radius', |
| 987 | 'eael_infobox_img_or_icon' => 'img', |
| 988 | ], |
| 989 | ] |
| 990 | ); |
| 991 | |
| 992 | $this->end_controls_tab(); |
| 993 | |
| 994 | $this->end_controls_tabs(); |
| 995 | |
| 996 | $this->add_responsive_control( |
| 997 | 'eael_infobox_image_resizer', |
| 998 | [ |
| 999 | 'label' => esc_html__('Width', 'essential-addons-for-elementor-lite'), |
| 1000 | 'type' => Controls_Manager::SLIDER, |
| 1001 | 'default' => [ |
| 1002 | 'size' => 100, |
| 1003 | ], |
| 1004 | 'range' => [ |
| 1005 | 'px' => [ |
| 1006 | 'max' => 500, |
| 1007 | ], |
| 1008 | ], |
| 1009 | 'separator' => 'before', |
| 1010 | 'selectors' => [ |
| 1011 | '{{WRAPPER}} .eael-infobox .infobox-icon img' => 'width: {{SIZE}}px;', |
| 1012 | '{{WRAPPER}} .eael-infobox.icon-on-left .infobox-icon' => 'width: {{SIZE}}px;', |
| 1013 | '{{WRAPPER}} .eael-infobox.icon-on-right .infobox-icon' => 'width: {{SIZE}}px;', |
| 1014 | ] |
| 1015 | ] |
| 1016 | ); |
| 1017 | |
| 1018 | $this->add_responsive_control( |
| 1019 | 'eael_infobox_image_height', |
| 1020 | [ |
| 1021 | 'label' => esc_html__('Height', 'essential-addons-for-elementor-lite'), |
| 1022 | 'type' => Controls_Manager::SLIDER, |
| 1023 | 'range' => [ |
| 1024 | 'px' => [ |
| 1025 | 'max' => 500, |
| 1026 | ], |
| 1027 | ], |
| 1028 | 'selectors' => [ |
| 1029 | '{{WRAPPER}} .eael-infobox .infobox-icon img' => 'height: {{SIZE}}px;', |
| 1030 | '{{WRAPPER}} .eael-infobox.icon-on-left .infobox-icon' => 'height: {{SIZE}}px;', |
| 1031 | '{{WRAPPER}} .eael-infobox.icon-on-right .infobox-icon' => 'height: {{SIZE}}px;', |
| 1032 | ] |
| 1033 | ] |
| 1034 | ); |
| 1035 | |
| 1036 | $this->add_group_control( |
| 1037 | Group_Control_Image_Size::get_type(), |
| 1038 | [ |
| 1039 | 'name' => 'thumbnail', |
| 1040 | 'default' => 'full', |
| 1041 | 'condition' => [ |
| 1042 | 'eael_infobox_image[url]!' => '', |
| 1043 | 'eael_infobox_img_or_icon' => 'img', |
| 1044 | ], |
| 1045 | |
| 1046 | ] |
| 1047 | ); |
| 1048 | |
| 1049 | $this->add_responsive_control( |
| 1050 | 'eael_infobox_image_icon_padding', |
| 1051 | [ |
| 1052 | 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'), |
| 1053 | 'type' => Controls_Manager::DIMENSIONS, |
| 1054 | 'size_units' => ['px', 'em', '%'], |
| 1055 | 'selectors' => [ |
| 1056 | '{{WRAPPER}} .eael-infobox .infobox-icon img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1057 | ], |
| 1058 | ] |
| 1059 | ); |
| 1060 | |
| 1061 | $this->add_responsive_control( |
| 1062 | 'eael_infobox_img_margin', |
| 1063 | [ |
| 1064 | 'label' => esc_html__('Margin', 'essential-addons-for-elementor-lite'), |
| 1065 | 'type' => Controls_Manager::DIMENSIONS, |
| 1066 | 'size_units' => ['px', 'em', '%'], |
| 1067 | 'selectors' => [ |
| 1068 | '{{WRAPPER}} .eael-infobox .infobox-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1069 | ], |
| 1070 | ] |
| 1071 | ); |
| 1072 | |
| 1073 | $this->end_controls_section(); |
| 1074 | |
| 1075 | /** |
| 1076 | * ------------------------------------------- |
| 1077 | * Tab Style (Info Box Number Icon Style) |
| 1078 | * ------------------------------------------- |
| 1079 | */ |
| 1080 | $this->start_controls_section( |
| 1081 | 'eael_section_infobox_number_icon_style_settings', |
| 1082 | [ |
| 1083 | 'label' => esc_html__('Number Icon', 'essential-addons-for-elementor-lite'), |
| 1084 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1085 | 'condition' => [ |
| 1086 | 'eael_infobox_img_or_icon' => 'number', |
| 1087 | ], |
| 1088 | ] |
| 1089 | ); |
| 1090 | |
| 1091 | $this->add_group_control( |
| 1092 | Group_Control_Typography::get_type(), |
| 1093 | [ |
| 1094 | 'name' => 'eael_infobox_number_icon_typography', |
| 1095 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-number', |
| 1096 | ] |
| 1097 | ); |
| 1098 | |
| 1099 | $this->add_responsive_control( |
| 1100 | 'eael_infobox_number_icon_bg_size', |
| 1101 | [ |
| 1102 | 'label' => __('Icon Background Size', 'essential-addons-for-elementor-lite'), |
| 1103 | 'type' => Controls_Manager::SLIDER, |
| 1104 | 'default' => [ |
| 1105 | 'size' => 90, |
| 1106 | ], |
| 1107 | 'range' => [ |
| 1108 | 'px' => [ |
| 1109 | 'min' => 0, |
| 1110 | 'max' => 300, |
| 1111 | 'step' => 1, |
| 1112 | ], |
| 1113 | ], |
| 1114 | 'selectors' => [ |
| 1115 | '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-wrap' => 'width: {{SIZE}}px; height: {{SIZE}}px;', |
| 1116 | ], |
| 1117 | 'condition' => [ |
| 1118 | 'eael_infobox_icon_bg_shape!' => 'none', |
| 1119 | ], |
| 1120 | ] |
| 1121 | ); |
| 1122 | |
| 1123 | $this->add_responsive_control( |
| 1124 | 'eael_infobox_number_icon_margin', |
| 1125 | [ |
| 1126 | 'label' => esc_html__('Margin', 'essential-addons-for-elementor-lite'), |
| 1127 | 'type' => Controls_Manager::DIMENSIONS, |
| 1128 | 'size_units' => ['px', 'em', '%'], |
| 1129 | 'selectors' => [ |
| 1130 | '{{WRAPPER}} .eael-infobox .infobox-icon-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1131 | ], |
| 1132 | ] |
| 1133 | ); |
| 1134 | |
| 1135 | $this->start_controls_tabs('eael_infobox_numbericon_style_controls'); |
| 1136 | |
| 1137 | $this->start_controls_tab( |
| 1138 | 'eael_infobox_number_icon_normal', |
| 1139 | [ |
| 1140 | 'label' => esc_html__('Normal', 'essential-addons-for-elementor-lite'), |
| 1141 | ] |
| 1142 | ); |
| 1143 | |
| 1144 | $this->add_control( |
| 1145 | 'eael_infobox_number_icon_color', |
| 1146 | [ |
| 1147 | 'label' => esc_html__('Icon Color', 'essential-addons-for-elementor-lite'), |
| 1148 | 'type' => Controls_Manager::COLOR, |
| 1149 | 'default' => '#4d4d4d', |
| 1150 | 'selectors' => [ |
| 1151 | '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-number' => 'color: {{VALUE}};', |
| 1152 | '{{WRAPPER}} .eael-infobox.icon-beside-title .infobox-content .title figure .infobox-icon-number' => 'color: {{VALUE}};', |
| 1153 | ], |
| 1154 | ] |
| 1155 | ); |
| 1156 | |
| 1157 | $this->add_control( |
| 1158 | 'eael_infobox_number_icon_bg_color', |
| 1159 | [ |
| 1160 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 1161 | 'type' => Controls_Manager::COLOR, |
| 1162 | 'default' => '', |
| 1163 | 'selectors' => [ |
| 1164 | '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-wrap' => 'background: {{VALUE}};', |
| 1165 | ], |
| 1166 | 'condition' => [ |
| 1167 | 'eael_infobox_icon_bg_shape!' => 'none', |
| 1168 | ], |
| 1169 | ] |
| 1170 | ); |
| 1171 | |
| 1172 | $this->add_control( |
| 1173 | 'eael_infobox_number_icon_bg_shape', |
| 1174 | [ |
| 1175 | 'label' => esc_html__('Background Shape', 'essential-addons-for-elementor-lite'), |
| 1176 | 'type' => Controls_Manager::SELECT, |
| 1177 | 'default' => 'none', |
| 1178 | 'label_block' => false, |
| 1179 | 'options' => [ |
| 1180 | 'none' => esc_html__('None', 'essential-addons-for-elementor-lite'), |
| 1181 | 'circle' => esc_html__('Circle', 'essential-addons-for-elementor-lite'), |
| 1182 | 'radius' => esc_html__('Radius', 'essential-addons-for-elementor-lite'), |
| 1183 | 'square' => esc_html__('Square', 'essential-addons-for-elementor-lite'), |
| 1184 | ], |
| 1185 | 'prefix_class' => 'eael-infobox-icon-bg-shape-', |
| 1186 | ] |
| 1187 | ); |
| 1188 | |
| 1189 | $this->add_group_control( |
| 1190 | Group_Control_Border::get_type(), |
| 1191 | [ |
| 1192 | 'name' => 'eael_infobox_number_icon_border', |
| 1193 | 'label' => esc_html__('Border', 'essential-addons-for-elementor-lite'), |
| 1194 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon-wrap', |
| 1195 | ] |
| 1196 | ); |
| 1197 | |
| 1198 | $this->add_group_control( |
| 1199 | Group_Control_Box_Shadow::get_type(), |
| 1200 | [ |
| 1201 | 'name' => 'eael_infobox_number_icon_shadow', |
| 1202 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon-wrap', |
| 1203 | ] |
| 1204 | ); |
| 1205 | |
| 1206 | $this->end_controls_tab(); |
| 1207 | |
| 1208 | $this->start_controls_tab( |
| 1209 | 'eael_infobox_number_icon_hover', |
| 1210 | [ |
| 1211 | 'label' => esc_html__('Hover', 'essential-addons-for-elementor-lite'), |
| 1212 | ] |
| 1213 | ); |
| 1214 | |
| 1215 | $this->add_control( |
| 1216 | 'eael_infobox_number_icon_hover_animation', |
| 1217 | [ |
| 1218 | 'label' => esc_html__('Animation', 'essential-addons-for-elementor-lite'), |
| 1219 | 'type' => Controls_Manager::HOVER_ANIMATION, |
| 1220 | ] |
| 1221 | ); |
| 1222 | |
| 1223 | $this->add_control( |
| 1224 | 'eael_infobox_number_icon_hover_color', |
| 1225 | [ |
| 1226 | 'label' => esc_html__('Icon Color', 'essential-addons-for-elementor-lite'), |
| 1227 | 'type' => Controls_Manager::COLOR, |
| 1228 | 'default' => '#4d4d4d', |
| 1229 | 'selectors' => [ |
| 1230 | '{{WRAPPER}} .eael-infobox:hover .infobox-icon .infobox-icon-number' => 'color: {{VALUE}};', |
| 1231 | '{{WRAPPER}} .eael-infobox.icon-beside-title:hover .infobox-content .title figure .infobox-icon-number' => 'color: {{VALUE}};', |
| 1232 | ], |
| 1233 | ] |
| 1234 | ); |
| 1235 | |
| 1236 | $this->add_control( |
| 1237 | 'eael_infobox_number_icon_hover_bg_color', |
| 1238 | [ |
| 1239 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 1240 | 'type' => Controls_Manager::COLOR, |
| 1241 | 'default' => '', |
| 1242 | 'selectors' => [ |
| 1243 | '{{WRAPPER}} .eael-infobox:hover .infobox-icon .infobox-icon-wrap' => 'background: {{VALUE}};', |
| 1244 | ], |
| 1245 | 'condition' => [ |
| 1246 | 'eael_infobox_img_type!' => ['img-on-left', 'img-on-right'], |
| 1247 | 'eael_infobox_icon_bg_shape!' => 'none', |
| 1248 | ], |
| 1249 | ] |
| 1250 | ); |
| 1251 | |
| 1252 | $this->add_control( |
| 1253 | 'eael_infobox_number_icon_hover_bg_shape', |
| 1254 | [ |
| 1255 | 'label' => esc_html__('Background Shape', 'essential-addons-for-elementor-lite'), |
| 1256 | 'type' => Controls_Manager::SELECT, |
| 1257 | 'default' => 'none', |
| 1258 | 'label_block' => false, |
| 1259 | 'options' => [ |
| 1260 | 'none' => esc_html__('None', 'essential-addons-for-elementor-lite'), |
| 1261 | 'circle' => esc_html__('Circle', 'essential-addons-for-elementor-lite'), |
| 1262 | 'radius' => esc_html__('Radius', 'essential-addons-for-elementor-lite'), |
| 1263 | 'square' => esc_html__('Square', 'essential-addons-for-elementor-lite'), |
| 1264 | ], |
| 1265 | 'prefix_class' => 'eael-infobox-icon-hover-bg-shape-', |
| 1266 | ] |
| 1267 | ); |
| 1268 | |
| 1269 | $this->add_group_control( |
| 1270 | Group_Control_Border::get_type(), |
| 1271 | [ |
| 1272 | 'name' => 'eael_infobox_hover_number_icon_border', |
| 1273 | 'label' => esc_html__('Border', 'essential-addons-for-elementor-lite'), |
| 1274 | 'selector' => '{{WRAPPER}} .eael-infobox:hover .infobox-icon-wrap', |
| 1275 | ] |
| 1276 | ); |
| 1277 | |
| 1278 | $this->add_group_control( |
| 1279 | Group_Control_Box_Shadow::get_type(), |
| 1280 | [ |
| 1281 | 'name' => 'eael_infobox_number_icon_hover_shadow', |
| 1282 | 'selector' => '{{WRAPPER}} .eael-infobox:hover .infobox-icon-wrap', |
| 1283 | ] |
| 1284 | ); |
| 1285 | |
| 1286 | $this->end_controls_tab(); |
| 1287 | |
| 1288 | $this->end_controls_tabs(); |
| 1289 | |
| 1290 | $this->end_controls_section(); |
| 1291 | |
| 1292 | /** |
| 1293 | * ------------------------------------------- |
| 1294 | * Tab Style (Info Box Icon Style) |
| 1295 | * ------------------------------------------- |
| 1296 | */ |
| 1297 | $this->start_controls_section( |
| 1298 | 'eael_section_infobox_icon_style_settings', |
| 1299 | [ |
| 1300 | 'label' => esc_html__('Icon', 'essential-addons-for-elementor-lite'), |
| 1301 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1302 | 'condition' => [ |
| 1303 | 'eael_infobox_img_or_icon' => 'icon', |
| 1304 | ], |
| 1305 | ] |
| 1306 | ); |
| 1307 | |
| 1308 | $this->add_responsive_control( |
| 1309 | 'eael_infobox_icon_size', |
| 1310 | [ |
| 1311 | 'label' => __('Size', 'essential-addons-for-elementor-lite'), |
| 1312 | 'type' => Controls_Manager::SLIDER, |
| 1313 | 'default' => [ |
| 1314 | 'size' => 40, |
| 1315 | ], |
| 1316 | 'range' => [ |
| 1317 | 'px' => [ |
| 1318 | 'min' => 20, |
| 1319 | 'max' => 100, |
| 1320 | 'step' => 1, |
| 1321 | ], |
| 1322 | ], |
| 1323 | 'selectors' => [ |
| 1324 | '{{WRAPPER}} .eael-infobox .infobox-icon i' => 'font-size: {{SIZE}}px;', |
| 1325 | '{{WRAPPER}} .eael-infobox .infobox-icon svg' => 'height: {{SIZE}}px; width: {{SIZE}}px;', |
| 1326 | '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-wrap img' => 'height: {{SIZE}}px; width: {{SIZE}}px;', |
| 1327 | ], |
| 1328 | ] |
| 1329 | ); |
| 1330 | |
| 1331 | $this->add_responsive_control( |
| 1332 | 'eael_infobox_icon_bg_size', |
| 1333 | [ |
| 1334 | 'label' => __('Icon Background Size', 'essential-addons-for-elementor-lite'), |
| 1335 | 'type' => Controls_Manager::SLIDER, |
| 1336 | 'default' => [ |
| 1337 | 'size' => 90, |
| 1338 | ], |
| 1339 | 'range' => [ |
| 1340 | 'px' => [ |
| 1341 | 'min' => 0, |
| 1342 | 'max' => 300, |
| 1343 | 'step' => 1, |
| 1344 | ], |
| 1345 | ], |
| 1346 | 'selectors' => [ |
| 1347 | '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-wrap' => 'width: {{SIZE}}px; height: {{SIZE}}px;', |
| 1348 | ], |
| 1349 | 'condition' => [ |
| 1350 | 'eael_infobox_icon_bg_shape!' => 'none', |
| 1351 | ], |
| 1352 | ] |
| 1353 | ); |
| 1354 | |
| 1355 | $this->add_responsive_control( |
| 1356 | 'eael_infobox_icon_margin', |
| 1357 | [ |
| 1358 | 'label' => esc_html__('Margin', 'essential-addons-for-elementor-lite'), |
| 1359 | 'type' => Controls_Manager::DIMENSIONS, |
| 1360 | 'size_units' => ['px', 'em', '%'], |
| 1361 | 'selectors' => [ |
| 1362 | '{{WRAPPER}} .eael-infobox .infobox-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1363 | ], |
| 1364 | ] |
| 1365 | ); |
| 1366 | |
| 1367 | $this->start_controls_tabs('eael_infobox_icon_style_controls'); |
| 1368 | |
| 1369 | $this->start_controls_tab( |
| 1370 | 'eael_infobox_icon_normal', |
| 1371 | [ |
| 1372 | 'label' => esc_html__('Normal', 'essential-addons-for-elementor-lite'), |
| 1373 | ] |
| 1374 | ); |
| 1375 | |
| 1376 | $this->add_control( |
| 1377 | 'eael_infobox_icon_color', |
| 1378 | [ |
| 1379 | 'label' => esc_html__('Color', 'essential-addons-for-elementor-lite'), |
| 1380 | 'type' => Controls_Manager::COLOR, |
| 1381 | 'default' => '#4d4d4d', |
| 1382 | 'selectors' => [ |
| 1383 | '{{WRAPPER}} .eael-infobox .infobox-icon i' => 'color: {{VALUE}};', |
| 1384 | '{{WRAPPER}} .eael-infobox .infobox-icon svg' => 'fill: {{VALUE}};', |
| 1385 | '{{WRAPPER}} .eael-infobox.icon-beside-title .infobox-content .title figure i' => 'color: {{VALUE}};', |
| 1386 | ], |
| 1387 | ] |
| 1388 | ); |
| 1389 | |
| 1390 | $this->add_control( |
| 1391 | 'eael_infobox_icon_bg_shape', |
| 1392 | [ |
| 1393 | 'label' => esc_html__('Background Shape', 'essential-addons-for-elementor-lite'), |
| 1394 | 'type' => Controls_Manager::SELECT, |
| 1395 | 'default' => 'none', |
| 1396 | 'label_block' => false, |
| 1397 | 'options' => [ |
| 1398 | 'none' => esc_html__('None', 'essential-addons-for-elementor-lite'), |
| 1399 | 'circle' => esc_html__('Circle', 'essential-addons-for-elementor-lite'), |
| 1400 | 'radius' => esc_html__('Radius', 'essential-addons-for-elementor-lite'), |
| 1401 | 'square' => esc_html__('Square', 'essential-addons-for-elementor-lite'), |
| 1402 | ], |
| 1403 | 'prefix_class' => 'eael-infobox-icon-bg-shape-', |
| 1404 | ] |
| 1405 | ); |
| 1406 | |
| 1407 | $this->add_control( |
| 1408 | 'eael_infobox_icon_bg_color', |
| 1409 | [ |
| 1410 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 1411 | 'type' => Controls_Manager::COLOR, |
| 1412 | 'default' => '', |
| 1413 | 'selectors' => [ |
| 1414 | '{{WRAPPER}} .eael-infobox .infobox-icon .infobox-icon-wrap' => 'background: {{VALUE}};', |
| 1415 | ], |
| 1416 | 'condition' => [ |
| 1417 | 'eael_infobox_icon_bg_shape!' => 'none', |
| 1418 | ], |
| 1419 | ] |
| 1420 | ); |
| 1421 | |
| 1422 | $this->add_group_control( |
| 1423 | Group_Control_Border::get_type(), |
| 1424 | [ |
| 1425 | 'name' => 'eael_infobox_icon_border', |
| 1426 | 'label' => esc_html__('Border', 'essential-addons-for-elementor-lite'), |
| 1427 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon-wrap', |
| 1428 | ] |
| 1429 | ); |
| 1430 | |
| 1431 | $this->add_group_control( |
| 1432 | Group_Control_Box_Shadow::get_type(), |
| 1433 | [ |
| 1434 | 'name' => 'eael_infobox_icon_shadow', |
| 1435 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-icon-wrap', |
| 1436 | ] |
| 1437 | ); |
| 1438 | |
| 1439 | $this->end_controls_tab(); |
| 1440 | |
| 1441 | $this->start_controls_tab( |
| 1442 | 'eael_infobox_icon_hover', |
| 1443 | [ |
| 1444 | 'label' => esc_html__('Hover', 'essential-addons-for-elementor-lite'), |
| 1445 | ] |
| 1446 | ); |
| 1447 | |
| 1448 | $this->add_control( |
| 1449 | 'eael_infobox_icon_hover_animation', |
| 1450 | [ |
| 1451 | 'label' => esc_html__('Animation', 'essential-addons-for-elementor-lite'), |
| 1452 | 'type' => Controls_Manager::HOVER_ANIMATION, |
| 1453 | ] |
| 1454 | ); |
| 1455 | |
| 1456 | $this->add_control( |
| 1457 | 'eael_infobox_icon_hover_color', |
| 1458 | [ |
| 1459 | 'label' => esc_html__('Icon Color', 'essential-addons-for-elementor-lite'), |
| 1460 | 'type' => Controls_Manager::COLOR, |
| 1461 | 'default' => '#4d4d4d', |
| 1462 | 'selectors' => [ |
| 1463 | '{{WRAPPER}} .eael-infobox:hover .infobox-icon i' => 'color: {{VALUE}};', |
| 1464 | '{{WRAPPER}} .eael-infobox:hover .infobox-icon svg' => 'fill: {{VALUE}};', |
| 1465 | '{{WRAPPER}} .eael-infobox.icon-beside-title:hover .infobox-content .title figure i' => 'color: {{VALUE}};', |
| 1466 | ], |
| 1467 | ] |
| 1468 | ); |
| 1469 | |
| 1470 | $this->add_control( |
| 1471 | 'eael_infobox_icon_hover_bg_color', |
| 1472 | [ |
| 1473 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 1474 | 'type' => Controls_Manager::COLOR, |
| 1475 | 'default' => '', |
| 1476 | 'selectors' => [ |
| 1477 | '{{WRAPPER}} .eael-infobox:hover .infobox-icon .infobox-icon-wrap' => 'background: {{VALUE}};', |
| 1478 | ], |
| 1479 | 'condition' => [ |
| 1480 | 'eael_infobox_img_type!' => ['img-on-left', 'img-on-right'], |
| 1481 | 'eael_infobox_icon_bg_shape!' => 'none', |
| 1482 | ], |
| 1483 | ] |
| 1484 | ); |
| 1485 | |
| 1486 | $this->add_control( |
| 1487 | 'eael_infobox_icon_hover_bg_shape', |
| 1488 | [ |
| 1489 | 'label' => esc_html__('Background Shape', 'essential-addons-for-elementor-lite'), |
| 1490 | 'type' => Controls_Manager::SELECT, |
| 1491 | 'default' => 'none', |
| 1492 | 'label_block' => false, |
| 1493 | 'options' => [ |
| 1494 | 'none' => esc_html__('None', 'essential-addons-for-elementor-lite'), |
| 1495 | 'circle' => esc_html__('Circle', 'essential-addons-for-elementor-lite'), |
| 1496 | 'radius' => esc_html__('Radius', 'essential-addons-for-elementor-lite'), |
| 1497 | 'square' => esc_html__('Square', 'essential-addons-for-elementor-lite'), |
| 1498 | ], |
| 1499 | 'prefix_class' => 'eael-infobox-icon-hover-bg-shape-', |
| 1500 | ] |
| 1501 | ); |
| 1502 | |
| 1503 | $this->add_group_control( |
| 1504 | Group_Control_Border::get_type(), |
| 1505 | [ |
| 1506 | 'name' => 'eael_infobox_hover_icon_border', |
| 1507 | 'label' => esc_html__('Border', 'essential-addons-for-elementor-lite'), |
| 1508 | 'selector' => '{{WRAPPER}} .eael-infobox:hover .infobox-icon-wrap', |
| 1509 | ] |
| 1510 | ); |
| 1511 | |
| 1512 | $this->add_group_control( |
| 1513 | Group_Control_Box_Shadow::get_type(), |
| 1514 | [ |
| 1515 | 'name' => 'eael_infobox_icon_hover_shadow', |
| 1516 | 'selector' => '{{WRAPPER}} .eael-infobox:hover .infobox-icon-wrap', |
| 1517 | ] |
| 1518 | ); |
| 1519 | |
| 1520 | $this->end_controls_tab(); |
| 1521 | |
| 1522 | $this->end_controls_tabs(); |
| 1523 | |
| 1524 | $this->end_controls_section(); |
| 1525 | |
| 1526 | /** |
| 1527 | * ------------------------------------------- |
| 1528 | * Tab Style ( Info Box Button Style ) |
| 1529 | * ------------------------------------------- |
| 1530 | */ |
| 1531 | $this->start_controls_section( |
| 1532 | 'eael_section_infobox_button_settings', |
| 1533 | [ |
| 1534 | 'label' => esc_html__('Button', 'essential-addons-for-elementor-lite'), |
| 1535 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1536 | 'condition' => [ |
| 1537 | 'eael_show_infobox_button' => 'yes', |
| 1538 | ], |
| 1539 | ] |
| 1540 | ); |
| 1541 | |
| 1542 | $this->add_group_control( |
| 1543 | Group_Control_Typography::get_type(), |
| 1544 | [ |
| 1545 | 'name' => 'eael_infobox_button_typography', |
| 1546 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-button .eael-infobox-button .infobox-button-text', |
| 1547 | ] |
| 1548 | ); |
| 1549 | |
| 1550 | $this->add_responsive_control( |
| 1551 | 'eael_infobox_button_icon_size', |
| 1552 | [ |
| 1553 | 'label' => __('Icon Size', 'essential-addons-for-elementor-lite'), |
| 1554 | 'type' => Controls_Manager::SLIDER, |
| 1555 | 'default' => [ |
| 1556 | 'size' => 16, |
| 1557 | 'unit' => 'px', |
| 1558 | ], |
| 1559 | 'size_units' => ['px'], |
| 1560 | 'range' => [ |
| 1561 | 'px' => [ |
| 1562 | 'min' => 0, |
| 1563 | 'max' => 100, |
| 1564 | 'step' => 1, |
| 1565 | ], |
| 1566 | ], |
| 1567 | 'selectors' => [ |
| 1568 | '{{WRAPPER}} .eael-infobox .infobox-button .eael-infobox-button i' => 'font-size: {{SIZE}}{{UNIT}};', |
| 1569 | '{{WRAPPER}} .eael-infobox .infobox-button .eael-infobox-button img' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};', |
| 1570 | '{{WRAPPER}} .eael-infobox .infobox-button .eael-infobox-button svg' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};', |
| 1571 | ], |
| 1572 | ] |
| 1573 | ); |
| 1574 | |
| 1575 | $this->add_responsive_control( |
| 1576 | 'eael_infobox_button_margin', |
| 1577 | [ |
| 1578 | 'label' => esc_html__('Margin', 'essential-addons-for-elementor-lite'), |
| 1579 | 'type' => Controls_Manager::DIMENSIONS, |
| 1580 | 'size_units' => ['px', 'em'], |
| 1581 | 'selectors' => [ |
| 1582 | '{{WRAPPER}} .eael-infobox .infobox-button a.eael-infobox-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1583 | ], |
| 1584 | ] |
| 1585 | ); |
| 1586 | |
| 1587 | $this->add_responsive_control( |
| 1588 | 'eael_creative_button_padding', |
| 1589 | [ |
| 1590 | 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'), |
| 1591 | 'type' => Controls_Manager::DIMENSIONS, |
| 1592 | 'size_units' => ['px', 'em'], |
| 1593 | 'selectors' => [ |
| 1594 | '{{WRAPPER}} .eael-infobox .infobox-button a.eael-infobox-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1595 | ], |
| 1596 | ] |
| 1597 | ); |
| 1598 | |
| 1599 | $this->add_control( |
| 1600 | 'eael_infobox_button_border_radius', |
| 1601 | [ |
| 1602 | 'label' => esc_html__('Border Radius', 'essential-addons-for-elementor-lite'), |
| 1603 | 'type' => Controls_Manager::SLIDER, |
| 1604 | 'range' => [ |
| 1605 | 'px' => [ |
| 1606 | 'max' => 100, |
| 1607 | ], |
| 1608 | ], |
| 1609 | 'selectors' => [ |
| 1610 | '{{WRAPPER}} .eael-infobox .infobox-button a.eael-infobox-button' => 'border-radius: {{SIZE}}px;', |
| 1611 | ], |
| 1612 | ] |
| 1613 | ); |
| 1614 | |
| 1615 | $this->start_controls_tabs('infobox_button_styles_controls_tabs'); |
| 1616 | |
| 1617 | $this->start_controls_tab('infobox_button_normal', [ |
| 1618 | 'label' => esc_html__('Normal', 'essential-addons-for-elementor-lite'), |
| 1619 | ]); |
| 1620 | |
| 1621 | $this->add_control( |
| 1622 | 'eael_infobox_button_text_color', |
| 1623 | [ |
| 1624 | 'label' => esc_html__('Text Color', 'essential-addons-for-elementor-lite'), |
| 1625 | 'type' => Controls_Manager::COLOR, |
| 1626 | 'default' => '#ffffff', |
| 1627 | 'selectors' => [ |
| 1628 | '{{WRAPPER}} .eael-infobox .eael-infobox-button' => 'color: {{VALUE}};', |
| 1629 | '{{WRAPPER}} .eael-infobox .eael-infobox-button svg' => 'fill: {{VALUE}};', |
| 1630 | ], |
| 1631 | ] |
| 1632 | ); |
| 1633 | |
| 1634 | $this->add_group_control( |
| 1635 | \Elementor\Group_Control_Background::get_type(), |
| 1636 | [ |
| 1637 | 'name' => 'eael_infobox_button_background', |
| 1638 | 'types' => [ 'classic', 'gradient' ], |
| 1639 | 'fields_options' => [ |
| 1640 | 'background' => [ |
| 1641 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 1642 | 'default' => 'classic', |
| 1643 | ], |
| 1644 | 'color' => [ |
| 1645 | 'default' => '#333333', |
| 1646 | ], |
| 1647 | ], |
| 1648 | 'selector' => '{{WRAPPER}} .eael-infobox .eael-infobox-button', |
| 1649 | ] |
| 1650 | ); |
| 1651 | |
| 1652 | $this->add_group_control( |
| 1653 | Group_Control_Border::get_type(), |
| 1654 | [ |
| 1655 | 'name' => 'eael_infobox_button_border', |
| 1656 | 'selector' => '{{WRAPPER}} .eael-infobox .eael-infobox-button', |
| 1657 | ] |
| 1658 | ); |
| 1659 | |
| 1660 | $this->add_group_control( |
| 1661 | Group_Control_Box_Shadow::get_type(), |
| 1662 | [ |
| 1663 | 'name' => 'button_box_shadow', |
| 1664 | 'selector' => '{{WRAPPER}} .eael-infobox .eael-infobox-button', |
| 1665 | ] |
| 1666 | ); |
| 1667 | |
| 1668 | $this->end_controls_tab(); |
| 1669 | |
| 1670 | $this->start_controls_tab('infobox_button_hover', [ |
| 1671 | 'label' => esc_html__('Hover', 'essential-addons-for-elementor-lite'), |
| 1672 | ]); |
| 1673 | |
| 1674 | $this->add_control( |
| 1675 | 'eael_infobox_button_hover_text_color', |
| 1676 | [ |
| 1677 | 'label' => esc_html__('Text Color', 'essential-addons-for-elementor-lite'), |
| 1678 | 'type' => Controls_Manager::COLOR, |
| 1679 | 'default' => '#ffffff', |
| 1680 | 'selectors' => [ |
| 1681 | '{{WRAPPER}} .eael-infobox .eael-infobox-button:hover' => 'color: {{VALUE}};', |
| 1682 | '{{WRAPPER}} .eael-infobox .eael-infobox-button:hover svg' => 'fill: {{VALUE}};', |
| 1683 | ], |
| 1684 | ] |
| 1685 | ); |
| 1686 | |
| 1687 | $this->add_control( |
| 1688 | 'eael_infobox_button_hover_background_color', |
| 1689 | [ |
| 1690 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 1691 | 'type' => Controls_Manager::COLOR, |
| 1692 | 'default' => '#333333', |
| 1693 | 'selectors' => [ |
| 1694 | '{{WRAPPER}} .eael-infobox .eael-infobox-button:hover' => 'background: {{VALUE}};', |
| 1695 | ], |
| 1696 | ] |
| 1697 | ); |
| 1698 | |
| 1699 | $this->add_group_control( |
| 1700 | Group_Control_Border::get_type(), |
| 1701 | [ |
| 1702 | 'name' => 'eael_infobox_button_hover_border', |
| 1703 | 'selector' => '{{WRAPPER}} .eael-infobox .eael-infobox-button:hover', |
| 1704 | ] |
| 1705 | ); |
| 1706 | |
| 1707 | $this->add_group_control( |
| 1708 | Group_Control_Box_Shadow::get_type(), |
| 1709 | [ |
| 1710 | 'name' => 'button_hover_box_shadow', |
| 1711 | 'selector' => '{{WRAPPER}} .eael-infobox .eael-infobox-button:hover', |
| 1712 | ] |
| 1713 | ); |
| 1714 | |
| 1715 | $this->end_controls_tab(); |
| 1716 | |
| 1717 | $this->end_controls_tabs(); |
| 1718 | |
| 1719 | $this->end_controls_section(); |
| 1720 | |
| 1721 | /** |
| 1722 | * ------------------------------------------- |
| 1723 | * Tab Style (Info Box Title Style) |
| 1724 | * ------------------------------------------- |
| 1725 | */ |
| 1726 | $this->start_controls_section( |
| 1727 | 'eael_section_infobox_title_style_settings', |
| 1728 | [ |
| 1729 | 'label' => esc_html__('Color & Typography', 'essential-addons-for-elementor-lite'), |
| 1730 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1731 | ] |
| 1732 | ); |
| 1733 | |
| 1734 | $this->start_controls_tabs('infobox_content_hover_style_tab'); |
| 1735 | |
| 1736 | $this->start_controls_tab('infobox_content_normal_style', [ |
| 1737 | 'label' => esc_html__('Normal', 'essential-addons-for-elementor-lite'), |
| 1738 | ]); |
| 1739 | |
| 1740 | $this->add_control( |
| 1741 | 'eael_infobox_title_heading', |
| 1742 | [ |
| 1743 | 'label' => esc_html__('Title', 'essential-addons-for-elementor-lite'), |
| 1744 | 'type' => Controls_Manager::HEADING, |
| 1745 | ] |
| 1746 | ); |
| 1747 | |
| 1748 | $this->add_group_control( |
| 1749 | EAEL_Gradient_Text::get_type(), |
| 1750 | [ |
| 1751 | 'name' => 'eael_infobox_title', |
| 1752 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-content .title', |
| 1753 | 'default' => '#4d4d4d', |
| 1754 | ] |
| 1755 | ); |
| 1756 | |
| 1757 | $this->add_group_control( |
| 1758 | Group_Control_Typography::get_type(), |
| 1759 | [ |
| 1760 | 'name' => 'eael_infobox_title_typography', |
| 1761 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-content .title', |
| 1762 | ] |
| 1763 | ); |
| 1764 | |
| 1765 | $this->add_responsive_control( |
| 1766 | 'eael_infobox_title_margin', |
| 1767 | [ |
| 1768 | 'label' => esc_html__('Margin', 'essential-addons-for-elementor-lite'), |
| 1769 | 'type' => Controls_Manager::DIMENSIONS, |
| 1770 | 'size_units' => ['px', 'em', '%'], |
| 1771 | 'selectors' => [ |
| 1772 | '{{WRAPPER}} .eael-infobox .infobox-content .title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1773 | ], |
| 1774 | ] |
| 1775 | ); |
| 1776 | |
| 1777 | $this->add_control( |
| 1778 | 'eael_infobox_sub_title_heading', |
| 1779 | [ |
| 1780 | 'label' => esc_html__('Sub Title', 'essential-addons-for-elementor-lite'), |
| 1781 | 'type' => Controls_Manager::HEADING, |
| 1782 | 'separator' => 'before', |
| 1783 | 'condition' => [ |
| 1784 | 'eael_infobox_show_sub_title' => 'yes', |
| 1785 | ], |
| 1786 | ] |
| 1787 | ); |
| 1788 | |
| 1789 | $this->add_group_control( |
| 1790 | EAEL_Gradient_Text::get_type(), |
| 1791 | [ |
| 1792 | 'name' => 'eael_infobox_sub_title', |
| 1793 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-content .sub_title', |
| 1794 | 'default' => '#4d4d4d', |
| 1795 | 'condition' => [ |
| 1796 | 'eael_infobox_show_sub_title' => 'yes', |
| 1797 | ], |
| 1798 | ] |
| 1799 | ); |
| 1800 | |
| 1801 | $this->add_group_control( |
| 1802 | Group_Control_Typography::get_type(), |
| 1803 | [ |
| 1804 | 'name' => 'eael_infobox_sub_title_typography', |
| 1805 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-content .sub_title', |
| 1806 | 'condition' => [ |
| 1807 | 'eael_infobox_show_sub_title' => 'yes', |
| 1808 | ], |
| 1809 | ] |
| 1810 | ); |
| 1811 | |
| 1812 | $this->add_responsive_control( |
| 1813 | 'eael_infobox_sub_title_margin', |
| 1814 | [ |
| 1815 | 'label' => esc_html__('Margin', 'essential-addons-for-elementor-lite'), |
| 1816 | 'type' => Controls_Manager::DIMENSIONS, |
| 1817 | 'size_units' => ['px', 'em', '%'], |
| 1818 | 'selectors' => [ |
| 1819 | '{{WRAPPER}} .eael-infobox .infobox-content .sub_title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1820 | ], |
| 1821 | 'condition' => [ |
| 1822 | 'eael_infobox_show_sub_title' => 'yes', |
| 1823 | ], |
| 1824 | ] |
| 1825 | ); |
| 1826 | |
| 1827 | $this->add_responsive_control( |
| 1828 | 'eael_infobox_sub_title_padding', |
| 1829 | [ |
| 1830 | 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'), |
| 1831 | 'type' => Controls_Manager::DIMENSIONS, |
| 1832 | 'size_units' => ['px', 'em', '%'], |
| 1833 | 'selectors' => [ |
| 1834 | '{{WRAPPER}} .eael-infobox .infobox-content .sub_title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1835 | ], |
| 1836 | 'condition' => [ |
| 1837 | 'eael_infobox_show_sub_title' => 'yes', |
| 1838 | ], |
| 1839 | ] |
| 1840 | ); |
| 1841 | |
| 1842 | $this->add_control( |
| 1843 | 'eael_infobox_content_heading', |
| 1844 | [ |
| 1845 | 'label' => esc_html__('Content', 'essential-addons-for-elementor-lite'), |
| 1846 | 'type' => Controls_Manager::HEADING, |
| 1847 | 'separator' => 'before', |
| 1848 | ] |
| 1849 | ); |
| 1850 | |
| 1851 | $this->add_responsive_control( |
| 1852 | 'eael_infobox_content_margin', |
| 1853 | [ |
| 1854 | 'label' => esc_html__('Margin', 'essential-addons-for-elementor-lite'), |
| 1855 | 'type' => Controls_Manager::DIMENSIONS, |
| 1856 | 'size_units' => ['px', 'em', '%'], |
| 1857 | 'selectors' => [ |
| 1858 | '{{WRAPPER}} .eael-infobox .infobox-content p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1859 | ], |
| 1860 | ] |
| 1861 | ); |
| 1862 | |
| 1863 | $this->add_control( |
| 1864 | 'eael_infobox_content_background', |
| 1865 | [ |
| 1866 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 1867 | 'type' => Controls_Manager::COLOR, |
| 1868 | 'default' => '', |
| 1869 | 'selectors' => [ |
| 1870 | '{{WRAPPER}} .eael-infobox .infobox-content' => 'background: {{VALUE}};', |
| 1871 | ], |
| 1872 | ] |
| 1873 | ); |
| 1874 | |
| 1875 | $this->add_responsive_control( |
| 1876 | 'eael_infobox_content_only_padding', |
| 1877 | [ |
| 1878 | 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'), |
| 1879 | 'type' => Controls_Manager::DIMENSIONS, |
| 1880 | 'size_units' => ['px', 'em', '%'], |
| 1881 | 'selectors' => [ |
| 1882 | '{{WRAPPER}} .eael-infobox .infobox-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1883 | ], |
| 1884 | ] |
| 1885 | ); |
| 1886 | |
| 1887 | $this->add_control( |
| 1888 | 'eael_infobox_content_color', |
| 1889 | [ |
| 1890 | 'label' => esc_html__('Color', 'essential-addons-for-elementor-lite'), |
| 1891 | 'type' => Controls_Manager::COLOR, |
| 1892 | 'default' => '#4d4d4d', |
| 1893 | 'selectors' => [ |
| 1894 | '{{WRAPPER}} .eael-infobox .infobox-content p' => 'color: {{VALUE}};', |
| 1895 | ], |
| 1896 | ] |
| 1897 | ); |
| 1898 | |
| 1899 | $this->add_group_control( |
| 1900 | Group_Control_Typography::get_type(), |
| 1901 | [ |
| 1902 | 'name' => 'eael_infobox_content_typography_hover', |
| 1903 | 'selector' => '{{WRAPPER}} .eael-infobox .infobox-content p', |
| 1904 | ] |
| 1905 | ); |
| 1906 | |
| 1907 | $this->end_controls_tab(); |
| 1908 | |
| 1909 | $this->start_controls_tab('infobox_content_hover_style', [ |
| 1910 | 'label' => esc_html__('Hover', 'essential-addons-for-elementor-lite'), |
| 1911 | ]); |
| 1912 | |
| 1913 | $this->add_group_control( |
| 1914 | EAEL_Gradient_Text::get_type(), |
| 1915 | [ |
| 1916 | 'name' => 'eael_infobox_title_hover', |
| 1917 | 'selector' => '{{WRAPPER}} .eael-infobox:hover .infobox-content .title', |
| 1918 | 'default' => '', |
| 1919 | ] |
| 1920 | ); |
| 1921 | |
| 1922 | $this->add_group_control( |
| 1923 | EAEL_Gradient_Text::get_type(), |
| 1924 | [ |
| 1925 | 'name' => 'eael_infobox_sub_title_hover', |
| 1926 | 'selector' => '{{WRAPPER}} .eael-infobox:hover .infobox-content .sub_title', |
| 1927 | 'default' => '', |
| 1928 | 'condition' => [ |
| 1929 | 'eael_infobox_show_sub_title' => 'yes', |
| 1930 | ], |
| 1931 | ] |
| 1932 | ); |
| 1933 | |
| 1934 | $this->add_control( |
| 1935 | 'eael_infobox_content_hover_color', |
| 1936 | [ |
| 1937 | 'label' => esc_html__('Content Color', 'essential-addons-for-elementor-lite'), |
| 1938 | 'type' => Controls_Manager::COLOR, |
| 1939 | 'default' => '', |
| 1940 | 'selectors' => [ |
| 1941 | '{{WRAPPER}} .eael-infobox:hover .infobox-content p' => 'color: {{VALUE}};', |
| 1942 | ], |
| 1943 | ] |
| 1944 | ); |
| 1945 | |
| 1946 | $this->add_control( |
| 1947 | 'eael_infobox_content_transition', |
| 1948 | [ |
| 1949 | 'label' => esc_html__('Transition', 'essential-addons-for-elementor-lite'), |
| 1950 | 'description' => esc_html__('Transition will applied to ms (ex: 300ms).', 'essential-addons-for-elementor-lite'), |
| 1951 | 'type' => Controls_Manager::NUMBER, |
| 1952 | 'separator' => 'before', |
| 1953 | 'min' => 100, |
| 1954 | 'max' => 1000, |
| 1955 | 'default' => 100, |
| 1956 | 'selectors' => [ |
| 1957 | '{{WRAPPER}} .eael-infobox:hover .infobox-content h4' => 'transition: {{SIZE}}ms;', |
| 1958 | '{{WRAPPER}} .eael-infobox:hover .infobox-content p' => 'transition: {{SIZE}}ms;', |
| 1959 | ], |
| 1960 | ] |
| 1961 | ); |
| 1962 | |
| 1963 | $this->end_controls_tab(); |
| 1964 | |
| 1965 | $this->end_controls_tabs(); |
| 1966 | |
| 1967 | $this->end_controls_section(); |
| 1968 | |
| 1969 | |
| 1970 | /** |
| 1971 | * ------------------------------------------- |
| 1972 | * Tab Style (Liquid Glass Effect) |
| 1973 | * ------------------------------------------- |
| 1974 | */ |
| 1975 | $this->start_controls_section( |
| 1976 | 'eael_wd_liquid_glass_effect_section', |
| 1977 | [ |
| 1978 | 'label' => esc_html__( 'Liquid Glass Effects', 'essential-addons-for-elementor-lite' ), |
| 1979 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1980 | 'condition' => [ |
| 1981 | 'eael_show_infobox_button' => 'yes', |
| 1982 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 1983 | ], |
| 1984 | ] |
| 1985 | ); |
| 1986 | |
| 1987 | // Liquid Glass Effects |
| 1988 | $this->eael_liquid_glass_effects(); |
| 1989 | |
| 1990 | // Liquid Glass Shadow Effects |
| 1991 | $this->eael_liquid_glass_shadow_effects(); |
| 1992 | |
| 1993 | $this->end_controls_section(); |
| 1994 | } |
| 1995 | |
| 1996 | /** |
| 1997 | * Controller Summary of eael_liquid_glass_effects |
| 1998 | */ |
| 1999 | public function eael_pro_lock_icon() { |
| 2000 | if ( !apply_filters('eael/pro_enabled', false ) ) { |
| 2001 | $html = '<span class="e-control-motion-effects-promotion__lock-wrapper"><i class="eicon-lock"></i></span>'; |
| 2002 | return $html; |
| 2003 | } |
| 2004 | return; |
| 2005 | } |
| 2006 | |
| 2007 | public function eael_teaser_template($texts) { |
| 2008 | $html = '<div class="ea-nerd-box"> |
| 2009 | <div class="ea-nerd-box-message">' . $texts['messages'] . '</div> |
| 2010 | <a class="ea-nerd-box-link elementor-button elementor-button-default" href="https://wpdeveloper.com/upgrade/ea-pro" target="_blank"> |
| 2011 | ' . __('Upgrade to EA PRO', 'essential-addons-for-elementor-lite') . ' |
| 2012 | </a> |
| 2013 | </div>'; |
| 2014 | |
| 2015 | return $html; |
| 2016 | } |
| 2017 | protected function eael_liquid_glass_effects() { |
| 2018 | |
| 2019 | $this->add_control( |
| 2020 | 'eael_wd_liquid_glass_effect_notice', |
| 2021 | [ |
| 2022 | 'type' => Controls_Manager::ALERT, |
| 2023 | 'alert_type' => 'info', |
| 2024 | 'content' => esc_html__( 'Liquid glass effect is only visible when a semi-transparent background color is applied.', 'essential-addons-for-elementor-lite' ) . '<a href="https://essential-addons.com/docs/ea-liquid-glass-effects/" target="_blank">' . esc_html__( 'Learn More', 'essential-addons-for-elementor-lite' ) . '</a>', |
| 2025 | 'condition' => [ |
| 2026 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2027 | ] |
| 2028 | ] |
| 2029 | ); |
| 2030 | |
| 2031 | $eael_liquid_glass_effect = apply_filters( |
| 2032 | 'eael_liquid_glass_effect_filter', |
| 2033 | [ |
| 2034 | 'styles' => [ |
| 2035 | 'effect1' => esc_html__( 'Heavy Frost', 'essential-addons-for-elementor-lite' ), |
| 2036 | 'effect2' => esc_html__( 'Soft Mist', 'essential-addons-for-elementor-lite' ), |
| 2037 | 'effect4' => esc_html__( 'Light Frost', 'essential-addons-for-elementor-lite' ), |
| 2038 | 'effect5' => esc_html__( 'Grain Frost', 'essential-addons-for-elementor-lite' ), |
| 2039 | 'effect6' => esc_html__( 'Fine Frost', 'essential-addons-for-elementor-lite' ), |
| 2040 | ], |
| 2041 | ] |
| 2042 | ); |
| 2043 | |
| 2044 | $this->add_control( |
| 2045 | 'eael_wd_liquid_glass_effect', |
| 2046 | [ |
| 2047 | 'label' => esc_html__( 'Liquid Glass Presets', 'essential-addons-for-elementor-lite' ), |
| 2048 | 'type' => Controls_Manager::CHOOSE, |
| 2049 | 'label_block' => true, |
| 2050 | 'options' => [ |
| 2051 | 'effect1' => [ |
| 2052 | 'title' => esc_html( $eael_liquid_glass_effect['styles']['effect1'] ), |
| 2053 | 'text' => esc_html( $eael_liquid_glass_effect['styles']['effect1'] ), |
| 2054 | ], |
| 2055 | 'effect2' => [ |
| 2056 | 'title' => esc_html( $eael_liquid_glass_effect['styles']['effect2'] ), |
| 2057 | 'text' => esc_html( $eael_liquid_glass_effect['styles']['effect2'] ), |
| 2058 | ], |
| 2059 | 'effect4' => [ |
| 2060 | 'title' => esc_html( $eael_liquid_glass_effect['styles']['effect4'] ), |
| 2061 | 'text' => esc_html( $eael_liquid_glass_effect['styles']['effect4'] ) . $this->eael_pro_lock_icon(), |
| 2062 | ], |
| 2063 | 'effect5' => [ |
| 2064 | 'title' => esc_html( $eael_liquid_glass_effect['styles']['effect5'] ), |
| 2065 | 'text' => esc_html( $eael_liquid_glass_effect['styles']['effect5'] ) . $this->eael_pro_lock_icon(), |
| 2066 | ], |
| 2067 | 'effect6' => [ |
| 2068 | 'title' => esc_html( $eael_liquid_glass_effect['styles']['effect6'] ), |
| 2069 | 'text' => esc_html( $eael_liquid_glass_effect['styles']['effect6'] ) . $this->eael_pro_lock_icon(), |
| 2070 | ], |
| 2071 | ], |
| 2072 | 'prefix_class' => 'eael_wd_liquid_glass-', |
| 2073 | 'condition' => [ |
| 2074 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2075 | ], |
| 2076 | 'default' => 'effect1', |
| 2077 | 'multiline' => true, |
| 2078 | ] |
| 2079 | ); |
| 2080 | |
| 2081 | if ( !apply_filters('eael/pro_enabled', false ) ) { |
| 2082 | $this->add_control( |
| 2083 | 'eael_wd_liquid_glass_effect_pro_alert', |
| 2084 | [ |
| 2085 | 'type' => Controls_Manager::RAW_HTML, |
| 2086 | 'raw' => $this->eael_teaser_template( [ |
| 2087 | 'messages' => __( "To use this Liquid glass preset, Upgrade to Essential Addons Pro", 'essential-addons-for-elementor-lite' ), |
| 2088 | ] ), |
| 2089 | 'condition' => [ |
| 2090 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2091 | 'eael_wd_liquid_glass_effect' => ['effect4', 'effect5', 'effect6'], |
| 2092 | ] |
| 2093 | ] |
| 2094 | ); |
| 2095 | } else { |
| 2096 | $this->add_control( |
| 2097 | 'eael_wd_liquid_glass_effect_settings', |
| 2098 | [ |
| 2099 | 'label' => esc_html__( 'Liquid Glass Settings', 'essential-addons-for-elementor-lite' ), |
| 2100 | 'type' => Controls_Manager::HEADING, |
| 2101 | 'separator' => 'before', |
| 2102 | 'condition' => [ |
| 2103 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2104 | ] |
| 2105 | ] |
| 2106 | ); |
| 2107 | } |
| 2108 | |
| 2109 | // Background Color Controls |
| 2110 | $this->eael_wd_liquid_glass_effect_bg_color_effect( $this, 'effect1', '#FFFFFF1F', '.eael-infobox-button' ); |
| 2111 | $this->eael_wd_liquid_glass_effect_bg_color_effect( $this, 'effect2', '#FFFFFF1F', 'eael-infobox-button' ); |
| 2112 | |
| 2113 | // Liquid Glass Background Color Effects |
| 2114 | do_action( 'eael_wd_liquid_glass_effect_bg_color_effect4', $this, 'effect4', '#FFFFFF1F', '.eael-infobox-button' ); |
| 2115 | do_action( 'eael_wd_liquid_glass_effect_bg_color_effect5', $this, 'effect5', '#FFFFFF1F', '.eael-infobox-button' ); |
| 2116 | do_action( 'eael_wd_liquid_glass_effect_bg_color_effect6', $this, 'effect6', '#FFFFFF1F', '.eael-infobox-button' ); |
| 2117 | |
| 2118 | // Backdrop Filter Controls |
| 2119 | $this->eael_wd_liquid_glass_effect_backdrop_filter_effect( $this, 'effect1', '24', '.eael-infobox-button' ); |
| 2120 | $this->eael_wd_liquid_glass_effect_backdrop_filter_effect( $this, 'effect2', '20', '.eael-infobox-button' ); |
| 2121 | |
| 2122 | // Brightness Effect Controls |
| 2123 | $this->add_control( |
| 2124 | 'eael_wd_liquid_glass_effect_brightness_effect2', |
| 2125 | [ |
| 2126 | 'label' => esc_html__( 'Brightness', 'essential-addons-for-elementor-lite' ), |
| 2127 | 'type' => Controls_Manager::SLIDER, |
| 2128 | 'range' => [ |
| 2129 | 'px' => [ |
| 2130 | 'min' => 0, |
| 2131 | 'max' => 5, |
| 2132 | 'step' => .1, |
| 2133 | ], |
| 2134 | ], |
| 2135 | 'default' => [ |
| 2136 | 'size' => 1, |
| 2137 | ], |
| 2138 | 'selectors' => [ |
| 2139 | '{{WRAPPER}}.eael_wd_liquid_glass-effect2 .eael-infobox-button' => 'backdrop-filter: blur({{eael_wd_liquid_glass_effect_backdrop_filter_effect2.SIZE}}px) brightness({{SIZE}});', |
| 2140 | ], |
| 2141 | 'condition' => [ |
| 2142 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2143 | 'eael_wd_liquid_glass_effect' => 'effect2', |
| 2144 | ] |
| 2145 | ] |
| 2146 | ); |
| 2147 | |
| 2148 | do_action( 'eael_wd_liquid_glass_effect_backdrop_filter_effect4', $this, 'effect4', '', '.eael-infobox-button' ); |
| 2149 | do_action( 'eael_wd_liquid_glass_effect_backdrop_filter_effect5', $this, 'effect5', '', '.eael-infobox-button' ); |
| 2150 | do_action( 'eael_wd_liquid_glass_effect_backdrop_filter_effect6', $this, 'effect6', '', '.eael-infobox-button' ); |
| 2151 | |
| 2152 | // Noise Distortion Settings (Pro) |
| 2153 | do_action( 'eael_wd_liquid_glass_effect_noise_action', $this ); |
| 2154 | } |
| 2155 | |
| 2156 | /** |
| 2157 | * Summary of eael_liquid_glass_shadow_effects |
| 2158 | */ |
| 2159 | protected function eael_liquid_glass_shadow_effects() { |
| 2160 | if ( !apply_filters('eael/pro_enabled', false ) ) { |
| 2161 | $this->add_control( |
| 2162 | 'eael_wd_liquid_glass_shadow_effect', |
| 2163 | [ |
| 2164 | 'label' => esc_html__( 'Shadow Effects', 'essential-addons-for-elementor-lite' ), |
| 2165 | 'type' => Controls_Manager::SELECT2, |
| 2166 | 'default' => 'effect1', |
| 2167 | 'separator' => 'before', |
| 2168 | 'options' => [ |
| 2169 | '' => esc_html__( 'None', 'essential-addons-for-elementor-lite' ), |
| 2170 | 'effect1' => esc_html__( 'Effect 1', 'essential-addons-for-elementor-lite' ), |
| 2171 | 'effect2' => esc_html__( 'Effect 2', 'essential-addons-for-elementor-lite' ), |
| 2172 | 'effect3' => esc_html__( 'Effect 3', 'essential-addons-for-elementor-lite' ), |
| 2173 | 'effect4' => esc_html__( 'Effect 4', 'essential-addons-for-elementor-lite' ), |
| 2174 | ], |
| 2175 | 'prefix_class' => 'eael_wd_liquid_glass_shadow-', |
| 2176 | 'condition' => [ |
| 2177 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2178 | 'eael_wd_liquid_glass_effect' => ['effect1', 'effect2'], |
| 2179 | ] |
| 2180 | ] |
| 2181 | ); |
| 2182 | |
| 2183 | $this->add_control( |
| 2184 | 'eael_wd_liquid_glass_shadow_inner', |
| 2185 | [ |
| 2186 | 'label' => esc_html__( 'Shadow Settings', 'essential-addons-for-elementor-lite' ), |
| 2187 | 'type' => Controls_Manager::HEADING, |
| 2188 | 'separator' => 'before', |
| 2189 | 'condition' => [ |
| 2190 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2191 | 'eael_wd_liquid_glass_shadow_effect!' => '', |
| 2192 | 'eael_wd_liquid_glass_effect' => ['effect1', 'effect2'], |
| 2193 | ], |
| 2194 | ] |
| 2195 | ); |
| 2196 | |
| 2197 | // Liquid Glass Border Effects |
| 2198 | $this->eael_wd_liquid_glass_border_effect( $this, 'effect1', '#FFFFFF1F', '.eael-infobox-button', ['effect1', 'effect2'] ); |
| 2199 | $this->eael_wd_liquid_glass_border_effect( $this, 'effect2', '#FFFFFF1F', '.eael-infobox-button', ['effect1', 'effect2'] ); |
| 2200 | $this->eael_wd_liquid_glass_border_effect( $this, 'effect3', '#FFFFFF1F', '.eael-infobox-button', ['effect1', 'effect2'] ); |
| 2201 | $this->eael_wd_liquid_glass_border_effect( $this, 'effect4', '#FFFFFF1F', '.eael-infobox-button', ['effect1', 'effect2'] ); |
| 2202 | |
| 2203 | // Liquid Glass Border Radius Effects |
| 2204 | $this->eael_wd_liquid_glass_border_radius_effect($this, 'effect1', '.eael-infobox-button', |
| 2205 | [ |
| 2206 | 'top' => 24, |
| 2207 | 'right' => 24, |
| 2208 | 'bottom' => 24, |
| 2209 | 'left' => 24, |
| 2210 | 'unit' => 'px', |
| 2211 | 'isLinked' => true, |
| 2212 | ], |
| 2213 | ['effect1', 'effect2'] |
| 2214 | ); |
| 2215 | |
| 2216 | $this->eael_wd_liquid_glass_border_radius_effect($this, 'effect2', '.eael-infobox-button', |
| 2217 | [ |
| 2218 | 'top' => 16, |
| 2219 | 'right' => 16, |
| 2220 | 'bottom' => 16, |
| 2221 | 'left' => 16, |
| 2222 | 'unit' => 'px', |
| 2223 | 'isLinked' => true, |
| 2224 | ], |
| 2225 | ['effect1', 'effect2'] |
| 2226 | ); |
| 2227 | |
| 2228 | $this->eael_wd_liquid_glass_border_radius_effect($this, 'effect3', '.eael-infobox-button', |
| 2229 | [ |
| 2230 | 'top' => 8, |
| 2231 | 'bottom' => 8, |
| 2232 | 'left' => 8, |
| 2233 | 'right' => 8, |
| 2234 | 'unit' => 'px', |
| 2235 | 'isLinked' => true, |
| 2236 | ], |
| 2237 | ['effect1', 'effect2'] |
| 2238 | ); |
| 2239 | |
| 2240 | $this->eael_wd_liquid_glass_border_radius_effect($this, 'effect4', '.eael-infobox-button', |
| 2241 | [ |
| 2242 | 'top' => 24, |
| 2243 | 'bottom' => 24, |
| 2244 | 'left' => 24, |
| 2245 | 'right' => 24, |
| 2246 | 'unit' => 'px', |
| 2247 | 'isLinked' => true, |
| 2248 | ], |
| 2249 | ['effect1', 'effect2'] |
| 2250 | ); |
| 2251 | |
| 2252 | // Liquid Glass Shadow Effects |
| 2253 | $this->eael_wd_liquid_glass_shadow_effect($this, 'effect1', '.eael-infobox-button', |
| 2254 | [ |
| 2255 | 'color' => 'rgba(0,0,0,0.78)', |
| 2256 | 'horizontal' => 0, |
| 2257 | 'vertical' => 19, |
| 2258 | 'blur' => 26, |
| 2259 | 'spread' => 1, |
| 2260 | ], |
| 2261 | ['effect1', 'effect2'] |
| 2262 | ); |
| 2263 | |
| 2264 | $this->eael_wd_liquid_glass_shadow_effect($this, 'effect2', '.eael-infobox-button', |
| 2265 | [ |
| 2266 | 'color' => '#383C65', |
| 2267 | 'horizontal' => 0, |
| 2268 | 'vertical' => 0, |
| 2269 | 'blur' => 33, |
| 2270 | 'spread' => -2, |
| 2271 | ], |
| 2272 | ['effect1', 'effect2'] |
| 2273 | ); |
| 2274 | |
| 2275 | $this->eael_wd_liquid_glass_shadow_effect($this, 'effect3', '.eael-infobox-button', |
| 2276 | [ |
| 2277 | 'color' => 'rgba(255, 255, 255, 0.4)', |
| 2278 | 'horizontal' => 1, |
| 2279 | 'vertical' => 1, |
| 2280 | 'blur' => 10, |
| 2281 | 'spread' => 5, |
| 2282 | ], |
| 2283 | ['effect1', 'effect2'] |
| 2284 | ); |
| 2285 | |
| 2286 | $this->eael_wd_liquid_glass_shadow_effect($this, 'effect4', '.eael-infobox-button', |
| 2287 | [ |
| 2288 | 'color' => '#00000040', |
| 2289 | 'horizontal' => 0, |
| 2290 | 'vertical' => 9, |
| 2291 | 'blur' => 21, |
| 2292 | 'spread' => 0, |
| 2293 | ], |
| 2294 | ['effect1', 'effect2'] |
| 2295 | ); |
| 2296 | } else { |
| 2297 | $this->add_control( |
| 2298 | 'eael_wd_liquid_glass_shadow_effect', |
| 2299 | [ |
| 2300 | 'label' => esc_html__( 'Shadow Effects', 'essential-addons-for-elementor-lite' ), |
| 2301 | 'type' => Controls_Manager::SELECT2, |
| 2302 | 'default' => 'effect1', |
| 2303 | 'separator' => 'before', |
| 2304 | 'options' => [ |
| 2305 | '' => esc_html__( 'None', 'essential-addons-for-elementor-lite' ), |
| 2306 | 'effect1' => esc_html__( 'Effect 1', 'essential-addons-for-elementor-lite' ), |
| 2307 | 'effect2' => esc_html__( 'Effect 2', 'essential-addons-for-elementor-lite' ), |
| 2308 | 'effect3' => esc_html__( 'Effect 3', 'essential-addons-for-elementor-lite' ), |
| 2309 | 'effect4' => esc_html__( 'Effect 4', 'essential-addons-for-elementor-lite' ), |
| 2310 | ], |
| 2311 | 'prefix_class' => 'eael_wd_liquid_glass_shadow-', |
| 2312 | 'condition' => [ |
| 2313 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2314 | 'eael_wd_liquid_glass_effect' => ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'], |
| 2315 | ] |
| 2316 | ] |
| 2317 | ); |
| 2318 | |
| 2319 | $this->add_control( |
| 2320 | 'eael_wd_liquid_glass_shadow_inner', |
| 2321 | [ |
| 2322 | 'label' => esc_html__( 'Shadow Settings', 'essential-addons-for-elementor-lite' ), |
| 2323 | 'type' => Controls_Manager::HEADING, |
| 2324 | 'separator' => 'before', |
| 2325 | 'condition' => [ |
| 2326 | 'eael_wd_liquid_glass_effect_switch' => 'yes', |
| 2327 | 'eael_wd_liquid_glass_shadow_effect!' => '', |
| 2328 | 'eael_wd_liquid_glass_effect' => ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'], |
| 2329 | ], |
| 2330 | ] |
| 2331 | ); |
| 2332 | |
| 2333 | // Liquid Glass Border Effects |
| 2334 | $this->eael_wd_liquid_glass_border_effect( $this, 'effect1', '#FFFFFF1F', '.eael-infobox-button', ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] ); |
| 2335 | $this->eael_wd_liquid_glass_border_effect( $this, 'effect2', '#FFFFFF1F', '.eael-infobox-button', ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] ); |
| 2336 | $this->eael_wd_liquid_glass_border_effect( $this, 'effect3', '#FFFFFF1F', '.eael-infobox-button', ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] ); |
| 2337 | $this->eael_wd_liquid_glass_border_effect( $this, 'effect4', '#FFFFFF1F', '.eael-infobox-button', ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] ); |
| 2338 | |
| 2339 | // Liquid Glass Border Radius Effects |
| 2340 | $this->eael_wd_liquid_glass_border_radius_effect($this, 'effect1', '.eael-infobox-button', |
| 2341 | [ |
| 2342 | 'top' => 24, |
| 2343 | 'right' => 24, |
| 2344 | 'bottom' => 24, |
| 2345 | 'left' => 24, |
| 2346 | 'unit' => 'px', |
| 2347 | 'isLinked' => true, |
| 2348 | ], |
| 2349 | ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] |
| 2350 | ); |
| 2351 | |
| 2352 | $this->eael_wd_liquid_glass_border_radius_effect($this, 'effect2', '.eael-infobox-button', |
| 2353 | [ |
| 2354 | 'top' => 16, |
| 2355 | 'right' => 16, |
| 2356 | 'bottom' => 16, |
| 2357 | 'left' => 16, |
| 2358 | 'unit' => 'px', |
| 2359 | 'isLinked' => true, |
| 2360 | ], |
| 2361 | ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] |
| 2362 | ); |
| 2363 | |
| 2364 | $this->eael_wd_liquid_glass_border_radius_effect($this, 'effect3', '.eael-infobox-button', |
| 2365 | [ |
| 2366 | 'top' => 8, |
| 2367 | 'bottom' => 8, |
| 2368 | 'left' => 8, |
| 2369 | 'right' => 8, |
| 2370 | 'unit' => 'px', |
| 2371 | 'isLinked' => true, |
| 2372 | ], |
| 2373 | ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] |
| 2374 | ); |
| 2375 | |
| 2376 | $this->eael_wd_liquid_glass_border_radius_effect($this, 'effect4', '.eael-infobox-button', |
| 2377 | [ |
| 2378 | 'top' => 24, |
| 2379 | 'bottom' => 24, |
| 2380 | 'left' => 24, |
| 2381 | 'right' => 24, |
| 2382 | 'unit' => 'px', |
| 2383 | 'isLinked' => true, |
| 2384 | ], |
| 2385 | ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] |
| 2386 | ); |
| 2387 | |
| 2388 | // Liquid Glass Shadow Effects |
| 2389 | $this->eael_wd_liquid_glass_shadow_effect($this, 'effect1', '.eael-infobox-button', |
| 2390 | [ |
| 2391 | 'color' => 'rgba(0,0,0,0.78)', |
| 2392 | 'horizontal' => 0, |
| 2393 | 'vertical' => 19, |
| 2394 | 'blur' => 26, |
| 2395 | 'spread' => 1, |
| 2396 | ], |
| 2397 | ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] |
| 2398 | ); |
| 2399 | |
| 2400 | $this->eael_wd_liquid_glass_shadow_effect($this, 'effect2', '.eael-infobox-button', |
| 2401 | [ |
| 2402 | 'color' => '#383C65', |
| 2403 | 'horizontal' => 0, |
| 2404 | 'vertical' => 0, |
| 2405 | 'blur' => 33, |
| 2406 | 'spread' => -2, |
| 2407 | ], |
| 2408 | ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] |
| 2409 | ); |
| 2410 | |
| 2411 | $this->eael_wd_liquid_glass_shadow_effect($this, 'effect3', '.eael-infobox-button', |
| 2412 | [ |
| 2413 | 'color' => 'rgba(255, 255, 255, 0.4)', |
| 2414 | 'horizontal' => 1, |
| 2415 | 'vertical' => 1, |
| 2416 | 'blur' => 10, |
| 2417 | 'spread' => 5, |
| 2418 | ], |
| 2419 | ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] |
| 2420 | ); |
| 2421 | |
| 2422 | $this->eael_wd_liquid_glass_shadow_effect($this, 'effect4', '.eael-infobox-button', |
| 2423 | [ |
| 2424 | 'color' => '#00000040', |
| 2425 | 'horizontal' => 0, |
| 2426 | 'vertical' => 9, |
| 2427 | 'blur' => 21, |
| 2428 | 'spread' => 0, |
| 2429 | ], |
| 2430 | ['effect1', 'effect2', 'effect4', 'effect5', 'effect6'] |
| 2431 | ); |
| 2432 | } |
| 2433 | } |
| 2434 | |
| 2435 | /** |
| 2436 | * This function is responsible for rendering divs and contents |
| 2437 | * for infobox before partial. |
| 2438 | */ |
| 2439 | protected function eael_infobox_before() |
| 2440 | { |
| 2441 | $settings = $this->get_settings_for_display(); |
| 2442 | |
| 2443 | $this->add_render_attribute('eael_infobox_inner', 'class', 'eael-infobox'); |
| 2444 | |
| 2445 | if ('img-on-top' == $settings['eael_infobox_img_type']) { |
| 2446 | $this->add_render_attribute('eael_infobox_inner', 'class', 'icon-on-top'); |
| 2447 | } |
| 2448 | |
| 2449 | if ('img-on-bottom' == $settings['eael_infobox_img_type']) { |
| 2450 | $this->add_render_attribute('eael_infobox_inner', 'class', 'icon-on-bottom'); |
| 2451 | } |
| 2452 | |
| 2453 | if ('img-on-left' == $settings['eael_infobox_img_type']) { |
| 2454 | $this->add_render_attribute('eael_infobox_inner', 'class', 'icon-on-left'); |
| 2455 | } |
| 2456 | |
| 2457 | if ('img-on-right' == $settings['eael_infobox_img_type']) { |
| 2458 | $this->add_render_attribute('eael_infobox_inner', 'class', 'icon-on-right'); |
| 2459 | } |
| 2460 | |
| 2461 | if ( ! empty( $settings['eael_show_infobox_clickable_link']['url'] ) ) { |
| 2462 | $this->add_link_attributes( 'infobox_clickable_link', $settings['eael_show_infobox_clickable_link'] ); |
| 2463 | } |
| 2464 | |
| 2465 | ob_start(); |
| 2466 | |
| 2467 | if ( 'yes' == $settings['eael_show_infobox_clickable'] ) { ?> |
| 2468 | <a <?php $this->print_render_attribute_string( 'infobox_clickable_link' ); ?>> |
| 2469 | <?php } ?> |
| 2470 | <div <?php $this->print_render_attribute_string( 'eael_infobox_inner' ); ?>> |
| 2471 | <?php |
| 2472 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 2473 | echo ob_get_clean(); |
| 2474 | } |
| 2475 | |
| 2476 | /** |
| 2477 | * This function is rendering closing divs and tags |
| 2478 | * of before partial for infobox. |
| 2479 | */ |
| 2480 | protected function eael_infobox_after() { |
| 2481 | $settings = $this->get_settings_for_display(); |
| 2482 | ob_start(); ?> |
| 2483 | </div> |
| 2484 | |
| 2485 | <?php |
| 2486 | if ( 'yes' == $settings['eael_show_infobox_clickable'] ) { ?> |
| 2487 | </a> |
| 2488 | <?php } |
| 2489 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 2490 | echo ob_get_clean(); |
| 2491 | } |
| 2492 | |
| 2493 | /** |
| 2494 | * This function is rendering appropriate icon for infobox. |
| 2495 | */ |
| 2496 | protected function render_infobox_icon() |
| 2497 | { |
| 2498 | $settings = $this->get_settings_for_display(); |
| 2499 | |
| 2500 | if ('none' == $settings['eael_infobox_img_or_icon']) { |
| 2501 | return; |
| 2502 | } |
| 2503 | |
| 2504 | $infobox_image = $this->get_settings('eael_infobox_image'); |
| 2505 | $infobox_image_url = Group_Control_Image_Size::get_attachment_image_src($infobox_image['id'], 'thumbnail', $settings); |
| 2506 | if (empty($infobox_image_url)){ |
| 2507 | $infobox_image_url = $infobox_image['url']; |
| 2508 | } |
| 2509 | |
| 2510 | $infobox_icon_migrated = isset($settings['__fa4_migrated']['eael_infobox_icon_new']); |
| 2511 | $infobox_icon_is_new = empty($settings['eael_infobox_icon']); |
| 2512 | |
| 2513 | $this->add_render_attribute( |
| 2514 | 'infobox_icon', |
| 2515 | [ |
| 2516 | 'class' => ['infobox-icon'], |
| 2517 | ] |
| 2518 | ); |
| 2519 | |
| 2520 | if ($settings['eael_infobox_icon_hover_animation']) { |
| 2521 | $this->add_render_attribute('infobox_icon', 'class', 'elementor-animation-' . $settings['eael_infobox_icon_hover_animation']); |
| 2522 | } |
| 2523 | |
| 2524 | if ($settings['eael_infobox_image_icon_hover_animation']) { |
| 2525 | $this->add_render_attribute('infobox_icon', 'class', 'elementor-animation-' . $settings['eael_infobox_image_icon_hover_animation']); |
| 2526 | } |
| 2527 | |
| 2528 | if ($settings['eael_infobox_number_icon_hover_animation']) { |
| 2529 | $this->add_render_attribute('infobox_icon', 'class', 'elementor-animation-' . $settings['eael_infobox_number_icon_hover_animation']); |
| 2530 | } |
| 2531 | |
| 2532 | if ('icon' == $settings['eael_infobox_img_or_icon']) { |
| 2533 | $this->add_render_attribute('infobox_icon', 'class', 'eael-icon-only'); |
| 2534 | } |
| 2535 | |
| 2536 | if ($infobox_icon_is_new || $infobox_icon_migrated) { |
| 2537 | $icon = $this->get_settings('eael_infobox_icon_new')['value']; |
| 2538 | if (isset($icon['url'])) { |
| 2539 | ob_start(); |
| 2540 | Icons_Manager::render_icon( $settings['eael_infobox_icon_new'], [ 'aria-hidden' => 'true' ] ); |
| 2541 | $icon_tag = ob_get_clean(); |
| 2542 | } else { |
| 2543 | $this->add_render_attribute('icon_or_image', 'class', $icon); |
| 2544 | $icon_tag = '<i ' . $this->get_render_attribute_string('icon_or_image') . '></i>'; |
| 2545 | } |
| 2546 | } else { |
| 2547 | $icon_tag = '<i class="' . esc_attr($settings['eael_infobox_icon']) . '"></i>'; |
| 2548 | } |
| 2549 | |
| 2550 | ob_start(); |
| 2551 | ?> |
| 2552 | <div <?php $this->print_render_attribute_string('infobox_icon'); ?>> |
| 2553 | |
| 2554 | <?php if ('img' == $settings['eael_infobox_img_or_icon']): ?> |
| 2555 | <img src="<?php echo esc_url($infobox_image_url); ?>" alt="<?php echo esc_attr(get_post_meta($infobox_image['id'], '_wp_attachment_image_alt', true)); ?>"> |
| 2556 | <?php endif;?> |
| 2557 | |
| 2558 | <?php if ('icon' == $settings['eael_infobox_img_or_icon']): ?> |
| 2559 | <div class="infobox-icon-wrap"> |
| 2560 | <?php Icons_Manager::render_icon( $settings['eael_infobox_icon_new'], [ 'aria-hidden' => 'true' ] ); ?> |
| 2561 | </div> |
| 2562 | <?php endif;?> |
| 2563 | |
| 2564 | <?php if ('number' == $settings['eael_infobox_img_or_icon']): ?> |
| 2565 | <div class="infobox-icon-wrap"> |
| 2566 | <span class="infobox-icon-number"><?php echo esc_html( $settings['eael_infobox_number'] ); ?></span> |
| 2567 | </div> |
| 2568 | <?php endif;?> |
| 2569 | |
| 2570 | </div> |
| 2571 | <?php |
| 2572 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 2573 | echo ob_get_clean(); |
| 2574 | } |
| 2575 | |
| 2576 | protected function render_infobox_content() |
| 2577 | { |
| 2578 | $settings = $this->get_settings_for_display(); |
| 2579 | |
| 2580 | $this->add_render_attribute('infobox_content', 'class', 'infobox-content'); |
| 2581 | if ('icon' == $settings['eael_infobox_img_or_icon']) { |
| 2582 | $this->add_render_attribute('infobox_content', 'class', 'eael-icon-only'); |
| 2583 | } |
| 2584 | |
| 2585 | ob_start(); |
| 2586 | ?> |
| 2587 | <div <?php $this->print_render_attribute_string('infobox_content'); ?>> |
| 2588 | <?php if ( !empty( $settings['eael_infobox_title'] ) || !empty( $settings['eael_infobox_sub_title'] ) ) { ?> |
| 2589 | <div class="infobox-title-section"> |
| 2590 | <?php |
| 2591 | if ( !empty( $settings['eael_infobox_sub_title'] ) && 'yes' === $settings['eael_infobox_show_sub_title'] ){ |
| 2592 | printf( '<%1$s class="sub_title">%2$s</%1$s>', esc_html( Helper::eael_validate_html_tag( $settings['eael_infobox_sub_title_tag'] ) ), wp_kses( $settings['eael_infobox_sub_title'], Helper::eael_allowed_tags() ) ); |
| 2593 | } |
| 2594 | |
| 2595 | if ( !empty( $settings['eael_infobox_title'] ) ){ |
| 2596 | printf( '<%1$s class="title">%2$s</%1$s>', esc_html( Helper::eael_validate_html_tag( $settings['eael_infobox_title_tag'] ) ), wp_kses( $settings['eael_infobox_title'], Helper::eael_allowed_tags() ) ); |
| 2597 | } |
| 2598 | ?> |
| 2599 | </div> |
| 2600 | <?php |
| 2601 | } |
| 2602 | if ('yes' == $settings['eael_show_infobox_content']){ |
| 2603 | if ('content' === $settings['eael_infobox_text_type']){ |
| 2604 | if (!empty($settings['eael_infobox_text'])) { |
| 2605 | echo '<div>'; |
| 2606 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.Security.EscapeOutput.OutputNotEscaped |
| 2607 | echo $this->parse_text_editor( wp_kses( $settings['eael_infobox_text'], Helper::eael_allowed_tags() ) ); |
| 2608 | echo '</div>'; |
| 2609 | } |
| 2610 | $this->render_infobox_button(); |
| 2611 | } elseif ('template' === $settings['eael_infobox_text_type']) { |
| 2612 | if ( ! empty( $settings['eael_primary_templates'] ) && Helper::is_elementor_publish_template( $settings['eael_primary_templates'] ) ) { |
| 2613 | if ( Plugin::$instance->editor->is_edit_mode() ) { |
| 2614 | echo '<div class="eael-infobox-template-wrapper">'; |
| 2615 | } |
| 2616 | |
| 2617 | // WPML Compatibility |
| 2618 | if ( ! is_array( $settings['eael_primary_templates'] ) ) { |
| 2619 | $settings['eael_primary_templates'] = apply_filters( 'wpml_object_id', $settings['eael_primary_templates'], 'wp_template', true ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound |
| 2620 | } |
| 2621 | |
| 2622 | Helper::eael_onpage_edit_template_markup( get_the_ID(), $settings['eael_primary_templates'] ); |
| 2623 | |
| 2624 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 2625 | echo Plugin::$instance->frontend->get_builder_content( $settings['eael_primary_templates'], true ); |
| 2626 | if ( Plugin::$instance->editor->is_edit_mode() ) { |
| 2627 | echo '</div>'; |
| 2628 | } |
| 2629 | } |
| 2630 | } |
| 2631 | } |
| 2632 | ?> |
| 2633 | </div> |
| 2634 | <?php |
| 2635 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 2636 | echo ob_get_clean(); |
| 2637 | } |
| 2638 | |
| 2639 | /** |
| 2640 | * This function rendering infobox button |
| 2641 | */ |
| 2642 | protected function render_infobox_button() |
| 2643 | { |
| 2644 | $settings = $this->get_settings_for_display(); |
| 2645 | if ('yes' == $settings['eael_show_infobox_clickable'] || 'yes' != $settings['eael_show_infobox_button']) { |
| 2646 | return; |
| 2647 | } |
| 2648 | |
| 2649 | $button_icon_migrated = isset($settings['__fa4_migrated']['eael_infobox_button_icon_new']); |
| 2650 | $button_icon_is_new = empty($settings['eael_infobox_button_icon']); |
| 2651 | |
| 2652 | $this->add_render_attribute('infobox_button', 'class', 'eael-infobox-button'); |
| 2653 | |
| 2654 | if ( ! empty( $settings['infobox_button_link_url']['url'] ) ) { |
| 2655 | $this->add_link_attributes( 'infobox_button', $settings['infobox_button_link_url'] ); |
| 2656 | } |
| 2657 | |
| 2658 | ob_start(); |
| 2659 | ?> |
| 2660 | <div class="infobox-button"> |
| 2661 | <a <?php $this->print_render_attribute_string('infobox_button'); ?>> |
| 2662 | <?php do_action( 'eael_wd_liquid_glass_effect_svg_pro', $this, $settings, '.eael-infobox-button' ); ?> |
| 2663 | <?php if ('left' == $settings['eael_infobox_button_icon_alignment']): ?> |
| 2664 | <?php if ($button_icon_is_new || $button_icon_migrated) {?> |
| 2665 | <?php if (isset($settings['eael_infobox_button_icon_new']['value']['url'])) {?> |
| 2666 | <img class="eael_infobox_button_icon_left" src="<?php echo esc_url( $settings['eael_infobox_button_icon_new']['value']['url'] ); ?>" alt="<?php echo esc_attr(get_post_meta($settings['eael_infobox_button_icon_new']['value']['id'], '_wp_attachment_image_alt', true)); ?>" /> |
| 2667 | <?php } else { |
| 2668 | Icons_Manager::render_icon( $settings['eael_infobox_button_icon_new'], [ 'aria-hidden' => 'true', 'class' => 'eael_infobox_button_icon_left' ] ); |
| 2669 | }?> |
| 2670 | <?php } else { |
| 2671 | Icons_Manager::render_icon( $settings['eael_infobox_button_icon'], [ 'aria-hidden' => 'true' ] ); |
| 2672 | }?> |
| 2673 | <?php endif;?> |
| 2674 | <span class="infobox-button-text"><?php echo esc_attr($settings['infobox_button_text']); ?></span> |
| 2675 | <?php if ('right' == $settings['eael_infobox_button_icon_alignment']): ?> |
| 2676 | <?php if ($button_icon_is_new || $button_icon_migrated) {?> |
| 2677 | <?php if (isset($settings['eael_infobox_button_icon_new']['value']['url'])) {?> |
| 2678 | <img class="eael_infobox_button_icon_right" src="<?php echo esc_url( $settings['eael_infobox_button_icon_new']['value']['url'] ); ?>" alt="<?php echo esc_attr(get_post_meta($settings['eael_infobox_button_icon_new']['value']['id'], '_wp_attachment_image_alt', true)); ?>" /> |
| 2679 | <?php } else { |
| 2680 | Icons_Manager::render_icon( $settings['eael_infobox_button_icon_new'], [ 'aria-hidden' => 'true', 'class' => 'eael_infobox_button_icon_right' ] ); |
| 2681 | }?> |
| 2682 | <?php } else { |
| 2683 | |
| 2684 | if ('left' == $settings['eael_infobox_button_icon_alignment']) { |
| 2685 | $this->add_render_attribute('button_icon', 'class', 'eael_infobox_button_icon_left'); |
| 2686 | } |
| 2687 | |
| 2688 | if ('right' == $settings['eael_infobox_button_icon_alignment']) { |
| 2689 | $this->add_render_attribute('button_icon', 'class', 'eael_infobox_button_icon_right'); |
| 2690 | } |
| 2691 | |
| 2692 | $this->add_render_attribute( |
| 2693 | 'button_icon', |
| 2694 | [ |
| 2695 | 'class' => [ |
| 2696 | 'eael_infobox_button_icon_right', |
| 2697 | $settings['eael_infobox_button_icon'], |
| 2698 | ], |
| 2699 | ] |
| 2700 | ); |
| 2701 | ?> |
| 2702 | <i <?php $this->print_render_attribute_string('button_icon'); ?>></i> |
| 2703 | <?php }?> |
| 2704 | <?php endif;?> |
| 2705 | </a> |
| 2706 | </div> |
| 2707 | <?php |
| 2708 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 2709 | echo ob_get_clean(); |
| 2710 | } |
| 2711 | |
| 2712 | protected function render() |
| 2713 | { |
| 2714 | $this->eael_infobox_before(); |
| 2715 | $this->render_infobox_icon(); |
| 2716 | $this->render_infobox_content(); |
| 2717 | $this->eael_infobox_after(); |
| 2718 | } |
| 2719 | } |
| 2720 |