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