dep
1 month ago
premium-banner.php
1 month ago
premium-blog.php
1 month ago
premium-button.php
1 month ago
premium-carousel.php
1 month ago
premium-contactform.php
1 month ago
premium-countdown.php
1 month ago
premium-counter.php
1 month ago
premium-dual-header.php
1 month ago
premium-fancytext.php
1 month ago
premium-grid.php
1 month ago
premium-icon-list.php
1 month ago
premium-image-button.php
1 month ago
premium-image-scroll.php
1 month ago
premium-image-separator.php
1 month ago
premium-lottie.php
1 month ago
premium-maps.php
1 month ago
premium-media-wheel.php
1 month ago
premium-mobile-menu.php
1 month ago
premium-modalbox.php
1 month ago
premium-nav-menu.php
1 month ago
premium-notifications.php
1 month ago
premium-person.php
1 month ago
premium-pinterest-feed.php
1 month ago
premium-post-ticker.php
1 month ago
premium-pricing-table.php
1 month ago
premium-progressbar.php
1 month ago
premium-search-form.php
1 month ago
premium-svg-drawer.php
1 month ago
premium-tcloud.php
1 month ago
premium-testimonials.php
1 month ago
premium-textual-showcase.php
1 month ago
premium-tiktok-feed.php
1 month ago
premium-title.php
1 month ago
premium-videobox.php
1 month ago
premium-vscroll.php
2 months ago
premium-weather.php
1 month ago
premium-world-clock.php
1 month ago
premium-dual-header.php
1821 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Premium Dual Heading. |
| 4 | */ |
| 5 | |
| 6 | namespace PremiumAddons\Widgets; |
| 7 | |
| 8 | // Elementor Classes. |
| 9 | use PremiumAddons\Includes; |
| 10 | use Elementor\Widget_Base; |
| 11 | use Elementor\Controls_Manager; |
| 12 | use Elementor\Core\Kits\Documents\Tabs\Global_Colors; |
| 13 | use Elementor\Core\Kits\Documents\Tabs\Global_Typography; |
| 14 | use Elementor\Group_Control_Border; |
| 15 | use Elementor\Group_Control_Typography; |
| 16 | use Elementor\Group_Control_Text_Shadow; |
| 17 | use Elementor\Group_Control_Box_Shadow; |
| 18 | |
| 19 | // PremiumAddons Classes. |
| 20 | use PremiumAddons\Includes\Helper_Functions; |
| 21 | use PremiumAddons\Includes\Controls\Premium_Background; |
| 22 | use PremiumAddons\Includes\Controls\Premium_Post_Filter; |
| 23 | |
| 24 | if ( ! defined( 'ABSPATH' ) ) { |
| 25 | exit; // If this file is called directly, abort. |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Class Premium_Dual_Header |
| 30 | */ |
| 31 | class Premium_Dual_Header extends Widget_Base { |
| 32 | |
| 33 | /** |
| 34 | * Retrieve Widget Name. |
| 35 | * |
| 36 | * @since 1.0.0 |
| 37 | * @access public |
| 38 | */ |
| 39 | public function get_name() { |
| 40 | return 'premium-addon-dual-header'; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Retrieve Widget Title. |
| 45 | * |
| 46 | * @since 1.0.0 |
| 47 | * @access public |
| 48 | */ |
| 49 | public function get_title() { |
| 50 | return __( 'Dual Heading', 'premium-addons-for-elementor' ); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Retrieve Widget Dependent CSS. |
| 55 | * |
| 56 | * @since 1.0.0 |
| 57 | * @access public |
| 58 | * |
| 59 | * @return array CSS style handles. |
| 60 | */ |
| 61 | public function get_style_depends() { |
| 62 | return array( |
| 63 | 'pa-glass', |
| 64 | 'pa-btn', |
| 65 | 'premium-addons', |
| 66 | ); |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Retrieve Widget Dependent JS. |
| 71 | * |
| 72 | * @since 1.0.0 |
| 73 | * @access public |
| 74 | * |
| 75 | * @return array JS script handles. |
| 76 | */ |
| 77 | public function get_script_depends() { |
| 78 | |
| 79 | $is_edit = Helper_Functions::is_edit_mode(); |
| 80 | |
| 81 | $scripts = array(); |
| 82 | if ( $is_edit ) { |
| 83 | $scripts[] = 'pa-glass'; |
| 84 | } else { |
| 85 | |
| 86 | $settings = $this->get_settings(); |
| 87 | |
| 88 | if ( 'none' !== $settings['first_lq_effect'] || 'none' !== $settings['second_lq_effect'] ) { |
| 89 | $scripts[] = 'pa-glass'; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | $scripts[] = 'premium-addons'; |
| 94 | |
| 95 | return $scripts; |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Retrieve Widget Icon. |
| 100 | * |
| 101 | * @since 1.0.0 |
| 102 | * @access public |
| 103 | * |
| 104 | * @return string widget icon. |
| 105 | */ |
| 106 | public function get_icon() { |
| 107 | return 'pa-dual-header'; |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Retrieve Widget Keywords. |
| 112 | * |
| 113 | * @since 1.0.0 |
| 114 | * @access public |
| 115 | * |
| 116 | * @return string Widget keywords. |
| 117 | */ |
| 118 | public function get_keywords() { |
| 119 | return array( 'pa', 'premium', 'premium dual heading', 'advanced', 'title', 'heading', 'multi', 'text' ); |
| 120 | } |
| 121 | |
| 122 | protected function is_dynamic_content(): bool { |
| 123 | return false; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Retrieve Widget Categories. |
| 128 | * |
| 129 | * @since 1.5.1 |
| 130 | * @access public |
| 131 | * |
| 132 | * @return array Widget categories. |
| 133 | */ |
| 134 | public function get_categories() { |
| 135 | return array( 'premium-elements' ); |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * Retrieve Widget Support URL. |
| 140 | * |
| 141 | * @access public |
| 142 | * |
| 143 | * @return string support URL. |
| 144 | */ |
| 145 | public function get_custom_help_url() { |
| 146 | return 'https://premiumaddons.com/support/'; |
| 147 | } |
| 148 | |
| 149 | public function has_widget_inner_wrapper(): bool { |
| 150 | return false; |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * Register Dual Heading controls. |
| 155 | * |
| 156 | * @since 1.0.0 |
| 157 | * @access protected |
| 158 | */ |
| 159 | protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore |
| 160 | |
| 161 | /*Start General Section*/ |
| 162 | $this->start_controls_section( |
| 163 | 'premium_dual_header_general_settings', |
| 164 | array( |
| 165 | 'label' => __( 'Dual Heading', 'premium-addons-for-elementor' ), |
| 166 | ) |
| 167 | ); |
| 168 | |
| 169 | $demo = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/dual-header-widget-for-elementor-page-builder/', 'dual', 'wp-editor', 'demo' ); |
| 170 | Helper_Functions::add_templates_controls( $this, 'dual-heading', $demo ); |
| 171 | |
| 172 | /*First Header*/ |
| 173 | $this->add_control( |
| 174 | 'premium_dual_header_first_header_text', |
| 175 | array( |
| 176 | 'label' => __( 'First Heading', 'premium-addons-for-elementor' ), |
| 177 | 'type' => Controls_Manager::TEXT, |
| 178 | 'dynamic' => array( 'active' => true ), |
| 179 | 'default' => __( 'Premium', 'premium-addons-for-elementor' ), |
| 180 | 'label_block' => true, |
| 181 | ) |
| 182 | ); |
| 183 | |
| 184 | /*Second Header*/ |
| 185 | $this->add_control( |
| 186 | 'premium_dual_header_second_header_text', |
| 187 | array( |
| 188 | 'label' => __( 'Second Heading', 'premium-addons-for-elementor' ), |
| 189 | 'type' => Controls_Manager::TEXT, |
| 190 | 'dynamic' => array( 'active' => true ), |
| 191 | 'default' => __( 'Addons', 'premium-addons-for-elementor' ), |
| 192 | 'label_block' => true, |
| 193 | ) |
| 194 | ); |
| 195 | |
| 196 | /*Title Tag*/ |
| 197 | $this->add_control( |
| 198 | 'premium_dual_header_first_header_tag', |
| 199 | array( |
| 200 | 'label' => __( 'HTML Tag', 'premium-addons-for-elementor' ), |
| 201 | 'type' => Controls_Manager::SELECT, |
| 202 | 'options' => array( |
| 203 | 'h1' => 'H1', |
| 204 | 'h2' => 'H2', |
| 205 | 'h3' => 'H3', |
| 206 | 'h4' => 'H4', |
| 207 | 'h5' => 'H5', |
| 208 | 'h6' => 'H6', |
| 209 | 'span' => 'span', |
| 210 | 'p' => 'p', |
| 211 | ), |
| 212 | 'default' => 'h2', |
| 213 | 'label_block' => true, |
| 214 | ) |
| 215 | ); |
| 216 | |
| 217 | $this->add_responsive_control( |
| 218 | 'premium_dual_header_position', |
| 219 | array( |
| 220 | 'label' => __( 'Display', 'premium-addons-for-elementor' ), |
| 221 | 'type' => Controls_Manager::SELECT, |
| 222 | 'options' => array( |
| 223 | 'inline' => __( 'Inline', 'premium-addons-for-elementor' ), |
| 224 | 'block' => __( 'Block', 'premium-addons-for-elementor' ), |
| 225 | ), |
| 226 | 'default' => 'inline', |
| 227 | 'prefix_class' => 'premium-header-', |
| 228 | 'selectors' => array( |
| 229 | '{{WRAPPER}} .premium-dual-header-first-header span' => 'display: {{VALUE}}', |
| 230 | ), |
| 231 | 'label_block' => true, |
| 232 | ) |
| 233 | ); |
| 234 | |
| 235 | $this->add_control( |
| 236 | 'premium_dual_header_link_switcher', |
| 237 | array( |
| 238 | 'label' => __( 'Link', 'premium-addons-for-elementor' ), |
| 239 | 'type' => Controls_Manager::SWITCHER, |
| 240 | 'separator' => 'before', |
| 241 | 'description' => __( 'Enable or disable link', 'premium-addons-for-elementor' ), |
| 242 | ) |
| 243 | ); |
| 244 | |
| 245 | $this->add_control( |
| 246 | 'premium_dual_heading_link_selection', |
| 247 | array( |
| 248 | 'label' => __( 'Link Type', 'premium-addons-for-elementor' ), |
| 249 | 'type' => Controls_Manager::SELECT, |
| 250 | 'options' => array( |
| 251 | 'url' => __( 'URL', 'premium-addons-for-elementor' ), |
| 252 | 'link' => __( 'Existing Page', 'premium-addons-for-elementor' ), |
| 253 | ), |
| 254 | 'default' => 'url', |
| 255 | 'label_block' => true, |
| 256 | 'condition' => array( |
| 257 | 'premium_dual_header_link_switcher' => 'yes', |
| 258 | ), |
| 259 | ) |
| 260 | ); |
| 261 | |
| 262 | $this->add_control( |
| 263 | 'premium_dual_heading_link', |
| 264 | array( |
| 265 | 'label' => __( 'Link', 'premium-addons-for-elementor' ), |
| 266 | 'type' => Controls_Manager::URL, |
| 267 | 'dynamic' => array( 'active' => true ), |
| 268 | 'default' => array( |
| 269 | 'url' => '#', |
| 270 | ), |
| 271 | 'placeholder' => 'https://premiumaddons.com/', |
| 272 | 'label_block' => true, |
| 273 | 'separator' => 'after', |
| 274 | 'condition' => array( |
| 275 | 'premium_dual_header_link_switcher' => 'yes', |
| 276 | 'premium_dual_heading_link_selection' => 'url', |
| 277 | ), |
| 278 | ) |
| 279 | ); |
| 280 | |
| 281 | $this->add_control( |
| 282 | 'premium_dual_heading_existing_link', |
| 283 | array( |
| 284 | 'label' => __( 'Existing Page', 'premium-addons-for-elementor' ), |
| 285 | 'type' => Premium_Post_Filter::TYPE, |
| 286 | 'label_block' => true, |
| 287 | 'multiple' => false, |
| 288 | 'separator' => 'after', |
| 289 | 'source' => array( 'post', 'page' ), |
| 290 | 'condition' => array( |
| 291 | 'premium_dual_header_link_switcher' => 'yes', |
| 292 | 'premium_dual_heading_link_selection' => 'link', |
| 293 | ), |
| 294 | ) |
| 295 | ); |
| 296 | |
| 297 | $this->add_responsive_control( |
| 298 | 'premium_dual_header_text_align', |
| 299 | array( |
| 300 | 'label' => __( 'Alignment', 'premium-addons-for-elementor' ), |
| 301 | 'type' => Controls_Manager::CHOOSE, |
| 302 | 'separator' => 'before', |
| 303 | 'options' => array( |
| 304 | 'left' => array( |
| 305 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 306 | 'icon' => 'eicon-text-align-left', |
| 307 | ), |
| 308 | 'center' => array( |
| 309 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 310 | 'icon' => 'eicon-text-align-center', |
| 311 | ), |
| 312 | 'right' => array( |
| 313 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 314 | 'icon' => 'eicon-text-align-right', |
| 315 | ), |
| 316 | ), |
| 317 | 'default' => 'center', |
| 318 | 'selectors' => array( |
| 319 | '{{WRAPPER}}' => 'text-align: {{VALUE}};', |
| 320 | ), |
| 321 | ) |
| 322 | ); |
| 323 | |
| 324 | $this->add_responsive_control( |
| 325 | 'first_rotate', |
| 326 | array( |
| 327 | 'label' => __( 'First Heading Rotation (deg)', 'premium-addons-for-elementor' ), |
| 328 | 'type' => Controls_Manager::NUMBER, |
| 329 | 'separator' => 'before', |
| 330 | 'min' => -180, |
| 331 | 'max' => 180, |
| 332 | 'selectors' => array( |
| 333 | '{{WRAPPER}}.premium-header-inline .premium-dual-header-first-span' => 'display:inline-block !important; transform: rotate({{VALUE}}deg);', |
| 334 | '{{WRAPPER}}.premium-header-block .premium-dual-header-first-span' => 'transform: rotate({{VALUE}}deg);', |
| 335 | ), |
| 336 | ) |
| 337 | ); |
| 338 | |
| 339 | $this->add_responsive_control( |
| 340 | 'second_rotate', |
| 341 | array( |
| 342 | 'label' => __( 'Second Heading Rotation (deg)', 'premium-addons-for-elementor' ), |
| 343 | 'type' => Controls_Manager::NUMBER, |
| 344 | 'min' => -180, |
| 345 | 'max' => 180, |
| 346 | 'selectors' => array( |
| 347 | '{{WRAPPER}}.premium-header-inline .premium-dual-header-second-header' => 'display:inline-block !important; transform: rotate({{VALUE}}deg);', |
| 348 | '{{WRAPPER}}.premium-header-block .premium-dual-header-second-header' => 'transform: rotate({{VALUE}}deg);', |
| 349 | ), |
| 350 | ) |
| 351 | ); |
| 352 | |
| 353 | $this->add_responsive_control( |
| 354 | 'transform_origin_x', |
| 355 | array( |
| 356 | 'label' => __( 'X Anchor Point', 'premium-addons-for-elementor' ), |
| 357 | 'type' => Controls_Manager::CHOOSE, |
| 358 | 'default' => 'center', |
| 359 | 'options' => array( |
| 360 | 'left' => array( |
| 361 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 362 | 'icon' => 'eicon-h-align-left', |
| 363 | ), |
| 364 | 'center' => array( |
| 365 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 366 | 'icon' => 'eicon-h-align-center', |
| 367 | ), |
| 368 | 'right' => array( |
| 369 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 370 | 'icon' => 'eicon-h-align-right', |
| 371 | ), |
| 372 | ), |
| 373 | 'label_block' => false, |
| 374 | 'toggle' => false, |
| 375 | 'render_type' => 'ui', |
| 376 | 'condition' => array( |
| 377 | 'rotate!' => '', |
| 378 | ), |
| 379 | ) |
| 380 | ); |
| 381 | |
| 382 | $this->add_control( |
| 383 | 'background_text_switcher', |
| 384 | array( |
| 385 | 'label' => __( 'Background Text', 'premium-addons-for-elementor' ), |
| 386 | 'type' => Controls_Manager::SWITCHER, |
| 387 | 'separator' => 'before', |
| 388 | 'prefix_class' => 'premium-bg-text-', |
| 389 | ) |
| 390 | ); |
| 391 | |
| 392 | $this->add_control( |
| 393 | 'background_text', |
| 394 | array( |
| 395 | 'label' => __( 'Text', 'premium-addons-for-elementor' ), |
| 396 | 'type' => Controls_Manager::TEXT, |
| 397 | 'default' => __( 'Awesome Title', 'premium-addons-for-elementor' ), |
| 398 | 'condition' => array( |
| 399 | 'background_text_switcher' => 'yes', |
| 400 | ), |
| 401 | 'selectors' => array( |
| 402 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'content: "{{VALUE}}"', |
| 403 | ), |
| 404 | |
| 405 | ) |
| 406 | ); |
| 407 | |
| 408 | $this->add_control( |
| 409 | 'background_text_width', |
| 410 | array( |
| 411 | 'label' => __( 'Width', 'premium-addons-for-elementor' ), |
| 412 | 'type' => Controls_Manager::SELECT, |
| 413 | 'options' => array( |
| 414 | 'auto' => __( 'Auto', 'premium-addons-for-elementor' ), |
| 415 | '100%' => __( 'Full Width', 'premium-addons-for-elementor' ), |
| 416 | ), |
| 417 | 'default' => 'auto', |
| 418 | 'label_block' => true, |
| 419 | 'selectors' => array( |
| 420 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'width: {{VALUE}}', |
| 421 | ), |
| 422 | 'condition' => array( |
| 423 | 'background_text_switcher' => 'yes', |
| 424 | ), |
| 425 | ) |
| 426 | ); |
| 427 | |
| 428 | $this->add_responsive_control( |
| 429 | 'background_text_left', |
| 430 | array( |
| 431 | 'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ), |
| 432 | 'type' => Controls_Manager::SLIDER, |
| 433 | 'size_units' => array( 'px', 'em', '%', 'custom' ), |
| 434 | 'range' => array( |
| 435 | 'px' => array( |
| 436 | 'min' => -500, |
| 437 | 'max' => 500, |
| 438 | ), |
| 439 | 'em' => array( |
| 440 | 'min' => -50, |
| 441 | 'max' => 50, |
| 442 | ), |
| 443 | '%' => array( |
| 444 | 'min' => -100, |
| 445 | 'max' => 100, |
| 446 | ), |
| 447 | ), |
| 448 | 'selectors' => array( |
| 449 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'left: {{SIZE}}{{UNIT}}', |
| 450 | ), |
| 451 | 'condition' => array( |
| 452 | 'background_text_switcher' => 'yes', |
| 453 | ), |
| 454 | ) |
| 455 | ); |
| 456 | |
| 457 | $this->add_responsive_control( |
| 458 | 'background_text_top', |
| 459 | array( |
| 460 | 'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ), |
| 461 | 'type' => Controls_Manager::SLIDER, |
| 462 | 'size_units' => array( 'px', 'em', '%', 'custom' ), |
| 463 | 'range' => array( |
| 464 | 'px' => array( |
| 465 | 'min' => -500, |
| 466 | 'max' => 500, |
| 467 | ), |
| 468 | 'em' => array( |
| 469 | 'min' => -50, |
| 470 | 'max' => 50, |
| 471 | ), |
| 472 | '%' => array( |
| 473 | 'min' => -100, |
| 474 | 'max' => 100, |
| 475 | ), |
| 476 | ), |
| 477 | 'selectors' => array( |
| 478 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'top: {{SIZE}}{{UNIT}}', |
| 479 | ), |
| 480 | 'condition' => array( |
| 481 | 'background_text_switcher' => 'yes', |
| 482 | ), |
| 483 | ) |
| 484 | ); |
| 485 | |
| 486 | $this->add_responsive_control( |
| 487 | 'background_text_align', |
| 488 | array( |
| 489 | 'label' => __( 'Alignment', 'premium-addons-for-elementor' ), |
| 490 | 'type' => Controls_Manager::CHOOSE, |
| 491 | 'options' => array( |
| 492 | 'left' => array( |
| 493 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 494 | 'icon' => 'eicon-text-align-left', |
| 495 | ), |
| 496 | 'center' => array( |
| 497 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 498 | 'icon' => 'eicon-text-align-center', |
| 499 | ), |
| 500 | 'right' => array( |
| 501 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 502 | 'icon' => 'eicon-text-align-right', |
| 503 | ), |
| 504 | ), |
| 505 | 'default' => 'left', |
| 506 | 'selectors' => array( |
| 507 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'text-align: {{VALUE}};', |
| 508 | ), |
| 509 | 'condition' => array( |
| 510 | 'background_text_switcher' => 'yes', |
| 511 | ), |
| 512 | ) |
| 513 | ); |
| 514 | |
| 515 | $this->add_responsive_control( |
| 516 | 'background_text_rotate', |
| 517 | array( |
| 518 | 'label' => __( 'Rotate (degrees)', 'premium-addons-for-elementor' ), |
| 519 | 'type' => Controls_Manager::SLIDER, |
| 520 | 'size_units' => array( 'deg' ), |
| 521 | 'default' => array( |
| 522 | 'unit' => 'deg', |
| 523 | 'size' => 0, |
| 524 | ), |
| 525 | 'selectors' => array( |
| 526 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'transform: rotate({{SIZE}}{{UNIT}})', |
| 527 | ), |
| 528 | 'condition' => array( |
| 529 | 'background_text_switcher' => 'yes', |
| 530 | ), |
| 531 | ) |
| 532 | ); |
| 533 | |
| 534 | $this->add_control( |
| 535 | 'mask_switcher', |
| 536 | array( |
| 537 | 'label' => __( 'Minimal Mask Effect', 'premium-addons-for-elementor' ), |
| 538 | 'type' => Controls_Manager::SWITCHER, |
| 539 | 'separator' => 'before', |
| 540 | 'render_type' => 'template', |
| 541 | 'prefix_class' => 'premium-mask-', |
| 542 | 'description' => __( 'Please note That this effect takes place once the element is in the viewport', 'premium-addons-for-elementor' ), |
| 543 | ) |
| 544 | ); |
| 545 | |
| 546 | $this->add_control( |
| 547 | 'mask_color', |
| 548 | array( |
| 549 | 'label' => __( 'Mask Color', 'premium-addons-for-elementor' ), |
| 550 | 'type' => Controls_Manager::COLOR, |
| 551 | 'render_type' => 'template', |
| 552 | 'selectors' => array( |
| 553 | '{{WRAPPER}}.premium-mask-yes .premium-dual-header-first-header span::after' => 'background: {{VALUE}};', |
| 554 | ), |
| 555 | 'condition' => array( |
| 556 | 'mask_switcher' => 'yes', |
| 557 | ), |
| 558 | ) |
| 559 | ); |
| 560 | |
| 561 | $this->add_control( |
| 562 | 'premium_mask_dir', |
| 563 | array( |
| 564 | 'label' => __( 'Direction', 'premium-addons-for-elementor' ), |
| 565 | 'type' => Controls_Manager::SELECT, |
| 566 | 'default' => 'tr', |
| 567 | 'prefix_class' => 'premium-mask-', |
| 568 | 'render_type' => 'template', |
| 569 | 'options' => array( |
| 570 | 'tr' => __( 'To Right', 'premium-addons-for-elementor' ), |
| 571 | 'tl' => __( 'To Left', 'premium-addons-for-elementor' ), |
| 572 | 'tt' => __( 'To Top', 'premium-addons-for-elementor' ), |
| 573 | 'tb' => __( 'To Bottom', 'premium-addons-for-elementor' ), |
| 574 | ), |
| 575 | 'condition' => array( |
| 576 | 'mask_switcher' => 'yes', |
| 577 | ), |
| 578 | ) |
| 579 | ); |
| 580 | |
| 581 | $this->add_responsive_control( |
| 582 | 'mask_padding', |
| 583 | array( |
| 584 | 'label' => __( 'Words Padding', 'premium-addons-for-elementor' ), |
| 585 | 'type' => Controls_Manager::DIMENSIONS, |
| 586 | 'size_units' => array( 'px', 'em', '%' ), |
| 587 | 'selectors' => array( |
| 588 | '{{WRAPPER}} .premium-mask-span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 589 | ), |
| 590 | 'condition' => array( |
| 591 | 'mask_switcher' => 'yes', |
| 592 | ), |
| 593 | ) |
| 594 | ); |
| 595 | |
| 596 | $this->add_control( |
| 597 | 'noise_first', |
| 598 | array( |
| 599 | 'label' => __( 'First Heading Noise Effect', 'premium-addons-for-elementor' ), |
| 600 | 'type' => Controls_Manager::SWITCHER, |
| 601 | 'separator' => 'before', |
| 602 | 'prefix_class' => 'premium-title-first-noise-', |
| 603 | 'render_type' => 'template', |
| 604 | 'condition' => array( |
| 605 | 'mask_switcher!' => 'yes', |
| 606 | 'premium_dual_header_first_back_clip' => 'color', |
| 607 | ), |
| 608 | ) |
| 609 | ); |
| 610 | |
| 611 | $this->add_control( |
| 612 | 'noise_second', |
| 613 | array( |
| 614 | 'label' => __( 'Second Heading Noise Effect', 'premium-addons-for-elementor' ), |
| 615 | 'type' => Controls_Manager::SWITCHER, |
| 616 | 'prefix_class' => 'premium-title-second-noise-', |
| 617 | 'render_type' => 'template', |
| 618 | 'condition' => array( |
| 619 | 'mask_switcher!' => 'yes', |
| 620 | 'premium_dual_header_second_back_clip' => 'color', |
| 621 | ), |
| 622 | ) |
| 623 | ); |
| 624 | |
| 625 | $this->end_controls_section(); |
| 626 | |
| 627 | $this->start_controls_section( |
| 628 | 'premium_dual_header_description_section', |
| 629 | array( |
| 630 | 'label' => __( 'Description', 'premium-addons-for-elementor' ), |
| 631 | ) |
| 632 | ); |
| 633 | |
| 634 | $this->add_control( |
| 635 | 'premium_dual_header_desc_switcher', |
| 636 | array( |
| 637 | 'label' => __( 'Description', 'premium-addons-for-elementor' ), |
| 638 | 'type' => Controls_Manager::SWITCHER, |
| 639 | 'default' => '', |
| 640 | ) |
| 641 | ); |
| 642 | |
| 643 | $this->add_control( |
| 644 | 'premium_dual_header_desc_text', |
| 645 | array( |
| 646 | 'label' => __( 'Description', 'premium-addons-for-elementor' ), |
| 647 | 'type' => Controls_Manager::WYSIWYG, |
| 648 | 'dynamic' => array( 'active' => true ), |
| 649 | 'default' => __( 'Extend Your Elementor Website with Numerous Widgets, Global Addons, and Features.', 'premium-addons-for-elementor' ), |
| 650 | 'condition' => array( |
| 651 | 'premium_dual_header_desc_switcher' => 'yes', |
| 652 | ), |
| 653 | ) |
| 654 | ); |
| 655 | |
| 656 | $this->add_responsive_control( |
| 657 | 'premium_dual_header_desc_display', |
| 658 | array( |
| 659 | 'label' => __( 'Display', 'premium-addons-for-elementor' ), |
| 660 | 'type' => Controls_Manager::CHOOSE, |
| 661 | 'options' => array( |
| 662 | 'row' => array( |
| 663 | 'title' => __( 'Inline', 'premium-addons-for-elementor' ), |
| 664 | 'icon' => 'eicon-ellipsis-h', |
| 665 | ), |
| 666 | 'column' => array( |
| 667 | 'title' => __( 'Block', 'premium-addons-for-elementor' ), |
| 668 | 'icon' => 'eicon-ellipsis-v', |
| 669 | ), |
| 670 | ), |
| 671 | 'default' => 'column', |
| 672 | 'prefix_class' => 'premium-dh-desc-display-', |
| 673 | 'toggle' => false, |
| 674 | 'selectors' => array( |
| 675 | '{{WRAPPER}} .premium-dual-header-wrapper' => 'flex-direction: {{VALUE}};', |
| 676 | ), |
| 677 | 'condition' => array( |
| 678 | 'premium_dual_header_desc_switcher' => 'yes', |
| 679 | ), |
| 680 | ) |
| 681 | ); |
| 682 | |
| 683 | $this->add_responsive_control( |
| 684 | 'premium_dual_header_desc_order', |
| 685 | array( |
| 686 | 'label' => __( 'Order', 'premium-addons-for-elementor' ), |
| 687 | 'type' => Controls_Manager::CHOOSE, |
| 688 | 'options' => array( |
| 689 | '0' => array( |
| 690 | 'title' => __( 'Before Heading', 'premium-addons-for-elementor' ), |
| 691 | 'icon' => 'eicon-order-start', |
| 692 | ), |
| 693 | '2' => array( |
| 694 | 'title' => __( 'After Heading', 'premium-addons-for-elementor' ), |
| 695 | 'icon' => 'eicon-order-end', |
| 696 | ), |
| 697 | ), |
| 698 | 'default' => '2', |
| 699 | 'toggle' => false, |
| 700 | 'selectors' => array( |
| 701 | '{{WRAPPER}} .premium-dh-description' => 'order: {{VALUE}};', |
| 702 | ), |
| 703 | 'condition' => array( |
| 704 | 'premium_dual_header_desc_switcher' => 'yes', |
| 705 | ), |
| 706 | ) |
| 707 | ); |
| 708 | |
| 709 | $this->add_responsive_control( |
| 710 | 'v_align', |
| 711 | array( |
| 712 | 'label' => __( 'Vertical Alignment', 'premium-addons-for-elementor' ), |
| 713 | 'type' => Controls_Manager::CHOOSE, |
| 714 | 'description' => __( 'Effective when the display is set to <b>"inline</b>"', 'premium-addons-for-elementor' ), |
| 715 | 'options' => array( |
| 716 | 'start' => array( |
| 717 | 'title' => __( 'Top', 'premium-addons-for-elementor' ), |
| 718 | 'icon' => 'eicon-align-start-v', |
| 719 | ), |
| 720 | 'center' => array( |
| 721 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 722 | 'icon' => 'eicon-align-center-v', |
| 723 | ), |
| 724 | 'end' => array( |
| 725 | 'title' => __( 'Bottom', 'premium-addons-for-elementor' ), |
| 726 | 'icon' => 'eicon-align-end-v', |
| 727 | ), |
| 728 | 'stretch' => array( |
| 729 | 'title' => __( 'Stretch', 'premium-addons-for-elementor' ), |
| 730 | 'icon' => 'eicon-align-stretch-v', |
| 731 | ), |
| 732 | ), |
| 733 | 'default' => 'center', |
| 734 | 'toggle' => false, |
| 735 | 'selectors' => array( |
| 736 | '{{WRAPPER}} .premium-dh-description' => 'align-self: {{VALUE}};', |
| 737 | ), |
| 738 | 'condition' => array( |
| 739 | 'premium_dual_header_desc_switcher' => 'yes', |
| 740 | ), |
| 741 | ) |
| 742 | ); |
| 743 | |
| 744 | $this->add_responsive_control( |
| 745 | 'premium_dual_header_desc_align', |
| 746 | array( |
| 747 | 'label' => __( 'Text Alignment', 'premium-addons-for-elementor' ), |
| 748 | 'type' => Controls_Manager::CHOOSE, |
| 749 | 'toggle' => false, |
| 750 | 'options' => array( |
| 751 | 'left' => array( |
| 752 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 753 | 'icon' => 'eicon-text-align-left', |
| 754 | ), |
| 755 | 'center' => array( |
| 756 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 757 | 'icon' => 'eicon-text-align-center', |
| 758 | ), |
| 759 | 'right' => array( |
| 760 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 761 | 'icon' => 'eicon-text-align-right', |
| 762 | ), |
| 763 | 'justify' => array( |
| 764 | 'title' => __( 'Justify', 'premium-addons-for-elementor' ), |
| 765 | 'icon' => 'eicon-text-align-justify', |
| 766 | ), |
| 767 | ), |
| 768 | 'selectors' => array( |
| 769 | '{{WRAPPER}} .premium-dh-description' => 'text-align: {{VALUE}};', |
| 770 | ), |
| 771 | 'condition' => array( |
| 772 | 'premium_dual_header_desc_switcher' => 'yes', |
| 773 | ), |
| 774 | ) |
| 775 | ); |
| 776 | |
| 777 | $this->end_controls_section(); |
| 778 | |
| 779 | $this->start_controls_section( |
| 780 | 'section_pa_docs', |
| 781 | array( |
| 782 | 'label' => __( 'Help & Docs', 'premium-addons-for-elementor' ), |
| 783 | ) |
| 784 | ); |
| 785 | |
| 786 | $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/dual-heading-widget-tutorial', 'dual-h-widget', 'wp-editor', 'get-support' ); |
| 787 | |
| 788 | $this->add_control( |
| 789 | 'doc_1', |
| 790 | array( |
| 791 | 'type' => Controls_Manager::RAW_HTML, |
| 792 | 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url, __( 'Getting started »', 'premium-addons-for-elementor' ) ), |
| 793 | 'content_classes' => 'editor-pa-doc', |
| 794 | ) |
| 795 | ); |
| 796 | |
| 797 | $doc2_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/how-to-add-an-outlined-heading-to-my-website', 'dual-h-widget', 'wp-editor', 'get-support' ); |
| 798 | |
| 799 | $this->add_control( |
| 800 | 'doc_2', |
| 801 | array( |
| 802 | 'type' => Controls_Manager::RAW_HTML, |
| 803 | 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc2_url, __( 'How to add an outlined heading using Dual Heading widget »', 'premium-addons-for-elementor' ) ), |
| 804 | 'content_classes' => 'editor-pa-doc', |
| 805 | ) |
| 806 | ); |
| 807 | |
| 808 | Helper_Functions::register_element_feedback_controls( $this ); |
| 809 | |
| 810 | $this->end_controls_section(); |
| 811 | |
| 812 | Helper_Functions::register_papro_promotion_controls( $this, 'dual' ); |
| 813 | |
| 814 | $this->start_controls_section( |
| 815 | 'premium_dual_header_first_style', |
| 816 | array( |
| 817 | 'label' => __( 'First Heading', 'premium-addons-for-elementor' ), |
| 818 | 'tab' => Controls_Manager::TAB_STYLE, |
| 819 | ) |
| 820 | ); |
| 821 | |
| 822 | $this->add_group_control( |
| 823 | Group_Control_Typography::get_type(), |
| 824 | array( |
| 825 | 'name' => 'first_header_typography', |
| 826 | 'global' => array( |
| 827 | 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, |
| 828 | ), |
| 829 | 'selector' => '{{WRAPPER}} .premium-dual-header-first-span', |
| 830 | ) |
| 831 | ); |
| 832 | |
| 833 | $this->add_control( |
| 834 | 'premium_dual_header_first_animated', |
| 835 | array( |
| 836 | 'label' => __( 'Animated Background', 'premium-addons-for-elementor' ), |
| 837 | 'type' => Controls_Manager::SWITCHER, |
| 838 | ) |
| 839 | ); |
| 840 | |
| 841 | $this->add_control( |
| 842 | 'premium_dual_header_first_back_clip', |
| 843 | array( |
| 844 | 'label' => __( 'Background Style', 'premium-addons-for-elementor' ), |
| 845 | 'type' => Controls_Manager::SELECT, |
| 846 | 'default' => 'color', |
| 847 | 'description' => __( 'Choose ‘Normal’ style to put a background behind the text. Choose ‘Clipped’ style so the background will be clipped on the text.', 'premium-addons-for-elementor' ), |
| 848 | 'options' => array( |
| 849 | 'color' => __( 'Normal', 'premium-addons-for-elementor' ), |
| 850 | 'clipped' => __( 'Clipped', 'premium-addons-for-elementor' ), |
| 851 | ), |
| 852 | 'label_block' => true, |
| 853 | ) |
| 854 | ); |
| 855 | |
| 856 | $this->add_control( |
| 857 | 'premium_dual_header_first_color', |
| 858 | array( |
| 859 | 'label' => __( 'Text Color', 'premium-addons-for-elementor' ), |
| 860 | 'type' => Controls_Manager::COLOR, |
| 861 | 'global' => array( |
| 862 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 863 | ), |
| 864 | 'condition' => array( |
| 865 | 'premium_dual_header_first_back_clip' => 'color', |
| 866 | ), |
| 867 | 'selectors' => array( |
| 868 | '{{WRAPPER}} .premium-dual-header-first-span' => 'color: {{VALUE}};', |
| 869 | ), |
| 870 | ) |
| 871 | ); |
| 872 | |
| 873 | $this->add_group_control( |
| 874 | Premium_Background::get_type(), |
| 875 | array( |
| 876 | 'name' => 'premium_dual_header_first_background', |
| 877 | 'types' => array( 'classic', 'gradient' ), |
| 878 | 'condition' => array( |
| 879 | 'premium_dual_header_first_back_clip' => 'color', |
| 880 | ), |
| 881 | 'selector' => '{{WRAPPER}} .premium-dual-header-first-span', |
| 882 | ) |
| 883 | ); |
| 884 | |
| 885 | $this->add_control( |
| 886 | 'first_lq_effect', |
| 887 | array( |
| 888 | 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ), |
| 889 | 'type' => Controls_Manager::SELECT, |
| 890 | 'description' => sprintf( |
| 891 | /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */ |
| 892 | esc_html__( 'Important: Make sure this element has a semi-transparent background color to see the effect. See all presets from %1$shere%2$s.', 'premium-addons-for-elementor' ), |
| 893 | '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">', |
| 894 | '</a>' |
| 895 | ), |
| 896 | 'options' => array( |
| 897 | 'none' => __( 'None', 'premium-addons-for-elementor' ), |
| 898 | 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ), |
| 899 | 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ), |
| 900 | 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ), |
| 901 | 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ), |
| 902 | 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ), |
| 903 | 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ), |
| 904 | ), |
| 905 | 'prefix_class' => 'premium-lq__', |
| 906 | 'default' => 'none', |
| 907 | 'label_block' => true, |
| 908 | 'render_type' => 'template', |
| 909 | 'condition' => array( |
| 910 | 'premium_dual_header_first_back_clip' => 'color', |
| 911 | ), |
| 912 | ) |
| 913 | ); |
| 914 | |
| 915 | $this->add_control( |
| 916 | 'premium_dual_header_first_stroke', |
| 917 | array( |
| 918 | 'label' => __( 'Stroke', 'premium-addons-for-elementor' ), |
| 919 | 'type' => Controls_Manager::SWITCHER, |
| 920 | 'condition' => array( |
| 921 | 'premium_dual_header_first_back_clip' => 'clipped', |
| 922 | ), |
| 923 | ) |
| 924 | ); |
| 925 | |
| 926 | $this->add_control( |
| 927 | 'premium_dual_header_first_stroke_text_color', |
| 928 | array( |
| 929 | 'label' => __( 'Stroke Text Color', 'premium-addons-for-elementor' ), |
| 930 | 'type' => Controls_Manager::COLOR, |
| 931 | 'condition' => array( |
| 932 | 'premium_dual_header_first_back_clip' => 'clipped', |
| 933 | 'premium_dual_header_first_stroke' => 'yes', |
| 934 | ), |
| 935 | 'selectors' => array( |
| 936 | '{{WRAPPER}} .premium-dual-header-first-clip.stroke .premium-dual-header-first-span' => '-webkit-text-stroke-color: {{VALUE}};', |
| 937 | ), |
| 938 | ) |
| 939 | ); |
| 940 | |
| 941 | $this->add_control( |
| 942 | 'premium_dual_header_first_stroke_color', |
| 943 | array( |
| 944 | 'label' => __( 'Stroke Fill Color', 'premium-addons-for-elementor' ), |
| 945 | 'type' => Controls_Manager::COLOR, |
| 946 | 'condition' => array( |
| 947 | 'premium_dual_header_first_back_clip' => 'clipped', |
| 948 | 'premium_dual_header_first_stroke' => 'yes', |
| 949 | ), |
| 950 | 'selectors' => array( |
| 951 | '{{WRAPPER}} .premium-dual-header-first-clip.stroke .premium-dual-header-first-span' => '-webkit-text-fill-color: {{VALUE}};', |
| 952 | ), |
| 953 | ) |
| 954 | ); |
| 955 | |
| 956 | $this->add_responsive_control( |
| 957 | 'premium_dual_header_first_stroke_width', |
| 958 | array( |
| 959 | 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ), |
| 960 | 'type' => Controls_Manager::SLIDER, |
| 961 | 'condition' => array( |
| 962 | 'premium_dual_header_first_back_clip' => 'clipped', |
| 963 | 'premium_dual_header_first_stroke' => 'yes', |
| 964 | ), |
| 965 | 'selectors' => array( |
| 966 | '{{WRAPPER}} .premium-dual-header-first-clip.stroke .premium-dual-header-first-span' => '-webkit-text-stroke-width: {{SIZE}}px;', |
| 967 | ), |
| 968 | ) |
| 969 | ); |
| 970 | |
| 971 | $this->add_group_control( |
| 972 | Premium_Background::get_type(), |
| 973 | array( |
| 974 | 'name' => 'premium_dual_header_first_clipped_background', |
| 975 | 'types' => array( 'classic', 'gradient' ), |
| 976 | 'condition' => array( |
| 977 | 'premium_dual_header_first_back_clip' => 'clipped', |
| 978 | 'premium_dual_header_first_stroke!' => 'yes', |
| 979 | ), |
| 980 | 'selector' => '{{WRAPPER}} .premium-dual-header-first-span', |
| 981 | ) |
| 982 | ); |
| 983 | |
| 984 | $this->add_control( |
| 985 | 'first_wave_switcher', |
| 986 | array( |
| 987 | 'label' => __( 'Wave Effect', 'premium-addons-for-elementor' ), |
| 988 | 'type' => Controls_Manager::SWITCHER, |
| 989 | 'prefix_class' => 'premium-title-first-wave-', |
| 990 | 'condition' => array( |
| 991 | 'premium_dual_header_first_back_clip' => 'clipped', |
| 992 | 'premium_dual_header_first_stroke!' => 'yes', |
| 993 | ), |
| 994 | ) |
| 995 | ); |
| 996 | |
| 997 | $this->add_control( |
| 998 | 'first_animation_speed', |
| 999 | array( |
| 1000 | 'label' => __( 'Animation Speed (sec)', 'premium-addons-for-elementor' ), |
| 1001 | 'type' => Controls_Manager::SLIDER, |
| 1002 | 'range' => array( |
| 1003 | 'px' => array( |
| 1004 | 'min' => 0, |
| 1005 | 'max' => 10, |
| 1006 | 'step' => .1, |
| 1007 | ), |
| 1008 | ), |
| 1009 | 'selectors' => array( |
| 1010 | '{{WRAPPER}} .premium-dual-header-first-span' => 'animation-duration: {{SIZE}}s ', |
| 1011 | ), |
| 1012 | 'condition' => array( |
| 1013 | 'premium_dual_header_first_animated' => 'yes', |
| 1014 | ), |
| 1015 | ) |
| 1016 | ); |
| 1017 | |
| 1018 | $this->add_group_control( |
| 1019 | Group_Control_Border::get_type(), |
| 1020 | array( |
| 1021 | 'name' => 'first_header_border', |
| 1022 | 'selector' => '{{WRAPPER}} .premium-dual-header-first-span', |
| 1023 | 'separator' => 'before', |
| 1024 | ) |
| 1025 | ); |
| 1026 | |
| 1027 | $this->add_control( |
| 1028 | 'premium_dual_header_first_border_radius', |
| 1029 | array( |
| 1030 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1031 | 'type' => Controls_Manager::SLIDER, |
| 1032 | 'size_units' => array( 'px', '%', 'em' ), |
| 1033 | 'selectors' => array( |
| 1034 | '{{WRAPPER}} .premium-dual-header-first-span' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 1035 | ), |
| 1036 | ) |
| 1037 | ); |
| 1038 | |
| 1039 | $this->add_group_control( |
| 1040 | Group_Control_Text_Shadow::get_type(), |
| 1041 | array( |
| 1042 | 'label' => __( 'Shadow', 'premium-addons-for-elementor' ), |
| 1043 | 'name' => 'premium_dual_header_first_text_shadow', |
| 1044 | 'selector' => '{{WRAPPER}} .premium-dual-header-first-span', |
| 1045 | ) |
| 1046 | ); |
| 1047 | |
| 1048 | $this->add_responsive_control( |
| 1049 | 'premium_dual_header_first_margin', |
| 1050 | array( |
| 1051 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1052 | 'type' => Controls_Manager::DIMENSIONS, |
| 1053 | 'size_units' => array( 'px', 'em', '%' ), |
| 1054 | 'separator' => 'before', |
| 1055 | 'selectors' => array( |
| 1056 | '{{WRAPPER}} .premium-dual-header-first-span' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1057 | ), |
| 1058 | ) |
| 1059 | ); |
| 1060 | |
| 1061 | $this->add_responsive_control( |
| 1062 | 'premium_dual_header_first_padding', |
| 1063 | array( |
| 1064 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1065 | 'type' => Controls_Manager::DIMENSIONS, |
| 1066 | 'size_units' => array( 'px', 'em', '%' ), |
| 1067 | 'selectors' => array( |
| 1068 | '{{WRAPPER}} .premium-dual-header-first-span, {{WRAPPER}}.premium-title-first-noise-yes .premium-dual-header-first-span::before, {{WRAPPER}}.premium-title-first-noise-yes .premium-dual-header-first-span::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1069 | ), |
| 1070 | ) |
| 1071 | ); |
| 1072 | |
| 1073 | $this->add_control( |
| 1074 | 'first_noise_heading', |
| 1075 | array( |
| 1076 | 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ), |
| 1077 | 'type' => Controls_Manager::HEADING, |
| 1078 | 'condition' => array( |
| 1079 | 'noise_first' => 'yes', |
| 1080 | ), |
| 1081 | ) |
| 1082 | ); |
| 1083 | |
| 1084 | $this->add_control( |
| 1085 | 'noise_first_color', |
| 1086 | array( |
| 1087 | 'label' => __( 'Color #1', 'premium-addons-for-elementor' ), |
| 1088 | 'type' => Controls_Manager::COLOR, |
| 1089 | 'condition' => array( |
| 1090 | 'noise_first' => 'yes', |
| 1091 | ), |
| 1092 | 'selectors' => array( |
| 1093 | '{{WRAPPER}}.premium-title-first-noise-yes .premium-dual-header-first-span::before' => 'text-shadow: 1px 0 {{VALUE}};', |
| 1094 | ), |
| 1095 | ) |
| 1096 | ); |
| 1097 | |
| 1098 | $this->add_control( |
| 1099 | 'noise_second_color', |
| 1100 | array( |
| 1101 | 'label' => __( 'Color #2', 'premium-addons-for-elementor' ), |
| 1102 | 'type' => Controls_Manager::COLOR, |
| 1103 | 'condition' => array( |
| 1104 | 'noise_first' => 'yes', |
| 1105 | ), |
| 1106 | 'selectors' => array( |
| 1107 | '{{WRAPPER}}.premium-title-first-noise-yes .premium-dual-header-first-span::after' => 'text-shadow: -1px 0 {{VALUE}};', |
| 1108 | ), |
| 1109 | ) |
| 1110 | ); |
| 1111 | |
| 1112 | $this->end_controls_section(); |
| 1113 | |
| 1114 | $this->start_controls_section( |
| 1115 | 'premium_dual_header_second_style', |
| 1116 | array( |
| 1117 | 'label' => __( 'Second Heading', 'premium-addons-for-elementor' ), |
| 1118 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1119 | ) |
| 1120 | ); |
| 1121 | |
| 1122 | $this->add_group_control( |
| 1123 | Group_Control_Typography::get_type(), |
| 1124 | array( |
| 1125 | 'name' => 'second_header_typography', |
| 1126 | 'global' => array( |
| 1127 | 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, |
| 1128 | ), |
| 1129 | 'selector' => '{{WRAPPER}} .premium-dual-header-second-header', |
| 1130 | ) |
| 1131 | ); |
| 1132 | |
| 1133 | $this->add_control( |
| 1134 | 'premium_dual_header_second_animated', |
| 1135 | array( |
| 1136 | 'label' => __( 'Animated Background', 'premium-addons-for-elementor' ), |
| 1137 | 'type' => Controls_Manager::SWITCHER, |
| 1138 | ) |
| 1139 | ); |
| 1140 | |
| 1141 | $this->add_control( |
| 1142 | 'premium_dual_header_second_back_clip', |
| 1143 | array( |
| 1144 | 'label' => __( 'Background Style', 'premium-addons-for-elementor' ), |
| 1145 | 'type' => Controls_Manager::SELECT, |
| 1146 | 'default' => 'color', |
| 1147 | 'description' => __( 'Choose ‘Normal’ style to put a background behind the text. Choose ‘Clipped’ style so the background will be clipped on the text.', 'premium-addons-for-elementor' ), |
| 1148 | 'options' => array( |
| 1149 | 'color' => __( 'Normal', 'premium-addons-for-elementor' ), |
| 1150 | 'clipped' => __( 'Clipped', 'premium-addons-for-elementor' ), |
| 1151 | ), |
| 1152 | 'label_block' => true, |
| 1153 | ) |
| 1154 | ); |
| 1155 | |
| 1156 | $this->add_control( |
| 1157 | 'premium_dual_header_second_color', |
| 1158 | array( |
| 1159 | 'label' => __( 'Text Color', 'premium-addons-for-elementor' ), |
| 1160 | 'type' => Controls_Manager::COLOR, |
| 1161 | 'global' => array( |
| 1162 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 1163 | ), |
| 1164 | 'condition' => array( |
| 1165 | 'premium_dual_header_second_back_clip' => 'color', |
| 1166 | ), |
| 1167 | 'selectors' => array( |
| 1168 | '{{WRAPPER}} .premium-dual-header-second-header' => 'color: {{VALUE}};', |
| 1169 | ), |
| 1170 | ) |
| 1171 | ); |
| 1172 | |
| 1173 | $this->add_group_control( |
| 1174 | Premium_Background::get_type(), |
| 1175 | array( |
| 1176 | 'name' => 'premium_dual_header_second_background', |
| 1177 | 'types' => array( 'classic', 'gradient' ), |
| 1178 | 'condition' => array( |
| 1179 | 'premium_dual_header_second_back_clip' => 'color', |
| 1180 | ), |
| 1181 | 'selector' => '{{WRAPPER}} .premium-dual-header-second-header', |
| 1182 | ) |
| 1183 | ); |
| 1184 | |
| 1185 | $this->add_control( |
| 1186 | 'second_lq_effect', |
| 1187 | array( |
| 1188 | 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ), |
| 1189 | 'type' => Controls_Manager::SELECT, |
| 1190 | 'description' => sprintf( |
| 1191 | /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */ |
| 1192 | esc_html__( 'Important: Make sure this element has a semi-transparent background color to see the effect. See all presets from %1$shere%2$s.', 'premium-addons-for-elementor' ), |
| 1193 | '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">', |
| 1194 | '</a>' |
| 1195 | ), |
| 1196 | 'options' => array( |
| 1197 | 'none' => __( 'None', 'premium-addons-for-elementor' ), |
| 1198 | 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ), |
| 1199 | 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ), |
| 1200 | 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1201 | 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1202 | 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1203 | 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1204 | ), |
| 1205 | 'prefix_class' => 'premium-box-lq__', |
| 1206 | 'default' => 'none', |
| 1207 | 'label_block' => true, |
| 1208 | 'render_type' => 'template', |
| 1209 | 'condition' => array( |
| 1210 | 'premium_dual_header_second_back_clip' => 'color', |
| 1211 | ), |
| 1212 | ) |
| 1213 | ); |
| 1214 | |
| 1215 | $this->add_control( |
| 1216 | 'premium_dual_header_second_stroke', |
| 1217 | array( |
| 1218 | 'label' => __( 'Stroke', 'premium-addons-for-elementor' ), |
| 1219 | 'type' => Controls_Manager::SWITCHER, |
| 1220 | 'condition' => array( |
| 1221 | 'premium_dual_header_second_back_clip' => 'clipped', |
| 1222 | ), |
| 1223 | ) |
| 1224 | ); |
| 1225 | |
| 1226 | $this->add_control( |
| 1227 | 'premium_dual_header_second_stroke_text_color', |
| 1228 | array( |
| 1229 | 'label' => __( 'Stroke Text Color', 'premium-addons-for-elementor' ), |
| 1230 | 'type' => Controls_Manager::COLOR, |
| 1231 | 'condition' => array( |
| 1232 | 'premium_dual_header_second_back_clip' => 'clipped', |
| 1233 | 'premium_dual_header_second_stroke' => 'yes', |
| 1234 | ), |
| 1235 | 'selectors' => array( |
| 1236 | '{{WRAPPER}} .premium-dual-header-second-clip.stroke' => '-webkit-text-stroke-color: {{VALUE}};', |
| 1237 | ), |
| 1238 | ) |
| 1239 | ); |
| 1240 | |
| 1241 | $this->add_control( |
| 1242 | 'premium_dual_header_second_stroke_color', |
| 1243 | array( |
| 1244 | 'label' => __( 'Stroke Fill Color', 'premium-addons-for-elementor' ), |
| 1245 | 'type' => Controls_Manager::COLOR, |
| 1246 | 'condition' => array( |
| 1247 | 'premium_dual_header_second_back_clip' => 'clipped', |
| 1248 | 'premium_dual_header_second_stroke' => 'yes', |
| 1249 | ), |
| 1250 | 'selectors' => array( |
| 1251 | '{{WRAPPER}} .premium-dual-header-second-clip.stroke' => '-webkit-text-fill-color: {{VALUE}};', |
| 1252 | ), |
| 1253 | ) |
| 1254 | ); |
| 1255 | |
| 1256 | $this->add_responsive_control( |
| 1257 | 'premium_dual_header_second_stroke_width', |
| 1258 | array( |
| 1259 | 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ), |
| 1260 | 'type' => Controls_Manager::SLIDER, |
| 1261 | 'condition' => array( |
| 1262 | 'premium_dual_header_second_back_clip' => 'clipped', |
| 1263 | 'premium_dual_header_second_stroke' => 'yes', |
| 1264 | ), |
| 1265 | 'selectors' => array( |
| 1266 | '{{WRAPPER}} .premium-dual-header-second-clip.stroke' => '-webkit-text-stroke-width: {{SIZE}}px;', |
| 1267 | ), |
| 1268 | ) |
| 1269 | ); |
| 1270 | |
| 1271 | $this->add_group_control( |
| 1272 | Premium_Background::get_type(), |
| 1273 | array( |
| 1274 | 'name' => 'premium_dual_header_second_clipped_background', |
| 1275 | 'types' => array( 'classic', 'gradient' ), |
| 1276 | 'condition' => array( |
| 1277 | 'premium_dual_header_second_back_clip' => 'clipped', |
| 1278 | 'premium_dual_header_second_stroke!' => 'yes', |
| 1279 | ), |
| 1280 | 'selector' => '{{WRAPPER}} .premium-dual-header-second-header', |
| 1281 | ) |
| 1282 | ); |
| 1283 | |
| 1284 | $this->add_control( |
| 1285 | 'second_wave_switcher', |
| 1286 | array( |
| 1287 | 'label' => __( 'Wave Effect', 'premium-addons-for-elementor' ), |
| 1288 | 'type' => Controls_Manager::SWITCHER, |
| 1289 | 'prefix_class' => 'premium-title-second-wave-', |
| 1290 | 'condition' => array( |
| 1291 | 'premium_dual_header_second_back_clip' => 'clipped', |
| 1292 | 'premium_dual_header_second_stroke!' => 'yes', |
| 1293 | ), |
| 1294 | ) |
| 1295 | ); |
| 1296 | |
| 1297 | $this->add_control( |
| 1298 | 'second_animation_speed', |
| 1299 | array( |
| 1300 | 'label' => __( 'Animation Speed (sec)', 'premium-addons-for-elementor' ), |
| 1301 | 'type' => Controls_Manager::SLIDER, |
| 1302 | 'range' => array( |
| 1303 | 'px' => array( |
| 1304 | 'min' => 0, |
| 1305 | 'max' => 10, |
| 1306 | 'step' => .1, |
| 1307 | ), |
| 1308 | ), |
| 1309 | 'selectors' => array( |
| 1310 | '{{WRAPPER}} .premium-dual-header-second-header' => 'animation-duration: {{SIZE}}s ', |
| 1311 | ), |
| 1312 | 'condition' => array( |
| 1313 | 'premium_dual_header_second_animated' => 'yes', |
| 1314 | ), |
| 1315 | ) |
| 1316 | ); |
| 1317 | |
| 1318 | $this->add_group_control( |
| 1319 | Group_Control_Border::get_type(), |
| 1320 | array( |
| 1321 | 'name' => 'second_header_border', |
| 1322 | 'selector' => '{{WRAPPER}} .premium-dual-header-second-header', |
| 1323 | 'separator' => 'before', |
| 1324 | ) |
| 1325 | ); |
| 1326 | |
| 1327 | $this->add_control( |
| 1328 | 'premium_dual_header_second_border_radius', |
| 1329 | array( |
| 1330 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1331 | 'type' => Controls_Manager::SLIDER, |
| 1332 | 'size_units' => array( 'px', '%', 'em' ), |
| 1333 | 'selectors' => array( |
| 1334 | '{{WRAPPER}} .premium-dual-header-second-header' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 1335 | ), |
| 1336 | ) |
| 1337 | ); |
| 1338 | |
| 1339 | $this->add_group_control( |
| 1340 | Group_Control_Text_Shadow::get_type(), |
| 1341 | array( |
| 1342 | 'label' => __( 'Shadow', 'premium-addons-for-elementor' ), |
| 1343 | 'name' => 'premium_dual_header_second_text_shadow', |
| 1344 | 'selector' => '{{WRAPPER}} .premium-dual-header-second-header', |
| 1345 | ) |
| 1346 | ); |
| 1347 | |
| 1348 | $this->add_responsive_control( |
| 1349 | 'premium_dual_header_second_margin', |
| 1350 | array( |
| 1351 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1352 | 'type' => Controls_Manager::DIMENSIONS, |
| 1353 | 'separator' => 'before', |
| 1354 | 'size_units' => array( 'px', 'em', '%' ), |
| 1355 | 'selectors' => array( |
| 1356 | '{{WRAPPER}} .premium-dual-header-second-header' => 'margin : {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1357 | ), |
| 1358 | ) |
| 1359 | ); |
| 1360 | |
| 1361 | $this->add_responsive_control( |
| 1362 | 'premium_dual_header_second_padding', |
| 1363 | array( |
| 1364 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1365 | 'type' => Controls_Manager::DIMENSIONS, |
| 1366 | 'size_units' => array( 'px', 'em', '%' ), |
| 1367 | 'selectors' => array( |
| 1368 | '{{WRAPPER}} .premium-dual-header-second-header, {{WRAPPER}}.premium-title-second-noise-yes .premium-dual-header-second-header::before, {{WRAPPER}}.premium-title-second-noise-yes .premium-dual-header-second-header::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1369 | ), |
| 1370 | ) |
| 1371 | ); |
| 1372 | |
| 1373 | $this->add_control( |
| 1374 | 'second_noise_heading', |
| 1375 | array( |
| 1376 | 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ), |
| 1377 | 'type' => Controls_Manager::HEADING, |
| 1378 | 'condition' => array( |
| 1379 | 'noise_second' => 'yes', |
| 1380 | ), |
| 1381 | ) |
| 1382 | ); |
| 1383 | |
| 1384 | $this->add_control( |
| 1385 | 'noise_third_color', |
| 1386 | array( |
| 1387 | 'label' => __( 'Color #1', 'premium-addons-for-elementor' ), |
| 1388 | 'type' => Controls_Manager::COLOR, |
| 1389 | 'condition' => array( |
| 1390 | 'noise_second' => 'yes', |
| 1391 | ), |
| 1392 | 'selectors' => array( |
| 1393 | '{{WRAPPER}}.premium-title-second-noise-yes .premium-dual-header-second-header::before' => 'text-shadow: 1px 0 {{VALUE}};', |
| 1394 | ), |
| 1395 | ) |
| 1396 | ); |
| 1397 | |
| 1398 | $this->add_control( |
| 1399 | 'noise_fourth_color', |
| 1400 | array( |
| 1401 | 'label' => __( 'Color #2', 'premium-addons-for-elementor' ), |
| 1402 | 'type' => Controls_Manager::COLOR, |
| 1403 | 'condition' => array( |
| 1404 | 'noise_second' => 'yes', |
| 1405 | ), |
| 1406 | 'selectors' => array( |
| 1407 | '{{WRAPPER}}.premium-title-second-noise-yes .premium-dual-header-second-header::after' => 'text-shadow: -1px 0 {{VALUE}};', |
| 1408 | ), |
| 1409 | ) |
| 1410 | ); |
| 1411 | |
| 1412 | $this->end_controls_section(); |
| 1413 | |
| 1414 | $this->start_controls_section( |
| 1415 | 'premium_dual_header_desc_style_section', |
| 1416 | array( |
| 1417 | 'label' => __( 'Description', 'premium-addons-for-elementor' ), |
| 1418 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1419 | 'condition' => array( |
| 1420 | 'premium_dual_header_desc_switcher' => 'yes', |
| 1421 | ), |
| 1422 | ) |
| 1423 | ); |
| 1424 | |
| 1425 | $this->add_control( |
| 1426 | 'premium_dual_header_desc_color', |
| 1427 | array( |
| 1428 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1429 | 'type' => Controls_Manager::COLOR, |
| 1430 | 'selectors' => array( |
| 1431 | '{{WRAPPER}} .premium-dh-description, {{WRAPPER}} .premium-dh-description *' => 'color: {{VALUE}};', |
| 1432 | ), |
| 1433 | ) |
| 1434 | ); |
| 1435 | |
| 1436 | $this->add_group_control( |
| 1437 | Group_Control_Typography::get_type(), |
| 1438 | array( |
| 1439 | 'name' => 'premium_dual_header_desc_typography', |
| 1440 | 'global' => array( |
| 1441 | 'default' => Global_Typography::TYPOGRAPHY_TEXT, |
| 1442 | ), |
| 1443 | 'selector' => '{{WRAPPER}} .premium-dh-description', |
| 1444 | ) |
| 1445 | ); |
| 1446 | |
| 1447 | $this->add_group_control( |
| 1448 | Group_Control_Text_Shadow::get_type(), |
| 1449 | array( |
| 1450 | 'name' => 'premium_dual_header_desc_text_shadow', |
| 1451 | 'selector' => '{{WRAPPER}} .premium-dh-description', |
| 1452 | ) |
| 1453 | ); |
| 1454 | |
| 1455 | $this->add_group_control( |
| 1456 | Premium_Background::get_type(), |
| 1457 | array( |
| 1458 | 'name' => 'premium_dual_header_desc_background', |
| 1459 | 'types' => array( 'classic', 'gradient' ), |
| 1460 | 'selector' => '{{WRAPPER}} .premium-dh-description', |
| 1461 | ) |
| 1462 | ); |
| 1463 | |
| 1464 | $this->add_group_control( |
| 1465 | Group_Control_Box_Shadow::get_type(), |
| 1466 | array( |
| 1467 | 'name' => 'premium_dual_header_desc_box_shadow', |
| 1468 | 'selector' => '{{WRAPPER}} .premium-dh-description', |
| 1469 | ) |
| 1470 | ); |
| 1471 | |
| 1472 | $this->add_group_control( |
| 1473 | Group_Control_Border::get_type(), |
| 1474 | array( |
| 1475 | 'name' => 'premium_dual_header_desc_border', |
| 1476 | 'selector' => '{{WRAPPER}} .premium-dh-description', |
| 1477 | ) |
| 1478 | ); |
| 1479 | |
| 1480 | $this->add_responsive_control( |
| 1481 | 'premium_dual_header_desc_border_radius', |
| 1482 | array( |
| 1483 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1484 | 'type' => Controls_Manager::DIMENSIONS, |
| 1485 | 'size_units' => array( 'px', '%', 'em' ), |
| 1486 | 'selectors' => array( |
| 1487 | '{{WRAPPER}} .premium-dh-description' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1488 | ), |
| 1489 | ) |
| 1490 | ); |
| 1491 | |
| 1492 | $this->add_responsive_control( |
| 1493 | 'premium_dual_header_desc_margin', |
| 1494 | array( |
| 1495 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1496 | 'type' => Controls_Manager::DIMENSIONS, |
| 1497 | 'size_units' => array( 'px', 'em', '%' ), |
| 1498 | 'selectors' => array( |
| 1499 | '{{WRAPPER}} .premium-dh-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1500 | ), |
| 1501 | ) |
| 1502 | ); |
| 1503 | |
| 1504 | $this->add_responsive_control( |
| 1505 | 'premium_dual_header_desc_padding', |
| 1506 | array( |
| 1507 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1508 | 'type' => Controls_Manager::DIMENSIONS, |
| 1509 | 'size_units' => array( 'px', 'em', '%' ), |
| 1510 | 'selectors' => array( |
| 1511 | '{{WRAPPER}} .premium-dh-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1512 | ), |
| 1513 | ) |
| 1514 | ); |
| 1515 | |
| 1516 | $this->end_controls_section(); |
| 1517 | |
| 1518 | $this->start_controls_section( |
| 1519 | 'background_text_style_section', |
| 1520 | array( |
| 1521 | 'label' => __( 'Background Text', 'premium-addons-for-elementor' ), |
| 1522 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1523 | 'condition' => array( |
| 1524 | 'background_text_switcher' => 'yes', |
| 1525 | ), |
| 1526 | ) |
| 1527 | ); |
| 1528 | |
| 1529 | $this->add_control( |
| 1530 | 'background_text_color', |
| 1531 | array( |
| 1532 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1533 | 'type' => Controls_Manager::COLOR, |
| 1534 | 'global' => array( |
| 1535 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 1536 | ), |
| 1537 | 'selectors' => array( |
| 1538 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'color: {{VALUE}}', |
| 1539 | ), |
| 1540 | ) |
| 1541 | ); |
| 1542 | |
| 1543 | $this->add_group_control( |
| 1544 | Group_Control_Typography::get_type(), |
| 1545 | array( |
| 1546 | 'name' => 'background_text_typography', |
| 1547 | 'global' => array( |
| 1548 | 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, |
| 1549 | ), |
| 1550 | 'selector' => '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before', |
| 1551 | ) |
| 1552 | ); |
| 1553 | |
| 1554 | $this->add_group_control( |
| 1555 | Group_Control_Text_Shadow::get_type(), |
| 1556 | array( |
| 1557 | 'name' => 'background_text_shadow', |
| 1558 | 'selector' => '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before', |
| 1559 | ) |
| 1560 | ); |
| 1561 | |
| 1562 | $this->add_control( |
| 1563 | 'background_text_mix_blend', |
| 1564 | array( |
| 1565 | 'label' => __( 'Blend Mode', 'premium-addons-for-elementor' ), |
| 1566 | 'type' => Controls_Manager::SELECT, |
| 1567 | 'options' => array( |
| 1568 | '' => __( 'Normal', 'premium-addons-for-elementor' ), |
| 1569 | 'multiply' => 'Multiply', |
| 1570 | 'screen' => 'Screen', |
| 1571 | 'overlay' => 'Overlay ', |
| 1572 | 'darken' => 'Darken', |
| 1573 | 'lighten' => 'Lighten', |
| 1574 | 'color-dodge' => 'Color Dodge', |
| 1575 | 'saturation' => 'Saturation', |
| 1576 | 'color' => 'Color', |
| 1577 | 'luminosity' => 'Luminosity', |
| 1578 | ), |
| 1579 | 'separator' => 'before', |
| 1580 | 'selectors' => array( |
| 1581 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'mix-blend-mode: {{VALUE}}', |
| 1582 | ), |
| 1583 | ) |
| 1584 | ); |
| 1585 | |
| 1586 | $this->add_control( |
| 1587 | 'background_text_zindex', |
| 1588 | array( |
| 1589 | 'label' => __( 'z-Index', 'premium-addons-for-elementor' ), |
| 1590 | 'type' => Controls_Manager::NUMBER, |
| 1591 | 'min' => -10, |
| 1592 | 'max' => 20, |
| 1593 | 'step' => 1, |
| 1594 | 'selectors' => array( |
| 1595 | '{{WRAPPER}}.premium-bg-text-yes .elementor-widget-container:before' => 'z-index: {{VALUE}}', |
| 1596 | ), |
| 1597 | ) |
| 1598 | ); |
| 1599 | |
| 1600 | $this->end_controls_section(); |
| 1601 | } |
| 1602 | |
| 1603 | /** |
| 1604 | * Render Dual Heading widget output on the frontend. |
| 1605 | * |
| 1606 | * Written in PHP and used to generate the final HTML. |
| 1607 | * |
| 1608 | * @since 1.0.0 |
| 1609 | * @access protected |
| 1610 | */ |
| 1611 | protected function render() { |
| 1612 | |
| 1613 | $settings = $this->get_settings_for_display(); |
| 1614 | |
| 1615 | $this->add_inline_editing_attributes( 'premium_dual_header_first_header_text' ); |
| 1616 | |
| 1617 | $this->add_inline_editing_attributes( 'premium_dual_header_second_header_text' ); |
| 1618 | |
| 1619 | $first_title_tag = Helper_Functions::validate_html_tag( $settings['premium_dual_header_first_header_tag'] ); |
| 1620 | |
| 1621 | $first_title_text = $settings['premium_dual_header_first_header_text'] . ' '; |
| 1622 | |
| 1623 | $second_title_text = $settings['premium_dual_header_second_header_text']; |
| 1624 | |
| 1625 | $first_clip = ''; |
| 1626 | |
| 1627 | $second_clip = ''; |
| 1628 | |
| 1629 | $first_stroke = ''; |
| 1630 | |
| 1631 | $second_stroke = ''; |
| 1632 | |
| 1633 | if ( 'clipped' === $settings['premium_dual_header_first_back_clip'] ) { |
| 1634 | $first_clip = 'premium-dual-header-first-clip'; |
| 1635 | } |
| 1636 | |
| 1637 | if ( 'clipped' === $settings['premium_dual_header_second_back_clip'] ) { |
| 1638 | $second_clip = 'premium-dual-header-second-clip'; |
| 1639 | } |
| 1640 | |
| 1641 | if ( ! empty( $first_clip ) && 'yes' === $settings['premium_dual_header_first_stroke'] ) { |
| 1642 | $first_stroke = ' stroke'; |
| 1643 | } |
| 1644 | |
| 1645 | if ( ! empty( $second_clip ) && 'yes' === $settings['premium_dual_header_second_stroke'] ) { |
| 1646 | $second_stroke = ' stroke'; |
| 1647 | } |
| 1648 | |
| 1649 | $first_animation = $settings['premium_dual_header_first_animated']; |
| 1650 | $first_wave = $settings['first_wave_switcher']; |
| 1651 | $second_animation = $settings['premium_dual_header_second_animated']; |
| 1652 | $second_wave = $settings['second_wave_switcher']; |
| 1653 | |
| 1654 | $first_grad = ( 'yes' === $first_animation && 'yes' !== $first_wave ) ? ' gradient' : ''; |
| 1655 | |
| 1656 | $second_grad = ( 'yes' === $second_animation && 'yes' !== $second_wave ) ? ' gradient' : ''; |
| 1657 | |
| 1658 | $first_noise = 'yes' === $settings['noise_first'] ? 'data-text="' . $first_title_text . '"' : ''; |
| 1659 | |
| 1660 | $second_noise = 'yes' === $settings['noise_second'] ? 'data-text="' . $second_title_text . '"' : ''; |
| 1661 | |
| 1662 | $full_title = '<' . $first_title_tag . ' class="premium-dual-header-first-header ' . $first_clip . $first_stroke . $first_grad . '"><span class="premium-dual-header-first-span" ' . $first_noise . ' >' . $first_title_text . '</span>'; |
| 1663 | |
| 1664 | if ( ! empty( $second_title_text ) ) { |
| 1665 | $full_title .= '<span class="premium-dual-header-second-header ' . $second_clip . $second_stroke . $second_grad . '" ' . $second_noise . ' >' . $second_title_text . '</span>'; |
| 1666 | } |
| 1667 | |
| 1668 | $full_title .= '</' . $first_title_tag . '> '; |
| 1669 | |
| 1670 | if ( 'yes' === $settings['premium_dual_header_link_switcher'] ) { |
| 1671 | |
| 1672 | if ( 'url' === $settings['premium_dual_heading_link_selection'] ) { |
| 1673 | |
| 1674 | $this->add_link_attributes( 'link', $settings['premium_dual_heading_link'] ); |
| 1675 | } else { |
| 1676 | |
| 1677 | $this->add_render_attribute( 'link', 'href', get_permalink( $settings['premium_dual_heading_existing_link'] ) ); |
| 1678 | } |
| 1679 | } |
| 1680 | |
| 1681 | $this->add_render_attribute( 'container', 'class', 'premium-dual-header-wrapper' ); |
| 1682 | |
| 1683 | // if ( 'yes' === $settings['background_text_switcher'] ) { |
| 1684 | // $this->add_render_attribute( |
| 1685 | // 'container', |
| 1686 | // array( |
| 1687 | // 'class' => 'premium-title-bg-text', |
| 1688 | // 'data-background' => $settings['background_text'], |
| 1689 | // ) |
| 1690 | // ); |
| 1691 | // } |
| 1692 | |
| 1693 | $show_desc = 'yes' === $settings['premium_dual_header_desc_switcher'] && ! empty( $settings['premium_dual_header_desc_text'] ); |
| 1694 | |
| 1695 | if ( $show_desc ) { |
| 1696 | $this->add_render_attribute( 'dh_description', 'class', 'premium-dh-description' ); |
| 1697 | } |
| 1698 | |
| 1699 | ?> |
| 1700 | |
| 1701 | <div class="elementor-widget-container"> |
| 1702 | <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'container' ) ); ?>> |
| 1703 | <?php if ( 'yes' === $settings['premium_dual_header_link_switcher'] ) : ?> |
| 1704 | <a <?php echo wp_kses_post( $this->get_render_attribute_string( 'link' ) ); ?>> |
| 1705 | <?php endif; ?> |
| 1706 | <?php echo wp_kses_post( $full_title ); ?> |
| 1707 | <?php if ( 'yes' === $settings['premium_dual_header_link_switcher'] ) : ?> |
| 1708 | </a> |
| 1709 | <?php endif; ?> |
| 1710 | <?php if ( $show_desc ) : ?> |
| 1711 | <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'dh_description' ) ); ?>> |
| 1712 | <?php echo wp_kses_post( $settings['premium_dual_header_desc_text'] ); ?> |
| 1713 | </div> |
| 1714 | <?php endif; ?> |
| 1715 | </div> |
| 1716 | </div> |
| 1717 | |
| 1718 | <?php |
| 1719 | } |
| 1720 | |
| 1721 | /** |
| 1722 | * Render Dual Heading widget output in the editor. |
| 1723 | * |
| 1724 | * Written as a Backbone JavaScript template and used to generate the live preview. |
| 1725 | * |
| 1726 | * @since 1.0.0 |
| 1727 | * @access protected |
| 1728 | */ |
| 1729 | protected function content_template() { |
| 1730 | ?> |
| 1731 | <# |
| 1732 | |
| 1733 | view.addInlineEditingAttributes('premium_dual_header_first_header_text'); |
| 1734 | |
| 1735 | view.addInlineEditingAttributes('premium_dual_header_second_header_text'); |
| 1736 | |
| 1737 | var firstTag = elementor.helpers.validateHTMLTag( settings.premium_dual_header_first_header_tag ), |
| 1738 | |
| 1739 | firstText = settings.premium_dual_header_first_header_text + ' ', |
| 1740 | |
| 1741 | secondText = settings.premium_dual_header_second_header_text, |
| 1742 | |
| 1743 | firstClip = '', |
| 1744 | |
| 1745 | secondClip = '', |
| 1746 | |
| 1747 | firstStroke = '', |
| 1748 | |
| 1749 | secondStroke = ''; |
| 1750 | |
| 1751 | if( 'clipped' === settings.premium_dual_header_first_back_clip ) |
| 1752 | firstClip = "premium-dual-header-first-clip"; |
| 1753 | |
| 1754 | if( 'clipped' === settings.premium_dual_header_second_back_clip ) |
| 1755 | secondClip = "premium-dual-header-second-clip"; |
| 1756 | |
| 1757 | if( 'yes' === settings.premium_dual_header_first_stroke ) |
| 1758 | firstStroke = "stroke"; |
| 1759 | |
| 1760 | if( 'yes' === settings.premium_dual_header_second_stroke ) |
| 1761 | secondStroke = "stroke"; |
| 1762 | |
| 1763 | var firstAnimation = settings.premium_dual_header_first_animated, |
| 1764 | firstWave = settings.first_wave_switcher, |
| 1765 | secondAnimation = settings.premium_dual_header_second_animated, |
| 1766 | secondWave = settings.second_wave_switcher; |
| 1767 | |
| 1768 | var firstGrad = ('yes' === firstAnimation && 'yes' !== firstWave) ? ' gradient' : '', |
| 1769 | secondGrad = ('yes' === secondAnimation && 'yes' !== secondWave) ? ' gradient' : ''; |
| 1770 | |
| 1771 | view.addRenderAttribute('first_title', 'class', ['premium-dual-header-first-header', firstClip, firstGrad, firstStroke ] ); |
| 1772 | view.addRenderAttribute('second_title', 'class', ['premium-dual-header-second-header', secondClip, secondGrad, secondStroke ] ); |
| 1773 | |
| 1774 | view.addRenderAttribute('second_title', 'data-text', 'yes' === settings.noise_second ? secondText : '' ); |
| 1775 | |
| 1776 | var link = ''; |
| 1777 | if( 'yes' === settings.premium_dual_header_link_switcher ) { |
| 1778 | |
| 1779 | if( 'link' === settings.premium_dual_heading_link_selection ) { |
| 1780 | |
| 1781 | link = settings.premium_dual_heading_existing_link; |
| 1782 | |
| 1783 | } else { |
| 1784 | |
| 1785 | link = settings.premium_dual_heading_link.url; |
| 1786 | |
| 1787 | } |
| 1788 | } |
| 1789 | |
| 1790 | view.addRenderAttribute('container', 'class', 'premium-dual-header-wrapper' ); |
| 1791 | |
| 1792 | |
| 1793 | view.addRenderAttribute( 'button', 'href', link ); |
| 1794 | |
| 1795 | |
| 1796 | #> |
| 1797 | |
| 1798 | <div class="elementor-widget-container"> |
| 1799 | <div {{{ view.getRenderAttributeString('container') }}}> |
| 1800 | <# if( 'yes' === settings.premium_dual_header_link_switcher && '' !== link ) { #> |
| 1801 | <a {{{ view.getRenderAttributeString('button') }}}> |
| 1802 | <# } #> |
| 1803 | <{{{firstTag}}} {{{ view.getRenderAttributeString('first_title') }}}> |
| 1804 | <span class="premium-dual-header-first-span" data-text="{{ firstText }}">{{{ firstText }}}</span> |
| 1805 | <# if ( '' != secondText ) { #> |
| 1806 | <span {{{ view.getRenderAttributeString('second_title') }}}>{{{ secondText }}}</span> |
| 1807 | <# } #> |
| 1808 | </{{{firstTag}}}> |
| 1809 | <# if( 'yes' == settings.premium_dual_header_link_switcher && '' !== link ) { #> |
| 1810 | </a> |
| 1811 | <# } #> |
| 1812 | <# if ( 'yes' === settings.premium_dual_header_desc_switcher && '' !== settings.premium_dual_header_desc_text ) { #> |
| 1813 | <div class="premium-dh-description">{{{ settings.premium_dual_header_desc_text }}}</div> |
| 1814 | <# } #> |
| 1815 | </div> |
| 1816 | </div> |
| 1817 | |
| 1818 | <?php |
| 1819 | } |
| 1820 | } |
| 1821 |