| @@ -170,8 +170,9 @@ | ||
| 170 | 170 | $this->add_group_control( |
| 171 | 171 | Group_Control_Image_Size::get_type(), |
| 172 | 172 | [ |
| 173 | 173 | 'name' => 'primary_thumbnail', |
| 174 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 174 | 175 | 'exclude' => ['custom'], |
| 175 | 176 | 'default' => 'medium', |
| 176 | 177 | ] |
| 177 | 178 | ); |
| @@ -200,8 +201,11 @@ | ||
| 200 | 201 | ], |
| 201 | 202 | 'default' => [ |
| 202 | 203 | 'size' => 5, |
| 203 | 204 | ], |
| 205 | + 'condition' => [ | |
| 206 | + 'posts_source!' => 'current_query', | |
| 207 | + ] | |
| 204 | 208 | ] |
| 205 | 209 | ); |
| 206 | 210 | |
| 207 | 211 | $this->register_query_builder_controls(); |
| @@ -283,9 +287,9 @@ | ||
| 283 | 287 | 'label' => esc_html__('Content Padding', 'ultimate-post-kit'), |
| 284 | 288 | 'type' => Controls_Manager::DIMENSIONS, |
| 285 | 289 | 'size_units' => ['px', 'em', '%'], |
| 286 | 290 | 'selectors' => [ |
| 287 | - '{{WRAPPER}} .upk-alice-carousel .upk-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 291 | + '{{WRAPPER}} .upk-alice-carousel .upk-item-box .upk-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 288 | 292 | ], |
| 289 | 293 | ] |
| 290 | 294 | ); |
| 291 | 295 | |
| @@ -303,9 +307,9 @@ | ||
| 303 | 307 | [ |
| 304 | 308 | 'label' => esc_html__('Glassmorphism', 'ultimate-post-kit'), |
| 305 | 309 | 'type' => Controls_Manager::SWITCHER, |
| 306 | 310 | // translators: %1s: Opening anchor tag with link to MDN backdrop-filter documentation, %2s: Closing anchor tag |
| 307 | - 'description' => sprintf(__('This feature will not work in the Firefox browser untill you enable browser compatibility so please %1s look here %2s', 'ultimate-post-kit'), '<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility" target="_blank">', '</a>'), | |
| 311 | + 'description' => sprintf(__('This feature will not work in the Firefox browser untill you enable browser compatibility so please %1$s look here %2$s', 'ultimate-post-kit'), '<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility" target="_blank">', '</a>'), | |
| 308 | 312 | ] |
| 309 | 313 | ); |
| 310 | 314 | |
| 311 | 315 | $this->add_control( |
| @@ -346,9 +350,9 @@ | ||
| 346 | 350 | $this->add_group_control( |
| 347 | 351 | Group_Control_Border::get_type(), |
| 348 | 352 | [ |
| 349 | 353 | 'name' => 'item_border', |
| 350 | - 'selector' => '{{WRAPPER}} .upk-alice-carousel .upk-item', | |
| 354 | + 'selector' => '{{WRAPPER}} .upk-alice-carousel .upk-item-box', | |
| 351 | 355 | ] |
| 352 | 356 | ); |
| 353 | 357 | |
| 354 | 358 | $this->add_responsive_control( |
| @@ -369,9 +373,9 @@ | ||
| 369 | 373 | 'label' => esc_html__('Padding', 'ultimate-post-kit'), |
| 370 | 374 | 'type' => Controls_Manager::DIMENSIONS, |
| 371 | 375 | 'size_units' => ['px', 'em', '%'], |
| 372 | 376 | 'selectors' => [ |
| 373 | - '{{WRAPPER}} .upk-alice-carousel .upk-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 377 | + '{{WRAPPER}} .upk-alice-carousel .upk-item-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 374 | 378 | ], |
| 375 | 379 | ] |
| 376 | 380 | ); |
| 377 | 381 | |
| @@ -378,9 +382,9 @@ | ||
| 378 | 382 | $this->add_group_control( |
| 379 | 383 | Group_Control_Box_Shadow::get_type(), |
| 380 | 384 | [ |
| 381 | 385 | 'name' => 'item_box_shadow', |
| 382 | - 'selector' => '{{WRAPPER}} .upk-alice-carousel .upk-item', | |
| 386 | + 'selector' => '{{WRAPPER}} .upk-alice-carousel .upk-item-box', | |
| 383 | 387 | ] |
| 384 | 388 | ); |
| 385 | 389 | |
| 386 | 390 | $this->end_controls_tab(); |
| @@ -435,9 +439,9 @@ | ||
| 435 | 439 | 'condition' => [ |
| 436 | 440 | 'item_border_border!' => '', |
| 437 | 441 | ], |
| 438 | 442 | 'selectors' => [ |
| 439 | - '{{WRAPPER}} .upk-alice-carousel .upk-item:hover' => 'border-color: {{VALUE}};', | |
| 443 | + '{{WRAPPER}} .upk-alice-carousel .upk-item-box:hover' => 'border-color: {{VALUE}};', | |
| 440 | 444 | ], |
| 441 | 445 | ] |
| 442 | 446 | ); |
| 443 | 447 | |
| @@ -444,9 +448,9 @@ | ||
| 444 | 448 | $this->add_group_control( |
| 445 | 449 | Group_Control_Box_Shadow::get_type(), |
| 446 | 450 | [ |
| 447 | 451 | 'name' => 'item_hover_box_shadow', |
| 448 | - 'selector' => '{{WRAPPER}} .upk-alice-carousel .upk-item:hover', | |
| 452 | + 'selector' => '{{WRAPPER}} .upk-alice-carousel .upk-item-box:hover', | |
| 449 | 453 | ] |
| 450 | 454 | ); |
| 451 | 455 | |
| 452 | 456 | $this->add_responsive_control( |
| @@ -845,9 +849,8 @@ | ||
| 845 | 849 | $default = $this->getGroupControlQueryArgs(); |
| 846 | 850 | $args = []; |
| 847 | 851 | if ($posts_per_page) { |
| 848 | 852 | $args['posts_per_page'] = $posts_per_page; |
| 849 | - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page')); | |
| 850 | 853 | } |
| 851 | 854 | $args = array_merge($default, $args); |
| 852 | 855 | $this->_query = new WP_Query($args); |
| 853 | 856 | } |
| @@ -878,9 +881,9 @@ | ||
| 878 | 881 | $this->render_header_attribute('alice'); |
| 879 | 882 | |
| 880 | 883 | ?> |
| 881 | 884 | <div <?php $this->print_render_attribute_string('carousel'); ?>> |
| 882 | - <div class="upk-content-<?php echo esc_html($settings['content_position']) ?>"> | |
| 885 | + <div class="upk-content-<?php echo esc_attr($settings['content_position']) ?>"> | |
| 883 | 886 | <div <?php $this->print_render_attribute_string('swiper'); ?>> |
| 884 | 887 | <div class="swiper-wrapper"> |
| 885 | 888 | <?php |
| 886 | 889 | } |
| @@ -905,14 +908,14 @@ | ||
| 905 | 908 | <?php $this->render_title(substr($this->get_name(), 4)); ?> |
| 906 | 909 | <?php if ($settings['show_author'] or $settings['show_date'] or $settings['show_reading_time']) : ?> |
| 907 | 910 | <div class="upk-meta"> |
| 908 | 911 | <?php $this->render_author(); ?> |
| 909 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 912 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 910 | 913 | <?php $this->render_date(); ?> |
| 911 | 914 | </div> |
| 912 | 915 | <?php if (_is_upk_pro_activated()) : |
| 913 | 916 | if ('yes' === $settings['show_reading_time']) : ?> |
| 914 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 917 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 915 | 918 | <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?> |
| 916 | 919 | </div> |
| 917 | 920 | <?php endif; ?> |
| 918 | 921 | <?php endif; ?> |