PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
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.2.10, at admin/views/configs/generator/class-sps-display.php

508 lines 19.5 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', 'smart-post-show' ),
28 'icon' => 'fa fa-th-large',
29 'fields' => array(
30 array(
31 'id' => 'section_title',
32 'type' => 'switcher',
33 'title' => __( 'Section Title ', 'smart-post-show' ),
34 'subtitle' => __( 'Show/Hide item showcase section title.', 'smart-post-show' ),
35 'default' => false,
36 'text_on' => __( 'Show', 'smart-post-show' ),
37 'text_off' => __( 'Hide', 'smart-post-show' ),
38 'text_width' => 75,
39 ),
40 array(
41 'id' => 'section_title_margin',
42 'type' => 'spacing',
43 'title' => __( 'Section Title Margin', 'smart-post-show' ),
44 'subtitle' => __( 'Set margin for the section title.', 'smart-post-show' ),
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)', 'smart-post-show' ),
67 'subtitle' => __( 'Set number of column(s) in different devices for responsive view.', 'smart-post-show' ),
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', 'smart-post-show' ),
82 'subtitle' => __( 'Set margin between columns (items).', 'smart-post-show' ),
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 ', 'smart-post-show' ),
97 'subtitle' => __( 'Set a position for the item content.', 'smart-post-show' ),
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>', 'smart-post-show' ),
99 'class' => 'pcp-content-orientation',
100 'options' => array(
101 'default' => array(
102 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/default.png',
103 'text' => __( 'Default', 'smart-post-show' ),
104 ),
105 'left-thumb' => array(
106 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/left-image.png',
107 'text' => __( 'Left Image', 'smart-post-show' ),
108 'pro_only' => true,
109 ),
110 'right-thumb' => array(
111 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/right-image.png',
112 'text' => __( 'Right Image', 'smart-post-show' ),
113 'pro_only' => true,
114 ),
115 'overlay' => array(
116 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/overlay.png',
117 'text' => __( 'Overlay', 'smart-post-show' ),
118 'pro_only' => true,
119 ),
120 'card' => array(
121 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/card.png',
122 'text' => __( 'Card', 'smart-post-show' ),
123 'pro_only' => true,
124 ),
125 'overlay-box' => array(
126 'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/overlay-box.png',
127 'text' => __( 'Overlay Box', 'smart-post-show' ),
128 'pro_only' => true,
129 ),
130 ),
131 'default' => 'default',
132 ),
133 array(
134 'id' => 'post_border',
135 'type' => 'border',
136 'title' => __( 'Border', 'smart-post-show' ),
137 'subtitle' => __( 'Set border for the item.', 'smart-post-show' ),
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', 'smart-post-show' ),
149 'subtitle' => __( 'Set border radius for item.', 'smart-post-show' ),
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', 'smart-post-show' ),
160 'subtitle' => __( 'Set background color for the item.', 'smart-post-show' ),
161 'default' => 'transparent',
162 ),
163 array(
164 'id' => 'post_inner_padding_property',
165 'type' => 'spacing',
166 'title' => __( 'Inner Padding', 'smart-post-show' ),
167 'subtitle' => __( 'Set inner padding for item.', 'smart-post-show' ),
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', 'smart-post-show' ),
181 'subtitle' => __( 'Item content fields which are draggable to change display order and it\'s settings.', 'smart-post-show' ),
182 'desc' => __( 'To show Social Share and Custom Fields, <a href="https://smartpostshow.com/" target="_blank"><strong>Upgrade To Pro!</strong></a>', 'smart-post-show' ),
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', 'smart-post-show' ),
191 'fields' => array(
192 array(
193 'id' => 'post_thumb_show',
194 'type' => 'switcher',
195 'title' => __( 'Thumbnail', 'smart-post-show' ),
196 'text_on' => __( 'Show', 'smart-post-show' ),
197 'text_off' => __( 'Hide', 'smart-post-show' ),
198 'default' => true,
199 'text_width' => 80,
200 ),
201 array(
202 'id' => 'pcp_thumb_sizes',
203 'type' => 'image_sizes',
204 'title' => __( 'Size', 'smart-post-show' ),
205 'default' => 'full',
206 'dependency' => array( 'post_thumb_show', '==', 'true', true ),
207 ),
208 ),
209 ),
210 ),
211 ),
212 array(
213 'id' => 'pcp_post_title',
214 'type' => 'accordion',
215 'accordions' => array(
216 array(
217 'title' => 'Title',
218 'fields' => array(
219 array(
220 'id' => 'show_post_title',
221 'type' => 'switcher',
222 'title' => __( 'Title', 'smart-post-show' ),
223 'text_on' => __( 'Show', 'smart-post-show' ),
224 'text_off' => __( 'Hide', 'smart-post-show' ),
225 'default' => true,
226 'text_width' => 80,
227 ),
228 array(
229 'id' => 'post_title_tag',
230 'type' => 'select',
231 'title' => __( 'Title HTML Tag', 'smart-post-show' ),
232 'options' => array(
233 'h1' => __( 'h1', 'smart-post-show' ),
234 'h2' => __( 'h2', 'smart-post-show' ),
235 'h3' => __( 'h3', 'smart-post-show' ),
236 'h4' => __( 'h4', 'smart-post-show' ),
237 'h5' => __( 'h5', 'smart-post-show' ),
238 'h6' => __( 'h6', 'smart-post-show' ),
239 'p' => __( 'p', 'smart-post-show' ),
240 'div' => __( 'div', 'smart-post-show' ),
241 ),
242 'default' => 'h2',
243 'class' => 'chosen',
244 'dependency' => array( 'show_post_title', '==', 'true', true ),
245 ),
246 ),
247 ),
248 ),
249 ),
250 array(
251 'id' => 'pcp_post_meta',
252 'type' => 'accordion',
253 'accordions' => array(
254 array(
255 'title' => __( 'Meta Fields', 'smart-post-show' ),
256 'fields' => array(
257 array(
258 'id' => 'show_post_meta',
259 'type' => 'switcher',
260 'title' => __( 'Meta Fields', 'smart-post-show' ),
261 'text_on' => __( 'Show', 'smart-post-show' ),
262 'text_off' => __( 'Hide', 'smart-post-show' ),
263 'default' => true,
264 'text_width' => 80,
265 ),
266 array(
267 'id' => 'pcp_post_meta_group',
268 'class' => 'pcp_custom_group_design',
269 'type' => 'group',
270 'button_title' => __( 'Add New Meta', 'smart-post-show' ),
271 'dependency' => array( 'show_post_meta', '==', 'true' ),
272 'fields' => array(
273 array(
274 'id' => 'select_post_meta',
275 'type' => 'select',
276 'title' => __( 'Select Meta', 'smart-post-show' ),
277 'placeholder' => __( 'Select a meta', 'smart-post-show' ),
278 'class' => 'pcp-meta-select',
279 'options' => array(
280 'author' => __( 'Author', 'smart-post-show' ),
281 'date' => __( 'Date', 'smart-post-show' ),
282 'comment_count' => __( 'Comment Count', 'smart-post-show' ),
283 'taxonomy' => __( 'Taxonomy (Pro)', 'smart-post-show' ),
284 'view_count' => __( 'View Count (Pro)', 'smart-post-show' ),
285 'like' => __( 'Like (Pro)', 'smart-post-show' ),
286 'reading_time' => __( 'Reading Time (Pro)', 'smart-post-show' ),
287 ),
288 ),
289 array(
290 'id' => 'select_meta_icon',
291 'type' => 'icon',
292 'title' => __( 'Meta Icon', 'smart-post-show' ),
293 'default' => 'fa fa-folder-o',
294 'dependency' => array( 'select_post_meta', '!=', '', true ),
295
296 ),
297
298 ),
299 'default' => array(
300 array(
301 'select_post_meta' => 'author',
302 'select_meta_icon' => 'fa fa-user',
303 ),
304 array(
305 'select_post_meta' => 'date',
306 'select_meta_icon' => 'fa fa-calendar',
307 ),
308 ),
309 ),
310 ),
311 ),
312 ),
313 ),
314 array(
315 'id' => 'pcp_post_content',
316 'type' => 'accordion',
317 'accordions' => array(
318 array(
319 'title' => 'Content',
320 'fields' => array(
321 array(
322 'id' => 'show_post_content',
323 'type' => 'switcher',
324 'title' => __( 'Content', 'smart-post-show' ),
325 'text_on' => __( 'Show', 'smart-post-show' ),
326 'text_off' => __( 'Hide', 'smart-post-show' ),
327 'default' => true,
328 'text_width' => 80,
329 ),
330 array(
331 'id' => 'post_content_type',
332 'type' => 'select',
333 'class' => 'pcp-post-content-type',
334 'title' => __( 'Content Display Type', 'smart-post-show' ),
335 'options' => array(
336 'excerpt' => __( 'Excerpt', 'smart-post-show' ),
337 'full_content' => __( 'Full Content', 'smart-post-show' ),
338 'limit_content' => __( 'Content with Limit (Pro)', 'smart-post-show' ),
339 ),
340 'default' => 'excerpt',
341 'dependency' => array( 'show_post_content', '==', 'true', true ),
342 ),
343
344 // ReadMore settings.
345 array(
346 'id' => 'show_read_more',
347 'type' => 'switcher',
348 'title' => __( 'Read More', 'smart-post-show' ),
349 'text_on' => __( 'Show', 'smart-post-show' ),
350 'text_off' => __( 'Hide', 'smart-post-show' ),
351 'default' => true,
352 'text_width' => 80,
353 'dependency' => array( 'post_content_type', '!=', 'full_content', true ),
354 ),
355 array(
356 'id' => 'pcp_read_label',
357 'type' => 'text',
358 'title' => __( 'Read More Label', 'smart-post-show' ),
359 'default' => 'Read More',
360 'dependency' => array( 'post_content_type|show_read_more', '!=|==', 'full_content|true', true ),
361 ),
362 array(
363 'id' => 'readmore_color_button',
364 'type' => 'color_group',
365 'title' => __( 'Read More Color', 'smart-post-show' ),
366 'options' => array(
367 'standard' => __( 'Text Color', 'smart-post-show' ),
368 'hover' => __( 'Text Hover Color', 'smart-post-show' ),
369 'bg' => __( 'Background', 'smart-post-show' ),
370 'hover_bg' => __( 'Hover Background', 'smart-post-show' ),
371 'border' => __( 'Border', 'smart-post-show' ),
372 'hover_border' => __( 'Hover Border', 'smart-post-show' ),
373 ),
374 'default' => array(
375 'standard' => '#111',
376 'hover' => '#fff',
377 'bg' => 'transparent',
378 'hover_bg' => '#e1624b',
379 'border' => '#888',
380 'hover_border' => '#e1624b',
381 ),
382 'dependency' => array( 'post_content_type|show_read_more', '!=|==', 'full_content|true', true ),
383 ),
384
385 ),
386 ),
387 ),
388 ),
389 array(
390 'id' => 'pcp_social_share',
391 'type' => 'accordion',
392 'class' => 'pcp-pro-only',
393 'accordions' => array(
394 array(
395 'title' => __( 'Social Share (Pro)', 'smart-post-show' ),
396 'fields' => array(
397 array(
398 'id' => 'social_position',
399 'type' => 'button_set',
400 'title' => __( 'Alignment', 'smart-post-show' ),
401 'options' => array(
402 'left' => '<i class="fa fa-align-left" title="Left"></i>',
403 'center' => '<i class="fa fa-align-center" title="Center"></i>',
404 'right' => '<i class="fa fa-align-right" title="Right"></i>',
405 ),
406 'default' => 'left',
407 'dependency' => array( 'social_sharing_media', '!=', '' ),
408 ),
409 ),
410 ),
411 ),
412 ), // PCP Post Social.
413 array(
414 'id' => 'pcp_custom_fields',
415 'type' => 'accordion',
416 'class' => 'pcp-pro-only',
417 'accordions' => array(
418 array(
419 'title' => __( 'Custom Fields (Pro)', 'smart-post-show' ),
420 'fields' => array(
421 // The Group Fields.
422 array(
423 'id' => 'pcp_custom_meta_icon',
424 'type' => 'icon',
425 'title' => 'Icon Before Name',
426 'default' => 'fa fa-calendar-o',
427 ),
428
429 ), // End Fields array.
430 ),
431 ), // Accordion.
432 ), // Custom fields end.
433 ),
434 ),
435 array(
436 'id' => 'show_post_pagination',
437 'type' => 'switcher',
438 'text_on' => __( 'Enabled', 'smart-post-show' ),
439 'text_off' => __( 'Disabled', 'smart-post-show' ),
440 'text_width' => 100,
441 'title' => __( 'Pagination', 'smart-post-show' ),
442 'subtitle' => __( 'Enabled/Disabled item pagination.', 'smart-post-show' ),
443 'default' => true,
444 'dependency' => array( 'pcp_layout_preset', 'not-any', 'carousel_layout', 'true' ),
445 ),
446 array(
447 'id' => 'post_pagination_type',
448 'type' => 'radio',
449 'title' => __( 'Pagination Type', 'smart-post-show' ),
450 'subtitle' => __( 'Choose a pagination type.', 'smart-post-show' ),
451 'desc' => __( 'More amazing Ajax Pagination Settings are available in <a href="https://smartpostshow.com/" target="_blank"><strong>Pro</strong></a>!', 'smart-post-show' ),
452 'class' => 'pcp-pagination-type',
453 'options' => array(
454 'no_ajax' => __( 'Normal Pagination', 'smart-post-show' ),
455 'ajax_load_more' => __( 'Ajax Load More Button (Pro)', 'smart-post-show' ),
456 'ajax_pagination' => __( 'Ajax Number Pagination (Pro)', 'smart-post-show' ),
457 'infinite_scroll' => __( 'Ajax Infinite Scroll (Pro)', 'smart-post-show' ),
458 ),
459 'default' => 'no_ajax',
460 'dependency' => array( 'pcp_layout_preset|show_post_pagination', 'not-any|==', 'carousel_layout|true', true ),
461 // 'dependency' => array( 'pcp_layout_preset', 'not-any', 'grid_layout', 'true' ),
462 ),
463 array(
464 'id' => 'pcp_pagination_btn_color',
465 'type' => 'color_group',
466 'title' => __( 'Pagination Color', 'smart-post-show' ),
467 'subtitle' => __( 'Set Pagination color', 'smart-post-show' ),
468 'options' => array(
469 'text_color' => __( 'Text Color', 'smart-post-show' ),
470 'text_acolor' => __( 'Text Active Color', 'smart-post-show' ),
471 'border_color' => __( 'Border Color', 'smart-post-show' ),
472 'border_acolor' => __( 'Border Active Color', 'smart-post-show' ),
473 'background' => __( 'Background', 'smart-post-show' ),
474 'active_background' => __( 'Active BG', 'smart-post-show' ),
475 ),
476 'default' => array(
477 'text_color' => '#5e5e5e',
478 'text_acolor' => '#ffffff',
479 'border_color' => '#bbbbbb',
480 'border_acolor' => '#e1624b',
481 'background' => '#ffffff',
482 'active_background' => '#e1624b',
483 ),
484 'dependency' => array( 'pcp_layout_preset|show_post_pagination|post_pagination_type', '!=|==|any', 'carousel_layout|true|ajax_pagination,no_ajax', true ),
485 ),
486 array(
487 'id' => 'post_per_page',
488 'type' => 'spinner',
489 'title' => __( 'Items Per Page', 'smart-post-show' ),
490 'subtitle' => __( 'Set number of items to show per page.', 'smart-post-show' ),
491 'help' => __( 'This value should be lesser than that <strong> Limit </strong> from <strong>Filter Content </strong> tab.', 'smart-post-show' ),
492 'default' => 12,
493 'dependency' => array( 'pcp_layout_preset|show_post_pagination', '==|==', 'grid_layout|true' ),
494 ),
495
496 array(
497 'id' => 'show_preloader',
498 'type' => 'switcher',
499 'title' => __( 'Preloader', 'smart-post-show' ),
500 'subtitle' => __( 'Items will be hidden until page load completed.', 'smart-post-show' ),
501 'default' => false,
502 ),
503 ), // End of fields array.
504 )
505 ); // Display settings section end.
506 }
507 }
508