Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/options/general/pagination.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
if (! isset($prefix)) {
4
+
$prefix = '';
5
+
$initial_prefix = '';
6
+
} else {
7
+
$initial_prefix = $prefix;
8
+
$prefix = $prefix . '_';
9
+
}
10
+
11
+
$options = [
12
+
$prefix . 'has_pagination' => [
13
+
'label' => __( 'Pagination', 'blocksy' ),
14
+
'type' => 'ct-panel',
15
+
'switch' => true,
16
+
'value' => 'yes',
17
+
'sync' => blocksy_sync_whole_page([
18
+
'prefix' => $prefix,
19
+
'loader_selector' => 'section'
20
+
]),
21
+
'inner-options' => [
22
+
23
+
blocksy_rand_md5() => [
24
+
'title' => __( 'General', 'blocksy' ),
25
+
'type' => 'tab',
26
+
'options' => [
27
+
28
+
$prefix . 'pagination_global_type' => [
29
+
'label' => __( 'Pagination Type', 'blocksy' ),
30
+
'type' => 'ct-select',
31
+
'value' => 'simple',
32
+
'view' => 'text',
33
+
'design' => 'inline',
34
+
'choices' => blocksy_ordered_keys(
35
+
[
36
+
'simple' => __( 'Standard', 'blocksy' ),
37
+
'next_prev' => __( 'Next/Prev', 'blocksy' ),
38
+
'load_more' => __( 'Load More', 'blocksy' ),
39
+
'infinite_scroll' => __( 'Infinite Scroll', 'blocksy' ),
40
+
]
41
+
),
42
+
43
+
'sync' => [
44
+
'selector' => '.ct-pagination',
45
+
'prefix' => $prefix,
46
+
'render' => function ($args) {
47
+
echo blocksy_display_posts_pagination();
48
+
}
49
+
]
50
+
],
51
+
52
+
blocksy_rand_md5() => [
53
+
'type' => 'ct-condition',
54
+
'condition' => [ $prefix . 'pagination_global_type' => 'load_more' ],
55
+
'options' => [
56
+
57
+
$prefix . 'load_more_label' => [
58
+
'label' => __( 'Label', 'blocksy' ),
59
+
'type' => 'text',
60
+
'design' => 'inline',
61
+
'value' => __( 'Load More', 'blocksy' ),
62
+
'sync' => 'live',
63
+
],
64
+
65
+
],
66
+
],
67
+
68
+
blocksy_rand_md5() => [
69
+
'type' => 'ct-condition',
70
+
'condition' => [ $prefix . 'pagination_global_type' => 'simple' ],
71
+
'options' => [
72
+
73
+
$prefix . 'numbers_visibility' => [
74
+
'label' => __( 'Numbers Visibility', 'blocksy' ),
75
+
'type' => 'ct-visibility',
76
+
'design' => 'block',
77
+
'sync' => 'live',
78
+
'divider' => 'top',
79
+
'value' => blocksy_default_responsive_value([
80
+
'desktop' => true,
81
+
'tablet' => true,
82
+
'mobile' => false,
83
+
]),
84
+
'choices' => blocksy_ordered_keys([
85
+
'desktop' => __( 'Desktop', 'blocksy' ),
86
+
'tablet' => __( 'Tablet', 'blocksy' ),
87
+
'mobile' => __( 'Mobile', 'blocksy' ),
88
+
]),
89
+
],
90
+
91
+
$prefix . 'arrows_visibility' => [
92
+
'label' => __( 'Arrows Visibility', 'blocksy' ),
93
+
'type' => 'ct-visibility',
94
+
'design' => 'block',
95
+
'sync' => 'live',
96
+
'divider' => 'top',
97
+
'allow_empty' => true,
98
+
'value' => blocksy_default_responsive_value([
99
+
'desktop' => true,
100
+
'tablet' => true,
101
+
'mobile' => true,
102
+
]),
103
+
'choices' => blocksy_ordered_keys([
104
+
'desktop' => __( 'Desktop', 'blocksy' ),
105
+
'tablet' => __( 'Tablet', 'blocksy' ),
106
+
'mobile' => __( 'Mobile', 'blocksy' ),
107
+
]),
108
+
],
109
+
110
+
],
111
+
],
112
+
113
+
blocksy_rand_md5() => [
114
+
'type' => 'ct-divider',
115
+
],
116
+
117
+
$prefix . 'paginationSpacing' => [
118
+
'label' => __( 'Pagination Top Spacing', 'blocksy' ),
119
+
'type' => 'ct-slider',
120
+
'value' => '60px',
121
+
'units' => blocksy_units_config([
122
+
[ 'unit' => 'px', 'min' => 0, 'max' => 200 ],
123
+
['unit' => '', 'type' => 'custom'],
124
+
]),
125
+
'responsive' => true,
126
+
'sync' => 'live',
127
+
],
128
+
129
+
],
130
+
],
131
+
132
+
blocksy_rand_md5() => [
133
+
'title' => __( 'Design', 'blocksy' ),
134
+
'type' => 'tab',
135
+
'options' => [
136
+
137
+
blocksy_rand_md5() => [
138
+
'type' => 'ct-condition',
139
+
'condition' => [
140
+
$prefix . 'pagination_global_type' => 'simple|next_prev'
141
+
],
142
+
'options' => [
143
+
144
+
$prefix . 'simplePaginationFontColor' => [
145
+
'label' => __( 'Colors', 'blocksy' ),
146
+
'type' => 'ct-color-picker',
147
+
'design' => 'inline',
148
+
'value' => [
149
+
'default' => [
150
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
151
+
],
152
+
153
+
'active' => [
154
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
155
+
],
156
+
157
+
'hover' => [
158
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
159
+
],
160
+
],
161
+
'sync' => 'live',
162
+
163
+
'pickers' => [
164
+
[
165
+
'title' => __( 'Text Initial', 'blocksy' ),
166
+
'id' => 'default',
167
+
'inherit' => 'var(--theme-text-color)'
168
+
],
169
+
170
+
[
171
+
'title' => __( 'Text Active', 'blocksy' ),
172
+
'id' => 'active',
173
+
'inherit' => '#ffffff',
174
+
'condition' => [ $prefix . 'pagination_global_type' => 'simple' ]
175
+
],
176
+
177
+
[
178
+
'title' => __( 'Accent', 'blocksy' ),
179
+
'id' => 'hover',
180
+
'inherit' => 'var(--theme-link-hover-color)'
181
+
],
182
+
],
183
+
],
184
+
185
+
],
186
+
],
187
+
188
+
blocksy_rand_md5() => [
189
+
'type' => 'ct-condition',
190
+
'condition' => [
191
+
$prefix . 'pagination_global_type' => 'load_more'
192
+
],
193
+
'options' => [
194
+
195
+
$prefix . 'paginationButtonText' => [
196
+
'label' => __( 'Font Color', 'blocksy' ),
197
+
'type' => 'ct-color-picker',
198
+
'design' => 'inline',
199
+
'sync' => 'live',
200
+
'value' => [
201
+
'default' => [
202
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
203
+
],
204
+
205
+
'hover' => [
206
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
207
+
],
208
+
],
209
+
210
+
'pickers' => [
211
+
[
212
+
'title' => __( 'Initial', 'blocksy' ),
213
+
'id' => 'default',
214
+
'inherit' => 'var(--theme-button-text-initial-color)'
215
+
],
216
+
217
+
[
218
+
'title' => __( 'Hover', 'blocksy' ),
219
+
'id' => 'hover',
220
+
'inherit' => 'var(--theme-button-text-hover-color)'
221
+
],
222
+
],
223
+
],
224
+
225
+
$prefix . 'paginationButton' => [
226
+
'label' => __( 'Button Color', 'blocksy' ),
227
+
'type' => 'ct-color-picker',
228
+
'design' => 'inline',
229
+
'sync' => 'live',
230
+
'value' => [
231
+
'default' => [
232
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
233
+
],
234
+
235
+
'hover' => [
236
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
237
+
],
238
+
],
239
+
240
+
'pickers' => [
241
+
[
242
+
'title' => __( 'Initial', 'blocksy' ),
243
+
'id' => 'default',
244
+
'inherit' => 'var(--theme-button-background-initial-color)'
245
+
],
246
+
247
+
[
248
+
'title' => __( 'Hover', 'blocksy' ),
249
+
'id' => 'hover',
250
+
'inherit' => 'var(--theme-button-background-hover-color)'
251
+
],
252
+
],
253
+
],
254
+
255
+
],
256
+
],
257
+
258
+
blocksy_rand_md5() => [
259
+
'type' => 'ct-condition',
260
+
'condition' => [
261
+
$prefix . 'pagination_global_type' => '!infinite_scroll'
262
+
],
263
+
'options' => [
264
+
265
+
$prefix . 'paginationDivider' => [
266
+
'label' => __( 'Divider', 'blocksy' ),
267
+
'type' => 'ct-border',
268
+
'design' => 'inline',
269
+
'divider' => 'top',
270
+
'sync' => 'live',
271
+
'value' => [
272
+
'width' => 1,
273
+
'style' => 'none',
274
+
'color' => [
275
+
'color' => 'rgba(224, 229, 235, 0.5)',
276
+
],
277
+
]
278
+
],
279
+
280
+
$prefix . 'pagination_border_radius' => [
281
+
'label' => __( 'Border Radius', 'blocksy' ),
282
+
'type' => 'ct-spacing',
283
+
'divider' => 'top',
284
+
'value' => blocksy_spacing_value(),
285
+
'inputAttr' => [
286
+
'placeholder' => '4'
287
+
],
288
+
'min' => 0,
289
+
'sync' => 'live',
290
+
],
291
+
292
+
],
293
+
],
294
+
295
+
],
296
+
],
297
+
],
298
+
],
299
+
];
300
+