PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.4.17
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.4.17
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / admin / views / configs / generator / class-sps-display.php

class-sps-display.php in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 2.4.17, at admin/views/configs/generator/class-sps-display.php

671 lines 27.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Display options Meta-box configurations.
4 *
5 * @package Smart_Post_Show
6 * @subpackage Smart_Post_Show/admin
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 die; } // Cannot access pages directly.
11
12 /**
13 * The Layout building class.
14 */
15 class SPS_Display {
16
17 /**
18 * Display options section metabox.
19 *
20 * @param string $prefix The metabox key.
21 * @return void
22 */
23 public static function section( $prefix ) {
24 SP_PC::createSection(
25 $prefix,
26 array(
27 'title' => __( 'DISPLAY OPTIONS', 'post-carousel' ),
28 'icon' => 'fa fa-th-large',
29 'fields' => array(
30 array(
31 'id' => 'section_title',
32 'type' => 'switcher',
33 'title' => __( 'Section Title ', 'post-carousel' ),
34 'subtitle' => __( 'Show/Hide item showcase section title.', 'post-carousel' ),
35 'default' => false,
36 'text_on' => __( 'Show', 'post-carousel' ),
37 'text_off' => __( 'Hide', 'post-carousel' ),
38 'text_width' => 75,
39 ),
40 array(
41 'id' => 'section_title_margin',
42 'type' => 'spacing',
43 'title' => __( 'Section Title Margin', 'post-carousel' ),
44 'subtitle' => __( 'Set margin for the section title.', 'post-carousel' ),
45 'all_icon' => '<i class="fa fa-long-arrow-down"></i>',
46 'units' => array(
47 'px',
48 ),
49 'all_placeholder' => 'margin',
50 'default' => array(
51 'top' => '0',
52 'right' => '0',
53 'bottom' => '30',
54 'top' => '0',
55 ),
56 'dependency' => array(
57 'section_title',
58 '==',
59 'true',
60 true,
61 ),
62 ),
63 array(
64 'id' => 'pcp_number_of_columns',
65 'type' => 'column',
66 'title' => __( 'Column(s)', 'post-carousel' ),
67 'subtitle' => __( 'Set number of column(s) in different devices for responsive view.', 'post-carousel' ),
68 'default' => array(
69 'lg_desktop' => '4',
70 'desktop' => '4',
71 'tablet' => '3',
72 'mobile_landscape' => '2',
73 'mobile' => '1',
74 ),
75 'min' => '1',
76 'help' => '<i class="fa fa-television"></i> Large Desktop - is larger than 1200px,<br><i class="fa fa-desktop"></i> Desktop - size is larger than 992px,<br> <i class="fa fa-tablet"></i> Tablet - Size is larger than 768,<br> <i class="fa fa-mobile"></i> Mobile Landscape- size is larger than 576px.,<br> <i class="fa fa-mobile"></i> Mobile - size is smaller than 576px.',
77 ),
78 array(
79 'id' => 'margin_between_post',
80 'type' => 'spacing',
81 'title' => __( 'Margin Between Columns', 'post-carousel' ),
82 'subtitle' => __( 'Set margin between columns (items).', 'post-carousel' ),
83 'all' => true,
84 'all_icon' => '<i class="fa fa-arrows-h"></i>',
85 'units' => array(
86 'px',
87 ),
88 'all_placeholder' => 'margin',
89 'default' => array(
90 'all' => '20',
91 ),
92 ),
93 array(
94 'id' => 'post_content_orientation',
95 'type' => 'layout_preset',
96 'title' => __( 'Content Orientation ', 'post-carousel' ),
97 'subtitle' => __( 'Set a position for the item content.', 'post-carousel' ),
98 'desc' => __( 'To unlock more amazing Content Orientation and Layout based Settings, <a href="https://smartpostshow.com/" target="_blank"><strong>Upgrade To Pro!</strong></a>', 'post-carousel' ),
99 'class' => 'pcp-content-orientation',
100 'options' => array(
101 'default' => array(
102 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/default.svg',
103 'text' => __( 'Default', 'post-carousel' ),
104 ),
105 'left-thumb' => array(
106 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/left-image.svg',
107 'text' => __( 'Left Image', 'post-carousel' ),
108 'pro_only' => true,
109 ),
110 'right-thumb' => array(
111 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/right-image.svg',
112 'text' => __( 'Right Image', 'post-carousel' ),
113 'pro_only' => true,
114 ),
115 'overlay' => array(
116 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/overlay.svg',
117 'text' => __( 'Overlay', 'post-carousel' ),
118 'pro_only' => true,
119 ),
120 'card' => array(
121 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/card.svg',
122 'text' => __( 'Card', 'post-carousel' ),
123 'pro_only' => true,
124 ),
125 'overlay-box' => array(
126 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/overlay-box.svg',
127 'text' => __( 'Overlay Box', 'post-carousel' ),
128 'pro_only' => true,
129 ),
130 ),
131 'default' => 'default',
132 ),
133 array(
134 'id' => 'post_border',
135 'type' => 'border',
136 'title' => __( 'Border', 'post-carousel' ),
137 'subtitle' => __( 'Set border for the item.', 'post-carousel' ),
138 'all' => true,
139 'default' => array(
140 'all' => '0',
141 'style' => 'solid',
142 'color' => '#e2e2e2',
143 ),
144 ),
145 array(
146 'id' => 'post_border_radius_property',
147 'type' => 'spacing',
148 'title' => __( 'Border Radius', 'post-carousel' ),
149 'subtitle' => __( 'Set border radius for item.', 'post-carousel' ),
150 'all' => true,
151 'units' => array( 'px', '%' ),
152 'default' => array(
153 'all' => '0',
154 ),
155 ),
156 array(
157 'id' => 'post_background_property',
158 'type' => 'color',
159 'title' => __( 'Background', 'post-carousel' ),
160 'subtitle' => __( 'Set background color for the item.', 'post-carousel' ),
161 'default' => 'transparent',
162 ),
163 array(
164 'id' => 'post_inner_padding_property',
165 'type' => 'spacing',
166 'title' => __( 'Inner Padding', 'post-carousel' ),
167 'subtitle' => __( 'Set inner padding for item.', 'post-carousel' ),
168 'default' => array(
169 'top' => '0',
170 'right' => '0',
171 'bottom' => '0',
172 'left' => '0',
173 'unit' => 'px',
174 ),
175 'help' => "<img src='" . SP_PC_URL . "/admin/assets/img/inner_padding.jpg'>",
176 ),
177 array(
178 'id' => 'post_content_sorter',
179 'type' => 'sortable',
180 'title' => __( 'Content Fields', 'post-carousel' ),
181 'subtitle' => __( 'Item content fields which are draggable to change display order and it\'s settings.', 'post-carousel' ),
182 'desc' => __( 'To show Social Share and Custom Fields, <a href="https://smartpostshow.com/" target="_blank"><strong>Upgrade To Pro!</strong></a>', 'post-carousel' ),
183 'class' => 'post_content_sorter',
184 'fields' => array(
185 array(
186 'id' => 'pcp_post_thumb',
187 'type' => 'accordion',
188 'accordions' => array(
189 array(
190 'title' => __( 'Thumbnail', 'post-carousel' ),
191 'fields' => array(
192 array(
193 'id' => 'post_thumb_show',
194 'type' => 'switcher',
195 'title' => __( 'Thumbnail', 'post-carousel' ),
196 'text_on' => __( 'Show', 'post-carousel' ),
197 'text_off' => __( 'Hide', 'post-carousel' ),
198 'default' => true,
199 'text_width' => 80,
200 ),
201 array(
202 'id' => 'pcp_thumb_sizes',
203 'type' => 'image_sizes',
204 'title' => __( 'Size', 'post-carousel' ),
205 'default' => 'full',
206 'dependency' => array( 'post_thumb_show', '==', 'true', true ),
207 ),
208 array(
209 'id' => 'pcp_image_crop_size',
210 'type' => 'dimensions_advanced',
211 'title' => __( 'Custom Size (Pro)', 'post-carousel' ),
212 'chosen' => true,
213 'bottom' => false,
214 'left' => false,
215 'color' => false,
216 'top_icon' => '<i class="fa fa-arrows-h"></i>',
217 'right_icon' => '<i class="fa fa-arrows-v"></i>',
218 'top_placeholder' => 'width',
219 'right_placeholder' => 'height',
220 'styles' => array(
221 'Soft-crop',
222 'Hard-crop',
223 ),
224 'default' => array(
225 'top' => '600',
226 'right' => '400',
227 'style' => 'Soft-crop',
228 'unit' => 'px',
229 ),
230 'attributes' => array(
231 'min' => 0,
232 ),
233 'dependency' => array( 'post_thumb_show|pcp_thumb_sizes', '==|==', 'true|custom' ),
234 ),
235 array(
236 'id' => 'load_2x_image',
237 'type' => 'switcher',
238 'title' => __( 'Load 2x Resolution Image in Retina Display (Pro)', 'post-carousel' ),
239 'text_on' => __( 'Enabled', 'post-carousel' ),
240 'text_off' => __( 'Disabled', 'post-carousel' ),
241 'text_width' => 94,
242 'default' => false,
243 'dependency' => array( 'post_thumb_show|pcp_thumb_sizes', '==|==', 'true|custom' ),
244 ),
245 ),
246 ),
247 ),
248 ),
249 array(
250 'id' => 'pcp_post_title',
251 'type' => 'accordion',
252 'accordions' => array(
253 array(
254 'title' => 'Title',
255 'fields' => array(
256 array(
257 'id' => 'show_post_title',
258 'type' => 'switcher',
259 'title' => __( 'Title', 'post-carousel' ),
260 'text_on' => __( 'Show', 'post-carousel' ),
261 'text_off' => __( 'Hide', 'post-carousel' ),
262 'default' => true,
263 'text_width' => 80,
264 ),
265 array(
266 'id' => 'post_title_tag',
267 'type' => 'select',
268 'title' => __( 'Title HTML Tag', 'post-carousel' ),
269 'options' => array(
270 'h1' => __( 'h1', 'post-carousel' ),
271 'h2' => __( 'h2', 'post-carousel' ),
272 'h3' => __( 'h3', 'post-carousel' ),
273 'h4' => __( 'h4', 'post-carousel' ),
274 'h5' => __( 'h5', 'post-carousel' ),
275 'h6' => __( 'h6', 'post-carousel' ),
276 'p' => __( 'p', 'post-carousel' ),
277 'div' => __( 'div', 'post-carousel' ),
278 ),
279 'default' => 'h2',
280 'class' => 'chosen',
281 'dependency' => array( 'show_post_title', '==', 'true', true ),
282 ),
283 ),
284 ),
285 ),
286 ),
287 array(
288 'id' => 'pcp_post_meta',
289 'type' => 'accordion',
290 'accordions' => array(
291 array(
292 'title' => __( 'Meta Fields', 'post-carousel' ),
293 'fields' => array(
294 array(
295 'id' => 'show_post_meta',
296 'type' => 'switcher',
297 'title' => __( 'Meta Fields', 'post-carousel' ),
298 'text_on' => __( 'Show', 'post-carousel' ),
299 'text_off' => __( 'Hide', 'post-carousel' ),
300 'default' => true,
301 'text_width' => 80,
302 ),
303 array(
304 'id' => 'pcp_post_meta_group',
305 'class' => 'pcp_custom_group_design',
306 'type' => 'group',
307 'button_title' => __( 'Add New Meta', 'post-carousel' ),
308 'dependency' => array( 'show_post_meta', '==', 'true' ),
309 'fields' => array(
310 array(
311 'id' => 'select_post_meta',
312 'type' => 'select',
313 'title' => __( 'Select Meta', 'post-carousel' ),
314 'placeholder' => __( 'Select a meta', 'post-carousel' ),
315 'class' => 'pcp-meta-select',
316 'options' => array(
317 'author' => __( 'Author', 'post-carousel' ),
318 'date' => __( 'Date', 'post-carousel' ),
319 'comment_count' => __( 'Comment Count', 'post-carousel' ),
320 'taxonomy' => __( 'Taxonomy (Pro)', 'post-carousel' ),
321 'view_count' => __( 'View Count (Pro)', 'post-carousel' ),
322 'like' => __( 'Like (Pro)', 'post-carousel' ),
323 'reading_time' => __( 'Reading Time (Pro)', 'post-carousel' ),
324 ),
325 ),
326 array(
327 'id' => 'post_meta_author_avatar',
328 'type' => 'select',
329 'title' => __( 'Avatar', 'post-carousel' ),
330 'class' => 'post_meta_author_avatar',
331 'options' => array(
332 'show_name' => __( 'Show name', 'post-carousel' ),
333 'show_gravatar' => __( 'Show gravatar', 'post-carousel' ),
334 'name_with_gravatar' => __( 'Author name & gravatar', 'post-carousel' ),
335 'name_with_icon' => __( 'Author name with an icon', 'post-carousel' ),
336
337 ),
338 'desc' => __( 'To show gravatar, you must <a href="https://wordpress.org/support/article/how-to-use-gravatars/" target="_blank" rel="noopener noreferrer nofollow"><em>enable it</em></a>.', 'post-carousel' ),
339 'default' => 'name_with_icon',
340 'dependency' => array( 'select_post_meta', '==', 'author' ),
341 ),
342 array(
343 'id' => 'post_meta_date_format',
344 'type' => 'select',
345 'title' => __( 'Date Format', 'post-carousel' ),
346 'class' => 'post_meta_date_format',
347 'options' => array(
348 'default' => __( 'Default', 'post-carousel' ),
349 'time_ago' => __( 'Time ago(human time)', 'post-carousel' ),
350 'custom' => __( 'Custom', 'post-carousel' ),
351 ),
352 'default' => 'default',
353 'dependency' => array( 'select_post_meta', '==', 'date' ),
354 ),
355 array(
356 'id' => 'pcp_custom_meta_date_format',
357 'type' => 'text',
358 'title' => ' ',
359 'class' => 'pcp_custom_meta_date_format',
360 'placeholder' => __( 'F j, Y', 'post-carousel' ),
361 'default' => __( 'F j, Y', 'post-carousel' ),
362 'desc' => __( 'To define format, check <a href="https://wordpress.org/support/article/formatting-date-and-time/" target="_blank" rel="noopener noreferrer nofollow"><em>this doc</em></a>.', 'post-carousel' ),
363 'dependency' => array( 'select_post_meta|post_meta_date_format', '==|==', 'date|custom' ),
364 ),
365 array(
366 'id' => 'post_meta_taxonomy',
367 'type' => 'select',
368 'title' => __( 'Select Taxonomy', 'post-carousel' ),
369 'class' => 'post_meta_taxonomy',
370 'options' => 'taxonomy',
371 'query_args' => array(
372 'type' => 'any',
373 ),
374 'attributes' => array(
375 'style' => 'width: 200px;',
376 ),
377 'empty_message' => __( 'No taxonomies found.', 'post-carousel' ),
378 'dependency' => array( 'select_post_meta', '==', 'taxonomy' ),
379 ),
380 array(
381 'id' => 'pcp_meta_position',
382 'class' => 'pcp_meta_position',
383 'type' => 'button_set',
384 'title' => __( 'Position', 'post-carousel' ),
385 'options' => array(
386 'beside_meta' => __( 'Beside Other Meta', 'post-carousel' ),
387 'above_title' => __( 'Above Title', 'post-carousel' ),
388 'over_thumb' => __( 'Over Thumbnail', 'post-carousel' ),
389
390 ),
391 'default' => 'beside_meta',
392 'dependency' => array( 'select_post_meta', '==', 'taxonomy' ),
393 ),
394 array(
395 'id' => 'pcp_meta_over_thump_position',
396 'type' => 'select',
397 'title' => __( 'Over Thumbnail Position', 'post-carousel' ),
398 'options' => array(
399 'top_left' => __( 'Top Left', 'post-carousel' ),
400 'top_right' => __( 'Top Right', 'post-carousel' ),
401 'bottom_left' => __( 'Bottom Left', 'post-carousel' ),
402 'bottom_right' => __( 'Bottom Right', 'post-carousel' ),
403 ),
404 'default' => 'top_left',
405 'dependency' => array( 'select_post_meta|pcp_meta_position', '==|==', 'taxonomy|over_thumb' ),
406 ),
407 array(
408 'id' => 'pcp_meta_pill_color',
409 'type' => 'color_group',
410 'title' => __( 'Meta Color', 'post-carousel' ),
411 'options' => array(
412 'text' => __( 'Text', 'post-carousel' ),
413 'bg' => __( 'Background', 'post-carousel' ),
414 ),
415 'default' => array(
416 'text' => '#fff',
417 'bg' => '#e53935',
418 ),
419 'dependency' => array( 'select_post_meta|pcp_meta_position', '==|!=', 'taxonomy|beside_meta' ),
420 ),
421 array(
422 'id' => 'pcp_word_per_minute',
423 'type' => 'number',
424 'title' => __( 'Per Minute', 'post-carousel' ),
425 'class' => 'pcp_reading_time_meta',
426 'title_help' => __( 'Default 300 words, the average reading speed for adults.', 'post-carousel' ),
427 'sanitize' => 'pcp_sanitize_number_field',
428 'unit' => __( 'words', 'post-carousel' ),
429 'default' => '300',
430 'dependency' => array( 'select_post_meta', '==', 'reading_time' ),
431 'default' => 300,
432 ),
433 array(
434 'id' => 'select_meta_icon',
435 'class' => 'select_meta_icon',
436 'type' => 'icon',
437 'title' => __( 'Meta Icon', 'post-carousel' ),
438 'default' => 'fa fa-folder-o',
439 'dependency' => array( 'pcp_meta_position|select_post_meta', '==|!=', 'beside_meta|like' ),
440 ),
441 array(
442 'id' => 'reading_time_postfix',
443 'type' => 'text',
444 'title' => __( 'Reading Time Postfix', 'post-carousel' ),
445 'class' => 'pcp_reading_time_postfix',
446 'title_help' => __( 'Text after time. Leave empty for nothing.', 'post-carousel' ),
447 'default' => ' Min Read',
448 'dependency' => array( 'select_post_meta', '==', 'reading_time' ),
449 ),
450 ),
451 'default' => array(
452 array(
453 'select_post_meta' => 'author',
454 'post_meta_author_avatar' => 'name_with_icon',
455 'select_meta_icon' => 'fa fa-user',
456 'pcp_meta_position' => 'beside_meta',
457 ),
458 array(
459 'select_post_meta' => 'date',
460 'select_meta_icon' => 'fa fa-calendar',
461 'pcp_meta_position' => 'beside_meta',
462 ),
463 array(
464 'select_post_meta' => 'comment_count',
465 'select_meta_icon' => 'fa fa-comments-o',
466 'pcp_meta_position' => 'beside_meta',
467 ),
468 ),
469 ),
470 ),
471 ),
472 ),
473 ),
474 array(
475 'id' => 'pcp_post_content',
476 'type' => 'accordion',
477 'accordions' => array(
478 array(
479 'title' => 'Content',
480 'fields' => array(
481 array(
482 'id' => 'show_post_content',
483 'type' => 'switcher',
484 'title' => __( 'Content', 'post-carousel' ),
485 'text_on' => __( 'Show', 'post-carousel' ),
486 'text_off' => __( 'Hide', 'post-carousel' ),
487 'default' => true,
488 'text_width' => 80,
489 ),
490 array(
491 'id' => 'post_content_type',
492 'type' => 'select',
493 'class' => 'pcp-post-content-type',
494 'title' => __( 'Content Display Type', 'post-carousel' ),
495 'options' => array(
496 'excerpt' => __( 'Excerpt', 'post-carousel' ),
497 'full_content' => __( 'Full Content', 'post-carousel' ),
498 'limit_content' => __( 'Content with Limit (Pro)', 'post-carousel' ),
499 ),
500 'default' => 'excerpt',
501 'dependency' => array( 'show_post_content', '==', 'true', true ),
502 ),
503
504 // ReadMore settings.
505 array(
506 'id' => 'show_read_more',
507 'type' => 'switcher',
508 'title' => __( 'Read More', 'post-carousel' ),
509 'text_on' => __( 'Show', 'post-carousel' ),
510 'text_off' => __( 'Hide', 'post-carousel' ),
511 'default' => true,
512 'text_width' => 80,
513 'dependency' => array( 'post_content_type', '!=', 'full_content', true ),
514 ),
515 array(
516 'id' => 'pcp_read_label',
517 'type' => 'text',
518 'title' => __( 'Read More Label', 'post-carousel' ),
519 'default' => 'Read More',
520 'dependency' => array( 'post_content_type|show_read_more', '!=|==', 'full_content|true', true ),
521 ),
522 array(
523 'id' => 'readmore_color_button',
524 'type' => 'color_group',
525 'title' => __( 'Read More Color', 'post-carousel' ),
526 'options' => array(
527 'standard' => __( 'Text Color', 'post-carousel' ),
528 'hover' => __( 'Text Hover Color', 'post-carousel' ),
529 'bg' => __( 'Background', 'post-carousel' ),
530 'hover_bg' => __( 'Hover Background', 'post-carousel' ),
531 'border' => __( 'Border', 'post-carousel' ),
532 'hover_border' => __( 'Hover Border', 'post-carousel' ),
533 ),
534 'default' => array(
535 'standard' => '#111',
536 'hover' => '#fff',
537 'bg' => 'transparent',
538 'hover_bg' => '#e1624b',
539 'border' => '#888',
540 'hover_border' => '#e1624b',
541 ),
542 'dependency' => array( 'post_content_type|show_read_more', '!=|==', 'full_content|true', true ),
543 ),
544
545 ),
546 ),
547 ),
548 ),
549 array(
550 'id' => 'pcp_social_share',
551 'type' => 'accordion',
552 'class' => 'pcp-pro-only',
553 'accordions' => array(
554 array(
555 'title' => __( 'Social Share (Pro)', 'post-carousel' ),
556 'fields' => array(
557 array(
558 'id' => 'social_position',
559 'type' => 'button_set',
560 'title' => __( 'Alignment', 'post-carousel' ),
561 'options' => array(
562 'left' => '<i class="fa fa-align-left" title="Left"></i>',
563 'center' => '<i class="fa fa-align-center" title="Center"></i>',
564 'right' => '<i class="fa fa-align-right" title="Right"></i>',
565 ),
566 'default' => 'left',
567 'dependency' => array( 'social_sharing_media', '!=', '' ),
568 ),
569 ),
570 ),
571 ),
572 ), // PCP Post Social.
573 array(
574 'id' => 'pcp_custom_fields',
575 'type' => 'accordion',
576 'class' => 'pcp-pro-only',
577 'accordions' => array(
578 array(
579 'title' => __( 'Custom Fields (Pro)', 'post-carousel' ),
580 'fields' => array(
581 // The Group Fields.
582 array(
583 'id' => 'pcp_custom_meta_icon',
584 'type' => 'icon',
585 'title' => 'Icon Before Name',
586 'default' => 'fa fa-calendar-o',
587 ),
588
589 ), // End Fields array.
590 ),
591 ), // Accordion.
592 ), // Custom fields end.
593 ),
594 ),
595 array(
596 'id' => 'show_post_pagination',
597 'type' => 'switcher',
598 'text_on' => __( 'Enabled', 'post-carousel' ),
599 'text_off' => __( 'Disabled', 'post-carousel' ),
600 'text_width' => 100,
601 'title' => __( 'Pagination', 'post-carousel' ),
602 'subtitle' => __( 'Enabled/Disabled item pagination.', 'post-carousel' ),
603 'default' => true,
604 'dependency' => array( 'pcp_layout_preset', 'not-any', 'carousel_layout', 'true' ),
605 ),
606 array(
607 'id' => 'post_pagination_type',
608 'type' => 'radio',
609 'title' => __( 'Pagination Type', 'post-carousel' ),
610 'subtitle' => __( 'Choose a pagination type.', 'post-carousel' ),
611 'desc' => __( 'More amazing Ajax Pagination Settings are available in <a href="https://smartpostshow.com/" target="_blank"><strong>Pro</strong></a>!', 'post-carousel' ),
612 'class' => 'pcp-pagination-type',
613 'options' => array(
614 'no_ajax' => __( 'Normal Pagination', 'post-carousel' ),
615 'ajax_load_more' => __( 'Ajax Load More Button (Pro)', 'post-carousel' ),
616 'ajax_pagination' => __( 'Ajax Number Pagination (Pro)', 'post-carousel' ),
617 'infinite_scroll' => __( 'Ajax Infinite Scroll (Pro)', 'post-carousel' ),
618 ),
619 'default' => 'no_ajax',
620 'dependency' => array( 'pcp_layout_preset|show_post_pagination', 'not-any|==', 'carousel_layout|true', true ),
621 // 'dependency' => array( 'pcp_layout_preset', 'not-any', 'grid_layout', 'true' ),
622 ),
623 array(
624 'id' => 'pcp_pagination_btn_color',
625 'type' => 'color_group',
626 'title' => __( 'Pagination Color', 'post-carousel' ),
627 'subtitle' => __( 'Set Pagination color', 'post-carousel' ),
628 'options' => array(
629 'text_color' => __( 'Text Color', 'post-carousel' ),
630 'text_acolor' => __( 'Text Active Color', 'post-carousel' ),
631 'border_color' => __( 'Border Color', 'post-carousel' ),
632 'border_acolor' => __( 'Border Active Color', 'post-carousel' ),
633 'background' => __( 'Background', 'post-carousel' ),
634 'active_background' => __( 'Active BG', 'post-carousel' ),
635 ),
636 'default' => array(
637 'text_color' => '#5e5e5e',
638 'text_acolor' => '#ffffff',
639 'border_color' => '#bbbbbb',
640 'border_acolor' => '#e1624b',
641 'background' => '#ffffff',
642 'active_background' => '#e1624b',
643 ),
644 'dependency' => array( 'pcp_layout_preset|show_post_pagination|post_pagination_type', '!=|==|any', 'carousel_layout|true|ajax_pagination,no_ajax', true ),
645 ),
646 array(
647 'id' => 'post_per_page',
648 'type' => 'spinner',
649 'title' => __( 'Items Per Page', 'post-carousel' ),
650 'subtitle' => __( 'Set number of items to show per page.', 'post-carousel' ),
651 'help' => __( 'This value should be lesser than that <strong> Limit </strong> from <strong>Filter Content </strong> tab.', 'post-carousel' ),
652 'default' => 12,
653 'dependency' => array( 'pcp_layout_preset|show_post_pagination', '==|==', 'grid_layout|true' ),
654 ),
655
656 array(
657 'id' => 'show_preloader',
658 'type' => 'switcher',
659 'title' => __( 'Preloader', 'post-carousel' ),
660 'subtitle' => __( 'Items will be hidden until page load completed.', 'post-carousel' ),
661 'text_on' => __( 'Enabled', 'post-carousel' ),
662 'text_off' => __( 'Disabled', 'post-carousel' ),
663 'text_width' => 94,
664 'default' => false,
665 ),
666 ), // End of fields array.
667 )
668 ); // Display settings section end.
669 }
670 }
671