PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.3
ShopBuilder – WooCommerce Builder For Elementor v3.2.3
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Elementor / Helper / PostHelpers.php

PostHelpers.php in ShopBuilder – WooCommerce Builder For Elementor 3.2.3, at app/Elementor/Helper/PostHelpers.php

1,655 lines 60.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace RadiusTheme\SB\Elementor\Helper;
4
5 // Do not allow directly accessing this file.
6 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
7 use RadiusTheme\SB\Elementor\Helper\RenderHelpers;
8 use RadiusTheme\SB\Elementor\Widgets\Controls\StyleFields as StyleFieldsFree;
9 use RadiusTheme\SB\Helpers\Fns;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit( 'This script cannot be accessed directly.' );
13 }
14 /**
15 * Post Helpers class.
16 *
17 * @package RadiusTheme\SB
18 */
19 class PostHelpers {
20 /**
21 * Query section
22 *
23 * @param object $obj Reference object.
24 *
25 * @return array
26 */
27 public static function query( $obj ) {
28 $fields['query_section'] = $obj->start_section(
29 esc_html__( 'Query', 'shopbuilder' ),
30 'content'
31 );
32
33 $fields['query_note'] = $obj->el_heading( esc_html__( 'Common Filters', 'shopbuilder' ) );
34
35 $fields['include_posts'] = [
36 'type' => 'rt-select2',
37 'label' => esc_html__( 'Include Post', 'shopbuilder' ),
38 'description' => esc_html__( 'Please select the products to show. Leave it blank to include all products.', 'shopbuilder' ),
39 'source_name' => 'post_type',
40 'source_type' => 'post',
41 'multiple' => true,
42 'label_block' => true,
43 ];
44
45 $fields['exclude_posts'] = [
46 'type' => 'rt-select2',
47 'label' => esc_html__( 'Exclude Post', 'shopbuilder' ),
48 'description' => esc_html__( 'Please select the products to show. Leave it blank to exclude none.', 'shopbuilder' ),
49 'source_name' => 'post_type',
50 'source_type' => 'post',
51 'multiple' => true,
52 'label_block' => true,
53 ];
54
55 $fields['posts_limit'] = [
56 'type' => 'number',
57 'label' => esc_html__( 'Posts Limit', 'shopbuilder' ),
58 'description' => esc_html__( 'The number of products to show. Set empty to show all products.', 'shopbuilder' ),
59 'default' => 12,
60 ];
61
62 $fields['posts_offset'] = [
63 'type' => 'number',
64 'label' => esc_html__( 'Posts Offset', 'shopbuilder' ),
65 'description' => esc_html__( 'Number of products to skip.', 'shopbuilder' ),
66 ];
67
68 $fields['category_note'] = $obj->el_heading( esc_html__( 'Taxonomy Filters', 'shopbuilder' ), 'before' );
69
70 $fields['filter_categories'] = [
71 'type' => 'rt-select2',
72 'label' => esc_html__( 'Filter By Categories', 'shopbuilder' ),
73 'description' => esc_html__( 'Select the categories you want to filter, Leave it blank for all categories.', 'shopbuilder' ),
74 'source_name' => 'taxonomy',
75 'source_type' => 'category',
76 'multiple' => true,
77 'label_block' => true,
78 'minimum_input_length' => 1,
79 ];
80
81 $fields['filter_tags'] = [
82 'type' => 'rt-select2',
83 'label' => esc_html__( 'Filter By Tags', 'shopbuilder' ),
84 'description' => esc_html__( 'Select the tags you want to filter, Leave it blank for all tags.', 'shopbuilder' ),
85 'source_name' => 'taxonomy',
86 'source_type' => 'post_tag',
87 'multiple' => true,
88 'label_block' => true,
89 'minimum_input_length' => 1,
90 ];
91
92 $fields['tax_relation'] = [
93 'type' => 'select2',
94 'label' => esc_html__( 'Taxonomy relation', 'shopbuilder' ),
95 'options' => [
96 'OR' => 'Show All Products (OR)',
97 'AND' => 'Show Common Products (AND)',
98 ],
99 'default' => 'AND',
100 'description' => esc_html__( 'Select the taxonomies relationship. It is applicable if you select more than one taxonomy.', 'shopbuilder' ),
101 'label_block' => true,
102 ];
103
104 $fields['sorting_note'] = $obj->el_heading( esc_html__( 'Sorting', 'shopbuilder' ), 'before' );
105
106 $fields['posts_order_by'] = [
107 'type' => 'select2',
108 'label' => esc_html__( 'Order By', 'shopbuilder' ),
109 'options' => ControlHelper::posts_order_by(),
110 'default' => 'date',
111 ];
112
113 $fields['posts_order'] = [
114 'type' => 'select2',
115 'label' => esc_html__( 'Order', 'shopbuilder' ),
116 'options' => ControlHelper::posts_order(),
117 'default' => 'DESC',
118 ];
119
120 $fields['query_section_end'] = $obj->end_section();
121
122 return apply_filters( 'rtsb/elements/elementor/query_control', $fields, $obj );
123 }
124 /**
125 * Pagination section
126 *
127 * @param object $obj Reference object.
128 *
129 * @return array
130 */
131 public static function pagination( $obj ) {
132 $fields['pagination_section'] = $obj->start_section(
133 esc_html__( 'Pagination', 'shopbuilder' ),
134 'content',
135 );
136
137 $fields['show_pagination'] = [
138 'type' => 'switch',
139 'label' => esc_html__( 'Enable Pagination?', 'shopbuilder' ),
140 'description' => esc_html__( 'Switch on to enable pagination.', 'shopbuilder' ),
141 'label_on' => esc_html__( 'On', 'shopbuilder' ),
142 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
143 ];
144
145 $fields['pagination_per_page'] = [
146 'type' => 'number',
147 'label' => esc_html__( 'Number of Posts Per Page', 'shopbuilder' ),
148 'default' => 8,
149 'description' => esc_html__( 'Please enter the number of products per page to show.', 'shopbuilder' ),
150 'condition' => [ 'show_pagination' => [ 'yes' ] ],
151 ];
152
153 $fields['pagination_section_end'] = $obj->end_section();
154
155 return apply_filters( 'rtsb/elementor/post_pagination_control', $fields, $obj );
156 }
157 /**
158 * Visibility section
159 *
160 * @param object $obj Reference object.
161 *
162 * @return array
163 */
164 public static function content_visibility( $obj ) {
165 $fields['visibility_section'] = $obj->start_section(
166 esc_html__( 'Content Visibility', 'shopbuilder' ),
167 'settings'
168 );
169 $fields['show_title'] = [
170 'type' => 'switch',
171 'label' => esc_html__( 'Show Post Title?', 'shopbuilder' ),
172 'description' => esc_html__( 'Switch on to show post title.', 'shopbuilder' ),
173 'label_on' => esc_html__( 'On', 'shopbuilder' ),
174 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
175 'default' => 'yes',
176 ];
177 $fields['show_post_thumbnail'] = [
178 'type' => 'switch',
179 'label' => esc_html__( 'Show Post Thumbnail?', 'shopbuilder' ),
180 'description' => esc_html__( 'Switch on to show post thumbnail.', 'shopbuilder' ),
181 'label_on' => esc_html__( 'On', 'shopbuilder' ),
182 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
183 'default' => 'yes',
184 ];
185 $fields['show_short_desc'] = [
186 'type' => 'switch',
187 'label' => esc_html__( 'Show Short Description?', 'shopbuilder' ),
188 'description' => esc_html__( 'Switch on to show post short description.', 'shopbuilder' ),
189 'label_on' => esc_html__( 'On', 'shopbuilder' ),
190 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
191 'default' => 'yes',
192 ];
193
194 $fields['show_categories'] = [
195 'type' => 'switch',
196 'label' => esc_html__( 'Show Post Categories?', 'shopbuilder' ),
197 'description' => esc_html__( 'Switch on to show product categories.', 'shopbuilder' ),
198 'label_on' => esc_html__( 'On', 'shopbuilder' ),
199 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
200 'default' => 'yes',
201 ];
202 $fields['show_tags'] = [
203 'type' => 'switch',
204 'label' => esc_html__( 'Show Post Tags?', 'shopbuilder' ),
205 'description' => esc_html__( 'Switch on to show product categories.', 'shopbuilder' ),
206 'label_on' => esc_html__( 'On', 'shopbuilder' ),
207 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
208 ];
209 $fields['show_dates'] = [
210 'type' => 'switch',
211 'label' => esc_html__( 'Show Post Dates', 'shopbuilder' ),
212 'description' => esc_html__( 'Switch on to show post dates.', 'shopbuilder' ),
213 'label_on' => esc_html__( 'On', 'shopbuilder' ),
214 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
215 'default' => 'yes',
216 ];
217 $fields['show_author'] = [
218 'type' => 'switch',
219 'label' => esc_html__( 'Show Post Author', 'shopbuilder' ),
220 'description' => esc_html__( 'Switch on to show post author.', 'shopbuilder' ),
221 'label_on' => esc_html__( 'On', 'shopbuilder' ),
222 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
223 'default' => 'yes',
224 ];
225 $fields['show_comment'] = [
226 'type' => 'switch',
227 'label' => esc_html__( 'Show Post Comment', 'shopbuilder' ),
228 'description' => esc_html__( 'Switch on to show post comment.', 'shopbuilder' ),
229 'label_on' => esc_html__( 'On', 'shopbuilder' ),
230 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
231 ];
232 $fields['show_reading_time'] = [
233 'type' => 'switch',
234 'label' => esc_html__( 'Show Reading Time', 'shopbuilder' ),
235 'description' => esc_html__( 'Switch on to show post reading time.', 'shopbuilder' ),
236 'label_on' => esc_html__( 'On', 'shopbuilder' ),
237 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
238 ];
239 $fields['show_post_views'] = [
240 'type' => 'switch',
241 'label' => esc_html__( 'Show Post Views', 'shopbuilder' ),
242 'description' => esc_html__( 'Switch on to show post post views.', 'shopbuilder' ),
243 'label_on' => esc_html__( 'On', 'shopbuilder' ),
244 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
245 ];
246 $fields['show_read_more_btn'] = [
247 'type' => 'switch',
248 'label' => esc_html__( 'Show Read More Button', 'shopbuilder' ),
249 'description' => esc_html__( 'Switch on to show post read more button.', 'shopbuilder' ),
250 'label_on' => esc_html__( 'On', 'shopbuilder' ),
251 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
252 'default' => 'yes',
253 ];
254
255 $fields['visibility_section_end'] = $obj->end_section();
256
257 return apply_filters( 'rtsb/elements/elementor/posts_visibility_control', $fields, $obj );
258 }
259 /**
260 * Image section
261 *
262 * @param object $obj Reference object.
263 *
264 * @return array
265 */
266 public static function image( $obj ) {
267 $condition = [
268 'show_post_thumbnail' => 'yes',
269 ];
270 $fields['image_section'] = $obj->start_section(
271 esc_html__( 'Images', 'shopbuilder' ),
272 'settings',
273 [],
274 $condition
275 );
276 $fields['image_hover_effect'] = [
277 'type' => 'select',
278 'label' => esc_html__( 'Image Hover Effect', 'shopbuilder' ),
279 'options' => self::rtsb_post_image_hover_effect(),
280 'default' => 'rtsb-gw-img-zoom-out',
281 'label_block' => true,
282 ];
283 $fields['image_size_note'] = $obj->el_heading(
284 esc_html__( 'Image Size', 'shopbuilder' ),
285 'before',
286 [],
287 [ 'show_post_thumbnail' => [ 'yes' ] ]
288 );
289 $fields['image_size'] = [
290 'type' => 'select2',
291 'label' => esc_html__( 'Select Image Size', 'shopbuilder' ),
292 'description' => esc_html__( 'Please select the image size.', 'shopbuilder' ),
293 'options' => Fns::get_image_sizes(),
294 'default' => 'full',
295 'label_block' => true,
296 'content_classes' => 'elementor-descriptor',
297 ];
298 $fields['img_dimension'] = [
299 'type' => 'image-dimensions',
300 'label' => esc_html__( 'Enter Custom Image Size', 'shopbuilder' ),
301 'label_block' => true,
302 'default' => [
303 'width' => 400,
304 'height' => 400,
305 ],
306 'condition' => [
307 'image_size' => 'rtsb_custom',
308 ],
309 ];
310 $fields['img_crop'] = [
311 'type' => 'select2',
312 'label' => esc_html__( 'Image Crop', 'shopbuilder' ),
313 'description' => esc_html__( 'Please click on "Apply" to update the image.', 'shopbuilder' ),
314 'options' => [
315 'soft' => esc_html__( 'Soft Crop', 'shopbuilder' ),
316 'hard' => esc_html__( 'Hard Crop', 'shopbuilder' ),
317 ],
318 'default' => 'hard',
319 'condition' => [
320 'image_size' => 'rtsb_custom',
321 ],
322 ];
323 $fields['img_custom_dimension_note'] = [
324 'type' => 'html',
325 'raw' => sprintf(
326 '<span style="display: block; background: #fffbf1; padding: 10px; font-weight: 500; line-height: 1.4; color: #bd3a3a;border: 1px solid #bd3a3a;">%s</span>',
327 esc_html__( 'Please note that, if you enter image size larger than the actual image itself, the image sizes will fallback to the full image dimension.', 'shopbuilder' )
328 ),
329 'condition' => [
330 'image_size' => 'rtsb_custom',
331 ],
332
333 ];
334 $fields['image_section_end'] = $obj->end_section();
335
336 return $fields;
337 }
338 /**
339 * Button section
340 *
341 * @param object $obj Reference object.
342 *
343 * @return array
344 */
345 public static function readmore_button( $obj ) {
346 $condition = [
347 'show_read_more_btn' => 'yes',
348 ];
349 $fields['button_section'] = $obj->start_section(
350 esc_html__( 'Read More Button', 'shopbuilder' ),
351 'settings',
352 [],
353 $condition
354 );
355 $fields['button_icon'] = [
356 'label' => esc_html__( 'Button Icon', 'shopbuilder' ),
357 'type' => 'icons',
358 'default' => [
359 'value' => 'fas fa-arrow-right',
360 'library' => 'fa-solid',
361 ],
362 ];
363 $fields['button_icon_position'] = [
364 'mode' => 'responsive',
365 'type' => 'choose',
366 'label' => esc_html__( 'Position', 'shopbuilder' ),
367 'options' => [
368 'left' => [
369 'title' => esc_html__( 'Left', 'shopbuilder' ),
370 'icon' => 'eicon-h-align-left',
371 ],
372 'right' => [
373 'title' => esc_html__( 'Right', 'shopbuilder' ),
374 'icon' => 'eicon-h-align-right',
375 ],
376
377 ],
378 'toggle' => true,
379 'default' => 'right',
380 ];
381 $fields['button_text'] = [
382 'label' => esc_html__( 'Button Text', 'shopbuilder' ),
383 'description' => esc_html__( 'Please enter the button text.', 'shopbuilder' ),
384 'type' => 'text',
385 'label_block' => true,
386 'default' => __( 'Read More', 'shopbuilder' ),
387 ];
388 $fields['button_section_end'] = $obj->end_section();
389
390 return $fields;
391 }
392 /**
393 * Title section
394 *
395 * @param object $obj Reference object.
396 *
397 * @return array
398 */
399 public static function post_title( $obj ) {
400 $condition = [
401 'show_title' => [ 'yes' ],
402 ];
403
404 $fields['post_title_section'] = $obj->start_section(
405 esc_html__( 'Title', 'shopbuilder' ),
406 'settings',
407 [],
408 $condition
409 );
410
411 $fields['title_tag'] = [
412 'type' => 'select2',
413 'label' => esc_html__( 'Post Title Tag', 'shopbuilder' ),
414 'options' => ControlHelper::heading_tags(),
415 'label_block' => true,
416 'default' => 'h3',
417 'description' => esc_html__( 'Please select the post title tag.', 'shopbuilder' ),
418 ];
419 $fields['title_limit'] = [
420 'type' => 'select2',
421 'label' => esc_html__( 'Post Title Limit', 'shopbuilder' ),
422 'options' => [
423 'default' => esc_html__( 'Default', 'shopbuilder' ),
424 '1-line' => esc_html__( 'Show in 1 line', 'shopbuilder' ),
425 '2-lines' => esc_html__( 'Show in 2 lines', 'shopbuilder' ),
426 '3-lines' => esc_html__( 'Show in 3 lines', 'shopbuilder' ),
427 'custom' => esc_html__( 'Custom', 'shopbuilder' ),
428 ],
429 'label_block' => true,
430 'default' => 'default',
431 'description' => esc_html__( 'Please select the post title limit.', 'shopbuilder' ),
432 ];
433
434 $fields['title_limit_custom'] = [
435 'type' => 'number',
436 'label' => esc_html__( 'Custom Character Limit', 'shopbuilder' ),
437 'default' => 200,
438 'description' => esc_html__( 'Please enter the post title character limit.', 'shopbuilder' ),
439 'condition' => [ 'title_limit' => [ 'custom' ] ],
440 ];
441
442 $fields['post_title_section_end'] = $obj->end_section();
443
444 return $fields;
445 }
446 /**
447 * Excerpt section
448 *
449 * @param object $obj Reference object.
450 *
451 * @return array
452 */
453 public static function post_excerpt( $obj ) {
454 $condition = [
455 'show_short_desc' => [ 'yes' ],
456 ];
457
458 $fields['post_excerpt_section'] = $obj->start_section(
459 esc_html__( 'Short Description', 'shopbuilder' ),
460 'settings',
461 [],
462 $condition
463 );
464
465 $fields['excerpt_limit'] = [
466 'type' => 'select2',
467 'label' => esc_html__( 'Short Description Limit', 'shopbuilder' ),
468 'description' => esc_html__( 'Please select the post short description limit.', 'shopbuilder' ),
469 'options' => [
470 'default' => esc_html__( 'Default', 'shopbuilder' ),
471 '1-line' => esc_html__( 'Show in 1 line', 'shopbuilder' ),
472 '2-lines' => esc_html__( 'Show in 2 lines', 'shopbuilder' ),
473 '3-lines' => esc_html__( 'Show in 3 lines', 'shopbuilder' ),
474 'custom' => esc_html__( 'Custom', 'shopbuilder' ),
475 ],
476 'label_block' => true,
477 'default' => 'default',
478 ];
479
480 $fields['excerpt_limit_custom'] = [
481 'type' => 'number',
482 'label' => esc_html__( 'Custom Character Limit', 'shopbuilder' ),
483 'default' => 200,
484 'description' => esc_html__( 'Please enter the post short description character limit.', 'shopbuilder' ),
485 'condition' => [ 'excerpt_limit' => [ 'custom' ] ],
486 ];
487
488 $fields['post_excerpt_section_end'] = $obj->end_section();
489
490 return $fields;
491 }
492 /**
493 * Pagination section
494 *
495 * @param object $obj Reference object.
496 *
497 * @return array
498 */
499 public static function links( $obj ) {
500 $fields['links_section'] = $obj->start_section(
501 esc_html__( 'Links', 'shopbuilder' ),
502 'settings'
503 );
504 $obj->start_section( 'links_section', esc_html__( 'Detail Page', 'shopbuilder' ), 'settings' );
505
506 $fields['title_link'] = [
507 'type' => 'switch',
508 'label' => esc_html__( 'Title Clickable?', 'shopbuilder' ),
509 'description' => esc_html__( 'Switch on to enable title linking.', 'shopbuilder' ),
510 'label_on' => esc_html__( 'On', 'shopbuilder' ),
511 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
512 'default' => 'yes',
513 ];
514
515 $fields['image_link'] = [
516 'type' => 'switch',
517 'label' => esc_html__( 'Image Clickable?', 'shopbuilder' ),
518 'description' => esc_html__( 'Switch on to enable image linking.', 'shopbuilder' ),
519 'label_on' => esc_html__( 'On', 'shopbuilder' ),
520 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
521 'default' => 'yes',
522 ];
523
524 $fields['links_section_end'] = $obj->end_section();
525
526 return $fields;
527 }
528 /**
529 * Pagination Style section
530 *
531 * @param object $obj Reference object.
532 *
533 * @return array
534 */
535 public static function post_pagination_style_settings( $obj ) {
536 $fields = StyleFieldsFree::pagination( $obj );
537 unset( $fields['pagination_buttons_active_color']['condition'] );
538 unset( $fields['pagination_buttons_active_bg_color']['condition'] );
539 unset( $fields['pagination_buttons_spacing']['condition'] );
540 return $fields;
541 }
542 /**
543 * Builds an array with field values.
544 *
545 * @param array $meta Field values.
546 * @param string $template Template name.
547 * @param array $raw_settings Raw settings.
548 *
549 * @return array
550 */
551 public static function post_meta_dataset( array $meta, $template = '', $raw_settings = [] ) {
552 $data = apply_filters(
553 'rtsb/elementor/render/post_meta_dataset',
554 [
555 // Layout.
556 'widget' => 'custom',
557 'template' => RenderHelpers::get_data( $template, '', '' ),
558 'raw_settings' => $raw_settings,
559 'layout' => RenderHelpers::get_data( $meta, 'layout', 'layout1' ),
560 'd_cols' => RenderHelpers::get_data( $meta, 'cols', 0 ),
561 't_cols' => RenderHelpers::get_data( $meta, 'cols_tablet', 2 ),
562 'm_cols' => RenderHelpers::get_data( $meta, 'cols_mobile', 1 ),
563
564 // Query.
565 'post_in' => RenderHelpers::get_data( $meta, 'include_posts', [] ),
566 'post_not_in' => RenderHelpers::get_data( $meta, 'exclude_posts', [] ),
567 'limit' => ( empty( $meta['posts_limit'] ) || '-1' === $meta['posts_limit'] ) ? 10000000 : $meta['posts_limit'],
568 'offset' => RenderHelpers::get_data( $meta, 'posts_offset', 0 ),
569 'order_by' => RenderHelpers::get_data( $meta, 'posts_order_by', 'date' ),
570 'order' => RenderHelpers::get_data( $meta, 'posts_order', 'DESC' ),
571 'categories' => RenderHelpers::get_data( $meta, 'filter_categories', [] ),
572 'tags' => RenderHelpers::get_data( $meta, 'filter_tags', [] ),
573 'relation' => RenderHelpers::get_data( $meta, 'tax_relation', 'OR' ),
574 // Pagination.
575 'pagination' => ! empty( $meta['show_pagination'] ),
576 'posts_per_page' => RenderHelpers::get_data( $meta, 'pagination_per_page', '' ),
577
578 ]
579 );
580 if ( ! empty( $meta['cols_widescreen'] ) ) {
581 $data['w_cols'] = $meta['cols_widescreen'];
582 }
583
584 if ( ! empty( $meta['cols_laptop'] ) ) {
585 $data['l_cols'] = $meta['cols_laptop'];
586 }
587
588 if ( ! empty( $meta['cols_tablet_extra'] ) ) {
589 $data['te_cols'] = $meta['cols_tablet_extra'];
590 }
591
592 if ( ! empty( $meta['cols_mobile_extra'] ) ) {
593 $data['me_cols'] = $meta['cols_mobile_extra'];
594 }
595 return apply_filters( 'rtsb/elementor/render/post_meta_dataset_final', $data, $meta, $raw_settings );
596 }
597 /**
598 * Function to get post arg dataset.
599 *
600 * @param array $settings Settings array.
601 *
602 * @return array
603 */
604 public static function get_post_arg_dataset( $settings ) {
605 global $post;
606
607 $title_limit_custom = $settings['title_limit_custom'] ?? '';
608 $excerpt_limit_custom = $settings['excerpt_limit_custom'] ?? '200';
609 return [
610 'title' => Fns::text_truncation( get_the_title( $post->ID ), $title_limit_custom ),
611 'excerpt' => Fns::text_truncation( do_shortcode( get_post_field( 'post_excerpt', $post->ID ) ), $excerpt_limit_custom ),
612 'img_html' => self::render_posts_thumbnail( $post->ID, $settings ),
613 ];
614 }
615 /**
616 * Get post thumbnail HTML
617 *
618 * @param int $post_id Post ID.
619 * @param array $settings Settings array.
620 *
621 * @return string
622 */
623 public static function render_posts_thumbnail( $post_id, $settings ) {
624 $c_image_size = RenderHelpers::get_data( $settings, 'img_dimension', [] );
625 $c_image_size['crop'] = RenderHelpers::get_data( $settings, 'img_dimension', [] );
626 $f_img_size = RenderHelpers::get_data( $settings, 'image_size', 'medium' );
627 $thumbnail_id = get_post_thumbnail_id( $post_id );
628 return $settings['show_post_thumbnail'] ? Fns::get_product_image_html(
629 '',
630 null,
631 $f_img_size,
632 $thumbnail_id,
633 ! empty( $c_image_size ) && is_array( $c_image_size ) ? $c_image_size : [],
634 false
635 ) : null;
636 }
637 /**
638 * Generate the formatted HTML list of categories or tags for the current post.
639 *
640 * Retrieves either post categories or tags based on the provided type and
641 * returns them wrapped in a span element with a corresponding CSS class.
642 *
643 * @param string $type The taxonomy type to display. Accepts 'category' or 'tag'. Default 'category'.
644 *
645 * @return string HTML markup with the taxonomy list, or an empty string if none found.
646 */
647 public static function rtsb_posted_taxonomy( $type = 'category' ) {
648 $categories_list = get_the_category_list( self::rtsb_list_item_separator() );
649 if ( 'tag' === $type ) {
650 $categories_list = get_the_tag_list( '', self::rtsb_list_item_separator() );
651 }
652 if ( $categories_list ) {
653 /* translators: %s: CSS class, %s: List of category or tag links. */
654 return sprintf(
655 '<span class="%s-links">%s</span>',
656 $type,
657 $categories_list
658 );
659 }
660
661 return '';
662 }
663 /**
664 * Prints HTML with meta information for the current post-date/time.
665 *
666 * @return string
667 */
668 public static function rtsb_posted_date() {
669 $time_string = sprintf(
670 '<time class="entry-date published updated" datetime="%1$s">%2$s</time>',
671 esc_attr( get_the_date( DATE_W3C ) ),
672 esc_html( get_the_date() )
673 );
674 return sprintf( '<span class="posted-on">%s</span>', $time_string );
675 }
676 /**
677 * Generate formatted HTML for the post author section.
678 *
679 * Outputs the author name (linked to their posts archive) optionally
680 * prefixed by a custom label (e.g., "Posted by"). Both the prefix and
681 * author name are wrapped in appropriate markup for styling.
682 *
683 * @param string $prefix Optional text to display before the author name. Default empty.
684 *
685 * @return string HTML markup containing the author information.
686 */
687 public static function rtsb_posted_by( $prefix = '' ) {
688 return sprintf(
689 /* translators: %1$s: Optional prefix (e.g., "Posted by"), %2$s: Author name with a link. */
690 esc_html__( '%1$s %2$s', 'shopbuilder' ),
691 $prefix ? '<span class="prefix">' . $prefix . '</span>' : '',
692 '<span class="byline"><a href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" rel="author">' . esc_html( get_the_author() ) . '</a></span>'
693 );
694 }
695 /**
696 * Retrieve the formatted comments count text for the current post.
697 *
698 * Returns a translated string showing the number of comments,
699 * automatically handling singular/plural forms.
700 *
701 * Example: "Comment: 1" or "Comments: 5".
702 *
703 * @return string Formatted comments count text.
704 */
705 public static function get_post_comments_number() {
706 $comments_number = get_comments_number();
707 // translators: %s is for comments number.
708 $comments = sprintf( _n( 'Comment: %s', 'Comments: %s', $comments_number, 'shopbuilder' ), number_format_i18n( $comments_number ) );
709 return $comments;
710 }
711 /**
712 * Get the separator used between post taxonomy list items.
713 *
714 * Returns an HTML span element used as a separator between categories or tags.
715 * The output can be customized using the `rtsb_post_list_item_separator` filter.
716 *
717 * @return string HTML separator markup.
718 */
719 public static function rtsb_list_item_separator() {
720 $separator = sprintf(
721 /* translators: Used between list items, there is a space after the comma. */
722 "<span class='%s'>%s</span>",
723 'sp',
724 ' '
725 );
726
727 return apply_filters( 'rtsb_post_list_item_separator', $separator );
728 }
729 /**
730 * Calculate and display the estimated reading time for the current post.
731 *
732 * Counts the words in the post content (after removing shortcodes and HTML tags)
733 * and estimates reading time based on 200 words per minute. Outputs a formatted
734 * HTML span with the reading duration (e.g., "1 min read", "5 mins read",
735 * "Less than a minute", or "2 hours read").
736 *
737 * @return string HTML-wrapped reading time text.
738 */
739 public static function rtsb_reading_time() {
740 $post_content = get_post()->post_content;
741 $post_content = strip_shortcodes( $post_content );
742 $post_content = wp_strip_all_tags( $post_content );
743 $word_count = str_word_count( $post_content );
744 $reading_time = floor( $word_count / 200 );
745
746 if ( $reading_time < 1 ) {
747 $result = esc_html__( 'Less than a minute', 'shopbuilder' );
748 } elseif ( $reading_time > 60 ) {
749 /* translators: %s is reading time. */
750 $result = sprintf( esc_html__( '%s hours read', 'shopbuilder' ), floor( $reading_time / 60 ) );
751 } elseif ( 1 == $reading_time ) {
752 $result = esc_html__( '1 min read', 'shopbuilder' );
753 } else {
754 $result = sprintf(
755 /* translators: %s is reading time. */
756 esc_html__( '%s mins read', 'shopbuilder' ),
757 $reading_time
758 );
759 }
760
761 return '<span class="meta-reading-time meta-item">' . $result . '</span> ';
762 }
763 /**
764 * Display formatted post view count with CSS status classes.
765 *
766 * Retrieves the post view count stored in the `rt_post_views` meta key,
767 * formats the number for display, and assigns a visual status class based
768 * on popularity (e.g., "rising", "high", "very-high").
769 *
770 * Outputs an HTML span containing the view number and label
771 * ("View" or "Views") along with an optional CSS class.
772 *
773 * - very-high: more than 1000 views
774 * - high: more than 100 views
775 * - rising: more than 5 views
776 *
777 * @param string $text Optional custom text (currently unused).
778 * @param int $post_id Optional post ID. Defaults to current post.
779 *
780 * @return string HTML markup for the post view count.
781 */
782 public static function rtsb_post_views( $text = '', $post_id = 0 ) {
783
784 if ( empty( $post_id ) ) {
785 $post_id = get_the_ID();
786 }
787
788 $views_class = '';
789 $formated = 0;
790 $count_key = 'rt_post_views';
791 $view_count = get_post_meta( $post_id, $count_key, true );
792 if ( ! empty( $view_count ) ) {
793 $formated = number_format_i18n( $view_count );
794
795 if ( $view_count > 1000 ) {
796 $views_class = 'very-high';
797 } elseif ( $view_count > 100 ) {
798 $views_class = 'high';
799 } elseif ( $view_count > 5 ) {
800 $views_class = 'rising';
801 }
802 } elseif ( '' == $view_count ) {
803 $view_count = 0;
804 } else {
805 $view_count = 0;
806 }
807
808 if ( 1 == $view_count ) {
809 $shopbuilder_view_html = esc_html__( 'View', 'shopbuilder' );
810 } else {
811 $shopbuilder_view_html = esc_html__( 'Views', 'shopbuilder' );
812 }
813
814 $shopbuilder_views_html = '<span class="view-number" >' . $view_count . '</span> ' . $shopbuilder_view_html;
815
816 return '<span class="meta-views meta-item ' . $views_class . '">' . $shopbuilder_views_html . '</span> ';
817 }
818 /**
819 * Content Box style section
820 *
821 * @param object $obj Reference object.
822 *
823 * @return array
824 */
825 public static function post_list_item_style( $obj ) {
826
827 $css_selectors = $obj->selectors['post_list_item_style'];
828 $title = esc_html__( 'Post Item', 'shopbuilder' );
829 $selectors = [
830 'box_shadow' => $css_selectors['box_shadow'],
831 'hover_box_shadow' => $css_selectors['hover_box_shadow'],
832 'border' => $css_selectors['border'],
833 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}};' ],
834 'content_alignment' => [ $css_selectors['content_alignment'] => 'align-items: {{VALUE}};' ],
835 'content_hr_alignment' => [ $css_selectors['content_hr_alignment'] => 'text-align:{{VALUE}};justify-content: {{VALUE}};' ],
836 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
837 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
838 ];
839
840 $fields = ControlHelper::general_elementor_style( 'post_list_item_style', $title, $obj, [], $selectors );
841
842 unset(
843 $fields['post_list_item_style_typo_note'],
844 $fields['rtsb_el_post_list_item_style_typography'],
845 $fields['post_list_item_style_color'],
846 $fields['post_list_item_style_alignment'],
847 $fields['post_list_item_style_color_tabs'],
848 $fields['post_list_item_style_color_tab'],
849 $fields['post_list_item_style_color_tab_end'],
850 $fields['post_list_item_style_hover_color_tab'],
851 $fields['post_list_item_style_hover_color'],
852 $fields['post_list_item_style_hover_bg_color'],
853 $fields['post_list_item_style_hover_color_tab_end'],
854 $fields['post_list_item_style_color_tabs_end'],
855 $fields['post_list_item_style_border_hover_color'],
856 $fields['post_list_item_style_margin']
857 );
858 $fields['post_list_item_style_border_note']['separator'] = 'default';
859 $fields['post_list_item_style_color_note']['separator'] = 'default';
860 $extra_controls['post_list_item_style_border_radius'] = [
861 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
862 'type' => 'dimensions',
863 'mode' => 'responsive',
864 'size_units' => [ 'px' ],
865 'selectors' => $selectors['border_radius'],
866 ];
867 $fields = Fns::insert_controls( 'post_list_item_style_spacing_note', $fields, $extra_controls );
868
869 $extra_controls2['rtsb_post_list_item_style_box_shadow'] = [
870 'type' => 'box-shadow',
871 'mode' => 'group',
872 'label' => esc_html__( 'Box Shadow', 'shopbuilder' ),
873 'selector' => $selectors['box_shadow'],
874 ];
875 $extra_controls2['rtsb_post_list_item_style_hover_box_shadow'] = [
876 'type' => 'box-shadow',
877 'mode' => 'group',
878 'label' => esc_html__( 'Hover Box Shadow', 'shopbuilder' ),
879 'selector' => $selectors['hover_box_shadow'],
880 'condition' => [
881 'layout_style' => [ 'rtsb-post-grid-layout1','rtsb-post-grid-layout2','rtsb-post-grid-layout3' ],
882 ],
883 ];
884 $fields = Fns::insert_controls( 'post_list_item_style_border_note', $fields, $extra_controls2 );
885 $extra_controls3['content_align_note'] = $obj->el_heading( esc_html__( 'Alignment', 'shopbuilder' ), 'default' );
886 $extra_controls3['content_align_note']['condition'] = [
887 'layout_style!' => [ 'rtsb-post-grid-layout1','rtsb-post-grid-layout2','rtsb-post-grid-layout3' ],
888 ];
889 $extra_controls3['content_alignment_style'] = [
890 'mode' => 'responsive',
891 'type' => 'choose',
892 'label' => esc_html__( 'Vertical Content', 'shopbuilder' ),
893 'options' => [
894 'start' => [
895 'title' => esc_html__( 'Start', 'shopbuilder' ),
896 'icon' => 'eicon-justify-start-v',
897 ],
898 'center' => [
899 'title' => esc_html__( 'Center', 'shopbuilder' ),
900 'icon' => 'eicon-justify-center-v',
901 ],
902 'end' => [
903 'title' => esc_html__( 'End', 'shopbuilder' ),
904 'icon' => 'eicon-justify-end-v',
905 ],
906
907 ],
908 'toggle' => true,
909 'selectors' => $selectors['content_alignment'] ,
910 'default' => 'start',
911 'condition' => [
912 'layout_style!' => [ 'rtsb-post-grid-layout1','rtsb-post-grid-layout2','rtsb-post-grid-layout3' ],
913 ],
914 ];
915 $extra_controls3['content_hr_alignment_style'] = [
916 'mode' => 'responsive',
917 'type' => 'choose',
918 'label' => esc_html__( 'Horizontal Content', 'shopbuilder' ),
919 'options' => [
920 'start' => [
921 'title' => esc_html__( 'Start', 'shopbuilder' ),
922 'icon' => 'eicon-justify-start-h',
923 ],
924 'center' => [
925 'title' => esc_html__( 'Center', 'shopbuilder' ),
926 'icon' => 'eicon-justify-center-h',
927 ],
928 'end' => [
929 'title' => esc_html__( 'End', 'shopbuilder' ),
930 'icon' => 'eicon-justify-end-h',
931 ],
932
933 ],
934 'toggle' => true,
935 'selectors' => $selectors['content_hr_alignment'] ,
936 'default' => 'start',
937 ];
938 $fields = Fns::insert_controls( 'post_list_item_style_color_note', $fields, $extra_controls3 );
939 return $fields;
940 }
941 /**
942 * Title style section
943 *
944 * @param object $obj Reference object.
945 *
946 * @return array
947 */
948 public static function title_style( $obj ) {
949 $condition = [
950 'show_title' => 'yes',
951 ];
952 $css_selectors = $obj->selectors['title_style'];
953 $title = esc_html__( 'Title', 'shopbuilder' );
954 $selectors = [
955 'typography' => $css_selectors['typography'],
956 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
957 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ],
958 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
959 ];
960
961 $fields = ControlHelper::general_elementor_style( 'title_style', $title, $obj, $condition, $selectors );
962 unset(
963 $fields['title_style_alignment'],
964 $fields['rtsb_el_title_style_border'],
965 $fields['title_style_border_note'],
966 $fields['title_style_bg_color'],
967 $fields['title_style_hover_bg_color'],
968 $fields['title_style_border_hover_color'],
969 $fields['title_style_padding'],
970 );
971 return $fields;
972 }
973 /**
974 * Content style section
975 *
976 * @param object $obj Reference object.
977 *
978 * @return array
979 */
980 public static function content_style( $obj ) {
981 $condition = [
982 'show_short_desc' => 'yes',
983 ];
984 $css_selectors = $obj->selectors['content_style'];
985 $title = esc_html__( 'Content', 'shopbuilder' );
986 $selectors = [
987 'typography' => $css_selectors['typography'],
988 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
989 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
990 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
991 ];
992
993 $fields = ControlHelper::general_elementor_style( 'content_style', $title, $obj, $condition, $selectors );
994 $fields['content_style_padding']['label'] = esc_html__( 'Wrapper Padding', 'shopbuilder' );
995 unset(
996 $fields['content_style_alignment'],
997 $fields['rtsb_el_content_style_border'],
998 $fields['content_style_border_note'],
999 $fields['content_style_color_tabs'],
1000 $fields['content_style_color_tab'],
1001 $fields['content_style_color_tab_end'],
1002 $fields['content_style_hover_color_tab'],
1003 $fields['content_style_bg_color'],
1004 $fields['content_style_hover_color'],
1005 $fields['content_style_hover_bg_color'],
1006 $fields['content_style_border_hover_color'],
1007 $fields['content_style_hover_color_tab_end'],
1008 $fields['content_style_color_tabs_end'],
1009 );
1010 return $fields;
1011 }
1012
1013 /**
1014 * Image style section
1015 *
1016 * @param object $obj Reference object.
1017 *
1018 * @return array
1019 */
1020 public static function image_styles( $obj ) {
1021 $condition = [
1022 'show_post_thumbnail' => 'yes',
1023 ];
1024 $alignment_options = ControlHelper::alignment();
1025 unset( $alignment_options['justify'] );
1026 $fields['image_style_sec_start'] = $obj->start_section(
1027 esc_html__( 'Image', 'shopbuilder' ),
1028 'style',
1029 [],
1030 $condition
1031 );
1032 $fields['image_styles_dimension_note'] = $obj->el_heading( esc_html__( 'Dimension', 'shopbuilder' ) );
1033 $fields['image_styles_width'] = [
1034 'type' => 'slider',
1035 'mode' => 'responsive',
1036 'label' => esc_html__( 'Image Width', 'shopbuilder' ),
1037 'size_units' => [ '%', 'px' ],
1038 'range' => [
1039 '%' => [
1040 'min' => 0,
1041 'max' => 100,
1042 'step' => 1,
1043 ],
1044 'px' => [
1045 'min' => 0,
1046 'max' => 600,
1047 'step' => 1,
1048 ],
1049 ],
1050 'selectors' => [
1051 $obj->selectors['image_style']['width'] => 'width: {{SIZE}}{{UNIT}};flex: 0 0 {{SIZE}}{{UNIT}};',
1052 ],
1053 ];
1054 $fields['image_styles_max_width'] = [
1055 'type' => 'slider',
1056 'mode' => 'responsive',
1057 'label' => esc_html__( 'Image Max-Width', 'shopbuilder' ),
1058 'size_units' => [ '%', 'px' ],
1059 'range' => [
1060 '%' => [
1061 'min' => 0,
1062 'max' => 100,
1063 'step' => 1,
1064 ],
1065 'px' => [
1066 'min' => 0,
1067 'max' => 600,
1068 'step' => 1,
1069 ],
1070
1071 ],
1072 'selectors' => [
1073 $obj->selectors['image_style']['max_width'] => 'max-width: {{SIZE}}{{UNIT}};',
1074 ],
1075 ];
1076 $fields['image_border_note'] = $obj->el_heading( esc_html__( 'Border', 'shopbuilder' ), 'before' );
1077 $fields['image_border'] = [
1078 'mode' => 'group',
1079 'type' => 'border',
1080 'label' => esc_html__( 'Border', 'shopbuilder' ),
1081 'selector' => $obj->selectors['image_style']['border'],
1082 'fields_options' => [
1083 'color' => [
1084 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1085 ],
1086 ],
1087 'separator' => 'default',
1088 ];
1089 $fields['image_styles_radius'] = [
1090 'mode' => 'responsive',
1091 'type' => 'dimensions',
1092 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
1093 'size_units' => [ 'px', '%', 'em' ],
1094 'selectors' => [
1095 $obj->selectors['image_style']['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1096 ],
1097 ];
1098 $fields['image_styles_spacing_note'] = $obj->el_heading( esc_html__( 'Spacing', 'shopbuilder' ) );
1099 $fields['image_styles_margin'] = [
1100 'mode' => 'responsive',
1101 'type' => 'dimensions',
1102 'label' => esc_html__( 'Margin', 'shopbuilder' ),
1103 'size_units' => [ 'px', '%', 'em' ],
1104 'selectors' => [
1105 $obj->selectors['image_style']['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1106 ],
1107 ];
1108 $fields['image_sec_end'] = $obj->end_section();
1109
1110 return $fields;
1111 }
1112 /**
1113 * Button style section
1114 *
1115 * @param object $obj Reference object.
1116 *
1117 * @return array
1118 */
1119 public static function button_style( $obj ) {
1120 $condition = [
1121 'show_read_more_btn' => 'yes',
1122 ];
1123 $css_selectors = $obj->selectors['readmore_button_style'];
1124 $title = esc_html__( 'Read More Button', 'shopbuilder' );
1125 $selectors = [
1126 'typography' => $css_selectors['typography'],
1127 'icon_size' => [
1128 $css_selectors['icon_size']['font_size'] => 'font-size: {{SIZE}}{{UNIT}};',
1129 $css_selectors['icon_size']['svg'] => 'height: {{SIZE}}{{UNIT}};width: {{SIZE}}{{UNIT}};',
1130 ],
1131 'icon_gap' => [ $css_selectors['icon_gap'] => 'gap: {{SIZE}}{{UNIT}};' ],
1132 'btn_width' => [ $css_selectors['btn_width'] => 'min-width: {{SIZE}}{{UNIT}};' ],
1133 'btn_height' => [ $css_selectors['btn_height'] => 'height: {{SIZE}}{{UNIT}};' ],
1134 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
1135 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}};' ],
1136 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ],
1137 'hover_bg_color' => [ $css_selectors['hover_bg_color'] => 'background-color: {{VALUE}};' ],
1138 'border' => $css_selectors['border'],
1139 'box_shadow' => $css_selectors['box_shadow'],
1140 'border_hover_color' => [ $css_selectors['border_hover_color'] => 'border-color: {{VALUE}};' ],
1141 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
1142 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
1143 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
1144 ];
1145
1146 $fields = ControlHelper::general_elementor_style( 'readmore_button_style', $title, $obj, $condition, $selectors );
1147 unset(
1148 $fields['readmore_button_style_alignment'],
1149 );
1150 $extra_controls['readmore_button_style_border_radius'] = [
1151 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
1152 'type' => 'dimensions',
1153 'mode' => 'responsive',
1154 'size_units' => [ 'px' ],
1155 'selectors' => $selectors['border_radius'],
1156 ];
1157 $fields = Fns::insert_controls( 'readmore_button_style_spacing_note', $fields, $extra_controls );
1158 $extra_controls2['readmore_button_style_btn_width'] = [
1159 'type' => 'slider',
1160 'mode' => 'responsive',
1161 'label' => esc_html__( 'Button Width', 'shopbuilder' ),
1162 'size_units' => [ 'px','%' ],
1163 'range' => [
1164 'px' => [
1165 'min' => 10,
1166 'max' => 1000,
1167 ],
1168 '%' => [
1169 'min' => 0,
1170 'max' => 100,
1171 ],
1172 ],
1173 'selectors' => $selectors['btn_width'],
1174 ];
1175 $extra_controls2['readmore_button_style_btn_height'] = [
1176 'type' => 'slider',
1177 'mode' => 'responsive',
1178 'label' => esc_html__( 'Button Height', 'shopbuilder' ),
1179 'size_units' => [ 'px','%' ],
1180 'range' => [
1181 'px' => [
1182 'min' => 10,
1183 'max' => 1000,
1184 ],
1185 '%' => [
1186 'min' => 0,
1187 'max' => 100,
1188 ],
1189 ],
1190 'selectors' => $selectors['btn_height'],
1191 ];
1192
1193 $extra_controls2['readmore_button_style_icon_size'] = [
1194 'type' => 'slider',
1195 'mode' => 'responsive',
1196 'label' => esc_html__( 'Icon Size', 'shopbuilder' ),
1197 'size_units' => [ 'px' ],
1198 'range' => [
1199 'px' => [
1200 'min' => 0,
1201 'max' => 100,
1202 ],
1203 ],
1204 'selectors' => $selectors['icon_size'],
1205 ];
1206 $extra_controls2['readmore_button_style_icon_gap'] = [
1207 'type' => 'slider',
1208 'mode' => 'responsive',
1209 'label' => esc_html__( 'Icon Gap', 'shopbuilder' ),
1210 'size_units' => [ 'px' ],
1211 'range' => [
1212 'px' => [
1213 'min' => 0,
1214 'max' => 100,
1215 ],
1216 ],
1217 'selectors' => $selectors['icon_gap'],
1218 ];
1219 $extra_controls2['readmore_button_style_box_shadow'] = [
1220 'type' => 'box-shadow',
1221 'mode' => 'group',
1222 'label' => esc_html__( 'Box Shadow', 'shopbuilder' ),
1223 'selector' => $selectors['box_shadow'],
1224 ];
1225 $fields = Fns::insert_controls( 'readmore_button_style_spacing_note', $fields, $extra_controls2, true );
1226
1227 return $fields;
1228 }
1229 /**
1230 * Meta style section
1231 *
1232 * @param object $obj Reference object.
1233 *
1234 * @return array
1235 */
1236 public static function meta_style( $obj ) {
1237 $conditions = [
1238 'relation' => 'or',
1239 'terms' => [
1240 [
1241 'name' => 'show_dates',
1242 'operator' => '==',
1243 'value' => 'yes',
1244 ],
1245 [
1246 'name' => 'show_author',
1247 'operator' => '==',
1248 'value' => 'yes',
1249 ],
1250 [
1251 'name' => 'show_comment',
1252 'operator' => '==',
1253 'value' => 'yes',
1254 ],
1255 [
1256 'name' => 'show_reading_time',
1257 'operator' => '==',
1258 'value' => 'yes',
1259 ],
1260 [
1261 'name' => 'show_post_views',
1262 'operator' => '==',
1263 'value' => 'yes',
1264 ],
1265
1266 ],
1267 ];
1268 $css_selectors = $obj->selectors['post_meta_style'];
1269 $title = esc_html__( 'Meta', 'shopbuilder' );
1270 $selectors = [
1271 'typography' => $css_selectors['typography'],
1272 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
1273 'meta_link_color' => [ $css_selectors['meta_link_color'] => 'color: {{VALUE}};' ],
1274 'meta_separator_color' => [ $css_selectors['meta_separator_color'] => 'color: {{VALUE}};' ],
1275 'meta_icon_color' => [ $css_selectors['meta_icon_color'] => 'color: {{VALUE}};' ],
1276 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ],
1277 'meta_gap' => [ $css_selectors['meta_gap'] => 'gap: {{SIZE}}{{UNIT}};' ],
1278 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
1279 ];
1280
1281 $fields = ControlHelper::general_elementor_style( 'post_meta_style', $title, $obj, [], $selectors, $conditions );
1282 $fields['post_meta_style_hover_color']['label'] = esc_html__( 'Link Hover Color', 'shopbuilder' );
1283 unset(
1284 $fields['post_meta_style_alignment'],
1285 $fields['rtsb_el_post_meta_style_border'],
1286 $fields['post_meta_style_border_note'],
1287 $fields['post_meta_style_bg_color'],
1288 $fields['post_meta_style_hover_bg_color'],
1289 $fields['post_meta_style_border_hover_color'],
1290 $fields['post_meta_style_padding'],
1291 );
1292 $extra_controls['post_meta_link_color'] = [
1293 'type' => 'color',
1294 'label' => esc_html__( 'Link Color', 'shopbuilder' ),
1295 'selectors' => $selectors['meta_link_color'],
1296 ];
1297 $extra_controls['post_meta_icon_color'] = [
1298 'type' => 'color',
1299 'label' => esc_html__( 'Icon Color', 'shopbuilder' ),
1300 'selectors' => $selectors['meta_icon_color'],
1301 ];
1302 $extra_controls['post_meta_separator_color'] = [
1303 'type' => 'color',
1304 'label' => esc_html__( 'Separator Color', 'shopbuilder' ),
1305 'selectors' => $selectors['meta_separator_color'],
1306 ];
1307 $fields = Fns::insert_controls( 'post_meta_style_color', $fields, $extra_controls, true );
1308 $extra_controls2['post_meta_gap'] = [
1309 'type' => 'slider',
1310 'mode' => 'responsive',
1311 'label' => esc_html__( 'Meta Gap', 'shopbuilder' ),
1312 'size_units' => [ 'px' ],
1313 'range' => [
1314 'px' => [
1315 'min' => 0,
1316 'max' => 100,
1317 ],
1318 ],
1319 'selectors' => $selectors['meta_gap'],
1320 ];
1321 $fields = Fns::insert_controls( 'post_meta_style_spacing_note', $fields, $extra_controls2, true );
1322 return $fields;
1323 }
1324 /**
1325 * Meta style section
1326 *
1327 * @param object $obj Reference object.
1328 *
1329 * @return array
1330 */
1331 public static function meta_icon_settings( $obj ) {
1332 $conditions = [
1333 'relation' => 'or',
1334 'terms' => [
1335 [
1336 'name' => 'show_dates',
1337 'operator' => '==',
1338 'value' => 'yes',
1339 ],
1340 [
1341 'name' => 'show_author',
1342 'operator' => '==',
1343 'value' => 'yes',
1344 ],
1345 [
1346 'name' => 'show_comment',
1347 'operator' => '==',
1348 'value' => 'yes',
1349 ],
1350 [
1351 'name' => 'show_reading_time',
1352 'operator' => '==',
1353 'value' => 'yes',
1354 ],
1355 [
1356 'name' => 'show_post_views',
1357 'operator' => '==',
1358 'value' => 'yes',
1359 ],
1360
1361 ],
1362 ];
1363 $fields['meta_icon_settings'] = $obj->start_section(
1364 esc_html__( 'Meta', 'shopbuilder' ),
1365 'settings',
1366 $conditions,
1367 );
1368 $fields['meta_separator'] = [
1369 'type' => 'text',
1370 'label' => esc_html__( 'Meta Separator', 'shopbuilder' ),
1371 ];
1372 $fields['author_icon_note'] = $obj->el_heading(
1373 esc_html__( 'Author Icon', 'shopbuilder' ),
1374 'default',
1375 [],
1376 [ 'show_author' => [ 'yes' ] ]
1377 );
1378 $fields['show_author_icon'] = [
1379 'type' => 'switch',
1380 'label' => esc_html__( 'Enable Icon?', 'shopbuilder' ),
1381 'description' => esc_html__( 'Switch on to enable pagination.', 'shopbuilder' ),
1382 'label_on' => esc_html__( 'On', 'shopbuilder' ),
1383 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
1384 'condition' => [
1385 'show_author' => [ 'yes' ],
1386 ],
1387 ];
1388 $fields['author_icon'] = [
1389 'label' => esc_html__( 'Icon', 'shopbuilder' ),
1390 'type' => 'icons',
1391 'default' => [
1392 'value' => 'far fa-user',
1393 'library' => 'fa-solid',
1394 ],
1395 'condition' => [
1396 'show_author' => [ 'yes' ],
1397 'show_author_icon' => [ 'yes' ],
1398 ],
1399 ];
1400 $fields['post_date_icon_note'] = $obj->el_heading(
1401 esc_html__( 'Date Icon', 'shopbuilder' ),
1402 'default',
1403 [],
1404 [ 'show_dates' => [ 'yes' ] ]
1405 );
1406 $fields['show_date_icon'] = [
1407 'type' => 'switch',
1408 'label' => esc_html__( 'Enable Icon?', 'shopbuilder' ),
1409 'description' => esc_html__( 'Switch on to enable pagination.', 'shopbuilder' ),
1410 'label_on' => esc_html__( 'On', 'shopbuilder' ),
1411 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
1412 'default' => 'yes',
1413 'condition' => [
1414 'show_dates' => [ 'yes' ] ,
1415 ],
1416 ];
1417 $fields['date_icon'] = [
1418 'label' => esc_html__( 'Icon', 'shopbuilder' ),
1419 'type' => 'icons',
1420 'default' => [
1421 'value' => 'fas fa-calendar-alt',
1422 'library' => 'fa-solid',
1423 ],
1424 'condition' => [
1425 'show_dates' => [ 'yes' ],
1426 'show_date_icon' => [ 'yes' ],
1427 ],
1428 ];
1429 $fields['post_comment_icon_note'] = $obj->el_heading(
1430 esc_html__( 'Comment Icon', 'shopbuilder' ),
1431 'default',
1432 [],
1433 [ 'show_comment' => [ 'yes' ] ]
1434 );
1435 $fields['show_comment_icon'] = [
1436 'type' => 'switch',
1437 'label' => esc_html__( 'Enable Icon?', 'shopbuilder' ),
1438 'description' => esc_html__( 'Switch on to enable pagination.', 'shopbuilder' ),
1439 'label_on' => esc_html__( 'On', 'shopbuilder' ),
1440 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
1441 'condition' => [
1442 'show_comment' => [ 'yes' ] ,
1443 ],
1444 ];
1445 $fields['comment_icon'] = [
1446 'label' => esc_html__( 'Icon', 'shopbuilder' ),
1447 'type' => 'icons',
1448 'default' => [
1449 'value' => 'far fa-comment',
1450 'library' => 'fa-solid',
1451 ],
1452 'condition' => [
1453 'show_comment' => [ 'yes' ],
1454 'show_comment_icon' => [ 'yes' ],
1455 ],
1456 ];
1457 $fields['post_reading_time_icon_note'] = $obj->el_heading(
1458 esc_html__( 'Reading Time Icon', 'shopbuilder' ),
1459 'default',
1460 [],
1461 [ 'show_reading_time' => [ 'yes' ] ]
1462 );
1463 $fields['show_reading_time_icon'] = [
1464 'type' => 'switch',
1465 'label' => esc_html__( 'Enable Icon?', 'shopbuilder' ),
1466 'description' => esc_html__( 'Switch on to enable pagination.', 'shopbuilder' ),
1467 'label_on' => esc_html__( 'On', 'shopbuilder' ),
1468 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
1469 'condition' => [
1470 'show_reading_time' => [ 'yes' ] ,
1471 ],
1472 ];
1473 $fields['reading_time_icon'] = [
1474 'label' => esc_html__( 'Icon', 'shopbuilder' ),
1475 'type' => 'icons',
1476 'default' => [
1477 'value' => 'far fa-clock',
1478 'library' => 'fa-solid',
1479 ],
1480 'condition' => [
1481 'show_reading_time' => [ 'yes' ],
1482 'show_reading_time_icon' => [ 'yes' ],
1483 ],
1484 ];
1485 $fields['post_views_icon_note'] = $obj->el_heading(
1486 esc_html__( 'Post Views Icon', 'shopbuilder' ),
1487 'default',
1488 [],
1489 [ 'show_post_views' => [ 'yes' ] ]
1490 );
1491 $fields['show_post_views_icon'] = [
1492 'type' => 'switch',
1493 'label' => esc_html__( 'Enable Icon?', 'shopbuilder' ),
1494 'description' => esc_html__( 'Switch on to enable pagination.', 'shopbuilder' ),
1495 'label_on' => esc_html__( 'On', 'shopbuilder' ),
1496 'label_off' => esc_html__( 'Off', 'shopbuilder' ),
1497 'condition' => [
1498 'show_post_views' => [ 'yes' ] ,
1499 ],
1500 ];
1501 $fields['post_views_icon'] = [
1502 'label' => esc_html__( 'Icon', 'shopbuilder' ),
1503 'type' => 'icons',
1504 'default' => [
1505 'value' => 'far fa-eye',
1506 'library' => 'fa-solid',
1507 ],
1508 'condition' => [
1509 'show_post_views' => [ 'yes' ],
1510 'show_post_views_icon' => [ 'yes' ],
1511 ],
1512 ];
1513
1514 $fields['meta_icon_settings_end'] = $obj->end_section();
1515 return $fields;
1516 }
1517 /**
1518 * Taxonomy style section
1519 *
1520 * @param object $obj Reference object.
1521 *
1522 * @return array
1523 */
1524 public static function taxonomy_style( $obj ) {
1525 $conditions = [
1526 'relation' => 'or',
1527 'terms' => [
1528 [
1529 'name' => 'show_categories',
1530 'operator' => '==',
1531 'value' => 'yes',
1532 ],
1533 [
1534 'name' => 'show_tags',
1535 'operator' => '==',
1536 'value' => 'yes',
1537 ],
1538 ],
1539 ];
1540 $css_selectors = $obj->selectors['post_taxonomy_style'];
1541 $title = esc_html__( 'Category/Tag', 'shopbuilder' );
1542 $selectors = [
1543 'typography' => $css_selectors['typography'],
1544 'border' => $css_selectors['border'],
1545 'border_hover_color' => [ $css_selectors['border_hover_color'] => 'border-color: {{VALUE}};' ],
1546 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
1547 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}};' ],
1548 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ],
1549 'hover_bg_color' => [ $css_selectors['hover_bg_color'] => 'background-color: {{VALUE}};' ],
1550 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
1551 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}!important;' ],
1552 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
1553 'taxonomy_gap' => [ $css_selectors['taxonomy_gap'] => 'gap: {{SIZE}}{{UNIT}};' ],
1554
1555 ];
1556
1557 $fields = ControlHelper::general_elementor_style( 'post_taxonomy_style', $title, $obj, [], $selectors, $conditions );
1558
1559 unset(
1560 $fields['post_taxonomy_style_alignment'],
1561 );
1562 $extra_controls['taxonomy_border_radius'] = [
1563 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
1564 'type' => 'dimensions',
1565 'mode' => 'responsive',
1566 'size_units' => [ 'px' ],
1567 'selectors' => $selectors['border_radius'],
1568 ];
1569 $fields = Fns::insert_controls( 'post_taxonomy_style', $fields, $extra_controls );
1570 $extra_controls2['post_taxonomy_gap'] = [
1571 'type' => 'slider',
1572 'mode' => 'responsive',
1573 'label' => esc_html__( 'Meta Gap', 'shopbuilder' ),
1574 'size_units' => [ 'px' ],
1575 'range' => [
1576 'px' => [
1577 'min' => 0,
1578 'max' => 100,
1579 ],
1580 ],
1581 'selectors' => $selectors['taxonomy_gap'],
1582 ];
1583 $fields = Fns::insert_controls( 'post_taxonomy_style_spacing_note', $fields, $extra_controls2, true );
1584 return $fields;
1585 }
1586 /**
1587 * Get the list of available image hover effects for post widgets.
1588 *
1589 * Returns an associative array of hover effect CSS class names mapped
1590 * to their corresponding human-readable labels. The list can be modified
1591 * by third-party developers through the
1592 * `rtsb/general/widget/post_widget_image_hover_effect` filter.
1593 *
1594 * Available effects:
1595 * - None
1596 * - Scale In
1597 * - Scale Out
1598 * - Slide Up
1599 * - Slide Down
1600 * - Slide Right
1601 * - Slide Left
1602 *
1603 * @return array List of image hover effect options (class => label).
1604 */
1605 public static function rtsb_post_image_hover_effect() {
1606 return apply_filters(
1607 'rtsb/general/widget/post_widget_image_hover_effect',
1608 [
1609 'rtsb-gw-img-effect-none' => __( 'None', 'shopbuilder' ),
1610 'rtsb-gw-img-zoom-in' => __( 'Scale In', 'shopbuilder' ),
1611 'rtsb-gw-img-zoom-out' => __( 'Scale Out', 'shopbuilder' ),
1612 'rtsb-gw-img-slide-up' => __( 'Slide Up', 'shopbuilder' ),
1613 'rtsb-gw-img-slide-down' => __( 'Slide Down', 'shopbuilder' ),
1614 'rtsb-gw-img-slide-right' => __( 'Slide Right', 'shopbuilder' ),
1615 'rtsb-gw-img-slide-left' => __( 'Slide Left', 'shopbuilder' ),
1616 ]
1617 );
1618 }
1619 /**
1620 * Get CSS selectors used for styling pagination elements in Elementor widgets.
1621 *
1622 * Returns an associative array mapping style control keys (e.g., typography,
1623 * alignment, colors, borders) to the corresponding CSS selectors used within
1624 * the widget. These selectors are primarily applied when rendering pagination
1625 * for posts, archives, and "load more" buttons inside the ShopBuilder Elementor
1626 * container.
1627 *
1628 * This helps ensure all pagination-related style controls are centralized and
1629 * consistent across widgets.
1630 *
1631 * @return array List of pagination style selectors keyed by control name.
1632 */
1633 public static function post_pagination_selectors() {
1634 return [
1635 'typography' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li span, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button',
1636 'alignment' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap',
1637 'width' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li span, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button',
1638 'height' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li span, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button',
1639 'color' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button',
1640 'bg_color' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button',
1641 'active_color' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li span',
1642 'active_bg_color' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li span',
1643 'hover_color' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a:hover, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button:hover, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button:hover',
1644 'hover_bg_color' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a:hover, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button:hover, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button:hover',
1645 'border' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li span, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button',
1646 'border_hover_color' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a:hover, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button:hover, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button:hover',
1647 'border_active_color' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li span',
1648 'border_radius' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li a, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list li span, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button',
1649 'spacing' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap',
1650 'padding' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap .rtsb-load-more button, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap .rtsb-load-more button',
1651 'margin' => '{{WRAPPER}} .rtsb-elementor-container .rtsb-pagination ul.pagination-list, {{WRAPPER}} .rtsb-elementor-container .rtsb-pagination-wrap, {{WRAPPER}} .rtsb-elementor-container .rtsb-archive-pagination-wrap',
1652 ];
1653 }
1654 }
1655