dep
9 months ago
premium-banner.php
9 months ago
premium-blog.php
9 months ago
premium-button.php
9 months ago
premium-carousel.php
9 months ago
premium-contactform.php
9 months ago
premium-countdown.php
9 months ago
premium-counter.php
9 months ago
premium-dual-header.php
9 months ago
premium-fancytext.php
9 months ago
premium-grid.php
9 months ago
premium-icon-list.php
9 months ago
premium-image-button.php
9 months ago
premium-image-scroll.php
9 months ago
premium-image-separator.php
9 months ago
premium-lottie.php
9 months ago
premium-maps.php
9 months ago
premium-media-wheel.php
9 months ago
premium-mobile-menu.php
9 months ago
premium-modalbox.php
9 months ago
premium-nav-menu.php
9 months ago
premium-notifications.php
9 months ago
premium-person.php
9 months ago
premium-pinterest-feed.php
9 months ago
premium-post-ticker.php
9 months ago
premium-pricing-table.php
9 months ago
premium-progressbar.php
9 months ago
premium-search-form.php
9 months ago
premium-svg-drawer.php
9 months ago
premium-tcloud.php
9 months ago
premium-testimonials.php
9 months ago
premium-textual-showcase.php
9 months ago
premium-tiktok-feed.php
9 months ago
premium-title.php
9 months ago
premium-videobox.php
9 months ago
premium-vscroll.php
9 months ago
premium-weather.php
9 months ago
premium-world-clock.php
9 months ago
premium-title.php
2199 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Premium Title. |
| 4 | */ |
| 5 | |
| 6 | namespace PremiumAddons\Widgets; |
| 7 | |
| 8 | // Elementor Classes. |
| 9 | use Elementor\Plugin; |
| 10 | use Elementor\Widget_Base; |
| 11 | use Elementor\Utils; |
| 12 | use Elementor\Icons_Manager; |
| 13 | use Elementor\Controls_Manager; |
| 14 | use Elementor\Control_Media; |
| 15 | use Elementor\Core\Kits\Documents\Tabs\Global_Colors; |
| 16 | use Elementor\Core\Kits\Documents\Tabs\Global_Typography; |
| 17 | use Elementor\Group_Control_Border; |
| 18 | use Elementor\Group_Control_Typography; |
| 19 | use Elementor\Group_Control_Text_Shadow; |
| 20 | use Elementor\Group_Control_Background; |
| 21 | |
| 22 | // PremiumAddons Classes. |
| 23 | use PremiumAddons\Admin\Includes\Admin_Helper; |
| 24 | use PremiumAddons\Includes\Helper_Functions; |
| 25 | use PremiumAddons\Includes\Controls\Premium_Post_Filter; |
| 26 | |
| 27 | if ( ! defined( 'ABSPATH' ) ) { |
| 28 | exit; // If this file is called directly, abort. |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Class Premium_Title |
| 33 | */ |
| 34 | class Premium_Title extends Widget_Base { |
| 35 | |
| 36 | /** |
| 37 | * Check if the icon draw is enabled. |
| 38 | * |
| 39 | * @since 4.9.26 |
| 40 | * @access private |
| 41 | * |
| 42 | * @var bool |
| 43 | */ |
| 44 | private $is_draw_enabled = null; |
| 45 | |
| 46 | /** |
| 47 | * Check Icon Draw Option. |
| 48 | * |
| 49 | * @since 4.9.26 |
| 50 | * @access public |
| 51 | */ |
| 52 | public function check_icon_draw() { |
| 53 | |
| 54 | if ( null === $this->is_draw_enabled ) { |
| 55 | $this->is_draw_enabled = Admin_Helper::check_svg_draw( 'premium-title' ); |
| 56 | } |
| 57 | |
| 58 | return $this->is_draw_enabled; |
| 59 | |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Retrieve Widget Name. |
| 64 | * |
| 65 | * @since 1.0.0 |
| 66 | * @access public |
| 67 | */ |
| 68 | public function get_name() { |
| 69 | return 'premium-addon-title'; |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Retrieve Widget Title. |
| 74 | * |
| 75 | * @since 1.0.0 |
| 76 | * @access public |
| 77 | */ |
| 78 | public function get_title() { |
| 79 | return __( 'Heading', 'premium-addons-for-elementor' ); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Retrieve Widget Icon. |
| 84 | * |
| 85 | * @since 1.0.0 |
| 86 | * @access public |
| 87 | * |
| 88 | * @return string widget icon. |
| 89 | */ |
| 90 | public function get_icon() { |
| 91 | return 'pa-title'; |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * Retrieve Widget Dependent CSS. |
| 96 | * |
| 97 | * @since 1.0.0 |
| 98 | * @access public |
| 99 | * |
| 100 | * @return array CSS style handles. |
| 101 | */ |
| 102 | public function get_style_depends() { |
| 103 | return array( |
| 104 | 'pa-glass', |
| 105 | 'pa-btn', |
| 106 | 'premium-addons', |
| 107 | ); |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Retrieve Widget Dependent JS. |
| 112 | * |
| 113 | * @since 1.0.0 |
| 114 | * @access public |
| 115 | * |
| 116 | * @return array JS script handles. |
| 117 | */ |
| 118 | public function get_script_depends() { |
| 119 | |
| 120 | $draw_scripts = $this->check_icon_draw() ? array( |
| 121 | 'pa-tweenmax', |
| 122 | 'pa-motionpath', |
| 123 | ) : array(); |
| 124 | |
| 125 | return array_merge( |
| 126 | $draw_scripts, |
| 127 | array( |
| 128 | 'pa-glass', |
| 129 | 'premium-addons', |
| 130 | 'lottie-js', |
| 131 | ) |
| 132 | ); |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Retrieve Widget Categories. |
| 137 | * |
| 138 | * @since 1.5.1 |
| 139 | * @access public |
| 140 | * |
| 141 | * @return array Widget categories. |
| 142 | */ |
| 143 | public function get_categories() { |
| 144 | return array( 'premium-elements' ); |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Retrieve Widget Dependent CSS. |
| 149 | * |
| 150 | * @since 1.0.0 |
| 151 | * @access public |
| 152 | * |
| 153 | * @return array CSS style handles. |
| 154 | */ |
| 155 | public function get_keywords() { |
| 156 | return array( 'pa', 'premium', 'premium heading', 'title', 'text', 'headline' ); |
| 157 | } |
| 158 | |
| 159 | protected function is_dynamic_content(): bool { |
| 160 | return false; |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * Retrieve Widget Support URL. |
| 165 | * |
| 166 | * @access public |
| 167 | * |
| 168 | * @return string support URL. |
| 169 | */ |
| 170 | public function get_custom_help_url() { |
| 171 | return 'https://premiumaddons.com/support/'; |
| 172 | } |
| 173 | |
| 174 | public function has_widget_inner_wrapper(): bool { |
| 175 | return ! Helper_Functions::check_elementor_experiment( 'e_optimized_markup' ); |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * Register Title controls. |
| 180 | * |
| 181 | * @since 1.0.0 |
| 182 | * @access protected |
| 183 | */ |
| 184 | protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore |
| 185 | |
| 186 | $draw_icon = $this->check_icon_draw(); |
| 187 | |
| 188 | $this->start_controls_section( |
| 189 | 'premium_title_content', |
| 190 | array( |
| 191 | 'label' => __( 'Title', 'premium-addons-for-elementor' ), |
| 192 | ) |
| 193 | ); |
| 194 | |
| 195 | $demo = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/heading-widget-for-elementor-page-builder/', 'heading', 'wp-editor', 'demo' ); |
| 196 | Helper_Functions::add_templates_controls( $this, 'heading', $demo ); |
| 197 | |
| 198 | $this->add_control( |
| 199 | 'premium_title_text', |
| 200 | array( |
| 201 | 'label' => __( 'Title', 'premium-addons-for-elementor' ), |
| 202 | 'type' => Controls_Manager::TEXT, |
| 203 | 'default' => __( 'Premium Title', 'premium-addons-for-elementor' ), |
| 204 | 'label_block' => true, |
| 205 | 'dynamic' => array( 'active' => true ), |
| 206 | ) |
| 207 | ); |
| 208 | |
| 209 | $this->add_control( |
| 210 | 'premium_title_style', |
| 211 | array( |
| 212 | 'label' => __( 'Style', 'premium-addons-for-elementor' ), |
| 213 | 'type' => Controls_Manager::SELECT, |
| 214 | 'default' => 'style1', |
| 215 | 'options' => array( |
| 216 | 'style1' => __( 'Style 1', 'premium-addons-for-elementor' ), |
| 217 | 'style2' => __( 'Style 2', 'premium-addons-for-elementor' ), |
| 218 | 'style3' => __( 'Style 3', 'premium-addons-for-elementor' ), |
| 219 | 'style4' => __( 'Style 4', 'premium-addons-for-elementor' ), |
| 220 | 'style5' => __( 'Style 5', 'premium-addons-for-elementor' ), |
| 221 | 'style6' => __( 'Style 6', 'premium-addons-for-elementor' ), |
| 222 | 'style7' => __( 'Style 7', 'premium-addons-for-elementor' ), |
| 223 | 'style8' => __( 'Style 8', 'premium-addons-for-elementor' ), |
| 224 | 'style9' => __( 'Style 9', 'premium-addons-for-elementor' ), |
| 225 | ), |
| 226 | 'label_block' => true, |
| 227 | ) |
| 228 | ); |
| 229 | |
| 230 | $this->add_control( |
| 231 | 'premium_title_icon_switcher', |
| 232 | array( |
| 233 | 'label' => __( 'Icon', 'premium-addons-for-elementor' ), |
| 234 | 'type' => Controls_Manager::SWITCHER, |
| 235 | ) |
| 236 | ); |
| 237 | |
| 238 | $this->add_control( |
| 239 | 'icon_type', |
| 240 | array( |
| 241 | 'label' => __( 'Icon Type', 'premium-addons-for-elementor' ), |
| 242 | 'type' => Controls_Manager::SELECT, |
| 243 | 'options' => array( |
| 244 | 'icon' => __( 'Icon', 'premium-addons-for-elementor' ), |
| 245 | 'image' => __( 'Image', 'premium-addons-for-elementor' ), |
| 246 | 'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ), |
| 247 | 'svg' => __( 'SVG Code', 'premium-addons-for-elementor' ), |
| 248 | ), |
| 249 | 'default' => 'icon', |
| 250 | 'condition' => array( |
| 251 | 'premium_title_icon_switcher' => 'yes', |
| 252 | ), |
| 253 | ) |
| 254 | ); |
| 255 | |
| 256 | $common_conditions = array( |
| 257 | 'premium_title_icon_switcher' => 'yes', |
| 258 | ); |
| 259 | |
| 260 | $this->add_control( |
| 261 | 'premium_title_icon_updated', |
| 262 | array( |
| 263 | 'label' => __( 'Font Awesome Icon', 'premium-addons-for-elementor' ), |
| 264 | 'type' => Controls_Manager::ICONS, |
| 265 | 'fa4compatibility' => 'premium_title_icon', |
| 266 | 'default' => array( |
| 267 | 'value' => 'fas fa-bars', |
| 268 | 'library' => 'fa-solid', |
| 269 | ), |
| 270 | 'label_block' => true, |
| 271 | 'condition' => array_merge( |
| 272 | $common_conditions, |
| 273 | array( |
| 274 | 'icon_type' => 'icon', |
| 275 | ) |
| 276 | ), |
| 277 | ) |
| 278 | ); |
| 279 | |
| 280 | $this->add_control( |
| 281 | 'image_upload', |
| 282 | array( |
| 283 | 'label' => __( 'Upload Image', 'premium-addons-for-elementor' ), |
| 284 | 'type' => Controls_Manager::MEDIA, |
| 285 | 'default' => array( |
| 286 | 'url' => Utils::get_placeholder_image_src(), |
| 287 | ), |
| 288 | 'condition' => array_merge( |
| 289 | $common_conditions, |
| 290 | array( |
| 291 | 'icon_type' => 'image', |
| 292 | ) |
| 293 | ), |
| 294 | ) |
| 295 | ); |
| 296 | |
| 297 | $this->add_control( |
| 298 | 'custom_svg', |
| 299 | array( |
| 300 | 'label' => __( 'SVG Code', 'premium-addons-for-elementor' ), |
| 301 | 'type' => Controls_Manager::TEXTAREA, |
| 302 | 'description' => 'You can use these sites to create SVGs: <a href="https://danmarshall.github.io/google-font-to-svg-path/" target="_blank">Google Fonts</a> and <a href="https://boxy-svg.com/" target="_blank">Boxy SVG</a>', |
| 303 | 'condition' => array_merge( |
| 304 | $common_conditions, |
| 305 | array( |
| 306 | 'icon_type' => 'svg', |
| 307 | ) |
| 308 | ), |
| 309 | ) |
| 310 | ); |
| 311 | |
| 312 | $this->add_control( |
| 313 | 'lottie_url', |
| 314 | array( |
| 315 | 'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ), |
| 316 | 'type' => Controls_Manager::TEXT, |
| 317 | 'dynamic' => array( 'active' => true ), |
| 318 | 'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>', |
| 319 | 'label_block' => true, |
| 320 | 'condition' => array_merge( |
| 321 | $common_conditions, |
| 322 | array( |
| 323 | 'icon_type' => 'animation', |
| 324 | ) |
| 325 | ), |
| 326 | ) |
| 327 | ); |
| 328 | |
| 329 | $animation_conds = array( |
| 330 | 'terms' => array( |
| 331 | array( |
| 332 | 'name' => 'premium_title_icon_switcher', |
| 333 | 'value' => 'yes', |
| 334 | ), |
| 335 | array( |
| 336 | 'relation' => 'or', |
| 337 | 'terms' => array( |
| 338 | array( |
| 339 | 'name' => 'icon_type', |
| 340 | 'value' => 'animation', |
| 341 | ), |
| 342 | array( |
| 343 | 'terms' => array( |
| 344 | array( |
| 345 | 'relation' => 'or', |
| 346 | 'terms' => array( |
| 347 | array( |
| 348 | 'name' => 'icon_type', |
| 349 | 'value' => 'icon', |
| 350 | ), |
| 351 | array( |
| 352 | 'name' => 'icon_type', |
| 353 | 'value' => 'svg', |
| 354 | ), |
| 355 | ), |
| 356 | ), |
| 357 | array( |
| 358 | 'name' => 'draw_svg', |
| 359 | 'value' => 'yes', |
| 360 | ), |
| 361 | ), |
| 362 | ), |
| 363 | ), |
| 364 | ), |
| 365 | ), |
| 366 | ); |
| 367 | |
| 368 | $this->add_control( |
| 369 | 'draw_svg', |
| 370 | array( |
| 371 | 'label' => __( 'Draw Icon', 'premium-addons-for-elementor' ), |
| 372 | 'type' => Controls_Manager::SWITCHER, |
| 373 | 'description' => __( 'Enable this option to make the icon drawable. See ', 'premium-addons-for-elementor' ) . '<a href="https://www.youtube.com/watch?v=ZLr0bRe0RAY" target="_blank">tutorial</a>', |
| 374 | 'classes' => $draw_icon ? '' : 'editor-pa-control-disabled', |
| 375 | 'condition' => array_merge( |
| 376 | $common_conditions, |
| 377 | array( |
| 378 | 'icon_type' => array( 'icon', 'svg' ), |
| 379 | 'premium_title_icon_updated[library]!' => 'svg', |
| 380 | ) |
| 381 | ), |
| 382 | ) |
| 383 | ); |
| 384 | |
| 385 | if ( $draw_icon ) { |
| 386 | |
| 387 | $this->add_control( |
| 388 | 'path_width', |
| 389 | array( |
| 390 | 'label' => __( 'Path Thickness', 'premium-addons-for-elementor' ), |
| 391 | 'type' => Controls_Manager::SLIDER, |
| 392 | 'range' => array( |
| 393 | 'px' => array( |
| 394 | 'min' => 0, |
| 395 | 'max' => 50, |
| 396 | 'step' => 0.1, |
| 397 | ), |
| 398 | ), |
| 399 | 'condition' => array_merge( |
| 400 | $common_conditions, |
| 401 | array( |
| 402 | 'icon_type' => array( 'icon', 'svg' ), |
| 403 | ) |
| 404 | ), |
| 405 | 'selectors' => array( |
| 406 | '{{WRAPPER}} .premium-title-header svg *' => 'stroke-width: {{SIZE}}', |
| 407 | ), |
| 408 | ) |
| 409 | ); |
| 410 | |
| 411 | $this->add_control( |
| 412 | 'svg_sync', |
| 413 | array( |
| 414 | 'label' => __( 'Draw All Paths Together', 'premium-addons-for-elementor' ), |
| 415 | 'type' => Controls_Manager::SWITCHER, |
| 416 | 'condition' => array_merge( |
| 417 | $common_conditions, |
| 418 | array( |
| 419 | 'icon_type' => array( 'icon', 'svg' ), |
| 420 | 'draw_svg' => 'yes', |
| 421 | ) |
| 422 | ), |
| 423 | ) |
| 424 | ); |
| 425 | |
| 426 | $this->add_control( |
| 427 | 'frames', |
| 428 | array( |
| 429 | 'label' => __( 'Speed', 'premium-addons-for-elementor' ), |
| 430 | 'type' => Controls_Manager::NUMBER, |
| 431 | 'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ), |
| 432 | 'default' => 5, |
| 433 | 'min' => 1, |
| 434 | 'max' => 100, |
| 435 | 'condition' => array_merge( |
| 436 | $common_conditions, |
| 437 | array( |
| 438 | 'icon_type' => array( 'icon', 'svg' ), |
| 439 | 'draw_svg' => 'yes', |
| 440 | ) |
| 441 | ), |
| 442 | ) |
| 443 | ); |
| 444 | |
| 445 | } else { |
| 446 | |
| 447 | Helper_Functions::get_draw_svg_notice( |
| 448 | $this, |
| 449 | 'heading', |
| 450 | array_merge( |
| 451 | $common_conditions, |
| 452 | array( |
| 453 | 'icon_type' => array( 'icon', 'svg' ), |
| 454 | 'premium_title_icon_updated[library]!' => 'svg', |
| 455 | ) |
| 456 | ) |
| 457 | ); |
| 458 | |
| 459 | } |
| 460 | |
| 461 | $this->add_control( |
| 462 | 'lottie_loop', |
| 463 | array( |
| 464 | 'label' => __( 'Loop', 'premium-addons-for-elementor' ), |
| 465 | 'type' => Controls_Manager::SWITCHER, |
| 466 | 'return_value' => 'true', |
| 467 | 'default' => 'true', |
| 468 | 'conditions' => $animation_conds, |
| 469 | ) |
| 470 | ); |
| 471 | |
| 472 | $this->add_control( |
| 473 | 'lottie_reverse', |
| 474 | array( |
| 475 | 'label' => __( 'Reverse', 'premium-addons-for-elementor' ), |
| 476 | 'type' => Controls_Manager::SWITCHER, |
| 477 | 'return_value' => 'true', |
| 478 | 'conditions' => $animation_conds, |
| 479 | ) |
| 480 | ); |
| 481 | |
| 482 | if ( $draw_icon ) { |
| 483 | $this->add_control( |
| 484 | 'start_point', |
| 485 | array( |
| 486 | 'label' => __( 'Start Point (%)', 'premium-addons-for-elementor' ), |
| 487 | 'type' => Controls_Manager::SLIDER, |
| 488 | 'description' => __( 'Set the point that the SVG should start from.', 'premium-addons-for-elementor' ), |
| 489 | 'default' => array( |
| 490 | 'unit' => '%', |
| 491 | 'size' => 0, |
| 492 | ), |
| 493 | 'condition' => array_merge( |
| 494 | $common_conditions, |
| 495 | array( |
| 496 | 'icon_type' => array( 'icon', 'svg' ), |
| 497 | 'draw_svg' => 'yes', |
| 498 | 'lottie_reverse!' => 'true', |
| 499 | ) |
| 500 | ), |
| 501 | ) |
| 502 | ); |
| 503 | |
| 504 | $this->add_control( |
| 505 | 'end_point', |
| 506 | array( |
| 507 | 'label' => __( 'End Point (%)', 'premium-addons-for-elementor' ), |
| 508 | 'type' => Controls_Manager::SLIDER, |
| 509 | 'description' => __( 'Set the point that the SVG should end at.', 'premium-addons-for-elementor' ), |
| 510 | 'default' => array( |
| 511 | 'unit' => '%', |
| 512 | 'size' => 0, |
| 513 | ), |
| 514 | 'condition' => array_merge( |
| 515 | $common_conditions, |
| 516 | array( |
| 517 | 'icon_type' => array( 'icon', 'svg' ), |
| 518 | 'draw_svg' => 'yes', |
| 519 | 'lottie_reverse' => 'true', |
| 520 | ) |
| 521 | ), |
| 522 | |
| 523 | ) |
| 524 | ); |
| 525 | |
| 526 | $this->add_control( |
| 527 | 'svg_hover', |
| 528 | array( |
| 529 | 'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ), |
| 530 | 'type' => Controls_Manager::SWITCHER, |
| 531 | 'return_value' => 'true', |
| 532 | 'condition' => array_merge( |
| 533 | $common_conditions, |
| 534 | array( |
| 535 | 'icon_type' => array( 'icon', 'svg' ), |
| 536 | 'draw_svg' => 'yes', |
| 537 | ) |
| 538 | ), |
| 539 | ) |
| 540 | ); |
| 541 | |
| 542 | $this->add_control( |
| 543 | 'svg_yoyo', |
| 544 | array( |
| 545 | 'label' => __( 'Yoyo Effect', 'premium-addons-for-elementor' ), |
| 546 | 'type' => Controls_Manager::SWITCHER, |
| 547 | 'condition' => array_merge( |
| 548 | $common_conditions, |
| 549 | array( |
| 550 | 'icon_type' => array( 'icon', 'svg' ), |
| 551 | 'draw_svg' => 'yes', |
| 552 | 'lottie_loop' => 'true', |
| 553 | ) |
| 554 | ), |
| 555 | ) |
| 556 | ); |
| 557 | } |
| 558 | |
| 559 | $this->add_responsive_control( |
| 560 | 'icon_position', |
| 561 | array( |
| 562 | 'label' => __( 'Icon Position', 'premium-addons-for-elementor' ), |
| 563 | 'type' => Controls_Manager::SELECT, |
| 564 | 'options' => array( |
| 565 | 'row' => __( 'Before', 'premium-addons-for-elementor' ), |
| 566 | 'row-reverse' => __( 'After', 'premium-addons-for-elementor' ), |
| 567 | 'column' => __( 'Top', 'premium-addons-for-elementor' ), |
| 568 | 'column-reverse' => __( 'Bottom', 'premium-addons-for-elementor' ), |
| 569 | ), |
| 570 | 'default' => 'row', |
| 571 | 'toggle' => false, |
| 572 | 'render_type' => 'template', |
| 573 | 'prefix_class' => 'premium-title-icon-', |
| 574 | 'selectors' => array( |
| 575 | '{{WRAPPER}} .premium-title-header:not(.premium-title-style7), {{WRAPPER}} .premium-title-style7-inner' => 'flex-direction: {{VALUE}}', |
| 576 | ), |
| 577 | 'condition' => array( |
| 578 | 'premium_title_icon_switcher' => 'yes', |
| 579 | ), |
| 580 | ) |
| 581 | ); |
| 582 | |
| 583 | $this->add_responsive_control( |
| 584 | 'top_icon_align', |
| 585 | array( |
| 586 | 'label' => __( 'Icon Alignment', 'premium-addons-for-elementor' ), |
| 587 | 'type' => Controls_Manager::CHOOSE, |
| 588 | 'options' => array( |
| 589 | 'flex-start' => array( |
| 590 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 591 | 'icon' => 'eicon-text-align-left', |
| 592 | ), |
| 593 | 'center' => array( |
| 594 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 595 | 'icon' => 'eicon-text-align-center', |
| 596 | ), |
| 597 | 'flex-end' => array( |
| 598 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 599 | 'icon' => 'eicon-text-align-right', |
| 600 | ), |
| 601 | ), |
| 602 | 'default' => 'center', |
| 603 | 'toggle' => false, |
| 604 | 'selectors' => array( |
| 605 | '{{WRAPPER}}.premium-title-icon-column .premium-title-header:not(.premium-title-style7)' => 'align-items: {{VALUE}}', |
| 606 | '{{WRAPPER}}.premium-title-icon-column .premium-title-style7 .premium-title-icon' => 'align-self: {{VALUE}}', |
| 607 | ), |
| 608 | 'condition' => array( |
| 609 | 'premium_title_icon_switcher' => 'yes', |
| 610 | 'icon_position' => 'column', |
| 611 | 'premium_title_style!' => array( 'style3', 'style4' ), |
| 612 | ), |
| 613 | ) |
| 614 | ); |
| 615 | |
| 616 | $this->add_control( |
| 617 | 'premium_title_tag', |
| 618 | array( |
| 619 | 'label' => __( 'HTML Tag', 'premium-addons-for-elementor' ), |
| 620 | 'type' => Controls_Manager::SELECT, |
| 621 | 'default' => 'h2', |
| 622 | 'options' => array( |
| 623 | 'h1' => 'H1', |
| 624 | 'h2' => 'H2', |
| 625 | 'h3' => 'H3', |
| 626 | 'h4' => 'H4', |
| 627 | 'h5' => 'H5', |
| 628 | 'h6' => 'H6', |
| 629 | 'div' => 'div', |
| 630 | 'span' => 'span', |
| 631 | ), |
| 632 | 'separator' => 'before', |
| 633 | ) |
| 634 | ); |
| 635 | |
| 636 | $inline_flex = array( 'style1', 'style2', 'style5', 'style6', 'style7', 'style8', 'style9' ); |
| 637 | |
| 638 | $this->add_responsive_control( |
| 639 | 'premium_title_align', |
| 640 | array( |
| 641 | 'label' => __( 'Alignment', 'premium-addons-for-elementor' ), |
| 642 | 'type' => Controls_Manager::CHOOSE, |
| 643 | 'options' => array( |
| 644 | 'left' => array( |
| 645 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 646 | 'icon' => 'eicon-text-align-left', |
| 647 | ), |
| 648 | 'center' => array( |
| 649 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 650 | 'icon' => 'eicon-text-align-center', |
| 651 | ), |
| 652 | 'right' => array( |
| 653 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 654 | 'icon' => 'eicon-text-align-right', |
| 655 | ), |
| 656 | ), |
| 657 | 'default' => 'left', |
| 658 | 'toggle' => false, |
| 659 | 'selectors' => array( |
| 660 | '{{WRAPPER}} .premium-title-container' => 'text-align: {{VALUE}};', |
| 661 | ), |
| 662 | 'condition' => array( |
| 663 | 'premium_title_style' => $inline_flex, |
| 664 | ), |
| 665 | ) |
| 666 | ); |
| 667 | |
| 668 | $this->add_control( |
| 669 | 'premium_title_align_flex', |
| 670 | array( |
| 671 | 'label' => __( 'Alignment', 'premium-addons-for-elementor' ), |
| 672 | 'type' => Controls_Manager::CHOOSE, |
| 673 | 'prefix_class' => 'premium-title-', |
| 674 | 'options' => array( |
| 675 | 'flex-start' => array( |
| 676 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 677 | 'icon' => 'eicon-text-align-left', |
| 678 | ), |
| 679 | 'center' => array( |
| 680 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 681 | 'icon' => 'eicon-text-align-center', |
| 682 | ), |
| 683 | 'flex-end' => array( |
| 684 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 685 | 'icon' => 'eicon-text-align-right', |
| 686 | ), |
| 687 | ), |
| 688 | 'default' => 'flex-start', |
| 689 | 'selectors' => array( |
| 690 | '{{WRAPPER}}:not(.premium-title-icon-column) .premium-title-header' => 'justify-content: {{VALUE}}', |
| 691 | '{{WRAPPER}}.premium-title-icon-column .premium-title-header' => 'align-items: {{VALUE}}', |
| 692 | ), |
| 693 | 'toggle' => false, |
| 694 | 'condition' => array( |
| 695 | 'premium_title_style' => array( 'style3', 'style4' ), |
| 696 | ), |
| 697 | ) |
| 698 | ); |
| 699 | |
| 700 | $this->add_control( |
| 701 | 'alignment_notice', |
| 702 | array( |
| 703 | 'raw' => __( 'Please note that left/right alignment is reversed when Icon Position is set to After.', 'premium-addons-for-elementor' ), |
| 704 | 'type' => Controls_Manager::RAW_HTML, |
| 705 | 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', |
| 706 | 'condition' => array( |
| 707 | 'premium_title_icon_switcher' => 'yes', |
| 708 | 'icon_position' => 'row-reverse', |
| 709 | 'premium_title_style' => array( 'style3', 'style4' ), |
| 710 | ), |
| 711 | ) |
| 712 | ); |
| 713 | |
| 714 | $this->add_control( |
| 715 | 'premium_title_stripe_pos', |
| 716 | array( |
| 717 | 'label' => __( 'Stripe Position', 'premium-addons-for-elementor' ), |
| 718 | 'type' => Controls_Manager::SELECT, |
| 719 | 'options' => array( |
| 720 | 'top' => __( 'Top', 'premium-addons-for-elementor' ), |
| 721 | 'bottom' => __( 'Bottom', 'premium-addons-for-elementor' ), |
| 722 | ), |
| 723 | 'selectors_dictionary' => array( |
| 724 | 'top' => 'initial', |
| 725 | 'bottom' => '2', |
| 726 | ), |
| 727 | 'default' => 'top', |
| 728 | 'label_block' => true, |
| 729 | 'separator' => 'before', |
| 730 | 'condition' => array( |
| 731 | 'premium_title_style' => 'style7', |
| 732 | ), |
| 733 | 'selectors' => array( |
| 734 | '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'order: {{VALUE}}', |
| 735 | ), |
| 736 | ) |
| 737 | ); |
| 738 | |
| 739 | $this->add_responsive_control( |
| 740 | 'premium_title_style7_strip_width', |
| 741 | array( |
| 742 | 'label' => __( 'Stripe Width (PX)', 'premium-addons-for-elementor' ), |
| 743 | 'type' => Controls_Manager::SLIDER, |
| 744 | 'size_units' => array( 'px', '%', 'em', 'vw' ), |
| 745 | 'default' => array( |
| 746 | 'unit' => 'px', |
| 747 | 'size' => '120', |
| 748 | ), |
| 749 | 'selectors' => array( |
| 750 | '{{WRAPPER}} .premium-title-style7-stripe' => 'width: {{SIZE}}{{UNIT}};', |
| 751 | ), |
| 752 | 'label_block' => true, |
| 753 | 'condition' => array( |
| 754 | 'premium_title_style' => 'style7', |
| 755 | ), |
| 756 | ) |
| 757 | ); |
| 758 | |
| 759 | $this->add_responsive_control( |
| 760 | 'premium_title_style7_strip_height', |
| 761 | array( |
| 762 | 'label' => __( 'Stripe Height (PX)', 'premium-addons-for-elementor' ), |
| 763 | 'type' => Controls_Manager::SLIDER, |
| 764 | 'size_units' => array( 'px', 'em' ), |
| 765 | 'default' => array( |
| 766 | 'unit' => 'px', |
| 767 | 'size' => '5', |
| 768 | ), |
| 769 | 'label_block' => true, |
| 770 | 'selectors' => array( |
| 771 | '{{WRAPPER}} .premium-title-style7-stripe' => 'height: {{SIZE}}{{UNIT}};', |
| 772 | ), |
| 773 | 'condition' => array( |
| 774 | 'premium_title_style' => 'style7', |
| 775 | ), |
| 776 | ) |
| 777 | ); |
| 778 | |
| 779 | $this->add_responsive_control( |
| 780 | 'premium_title_style7_strip_top_spacing', |
| 781 | array( |
| 782 | 'label' => __( 'Stripe Top Spacing (PX)', 'premium-addons-for-elementor' ), |
| 783 | 'type' => Controls_Manager::SLIDER, |
| 784 | 'size_units' => array( 'px', '%', 'em' ), |
| 785 | 'selectors' => array( |
| 786 | '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'margin-top: {{SIZE}}{{UNIT}};', |
| 787 | ), |
| 788 | 'label_block' => true, |
| 789 | 'condition' => array( |
| 790 | 'premium_title_style' => 'style7', |
| 791 | ), |
| 792 | ) |
| 793 | ); |
| 794 | |
| 795 | $this->add_responsive_control( |
| 796 | 'premium_title_style7_strip_bottom_spacing', |
| 797 | array( |
| 798 | 'label' => __( 'Stripe Bottom Spacing (PX)', 'premium-addons-for-elementor' ), |
| 799 | 'type' => Controls_Manager::SLIDER, |
| 800 | 'size_units' => array( 'px', '%', 'em' ), |
| 801 | 'label_block' => true, |
| 802 | 'selectors' => array( |
| 803 | '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'margin-bottom: {{SIZE}}{{UNIT}};', |
| 804 | ), |
| 805 | 'condition' => array( |
| 806 | 'premium_title_style' => 'style7', |
| 807 | ), |
| 808 | ) |
| 809 | ); |
| 810 | |
| 811 | $this->add_responsive_control( |
| 812 | 'premium_title_style7_strip_align', |
| 813 | array( |
| 814 | 'label' => __( 'Stripe Alignment', 'premium-addons-for-elementor' ), |
| 815 | 'type' => Controls_Manager::CHOOSE, |
| 816 | 'options' => array( |
| 817 | 'flex-start' => array( |
| 818 | 'title' => __( 'Left', 'premium-addons-for-elementor' ), |
| 819 | 'icon' => 'eicon-text-align-left', |
| 820 | ), |
| 821 | 'center' => array( |
| 822 | 'title' => __( 'Center', 'premium-addons-for-elementor' ), |
| 823 | 'icon' => 'eicon-text-align-center', |
| 824 | ), |
| 825 | 'flex-end' => array( |
| 826 | 'title' => __( 'Right', 'premium-addons-for-elementor' ), |
| 827 | 'icon' => 'eicon-text-align-right', |
| 828 | ), |
| 829 | ), |
| 830 | 'toggle' => false, |
| 831 | 'default' => 'center', |
| 832 | 'selectors' => array( |
| 833 | '{{WRAPPER}}:not(.premium-title-icon-column) .premium-title-style7-stripe-wrap' => 'justify-content: {{VALUE}}', |
| 834 | '{{WRAPPER}}.premium-title-icon-column .premium-title-style7-stripe-wrap' => 'align-self: {{VALUE}}', |
| 835 | ), |
| 836 | 'condition' => array( |
| 837 | 'premium_title_style' => 'style7', |
| 838 | ), |
| 839 | ) |
| 840 | ); |
| 841 | |
| 842 | $this->add_control( |
| 843 | 'link_switcher', |
| 844 | array( |
| 845 | 'label' => __( 'Link', 'premium-addons-for-elementor' ), |
| 846 | 'type' => Controls_Manager::SWITCHER, |
| 847 | ) |
| 848 | ); |
| 849 | |
| 850 | $this->add_control( |
| 851 | 'link_selection', |
| 852 | array( |
| 853 | 'label' => __( 'Link Type', 'premium-addons-for-elementor' ), |
| 854 | 'type' => Controls_Manager::SELECT, |
| 855 | 'options' => array( |
| 856 | 'url' => __( 'URL', 'premium-addons-for-elementor' ), |
| 857 | 'link' => __( 'Existing Page', 'premium-addons-for-elementor' ), |
| 858 | ), |
| 859 | 'default' => 'url', |
| 860 | 'label_block' => true, |
| 861 | 'condition' => array( |
| 862 | 'link_switcher' => 'yes', |
| 863 | ), |
| 864 | ) |
| 865 | ); |
| 866 | |
| 867 | $this->add_control( |
| 868 | 'custom_link', |
| 869 | array( |
| 870 | 'label' => __( 'Link', 'premium-addons-for-elementor' ), |
| 871 | 'type' => Controls_Manager::URL, |
| 872 | 'dynamic' => array( 'active' => true ), |
| 873 | 'default' => array( |
| 874 | 'url' => '#', |
| 875 | ), |
| 876 | 'placeholder' => 'https://premiumaddons.com/', |
| 877 | 'label_block' => true, |
| 878 | 'separator' => 'after', |
| 879 | 'condition' => array( |
| 880 | 'link_switcher' => 'yes', |
| 881 | 'link_selection' => 'url', |
| 882 | ), |
| 883 | ) |
| 884 | ); |
| 885 | |
| 886 | $this->add_control( |
| 887 | 'existing_link', |
| 888 | array( |
| 889 | 'label' => __( 'Existing Page', 'premium-addons-for-elementor' ), |
| 890 | 'type' => Premium_Post_Filter::TYPE, |
| 891 | 'label_block' => true, |
| 892 | 'multiple' => false, |
| 893 | 'source' => array( 'post', 'page' ), |
| 894 | 'condition' => array( |
| 895 | 'link_switcher' => 'yes', |
| 896 | 'link_selection' => 'link', |
| 897 | ), |
| 898 | ) |
| 899 | ); |
| 900 | |
| 901 | $this->add_control( |
| 902 | 'background_text_switcher', |
| 903 | array( |
| 904 | 'label' => __( 'Background Text', 'premium-addons-for-elementor' ), |
| 905 | 'type' => Controls_Manager::SWITCHER, |
| 906 | ) |
| 907 | ); |
| 908 | |
| 909 | $this->add_control( |
| 910 | 'background_text', |
| 911 | array( |
| 912 | 'label' => __( 'Text', 'premium-addons-for-elementor' ), |
| 913 | 'type' => Controls_Manager::TEXT, |
| 914 | 'default' => __( 'Awesome Title', 'premium-addons-for-elementor' ), |
| 915 | 'condition' => array( |
| 916 | 'background_text_switcher' => 'yes', |
| 917 | ), |
| 918 | ) |
| 919 | ); |
| 920 | |
| 921 | $this->add_control( |
| 922 | 'background_text_width', |
| 923 | array( |
| 924 | 'label' => __( 'Width', 'premium-addons-for-elementor' ), |
| 925 | 'type' => Controls_Manager::SELECT, |
| 926 | 'options' => array( |
| 927 | 'auto' => __( 'Auto', 'premium-addons-for-elementor' ), |
| 928 | '100%' => __( 'Full Width', 'premium-addons-for-elementor' ), |
| 929 | ), |
| 930 | 'default' => 'auto', |
| 931 | 'label_block' => true, |
| 932 | 'selectors' => array( |
| 933 | '{{WRAPPER}} .premium-title-bg-text:before' => 'width: {{VALUE}}', |
| 934 | ), |
| 935 | 'condition' => array( |
| 936 | 'background_text_switcher' => 'yes', |
| 937 | ), |
| 938 | ) |
| 939 | ); |
| 940 | |
| 941 | $this->add_responsive_control( |
| 942 | 'background_text_left', |
| 943 | array( |
| 944 | 'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ), |
| 945 | 'type' => Controls_Manager::SLIDER, |
| 946 | 'size_units' => array( 'px', 'em', '%', 'custom' ), |
| 947 | 'range' => array( |
| 948 | 'px' => array( |
| 949 | 'min' => -500, |
| 950 | 'max' => 500, |
| 951 | ), |
| 952 | 'em' => array( |
| 953 | 'min' => -50, |
| 954 | 'max' => 50, |
| 955 | ), |
| 956 | '%' => array( |
| 957 | 'min' => -100, |
| 958 | 'max' => 100, |
| 959 | ), |
| 960 | ), |
| 961 | 'selectors' => array( |
| 962 | '{{WRAPPER}} .premium-title-bg-text:before' => 'left: {{SIZE}}{{UNIT}}', |
| 963 | ), |
| 964 | 'condition' => array( |
| 965 | 'background_text_switcher' => 'yes', |
| 966 | ), |
| 967 | ) |
| 968 | ); |
| 969 | |
| 970 | $this->add_responsive_control( |
| 971 | 'background_text_top', |
| 972 | array( |
| 973 | 'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ), |
| 974 | 'type' => Controls_Manager::SLIDER, |
| 975 | 'size_units' => array( 'px', 'em', '%', 'custom' ), |
| 976 | 'range' => array( |
| 977 | 'px' => array( |
| 978 | 'min' => -500, |
| 979 | 'max' => 500, |
| 980 | ), |
| 981 | 'em' => array( |
| 982 | 'min' => -50, |
| 983 | 'max' => 50, |
| 984 | ), |
| 985 | '%' => array( |
| 986 | 'min' => -100, |
| 987 | 'max' => 100, |
| 988 | ), |
| 989 | ), |
| 990 | 'selectors' => array( |
| 991 | '{{WRAPPER}} .premium-title-bg-text:before' => 'top: {{SIZE}}{{UNIT}}', |
| 992 | ), |
| 993 | 'condition' => array( |
| 994 | 'background_text_switcher' => 'yes', |
| 995 | ), |
| 996 | ) |
| 997 | ); |
| 998 | |
| 999 | $this->add_responsive_control( |
| 1000 | 'background_text_rotate', |
| 1001 | array( |
| 1002 | 'label' => __( 'Rotate (degrees)', 'premium-addons-for-elementor' ), |
| 1003 | 'type' => Controls_Manager::SLIDER, |
| 1004 | 'size_units' => array( 'deg' ), |
| 1005 | 'default' => array( |
| 1006 | 'unit' => 'deg', |
| 1007 | 'size' => 0, |
| 1008 | ), |
| 1009 | 'selectors' => array( |
| 1010 | '{{WRAPPER}} .premium-title-bg-text:before' => 'transform: rotate({{SIZE}}{{UNIT}})', |
| 1011 | ), |
| 1012 | 'condition' => array( |
| 1013 | 'background_text_switcher' => 'yes', |
| 1014 | ), |
| 1015 | ) |
| 1016 | ); |
| 1017 | |
| 1018 | $this->add_control( |
| 1019 | 'mask_switcher', |
| 1020 | array( |
| 1021 | 'label' => __( 'Minimal Mask Effect', 'premium-addons-for-elementor' ), |
| 1022 | 'type' => Controls_Manager::SWITCHER, |
| 1023 | 'description' => __( 'Note: This effect takes place once the element is in the viewport', 'premium-addons-for-elementor' ), |
| 1024 | 'render_type' => 'template', |
| 1025 | 'prefix_class' => 'premium-mask-', |
| 1026 | 'condition' => array( |
| 1027 | 'premium_title_style!' => 'style9', |
| 1028 | ), |
| 1029 | ) |
| 1030 | ); |
| 1031 | |
| 1032 | $this->add_control( |
| 1033 | 'mask_title_color', |
| 1034 | array( |
| 1035 | 'label' => __( 'Mask Color', 'premium-addons-for-elementor' ), |
| 1036 | 'type' => Controls_Manager::COLOR, |
| 1037 | 'render_type' => 'template', |
| 1038 | 'selectors' => array( |
| 1039 | '{{WRAPPER}}.premium-mask-yes .premium-mask-span::after' => 'background: {{VALUE}};', |
| 1040 | ), |
| 1041 | 'condition' => array( |
| 1042 | 'mask_switcher' => 'yes', |
| 1043 | 'premium_title_style!' => 'style9', |
| 1044 | ), |
| 1045 | ) |
| 1046 | ); |
| 1047 | |
| 1048 | $this->add_control( |
| 1049 | 'mask_title_dir', |
| 1050 | array( |
| 1051 | 'label' => __( 'Direction', 'premium-addons-for-elementor' ), |
| 1052 | 'type' => Controls_Manager::SELECT, |
| 1053 | 'default' => 'tr', |
| 1054 | 'prefix_class' => 'premium-mask-', |
| 1055 | 'render_type' => 'template', |
| 1056 | 'options' => array( |
| 1057 | 'tr' => __( 'To Right', 'premium-addons-for-elementor' ), |
| 1058 | 'tl' => __( 'To Left', 'premium-addons-for-elementor' ), |
| 1059 | 'tt' => __( 'To Top', 'premium-addons-for-elementor' ), |
| 1060 | 'tb' => __( 'To Bottom', 'premium-addons-for-elementor' ), |
| 1061 | ), |
| 1062 | 'condition' => array( |
| 1063 | 'mask_switcher' => 'yes', |
| 1064 | 'premium_title_style!' => 'style9', |
| 1065 | ), |
| 1066 | ) |
| 1067 | ); |
| 1068 | |
| 1069 | $this->add_responsive_control( |
| 1070 | 'mask_title_padding', |
| 1071 | array( |
| 1072 | 'label' => __( 'Words Padding', 'premium-addons-for-elementor' ), |
| 1073 | 'type' => Controls_Manager::DIMENSIONS, |
| 1074 | 'size_units' => array( 'px', 'em', '%' ), |
| 1075 | 'selectors' => array( |
| 1076 | '{{WRAPPER}} .premium-mask-span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1077 | ), |
| 1078 | 'condition' => array( |
| 1079 | 'mask_switcher' => 'yes', |
| 1080 | 'premium_title_style!' => 'style9', |
| 1081 | ), |
| 1082 | ) |
| 1083 | ); |
| 1084 | |
| 1085 | $this->add_control( |
| 1086 | 'noise', |
| 1087 | array( |
| 1088 | 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ), |
| 1089 | 'type' => Controls_Manager::SWITCHER, |
| 1090 | 'prefix_class' => 'premium-title-noise-', |
| 1091 | 'separator' => 'before', |
| 1092 | 'render_type' => 'template', |
| 1093 | 'condition' => array( |
| 1094 | 'premium_title_style!' => 'style9', |
| 1095 | 'mask_switcher!' => 'yes', |
| 1096 | 'gradient_text_switcher!' => 'yes', |
| 1097 | 'background_style' => 'color', |
| 1098 | ), |
| 1099 | ) |
| 1100 | ); |
| 1101 | |
| 1102 | $this->end_controls_section(); |
| 1103 | |
| 1104 | Helper_Functions::register_papro_promotion_controls( $this, 'heading' ); |
| 1105 | |
| 1106 | $this->start_controls_section( |
| 1107 | 'premium_title_style_section', |
| 1108 | array( |
| 1109 | 'label' => __( 'Title', 'premium-addons-for-elementor' ), |
| 1110 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1111 | ) |
| 1112 | ); |
| 1113 | |
| 1114 | $this->add_control( |
| 1115 | 'premium_title_color', |
| 1116 | array( |
| 1117 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1118 | 'type' => Controls_Manager::COLOR, |
| 1119 | 'global' => array( |
| 1120 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 1121 | ), |
| 1122 | 'selectors' => array( |
| 1123 | '{{WRAPPER}} .premium-title-header, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::before, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'color: {{VALUE}}', |
| 1124 | '{{WRAPPER}}.premium-title-stroke-yes .premium-title-text' => '-webkit-text-fill-color: {{VALUE}}', |
| 1125 | '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--base-color: {{VALUE}}', |
| 1126 | ), |
| 1127 | ) |
| 1128 | ); |
| 1129 | |
| 1130 | $this->add_control( |
| 1131 | 'premium_title_blur_color', |
| 1132 | array( |
| 1133 | 'label' => __( 'Blur Color', 'premium-addons-for-elementor' ), |
| 1134 | 'type' => Controls_Manager::COLOR, |
| 1135 | 'default' => '#000', |
| 1136 | 'selectors' => array( '{{WRAPPER}} .premium-title-header' => '--shadow-color: {{VALUE}};' ), |
| 1137 | 'condition' => array( |
| 1138 | 'premium_title_style' => 'style9', |
| 1139 | ), |
| 1140 | ) |
| 1141 | ); |
| 1142 | |
| 1143 | $this->add_control( |
| 1144 | 'shining_shiny_color_title', |
| 1145 | array( |
| 1146 | 'label' => __( 'Shiny Color', 'premium-addons-for-elementor' ), |
| 1147 | 'type' => Controls_Manager::COLOR, |
| 1148 | 'default' => '#fff', |
| 1149 | 'condition' => array( |
| 1150 | 'premium_title_style' => 'style8', |
| 1151 | ), |
| 1152 | 'selectors' => array( '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--shiny-color: {{VALUE}}' ), |
| 1153 | ) |
| 1154 | ); |
| 1155 | |
| 1156 | $this->add_group_control( |
| 1157 | Group_Control_Typography::get_type(), |
| 1158 | array( |
| 1159 | 'name' => 'title_typography', |
| 1160 | 'global' => array( |
| 1161 | 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, |
| 1162 | ), |
| 1163 | 'selector' => '{{WRAPPER}} .premium-title-header', |
| 1164 | ) |
| 1165 | ); |
| 1166 | |
| 1167 | $this->add_group_control( |
| 1168 | Group_Control_Border::get_type(), |
| 1169 | array( |
| 1170 | 'name' => 'style_one_border', |
| 1171 | 'fields_options' => array( |
| 1172 | 'border' => array( |
| 1173 | 'default' => 'solid', |
| 1174 | ), |
| 1175 | ), |
| 1176 | 'selector' => '{{WRAPPER}} .premium-title-style1', |
| 1177 | 'condition' => array( |
| 1178 | 'premium_title_style' => 'style1', |
| 1179 | ), |
| 1180 | ) |
| 1181 | ); |
| 1182 | |
| 1183 | $this->add_control( |
| 1184 | 'background_style', |
| 1185 | array( |
| 1186 | 'label' => __( 'Background Style', 'premium-addons-for-elementor' ), |
| 1187 | 'type' => Controls_Manager::SELECT, |
| 1188 | 'description' => __( 'Choose ‘Normal’ to add a background behind the text and ‘Clipped’ so the background will be clipped on the text.', 'premium-addons-for-elementor' ), |
| 1189 | 'options' => array( |
| 1190 | 'color' => __( 'Normal', 'premium-addons-for-elementor' ), |
| 1191 | 'clipped' => __( 'Clipped', 'premium-addons-for-elementor' ), |
| 1192 | ), |
| 1193 | 'prefix_class' => 'premium-title-', |
| 1194 | 'default' => 'color', |
| 1195 | 'label_block' => true, |
| 1196 | 'separator' => 'before', |
| 1197 | 'condition' => array( |
| 1198 | 'premium_title_style!' => array( 'style8', 'style9' ), |
| 1199 | ), |
| 1200 | ) |
| 1201 | ); |
| 1202 | |
| 1203 | $this->add_group_control( |
| 1204 | Group_Control_Background::get_type(), |
| 1205 | array( |
| 1206 | 'name' => 'title_background', |
| 1207 | 'types' => array( 'classic', 'gradient' ), |
| 1208 | 'condition' => array( |
| 1209 | 'premium_title_style!' => array( 'style8', 'style9' ), |
| 1210 | 'background_style!' => '', |
| 1211 | ), |
| 1212 | 'selector' => '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-header, {{WRAPPER}}.premium-title-clipped .premium-title-text', |
| 1213 | ) |
| 1214 | ); |
| 1215 | |
| 1216 | $this->add_control( |
| 1217 | 'premium_title_style2_background_color', |
| 1218 | array( |
| 1219 | 'label' => __( 'Background Color', 'premium-addons-for-elementor' ), |
| 1220 | 'type' => Controls_Manager::COLOR, |
| 1221 | 'global' => array( |
| 1222 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 1223 | ), |
| 1224 | 'selectors' => array( |
| 1225 | '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-style2, {{WRAPPER}}.premium-title-clipped .premium-title-text' => 'background-color: {{VALUE}};', |
| 1226 | ), |
| 1227 | 'condition' => array( |
| 1228 | 'premium_title_style' => 'style2', |
| 1229 | 'background_style' => '', |
| 1230 | ), |
| 1231 | ) |
| 1232 | ); |
| 1233 | |
| 1234 | $this->add_control( |
| 1235 | 'premium_title_style3_background_color', |
| 1236 | array( |
| 1237 | 'label' => __( 'Background Color', 'premium-addons-for-elementor' ), |
| 1238 | 'type' => Controls_Manager::COLOR, |
| 1239 | 'global' => array( |
| 1240 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 1241 | ), |
| 1242 | 'selectors' => array( |
| 1243 | '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-style3, {{WRAPPER}}.premium-title-clipped .premium-title-text' => 'background-color: {{VALUE}};', |
| 1244 | ), |
| 1245 | 'condition' => array( |
| 1246 | 'premium_title_style' => 'style3', |
| 1247 | 'background_style' => '', |
| 1248 | ), |
| 1249 | ) |
| 1250 | ); |
| 1251 | |
| 1252 | $this->add_control( |
| 1253 | 'heading_lq_effect', |
| 1254 | array( |
| 1255 | 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ), |
| 1256 | 'type' => Controls_Manager::SELECT, |
| 1257 | 'description' => sprintf( |
| 1258 | /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */ |
| 1259 | 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' ), |
| 1260 | '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">', |
| 1261 | '</a>' |
| 1262 | ), |
| 1263 | 'options' => array( |
| 1264 | 'none' => __( 'None', 'premium-addons-for-elementor' ), |
| 1265 | 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ), |
| 1266 | 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ), |
| 1267 | 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1268 | 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1269 | 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1270 | 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ), |
| 1271 | ), |
| 1272 | 'default' => 'none', |
| 1273 | 'label_block' => true, |
| 1274 | 'condition' => array( |
| 1275 | 'background_style' => 'color', |
| 1276 | 'premium_title_style!' => array( 'style8', 'style9' ), |
| 1277 | ), |
| 1278 | ) |
| 1279 | ); |
| 1280 | |
| 1281 | $this->add_control( |
| 1282 | 'premium_title_style5_header_line_color', |
| 1283 | array( |
| 1284 | 'label' => __( 'Line Color', 'premium-addons-for-elementor' ), |
| 1285 | 'type' => Controls_Manager::COLOR, |
| 1286 | 'global' => array( |
| 1287 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 1288 | ), |
| 1289 | 'selectors' => array( |
| 1290 | '{{WRAPPER}} .premium-title-style5' => 'border-bottom: 2px solid {{VALUE}};', |
| 1291 | ), |
| 1292 | 'condition' => array( |
| 1293 | 'premium_title_style' => 'style5', |
| 1294 | ), |
| 1295 | ) |
| 1296 | ); |
| 1297 | |
| 1298 | $this->add_group_control( |
| 1299 | Group_Control_Border::get_type(), |
| 1300 | array( |
| 1301 | 'name' => 'style_five_border', |
| 1302 | 'selector' => '{{WRAPPER}} .premium-title-container', |
| 1303 | 'condition' => array( |
| 1304 | 'premium_title_style' => array( 'style2', 'style4', 'style5', 'style6' ), |
| 1305 | ), |
| 1306 | ) |
| 1307 | ); |
| 1308 | |
| 1309 | $this->add_control( |
| 1310 | 'premium_title_style6_header_line_color', |
| 1311 | array( |
| 1312 | 'label' => __( 'Line Color', 'premium-addons-for-elementor' ), |
| 1313 | 'type' => Controls_Manager::COLOR, |
| 1314 | 'global' => array( |
| 1315 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 1316 | ), |
| 1317 | 'selectors' => array( |
| 1318 | '{{WRAPPER}} .premium-title-style6' => 'border-bottom: 2px solid {{VALUE}};', |
| 1319 | ), |
| 1320 | 'condition' => array( |
| 1321 | 'premium_title_style' => 'style6', |
| 1322 | ), |
| 1323 | ) |
| 1324 | ); |
| 1325 | |
| 1326 | $this->add_control( |
| 1327 | 'premium_title_style6_triangle_color', |
| 1328 | array( |
| 1329 | 'label' => __( 'Triangle Color', 'premium-addons-for-elementor' ), |
| 1330 | 'type' => Controls_Manager::COLOR, |
| 1331 | 'global' => array( |
| 1332 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 1333 | ), |
| 1334 | 'selectors' => array( |
| 1335 | '{{WRAPPER}} .premium-title-style6:before' => 'border-bottom-color: {{VALUE}};', |
| 1336 | ), |
| 1337 | 'condition' => array( |
| 1338 | 'premium_title_style' => 'style6', |
| 1339 | ), |
| 1340 | ) |
| 1341 | ); |
| 1342 | |
| 1343 | $this->add_control( |
| 1344 | 'premium_title_style7_strip_color', |
| 1345 | array( |
| 1346 | 'label' => __( 'Stripe Color', 'premium-addons-for-elementor' ), |
| 1347 | 'type' => Controls_Manager::COLOR, |
| 1348 | 'global' => array( |
| 1349 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 1350 | ), |
| 1351 | 'selectors' => array( |
| 1352 | '{{WRAPPER}} .premium-title-style7-stripe' => 'background-color: {{VALUE}};', |
| 1353 | ), |
| 1354 | 'condition' => array( |
| 1355 | 'premium_title_style' => 'style7', |
| 1356 | ), |
| 1357 | ) |
| 1358 | ); |
| 1359 | |
| 1360 | $this->add_group_control( |
| 1361 | Group_Control_Text_Shadow::get_type(), |
| 1362 | array( |
| 1363 | 'label' => __( 'Shadow', 'premium-addons-for-elementor' ), |
| 1364 | 'name' => 'premium_title_text_shadow', |
| 1365 | 'selector' => '{{WRAPPER}} .premium-title-header', |
| 1366 | ) |
| 1367 | ); |
| 1368 | |
| 1369 | $this->add_control( |
| 1370 | 'premium_title_shadow_value', |
| 1371 | array( |
| 1372 | 'label' => esc_html__( 'Blur Shadow Value (px)', 'premium-addons-for-elementor' ), |
| 1373 | 'type' => Controls_Manager::NUMBER, |
| 1374 | 'min' => '10', |
| 1375 | 'max' => '500', |
| 1376 | 'step' => '10', |
| 1377 | 'dynamic' => array( 'active' => true ), |
| 1378 | 'selectors' => array( '{{WRAPPER}} .premium-title-header' => '--shadow-value: {{VALUE}}px;' ), |
| 1379 | 'default' => '120', |
| 1380 | 'condition' => array( |
| 1381 | 'premium_title_style' => 'style9', |
| 1382 | ), |
| 1383 | ) |
| 1384 | ); |
| 1385 | |
| 1386 | $this->add_control( |
| 1387 | 'premium_title_delay', |
| 1388 | array( |
| 1389 | 'label' => esc_html__( 'Animation Delay (s)', 'premium-addons-for-elementor' ), |
| 1390 | 'type' => Controls_Manager::NUMBER, |
| 1391 | 'min' => '1', |
| 1392 | 'max' => '30', |
| 1393 | 'step' => 0.5, |
| 1394 | 'condition' => array( |
| 1395 | 'premium_title_style' => array( 'style8', 'style9' ), |
| 1396 | ), |
| 1397 | 'render_type' => 'template', |
| 1398 | 'dynamic' => array( 'active' => true ), |
| 1399 | 'default' => '2', |
| 1400 | ) |
| 1401 | ); |
| 1402 | |
| 1403 | $this->add_control( |
| 1404 | 'shining_animation_duration', |
| 1405 | array( |
| 1406 | 'label' => __( 'Animation Duration (s)', 'premium-addons-for-elementor' ), |
| 1407 | 'type' => Controls_Manager::NUMBER, |
| 1408 | 'default' => '1', |
| 1409 | 'step' => 0.5, |
| 1410 | 'condition' => array( |
| 1411 | 'premium_title_style' => 'style8', |
| 1412 | ), |
| 1413 | 'frontend_available' => true, |
| 1414 | 'render_type' => 'template', |
| 1415 | 'selectors' => array( |
| 1416 | '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--animation-speed: {{VALUE}}s ', |
| 1417 | ), |
| 1418 | ) |
| 1419 | ); |
| 1420 | |
| 1421 | $this->add_responsive_control( |
| 1422 | 'premium_title_margin', |
| 1423 | array( |
| 1424 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1425 | 'type' => Controls_Manager::DIMENSIONS, |
| 1426 | 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ), |
| 1427 | 'selectors' => array( |
| 1428 | '{{WRAPPER}} .premium-title-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1429 | ), |
| 1430 | ) |
| 1431 | ); |
| 1432 | |
| 1433 | $this->add_responsive_control( |
| 1434 | 'premium_title_padding', |
| 1435 | array( |
| 1436 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1437 | 'type' => Controls_Manager::DIMENSIONS, |
| 1438 | 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ), |
| 1439 | 'selectors' => array( |
| 1440 | '{{WRAPPER}} .premium-title-text, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::before, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1441 | ), |
| 1442 | ) |
| 1443 | ); |
| 1444 | |
| 1445 | $this->add_control( |
| 1446 | 'stroke_switcher', |
| 1447 | array( |
| 1448 | 'label' => __( 'Stroke', 'premium-addons-for-elementor' ), |
| 1449 | 'type' => Controls_Manager::SWITCHER, |
| 1450 | 'prefix_class' => 'premium-title-stroke-', |
| 1451 | 'condition' => array( |
| 1452 | 'premium_title_style!' => 'style9', |
| 1453 | 'background_style' => 'color', |
| 1454 | ), |
| 1455 | ) |
| 1456 | ); |
| 1457 | |
| 1458 | $this->add_control( |
| 1459 | 'stroke_text_color', |
| 1460 | array( |
| 1461 | 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ), |
| 1462 | 'type' => Controls_Manager::COLOR, |
| 1463 | 'condition' => array( |
| 1464 | 'stroke_switcher' => 'yes', |
| 1465 | 'background_style' => 'color', |
| 1466 | 'premium_title_style!' => 'style9', |
| 1467 | ), |
| 1468 | 'selectors' => array( |
| 1469 | '{{WRAPPER}} .premium-title-text' => '-webkit-text-stroke-color: {{VALUE}};', |
| 1470 | ), |
| 1471 | ) |
| 1472 | ); |
| 1473 | |
| 1474 | $this->add_responsive_control( |
| 1475 | 'stroke_width', |
| 1476 | array( |
| 1477 | 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ), |
| 1478 | 'type' => Controls_Manager::SLIDER, |
| 1479 | 'condition' => array( |
| 1480 | 'stroke_switcher' => 'yes', |
| 1481 | 'background_style' => 'color', |
| 1482 | 'premium_title_style!' => 'style9', |
| 1483 | ), |
| 1484 | 'default' => array( |
| 1485 | 'size' => 1, |
| 1486 | 'unit' => 'px', |
| 1487 | ), |
| 1488 | 'selectors' => array( |
| 1489 | '{{WRAPPER}} .premium-title-text' => '-webkit-text-stroke-width: {{SIZE}}px', |
| 1490 | ), |
| 1491 | ) |
| 1492 | ); |
| 1493 | |
| 1494 | $this->add_control( |
| 1495 | 'gradient_text_switcher', |
| 1496 | array( |
| 1497 | 'label' => __( 'Animated Gradient', 'premium-addons-for-elementor' ), |
| 1498 | 'type' => Controls_Manager::SWITCHER, |
| 1499 | 'prefix_class' => 'premium-title-gradient-', |
| 1500 | 'separator' => 'before', |
| 1501 | 'condition' => array( |
| 1502 | 'premium_title_style!' => array( 'style8', 'style9' ), |
| 1503 | 'mask_switcher!' => 'yes', |
| 1504 | 'stroke_switcher!' => 'yes', |
| 1505 | 'background_style' => 'color', |
| 1506 | ), |
| 1507 | ) |
| 1508 | ); |
| 1509 | |
| 1510 | $this->add_control( |
| 1511 | 'animation_transition_speed', |
| 1512 | array( |
| 1513 | 'label' => __( 'Animation Speed (sec)', 'premium-addons-for-elementor' ), |
| 1514 | 'type' => Controls_Manager::SLIDER, |
| 1515 | 'range' => array( |
| 1516 | 'px' => array( |
| 1517 | 'min' => 0, |
| 1518 | 'max' => 10, |
| 1519 | 'step' => .1, |
| 1520 | ), |
| 1521 | ), |
| 1522 | 'selectors' => array( |
| 1523 | '{{WRAPPER}}.premium-title-gradient-yes .premium-title-text, {{WRAPPER}}.premium-title-gradient-yes .premium-title-icon' => 'animation-duration: {{SIZE}}s ', |
| 1524 | ), |
| 1525 | 'condition' => array( |
| 1526 | 'gradient_text_switcher' => 'yes', |
| 1527 | 'premium_title_style!' => array( 'style8', 'style9' ), |
| 1528 | 'mask_switcher!' => 'yes', |
| 1529 | 'stroke_switcher!' => 'yes', |
| 1530 | 'background_style' => 'color', |
| 1531 | ), |
| 1532 | ) |
| 1533 | ); |
| 1534 | |
| 1535 | $this->add_group_control( |
| 1536 | Group_Control_Background::get_type(), |
| 1537 | array( |
| 1538 | 'name' => 'text_gradient', |
| 1539 | 'types' => array( 'gradient' ), |
| 1540 | 'selector' => '{{WRAPPER}}.premium-title-gradient-yes .premium-title-text, {{WRAPPER}}.premium-title-gradient-yes .premium-title-icon', |
| 1541 | 'condition' => array( |
| 1542 | 'gradient_text_switcher' => 'yes', |
| 1543 | 'premium_title_style!' => array( 'style8', 'style9' ), |
| 1544 | 'mask_switcher!' => 'yes', |
| 1545 | 'stroke_switcher!' => 'yes', |
| 1546 | 'background_style' => 'color', |
| 1547 | ), |
| 1548 | ) |
| 1549 | ); |
| 1550 | |
| 1551 | $this->add_control( |
| 1552 | 'noise_heading', |
| 1553 | array( |
| 1554 | 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ), |
| 1555 | 'type' => Controls_Manager::HEADING, |
| 1556 | 'condition' => array( |
| 1557 | 'noise' => 'yes', |
| 1558 | ), |
| 1559 | ) |
| 1560 | ); |
| 1561 | |
| 1562 | $this->add_control( |
| 1563 | 'noise_first_color', |
| 1564 | array( |
| 1565 | 'label' => __( 'Color #1', 'premium-addons-for-elementor' ), |
| 1566 | 'type' => Controls_Manager::COLOR, |
| 1567 | 'condition' => array( |
| 1568 | 'noise' => 'yes', |
| 1569 | ), |
| 1570 | 'selectors' => array( |
| 1571 | '{{WRAPPER}}.premium-title-noise-yes .premium-title-text::before' => 'text-shadow: 1px 0 {{VALUE}};', |
| 1572 | ), |
| 1573 | ) |
| 1574 | ); |
| 1575 | |
| 1576 | $this->add_control( |
| 1577 | 'noise_second_color', |
| 1578 | array( |
| 1579 | 'label' => __( 'Color #2', 'premium-addons-for-elementor' ), |
| 1580 | 'type' => Controls_Manager::COLOR, |
| 1581 | 'condition' => array( |
| 1582 | 'noise' => 'yes', |
| 1583 | ), |
| 1584 | 'selectors' => array( |
| 1585 | '{{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'text-shadow: -1px 0 {{VALUE}};', |
| 1586 | ), |
| 1587 | ) |
| 1588 | ); |
| 1589 | |
| 1590 | $this->end_controls_section(); |
| 1591 | |
| 1592 | $this->start_controls_section( |
| 1593 | 'premium_title_icon_style_section', |
| 1594 | array( |
| 1595 | 'label' => __( 'Icon', 'premium-addons-for-elementor' ), |
| 1596 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1597 | 'condition' => array( |
| 1598 | 'premium_title_icon_switcher' => 'yes', |
| 1599 | ), |
| 1600 | ) |
| 1601 | ); |
| 1602 | |
| 1603 | $this->add_control( |
| 1604 | 'premium_title_icon_color', |
| 1605 | array( |
| 1606 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1607 | 'type' => Controls_Manager::COLOR, |
| 1608 | 'global' => array( |
| 1609 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 1610 | ), |
| 1611 | 'selectors' => array( |
| 1612 | '{{WRAPPER}} .premium-title-icon' => 'color: {{VALUE}}', |
| 1613 | '{{WRAPPER}} .premium-drawable-icon *, {{WRAPPER}} svg:not([class*="premium-"])' => 'fill: {{VALUE}};', |
| 1614 | ), |
| 1615 | 'condition' => array( |
| 1616 | 'icon_type' => array( 'icon', 'svg' ), |
| 1617 | ), |
| 1618 | ) |
| 1619 | ); |
| 1620 | |
| 1621 | if ( $draw_icon ) { |
| 1622 | $this->add_control( |
| 1623 | 'stroke_color', |
| 1624 | array( |
| 1625 | 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ), |
| 1626 | 'type' => Controls_Manager::COLOR, |
| 1627 | 'global' => array( |
| 1628 | 'default' => Global_Colors::COLOR_ACCENT, |
| 1629 | ), |
| 1630 | 'condition' => array( |
| 1631 | 'icon_type' => array( 'icon', 'svg' ), |
| 1632 | ), |
| 1633 | 'selectors' => array( |
| 1634 | '{{WRAPPER}} .premium-drawable-icon *, {{WRAPPER}} svg:not([class*="premium-"])' => 'stroke: {{VALUE}};', |
| 1635 | ), |
| 1636 | ) |
| 1637 | ); |
| 1638 | |
| 1639 | $this->add_control( |
| 1640 | 'svg_color', |
| 1641 | array( |
| 1642 | 'label' => __( 'After Draw Fill Color', 'premium-addons-for-elementor' ), |
| 1643 | 'type' => Controls_Manager::COLOR, |
| 1644 | 'global' => false, |
| 1645 | 'separator' => 'after', |
| 1646 | 'condition' => array( |
| 1647 | 'icon_type' => array( 'icon', 'svg' ), |
| 1648 | 'draw_svg' => 'yes', |
| 1649 | ), |
| 1650 | ) |
| 1651 | ); |
| 1652 | } |
| 1653 | |
| 1654 | $this->add_responsive_control( |
| 1655 | 'premium_title_icon_size', |
| 1656 | array( |
| 1657 | 'label' => __( 'Size', 'premium-addons-for-elementor' ), |
| 1658 | 'type' => Controls_Manager::SLIDER, |
| 1659 | 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ), |
| 1660 | 'range' => array( |
| 1661 | 'px' => array( |
| 1662 | 'min' => 10, |
| 1663 | 'max' => 300, |
| 1664 | ), |
| 1665 | 'em' => array( |
| 1666 | 'min' => 1, |
| 1667 | 'max' => 30, |
| 1668 | ), |
| 1669 | ), |
| 1670 | 'condition' => array( |
| 1671 | 'icon_type!' => 'svg', |
| 1672 | ), |
| 1673 | 'selectors' => array( |
| 1674 | '{{WRAPPER}} .premium-title-header i' => 'font-size: {{SIZE}}{{UNIT}}', |
| 1675 | '{{WRAPPER}} .premium-title-header svg, {{WRAPPER}} .premium-title-header img' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important', |
| 1676 | ), |
| 1677 | ) |
| 1678 | ); |
| 1679 | |
| 1680 | $this->add_responsive_control( |
| 1681 | 'svg_icon_width', |
| 1682 | array( |
| 1683 | 'label' => __( 'Width', 'premium-addons-for-elementor' ), |
| 1684 | 'type' => Controls_Manager::SLIDER, |
| 1685 | 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ), |
| 1686 | 'range' => array( |
| 1687 | 'px' => array( |
| 1688 | 'min' => 1, |
| 1689 | 'max' => 600, |
| 1690 | ), |
| 1691 | 'em' => array( |
| 1692 | 'min' => 1, |
| 1693 | 'max' => 30, |
| 1694 | ), |
| 1695 | ), |
| 1696 | 'default' => array( |
| 1697 | 'size' => 100, |
| 1698 | 'unit' => 'px', |
| 1699 | ), |
| 1700 | 'condition' => array( |
| 1701 | 'icon_type' => 'svg', |
| 1702 | ), |
| 1703 | 'selectors' => array( |
| 1704 | '{{WRAPPER}} .premium-title-header svg' => 'width: {{SIZE}}{{UNIT}};', |
| 1705 | ), |
| 1706 | ) |
| 1707 | ); |
| 1708 | |
| 1709 | $this->add_responsive_control( |
| 1710 | 'svg_icon_height', |
| 1711 | array( |
| 1712 | 'label' => __( 'Height', 'premium-addons-for-elementor' ), |
| 1713 | 'type' => Controls_Manager::SLIDER, |
| 1714 | 'size_units' => array( 'px', 'em', 'custom' ), |
| 1715 | 'range' => array( |
| 1716 | 'px' => array( |
| 1717 | 'min' => 1, |
| 1718 | 'max' => 300, |
| 1719 | ), |
| 1720 | 'em' => array( |
| 1721 | 'min' => 1, |
| 1722 | 'max' => 30, |
| 1723 | ), |
| 1724 | ), |
| 1725 | 'condition' => array( |
| 1726 | 'icon_type' => 'svg', |
| 1727 | ), |
| 1728 | 'selectors' => array( |
| 1729 | '{{WRAPPER}} .premium-title-header svg' => 'height: {{SIZE}}{{UNIT}}', |
| 1730 | ), |
| 1731 | ) |
| 1732 | ); |
| 1733 | |
| 1734 | $this->add_group_control( |
| 1735 | Group_Control_Background::get_type(), |
| 1736 | array( |
| 1737 | 'name' => 'premium_title_icon_background', |
| 1738 | 'types' => array( 'classic', 'gradient' ), |
| 1739 | 'selector' => '{{WRAPPER}} .premium-title-icon', |
| 1740 | ) |
| 1741 | ); |
| 1742 | |
| 1743 | $this->add_group_control( |
| 1744 | Group_Control_Border::get_type(), |
| 1745 | array( |
| 1746 | 'name' => 'premium_title_icon_border', |
| 1747 | 'selector' => '{{WRAPPER}} .premium-title-icon', |
| 1748 | ) |
| 1749 | ); |
| 1750 | |
| 1751 | $this->add_control( |
| 1752 | 'premium_title_icon_border_radius', |
| 1753 | array( |
| 1754 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1755 | 'type' => Controls_Manager::SLIDER, |
| 1756 | 'size_units' => array( 'px', '%', 'em' ), |
| 1757 | 'selectors' => array( |
| 1758 | '{{WRAPPER}} .premium-title-icon' => 'border-radius: {{SIZE}}{{UNIT}};', |
| 1759 | ), |
| 1760 | 'condition' => array( |
| 1761 | 'icon_adv_radius!' => 'yes', |
| 1762 | ), |
| 1763 | ) |
| 1764 | ); |
| 1765 | |
| 1766 | $this->add_control( |
| 1767 | 'icon_adv_radius', |
| 1768 | array( |
| 1769 | 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ), |
| 1770 | 'type' => Controls_Manager::SWITCHER, |
| 1771 | 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>' . __( '. See ', 'premium-addons-for-elementor' ) . '<a href="https://www.youtube.com/watch?v=S0BJazLHV-M" target="_blank">tutorial</a>', |
| 1772 | ) |
| 1773 | ); |
| 1774 | |
| 1775 | $this->add_control( |
| 1776 | 'icon_adv_radius_value', |
| 1777 | array( |
| 1778 | 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ), |
| 1779 | 'type' => Controls_Manager::TEXT, |
| 1780 | 'dynamic' => array( 'active' => true ), |
| 1781 | 'selectors' => array( |
| 1782 | '{{WRAPPER}} .premium-title-icon' => 'border-radius: {{VALUE}};', |
| 1783 | ), |
| 1784 | 'condition' => array( |
| 1785 | 'icon_adv_radius' => 'yes', |
| 1786 | ), |
| 1787 | ) |
| 1788 | ); |
| 1789 | |
| 1790 | $this->add_responsive_control( |
| 1791 | 'premium_title_icon_margin', |
| 1792 | array( |
| 1793 | 'label' => __( 'Margin', 'premium-addons-for-elementor' ), |
| 1794 | 'type' => Controls_Manager::DIMENSIONS, |
| 1795 | 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ), |
| 1796 | 'selectors' => array( |
| 1797 | '{{WRAPPER}} .premium-title-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1798 | ), |
| 1799 | ) |
| 1800 | ); |
| 1801 | |
| 1802 | $this->add_responsive_control( |
| 1803 | 'premium_title_icon_padding', |
| 1804 | array( |
| 1805 | 'label' => __( 'Padding', 'premium-addons-for-elementor' ), |
| 1806 | 'type' => Controls_Manager::DIMENSIONS, |
| 1807 | 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ), |
| 1808 | 'selectors' => array( |
| 1809 | '{{WRAPPER}} .premium-title-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}', |
| 1810 | ), |
| 1811 | ) |
| 1812 | ); |
| 1813 | |
| 1814 | $this->add_group_control( |
| 1815 | Group_Control_Text_Shadow::get_type(), |
| 1816 | array( |
| 1817 | 'label' => __( 'Icon Shadow', 'premium-addons-for-elementor' ), |
| 1818 | 'name' => 'premium_title_icon_text_shadow', |
| 1819 | 'selector' => '{{WRAPPER}} .premium-title-icon', |
| 1820 | 'condition' => array( |
| 1821 | 'icon_type' => 'icon', |
| 1822 | ), |
| 1823 | ) |
| 1824 | ); |
| 1825 | |
| 1826 | $this->end_controls_section(); |
| 1827 | |
| 1828 | $this->start_controls_section( |
| 1829 | 'background_text_style_section', |
| 1830 | array( |
| 1831 | 'label' => __( 'Background Text', 'premium-addons-for-elementor' ), |
| 1832 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1833 | 'condition' => array( |
| 1834 | 'background_text_switcher' => 'yes', |
| 1835 | ), |
| 1836 | ) |
| 1837 | ); |
| 1838 | |
| 1839 | $this->add_control( |
| 1840 | 'background_text_color', |
| 1841 | array( |
| 1842 | 'label' => __( 'Color', 'premium-addons-for-elementor' ), |
| 1843 | 'type' => Controls_Manager::COLOR, |
| 1844 | 'global' => array( |
| 1845 | 'default' => Global_Colors::COLOR_PRIMARY, |
| 1846 | ), |
| 1847 | 'selectors' => array( |
| 1848 | '{{WRAPPER}} .premium-title-bg-text:before' => 'color: {{VALUE}}', |
| 1849 | ), |
| 1850 | ) |
| 1851 | ); |
| 1852 | |
| 1853 | $this->add_group_control( |
| 1854 | Group_Control_Typography::get_type(), |
| 1855 | array( |
| 1856 | 'name' => 'background_text_typography', |
| 1857 | 'global' => array( |
| 1858 | 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, |
| 1859 | ), |
| 1860 | 'selector' => '{{WRAPPER}} .premium-title-bg-text:before', |
| 1861 | ) |
| 1862 | ); |
| 1863 | |
| 1864 | $this->add_group_control( |
| 1865 | Group_Control_Text_Shadow::get_type(), |
| 1866 | array( |
| 1867 | 'name' => 'background_text_shadow', |
| 1868 | 'selector' => '{{WRAPPER}} .premium-title-bg-text:before', |
| 1869 | ) |
| 1870 | ); |
| 1871 | |
| 1872 | $this->add_control( |
| 1873 | 'bg_stroke_switcher', |
| 1874 | array( |
| 1875 | 'label' => __( 'Stroke', 'premium-addons-for-elementor' ), |
| 1876 | 'type' => Controls_Manager::SWITCHER, |
| 1877 | 'prefix_class' => 'premium-title-bg-stroke-', |
| 1878 | ) |
| 1879 | ); |
| 1880 | |
| 1881 | $this->add_control( |
| 1882 | 'bg_stroke_text_color', |
| 1883 | array( |
| 1884 | 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ), |
| 1885 | 'type' => Controls_Manager::COLOR, |
| 1886 | 'condition' => array( |
| 1887 | 'bg_stroke_switcher' => 'yes', |
| 1888 | ), |
| 1889 | 'selectors' => array( |
| 1890 | '{{WRAPPER}} .premium-title-bg-text::before' => '-webkit-text-stroke-color: {{VALUE}};', |
| 1891 | ), |
| 1892 | ) |
| 1893 | ); |
| 1894 | |
| 1895 | $this->add_responsive_control( |
| 1896 | 'bg_stroke_width', |
| 1897 | array( |
| 1898 | 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ), |
| 1899 | 'type' => Controls_Manager::SLIDER, |
| 1900 | 'default' => array( |
| 1901 | 'size' => 1, |
| 1902 | 'unit' => 'px', |
| 1903 | ), |
| 1904 | 'condition' => array( |
| 1905 | 'bg_stroke_switcher' => 'yes', |
| 1906 | ), |
| 1907 | 'selectors' => array( |
| 1908 | '{{WRAPPER}} .premium-title-bg-text::before' => '-webkit-text-stroke-width: {{SIZE}}px', |
| 1909 | ), |
| 1910 | ) |
| 1911 | ); |
| 1912 | |
| 1913 | $this->add_control( |
| 1914 | 'background_text_mix_blend', |
| 1915 | array( |
| 1916 | 'label' => __( 'Blend Mode', 'premium-addons-for-elementor' ), |
| 1917 | 'type' => Controls_Manager::SELECT, |
| 1918 | 'options' => array( |
| 1919 | '' => __( 'Normal', 'premium-addons-for-elementor' ), |
| 1920 | 'multiply' => 'Multiply', |
| 1921 | 'screen' => 'Screen', |
| 1922 | 'overlay' => 'Overlay', |
| 1923 | 'darken' => 'Darken', |
| 1924 | 'lighten' => 'Lighten', |
| 1925 | 'color-dodge' => 'Color Dodge', |
| 1926 | 'saturation' => 'Saturation', |
| 1927 | 'color' => 'Color', |
| 1928 | 'luminosity' => 'Luminosity', |
| 1929 | ), |
| 1930 | 'separator' => 'before', |
| 1931 | 'selectors' => array( |
| 1932 | '{{WRAPPER}} .premium-title-bg-text:before' => 'mix-blend-mode: {{VALUE}}', |
| 1933 | ), |
| 1934 | ) |
| 1935 | ); |
| 1936 | |
| 1937 | $this->add_control( |
| 1938 | 'background_text_zindex', |
| 1939 | array( |
| 1940 | 'label' => __( 'z-Index', 'premium-addons-for-elementor' ), |
| 1941 | 'type' => Controls_Manager::NUMBER, |
| 1942 | 'min' => -10, |
| 1943 | 'max' => 20, |
| 1944 | 'step' => 1, |
| 1945 | 'selectors' => array( |
| 1946 | '{{WRAPPER}} .premium-title-bg-text:before' => 'z-index: {{VALUE}}', |
| 1947 | ), |
| 1948 | ) |
| 1949 | ); |
| 1950 | |
| 1951 | $this->end_controls_section(); |
| 1952 | } |
| 1953 | |
| 1954 | /** |
| 1955 | * Render title widget output on the frontend. |
| 1956 | * |
| 1957 | * Written in PHP and used to generate the final HTML. |
| 1958 | * |
| 1959 | * @since 1.0.0 |
| 1960 | * @access protected |
| 1961 | */ |
| 1962 | protected function render() { |
| 1963 | |
| 1964 | $settings = $this->get_settings_for_display(); |
| 1965 | |
| 1966 | $this->add_inline_editing_attributes( 'premium_title_text', 'none' ); |
| 1967 | |
| 1968 | $this->add_render_attribute( 'premium_title_text', 'class', 'premium-title-text' ); |
| 1969 | |
| 1970 | $title_tag = Helper_Functions::validate_html_tag( $settings['premium_title_tag'] ); |
| 1971 | |
| 1972 | $selected_style = $settings['premium_title_style']; |
| 1973 | |
| 1974 | $this->add_render_attribute( 'container', 'class', array( 'premium-title-container', $selected_style ) ); |
| 1975 | |
| 1976 | $this->add_render_attribute( 'title', 'class', array( 'premium-title-header', 'premium-title-' . $selected_style ) ); |
| 1977 | |
| 1978 | if( 'none' !== $settings['heading_lq_effect'] ) { |
| 1979 | $this->add_render_attribute( 'title', 'class', 'premium-con-lq__' . $settings['heading_lq_effect'] ); |
| 1980 | } |
| 1981 | |
| 1982 | if ( 'style8' === $selected_style ) { |
| 1983 | |
| 1984 | $this->add_render_attribute( |
| 1985 | 'premium_title_text', |
| 1986 | array( |
| 1987 | 'data-shiny-delay' => $settings['premium_title_delay'], |
| 1988 | 'data-shiny-dur' => $settings['shining_animation_duration'], |
| 1989 | ) |
| 1990 | ); |
| 1991 | |
| 1992 | } elseif ( 'style9' === $selected_style ) { |
| 1993 | |
| 1994 | $this->add_render_attribute( 'title', 'data-blur-delay', $settings['premium_title_delay'] ); |
| 1995 | |
| 1996 | } |
| 1997 | |
| 1998 | if ( 'yes' === $settings['noise'] ) { |
| 1999 | |
| 2000 | $this->add_render_attribute( 'premium_title_text', 'data-text', $settings['premium_title_text'] ); |
| 2001 | |
| 2002 | } |
| 2003 | |
| 2004 | $icon_position = ''; |
| 2005 | |
| 2006 | if ( 'yes' === $settings['premium_title_icon_switcher'] ) { |
| 2007 | |
| 2008 | $icon_type = $settings['icon_type']; |
| 2009 | |
| 2010 | $icon_position = $settings['icon_position']; |
| 2011 | |
| 2012 | if ( 'icon' === $icon_type || 'svg' === $icon_type ) { |
| 2013 | |
| 2014 | $this->add_render_attribute( 'icon', 'class', 'premium-drawable-icon' ); |
| 2015 | |
| 2016 | if ( ( 'yes' === $settings['draw_svg'] && 'icon' === $icon_type ) || 'svg' === $icon_type ) { |
| 2017 | $this->add_render_attribute( 'icon', 'class', 'premium-title-icon' ); |
| 2018 | } |
| 2019 | |
| 2020 | if ( 'yes' === $settings['draw_svg'] ) { |
| 2021 | |
| 2022 | $this->add_render_attribute( |
| 2023 | 'container', |
| 2024 | 'class', |
| 2025 | array( |
| 2026 | 'elementor-invisible', |
| 2027 | 'premium-drawer-hover', |
| 2028 | ) |
| 2029 | ); |
| 2030 | |
| 2031 | $this->add_render_attribute( |
| 2032 | 'icon', |
| 2033 | array( |
| 2034 | 'class' => 'premium-svg-drawer', |
| 2035 | 'data-svg-reverse' => $settings['lottie_reverse'], |
| 2036 | 'data-svg-loop' => $settings['lottie_loop'], |
| 2037 | 'data-svg-sync' => $settings['svg_sync'], |
| 2038 | 'data-svg-hover' => $settings['svg_hover'], |
| 2039 | 'data-svg-fill' => $settings['svg_color'], |
| 2040 | 'data-svg-frames' => $settings['frames'], |
| 2041 | 'data-svg-yoyo' => $settings['svg_yoyo'], |
| 2042 | 'data-svg-point' => $settings['lottie_reverse'] ? $settings['end_point']['size'] : $settings['start_point']['size'], |
| 2043 | ) |
| 2044 | ); |
| 2045 | |
| 2046 | } else { |
| 2047 | $this->add_render_attribute( 'icon', 'class', 'premium-svg-nodraw' ); |
| 2048 | } |
| 2049 | } elseif ( 'animation' === $icon_type ) { |
| 2050 | $this->add_render_attribute( |
| 2051 | 'title_lottie', |
| 2052 | array( |
| 2053 | 'class' => array( |
| 2054 | 'premium-title-icon', |
| 2055 | 'premium-lottie-animation', |
| 2056 | ), |
| 2057 | 'data-lottie-url' => $settings['lottie_url'], |
| 2058 | 'data-lottie-loop' => $settings['lottie_loop'], |
| 2059 | 'data-lottie-reverse' => $settings['lottie_reverse'], |
| 2060 | ) |
| 2061 | ); |
| 2062 | } else { |
| 2063 | |
| 2064 | $src = $settings['image_upload']['url']; |
| 2065 | |
| 2066 | $alt = Control_Media::get_image_alt( $settings['image_upload'] ); |
| 2067 | |
| 2068 | $this->add_render_attribute( |
| 2069 | 'title_img', |
| 2070 | array( |
| 2071 | 'class' => 'premium-title-icon', |
| 2072 | 'src' => $src, |
| 2073 | 'alt' => $alt, |
| 2074 | ) |
| 2075 | ); |
| 2076 | } |
| 2077 | } |
| 2078 | |
| 2079 | if ( 'yes' === $settings['link_switcher'] ) { |
| 2080 | |
| 2081 | if ( 'link' === $settings['link_selection'] ) { |
| 2082 | |
| 2083 | $this->add_render_attribute( 'link', 'href', get_permalink( $settings['existing_link'] ) ); |
| 2084 | |
| 2085 | } else { |
| 2086 | |
| 2087 | $this->add_link_attributes( 'link', $settings['custom_link'] ); |
| 2088 | |
| 2089 | } |
| 2090 | } |
| 2091 | |
| 2092 | if ( 'yes' === $settings['background_text_switcher'] ) { |
| 2093 | $this->add_render_attribute( |
| 2094 | 'container', |
| 2095 | array( |
| 2096 | 'class' => 'premium-title-bg-text', |
| 2097 | 'data-background' => $settings['background_text'], |
| 2098 | ) |
| 2099 | ); |
| 2100 | } |
| 2101 | |
| 2102 | ?> |
| 2103 | |
| 2104 | <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'container' ) ); ?>> |
| 2105 | <<?php echo wp_kses_post( $title_tag . ' ' . $this->get_render_attribute_string( 'title' ) ); ?>> |
| 2106 | <?php if ( 'style7' === $selected_style ) : ?> |
| 2107 | <?php if ( 'column' !== $icon_position ) : ?> |
| 2108 | <span class="premium-title-style7-stripe-wrap"> |
| 2109 | <span class="premium-title-style7-stripe"></span> |
| 2110 | </span> |
| 2111 | <?php endif; ?> |
| 2112 | <div class="premium-title-style7-inner"> |
| 2113 | <?php endif; ?> |
| 2114 | |
| 2115 | <?php if ( 'yes' === $settings['premium_title_icon_switcher'] ) : ?> |
| 2116 | <?php if ( 'icon' === $icon_type ) : ?> |
| 2117 | <?php |
| 2118 | if ( 'yes' !== $settings['draw_svg'] ) : |
| 2119 | Icons_Manager::render_icon( |
| 2120 | $settings['premium_title_icon_updated'], |
| 2121 | array( |
| 2122 | 'class' => array( 'premium-title-icon', 'premium-svg-nodraw', 'premium-drawable-icon' ), |
| 2123 | 'aria-hidden' => 'true', |
| 2124 | ) |
| 2125 | ); |
| 2126 | else : |
| 2127 | |
| 2128 | echo Helper_Functions::get_svg_by_icon( |
| 2129 | $settings['premium_title_icon_updated'], |
| 2130 | $this->get_render_attribute_string( 'icon' ) |
| 2131 | ); |
| 2132 | |
| 2133 | endif; |
| 2134 | ?> |
| 2135 | |
| 2136 | <?php elseif ( 'svg' === $icon_type ) : ?> |
| 2137 | <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>> |
| 2138 | <?php $this->print_unescaped_setting( 'custom_svg' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 2139 | </div> |
| 2140 | <?php elseif ( 'animation' === $icon_type ) : ?> |
| 2141 | <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_lottie' ) ); ?>></div> |
| 2142 | <?php else : ?> |
| 2143 | <?php if ( 'yes' === $settings['mask_switcher'] ) : ?> |
| 2144 | <span class="premium-title-img"> |
| 2145 | <?php endif; ?> |
| 2146 | <img <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_img' ) ); ?>> |
| 2147 | <?php if ( 'yes' === $settings['mask_switcher'] ) : ?> |
| 2148 | </span> |
| 2149 | <?php endif; ?> |
| 2150 | <?php endif; ?> |
| 2151 | <?php endif; ?> |
| 2152 | |
| 2153 | <?php if ( 'style7' === $selected_style ) : ?> |
| 2154 | <?php if ( 'column' === $icon_position ) : ?> |
| 2155 | <span class="premium-title-style7-stripe-wrap"> |
| 2156 | <span class="premium-title-style7-stripe"></span> |
| 2157 | </span> |
| 2158 | <?php endif; ?> |
| 2159 | <?php endif; ?> |
| 2160 | <?php if ( 'style9' !== $selected_style ) : ?> |
| 2161 | <span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_title_text' ) ); ?> > |
| 2162 | <?php echo wp_kses_post( $settings['premium_title_text'] ); ?> |
| 2163 | </span> |
| 2164 | <?php |
| 2165 | else : |
| 2166 | $letters_html = '<span class="premium-letters-container"' . $this->get_render_attribute_string( 'premium_title_text' ) . '>'; |
| 2167 | $title_array = preg_split( '//u', $settings['premium_title_text'], -1, PREG_SPLIT_NO_EMPTY ); |
| 2168 | foreach ( $title_array as $key => $letter ) : |
| 2169 | $key = $key++; |
| 2170 | $letters_html .= '<span class="premium-title-style9-letter" data-letter-index="' . esc_attr( $key + 1 ) . '" data-letter="' . esc_attr( $letter ) . '">' . $letter . '</span>'; |
| 2171 | endforeach; |
| 2172 | $the_title = $letters_html . '</span>'; |
| 2173 | echo wp_kses_post( $the_title ); |
| 2174 | ?> |
| 2175 | <?php endif; ?> |
| 2176 | |
| 2177 | <?php if ( 'style7' === $selected_style ) : ?> |
| 2178 | </div> |
| 2179 | <?php endif; ?> |
| 2180 | <?php if ( 'yes' === $settings['link_switcher'] ) : ?> |
| 2181 | <a <?php echo wp_kses_post( $this->get_render_attribute_string( 'link' ) ); ?>></a> |
| 2182 | <?php endif; ?> |
| 2183 | </<?php echo wp_kses_post( $title_tag ); ?>> |
| 2184 | </div> |
| 2185 | |
| 2186 | <?php |
| 2187 | } |
| 2188 | |
| 2189 | /** |
| 2190 | * Render Title widget output in the editor. |
| 2191 | * |
| 2192 | * Written as a Backbone JavaScript template and used to generate the live preview. |
| 2193 | * |
| 2194 | * @since 1.0.0 |
| 2195 | * @access protected |
| 2196 | */ |
| 2197 | protected function content_template() {} |
| 2198 | } |
| 2199 |