PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
← All changes | modules/alex-carousel/widgets/alex-carousel.php +77 -61 4.0.9 → 4.5.6 View file →
@@ -88,20 +88,20 @@
88 88
89 89 $this->add_responsive_control(
90 90 'columns',
91 91 [
92 - 'label' => __('Columns', 'ultimate-post-kit'),
92 + 'label' => esc_html__('Columns', 'ultimate-post-kit'),
93 93 'type' => Controls_Manager::SELECT,
94 94 'default' => 3,
95 95 'tablet_default' => 2,
96 96 'mobile_default' => 1,
97 97 'options' => [
98 - 1 => '1',
99 - 2 => '2',
100 - 3 => '3',
101 - 4 => '4',
102 - 5 => '5',
103 - 6 => '6',
98 + 1 => esc_html__('1', 'ultimate-post-kit'),
99 + 2 => esc_html__('2', 'ultimate-post-kit'),
100 + 3 => esc_html__('3', 'ultimate-post-kit'),
101 + 4 => esc_html__('4', 'ultimate-post-kit'),
102 + 5 => esc_html__('5', 'ultimate-post-kit'),
103 + 6 => esc_html__('6', 'ultimate-post-kit'),
104 104 ],
105 105 ]
106 106 );
107 107
@@ -107,9 +107,9 @@
107 107
108 108 $this->add_responsive_control(
109 109 'item_gap',
110 110 [
111 - 'label' => __('Item Gap', 'ultimate-post-kit'),
111 + 'label' => esc_html__('Item Gap', 'ultimate-post-kit'),
112 112 'type' => Controls_Manager::SLIDER,
113 113 'default' => [
114 114 'size' => 20,
115 115 ],
@@ -148,8 +148,9 @@
148 148 $this->add_group_control(
149 149 Group_Control_Image_Size::get_type(),
150 150 [
151 151 'name' => 'primary_thumbnail',
152 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour.
152 153 'exclude' => ['custom'],
153 154 'default' => 'medium',
154 155 ]
155 156 );
@@ -179,9 +180,9 @@
179 180 // Query Settings
180 181 $this->start_controls_section(
181 182 'section_post_query_builder',
182 183 [
183 - 'label' => __('Query', 'ultimate-post-kit') . BDTUPK_NC,
184 + 'label' => esc_html__('Query', 'ultimate-post-kit'),
184 185 'tab' => Controls_Manager::TAB_CONTENT,
185 186 ]
186 187 );
187 188
@@ -198,8 +199,11 @@
198 199 ],
199 200 'default' => [
200 201 'size' => 6,
201 202 ],
203 + 'condition' => [
204 + 'posts_source!' => 'current_query',
205 + ]
202 206 ]
203 207 );
204 208
205 209 $this->register_query_builder_controls();
@@ -208,9 +212,9 @@
208 212
209 213 $this->start_controls_section(
210 214 'section_content_additional',
211 215 [
212 - 'label' => esc_html__('Additional', 'ultimate-post-kit'),
216 + 'label' => esc_html__('Additional Options', 'ultimate-post-kit'),
213 217 ]
214 218 );
215 219
216 220 //Global Title Controls
@@ -229,9 +233,9 @@
229 233 'show_readmore',
230 234 [
231 235 'label' => esc_html__('Read More', 'ultimate-post-kit'),
232 236 'type' => Controls_Manager::SWITCHER,
233 - 'default' => 'yes',
237 + 'default' => 'yes',
234 238 ]
235 239 );
236 240
237 241 $this->add_control(
@@ -250,9 +254,9 @@
250 254
251 255 $this->add_control(
252 256 'meta_separator',
253 257 [
254 - 'label' => __('Separator', 'ultimate-post-kit') . BDTUPK_NC,
258 + 'label' => esc_html__('Separator', 'ultimate-post-kit'),
255 259 'type' => Controls_Manager::TEXT,
256 260 'default' => '|',
257 261 'label_block' => false,
258 262 ]
@@ -260,10 +264,10 @@
260 264
261 265 $this->add_control(
262 266 'show_post_format',
263 267 [
264 - 'label' => esc_html__('Post Format', 'ultimate-post-kit') . BDTUPK_NC,
265 - 'type' => Controls_Manager::SWITCHER,
268 + 'label' => esc_html__('Post Format', 'ultimate-post-kit'),
269 + 'type' => Controls_Manager::SWITCHER,
266 270 'separator' => 'before'
267 271 ]
268 272 );
269 273
@@ -269,13 +273,13 @@
269 273
270 274 $this->add_control(
271 275 'global_link',
272 276 [
273 - 'label' => __('Item Wrapper Link', 'ultimate-post-kit'),
277 + 'label' => esc_html__('Item Wrapper Link', 'ultimate-post-kit'),
274 278 'type' => Controls_Manager::SWITCHER,
275 279 'prefix_class' => 'upk-global-link-',
276 - 'description' => __('Be aware! When Item Wrapper Link activated then title link and read more link will not work', 'ultimate-post-kit'),
277 - 'separator' => 'before'
280 + 'description' => esc_html__('Be aware! When Item Wrapper Link activated then title link and read more link will not work', 'ultimate-post-kit'),
281 + 'separator' => 'before'
278 282 ]
279 283 );
280 284
281 285 $this->end_controls_section();
@@ -340,10 +344,10 @@
340 344
341 345 $this->add_responsive_control(
342 346 'item_shadow_padding',
343 347 [
344 - 'label' => __('Match Padding', 'ultimate-post-kit'),
345 - 'description' => __('You have to add padding for matching overlaping normal/hover box shadow when you used Box Shadow option.', 'ultimate-post-kit'),
348 + 'label' => esc_html__('Match Padding', 'ultimate-post-kit'),
349 + 'description' => esc_html__('You have to add padding for matching overlaping normal/hover box shadow when you used Box Shadow option.', 'ultimate-post-kit'),
346 350 'type' => Controls_Manager::SLIDER,
347 351 'range' => [
348 352 'px' => [
349 353 'min' => 0,
@@ -376,9 +380,9 @@
376 380 [
377 381 'label' => esc_html__('Glass Morphism', 'ultimate-post-kit'),
378 382 'type' => Controls_Manager::SWITCHER,
379 383 // translators: %1s: Opening anchor tag with link to MDN backdrop-filter documentation, %2s: Closing anchor tag
380 - '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>'),
384 + '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>'),
381 385 'default' => 'yes',
382 386 ]
383 387 );
384 388
@@ -384,9 +388,9 @@
384 388
385 389 $this->add_control(
386 390 'overlay_blur_level',
387 391 [
388 - 'label' => __('Blur Level', 'ultimate-post-kit'),
392 + 'label' => esc_html__('Blur Level', 'ultimate-post-kit'),
389 393 'type' => Controls_Manager::SLIDER,
390 394 'range' => [
391 395 'px' => [
392 396 'min' => 0,
@@ -423,9 +427,9 @@
423 427
424 428 $this->add_responsive_control(
425 429 'content_width',
426 430 [
427 - 'label' => __('Width(%)', 'ultimate-post-kit'),
431 + 'label' => esc_html__('Width(%)', 'ultimate-post-kit'),
428 432 'type' => Controls_Manager::SLIDER,
429 433 'selectors' => [
430 434 '{{WRAPPER}} .upk-alex-carousel .upk-content-wrap' => 'width: {{SIZE}}%;'
431 435 ],
@@ -434,9 +438,9 @@
434 438
435 439 $this->add_responsive_control(
436 440 'content_height',
437 441 [
438 - 'label' => __('Height(px)', 'ultimate-post-kit'),
442 + 'label' => esc_html__('Height(px)', 'ultimate-post-kit'),
439 443 'type' => Controls_Manager::SLIDER,
440 444 'range' => [
441 445 'px' => [
442 446 'min' => 50,
@@ -458,9 +462,9 @@
458 462
459 463 $this->add_responsive_control(
460 464 'content_inner_padding',
461 465 [
462 - 'label' => __('Inner Padding', 'ultimate-post-kit'),
466 + 'label' => esc_html__('Inner Padding', 'ultimate-post-kit'),
463 467 'type' => Controls_Manager::DIMENSIONS,
464 468 'size_units' => ['px', 'em', '%'],
465 469 'selectors' => [
466 470 '{{WRAPPER}} .upk-alex-carousel .upk-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -483,9 +487,9 @@
483 487
484 488 $this->add_control(
485 489 'title_style',
486 490 [
487 - 'label' => esc_html__('Style', 'ultimate-post-kit') . BDTUPK_NC,
491 + 'label' => esc_html__('Style', 'ultimate-post-kit'),
488 492 'type' => Controls_Manager::SELECT,
489 493 'default' => '',
490 494 'options' => [
491 495 '' => esc_html__('Default', 'ultimate-post-kit'),
@@ -548,9 +552,9 @@
548 552 $this->add_group_control(
549 553 Group_Control_Text_Shadow::get_type(),
550 554 [
551 555 'name' => 'title_text_shadow',
552 - 'label' => __('Text Shadow', 'ultimate-post-kit'),
556 + 'label' => esc_html__('Text Shadow', 'ultimate-post-kit'),
553 557 'selector' => '{{WRAPPER}} .upk-alex-carousel .upk-title',
554 558 'condition' => [
555 559 'title_advanced_style' => 'yes'
556 560 ]
@@ -570,9 +574,9 @@
570 574
571 575 $this->add_responsive_control(
572 576 'title_border_radius',
573 577 [
574 - 'label' => __('Border Radius', 'ultimate-post-kit'),
578 + 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
575 579 'type' => Controls_Manager::DIMENSIONS,
576 580 'size_units' => ['px', '%'],
577 581 'selectors' => [
578 582 '{{WRAPPER}} .upk-alex-carousel .upk-title' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -596,9 +600,9 @@
596 600
597 601 $this->add_responsive_control(
598 602 'title_text_padding',
599 603 [
600 - 'label' => __('Padding', 'ultimate-post-kit'),
604 + 'label' => esc_html__('Padding', 'ultimate-post-kit'),
601 605 'type' => Controls_Manager::DIMENSIONS,
602 606 'size_units' => ['px', 'em', '%'],
603 607 'selectors' => [
604 608 '{{WRAPPER}} .upk-alex-carousel .upk-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -838,9 +842,9 @@
838 842
839 843 $this->start_controls_section(
840 844 'section_style_readmore',
841 845 [
842 - 'label' => __('Read More', 'ultimate-post-kit'),
846 + 'label' => esc_html__('Read More', 'ultimate-post-kit'),
843 847 'tab' => Controls_Manager::TAB_STYLE,
844 848 'condition' => [
845 849 'show_readmore' => 'yes',
846 850 ],
@@ -851,9 +855,9 @@
851 855
852 856 $this->start_controls_tab(
853 857 'tab_readmore_normal',
854 858 [
855 - 'label' => __('Normal', 'ultimate-post-kit'),
859 + 'label' => esc_html__('Normal', 'ultimate-post-kit'),
856 860 ]
857 861 );
858 862
859 863 $this->add_control(
@@ -858,12 +862,12 @@
858 862
859 863 $this->add_control(
860 864 'readmore_text_color',
861 865 [
862 - 'label' => __('Color', 'ultimate-post-kit'),
866 + 'label' => esc_html__('Color', 'ultimate-post-kit'),
863 867 'type' => Controls_Manager::COLOR,
864 868 'selectors' => [
865 - '{{WRAPPER}} .upk-alex-carousel .upk-readmore .upk-readmore-icon:before, {{WRAPPER}} .upk-alex-carousel .upk-item:hover .upk-readmore .upk-readmore-icon span:before, {{WRAPPER}} .upk-alex-carousel .upk-item:hover .upk-readmore .upk-readmore-icon span:after' => 'background: {{VALUE}};',
869 + '{{WRAPPER}} .upk-alex-carousel .upk-readmore .upk-readmore-icon:before, {{WRAPPER}} .upk-alex-carousel .upk-readmore .upk-readmore-icon span:before, {{WRAPPER}} .upk-alex-carousel .upk-readmore .upk-readmore-icon span:after' => 'background: {{VALUE}};',
866 870 ],
867 871 ]
868 872 );
869 873
@@ -887,9 +891,9 @@
887 891
888 892 $this->add_responsive_control(
889 893 'readmore_radius',
890 894 [
891 - 'label' => __('Border Radius', 'ultimate-post-kit'),
895 + 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
892 896 'type' => Controls_Manager::DIMENSIONS,
893 897 'size_units' => ['px', '%'],
894 898 'selectors' => [
895 899 '{{WRAPPER}} .upk-alex-carousel .upk-readmore' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -899,9 +903,9 @@
899 903
900 904 $this->add_responsive_control(
901 905 'readmore_primary_padding',
902 906 [
903 - 'label' => __('Padding', 'ultimate-post-kit'),
907 + 'label' => esc_html__('Padding', 'ultimate-post-kit'),
904 908 'type' => Controls_Manager::DIMENSIONS,
905 909 'size_units' => ['px', 'em', '%'],
906 910 'selectors' => [
907 911 '{{WRAPPER}} .upk-alex-carousel .upk-readmore' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -922,9 +926,9 @@
922 926
923 927 $this->start_controls_tab(
924 928 'tab_readmore_hover',
925 929 [
926 - 'label' => __('Hover', 'ultimate-post-kit'),
930 + 'label' => esc_html__('Hover', 'ultimate-post-kit'),
927 931 ]
928 932 );
929 933
930 934 $this->add_control(
@@ -929,12 +933,12 @@
929 933
930 934 $this->add_control(
931 935 'readmore_hover_text_color',
932 936 [
933 - 'label' => __('Color', 'ultimate-post-kit'),
937 + 'label' => esc_html__('Color', 'ultimate-post-kit'),
934 938 'type' => Controls_Manager::COLOR,
935 939 'selectors' => [
936 - '{{WRAPPER}} .upk-alex-carousel .upk-item:hover .upk-readmore .upk-readmore-icon:before, {{WRAPPER}} .upk-alex-carousel .upk-item:hover .upk-readmore .upk-readmore-icon span:before, {{WRAPPER}} .upk-alex-carousel .upk-item:hover .upk-readmore .upk-readmore-icon span:after' => 'background: {{VALUE}};',
940 + '{{WRAPPER}} .upk-alex-carousel .upk-readmore:hover .upk-readmore-icon:before, {{WRAPPER}} .upk-alex-carousel .upk-readmore:hover .upk-readmore-icon span:before, {{WRAPPER}} .upk-alex-carousel .upk-readmore:hover .upk-readmore-icon span:after' => 'background: {{VALUE}};',
937 941 ],
938 942 ]
939 943 );
940 944
@@ -941,9 +945,9 @@
941 945 $this->add_group_control(
942 946 Group_Control_Background::get_type(),
943 947 [
944 948 'name' => 'readmore_hover_background',
945 - 'selector' => '{{WRAPPER}} .upk-alex-carousel .upk-item:hover .upk-readmore',
949 + 'selector' => '{{WRAPPER}} .upk-alex-carousel .upk-readmore:hover',
946 950 ]
947 951 );
948 952
949 953 $this->add_control(
@@ -948,12 +952,12 @@
948 952
949 953 $this->add_control(
950 954 'readmore_hover_border_color',
951 955 [
952 - 'label' => __('Border Color', 'ultimate-post-kit'),
956 + 'label' => esc_html__('Border Color', 'ultimate-post-kit'),
953 957 'type' => Controls_Manager::COLOR,
954 958 'selectors' => [
955 - '{{WRAPPER}} .upk-alex-carousel .upk-item:hover .upk-readmore' => 'border-color: {{VALUE}};',
959 + '{{WRAPPER}} .upk-alex-carousel .upk-readmore:hover' => 'border-color: {{VALUE}};',
956 960 ],
957 961 'condition' => [
958 962 'readmore_border_border!' => ''
959 963 ]
@@ -963,9 +967,9 @@
963 967 $this->add_group_control(
964 968 Group_Control_Box_Shadow::get_type(),
965 969 [
966 970 'name' => 'readmore_hover_shadow',
967 - 'selector' => '{{WRAPPER}} .upk-alex-carousel .upk-item:hover .upk-readmore',
971 + 'selector' => '{{WRAPPER}} .upk-alex-carousel .upk-readmore:hover',
968 972 ]
969 973 );
970 974
971 975 $this->end_controls_tab();
@@ -1003,9 +1007,9 @@
1003 1007
1004 1008 $this->start_controls_tab(
1005 1009 'tab_avatar_normal',
1006 1010 [
1007 - 'label' => __('Avatar', 'ultimate-post-kit'),
1011 + 'label' => esc_html__('Avatar', 'ultimate-post-kit'),
1008 1012 'condition' => [
1009 1013 'show_author' => 'yes',
1010 1014 ],
1011 1015 ]
@@ -1070,9 +1074,9 @@
1070 1074
1071 1075 $this->start_controls_tab(
1072 1076 'tab_author_name_normal',
1073 1077 [
1074 - 'label' => __('Author Name', 'ultimate-post-kit'),
1078 + 'label' => esc_html__('Author Name', 'ultimate-post-kit'),
1075 1079 'condition' => [
1076 1080 'show_author' => 'yes',
1077 1081 ],
1078 1082 ]
@@ -1121,9 +1125,9 @@
1121 1125 $this->end_controls_tab();
1122 1126 $this->start_controls_tab(
1123 1127 'tab_date_normal',
1124 1128 [
1125 - 'label' => __('Date', 'ultimate-post-kit'),
1129 + 'label' => esc_html__('Date', 'ultimate-post-kit'),
1126 1130 'conditions' => [
1127 1131 'relation' => 'or',
1128 1132 'terms' => [
1129 1133 [
@@ -1165,9 +1169,9 @@
1165 1169
1166 1170 $this->add_responsive_control(
1167 1171 'meta_spacing',
1168 1172 [
1169 - 'label' => esc_html__('Space Between', 'ultimate-post-kit') . BDTUPK_NC,
1173 + 'label' => esc_html__('Space Between', 'ultimate-post-kit'),
1170 1174 'type' => Controls_Manager::SLIDER,
1171 1175 'range' => [
1172 1176 'px' => [
1173 1177 'min' => 0,
@@ -1212,10 +1216,10 @@
1212 1216
1213 1217 $this->start_controls_section(
1214 1218 'section_style_post_format',
1215 1219 [
1216 - 'label' => esc_html__('Post Format', 'ultimate-post-kit') . BDTUPK_NC,
1217 - 'tab' => Controls_Manager::TAB_STYLE,
1220 + 'label' => esc_html__('Post Format', 'ultimate-post-kit'),
1221 + 'tab' => Controls_Manager::TAB_STYLE,
1218 1222 'condition' => [
1219 1223 'show_post_format' => 'yes'
1220 1224 ]
1221 1225 ]
@@ -1237,9 +1241,9 @@
1237 1241 [
1238 1242 'label' => esc_html__('Glassmorphism', 'ultimate-post-kit'),
1239 1243 'type' => Controls_Manager::SWITCHER,
1240 1244 // translators: %1s: Opening anchor tag with link to MDN backdrop-filter documentation, %2s: Closing anchor tag
1241 - '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>'),
1245 + '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>'),
1242 1246 'default' => 'yes',
1243 1247 'separator' => 'before'
1244 1248 ]
1245 1249 );
@@ -1246,9 +1250,9 @@
1246 1250
1247 1251 $this->add_control(
1248 1252 'overlay_blur_level_post_format',
1249 1253 [
1250 - 'label' => __('Blur Level', 'ultimate-post-kit'),
1254 + 'label' => esc_html__('Blur Level', 'ultimate-post-kit'),
1251 1255 'type' => Controls_Manager::SLIDER,
1252 1256 'range' => [
1253 1257 'px' => [
1254 1258 'min' => 0,
@@ -1273,8 +1277,9 @@
1273 1277 [
1274 1278 'name' => 'post_format_background',
1275 1279 'label' => esc_html__('Background', 'ultimate-post-kit'),
1276 1280 'types' => ['classic', 'gradient'],
1281 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour.
1277 1282 'exclude' => ['image'],
1278 1283 'selector' => '{{WRAPPER}} .upk-alex-carousel .upk-post-format a',
1279 1284 'fields_options' => [
1280 1285 'background' => [
@@ -1310,9 +1315,9 @@
1310 1315
1311 1316 $this->add_responsive_control(
1312 1317 'post_format_padding',
1313 1318 [
1314 - 'label' => __('Padding', 'ultimate-post-kit'),
1319 + 'label' => esc_html__('Padding', 'ultimate-post-kit'),
1315 1320 'type' => Controls_Manager::DIMENSIONS,
1316 1321 'size_units' => ['px', 'em', '%'],
1317 1322 'selectors' => [
1318 1323 '{{WRAPPER}} .upk-alex-carousel .upk-post-format a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -1322,9 +1327,9 @@
1322 1327
1323 1328 $this->add_responsive_control(
1324 1329 'post_format_margin',
1325 1330 [
1326 - 'label' => __('Margin', 'ultimate-post-kit'),
1331 + 'label' => esc_html__('Margin', 'ultimate-post-kit'),
1327 1332 'type' => Controls_Manager::DIMENSIONS,
1328 1333 'size_units' => ['px', 'em', '%'],
1329 1334 'selectors' => [
1330 1335 '{{WRAPPER}} .upk-alex-carousel .upk-post-format' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -1361,11 +1366,11 @@
1361 1366 */
1362 1367 public function query_posts($posts_per_page) {
1363 1368
1364 1369 $default = $this->getGroupControlQueryArgs();
1370 + $args = [];
1365 1371 if ($posts_per_page) {
1366 1372 $args['posts_per_page'] = $posts_per_page;
1367 - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page'));
1368 1373 }
1369 1374 $args = array_merge($default, $args);
1370 1375 $this->_query = new WP_Query($args);
1371 1376 }
@@ -1377,9 +1382,13 @@
1377 1382 }
1378 1383
1379 1384 ?>
1380 1385 <div class="upk-button-wrap">
1381 - <a href="<?php echo esc_url(get_permalink()); ?>" class="upk-readmore">
1386 + <a
1387 + href="<?php echo esc_url(get_permalink()); ?>"
1388 + class="upk-readmore"
1389 + aria-label="<?php echo esc_attr__( 'Read More Button', 'ultimate-post-kit' ); ?>"
1390 + >
1382 1391 <span class="upk-readmore-icon"><span></span></span>
1383 1392 </a>
1384 1393 </div>
1385 1394 <?php
@@ -1397,9 +1406,12 @@
1397 1406 <?php endif; ?>
1398 1407 <div>
1399 1408 <?php if ($settings['show_author']) : ?>
1400 1409 <div class="upk-author-name">
1401 - <a href="<?php echo esc_url( get_author_posts_url(get_the_author_meta('ID')) ); ?>">
1410 + <a
1411 + href="<?php echo esc_url( get_author_posts_url(get_the_author_meta('ID')) ); ?>"
1412 + aria-label="<?php echo esc_attr( 'View all posts by ' . get_the_author() ); ?>"
1413 + >
1402 1414 <?php echo esc_html( get_the_author() ) ?>
1403 1415 </a>
1404 1416 </div>
1405 1417 <?php endif; ?>
@@ -1405,9 +1417,9 @@
1405 1417 <?php endif; ?>
1406 1418
1407 1419 <div class="upk-flex upk-flex-middle upk-date-reading-wrap">
1408 1420 <?php if ('yes' === $settings['show_date']) : ?>
1409 - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1421 + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1410 1422 <?php $this->render_date(); ?>
1411 1423 </div>
1412 1424 <?php endif; ?>
1413 1425
@@ -1412,10 +1424,10 @@
1412 1424 <?php endif; ?>
1413 1425
1414 1426 <?php if (_is_upk_pro_activated()) :
1415 1427 if ('yes' === $settings['show_reading_time']) : ?>
1416 - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1417 - <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'] ) ); ?>
1428 + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1429 + <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?>
1418 1430 </div>
1419 1431 <?php endif; ?>
1420 1432 <?php endif; ?>
1421 1433 </div>
@@ -1432,10 +1444,10 @@
1432 1444 $this->render_header_attribute('alex');
1433 1445
1434 1446 ?>
1435 1447 <div <?php $this->print_render_attribute_string('carousel'); ?>>
1436 - <div class="upk-alex-wrap upk-content-<?php echo esc_html($settings['content_position']) ?>">
1437 - <div <?php echo $this->get_render_attribute_string('swiper'); ?>>
1448 + <div class="upk-alex-wrap upk-content-<?php echo esc_attr($settings['content_position']) ?>">
1449 + <div <?php $this->print_render_attribute_string('swiper'); ?>>
1438 1450 <div class="swiper-wrapper">
1439 1451 <?php
1440 1452 }
1441 1453
@@ -1442,10 +1454,14 @@
1442 1454 public function render_post_grid_item($post_id, $image_size) {
1443 1455 $settings = $this->get_settings_for_display();
1444 1456
1445 1457 if ('yes' == $settings['global_link']) {
1446 -
1447 - $this->add_render_attribute('grid-item', 'onclick', "window.open('" . esc_url(get_permalink()) . "', '_self')", true);
1458 + $this->add_render_attribute(
1459 + 'grid-item',
1460 + 'onclick',
1461 + sprintf( "window.open('%s', '_self')", esc_js( esc_url( get_permalink() ) ) ),
1462 + true
1463 + );
1448 1464 }
1449 1465
1450 1466 $this->add_render_attribute('grid-item', 'class', 'upk-item swiper-slide', true);
1451 1467