PluginProbe ʕ •ᴥ•ʔ
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid / 7.0.2
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid v7.0.2
7.9.3 7.9.2 trunk 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.2.0 4.2.1 4.2.2 4.2.3 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 6.0.0 7.0.0 7.0.1 7.0.2 7.1.0 7.2.0 7.2.1 7.2.10 7.2.11 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6 7.2.7 7.2.8 7.2.9 7.3.0 7.3.1 7.4.0 7.4.1 7.4.2 7.4.3 7.5.0 7.6.0 7.6.1 7.7.0 7.7.1 7.7.10 7.7.11 7.7.12 7.7.13 7.7.14 7.7.15 7.7.16 7.7.17 7.7.18 7.7.19 7.7.2 7.7.20 7.7.21 7.7.22 7.7.3 7.7.4 7.7.5 7.7.6 7.7.7 7.7.8 7.7.9 7.8.0 7.8.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.9.0 7.9.1
the-post-grid / app / Helpers / Options.php
the-post-grid / app / Helpers Last commit date
Fns.php 3 years ago Install.php 3 years ago Options.php 3 years ago
Options.php
1727 lines
1 <?php
2 /**
3 * Options Helper class.
4 *
5 * @package RT_TPG
6 */
7
8 namespace RT\ThePostGrid\Helpers;
9
10 // Do not allow directly accessing this file.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit( 'This script cannot be accessed directly.' );
13 }
14
15 /**
16 * Options Helper class.
17 */
18 class Options {
19
20 public static function rtPostTypes() {
21 $args = apply_filters(
22 'tpg_get_post_type',
23 [
24 'public' => true,
25 'show_in_nav_menus' => true,
26 ]
27 );
28
29 $post_types = get_post_types( $args );
30
31 $exclude = [ 'attachment', 'revision', 'nav_menu_item', 'elementor_library', 'tpg_builder' ];
32
33 foreach ( $exclude as $ex ) {
34 unset( $post_types[ $ex ] );
35 }
36
37 if ( ! rtTPG()->hasPro() ) {
38 $post_types = [
39 'post' => $post_types['post'],
40 'page' => $post_types['page'],
41 ];
42 }
43
44 return $post_types;
45
46 }
47
48 public static function rtPostOrders() {
49 return [
50 'ASC' => esc_html__( 'Ascending', 'the-post-grid' ),
51 'DESC' => esc_html__( 'Descending', 'the-post-grid' ),
52 ];
53 }
54
55 public static function rtTermOperators() {
56 return [
57 'IN' => esc_html__(
58 'IN — show posts which associate with one or more of selected terms',
59 'the-post-grid'
60 ),
61 'NOT IN' => esc_html__(
62 'NOT IN — show posts which do not associate with any of selected terms',
63 'the-post-grid'
64 ),
65 'AND' => esc_html__( 'AND — show posts which associate with all of selected terms', 'the-post-grid' ),
66 ];
67 }
68
69 public static function rtTermRelations() {
70 return [
71 'AND' => esc_html__( 'AND — show posts which match all settings', 'the-post-grid' ),
72 'OR' => esc_html__( 'OR — show posts which match one or more settings', 'the-post-grid' ),
73 ];
74 }
75
76 public static function rtMetaKeyType() {
77 return [
78 'meta_value' => esc_html__( 'Meta value', 'the-post-grid' ),
79 'meta_value_num' => esc_html__( 'Meta value number', 'the-post-grid' ),
80 'meta_value_datetime' => esc_html__( 'Meta value datetime', 'the-post-grid' ),
81 ];
82 }
83
84 public static function rtPostOrderBy( $isWoCom = false, $metaOrder = false ) {
85 $orderBy = [
86 'title' => esc_html__( 'Title', 'the-post-grid' ),
87 'date' => esc_html__( 'Created date', 'the-post-grid' ),
88 'modified' => esc_html__( 'Modified date', 'the-post-grid' ),
89 'menu_order' => esc_html__( 'Menu Order', 'the-post-grid' ),
90 ];
91
92 return apply_filters( 'rt_tpg_post_orderby', $orderBy, $isWoCom, $metaOrder );
93 }
94
95 public static function rtTPGSettingsCustomScriptFields() {
96 $settings = get_option( rtTPG()->options['settings'] );
97
98 return [
99 'script_before_item_load' => [
100 'label' => esc_html__( 'Script before item load', 'the-post-grid' ),
101 'type' => 'textarea',
102 'holderClass' => 'rt-script-wrapper full',
103 'id' => 'script-before-item-load',
104 'value' => isset( $settings['script_before_item_load'] ) ? stripslashes( $settings['script_before_item_load'] ) : null,
105 ],
106 'script_after_item_load' => [
107 'label' => esc_html__( 'Script After item load', 'the-post-grid' ),
108 'type' => 'textarea',
109 'holderClass' => 'rt-script-wrapper full',
110 'id' => 'script-after-item-load',
111 'value' => isset( $settings['script_after_item_load'] ) ? stripslashes( $settings['script_after_item_load'] ) : null,
112 ],
113 'script_loaded' => [
114 'label' => esc_html__( 'After Loaded script', 'the-post-grid' ),
115 'type' => 'textarea',
116 'holderClass' => 'rt-script-wrapper full',
117 'id' => 'script-loaded',
118 'value' => isset( $settings['script_loaded'] ) ? stripslashes( $settings['script_loaded'] ) : null,
119 ],
120 ];
121 }
122
123 public static function rtTPGSettingsOtherSettingsFields() {
124 $settings = get_option( rtTPG()->options['settings'] );
125
126 $other_settings = [
127 'template_author' => [
128 'type' => 'select',
129 'name' => 'template_author',
130 'label' => esc_html__( 'Template Author', 'the-post-grid' ),
131 'id' => 'template_author',
132 'holderClass' => 'pro-field',
133 'class' => 'select2',
134 'blank' => 'Select a layout',
135 'options' => Fns::getTPGShortCodeList(),
136 'value' => isset( $settings['template_author'] ) ? $settings['template_author'] : [],
137 ],
138 'template_category' => [
139 'type' => 'select',
140 'name' => 'template_category',
141 'label' => esc_html__( 'Template Category', 'the-post-grid' ),
142 'id' => 'template_category',
143 'holderClass' => 'pro-field',
144 'class' => 'select2',
145 'blank' => 'Select a layout',
146 'options' => Fns::getTPGShortCodeList(),
147 'value' => isset( $settings['template_category'] ) ? $settings['template_category'] : [],
148 ],
149 'template_search' => [
150 'type' => 'select',
151 'name' => 'template_search',
152 'label' => esc_html__( 'Template Search', 'the-post-grid' ),
153 'id' => 'template_search',
154 'holderClass' => 'pro-field',
155 'class' => 'select2',
156 'blank' => 'Select a layout',
157 'options' => Fns::getTPGShortCodeList(),
158 'value' => isset( $settings['template_search'] ) ? $settings['template_search'] : [],
159 ],
160 'template_tag' => [
161 'type' => 'select',
162 'name' => 'template_tag',
163 'label' => esc_html__( 'Template Tag', 'the-post-grid' ),
164 'id' => 'template_tag',
165 'holderClass' => 'pro-field',
166 'class' => 'select2',
167 'blank' => 'Select a layout',
168 'options' => Fns::getTPGShortCodeList(),
169 'value' => isset( $settings['template_tag'] ) ? $settings['template_tag'] : [],
170 ],
171
172 'tpg_primary_color_main' => [
173 'type' => 'text',
174 'label' => esc_html__( 'Primary Color', 'the-post-grid' ),
175 'class' => 'rt-color',
176 'default' => isset( $settings['tpg_primary_color_main'] ) ? $settings['tpg_primary_color_main'] : '#0d6efd',
177 ],
178
179 'tpg_secondary_color_main' => [
180 'type' => 'text',
181 'label' => esc_html__( 'Secondary Color', 'the-post-grid' ),
182 'class' => 'rt-color',
183 'default' => isset( $settings['tpg_secondary_color_main'] ) ? $settings['tpg_secondary_color_main'] : '#0654c4',
184 ],
185
186 'tpg_loader_color' => [
187 'type' => 'text',
188 'label' => esc_html__( 'Preloader Color', 'the-post-grid' ),
189 'class' => 'rt-color',
190 'default' => isset( $settings['tpg_loader_color'] ) ? $settings['tpg_loader_color'] : '#0367bf',
191 ],
192
193 'template_class' => [
194 'type' => 'text',
195 'name' => 'template_class',
196 'label' => esc_html__( 'Template class', 'the-post-grid' ),
197 'holderClass' => 'pro-field',
198 'id' => 'template_class',
199 'value' => isset( $settings['template_class'] ) ? $settings['template_class'] : '',
200 ],
201 ];
202
203 $insert_array = [
204 'tpg_popupbar_color' => [
205 'type' => 'text',
206 'label' => esc_html__( 'Popup Topbar Color', 'the-post-grid' ),
207 'class' => 'rt-color',
208 'default' => isset( $settings['tpg_popupbar_color'] ) ? $settings['tpg_popupbar_color'] : '',
209 ],
210 'tpg_popupbar_bg_color' => [
211 'type' => 'text',
212 'label' => esc_html__( 'Popup Background Color', 'the-post-grid' ),
213 'class' => 'rt-color',
214 'default' => isset( $settings['tpg_popupbar_bg_color'] ) ? $settings['tpg_popupbar_bg_color'] : '',
215 ],
216 'tpg_popupbar_text_color' => [
217 'type' => 'text',
218 'label' => esc_html__( 'Popup Text Color', 'the-post-grid' ),
219 'class' => 'rt-color',
220 'default' => isset( $settings['tpg_popupbar_text_color'] ) ? $settings['tpg_popupbar_text_color'] : '',
221 ],
222 ];
223
224 Fns::array_insert( $other_settings, 6, $insert_array );
225
226 $plugin = Fns::is_acf();
227
228 if ( $plugin ) {
229 $acf_settings = [
230 'show_acf_details' => [
231 'type' => 'switch',
232 'name' => 'show_acf_details',
233 'label' => esc_html__( 'Enable Advanced Custom Field (ACF) for Single page', 'the-post-grid' ),
234 'description' => esc_html__( 'You may enable advanced custom field (ACF) on details page', 'the-post-grid' ),
235 'holderClass' => 'pro-field',
236 'value' => isset( $settings['show_acf_details'] ) ? $settings['show_acf_details'] : false,
237 ],
238
239 'cf_group_details' => [
240 'type' => 'checkbox',
241 'name' => 'cf_group_details',
242 'label' => esc_html__( 'Choose ACF Group', 'the-post-grid' ),
243 'id' => 'cf_group_details',
244 'holderClass' => 'pro-field',
245 'alignment' => 'vertical',
246 'multiple' => true,
247 'options' => Fns::get_groups_by_post_type( 'all' ),
248 'value' => isset( $settings['cf_group_details'] ) ? $settings['cf_group_details'] : [],
249 ],
250
251 'cf_hide_empty_value_details' => [
252 'type' => 'switch',
253 'name' => 'cf_hide_empty_value_details',
254 'label' => esc_html__( 'Hide field with empty value', 'the-post-grid' ),
255 'value' => isset( $settings['cf_hide_empty_value_details'] ) ? $settings['cf_hide_empty_value_details'] : false,
256 'holderClass' => 'pro-field',
257 ],
258
259 'cf_show_only_value_details' => [
260 'type' => 'switch',
261 'name' => 'cf_show_only_value_details',
262 'label' => esc_html__( 'Show Title', 'the-post-grid' ),
263 'description' => esc_html__( 'By default both name & value of field is shown', 'the-post-grid' ),
264 'value' => isset( $settings['cf_show_only_value_details'] ) ? $settings['cf_show_only_value_details'] : true,
265 'holderClass' => 'pro-field',
266 ],
267
268 'cf_hide_group_title_details' => [
269 'type' => 'switch',
270 'name' => 'cf_hide_group_title_details',
271 'label' => esc_html__( 'Show group title', 'the-post-grid' ),
272 'value' => isset( $settings['cf_hide_group_title_details'] ) ? $settings['cf_hide_group_title_details'] : false,
273 'holderClass' => 'pro-field',
274 ],
275 ];
276
277 $other_settings = array_merge( $other_settings, $acf_settings );
278 }
279
280 return $other_settings;
281 }
282
283
284 public static function rtTPGSettingsCommonSettingsFields() {
285 $settings = get_option( rtTPG()->options['settings'] );
286
287 $common_settings = [
288 'tpg_common_settings_heading' => [
289 'type' => 'heading',
290 'name' => 'tpg_common_settings_heading',
291 'class' => 'tpg_common_settings_heading',
292 'label' => esc_html__( 'Improve Performance', 'the-post-grid' ),
293 'description' => esc_html__( 'Please choose a Resource Load Type first. Otherwise, all CSS & JS for shortcode, gutenberg and elementor will load on your site which can create a bad performance issues.', 'the-post-grid' ),
294 ],
295
296 'tpg_block_type' => [
297 'type' => 'select',
298 'name' => 'tpg_block_type',
299 'label' => 'Resource Load Type',
300 'id' => 'tpg_block_type',
301 'class' => 'select2',
302 'options' => [
303 'default' => esc_html__( 'Default (Shortcode add Elementor / Gutenberg)', 'the-post-grid' ),
304 'elementor' => esc_html__( 'Elementor / Gutenberg', 'the-post-grid' ),
305 'shortcode' => esc_html__( 'Shortcode Only', 'the-post-grid' ),
306 ],
307 'description' => esc_html__( 'Please choose which type of block you want to use. If you select Default then all styles and scripts will load on your site. But if you use one then just this style and script will load on your site.', 'the-post-grid' ),
308 'value' => isset( $settings['tpg_block_type'] ) ? $settings['tpg_block_type'] : 'default',
309 ],
310 'tpg_load_script' => [
311 'type' => 'switch',
312 'name' => 'tpg_load_script',
313 'label' => esc_html__( 'Load Script dependent on block', 'the-post-grid' ),
314 'description' => sprintf(
315 '%s<b>%s</b>',
316 esc_html__( 'Check, if you want to load script when ShortCode or Elementor block is used on a page. ', 'the-post-grid' ),
317 esc_html__( 'If you enable this then you must have to enable Preloader from below.', 'the-post-grid' )
318 ),
319 'value' => isset( $settings['tpg_load_script'] ) ? $settings['tpg_load_script'] : false,
320 ],
321 'tpg_enable_preloader' => [
322 'type' => 'switch',
323 'name' => 'tpg_enable_preloader',
324 'label' => esc_html__( 'Enable Pre-loader', 'the-post-grid' ),
325 'value' => isset( $settings['tpg_enable_preloader'] ) ? $settings['tpg_enable_preloader'] : false,
326 ],
327 'tpg_skip_fa' => [
328 'type' => 'switch',
329 'name' => 'tpg_skip_fa',
330 'label' => esc_html__( 'Disable Font Awesome Script', 'the-post-grid' ),
331 'description' => esc_html__( "If Font Awesome 5 exist with theme, don't need to load twice.", 'the-post-grid' ),
332 'value' => isset( $settings['tpg_skip_fa'] ) ? $settings['tpg_skip_fa'] : false,
333 ],
334 'tpg_icon_font' => [
335 'type' => 'select',
336 'name' => 'tpg_icon_font',
337 'label' => 'Resource Load Type',
338 'id' => 'tpg_icon_font',
339 'class' => 'select2',
340 'options' => [
341 'fontawesome' => esc_html__( 'Fontawesome Icon', 'the-post-grid' ),
342 'flaticon' => esc_html__( 'Flat icon', 'the-post-grid' ),
343 ],
344 'description' => esc_html__( 'You can change icon font from here', 'the-post-grid' ),
345 'value' => isset( $settings['tpg_icon_font'] ) ? $settings['tpg_icon_font'] : 'fontawesome',
346 ],
347 ];
348
349 return $common_settings;
350 }
351
352 public static function rtTPGLicenceField() {
353 $settings = get_option( rtTPG()->options['settings'] );
354 $status = ! empty( $settings['license_status'] ) && $settings['license_status'] === 'valid' ? true : false;
355 $license_status = ! empty( $settings['license_key'] ) ? sprintf(
356 "<span class='license-status'>%s</span>",
357 $status
358 ? "<input type='submit' class='button-secondary rt-licensing-btn danger' name='license_deactivate' value='" . esc_html__( 'Deactivate License', 'the-post-grid' ) . "'/>"
359 : "<input type='submit' class='button-secondary rt-licensing-btn button-primary' name='license_activate' value='" . esc_html__( 'Activate License', 'the-post-grid' ) . "'/>"
360 ) : ' ';
361
362 return [
363 'license_key' => [
364 'type' => 'text',
365 'name' => 'license_key',
366 'attr' => 'style="min-width:300px;"',
367 'label' => esc_html__( 'Enter your license key', 'the-post-grid' ),
368 'description_adv' => Fns::htmlKses( $license_status, 'advanced' ),
369 'id' => 'license_key',
370 'value' => isset( $settings['license_key'] ) ? $settings['license_key'] : '',
371 ],
372 ];
373 }
374
375 public static function rtTPGSettingsSocialShareFields() {
376 $settings = get_option( rtTPG()->options['settings'] );
377
378 return [
379 'social_share_items' => [
380 'type' => 'checkbox',
381 'name' => 'social_share_items',
382 'label' => esc_html__( 'Social share items', 'the-post-grid' ),
383 'id' => 'social_share_items',
384 'holderClass' => 'pro-field',
385 'alignment' => 'vertical',
386 'multiple' => true,
387 'options' => self::socialShareItemList(),
388 'value' => isset( $settings['social_share_items'] ) ? $settings['social_share_items'] : [],
389 ],
390 ];
391 }
392
393 public static function socialShareItemList() {
394 return [
395 'facebook' => esc_html__( 'Facebook', 'the-post-grid' ),
396 'twitter' => esc_html__( 'Twitter', 'the-post-grid' ),
397 'linkedin' => esc_html__( 'LinkedIn', 'the-post-grid' ),
398 'pinterest' => esc_html__( 'Pinterest', 'the-post-grid' ),
399 'reddit' => esc_html__( 'Reddit', 'the-post-grid' ),
400 'email' => esc_html__( 'Email', 'the-post-grid' ),
401 ];
402 }
403
404 public static function templateOverrideItemList() {
405 return [
406 'category-archive' => esc_html__( 'Category archive', 'the-post-grid' ),
407 'tag-archive' => esc_html__( 'Tag archive', 'the-post-grid' ),
408 'author-archive' => esc_html__( 'Author archive', 'the-post-grid' ),
409 'search' => esc_html__( 'Search page', 'the-post-grid' ),
410 ];
411 }
412
413 public static function rtTPGCommonFilterFields() {
414 return [
415 'post__in' => [
416 'name' => 'post__in',
417 'label' => esc_html__( 'Include only', 'the-post-grid' ),
418 'type' => 'text',
419 'class' => 'full',
420 'description' => esc_html__( 'List of post IDs to show (comma-separated values, for example: 1,2,3)', 'the-post-grid' ),
421 ],
422 'post__not_in' => [
423 'name' => 'post__not_in',
424 'label' => esc_html__( 'Exclude', 'the-post-grid' ),
425 'type' => 'text',
426 'class' => 'full',
427 'description' => esc_html__( 'List of post IDs to hide (comma-separated values, for example: 1,2,3)', 'the-post-grid' ),
428 ],
429 'limit' => [
430 'name' => 'limit',
431 'label' => esc_html__( 'Limit', 'the-post-grid' ),
432 'type' => 'number',
433 'class' => 'full',
434 'description' => esc_html__( 'The number of posts to show. Set empty to show all found posts.', 'the-post-grid' ),
435 ],
436 'offset' => [
437 'name' => 'offset',
438 'label' => esc_html__( 'Offset', 'the-post-grid' ),
439 'type' => 'number',
440 'class' => 'full',
441 'description' => esc_html__( 'The number of posts to skip from start', 'the-post-grid' ),
442 ],
443 ];
444 }
445
446 public static function rtTPGPostType() {
447 return [
448 'tpg_post_type' => [
449 'label' => esc_html__( 'Post Type', 'the-post-grid' ),
450 'type' => 'select',
451 'id' => 'rt-sc-post-type',
452 'class' => '-rt-select2',
453 'options' => self::rtPostTypes(),
454 ],
455 ];
456 }
457
458 public static function rtTPAdvanceFilters() {
459 $fields = apply_filters(
460 'rt_tpg_advanced_filters',
461 [
462 'tpg_taxonomy' => esc_html__( 'Taxonomy', 'the-post-grid' ),
463 'order' => esc_html__( 'Order', 'the-post-grid' ),
464 'author' => esc_html__( 'Author', 'the-post-grid' ),
465 'tpg_post_status' => esc_html__( 'Status', 'the-post-grid' ),
466 's' => esc_html__( 'Search', 'the-post-grid' ),
467 ]
468 );
469
470 return [
471 'post_filter' => [
472 'type' => 'checkboxFilter',
473 'name' => 'post_filter',
474 'label' => esc_html__( 'Advanced Filters', 'the-post-grid' ),
475 'alignment' => 'vertical',
476 'multiple' => true,
477 'default' => [ 'tpg_taxonomy', 'order' ],
478 'options' => $fields,
479 ],
480 ];
481 }
482
483 public static function rtTPGPostStatus() {
484 return [
485 'publish' => esc_html__( 'Publish', 'the-post-grid' ),
486 'pending' => esc_html__( 'Pending', 'the-post-grid' ),
487 'draft' => esc_html__( 'Draft', 'the-post-grid' ),
488 'auto-draft' => esc_html__( 'Auto draft', 'the-post-grid' ),
489 'future' => esc_html__( 'Future', 'the-post-grid' ),
490 'private' => esc_html__( 'Private', 'the-post-grid' ),
491 'inherit' => esc_html__( 'Inherit', 'the-post-grid' ),
492 'trash' => esc_html__( 'Trash', 'the-post-grid' ),
493 ];
494 }
495
496 public static function owl_property() {
497 return [
498 'auto_play' => esc_html__( 'Auto Play', 'the-post-grid' ),
499 'loop' => esc_html__( 'Loop', 'the-post-grid' ),
500 'nav_button' => esc_html__( 'Nav Button', 'the-post-grid' ),
501 'pagination' => esc_html__( 'Pagination', 'the-post-grid' ),
502 'stop_hover' => esc_html__( 'Stop Hover', 'the-post-grid' ),
503 'auto_height' => esc_html__( 'Auto Height', 'the-post-grid' ),
504 'lazy_load' => esc_html__( 'Lazy Load', 'the-post-grid' ),
505 'rtl' => esc_html__( 'Right to left (RTL)', 'the-post-grid' ),
506 ];
507 }
508
509 public static function rtTPGLayoutSettingFields() {
510 $options = [
511 'layout_type' => [
512 'type' => 'radio-image',
513 'label' => esc_html__( 'Layout Type', 'the-post-grid' ),
514 'id' => 'rt-tpg-sc-layout-type',
515 'options' => self::rtTPGLayoutType(),
516 ],
517 'layout' => [
518 'type' => 'radio-image',
519 'label' => esc_html__( 'Layout', 'the-post-grid' ),
520 'id' => 'rt-tpg-sc-layout',
521 'class' => 'rt-select2',
522 'options' => self::rtTPGLayouts(),
523 ],
524 'tgp_filter' => [
525 'type' => 'checkbox',
526 'label' => esc_html__( 'Filter', 'the-post-grid' ),
527 'holderClass' => 'sc-tpg-grid-filter tpg-hidden pro-field',
528 'multiple' => true,
529 'alignment' => 'vertical',
530 'options' => self::tgp_filter_list(),
531 ],
532 'tgp_filter_taxonomy' => [
533 'type' => 'select',
534 'label' => esc_html__( 'Taxonomy Filter', 'the-post-grid' ),
535 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
536 'class' => 'rt-select2',
537 'options' => Fns::rt_get_taxonomy_for_filter(),
538 ],
539 'tgp_filter_taxonomy_hierarchical' => [
540 'type' => 'switch',
541 'label' => esc_html__( 'Display as sub category', 'the-post-grid' ),
542 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
543 'option' => 'Active',
544 ],
545 'tgp_filter_type' => [
546 'type' => 'select',
547 'label' => esc_html__( 'Taxonomy filter type', 'the-post-grid' ),
548 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
549 'class' => 'rt-select2',
550 'options' => self::rt_filter_type(),
551 ],
552 'tgp_default_filter' => [
553 'type' => 'select',
554 'label' => esc_html__( 'Selected filter term (Selected item)', 'the-post-grid' ),
555 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
556 'class' => 'rt-select2',
557 'attr' => "data-selected='" . get_post_meta( get_the_ID(), 'tgp_default_filter', true ) . "'",
558 'options' => [ '' => esc_html__( 'Show All', 'the-post-grid' ) ],
559 ],
560 'tpg_hide_all_button' => [
561 'type' => 'switch',
562 'label' => esc_html__( 'Hide All (Show all) button', 'the-post-grid' ),
563 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
564 'option' => 'Hide',
565 ],
566 'tpg_post_count' => [
567 'type' => 'switch',
568 'label' => esc_html__( 'Show post count', 'the-post-grid' ),
569 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
570 'option' => 'Enable',
571 ],
572 'isotope_filter' => [
573 'type' => 'select',
574 'label' => esc_html__( 'Isotope Filter', 'the-post-grid' ),
575 'holderClass' => 'isotope-item sc-isotope-filter tpg-hidden',
576 'id' => 'rt-tpg-sc-isotope-filter',
577 'class' => 'rt-select2',
578 'options' => Fns::rt_get_taxonomy_for_filter(),
579 ],
580 'isotope_default_filter' => [
581 'type' => 'select',
582 'label' => esc_html__( 'Isotope filter (Selected item)', 'the-post-grid' ),
583 'holderClass' => 'isotope-item sc-isotope-default-filter tpg-hidden pro-field',
584 'id' => 'rt-tpg-sc-isotope-default-filter',
585 'class' => 'rt-select2',
586 'attr' => "data-selected='" . get_post_meta(
587 get_the_ID(),
588 'isotope_default_filter',
589 true
590 ) . "'",
591 'options' => [ '' => esc_html__( 'Show all', 'the-post-grid' ) ],
592 ],
593 'tpg_show_all_text' => [
594 'type' => 'text',
595 'holderClass' => 'isotope-item sc-isotope-filter tpg-hidden',
596 'label' => esc_html__( 'Show all text', 'the-post-grid' ),
597 'default' => esc_html__( 'Show all', 'the-post-grid' ),
598 ],
599 'isotope_filter_dropdown' => [
600 'type' => 'switch',
601 'label' => esc_html__( 'Isotope dropdown filter', 'the-post-grid' ),
602 'holderClass' => 'isotope-item sc-isotope-filter sc-isotope-filter-dropdown tpg-hidden pro-field',
603 ],
604 'isotope_filter_show_all' => [
605 'type' => 'switch',
606 'name' => 'isotope_filter_show_all',
607 'label' => esc_html__( 'Isotope filter (Show All item)', 'the-post-grid' ),
608 'holderClass' => 'isotope-item sc-isotope-filter-show-all tpg-hidden pro-field',
609 'id' => 'rt-tpg-sc-isotope-filter-show-all',
610 ],
611 'isotope_filter_count' => [
612 'type' => 'switch',
613 'label' => esc_html__( 'Isotope filter count number', 'the-post-grid' ),
614 'holderClass' => 'isotope-item sc-isotope-filter tpg-hidden pro-field',
615 'option' => 'Enable',
616 ],
617 'isotope_filter_url' => [
618 'type' => 'switch',
619 'label' => esc_html__( 'Isotope filter URL', 'the-post-grid' ),
620 'holderClass' => 'isotope-item sc-isotope-filter tpg-hidden pro-field',
621 ],
622 'isotope_search_filter' => [
623 'type' => 'switch',
624 'label' => esc_html__( 'Isotope search filter', 'the-post-grid' ),
625 'holderClass' => 'isotope-item sc-isotope-search-filter tpg-hidden pro-field',
626 'id' => 'rt-tpg-sc-isotope-search-filter',
627 'option' => 'Enable',
628 ],
629 'carousel_property' => [
630 'type' => 'checkbox',
631 'label' => esc_html__( 'Carousel property', 'the-post-grid' ),
632 'multiple' => true,
633 'alignment' => 'vertical',
634 'holderClass' => 'carousel-item carousel-property tpg-hidden',
635 'id' => 'carousel-property',
636 'default' => [ 'pagination' ],
637 'options' => self::owl_property(),
638 ],
639 'tpg_carousel_speed' => [
640 'label' => esc_html__( 'Speed', 'the-post-grid' ),
641 'holderClass' => 'tpg-hidden carousel-item',
642 'type' => 'number',
643 'default' => 250,
644 'description' => esc_html__( 'Auto play Speed in milliseconds', 'the-post-grid' ),
645 ],
646 'tpg_carousel_autoplay_timeout' => [
647 'label' => esc_html__( 'Autoplay timeout', 'the-post-grid' ),
648 'holderClass' => 'tpg-hidden carousel-item tpg-carousel-auto-play-timeout',
649 'type' => 'number',
650 'default' => 5000,
651 'description' => esc_html__( 'Autoplay interval timeout', 'the-post-grid' ),
652 ],
653 ];
654
655 return apply_filters( 'rt_tpg_layout_options', $options );
656 }
657
658 public static function responsiveSettingsColumn() {
659 $options = [
660 'column' => [
661 'type' => 'select',
662 'label' => esc_html__( 'Desktop', 'the-post-grid' ),
663 'class' => 'rt-select2',
664 'holderClass' => 'offset-column-wrap rt-3-column',
665 'default' => 3,
666 'options' => self::scColumns(),
667 'description' => esc_html__( 'Desktop > 991px', 'the-post-grid' ),
668 ],
669 'tpg_tab_column' => [
670 'type' => 'select',
671 'label' => esc_html__( 'Tab', 'the-post-grid' ),
672 'class' => 'rt-select2',
673 'holderClass' => 'offset-column-wrap rt-3-column',
674 'default' => 2,
675 'options' => self::scColumns(),
676 'description' => esc_html__( 'Tab < 992px', 'the-post-grid' ),
677 ],
678 'tpg_mobile_column' => [
679 'type' => 'select',
680 'label' => esc_html__( 'Mobile', 'the-post-grid' ),
681 'class' => 'rt-select2',
682 'holderClass' => 'offset-column-wrap rt-3-column',
683 'default' => 1,
684 'options' => self::scColumns(),
685 'description' => esc_html__( 'Mobile < 768px', 'the-post-grid' ),
686 ],
687 ];
688
689 return apply_filters( 'rt_tpg_layout_column_options', $options );
690 }
691
692 public static function layoutMiscSettings() {
693 $options = [
694 'pagination' => [
695 'type' => 'switch',
696 'label' => esc_html__( 'Pagination', 'the-post-grid' ),
697 'holderClass' => 'pagination',
698 'id' => 'rt-tpg-pagination',
699 'description' => esc_html__( 'Pagination not allow in Grid Hover layout', 'the-post-grid' ),
700 'option' => 'Enable',
701 'default' => 1,
702 ],
703 'posts_per_page' => [
704 'type' => 'number',
705 'label' => esc_html__( 'Display per page', 'the-post-grid' ),
706 'holderClass' => 'pagination-item posts-per-page tpg-hidden',
707 'default' => 9,
708 'description' => esc_html__( 'If value of Limit setting is not blank (empty), this value should be smaller than Limit value.', 'the-post-grid' ),
709 ],
710 'posts_loading_type' => [
711 'type' => 'radio',
712 'label' => esc_html__( 'Pagination Type', 'the-post-grid' ),
713 'holderClass' => 'pagination-item posts-loading-type tpg-hidden pro-field',
714 'alignment' => 'vertical',
715 'default' => 'pagination',
716 'options' => self::postLoadingType(),
717 ],
718
719 'load_more_text' => [
720 'type' => 'text',
721 'name' => 'load_more_text',
722 'label' => esc_html__( 'Load More Text', 'the-post-grid' ),
723 'holderClass' => 'pagination-load-more-label tpg-hidden pro-field',
724 'id' => 'template_class',
725 'value' => isset( $settings['load_more_text'] ) ? $settings['load_more_text'] : '',
726 ],
727
728 'link_to_detail_page' => [
729 'type' => 'switch',
730 'label' => esc_html__( 'Link To Detail Page', 'the-post-grid' ),
731 'alignment' => 'vertical',
732 'default' => true,
733 ],
734 'detail_page_link_type' => [
735 'type' => 'radio',
736 'label' => esc_html__( 'Detail page link type', 'the-post-grid' ),
737 'holderClass' => 'detail-page-link-type tpg-hidden pro-field',
738 'alignment' => 'vertical',
739 'default' => 'new_page',
740 'options' => [
741 'new_page' => esc_html__( 'New Page', 'the-post-grid' ),
742 'popup' => esc_html__( 'PopUp', 'the-post-grid' ),
743 ],
744 ],
745 'popup_type' => [
746 'type' => 'radio',
747 'label' => esc_html__( 'PopUp Type', 'the-post-grid' ),
748 'holderClass' => 'popup-type tpg-hidden pro-field',
749 'alignment' => 'vertical',
750 'default' => 'single',
751 'options' => [
752 'single' => esc_html__( 'Single PopUp', 'the-post-grid' ),
753 'multi' => esc_html__( 'Multi PopUp', 'the-post-grid' ),
754 ],
755 ],
756 'link_target' => [
757 'type' => 'radio',
758 'label' => esc_html__( 'Link Target', 'the-post-grid' ),
759 'holderClass' => 'tpg-link-target tpg-hidden',
760 'alignment' => 'vertical',
761 'options' => [
762 '' => esc_html__( 'Same Window', 'the-post-grid' ),
763 '_blank' => esc_html__( 'New Window', 'the-post-grid' ),
764 ],
765 ],
766 ];
767
768 return apply_filters( 'rt_tpg_layout_misc_options', $options );
769 }
770
771 public static function stickySettings() {
772 $options = [
773 'ignore_sticky_posts' => [
774 'type' => 'switch',
775 'label' => esc_html__( 'Show sticky posts at the top', 'the-post-grid' ),
776 'holderClass' => 'pro-field',
777 'alignment' => 'vertical',
778 'default' => false,
779 ],
780 ];
781
782 return $options;
783 }
784
785 public static function scMarginOpt() {
786 return [
787 'default' => esc_html__( 'Bootstrap default', 'the-post-grid' ),
788 'no' => esc_html__( 'No Margin', 'the-post-grid' ),
789 ];
790 }
791
792 function scGridType() {
793 return [
794 'even' => esc_html__( 'Even Grid', 'the-post-grid' ),
795 'masonry' => esc_html__( 'Masonry', 'the-post-grid' ),
796 ];
797 }
798
799 public static function getTitleTags() {
800 return [
801 'h2' => esc_html__( 'H2', 'the-post-grid' ),
802 'h3' => esc_html__( 'H3', 'the-post-grid' ),
803 'h4' => esc_html__( 'H4', 'the-post-grid' ),
804 ];
805 }
806
807 public static function getHeadingTags() {
808 return [
809 'h1' => esc_html__( 'H1', 'the-post-grid' ),
810 'h2' => esc_html__( 'H2', 'the-post-grid' ),
811 'h3' => esc_html__( 'H3', 'the-post-grid' ),
812 'h4' => esc_html__( 'H4', 'the-post-grid' ),
813 'h5' => esc_html__( 'H5', 'the-post-grid' ),
814 'h6' => esc_html__( 'H6', 'the-post-grid' ),
815 ];
816 }
817
818 public static function rtTpgSettingsDetailFieldSelection() {
819 $settings = get_option( rtTPG()->options['settings'] );
820
821 $fields = [
822 'popup_fields' => [
823 'type' => 'checkbox',
824 'label' => esc_html__( 'Field Selection', 'the-post-grid' ),
825 'id' => 'popup-fields',
826 'holderClass' => 'pro-field',
827 'alignment' => 'vertical',
828 'multiple' => true,
829 'options' => self::detailAvailableFields(),
830 'default' => array_keys( self::detailAvailableFields() ),
831 'value' => isset( $settings['popup_fields'] ) ? $settings['popup_fields'] : [],
832 ],
833 ];
834 $cf = Fns::is_acf();
835 if ( $cf ) {
836 $plist = self::getCFPluginList();
837 $pName = ! empty( $plist[ $cf ] ) ? $plist[ $cf ] : ' - ';
838 $fields['cf_group'] = [
839 'type' => 'checkbox',
840 'name' => 'cf_group',
841 'holderClass' => 'tpg-hidden cfs-fields cf-group pro-field',
842 'label' => 'Custom Field group ' . " ({$pName})",
843 'multiple' => true,
844 'alignment' => 'vertical',
845 'id' => 'cf_group',
846 'options' => Fns::get_groups_by_post_type( 'all' ),
847 'value' => isset( $settings['cf_group'] ) ? $settings['cf_group'] : [],
848 ];
849 $fields['cf_hide_empty_value'] = [
850 'type' => 'checkbox',
851 'name' => 'cf_hide_empty_value',
852 'holderClass' => 'tpg-hidden cfs-fields pro-field',
853 'label' => esc_html__( 'Hide field with empty value', 'the-post-grid' ),
854 'value' => ! empty( $settings['cf_hide_empty_value'] ) ? 1 : 0,
855 ];
856 $fields['cf_show_only_value'] = [
857 'type' => 'checkbox',
858 'name' => 'cf_show_only_value',
859 'holderClass' => 'tpg-hidden cfs-fields pro-field',
860 'label' => esc_html__( 'Show only value of field', 'the-post-grid' ),
861 'description' => esc_html__( 'By default both name & value of field is shown', 'the-post-grid' ),
862 'value' => ! empty( $settings['cf_show_only_value'] ) ? 1 : 0,
863 ];
864 $fields['cf_hide_group_title'] = [
865 'type' => 'checkbox',
866 'name' => 'cf_hide_group_title',
867 'holderClass' => 'tpg-hidden cfs-fields pro-field',
868 'label' => esc_html__( 'Hide group title', 'the-post-grid' ),
869 'value' => ! empty( $settings['cf_hide_group_title'] ) ? 1 : 0,
870 ];
871 }
872
873 return $fields;
874 }
875
876 public static function detailAvailableFields() {
877 $fields = self::rtTPGItemFields();
878 $inserted = [
879 'content' => esc_html__( 'Content', 'the-post-grid' ),
880 'feature_img' => esc_html__( 'Feature Image', 'the-post-grid' ),
881 ];
882
883 unset( $fields['heading'] );
884 unset( $fields['excerpt'] );
885 unset( $fields['read_more'] );
886 unset( $fields['comment_count'] );
887
888 $offset = array_search( 'title', array_keys( $fields ) ) + 1;
889 $newFields = array_slice( $fields, 0, $offset, true ) + $inserted + array_slice(
890 $fields,
891 $offset,
892 null,
893 true
894 );
895 $newFields['social_share'] = 'Social Share';
896
897 return $newFields;
898 }
899
900 public static function rtTPGSCHeadingSettings() {
901 $fields = [
902 'tpg_heading_tag' => [
903 'type' => 'select',
904 'name' => 'tpg_heading_tag',
905 'label' => esc_html__( 'Tag', 'the-post-grid' ),
906 'class' => 'rt-select2',
907 'id' => 'heading-tag',
908 'options' => self::getHeadingTags(),
909 'default' => 'h2',
910 ],
911 'tpg_heading_style' => [
912 'type' => 'select',
913 'class' => 'rt-select2',
914 'label' => esc_html__( 'Style', 'the-post-grid' ),
915 'blank' => esc_html__( 'Default', 'the-post-grid' ),
916 'options' => [
917 'style1' => esc_html__( 'Style 1', 'the-post-grid' ),
918 'style2' => esc_html__( 'Style 2', 'the-post-grid' ),
919 'style3' => esc_html__( 'Style 3', 'the-post-grid' ),
920 ],
921 ],
922 'tpg_heading_alignment' => [
923 'type' => 'select',
924 'class' => 'rt-select2',
925 'label' => esc_html__( 'Alignment', 'the-post-grid' ),
926 'blank' => esc_html__( 'Default', 'the-post-grid' ),
927 'options' => [
928 'left' => esc_html__( 'Left', 'the-post-grid' ),
929 'right' => esc_html__( 'Right', 'the-post-grid' ),
930 'center' => esc_html__( 'Center', 'the-post-grid' ),
931 ],
932 ],
933 'tpg_heading_link' => [
934 'type' => 'url',
935 'label' => esc_html__( 'Link', 'the-post-grid' ),
936 ],
937 ];
938
939 return $fields;
940 }
941
942 public static function rtTPGSCCategorySettings() {
943 $fields = [
944 'tpg_category_position' => [
945 'type' => 'select',
946 'class' => 'rt-select2',
947 'holderClass' => 'pro-field',
948 'label' => esc_html__( 'Position', 'the-post-grid' ),
949 'blank' => esc_html__( 'Default', 'the-post-grid' ),
950 'options' => [
951 'above_title' => esc_html__( 'Above Title', 'the-post-grid' ),
952 'top_left' => esc_html__( 'Over image (Top Left)', 'the-post-grid' ),
953 'top_right' => esc_html__( 'Over image (Top Right)', 'the-post-grid' ),
954 'bottom_left' => esc_html__( 'Over image (Bottom Left)', 'the-post-grid' ),
955 'bottom_right' => esc_html__( 'Over image (Bottom Right)', 'the-post-grid' ),
956 'image_center' => esc_html__( 'Over image (Center)', 'the-post-grid' ),
957 ],
958 ],
959 'tpg_category_style' => [
960 'type' => 'select',
961 'class' => 'rt-select2',
962 'holderClass' => 'pro-field',
963 'label' => esc_html__( 'Style', 'the-post-grid' ),
964 'blank' => esc_html__( 'Default', 'the-post-grid' ),
965 'options' => [
966 'style1' => esc_html__( 'Style 1', 'the-post-grid' ),
967 'style2' => esc_html__( 'Style 2', 'the-post-grid' ),
968 'style3' => esc_html__( 'Style 3', 'the-post-grid' ),
969 ],
970 ],
971 'tpg_category_icon' => [
972 'type' => 'switch',
973 'label' => esc_html__( 'Icon', 'the-post-grid' ),
974 'default' => true,
975 ],
976 ];
977
978 return $fields;
979 }
980
981 public static function rtTPGSCTitleSettings() {
982 $fields = [
983 'tpg_title_position' => [
984 'type' => 'select',
985 'label' => esc_html__( 'Title Position (Above or Below image)', 'the-post-grid' ),
986 'class' => 'rt-select2 ',
987 'holderClass' => 'pro-field',
988 'blank' => esc_html__( 'Default', 'the-post-grid' ),
989 'options' => [
990 'above' => esc_html__( 'Above image', 'the-post-grid' ),
991 'below' => esc_html__( 'Below image', 'the-post-grid' ),
992 ],
993 'description' => __(
994 "<span style='color:#ff0000'>Only Layout 1, Layout 12, Layout 14, Isotope1, Isotope8, Isotope10, Carousel Layout 1, Carousel Layout 8, Carousel Layout 10</span>",
995 'the-post-grid'
996 ),
997 ],
998 'title_tag' => [
999 'type' => 'select',
1000 'name' => 'title_tag',
1001 'label' => esc_html__( 'Title tag', 'the-post-grid' ),
1002 'class' => 'rt-select2',
1003 'id' => 'title-tag',
1004 'options' => self::getTitleTags(),
1005 'default' => 'h3',
1006 ],
1007 'tpg_title_limit' => [
1008 'type' => 'number',
1009 'label' => esc_html__( 'Title limit', 'the-post-grid' ),
1010 'description' => esc_html__( 'Title limit only integer number is allowed, Leave it blank for full title.', 'the-post-grid' ),
1011 ],
1012 'tpg_title_limit_type' => [
1013 'type' => 'radio',
1014 'label' => esc_html__( 'Title limit type', 'the-post-grid' ),
1015 'alignment' => 'vertical',
1016 'default' => 'character',
1017 'options' => self::get_limit_type(),
1018 ],
1019 ];
1020
1021 return $fields;
1022 }
1023
1024 public static function rtTPGSCMetaSettings() {
1025 $fields = [
1026 'tpg_meta_position' => [
1027 'type' => 'select',
1028 'label' => esc_html__( 'Position', 'the-post-grid' ),
1029 'class' => 'rt-select2 ',
1030 'holderClass' => 'pro-field',
1031 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1032 'options' => [
1033 'above_title' => esc_html__( 'Above Title', 'the-post-grid' ),
1034 'above_excerpt' => esc_html__( 'Above excerpt', 'the-post-grid' ),
1035 'below_excerpt' => esc_html__( 'Below excerpt', 'the-post-grid' ),
1036 ],
1037 ],
1038 'tpg_meta_icon' => [
1039 'type' => 'switch',
1040 'label' => esc_html__( 'Icon', 'the-post-grid' ),
1041 'default' => true,
1042 ],
1043 'tpg_meta_separator' => [
1044 'type' => 'select',
1045 'class' => 'rt-select2',
1046 'label' => esc_html__( 'Separator', 'the-post-grid' ),
1047 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1048 'options' => [
1049 'dot' => esc_html__( 'Dot ( . )', 'the-post-grid' ),
1050 's_slash' => esc_html__( 'Single Slash ( / )', 'the-post-grid' ),
1051 'd_slash' => esc_html__( 'Double Slash ( // )', 'the-post-grid' ),
1052 'hypen' => esc_html__( 'Hypen ( - )', 'the-post-grid' ),
1053 'v_pipe' => esc_html__( 'Vertical Pipe ( | )', 'the-post-grid' ),
1054 ],
1055 ],
1056 ];
1057
1058 return $fields;
1059 }
1060
1061 public static function rtTPGSCImageSettings() {
1062 $fields = [
1063 'feature_image' => [
1064 'type' => 'switch',
1065 'label' => esc_html__( 'Hide Feature Image', 'the-post-grid' ),
1066 'id' => 'rt-tpg-feature-image',
1067 'default' => false,
1068 ],
1069 'featured_image_size' => [
1070 'type' => 'select',
1071 'label' => esc_html__( 'Feature Image Size', 'the-post-grid' ),
1072 'class' => 'rt-select2',
1073 'holderClass' => 'rt-feature-image-option tpg-hidden',
1074 'options' => Fns::get_image_sizes(),
1075 ],
1076 'custom_image_size' => [
1077 'type' => 'image_size',
1078 'label' => esc_html__( 'Custom Image Size', 'the-post-grid' ),
1079 'holderClass' => 'rt-sc-custom-image-size-holder tpg-hidden',
1080 'multiple' => true,
1081 ],
1082 'media_source' => [
1083 'type' => 'radio',
1084 'label' => esc_html__( 'Media Source', 'the-post-grid' ),
1085 'default' => 'feature_image',
1086 'alignment' => 'vertical',
1087 'holderClass' => 'rt-feature-image-option tpg-hidden',
1088 'options' => self::rtMediaSource(),
1089 ],
1090 'tgp_layout2_image_column' => [
1091 'type' => 'select',
1092 'label' => esc_html__( 'Image column', 'the-post-grid' ),
1093 'class' => 'rt-select2',
1094 'holderClass' => 'holder-layout2-image-column tpg-hidden',
1095 'default' => 4,
1096 'options' => self::scColumns(),
1097 'description' => 'Content column will calculate automatically',
1098 ],
1099 'tpg_image_type' => [
1100 'type' => 'radio',
1101 'label' => esc_html__( 'Type', 'the-post-grid' ),
1102 'alignment' => 'vertical',
1103 'holderClass' => 'rt-feature-image-option tpg-hidden pro-field',
1104 'default' => 'normal',
1105 'options' => self::get_image_types(),
1106 ],
1107 'tpg_image_animation' => [
1108 'type' => 'select',
1109 'label' => esc_html__( 'Hover Animation', 'the-post-grid' ),
1110 'class' => 'rt-select2',
1111 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1112 'options' => [
1113 'img_zoom_in' => esc_html__( 'Zoom in', 'the-post-grid' ),
1114 'img_zoom_out' => esc_html__( 'Zoom out', 'the-post-grid' ),
1115 'img_no_effect' => esc_html__( 'None', 'the-post-grid' ),
1116 ],
1117 ],
1118 'tpg_image_border_radius' => [
1119 'type' => 'number',
1120 'class' => 'small-text',
1121 'holderClass' => 'pro-field',
1122 'label' => esc_html__( 'Border radius', 'the-post-grid' ),
1123 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1124 ],
1125 ];
1126
1127 return apply_filters( 'rt_tpg_sc_image_settings', $fields );
1128 }
1129
1130 public static function rtTPGSCExcerptSettings() {
1131 $fields = [
1132 'excerpt_limit' => [
1133 'type' => 'number',
1134 'label' => esc_html__( 'Excerpt limit', 'the-post-grid' ),
1135 'default' => 15,
1136 'description' => esc_html__( 'Excerpt limit only integer number is allowed, Leave it blank for full excerpt.', 'the-post-grid' ),
1137 ],
1138 'tgp_excerpt_type' => [
1139 'type' => 'radio',
1140 'label' => esc_html__( 'Excerpt Type', 'the-post-grid' ),
1141 'alignment' => 'vertical',
1142 'default' => 'word',
1143 'options' => self::get_limit_type( 'content' ),
1144 ],
1145 'tgp_excerpt_more_text' => [
1146 'type' => 'text',
1147 'label' => esc_html__( 'Excerpt more text', 'the-post-grid' ),
1148 'default' => '...',
1149 ],
1150 ];
1151
1152 return $fields;
1153 }
1154
1155 public static function rtTPGSCButtonSettings() {
1156 $fields = [
1157 'tpg_read_more_button_border_radius' => [
1158 'type' => 'number',
1159 'class' => 'small-text',
1160 'label' => esc_html__( 'Border radius', 'the-post-grid' ),
1161 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1162 ],
1163 'tpg_read_more_button_alignment' => [
1164 'type' => 'select',
1165 'class' => 'rt-select2',
1166 'label' => esc_html__( 'Alignment', 'the-post-grid' ),
1167 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1168 'options' => [
1169 'left' => esc_html__( 'Left', 'the-post-grid' ),
1170 'right' => esc_html__( 'Right', 'the-post-grid' ),
1171 'center' => esc_html__( 'Center', 'the-post-grid' ),
1172 ],
1173 ],
1174 'tgp_read_more_text' => [
1175 'type' => 'text',
1176 'label' => esc_html__( 'Text', 'the-post-grid' ),
1177 ],
1178 ];
1179
1180 return $fields;
1181 }
1182
1183 public static function rtTPGStyleFields() {
1184 $fields = [
1185 'parent_class' => [
1186 'type' => 'text',
1187 'label' => esc_html__( 'Parent class', 'the-post-grid' ),
1188 'class' => 'medium-text',
1189 'description' => esc_html__( 'Parent class for adding custom css', 'the-post-grid' ),
1190 ],
1191 'primary_color' => [
1192 'type' => 'text',
1193 'label' => esc_html__( 'Primary Color', 'the-post-grid' ),
1194 'class' => 'rt-color',
1195 'default' => '#0367bf',
1196 ],
1197 ];
1198
1199 return apply_filters( 'rt_tpg_style_fields', $fields );
1200 }
1201
1202 public static function rtTPGStyleButtonColorFields() {
1203 $fields = [
1204
1205 'button_bg_color' => [
1206 'type' => 'text',
1207 'name' => 'button_bg_color',
1208 'label' => esc_html__( 'Background', 'the-post-grid' ),
1209 'class' => 'rt-color',
1210 ],
1211 'button_hover_bg_color' => [
1212 'type' => 'text',
1213 'name' => 'button_hover_bg_color',
1214 'label' => esc_html__( 'Hover Background', 'the-post-grid' ),
1215 'class' => 'rt-color',
1216 ],
1217 'button_active_bg_color' => [
1218 'type' => 'text',
1219 'label' => esc_html__( 'Active Background (Isotop)', 'the-post-grid' ),
1220 'class' => 'rt-color',
1221 ],
1222 'button_text_bg_color' => [
1223 'type' => 'text',
1224 'label' => esc_html__( 'Text', 'the-post-grid' ),
1225 'class' => 'rt-color',
1226 ],
1227 'button_hover_text_color' => [
1228 'type' => 'text',
1229 'label' => esc_html__( 'Text Hover', 'the-post-grid' ),
1230 'class' => 'rt-color',
1231 ],
1232 ];
1233
1234 return apply_filters( 'rt_tpg_style_button_css_fields', $fields );
1235 }
1236
1237 public static function rtTPGStyleHeading() {
1238 $fields = [
1239 'tpg_heading_bg' => [
1240 'type' => 'text',
1241 'class' => 'rt-color',
1242 'label' => esc_html__( 'Background Color', 'the-post-grid' ),
1243 ],
1244 'tpg_heading_color' => [
1245 'type' => 'text',
1246 'class' => 'rt-color',
1247 'label' => esc_html__( 'Text Color', 'the-post-grid' ),
1248 ],
1249 'tpg_heading_border_color' => [
1250 'type' => 'text',
1251 'class' => 'rt-color',
1252 'label' => esc_html__( 'Border Color', 'the-post-grid' ),
1253 ],
1254 'tpg_heading_border_size' => [
1255 'type' => 'number',
1256 'class' => 'small-text',
1257 'label' => esc_html__( 'Border Size', 'the-post-grid' ),
1258 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1259 ],
1260 'tpg_heading_margin' => [
1261 'type' => 'text',
1262 'class' => 'medium-text tpg-spacing-field',
1263 'label' => esc_html__( 'Margin', 'the-post-grid' ),
1264 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1265 ],
1266 'tpg_heading_padding' => [
1267 'type' => 'text',
1268 'class' => 'medium-text tpg-spacing-field',
1269 'label' => esc_html__( 'Padding', 'the-post-grid' ),
1270 'description' => esc_html__( 'Leave it blank for default, multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1271 ],
1272 ];
1273
1274 return apply_filters( 'tpg_heading_style_fields', $fields );
1275 }
1276
1277 public static function rtTPGStyleFullArea() {
1278 $fields = [
1279 'tpg_full_area_bg' => [
1280 'type' => 'text',
1281 'class' => 'rt-color',
1282 'label' => esc_html__( 'Background', 'the-post-grid' ),
1283 ],
1284 'tpg_full_area_margin' => [
1285 'type' => 'text',
1286 'class' => 'medium-text',
1287 'label' => esc_html__( 'Margin', 'the-post-grid' ),
1288 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1289 ],
1290 'tpg_full_area_padding' => [
1291 'type' => 'text',
1292 'class' => 'medium-text',
1293 'label' => esc_html__( 'Padding', 'the-post-grid' ),
1294 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1295 ],
1296 ];
1297
1298 return apply_filters( 'tpg_box_style_fields', $fields );
1299 }
1300
1301 public static function rtTPGStyleContentWrap() {
1302 $fields = [
1303 'tpg_content_wrap_bg' => [
1304 'type' => 'text',
1305 'class' => 'rt-color',
1306 'label' => esc_html__( 'Background Color', 'the-post-grid' ),
1307 ],
1308 'tpg_content_wrap_shadow' => [
1309 'type' => 'text',
1310 'class' => 'rt-color',
1311 'label' => esc_html__( 'Box Shadow Color', 'the-post-grid' ),
1312 ],
1313 'tpg_content_wrap_border_color' => [
1314 'type' => 'text',
1315 'class' => 'rt-color',
1316 'label' => esc_html__( 'Border Color', 'the-post-grid' ),
1317 ],
1318 'tpg_content_wrap_border' => [
1319 'type' => 'number',
1320 'class' => 'small-text',
1321 'label' => esc_html__( 'Border Width', 'the-post-grid' ),
1322 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1323 ],
1324 'tpg_content_wrap_border_radius' => [
1325 'type' => 'number',
1326 'class' => 'small-text',
1327 'label' => esc_html__( 'Border Radius', 'the-post-grid' ),
1328 ],
1329 'tpg_box_padding' => [
1330 'type' => 'text',
1331 'class' => 'medium-text',
1332 'label' => esc_html__( 'Box Padding', 'the-post-grid' ),
1333 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1334 ],
1335 'tpg_content_padding' => [
1336 'type' => 'text',
1337 'class' => 'medium-text',
1338 'label' => esc_html__( 'Content Padding', 'the-post-grid' ),
1339 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1340 ],
1341 ];
1342
1343 return apply_filters( 'tpg_content_style_fields', $fields );
1344 }
1345
1346 public static function rtTPGStyleCategory() {
1347 $fields = [
1348 'tpg_category_bg' => [
1349 'type' => 'text',
1350 'class' => 'rt-color',
1351 'label' => esc_html__( 'Background Color', 'the-post-grid' ),
1352 ],
1353 'tpg_category_color' => [
1354 'type' => 'text',
1355 'class' => 'rt-color',
1356 'label' => esc_html__( 'Text Color', 'the-post-grid' ),
1357 ],
1358 'tpg_category_border_radius' => [
1359 'type' => 'number',
1360 'class' => 'small-text',
1361 'label' => esc_html__( 'Border Radius', 'the-post-grid' ),
1362 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1363 ],
1364 'tpg_category_margin' => [
1365 'type' => 'text',
1366 'class' => 'medium-text tpg-spacing-field',
1367 'label' => esc_html__( 'Margin', 'the-post-grid' ),
1368 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1369 ],
1370 'tpg_category_padding' => [
1371 'type' => 'text',
1372 'class' => 'medium-text tpg-spacing-field',
1373 'label' => esc_html__( 'Padding', 'the-post-grid' ),
1374 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1375 ],
1376 'rt_tpg_category_font_size' => [
1377 'type' => 'select',
1378 'class' => 'rt-select2',
1379 'label' => esc_html__( 'Font Size', 'the-post-grid' ),
1380 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1381 'options' => self::scFontSize(),
1382 ],
1383 ];
1384
1385 return apply_filters( 'tpg_category_style_fields', $fields );
1386 }
1387
1388
1389 public static function itemFields() {
1390
1391 $itemField = self::rtTPGItemFields();
1392 $itemField['tpg_default_value'] = 'Default';
1393
1394 $fields = [
1395 'item_fields' => [
1396 'type' => 'checkbox',
1397 'name' => 'item_fields',
1398 'label' => esc_html__( 'Field selection', 'the-post-grid' ),
1399 'id' => 'item-fields',
1400 'multiple' => true,
1401 'alignment' => 'vertical',
1402 'default' => array_keys( $itemField ),
1403 'options' => $itemField,
1404 ],
1405 ];
1406 if ( $cf = Fns::is_acf() ) {
1407 global $post;
1408 $post_type = get_post_meta( $post->ID, 'tpg_post_type', true );
1409 $plist = self::getCFPluginList();
1410 $fields['cf_group'] = [
1411 'type' => 'checkbox',
1412 'name' => 'cf_group',
1413 'holderClass' => 'tpg-hidden cf-fields cf-group',
1414 'label' => 'Custom Field group ' . " ({$plist[$cf]})",
1415 'multiple' => true,
1416 'alignment' => 'vertical',
1417 'id' => 'cf_group',
1418 'options' => Fns::get_groups_by_post_type( $post_type, $cf ),
1419 ];
1420 $fields['cf_hide_empty_value'] = [
1421 'type' => 'checkbox',
1422 'name' => 'cf_hide_empty_value',
1423 'holderClass' => 'tpg-hidden cf-fields',
1424 'label' => esc_html__( 'Hide field with empty value', 'the-post-grid' ),
1425 'default' => 1,
1426 ];
1427 $fields['cf_show_only_value'] = [
1428 'type' => 'checkbox',
1429 'name' => 'cf_show_only_value',
1430 'holderClass' => 'tpg-hidden cf-fields',
1431 'label' => esc_html__( 'Show only value of field', 'the-post-grid' ),
1432 'description' => esc_html__( 'By default both name & value of field is shown', 'the-post-grid' ),
1433 ];
1434 $fields['cf_hide_group_title'] = [
1435 'type' => 'checkbox',
1436 'name' => 'cf_hide_group_title',
1437 'holderClass' => 'tpg-hidden cf-fields',
1438 'label' => esc_html__( 'Hide group title', 'the-post-grid' ),
1439 ];
1440 }
1441
1442 return $fields;
1443 }
1444
1445
1446 public static function getCFPluginList() {
1447 return [
1448 'acf' => esc_html__( 'Advanced Custom Field', 'the-post-grid' ),
1449 ];
1450 }
1451
1452 public static function rtMediaSource() {
1453 return [
1454 'feature_image' => esc_html__( 'Feature Image', 'the-post-grid' ),
1455 'first_image' => esc_html__( 'First Image from content', 'the-post-grid' ),
1456 ];
1457 }
1458
1459 public static function get_image_types() {
1460 return [
1461 'normal' => esc_html__( 'Normal', 'the-post-grid' ),
1462 'circle' => esc_html__( 'Circle', 'the-post-grid' ),
1463 ];
1464 }
1465
1466 public static function get_limit_type( $content = null ) {
1467 $types = [
1468 'character' => esc_html__( 'Character', 'the-post-grid' ),
1469 'word' => esc_html__( 'Word', 'the-post-grid' ),
1470 ];
1471 if ( $content === 'content' ) {
1472 $types['full'] = esc_html__( 'Full Content', 'the-post-grid' );
1473 }
1474
1475 return apply_filters( 'tpg_limit_type', $types, $content );
1476 }
1477
1478 public static function scColumns() {
1479 return [
1480 1 => esc_html__( 'Column 1', 'the-post-grid' ),
1481 2 => esc_html__( 'Column 2', 'the-post-grid' ),
1482 3 => esc_html__( 'Column 3', 'the-post-grid' ),
1483 4 => esc_html__( 'Column 4', 'the-post-grid' ),
1484 5 => esc_html__( 'Column 5', 'the-post-grid' ),
1485 6 => esc_html__( 'Column 6', 'the-post-grid' ),
1486 ];
1487 }
1488
1489 public static function tgp_filter_list() {
1490 return [
1491 '_taxonomy_filter' => esc_html__( 'Taxonomy filter', 'the-post-grid' ),
1492 '_author_filter' => esc_html__( 'Author filter', 'the-post-grid' ),
1493 '_order_by' => esc_html__( 'Order - Sort retrieved posts by parameter', 'the-post-grid' ),
1494 '_sort_order' => esc_html__( 'Sort Order - Designates the ascending or descending order of the "orderby" parameter', 'the-post-grid' ),
1495 '_search' => esc_html__( 'Search filter', 'the-post-grid' ),
1496 ];
1497 }
1498
1499 public static function overflowOpacity() {
1500 return [
1501 1 => esc_html__( '10%', 'the-post-grid' ),
1502 2 => esc_html__( '20%', 'the-post-grid' ),
1503 3 => esc_html__( '30%', 'the-post-grid' ),
1504 4 => esc_html__( '40%', 'the-post-grid' ),
1505 5 => esc_html__( '50%', 'the-post-grid' ),
1506 6 => esc_html__( '60%', 'the-post-grid' ),
1507 7 => esc_html__( '70%', 'the-post-grid' ),
1508 8 => esc_html__( '80%', 'the-post-grid' ),
1509 9 => esc_html__( '90%', 'the-post-grid' ),
1510 ];
1511 }
1512
1513 public static function rtTPGLayoutType() {
1514 $layoutType = [
1515 'grid' => [
1516 'title' => esc_html__( 'Grid', 'the-post-grid' ),
1517 'img' => rtTPG()->get_assets_uri( 'images/grid.png' ),
1518 ],
1519 'grid_hover' => [
1520 'title' => esc_html__( 'Grid Hover', 'the-post-grid' ),
1521 'img' => rtTPG()->get_assets_uri( 'images/grid_hover.png' ),
1522 ],
1523 'list' => [
1524 'title' => esc_html__( 'List', 'the-post-grid' ),
1525 'img' => rtTPG()->get_assets_uri( 'images/list.png' ),
1526 ],
1527 'isotope' => [
1528 'title' => esc_html__( 'Isotope', 'the-post-grid' ),
1529 'img' => rtTPG()->get_assets_uri( 'images/isotope.png' ),
1530 ],
1531 ];
1532
1533 return apply_filters( 'rt_tpg_layouts_type', $layoutType );
1534 }
1535
1536 public static function rtTPGLayouts() {
1537 $layouts = [
1538 'layout1' => [
1539 'title' => esc_html__( 'Grid Layout 1', 'the-post-grid' ),
1540 'layout' => 'grid',
1541 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/',
1542 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid1.png' ),
1543 ],
1544 'layout12' => [
1545 'title' => esc_html__( 'Grid Layout 2', 'the-post-grid' ),
1546 'layout' => 'grid',
1547 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/grid-layout-2/',
1548 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid10.png' ),
1549 ],
1550 'layout5' => [
1551 'title' => esc_html__( 'Grid Hover 1', 'the-post-grid' ),
1552 'layout' => 'grid_hover',
1553 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-1/',
1554 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid3.png' ),
1555 ],
1556 'layout6' => [
1557 'title' => esc_html__( 'Grid Hover 2', 'the-post-grid' ),
1558 'layout' => 'grid_hover',
1559 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-2/',
1560 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid4.png' ),
1561 ],
1562 'layout7' => [
1563 'title' => esc_html__( 'Grid Hover 3', 'the-post-grid' ),
1564 'layout' => 'grid_hover',
1565 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-3/',
1566 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid5.png' ),
1567 ],
1568 'layout2' => [
1569 'title' => esc_html__( 'List Layout 1', 'the-post-grid' ),
1570 'layout' => 'list',
1571 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/list-layout-1/',
1572 'img' => rtTPG()->get_assets_uri( 'images/layouts/list1.png' ),
1573 ],
1574 'layout3' => [
1575 'title' => esc_html__( 'List Layout 2', 'the-post-grid' ),
1576 'layout' => 'list',
1577 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/list-layout-rounded-image/',
1578 'img' => rtTPG()->get_assets_uri( 'images/layouts/list2.png' ),
1579 ],
1580 'isotope1' => [
1581 'title' => esc_html__( 'Isotope Layout 1', 'the-post-grid' ),
1582 'layout' => 'isotope',
1583 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/layout-4-filter/',
1584 'img' => rtTPG()->get_assets_uri( 'images/layouts/isotope1.png' ),
1585 ],
1586 ];
1587
1588 return apply_filters( 'tpg_layouts', $layouts );
1589 }
1590
1591 public static function rtTPGItemFields() {
1592 $items = [
1593 'heading' => esc_html__( 'ShortCode Heading', 'the-post-grid' ),
1594 'title' => esc_html__( 'Title', 'the-post-grid' ),
1595 'excerpt' => esc_html__( 'Excerpt', 'the-post-grid' ),
1596 'read_more' => esc_html__( 'Read More', 'the-post-grid' ),
1597 'post_date' => esc_html__( 'Post Date', 'the-post-grid' ),
1598 'author' => esc_html__( 'Author', 'the-post-grid' ),
1599 'categories' => esc_html__( 'Categories', 'the-post-grid' ),
1600 'tags' => esc_html__( 'Tags', 'the-post-grid' ),
1601 'comment_count' => esc_html__( 'Comment count', 'the-post-grid' ),
1602 ];
1603
1604 return apply_filters( 'tpg_field_selection_items', $items );
1605 }
1606
1607 public static function postLoadingType() {
1608 return apply_filters(
1609 'rttpg_pagination_type',
1610 [
1611 'pagination' => esc_html__( 'Pagination', 'the-post-grid' ),
1612 ]
1613 );
1614 }
1615
1616 public static function scGridOpt() {
1617 return [
1618 'even' => esc_html__( 'Even', 'the-post-grid' ),
1619 'masonry' => esc_html__( 'Masonry', 'the-post-grid' ),
1620 ];
1621 }
1622
1623 public static function extraStyle() {
1624 return apply_filters(
1625 'tpg_extra_style',
1626 [
1627 'title' => esc_html__( 'Title', 'the-post-grid' ),
1628 'title_hover' => esc_html__( 'Title hover', 'the-post-grid' ),
1629 'excerpt' => esc_html__( 'Excerpt', 'the-post-grid' ),
1630 'meta_data' => esc_html__( 'Meta Data', 'the-post-grid' ),
1631 ]
1632 );
1633 }
1634
1635 public static function scFontSize() {
1636 $num = [];
1637 for ( $i = 10; $i <= 50; $i ++ ) {
1638 $num[ $i ] = $i . 'px';
1639 }
1640
1641 return $num;
1642 }
1643
1644 public static function scAlignment() {
1645 return [
1646 'left' => esc_html__( 'Left', 'the-post-grid' ),
1647 'right' => esc_html__( 'Right', 'the-post-grid' ),
1648 'center' => esc_html__( 'Center', 'the-post-grid' ),
1649 'justify' => esc_html__( 'Justify', 'the-post-grid' ),
1650 ];
1651 }
1652
1653 public static function scReadMoreButtonPositionList() {
1654 return [
1655 'left' => esc_html__( 'Left', 'the-post-grid' ),
1656 'right' => esc_html__( 'Right', 'the-post-grid' ),
1657 'center' => esc_html__( 'Center', 'the-post-grid' ),
1658 ];
1659 }
1660
1661
1662 public static function scTextWeight() {
1663 return [
1664 'normal' => esc_html__( 'Normal', 'the-post-grid' ),
1665 'bold' => esc_html__( 'Bold', 'the-post-grid' ),
1666 'bolder' => esc_html__( 'Bolder', 'the-post-grid' ),
1667 'lighter' => esc_html__( 'Lighter', 'the-post-grid' ),
1668 'inherit' => esc_html__( 'Inherit', 'the-post-grid' ),
1669 'initial' => esc_html__( 'Initial', 'the-post-grid' ),
1670 'unset' => esc_html__( 'Unset', 'the-post-grid' ),
1671 100 => esc_html__( '100', 'the-post-grid' ),
1672 200 => esc_html__( '200', 'the-post-grid' ),
1673 300 => esc_html__( '300', 'the-post-grid' ),
1674 400 => esc_html__( '400', 'the-post-grid' ),
1675 500 => esc_html__( '500', 'the-post-grid' ),
1676 600 => esc_html__( '600', 'the-post-grid' ),
1677 700 => esc_html__( '700', 'the-post-grid' ),
1678 800 => esc_html__( '800', 'the-post-grid' ),
1679 900 => esc_html__( '900', 'the-post-grid' ),
1680 ];
1681 }
1682
1683 public static function imageCropType() {
1684 return [
1685 'soft' => esc_html__( 'Soft Crop', 'the-post-grid' ),
1686 'hard' => esc_html__( 'Hard Crop', 'the-post-grid' ),
1687 ];
1688 }
1689
1690 public static function rt_filter_type() {
1691 return [
1692 'dropdown' => esc_html__( 'Dropdown', 'the-post-grid' ),
1693 'button' => esc_html__( 'Button', 'the-post-grid' ),
1694 ];
1695 }
1696
1697 public static function get_pro_feature_list() {
1698 return '<ol>
1699 <li>Fully responsive and mobile friendly.</li>
1700 <li>62 Different Layouts</li>
1701 <li>45 Elementor Layouts</li>
1702 <li>Creative Slider layouts</li>
1703 <li>Archive page builder for Elementor</li>
1704 <li>Even and Masonry Grid.</li>
1705 <li>WooCommerce supported.</li>
1706 <li>EDD supported for shortcode.</li>
1707 <li>Custom Post Type Supported</li>
1708 <li>Display posts by any Taxonomy like category(s), tag(s), author(s), keyword(s)</li>
1709 <li>Order by Id, Title, Created date, Modified date and Menu order.</li>
1710 <li>Display image size (thumbnail, medium, large, full)</li>
1711 <li>Ajax front-end filter by category(s), tag(s), author(s), keyword(s)</li>
1712 <li>Isotope filter for any taxonomy ie. categories, tags...</li>
1713 <li>Query Post with Relation.</li>
1714 <li>Fields Selection.</li>
1715 <li>All Text and Color control.</li>
1716 <li>Meta Position Control.</li>
1717 <li>Category Position Control.</li>
1718 <li>Content Wrapper Style Control.</li>
1719 <li>Enable/Disable Pagination.</li>
1720 <li>AJAX Pagination (Load more and Load on Scrolling)</li>
1721 <li>Advanced Custom Field support</li>
1722 <li>Post View Count</li>
1723 </ol>
1724 <a href="' . esc_url( rtTpg()->proLink() ) . '" class="rt-admin-btn" target="_blank">' . esc_html__( 'Get Pro Version', 'the-post-grid' ) . '</a>';
1725 }
1726 }
1727