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