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-carousel.php

class-sps-carousel.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-carousel.php

254 lines 8.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Carousel section 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 Carousel building class.
14 */
15 class SPS_Carousel {
16
17 /**
18 * Carousel 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' => __( 'Carousel Controls', 'smart-post-show' ),
28 'icon' => 'fa fa-sliders',
29 'fields' => array(
30 array(
31 'id' => 'pcp_carousel_mode',
32 'type' => 'button_set',
33 'title' => __( 'Carousel Mode', 'smart-post-show' ),
34 'subtitle' => __( 'Choose a mode for the carousel.', 'smart-post-show' ),
35 'options' => array(
36 'standard' => __( 'Standard', 'smart-post-show' ),
37 'center' => array(
38 'text' => __( 'Center', 'smart-post-show' ),
39 'pro_only' => true,
40 ),
41 'ticker' => array(
42 'text' => __( 'Ticker', 'smart-post-show' ),
43 'pro_only' => true,
44 ),
45 ),
46 'default' => 'standard',
47 ),
48 array(
49 'id' => 'pcp_carousel_speed',
50 'type' => 'spinner',
51 'title' => __( 'Carousel Speed', 'smart-post-show' ),
52 'subtitle' => __( 'Set carousel speed in millisecond.', 'smart-post-show' ),
53 'default' => '600',
54 'min' => 0,
55 'max' => 20000,
56 'step' => 100,
57 'unit' => 'ms',
58 ),
59 array(
60 'id' => 'pcp_autoplay',
61 'type' => 'switcher',
62 'title' => __( 'AutoPlay', 'smart-post-show' ),
63 'subtitle' => __( 'On/Off carousel autoplay.', 'smart-post-show' ),
64 'default' => true,
65 ),
66 array(
67 'id' => 'pcp_autoplay_speed',
68 'type' => 'spinner',
69 'title' => __( 'AutoPlay Speed', 'smart-post-show' ),
70 'subtitle' => __( 'Set autoplay speed in millisecond.', 'smart-post-show' ),
71 'default' => '2000',
72 'min' => 0,
73 'max' => 10000,
74 'step' => 100,
75 'unit' => 'ms',
76 'dependency' => array( 'pcp_autoplay', '==', true ),
77 ),
78 array(
79 'id' => 'pcp_pause_hover',
80 'type' => 'switcher',
81 'title' => __( 'Pause on Hover', 'smart-post-show' ),
82 'subtitle' => __( 'On/Off carousel stop on hover.', 'smart-post-show' ),
83 'default' => true,
84 'dependency' => array( 'pcp_autoplay', '==', true ),
85
86 ),
87 array(
88 'id' => 'pcp_infinite_loop',
89 'type' => 'switcher',
90 'title' => __( 'Infinite Loop', 'smart-post-show' ),
91 'subtitle' => __( 'On/Off carousel infinite loop.', 'smart-post-show' ),
92 'default' => true,
93 ),
94 array(
95 'id' => 'pcp_lazy_load',
96 'type' => 'switcher',
97 'title' => __( 'Lazy Load', 'smart-post-show' ),
98 'subtitle' => __( 'On/Off lazy load.', 'smart-post-show' ),
99 'default' => true,
100 ),
101 array(
102 'id' => 'pcp_carousel_direction',
103 'type' => 'button_set',
104 'title' => __( 'Carousel Direction', 'smart-post-show' ),
105 'subtitle' => __( 'Choose a carousel direction.', 'smart-post-show' ),
106 'options' => array(
107 'ltr' => __( 'Right to Left', 'smart-post-show' ),
108 'rtl' => __( 'Left to Right', 'smart-post-show' ),
109 ),
110 'default' => 'ltr',
111 ),
112 array(
113 'id' => 'pcp_slide_effect',
114 'type' => 'select',
115 'title' => __( 'Transition Effect', 'smart-post-show-pro' ),
116 'subtitle' => __( 'Select a slide transition effect.', 'smart-post-show-pro' ),
117 'help' => __( 'Fade, cube, and flip transition effects work only for the single column view.', 'smart-post-show-pro' ),
118 'options' => array(
119 'slide' => __( 'Slide', 'smart-post-show-pro' ),
120 'fade' => __( 'Fade (Pro)', 'smart-post-show-pro' ),
121 'coverflow' => __( 'Coverflow (Pro)', 'smart-post-show-pro' ),
122 'cube' => __( 'Cube (Pro)', 'smart-post-show-pro' ),
123 'flip' => __( 'Flip (Pro)', 'smart-post-show-pro' ),
124 ),
125 'default' => 'slide',
126 ),
127 array(
128 'type' => 'subheading',
129 'content' => __( 'Navigation', 'smart-post-show' ),
130 ),
131
132 // Navigation Settings.
133 array(
134 'id' => 'pcp_navigation',
135 'type' => 'button_set',
136 'title' => __( 'Navigation', 'smart-post-show' ),
137 'subtitle' => __( 'Show/Hide carousel navigation.', 'smart-post-show' ),
138 'options' => array(
139 'show' => __( 'Show', 'smart-post-show' ),
140 'hide' => __( 'Hide', 'smart-post-show' ),
141 'hide_on_mobile' => __( 'Hide on Mobile', 'smart-post-show' ),
142 ),
143 'default' => 'show',
144 ),
145 array(
146 'id' => 'pcp_nav_colors',
147 'type' => 'color_group',
148 'title' => __( 'Navigation Color', 'smart-post-show' ),
149 'subtitle' => __( 'Set color for the carousel navigation.', 'smart-post-show' ),
150 'options' => array(
151 'color' => __( 'Color', 'smart-post-show' ),
152 'hover-color' => __( 'Hover Color', 'smart-post-show' ),
153 'bg' => __( 'Background', 'smart-post-show' ),
154 'hover-bg' => __( 'Hover Background', 'smart-post-show' ),
155 'border-color' => __( 'Border', 'smart-post-show' ),
156 'hover-border-color' => __( 'Hover Border', 'smart-post-show' ),
157 ),
158 'default' => array(
159 'color' => '#aaa',
160 'hover-color' => '#fff',
161 'bg' => '#fff',
162 'hover-bg' => '#e1624b',
163 'border-color' => '#aaa',
164 'hover-border-color' => '#e1624b',
165 ),
166 'dependency' => array( 'pcp_navigation', '!=', 'hide' ),
167 ),
168
169 // Pagination Settings.
170 array(
171 'type' => 'subheading',
172 'content' => __( 'Pagination', 'smart-post-show' ),
173 ),
174 array(
175 'id' => 'pcp_pagination',
176 'type' => 'button_set',
177 'title' => __( 'Pagination', 'smart-post-show' ),
178 'subtitle' => __( 'Show/Hide carousel pagination.', 'smart-post-show' ),
179 'options' => array(
180 'show' => __( 'Show', 'smart-post-show' ),
181 'hide' => __( 'Hide', 'smart-post-show' ),
182 'hide_on_mobile' => __( 'Hide on Mobile', 'smart-post-show' ),
183 ),
184 'default' => 'show',
185 ),
186 array(
187 'id' => 'pcp_pagination_color_set',
188 'type' => 'fieldset',
189 'class' => 'pcp-pagination-color-set',
190 'title' => __( 'Pagination Color', 'smart-post-show' ),
191 'subtitle' => __( 'Set color for the carousel pagination.', 'smart-post-show' ),
192 'fields' => array(
193 array(
194 'id' => 'pcp_pagination_color',
195 'type' => 'color_group',
196 'options' => array(
197 'color' => __( 'Color', 'smart-post-show' ),
198 'active-color' => __( 'Active Color', 'smart-post-show' ),
199 ),
200 'default' => array(
201 'color' => '#cccccc',
202 'active-color' => '#e1624b',
203 ),
204 ),
205 ),
206 'dependency' => array( 'pcp_pagination', '!=', 'hide' ),
207 ),
208
209 // Miscellaneous Settings.
210 array(
211 'type' => 'subheading',
212 'content' => __( 'Miscellaneous', 'smart-post-show' ),
213 ),
214 array(
215 'id' => 'pcp_adaptive_height',
216 'type' => 'switcher',
217 'title' => __( 'Adaptive Carousel Height', 'smart-post-show' ),
218 'subtitle' => __( 'Dynamically adjust post carousel height based on each slide\'s height.', 'smart-post-show' ),
219 'default' => false,
220 ),
221 array(
222 'id' => 'pcp_accessibility',
223 'type' => 'switcher',
224 'title' => __( 'Tab and Key Navigation', 'smart-post-show' ),
225 'subtitle' => __( 'Enable/Disable carousel scroll with tab and keyboard.', 'smart-post-show' ),
226 'default' => true,
227 ),
228 array(
229 'id' => 'touch_swipe',
230 'type' => 'switcher',
231 'title' => __( 'Touch Swipe', 'smart-post-show' ),
232 'subtitle' => __( 'On/Off touch swipe mode.', 'smart-post-show' ),
233 'default' => true,
234 ),
235 array(
236 'id' => 'slider_draggable',
237 'type' => 'switcher',
238 'title' => __( 'Mouse Draggable', 'smart-post-show' ),
239 'subtitle' => __( 'On/Off mouse draggable mode.', 'smart-post-show' ),
240 'default' => true,
241 ),
242 array(
243 'id' => 'slider_mouse_wheel',
244 'type' => 'switcher',
245 'title' => __( 'Mousewheel Control', 'smart-post-show' ),
246 'subtitle' => __( 'On/Off mousewheel control.', 'smart-post-show' ),
247 'default' => false,
248 ),
249 ), // End of fields array.
250 )
251 ); // Carousel Controls section end.
252 }
253 }
254