PluginProbe ʕ •ᴥ•ʔ
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid / 7.0.1
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid v7.0.1
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
1714 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 ];
335
336 return $common_settings;
337 }
338
339 public static function rtTPGLicenceField() {
340 $settings = get_option( rtTPG()->options['settings'] );
341 $status = ! empty( $settings['license_status'] ) && $settings['license_status'] === 'valid' ? true : false;
342 $license_status = ! empty( $settings['license_key'] ) ? sprintf(
343 "<span class='license-status'>%s</span>",
344 $status
345 ? "<input type='submit' class='button-secondary rt-licensing-btn danger' name='license_deactivate' value='" . esc_html__( 'Deactivate License', 'the-post-grid' ) . "'/>"
346 : "<input type='submit' class='button-secondary rt-licensing-btn button-primary' name='license_activate' value='" . esc_html__( 'Activate License', 'the-post-grid' ) . "'/>"
347 ) : ' ';
348
349 return [
350 'license_key' => [
351 'type' => 'text',
352 'name' => 'license_key',
353 'attr' => 'style="min-width:300px;"',
354 'label' => esc_html__( 'Enter your license key', 'the-post-grid' ),
355 'description_adv' => Fns::htmlKses( $license_status, 'advanced' ),
356 'id' => 'license_key',
357 'value' => isset( $settings['license_key'] ) ? $settings['license_key'] : '',
358 ],
359 ];
360 }
361
362 public static function rtTPGSettingsSocialShareFields() {
363 $settings = get_option( rtTPG()->options['settings'] );
364
365 return [
366 'social_share_items' => [
367 'type' => 'checkbox',
368 'name' => 'social_share_items',
369 'label' => esc_html__( 'Social share items', 'the-post-grid' ),
370 'id' => 'social_share_items',
371 'holderClass' => 'pro-field',
372 'alignment' => 'vertical',
373 'multiple' => true,
374 'options' => self::socialShareItemList(),
375 'value' => isset( $settings['social_share_items'] ) ? $settings['social_share_items'] : [],
376 ],
377 ];
378 }
379
380 public static function socialShareItemList() {
381 return [
382 'facebook' => esc_html__( 'Facebook', 'the-post-grid' ),
383 'twitter' => esc_html__( 'Twitter', 'the-post-grid' ),
384 'linkedin' => esc_html__( 'LinkedIn', 'the-post-grid' ),
385 'pinterest' => esc_html__( 'Pinterest', 'the-post-grid' ),
386 'reddit' => esc_html__( 'Reddit', 'the-post-grid' ),
387 'email' => esc_html__( 'Email', 'the-post-grid' ),
388 ];
389 }
390
391 public static function templateOverrideItemList() {
392 return [
393 'category-archive' => esc_html__( 'Category archive', 'the-post-grid' ),
394 'tag-archive' => esc_html__( 'Tag archive', 'the-post-grid' ),
395 'author-archive' => esc_html__( 'Author archive', 'the-post-grid' ),
396 'search' => esc_html__( 'Search page', 'the-post-grid' ),
397 ];
398 }
399
400 public static function rtTPGCommonFilterFields() {
401 return [
402 'post__in' => [
403 'name' => 'post__in',
404 'label' => esc_html__( 'Include only', 'the-post-grid' ),
405 'type' => 'text',
406 'class' => 'full',
407 'description' => esc_html__( 'List of post IDs to show (comma-separated values, for example: 1,2,3)', 'the-post-grid' ),
408 ],
409 'post__not_in' => [
410 'name' => 'post__not_in',
411 'label' => esc_html__( 'Exclude', 'the-post-grid' ),
412 'type' => 'text',
413 'class' => 'full',
414 'description' => esc_html__( 'List of post IDs to hide (comma-separated values, for example: 1,2,3)', 'the-post-grid' ),
415 ],
416 'limit' => [
417 'name' => 'limit',
418 'label' => esc_html__( 'Limit', 'the-post-grid' ),
419 'type' => 'number',
420 'class' => 'full',
421 'description' => esc_html__( 'The number of posts to show. Set empty to show all found posts.', 'the-post-grid' ),
422 ],
423 'offset' => [
424 'name' => 'offset',
425 'label' => esc_html__( 'Offset', 'the-post-grid' ),
426 'type' => 'number',
427 'class' => 'full',
428 'description' => esc_html__( 'The number of posts to skip from start', 'the-post-grid' ),
429 ],
430 ];
431 }
432
433 public static function rtTPGPostType() {
434 return [
435 'tpg_post_type' => [
436 'label' => esc_html__( 'Post Type', 'the-post-grid' ),
437 'type' => 'select',
438 'id' => 'rt-sc-post-type',
439 'class' => '-rt-select2',
440 'options' => self::rtPostTypes(),
441 ],
442 ];
443 }
444
445 public static function rtTPAdvanceFilters() {
446 $fields = apply_filters(
447 'rt_tpg_advanced_filters',
448 [
449 'tpg_taxonomy' => esc_html__( 'Taxonomy', 'the-post-grid' ),
450 'order' => esc_html__( 'Order', 'the-post-grid' ),
451 'author' => esc_html__( 'Author', 'the-post-grid' ),
452 'tpg_post_status' => esc_html__( 'Status', 'the-post-grid' ),
453 's' => esc_html__( 'Search', 'the-post-grid' ),
454 ]
455 );
456
457 return [
458 'post_filter' => [
459 'type' => 'checkboxFilter',
460 'name' => 'post_filter',
461 'label' => esc_html__( 'Advanced Filters', 'the-post-grid' ),
462 'alignment' => 'vertical',
463 'multiple' => true,
464 'default' => [ 'tpg_taxonomy', 'order' ],
465 'options' => $fields,
466 ],
467 ];
468 }
469
470 public static function rtTPGPostStatus() {
471 return [
472 'publish' => esc_html__( 'Publish', 'the-post-grid' ),
473 'pending' => esc_html__( 'Pending', 'the-post-grid' ),
474 'draft' => esc_html__( 'Draft', 'the-post-grid' ),
475 'auto-draft' => esc_html__( 'Auto draft', 'the-post-grid' ),
476 'future' => esc_html__( 'Future', 'the-post-grid' ),
477 'private' => esc_html__( 'Private', 'the-post-grid' ),
478 'inherit' => esc_html__( 'Inherit', 'the-post-grid' ),
479 'trash' => esc_html__( 'Trash', 'the-post-grid' ),
480 ];
481 }
482
483 public static function owl_property() {
484 return [
485 'auto_play' => esc_html__( 'Auto Play', 'the-post-grid' ),
486 'loop' => esc_html__( 'Loop', 'the-post-grid' ),
487 'nav_button' => esc_html__( 'Nav Button', 'the-post-grid' ),
488 'pagination' => esc_html__( 'Pagination', 'the-post-grid' ),
489 'stop_hover' => esc_html__( 'Stop Hover', 'the-post-grid' ),
490 'auto_height' => esc_html__( 'Auto Height', 'the-post-grid' ),
491 'lazy_load' => esc_html__( 'Lazy Load', 'the-post-grid' ),
492 'rtl' => esc_html__( 'Right to left (RTL)', 'the-post-grid' ),
493 ];
494 }
495
496 public static function rtTPGLayoutSettingFields() {
497 $options = [
498 'layout_type' => [
499 'type' => 'radio-image',
500 'label' => esc_html__( 'Layout Type', 'the-post-grid' ),
501 'id' => 'rt-tpg-sc-layout-type',
502 'options' => self::rtTPGLayoutType(),
503 ],
504 'layout' => [
505 'type' => 'radio-image',
506 'label' => esc_html__( 'Layout', 'the-post-grid' ),
507 'id' => 'rt-tpg-sc-layout',
508 'class' => 'rt-select2',
509 'options' => self::rtTPGLayouts(),
510 ],
511 'tgp_filter' => [
512 'type' => 'checkbox',
513 'label' => esc_html__( 'Filter', 'the-post-grid' ),
514 'holderClass' => 'sc-tpg-grid-filter tpg-hidden pro-field',
515 'multiple' => true,
516 'alignment' => 'vertical',
517 'options' => self::tgp_filter_list(),
518 ],
519 'tgp_filter_taxonomy' => [
520 'type' => 'select',
521 'label' => esc_html__( 'Taxonomy Filter', 'the-post-grid' ),
522 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
523 'class' => 'rt-select2',
524 'options' => Fns::rt_get_taxonomy_for_filter(),
525 ],
526 'tgp_filter_taxonomy_hierarchical' => [
527 'type' => 'switch',
528 'label' => esc_html__( 'Display as sub category', 'the-post-grid' ),
529 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
530 'option' => 'Active',
531 ],
532 'tgp_filter_type' => [
533 'type' => 'select',
534 'label' => esc_html__( 'Taxonomy filter type', 'the-post-grid' ),
535 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
536 'class' => 'rt-select2',
537 'options' => self::rt_filter_type(),
538 ],
539 'tgp_default_filter' => [
540 'type' => 'select',
541 'label' => esc_html__( 'Selected filter term (Selected item)', 'the-post-grid' ),
542 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
543 'class' => 'rt-select2',
544 'attr' => "data-selected='" . get_post_meta( get_the_ID(), 'tgp_default_filter', true ) . "'",
545 'options' => [ '' => esc_html__( 'Show All', 'the-post-grid' ) ],
546 ],
547 'tpg_hide_all_button' => [
548 'type' => 'switch',
549 'label' => esc_html__( 'Hide All (Show all) button', 'the-post-grid' ),
550 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
551 'option' => 'Hide',
552 ],
553 'tpg_post_count' => [
554 'type' => 'switch',
555 'label' => esc_html__( 'Show post count', 'the-post-grid' ),
556 'holderClass' => 'sc-tpg-grid-filter sc-tpg-filter tpg-hidden',
557 'option' => 'Enable',
558 ],
559 'isotope_filter' => [
560 'type' => 'select',
561 'label' => esc_html__( 'Isotope Filter', 'the-post-grid' ),
562 'holderClass' => 'isotope-item sc-isotope-filter tpg-hidden',
563 'id' => 'rt-tpg-sc-isotope-filter',
564 'class' => 'rt-select2',
565 'options' => Fns::rt_get_taxonomy_for_filter(),
566 ],
567 'isotope_default_filter' => [
568 'type' => 'select',
569 'label' => esc_html__( 'Isotope filter (Selected item)', 'the-post-grid' ),
570 'holderClass' => 'isotope-item sc-isotope-default-filter tpg-hidden pro-field',
571 'id' => 'rt-tpg-sc-isotope-default-filter',
572 'class' => 'rt-select2',
573 'attr' => "data-selected='" . get_post_meta(
574 get_the_ID(),
575 'isotope_default_filter',
576 true
577 ) . "'",
578 'options' => [ '' => esc_html__( 'Show all', 'the-post-grid' ) ],
579 ],
580 'tpg_show_all_text' => [
581 'type' => 'text',
582 'holderClass' => 'isotope-item sc-isotope-filter tpg-hidden',
583 'label' => esc_html__( 'Show all text', 'the-post-grid' ),
584 'default' => esc_html__( 'Show all', 'the-post-grid' ),
585 ],
586 'isotope_filter_dropdown' => [
587 'type' => 'switch',
588 'label' => esc_html__( 'Isotope dropdown filter', 'the-post-grid' ),
589 'holderClass' => 'isotope-item sc-isotope-filter sc-isotope-filter-dropdown tpg-hidden pro-field',
590 ],
591 'isotope_filter_show_all' => [
592 'type' => 'switch',
593 'name' => 'isotope_filter_show_all',
594 'label' => esc_html__( 'Isotope filter (Show All item)', 'the-post-grid' ),
595 'holderClass' => 'isotope-item sc-isotope-filter-show-all tpg-hidden pro-field',
596 'id' => 'rt-tpg-sc-isotope-filter-show-all',
597 ],
598 'isotope_filter_count' => [
599 'type' => 'switch',
600 'label' => esc_html__( 'Isotope filter count number', 'the-post-grid' ),
601 'holderClass' => 'isotope-item sc-isotope-filter tpg-hidden pro-field',
602 'option' => 'Enable',
603 ],
604 'isotope_filter_url' => [
605 'type' => 'switch',
606 'label' => esc_html__( 'Isotope filter URL', 'the-post-grid' ),
607 'holderClass' => 'isotope-item sc-isotope-filter tpg-hidden pro-field',
608 ],
609 'isotope_search_filter' => [
610 'type' => 'switch',
611 'label' => esc_html__( 'Isotope search filter', 'the-post-grid' ),
612 'holderClass' => 'isotope-item sc-isotope-search-filter tpg-hidden pro-field',
613 'id' => 'rt-tpg-sc-isotope-search-filter',
614 'option' => 'Enable',
615 ],
616 'carousel_property' => [
617 'type' => 'checkbox',
618 'label' => esc_html__( 'Carousel property', 'the-post-grid' ),
619 'multiple' => true,
620 'alignment' => 'vertical',
621 'holderClass' => 'carousel-item carousel-property tpg-hidden',
622 'id' => 'carousel-property',
623 'default' => [ 'pagination' ],
624 'options' => self::owl_property(),
625 ],
626 'tpg_carousel_speed' => [
627 'label' => esc_html__( 'Speed', 'the-post-grid' ),
628 'holderClass' => 'tpg-hidden carousel-item',
629 'type' => 'number',
630 'default' => 250,
631 'description' => esc_html__( 'Auto play Speed in milliseconds', 'the-post-grid' ),
632 ],
633 'tpg_carousel_autoplay_timeout' => [
634 'label' => esc_html__( 'Autoplay timeout', 'the-post-grid' ),
635 'holderClass' => 'tpg-hidden carousel-item tpg-carousel-auto-play-timeout',
636 'type' => 'number',
637 'default' => 5000,
638 'description' => esc_html__( 'Autoplay interval timeout', 'the-post-grid' ),
639 ],
640 ];
641
642 return apply_filters( 'rt_tpg_layout_options', $options );
643 }
644
645 public static function responsiveSettingsColumn() {
646 $options = [
647 'column' => [
648 'type' => 'select',
649 'label' => esc_html__( 'Desktop', 'the-post-grid' ),
650 'class' => 'rt-select2',
651 'holderClass' => 'offset-column-wrap rt-3-column',
652 'default' => 3,
653 'options' => self::scColumns(),
654 'description' => esc_html__( 'Desktop > 991px', 'the-post-grid' ),
655 ],
656 'tpg_tab_column' => [
657 'type' => 'select',
658 'label' => esc_html__( 'Tab', 'the-post-grid' ),
659 'class' => 'rt-select2',
660 'holderClass' => 'offset-column-wrap rt-3-column',
661 'default' => 2,
662 'options' => self::scColumns(),
663 'description' => esc_html__( 'Tab < 992px', 'the-post-grid' ),
664 ],
665 'tpg_mobile_column' => [
666 'type' => 'select',
667 'label' => esc_html__( 'Mobile', 'the-post-grid' ),
668 'class' => 'rt-select2',
669 'holderClass' => 'offset-column-wrap rt-3-column',
670 'default' => 1,
671 'options' => self::scColumns(),
672 'description' => esc_html__( 'Mobile < 768px', 'the-post-grid' ),
673 ],
674 ];
675
676 return apply_filters( 'rt_tpg_layout_column_options', $options );
677 }
678
679 public static function layoutMiscSettings() {
680 $options = [
681 'pagination' => [
682 'type' => 'switch',
683 'label' => esc_html__( 'Pagination', 'the-post-grid' ),
684 'holderClass' => 'pagination',
685 'id' => 'rt-tpg-pagination',
686 'description' => esc_html__( 'Pagination not allow in Grid Hover layout', 'the-post-grid' ),
687 'option' => 'Enable',
688 'default' => 1,
689 ],
690 'posts_per_page' => [
691 'type' => 'number',
692 'label' => esc_html__( 'Display per page', 'the-post-grid' ),
693 'holderClass' => 'pagination-item posts-per-page tpg-hidden',
694 'default' => 9,
695 'description' => esc_html__( 'If value of Limit setting is not blank (empty), this value should be smaller than Limit value.', 'the-post-grid' ),
696 ],
697 'posts_loading_type' => [
698 'type' => 'radio',
699 'label' => esc_html__( 'Pagination Type', 'the-post-grid' ),
700 'holderClass' => 'pagination-item posts-loading-type tpg-hidden pro-field',
701 'alignment' => 'vertical',
702 'default' => 'pagination',
703 'options' => self::postLoadingType(),
704 ],
705
706 'load_more_text' => [
707 'type' => 'text',
708 'name' => 'load_more_text',
709 'label' => esc_html__( 'Load More Text', 'the-post-grid' ),
710 'holderClass' => 'pagination-load-more-label tpg-hidden pro-field',
711 'id' => 'template_class',
712 'value' => isset( $settings['load_more_text'] ) ? $settings['load_more_text'] : '',
713 ],
714
715 'link_to_detail_page' => [
716 'type' => 'switch',
717 'label' => esc_html__( 'Link To Detail Page', 'the-post-grid' ),
718 'alignment' => 'vertical',
719 'default' => true,
720 ],
721 'detail_page_link_type' => [
722 'type' => 'radio',
723 'label' => esc_html__( 'Detail page link type', 'the-post-grid' ),
724 'holderClass' => 'detail-page-link-type tpg-hidden pro-field',
725 'alignment' => 'vertical',
726 'default' => 'new_page',
727 'options' => [
728 'new_page' => esc_html__( 'New Page', 'the-post-grid' ),
729 'popup' => esc_html__( 'PopUp', 'the-post-grid' ),
730 ],
731 ],
732 'popup_type' => [
733 'type' => 'radio',
734 'label' => esc_html__( 'PopUp Type', 'the-post-grid' ),
735 'holderClass' => 'popup-type tpg-hidden pro-field',
736 'alignment' => 'vertical',
737 'default' => 'single',
738 'options' => [
739 'single' => esc_html__( 'Single PopUp', 'the-post-grid' ),
740 'multi' => esc_html__( 'Multi PopUp', 'the-post-grid' ),
741 ],
742 ],
743 'link_target' => [
744 'type' => 'radio',
745 'label' => esc_html__( 'Link Target', 'the-post-grid' ),
746 'holderClass' => 'tpg-link-target tpg-hidden',
747 'alignment' => 'vertical',
748 'options' => [
749 '' => esc_html__( 'Same Window', 'the-post-grid' ),
750 '_blank' => esc_html__( 'New Window', 'the-post-grid' ),
751 ],
752 ],
753 ];
754
755 return apply_filters( 'rt_tpg_layout_misc_options', $options );
756 }
757
758 public static function stickySettings() {
759 $options = [
760 'ignore_sticky_posts' => [
761 'type' => 'switch',
762 'label' => esc_html__( 'Show sticky posts at the top', 'the-post-grid' ),
763 'holderClass' => 'pro-field',
764 'alignment' => 'vertical',
765 'default' => false,
766 ],
767 ];
768
769 return $options;
770 }
771
772 public static function scMarginOpt() {
773 return [
774 'default' => esc_html__( 'Bootstrap default', 'the-post-grid' ),
775 'no' => esc_html__( 'No Margin', 'the-post-grid' ),
776 ];
777 }
778
779 function scGridType() {
780 return [
781 'even' => esc_html__( 'Even Grid', 'the-post-grid' ),
782 'masonry' => esc_html__( 'Masonry', 'the-post-grid' ),
783 ];
784 }
785
786 public static function getTitleTags() {
787 return [
788 'h2' => esc_html__( 'H2', 'the-post-grid' ),
789 'h3' => esc_html__( 'H3', 'the-post-grid' ),
790 'h4' => esc_html__( 'H4', 'the-post-grid' ),
791 ];
792 }
793
794 public static function getHeadingTags() {
795 return [
796 'h1' => esc_html__( 'H1', 'the-post-grid' ),
797 'h2' => esc_html__( 'H2', 'the-post-grid' ),
798 'h3' => esc_html__( 'H3', 'the-post-grid' ),
799 'h4' => esc_html__( 'H4', 'the-post-grid' ),
800 'h5' => esc_html__( 'H5', 'the-post-grid' ),
801 'h6' => esc_html__( 'H6', 'the-post-grid' ),
802 ];
803 }
804
805 public static function rtTpgSettingsDetailFieldSelection() {
806 $settings = get_option( rtTPG()->options['settings'] );
807
808 $fields = [
809 'popup_fields' => [
810 'type' => 'checkbox',
811 'label' => esc_html__( 'Field Selection', 'the-post-grid' ),
812 'id' => 'popup-fields',
813 'holderClass' => 'pro-field',
814 'alignment' => 'vertical',
815 'multiple' => true,
816 'options' => self::detailAvailableFields(),
817 'default' => array_keys( self::detailAvailableFields() ),
818 'value' => isset( $settings['popup_fields'] ) ? $settings['popup_fields'] : [],
819 ],
820 ];
821 $cf = Fns::is_acf();
822 if ( $cf ) {
823 $plist = self::getCFPluginList();
824 $pName = ! empty( $plist[ $cf ] ) ? $plist[ $cf ] : ' - ';
825 $fields['cf_group'] = [
826 'type' => 'checkbox',
827 'name' => 'cf_group',
828 'holderClass' => 'tpg-hidden cfs-fields cf-group pro-field',
829 'label' => 'Custom Field group ' . " ({$pName})",
830 'multiple' => true,
831 'alignment' => 'vertical',
832 'id' => 'cf_group',
833 'options' => Fns::get_groups_by_post_type( 'all' ),
834 'value' => isset( $settings['cf_group'] ) ? $settings['cf_group'] : [],
835 ];
836 $fields['cf_hide_empty_value'] = [
837 'type' => 'checkbox',
838 'name' => 'cf_hide_empty_value',
839 'holderClass' => 'tpg-hidden cfs-fields pro-field',
840 'label' => esc_html__( 'Hide field with empty value', 'the-post-grid' ),
841 'value' => ! empty( $settings['cf_hide_empty_value'] ) ? 1 : 0,
842 ];
843 $fields['cf_show_only_value'] = [
844 'type' => 'checkbox',
845 'name' => 'cf_show_only_value',
846 'holderClass' => 'tpg-hidden cfs-fields pro-field',
847 'label' => esc_html__( 'Show only value of field', 'the-post-grid' ),
848 'description' => esc_html__( 'By default both name & value of field is shown', 'the-post-grid' ),
849 'value' => ! empty( $settings['cf_show_only_value'] ) ? 1 : 0,
850 ];
851 $fields['cf_hide_group_title'] = [
852 'type' => 'checkbox',
853 'name' => 'cf_hide_group_title',
854 'holderClass' => 'tpg-hidden cfs-fields pro-field',
855 'label' => esc_html__( 'Hide group title', 'the-post-grid' ),
856 'value' => ! empty( $settings['cf_hide_group_title'] ) ? 1 : 0,
857 ];
858 }
859
860 return $fields;
861 }
862
863 public static function detailAvailableFields() {
864 $fields = self::rtTPGItemFields();
865 $inserted = [
866 'content' => esc_html__( 'Content', 'the-post-grid' ),
867 'feature_img' => esc_html__( 'Feature Image', 'the-post-grid' ),
868 ];
869
870 unset( $fields['heading'] );
871 unset( $fields['excerpt'] );
872 unset( $fields['read_more'] );
873 unset( $fields['comment_count'] );
874
875 $offset = array_search( 'title', array_keys( $fields ) ) + 1;
876 $newFields = array_slice( $fields, 0, $offset, true ) + $inserted + array_slice(
877 $fields,
878 $offset,
879 null,
880 true
881 );
882 $newFields['social_share'] = 'Social Share';
883
884 return $newFields;
885 }
886
887 public static function rtTPGSCHeadingSettings() {
888 $fields = [
889 'tpg_heading_tag' => [
890 'type' => 'select',
891 'name' => 'tpg_heading_tag',
892 'label' => esc_html__( 'Tag', 'the-post-grid' ),
893 'class' => 'rt-select2',
894 'id' => 'heading-tag',
895 'options' => self::getHeadingTags(),
896 'default' => 'h2',
897 ],
898 'tpg_heading_style' => [
899 'type' => 'select',
900 'class' => 'rt-select2',
901 'label' => esc_html__( 'Style', 'the-post-grid' ),
902 'blank' => esc_html__( 'Default', 'the-post-grid' ),
903 'options' => [
904 'style1' => esc_html__( 'Style 1', 'the-post-grid' ),
905 'style2' => esc_html__( 'Style 2', 'the-post-grid' ),
906 'style3' => esc_html__( 'Style 3', 'the-post-grid' ),
907 ],
908 ],
909 'tpg_heading_alignment' => [
910 'type' => 'select',
911 'class' => 'rt-select2',
912 'label' => esc_html__( 'Alignment', 'the-post-grid' ),
913 'blank' => esc_html__( 'Default', 'the-post-grid' ),
914 'options' => [
915 'left' => esc_html__( 'Left', 'the-post-grid' ),
916 'right' => esc_html__( 'Right', 'the-post-grid' ),
917 'center' => esc_html__( 'Center', 'the-post-grid' ),
918 ],
919 ],
920 'tpg_heading_link' => [
921 'type' => 'url',
922 'label' => esc_html__( 'Link', 'the-post-grid' ),
923 ],
924 ];
925
926 return $fields;
927 }
928
929 public static function rtTPGSCCategorySettings() {
930 $fields = [
931 'tpg_category_position' => [
932 'type' => 'select',
933 'class' => 'rt-select2',
934 'holderClass' => 'pro-field',
935 'label' => esc_html__( 'Position', 'the-post-grid' ),
936 'blank' => esc_html__( 'Default', 'the-post-grid' ),
937 'options' => [
938 'above_title' => esc_html__( 'Above Title', 'the-post-grid' ),
939 'top_left' => esc_html__( 'Over image (Top Left)', 'the-post-grid' ),
940 'top_right' => esc_html__( 'Over image (Top Right)', 'the-post-grid' ),
941 'bottom_left' => esc_html__( 'Over image (Bottom Left)', 'the-post-grid' ),
942 'bottom_right' => esc_html__( 'Over image (Bottom Right)', 'the-post-grid' ),
943 'image_center' => esc_html__( 'Over image (Center)', 'the-post-grid' ),
944 ],
945 ],
946 'tpg_category_style' => [
947 'type' => 'select',
948 'class' => 'rt-select2',
949 'holderClass' => 'pro-field',
950 'label' => esc_html__( 'Style', 'the-post-grid' ),
951 'blank' => esc_html__( 'Default', 'the-post-grid' ),
952 'options' => [
953 'style1' => esc_html__( 'Style 1', 'the-post-grid' ),
954 'style2' => esc_html__( 'Style 2', 'the-post-grid' ),
955 'style3' => esc_html__( 'Style 3', 'the-post-grid' ),
956 ],
957 ],
958 'tpg_category_icon' => [
959 'type' => 'switch',
960 'label' => esc_html__( 'Icon', 'the-post-grid' ),
961 'default' => true,
962 ],
963 ];
964
965 return $fields;
966 }
967
968 public static function rtTPGSCTitleSettings() {
969 $fields = [
970 'tpg_title_position' => [
971 'type' => 'select',
972 'label' => esc_html__( 'Title Position (Above or Below image)', 'the-post-grid' ),
973 'class' => 'rt-select2 ',
974 'holderClass' => 'pro-field',
975 'blank' => esc_html__( 'Default', 'the-post-grid' ),
976 'options' => [
977 'above' => esc_html__( 'Above image', 'the-post-grid' ),
978 'below' => esc_html__( 'Below image', 'the-post-grid' ),
979 ],
980 'description' => __(
981 "<span style='color:#ff0000'>Only Layout 1, Layout 12, Layout 14, Isotope1, Isotope8, Isotope10, Carousel Layout 1, Carousel Layout 8, Carousel Layout 10</span>",
982 'the-post-grid'
983 ),
984 ],
985 'title_tag' => [
986 'type' => 'select',
987 'name' => 'title_tag',
988 'label' => esc_html__( 'Title tag', 'the-post-grid' ),
989 'class' => 'rt-select2',
990 'id' => 'title-tag',
991 'options' => self::getTitleTags(),
992 'default' => 'h3',
993 ],
994 'tpg_title_limit' => [
995 'type' => 'number',
996 'label' => esc_html__( 'Title limit', 'the-post-grid' ),
997 'description' => esc_html__( 'Title limit only integer number is allowed, Leave it blank for full title.', 'the-post-grid' ),
998 ],
999 'tpg_title_limit_type' => [
1000 'type' => 'radio',
1001 'label' => esc_html__( 'Title limit type', 'the-post-grid' ),
1002 'alignment' => 'vertical',
1003 'default' => 'character',
1004 'options' => self::get_limit_type(),
1005 ],
1006 ];
1007
1008 return $fields;
1009 }
1010
1011 public static function rtTPGSCMetaSettings() {
1012 $fields = [
1013 'tpg_meta_position' => [
1014 'type' => 'select',
1015 'label' => esc_html__( 'Position', 'the-post-grid' ),
1016 'class' => 'rt-select2 ',
1017 'holderClass' => 'pro-field',
1018 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1019 'options' => [
1020 'above_title' => esc_html__( 'Above Title', 'the-post-grid' ),
1021 'above_excerpt' => esc_html__( 'Above excerpt', 'the-post-grid' ),
1022 'below_excerpt' => esc_html__( 'Below excerpt', 'the-post-grid' ),
1023 ],
1024 ],
1025 'tpg_meta_icon' => [
1026 'type' => 'switch',
1027 'label' => esc_html__( 'Icon', 'the-post-grid' ),
1028 'default' => true,
1029 ],
1030 'tpg_meta_separator' => [
1031 'type' => 'select',
1032 'class' => 'rt-select2',
1033 'label' => esc_html__( 'Separator', 'the-post-grid' ),
1034 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1035 'options' => [
1036 'dot' => esc_html__( 'Dot ( . )', 'the-post-grid' ),
1037 's_slash' => esc_html__( 'Single Slash ( / )', 'the-post-grid' ),
1038 'd_slash' => esc_html__( 'Double Slash ( // )', 'the-post-grid' ),
1039 'hypen' => esc_html__( 'Hypen ( - )', 'the-post-grid' ),
1040 'v_pipe' => esc_html__( 'Vertical Pipe ( | )', 'the-post-grid' ),
1041 ],
1042 ],
1043 ];
1044
1045 return $fields;
1046 }
1047
1048 public static function rtTPGSCImageSettings() {
1049 $fields = [
1050 'feature_image' => [
1051 'type' => 'switch',
1052 'label' => esc_html__( 'Hide Feature Image', 'the-post-grid' ),
1053 'id' => 'rt-tpg-feature-image',
1054 'default' => false,
1055 ],
1056 'featured_image_size' => [
1057 'type' => 'select',
1058 'label' => esc_html__( 'Feature Image Size', 'the-post-grid' ),
1059 'class' => 'rt-select2',
1060 'holderClass' => 'rt-feature-image-option tpg-hidden',
1061 'options' => Fns::get_image_sizes(),
1062 ],
1063 'custom_image_size' => [
1064 'type' => 'image_size',
1065 'label' => esc_html__( 'Custom Image Size', 'the-post-grid' ),
1066 'holderClass' => 'rt-sc-custom-image-size-holder tpg-hidden',
1067 'multiple' => true,
1068 ],
1069 'media_source' => [
1070 'type' => 'radio',
1071 'label' => esc_html__( 'Media Source', 'the-post-grid' ),
1072 'default' => 'feature_image',
1073 'alignment' => 'vertical',
1074 'holderClass' => 'rt-feature-image-option tpg-hidden',
1075 'options' => self::rtMediaSource(),
1076 ],
1077 'tgp_layout2_image_column' => [
1078 'type' => 'select',
1079 'label' => esc_html__( 'Image column', 'the-post-grid' ),
1080 'class' => 'rt-select2',
1081 'holderClass' => 'holder-layout2-image-column tpg-hidden',
1082 'default' => 4,
1083 'options' => self::scColumns(),
1084 'description' => 'Content column will calculate automatically',
1085 ],
1086 'tpg_image_type' => [
1087 'type' => 'radio',
1088 'label' => esc_html__( 'Type', 'the-post-grid' ),
1089 'alignment' => 'vertical',
1090 'holderClass' => 'rt-feature-image-option tpg-hidden pro-field',
1091 'default' => 'normal',
1092 'options' => self::get_image_types(),
1093 ],
1094 'tpg_image_animation' => [
1095 'type' => 'select',
1096 'label' => esc_html__( 'Hover Animation', 'the-post-grid' ),
1097 'class' => 'rt-select2',
1098 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1099 'options' => [
1100 'img_zoom_in' => esc_html__( 'Zoom in', 'the-post-grid' ),
1101 'img_zoom_out' => esc_html__( 'Zoom out', 'the-post-grid' ),
1102 'img_no_effect' => esc_html__( 'None', 'the-post-grid' ),
1103 ],
1104 ],
1105 'tpg_image_border_radius' => [
1106 'type' => 'number',
1107 'class' => 'small-text',
1108 'holderClass' => 'pro-field',
1109 'label' => esc_html__( 'Border radius', 'the-post-grid' ),
1110 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1111 ],
1112 ];
1113
1114 return apply_filters( 'rt_tpg_sc_image_settings', $fields );
1115 }
1116
1117 public static function rtTPGSCExcerptSettings() {
1118 $fields = [
1119 'excerpt_limit' => [
1120 'type' => 'number',
1121 'label' => esc_html__( 'Excerpt limit', 'the-post-grid' ),
1122 'default' => 15,
1123 'description' => esc_html__( 'Excerpt limit only integer number is allowed, Leave it blank for full excerpt.', 'the-post-grid' ),
1124 ],
1125 'tgp_excerpt_type' => [
1126 'type' => 'radio',
1127 'label' => esc_html__( 'Excerpt Type', 'the-post-grid' ),
1128 'alignment' => 'vertical',
1129 'default' => 'word',
1130 'options' => self::get_limit_type( 'content' ),
1131 ],
1132 'tgp_excerpt_more_text' => [
1133 'type' => 'text',
1134 'label' => esc_html__( 'Excerpt more text', 'the-post-grid' ),
1135 'default' => '...',
1136 ],
1137 ];
1138
1139 return $fields;
1140 }
1141
1142 public static function rtTPGSCButtonSettings() {
1143 $fields = [
1144 'tpg_read_more_button_border_radius' => [
1145 'type' => 'number',
1146 'class' => 'small-text',
1147 'label' => esc_html__( 'Border radius', 'the-post-grid' ),
1148 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1149 ],
1150 'tpg_read_more_button_alignment' => [
1151 'type' => 'select',
1152 'class' => 'rt-select2',
1153 'label' => esc_html__( 'Alignment', 'the-post-grid' ),
1154 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1155 'options' => [
1156 'left' => esc_html__( 'Left', 'the-post-grid' ),
1157 'right' => esc_html__( 'Right', 'the-post-grid' ),
1158 'center' => esc_html__( 'Center', 'the-post-grid' ),
1159 ],
1160 ],
1161 'tgp_read_more_text' => [
1162 'type' => 'text',
1163 'label' => esc_html__( 'Text', 'the-post-grid' ),
1164 ],
1165 ];
1166
1167 return $fields;
1168 }
1169
1170 public static function rtTPGStyleFields() {
1171 $fields = [
1172 'parent_class' => [
1173 'type' => 'text',
1174 'label' => esc_html__( 'Parent class', 'the-post-grid' ),
1175 'class' => 'medium-text',
1176 'description' => esc_html__( 'Parent class for adding custom css', 'the-post-grid' ),
1177 ],
1178 'primary_color' => [
1179 'type' => 'text',
1180 'label' => esc_html__( 'Primary Color', 'the-post-grid' ),
1181 'class' => 'rt-color',
1182 'default' => '#0367bf',
1183 ],
1184 ];
1185
1186 return apply_filters( 'rt_tpg_style_fields', $fields );
1187 }
1188
1189 public static function rtTPGStyleButtonColorFields() {
1190 $fields = [
1191
1192 'button_bg_color' => [
1193 'type' => 'text',
1194 'name' => 'button_bg_color',
1195 'label' => esc_html__( 'Background', 'the-post-grid' ),
1196 'class' => 'rt-color',
1197 ],
1198 'button_hover_bg_color' => [
1199 'type' => 'text',
1200 'name' => 'button_hover_bg_color',
1201 'label' => esc_html__( 'Hover Background', 'the-post-grid' ),
1202 'class' => 'rt-color',
1203 ],
1204 'button_active_bg_color' => [
1205 'type' => 'text',
1206 'label' => esc_html__( 'Active Background (Isotop)', 'the-post-grid' ),
1207 'class' => 'rt-color',
1208 ],
1209 'button_text_bg_color' => [
1210 'type' => 'text',
1211 'label' => esc_html__( 'Text', 'the-post-grid' ),
1212 'class' => 'rt-color',
1213 ],
1214 'button_hover_text_color' => [
1215 'type' => 'text',
1216 'label' => esc_html__( 'Text Hover', 'the-post-grid' ),
1217 'class' => 'rt-color',
1218 ],
1219 ];
1220
1221 return apply_filters( 'rt_tpg_style_button_css_fields', $fields );
1222 }
1223
1224 public static function rtTPGStyleHeading() {
1225 $fields = [
1226 'tpg_heading_bg' => [
1227 'type' => 'text',
1228 'class' => 'rt-color',
1229 'label' => esc_html__( 'Background Color', 'the-post-grid' ),
1230 ],
1231 'tpg_heading_color' => [
1232 'type' => 'text',
1233 'class' => 'rt-color',
1234 'label' => esc_html__( 'Text Color', 'the-post-grid' ),
1235 ],
1236 'tpg_heading_border_color' => [
1237 'type' => 'text',
1238 'class' => 'rt-color',
1239 'label' => esc_html__( 'Border Color', 'the-post-grid' ),
1240 ],
1241 'tpg_heading_border_size' => [
1242 'type' => 'number',
1243 'class' => 'small-text',
1244 'label' => esc_html__( 'Border Size', 'the-post-grid' ),
1245 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1246 ],
1247 'tpg_heading_margin' => [
1248 'type' => 'text',
1249 'class' => 'medium-text tpg-spacing-field',
1250 'label' => esc_html__( 'Margin', 'the-post-grid' ),
1251 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1252 ],
1253 'tpg_heading_padding' => [
1254 'type' => 'text',
1255 'class' => 'medium-text tpg-spacing-field',
1256 'label' => esc_html__( 'Padding', 'the-post-grid' ),
1257 'description' => esc_html__( 'Leave it blank for default, multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1258 ],
1259 ];
1260
1261 return apply_filters( 'tpg_heading_style_fields', $fields );
1262 }
1263
1264 public static function rtTPGStyleFullArea() {
1265 $fields = [
1266 'tpg_full_area_bg' => [
1267 'type' => 'text',
1268 'class' => 'rt-color',
1269 'label' => esc_html__( 'Background', 'the-post-grid' ),
1270 ],
1271 'tpg_full_area_margin' => [
1272 'type' => 'text',
1273 'class' => 'medium-text',
1274 'label' => esc_html__( 'Margin', 'the-post-grid' ),
1275 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1276 ],
1277 'tpg_full_area_padding' => [
1278 'type' => 'text',
1279 'class' => 'medium-text',
1280 'label' => esc_html__( 'Padding', 'the-post-grid' ),
1281 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1282 ],
1283 ];
1284
1285 return apply_filters( 'tpg_box_style_fields', $fields );
1286 }
1287
1288 public static function rtTPGStyleContentWrap() {
1289 $fields = [
1290 'tpg_content_wrap_bg' => [
1291 'type' => 'text',
1292 'class' => 'rt-color',
1293 'label' => esc_html__( 'Background Color', 'the-post-grid' ),
1294 ],
1295 'tpg_content_wrap_shadow' => [
1296 'type' => 'text',
1297 'class' => 'rt-color',
1298 'label' => esc_html__( 'Box Shadow Color', 'the-post-grid' ),
1299 ],
1300 'tpg_content_wrap_border_color' => [
1301 'type' => 'text',
1302 'class' => 'rt-color',
1303 'label' => esc_html__( 'Border Color', 'the-post-grid' ),
1304 ],
1305 'tpg_content_wrap_border' => [
1306 'type' => 'number',
1307 'class' => 'small-text',
1308 'label' => esc_html__( 'Border Width', 'the-post-grid' ),
1309 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1310 ],
1311 'tpg_content_wrap_border_radius' => [
1312 'type' => 'number',
1313 'class' => 'small-text',
1314 'label' => esc_html__( 'Border Radius', 'the-post-grid' ),
1315 ],
1316 'tpg_box_padding' => [
1317 'type' => 'text',
1318 'class' => 'medium-text',
1319 'label' => esc_html__( 'Box Padding', 'the-post-grid' ),
1320 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1321 ],
1322 'tpg_content_padding' => [
1323 'type' => 'text',
1324 'class' => 'medium-text',
1325 'label' => esc_html__( 'Content Padding', 'the-post-grid' ),
1326 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1327 ],
1328 ];
1329
1330 return apply_filters( 'tpg_content_style_fields', $fields );
1331 }
1332
1333 public static function rtTPGStyleCategory() {
1334 $fields = [
1335 'tpg_category_bg' => [
1336 'type' => 'text',
1337 'class' => 'rt-color',
1338 'label' => esc_html__( 'Background Color', 'the-post-grid' ),
1339 ],
1340 'tpg_category_color' => [
1341 'type' => 'text',
1342 'class' => 'rt-color',
1343 'label' => esc_html__( 'Text Color', 'the-post-grid' ),
1344 ],
1345 'tpg_category_border_radius' => [
1346 'type' => 'number',
1347 'class' => 'small-text',
1348 'label' => esc_html__( 'Border Radius', 'the-post-grid' ),
1349 'description' => esc_html__( 'Leave it blank for default', 'the-post-grid' ),
1350 ],
1351 'tpg_category_margin' => [
1352 'type' => 'text',
1353 'class' => 'medium-text tpg-spacing-field',
1354 'label' => esc_html__( 'Margin', 'the-post-grid' ),
1355 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1356 ],
1357 'tpg_category_padding' => [
1358 'type' => 'text',
1359 'class' => 'medium-text tpg-spacing-field',
1360 'label' => esc_html__( 'Padding', 'the-post-grid' ),
1361 'description' => esc_html__( 'Multiple value allowed separated by comma 12,0,5,10', 'the-post-grid' ),
1362 ],
1363 'rt_tpg_category_font_size' => [
1364 'type' => 'select',
1365 'class' => 'rt-select2',
1366 'label' => esc_html__( 'Font Size', 'the-post-grid' ),
1367 'blank' => esc_html__( 'Default', 'the-post-grid' ),
1368 'options' => self::scFontSize(),
1369 ],
1370 ];
1371
1372 return apply_filters( 'tpg_category_style_fields', $fields );
1373 }
1374
1375
1376 public static function itemFields() {
1377
1378 $itemField = self::rtTPGItemFields();
1379 $itemField['tpg_default_value'] = 'Default';
1380
1381 $fields = [
1382 'item_fields' => [
1383 'type' => 'checkbox',
1384 'name' => 'item_fields',
1385 'label' => esc_html__( 'Field selection', 'the-post-grid' ),
1386 'id' => 'item-fields',
1387 'multiple' => true,
1388 'alignment' => 'vertical',
1389 'default' => array_keys( $itemField ),
1390 'options' => $itemField,
1391 ],
1392 ];
1393 if ( $cf = Fns::is_acf() ) {
1394 global $post;
1395 $post_type = get_post_meta( $post->ID, 'tpg_post_type', true );
1396 $plist = self::getCFPluginList();
1397 $fields['cf_group'] = [
1398 'type' => 'checkbox',
1399 'name' => 'cf_group',
1400 'holderClass' => 'tpg-hidden cf-fields cf-group',
1401 'label' => 'Custom Field group ' . " ({$plist[$cf]})",
1402 'multiple' => true,
1403 'alignment' => 'vertical',
1404 'id' => 'cf_group',
1405 'options' => Fns::get_groups_by_post_type( $post_type, $cf ),
1406 ];
1407 $fields['cf_hide_empty_value'] = [
1408 'type' => 'checkbox',
1409 'name' => 'cf_hide_empty_value',
1410 'holderClass' => 'tpg-hidden cf-fields',
1411 'label' => esc_html__( 'Hide field with empty value', 'the-post-grid' ),
1412 'default' => 1,
1413 ];
1414 $fields['cf_show_only_value'] = [
1415 'type' => 'checkbox',
1416 'name' => 'cf_show_only_value',
1417 'holderClass' => 'tpg-hidden cf-fields',
1418 'label' => esc_html__( 'Show only value of field', 'the-post-grid' ),
1419 'description' => esc_html__( 'By default both name & value of field is shown', 'the-post-grid' ),
1420 ];
1421 $fields['cf_hide_group_title'] = [
1422 'type' => 'checkbox',
1423 'name' => 'cf_hide_group_title',
1424 'holderClass' => 'tpg-hidden cf-fields',
1425 'label' => esc_html__( 'Hide group title', 'the-post-grid' ),
1426 ];
1427 }
1428
1429 return $fields;
1430 }
1431
1432
1433 public static function getCFPluginList() {
1434 return [
1435 'acf' => esc_html__( 'Advanced Custom Field', 'the-post-grid' ),
1436 ];
1437 }
1438
1439 public static function rtMediaSource() {
1440 return [
1441 'feature_image' => esc_html__( 'Feature Image', 'the-post-grid' ),
1442 'first_image' => esc_html__( 'First Image from content', 'the-post-grid' ),
1443 ];
1444 }
1445
1446 public static function get_image_types() {
1447 return [
1448 'normal' => esc_html__( 'Normal', 'the-post-grid' ),
1449 'circle' => esc_html__( 'Circle', 'the-post-grid' ),
1450 ];
1451 }
1452
1453 public static function get_limit_type( $content = null ) {
1454 $types = [
1455 'character' => esc_html__( 'Character', 'the-post-grid' ),
1456 'word' => esc_html__( 'Word', 'the-post-grid' ),
1457 ];
1458 if ( $content === 'content' ) {
1459 $types['full'] = esc_html__( 'Full Content', 'the-post-grid' );
1460 }
1461
1462 return apply_filters( 'tpg_limit_type', $types, $content );
1463 }
1464
1465 public static function scColumns() {
1466 return [
1467 1 => esc_html__( 'Column 1', 'the-post-grid' ),
1468 2 => esc_html__( 'Column 2', 'the-post-grid' ),
1469 3 => esc_html__( 'Column 3', 'the-post-grid' ),
1470 4 => esc_html__( 'Column 4', 'the-post-grid' ),
1471 5 => esc_html__( 'Column 5', 'the-post-grid' ),
1472 6 => esc_html__( 'Column 6', 'the-post-grid' ),
1473 ];
1474 }
1475
1476 public static function tgp_filter_list() {
1477 return [
1478 '_taxonomy_filter' => esc_html__( 'Taxonomy filter', 'the-post-grid' ),
1479 '_author_filter' => esc_html__( 'Author filter', 'the-post-grid' ),
1480 '_order_by' => esc_html__( 'Order - Sort retrieved posts by parameter', 'the-post-grid' ),
1481 '_sort_order' => esc_html__( 'Sort Order - Designates the ascending or descending order of the "orderby" parameter', 'the-post-grid' ),
1482 '_search' => esc_html__( 'Search filter', 'the-post-grid' ),
1483 ];
1484 }
1485
1486 public static function overflowOpacity() {
1487 return [
1488 1 => esc_html__( '10%', 'the-post-grid' ),
1489 2 => esc_html__( '20%', 'the-post-grid' ),
1490 3 => esc_html__( '30%', 'the-post-grid' ),
1491 4 => esc_html__( '40%', 'the-post-grid' ),
1492 5 => esc_html__( '50%', 'the-post-grid' ),
1493 6 => esc_html__( '60%', 'the-post-grid' ),
1494 7 => esc_html__( '70%', 'the-post-grid' ),
1495 8 => esc_html__( '80%', 'the-post-grid' ),
1496 9 => esc_html__( '90%', 'the-post-grid' ),
1497 ];
1498 }
1499
1500 public static function rtTPGLayoutType() {
1501 $layoutType = [
1502 'grid' => [
1503 'title' => esc_html__( 'Grid', 'the-post-grid' ),
1504 'img' => rtTPG()->get_assets_uri( 'images/grid.png' ),
1505 ],
1506 'grid_hover' => [
1507 'title' => esc_html__( 'Grid Hover', 'the-post-grid' ),
1508 'img' => rtTPG()->get_assets_uri( 'images/grid_hover.png' ),
1509 ],
1510 'list' => [
1511 'title' => esc_html__( 'List', 'the-post-grid' ),
1512 'img' => rtTPG()->get_assets_uri( 'images/list.png' ),
1513 ],
1514 'isotope' => [
1515 'title' => esc_html__( 'Isotope', 'the-post-grid' ),
1516 'img' => rtTPG()->get_assets_uri( 'images/isotope.png' ),
1517 ],
1518 ];
1519
1520 return apply_filters( 'rt_tpg_layouts_type', $layoutType );
1521 }
1522
1523 public static function rtTPGLayouts() {
1524 $layouts = [
1525 'layout1' => [
1526 'title' => esc_html__( 'Grid Layout 1', 'the-post-grid' ),
1527 'layout' => 'grid',
1528 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/',
1529 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid1.png' ),
1530 ],
1531 'layout12' => [
1532 'title' => esc_html__( 'Grid Layout 2', 'the-post-grid' ),
1533 'layout' => 'grid',
1534 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/grid-layout-2/',
1535 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid10.png' ),
1536 ],
1537 'layout5' => [
1538 'title' => esc_html__( 'Grid Hover 1', 'the-post-grid' ),
1539 'layout' => 'grid_hover',
1540 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-1/',
1541 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid3.png' ),
1542 ],
1543 'layout6' => [
1544 'title' => esc_html__( 'Grid Hover 2', 'the-post-grid' ),
1545 'layout' => 'grid_hover',
1546 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-2/',
1547 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid4.png' ),
1548 ],
1549 'layout7' => [
1550 'title' => esc_html__( 'Grid Hover 3', 'the-post-grid' ),
1551 'layout' => 'grid_hover',
1552 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-3/',
1553 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid5.png' ),
1554 ],
1555 'layout2' => [
1556 'title' => esc_html__( 'List Layout 1', 'the-post-grid' ),
1557 'layout' => 'list',
1558 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/list-layout-1/',
1559 'img' => rtTPG()->get_assets_uri( 'images/layouts/list1.png' ),
1560 ],
1561 'layout3' => [
1562 'title' => esc_html__( 'List Layout 2', 'the-post-grid' ),
1563 'layout' => 'list',
1564 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/list-layout-rounded-image/',
1565 'img' => rtTPG()->get_assets_uri( 'images/layouts/list2.png' ),
1566 ],
1567 'isotope1' => [
1568 'title' => esc_html__( 'Isotope Layout 1', 'the-post-grid' ),
1569 'layout' => 'isotope',
1570 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/layout-4-filter/',
1571 'img' => rtTPG()->get_assets_uri( 'images/layouts/isotope1.png' ),
1572 ],
1573 ];
1574
1575 return apply_filters( 'tpg_layouts', $layouts );
1576 }
1577
1578 public static function rtTPGItemFields() {
1579 $items = [
1580 'heading' => esc_html__( 'ShortCode Heading', 'the-post-grid' ),
1581 'title' => esc_html__( 'Title', 'the-post-grid' ),
1582 'excerpt' => esc_html__( 'Excerpt', 'the-post-grid' ),
1583 'read_more' => esc_html__( 'Read More', 'the-post-grid' ),
1584 'post_date' => esc_html__( 'Post Date', 'the-post-grid' ),
1585 'author' => esc_html__( 'Author', 'the-post-grid' ),
1586 'categories' => esc_html__( 'Categories', 'the-post-grid' ),
1587 'tags' => esc_html__( 'Tags', 'the-post-grid' ),
1588 'comment_count' => esc_html__( 'Comment count', 'the-post-grid' ),
1589 ];
1590
1591 return apply_filters( 'tpg_field_selection_items', $items );
1592 }
1593
1594 public static function postLoadingType() {
1595 return apply_filters(
1596 'rttpg_pagination_type',
1597 [
1598 'pagination' => esc_html__( 'Pagination', 'the-post-grid' ),
1599 ]
1600 );
1601 }
1602
1603 public static function scGridOpt() {
1604 return [
1605 'even' => esc_html__( 'Even', 'the-post-grid' ),
1606 'masonry' => esc_html__( 'Masonry', 'the-post-grid' ),
1607 ];
1608 }
1609
1610 public static function extraStyle() {
1611 return apply_filters(
1612 'tpg_extra_style',
1613 [
1614 'title' => esc_html__( 'Title', 'the-post-grid' ),
1615 'title_hover' => esc_html__( 'Title hover', 'the-post-grid' ),
1616 'excerpt' => esc_html__( 'Excerpt', 'the-post-grid' ),
1617 'meta_data' => esc_html__( 'Meta Data', 'the-post-grid' ),
1618 ]
1619 );
1620 }
1621
1622 public static function scFontSize() {
1623 $num = [];
1624 for ( $i = 10; $i <= 50; $i ++ ) {
1625 $num[ $i ] = $i . 'px';
1626 }
1627
1628 return $num;
1629 }
1630
1631 public static function scAlignment() {
1632 return [
1633 'left' => esc_html__( 'Left', 'the-post-grid' ),
1634 'right' => esc_html__( 'Right', 'the-post-grid' ),
1635 'center' => esc_html__( 'Center', 'the-post-grid' ),
1636 'justify' => esc_html__( 'Justify', 'the-post-grid' ),
1637 ];
1638 }
1639
1640 public static function scReadMoreButtonPositionList() {
1641 return [
1642 'left' => esc_html__( 'Left', 'the-post-grid' ),
1643 'right' => esc_html__( 'Right', 'the-post-grid' ),
1644 'center' => esc_html__( 'Center', 'the-post-grid' ),
1645 ];
1646 }
1647
1648
1649 public static function scTextWeight() {
1650 return [
1651 'normal' => esc_html__( 'Normal', 'the-post-grid' ),
1652 'bold' => esc_html__( 'Bold', 'the-post-grid' ),
1653 'bolder' => esc_html__( 'Bolder', 'the-post-grid' ),
1654 'lighter' => esc_html__( 'Lighter', 'the-post-grid' ),
1655 'inherit' => esc_html__( 'Inherit', 'the-post-grid' ),
1656 'initial' => esc_html__( 'Initial', 'the-post-grid' ),
1657 'unset' => esc_html__( 'Unset', 'the-post-grid' ),
1658 100 => esc_html__( '100', 'the-post-grid' ),
1659 200 => esc_html__( '200', 'the-post-grid' ),
1660 300 => esc_html__( '300', 'the-post-grid' ),
1661 400 => esc_html__( '400', 'the-post-grid' ),
1662 500 => esc_html__( '500', 'the-post-grid' ),
1663 600 => esc_html__( '600', 'the-post-grid' ),
1664 700 => esc_html__( '700', 'the-post-grid' ),
1665 800 => esc_html__( '800', 'the-post-grid' ),
1666 900 => esc_html__( '900', 'the-post-grid' ),
1667 ];
1668 }
1669
1670 public static function imageCropType() {
1671 return [
1672 'soft' => esc_html__( 'Soft Crop', 'the-post-grid' ),
1673 'hard' => esc_html__( 'Hard Crop', 'the-post-grid' ),
1674 ];
1675 }
1676
1677 public static function rt_filter_type() {
1678 return [
1679 'dropdown' => esc_html__( 'Dropdown', 'the-post-grid' ),
1680 'button' => esc_html__( 'Button', 'the-post-grid' ),
1681 ];
1682 }
1683
1684 public static function get_pro_feature_list() {
1685 return '<ol>
1686 <li>Fully responsive and mobile friendly.</li>
1687 <li>62 Different Layouts</li>
1688 <li>45 Elementor Layouts</li>
1689 <li>Creative Slider layouts</li>
1690 <li>Archive page builder for Elementor</li>
1691 <li>Even and Masonry Grid.</li>
1692 <li>WooCommerce supported.</li>
1693 <li>EDD supported for shortcode.</li>
1694 <li>Custom Post Type Supported</li>
1695 <li>Display posts by any Taxonomy like category(s), tag(s), author(s), keyword(s)</li>
1696 <li>Order by Id, Title, Created date, Modified date and Menu order.</li>
1697 <li>Display image size (thumbnail, medium, large, full)</li>
1698 <li>Ajax front-end filter by category(s), tag(s), author(s), keyword(s)</li>
1699 <li>Isotope filter for any taxonomy ie. categories, tags...</li>
1700 <li>Query Post with Relation.</li>
1701 <li>Fields Selection.</li>
1702 <li>All Text and Color control.</li>
1703 <li>Meta Position Control.</li>
1704 <li>Category Position Control.</li>
1705 <li>Content Wrapper Style Control.</li>
1706 <li>Enable/Disable Pagination.</li>
1707 <li>AJAX Pagination (Load more and Load on Scrolling)</li>
1708 <li>Advanced Custom Field support</li>
1709 <li>Post View Count</li>
1710 </ol>
1711 <a href="' . esc_url( rtTpg()->proLink() ) . '" class="rt-admin-btn" target="_blank">' . esc_html__( 'Get Pro Version', 'the-post-grid' ) . '</a>';
1712 }
1713 }
1714