theme-elements
2 years ago
accordion.php
4 years ago
audio.php
4 years ago
before-after.php
3 years ago
button.php
4 years ago
carousel-navigation.php
4 years ago
circle-chart.php
3 years ago
contact-box.php
4 years ago
contact-form.php
4 years ago
custom-list.php
4 years ago
divider.php
4 years ago
gallery.php
2 years ago
gmap.php
4 years ago
heading-modern.php
3 years ago
icon.php
3 years ago
image.php
4 years ago
mailchimp.php
4 years ago
modern-button.php
4 years ago
products-grid.php
3 years ago
quote.php
4 years ago
recent-comments.php
3 years ago
recent-posts-grid-carousel.php
4 years ago
recent-posts-land-style.php
4 years ago
recent-posts-masonry.php
4 years ago
recent-posts-tiles-carousel.php
4 years ago
recent-posts-tiles.php
4 years ago
recent-posts-timeline.php
4 years ago
recent-products.php
4 years ago
responsive-table.php
3 years ago
search.php
4 years ago
staff.php
4 years ago
svg.php
3 years ago
tabs.php
3 years ago
testimonial.php
4 years ago
text.php
4 years ago
touch-slider.php
4 years ago
video.php
4 years ago
text.php
1690 lines
| 1 | <?php |
| 2 | namespace Auxin\Plugin\CoreElements\Elementor\Elements; |
| 3 | |
| 4 | use Elementor\Plugin; |
| 5 | use Elementor\Widget_Base; |
| 6 | use Elementor\Controls_Manager; |
| 7 | use Elementor\Group_Control_Image_Size; |
| 8 | use Elementor\Group_Control_Typography; |
| 9 | use Elementor\Group_Control_Text_Stroke; |
| 10 | use Elementor\Core\Schemes\Typography; |
| 11 | use Elementor\Group_Control_Border; |
| 12 | use Elementor\Group_Control_Box_Shadow; |
| 13 | use Elementor\Group_Control_Text_Shadow; |
| 14 | use Elementor\Group_Control_Background; |
| 15 | |
| 16 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | exit; // Exit if accessed directly. |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Elementor 'RecentProducts' widget. |
| 22 | * |
| 23 | * Elementor widget that displays an 'RecentProducts' with lightbox. |
| 24 | * |
| 25 | * @since 1.0.0 |
| 26 | */ |
| 27 | class Text extends Widget_Base { |
| 28 | |
| 29 | /** |
| 30 | * Get widget name. |
| 31 | * |
| 32 | * Retrieve 'RecentProducts' widget name. |
| 33 | * |
| 34 | * @since 1.0.0 |
| 35 | * @access public |
| 36 | * |
| 37 | * @return string Widget name. |
| 38 | */ |
| 39 | public function get_name() { |
| 40 | return 'aux_text'; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Get widget title. |
| 45 | * |
| 46 | * Retrieve 'RecentProducts' widget title. |
| 47 | * |
| 48 | * @since 1.0.0 |
| 49 | * @access public |
| 50 | * |
| 51 | * @return string Widget title. |
| 52 | */ |
| 53 | public function get_title() { |
| 54 | return __('Info Box', 'auxin-elements' ); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Get widget icon. |
| 59 | * |
| 60 | * Retrieve 'RecentProducts' widget icon. |
| 61 | * |
| 62 | * @since 1.0.0 |
| 63 | * @access public |
| 64 | * |
| 65 | * @return string Widget icon. |
| 66 | */ |
| 67 | public function get_icon() { |
| 68 | return 'eicon-info-box auxin-badge'; |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Get widget categories. |
| 73 | * |
| 74 | * Retrieve 'RecentProducts' widget icon. |
| 75 | * |
| 76 | * @since 1.0.0 |
| 77 | * @access public |
| 78 | * |
| 79 | * @return string Widget icon. |
| 80 | */ |
| 81 | public function get_categories() { |
| 82 | return array( 'auxin-core' ); |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Register 'RecentProducts' widget controls. |
| 87 | * |
| 88 | * Adds different input fields to allow the user to change and customize the widget settings. |
| 89 | * |
| 90 | * @since 1.0.0 |
| 91 | * @access protected |
| 92 | */ |
| 93 | protected function register_controls() { |
| 94 | |
| 95 | /*-----------------------------------------------------------------------------------*/ |
| 96 | /* Content TAB |
| 97 | /*-----------------------------------------------------------------------------------*/ |
| 98 | |
| 99 | /* header_section |
| 100 | /*-------------------------------------*/ |
| 101 | |
| 102 | $this->start_controls_section( |
| 103 | 'header_section', |
| 104 | array( |
| 105 | 'label' => __( 'Header', 'auxin-elements' ), |
| 106 | ) |
| 107 | ); |
| 108 | |
| 109 | $this->add_control( |
| 110 | 'icon_or_image', |
| 111 | array( |
| 112 | 'label' => __( 'Type', 'auxin-elements' ), |
| 113 | 'type' => Controls_Manager::SELECT, |
| 114 | 'default' => 'icon', |
| 115 | 'options' => array( |
| 116 | 'none' => __( 'None' , 'auxin-elements' ), |
| 117 | 'icon' => __( 'Icon' , 'auxin-elements' ), |
| 118 | 'image' => __( 'Image' , 'auxin-elements' ), |
| 119 | 'inline-svg' => __( 'Inline SVG' , 'auxin-elements' ) |
| 120 | ) |
| 121 | ) |
| 122 | ); |
| 123 | |
| 124 | $this->add_control( |
| 125 | 'aux_text_icon', |
| 126 | array( |
| 127 | 'label' => __('Icon','auxin-elements' ), |
| 128 | 'label_block' => true, |
| 129 | 'description' => __('Please choose an icon from the list.', 'auxin-elements'), |
| 130 | 'type' => Controls_Manager::ICONS, |
| 131 | 'condition' => array( |
| 132 | 'icon_or_image' => array('icon') |
| 133 | ) |
| 134 | ) |
| 135 | ); |
| 136 | |
| 137 | $this->add_control( |
| 138 | 'image', |
| 139 | array( |
| 140 | 'label' => __('Image','auxin-elements' ), |
| 141 | 'type' => Controls_Manager::MEDIA, |
| 142 | 'condition' => array( |
| 143 | 'icon_or_image' => array('image') |
| 144 | ) |
| 145 | ) |
| 146 | ); |
| 147 | |
| 148 | $this->add_group_control( |
| 149 | Group_Control_Image_Size::get_type(), |
| 150 | array( |
| 151 | 'name' => 'image', // Usage: `{name}_size` and `{name}_custom_dimension`, in this case `thumbnail_size` and `thumbnail_custom_dimension`. |
| 152 | 'separator' => 'none', |
| 153 | 'default' => 'full', |
| 154 | 'condition' => array( |
| 155 | 'icon_or_image' => array('image') |
| 156 | ) |
| 157 | ) |
| 158 | ); |
| 159 | |
| 160 | $this->add_control( |
| 161 | 'preloadable', |
| 162 | array( |
| 163 | 'label' => __('Preload image','auxin-elements' ), |
| 164 | 'type' => Controls_Manager::SWITCHER, |
| 165 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 166 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 167 | 'return_value' => 'yes', |
| 168 | 'default' => 'no', |
| 169 | 'condition' => array( |
| 170 | 'icon_or_image' => array('image') |
| 171 | ) |
| 172 | ) |
| 173 | ); |
| 174 | |
| 175 | $this->add_control( |
| 176 | 'preload_preview', |
| 177 | array( |
| 178 | 'label' => __('While loading image display','auxin-elements' ), |
| 179 | 'label_block' => true, |
| 180 | 'type' => Controls_Manager::SELECT, |
| 181 | 'options' => auxin_get_preloadable_previews(), |
| 182 | 'return_value' => 'yes', |
| 183 | 'default' => 'yes', |
| 184 | 'condition' => array( |
| 185 | 'icon_or_image' => array('image'), |
| 186 | 'preloadable' => 'yes' |
| 187 | ) |
| 188 | ) |
| 189 | ); |
| 190 | |
| 191 | $this->add_control( |
| 192 | 'preload_bgcolor', |
| 193 | array( |
| 194 | 'label' => __( 'Placeholder color while loading image', 'auxin-elements' ), |
| 195 | 'type' => Controls_Manager::COLOR, |
| 196 | 'condition' => array( |
| 197 | 'icon_or_image' => array('image'), |
| 198 | 'preloadable' => 'yes', |
| 199 | 'preload_preview' => array('no', 'simple-spinner', 'simple-spinner-light', 'simple-spinner-dark') |
| 200 | ) |
| 201 | ) |
| 202 | ); |
| 203 | |
| 204 | $this->add_control( |
| 205 | 'svg_inline', |
| 206 | array( |
| 207 | 'label' => '', |
| 208 | 'type' => Controls_Manager::CODE, |
| 209 | 'default' => '', |
| 210 | 'placeholder' => __( 'Enter inline SVG content here', 'auxin-elements' ), |
| 211 | 'show_label' => false, |
| 212 | 'condition' => array( |
| 213 | 'icon_or_image' => 'inline-svg' |
| 214 | ) |
| 215 | ) |
| 216 | ); |
| 217 | |
| 218 | $this->end_controls_section(); |
| 219 | |
| 220 | /* content_section |
| 221 | /*-------------------------------------*/ |
| 222 | |
| 223 | $this->start_controls_section( |
| 224 | 'content_section', |
| 225 | array( |
| 226 | 'label' => __('Content', 'auxin-elements' ), |
| 227 | ) |
| 228 | ); |
| 229 | |
| 230 | $this->add_control( |
| 231 | 'title', |
| 232 | array( |
| 233 | 'label' => __('Title','auxin-elements' ), |
| 234 | 'description' => __('Text title, leave it empty if you don`t need title.', 'auxin-elements'), |
| 235 | 'type' => Controls_Manager::TEXT, |
| 236 | 'default' => 'Great Idea' |
| 237 | ) |
| 238 | ); |
| 239 | |
| 240 | $this->add_control( |
| 241 | 'subtitle', |
| 242 | array( |
| 243 | 'label' => __('Subtitle','auxin-elements' ), |
| 244 | 'type' => Controls_Manager::TEXT |
| 245 | ) |
| 246 | ); |
| 247 | |
| 248 | $this->add_control( |
| 249 | 'title_link', |
| 250 | array( |
| 251 | 'label' => __('Title Link','auxin-elements' ), |
| 252 | 'type' => Controls_Manager::URL, |
| 253 | 'placeholder' => 'http://phlox.pro', |
| 254 | 'show_external' => false, |
| 255 | 'dynamic' => [ |
| 256 | 'active' => true |
| 257 | ] |
| 258 | ) |
| 259 | ); |
| 260 | |
| 261 | $this->add_control( |
| 262 | 'content', |
| 263 | array( |
| 264 | 'label' => __('Content','auxin-elements' ), |
| 265 | 'description' => __('Enter a text as a text content.', 'auxin-elements'), |
| 266 | 'type' => Controls_Manager::WYSIWYG, |
| 267 | 'default' => 'NVestibulum rutum, mi nec elementum vehicula, eros quam gravida nisl, id fringilla neque ante.' |
| 268 | ) |
| 269 | ); |
| 270 | |
| 271 | $this->end_controls_section(); |
| 272 | |
| 273 | /* button_section |
| 274 | /*-------------------------------------*/ |
| 275 | |
| 276 | $this->start_controls_section( |
| 277 | 'button_section', |
| 278 | array( |
| 279 | 'label' => __('Button', 'auxin-elements' ), |
| 280 | ) |
| 281 | ); |
| 282 | |
| 283 | $this->add_control( |
| 284 | 'display_button', |
| 285 | array( |
| 286 | 'label' => __('Display button','auxin-elements' ), |
| 287 | 'description' => __('Display a button in text widget', 'auxin-elements' ), |
| 288 | 'type' => Controls_Manager::SWITCHER, |
| 289 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 290 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 291 | 'return_value' => 'yes', |
| 292 | 'default' => 'yes' |
| 293 | ) |
| 294 | ); |
| 295 | |
| 296 | $this->add_control( |
| 297 | 'btn_label', |
| 298 | array( |
| 299 | 'label' => __('Button label','auxin-elements' ), |
| 300 | 'type' => Controls_Manager::TEXT, |
| 301 | 'default' => __( 'Read More', 'auxin-elements' ), |
| 302 | 'condition' => array( |
| 303 | 'display_button' => 'yes', |
| 304 | ) |
| 305 | ) |
| 306 | ); |
| 307 | |
| 308 | $this->add_control( |
| 309 | 'aux_text_btn_icon', |
| 310 | array( |
| 311 | 'label' => __('Icon for button','auxin-elements' ), |
| 312 | 'type' => Controls_Manager::ICONS, |
| 313 | 'condition' => array( |
| 314 | 'display_button' => 'yes', |
| 315 | ) |
| 316 | ) |
| 317 | ); |
| 318 | |
| 319 | $this->add_control( |
| 320 | 'btn_link', |
| 321 | array( |
| 322 | 'label' => __('Link','auxin-elements' ), |
| 323 | 'description' => __('If you want to link your button.', 'auxin-elements' ), |
| 324 | 'type' => Controls_Manager::URL, |
| 325 | 'placeholder' => 'http://phlox.pro', |
| 326 | 'show_external' => true, |
| 327 | 'condition' => [ |
| 328 | 'display_button' => 'yes', |
| 329 | ], |
| 330 | 'dynamic' => [ |
| 331 | 'active' => true |
| 332 | ] |
| 333 | ) |
| 334 | ); |
| 335 | |
| 336 | $this->end_controls_section(); |
| 337 | |
| 338 | /*-----------------------------------------------------------------------------------*/ |
| 339 | /* Style TAB |
| 340 | /*-----------------------------------------------------------------------------------*/ |
| 341 | |
| 342 | /* header_style_section |
| 343 | /*-------------------------------------*/ |
| 344 | |
| 345 | $this->start_controls_section( |
| 346 | 'header_style_section', |
| 347 | array( |
| 348 | 'label' => __('Header', 'auxin-elements' ), |
| 349 | 'tab' => Controls_Manager::TAB_STYLE, |
| 350 | 'condition' => array( |
| 351 | 'icon_or_image' => array( 'icon', 'image', 'inline-svg' ) |
| 352 | ) |
| 353 | ) |
| 354 | ); |
| 355 | |
| 356 | $this->add_control( |
| 357 | 'image_position', |
| 358 | array( |
| 359 | 'label' => __('Header Position','auxin-elements'), |
| 360 | 'type' => 'aux-visual-select', |
| 361 | 'style_items' => 'max-width:30%;', |
| 362 | 'options' => array( |
| 363 | 'top' => array( |
| 364 | 'label' => __('Top', 'auxin-elements'), |
| 365 | 'image' => AUXIN_URL . 'images/visual-select/column-icon-top.svg' |
| 366 | ), |
| 367 | 'left' => array( |
| 368 | 'label' => __('Left', 'auxin-elements'), |
| 369 | 'image' => AUXIN_URL . 'images/visual-select/column-icon-left.svg' |
| 370 | ), |
| 371 | 'right' => array( |
| 372 | 'label' => __('Right', 'auxin-elements'), |
| 373 | 'image' => AUXIN_URL . 'images/visual-select/column-icon-right.svg' |
| 374 | ) |
| 375 | ), |
| 376 | 'default' => 'top' |
| 377 | ) |
| 378 | ); |
| 379 | |
| 380 | $this->add_group_control( |
| 381 | Group_Control_Background::get_type(), |
| 382 | array( |
| 383 | 'name' => 'header_background', |
| 384 | 'label' => __( 'Background', 'auxin-elements' ), |
| 385 | 'types' => array( 'classic', 'gradient' ), |
| 386 | 'selector' => '{{WRAPPER}} .aux-text-widget-header' |
| 387 | ) |
| 388 | ); |
| 389 | |
| 390 | $this->add_responsive_control( |
| 391 | 'header_padding', |
| 392 | array( |
| 393 | 'label' => __( 'Padding', 'auxin-elements' ), |
| 394 | 'type' => Controls_Manager::DIMENSIONS, |
| 395 | 'size_units' => array( 'px', '%' ), |
| 396 | 'selectors' => array( |
| 397 | '{{WRAPPER}} .aux-widget-text .aux-text-widget-header' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 398 | ) |
| 399 | ) |
| 400 | ); |
| 401 | |
| 402 | $this->end_controls_section(); |
| 403 | |
| 404 | /* icon_image_style_section |
| 405 | /*-------------------------------------*/ |
| 406 | |
| 407 | $this->start_controls_section( |
| 408 | 'icon_image_style_section', |
| 409 | array( |
| 410 | 'label' => __('Icon/Image', 'auxin-elements' ), |
| 411 | 'tab' => Controls_Manager::TAB_STYLE, |
| 412 | 'condition' => array( |
| 413 | 'icon_or_image' => array( 'icon', 'image', 'inline-svg' ) |
| 414 | ) |
| 415 | ) |
| 416 | ); |
| 417 | |
| 418 | $this->add_group_control( |
| 419 | Group_Control_Border::get_type(), |
| 420 | array( |
| 421 | 'name' => 'icon_border', |
| 422 | 'label' => __( 'Border', 'auxin-elements' ), |
| 423 | 'selector' => '{{WRAPPER}} .aux-ico-box', |
| 424 | ) |
| 425 | ); |
| 426 | |
| 427 | $this->add_responsive_control( |
| 428 | 'icon_size', |
| 429 | array( |
| 430 | 'label' => __( 'Icon Size', 'auxin-elements' ), |
| 431 | 'type' => Controls_Manager::SLIDER, |
| 432 | 'size_units' => array( 'px', '%' ), |
| 433 | 'range' => array( |
| 434 | 'px' => array( |
| 435 | 'min' => 16, |
| 436 | 'max' => 512, |
| 437 | 'step' => 2, |
| 438 | ), |
| 439 | '%' => array( |
| 440 | 'min' => 0, |
| 441 | 'max' => 100, |
| 442 | ), |
| 443 | ), |
| 444 | 'selectors' => array( |
| 445 | '{{WRAPPER}} .aux-ico' => 'font-size: {{SIZE}}{{UNIT}};', |
| 446 | ), |
| 447 | 'condition' => array( |
| 448 | 'icon_or_image' => array('icon') |
| 449 | ) |
| 450 | ) |
| 451 | ); |
| 452 | |
| 453 | $this->add_control( |
| 454 | 'icon_shape', |
| 455 | array( |
| 456 | 'label' => __('Icon background shape','auxin-elements'), |
| 457 | 'style_items' => 'max-width:30%;', |
| 458 | 'type' => 'aux-visual-select', |
| 459 | 'options' => array( |
| 460 | 'circle' => array( |
| 461 | 'label' => __('Circle', 'auxin-elements'), |
| 462 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-circle.svg' |
| 463 | ), |
| 464 | 'semi-circle' => array( |
| 465 | 'label' => __('Semi-circle', 'auxin-elements'), |
| 466 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-semi-circle.svg' |
| 467 | ), |
| 468 | 'round-rect' => array( |
| 469 | 'label' => __('Round Rectangle', 'auxin-elements'), |
| 470 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-round-rectangle.svg' |
| 471 | ), |
| 472 | 'cross-rect' => array( |
| 473 | 'label' => __('Cross Rectangle', 'auxin-elements'), |
| 474 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-cross-rectangle.svg' |
| 475 | ), |
| 476 | 'rect' => array( |
| 477 | 'label' => __('Rectangle', 'auxin-elements'), |
| 478 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg' |
| 479 | ) |
| 480 | ), |
| 481 | 'default' => 'circle', |
| 482 | 'condition' => array( |
| 483 | 'icon_or_image' => array('icon') |
| 484 | ) |
| 485 | ) |
| 486 | ); |
| 487 | |
| 488 | $this->add_responsive_control( |
| 489 | 'icon_padding', |
| 490 | array( |
| 491 | 'label' => __( 'Padding', 'auxin-elements' ), |
| 492 | 'type' => Controls_Manager::DIMENSIONS, |
| 493 | 'size_units' => array( 'px', '%' ), |
| 494 | 'selectors' => array( |
| 495 | '{{WRAPPER}} .aux-ico-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 496 | ), |
| 497 | 'condition' => array( |
| 498 | 'icon_or_image' => array('icon') |
| 499 | ) |
| 500 | ) |
| 501 | ); |
| 502 | |
| 503 | $this->start_controls_tabs( 'icon_style_tabs' ); |
| 504 | |
| 505 | $this->start_controls_tab( |
| 506 | 'icon_style_normal', |
| 507 | array( |
| 508 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 509 | ) |
| 510 | ); |
| 511 | |
| 512 | |
| 513 | $this->add_group_control( |
| 514 | Group_Control_Box_Shadow::get_type(), |
| 515 | array( |
| 516 | 'name' => 'header_box_shadow', |
| 517 | 'selector' => '{{WRAPPER}} .aux-ico-box' |
| 518 | ) |
| 519 | ); |
| 520 | |
| 521 | $this->add_control( |
| 522 | 'icon_color', |
| 523 | array( |
| 524 | 'label' => __('Icon color', 'auxin-elements'), |
| 525 | 'type' => Controls_Manager::COLOR, |
| 526 | 'default' => '#ffffff', |
| 527 | 'selectors' => array( |
| 528 | '{{WRAPPER}} .aux-ico-box' => 'color:{{VALUE}};', |
| 529 | ), |
| 530 | 'condition' => array( |
| 531 | 'icon_or_image' => array('icon') |
| 532 | ) |
| 533 | ) |
| 534 | ); |
| 535 | |
| 536 | $this->add_control( |
| 537 | 'icon_bg_color', |
| 538 | array( |
| 539 | 'label' => __('Icon background color','auxin-elements' ), |
| 540 | 'type' => Controls_Manager::COLOR, |
| 541 | 'default' => '', |
| 542 | 'selectors' => array( |
| 543 | '{{WRAPPER}} .aux-ico-box' => 'background-color:{{VALUE}};', |
| 544 | ), |
| 545 | 'condition' => array( |
| 546 | 'icon_or_image' => array('icon') |
| 547 | ) |
| 548 | ) |
| 549 | ); |
| 550 | |
| 551 | $this->add_group_control( |
| 552 | Group_Control_Background::get_type(), |
| 553 | array( |
| 554 | 'name' => 'icon_background_normal', |
| 555 | 'label' => __( 'Background', 'auxin-elements' ), |
| 556 | 'types' => array( 'gradient' ), |
| 557 | 'selector' => '{{WRAPPER}} .aux-ico-box' |
| 558 | ) |
| 559 | ); |
| 560 | |
| 561 | |
| 562 | $this->end_controls_tab(); |
| 563 | |
| 564 | $this->start_controls_tab( |
| 565 | 'icon_style_hover', |
| 566 | array( |
| 567 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 568 | ) |
| 569 | ); |
| 570 | |
| 571 | |
| 572 | $this->add_group_control( |
| 573 | Group_Control_Box_Shadow::get_type(), |
| 574 | array( |
| 575 | 'name' => 'header_box_shadow_hover', |
| 576 | 'selector' => '{{WRAPPER}}:hover .aux-ico-box' |
| 577 | ) |
| 578 | ); |
| 579 | |
| 580 | $this->add_control( |
| 581 | 'icon_color_hover', |
| 582 | array( |
| 583 | 'label' => __('Icon color', 'auxin-elements'), |
| 584 | 'type' => Controls_Manager::COLOR, |
| 585 | 'default' => '', |
| 586 | 'selectors' => array( |
| 587 | '{{WRAPPER}}:hover .aux-ico-box' => 'color:{{VALUE}} !important;', |
| 588 | ), |
| 589 | 'condition' => array( |
| 590 | 'icon_or_image' => ['icon'] |
| 591 | ) |
| 592 | ) |
| 593 | ); |
| 594 | |
| 595 | $this->add_control( |
| 596 | 'icon_bg_color_hover', |
| 597 | array( |
| 598 | 'label' => __('Icon background color','auxin-elements' ), |
| 599 | 'type' => Controls_Manager::COLOR, |
| 600 | 'default' => '', |
| 601 | 'selectors' => array( |
| 602 | '{{WRAPPER}}:hover .aux-ico-box' => 'background-color:{{VALUE}} !important;', |
| 603 | ), |
| 604 | 'condition' => array( |
| 605 | 'icon_or_image' => ['icon'] |
| 606 | ) |
| 607 | ) |
| 608 | ); |
| 609 | |
| 610 | $this->add_group_control( |
| 611 | Group_Control_Background::get_type(), |
| 612 | array( |
| 613 | 'name' => 'icon_background_hover', |
| 614 | 'label' => __( 'Background', 'auxin-elements' ), |
| 615 | 'types' => array( 'gradient' ), |
| 616 | 'selector' => '{{WRAPPER}}:hover .aux-ico-box' |
| 617 | ) |
| 618 | ); |
| 619 | |
| 620 | $this->add_control( |
| 621 | 'icon_transition', |
| 622 | array( |
| 623 | 'label' => __( 'Transition duration', 'auxin-elements' ), |
| 624 | 'type' => Controls_Manager::SLIDER, |
| 625 | 'range' => array( |
| 626 | 'px' => array( |
| 627 | 'min' => 0, |
| 628 | 'max' => 2000, |
| 629 | 'step' => 50 |
| 630 | ) |
| 631 | ), |
| 632 | 'selectors' => array( |
| 633 | '{{WRAPPER}} .aux-ico-box' => 'transition:all {{SIZE}}ms ease;' |
| 634 | ), |
| 635 | 'condition' => array( |
| 636 | 'icon_or_image' => ['icon'] |
| 637 | ) |
| 638 | ) |
| 639 | ); |
| 640 | |
| 641 | $this->end_controls_tab(); |
| 642 | |
| 643 | $this->end_controls_tabs(); |
| 644 | |
| 645 | $this->add_control( |
| 646 | 'img_shape', |
| 647 | array( |
| 648 | 'label' => __('Image shape','auxin-elements'), |
| 649 | 'type' => 'aux-visual-select', |
| 650 | 'options' => array( |
| 651 | 'default' => array( |
| 652 | 'label' => __('Default Aspect', 'auxin-elements'), |
| 653 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg' |
| 654 | ), |
| 655 | 'circle' => array( |
| 656 | 'label' => __('Circle', 'auxin-elements'), |
| 657 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-circle.svg' |
| 658 | ), |
| 659 | 'semi-circle' => array( |
| 660 | 'label' => __('Semi-circle', 'auxin-elements'), |
| 661 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-semi-circle.svg' |
| 662 | ), |
| 663 | 'round-rect' => array( |
| 664 | 'label' => __('Round Rectangle', 'auxin-elements'), |
| 665 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-round-rectangle.svg' |
| 666 | ), |
| 667 | 'rect' => array( |
| 668 | 'label' => __('Rectangle', 'auxin-elements'), |
| 669 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg' |
| 670 | ), |
| 671 | ), |
| 672 | 'default' => 'default', |
| 673 | 'condition' => array( |
| 674 | 'icon_or_image' => array('image') |
| 675 | ) |
| 676 | ) |
| 677 | ); |
| 678 | |
| 679 | $this->end_controls_section(); |
| 680 | |
| 681 | /* title_style_section |
| 682 | /*-------------------------------------*/ |
| 683 | |
| 684 | $this->start_controls_section( |
| 685 | 'title_style_section', |
| 686 | array( |
| 687 | 'label' => __( 'Title', 'auxin-elements' ), |
| 688 | 'tab' => Controls_Manager::TAB_STYLE, |
| 689 | 'condition' => array( |
| 690 | 'title!' => '' |
| 691 | ) |
| 692 | ) |
| 693 | ); |
| 694 | |
| 695 | $this->start_controls_tabs( 'title_colors' ); |
| 696 | |
| 697 | $this->start_controls_tab( |
| 698 | 'title_color_normal', |
| 699 | array( |
| 700 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 701 | ) |
| 702 | ); |
| 703 | |
| 704 | $this->add_control( |
| 705 | 'title_color', |
| 706 | array( |
| 707 | 'label' => __( 'Color', 'auxin-elements' ), |
| 708 | 'type' => Controls_Manager::COLOR, |
| 709 | 'selectors' => array( |
| 710 | '{{WRAPPER}} .col-title a, {{WRAPPER}} .col-title' => 'color: {{VALUE}} !important;', |
| 711 | ) |
| 712 | ) |
| 713 | ); |
| 714 | |
| 715 | $this->end_controls_tab(); |
| 716 | |
| 717 | $this->start_controls_tab( |
| 718 | 'title_color_hover', |
| 719 | array( |
| 720 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 721 | ) |
| 722 | ); |
| 723 | |
| 724 | $this->add_control( |
| 725 | 'title_hover_color', |
| 726 | array( |
| 727 | 'label' => __( 'Color', 'auxin-elements' ), |
| 728 | 'type' => Controls_Manager::COLOR, |
| 729 | 'selectors' => array( |
| 730 | '{{WRAPPER}}:hover .col-title a, {{WRAPPER}}:hover .col-title' => 'color: {{VALUE}} !important;' |
| 731 | ) |
| 732 | ) |
| 733 | ); |
| 734 | |
| 735 | $this->end_controls_tab(); |
| 736 | |
| 737 | $this->end_controls_tabs(); |
| 738 | |
| 739 | if ( class_exists( 'Elementor\Group_Control_Text_Stroke' ) ) { |
| 740 | $this->add_group_control( |
| 741 | Group_Control_Text_Stroke::get_type(), |
| 742 | [ |
| 743 | 'name' => 'title_stroke', |
| 744 | 'selector' => '{{WRAPPER}} .col-title a, {{WRAPPER}} .col-title' |
| 745 | ] |
| 746 | ); |
| 747 | } |
| 748 | |
| 749 | $this->add_group_control( |
| 750 | Group_Control_Typography::get_type(), |
| 751 | array( |
| 752 | 'name' => 'title_typography', |
| 753 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 754 | 'selector' => '{{WRAPPER}} .col-title, {{WRAPPER}} .col-title a' |
| 755 | ) |
| 756 | ); |
| 757 | |
| 758 | $this->add_group_control( |
| 759 | Group_Control_Text_Shadow::get_type(), |
| 760 | array( |
| 761 | 'name' => 'title_shadow', |
| 762 | 'label' => __( 'Text Shadow', 'auxin-elements' ), |
| 763 | 'selector' => '{{WRAPPER}} .col-title' |
| 764 | ) |
| 765 | ); |
| 766 | |
| 767 | $this->add_responsive_control( |
| 768 | 'title_margin_bottom', |
| 769 | array( |
| 770 | 'label' => __( 'Bottom space', 'auxin-elements' ), |
| 771 | 'type' => Controls_Manager::SLIDER, |
| 772 | 'range' => array( |
| 773 | 'px' => array( |
| 774 | 'min' => -200, |
| 775 | 'max' => 200 |
| 776 | ) |
| 777 | ), |
| 778 | 'selectors' => array( |
| 779 | '{{WRAPPER}} .col-title' => 'margin-bottom: {{SIZE}}{{UNIT}};' |
| 780 | ) |
| 781 | ) |
| 782 | ); |
| 783 | |
| 784 | $this->end_controls_section(); |
| 785 | |
| 786 | /* subtitle_style_section |
| 787 | /*-------------------------------------*/ |
| 788 | |
| 789 | $this->start_controls_section( |
| 790 | 'subtitle_style_section', |
| 791 | array( |
| 792 | 'label' => __( 'Subtitle', 'auxin-elements' ), |
| 793 | 'tab' => Controls_Manager::TAB_STYLE, |
| 794 | 'condition' => array( |
| 795 | 'subtitle!' => '' |
| 796 | ) |
| 797 | ) |
| 798 | ); |
| 799 | |
| 800 | $this->start_controls_tabs( 'subtitle_colors' ); |
| 801 | |
| 802 | $this->start_controls_tab( |
| 803 | 'subtitle_color_normal', |
| 804 | array( |
| 805 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 806 | ) |
| 807 | ); |
| 808 | |
| 809 | $this->add_control( |
| 810 | 'subtitle_color', |
| 811 | array( |
| 812 | 'label' => __( 'Color', 'auxin-elements' ), |
| 813 | 'type' => Controls_Manager::COLOR, |
| 814 | 'selectors' => array( |
| 815 | '{{WRAPPER}} .col-subtitle' => 'color: {{VALUE}} !important;', |
| 816 | ) |
| 817 | ) |
| 818 | ); |
| 819 | |
| 820 | $this->end_controls_tab(); |
| 821 | |
| 822 | $this->start_controls_tab( |
| 823 | 'subtitle_color_hover', |
| 824 | array( |
| 825 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 826 | ) |
| 827 | ); |
| 828 | |
| 829 | $this->add_control( |
| 830 | 'subtitle_hover_color', |
| 831 | array( |
| 832 | 'label' => __( 'Color', 'auxin-elements' ), |
| 833 | 'type' => Controls_Manager::COLOR, |
| 834 | 'selectors' => array( |
| 835 | '{{WRAPPER}}:hover .col-subtitle' => 'color: {{VALUE}} !important;' |
| 836 | ) |
| 837 | ) |
| 838 | ); |
| 839 | |
| 840 | $this->end_controls_tab(); |
| 841 | |
| 842 | $this->end_controls_tabs(); |
| 843 | |
| 844 | |
| 845 | $this->add_group_control( |
| 846 | Group_Control_Typography::get_type(), |
| 847 | array( |
| 848 | 'name' => 'subtitle_typography', |
| 849 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 850 | 'selector' => '{{WRAPPER}} .col-subtitle' |
| 851 | ) |
| 852 | ); |
| 853 | |
| 854 | $this->add_group_control( |
| 855 | Group_Control_Text_Shadow::get_type(), |
| 856 | array( |
| 857 | 'name' => 'subtitle_shadow', |
| 858 | 'label' => __( 'Text Shadow', 'auxin-elements' ), |
| 859 | 'selector' => '{{WRAPPER}} .col-subtitle' |
| 860 | ) |
| 861 | ); |
| 862 | |
| 863 | $this->add_responsive_control( |
| 864 | 'subtitle_margin_top', |
| 865 | array( |
| 866 | 'label' => __( 'Top space', 'auxin-elements' ), |
| 867 | 'type' => Controls_Manager::SLIDER, |
| 868 | 'range' => array( |
| 869 | 'px' => array( |
| 870 | 'min' => -200, |
| 871 | 'max' => 200 |
| 872 | ) |
| 873 | ), |
| 874 | 'selectors' => array( |
| 875 | '{{WRAPPER}} .col-subtitle' => 'margin-top: {{SIZE}}{{UNIT}};' |
| 876 | ) |
| 877 | ) |
| 878 | ); |
| 879 | |
| 880 | $this->add_responsive_control( |
| 881 | 'subtitle_margin_bottom', |
| 882 | array( |
| 883 | 'label' => __( 'Bottom space', 'auxin-elements' ), |
| 884 | 'type' => Controls_Manager::SLIDER, |
| 885 | 'range' => array( |
| 886 | 'px' => array( |
| 887 | 'min' => -200, |
| 888 | 'max' => 200 |
| 889 | ) |
| 890 | ), |
| 891 | 'selectors' => array( |
| 892 | '{{WRAPPER}} .col-subtitle' => 'margin-bottom: {{SIZE}}{{UNIT}};' |
| 893 | ) |
| 894 | ) |
| 895 | ); |
| 896 | |
| 897 | $this->end_controls_section(); |
| 898 | |
| 899 | /* content_style_section |
| 900 | /*-------------------------------------*/ |
| 901 | |
| 902 | $this->start_controls_section( |
| 903 | 'content_style_section', |
| 904 | array( |
| 905 | 'label' => __( 'Content', 'auxin-elements' ), |
| 906 | 'tab' => Controls_Manager::TAB_STYLE |
| 907 | ) |
| 908 | ); |
| 909 | |
| 910 | |
| 911 | $this->start_controls_tabs( 'content_colors' ); |
| 912 | |
| 913 | $this->start_controls_tab( |
| 914 | 'content_color_normal', |
| 915 | array( |
| 916 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 917 | ) |
| 918 | ); |
| 919 | |
| 920 | $this->add_control( |
| 921 | 'content_color', |
| 922 | array( |
| 923 | 'label' => __( 'Color', 'auxin-elements' ), |
| 924 | 'type' => Controls_Manager::COLOR, |
| 925 | 'selectors' => array( |
| 926 | '{{WRAPPER}} .widget-content' => 'color:{{VALUE}} !important;', |
| 927 | ) |
| 928 | ) |
| 929 | ); |
| 930 | |
| 931 | $this->end_controls_tab(); |
| 932 | |
| 933 | $this->start_controls_tab( |
| 934 | 'content_color_hover', |
| 935 | array( |
| 936 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 937 | ) |
| 938 | ); |
| 939 | |
| 940 | $this->add_control( |
| 941 | 'content_hover_color', |
| 942 | array( |
| 943 | 'label' => __( 'Color', 'auxin-elements' ), |
| 944 | 'type' => Controls_Manager::COLOR, |
| 945 | 'selectors' => array( |
| 946 | '{{WRAPPER}}:hover .widget-content' => 'color:{{VALUE}} !important;' |
| 947 | ) |
| 948 | ) |
| 949 | ); |
| 950 | |
| 951 | $this->end_controls_tab(); |
| 952 | |
| 953 | $this->end_controls_tabs(); |
| 954 | |
| 955 | |
| 956 | $this->add_group_control( |
| 957 | Group_Control_Typography::get_type(), |
| 958 | array( |
| 959 | 'name' => 'content_typography', |
| 960 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 961 | 'selector' => '{{WRAPPER}} .widget-content' |
| 962 | ) |
| 963 | ); |
| 964 | |
| 965 | $this->add_group_control( |
| 966 | Group_Control_Text_Shadow::get_type(), |
| 967 | array( |
| 968 | 'name' => 'content_shadow', |
| 969 | 'label' => __( 'Text Shadow', 'auxin-elements' ), |
| 970 | 'selector' => '{{WRAPPER}} .widget-content' |
| 971 | ) |
| 972 | ); |
| 973 | |
| 974 | $this->add_responsive_control( |
| 975 | 'content_padding', |
| 976 | array( |
| 977 | 'label' => __( 'Padding', 'auxin-elements' ), |
| 978 | 'type' => Controls_Manager::DIMENSIONS, |
| 979 | 'size_units' => array( 'px', '%' ), |
| 980 | 'selectors' => array( |
| 981 | '{{WRAPPER}} .aux-widget-text .aux-text-widget-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 982 | ) |
| 983 | ) |
| 984 | ); |
| 985 | |
| 986 | $this->add_responsive_control( |
| 987 | 'content_margin_top', |
| 988 | array( |
| 989 | 'label' => __( 'Top space', 'auxin-elements' ), |
| 990 | 'type' => Controls_Manager::SLIDER, |
| 991 | 'range' => array( |
| 992 | 'px' => array( |
| 993 | 'min' => -200, |
| 994 | 'max' => 200 |
| 995 | ) |
| 996 | ), |
| 997 | 'selectors' => array( |
| 998 | '{{WRAPPER}} .widget-content' => 'margin-top: {{SIZE}}{{UNIT}};' |
| 999 | ) |
| 1000 | ) |
| 1001 | ); |
| 1002 | |
| 1003 | $this->add_responsive_control( |
| 1004 | 'content_margin_bottom', |
| 1005 | array( |
| 1006 | 'label' => __( 'Bottom space', 'auxin-elements' ), |
| 1007 | 'type' => Controls_Manager::SLIDER, |
| 1008 | 'range' => array( |
| 1009 | 'px' => array( |
| 1010 | 'min' => -200, |
| 1011 | 'max' => 200 |
| 1012 | ) |
| 1013 | ), |
| 1014 | 'selectors' => array( |
| 1015 | '{{WRAPPER}} .widget-content' => 'margin-bottom: {{SIZE}}{{UNIT}};' |
| 1016 | ) |
| 1017 | ) |
| 1018 | ); |
| 1019 | |
| 1020 | $this->end_controls_section(); |
| 1021 | |
| 1022 | /* button_style_section |
| 1023 | /*-------------------------------------*/ |
| 1024 | |
| 1025 | $this->start_controls_section( |
| 1026 | 'button_style_section', |
| 1027 | array( |
| 1028 | 'label' => __('Button', 'auxin-elements' ), |
| 1029 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1030 | 'condition' => array( |
| 1031 | 'display_button' => 'yes', |
| 1032 | ) |
| 1033 | ) |
| 1034 | ); |
| 1035 | |
| 1036 | $this->add_control( |
| 1037 | 'btn_size', |
| 1038 | array( |
| 1039 | 'label' => __('Size', 'auxin-elements'), |
| 1040 | 'type' => Controls_Manager::SELECT, |
| 1041 | 'default' => 'medium', |
| 1042 | 'options' => array( |
| 1043 | 'exlarge' => __('Exlarge', 'auxin-elements' ), |
| 1044 | 'large' => __('Large' , 'auxin-elements' ), |
| 1045 | 'medium' => __('Medium' , 'auxin-elements' ), |
| 1046 | 'small' => __('Small' , 'auxin-elements' ), |
| 1047 | 'tiny' => __('Tiny' , 'auxin-elements' ) |
| 1048 | ) |
| 1049 | ) |
| 1050 | ); |
| 1051 | |
| 1052 | $this->add_control( |
| 1053 | 'button_skin_heading', |
| 1054 | array( |
| 1055 | 'label' => __( 'Button Skin', 'auxin-elements' ), |
| 1056 | 'type' => Controls_Manager::HEADING, |
| 1057 | 'separator' => 'before', |
| 1058 | ) |
| 1059 | ); |
| 1060 | |
| 1061 | $this->add_control( |
| 1062 | 'btn_color_name', |
| 1063 | array( |
| 1064 | 'label' => __('Skin', 'auxin-elements'), |
| 1065 | 'type' => 'aux-visual-select', |
| 1066 | 'default' => 'black', |
| 1067 | 'options' => auxin_get_famous_colors_list() |
| 1068 | ) |
| 1069 | ); |
| 1070 | |
| 1071 | $this->start_controls_tabs( 'button_background_tab' ); |
| 1072 | |
| 1073 | $this->start_controls_tab( |
| 1074 | 'button_bg_normal', |
| 1075 | array( |
| 1076 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 1077 | ) |
| 1078 | ); |
| 1079 | |
| 1080 | $this->add_group_control( |
| 1081 | Group_Control_Background::get_type(), |
| 1082 | array( |
| 1083 | 'name' => 'button_background', |
| 1084 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1085 | 'types' => array( 'classic', 'gradient' ), |
| 1086 | 'selector' => '{{WRAPPER}} .aux-button' |
| 1087 | ) |
| 1088 | ); |
| 1089 | |
| 1090 | $this->add_group_control( |
| 1091 | Group_Control_Box_Shadow::get_type(), |
| 1092 | array( |
| 1093 | 'name' => 'button_box_shadow', |
| 1094 | 'selector' => '{{WRAPPER}} .aux-button' |
| 1095 | ) |
| 1096 | ); |
| 1097 | |
| 1098 | $this->end_controls_tab(); |
| 1099 | |
| 1100 | $this->start_controls_tab( |
| 1101 | 'button_bg_hover', |
| 1102 | array( |
| 1103 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1104 | ) |
| 1105 | ); |
| 1106 | |
| 1107 | $this->add_group_control( |
| 1108 | Group_Control_Background::get_type(), |
| 1109 | array( |
| 1110 | 'name' => 'hover_button_background', |
| 1111 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1112 | 'types' => array( 'classic', 'gradient' ), |
| 1113 | 'selector' => '{{WRAPPER}} .aux-button .aux-overlay::after' |
| 1114 | ) |
| 1115 | ); |
| 1116 | |
| 1117 | $this->add_group_control( |
| 1118 | Group_Control_Box_Shadow::get_type(), |
| 1119 | array( |
| 1120 | 'name' => 'hover_button_box_shadow', |
| 1121 | 'selector' => '{{WRAPPER}} .aux-button:hover' |
| 1122 | ) |
| 1123 | ); |
| 1124 | |
| 1125 | $this->end_controls_tab(); |
| 1126 | |
| 1127 | $this->end_controls_tabs(); |
| 1128 | |
| 1129 | $this->add_control( |
| 1130 | 'button_icon_heading', |
| 1131 | array( |
| 1132 | 'label' => __( 'Button Icon', 'auxin-elements' ), |
| 1133 | 'type' => Controls_Manager::HEADING, |
| 1134 | 'separator' => 'before', |
| 1135 | // @TODO: un comment after some release |
| 1136 | // 'condition' => array( |
| 1137 | // 'aux_text_btn_icon!' => '', |
| 1138 | // ) |
| 1139 | ) |
| 1140 | ); |
| 1141 | |
| 1142 | $this->add_control( |
| 1143 | 'btn_icon_align', |
| 1144 | array( |
| 1145 | 'label' => __('Icon alignment', 'auxin-elements'), |
| 1146 | 'type' => Controls_Manager::SELECT, |
| 1147 | 'default' => 'default', |
| 1148 | 'options' => array( |
| 1149 | 'default' => __('Default' , 'auxin-elements' ), |
| 1150 | 'left' => __('Left' , 'auxin-elements' ), |
| 1151 | 'right' => __('Right' , 'auxin-elements' ), |
| 1152 | 'over' => __('Over' , 'auxin-elements' ), |
| 1153 | 'left-animate' => __('Animate from Left' , 'auxin-elements' ), |
| 1154 | 'right-animate' => __('Animate from Right' , 'auxin-elements' ) |
| 1155 | ), |
| 1156 | // @TODO: un comment after some release |
| 1157 | // 'condition' => array( |
| 1158 | // 'aux_text_btn_icon!' => '', |
| 1159 | // ) |
| 1160 | ) |
| 1161 | ); |
| 1162 | |
| 1163 | $this->add_responsive_control( |
| 1164 | 'btn_icon_size', |
| 1165 | array( |
| 1166 | 'label' => __( 'Icon Size', 'auxin-elements' ), |
| 1167 | 'type' => Controls_Manager::SLIDER, |
| 1168 | 'size_units' => array( 'px', '%' ), |
| 1169 | 'range' => array( |
| 1170 | 'px' => array( |
| 1171 | 'min' => 10, |
| 1172 | 'max' => 512, |
| 1173 | 'step' => 2, |
| 1174 | ), |
| 1175 | '%' => array( |
| 1176 | 'min' => 0, |
| 1177 | 'max' => 100, |
| 1178 | ), |
| 1179 | ), |
| 1180 | 'selectors' => array( |
| 1181 | '{{WRAPPER}} .aux-icon' => 'font-size: {{SIZE}}{{UNIT}};', |
| 1182 | ), |
| 1183 | // @TODO: un comment after some release |
| 1184 | // 'condition' => array( |
| 1185 | // 'aux_text_btn_icon!' => '' |
| 1186 | // ) |
| 1187 | ) |
| 1188 | ); |
| 1189 | |
| 1190 | $this->start_controls_tabs( |
| 1191 | 'btn_icon_color', |
| 1192 | array( |
| 1193 | // @TODO: un comment after some release |
| 1194 | // 'condition' => array( |
| 1195 | // 'aux_text_btn_icon!' => '', |
| 1196 | // ) |
| 1197 | ) |
| 1198 | ); |
| 1199 | |
| 1200 | $this->start_controls_tab( |
| 1201 | 'icon_color_normal', |
| 1202 | array( |
| 1203 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 1204 | ) |
| 1205 | ); |
| 1206 | |
| 1207 | $this->add_control( |
| 1208 | 'button_icon_color', |
| 1209 | array( |
| 1210 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1211 | 'type' => Controls_Manager::COLOR, |
| 1212 | 'selectors' => array( |
| 1213 | '{{WRAPPER}} .aux-icon' => 'color: {{VALUE}};', |
| 1214 | ) |
| 1215 | ) |
| 1216 | ); |
| 1217 | |
| 1218 | $this->end_controls_tab(); |
| 1219 | |
| 1220 | $this->start_controls_tab( |
| 1221 | 'btn_icon_color_hover', |
| 1222 | array( |
| 1223 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1224 | ) |
| 1225 | ); |
| 1226 | |
| 1227 | $this->add_control( |
| 1228 | 'hover_button_icon_color', |
| 1229 | array( |
| 1230 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1231 | 'type' => Controls_Manager::COLOR, |
| 1232 | 'selectors' => array( |
| 1233 | '{{WRAPPER}} .aux-button:hover .aux-icon' => 'color: {{VALUE}};', |
| 1234 | ) |
| 1235 | ) |
| 1236 | ); |
| 1237 | |
| 1238 | $this->end_controls_tab(); |
| 1239 | |
| 1240 | $this->end_controls_tabs(); |
| 1241 | |
| 1242 | $this->add_control( |
| 1243 | 'button_text_heading', |
| 1244 | array( |
| 1245 | 'label' => __( 'Button Text', 'auxin-elements' ), |
| 1246 | 'type' => Controls_Manager::HEADING, |
| 1247 | 'separator' => 'before', |
| 1248 | // @TODO: un comment after some release |
| 1249 | // 'condition' => array( |
| 1250 | // 'aux_text_btn_icon!' => '', |
| 1251 | // ) |
| 1252 | ) |
| 1253 | ); |
| 1254 | |
| 1255 | $this->start_controls_tabs( 'button_text' ); |
| 1256 | |
| 1257 | $this->start_controls_tab( |
| 1258 | 'button_text_normal', |
| 1259 | array( |
| 1260 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 1261 | ) |
| 1262 | ); |
| 1263 | |
| 1264 | $this->add_control( |
| 1265 | 'btn_text_color', |
| 1266 | array( |
| 1267 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1268 | 'type' => Controls_Manager::COLOR, |
| 1269 | 'selectors' => array( |
| 1270 | '{{WRAPPER}} .aux-text' => 'color: {{VALUE}};', |
| 1271 | ) |
| 1272 | ) |
| 1273 | ); |
| 1274 | |
| 1275 | $this->add_group_control( |
| 1276 | Group_Control_Text_Shadow::get_type(), |
| 1277 | array( |
| 1278 | 'name' => 'btn_text_shadow', |
| 1279 | 'label' => __( 'Text Shadow', 'auxin-elements' ), |
| 1280 | 'selector' => '{{WRAPPER}} .aux-button', |
| 1281 | ) |
| 1282 | ); |
| 1283 | |
| 1284 | $this->add_group_control( |
| 1285 | Group_Control_Typography::get_type(), |
| 1286 | array( |
| 1287 | 'name' => 'button_typography', |
| 1288 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1289 | 'selector' => '{{WRAPPER}} .aux-text' |
| 1290 | ) |
| 1291 | ); |
| 1292 | |
| 1293 | $this->end_controls_tab(); |
| 1294 | |
| 1295 | $this->start_controls_tab( |
| 1296 | 'button_text_hover', |
| 1297 | array( |
| 1298 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1299 | ) |
| 1300 | ); |
| 1301 | |
| 1302 | $this->add_control( |
| 1303 | 'hover_btn_text_color', |
| 1304 | array( |
| 1305 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1306 | 'type' => Controls_Manager::COLOR, |
| 1307 | 'selectors' => array( |
| 1308 | '{{WRAPPER}} .aux-button:hover .aux-text' => 'color: {{VALUE}};', |
| 1309 | ) |
| 1310 | ) |
| 1311 | ); |
| 1312 | |
| 1313 | $this->add_group_control( |
| 1314 | Group_Control_Text_Shadow::get_type(), |
| 1315 | array( |
| 1316 | 'name' => 'hover_btn_text_shadow', |
| 1317 | 'label' => __( 'Text Shadow', 'auxin-elements' ), |
| 1318 | 'selector' => '{{WRAPPER}} .aux-button:hover', |
| 1319 | ) |
| 1320 | ); |
| 1321 | |
| 1322 | $this->add_group_control( |
| 1323 | Group_Control_Typography::get_type(), |
| 1324 | array( |
| 1325 | 'name' => 'hover_button_typography', |
| 1326 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1327 | 'selector' => '{{WRAPPER}} .aux-text' |
| 1328 | ) |
| 1329 | ); |
| 1330 | |
| 1331 | $this->end_controls_tab(); |
| 1332 | |
| 1333 | $this->end_controls_tabs(); |
| 1334 | |
| 1335 | $this->add_control( |
| 1336 | 'button_wrapper_heading', |
| 1337 | array( |
| 1338 | 'label' => __( 'Button Wrapper', 'auxin-elements' ), |
| 1339 | 'type' => Controls_Manager::HEADING, |
| 1340 | 'separator' => 'before', |
| 1341 | // @TODO: un comment after some release |
| 1342 | // 'condition' => array( |
| 1343 | // 'aux_text_btn_icon!' => '', |
| 1344 | // ) |
| 1345 | ) |
| 1346 | ); |
| 1347 | |
| 1348 | $this->add_responsive_control( |
| 1349 | 'btn_icon_margin', |
| 1350 | array( |
| 1351 | 'label' => __( 'Icon Margin', 'auxin-elements' ), |
| 1352 | 'type' => Controls_Manager::DIMENSIONS, |
| 1353 | 'size_units' => array( 'px', '%' ), |
| 1354 | 'selectors' => array( |
| 1355 | '{{WRAPPER}} .aux-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1356 | ) |
| 1357 | ) |
| 1358 | ); |
| 1359 | |
| 1360 | $this->add_control( |
| 1361 | 'btn_border', |
| 1362 | array( |
| 1363 | 'label' => __('Shape Style','auxin-elements' ), |
| 1364 | 'type' => 'aux-visual-select', |
| 1365 | 'style_items' => 'max-width:30%;', |
| 1366 | 'options' => array( |
| 1367 | 'none' => array( |
| 1368 | 'label' => __('Box', 'auxin-elements' ), |
| 1369 | 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg' |
| 1370 | ), |
| 1371 | 'round' => array( |
| 1372 | 'label' => __('Round', 'auxin-elements' ), |
| 1373 | 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg' |
| 1374 | ), |
| 1375 | 'curve' => array( |
| 1376 | 'label' => __('Curve', 'auxin-elements' ), |
| 1377 | 'image' => AUXIN_URL . 'images/visual-select/button-rounded.svg' |
| 1378 | ) |
| 1379 | ), |
| 1380 | 'default' => 'round' |
| 1381 | ) |
| 1382 | ); |
| 1383 | |
| 1384 | $this->add_control( |
| 1385 | 'btn_style', |
| 1386 | array( |
| 1387 | 'label' => __('Button Style','auxin-elements' ), |
| 1388 | 'type' => 'aux-visual-select', |
| 1389 | 'style_items' => 'max-width:30%;', |
| 1390 | 'options' => array( |
| 1391 | 'none' => array( |
| 1392 | 'label' => __('Normal', 'auxin-elements' ), |
| 1393 | 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg' |
| 1394 | ), |
| 1395 | '3d' => array( |
| 1396 | 'label' => __('3D', 'auxin-elements' ), |
| 1397 | 'image' => AUXIN_URL . 'images/visual-select/button-3d.svg' |
| 1398 | ), |
| 1399 | 'outline' => array( |
| 1400 | 'label' => __('Outline', 'auxin-elements' ), |
| 1401 | 'image' => AUXIN_URL . 'images/visual-select/button-outline.svg' |
| 1402 | ) |
| 1403 | ), |
| 1404 | 'default' => 'outline' |
| 1405 | ) |
| 1406 | ); |
| 1407 | |
| 1408 | $this->add_responsive_control( |
| 1409 | 'button_padding', |
| 1410 | array( |
| 1411 | 'label' => __( 'Padding', 'auxin-elements' ), |
| 1412 | 'type' => Controls_Manager::DIMENSIONS, |
| 1413 | 'size_units' => array( 'px', '%' ), |
| 1414 | 'selectors' => array( |
| 1415 | '{{WRAPPER}} .aux-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1416 | ) |
| 1417 | ) |
| 1418 | ); |
| 1419 | |
| 1420 | $this->end_controls_section(); |
| 1421 | |
| 1422 | |
| 1423 | /* wrapper_style_section |
| 1424 | /*-------------------------------------*/ |
| 1425 | |
| 1426 | $this->start_controls_section( |
| 1427 | 'wrapper_style_section', |
| 1428 | array( |
| 1429 | 'label' => __( 'Wrapper', 'auxin-elements' ), |
| 1430 | 'tab' => Controls_Manager::TAB_STYLE |
| 1431 | ) |
| 1432 | ); |
| 1433 | |
| 1434 | $this->add_control( |
| 1435 | 'overlay_color', |
| 1436 | array( |
| 1437 | 'label' => __('Overlay', 'auxin-elements'), |
| 1438 | 'type' => Controls_Manager::COLOR |
| 1439 | ) |
| 1440 | ); |
| 1441 | |
| 1442 | $this->add_responsive_control( |
| 1443 | 'text_align', |
| 1444 | array( |
| 1445 | 'label' => __('Text Align','auxin-elements'), |
| 1446 | 'type' => Controls_Manager::CHOOSE, |
| 1447 | 'options' => array( |
| 1448 | 'left' => array( |
| 1449 | 'title' => __( 'Left', 'auxin-elements' ), |
| 1450 | 'icon' => 'eicon-text-align-left', |
| 1451 | ), |
| 1452 | 'center' => array( |
| 1453 | 'title' => __( 'Center', 'auxin-elements' ), |
| 1454 | 'icon' => 'eicon-text-align-center', |
| 1455 | ), |
| 1456 | 'right' => array( |
| 1457 | 'title' => __( 'Right', 'auxin-elements' ), |
| 1458 | 'icon' => 'eicon-text-align-right', |
| 1459 | ), |
| 1460 | ), |
| 1461 | 'default' => 'center', |
| 1462 | 'toggle' => true, |
| 1463 | 'selectors' => array( |
| 1464 | '{{WRAPPER}} .aux-widget-advanced-text' => 'text-align: {{VALUE}} !important;' |
| 1465 | ) |
| 1466 | ) |
| 1467 | ); |
| 1468 | |
| 1469 | $this->add_responsive_control( |
| 1470 | 'wrapper_content_padding', |
| 1471 | array( |
| 1472 | 'label' => __( 'Padding', 'auxin-elements' ), |
| 1473 | 'type' => Controls_Manager::DIMENSIONS, |
| 1474 | 'size_units' => array( 'px', '%' ), |
| 1475 | 'selectors' => array( |
| 1476 | '{{WRAPPER}} .aux-widget-advanced-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1477 | ) |
| 1478 | ) |
| 1479 | ); |
| 1480 | |
| 1481 | $this->add_responsive_control( |
| 1482 | 'wrapper_content_border_radius', |
| 1483 | array( |
| 1484 | 'label' => __( 'Border Radius', 'auxin-elements' ), |
| 1485 | 'type' => Controls_Manager::DIMENSIONS, |
| 1486 | 'size_units' => array( 'px', 'em', '%' ), |
| 1487 | 'selectors' => array( |
| 1488 | '{{WRAPPER}} .aux-text-widget-overlay, {{WRAPPER}} .aux-widget-advanced-text' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' |
| 1489 | ), |
| 1490 | 'allowed_dimensions' => 'all', |
| 1491 | 'separator' => 'after' |
| 1492 | ) |
| 1493 | ); |
| 1494 | |
| 1495 | $this->start_controls_tabs( 'wrapper_content_status' ); |
| 1496 | |
| 1497 | $this->start_controls_tab( |
| 1498 | 'wrapper_content_status_normal', |
| 1499 | array( |
| 1500 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 1501 | ) |
| 1502 | ); |
| 1503 | |
| 1504 | $this->add_group_control( |
| 1505 | Group_Control_Border::get_type(), |
| 1506 | array( |
| 1507 | 'name' => 'wrapper_content_border_normal', |
| 1508 | 'selector' => '{{WRAPPER}} .aux-widget-advanced-text', |
| 1509 | 'separator' => 'none' |
| 1510 | ) |
| 1511 | ); |
| 1512 | |
| 1513 | $this->add_group_control( |
| 1514 | Group_Control_Background::get_type(), |
| 1515 | array( |
| 1516 | 'name' => 'wrapper_content_background_normal', |
| 1517 | 'selector' => '{{WRAPPER}} .aux-widget-advanced-text', |
| 1518 | 'separator' => 'none' |
| 1519 | ) |
| 1520 | ); |
| 1521 | |
| 1522 | $this->end_controls_tab(); |
| 1523 | |
| 1524 | |
| 1525 | $this->start_controls_tab( |
| 1526 | 'wrapper_content_status_hover', |
| 1527 | array( |
| 1528 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1529 | ) |
| 1530 | ); |
| 1531 | |
| 1532 | $this->add_group_control( |
| 1533 | Group_Control_Border::get_type(), |
| 1534 | array( |
| 1535 | 'name' => 'wrapper_content_border_hover', |
| 1536 | 'selector' => '{{WRAPPER}} .aux-widget-advanced-text:hover', |
| 1537 | 'separator' => 'none' |
| 1538 | ) |
| 1539 | ); |
| 1540 | |
| 1541 | $this->add_group_control( |
| 1542 | Group_Control_Background::get_type(), |
| 1543 | array( |
| 1544 | 'name' => 'wrapper_content_background_hover', |
| 1545 | 'selector' => '{{WRAPPER}} .aux-widget-advanced-text:hover', |
| 1546 | 'separator' => 'none' |
| 1547 | ) |
| 1548 | ); |
| 1549 | |
| 1550 | $this->add_control( |
| 1551 | 'wrapper_content_transition', |
| 1552 | array( |
| 1553 | 'label' => __( 'Transition duration', 'auxin-elements' ), |
| 1554 | 'type' => Controls_Manager::SLIDER, |
| 1555 | 'range' => array( |
| 1556 | 'px' => array( |
| 1557 | 'min' => 0, |
| 1558 | 'max' => 2000, |
| 1559 | 'step' => 50 |
| 1560 | ) |
| 1561 | ), |
| 1562 | 'selectors' => array( |
| 1563 | '{{WRAPPER}} .aux-widget-advanced-text' => 'transition-duration:{{SIZE}}ms;' |
| 1564 | ) |
| 1565 | ) |
| 1566 | ); |
| 1567 | |
| 1568 | $this->end_controls_tab(); |
| 1569 | |
| 1570 | $this->end_controls_tabs(); |
| 1571 | |
| 1572 | $this->end_controls_section(); |
| 1573 | |
| 1574 | /* footer_section |
| 1575 | /*-------------------------------------*/ |
| 1576 | |
| 1577 | $this->start_controls_section( |
| 1578 | 'footer_section', |
| 1579 | array( |
| 1580 | 'label' => __('Footer', 'auxin-elements' ), |
| 1581 | 'tab' => Controls_Manager::TAB_STYLE |
| 1582 | ) |
| 1583 | ); |
| 1584 | |
| 1585 | $this->add_control( |
| 1586 | 'footer_shape', |
| 1587 | array( |
| 1588 | 'label' => __('Footer Shape','auxin-elements'), |
| 1589 | 'type' => 'aux-visual-select', |
| 1590 | 'style_items' => 'max-width:30%;', |
| 1591 | 'options' => array( |
| 1592 | 'none' => array( |
| 1593 | 'label' => __('None', 'auxin-elements'), |
| 1594 | 'image' => AUXIN_URL . 'images/visual-select/text-normal.svg' |
| 1595 | ), |
| 1596 | 'wave' => array( |
| 1597 | 'label' => __('Wave', 'auxin-elements'), |
| 1598 | 'image' => AUXIN_URL . 'images/visual-select/text-outline.svg' |
| 1599 | ), |
| 1600 | 'tail' => array( |
| 1601 | 'label' => __('Tail', 'auxin-elements'), |
| 1602 | 'image' => AUXIN_URL . 'images/visual-select/text-boxed.svg' |
| 1603 | ) |
| 1604 | ), |
| 1605 | 'default' => 'none' |
| 1606 | ) |
| 1607 | ); |
| 1608 | |
| 1609 | $this->add_control( |
| 1610 | 'footer_shape_color', |
| 1611 | array( |
| 1612 | 'label' => __('Color of button', 'auxin-elements'), |
| 1613 | 'type' => Controls_Manager::COLOR, |
| 1614 | 'condition' => array( |
| 1615 | 'footer_shape' => array('tail', 'wave') |
| 1616 | ) |
| 1617 | ) |
| 1618 | ); |
| 1619 | |
| 1620 | $this->end_controls_section(); |
| 1621 | } |
| 1622 | |
| 1623 | /** |
| 1624 | * Render image box widget output on the frontend. |
| 1625 | * |
| 1626 | * Written in PHP and used to generate the final HTML. |
| 1627 | * |
| 1628 | * @since 1.0.0 |
| 1629 | * @access protected |
| 1630 | */ |
| 1631 | protected function render() { |
| 1632 | |
| 1633 | $settings = $this->get_settings_for_display(); |
| 1634 | $main_icon = ''; |
| 1635 | |
| 1636 | if( 'icon' == $settings['icon_or_image'] ){ |
| 1637 | $main_icon = ! empty( $settings['aux_text_icon']['value'] ) ? $settings['aux_text_icon']['value'] : ( ! empty( $settings['icon'] ) ? $settings['icon'] : '' ) ; |
| 1638 | } |
| 1639 | |
| 1640 | $btn_icon_value = ! empty( $settings['aux_text_btn_icon']['value'] ) ? $settings['aux_text_btn_icon']['value'] : ( ! empty( $settings['btn_icon'] ) ? $settings['btn_icon'] : '' ) ; |
| 1641 | |
| 1642 | $args = array( |
| 1643 | 'title' => $settings['title'], |
| 1644 | 'subtitle' => $settings['subtitle'], |
| 1645 | 'title_link' => auxin_get_array_value( $settings['title_link'], 'url' ), |
| 1646 | 'content' => $settings['content'], |
| 1647 | |
| 1648 | 'display_button' => $settings['display_button'], |
| 1649 | 'btn_label' => $settings['btn_label'], |
| 1650 | 'btn_size' => $settings['btn_size'], |
| 1651 | 'btn_border' => $settings['btn_border'], |
| 1652 | 'btn_style' => $settings['btn_style'], |
| 1653 | 'btn_icon' => $btn_icon_value, |
| 1654 | 'btn_icon_align' => $settings['btn_icon_align'], |
| 1655 | 'btn_color_name' => $settings['btn_color_name'], |
| 1656 | 'btn_link' => auxin_get_array_value( $settings['btn_link'], 'url' ), |
| 1657 | 'btn_nofollow' => auxin_get_array_value( $settings['btn_link'], 'nofollow' ), |
| 1658 | 'btn_target' => auxin_get_array_value( $settings['btn_link'], 'is_external', false ) ? '_blank' : '_self', |
| 1659 | |
| 1660 | 'icon_or_image' => $settings['icon_or_image'], |
| 1661 | 'icon' => $main_icon, |
| 1662 | 'icon_color' => $settings['icon_color'], |
| 1663 | 'icon_bg_color' => $settings['icon_bg_color'], |
| 1664 | 'icon_shape' => $settings['icon_shape'], |
| 1665 | 'image' => auxin_get_array_value( $settings['image'], 'id' ), |
| 1666 | 'size' => $settings['image_size'], |
| 1667 | 'width' => auxin_get_array_value( $settings['image_custom_dimension'], 'width' ), |
| 1668 | 'height' => auxin_get_array_value( $settings['image_custom_dimension'], 'height' ), |
| 1669 | 'preloadable' => $settings['preloadable'], |
| 1670 | 'preload_preview' => $settings['preload_preview'], |
| 1671 | 'preload_bgcolor' => $settings['preload_bgcolor'], |
| 1672 | 'image_size' => $settings['image_size'], |
| 1673 | 'img_shape' => $settings['img_shape'], |
| 1674 | 'image_position' => $settings['image_position'], |
| 1675 | 'icon_svg_inline' => $settings['svg_inline'], |
| 1676 | |
| 1677 | 'text_align' => $settings['text_align'], |
| 1678 | 'text_align_resp' => empty( $settings['text_align_mobile'] ) ? '' : $settings['text_align_mobile'], |
| 1679 | 'overlay_color' => $settings['overlay_color'], |
| 1680 | |
| 1681 | 'footer_shape' => $settings['footer_shape'], |
| 1682 | 'footer_shape_color' => $settings['footer_shape_color'] |
| 1683 | ); |
| 1684 | |
| 1685 | // get the shortcode base blog page |
| 1686 | echo auxin_widget_column_callback( $args ); |
| 1687 | } |
| 1688 | |
| 1689 | } |
| 1690 |