| @@ -162,8 +162,9 @@ | ||
| 162 | 162 | $this->add_group_control( |
| 163 | 163 | Group_Control_Image_Size::get_type(), |
| 164 | 164 | [ |
| 165 | 165 | 'name' => 'primary_thumbnail', |
| 166 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 166 | 167 | 'exclude' => ['custom'], |
| 167 | 168 | 'default' => 'full', |
| 168 | 169 | ] |
| 169 | 170 | ); |
| @@ -243,9 +244,9 @@ | ||
| 243 | 244 | |
| 244 | 245 | $this->add_control( |
| 245 | 246 | 'show_readmore', |
| 246 | 247 | [ |
| 247 | - 'label' => esc_html__('Show Read more', 'ultimate-post-kit'), | |
| 248 | + 'label' => esc_html__('Show Read More', 'ultimate-post-kit'), | |
| 248 | 249 | 'type' => Controls_Manager::SWITCHER, |
| 249 | 250 | 'default' => 'yes', |
| 250 | 251 | 'separator' => 'before' |
| 251 | 252 | ] |
| @@ -315,8 +316,11 @@ | ||
| 315 | 316 | ], |
| 316 | 317 | 'default' => [ |
| 317 | 318 | 'size' => 5, |
| 318 | 319 | ], |
| 320 | + 'condition' => [ | |
| 321 | + 'posts_source!' => 'current_query', | |
| 322 | + ] | |
| 319 | 323 | ] |
| 320 | 324 | ); |
| 321 | 325 | |
| 322 | 326 | $this->register_query_builder_controls(); |
| @@ -354,10 +358,13 @@ | ||
| 354 | 358 | |
| 355 | 359 | $this->add_control( |
| 356 | 360 | 'pauseonhover', |
| 357 | 361 | [ |
| 358 | - 'label' => esc_html__( 'Pause on Hover', 'ultimate-post-kit' ), | |
| 359 | - 'type' => Controls_Manager::SWITCHER, | |
| 362 | + 'label' => esc_html__( 'Pause on Hover', 'ultimate-post-kit' ), | |
| 363 | + 'type' => Controls_Manager::SWITCHER, | |
| 364 | + 'condition' => [ | |
| 365 | + 'autoplay' => 'yes', | |
| 366 | + ], | |
| 360 | 367 | ] |
| 361 | 368 | ); |
| 362 | 369 | |
| 363 | 370 | $this->add_control( |
| @@ -912,8 +919,11 @@ | ||
| 912 | 919 | 'section_style_link_btn', |
| 913 | 920 | [ |
| 914 | 921 | 'label' => esc_html__('Read More', 'ultimate-post-kit'), |
| 915 | 922 | 'tab' => Controls_Manager::TAB_STYLE, |
| 923 | + 'condition' => [ | |
| 924 | + 'show_readmore' => 'yes' | |
| 925 | + ], | |
| 916 | 926 | ] |
| 917 | 927 | ); |
| 918 | 928 | |
| 919 | 929 | $this->start_controls_tabs('tabs_link_btn_style'); |
| @@ -1350,9 +1360,8 @@ | ||
| 1350 | 1360 | $default = $this->getGroupControlQueryArgs(); |
| 1351 | 1361 | $args = []; |
| 1352 | 1362 | if ( $posts_per_page ) { |
| 1353 | 1363 | $args['posts_per_page'] = $posts_per_page; |
| 1354 | - // $args['paged'] = max( 1, get_query_var( 'paged' ), get_query_var( 'page' ) ); | |
| 1355 | 1364 | } |
| 1356 | 1365 | $args = array_merge( $default, $args ); |
| 1357 | 1366 | $this->_query = new WP_Query( $args ); |
| 1358 | 1367 | } |
| @@ -1490,9 +1499,9 @@ | ||
| 1490 | 1499 | <div class="upk-meta" data-swiper-parallax-x ="-60" data-swiper-parallax-duration="600"> |
| 1491 | 1500 | <?php $this->render_author(); ?> |
| 1492 | 1501 | |
| 1493 | 1502 | <?php if ($settings['show_date'] == 'yes') : ?> |
| 1494 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1503 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1495 | 1504 | <?php $this->render_date(); ?> |
| 1496 | 1505 | </div> |
| 1497 | 1506 | <?php endif; ?> |
| 1498 | 1507 | |
| @@ -1497,9 +1506,9 @@ | ||
| 1497 | 1506 | <?php endif; ?> |
| 1498 | 1507 | |
| 1499 | 1508 | <?php if (_is_upk_pro_activated()) : |
| 1500 | 1509 | if ('yes' === $settings['show_reading_time']) : ?> |
| 1501 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1510 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1502 | 1511 | <?php echo esc_html( ultimate_post_kit_reading_time(get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no') ); ?> |
| 1503 | 1512 | </div> |
| 1504 | 1513 | <?php endif; ?> |
| 1505 | 1514 | <?php endif; ?> |
| @@ -1602,12 +1611,12 @@ | ||
| 1602 | 1611 | |
| 1603 | 1612 | <?php if ($settings['show_navigation']) : ?> |
| 1604 | 1613 | <div class="upk-navigation-wrap"> |
| 1605 | 1614 | <div class="upk-nav-btn upk-navigation-prev"> |
| 1606 | - <i class="upk-icon-arrow-left-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i> | |
| 1615 | + <i class="upk-icon-arrow-left-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i> | |
| 1607 | 1616 | </div> |
| 1608 | 1617 | <div class="upk-nav-btn upk-navigation-next"> |
| 1609 | - <i class="upk-icon-arrow-right-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i> | |
| 1618 | + <i class="upk-icon-arrow-right-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i> | |
| 1610 | 1619 | </div> |
| 1611 | 1620 | </div> |
| 1612 | 1621 | <?php endif; ?> |
| 1613 | 1622 | </div> |