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
recent-posts-grid-carousel.php
2042 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_Typography; |
| 8 | use Elementor\Core\Schemes\Typography; |
| 9 | use Elementor\Group_Control_Background; |
| 10 | use Elementor\Group_Control_Box_Shadow; |
| 11 | use Elementor\Group_Control_Text_Shadow; |
| 12 | |
| 13 | |
| 14 | if ( ! defined( 'ABSPATH' ) ) { |
| 15 | exit; // Exit if accessed directly. |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Elementor 'RecentPostsGridCarousel' widget. |
| 20 | * |
| 21 | * Elementor widget that displays an 'RecentPostsGridCarousel' with lightbox. |
| 22 | * |
| 23 | * @since 1.0.0 |
| 24 | */ |
| 25 | class RecentPostsGridCarousel extends Widget_Base { |
| 26 | |
| 27 | /** |
| 28 | * Get widget name. |
| 29 | * |
| 30 | * Retrieve 'RecentPostsGridCarousel' widget name. |
| 31 | * |
| 32 | * @since 1.0.0 |
| 33 | * @access public |
| 34 | * |
| 35 | * @return string Widget name. |
| 36 | */ |
| 37 | public function get_name() { |
| 38 | return 'aux_recent_posts'; |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Get widget title. |
| 43 | * |
| 44 | * Retrieve 'RecentPostsGridCarousel' widget title. |
| 45 | * |
| 46 | * @since 1.0.0 |
| 47 | * @access public |
| 48 | * |
| 49 | * @return string Widget title. |
| 50 | */ |
| 51 | public function get_title() { |
| 52 | return __('Grid & Carousel Posts', 'auxin-elements' ); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Get widget icon. |
| 57 | * |
| 58 | * Retrieve 'RecentPostsGridCarousel' widget icon. |
| 59 | * |
| 60 | * @since 1.0.0 |
| 61 | * @access public |
| 62 | * |
| 63 | * @return string Widget icon. |
| 64 | */ |
| 65 | public function get_icon() { |
| 66 | return 'eicon-posts-grid auxin-badge'; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Get widget categories. |
| 71 | * |
| 72 | * Retrieve 'RecentPostsGridCarousel' widget icon. |
| 73 | * |
| 74 | * @since 1.0.0 |
| 75 | * @access public |
| 76 | * |
| 77 | * @return string Widget icon. |
| 78 | */ |
| 79 | public function get_categories() { |
| 80 | return array( 'auxin-dynamic' ); |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Retrieve the terms in a given taxonomy or list of taxonomies. |
| 85 | * |
| 86 | * Retrieve 'RecentPostsGridCarousel' widget icon. |
| 87 | * |
| 88 | * @since 1.0.0 |
| 89 | * @access public |
| 90 | * |
| 91 | * @return string Widget icon. |
| 92 | */ |
| 93 | public function get_terms() { |
| 94 | $terms = get_terms( 'category', 'orderby=count&hide_empty=0' ); |
| 95 | $list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ; |
| 96 | foreach ( $terms as $key => $value ) { |
| 97 | $list[$value->term_id] = $value->name; |
| 98 | } |
| 99 | |
| 100 | return $list; |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Register 'RecentPostsGridCarousel' widget controls. |
| 105 | * |
| 106 | * Adds different input fields to allow the user to change and customize the widget settings. |
| 107 | * |
| 108 | * @since 1.0.0 |
| 109 | * @access protected |
| 110 | */ |
| 111 | protected function _register_controls() { |
| 112 | |
| 113 | /*-----------------------------------------------------------------------------------*/ |
| 114 | /* layout_section |
| 115 | /*-----------------------------------------------------------------------------------*/ |
| 116 | |
| 117 | $this->start_controls_section( |
| 118 | 'layout_section', |
| 119 | array( |
| 120 | 'label' => __('Layout', 'auxin-elements' ), |
| 121 | 'tab' => Controls_Manager::TAB_LAYOUT |
| 122 | ) |
| 123 | ); |
| 124 | |
| 125 | $this->add_responsive_control( |
| 126 | 'columns', |
| 127 | array( |
| 128 | 'label' => __( 'Columns', 'auxin-elements' ), |
| 129 | 'type' => Controls_Manager::SELECT, |
| 130 | 'default' => '4', |
| 131 | 'tablet_default' => 'inherit', |
| 132 | 'mobile_default' => '1', |
| 133 | 'options' => array( |
| 134 | 'inherit' => __( 'Inherited from larger', 'auxin-elements' ), |
| 135 | '1' => '1', |
| 136 | '2' => '2', |
| 137 | '3' => '3', |
| 138 | '4' => '4', |
| 139 | '5' => '5', |
| 140 | '6' => '6' |
| 141 | ), |
| 142 | 'frontend_available' => true, |
| 143 | ) |
| 144 | ); |
| 145 | |
| 146 | $this->add_control( |
| 147 | 'preview_mode', |
| 148 | array( |
| 149 | 'label' => __('Display items as', 'auxin-elements'), |
| 150 | 'type' => Controls_Manager::SELECT, |
| 151 | 'default' => 'grid', |
| 152 | 'options' => array( |
| 153 | 'grid' => __( 'Grid', 'auxin-elements' ), |
| 154 | 'grid-table' => __( 'Grid - Table Style', 'auxin-elements' ), |
| 155 | 'grid-modern' => __( 'Grid - Modern Style', 'auxin-elements' ), |
| 156 | 'flip' => __( 'Flip', 'auxin-elements' ), |
| 157 | 'carousel-modern' => __( 'Carousel - Modern Style', 'auxin-elements' ), |
| 158 | 'carousel' => __( 'Carousel', 'auxin-elements' ) |
| 159 | ) |
| 160 | ) |
| 161 | ); |
| 162 | |
| 163 | $this->add_control( |
| 164 | 'carousel_space', |
| 165 | array( |
| 166 | 'label' => __( 'Column space', 'auxin-elements' ), |
| 167 | 'description' => __( 'Specifies horizontal space between items (pixel).', 'auxin-elements' ), |
| 168 | 'type' => Controls_Manager::NUMBER, |
| 169 | 'default' => '25', |
| 170 | 'condition' => array( |
| 171 | 'preview_mode' => array( 'carousel', 'carousel-modern' ), |
| 172 | ) |
| 173 | ) |
| 174 | ); |
| 175 | |
| 176 | $this->add_control( |
| 177 | 'content_layout', |
| 178 | array( |
| 179 | 'label' => __('Content layout', 'auxin-elements'), |
| 180 | 'type' => Controls_Manager::SELECT, |
| 181 | 'default' => 'default', |
| 182 | 'options' => array( |
| 183 | 'default' => __('Full Content', 'auxin-elements'), |
| 184 | 'entry-boxed' => __('Boxed Content', 'auxin-elements') |
| 185 | ), |
| 186 | 'condition' => array( |
| 187 | 'preview_mode' => array( 'grid', 'grid-table', 'grid-modern' ), |
| 188 | ) |
| 189 | ) |
| 190 | ); |
| 191 | |
| 192 | $this->add_control( |
| 193 | 'grid_table_hover', |
| 194 | array( |
| 195 | 'label' => __('Mouse Over Effect', 'auxin-elements'), |
| 196 | 'type' => Controls_Manager::SELECT, |
| 197 | 'label_block' => true, |
| 198 | 'default' => 'bgimage-bgcolor', |
| 199 | 'options' => array( |
| 200 | 'bgcolor' => __( 'Background color', 'auxin-elements' ), |
| 201 | 'bgimage' => __( 'Cover image', 'auxin-elements' ), |
| 202 | 'bgimage-bgcolor' => __( 'Cover image or background color', 'auxin-elements' ), |
| 203 | 'none' => __( 'Nothing', 'auxin-elements' ) |
| 204 | ), |
| 205 | 'condition' => array( |
| 206 | 'preview_mode' => array( 'grid', 'grid-table', 'grid-modern' ), |
| 207 | ) |
| 208 | ) |
| 209 | ); |
| 210 | |
| 211 | $this->add_control( |
| 212 | 'carousel_navigation', |
| 213 | array( |
| 214 | 'label' => __('Navigation type', 'auxin-elements'), |
| 215 | 'type' => Controls_Manager::SELECT, |
| 216 | 'default' => 'peritem', |
| 217 | 'options' => array( |
| 218 | 'peritem' => __('Move per column', 'auxin-elements'), |
| 219 | 'perpage' => __('Move per page', 'auxin-elements'), |
| 220 | 'scroll' => __('Smooth scroll', 'auxin-elements') |
| 221 | ), |
| 222 | 'condition' => array( |
| 223 | 'preview_mode' => array( 'carousel', 'carousel-modern' ), |
| 224 | ) |
| 225 | ) |
| 226 | ); |
| 227 | |
| 228 | $this->add_control( |
| 229 | 'carousel_navigation_control', |
| 230 | array( |
| 231 | 'label' => __('Navigation control', 'auxin-elements'), |
| 232 | 'type' => Controls_Manager::SELECT, |
| 233 | 'default' => 'bullets', |
| 234 | 'options' => array( |
| 235 | '' => __('None', 'auxin-elements'), |
| 236 | 'arrows' => __('Arrows', 'auxin-elements'), |
| 237 | 'bullets' => __('Bullets', 'auxin-elements') |
| 238 | ), |
| 239 | 'condition' => array( |
| 240 | 'preview_mode' => array( 'carousel', 'carousel-modern' ), |
| 241 | ) |
| 242 | ) |
| 243 | ); |
| 244 | |
| 245 | $this->add_control( |
| 246 | 'carousel_nav_control_pos', |
| 247 | array( |
| 248 | 'label' => __('Control Position', 'auxin-elements'), |
| 249 | 'type' => Controls_Manager::SELECT, |
| 250 | 'default' => 'center', |
| 251 | 'options' => array( |
| 252 | 'center' => __('Center', 'auxin-elements'), |
| 253 | 'side' => __('Side', 'auxin-elements') |
| 254 | ), |
| 255 | 'condition' => array( |
| 256 | 'carousel_navigation_control' => 'arrows', |
| 257 | ) |
| 258 | ) |
| 259 | ); |
| 260 | |
| 261 | $this->add_control( |
| 262 | 'carousel_nav_control_skin', |
| 263 | array( |
| 264 | 'label' => __('Control Skin', 'auxin-elements'), |
| 265 | 'type' => Controls_Manager::SELECT, |
| 266 | 'default' => 'boxed', |
| 267 | 'options' => array( |
| 268 | 'boxed' => __('boxed', 'auxin-elements'), |
| 269 | 'long' => __('Long Arrow', 'auxin-elements') |
| 270 | ), |
| 271 | 'condition' => array( |
| 272 | 'carousel_navigation_control' => 'arrows', |
| 273 | ) |
| 274 | ) |
| 275 | ); |
| 276 | |
| 277 | $this->add_control( |
| 278 | 'carousel_loop', |
| 279 | array( |
| 280 | 'label' => __('Loop navigation','auxin-elements' ), |
| 281 | 'type' => Controls_Manager::SWITCHER, |
| 282 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 283 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 284 | 'return_value' => 'yes', |
| 285 | 'default' => 'yes', |
| 286 | 'condition' => array( |
| 287 | 'preview_mode' => array( 'carousel', 'carousel-modern' ), |
| 288 | ) |
| 289 | ) |
| 290 | ); |
| 291 | |
| 292 | $this->add_control( |
| 293 | 'carousel_autoplay', |
| 294 | array( |
| 295 | 'label' => __('Autoplay carousel','auxin-elements' ), |
| 296 | 'type' => Controls_Manager::SWITCHER, |
| 297 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 298 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 299 | 'return_value' => 'yes', |
| 300 | 'default' => 'no', |
| 301 | 'condition' => array( |
| 302 | 'preview_mode' => array( 'carousel', 'carousel-modern' ), |
| 303 | ) |
| 304 | ) |
| 305 | ); |
| 306 | |
| 307 | $this->add_control( |
| 308 | 'carousel_autoplay_delay', |
| 309 | array( |
| 310 | 'label' => __( 'Autoplay delay', 'auxin-elements' ), |
| 311 | 'description' => __('Specifies the delay between auto-forwarding in seconds.', 'auxin-elements' ), |
| 312 | 'type' => Controls_Manager::NUMBER, |
| 313 | 'default' => '2', |
| 314 | 'condition' => array( |
| 315 | 'preview_mode' => array( 'carousel', 'carousel-modern' ), |
| 316 | ) |
| 317 | ) |
| 318 | ); |
| 319 | |
| 320 | $this->end_controls_section(); |
| 321 | |
| 322 | /*-----------------------------------------------------------------------------------*/ |
| 323 | /* display_section |
| 324 | /*-----------------------------------------------------------------------------------*/ |
| 325 | |
| 326 | $this->start_controls_section( |
| 327 | 'display_section', |
| 328 | array( |
| 329 | 'label' => __('Display', 'auxin-elements' ), |
| 330 | 'tab' => Controls_Manager::TAB_LAYOUT |
| 331 | ) |
| 332 | ); |
| 333 | |
| 334 | $this->add_control( |
| 335 | 'show_media', |
| 336 | array( |
| 337 | 'label' => __('Display post media (image, video, etc)','auxin-elements' ), |
| 338 | 'label_block' => true, |
| 339 | 'type' => Controls_Manager::SWITCHER, |
| 340 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 341 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 342 | 'return_value' => 'yes', |
| 343 | 'default' => 'yes', |
| 344 | 'label_block' => true |
| 345 | ) |
| 346 | ); |
| 347 | |
| 348 | $this->add_control( |
| 349 | 'post_media_size', |
| 350 | array( |
| 351 | 'label' => __('Media size','auxin-elements' ), |
| 352 | 'type' => Controls_Manager::SELECT, |
| 353 | 'options' => auxin_get_available_image_sizes(), |
| 354 | 'default' => 'auto', |
| 355 | 'condition' => array( |
| 356 | 'show_media' => 'yes' |
| 357 | ) |
| 358 | ) |
| 359 | ); |
| 360 | |
| 361 | $this->add_control( |
| 362 | 'ignore_formats', |
| 363 | array( |
| 364 | 'label' => __('Ignore post formats media','auxin-elements' ), |
| 365 | 'label_block' => true, |
| 366 | 'type' => Controls_Manager::SWITCHER, |
| 367 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 368 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 369 | 'return_value' => 'yes', |
| 370 | 'default' => 'no', |
| 371 | 'label_block' => true, |
| 372 | 'condition' => array( |
| 373 | 'show_media' => 'yes' |
| 374 | ) |
| 375 | ) |
| 376 | ); |
| 377 | |
| 378 | $this->add_control( |
| 379 | 'preloadable', |
| 380 | array( |
| 381 | 'label' => __('Preload image','auxin-elements' ), |
| 382 | 'type' => Controls_Manager::SWITCHER, |
| 383 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 384 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 385 | 'return_value' => 'yes', |
| 386 | 'default' => 'no', |
| 387 | 'condition' => array( |
| 388 | 'show_media' => 'yes', |
| 389 | ) |
| 390 | ) |
| 391 | ); |
| 392 | |
| 393 | $this->add_control( |
| 394 | 'preload_preview', |
| 395 | array( |
| 396 | 'label' => __('While loading image display','auxin-elements' ), |
| 397 | 'label_block' => true, |
| 398 | 'type' => Controls_Manager::SELECT, |
| 399 | 'options' => auxin_get_preloadable_previews(), |
| 400 | 'return_value' => 'yes', |
| 401 | 'default' => 'yes', |
| 402 | 'condition' => array( |
| 403 | 'preloadable' => 'yes' |
| 404 | ) |
| 405 | ) |
| 406 | ); |
| 407 | |
| 408 | $this->add_control( |
| 409 | 'preload_bgcolor', |
| 410 | array( |
| 411 | 'label' => __( 'Placeholder color while loading image', 'auxin-elements' ), |
| 412 | 'type' => Controls_Manager::COLOR, |
| 413 | 'condition' => array( |
| 414 | 'preloadable' => 'yes', |
| 415 | 'preload_preview' => array('simple-spinner', 'simple-spinner-light', 'simple-spinner-dark') |
| 416 | ) |
| 417 | ) |
| 418 | ); |
| 419 | |
| 420 | $this->add_control( |
| 421 | 'display_title', |
| 422 | array( |
| 423 | 'label' => __('Display post title', 'auxin-elements' ), |
| 424 | 'type' => Controls_Manager::SWITCHER, |
| 425 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 426 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 427 | 'return_value' => 'yes', |
| 428 | 'default' => 'yes' |
| 429 | ) |
| 430 | ); |
| 431 | |
| 432 | $this->add_control( |
| 433 | 'words_num', |
| 434 | array( |
| 435 | 'label' => __( 'Title Trim', 'auxin-elements' ), |
| 436 | 'type' => Controls_Manager::NUMBER, |
| 437 | 'default' => '', |
| 438 | 'condition' => array( |
| 439 | 'display_title' => 'yes', |
| 440 | ) |
| 441 | ) |
| 442 | ); |
| 443 | |
| 444 | $this->add_control( |
| 445 | 'show_info', |
| 446 | array( |
| 447 | 'label' => __('Display post info','auxin-elements' ), |
| 448 | 'type' => Controls_Manager::SWITCHER, |
| 449 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 450 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 451 | 'return_value' => 'yes', |
| 452 | 'default' => 'yes' |
| 453 | ) |
| 454 | ); |
| 455 | |
| 456 | $this->add_control( |
| 457 | 'show_format_icon', |
| 458 | array( |
| 459 | 'label' => __('Display format icon','auxin-elements' ), |
| 460 | 'type' => Controls_Manager::SWITCHER, |
| 461 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 462 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 463 | 'return_value' => 'yes', |
| 464 | 'default' => 'no' |
| 465 | ) |
| 466 | ); |
| 467 | |
| 468 | $this->add_control( |
| 469 | 'post_info_position', |
| 470 | array( |
| 471 | 'label' => __('Post info position', 'auxin-elements' ), |
| 472 | 'type' => Controls_Manager::SELECT, |
| 473 | 'default' => 'after-title', |
| 474 | 'options' => array( |
| 475 | 'after-title' => __('After Title' , 'auxin-elements' ), |
| 476 | 'before-title' => __('Before Title', 'auxin-elements' ) |
| 477 | ), |
| 478 | 'condition' => array( |
| 479 | 'show_info' => 'yes', |
| 480 | 'preview_mode!' => 'flip' |
| 481 | ) |
| 482 | ) |
| 483 | ); |
| 484 | |
| 485 | $this->add_control( |
| 486 | 'display_categories', |
| 487 | array( |
| 488 | 'label' => __('Display Categories','auxin-elements' ), |
| 489 | 'type' => Controls_Manager::SWITCHER, |
| 490 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 491 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 492 | 'return_value' => 'yes', |
| 493 | 'default' => 'yes', |
| 494 | 'condition' => array( |
| 495 | 'show_info' => 'yes', |
| 496 | ) |
| 497 | ) |
| 498 | ); |
| 499 | |
| 500 | $this->add_control( |
| 501 | 'show_badge', |
| 502 | array( |
| 503 | 'label' => __('Display Category Badge', 'auxin-elements' ), |
| 504 | 'type' => Controls_Manager::SWITCHER, |
| 505 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 506 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 507 | 'return_value' => 'yes', |
| 508 | 'default' => 'no' |
| 509 | ) |
| 510 | ); |
| 511 | |
| 512 | $this->add_control( |
| 513 | 'show_date', |
| 514 | array( |
| 515 | 'label' => __('Display Date','auxin-elements' ), |
| 516 | 'type' => Controls_Manager::SWITCHER, |
| 517 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 518 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 519 | 'return_value' => 'yes', |
| 520 | 'default' => 'yes', |
| 521 | 'condition' => array( |
| 522 | 'show_info' => 'yes', |
| 523 | ) |
| 524 | ) |
| 525 | ); |
| 526 | |
| 527 | $this->add_control( |
| 528 | 'display_author_header', |
| 529 | array( |
| 530 | 'label' => __('Display Author in Header','auxin-elements' ), |
| 531 | 'description' => __('Enable it to display author name in header','auxin-elements' ), |
| 532 | 'type' => Controls_Manager::SWITCHER, |
| 533 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 534 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 535 | 'return_value' => 'yes', |
| 536 | 'default' => 'yes', |
| 537 | ) |
| 538 | ); |
| 539 | |
| 540 | $this->add_control( |
| 541 | 'show_content', |
| 542 | array( |
| 543 | 'label' => __('Display post content','auxin-elements' ), |
| 544 | 'type' => Controls_Manager::SWITCHER, |
| 545 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 546 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 547 | 'return_value' => 'yes', |
| 548 | 'default' => 'yes' |
| 549 | ) |
| 550 | ); |
| 551 | |
| 552 | $this->add_control( |
| 553 | 'display_comments', |
| 554 | array( |
| 555 | 'label' => __('Display Comments Number', 'auxin-elements' ), |
| 556 | 'type' => Controls_Manager::SWITCHER, |
| 557 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 558 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 559 | 'return_value' => 'yes', |
| 560 | 'default' => 'yes' |
| 561 | ) |
| 562 | ); |
| 563 | |
| 564 | $this->add_control( |
| 565 | 'display_like', |
| 566 | array( |
| 567 | 'label' => __('Display like button', 'auxin-elements' ), |
| 568 | 'type' => Controls_Manager::SWITCHER, |
| 569 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 570 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 571 | 'return_value' => 'yes', |
| 572 | 'default' => 'yes' |
| 573 | ) |
| 574 | ); |
| 575 | |
| 576 | $this->add_control( |
| 577 | 'show_excerpt', |
| 578 | array( |
| 579 | 'label' => __('Display excerpt','auxin-elements' ), |
| 580 | 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ), |
| 581 | 'type' => Controls_Manager::SWITCHER, |
| 582 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 583 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 584 | 'return_value' => 'yes', |
| 585 | 'default' => 'yes' |
| 586 | ) |
| 587 | ); |
| 588 | |
| 589 | $this->add_control( |
| 590 | 'excerpt_len', |
| 591 | array( |
| 592 | 'label' => __('Excerpt length','auxin-elements' ), |
| 593 | 'description' => __('Specify summary content in character.','auxin-elements' ), |
| 594 | 'type' => Controls_Manager::NUMBER, |
| 595 | 'default' => '160', |
| 596 | 'condition' => array( |
| 597 | 'show_excerpt' => 'yes', |
| 598 | ) |
| 599 | ) |
| 600 | ); |
| 601 | |
| 602 | $this->add_control( |
| 603 | 'author_or_readmore', |
| 604 | array( |
| 605 | 'label' => __('Display author or read more', 'auxin-elements'), |
| 606 | 'label_block' => true, |
| 607 | 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'), |
| 608 | 'type' => Controls_Manager::SELECT, |
| 609 | 'default' => 'readmore', |
| 610 | 'options' => array( |
| 611 | 'readmore' => __('Read More', 'auxin-elements'), |
| 612 | 'author' => __('Author Name', 'auxin-elements'), |
| 613 | 'none' => __('None', 'auxin-elements') |
| 614 | ), |
| 615 | 'label_block' => true |
| 616 | ) |
| 617 | ); |
| 618 | |
| 619 | $this->add_control( |
| 620 | 'display_author_footer', |
| 621 | array( |
| 622 | 'label' => __('Display Author in Footer','auxin-elements' ), |
| 623 | 'description' => __('Enable it to display author name in footer','auxin-elements' ), |
| 624 | 'type' => Controls_Manager::SWITCHER, |
| 625 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 626 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 627 | 'return_value' => 'yes', |
| 628 | 'default' => 'no', |
| 629 | 'condition' => array( |
| 630 | 'author_or_readmore' => 'author', |
| 631 | ) |
| 632 | ) |
| 633 | ); |
| 634 | |
| 635 | $this->add_control( |
| 636 | 'meta_info_position', |
| 637 | array( |
| 638 | 'label' => __('Meta info position', 'auxin-elements' ), |
| 639 | 'type' => Controls_Manager::SELECT, |
| 640 | 'default' => 'after-content', |
| 641 | 'options' => array( |
| 642 | 'after-content' => __('After Content' , 'auxin-elements' ), |
| 643 | 'before-content' => __('Before Content', 'auxin-elements' ) |
| 644 | ), |
| 645 | 'condition' => array( |
| 646 | 'preview_mode!' => 'flip' |
| 647 | ) |
| 648 | ) |
| 649 | ); |
| 650 | |
| 651 | $this->end_controls_section(); |
| 652 | |
| 653 | /*-----------------------------------------------------------------------------------*/ |
| 654 | /* query_section |
| 655 | /*-----------------------------------------------------------------------------------*/ |
| 656 | |
| 657 | $this->start_controls_section( |
| 658 | 'query_section', |
| 659 | array( |
| 660 | 'label' => __('Query', 'auxin-elements' ), |
| 661 | ) |
| 662 | ); |
| 663 | |
| 664 | $this->add_control( |
| 665 | 'use_wp_query', |
| 666 | array( |
| 667 | 'label' => __('Use wp query','auxin-elements' ), |
| 668 | 'type' => Controls_Manager::SWITCHER, |
| 669 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 670 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 671 | 'return_value' => 'yes', |
| 672 | 'default' => 'no' |
| 673 | ) |
| 674 | ); |
| 675 | |
| 676 | $this->add_control( |
| 677 | 'cat', |
| 678 | array( |
| 679 | 'label' => __('Categories', 'auxin-elements'), |
| 680 | 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ), |
| 681 | 'type' => Controls_Manager::SELECT2, |
| 682 | 'multiple' => true, |
| 683 | 'options' => $this->get_terms(), |
| 684 | 'default' => array( ' ' ), |
| 685 | 'condition' => array( |
| 686 | 'use_wp_query!' => 'yes' |
| 687 | ) |
| 688 | ) |
| 689 | ); |
| 690 | |
| 691 | $this->add_control( |
| 692 | 'num', |
| 693 | array( |
| 694 | 'label' => __('Number of posts to show', 'auxin-elements'), |
| 695 | 'label_block' => true, |
| 696 | 'type' => Controls_Manager::NUMBER, |
| 697 | 'default' => '8', |
| 698 | 'min' => 1, |
| 699 | 'step' => 1 |
| 700 | ) |
| 701 | ); |
| 702 | |
| 703 | $this->add_control( |
| 704 | 'exclude_without_media', |
| 705 | array( |
| 706 | 'label' => __('Exclude posts without media','auxin-elements' ), |
| 707 | 'type' => Controls_Manager::SWITCHER, |
| 708 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 709 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 710 | 'return_value' => 'yes', |
| 711 | 'default' => 'no', |
| 712 | 'condition' => array( |
| 713 | 'use_wp_query!' => 'yes' |
| 714 | ) |
| 715 | ) |
| 716 | ); |
| 717 | |
| 718 | $this->add_control( |
| 719 | 'exclude_custom_post_formats', |
| 720 | array( |
| 721 | 'label' => __('Exclude all custom post formats','auxin-elements' ), |
| 722 | 'type' => Controls_Manager::SWITCHER, |
| 723 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 724 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 725 | 'return_value' => 'yes', |
| 726 | 'default' => 'no', |
| 727 | 'condition' => array( |
| 728 | 'use_wp_query!' => 'yes' |
| 729 | ) |
| 730 | ) |
| 731 | ); |
| 732 | |
| 733 | $this->add_control( |
| 734 | 'include_post_formats_in', |
| 735 | array( |
| 736 | 'label' => __('Include custom post formats', 'auxin-elements'), |
| 737 | 'type' => Controls_Manager::SELECT2, |
| 738 | 'multiple' => true, |
| 739 | 'options' => array( |
| 740 | 'aside' => __('Aside', 'auxin-elements'), |
| 741 | 'gallery' => __('Gallery', 'auxin-elements'), |
| 742 | 'image' => __('Image', 'auxin-elements'), |
| 743 | 'link' => __('Link', 'auxin-elements'), |
| 744 | 'quote' => __('Quote', 'auxin-elements'), |
| 745 | 'video' => __('Video', 'auxin-elements'), |
| 746 | 'audio' => __('Audio', 'auxin-elements') |
| 747 | ), |
| 748 | 'condition' => array( |
| 749 | 'exclude_custom_post_formats!' => 'yes', |
| 750 | 'use_wp_query!' => 'yes' |
| 751 | ) |
| 752 | ) |
| 753 | ); |
| 754 | |
| 755 | $this->add_control( |
| 756 | 'exclude_quote_link', |
| 757 | array( |
| 758 | 'label' => __('Exclude quote and link post formats','auxin-elements' ), |
| 759 | 'type' => Controls_Manager::SWITCHER, |
| 760 | 'label_on' => __( 'On', 'auxin-elements' ), |
| 761 | 'label_off' => __( 'Off', 'auxin-elements' ), |
| 762 | 'return_value' => 'yes', |
| 763 | 'default' => 'no', |
| 764 | 'condition' => array( |
| 765 | 'exclude_custom_post_formats' => 'yes', |
| 766 | 'use_wp_query!' => 'yes' |
| 767 | ) |
| 768 | ) |
| 769 | ); |
| 770 | |
| 771 | |
| 772 | $this->add_control( |
| 773 | 'order_by', |
| 774 | array( |
| 775 | 'label' => __('Order by', 'auxin-elements'), |
| 776 | 'type' => Controls_Manager::SELECT, |
| 777 | 'default' => 'date', |
| 778 | 'options' => array( |
| 779 | 'date' => __('Date', 'auxin-elements'), |
| 780 | 'menu_order date' => __('Menu Order', 'auxin-elements'), |
| 781 | 'title' => __('Title', 'auxin-elements'), |
| 782 | 'ID' => __('ID', 'auxin-elements'), |
| 783 | 'rand' => __('Random', 'auxin-elements'), |
| 784 | 'comment_count' => __('Comments', 'auxin-elements'), |
| 785 | 'modified' => __('Date Modified', 'auxin-elements'), |
| 786 | 'author' => __('Author', 'auxin-elements'), |
| 787 | 'post__in' => __('Inserted Post IDs', 'auxin-elements') |
| 788 | ), |
| 789 | 'condition' => array( |
| 790 | 'use_wp_query!' => 'yes' |
| 791 | ) |
| 792 | ) |
| 793 | ); |
| 794 | |
| 795 | $this->add_control( |
| 796 | 'order', |
| 797 | array( |
| 798 | 'label' => __('Order', 'auxin-elements'), |
| 799 | 'type' => Controls_Manager::SELECT, |
| 800 | 'default' => 'DESC', |
| 801 | 'options' => array( |
| 802 | 'DESC' => __('Descending', 'auxin-elements'), |
| 803 | 'ASC' => __('Ascending', 'auxin-elements'), |
| 804 | ), |
| 805 | 'condition' => array( |
| 806 | 'use_wp_query!' => 'yes' |
| 807 | ) |
| 808 | ) |
| 809 | ); |
| 810 | |
| 811 | $this->add_control( |
| 812 | 'only_posts__in', |
| 813 | array( |
| 814 | 'label' => __('Only posts','auxin-elements' ), |
| 815 | 'description' => __('If you intend to display ONLY specific posts, you should specify the posts here. You have to insert the post IDs that are separated by comma (eg. 53,34,87,25).', 'auxin-elements' ), |
| 816 | 'type' => Controls_Manager::TEXT, |
| 817 | 'condition' => array( |
| 818 | 'use_wp_query!' => 'yes' |
| 819 | ) |
| 820 | ) |
| 821 | ); |
| 822 | |
| 823 | $this->add_control( |
| 824 | 'include', |
| 825 | array( |
| 826 | 'label' => __('Include posts','auxin-elements' ), |
| 827 | 'description' => __('If you intend to include additional posts, you should specify the posts here. You have to insert the Post IDs that are separated by comma (eg. 53,34,87,25)', 'auxin-elements' ), |
| 828 | 'type' => Controls_Manager::TEXT, |
| 829 | 'condition' => array( |
| 830 | 'use_wp_query!' => 'yes' |
| 831 | ) |
| 832 | ) |
| 833 | ); |
| 834 | |
| 835 | $this->add_control( |
| 836 | 'exclude', |
| 837 | array( |
| 838 | 'label' => __('Exclude posts','auxin-elements' ), |
| 839 | 'description' => __('If you intend to exclude specific posts from result, you should specify the posts here. You have to insert the Post IDs that are separated by comma (eg. 53,34,87,25)', 'auxin-elements' ), |
| 840 | 'type' => Controls_Manager::TEXT, |
| 841 | 'condition' => array( |
| 842 | 'use_wp_query!' => 'yes' |
| 843 | ) |
| 844 | ) |
| 845 | ); |
| 846 | |
| 847 | $this->add_control( |
| 848 | 'offset', |
| 849 | array( |
| 850 | 'label' => __('Start offset','auxin-elements' ), |
| 851 | 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ), |
| 852 | 'type' => Controls_Manager::NUMBER, |
| 853 | 'condition' => array( |
| 854 | 'use_wp_query!' => 'yes' |
| 855 | ) |
| 856 | ) |
| 857 | ); |
| 858 | |
| 859 | $this->end_controls_section(); |
| 860 | |
| 861 | /*-----------------------------------------------------------------------------------*/ |
| 862 | /* paginate_section |
| 863 | /*-----------------------------------------------------------------------------------*/ |
| 864 | |
| 865 | $this->start_controls_section( |
| 866 | 'paginate_section', |
| 867 | array( |
| 868 | 'label' => __('Paginate', 'auxin-elements' ), |
| 869 | ) |
| 870 | ); |
| 871 | |
| 872 | $this->add_control( |
| 873 | 'loadmore_type', |
| 874 | array( |
| 875 | 'label' => __('Load More Type','auxin-elements' ), |
| 876 | 'type' => 'aux-visual-select', |
| 877 | 'options' => array( |
| 878 | '' => array( |
| 879 | 'label' => __('None', 'auxin-elements' ), |
| 880 | 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg' |
| 881 | ), |
| 882 | 'scroll' => array( |
| 883 | 'label' => __('Infinite Scroll', 'auxin-elements' ), |
| 884 | 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg' |
| 885 | ), |
| 886 | 'next' => array( |
| 887 | 'label' => __('Next Button', 'auxin-elements' ), |
| 888 | 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg' |
| 889 | ), |
| 890 | 'next-prev' => array( |
| 891 | 'label' => __('Next Prev', 'auxin-elements' ), |
| 892 | 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg' |
| 893 | ) |
| 894 | ), |
| 895 | 'default' => '' |
| 896 | ) |
| 897 | ); |
| 898 | |
| 899 | $this->end_controls_section(); |
| 900 | |
| 901 | /*-----------------------------------------------------------------------------------*/ |
| 902 | /* image_style_section |
| 903 | /*-----------------------------------------------------------------------------------*/ |
| 904 | |
| 905 | $this->start_controls_section( |
| 906 | 'image_style_section', |
| 907 | array( |
| 908 | 'label' => __( 'Image', 'auxin-elements' ), |
| 909 | 'tab' => Controls_Manager::TAB_STYLE, |
| 910 | 'condition' => array( |
| 911 | 'show_media' => 'yes', |
| 912 | ), |
| 913 | ) |
| 914 | ); |
| 915 | |
| 916 | $this->add_control( |
| 917 | 'image_aspect_ratio', |
| 918 | array( |
| 919 | 'label' => __('Image aspect ratio', 'auxin-elements'), |
| 920 | 'type' => Controls_Manager::SELECT, |
| 921 | 'default' => '0.75', |
| 922 | 'options' => array( |
| 923 | '0.75' => __('Horizontal 4:3' , 'auxin-elements'), |
| 924 | '0.56' => __('Horizontal 16:9', 'auxin-elements'), |
| 925 | '1.00' => __('Square 1:1' , 'auxin-elements'), |
| 926 | '1.33' => __('Vertical 3:4' , 'auxin-elements'), |
| 927 | 'custom' => __('Custom' , 'auxin-elements'), |
| 928 | ), |
| 929 | 'condition' => array( |
| 930 | 'show_media' => 'yes', |
| 931 | ), |
| 932 | ) |
| 933 | ); |
| 934 | |
| 935 | |
| 936 | $this->add_responsive_control( |
| 937 | 'image_aspect_ratio_custom', |
| 938 | array( |
| 939 | 'label' => __( 'Custom Aspect Ratio', 'auxin-elements' ), |
| 940 | 'type' => Controls_Manager::SLIDER, |
| 941 | 'range' => array( |
| 942 | 'px' => array( |
| 943 | 'min' => 0, |
| 944 | 'max' => 3, |
| 945 | 'step' => 0.1 |
| 946 | ), |
| 947 | ), |
| 948 | 'condition' => array( |
| 949 | 'image_aspect_ratio' => 'custom', |
| 950 | ), |
| 951 | ) |
| 952 | ); |
| 953 | |
| 954 | $this->add_control( |
| 955 | 'img_border_radius', |
| 956 | array( |
| 957 | 'label' => __( 'Border Radius', 'auxin-elements' ), |
| 958 | 'type' => Controls_Manager::DIMENSIONS, |
| 959 | 'size_units' => array( 'px', '%' ), |
| 960 | 'selectors' => array( |
| 961 | '{{WRAPPER}} .entry-media img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', |
| 962 | ), |
| 963 | 'condition' => array( |
| 964 | 'show_media' => 'yes', |
| 965 | ), |
| 966 | ) |
| 967 | ); |
| 968 | |
| 969 | $this->start_controls_tabs( 'img_tabs' ); |
| 970 | |
| 971 | $this->start_controls_tab( |
| 972 | 'image_tab_normal', |
| 973 | array( |
| 974 | 'label' => __( 'Normal' , 'auxin-elements' ), |
| 975 | 'condition' => array( |
| 976 | 'show_media' => 'yes', |
| 977 | ), |
| 978 | ) |
| 979 | ); |
| 980 | |
| 981 | $this->add_group_control( |
| 982 | Group_Control_Box_Shadow::get_type(), |
| 983 | array( |
| 984 | 'name' => 'img_normal_box_shadow', |
| 985 | 'selector' => '{{WRAPPER}} .aux-media-image', |
| 986 | 'condition' => array( |
| 987 | 'show_media' => 'yes', |
| 988 | ), |
| 989 | ) |
| 990 | ); |
| 991 | |
| 992 | $this->end_controls_tab(); |
| 993 | |
| 994 | $this->start_controls_tab( |
| 995 | 'image_tab_hover', |
| 996 | array( |
| 997 | 'label' => __( 'Hover' , 'auxin-elements' ), |
| 998 | 'condition' => array( |
| 999 | 'show_media' => 'yes', |
| 1000 | ), |
| 1001 | ) |
| 1002 | ); |
| 1003 | |
| 1004 | $this->add_group_control( |
| 1005 | Group_Control_Box_Shadow::get_type(), |
| 1006 | array( |
| 1007 | 'name' => 'img_hover_box_shadow', |
| 1008 | 'selector' => '{{WRAPPER}} .post:hover .aux-media-image', |
| 1009 | 'condition' => array( |
| 1010 | 'show_media' => 'yes', |
| 1011 | ), |
| 1012 | ) |
| 1013 | ); |
| 1014 | |
| 1015 | $this->end_controls_tab(); |
| 1016 | |
| 1017 | $this->end_controls_tabs(); |
| 1018 | |
| 1019 | $this->end_controls_section(); |
| 1020 | |
| 1021 | /*-----------------------------------------------------------------------------------*/ |
| 1022 | /* title_style_section |
| 1023 | /*-----------------------------------------------------------------------------------*/ |
| 1024 | |
| 1025 | $this->start_controls_section( |
| 1026 | 'title_style_section', |
| 1027 | array( |
| 1028 | 'label' => __( 'Title', 'auxin-elements' ), |
| 1029 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1030 | 'condition' => array( |
| 1031 | 'display_title' => 'yes', |
| 1032 | ), |
| 1033 | ) |
| 1034 | ); |
| 1035 | |
| 1036 | $this->start_controls_tabs( 'title_colors' ); |
| 1037 | |
| 1038 | $this->start_controls_tab( |
| 1039 | 'title_color_normal', |
| 1040 | array( |
| 1041 | 'label' => __( 'Normal' , 'auxin-elements' ), |
| 1042 | 'condition' => array( |
| 1043 | 'display_title' => 'yes', |
| 1044 | ), |
| 1045 | ) |
| 1046 | ); |
| 1047 | |
| 1048 | $this->add_control( |
| 1049 | 'title_color', |
| 1050 | array( |
| 1051 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1052 | 'type' => Controls_Manager::COLOR, |
| 1053 | 'selectors' => array( |
| 1054 | '{{WRAPPER}} .entry-title a' => 'color: {{VALUE}};', |
| 1055 | ), |
| 1056 | 'condition' => array( |
| 1057 | 'display_title' => 'yes', |
| 1058 | ), |
| 1059 | ) |
| 1060 | ); |
| 1061 | |
| 1062 | $this->end_controls_tab(); |
| 1063 | |
| 1064 | $this->start_controls_tab( |
| 1065 | 'title_color_hover', |
| 1066 | array( |
| 1067 | 'label' => __( 'Hover' , 'auxin-elements' ), |
| 1068 | 'condition' => array( |
| 1069 | 'display_title' => 'yes', |
| 1070 | ), |
| 1071 | ) |
| 1072 | ); |
| 1073 | |
| 1074 | $this->add_control( |
| 1075 | 'title_hover_color', |
| 1076 | array( |
| 1077 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1078 | 'type' => Controls_Manager::COLOR, |
| 1079 | 'selectors' => array( |
| 1080 | '{{WRAPPER}} .entry-title a:hover' => 'color: {{VALUE}};', |
| 1081 | ), |
| 1082 | 'condition' => array( |
| 1083 | 'display_title' => 'yes', |
| 1084 | ), |
| 1085 | ) |
| 1086 | ); |
| 1087 | |
| 1088 | $this->end_controls_tab(); |
| 1089 | |
| 1090 | $this->end_controls_tabs(); |
| 1091 | |
| 1092 | $this->add_group_control( |
| 1093 | Group_Control_Typography::get_type(), |
| 1094 | array( |
| 1095 | 'name' => 'title_typography', |
| 1096 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1097 | 'selector' => '{{WRAPPER}} .entry-title a', |
| 1098 | 'condition' => array( |
| 1099 | 'display_title' => 'yes', |
| 1100 | ), |
| 1101 | ) |
| 1102 | ); |
| 1103 | |
| 1104 | $this->add_responsive_control( |
| 1105 | 'title_margin_bottom', |
| 1106 | array( |
| 1107 | 'label' => __( 'Bottom space', 'auxin-elements' ), |
| 1108 | 'type' => Controls_Manager::SLIDER, |
| 1109 | 'range' => array( |
| 1110 | 'px' => array( |
| 1111 | 'max' => 100, |
| 1112 | ), |
| 1113 | ), |
| 1114 | 'selectors' => array( |
| 1115 | '{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};', |
| 1116 | ), |
| 1117 | 'condition' => array( |
| 1118 | 'display_title' => 'yes', |
| 1119 | ), |
| 1120 | ) |
| 1121 | ); |
| 1122 | |
| 1123 | $this->end_controls_section(); |
| 1124 | |
| 1125 | /*-----------------------------------------------------------------------------------*/ |
| 1126 | /* info_style_section |
| 1127 | /*-----------------------------------------------------------------------------------*/ |
| 1128 | |
| 1129 | $this->start_controls_section( |
| 1130 | 'info_style_section', |
| 1131 | array( |
| 1132 | 'label' => __( 'Post Info', 'auxin-elements' ), |
| 1133 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1134 | 'condition' => array( |
| 1135 | 'show_info' => 'yes', |
| 1136 | ), |
| 1137 | ) |
| 1138 | ); |
| 1139 | |
| 1140 | $this->start_controls_tabs( 'info_colors' ); |
| 1141 | |
| 1142 | $this->start_controls_tab( |
| 1143 | 'info_color_normal', |
| 1144 | array( |
| 1145 | 'label' => __( 'Normal' , 'auxin-elements' ), |
| 1146 | 'condition' => array( |
| 1147 | 'show_info' => 'yes', |
| 1148 | ), |
| 1149 | ) |
| 1150 | ); |
| 1151 | |
| 1152 | $this->add_control( |
| 1153 | 'info_color', |
| 1154 | array( |
| 1155 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1156 | 'type' => Controls_Manager::COLOR, |
| 1157 | 'selectors' => array( |
| 1158 | '{{WRAPPER}} .entry-info a, {{WRAPPER}} .entry-info' => 'color: {{VALUE}};', |
| 1159 | ), |
| 1160 | 'condition' => array( |
| 1161 | 'show_info' => 'yes', |
| 1162 | ), |
| 1163 | ) |
| 1164 | ); |
| 1165 | |
| 1166 | $this->end_controls_tab(); |
| 1167 | |
| 1168 | $this->start_controls_tab( |
| 1169 | 'info_color_hover', |
| 1170 | array( |
| 1171 | 'label' => __( 'Hover' , 'auxin-elements' ), |
| 1172 | 'condition' => array( |
| 1173 | 'show_info' => 'yes', |
| 1174 | ), |
| 1175 | ) |
| 1176 | ); |
| 1177 | |
| 1178 | $this->add_control( |
| 1179 | 'info_hover_color', |
| 1180 | array( |
| 1181 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1182 | 'type' => Controls_Manager::COLOR, |
| 1183 | 'selectors' => array( |
| 1184 | '{{WRAPPER}} .entry-info a:hover' => 'color: {{VALUE}};', |
| 1185 | ), |
| 1186 | 'condition' => array( |
| 1187 | 'show_info' => 'yes', |
| 1188 | ), |
| 1189 | ) |
| 1190 | ); |
| 1191 | |
| 1192 | $this->end_controls_tab(); |
| 1193 | |
| 1194 | $this->end_controls_tabs(); |
| 1195 | |
| 1196 | $this->add_group_control( |
| 1197 | Group_Control_Typography::get_type(), |
| 1198 | array( |
| 1199 | 'name' => 'info_typography', |
| 1200 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1201 | 'selector' => '{{WRAPPER}} .entry-info, {{WRAPPER}} .entry-info a', |
| 1202 | 'condition' => array( |
| 1203 | 'show_info' => 'yes', |
| 1204 | ), |
| 1205 | ) |
| 1206 | ); |
| 1207 | |
| 1208 | $this->add_responsive_control( |
| 1209 | 'info_margin_bottom', |
| 1210 | array( |
| 1211 | 'label' => __( 'Bottom space', 'auxin-elements' ), |
| 1212 | 'type' => Controls_Manager::SLIDER, |
| 1213 | 'range' => array( |
| 1214 | 'px' => array( |
| 1215 | 'max' => 100 |
| 1216 | ) |
| 1217 | ), |
| 1218 | 'selectors' => array( |
| 1219 | '{{WRAPPER}} .entry-info' => 'margin-bottom: {{SIZE}}{{UNIT}};' |
| 1220 | ), |
| 1221 | 'condition' => array( |
| 1222 | 'show_info' => 'yes' |
| 1223 | ) |
| 1224 | ) |
| 1225 | ); |
| 1226 | |
| 1227 | $this->add_responsive_control( |
| 1228 | 'info_spacing_between', |
| 1229 | array( |
| 1230 | 'label' => __( 'Space between metas', 'auxin-elements' ), |
| 1231 | 'type' => Controls_Manager::SLIDER, |
| 1232 | 'range' => array( |
| 1233 | 'px' => array( |
| 1234 | 'max' => 30 |
| 1235 | ) |
| 1236 | ), |
| 1237 | 'selectors' => array( |
| 1238 | '{{WRAPPER}} .entry-info [class^="entry-"] + [class^="entry-"]:before, {{WRAPPER}} .entry-info .entry-tax a:after' => |
| 1239 | 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};' |
| 1240 | ), |
| 1241 | 'condition' => array( |
| 1242 | 'show_info' => 'yes' |
| 1243 | ) |
| 1244 | ) |
| 1245 | ); |
| 1246 | |
| 1247 | $this->end_controls_section(); |
| 1248 | |
| 1249 | /*-----------------------------------------------------------------------------------*/ |
| 1250 | /* content_style_section |
| 1251 | /*-----------------------------------------------------------------------------------*/ |
| 1252 | |
| 1253 | $this->start_controls_section( |
| 1254 | 'content_style_section', |
| 1255 | array( |
| 1256 | 'label' => __( 'Excerpt', 'auxin-elements' ), |
| 1257 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1258 | 'condition' => array( |
| 1259 | 'show_excerpt' => 'yes', |
| 1260 | ) |
| 1261 | ) |
| 1262 | ); |
| 1263 | |
| 1264 | $this->add_control( |
| 1265 | 'content_color', |
| 1266 | array( |
| 1267 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1268 | 'type' => Controls_Manager::COLOR, |
| 1269 | 'selectors' => array( |
| 1270 | '{{WRAPPER}} .entry-content' => 'color: {{VALUE}};', |
| 1271 | ), |
| 1272 | 'condition' => array( |
| 1273 | 'show_excerpt' => 'yes', |
| 1274 | ), |
| 1275 | ) |
| 1276 | ); |
| 1277 | |
| 1278 | $this->add_group_control( |
| 1279 | Group_Control_Typography::get_type(), |
| 1280 | array( |
| 1281 | 'name' => 'content_typography', |
| 1282 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1283 | 'selector' => '{{WRAPPER}} .entry-content', |
| 1284 | 'condition' => array( |
| 1285 | 'show_excerpt' => 'yes', |
| 1286 | ), |
| 1287 | ) |
| 1288 | ); |
| 1289 | |
| 1290 | $this->add_responsive_control( |
| 1291 | 'content_margin_bottom', |
| 1292 | array( |
| 1293 | 'label' => __( 'Bottom space', 'auxin-elements' ), |
| 1294 | 'type' => Controls_Manager::SLIDER, |
| 1295 | 'range' => array( |
| 1296 | 'px' => array( |
| 1297 | 'max' => 100, |
| 1298 | ), |
| 1299 | ), |
| 1300 | 'selectors' => array( |
| 1301 | '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};', |
| 1302 | ), |
| 1303 | 'condition' => array( |
| 1304 | 'show_excerpt' => 'yes', |
| 1305 | ), |
| 1306 | ) |
| 1307 | ); |
| 1308 | |
| 1309 | $this->end_controls_section(); |
| 1310 | |
| 1311 | |
| 1312 | /*-----------------------------------------------------------------------------------*/ |
| 1313 | /* badge_style_section |
| 1314 | /*-----------------------------------------------------------------------------------*/ |
| 1315 | |
| 1316 | $this->start_controls_section( |
| 1317 | 'badge_style_section', |
| 1318 | array( |
| 1319 | 'label' => __( 'Badge', 'auxin-elements' ), |
| 1320 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1321 | 'condition' => array( |
| 1322 | 'show_badge' => 'yes', |
| 1323 | ) |
| 1324 | ) |
| 1325 | ); |
| 1326 | |
| 1327 | $this->start_controls_tabs( 'badge_colors' ); |
| 1328 | |
| 1329 | $this->start_controls_tab( |
| 1330 | 'badge_color_normal', |
| 1331 | array( |
| 1332 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 1333 | ) |
| 1334 | ); |
| 1335 | |
| 1336 | $this->add_group_control( |
| 1337 | Group_Control_Background::get_type(), |
| 1338 | array( |
| 1339 | 'name' => 'badge_background_color', |
| 1340 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1341 | 'types' => array( 'classic', 'gradient' ), |
| 1342 | 'selector' => '{{WRAPPER}} .entry-badge', |
| 1343 | ) |
| 1344 | ); |
| 1345 | |
| 1346 | $this->add_control( |
| 1347 | 'badge_text_color', |
| 1348 | array( |
| 1349 | 'label' => __( 'Text', 'auxin-elements' ), |
| 1350 | 'type' => Controls_Manager::COLOR, |
| 1351 | 'selectors' => array( |
| 1352 | '{{WRAPPER}} .entry-badge a' => 'color: {{VALUE}} !important;', |
| 1353 | ) |
| 1354 | ) |
| 1355 | ); |
| 1356 | |
| 1357 | $this->end_controls_tab(); |
| 1358 | |
| 1359 | $this->start_controls_tab( |
| 1360 | 'badge_color_hover', |
| 1361 | array( |
| 1362 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1363 | ) |
| 1364 | ); |
| 1365 | |
| 1366 | $this->add_group_control( |
| 1367 | Group_Control_Background::get_type(), |
| 1368 | array( |
| 1369 | 'name' => 'badge_hover_background_color', |
| 1370 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1371 | 'types' => array( 'classic', 'gradient' ), |
| 1372 | 'selector' => '{{WRAPPER}} .entry-badge:hover', |
| 1373 | ) |
| 1374 | ); |
| 1375 | |
| 1376 | $this->add_control( |
| 1377 | 'badge_hover_text_color', |
| 1378 | array( |
| 1379 | 'label' => __( 'Text', 'auxin-elements' ), |
| 1380 | 'type' => Controls_Manager::COLOR, |
| 1381 | 'selectors' => array( |
| 1382 | '{{WRAPPER}} .entry-badge a:hover' => 'color: {{VALUE}} !important;', |
| 1383 | ) |
| 1384 | ) |
| 1385 | ); |
| 1386 | $this->end_controls_tab(); |
| 1387 | |
| 1388 | $this->end_controls_tabs(); |
| 1389 | |
| 1390 | $this->add_group_control( |
| 1391 | Group_Control_Typography::get_type(), |
| 1392 | array( |
| 1393 | 'name' => 'badge_typography', |
| 1394 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1395 | 'selector' => '{{WRAPPER}} .entry-badge a' |
| 1396 | ) |
| 1397 | ); |
| 1398 | |
| 1399 | |
| 1400 | $this->add_responsive_control( |
| 1401 | 'button_padding', |
| 1402 | array( |
| 1403 | 'label' => __( 'Padding', 'auxin-elements' ), |
| 1404 | 'type' => Controls_Manager::DIMENSIONS, |
| 1405 | 'size_units' => array( 'px', '%' ), |
| 1406 | 'selectors' => array( |
| 1407 | '{{WRAPPER}} .entry-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1408 | ) |
| 1409 | ) |
| 1410 | ); |
| 1411 | |
| 1412 | $this->add_responsive_control( |
| 1413 | 'badge_margin_bottom', |
| 1414 | array( |
| 1415 | 'label' => __( 'Bottom space', 'auxin-elements' ), |
| 1416 | 'type' => Controls_Manager::SLIDER, |
| 1417 | 'range' => array( |
| 1418 | 'px' => array( |
| 1419 | 'max' => 100, |
| 1420 | ), |
| 1421 | ), |
| 1422 | 'selectors' => array( |
| 1423 | '{{WRAPPER}} .entry-badge' => 'margin-bottom: {{SIZE}}{{UNIT}};', |
| 1424 | ) |
| 1425 | ) |
| 1426 | ); |
| 1427 | |
| 1428 | $this->end_controls_section(); |
| 1429 | |
| 1430 | /*-----------------------------------------------------------------------------------*/ |
| 1431 | /* meta_style_section |
| 1432 | /*-----------------------------------------------------------------------------------*/ |
| 1433 | |
| 1434 | $this->start_controls_section( |
| 1435 | 'meta_style_section', |
| 1436 | array( |
| 1437 | 'label' => __( 'Meta', 'auxin-elements' ), |
| 1438 | 'tab' => Controls_Manager::TAB_STYLE |
| 1439 | ) |
| 1440 | ); |
| 1441 | |
| 1442 | $this->start_controls_tabs( 'meta_colors' ); |
| 1443 | |
| 1444 | $this->start_controls_tab( |
| 1445 | 'meta_color_normal', |
| 1446 | array( |
| 1447 | 'label' => __( 'Normal' , 'auxin-elements' ), |
| 1448 | ) |
| 1449 | ); |
| 1450 | |
| 1451 | $this->add_control( |
| 1452 | 'meta_color', |
| 1453 | array( |
| 1454 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1455 | 'type' => Controls_Manager::COLOR, |
| 1456 | 'selectors' => array( |
| 1457 | '{{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta span' => 'color: {{VALUE}};', |
| 1458 | ) |
| 1459 | ) |
| 1460 | ); |
| 1461 | |
| 1462 | $this->end_controls_tab(); |
| 1463 | |
| 1464 | $this->start_controls_tab( |
| 1465 | 'meta_color_hover', |
| 1466 | array( |
| 1467 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1468 | ) |
| 1469 | ); |
| 1470 | |
| 1471 | $this->add_control( |
| 1472 | 'meta_hover_color', |
| 1473 | array( |
| 1474 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1475 | 'type' => Controls_Manager::COLOR, |
| 1476 | 'selectors' => array( |
| 1477 | '{{WRAPPER}} .entry-meta a:hover, {{WRAPPER}} .entry-meta span:hover' => 'color: {{VALUE}};', |
| 1478 | ) |
| 1479 | ) |
| 1480 | ); |
| 1481 | |
| 1482 | $this->end_controls_tab(); |
| 1483 | |
| 1484 | $this->end_controls_tabs(); |
| 1485 | |
| 1486 | $this->add_group_control( |
| 1487 | Group_Control_Typography::get_type(), |
| 1488 | array( |
| 1489 | 'name' => 'meta_typography', |
| 1490 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1491 | 'selector' => '{{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta span' |
| 1492 | ) |
| 1493 | ); |
| 1494 | |
| 1495 | $this->add_responsive_control( |
| 1496 | 'meta_padding', |
| 1497 | array( |
| 1498 | 'label' => __( 'Padding for meta wrapper', 'auxin-elements' ), |
| 1499 | 'type' => Controls_Manager::DIMENSIONS, |
| 1500 | 'size_units' => array( 'px', '%' ), |
| 1501 | 'selectors' => array( |
| 1502 | '{{WRAPPER}} .entry-meta' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1503 | ) |
| 1504 | ) |
| 1505 | ); |
| 1506 | |
| 1507 | $this->add_responsive_control( |
| 1508 | 'meta_margin_bottom', |
| 1509 | array( |
| 1510 | 'label' => __( 'Bottom space', 'auxin-elements' ), |
| 1511 | 'type' => Controls_Manager::SLIDER, |
| 1512 | 'range' => array( |
| 1513 | 'px' => array( |
| 1514 | 'max' => 100, |
| 1515 | ), |
| 1516 | ), |
| 1517 | 'selectors' => array( |
| 1518 | '{{WRAPPER}} .entry-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};', |
| 1519 | ) |
| 1520 | ) |
| 1521 | ); |
| 1522 | |
| 1523 | $this->end_controls_section(); |
| 1524 | |
| 1525 | |
| 1526 | /* wrapper_style_section |
| 1527 | /*-------------------------------------*/ |
| 1528 | |
| 1529 | $this->start_controls_section( |
| 1530 | 'wrapper_style_section', |
| 1531 | array( |
| 1532 | 'label' => __( 'Wrapper', 'auxin-elements' ), |
| 1533 | 'tab' => Controls_Manager::TAB_STYLE |
| 1534 | ) |
| 1535 | ); |
| 1536 | |
| 1537 | $this->add_responsive_control( |
| 1538 | 'wrapper_main_padding', |
| 1539 | array( |
| 1540 | 'label' => __( 'Padding for main wrapper', 'auxin-elements' ), |
| 1541 | 'type' => Controls_Manager::DIMENSIONS, |
| 1542 | 'size_units' => array( 'px', '%' ), |
| 1543 | 'selectors' => array( |
| 1544 | '{{WRAPPER}} .column-entry' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1545 | ) |
| 1546 | ) |
| 1547 | ); |
| 1548 | |
| 1549 | $this->add_responsive_control( |
| 1550 | 'wrapper_content_padding', |
| 1551 | array( |
| 1552 | 'label' => __( 'Padding for content wrapper', 'auxin-elements' ), |
| 1553 | 'type' => Controls_Manager::DIMENSIONS, |
| 1554 | 'size_units' => array( 'px', '%' ), |
| 1555 | 'selectors' => array( |
| 1556 | '{{WRAPPER}} .type-post .entry-main' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1557 | ) |
| 1558 | ) |
| 1559 | ); |
| 1560 | |
| 1561 | $this->start_controls_tabs( 'button_background' ); |
| 1562 | |
| 1563 | $this->start_controls_tab( |
| 1564 | 'button_bg_normal', |
| 1565 | array( |
| 1566 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 1567 | ) |
| 1568 | ); |
| 1569 | |
| 1570 | $this->add_group_control( |
| 1571 | Group_Control_Background::get_type(), |
| 1572 | array( |
| 1573 | 'name' => 'background', |
| 1574 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1575 | 'types' => array( 'classic', 'gradient' ), |
| 1576 | 'selector' => '{{WRAPPER}} .aux-col .column-entry', |
| 1577 | ) |
| 1578 | ); |
| 1579 | |
| 1580 | $this->add_group_control( |
| 1581 | Group_Control_Box_Shadow::get_type(), |
| 1582 | array( |
| 1583 | 'name' => 'box_shadow', |
| 1584 | 'selector' => '{{WRAPPER}} .aux-col .column-entry' |
| 1585 | ) |
| 1586 | ); |
| 1587 | |
| 1588 | $this->end_controls_tab(); |
| 1589 | |
| 1590 | $this->start_controls_tab( |
| 1591 | 'button_bg_hover', |
| 1592 | array( |
| 1593 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1594 | ) |
| 1595 | ); |
| 1596 | |
| 1597 | $this->add_control( |
| 1598 | 'general_hover_text_color', |
| 1599 | array( |
| 1600 | 'label' => __( 'Text Color', 'auxin-elements' ), |
| 1601 | 'type' => Controls_Manager::COLOR, |
| 1602 | 'selectors' => array( |
| 1603 | '{{WRAPPER}} .aux-col:hover .entry-main a, {{WRAPPER}} .aux-col:hover .entry-main *' => 'transition:all 150ms ease; color:{{VALUE}};' |
| 1604 | ) |
| 1605 | ) |
| 1606 | ); |
| 1607 | |
| 1608 | $this->add_group_control( |
| 1609 | Group_Control_Background::get_type(), |
| 1610 | array( |
| 1611 | 'name' => 'hover_background', |
| 1612 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1613 | 'types' => array( 'classic', 'gradient' ), |
| 1614 | 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry', |
| 1615 | ) |
| 1616 | ); |
| 1617 | |
| 1618 | $this->add_group_control( |
| 1619 | Group_Control_Box_Shadow::get_type(), |
| 1620 | array( |
| 1621 | 'name' => 'hover_box_shadow', |
| 1622 | 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry' |
| 1623 | ) |
| 1624 | ); |
| 1625 | |
| 1626 | $this->add_control( |
| 1627 | 'hover_wrapper_transition_duration', |
| 1628 | array( |
| 1629 | 'label' => __( 'Transition duration', 'auxin-elements' ), |
| 1630 | 'type' => Controls_Manager::SLIDER, |
| 1631 | 'range' => array( |
| 1632 | 'px' => array( |
| 1633 | 'min' => 0, |
| 1634 | 'max' => 2000, |
| 1635 | 'step' => 50 |
| 1636 | ) |
| 1637 | ), |
| 1638 | 'selectors' => array( |
| 1639 | '{{WRAPPER}} .aux-col:hover .column-entry' => 'transition-duration:{{SIZE}}ms;' |
| 1640 | ) |
| 1641 | ) |
| 1642 | ); |
| 1643 | |
| 1644 | $this->end_controls_tab(); |
| 1645 | |
| 1646 | $this->end_controls_tabs(); |
| 1647 | |
| 1648 | $this->add_responsive_control( |
| 1649 | 'align', |
| 1650 | array( |
| 1651 | 'label' => __('Align','auxin-elements'), |
| 1652 | 'type' => Controls_Manager::CHOOSE, |
| 1653 | 'devices' => array( 'desktop', 'mobile' ), |
| 1654 | 'options' => array( |
| 1655 | 'left' => array( |
| 1656 | 'title' => __( 'Left', 'auxin-elements' ), |
| 1657 | 'icon' => 'fa fa-align-left', |
| 1658 | ), |
| 1659 | 'center' => array( |
| 1660 | 'title' => __( 'Center', 'auxin-elements' ), |
| 1661 | 'icon' => 'fa fa-align-center', |
| 1662 | ), |
| 1663 | 'right' => array( |
| 1664 | 'title' => __( 'Right', 'auxin-elements' ), |
| 1665 | 'icon' => 'fa fa-align-right', |
| 1666 | ), |
| 1667 | ), |
| 1668 | 'default' => 'left', |
| 1669 | 'toggle' => true, |
| 1670 | 'selectors' => array( |
| 1671 | '{{WRAPPER}}' => 'text-align: {{VALUE}}', |
| 1672 | ) |
| 1673 | ) |
| 1674 | ); |
| 1675 | |
| 1676 | $this->end_controls_section(); |
| 1677 | |
| 1678 | /* flip_wrapper_style_section |
| 1679 | /*-------------------------------------*/ |
| 1680 | |
| 1681 | $this->start_controls_section( |
| 1682 | 'flip_wrapper_style_section', |
| 1683 | array( |
| 1684 | 'label' => __( 'Flip Wrapper', 'auxin-elements' ), |
| 1685 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1686 | 'condition' => array( |
| 1687 | 'preview_mode' => 'flip' |
| 1688 | ) |
| 1689 | ) |
| 1690 | ); |
| 1691 | |
| 1692 | $this->start_controls_tabs( 'flip_button_background' ); |
| 1693 | |
| 1694 | $this->start_controls_tab( |
| 1695 | 'flip_button_bg_normal', |
| 1696 | array( |
| 1697 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 1698 | ) |
| 1699 | ); |
| 1700 | |
| 1701 | $this->add_group_control( |
| 1702 | Group_Control_Background::get_type(), |
| 1703 | array( |
| 1704 | 'name' => 'flip_background', |
| 1705 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1706 | 'types' => array( 'classic', 'gradient' ), |
| 1707 | 'selector' => '{{WRAPPER}} .aux-col .aux-flip-back', |
| 1708 | ) |
| 1709 | ); |
| 1710 | |
| 1711 | $this->add_group_control( |
| 1712 | Group_Control_Box_Shadow::get_type(), |
| 1713 | array( |
| 1714 | 'name' => 'flip_box_shadow', |
| 1715 | 'selector' => '{{WRAPPER}} .aux-col .aux-flip-back' |
| 1716 | ) |
| 1717 | ); |
| 1718 | |
| 1719 | $this->end_controls_tab(); |
| 1720 | |
| 1721 | $this->start_controls_tab( |
| 1722 | 'flip_button_bg_hover', |
| 1723 | array( |
| 1724 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1725 | ) |
| 1726 | ); |
| 1727 | |
| 1728 | $this->add_control( |
| 1729 | 'flip_general_hover_text_color', |
| 1730 | array( |
| 1731 | 'label' => __( 'Text Color', 'auxin-elements' ), |
| 1732 | 'type' => Controls_Manager::COLOR, |
| 1733 | 'selectors' => array( |
| 1734 | '{{WRAPPER}} .aux-col:hover .aux-flip-back .entry-main a, {{WRAPPER}} .aux-col:hover .aux-flip-back .entry-main *' => 'transition:all 150ms ease; color:{{VALUE}};' |
| 1735 | ) |
| 1736 | ) |
| 1737 | ); |
| 1738 | |
| 1739 | $this->add_group_control( |
| 1740 | Group_Control_Background::get_type(), |
| 1741 | array( |
| 1742 | 'name' => 'flip_hover_background', |
| 1743 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1744 | 'types' => array( 'classic', 'gradient' ), |
| 1745 | 'selector' => '{{WRAPPER}} .aux-col:hover .aux-flip-back', |
| 1746 | ) |
| 1747 | ); |
| 1748 | |
| 1749 | $this->add_group_control( |
| 1750 | Group_Control_Box_Shadow::get_type(), |
| 1751 | array( |
| 1752 | 'name' => 'flip_hover_box_shadow', |
| 1753 | 'selector' => '{{WRAPPER}} .aux-col:hover .aux-flip-back' |
| 1754 | ) |
| 1755 | ); |
| 1756 | |
| 1757 | $this->end_controls_tab(); |
| 1758 | |
| 1759 | $this->end_controls_tabs(); |
| 1760 | |
| 1761 | $this->add_responsive_control( |
| 1762 | 'flip_align', |
| 1763 | array( |
| 1764 | 'label' => __('Align','auxin-elements'), |
| 1765 | 'type' => Controls_Manager::CHOOSE, |
| 1766 | 'devices' => array( 'desktop', 'mobile' ), |
| 1767 | 'options' => array( |
| 1768 | 'left' => array( |
| 1769 | 'title' => __( 'Left', 'auxin-elements' ), |
| 1770 | 'icon' => 'fa fa-align-left', |
| 1771 | ), |
| 1772 | 'center' => array( |
| 1773 | 'title' => __( 'Center', 'auxin-elements' ), |
| 1774 | 'icon' => 'fa fa-align-center', |
| 1775 | ), |
| 1776 | 'right' => array( |
| 1777 | 'title' => __( 'Right', 'auxin-elements' ), |
| 1778 | 'icon' => 'fa fa-align-right', |
| 1779 | ), |
| 1780 | ), |
| 1781 | 'default' => 'left', |
| 1782 | 'toggle' => true, |
| 1783 | 'selectors' => array( |
| 1784 | '{{WRAPPER}} .aux-flip-back' => 'text-align: {{VALUE}}', |
| 1785 | ) |
| 1786 | ) |
| 1787 | ); |
| 1788 | |
| 1789 | $this->add_responsive_control( |
| 1790 | 'flip_wrapper_padding', |
| 1791 | array( |
| 1792 | 'label' => __( 'Padding for content wrapper', 'auxin-elements' ), |
| 1793 | 'type' => Controls_Manager::DIMENSIONS, |
| 1794 | 'size_units' => array( 'px', '%' ), |
| 1795 | 'selectors' => array( |
| 1796 | '{{WRAPPER}} .type-post .aux-flip-back' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1797 | ) |
| 1798 | ) |
| 1799 | ); |
| 1800 | |
| 1801 | $this->end_controls_section(); |
| 1802 | |
| 1803 | /*-----------------------------------------------------------------------------------*/ |
| 1804 | /* ReadMore Button |
| 1805 | /*-----------------------------------------------------------------------------------*/ |
| 1806 | |
| 1807 | $this->start_controls_section( |
| 1808 | 'btn_section', |
| 1809 | array( |
| 1810 | 'label' => __('Read More', 'auxin-elements' ), |
| 1811 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1812 | ) |
| 1813 | ); |
| 1814 | |
| 1815 | $this->start_controls_tabs( 'btn_bg_tab' ); |
| 1816 | |
| 1817 | $this->start_controls_tab( |
| 1818 | 'btn_bg_normal', |
| 1819 | array( |
| 1820 | 'label' => __( 'Normal' , 'auxin-elements' ) |
| 1821 | ) |
| 1822 | ); |
| 1823 | |
| 1824 | $this->add_group_control( |
| 1825 | Group_Control_Background::get_type(), |
| 1826 | array( |
| 1827 | 'name' => 'btn', |
| 1828 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1829 | 'types' => array( 'classic', 'gradient' ), |
| 1830 | 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more', |
| 1831 | ) |
| 1832 | ); |
| 1833 | |
| 1834 | $this->add_group_control( |
| 1835 | Group_Control_Box_Shadow::get_type(), |
| 1836 | array( |
| 1837 | 'name' => 'btn_shadow', |
| 1838 | 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more' |
| 1839 | ) |
| 1840 | ); |
| 1841 | |
| 1842 | $this->add_control( |
| 1843 | 'btn_text_color', |
| 1844 | array( |
| 1845 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1846 | 'type' => Controls_Manager::COLOR, |
| 1847 | 'selectors' => array( |
| 1848 | '{{WRAPPER}} .entry-meta .aux-read-more' => 'color: {{VALUE}};', |
| 1849 | ) |
| 1850 | ) |
| 1851 | ); |
| 1852 | |
| 1853 | $this->add_group_control( |
| 1854 | Group_Control_Text_Shadow::get_type(), |
| 1855 | array( |
| 1856 | 'name' => 'btn_text_shadow', |
| 1857 | 'label' => __( 'Text Shadow', 'auxin-elements' ), |
| 1858 | 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more', |
| 1859 | ) |
| 1860 | ); |
| 1861 | |
| 1862 | $this->add_group_control( |
| 1863 | Group_Control_Typography::get_type(), |
| 1864 | array( |
| 1865 | 'name' => 'btn_text_typography', |
| 1866 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1867 | 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more' |
| 1868 | ) |
| 1869 | ); |
| 1870 | |
| 1871 | $this->end_controls_tab(); |
| 1872 | |
| 1873 | $this->start_controls_tab( |
| 1874 | 'btn_bg_hover', |
| 1875 | array( |
| 1876 | 'label' => __( 'Hover' , 'auxin-elements' ) |
| 1877 | ) |
| 1878 | ); |
| 1879 | |
| 1880 | $this->add_group_control( |
| 1881 | Group_Control_Background::get_type(), |
| 1882 | array( |
| 1883 | 'name' => 'btn_bg_hover', |
| 1884 | 'label' => __( 'Background', 'auxin-elements' ), |
| 1885 | 'types' => array( 'classic', 'gradient' ), |
| 1886 | 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover', |
| 1887 | ) |
| 1888 | ); |
| 1889 | |
| 1890 | $this->add_group_control( |
| 1891 | Group_Control_Box_Shadow::get_type(), |
| 1892 | array( |
| 1893 | 'name' => 'btn_shadow_hover', |
| 1894 | 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover' |
| 1895 | ) |
| 1896 | ); |
| 1897 | |
| 1898 | $this->add_control( |
| 1899 | 'btn_text_color_hover', |
| 1900 | array( |
| 1901 | 'label' => __( 'Color', 'auxin-elements' ), |
| 1902 | 'type' => Controls_Manager::COLOR, |
| 1903 | 'selectors' => array( |
| 1904 | '{{WRAPPER}} .entry-meta .aux-read-more:hover' => 'color: {{VALUE}};', |
| 1905 | ) |
| 1906 | ) |
| 1907 | ); |
| 1908 | |
| 1909 | $this->add_group_control( |
| 1910 | Group_Control_Text_Shadow::get_type(), |
| 1911 | array( |
| 1912 | 'name' => 'btn_text_shadow_hover', |
| 1913 | 'label' => __( 'Text Shadow', 'auxin-elements' ), |
| 1914 | 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover', |
| 1915 | ) |
| 1916 | ); |
| 1917 | |
| 1918 | $this->add_group_control( |
| 1919 | Group_Control_Typography::get_type(), |
| 1920 | array( |
| 1921 | 'name' => 'btn_text_typography_hover', |
| 1922 | 'scheme' => Typography::TYPOGRAPHY_1, |
| 1923 | 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover' |
| 1924 | ) |
| 1925 | ); |
| 1926 | |
| 1927 | $this->end_controls_tab(); |
| 1928 | |
| 1929 | $this->end_controls_tabs(); |
| 1930 | |
| 1931 | $this->add_responsive_control( |
| 1932 | 'btn_padding', |
| 1933 | array( |
| 1934 | 'label' => __( 'Button Padding', 'auxin-elements' ), |
| 1935 | 'type' => Controls_Manager::DIMENSIONS, |
| 1936 | 'size_units' => array( 'px', '%' ), |
| 1937 | 'selectors' => array( |
| 1938 | '{{WRAPPER}} .entry-meta .aux-read-more' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1939 | ), |
| 1940 | ) |
| 1941 | ); |
| 1942 | |
| 1943 | $this->end_controls_section(); |
| 1944 | |
| 1945 | } |
| 1946 | |
| 1947 | /** |
| 1948 | * Render image box widget output on the frontend. |
| 1949 | * |
| 1950 | * Written in PHP and used to generate the final HTML. |
| 1951 | * |
| 1952 | * @since 1.0.0 |
| 1953 | * @access protected |
| 1954 | */ |
| 1955 | protected function render() { |
| 1956 | |
| 1957 | $settings = $this->get_settings_for_display(); |
| 1958 | $settings['post_media_size'] = $settings['post_media_size'] == 'auto' ? '' : $settings['post_media_size']; |
| 1959 | |
| 1960 | if ( ! in_array( $settings['post_media_size'], auxin_get_available_image_sizes() ) ) { |
| 1961 | $settings['post_media_size'] = ''; |
| 1962 | } |
| 1963 | |
| 1964 | $args = array( |
| 1965 | // Display section |
| 1966 | 'show_media' => $settings['show_media'], |
| 1967 | 'size' => $settings['post_media_size'], |
| 1968 | 'ignore_formats' => $settings['ignore_formats'], |
| 1969 | 'preloadable' => $settings['preloadable'], |
| 1970 | 'preload_preview' => $settings['preload_preview'], |
| 1971 | 'preload_bgcolor' => $settings['preload_bgcolor'], |
| 1972 | 'display_title' => $settings['display_title'], |
| 1973 | 'words_num' => $settings['words_num'], |
| 1974 | 'show_info' => $settings['show_info'], |
| 1975 | 'show_format_icon' => $settings['show_format_icon'], |
| 1976 | 'post_info_position' => $settings['post_info_position'], |
| 1977 | 'meta_info_position' => $settings['meta_info_position'], |
| 1978 | 'display_comments' => $settings['display_comments'], |
| 1979 | 'display_like' => $settings['display_like'], |
| 1980 | 'show_content' => $settings['show_content'], |
| 1981 | 'display_categories' => $settings['display_categories'], |
| 1982 | 'show_badge' => $settings['show_badge'], |
| 1983 | 'show_date' => $settings['show_date'], |
| 1984 | 'show_excerpt' => $settings['show_excerpt'], |
| 1985 | 'excerpt_len' => $settings['excerpt_len'], |
| 1986 | 'author_or_readmore' => $settings['author_or_readmore'], |
| 1987 | 'display_author_header' => $settings['display_author_header'], |
| 1988 | 'display_author_footer' => $settings['display_author_footer'], |
| 1989 | |
| 1990 | // Content Section |
| 1991 | 'desktop_cnum' => $settings['columns'], |
| 1992 | 'tablet_cnum' => $settings['columns_tablet'], |
| 1993 | 'phone_cnum' => $settings['columns_mobile'], |
| 1994 | 'preview_mode' => $settings['preview_mode'], |
| 1995 | 'content_layout' => $settings['content_layout'], |
| 1996 | 'grid_table_hover' => $settings['grid_table_hover'], |
| 1997 | 'carousel_space' => $settings['carousel_space'], |
| 1998 | 'carousel_navigation' => $settings['carousel_navigation'], |
| 1999 | 'carousel_navigation_control' => $settings['carousel_navigation_control'], |
| 2000 | 'carousel_nav_control_pos' => $settings['carousel_nav_control_pos'], |
| 2001 | 'carousel_nav_control_skin' => $settings['carousel_nav_control_skin'], |
| 2002 | 'carousel_loop' => $settings['carousel_loop'], |
| 2003 | 'carousel_autoplay' => $settings['carousel_autoplay'], |
| 2004 | 'carousel_autoplay_delay' => $settings['carousel_autoplay_delay'], |
| 2005 | |
| 2006 | // Query Section |
| 2007 | 'cat' => $settings['cat'], |
| 2008 | 'num' => $settings['num'], |
| 2009 | 'exclude_without_media' => $settings['exclude_without_media'], |
| 2010 | 'exclude_custom_post_formats' => $settings['exclude_custom_post_formats'], |
| 2011 | 'include_post_formats_in' => $settings['include_post_formats_in'], |
| 2012 | 'exclude_quote_link' => $settings['exclude_quote_link'], |
| 2013 | 'order_by' => $settings['order_by'], |
| 2014 | 'order' => $settings['order'], |
| 2015 | 'only_posts__in' => $settings['only_posts__in'], |
| 2016 | 'include' => $settings['include'], |
| 2017 | 'exclude' => $settings['exclude'], |
| 2018 | 'offset' => $settings['offset'], |
| 2019 | |
| 2020 | // Paginate Section |
| 2021 | 'loadmore_type' => $settings['loadmore_type'], |
| 2022 | |
| 2023 | // Style Section |
| 2024 | 'image_aspect_ratio' => $settings['image_aspect_ratio'] === 'custom' ? $settings['image_aspect_ratio_custom']['size'] : $settings['image_aspect_ratio'], |
| 2025 | ); |
| 2026 | |
| 2027 | $args['image_aspect_ratio'] = empty( $args['image_aspect_ratio' ] ) ? 0.75 : $args['image_aspect_ratio']; |
| 2028 | |
| 2029 | if( auxin_is_true( $settings['use_wp_query'] ) ){ |
| 2030 | $args['use_wp_query'] = true; |
| 2031 | $args['reset_query'] = false; |
| 2032 | $args['request_from'] = 'archive'; |
| 2033 | $args['paged'] = max( 1, get_query_var('paged'), get_query_var('page') ); |
| 2034 | } |
| 2035 | |
| 2036 | // get the shortcode base blog page |
| 2037 | echo auxin_widget_recent_posts_callback( $args ); |
| 2038 | |
| 2039 | } |
| 2040 | |
| 2041 | } |
| 2042 |