The Post Grid - Version 4.0.0

Version Description

  • Added: 3 Elementor Widgets with 9 layouts for The Post Grid
  • Added: Archive Page Builder for Elementor (Pro)
Download this release

Release Info

Developer techlabpro1
Plugin Icon 128x128 The Post Grid
Version 4.0.0
Comparing to
See all releases

Code changes from version 3.1.5 to 4.0.0

Files changed (42) hide show
  1. README.txt +53 -30
  2. app/Controllers/Admin/AdminAjaxController.php +1035 -0
  3. app/Controllers/Admin/MetaController.php +373 -0
  4. app/Controllers/Admin/NoticeController.php +322 -0
  5. app/Controllers/Admin/PostTypeController.php +95 -0
  6. app/Controllers/Admin/SettingsController.php +173 -0
  7. app/Controllers/Admin/UpgradeController.php +27 -0
  8. app/Controllers/AjaxController.php +228 -0
  9. app/Controllers/ElementorController.php +170 -0
  10. app/Controllers/GutenBergController.php +46 -0
  11. app/Controllers/Hooks/ActionHooks.php +24 -0
  12. app/Controllers/Hooks/FilterHooks.php +71 -0
  13. app/Controllers/ScriptController.php +106 -0
  14. app/Controllers/ShortcodeController.php +1089 -0
  15. app/Controllers/WidgetController.php +17 -0
  16. app/Helpers/Fns.php +2420 -0
  17. app/Helpers/Install.php +24 -0
  18. app/Helpers/Options.php +1592 -0
  19. app/Models/Field.php +718 -0
  20. app/Models/ReSizer.php +219 -0
  21. app/RtTpg.php +217 -0
  22. lib/vendor/RtElementorWidget.php → app/Widgets/ElementorWidget.php +8 -3
  23. app/Widgets/TPGWidget.php +81 -0
  24. app/Widgets/elementor/base.php +899 -0
  25. app/Widgets/elementor/rtTPGElementorHelper.php +8040 -0
  26. app/Widgets/elementor/rtTPGElementorQuery.php +360 -0
  27. app/Widgets/elementor/widgets/default.php +53 -0
  28. app/Widgets/elementor/widgets/grid-hover-layout-archive.php +234 -0
  29. app/Widgets/elementor/widgets/grid-hover-layout.php +225 -0
  30. app/Widgets/elementor/widgets/grid-layout-archive.php +240 -0
  31. app/Widgets/elementor/widgets/grid-layout.php +246 -0
  32. app/Widgets/elementor/widgets/list-layout-archive.php +240 -0
  33. app/Widgets/elementor/widgets/list-layout.php +246 -0
  34. app/Widgets/elementor/widgets/related-post.php +327 -0
  35. app/Widgets/elementor/widgets/slider-layout-archive.php +367 -0
  36. app/Widgets/elementor/widgets/slider-layout.php +368 -0
  37. assets/css/admin-preview.css +1 -0
  38. assets/css/admin.css +6 -5
  39. assets/css/rt-tpg-common-rtl.css +2579 -0
  40. assets/css/rt-tpg-common.css +2579 -0
  41. assets/css/thepostgrid-rtl.css +1399 -14
  42. assets/css/thepostgrid.css +495 -2331
README.txt CHANGED
@@ -1,18 +1,18 @@
1
- === The Post Grid ===
2
  Contributors: techlabpro1
3
  Donate link:
4
- Tags: post grid, content grid, post display, post format, post view, blog display, news display, post
5
  Requires at least: 4.5
6
  Tested up to: 5.9.3
7
- Stable tag: 3.1.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
- Fast & Easy way to display WordPress post in Grid, List & Isotope view ( filter by category, tag, author..) without a single line of coding.
12
 
13
  == Description ==
14
 
15
- [Plugin Demo](https://www.radiustheme.com/demo/plugins/the-post-grid/) | [Documentation](https://www.radiustheme.com/docs/the-post-grid/) | [Get Pro](https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/)
16
 
17
  The Post Grid is a fully Responsive & Mobile friendly plugin to display your page/post in Grid, List and Isotope View without any line of coding. It is fast and easy to generate grid from admin end and insert into page/post. You can Display posts by any category(s), tag(s), author(s), keyword(s) also Order posts by Id, Title, Created date, Modified date and Menu order.
18
 
@@ -20,10 +20,13 @@ The Post Grid is a fully Responsive & Mobile friendly plugin to display your pag
20
 
21
  By using The Post Grid plugin you can display your post in Grid List & Isotope view in minutes, without any line of Coding...
22
 
23
- = Features =
 
24
  * Fully responsive and mobile friendly.
25
  * 8 Different Layouts
26
- * 4 New Layouts
 
 
27
  * Generate Unlimited grid.
28
  * Excerpt limit in word or characters
29
  * User define excerpt ending(... )
@@ -50,30 +53,36 @@ By using The Post Grid plugin you can display your post in Grid List & Isotope v
50
  * Detail page link target control
51
  * **Layout preview**
52
 
 
53
 
54
-
55
- = 4 easy steps to Generate Grid =
56
-
57
- **Step 1) Post Source:** Select Post Source then Select the Taxonomy ie category(s), tag(s), author(s), keyword(s) and Select Order by Id, Title, Created date, Modified date and Menu order then set the Terms and Relation.
58
 
59
  **Step 2) Layout Settings:** From the 4 different layouts select which layout you want then Select Number of Columns, pagiantion, Image Size, Image Source and Excerpt limit.
60
 
61
- **Step 3) Field Selection:** You can select which fields you want to display.
 
 
62
 
63
- **Step 4) Style:** You can set Primay color and Button Color.
64
 
65
- = How to use? =
66
 
67
  From the Editor The Post Grid icon you can easily add into your page or post.
68
 
69
  For any bug or suggestion please mail support@radiustheme.com
70
 
71
- = PRO Features =
 
72
  * Fully responsive and mobile friendly.
73
  * 62 Different Layouts
74
  * 12 New Layouts
75
- * Even and Masonry Grid.
76
- * WooCommerce supported.
 
 
 
 
 
77
  * Custom Post Type Supported
78
  * Display posts by any Taxonomy like category(s), tag(s), author(s), keyword(s), Status and Date Range
79
  * Order by Id, Title, Created date, Modified date, Random, Comments Count and Menu order.
@@ -82,33 +91,46 @@ For any bug or suggestion please mail support@radiustheme.com
82
  * Isotope filter for any taxonomy ie. categories, tags...
83
  * Search field on Isotope.
84
  * Set Default Isotope Filter Button.
85
- * Disable Show All Button for Isotope Filter.
86
  * Popup page Fields Selection.
87
  * Default image set option in Shortcode generator settings.
88
  * All Text color, size and Button Color control.
89
  * Meta Position Control
90
  * Category Position Control
91
  * Content Wrapper Style Control
92
- * Overlay color and opacity.
93
  * AJAX Pagination (Number, Load more and Load on Scrolling))
94
  * Single popup and Popup with next preview.
95
- * Social Share on popup.
96
  * Override default page template (Category, Tag, Search)
97
 
98
- [Get The PRO](https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/) [PRO Version Demo](https://www.radiustheme.com/demo/plugins/the-post-grid/)
99
 
100
- For any bug or suggestion please mail support@radiustheme.com
 
 
 
 
101
 
102
- == Installation ==
103
 
104
- = Using The WordPress Dashboard =
 
 
 
 
 
 
 
 
 
105
 
106
  1. Navigate to the 'Add New' in the plugins dashboard
107
  2. Search for 'The Post Grid'
108
  3. Click 'Install Now'
109
  4. Activate the plugin on the Plugin dashboard
110
 
111
- = Uploading in WordPress Dashboard =
112
 
113
  1. Navigate to the 'Add New' in the plugins dashboard
114
  2. Navigate to the 'Upload' area
@@ -116,18 +138,16 @@ For any bug or suggestion please mail support@radiustheme.com
116
  4. Click 'Install Now'
117
  5. Activate the plugin in the Plugin dashboard
118
 
119
- = Using FTP =
120
 
121
  1. Download `the-post-grid.zip`
122
  2. Extract the `the-post-grid` directory to your computer
123
  3. Upload the `the-post-grid` directory to the `/wp-content/plugins/` directory
124
  4. Activate the plugin in the Plugin dashboard
125
 
126
-
127
-
128
  == Frequently Asked Questions ==
129
 
130
- = How to Use Post Grid=
131
 
132
  * Go to `The Post Grid > Add New Grid`
133
  * Go to page or post editor click The post grid Shortcode button and select a shortcode from dropdown list and insert shortcode.
@@ -148,9 +168,12 @@ For any bug or suggestion please mail support@radiustheme.com
148
  07. Shortcode Field Selections
149
  08. Shortcode Style
150
 
151
-
152
  == Changelog ==
153
 
 
 
 
 
154
  = 3.1.5 =
155
  * Fixed: Multiple ShortCode same page preloader issue
156
 
1
+ === The Post Grid – Shortcode, Elementor Addon for Post Grid ===
2
  Contributors: techlabpro1
3
  Donate link:
4
+ Tags: post grid, content grid, post display, post slider, post grid elementor addon
5
  Requires at least: 4.5
6
  Tested up to: 5.9.3
7
+ Stable tag: 4.0.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
+ Post Grid Plugin allows you to create grid, list, filter and slider view. Post Grid Plugin is Easy to use as shortcode or Elementor Addon.
12
 
13
  == Description ==
14
 
15
+ 👉 [Plugin Demo](https://www.radiustheme.com/demo/plugins/the-post-grid/) | [Elementor Demo](https://www.radiustheme.com/demo/plugins/the-post-grid-elementor/) | [Documentation](https://www.radiustheme.com/docs/the-post-grid/) | [Get Pro](https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/) 👈
16
 
17
  The Post Grid is a fully Responsive & Mobile friendly plugin to display your page/post in Grid, List and Isotope View without any line of coding. It is fast and easy to generate grid from admin end and insert into page/post. You can Display posts by any category(s), tag(s), author(s), keyword(s) also Order posts by Id, Title, Created date, Modified date and Menu order.
18
 
20
 
21
  By using The Post Grid plugin you can display your post in Grid List & Isotope view in minutes, without any line of Coding...
22
 
23
+ == 🏆 Features ==
24
+
25
  * Fully responsive and mobile friendly.
26
  * 8 Different Layouts
27
+ * Elementor Addon
28
+ * 3 Elementor Widgets
29
+ * 9 Elementor Layouts
30
  * Generate Unlimited grid.
31
  * Excerpt limit in word or characters
32
  * User define excerpt ending(... )
53
  * Detail page link target control
54
  * **Layout preview**
55
 
56
+ == 🏆 5 easy steps to Generate Grid ==
57
 
58
+ **Step 1) Query Build:** Select Post Source then Select the Taxonomy ie category(s), tag(s), author(s), keyword(s) and Select Order by Id, Title, Created date, Modified date and Menu order then set the Terms and Relation.
 
 
 
59
 
60
  **Step 2) Layout Settings:** From the 4 different layouts select which layout you want then Select Number of Columns, pagiantion, Image Size, Image Source and Excerpt limit.
61
 
62
+ **Step 3) Settings:** You can set category, tag, excerpt and meta position and style.
63
+
64
+ **Step 4) Field Selection:** You can select which fields you want to display.
65
 
66
+ **Step 5) Style:** You can set Primay color and Button Color.
67
 
68
+ == 🏆 How to use? ==
69
 
70
  From the Editor The Post Grid icon you can easily add into your page or post.
71
 
72
  For any bug or suggestion please mail support@radiustheme.com
73
 
74
+ == 🏆 PRO Features ==
75
+
76
  * Fully responsive and mobile friendly.
77
  * 62 Different Layouts
78
  * 12 New Layouts
79
+ * 4 Elementor Widgets
80
+ * 45 Elementor Layouts
81
+ * Necessary widgets for archive page and single post builder
82
+ * Advanced Custom Field support on single post
83
+ * Post View Count
84
+ * Even and Masonry Grid
85
+ * WooCommerce supported
86
  * Custom Post Type Supported
87
  * Display posts by any Taxonomy like category(s), tag(s), author(s), keyword(s), Status and Date Range
88
  * Order by Id, Title, Created date, Modified date, Random, Comments Count and Menu order.
91
  * Isotope filter for any taxonomy ie. categories, tags...
92
  * Search field on Isotope.
93
  * Set Default Isotope Filter Button.
94
+ * Disable Show All Button for Isotope Filter
95
  * Popup page Fields Selection.
96
  * Default image set option in Shortcode generator settings.
97
  * All Text color, size and Button Color control.
98
  * Meta Position Control
99
  * Category Position Control
100
  * Content Wrapper Style Control
101
+ * Overlay color and opacity
102
  * AJAX Pagination (Number, Load more and Load on Scrolling))
103
  * Single popup and Popup with next preview.
104
+ * Social Share on popup
105
  * Override default page template (Category, Tag, Search)
106
 
107
+ == 🏆 Post Grid Elementor addon with archive and single page builder ==
108
 
109
+ From the version 4.0 we included 4 independent Elementor addon without lot of settings that allows you to create grid, list, & slider layouts easily using Elementor Page Builder.
110
+
111
+ == 🏆 Elementor Archive Page Builder [Pro] ==
112
+
113
+ We intrduce archive page builder using Elenentor Page Builder. You can create your own archive page using the layout that you want like posts page, category page, tag page, search paage and author page.
114
 
115
+ == 🏆 Elementor Single Page Builder [Pro] ==
116
 
117
+ We introduce Single Page Builder with Elementor Page builder. You can easily arrange the single post as you want using the drag & drop interfance of Elementor Page Builder.
118
+
119
+ 👉 [Get The PRO](https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/)
120
+ 👉 [PRO Version Demo](https://www.radiustheme.com/demo/plugins/the-post-grid/)
121
+
122
+ 👉 For any bug or suggestion please mail support@radiustheme.com
123
+
124
+ == 🏆 Installation ==
125
+
126
+ = 👉 Using The WordPress Dashboard =
127
 
128
  1. Navigate to the 'Add New' in the plugins dashboard
129
  2. Search for 'The Post Grid'
130
  3. Click 'Install Now'
131
  4. Activate the plugin on the Plugin dashboard
132
 
133
+ = 👉 Uploading in WordPress Dashboard =
134
 
135
  1. Navigate to the 'Add New' in the plugins dashboard
136
  2. Navigate to the 'Upload' area
138
  4. Click 'Install Now'
139
  5. Activate the plugin in the Plugin dashboard
140
 
141
+ = 👉 Using FTP =
142
 
143
  1. Download `the-post-grid.zip`
144
  2. Extract the `the-post-grid` directory to your computer
145
  3. Upload the `the-post-grid` directory to the `/wp-content/plugins/` directory
146
  4. Activate the plugin in the Plugin dashboard
147
 
 
 
148
  == Frequently Asked Questions ==
149
 
150
+ = How to Use Post Grid =
151
 
152
  * Go to `The Post Grid > Add New Grid`
153
  * Go to page or post editor click The post grid Shortcode button and select a shortcode from dropdown list and insert shortcode.
168
  07. Shortcode Field Selections
169
  08. Shortcode Style
170
 
 
171
  == Changelog ==
172
 
173
+ = 4.0.0 =
174
+ * Added: 3 Elementor Widgets with 9 layouts for The Post Grid
175
+ * Added: Archive Page Builder for Elementor (Pro)
176
+
177
  = 3.1.5 =
178
  * Fixed: Multiple ShortCode same page preloader issue
179
 
app/Controllers/Admin/AdminAjaxController.php ADDED
@@ -0,0 +1,1035 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Controllers\Admin;
4
+
5
+ use RT\ThePostGrid\Helpers\Fns;
6
+ use RT\ThePostGrid\Helpers\Options;
7
+
8
+ class AdminAjaxController {
9
+
10
+ private $l4togglePreviewAjax = false;
11
+ private $l4togglePreview = false;
12
+ private $l4toggle = false;
13
+
14
+ public function __construct() {
15
+ add_action( 'wp_ajax_tpgPreviewAjaxCall', [ $this, 'tpgPreviewAjaxCall' ] );
16
+ }
17
+
18
+ /**
19
+ * Preview rendering
20
+ */
21
+ function tpgPreviewAjaxCall() {
22
+ $msg = $data = null;
23
+ $error = true;
24
+ if ( Fns::verifyNonce() ) {
25
+ $error = false;
26
+ $scMeta = $_REQUEST;
27
+
28
+ $rand = mt_rand();
29
+ $layoutID = "rt-tpg-container-" . $rand;
30
+
31
+ $layout = ( isset( $scMeta['layout'] ) ? $scMeta['layout'] : 'layout1' );
32
+ if ( ! in_array( $layout, array_keys( Options::rtTPGLayouts() ) ) ) {
33
+ $layout = 'layout1';
34
+ }
35
+
36
+ $isIsotope = preg_match( '/isotope/', $layout );
37
+ $isCarousel = preg_match( '/carousel/', $layout );
38
+ $isGrid = preg_match( '/layout/', $layout );
39
+ $isWooCom = preg_match( '/wc/', $layout );
40
+ $isOffset = preg_match( '/offset/', $layout );
41
+ $isGridHover = preg_match( '/grid_hover/', $layout );
42
+
43
+ $dCol = ( isset( $scMeta['column'] ) ? absint( $scMeta['column'] ) : 3 );
44
+ $tCol = ( isset( $scMeta['tpg_tab_column'] ) ? absint( $scMeta['tpg_tab_column'] ) : 2 );
45
+ $mCol = ( isset( $scMeta['tpg_mobile_column'] ) ? absint( $scMeta['tpg_mobile_column'] ) : 1 );
46
+ if ( ! in_array( $dCol, array_keys( Options::scColumns() ) ) ) {
47
+ $dCol = 3;
48
+ }
49
+ if ( ! in_array( $tCol, array_keys( Options::scColumns() ) ) ) {
50
+ $tCol = 2;
51
+ }
52
+ if ( ! in_array( $dCol, array_keys( Options::scColumns() ) ) ) {
53
+ $mCol = 1;
54
+ }
55
+
56
+ if ( $isOffset ) {
57
+ $dCol = ( $dCol < 3 ? 2 : $dCol );
58
+ $tCol = ( $tCol < 3 ? 2 : $tCol );
59
+ $mCol = ( $mCol < 3 ? 1 : $mCol );
60
+ }
61
+ $arg = [];
62
+ $fImg = ( ! empty( $scMeta['feature_image'] ) ? true : false );
63
+ $fImgSize = ( isset( $scMeta['featured_image_size'] ) ? $scMeta['featured_image_size'] : "medium" );
64
+ $mediaSource = ( isset( $scMeta['media_source'] ) ? $scMeta['media_source'] : "feature_image" );
65
+ $arg['excerpt_type'] = ( isset( $scMeta['tgp_excerpt_type'] ) ? $scMeta['tgp_excerpt_type'] : 'character' );
66
+ $arg['title_limit_type'] = ( isset( $scMeta['tpg_title_limit_type'] ) ? $scMeta['tpg_title_limit_type'] : 'character' );
67
+ $arg['excerpt_limit'] = ( isset( $scMeta['excerpt_limit'] ) ? absint( $scMeta['excerpt_limit'] ) : 0 );
68
+ $arg['title_limit'] = ( isset( $scMeta['tpg_title_limit'] ) ? absint( $scMeta['tpg_title_limit'] ) : 0 );
69
+ $arg['excerpt_more_text'] = ( isset( $scMeta['tgp_excerpt_more_text'] ) ? $scMeta['tgp_excerpt_more_text'] : null );
70
+ $arg['read_more_text'] = ( ! empty( $scMeta['tgp_read_more_text'] )
71
+ ? $scMeta['tgp_read_more_text']
72
+ : __( 'Read More',
73
+ 'the-post-grid' ) );
74
+ $arg['show_all_text'] = ( ! empty( $scMeta['tpg_show_all_text'] )
75
+ ? $scMeta['tpg_show_all_text']
76
+ : __( 'Show all',
77
+ 'the-post-grid' ) );
78
+ $arg['tpg_title_position'] = isset( $scMeta['tpg_title_position'] ) && ! empty( $scMeta['tpg_title_position'] ) ? $scMeta['tpg_title_position'] : null;
79
+ $arg['btn_alignment_class'] = isset( $scMeta['tpg_read_more_button_alignment'] ) && ! empty( $scMeta['tpg_read_more_button_alignment'] )
80
+ ? $scMeta['tpg_read_more_button_alignment'] : '';
81
+ // Category Settings
82
+ $arg['category_position'] = isset( $scMeta['tpg_category_position'] ) ? $scMeta['tpg_category_position'] : null;
83
+ $arg['category_style'] = ! empty( $scMeta['tpg_category_style'] ) ? $scMeta['tpg_category_style'] : '';
84
+ $arg['catIcon'] = isset( $scMeta['tpg_category_icon'] ) ? $scMeta['tpg_category_icon'] : true;
85
+ // Meta Settings
86
+ $arg['metaPosition'] = isset( $scMeta['tpg_meta_position'] ) ? $scMeta['tpg_meta_position'] : null;
87
+ $arg['metaIcon'] = ! empty( $scMeta['tpg_meta_icon'] ) ? $scMeta['tpg_meta_icon'] : true;
88
+ $arg['metaSeparator'] = ! empty( $scMeta['tpg_meta_separator'] ) ? $scMeta['tpg_meta_separator'] : '';
89
+ /* Argument create */
90
+ $args = [];
91
+ $postType = ( isset( $scMeta['tpg_post_type'] ) ? $scMeta['tpg_post_type'] : null );
92
+
93
+ if ( $postType ) {
94
+ $args['post_type'] = $postType;
95
+ }
96
+
97
+ // Common filter
98
+ /* post__in */
99
+ $post__in = ( isset( $scMeta['post__in'] ) ? $scMeta['post__in'] : null );
100
+ if ( $post__in ) {
101
+ $post__in = explode( ',', $post__in );
102
+ $args['post__in'] = $post__in;
103
+ }
104
+ /* post__not_in */
105
+ $post__not_in = ( isset( $scMeta['post__not_in'] ) ? $scMeta['post__not_in'] : null );
106
+ if ( $post__not_in ) {
107
+ $post__not_in = explode( ',', $post__not_in );
108
+ $args['post__not_in'] = $post__not_in;
109
+ }
110
+
111
+ /* LIMIT */
112
+ $limit = ( ( empty( $scMeta['limit'] ) || $scMeta['limit'] === '-1' ) ? 10000000 : (int) $scMeta['limit'] );
113
+ $queryOffset = empty( $scMeta['offset'] ) ? 0 : (int) $scMeta['offset'];
114
+ $args['posts_per_page'] = $limit;
115
+ $pagination = ( ! empty( $scMeta['pagination'] ) ? true : false );
116
+ $posts_loading_type = ( ! empty( $scMeta['posts_loading_type'] ) ? $scMeta['posts_loading_type'] : "pagination" );
117
+ if ( $pagination ) {
118
+ $posts_per_page = ( isset( $scMeta['posts_per_page'] ) ? intval( $scMeta['posts_per_page'] ) : $limit );
119
+ if ( $posts_per_page > $limit ) {
120
+ $posts_per_page = $limit;
121
+ }
122
+ // Set 'posts_per_page' parameter
123
+ $args['posts_per_page'] = $posts_per_page;
124
+
125
+ $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
126
+
127
+ $offset = $posts_per_page * ( (int) $paged - 1 );
128
+ $args['paged'] = $paged;
129
+
130
+ // Update posts_per_page
131
+ if ( intval( $args['posts_per_page'] ) > $limit - $offset ) {
132
+ $args['posts_per_page'] = $limit - $offset;
133
+ }
134
+ }
135
+
136
+ // Advance Filter
137
+ $adv_filter = ( isset( $scMeta['post_filter'] ) ? $scMeta['post_filter'] : [] );
138
+ $taxFilter = ( ! empty( $scMeta['tgp_filter_taxonomy'] ) ? $scMeta['tgp_filter_taxonomy'] : null );
139
+ $taxHierarchical = ! empty( $scMeta['tgp_filter_taxonomy_hierarchical'] ) ? true : false;
140
+ $taxFilterTerms = [];
141
+ $taxFilterOperator = "IN";
142
+ // Taxonomy
143
+ $taxQ = [];
144
+ if ( in_array( 'tpg_taxonomy', $adv_filter ) && isset( $scMeta['tpg_taxonomy'] ) ) {
145
+ if ( is_array( $scMeta['tpg_taxonomy'] ) && ! empty( $scMeta['tpg_taxonomy'] ) ) {
146
+ foreach ( $scMeta['tpg_taxonomy'] as $taxonomy ) {
147
+ $terms = ( isset( $scMeta[ 'term_' . $taxonomy ] ) ? $scMeta[ 'term_' . $taxonomy ] : [] );
148
+ if ( $taxonomy == $taxFilter ) {
149
+ $taxFilterTerms = $terms;
150
+ }
151
+ if ( is_array( $terms ) && ! empty( $terms ) ) {
152
+ $operator = ( isset( $scMeta[ 'term_operator_' . $taxonomy ] ) ? $scMeta[ 'term_operator_' . $taxonomy ] : "IN" );
153
+ $taxQ[] = [
154
+ 'taxonomy' => $taxonomy,
155
+ 'field' => 'term_id',
156
+ 'terms' => $terms,
157
+ 'operator' => $operator,
158
+ ];
159
+ }
160
+ }
161
+ }
162
+ if ( count( $taxQ ) >= 2 ) {
163
+ $relation = ( isset( $scMeta['taxonomy_relation'] ) ? $scMeta['taxonomy_relation'] : "AND" );
164
+ $taxQ['relation'] = $relation;
165
+ }
166
+ }
167
+
168
+ if ( ! empty( $taxQ ) ) {
169
+ $args['tax_query'] = $taxQ;
170
+ }
171
+
172
+
173
+ // Order
174
+ if ( in_array( 'order', $adv_filter ) ) {
175
+ $order_by = ( isset( $scMeta['order_by'] ) ? $scMeta['order_by'] : null );
176
+ $order = ( isset( $scMeta['order'] ) ? $scMeta['order'] : null );
177
+ if ( $order ) {
178
+ $args['order'] = $order;
179
+ }
180
+ if ( $order_by ) {
181
+ $args['orderby'] = $order_by;
182
+ $meta_key = ! empty( $scMeta['tpg_meta_key'] ) ? trim( $scMeta['tpg_meta_key'] ) : null;
183
+ if ( in_array( $order_by, array_keys( Options::rtMetaKeyType() ) ) && $meta_key ) {
184
+ $args['orderby'] = $order_by;
185
+ $args['meta_key'] = $meta_key;
186
+ }
187
+ }
188
+ }
189
+ if ( isset( $_REQUEST['orderby'] ) ) {
190
+ $orderby = $_REQUEST['orderby'];
191
+ switch ( $orderby ) {
192
+ case 'menu_order':
193
+ $args['orderby'] = 'menu_order title';
194
+ $args['order'] = 'ASC';
195
+ break;
196
+ case 'date':
197
+ $args['orderby'] = 'date';
198
+ $args['order'] = 'DESC';
199
+ break;
200
+ case 'price':
201
+ $args['orderby'] = 'meta_value_num';
202
+ $args['meta_key'] = '_price';
203
+ $args['order'] = 'ASC';
204
+ break;
205
+ case 'price-desc':
206
+ $args['orderby'] = 'meta_value_num';
207
+ $args['meta_key'] = '_price';
208
+ $args['order'] = 'DESC';
209
+ break;
210
+ case 'rating' :
211
+ // Sorting handled later though a hook
212
+ add_filter( 'posts_clauses', [ $this, 'order_by_rating_post_clauses' ] );
213
+ break;
214
+ case 'title' :
215
+ $args['orderby'] = 'title';
216
+ $args['order'] = 'ASC';
217
+ break;
218
+ }
219
+ }
220
+ // Status
221
+ if ( in_array( 'tpg_post_status', $adv_filter ) ) {
222
+ $post_status = ( isset( $scMeta['tpg_post_status'] ) ? $scMeta['tpg_post_status'] : [] );
223
+ if ( ! empty( $post_status ) ) {
224
+ $args['post_status'] = $post_status;
225
+ }
226
+ } else {
227
+ $args['post_status'] = 'publish';
228
+ }
229
+ // Author
230
+ $filterAuthors = [];
231
+ $author = ( isset( $scMeta['author'] ) ? $scMeta['author'] : [] );
232
+ if ( in_array( 'author', $adv_filter ) && ! empty( $author ) ) {
233
+ $filterAuthors = $args['author__in'] = $author;
234
+ }
235
+ // Search
236
+ $s = ( isset( $scMeta['s'] ) ? $scMeta['s'] : [] );
237
+ if ( in_array( 's', $adv_filter ) && ! empty( $s ) ) {
238
+ $args['s'] = $s;
239
+ }
240
+
241
+ // Date query
242
+ if ( in_array( 'date_range', $adv_filter ) ) {
243
+ $startDate = ( ! empty( $scMeta['date_range_start'] ) ? $scMeta['date_range_start'] : null );
244
+ $endDate = ( ! empty( $scMeta['date_range_end'] ) ? $scMeta['date_range_end'] : null );
245
+ if ( $startDate && $endDate ) {
246
+ $args['date_query'] = [
247
+ [
248
+ 'after' => $startDate,
249
+ 'before' => $endDate,
250
+ 'inclusive' => true,
251
+ ],
252
+ ];
253
+ }
254
+ }
255
+
256
+ $settings = get_option( rtTPG()->options['settings'] );
257
+ $override_items = ! empty( $settings['template_override_items'] ) ? $settings['template_override_items'] : [];
258
+ $dataArchive = null;
259
+ if ( ( is_archive() || is_search() || is_tag() || is_author() ) && ! empty( $override_items ) ) {
260
+ unset( $args['post_type'] );
261
+ unset( $args['tax_query'] );
262
+ unset( $args['author__in'] );
263
+ $obj = get_queried_object();
264
+ $aType = $aValue = null;
265
+ if ( in_array( 'tag-archive', $override_items ) && is_tag() ) {
266
+ if ( ! empty( $obj->slug ) ) {
267
+ $aValue = $args['tag'] = $obj->slug;
268
+ $aType = 'tag';
269
+ }
270
+ } elseif ( in_array( 'category-archive', $override_items ) && is_category() ) {
271
+ if ( ! empty( $obj->slug ) ) {
272
+ $aValue = $args['category_name'] = $obj->slug;
273
+ }
274
+ $aType = 'category';
275
+ } elseif ( in_array( 'author-archive', $override_items ) && is_author() ) {
276
+ $aValue = $args['author'] = $obj->ID;
277
+ $aType = 'author';
278
+ } elseif ( in_array( 'search', $override_items ) && is_search() ) {
279
+ $aValue = $args['s'] = get_search_query();
280
+ $aType = 'search';
281
+ }
282
+ $dataArchive = " data-archive='{$aType}' data-archive-value='{$aValue}'";
283
+ $args['posts_per_archive_page'] = $args['posts_per_page'];
284
+ }
285
+
286
+ // Validation
287
+ $containerDataAttr = null;
288
+ $containerDataAttr .= " data-layout='{$layout}' data-desktop-col='{$dCol}' data-tab-col='{$tCol}' data-mobile-col='{$mCol}'";
289
+ $dCol = $dCol == 5 ? '24' : round( 12 / $dCol );
290
+ $tCol = $dCol == 5 ? '24' : round( 12 / $tCol );
291
+ $mCol = $dCol == 5 ? '24' : round( 12 / $mCol );
292
+ if ( $isCarousel ) {
293
+ $dCol = $tCol = $mCol = 12;
294
+ }
295
+ $arg['grid'] = "rt-col-md-{$dCol} rt-col-sm-{$tCol} rt-col-xs-{$mCol}";
296
+ if ( ( $layout == 'layout2' ) || ( $layout == 'layout3' ) ) {
297
+ $iCol = ( isset( $scMeta['tgp_layout2_image_column'] ) ? absint( $scMeta['tgp_layout2_image_column'] ) : 4 );
298
+ $iCol = $iCol > 12 ? 4 : $iCol;
299
+ $cCol = 12 - $iCol;
300
+ $arg['image_area'] = "rt-col-sm-{$iCol} rt-col-xs-12 ";
301
+ $arg['content_area'] = "rt-col-sm-{$cCol} rt-col-xs-12 ";
302
+ }
303
+ if ( $layout == 'layout4' ) {
304
+ $arg['image_area'] = "rt-col-lg-6 rt-col-md-6 rt-col-sm-12 rt-col-xs-12 ";
305
+ $arg['content_area'] = "rt-col-lg-6 rt-col-md-6 rt-col-sm-12 rt-col-xs-12 ";
306
+ }
307
+ $gridType = ! empty( $scMeta['grid_style'] ) ? $scMeta['grid_style'] : 'even';
308
+ $arg_class = [];
309
+ $arg_class[] = " rt-grid-item";
310
+ if ( ! $isCarousel && ! $isOffset ) {
311
+ $arg_class[] = $gridType . "-grid-item";
312
+ }
313
+ if ( $isOffset ) {
314
+ $arg_class[] = "rt-offset-item";
315
+ }
316
+ // Category class
317
+ $catHaveBg = ( isset( $scMeta['tpg_category_bg'] ) ? $scMeta['tpg_category_bg'] : '' );
318
+ if ( ! empty( $catHaveBg ) ) {
319
+ $arg_class[] = 'category-have-bg';
320
+ }
321
+ // Image animation type
322
+ $imgAnimationType = isset( $scMeta['tpg_image_animation'] ) ? $scMeta['tpg_image_animation'] : '';
323
+ if ( ! empty( $imgAnimationType ) ) {
324
+ $arg_class[] = $imgAnimationType;
325
+ }
326
+
327
+ $masonryG = null;
328
+ if ( $gridType == "even" && ! $isIsotope && ! $isCarousel ) {
329
+ $masonryG = "tpg-even";
330
+ } elseif ( $gridType == "masonry" && ! $isIsotope && ! $isCarousel ) {
331
+ $masonryG = " tpg-masonry";
332
+ }
333
+ $preLoader = $preLoaderHtml = null;
334
+ if ( $isIsotope ) {
335
+ $arg_class[] = 'isotope-item';
336
+ $preLoader = 'tpg-pre-loader';
337
+ }
338
+ if ( $isCarousel ) {
339
+ $arg_class[] = 'swiper-slide';
340
+ $preLoader = 'tpg-pre-loader';
341
+ }
342
+ $arg['class'] = implode( " ", $arg_class );
343
+ if ( $preLoader ) {
344
+ $preLoaderHtml = '<div class="rt-loading-overlay"></div><div class="rt-loading rt-ball-clip-rotate"><div></div></div>';
345
+ }
346
+
347
+ $margin = ! empty( $scMeta['margin_option'] ) ? $scMeta['margin_option'] : 'default';
348
+ if ( $margin == 'no' ) {
349
+ $arg_class[] = 'no-margin';
350
+ }
351
+ if ( ! empty( $scMeta['tpg_image_type'] ) && $scMeta['tpg_image_type'] == 'circle' ) {
352
+ $arg_class[] = 'tpg-img-circle';
353
+ }
354
+
355
+ $arg['anchorClass'] = null;
356
+ $arg['anchorClass'] = $arg['link_target'] = null;
357
+ $link = isset( $scMeta['link_to_detail_page'] ) ? $scMeta['link_to_detail_page'] : '1';
358
+ $link = ( $link == 'yes' ) ? '1' : $link;
359
+ $isSinglePopUp = false;
360
+ $linkType = ! empty( $scMeta['detail_page_link_type'][0] ) ? $scMeta['detail_page_link_type'][0] : 'popup';
361
+ if ( $link == '1' ) {
362
+ if ( $linkType == 'popup' && rtTPG()->hasPro() ) {
363
+ $popupType = ! empty( $scMeta['popup_type'][0] ) ? $scMeta['popup_type'][0] : 'single';
364
+ if ( $popupType == 'single' ) {
365
+ $arg['anchorClass'] .= ' tpg-single-popup';
366
+ $isSinglePopUp = true;
367
+ } else {
368
+ $arg['anchorClass'] .= ' tpg-multi-popup';
369
+ }
370
+ } else {
371
+ $arg['link_target'] = ! empty( $scMeta['link_target'][0] ) ? " target='{$scMeta['link_target'][0]}'" : null;
372
+ }
373
+ } else {
374
+ $arg['anchorClass'] = ' disabled';
375
+ }
376
+ $isSinglePopUp = false;
377
+ $linkType = ! empty( $scMeta['detail_page_link_type'] ) ? $scMeta['detail_page_link_type'] : 'popup';
378
+ if ( $link == '1' && $linkType == 'popup' && rtTPG()->hasPro() ) {
379
+ $popupType = ! empty( $scMeta['popup_type'] ) ? $scMeta['popup_type'] : 'single';
380
+ if ( $popupType == 'single' ) {
381
+ $arg['anchorClass'] .= ' tpg-single-popup';
382
+ $isSinglePopUp = true;
383
+ } else {
384
+ $arg['anchorClass'] .= ' tpg-multi-popup';
385
+ }
386
+ }
387
+
388
+ $parentClass = ( ! empty( $scMeta['parent_class'] ) ? trim( $scMeta['parent_class'] ) : null );
389
+ $defaultImgId = ( ! empty( $scMeta['default_preview_image'] ) ? absint( $scMeta['default_preview_image'] ) : null );
390
+ $customImgSize = ( ! empty( $scMeta['custom_image_size'] ) ? $scMeta['custom_image_size'] : [] );
391
+ // Grid Hover Layout
392
+ $fSmallImgSize = ( isset( $scMeta['featured_small_image_size'] ) ? $scMeta['featured_small_image_size'] : "medium" );
393
+ $customSmallImgSize = ( ! empty( $scMeta['custom_small_image_size'] ) ? $scMeta['custom_small_image_size'] : [] );
394
+
395
+ $arg['items'] = isset( $scMeta['item_fields'] ) ? ( $scMeta['item_fields'] ? $scMeta['item_fields'] : [] ) : [];
396
+ $arg['scID'] = $scID = $scMeta['sc_id'];
397
+
398
+ // Set readmore false if excerpt type = full content
399
+ if ( isset( $arg['excerpt_type'] ) && $arg['excerpt_type'] === 'full' && ( $key = array_search( 'read_more', $arg['items'] ) ) !== false ) {
400
+ unset( $arg['items'][ $key ] );
401
+ }
402
+
403
+ if ( isset( $scMeta['ignore_sticky_posts'] ) ) {
404
+ $args['ignore_sticky_posts'] = $scMeta['ignore_sticky_posts'];
405
+ }
406
+ $filters = ! empty( $scMeta['tgp_filter'] ) ? $scMeta['tgp_filter'] : [];
407
+ $action_term = ! empty( $scMeta['tgp_default_filter'] ) ? absint( $scMeta['tgp_default_filter'] ) : 0;
408
+ $hide_all_button = ! empty( $scMeta['tpg_hide_all_button'] ) ? true : false;
409
+ if ( $taxHierarchical ) {
410
+ $terms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true, 0 );
411
+ } else {
412
+ $terms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true );
413
+ }
414
+ if ( $hide_all_button && ! $action_term ) {
415
+ if ( ! empty( $terms ) ) {
416
+ $allKeys = array_keys( $terms );
417
+ $action_term = $allKeys[0];
418
+ }
419
+ }
420
+
421
+ if ( in_array( '_taxonomy_filter', $filters ) && $taxFilter && $action_term ) {
422
+ $args['tax_query'] = [
423
+ [
424
+ 'taxonomy' => $taxFilter,
425
+ 'field' => 'term_id',
426
+ 'terms' => [ $action_term ],
427
+ ],
428
+ ];
429
+ }
430
+
431
+ if ( $pagination && $queryOffset && isset( $args['paged'] ) ) {
432
+ $queryOffset = ( $posts_per_page * ( $args['paged'] - 1 ) ) + $queryOffset;
433
+ }
434
+ if ( $queryOffset ) {
435
+ $args['offset'] = $queryOffset;
436
+ }
437
+
438
+ $arg['title_tag'] = ( ! empty( $scMeta['title_tag'] ) && in_array( $scMeta['title_tag'], array_keys( Options::getTitleTags() ) ) )
439
+ ? esc_attr( $scMeta['title_tag'] ) : 'h3';
440
+
441
+ $gridQuery = new \WP_Query( $args );
442
+ // Start layout
443
+ $data .= Fns::layoutStyle( $layoutID, $scMeta, $layout );
444
+ $containerDataAttr .= "";
445
+ $data .= "<div class='rt-container-fluid rt-tpg-container tpg-shortcode-main-wrapper {$parentClass}' id='{$layoutID}' {$dataArchive} {$containerDataAttr}>";
446
+ // widget heading
447
+ $heading_tag = isset( $scMeta['tpg_heading_tag'] ) ? $scMeta['tpg_heading_tag'] : 'h2';
448
+ $heading_style = isset( $scMeta['tpg_heading_style'] ) && ! empty( $scMeta['tpg_heading_style'] ) ? $scMeta['tpg_heading_style'] : 'style1';
449
+ $heading_alignment = isset( $scMeta['tpg_heading_alignment'] ) ? $scMeta['tpg_heading_alignment'] : '';
450
+ $heading_link = isset( $scMeta['tpg_heading_link'] ) ? $scMeta['tpg_heading_link'] : '';
451
+
452
+ if ( ! empty( $arg['items'] ) && in_array( 'heading', $arg['items'] ) ) {
453
+ $data .= sprintf( '<div class="tpg-widget-heading-wrapper heading-%1$s %2$s">', $heading_style, $heading_alignment );
454
+ $data .= '<span class="tpg-widget-heading-line line-left"></span>';
455
+ if ( $heading_link ) {
456
+ $data .= sprintf( '<%1$s class="tpg-widget-heading"><a href="%2$s" title="%3$s">%3$s</a></%1$s>', $heading_tag, $heading_link, get_the_title( $scID ) );
457
+ } else {
458
+ $data .= sprintf( '<%1$s class="tpg-widget-heading">%2$s</%1$s>', $heading_tag, get_the_title( $scID ) );
459
+ }
460
+ $data .= '<span class="tpg-widget-heading-line"></span>';
461
+ $data .= '</div>';
462
+ }
463
+
464
+ $filters = ! empty( $scMeta['tgp_filter'] ) ? $scMeta['tgp_filter'] : [];
465
+ if ( ! empty( $filters ) && ( $isGrid || $isOffset || $isWooCom ) ) {
466
+ $data .= "<div class='rt-layout-filter-container rt-clear'><div class='rt-filter-wrap'>";
467
+ $allText = apply_filters( 'tpg_filter_all_text', __( "All", "the-post-grid" ), $scMeta );
468
+ $selectedSubTermsForButton = null;
469
+ if ( in_array( '_taxonomy_filter', $filters ) && $taxFilter ) {
470
+ $filterType = ( ! empty( $scMeta['tgp_filter_type'] ) ? $scMeta['tgp_filter_type'] : null );
471
+ $post_count = ( ! empty( $scMeta['tpg_post_count'] ) ? $scMeta['tpg_post_count'] : null );
472
+ $postCountClass = ( $post_count ? " has-post-count" : null );
473
+
474
+ $allSelect = " selected";
475
+ $isTermSelected = false;
476
+ if ( $action_term && $taxFilter ) {
477
+ $isTermSelected = true;
478
+ $allSelect = null;
479
+ }
480
+ if ( ! $filterType || $filterType == 'dropdown' ) {
481
+ $data .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-dropdown-wrap parent-dropdown-wrap{$postCountClass}' data-taxonomy='{$taxFilter}'>";
482
+ $termDefaultText = $allText;
483
+ $dataTerm = 'all';
484
+ $htmlButton = "";
485
+ $selectedSubTerms = null;
486
+ $pCount = 0;
487
+ if ( ! empty( $terms ) ) {
488
+ $i = 0;
489
+ foreach ( $terms as $id => $term ) {
490
+ $pCount = $pCount + $term['count'];
491
+ $sT = null;
492
+ if ( $taxHierarchical ) {
493
+ $subTerms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true, $id );
494
+ if ( ! empty( $subTerms ) ) {
495
+ $count = 0;
496
+ $item = $allCount = null;
497
+ foreach ( $subTerms as $stId => $t ) {
498
+ $count = $count + absint( $t['count'] );
499
+ $sTPostCount = ( $post_count ? " (<span class='rt-post-count'>{$t['count']}</span>)" : null );
500
+ $item .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$stId}'><span class='rt-text'>{$t['name']}{$sTPostCount}</span></span>";
501
+ }
502
+ if ( $post_count ) {
503
+ $allCount = " (<span class='rt-post-count'>{$count}</span>)";
504
+ }
505
+ $sT .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-dropdown-wrap sub-dropdown-wrap{$postCountClass}'>";
506
+ $sT .= "<span class='term-default rt-filter-dropdown-default' data-term='{$id}'>
507
+ <span class='rt-text'>" . $allText . "{$allCount}</span>
508
+ <i class='fa fa-angle-down rt-arrow-angle' aria-hidden='true'></i>
509
+ </span>";
510
+ $sT .= '<span class="term-dropdown rt-filter-dropdown">';
511
+ $sT .= $item;
512
+ $sT .= '</span>';
513
+ $sT .= "</div>";
514
+ }
515
+ if ( $action_term === $id ) {
516
+ $selectedSubTerms = $sT;
517
+ }
518
+ }
519
+ $postCount = ( $post_count ? " (<span class='rt-post-count'>{$term['count']}</span>)" : null );
520
+ if ( $action_term && $action_term == $id ) {
521
+ $termDefaultText = $term['name'] . $postCount;
522
+ $dataTerm = $id;
523
+ }
524
+ if ( is_array( $taxFilterTerms ) && ! empty( $taxFilterTerms ) ) {
525
+ if ( $taxFilterOperator == "NOT IN" ) {
526
+ if ( ! in_array( $id, $taxFilterTerms ) && $action_term != $id ) {
527
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$id}'><span class='rt-text'>{$term['name']}{$postCount}</span>{$sT}</span>";
528
+ }
529
+ } else {
530
+ if ( in_array( $id, $taxFilterTerms ) && $action_term != $id ) {
531
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$id}'><span class='rt-text'>{$term['name']}{$postCount}</span>{$sT}</span>";
532
+ }
533
+ }
534
+ } else {
535
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$id}'><span class='rt-text'>{$term['name']}{$postCount}</span>{$sT}</span>";
536
+ }
537
+ $i ++;
538
+ }
539
+ }
540
+ $pAllCount = null;
541
+ if ( $post_count ) {
542
+ $pAllCount = " (<span class='rt-post-count'>{$pCount}</span>)";
543
+ if ( ! $action_term ) {
544
+ $termDefaultText = $termDefaultText . $pAllCount;
545
+ }
546
+ }
547
+ if ( ! $hide_all_button ) {
548
+ $htmlButton = "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='all'><span class='rt-text'>" . $allText
549
+ . "{$pAllCount}</span></span>" . $htmlButton;
550
+ }
551
+ $htmlButton = sprintf( '<span class="term-dropdown rt-filter-dropdown">%s</span>', $htmlButton );
552
+
553
+ $showAllhtml = '<span class="term-default rt-filter-dropdown-default" data-term="' . $dataTerm . '">
554
+ <span class="rt-text">' . $termDefaultText . '</span>
555
+ <i class="fa fa-angle-down rt-arrow-angle" aria-hidden="true"></i>
556
+ </span>';
557
+
558
+ $data .= $showAllhtml . $htmlButton;
559
+ $data .= '</div>' . $selectedSubTerms;
560
+ } else {
561
+ $bCount = 0;
562
+ $bItems = null;
563
+ if ( ! empty( $terms ) ) {
564
+ foreach ( $terms as $id => $term ) {
565
+ $bCount = $bCount + absint( $term['count'] );
566
+ $sT = null;
567
+ if ( $taxHierarchical ) {
568
+ $subTerms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true, $id );
569
+ if ( ! empty( $subTerms ) ) {
570
+ $sT .= "<div class='rt-filter-sub-tax sub-button-group'>";
571
+ foreach ( $subTerms as $stId => $t ) {
572
+ $sTPostCount = ( $post_count ? " (<span class='rt-post-count'>{$t['count']}</span>)" : null );
573
+ $sT .= "<span class='rt-filter-button-item' data-term='{$stId}'>{$t['name']}{$sTPostCount}</span>";
574
+ }
575
+ $sT .= "</div>";
576
+ if ( $action_term === $id ) {
577
+ $selectedSubTermsForButton = $sT;
578
+ }
579
+ }
580
+ }
581
+ $postCount = ( $post_count ? " (<span class='rt-post-count'>{$term['count']}</span>)" : null );
582
+ $termSelected = null;
583
+ if ( $isTermSelected && $id == $action_term ) {
584
+ $termSelected = " selected";
585
+ }
586
+ if ( is_array( $taxFilterTerms ) && ! empty( $taxFilterTerms ) ) {
587
+ if ( $taxFilterOperator == "NOT IN" ) {
588
+ if ( ! in_array( $id, $taxFilterTerms ) ) {
589
+ $bItems .= "<span class='term-button-item rt-filter-button-item {$termSelected}' data-term='{$id}'>{$term['name']}{$postCount}{$sT}</span>";
590
+ }
591
+ } else {
592
+ if ( in_array( $id, $taxFilterTerms ) ) {
593
+ $bItems .= "<span class='term-button-item rt-filter-button-item {$termSelected}' data-term='{$id}'>{$term['name']}{$postCount}{$sT}</span>";
594
+ }
595
+ }
596
+ } else {
597
+ $bItems .= "<span class='term-button-item rt-filter-button-item {$termSelected}' data-term='{$id}'>{$term['name']}{$postCount}{$sT}</span>";
598
+ }
599
+ }
600
+ }
601
+ $data .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-button-wrap{$postCountClass}' data-taxonomy='{$taxFilter}'>";
602
+ if ( ! $hide_all_button ) {
603
+ $pCountH = ( $post_count ? " (<span class='rt-post-count'>{$bCount}</span>)" : null );
604
+ $data .= "<span class='term-button-item rt-filter-button-item {$allSelect}' data-term='all'>" . $allText . "{$pCountH}</span>";
605
+ }
606
+ $data .= $bItems;
607
+ $data .= "</div>";
608
+ }
609
+ }
610
+
611
+ // Author filter
612
+ if ( in_array( '_author_filter', $filters ) ) {
613
+ $filterType = ( ! empty( $scMeta['tgp_filter_type'] ) ? $scMeta['tgp_filter_type'] : null );
614
+ $post_count = ( ! empty( $scMeta['tpg_post_count'] ) ? $scMeta['tpg_post_count'] : null );
615
+ $postCountClass = ( $post_count ? " has-post-count" : null );
616
+
617
+ $users = get_users( apply_filters( 'tpg_author_arg', [] ) );
618
+
619
+ $allSelect = " selected";
620
+ $isTermSelected = false;
621
+ if ( $action_term && $taxFilter ) {
622
+ $isTermSelected = true;
623
+ $allSelect = null;
624
+ }
625
+ if ( ! $filterType || $filterType == 'dropdown' ) {
626
+ $data .= "<div class='rt-filter-item-wrap rt-author-filter rt-filter-dropdown-wrap parent-dropdown-wrap{$postCountClass}'>";
627
+ $termDefaultText = $allText;
628
+ $dataAuthor = 'all';
629
+ $htmlButton = "";
630
+ $htmlButton .= '<span class="author-dropdown rt-filter-dropdown">';
631
+ if ( ! empty( $users ) ) {
632
+ foreach ( $users as $user ) {
633
+ if ( is_array( $filterAuthors ) && ! empty( $filterAuthors ) ) {
634
+ if ( in_array( $user->ID, $filterAuthors ) ) {
635
+ if ( $action_term == $user->ID ) {
636
+ $termDefaultText = $user->display_name;
637
+ $dataTerm = $user->ID;
638
+ } else {
639
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$user->ID}'>{$user->display_name}</span>";
640
+ }
641
+ }
642
+ } else {
643
+ if ( $action_term == $user->ID ) {
644
+ $termDefaultText = $user->display_name;
645
+ $dataTerm = $user->ID;
646
+ } else {
647
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$user->ID}'>{$user->display_name}</span>";
648
+ }
649
+ }
650
+ }
651
+ }
652
+
653
+ if ( $isTermSelected ) {
654
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='all'>" . $allText . "{$pAllCount}</span>";
655
+ }
656
+ $htmlButton .= '</span>';
657
+
658
+ $showAllhtml = '<span class="term-default rt-filter-dropdown-default" data-term="' . $dataAuthor . '">
659
+ <span class="rt-text">' . $termDefaultText . '</span>
660
+ <i class="fa fa-angle-down rt-arrow-angle" aria-hidden="true"></i>
661
+ </span>';
662
+
663
+ $data .= $showAllhtml . $htmlButton;
664
+ $data .= '</div>';
665
+ } else {
666
+ $bCount = 0;
667
+ $bItems = null;
668
+ if ( ! empty( $users ) ) {
669
+ foreach ( $users as $user ) {
670
+ if ( is_array( $filterAuthors ) && ! empty( $filterAuthors ) ) {
671
+ if ( in_array( $user->ID, $filterAuthors ) ) {
672
+ $bItems .= "<span class='author-button-item rt-filter-button-item data-author='{$user->ID}'>{$user->display_name}</span>";
673
+ }
674
+ } else {
675
+ $bItems .= "<span class='author-button-item rt-filter-button-item data-author='{$user->ID}'>{$user->display_name}</span>";
676
+ }
677
+ }
678
+ }
679
+ $data .= "<div class='rt-filter-item-wrap rt-author-filter rt-filter-button-wrap{$postCountClass}' data-taxonomy='{$taxFilter}'>";
680
+ if ( ! $hide_all_button ) {
681
+ $pCountH = ( $post_count ? " (<span class='rt-post-count'>{$bCount}</span>)" : null );
682
+ $data .= "<span class='author-button-item rt-filter-button-item {$allSelect}' data-author='all'>" . $allText . "{$pCountH}</span>";
683
+ }
684
+ $data .= $bItems;
685
+ $data .= "</div>";
686
+ }
687
+ }
688
+
689
+ if ( in_array( '_search', $filters ) ) {
690
+ $data .= '<div class="rt-filter-item-wrap rt-search-filter-wrap">';
691
+ $data .= sprintf( '<input type="text" class="rt-search-input" placeholder="%s">', esc_html__( "Search...", 'the-post-grid' ) );
692
+ $data .= "<span class='rt-action'>&#128269;</span>";
693
+ $data .= "<span class='rt-loading'></span>";
694
+ $data .= '</div>';
695
+ }
696
+
697
+ if ( in_array( '_order_by', $filters ) ) {
698
+ $wooFeature = ( $postType == "product" ? true : false );
699
+ $orders = Options::rtPostOrderBy( $wooFeature );
700
+ $action_orderby = ( ! empty( $args['orderby'] ) ? trim( $args['orderby'] ) : "none" );
701
+ if ( $action_orderby == 'none' ) {
702
+ $action_orderby_label = __( "Sort By None", "the-post-grid" );
703
+ } elseif ( in_array( $action_orderby, array_keys( Options::rtMetaKeyType() ) ) ) {
704
+ $action_orderby_label = __( "Meta value", "the-post-grid" );
705
+ } else {
706
+ $action_orderby_label = $orders[ $action_orderby ];
707
+ }
708
+ if ( $action_orderby !== 'none' ) {
709
+ $orders['none'] = __( "Sort By None", "the-post-grid" );
710
+ }
711
+ $data .= '<div class="rt-filter-item-wrap rt-order-by-action rt-filter-dropdown-wrap">';
712
+ $data .= "<span class='order-by-default rt-filter-dropdown-default' data-order-by='{$action_orderby}'>
713
+ <span class='rt-text-order-by'>{$action_orderby_label}</span>
714
+ <i class='fa fa-angle-down rt-arrow-angle' aria-hidden='true'></i>
715
+ </span>";
716
+ $data .= '<span class="order-by-dropdown rt-filter-dropdown">';
717
+
718
+ foreach ( $orders as $orderKey => $order ) {
719
+ $data .= '<span class="order-by-dropdown-item rt-filter-dropdown-item" data-order-by="' . $orderKey . '">' . $order . '</span>';
720
+ }
721
+ $data .= '</span>';
722
+ $data .= '</div>';
723
+ }
724
+
725
+ if ( in_array( '_sort_order', $filters ) ) {
726
+ $action_order = ( ! empty( $args['order'] ) ? strtoupper( trim( $args['order'] ) ) : "DESC" );
727
+ $data .= '<div class="rt-filter-item-wrap rt-sort-order-action">';
728
+ $data .= "<span class='rt-sort-order-action-arrow' data-sort-order='{$action_order}'>&nbsp;<span></span></span>";
729
+ $data .= '</div>';
730
+ }
731
+
732
+ $data .= "</div>$selectedSubTermsForButton</div>";
733
+ }
734
+
735
+ $data .= "<div data-title='" . __( "Loading ...",
736
+ 'the-post-grid' ) . "' class='rt-row rt-content-loader {$layout} {$masonryG} {$preLoader}'>";
737
+ if ( $gridQuery->have_posts() ) {
738
+ if ( $isCarousel ) {
739
+ $cOpt = ! empty( $scMeta['carousel_property'] ) ? $scMeta['carousel_property'] : [];
740
+ $slider_js_options = apply_filters( 'rttpg_slider_js_options',
741
+ [
742
+ "speed" => ! empty( $scMeta['tpg_carousel_speed'] ) ? absint( $scMeta['tpg_carousel_speed'] ) : 250,
743
+ "autoPlayTimeOut" => ! empty( $scMeta['tpg_carousel_autoplay_timeout'] ) ? absint( $scMeta['tpg_carousel_autoplay_timeout'] ) : 5000,
744
+ "autoPlay" => in_array( 'auto_play', $cOpt ) ? true : false,
745
+ "stopOnHover" => in_array( 'stop_hover', $cOpt ) ? true : false,
746
+ "nav" => in_array( 'nav_button', $cOpt ) ? true : false,
747
+ "dots" => in_array( 'pagination', $cOpt ) ? true : false,
748
+ "loop" => in_array( 'loop', $cOpt ) ? true : false,
749
+ "lazyLoad" => in_array( 'lazyLoad', $cOpt ) ? true : false,
750
+ "autoHeight" => in_array( 'auto_height', $cOpt ) ? true : false,
751
+ "rtl" => in_array( 'rtl', $cOpt ) ? true : false,
752
+ ],
753
+ $scMeta );
754
+ $data .= sprintf( '<div class="rt-swiper-holder swiper" data-rtowl-options="%s"><div class="swiper-wrapper">',
755
+ htmlspecialchars( wp_json_encode( $slider_js_options ) ) );
756
+ }
757
+ $isotope_filter = null;
758
+ if ( $isIsotope ) {
759
+ $isotope_filter = isset( $scMeta['isotope_filter'] ) ? $scMeta['isotope_filter'] : null;
760
+ $isotope_dropdown_filter = isset( $scMeta['isotope_filter_dropdown'] ) ? $scMeta['isotope_filter_dropdown'] : null;
761
+ $selectedTerms = [];
762
+ if ( isset( $scMeta['post_filter'] )
763
+ && in_array( 'tpg_taxonomy',
764
+ $scMeta['post_filter'] )
765
+ && isset( $scMeta['tpg_taxonomy'] )
766
+ && in_array( $isotope_filter,
767
+ $scMeta['tpg_taxonomy'] )
768
+ ) {
769
+ $selectedTerms = ( isset( $scMeta[ 'term_' . $isotope_filter ] ) ? $scMeta[ 'term_' . $isotope_filter ] : [] );
770
+ }
771
+ global $wp_version;
772
+ if ( version_compare( $wp_version, '4.5', '>=' ) ) {
773
+ $terms = get_terms( $isotope_filter,
774
+ [
775
+ 'meta_key' => '_rt_order',
776
+ 'orderby' => 'meta_value_num',
777
+ 'order' => 'ASC',
778
+ 'hide_empty' => false,
779
+ 'include' => $selectedTerms,
780
+ ] );
781
+ } else {
782
+ $terms = get_terms( $isotope_filter,
783
+ [
784
+ 'orderby' => 'name',
785
+ 'order' => 'ASC',
786
+ 'hide_empty' => false,
787
+ 'include' => $selectedTerms,
788
+ ] );
789
+ }
790
+ $data .= '<div class="tpg-iso-filter">';
791
+ $htmlButton = $drop = null;
792
+ $fSelectTrigger = false;
793
+ if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
794
+ foreach ( $terms as $term ) {
795
+ $tItem = ! empty( $scMeta['isotope_default_filter'] ) ? $scMeta['isotope_default_filter'] : null;
796
+ $fSelected = null;
797
+ if ( $tItem == $term->term_id ) {
798
+ $fSelected = 'selected';
799
+ $fSelectTrigger = true;
800
+ }
801
+ $htmlButton .= sprintf( '<button class="rt-iso-btn-%s%s" data-filter=".iso_%d">%s</button>',
802
+ esc_attr( $term->slug ),
803
+ $fSelected ? " " . $fSelected : '',
804
+ $term->term_id,
805
+ $term->name
806
+ );
807
+ $drop .= "<option value='.iso_{$term->term_id}' {$fSelected}>{$term->name}</option>";
808
+ }
809
+ }
810
+ if ( empty( $scMeta['isotope_filter_show_all'] ) ) {
811
+ $fSelect = ( $fSelectTrigger ? null : 'class="selected"' );
812
+ $htmlButton = "<button data-filter='*' {$fSelect}>" . $arg['show_all_text'] . "</button>" . $htmlButton;
813
+ $drop = "<option value='*' {$fSelect}>{$arg['show_all_text']}</option>" . $drop;
814
+ }
815
+ $filter_count = ! empty( $scMeta['isotope_filter_count'] ) ? true : false;
816
+ $filter_url = ! empty( $scMeta['isotope_filter_url'] ) ? true : false;
817
+ $htmlButton
818
+ = "<div id='iso-button-{$rand}' class='rt-tpg-isotope-buttons button-group filter-button-group option-set' data-url='{$filter_url}' data-count='{$filter_count}'>{$htmlButton}</div>";
819
+
820
+ if ( $isotope_dropdown_filter ) {
821
+ $data .= "<select class='isotope-dropdown-filter'>{$drop}</select>";
822
+ } else {
823
+ $data .= $htmlButton;
824
+ }
825
+ if ( ! empty( $scMeta['isotope_search_filter'] ) ) {
826
+ $data .= "<div class='iso-search'><input type='text' class='iso-search-input' placeholder='" . __( 'Search',
827
+ 'the-post-grid' ) . "' /></div>";
828
+ }
829
+ $data .= '</div>';
830
+
831
+ $data .= "<div class='rt-tpg-isotope' id='iso-tpg-{$rand}'>";
832
+ }
833
+
834
+ $l = $offLoop = 0;
835
+ $offsetBigHtml = $offsetSmallHtml = null;
836
+ $tgCol = 2;
837
+ if ( $layout == 'layout4' ) {
838
+ $tgCol = round( 12 / $dCol );
839
+ }
840
+ $gridPostCount = 0;
841
+ $arg['totalPost'] = $gridQuery->post_count;
842
+
843
+ while ( $gridQuery->have_posts() ) : $gridQuery->the_post();
844
+ if ( $tgCol == $l ) {
845
+ if ( $this->l4toggle ) {
846
+ $this->l4toggle = false;
847
+ } else {
848
+ $this->l4toggle = true;
849
+ }
850
+ $l = 0;
851
+ }
852
+ $arg['postCount'] = $gridPostCount ++;
853
+ $pID = get_the_ID();
854
+ $arg['pID'] = $pID;
855
+ $arg['title'] = Fns::get_the_title( $pID, $arg );
856
+ $arg['pLink'] = get_permalink();
857
+ $arg['toggle'] = $this->l4toggle;
858
+ $arg['author'] = '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author() . '</a>';
859
+ $comments_number = get_comments_number( $pID );
860
+ $comments_text = sprintf( '(%s)', number_format_i18n( $comments_number ) );
861
+ $arg['date'] = get_the_date();
862
+ $arg['excerpt'] = Fns::get_the_excerpt( $pID, $arg );
863
+ $arg['categories'] = get_the_term_list( $pID, 'category', null, ', ' );
864
+ $arg['tags'] = get_the_term_list( $pID, 'post_tag', null, ', ' );
865
+ $arg['responsiveCol'] = [ $dCol, $tCol, $mCol ];
866
+ if ( $isIsotope ) {
867
+ $termAs = wp_get_post_terms( $pID, $isotope_filter, [ "fields" => "all" ] );
868
+ $isoFilter = [];
869
+ if ( ! empty( $termAs ) ) {
870
+ foreach ( $termAs as $term ) {
871
+ $isoFilter[] = "iso_" . $term->term_id;
872
+ $isoFilter[] = "rt-item-" . esc_attr( $term->slug );
873
+ }
874
+ }
875
+ $arg['isoFilter'] = ! empty( $isoFilter ) ? implode( " ", $isoFilter ) : '';
876
+ }
877
+ $deptClass = null;
878
+ if ( ! empty( $deptAs ) ) {
879
+ foreach ( $deptAs as $dept ) {
880
+ $deptClass .= " " . $dept->slug;
881
+ }
882
+ }
883
+ if ( comments_open() ) {
884
+ $arg['comment'] = "<a href='" . get_comments_link( $pID ) . "'>{$comments_text} </a>";
885
+ } else {
886
+ $arg['comment'] = "{$comments_text}";
887
+ }
888
+ $imgSrc = null;
889
+ $arg['smallImgSrc'] = ! $fImg ? Fns::getFeatureImageSrc( $pID,
890
+ $fSmallImgSize,
891
+ $mediaSource,
892
+ $defaultImgId,
893
+ $customSmallImgSize ) : null;
894
+ if ( $isOffset ) {
895
+ if ( $offLoop == 0 ) {
896
+ $arg['imgSrc'] = ! $fImg ? Fns::getFeatureImageSrc( $pID,
897
+ $fImgSize,
898
+ $mediaSource,
899
+ $defaultImgId,
900
+ $customImgSize ) : null;
901
+ $arg['offset'] = 'big';
902
+ $offsetBigHtml = Fns::get_template_html( 'layouts/' . $layout, $arg );
903
+ } else {
904
+ $arg['offset'] = 'small';
905
+ $arg['offsetCol'] = [ $dCol, $tCol, $mCol ];
906
+ $arg['imgSrc'] = ! $fImg ? Fns::getFeatureImageSrc( $pID,
907
+ 'thumbnail',
908
+ $mediaSource,
909
+ $defaultImgId,
910
+ $customImgSize ) : null;
911
+ $offsetSmallHtml .= Fns::get_template_html( 'layouts/' . $layout, $arg );
912
+ }
913
+ } else {
914
+ $arg['imgSrc'] = ! $fImg ? Fns::getFeatureImageSrc( $pID,
915
+ $fImgSize,
916
+ $mediaSource,
917
+ $defaultImgId,
918
+ $customImgSize ) : null;
919
+ $data .= Fns::get_template_html( 'layouts/' . $layout, $arg );
920
+ }
921
+ $offLoop ++;
922
+ $l ++;
923
+ endwhile;
924
+ if ( $isOffset ) {
925
+ $oDCol = Fns::get_offset_col( $dCol );
926
+ $oTCol = Fns::get_offset_col( $tCol );
927
+ $oMCol = Fns::get_offset_col( $mCol );
928
+ if ( $layout == "offset03" || $layout == "offset04" ) {
929
+ $oDCol['big'] = $oTCol['big'] = $oDCol['small'] = $oTCol['small'] = 6;
930
+ $oMCol['big'] = $oMCol['small'] = 12;
931
+ } elseif ( $layout == "offset06" ) {
932
+ $oDCol['big'] = 7;
933
+ $oDCol['small'] = 5;
934
+ }
935
+ $data .= "<div class='rt-col-md-{$oDCol['big']} rt-col-sm-{$oTCol['big']} rt-col-xs-{$oMCol['big']}'><div class='rt-row'>{$offsetBigHtml}</div></div>";
936
+ $data .= "<div class='rt-col-md-{$oDCol['small']} rt-col-sm-{$oTCol['small']} rt-col-xs-{$oMCol['small']}'><div class='rt-row offset-small-wrap'>{$offsetSmallHtml}</div></div>";
937
+ }
938
+ if ( $isIsotope || $isCarousel ) {
939
+ $data .= '</div>'; // End isotope / Carousel item holder
940
+ if ( $isCarousel ) {
941
+ if ( in_array( 'pagination', $cOpt ) ) {
942
+ $data .= '<div class="swiper-pagination"></div>';
943
+ }
944
+ $data .= '</div>';
945
+ if ( in_array( 'nav_button', $cOpt ) ) {
946
+ $data .= '<div class="swiper-navigation"><div class="slider-btn swiper-button-prev"></div><div class="slider-btn swiper-button-next"></div></div>';
947
+ }
948
+ }
949
+ }
950
+ } else {
951
+ $not_found_text = isset( $scMeta['tgp_not_found_text'] ) && ! empty( $scMeta['tgp_not_found_text'] ) ? esc_attr( $scMeta['tgp_not_found_text'] )
952
+ : __( 'No post found', 'the-post-grid' );
953
+ $data .= "<p>" . $not_found_text . "</p>";
954
+ }
955
+ $data .= $preLoaderHtml;
956
+ $data .= "</div>"; // End row
957
+ $htmlUtility = null;
958
+ if ( $pagination && ! $isCarousel ) {
959
+ if ( $isOffset || $isGridHover ) {
960
+ $posts_loading_type = "page_prev_next";
961
+ $htmlUtility .= "<div class='rt-cb-page-prev-next'>
962
+ <span class='rt-cb-prev-btn'><i class='fa fa-angle-left' aria-hidden='true'></i></span>
963
+ <span class='rt-cb-next-btn'><i class='fa fa-angle-right' aria-hidden='true'></i></span>
964
+ </div>";
965
+ } else {
966
+ if ( $posts_loading_type == "pagination" ) {
967
+ if ( $isGrid && empty( $filters ) ) {
968
+ $htmlUtility .= Fns::rt_pagination( $gridQuery->max_num_pages,
969
+ $args['posts_per_page'] );
970
+ }
971
+ } elseif ( $posts_loading_type == "pagination_ajax" && ! $isIsotope ) {
972
+ if ( $isGrid ) {
973
+ $htmlUtility .= "<div class='rt-page-numbers'></div>";
974
+ } else {
975
+ $htmlUtility .= Fns::rt_pagination( $gridQuery->max_num_pages,
976
+ $args['posts_per_page'],
977
+ true );
978
+ }
979
+ } elseif ( $posts_loading_type == "load_more" ) {
980
+ if ( $isGrid ) {
981
+ $htmlUtility .= "<div class='rt-loadmore-btn rt-loadmore-action rt-loadmore-style'>
982
+ <span class='rt-loadmore-text'>" . __( 'Load More', 'the-post-grid' ) . "</span>
983
+ <div class='rt-loadmore-loading rt-ball-scale-multiple rt-2x'><div></div><div></div><div></div></div>
984
+ </div>";
985
+ } else {
986
+ $htmlUtility .= "<div class='rt-tpg-load-more'>
987
+ <button data-sc-id='' data-paged='2'>" . __( 'Load More',
988
+ 'the-post-grid' ) . "</button>
989
+ </div>";
990
+ }
991
+ } elseif ( $posts_loading_type == "load_on_scroll" ) {
992
+ if ( $isGrid ) {
993
+ $htmlUtility .= "<div class='rt-infinite-action'>
994
+ <div class='rt-infinite-loading la-fire la-2x'>
995
+ <div></div>
996
+ <div></div>
997
+ <div></div>
998
+ </div>
999
+ </div>";
1000
+ } else {
1001
+ $htmlUtility .= "<div class='rt-tpg-scroll-load-more' data-trigger='1' data-sc-id='{$scID}' data-paged='2'></div>";
1002
+ }
1003
+ }
1004
+ }
1005
+ }
1006
+
1007
+ if ( $htmlUtility ) {
1008
+ $l4toggle = null;
1009
+ if ( $layout == "layout4" ) {
1010
+ $l4toggle = "data-l4toggle='{$this->l4toggle}'";
1011
+ }
1012
+ if ( $isGrid || $isOffset || $isWooCom ) {
1013
+ $data .= "<div class='rt-pagination-wrap' data-total-pages='{$gridQuery->max_num_pages}' data-posts-per-page='{$args['posts_per_page']}' data-type='{$posts_loading_type}' {$l4toggle} >"
1014
+ . $htmlUtility . "</div>";
1015
+ } else {
1016
+ $data .= "<div class='rt-tpg-utility' {$l4toggle}>" . $htmlUtility . "</div>";
1017
+ }
1018
+ }
1019
+
1020
+ $data .= "</div>"; // container rt-tpg
1021
+
1022
+
1023
+ } else {
1024
+ $msg = __( 'Session Error !!', 'the-post-grid' );
1025
+ }
1026
+
1027
+ wp_send_json( [
1028
+ 'error' => $error,
1029
+ 'msg' => $msg,
1030
+ 'data' => $data,
1031
+ ] );
1032
+ die();
1033
+ }
1034
+
1035
+ }
app/Controllers/Admin/MetaController.php ADDED
@@ -0,0 +1,373 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace RT\ThePostGrid\Controllers\Admin;
5
+
6
+
7
+ use RT\ThePostGrid\Helpers\Fns;
8
+ use RT\ThePostGrid\Helpers\Options;
9
+
10
+ class MetaController {
11
+ function __construct() {
12
+ // actions
13
+ add_action( 'admin_head', array( $this, 'admin_head' ) );
14
+ add_action( 'edit_form_after_title', array( $this, 'tpg_sc_after_title' ) );
15
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
16
+ add_action( 'save_post', array( $this, 'save_post' ), 10, 2 );
17
+ add_filter( 'manage_edit-rttpg_columns', array( $this, 'arrange_rttpg_columns' ) );
18
+ add_action( 'manage_rttpg_posts_custom_column', array( $this, 'manage_rttpg_columns' ), 10, 2 );
19
+ }
20
+
21
+ public function manage_rttpg_columns( $column ) {
22
+ switch ( $column ) {
23
+ case 'shortcode':
24
+ echo '<input type="text" onfocus="this.select();" readonly="readonly" value="[the-post-grid id=&quot;' . get_the_ID() . '&quot; title=&quot;' . get_the_title() . '&quot;]" class="large-text code rt-code-sc">';
25
+ break;
26
+ default:
27
+ break;
28
+ }
29
+ }
30
+
31
+ function arrange_rttpg_columns( $columns ) {
32
+ $shortcode = array( 'shortcode' => __( 'Shortcode', 'the-post-grid' ) );
33
+
34
+ return array_slice( $columns, 0, 2, true ) + $shortcode + array_slice( $columns, 1, null, true );
35
+ }
36
+
37
+ function admin_enqueue_scripts() {
38
+ global $pagenow, $typenow;
39
+
40
+ // validate page
41
+ if ( ! in_array( $pagenow, array( 'post.php', 'post-new.php' ) ) ) {
42
+ return;
43
+ }
44
+ if ( $typenow != rtTPG()->post_type ) {
45
+ return;
46
+ }
47
+
48
+ wp_dequeue_script( 'autosave' );
49
+ wp_enqueue_media();
50
+
51
+ $select2Id = 'rt-select2';
52
+ if ( class_exists( 'WPSEO_Admin_Asset_Manager' ) && class_exists( 'Avada' ) ) {
53
+ $select2Id = 'yoast-seo-select2';
54
+ } elseif ( class_exists( 'WPSEO_Admin_Asset_Manager' ) ) {
55
+ $select2Id = 'yoast-seo-select2';
56
+ } elseif ( class_exists( 'Avada' ) ) {
57
+ $select2Id = 'select2-avada-js';
58
+ }
59
+
60
+ // scripts
61
+ wp_enqueue_script( array(
62
+ 'jquery',
63
+ 'jquery-ui-datepicker',
64
+ 'wp-color-picker',
65
+ $select2Id,
66
+ 'rt-image-load-js',
67
+ 'rt-isotope-js',
68
+ 'rt-tpg-admin',
69
+ 'rt-tpg-admin-preview',
70
+ ) );
71
+
72
+ // styles
73
+ wp_enqueue_style( array(
74
+ 'wp-color-picker',
75
+ 'rt-select2',
76
+ 'rt-fontawsome',
77
+ 'rt-tpg-admin',
78
+ 'rt-tpg-admin-preview',
79
+ ) );
80
+
81
+ wp_localize_script( 'rt-tpg-admin', 'rttpg',
82
+ array(
83
+ 'nonceID' => rtTPG()->nonceId(),
84
+ 'nonce' => wp_create_nonce( rtTPG()->nonceText() ),
85
+ 'ajaxurl' => admin_url( 'admin-ajax.php' )
86
+ ) );
87
+
88
+ }
89
+
90
+ function admin_head() {
91
+
92
+ add_meta_box(
93
+ 'rttpg_meta',
94
+ __( 'Short Code Generator', 'the-post-grid' ),
95
+ array( $this, 'rttpg_meta_settings_selection' ),
96
+ rtTPG()->post_type,
97
+ 'normal',
98
+ 'high' );
99
+
100
+ add_meta_box(
101
+ rtTPG()->post_type . '_sc_preview_meta',
102
+ __( 'Layout Preview', 'the-post-grid' ),
103
+ array( $this, 'tpg_sc_preview_selection' ),
104
+ rtTPG()->post_type,
105
+ 'normal',
106
+ 'high' );
107
+
108
+ add_meta_box(
109
+ 'rt_plugin_sc_pro_information',
110
+ __( 'Documentation', 'the-post-grid' ),
111
+ array( $this, 'rt_plugin_sc_pro_information' ),
112
+ rtTPG()->post_type,
113
+ 'side',
114
+ 'low'
115
+ );
116
+
117
+ }
118
+
119
+ function rt_plugin_sc_pro_information( $post ) {
120
+ $html = '';
121
+ if ( $post === 'settings' ) {
122
+ $html .= '<div class="rt-document-box rt-update-pro-btn-wrap">
123
+ <a href="https://www.radiustheme.com/the-post-grid-pro-for-wordpress/" target="_blank" class="rt-update-pro-btn">' . __( "Update Pro To Get More Features", "the-post-grid" ) . '</a>
124
+ </div>';
125
+ } else {
126
+ if ( ! rtTPG()->hasPro() ) {
127
+ $html .= sprintf( '<div class="rt-document-box"><div class="rt-box-icon"><i class="dashicons dashicons-megaphone"></i></div><div class="rt-box-content"><h3 class="rt-box-title">Pro Features</h3>%s</div></div>', Options::get_pro_feature_list() );
128
+ }
129
+ }
130
+ $html .= sprintf( '<div class="rt-document-box">
131
+ <div class="rt-box-icon"><i class="dashicons dashicons-media-document"></i></div>
132
+ <div class="rt-box-content">
133
+ <h3 class="rt-box-title">%1$s</h3>
134
+ <p>%2$s</p>
135
+ <a href="https://www.radiustheme.com/docs/the-post-grid/" target="_blank" class="rt-admin-btn">%1$s</a>
136
+ </div>
137
+ </div>',
138
+ __( "Documentation", 'the-post-grid' ),
139
+ __( "Get started by spending some time with the documentation we included step by step process with screenshots with video.", 'the-post-grid' )
140
+ );
141
+
142
+ $html .= '<div class="rt-document-box">
143
+ <div class="rt-box-icon"><i class="dashicons dashicons-sos"></i></div>
144
+ <div class="rt-box-content">
145
+ <h3 class="rt-box-title">Need Help?</h3>
146
+ <p>Stuck with something? Please create a
147
+ <a href="https://www.radiustheme.com/contact/">ticket here</a> or post on <a href="https://www.facebook.com/groups/234799147426640/">facebook group</a>. For emergency case join our <a href="https://www.radiustheme.com/">live chat</a>.</p>
148
+ <a href="https://www.radiustheme.com/contact/" target="_blank" class="rt-admin-btn">' . __( "Get Support", "the-post-grid" ) . '</a>
149
+ </div>
150
+ </div>';
151
+
152
+ echo $html;
153
+ }
154
+
155
+ /**
156
+ * Preview section
157
+ */
158
+ function tpg_sc_preview_selection() {
159
+ $html = null;
160
+ $html .= "<div class='rt-response'></div>";
161
+ $html .= "<div id='tpg-preview-container'></div>";
162
+ echo $html;
163
+
164
+ }
165
+
166
+
167
+ function tpg_sc_after_title( $post ) {
168
+
169
+ if ( rtTPG()->post_type !== $post->post_type ) {
170
+ return;
171
+ }
172
+ $html = null;
173
+ $html .= '<div class="postbox rt-after-title" style="margin-bottom: 0;"><div class="inside">';
174
+ $html .= '<p><input type="text" onfocus="this.select();" readonly="readonly" value="[the-post-grid id=&quot;' . $post->ID . '&quot; title=&quot;' . $post->post_title . '&quot;]" class="large-text code rt-code-sc">
175
+ <input type="text" onfocus="this.select();" readonly="readonly" value="&#60;&#63;php echo do_shortcode( &#39;[the-post-grid id=&quot;' . $post->ID . '&quot; title=&quot;' . $post->post_title . '&quot;]&#39; ); &#63;&#62;" class="large-text code rt-code-sc">
176
+ </p>';
177
+ $html .= '</div></div>';
178
+
179
+ echo $html;
180
+ }
181
+
182
+ function rttpg_meta_settings_selection( $post ) {
183
+
184
+ $last_tab = trim( get_post_meta( $post->ID, '_tpg_last_active_tab', true ) );
185
+ $last_tab = $last_tab ? $last_tab : 'sc-post-post-source';
186
+ $post = array(
187
+ 'post' => $post
188
+ );
189
+ wp_nonce_field( rtTPG()->nonceText(), rtTPG()->nonceId() );
190
+ $html = null;
191
+ $html .= '<div id="sc-tabs" class="rttpg-wrapper rt-tab-container rt-setting-holder">';
192
+ $html .= sprintf( '<ul class="rt-tab-nav">
193
+ <li%s><a href="#sc-post-post-source">%s</a></li>
194
+ <li%s><a href="#sc-post-layout-settings">%s</a></li>
195
+ <li%s><a href="#sc-settings">%s</a></li>
196
+ <li%s><a href="#sc-field-selection">%s</a></li>
197
+ <li%s><a href="#sc-style">%s</a></li>
198
+ </ul>',
199
+ $last_tab == "sc-post-post-source" ? ' class="active"' : '',
200
+ __( 'Query Build', 'the-post-grid' ),
201
+ $last_tab == "sc-post-layout-settings" ? ' class="active"' : '',
202
+ __( 'Layout Settings', 'the-post-grid' ),
203
+ $last_tab == "sc-settings" ? ' class="active"' : '',
204
+ __( 'Settings', 'the-post-grid' ),
205
+ $last_tab == "sc-field-selection" ? ' class="active"' : '',
206
+ __( 'Field Selection', 'the-post-grid' ),
207
+ $last_tab == "sc-style" ? ' class="active"' : '',
208
+ __( 'Style', 'the-post-grid' )
209
+ );
210
+
211
+ $html .= sprintf( '<div id="sc-post-post-source" class="rt-tab-content"%s>', $last_tab == "sc-post-post-source" ? ' style="display:block"' : '' );
212
+ $html .= Fns::view( 'settings.post-source', $post, true );
213
+ $html .= '</div>';
214
+
215
+ $html .= sprintf( '<div id="sc-post-layout-settings" class="rt-tab-content"%s>', $last_tab == "sc-post-layout-settings" ? ' style="display:block"' : '' );
216
+ $html .= Fns::view( 'settings.layout-settings', $post, true );
217
+ $html .= '</div>';
218
+
219
+ $html .= sprintf( '<div id="sc-settings" class="rt-tab-content"%s>', $last_tab == "sc-settings" ? ' style="display:block"' : '' );
220
+ $html .= Fns::view( 'settings.sc-settings', $post, true );
221
+ $html .= '</div>';
222
+
223
+ $html .= sprintf( '<div id="sc-field-selection" class="rt-tab-content"%s>', $last_tab == "sc-field-selection" ? ' style="display:block"' : '' );
224
+ $html .= Fns::view( 'settings.item-fields', $post, true );
225
+ $html .= '</div>';
226
+
227
+ $html .= sprintf( '<div id="sc-style" class="rt-tab-content"%s>', $last_tab == "sc-style" ? ' style="display:block"' : '' );
228
+ $html .= Fns::view( 'settings.style', $post, true );
229
+ $html .= '</div>';
230
+ $html .= sprintf( '<input type="hidden" id="_tpg_last_active_tab" name="_tpg_last_active_tab" value="%s"/>', $last_tab );
231
+ $html .= '</div>';
232
+ echo $html;
233
+ }
234
+
235
+ function save_post( $post_id, $post ) {
236
+
237
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
238
+ return $post_id;
239
+ }
240
+
241
+ if ( ! Fns::verifyNonce() ) {
242
+ return $post_id;
243
+ }
244
+
245
+ if ( rtTPG()->post_type != $post->post_type ) {
246
+ return $post_id;
247
+ }
248
+
249
+ $mates = Fns::rtAllOptionFields();
250
+ foreach ( $mates as $metaKey => $field ) {
251
+ $rValue = ! empty( $_REQUEST[ $metaKey ] ) ? $_REQUEST[ $metaKey ] : null;
252
+ $value = Fns::sanitize( $field, $rValue );
253
+ if ( empty( $field['multiple'] ) ) {
254
+ update_post_meta( $post_id, $metaKey, $value );
255
+ } else {
256
+ delete_post_meta( $post_id, $metaKey );
257
+ if ( is_array( $value ) && ! empty( $value ) ) {
258
+ foreach ( $value as $item ) {
259
+ add_post_meta( $post_id, $metaKey, $item );
260
+ }
261
+ }
262
+ }
263
+ }
264
+
265
+ $post_filter = ( isset( $_REQUEST['post_filter'] ) ? $_REQUEST['post_filter'] : array() );
266
+ $advFilter = Options::rtTPAdvanceFilters();
267
+ foreach ( $advFilter['post_filter']['options'] as $filter => $fValue ) {
268
+ if ( $filter == 'tpg_taxonomy' ) {
269
+ delete_post_meta( $post_id, $filter );
270
+ if ( ! empty( $_REQUEST[ $filter ] ) && is_array( $_REQUEST[ $filter ] ) ) {
271
+ foreach ( $_REQUEST[ $filter ] as $tax ) {
272
+ if ( in_array( $filter, $post_filter ) ) {
273
+ add_post_meta( $post_id, $filter, trim( $tax ) );
274
+ }
275
+ delete_post_meta( $post_id, 'term_' . $tax );
276
+ $tt = isset( $_REQUEST[ 'term_' . $tax ] ) ? $_REQUEST[ 'term_' . $tax ] : array();
277
+ if ( is_array( $tt ) && ! empty( $tt ) && in_array( $filter, $post_filter ) ) {
278
+ foreach ( $tt as $termID ) {
279
+ add_post_meta( $post_id, 'term_' . $tax, trim( $termID ) );
280
+ }
281
+ }
282
+ $tto = isset( $_REQUEST[ 'term_operator_' . $tax ] ) ? $_REQUEST[ 'term_operator_' . $tax ] : null;
283
+ if ( $tto ) {
284
+ update_post_meta( $post_id, 'term_operator_' . $tax, trim( $tto ) );
285
+ }
286
+ }
287
+ $filterCount = isset( $_REQUEST[ $filter ] ) ? $_REQUEST[ $filter ] : array();
288
+ $tr = isset( $_REQUEST['taxonomy_relation'] ) ? $_REQUEST['taxonomy_relation'] : null;
289
+ if ( count( $filterCount ) > 1 && $tr ) {
290
+ update_post_meta( $post_id, 'taxonomy_relation', trim( $tr ) );
291
+ } else {
292
+ delete_post_meta( $post_id, 'taxonomy_relation' );
293
+ }
294
+
295
+ }
296
+ } else if ( $filter == 'author' ) {
297
+ delete_post_meta( $post_id, 'author' );
298
+ $authors = isset( $_REQUEST['author'] ) ? $_REQUEST['author'] : array();
299
+ if ( is_array( $authors ) && ! empty( $authors ) && in_array( 'author', $post_filter ) ) {
300
+ foreach ( $authors as $authorID ) {
301
+ add_post_meta( $post_id, 'author', trim( $authorID ) );
302
+ }
303
+ }
304
+ } else if ( $filter == 'tpg_post_status' ) {
305
+ delete_post_meta( $post_id, $filter );
306
+ $statuses = isset( $_REQUEST[ $filter ] ) ? $_REQUEST[ $filter ] : array();
307
+ if ( is_array( $statuses ) && ! empty( $statuses ) && in_array( $filter, $post_filter ) ) {
308
+ foreach ( $statuses as $post_status ) {
309
+ add_post_meta( $post_id, $filter, trim( $post_status ) );
310
+ }
311
+ }
312
+ } else if ( $filter == 's' ) {
313
+ delete_post_meta( $post_id, 's' );
314
+ $s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : null;
315
+ if ( $s && in_array( 's', $post_filter ) ) {
316
+ update_post_meta( $post_id, 's', sanitize_text_field( trim( $s ) ) );
317
+ }
318
+ } else if ( $filter == 'order' ) {
319
+ if ( in_array( 'order', $post_filter ) ) {
320
+ $order = isset( $_REQUEST['order'] ) ? $_REQUEST['order'] : null;
321
+ if ( $order && in_array( 'order', $post_filter ) ) {
322
+ update_post_meta( $post_id, 'order', sanitize_text_field( trim( $order ) ) );
323
+ }
324
+ $order_by = isset( $_REQUEST['order_by'] ) ? $_REQUEST['order_by'] : null;
325
+ if ( $order_by && in_array( 'order', $post_filter ) ) {
326
+ update_post_meta( $post_id, 'order_by', sanitize_text_field( trim( $order_by ) ) );
327
+ }
328
+ $tpg_meta_key = isset( $_REQUEST['tpg_meta_key'] ) ? $_REQUEST['tpg_meta_key'] : null;
329
+ if ( in_array( $order_by, array_keys( Options::rtMetaKeyType() ) ) && $tpg_meta_key && in_array( 'order', $post_filter ) ) {
330
+ update_post_meta( $post_id, 'tpg_meta_key', sanitize_text_field( trim( $tpg_meta_key ) ) );
331
+ } else {
332
+ delete_post_meta( $post_id, 'tpg_meta_key' );
333
+ }
334
+ } else {
335
+ delete_post_meta( $post_id, 'order' );
336
+ delete_post_meta( $post_id, 'tpg_meta_key' );
337
+ delete_post_meta( $post_id, 'order_by' );
338
+ }
339
+ } else if ( $filter == 'date_range' ) {
340
+ if ( in_array( 'date_range', $post_filter ) ) {
341
+ $start = ! empty( $_REQUEST[ $filter . '_start' ] ) ? $_REQUEST[ $filter . '_start' ] : null;
342
+ $end = ! empty( $_REQUEST[ $filter . '_end' ] ) ? $_REQUEST[ $filter . '_end' ] : null;
343
+ update_post_meta( $post_id, $filter . '_start', trim( $start ) );
344
+ update_post_meta( $post_id, $filter . '_end', trim( $end ) );
345
+ } else {
346
+ delete_post_meta( $post_id, $filter . '_start' );
347
+ delete_post_meta( $post_id, $filter . '_end' );
348
+ }
349
+ }
350
+ }
351
+
352
+ // Extra css
353
+
354
+ $extraFields = Options::extraStyle();
355
+ $extraTypes = array( 'color', 'size', 'weight', 'alignment' );
356
+
357
+ foreach ( $extraFields as $key => $title ) {
358
+ foreach ( $extraTypes as $type ) {
359
+ $newKew = $key . "_{$type}";
360
+ if ( isset( $_REQUEST[ $newKew ] ) ) {
361
+ $value = trim( $_REQUEST[ $newKew ] );
362
+ update_post_meta( $post_id, $newKew, $value );
363
+ }
364
+ }
365
+ }
366
+
367
+
368
+ if ( isset( $_POST['_tpg_last_active_tab'] ) && $active_tab = trim( $_POST['_tpg_last_active_tab'] ) ) {
369
+ update_post_meta( $post_id, '_tpg_last_active_tab', $_POST['_tpg_last_active_tab'] );
370
+ }
371
+
372
+ } // end function
373
+ }
app/Controllers/Admin/NoticeController.php ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace RT\ThePostGrid\Controllers\Admin;
5
+
6
+
7
+ class NoticeController {
8
+ public function __construct() {
9
+ $current = time();
10
+ $black_friday = mktime( 0, 0, 0, 11, 22, 2021 ) <= $current && $current <= mktime( 0, 0, 0, 12, 6, 2021 );
11
+
12
+ if ( $black_friday ) {
13
+ add_action( 'admin_init', [ $this, 'black_friday_notice' ] );
14
+ } else {
15
+ register_activation_hook( RT_THE_POST_GRID_PLUGIN_ACTIVE_FILE_NAME, [ $this, 'rttpg_activation_time' ] );
16
+ add_action( 'admin_init', [ $this, 'rttpg_check_installation_time' ] );
17
+ add_action( 'admin_init', [ __CLASS__, 'rttpg_spare_me' ], 5 );
18
+ }
19
+
20
+
21
+ }
22
+
23
+ public static function black_friday_notice() {
24
+ if ( get_option( 'rttpg_bf_2021' ) != '1' ) {
25
+ if ( ! isset( $GLOBALS['rt_tpg_2021_notice'] ) ) {
26
+ $GLOBALS['rt_tpg_2021_notice'] = 'rttpg_bf_2021';
27
+ self::notice();
28
+ }
29
+ }
30
+ }
31
+
32
+ static function notice() {
33
+
34
+ add_action( 'admin_enqueue_scripts', function () {
35
+ wp_enqueue_script( 'jquery' );
36
+ } );
37
+
38
+ add_action( 'admin_notices', function () {
39
+ $plugin_name = 'The Post Grid';
40
+ $download_link = 'https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/'; ?>
41
+ <div class="notice notice-info is-dismissible" data-rttpg-dismissable="rttpg_bf_2021"
42
+ style="display:grid;grid-template-columns: 100px auto;padding-top: 25px; padding-bottom: 22px;">
43
+ <img alt="<?php echo esc_attr( $plugin_name ) ?>"
44
+ src="<?php echo rtTPG()->get_assets_uri('images/icon-128x128.png'); ?>" width="74px"
45
+ height="74px" style="grid-row: 1 / 4; align-self: center;justify-self: center"/>
46
+ <h3 style="margin:0;"><?php echo sprintf( '%s Black Friday Deal!!', $plugin_name ) ?></h3>
47
+ <p style="margin:0 0 2px;">Don't miss out on our biggest sale of the year! Get your
48
+ <b><?php echo $plugin_name; ?> plan</b> with <b>UPTO 50% OFF</b>! Limited time offer expires on
49
+ December 5.
50
+ </p>
51
+ <p style="margin:0;">
52
+ <a class="button button-primary"
53
+ href="<?php echo esc_url( $download_link ) ?>"
54
+ target="_blank">Buy Now</a>
55
+ <a class="button button-dismiss" href="#">Dismiss</a>
56
+ </p>
57
+ </div>
58
+ <?php
59
+ } );
60
+
61
+ add_action( 'admin_footer', function () {
62
+ ?>
63
+ <script type="text/javascript">
64
+ (function ($) {
65
+ $(function () {
66
+ setTimeout(function () {
67
+ $('div[data-rttpg-dismissable] .notice-dismiss, div[data-rttpg-dismissable] .button-dismiss')
68
+ .on('click', function (e) {
69
+ e.preventDefault();
70
+ $.post(ajaxurl, {
71
+ 'action': 'rttpg_dismiss_admin_notice',
72
+ 'nonce': <?php echo json_encode( wp_create_nonce( 'rttpg-dismissible-notice' ) ); ?>
73
+ });
74
+ $(e.target).closest('.is-dismissible').remove();
75
+ });
76
+ }, 1000);
77
+ });
78
+ })(jQuery);
79
+ </script>
80
+ <?php
81
+ } );
82
+
83
+ add_action( 'wp_ajax_rttpg_dismiss_admin_notice', function () {
84
+ check_ajax_referer( 'rttpg-dismissible-notice', 'nonce' );
85
+
86
+ update_option( 'rttpg_bf_2021', '1' );
87
+ wp_die();
88
+ } );
89
+ }
90
+
91
+ // add plugin activation time
92
+ public static function rttpg_activation_time() {
93
+ $get_activation_time = strtotime( "now" );
94
+ add_option( 'rttpg_plugin_activation_time', $get_activation_time );
95
+ }
96
+
97
+ //check if review notice should be shown or not
98
+ public static function rttpg_check_installation_time() {
99
+
100
+ // Added Lines Start
101
+ $nobug = get_option( 'rttpg_spare_me', "0" );
102
+
103
+ if ( $nobug == "1" || $nobug == "3" ) {
104
+ return;
105
+ }
106
+
107
+ $install_date = get_option( 'rttpg_plugin_activation_time' );
108
+ $past_date = strtotime( '-10 days' );
109
+
110
+ $remind_time = get_option( 'rttpg_remind_me' );
111
+ $remind_due = strtotime( '+15 days', $remind_time );
112
+ $now = strtotime( "now" );
113
+
114
+ if ( $now >= $remind_due ) {
115
+ add_action( 'admin_notices', [ __CLASS__, 'rttpg_display_admin_notice' ] );
116
+ } else if ( ( $past_date >= $install_date ) && $nobug !== "2" ) {
117
+ add_action( 'admin_notices', [ __CLASS__, 'rttpg_display_admin_notice' ] );
118
+ }
119
+ }
120
+
121
+ /**
122
+ * Display Admin Notice, asking for a review
123
+ **/
124
+ public static function rttpg_display_admin_notice() {
125
+ // wordpress global variable
126
+ global $pagenow;
127
+
128
+ $exclude = [
129
+ 'themes.php',
130
+ 'users.php',
131
+ 'tools.php',
132
+ 'options-general.php',
133
+ 'options-writing.php',
134
+ 'options-reading.php',
135
+ 'options-discussion.php',
136
+ 'options-media.php',
137
+ 'options-permalink.php',
138
+ 'options-privacy.php',
139
+ 'edit-comments.php',
140
+ 'upload.php',
141
+ 'media-new.php',
142
+ 'admin.php',
143
+ 'import.php',
144
+ 'export.php',
145
+ 'site-health.php',
146
+ 'export-personal-data.php',
147
+ 'erase-personal-data.php'
148
+ ];
149
+
150
+ if ( ! in_array( $pagenow, $exclude ) ) {
151
+ $dont_disturb = esc_url( add_query_arg( 'rttpg_spare_me', '1', self::rttpg_current_admin_url() ) );
152
+ $remind_me = esc_url( add_query_arg( 'rttpg_remind_me', '1', self::rttpg_current_admin_url() ) );
153
+ $rated = esc_url( add_query_arg( 'rttpg_rated', '1', self::rttpg_current_admin_url() ) );
154
+ $reviewurl = esc_url( 'https://wordpress.org/support/plugin/the-post-grid/reviews/?filter=5#new-post' );
155
+
156
+ printf( __( '<div class="notice rttpg-review-notice rttpg-review-notice--extended">
157
+ <div class="rttpg-review-notice_content">
158
+ <h3>Enjoying The Post Grid?</h3>
159
+ <p>Thank you for choosing The Post Grid. If you have found our plugin useful and makes you smile, please consider giving us a 5-star rating on WordPress.org. It will help us to grow.</p>
160
+ <div class="rttpg-review-notice_actions">
161
+ <a href="%s" class="rttpg-review-button rttpg-review-button--cta" target="_blank"><span>⭐ Yes, You Deserve It!</span></a>
162
+ <a href="%s" class="rttpg-review-button rttpg-review-button--cta rttpg-review-button--outline"><span>😀 Already Rated!</span></a>
163
+ <a href="%s" class="rttpg-review-button rttpg-review-button--cta rttpg-review-button--outline"><span>🔔 Remind Me Later</span></a>
164
+ <a href="%s" class="rttpg-review-button rttpg-review-button--cta rttpg-review-button--error rttpg-review-button--outline"><span>😐 No Thanks</span></a>
165
+ </div>
166
+ </div>
167
+ </div>' ), $reviewurl, $rated, $remind_me, $dont_disturb );
168
+
169
+ echo '<style>
170
+ .rttpg-review-button--cta {
171
+ --e-button-context-color: #4C6FFF;
172
+ --e-button-context-color-dark: #4C6FFF;
173
+ --e-button-context-tint: rgb(75 47 157/4%);
174
+ --e-focus-color: rgb(75 47 157/40%);
175
+ }
176
+ .rttpg-review-notice {
177
+ position: relative;
178
+ margin: 5px 20px 5px 2px;
179
+ border: 1px solid #ccd0d4;
180
+ background: #fff;
181
+ box-shadow: 0 1px 4px rgba(0,0,0,0.15);
182
+ font-family: Roboto, Arial, Helvetica, Verdana, sans-serif;
183
+ border-inline-start-width: 4px;
184
+ }
185
+ .rttpg-review-notice.notice {
186
+ padding: 0;
187
+ }
188
+ .rttpg-review-notice:before {
189
+ position: absolute;
190
+ top: -1px;
191
+ bottom: -1px;
192
+ left: -4px;
193
+ display: block;
194
+ width: 4px;
195
+ background: -webkit-linear-gradient(bottom, #4C6FFF 0%, #6939c6 100%);
196
+ background: linear-gradient(0deg, #4C6FFF 0%, #6939c6 100%);
197
+ content: "";
198
+ }
199
+ .rttpg-review-notice_content {
200
+ padding: 20px;
201
+ }
202
+ .rttpg-review-notice_actions > * + * {
203
+ margin-inline-start: 8px;
204
+ -webkit-margin-start: 8px;
205
+ -moz-margin-start: 8px;
206
+ }
207
+ .rttpg-review-notice p {
208
+ margin: 0;
209
+ padding: 0;
210
+ line-height: 1.5;
211
+ }
212
+ p + .rttpg-review-notice_actions {
213
+ margin-top: 1rem;
214
+ }
215
+ .rttpg-review-notice h3 {
216
+ margin: 0;
217
+ font-size: 1.0625rem;
218
+ line-height: 1.2;
219
+ }
220
+ .rttpg-review-notice h3 + p {
221
+ margin-top: 8px;
222
+ }
223
+ .rttpg-review-button {
224
+ display: inline-block;
225
+ padding: 0.4375rem 0.75rem;
226
+ border: 0;
227
+ border-radius: 3px;;
228
+ background: var(--e-button-context-color);
229
+ color: #fff;
230
+ vertical-align: middle;
231
+ text-align: center;
232
+ text-decoration: none;
233
+ white-space: nowrap;
234
+ }
235
+ .rttpg-review-button:active {
236
+ background: var(--e-button-context-color-dark);
237
+ color: #fff;
238
+ text-decoration: none;
239
+ }
240
+ .rttpg-review-button:focus {
241
+ outline: 0;
242
+ background: var(--e-button-context-color-dark);
243
+ box-shadow: 0 0 0 2px var(--e-focus-color);
244
+ color: #fff;
245
+ text-decoration: none;
246
+ }
247
+ .rttpg-review-button:hover {
248
+ background: var(--e-button-context-color-dark);
249
+ color: #fff;
250
+ text-decoration: none;
251
+ }
252
+ .rttpg-review-button.focus {
253
+ outline: 0;
254
+ box-shadow: 0 0 0 2px var(--e-focus-color);
255
+ }
256
+ .rttpg-review-button--error {
257
+ --e-button-context-color: #d72b3f;
258
+ --e-button-context-color-dark: #ae2131;
259
+ --e-button-context-tint: rgba(215,43,63,0.04);
260
+ --e-focus-color: rgba(215,43,63,0.4);
261
+ }
262
+ .rttpg-review-button.rttpg-review-button--outline {
263
+ border: 1px solid;
264
+ background: 0 0;
265
+ color: var(--e-button-context-color);
266
+ }
267
+ .rttpg-review-button.rttpg-review-button--outline:focus {
268
+ background: var(--e-button-context-tint);
269
+ color: var(--e-button-context-color-dark);
270
+ }
271
+ .rttpg-review-button.rttpg-review-button--outline:hover {
272
+ background: var(--e-button-context-tint);
273
+ color: var(--e-button-context-color-dark);
274
+ }
275
+ </style>';
276
+ }
277
+ }
278
+
279
+ protected static function rttpg_current_admin_url() {
280
+ $uri = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
281
+ $uri = preg_replace( '|^.*/wp-admin/|i', '', $uri );
282
+
283
+ if ( ! $uri ) {
284
+ return '';
285
+ }
286
+
287
+ return remove_query_arg( [
288
+ '_wpnonce',
289
+ '_wc_notice_nonce',
290
+ 'wc_db_update',
291
+ 'wc_db_update_nonce',
292
+ 'wc-hide-notice'
293
+ ], admin_url( $uri ) );
294
+ }
295
+
296
+ // remove the notice for the user if review already done or if the user does not want to
297
+ public static function rttpg_spare_me() {
298
+ if ( isset( $_GET['rttpg_spare_me'] ) && ! empty( $_GET['rttpg_spare_me'] ) ) {
299
+ $spare_me = $_GET['rttpg_spare_me'];
300
+ if ( 1 == $spare_me ) {
301
+ update_option( 'rttpg_spare_me', "1" );
302
+ }
303
+ }
304
+
305
+ if ( isset( $_GET['rttpg_remind_me'] ) && ! empty( $_GET['rttpg_remind_me'] ) ) {
306
+ $remind_me = $_GET['rttpg_remind_me'];
307
+ if ( 1 == $remind_me ) {
308
+ $get_activation_time = strtotime( "now" );
309
+ update_option( 'rttpg_remind_me', $get_activation_time );
310
+ update_option( 'rttpg_spare_me', "2" );
311
+ }
312
+ }
313
+
314
+ if ( isset( $_GET['rttpg_rated'] ) && ! empty( $_GET['rttpg_rated'] ) ) {
315
+ $rttpg_rated = $_GET['rttpg_rated'];
316
+ if ( 1 == $rttpg_rated ) {
317
+ update_option( 'rttpg_rated', 'yes' );
318
+ update_option( 'rttpg_spare_me', "3" );
319
+ }
320
+ }
321
+ }
322
+ }
app/Controllers/Admin/PostTypeController.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace RT\ThePostGrid\Controllers\Admin;
5
+
6
+
7
+ class PostTypeController {
8
+
9
+
10
+
11
+ public function __construct() {
12
+ add_action( 'init', [ &$this, 'register_post_types' ], 1 );
13
+ add_action( 'admin_init', [ &$this, 'the_post_grid_remove_all_meta_box' ], 9999 );
14
+ }
15
+
16
+ public function the_post_grid_remove_all_meta_box() {
17
+ if ( is_admin() && apply_filters( 'rttpg_remove_all_extra_metabox_from_shordcode', true ) ) {
18
+ add_filter( "get_user_option_meta-box-order_" . rtTPG()->post_type,
19
+ [
20
+ &$this,
21
+ 'remove_all_meta_boxes_tgp_sc',
22
+ ] );
23
+ }
24
+
25
+ if ( get_option( 'rttpg_activation_redirect', false ) ) {
26
+ delete_option( 'rttpg_activation_redirect' );
27
+ wp_redirect( admin_url( 'edit.php?post_type=rttpg&page=rttpg_get_help' ) );
28
+ }
29
+ }
30
+
31
+ public function register_post_types() {
32
+ // Create the post grid post type
33
+ $labels = [
34
+ 'name' => __( 'The Post Grid', 'the-post-grid' ),
35
+ 'singular_name' => __( 'The Post Grid', 'the-post-grid' ),
36
+ 'add_new' => __( 'Add New Grid', 'the-post-grid' ),
37
+ 'all_items' => __( 'All Grids', 'the-post-grid' ),
38
+ 'add_new_item' => __( 'Add New Post Grid', 'the-post-grid' ),
39
+ 'edit_item' => __( 'Edit Post Grid', 'the-post-grid' ),
40
+ 'new_item' => __( 'New Post Grid', 'the-post-grid' ),
41
+ 'view_item' => __( 'View Post Grid', 'the-post-grid' ),
42
+ 'search_items' => __( 'Search Post Grids', 'the-post-grid' ),
43
+ 'not_found' => __( 'No Post Grids found', 'the-post-grid' ),
44
+ 'not_found_in_trash' => __( 'No Post Grids found in Trash', 'the-post-grid' ),
45
+ ];
46
+
47
+ register_post_type( rtTPG()->post_type,
48
+ [
49
+ 'labels' => $labels,
50
+ 'public' => false,
51
+ 'show_ui' => true,
52
+ '_builtin' => false,
53
+ 'capability_type' => 'page',
54
+ 'hierarchical' => true,
55
+ 'menu_icon' => rtTPG()->get_assets_uri( 'images/icon-16x16.png' ),
56
+ 'rewrite' => false,
57
+ 'query_var' => rtTPG()->post_type,
58
+ 'supports' => [
59
+ 'title',
60
+ ],
61
+ 'show_in_menu' => true,
62
+ 'menu_position' => 20,
63
+ ] );
64
+ }
65
+
66
+
67
+ /**
68
+ * @return void|array
69
+ */
70
+ public function remove_all_meta_boxes_tgp_sc() {
71
+ global $wp_meta_boxes;
72
+ if ( isset( $wp_meta_boxes[ rtTPG()->post_type ]['normal']['high']['rttpg_meta'] ) && $wp_meta_boxes[ rtTPG()->post_type ]['normal']['high']['rttpg_sc_preview_meta']
73
+ && $wp_meta_boxes[ rtTPG()->post_type ]['side']['low']['rt_plugin_sc_pro_information']
74
+ ) {
75
+ $publishBox = $wp_meta_boxes[ rtTPG()->post_type ]['side']['core']['submitdiv'];
76
+ $scBox = $wp_meta_boxes[ rtTPG()->post_type ]['normal']['high']['rttpg_meta'];
77
+ $scBoxPreview = $wp_meta_boxes[ rtTPG()->post_type ]['normal']['high']['rttpg_sc_preview_meta'];
78
+ $docBox = $wp_meta_boxes[ rtTPG()->post_type ]['side']['low']['rt_plugin_sc_pro_information'];
79
+
80
+ $wp_meta_boxes[ rtTPG()->post_type ] = [
81
+ 'side' => [
82
+ 'core' => [ 'submitdiv' => $publishBox ],
83
+ 'default' => [
84
+ 'rt_plugin_sc_pro_information' => $docBox,
85
+ ],
86
+ ],
87
+ 'normal' => [ 'high' => [ 'submitdiv' => $scBox ] ],
88
+ 'advanced' => [ 'high' => [ 'postexcerpt' => $scBoxPreview ] ],
89
+ ];
90
+
91
+ return [];
92
+ }
93
+ }
94
+
95
+ }
app/Controllers/Admin/SettingsController.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace RT\ThePostGrid\Controllers\Admin;
5
+
6
+
7
+ use RT\ThePostGrid\Helpers\Fns;
8
+
9
+ class SettingsController {
10
+
11
+ private $sc_tag = 'rt_tpg_scg';
12
+
13
+ public function init() {
14
+ add_action( 'admin_menu', [ &$this, 'register' ] );
15
+ add_filter( 'plugin_action_links_' . RT_THE_POST_GRID_PLUGIN_ACTIVE_FILE_NAME, [ &$this, 'marketing' ] );
16
+ add_action( 'admin_enqueue_scripts', [ &$this, 'settings_admin_enqueue_scripts' ] );
17
+ add_action( 'wp_print_styles', [ &$this, 'tpg_dequeue_unnecessary_styles' ], 99 );
18
+ add_action( 'admin_footer', [ $this, 'pro_alert_html' ] );
19
+ add_action( 'admin_head', [ $this, 'admin_head' ] );
20
+ }
21
+
22
+ /**
23
+ * admin_head
24
+ * calls your functions into the correct filters
25
+ *
26
+ * @return void
27
+ */
28
+ function admin_head() {
29
+ // check user permissions
30
+ if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
31
+ return;
32
+ }
33
+ // check if WYSIWYG is enabled
34
+ if ( 'true' == get_user_option( 'rich_editing' ) ) {
35
+ add_filter( 'mce_external_plugins', [ $this, 'mce_external_plugins' ] );
36
+ add_filter( 'mce_buttons', [ $this, 'mce_buttons' ] );
37
+ echo "<style>";
38
+ echo "i.mce-i-rt_tpg_scg{";
39
+ echo "background: url('" . rtTPG()->get_assets_uri( 'images/icon-20x20.png' ) . "');";
40
+ echo "}";
41
+ echo "</style>";
42
+ }
43
+ }
44
+
45
+ /**
46
+ * mce_external_plugins
47
+ * Adds our tinymce plugin
48
+ *
49
+ * @param array $plugin_array
50
+ *
51
+ * @return array
52
+ */
53
+ function mce_external_plugins( $plugin_array ) {
54
+ $plugin_array[ $this->sc_tag ] = rtTPG()->get_assets_uri( 'js/mce-button.js' );
55
+
56
+ return $plugin_array;
57
+ }
58
+
59
+ /**
60
+ * mce_buttons
61
+ * Adds our tinymce button
62
+ *
63
+ * @param array $buttons
64
+ *
65
+ * @return array
66
+ */
67
+ function mce_buttons( $buttons ) {
68
+ array_push( $buttons, $this->sc_tag );
69
+
70
+ return $buttons;
71
+ }
72
+
73
+ public function pro_alert_html() {
74
+ global $typenow;
75
+
76
+ if ( rtTPG()->hasPro() ) {
77
+ return;
78
+ }
79
+
80
+ if ( ( isset( $_GET['page'] ) && $_GET['page'] != 'rttpg_settings' ) || $typenow != rtTPG()->post_type ) {
81
+ return;
82
+ }
83
+
84
+ $html = '';
85
+ $html .= '<div class="rt-document-box rt-alert rt-pro-alert">
86
+ <div class="rt-box-icon"><i class="dashicons dashicons-lock"></i></div>
87
+ <div class="rt-box-content">
88
+ <h3 class="rt-box-title">' . esc_html__( 'Pro field alert!', 'the-post-grid' ) . '</h3>
89
+ <p><span></span>' . esc_html__( 'Sorry! this is a pro field. To use this field, you need to use pro plugin.', 'the-post-grid' ) . '</p>
90
+ <a href="https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/" target="_blank" class="rt-admin-btn">' . esc_html__( "Upgrade to pro",
91
+ "the-post-grid" ) . '</a>
92
+ <a href="#" target="_blank" class="rt-alert-close rt-pro-alert-close">x</a>
93
+ </div>
94
+ </div>';
95
+ echo $html;
96
+ }
97
+
98
+ public function tpg_dequeue_unnecessary_styles() {
99
+ $settings = get_option( rtTPG()->options['settings'] );
100
+
101
+ if ( isset( $settings['tpg_skip_fa'] ) ) {
102
+ wp_dequeue_style( 'rt-fontawsome' );
103
+ wp_deregister_style( 'rt-fontawsome' );
104
+ }
105
+ }
106
+
107
+ public function settings_admin_enqueue_scripts() {
108
+ global $pagenow, $typenow;
109
+
110
+ // validate page
111
+ if ( ! in_array( $pagenow, [ 'edit.php' ] ) ) {
112
+ return;
113
+ }
114
+ if ( $typenow != rtTPG()->post_type ) {
115
+ return;
116
+ }
117
+
118
+ wp_enqueue_script( 'jquery' );
119
+ wp_enqueue_script( 'rt-tpg-admin' );
120
+
121
+ // styles
122
+ wp_enqueue_style( 'rt-tpg-admin' );
123
+
124
+ $nonce = wp_create_nonce( rtTPG()->nonceText() );
125
+ wp_localize_script( 'rt-tpg-admin',
126
+ 'rttpg',
127
+ [
128
+ 'nonceID' => rtTPG()->nonceId(),
129
+ 'nonce' => $nonce,
130
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
131
+ ] );
132
+ }
133
+
134
+ function marketing( $links ) {
135
+ $links[] = '<a target="_blank" href="' . esc_url( 'https://www.radiustheme.com/demo/plugins/the-post-grid/' ) . '">Demo</a>';
136
+ $links[] = '<a target="_blank" href="' . esc_url( 'https://www.radiustheme.com/docs/the-post-grid/' ) . '">Documentation</a>';
137
+ if ( ! rtTPG()->hasPro() ) {
138
+ $links[] = '<a target="_blank" style="color: #39b54a;font-weight: 700;" href="' . esc_url( 'https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/' )
139
+ . '">Get Pro</a>';
140
+ }
141
+
142
+ return $links;
143
+ }
144
+
145
+ public function register() {
146
+ add_submenu_page(
147
+ 'edit.php?post_type=' . rtTPG()->post_type,
148
+ __( 'Settings', 'the-post-grid' ),
149
+ __( 'Settings', "the-post-grid" ),
150
+ 'administrator',
151
+ 'rttpg_settings',
152
+ [ &$this, 'settings' ] );
153
+
154
+ add_submenu_page( 'edit.php?post_type=' . rtTPG()->post_type,
155
+ __( 'Get Help' ),
156
+ __( 'Get Help', "the-post-grid" ),
157
+ 'administrator',
158
+ 'rttpg_get_help',
159
+ [
160
+ $this,
161
+ 'get_help',
162
+ ] );
163
+ }
164
+
165
+ function get_help() {
166
+ Fns::view('page.help');
167
+ }
168
+
169
+ public function settings() {
170
+ Fns::view( 'settings.settings' );
171
+ }
172
+
173
+ }
app/Controllers/Admin/UpgradeController.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Controllers\Admin;
4
+
5
+
6
+ class UpgradeController {
7
+
8
+ public static function check_plugin_version() {
9
+ if ( version_compare( RT_TPG_PRO_VERSION, '5', '<' ) ) {
10
+ add_action( 'admin_notices',
11
+ function () {
12
+ $class = 'notice notice-error';
13
+ $text = esc_html__( 'The Post Grid Pro', 'the-post-grid' );
14
+ $link_pro = 'https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/';
15
+
16
+ printf( '<div class="%1$s"><p><a target="_blank" href="%2$s"><strong>The Post Grid Pro</strong></a> is not working, You need to update <strong>%3$s</strong> version to 4.0.0 or more to get the pro features.</p></div>',
17
+ $class,
18
+ $link_pro,
19
+ $text );
20
+ } );
21
+
22
+ return false;
23
+ }
24
+ return true;
25
+ }
26
+
27
+ }
app/Controllers/AjaxController.php ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Controllers;
4
+
5
+ use RT\ThePostGrid\Helpers\Fns;
6
+ use RT\ThePostGrid\Helpers\Options;
7
+
8
+ class AjaxController {
9
+ function __construct() {
10
+ add_action( 'wp_ajax_rtTPGSettings', array( $this, 'rtTPGSaveSettings' ) );
11
+ add_action( 'wp_ajax_rtTPGShortCodeList', array( $this, 'shortCodeList' ) );
12
+ add_action( 'wp_ajax_rtTPGTaxonomyListByPostType', array( $this, 'rtTPGTaxonomyListByPostType' ) );
13
+ add_action( 'wp_ajax_rtTPGIsotopeFilter', array( $this, 'rtTPGIsotopeFilter' ) );
14
+ add_action( 'wp_ajax_rtTPGTermListByTaxonomy', array( $this, 'rtTPGTermListByTaxonomy' ) );
15
+ add_action( 'wp_ajax_defaultFilterItem', array( $this, 'defaultFilterItem' ) );
16
+ add_action( 'wp_ajax_getCfGroupListAsField', array( $this, 'getCfGroupListAsField' ) );
17
+ }
18
+
19
+ function getCfGroupListAsField() {
20
+
21
+ $error = true;
22
+ $data = $msg = null;
23
+ if ( Fns::verifyNonce() ) {
24
+ $fields = array();
25
+ $post_type = ! empty( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : null;
26
+ if ( $cf = Fns::is_acf() && $post_type ) {
27
+ $fields['cf_group'] = array(
28
+ "type" => "checkbox",
29
+ "name" => "cf_group",
30
+ "holderClass" => "tpg-hidden cf-fields cf-group",
31
+ "label" => "Custom Field group",
32
+ "multiple" => true,
33
+ "alignment" => "vertical",
34
+ "id" => "cf_group",
35
+ "options" => Fns::get_groups_by_post_type( $post_type, $cf )
36
+ );
37
+ $error = false;
38
+ $data = Fns::rtFieldGenerator( $fields );
39
+ }
40
+ } else {
41
+ $msg = __( 'Server Error !!', 'the-post-grid' );
42
+ }
43
+ $response = array(
44
+ 'error' => $error,
45
+ 'msg' => $msg,
46
+ 'data' => $data
47
+ );
48
+ wp_send_json( $response );
49
+ die();
50
+ }
51
+
52
+ function defaultFilterItem() {
53
+
54
+ $error = true;
55
+ $data = $msg = null;
56
+ if ( Fns::verifyNonce() ) {
57
+ if ( $filter = $_REQUEST['filter'] ) {
58
+ $include = [];
59
+ if ( isset( $_REQUEST['include'] ) && $term = $_REQUEST['include'] ) {
60
+ $include = explode( ',', $term );
61
+ }
62
+ $error = false;
63
+ $msg = __( 'Success', 'the-post-grid' );
64
+ $data .= "<option value=''>" . __( 'Show All', 'the-post-grid' ) . "</option>";
65
+ $items = Fns::rt_get_selected_term_by_taxonomy( $filter, $include, '', 0 );
66
+ if ( ! empty( $items ) ) {
67
+ foreach ( $items as $id => $item ) {
68
+ $data .= "<option value='{$id}'>{$item}</option>";
69
+ }
70
+ }
71
+ }
72
+ } else {
73
+ $msg = __( 'Session Error !!', 'the-post-grid' );
74
+ }
75
+ $response = array(
76
+ 'error' => $error,
77
+ 'msg' => $msg,
78
+ 'data' => $data
79
+ );
80
+ wp_send_json( $response );
81
+ die();
82
+ }
83
+
84
+ function rtTPGSaveSettings() {
85
+
86
+ $error = true;
87
+ if ( Fns::verifyNonce() ) {
88
+ unset( $_REQUEST['action'] );
89
+ unset( $_REQUEST[ rtTPG()->nonceId() ] );
90
+ unset( $_REQUEST['_wp_http_referer'] );
91
+
92
+ update_option( rtTPG()->options['settings'], $_REQUEST );
93
+ $response = array(
94
+ 'error' => false,
95
+ 'msg' => __( 'Settings successfully updated', 'the-post-grid' )
96
+ );
97
+ } else {
98
+ $response = array(
99
+ 'error' => $error,
100
+ 'msg' => __( 'Session Error !!', 'the-post-grid' )
101
+ );
102
+ }
103
+ wp_send_json( $response );
104
+ die();
105
+ }
106
+
107
+ function rtTPGTaxonomyListByPostType() {
108
+
109
+ $error = true;
110
+ $msg = $data = null;
111
+ if ( Fns::verifyNonce() ) {
112
+ $error = false;
113
+ $taxonomies = Fns::rt_get_all_taxonomy_by_post_type( isset( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : null );
114
+ if ( is_array( $taxonomies ) && ! empty( $taxonomies ) ) {
115
+ $data .= Fns::rtFieldGenerator(
116
+ array(
117
+ 'tpg_taxonomy' => array(
118
+ 'type' => 'checkbox',
119
+ 'label' => 'Taxonomy',
120
+ 'id' => 'post-taxonomy',
121
+ "multiple" => true,
122
+ "value" => isset( $_REQUEST['taxonomy'] ) ? $_REQUEST['taxonomy'] : [],
123
+ 'options' => $taxonomies
124
+ )
125
+ )
126
+ );
127
+ } else {
128
+ $data = __( '<div class="field-holder">No Taxonomy found</div>', 'the-post-grid' );
129
+ }
130
+
131
+ } else {
132
+ $msg = __( 'Security error', 'the-post-grid' );
133
+ }
134
+ wp_send_json( array( 'error' => $error, 'msg' => $msg, 'data' => $data ) );
135
+ die();
136
+ }
137
+
138
+ function rtTPGIsotopeFilter() {
139
+
140
+ $error = true;
141
+ $msg = $data = null;
142
+ if ( Fns::verifyNonce() ) {
143
+ $error = false;
144
+ $taxonomies = Fns::rt_get_taxonomy_for_filter( isset( $_REQUEST['post_type'] ) ? $_REQUEST['post_type'] : null );
145
+ if ( is_array( $taxonomies ) && ! empty( $taxonomies ) ) {
146
+ foreach ( $taxonomies as $tKey => $tax ) {
147
+ $data .= "<option value='{$tKey}'>{$tax}</option>";
148
+ }
149
+ }
150
+ } else {
151
+ $msg = __( 'Security error', 'the-post-grid' );
152
+ }
153
+ wp_send_json( array( 'error' => $error, 'msg' => $msg, 'data' => $data ) );
154
+ die();
155
+ }
156
+
157
+ function rtTPGTermListByTaxonomy() {
158
+
159
+ $error = true;
160
+ $msg = $data = null;
161
+ if ( Fns::verifyNonce() ) {
162
+ $error = false;
163
+ $taxonomy = isset( $_REQUEST['taxonomy'] ) ? $_REQUEST['taxonomy'] : null;
164
+ $data .= "<div class='term-filter-item-container {$taxonomy}'>";
165
+ $data .= Fns::rtFieldGenerator(
166
+ array(
167
+ 'term_' . $taxonomy => array(
168
+ 'type' => 'select',
169
+ 'label' => ucfirst( str_replace( '_', ' ', $taxonomy ) ),
170
+ 'class' => 'rt-select2 full',
171
+ 'id' => 'term-' . mt_rand(),
172
+ 'holderClass' => "term-filter-item {$taxonomy}",
173
+ 'value' => null,
174
+ "multiple" => true,
175
+ 'options' => Fns::rt_get_all_term_by_taxonomy( $taxonomy )
176
+ )
177
+ )
178
+ );
179
+ $data .= Fns::rtFieldGenerator(
180
+ array(
181
+ 'term_operator_' . $taxonomy => array(
182
+ 'type' => 'select',
183
+ 'label' => 'Operator',
184
+ 'class' => 'rt-select2 full',
185
+ 'holderClass' => "term-filter-item-operator {$taxonomy}",
186
+ 'options' => Options::rtTermOperators()
187
+ )
188
+ )
189
+ );
190
+ $data .= "</div>";
191
+ } else {
192
+ $msg = __( 'Security error', 'the-post-grid' );
193
+ }
194
+ wp_send_json( array( 'error' => $error, 'msg' => $msg, 'data' => $data ) );
195
+ die();
196
+ }
197
+
198
+ function shortCodeList() {
199
+ $html = null;
200
+ $scQ = new \WP_Query( apply_filters( 'tpg_sc_list_query_args',
201
+ array( 'post_type' => rtTPG()->post_type,
202
+ 'order_by' => 'title',
203
+ 'order' => 'DESC',
204
+ 'post_status' => 'publish',
205
+ 'posts_per_page' => - 1
206
+ )
207
+ ) );
208
+ if ( $scQ->have_posts() ) {
209
+
210
+ $html .= "<div class='mce-container mce-form'>";
211
+ $html .= "<div class='mce-container-body'>";
212
+ $html .= '<label class="mce-widget mce-label" style="padding: 20px;font-weight: bold;" for="scid">' . __( 'Select Short code', 'the-post-grid' ) . '</label>';
213
+ $html .= "<select name='id' id='scid' style='width: 150px;margin: 15px;'>";
214
+ $html .= "<option value=''>" . __( 'Default', 'the-post-grid' ) . "</option>";
215
+ while ( $scQ->have_posts() ) {
216
+ $scQ->the_post();
217
+ $html .= "<option value='" . get_the_ID() . "'>" . get_the_title() . "</option>";
218
+ }
219
+ $html .= "</select>";
220
+ $html .= "</div>";
221
+ $html .= "</div>";
222
+ } else {
223
+ $html .= "<div>" . __( 'No shortCode found.', 'the-post-grid' ) . "</div>";
224
+ }
225
+ echo $html;
226
+ die();
227
+ }
228
+ }
app/Controllers/ElementorController.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Controllers;
4
+
5
+ if ( ! defined( 'WPINC' ) ) {
6
+ die;
7
+ }
8
+
9
+ use Elementor\Plugin;
10
+
11
+ if ( ! class_exists( 'ElementorController' ) ):
12
+
13
+ class ElementorController {
14
+
15
+ public $el_cat_id;
16
+ private $version;
17
+
18
+ function __construct() {
19
+ $this->version = defined( 'WP_DEBUG' ) && WP_DEBUG ? time() : RT_THE_POST_GRID_VERSION;
20
+ $this->el_cat_id = RT_THE_POST_GRID_PLUGIN_SLUG . '-elements';
21
+
22
+ if ( did_action( 'elementor/loaded' ) ) {
23
+ add_action( 'elementor/widgets/widgets_registered', [ $this, 'init_widgets' ] );
24
+ add_action( 'elementor/elements/categories_registered', [ $this, 'widget_category' ] );
25
+ //add_action( 'elementor/editor/after_enqueue_styles', [ $this, 'editor_style' ] );
26
+ add_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'el_editor_script' ] );
27
+ add_action( 'tpg_elementor_script', [ $this, 'tpg_el_scripts' ] );
28
+ add_action( 'wp_enqueue_scripts', [ $this, 'tpg_el_style' ] );
29
+ add_action( "elementor/frontend/after_enqueue_scripts", [ $this, 'tpg_frontend_scripts' ] );
30
+ add_filter( 'elementor/editor/localize_settings', [ $this, 'promotePremiumWidgets' ] );
31
+ }
32
+ }
33
+
34
+ public function tpg_frontend_scripts() {
35
+ //wp_enqueue_script( 'imagesloaded' );
36
+ wp_enqueue_script( 'tpg-el-script', rtTPG()->get_assets_uri( 'js/el-frontend.js' ), [ 'jquery' ], $this->version, true );
37
+ }
38
+
39
+ public function tpg_el_style() {
40
+ wp_enqueue_style( 'rt-fontawsome' );
41
+ wp_enqueue_style( 'rt-tpg-common' );
42
+ wp_enqueue_style( 'rt-tpg-elementor' );
43
+
44
+ //Custom CSS From Settings
45
+ $css = isset( $settings['custom_css'] ) ? stripslashes( $settings['custom_css'] ) : null;
46
+ if ( $css ) {
47
+ wp_add_inline_style( 'rt-tpg-elementor', $css );
48
+ }
49
+ }
50
+
51
+ public function tpg_el_scripts() {
52
+ add_action( 'wp_footer',
53
+ function () {
54
+ $settings = get_option( rtTPG()->options['settings'] );
55
+ if ( rtTPG()->hasPro() ) {
56
+ wp_enqueue_script( 'rt-isotope-js' );
57
+ }
58
+ wp_enqueue_script( 'rt-swiper-el' );
59
+ wp_enqueue_script( 'rt-tpg' );
60
+
61
+
62
+ $ajaxurl = '';
63
+ if ( in_array( 'sitepress-multilingual-cms/sitepress.php', get_option( 'active_plugins' ) ) ) {
64
+ $ajaxurl .= admin_url( 'admin-ajax.php?lang=' . ICL_LANGUAGE_CODE );
65
+ } else {
66
+ $ajaxurl .= admin_url( 'admin-ajax.php' );
67
+ }
68
+ $variables = [
69
+ 'nonceID' => rtTPG()->nonceId(),
70
+ 'nonce' => wp_create_nonce( rtTPG()->nonceText() ),
71
+ 'ajaxurl' => $ajaxurl,
72
+ ];
73
+ wp_localize_script( 'rt-tpg', 'rttpg', $variables );
74
+ } );
75
+ }
76
+
77
+ public function el_editor_script() {
78
+ wp_enqueue_script( 'tgp-el-editor-scripts', rtTPG()->get_assets_uri( 'js/tpg-el-editor.js' ), [ 'jquery' ], $this->version, true );
79
+ wp_enqueue_style( 'tgp-el-editor-style', rtTPG()->get_assets_uri( 'css/tpg-el-editor.css' ), [], $this->version );
80
+ }
81
+
82
+ public function editor_style() {
83
+ $css = "";
84
+ wp_add_inline_style( 'elementor-editor', $css );
85
+ }
86
+
87
+ public function init_widgets() {
88
+ require_once( RT_THE_POST_GRID_PLUGIN_PATH . '/app/Widgets/elementor/base.php' );
89
+ require_once( RT_THE_POST_GRID_PLUGIN_PATH . '/app/Widgets/elementor/rtTPGElementorHelper.php' );
90
+
91
+ // dir_name => class_name
92
+ $widgets = [
93
+ 'grid-layout' => 'TPGGridLayout',
94
+ 'list-layout' => 'TPGListLayout',
95
+ 'grid-hover-layout' => 'TPGGridHoverLayout',
96
+ 'slider-layout' => 'TPGSliderLayout',
97
+ 'default' => 'RtElementorWidget',
98
+ ];
99
+
100
+ $widgets = apply_filters( 'tpg_el_widget_register', $widgets );
101
+
102
+ foreach ( $widgets as $file_name => $class ) {
103
+ if ( ! rtTPG()->hasPro() && 'slider-layout' == $file_name ) {
104
+ continue;
105
+ }
106
+ $template_name = 'the-post-grid/elementor/' . $file_name . '.php';
107
+ if ( file_exists( STYLESHEETPATH . $template_name ) ) {
108
+ $file = STYLESHEETPATH . $template_name;
109
+ } elseif ( file_exists( TEMPLATEPATH . $template_name ) ) {
110
+ $file = TEMPLATEPATH . $template_name;
111
+ } else {
112
+ $file = RT_THE_POST_GRID_PLUGIN_PATH . '/app/Widgets/elementor/widgets/' . $file_name . '.php';
113
+ }
114
+ require_once $file;
115
+
116
+ Plugin::instance()->widgets_manager->register( new $class );
117
+ }
118
+ }
119
+
120
+ public function widget_category( $elements_manager ) {
121
+ $categories['tpg-elementor-builder-widgets'] = [
122
+ 'title' => __( 'TPG Archive Builder Element', 'the-post-grid' ),
123
+ 'icon' => 'fa fa-plug',
124
+ ];
125
+
126
+ $categories[ RT_THE_POST_GRID_PLUGIN_SLUG . '-elements' ] = [
127
+ 'title' => __( 'The Post Grid', 'the-post-grid' ),
128
+ 'icon' => 'fa fa-plug',
129
+ ];
130
+
131
+ $get_all_categories = $elements_manager->get_categories();
132
+ $categories = array_merge( $categories, $get_all_categories );
133
+ $set_categories = function ( $categories ) {
134
+ $this->categories = $categories;
135
+ };
136
+
137
+ $set_categories->call( $elements_manager, $categories );
138
+ }
139
+
140
+
141
+ public function promotePremiumWidgets( $config ) {
142
+ if ( rtTPG()->hasPro() ) {
143
+ return $config;
144
+ }
145
+
146
+ if ( ! isset( $config['promotionWidgets'] ) || ! is_array( $config['promotionWidgets'] ) ) {
147
+ $config['promotionWidgets'] = [];
148
+ }
149
+
150
+ $category = RT_THE_POST_GRID_PLUGIN_SLUG . '-elements';
151
+
152
+ $pro_widgets = [
153
+ [
154
+ 'name' => 'tpg-slider-layout',
155
+ 'title' => __( 'TPG - Slider Layout', 'the-post-grid' ),
156
+ 'description' => __( 'TPG - Slider Layout', 'the-post-grid' ),
157
+ 'icon' => 'eicon-post-slider tpg-grid-icon tss-promotional-element',
158
+ 'categories' => '[ "the-post-grid-elements" ]',
159
+ ],
160
+ ];
161
+
162
+ $config['promotionWidgets'] = array_merge( $config['promotionWidgets'], $pro_widgets );
163
+
164
+ return $config;
165
+ }
166
+
167
+
168
+ }
169
+
170
+ endif;
app/Controllers/GutenBergController.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace RT\ThePostGrid\Controllers;
5
+
6
+
7
+ use RT\ThePostGrid\Helpers\Fns;
8
+
9
+ class GutenBergController {
10
+ function __construct() {
11
+ add_action('enqueue_block_assets', array($this, 'block_assets'));
12
+ add_action('enqueue_block_editor_assets', array($this, 'block_editor_assets'));
13
+ if(function_exists('register_block_type')) {
14
+ register_block_type('rttpg/post-grid', array(
15
+ 'render_callback' => array($this,'render_shortcode'),
16
+ ));
17
+ }
18
+ }
19
+
20
+ static function render_shortcode( $atts ){
21
+ if(!empty($atts['gridId']) && $id = absint($atts['gridId'])){
22
+ return do_shortcode( '[the-post-grid id="' . $id . '"]' );
23
+ }
24
+ }
25
+
26
+
27
+ function block_assets() {
28
+ wp_enqueue_style('wp-blocks');
29
+ }
30
+
31
+ function block_editor_assets() {
32
+ // Scripts.
33
+ wp_enqueue_script(
34
+ 'rt-tpg-cgb-block-js',
35
+ rtTPG()->get_assets_uri('js/post-grid-blocks.js'),
36
+ array('wp-blocks', 'wp-i18n', 'wp-element'),
37
+ (defined('WP_DEBUG') && WP_DEBUG) ? time() : RT_THE_POST_GRID_VERSION,
38
+ true
39
+ );
40
+ wp_localize_script('rt-tpg-cgb-block-js', 'rttpgGB', array(
41
+ 'short_codes' => Fns::getAllTPGShortCodeList(),
42
+ 'icon' => rtTPG()->get_assets_uri('images/icon-16x16.png'),
43
+ ));
44
+ wp_enqueue_style('wp-edit-blocks');
45
+ }
46
+ }
app/Controllers/Hooks/ActionHooks.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Controllers\Hooks;
4
+
5
+ class ActionHooks {
6
+ public static function init() {
7
+ add_action( 'pre_get_posts', [ __CLASS__, 'category_query' ], 10 );
8
+ }
9
+
10
+ public static function category_query( $query ) {
11
+ if ( ! is_admin() && is_category() && $query->is_main_query() ) {
12
+ $settings = get_option( rtTPG()->options['settings'] );
13
+ $sc_id = isset( $settings['template_category'] ) ? absint( $settings['template_category'] ) : 0;
14
+ if ( $sc_id ) {
15
+ $posts_per_page = $sc_id ? absint( get_post_meta( $sc_id, 'posts_per_page', true ) ) : 0;
16
+ $pagination = $sc_id ? get_post_meta( $sc_id, 'pagination', true ) : false;
17
+ $posts_loading_type = $sc_id ? get_post_meta( $sc_id, 'posts_loading_type', true ) : '';
18
+ if ( $pagination && $posts_loading_type === 'pagination' && $posts_per_page ) {
19
+ $query->set( 'posts_per_page', $posts_per_page );
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
app/Controllers/Hooks/FilterHooks.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Controllers\Hooks;
4
+
5
+ use Cassandra\Varint;
6
+ use RT\ThePostGrid\Helpers\Fns;
7
+
8
+ class FilterHooks {
9
+
10
+ public static function init() {
11
+ add_filter( 'tpg_author_arg', [ __CLASS__, 'filter_author_args' ], 10 );
12
+ add_filter( 'plugin_row_meta', [ __CLASS__, 'plugin_row_meta' ], 10, 2 );
13
+
14
+ $settings = get_option( 'rt_the_post_grid_settings' );
15
+ if ( isset( $settings['show_acf_details'] ) && $settings['show_acf_details'] ) {
16
+ add_filter( 'the_content', [ __CLASS__, 'tpg_acf_content_filter' ] );
17
+ }
18
+ add_filter( 'wp_head', [ __CLASS__, 'set_post_view_count' ], 9999 );
19
+ }
20
+
21
+
22
+ public static function set_post_view_count( $content ) {
23
+ if ( is_single() ) {
24
+ $pId = get_the_ID();
25
+ Fns::update_post_views_count( $pId );
26
+ }
27
+
28
+ return $content;
29
+ }
30
+
31
+ public static function filter_author_args( $args ) {
32
+ $defaults = [ 'role__in' => [ 'administrator', 'editor', 'author' ] ];
33
+
34
+ return wp_parse_args( $args, $defaults );
35
+ }
36
+
37
+ public static function plugin_row_meta( $links, $file ) {
38
+ if ( $file == RT_THE_POST_GRID_PLUGIN_ACTIVE_FILE_NAME ) {
39
+ $report_url = 'https://www.radiustheme.com/contact/';
40
+ $row_meta['issues'] = sprintf( '%2$s <a target="_blank" href="%1$s">%3$s</a>',
41
+ esc_url( $report_url ),
42
+ esc_html__( 'Facing issue?', 'the-post-grid' ),
43
+ '<span style="color: red">' . esc_html__( 'Please open a support ticket.', 'the-post-grid' ) . '</span>' );
44
+
45
+ return array_merge( $links, $row_meta );
46
+ }
47
+
48
+ return (array) $links;
49
+ }
50
+
51
+
52
+ public static function tpg_acf_content_filter( $content ) {
53
+ // Check if we're inside the main loop in a post or page.
54
+ if ( is_single() && in_the_loop() && is_main_query() && rtTPG()->hasPro() ) {
55
+ $settings = get_option( rtTPG()->options['settings'] );
56
+
57
+ $data = [
58
+ 'show_acf' => isset( $settings['show_acf_details'] ) && $settings['show_acf_details'] ? 'show' : false,
59
+ 'cf_group' => isset( $settings['cf_group_details'] ) ? $settings['cf_group_details'] : [],
60
+ 'cf_hide_empty_value' => isset( $settings['cf_hide_empty_value_details'] ) ? $settings['cf_hide_empty_value_details'] : false,
61
+ 'cf_show_only_value' => isset( $settings['cf_show_only_value_details'] ) ? $settings['cf_show_only_value_details'] : false,
62
+ 'cf_hide_group_title' => isset( $settings['cf_hide_group_title_details'] ) ? $settings['cf_hide_group_title_details'] : false,
63
+ ];
64
+
65
+ return $content . Fns::tpg_get_acf_data_elementor( $data, null, false );
66
+ }
67
+
68
+ return $content;
69
+ }
70
+
71
+ }
app/Controllers/ScriptController.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace RT\ThePostGrid\Controllers;
5
+
6
+
7
+ class ScriptController {
8
+
9
+ private $version;
10
+
11
+ public function __construct() {
12
+ $this->version = defined( 'WP_DEBUG' ) && WP_DEBUG ? time() : RT_THE_POST_GRID_VERSION;
13
+ add_action( 'wp_head', [ &$this, 'header_scripts' ] );
14
+ add_action( 'wp_enqueue_scripts', [ &$this, 'enqueue' ] );
15
+ add_action( 'init', [ $this, 'init' ] );
16
+ }
17
+
18
+ public function init() {
19
+ // register scripts
20
+ $scripts = [];
21
+ $styles = [];
22
+ $scripts[] = [
23
+ 'handle' => 'rt-image-load-js',
24
+ 'src' => rtTPG()->get_assets_uri( "vendor/isotope/imagesloaded.pkgd.min.js" ),
25
+ 'deps' => [ 'jquery' ],
26
+ 'footer' => true,
27
+ ];
28
+ $scripts[] = [
29
+ 'handle' => 'rt-isotope-js',
30
+ 'src' => rtTPG()->get_assets_uri( "vendor/isotope/isotope.pkgd.min.js" ),
31
+ 'deps' => [ 'jquery' ],
32
+ 'footer' => true,
33
+ ];
34
+
35
+ $scripts[] = [
36
+ 'handle' => 'rt-tpg',
37
+ 'src' => rtTPG()->get_assets_uri( 'js/rttpg.js' ),
38
+ 'deps' => [ 'jquery' ],
39
+ 'footer' => true,
40
+ ];
41
+
42
+ // register acf styles
43
+ $styles['rt-fontawsome'] = rtTPG()->get_assets_uri( 'vendor/font-awesome/css/font-awesome.min.css' );
44
+ $styles['rt-tpg'] = rtTPG()->tpg_can_be_rtl( 'css/thepostgrid' );
45
+ $styles['rt-tpg-common'] = rtTPG()->tpg_can_be_rtl( 'css/rt-tpg-common' );
46
+ $styles['rt-tpg-elementor'] = rtTPG()->tpg_can_be_rtl( 'css/tpg-elementor' );
47
+
48
+ if ( is_admin() ) {
49
+ $scripts[] = [
50
+ 'handle' => 'rt-select2',
51
+ 'src' => rtTPG()->get_assets_uri( 'vendor/select2/select2.min.js' ),
52
+ 'deps' => [ 'jquery' ],
53
+ 'footer' => false,
54
+ ];
55
+ $scripts[] = [
56
+ 'handle' => 'rt-tpg-admin',
57
+ 'src' => rtTPG()->get_assets_uri( 'js/admin.js' ),
58
+ 'deps' => [ 'jquery' ],
59
+ 'footer' => true,
60
+ ];
61
+ $scripts[] = [
62
+ 'handle' => 'rt-tpg-admin-preview',
63
+ 'src' => rtTPG()->get_assets_uri( 'js/admin-preview.js' ),
64
+ 'deps' => [ 'jquery' ],
65
+ 'footer' => true,
66
+ ];
67
+ $styles['rt-select2'] = rtTPG()->get_assets_uri( 'vendor/select2/select2.min.css' );
68
+ $styles['rt-tpg-admin'] = rtTPG()->get_assets_uri( 'css/admin.css' );
69
+ $styles['rt-tpg-admin-preview'] = rtTPG()->get_assets_uri( 'css/admin-preview.css' );
70
+ }
71
+
72
+ foreach ( $scripts as $script ) {
73
+ wp_register_script( $script['handle'], $script['src'], $script['deps'], isset( $script['version'] ) ? $script['version'] : $this->version, $script['footer'] );
74
+ }
75
+
76
+ foreach ( $styles as $k => $v ) {
77
+ wp_register_style( $k, $v, false, isset( $script['version'] ) ? $script['version'] : $this->version );
78
+ }
79
+ }
80
+
81
+ public function enqueue() {
82
+ $settings = get_option( rtTPG()->options['settings'] );
83
+
84
+ if ( ! isset( $settings['tpg_load_script'] ) ) {
85
+ wp_enqueue_style( 'rt-tpg-common' );
86
+ wp_enqueue_style( 'rt-tpg' );
87
+ }
88
+ $scriptBefore = isset( $settings['script_before_item_load'] ) ? stripslashes( $settings['script_before_item_load'] ) : null;
89
+ $scriptAfter = isset( $settings['script_after_item_load'] ) ? stripslashes( $settings['script_after_item_load'] ) : null;
90
+ $scriptLoaded = isset( $settings['script_loaded'] ) ? stripslashes( $settings['script_loaded'] ) : null;
91
+ $script = "(function($){
92
+ $('.rt-tpg-container').on('tpg_item_before_load', function(){{$scriptBefore}});
93
+ $('.rt-tpg-container').on('tpg_item_after_load', function(){{$scriptAfter}});
94
+ $('.rt-tpg-container').on('tpg_loaded', function(){{$scriptLoaded}});
95
+ })(jQuery);";
96
+ wp_add_inline_script( 'rt-tpg', $script );
97
+ }
98
+
99
+ /**
100
+ * Header Scripts
101
+ */
102
+ public function header_scripts() {
103
+ echo "<style>:root{--tpg-primary-color: #0d6efd;--tpg-secondary-color:#0654c4;--tpg-primary-light:#c4d0ff }</style>";
104
+ }
105
+
106
+ }
app/Controllers/ShortcodeController.php ADDED
@@ -0,0 +1,1089 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Controllers;
4
+
5
+ use RT\ThePostGrid\Helpers\Fns;
6
+ use RT\ThePostGrid\Helpers\Options;
7
+
8
+ class ShortcodeController {
9
+ private $scA = [];
10
+ private $l4toggle = false;
11
+
12
+ public function __construct() {
13
+ add_shortcode( 'the-post-grid', [ &$this, 'the_post_grid_short_code' ] );
14
+ add_action( 'pre_get_posts', [ &$this, 'make_sticky_work' ] );
15
+ }
16
+
17
+ public function make_sticky_work( $q ) {
18
+ if ( true === $q->get( 'wp_tpg_is_home' ) ) {
19
+ $q->is_home = true;
20
+ }
21
+ }
22
+
23
+ public function register_sc_scripts() {
24
+ $settings = get_option( rtTPG()->options['settings'] );
25
+
26
+ $caro = $isSinglePopUp = false;
27
+ $script = [];
28
+ $style = [];
29
+ array_push( $script, 'jquery' );
30
+ $ajaxurl = '';
31
+ if ( in_array( 'sitepress-multilingual-cms/sitepress.php', get_option( 'active_plugins' ) ) ) {
32
+ $ajaxurl .= admin_url( 'admin-ajax.php?lang=' . ICL_LANGUAGE_CODE );
33
+ } else {
34
+ $ajaxurl .= admin_url( 'admin-ajax.php' );
35
+ }
36
+ $variables = [
37
+ 'nonceID' => rtTPG()->nonceId(),
38
+ 'nonce' => wp_create_nonce( rtTPG()->nonceText() ),
39
+ 'ajaxurl' => $ajaxurl,
40
+ ];
41
+
42
+ foreach ( $this->scA as $sc ) {
43
+ if ( isset( $sc ) && is_array( $sc ) ) {
44
+ if ( $sc['isSinglePopUp'] ) {
45
+ $isSinglePopUp = true;
46
+ }
47
+ if ( $sc['isWooCom'] ) {
48
+ $variables['woocommerce_enable_ajax_add_to_cart'] = get_option( 'woocommerce_enable_ajax_add_to_cart' );
49
+ $variables['woocommerce_cart_redirect_after_add'] = get_option( 'woocommerce_cart_redirect_after_add' );
50
+ }
51
+ }
52
+ }
53
+ if ( count( $this->scA ) ) {
54
+ array_push( $script, 'jquery' );
55
+ array_push( $script, 'rt-isotope-js' );
56
+ array_push( $script, 'rt-image-load-js' );
57
+ array_push( $style, 'rt-fontawsome' );
58
+ array_push( $script, 'rt-tpg' );
59
+
60
+ if ( isset( $settings['tpg_load_script'] ) ) {
61
+ wp_enqueue_style( 'rt-tpg-common' );
62
+ wp_enqueue_style( 'rt-tpg' );
63
+ }
64
+
65
+ if ( is_rtl() ) {
66
+ array_push( $style, 'rt-tpg-common-rtl' );
67
+ array_push( $style, 'rt-tpg-rtl' );
68
+ }
69
+
70
+ wp_enqueue_style( $style );
71
+ wp_enqueue_script( $script );
72
+ wp_localize_script( 'rt-tpg', 'rttpg', $variables );
73
+
74
+ do_action( 'tpg_after_script', $isSinglePopUp );
75
+ }
76
+
77
+ if ( $isSinglePopUp && rtTPG()->hasPro() ) {
78
+ $html = null;
79
+ $html .= '<div class="md-modal rt-md-effect" id="rt-modal">
80
+ <div class="md-content">
81
+ <div class="rt-md-content-holder">
82
+
83
+ </div>
84
+ <div class="md-cls-btn">
85
+ <button class="md-close"><i class="fa fa-times" aria-hidden="true"></i></button>
86
+ </div>
87
+ </div>
88
+ </div>';
89
+ $html .= "<div class='md-overlay'></div>";
90
+ echo $html;
91
+ }
92
+ }
93
+
94
+ public function the_post_grid_short_code( $atts, $content = null ) {
95
+ $rand = mt_rand();
96
+
97
+ $layoutID = "rt-tpg-container-" . $rand;
98
+
99
+ $html = null;
100
+ $arg = [];
101
+ $atts = shortcode_atts( [
102
+ 'id' => null,
103
+ ], $atts, 'the-post-grid' );
104
+ $scID = $atts['id'];
105
+ if ( $scID && ! is_null( get_post( $scID ) ) ) {
106
+ $scMeta = get_post_meta( $scID );
107
+ $layout = ( isset( $scMeta['layout'][0] ) ? $scMeta['layout'][0] : 'layout1' );
108
+ $gridStyle = ( isset( $scMeta['grid_style'][0] ) ? $scMeta['grid_style'][0] : 'even' );
109
+ if ( ! in_array( $layout, array_keys( Options::rtTPGLayouts() ) ) ) {
110
+ $layout = 'layout1';
111
+ }
112
+
113
+ $isIsotope = preg_match( '/isotope/', $layout );
114
+ $isCarousel = preg_match( '/carousel/', $layout );
115
+ $isGrid = preg_match( '/layout/', $layout );
116
+ $isWooCom = preg_match( '/wc/', $layout );
117
+ $isEdd = preg_match( '/edd/', $layout );
118
+ $isOffset = preg_match( '/offset/', $layout );
119
+ $isGridHover = preg_match( '/grid_hover/', $layout );
120
+
121
+ $colStore = $dCol = ( isset( $scMeta['column'][0] ) ? absint( $scMeta['column'][0] ) : 3 );
122
+ $tCol = ( isset( $scMeta['tpg_tab_column'][0] ) ? absint( $scMeta['tpg_tab_column'][0] ) : 2 );
123
+ $mCol = ( isset( $scMeta['tpg_mobile_column'][0] ) ? absint( $scMeta['tpg_mobile_column'][0] ) : 1 );
124
+ if ( ! in_array( $dCol, array_keys( Options::scColumns() ) ) ) {
125
+ $dCol = 3;
126
+ }
127
+ if ( ! in_array( $tCol, array_keys( Options::scColumns() ) ) ) {
128
+ $tCol = 2;
129
+ }
130
+ if ( ! in_array( $dCol, array_keys( Options::scColumns() ) ) ) {
131
+ $mCol = 1;
132
+ }
133
+
134
+ if ( $isOffset ) {
135
+ $dCol = ( $dCol < 3 ? 2 : $dCol );
136
+ $tCol = ( $tCol < 3 ? 2 : $tCol );
137
+ $mCol = ( $mCol < 3 ? 1 : $mCol );
138
+ }
139
+ $arg = [];
140
+ $fImg = ( ! empty( $scMeta['feature_image'][0] ) ? true : false );
141
+ $fImgSize = ( isset( $scMeta['featured_image_size'][0] ) ? $scMeta['featured_image_size'][0] : "medium" );
142
+ $mediaSource = ( isset( $scMeta['media_source'][0] ) ? $scMeta['media_source'][0] : "feature_image" );
143
+ $arg['excerpt_type'] = ( isset( $scMeta['tgp_excerpt_type'][0] ) ? $scMeta['tgp_excerpt_type'][0] : 'character' );
144
+ $arg['title_limit_type'] = ( isset( $scMeta['tpg_title_limit_type'][0] ) ? $scMeta['tpg_title_limit_type'][0] : 'character' );
145
+ $arg['excerpt_limit'] = ( isset( $scMeta['excerpt_limit'][0] ) ? absint( $scMeta['excerpt_limit'][0] ) : 0 );
146
+ $arg['title_limit'] = ( isset( $scMeta['tpg_title_limit'][0] ) ? absint( $scMeta['tpg_title_limit'][0] ) : 0 );
147
+ $arg['excerpt_more_text'] = ( isset( $scMeta['tgp_excerpt_more_text'][0] ) ? $scMeta['tgp_excerpt_more_text'][0] : null );
148
+ $arg['read_more_text'] = ( ! empty( $scMeta['tgp_read_more_text'][0] ) ? $scMeta['tgp_read_more_text'][0] : __( 'Read More', 'the-post-grid' ) );
149
+ $arg['show_all_text'] = ( ! empty( $scMeta['tpg_show_all_text'][0] )
150
+ ? $scMeta['tpg_show_all_text'][0]
151
+ : __( 'Show all',
152
+ 'the-post-grid' ) );
153
+ $arg['tpg_title_position'] = isset( $scMeta['tpg_title_position'][0] ) && ! empty( $scMeta['tpg_title_position'][0] ) ? $scMeta['tpg_title_position'][0] : null;
154
+ $arg['btn_alignment_class'] = isset( $scMeta['tpg_read_more_button_alignment'][0] ) && ! empty( $scMeta['tpg_read_more_button_alignment'][0] )
155
+ ? $scMeta['tpg_read_more_button_alignment'][0] : '';
156
+ // Category Settings
157
+ $arg['category_position'] = isset( $scMeta['tpg_category_position'][0] ) ? $scMeta['tpg_category_position'][0] : null;
158
+ $arg['category_style'] = ! empty( $scMeta['tpg_category_style'][0] ) ? $scMeta['tpg_category_style'][0] : '';
159
+ $arg['catIcon'] = isset( $scMeta['tpg_category_icon'][0] ) ? $scMeta['tpg_category_icon'][0] : true;
160
+ // Meta Settings
161
+ $arg['metaPosition'] = isset( $scMeta['tpg_meta_position'][0] ) ? $scMeta['tpg_meta_position'][0] : null;
162
+ $arg['metaIcon'] = isset( $scMeta['tpg_meta_icon'][0] ) ? $scMeta['tpg_meta_icon'][0] : true;
163
+ $arg['metaSeparator'] = ! empty( $scMeta['tpg_meta_separator'][0] ) ? $scMeta['tpg_meta_separator'][0] : '';
164
+ /* Argument create */
165
+ $args = [];
166
+ $postType = ( isset( $scMeta['tpg_post_type'][0] ) ? $scMeta['tpg_post_type'][0] : 'post' );
167
+ if ( $postType ) {
168
+ $args['post_type'] = $postType;
169
+ }
170
+
171
+ // Common filter
172
+ /* post__in */
173
+ $post__in = ( isset( $scMeta['post__in'][0] ) ? $scMeta['post__in'][0] : null );
174
+ if ( $post__in ) {
175
+ $post__in = explode( ',', $post__in );
176
+ $args['post__in'] = $post__in;
177
+ }
178
+ /* post__not_in */
179
+ $post__not_in = ( isset( $scMeta['post__not_in'][0] ) ? $scMeta['post__not_in'][0] : null );
180
+ if ( $post__not_in ) {
181
+ $post__not_in = explode( ',', $post__not_in );
182
+ $args['post__not_in'] = $post__not_in;
183
+ }
184
+
185
+ /* LIMIT */
186
+ $limit = ( ( empty( $scMeta['limit'][0] ) || $scMeta['limit'][0] === '-1' ) ? - 1 : absint( $scMeta['limit'][0] ) );
187
+ $queryOffset = empty( $scMeta['offset'][0] ) ? 0 : absint( $scMeta['offset'][0] );
188
+ $args['posts_per_page'] = $limit;
189
+ $pagination = ! empty( $scMeta['pagination'][0] );
190
+ $posts_loading_type = ( ! empty( $scMeta['posts_loading_type'][0] ) ? $scMeta['posts_loading_type'][0] : "pagination" );
191
+ if ( $pagination ) {
192
+ $posts_per_page = ( isset( $scMeta['posts_per_page'][0] ) ? intval( $scMeta['posts_per_page'][0] ) : $limit );
193
+ $args['posts_per_page'] = $posts_per_page;
194
+ $args['paged'] = get_query_var( 'page' ) ? get_query_var( 'page' ) : ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1 );
195
+ }
196
+
197
+ // Advance Filter
198
+ $adv_filter = get_post_meta( $scID, 'post_filter' );
199
+ $taxFilter = get_post_meta( $scID, 'tgp_filter_taxonomy', true );
200
+ $taxHierarchical = get_post_meta( $scID, 'tgp_filter_taxonomy_hierarchical', true );
201
+ $taxFilterTerms = [];
202
+ $taxFilterOperator = "IN";
203
+ // Taxonomy
204
+ $taxQ = [];
205
+ if ( in_array( 'tpg_taxonomy', $adv_filter ) && isset( $scMeta['tpg_taxonomy'] ) ) {
206
+ if ( is_array( $scMeta['tpg_taxonomy'] ) && ! empty( $scMeta['tpg_taxonomy'] ) ) {
207
+ foreach ( $scMeta['tpg_taxonomy'] as $taxonomy ) {
208
+ $terms = ( isset( $scMeta[ 'term_' . $taxonomy ] ) ? $scMeta[ 'term_' . $taxonomy ] : [] );
209
+ if ( is_array( $terms ) && ! empty( $terms ) ) {
210
+ $operator = ( isset( $scMeta[ 'term_operator_' . $taxonomy ][0] ) ? $scMeta[ 'term_operator_' . $taxonomy ][0] : "IN" );
211
+ $taxQ[] = [
212
+ 'taxonomy' => $taxonomy,
213
+ 'field' => 'term_id',
214
+ 'terms' => $terms,
215
+ 'operator' => $operator,
216
+ ];
217
+ if ( $taxonomy == $taxFilter ) {
218
+ $taxFilterOperator = $operator;
219
+ }
220
+ }
221
+ if ( $taxonomy == $taxFilter ) {
222
+ $taxFilterTerms = $terms;
223
+ }
224
+ }
225
+ }
226
+ if ( count( $taxQ ) >= 2 ) {
227
+ $relation = ( isset( $scMeta['taxonomy_relation'][0] ) ? $scMeta['taxonomy_relation'][0] : "AND" );
228
+ $taxQ['relation'] = $relation;
229
+ }
230
+ }
231
+
232
+ if ( ! empty( $taxQ ) ) {
233
+ $args['tax_query'] = $taxQ;
234
+ }
235
+
236
+ // Order
237
+ if ( in_array( 'order', $adv_filter ) ) {
238
+ $order_by = ( isset( $scMeta['order_by'][0] ) ? $scMeta['order_by'][0] : null );
239
+ $order = ( isset( $scMeta['order'][0] ) ? $scMeta['order'][0] : null );
240
+ if ( $order ) {
241
+ $args['order'] = $order;
242
+ }
243
+ if ( $order_by ) {
244
+ $args['orderby'] = $order_by;
245
+ $meta_key = ! empty( $scMeta['tpg_meta_key'][0] ) ? trim( $scMeta['tpg_meta_key'][0] ) : null;
246
+ if ( in_array( $order_by, array_keys( Options::rtMetaKeyType() ) ) && $meta_key ) {
247
+ $args['orderby'] = $order_by;
248
+ $args['meta_key'] = $meta_key;
249
+ }
250
+ }
251
+ }
252
+
253
+ // Status
254
+ if ( in_array( 'tpg_post_status', $adv_filter ) ) {
255
+ $post_status = ( isset( $scMeta['tpg_post_status'] ) ? $scMeta['tpg_post_status'] : [] );
256
+ if ( ! empty( $post_status ) ) {
257
+ $args['post_status'] = $post_status;
258
+ }
259
+ } else {
260
+ $args['post_status'] = 'publish';
261
+ }
262
+ // Author
263
+ $author = ( isset( $scMeta['author'] ) ? $scMeta['author'] : [] );
264
+ $filterAuthors = [];
265
+ if ( in_array( 'author', $adv_filter ) && ! empty( $author ) ) {
266
+ $filterAuthors = $args['author__in'] = $author;
267
+ }
268
+
269
+ // Search
270
+ $s = ( isset( $scMeta['s'][0] ) ? $scMeta['s'][0] : [] );
271
+ if ( in_array( 's', $adv_filter ) && ! empty( $s ) ) {
272
+ $args['s'] = $s;
273
+ }
274
+
275
+ // Date query
276
+ if ( in_array( 'date_range', $adv_filter ) ) {
277
+ $startDate = ( ! empty( $scMeta['date_range_start'][0] ) ? $scMeta['date_range_start'][0] : null );
278
+ $endDate = ( ! empty( $scMeta['date_range_end'][0] ) ? $scMeta['date_range_end'][0] : null );
279
+ if ( $startDate && $endDate ) {
280
+ $args['date_query'] = [
281
+ [
282
+ 'after' => $startDate,
283
+ 'before' => $endDate,
284
+ 'inclusive' => true,
285
+ ],
286
+ ];
287
+ }
288
+ }
289
+
290
+ $settings = get_option( rtTPG()->options['settings'] );
291
+ $oLayoutTag = ! empty( $settings['template_tag'] ) ? absint( $settings['template_tag'] ) : null;
292
+ $oLayoutAuthor = ! empty( $settings['template_author'] ) ? $settings['template_author'] : null;
293
+ $oLayoutCategory = ! empty( $settings['template_category'] ) ? $settings['template_category'] : null;
294
+ $oLayoutSearch = ! empty( $settings['template_search'] ) ? $settings['template_search'] : null;
295
+ $dataArchive = null;
296
+ if ( ( is_category() && $oLayoutCategory ) || ( is_search() && $oLayoutSearch ) || ( is_tag() && $oLayoutTag ) || ( is_author() && $oLayoutAuthor ) ) {
297
+ unset( $args['post_type'] );
298
+ unset( $args['tax_query'] );
299
+ unset( $args['author__in'] );
300
+ $obj = get_queried_object();
301
+ $aType = $aValue = null;
302
+ if ( $oLayoutTag && is_tag() ) {
303
+ if ( ! empty( $obj->slug ) ) {
304
+ $aValue = $args['tag'] = $obj->slug;
305
+ $aType = 'tag';
306
+ }
307
+ } elseif ( $oLayoutCategory && is_category() ) {
308
+ if ( ! empty( $obj->slug ) ) {
309
+ $aValue = $args['category_name'] = $obj->slug;
310
+ }
311
+ $aType = 'category';
312
+ } elseif ( $oLayoutAuthor && is_author() ) {
313
+ $aValue = $args['author'] = $obj->ID;
314
+ $aType = 'author';
315
+ } elseif ( $oLayoutSearch && is_search() ) {
316
+ $aValue = $args['s'] = get_search_query();
317
+ $aType = 'search';
318
+ }
319
+ $dataArchive = " data-archive='{$aType}' data-archive-value='{$aValue}'";
320
+ $args['posts_per_archive_page'] = $args['posts_per_page'];
321
+ }
322
+
323
+ // Validation
324
+ $containerDataAttr = null;
325
+ $containerDataAttr .= " data-layout='{$layout}' data-grid-style='{$gridStyle}' data-desktop-col='{$dCol}' data-tab-col='{$tCol}' data-mobile-col='{$mCol}'";
326
+
327
+ $dCol = $dCol == 5 ? '24' : round( 12 / $dCol );
328
+ $tCol = $dCol == 5 ? '24' : round( 12 / $tCol );
329
+ $mCol = $dCol == 5 ? '24' : round( 12 / $mCol );
330
+ if ( $isCarousel ) {
331
+ $dCol = $tCol = $mCol = 12;
332
+ }
333
+ $arg['grid'] = "rt-col-md-{$dCol} rt-col-sm-{$tCol} rt-col-xs-{$mCol}";
334
+ if ( $layout == 'layout2' || $layout == 'layout3' ) {
335
+ $iCol = ( isset( $scMeta['tgp_layout2_image_column'][0] ) ? absint( $scMeta['tgp_layout2_image_column'][0] ) : 4 );
336
+ $iCol = $iCol > 12 ? 4 : $iCol;
337
+ $cCol = 12 - $iCol;
338
+ $arg['image_area'] = "rt-col-sm-{$iCol} rt-col-xs-12 ";
339
+ $arg['content_area'] = "rt-col-sm-{$cCol} rt-col-xs-12 ";
340
+ } elseif ( $layout == 'layout4' ) {
341
+ $arg['image_area'] = "rt-col-md-6 rt-col-sm-12 rt-col-xs-12 ";
342
+ $arg['content_area'] = "rt-col-md-6 rt-col-sm-12 rt-col-xs-12 ";
343
+ }
344
+ $arg_class = [];
345
+ $gridType = ! empty( $scMeta['grid_style'][0] ) ? $scMeta['grid_style'][0] : 'even';
346
+ if ( $isIsotope && ! rtTPG()->hasPro() ) {
347
+ $arg_class[] = "masonry-grid-item";
348
+ } elseif ( ! $isCarousel && ! $isOffset ) {
349
+ $arg_class[] = $gridType . "-grid-item";
350
+ }
351
+ $arg_class[] = "rt-grid-item";
352
+ if ( $isOffset ) {
353
+ $arg_class[] = "rt-offset-item";
354
+ }
355
+ // Category class
356
+ $catHaveBg = ( isset( $scMeta['tpg_category_bg'][0] ) ? $scMeta['tpg_category_bg'][0] : '' );
357
+ if ( ! empty( $catHaveBg ) ) {
358
+ $arg_class[] = 'category-have-bg';
359
+ }
360
+ // Image animation type
361
+ $imgAnimationType = isset( $scMeta['tpg_image_animation'][0] ) ? $scMeta['tpg_image_animation'][0] : '';
362
+ if ( ! empty( $imgAnimationType ) ) {
363
+ $arg_class[] = $imgAnimationType;
364
+ }
365
+
366
+ $masonryG = null;
367
+
368
+ if ( $gridType == "even" && ! $isIsotope && ! $isCarousel ) {
369
+ $masonryG = " tpg-even";
370
+ } elseif ( $gridType == "masonry" && ! $isIsotope && ! $isCarousel ) {
371
+ $masonryG = " tpg-masonry";
372
+ }
373
+ $preLoader = $preLoaderHtml = null;
374
+ if ( $isIsotope ) {
375
+ $arg_class[] = 'isotope-item';
376
+ $preLoader = 'tpg-pre-loader';
377
+ }
378
+ if ( $isCarousel ) {
379
+ $arg_class[] = 'swiper-slide';
380
+ $preLoader = 'tpg-pre-loader';
381
+ }
382
+ if ( $preLoader && rtTPG()->hasPro() ) {
383
+ $preLoaderHtml = '<div class="rt-loading-overlay"></div><div class="rt-loading rt-ball-clip-rotate"><div></div></div>';
384
+ }
385
+
386
+ $margin = ! empty( $scMeta['margin_option'][0] ) ? $scMeta['margin_option'][0] : 'default';
387
+ if ( $margin == 'no' ) {
388
+ $arg_class[] = 'no-margin';
389
+ }
390
+ if ( ! empty( $scMeta['tpg_image_type'][0] ) && $scMeta['tpg_image_type'][0] == 'circle' ) {
391
+ $arg_class[] = 'tpg-img-circle';
392
+ }
393
+ $arg['class'] = implode( " ", $arg_class );
394
+ $arg['anchorClass'] = $arg['link_target'] = null;
395
+ $link = isset( $scMeta['link_to_detail_page'][0] ) ? $scMeta['link_to_detail_page'][0] : '1';
396
+ $link = ( $link == 'yes' ) ? '1' : $link;
397
+ if ( ! $link ) {
398
+ $arg['anchorClass'] = ' disabled';
399
+ }
400
+ $isSinglePopUp = false;
401
+ $linkType = ! empty( $scMeta['detail_page_link_type'][0] ) ? $scMeta['detail_page_link_type'][0] : 'popup';
402
+ if ( $link == '1' ) {
403
+ if ( $linkType == 'popup' && rtTPG()->hasPro() ) {
404
+ $popupType = ! empty( $scMeta['popup_type'][0] ) ? $scMeta['popup_type'][0] : 'single';
405
+ if ( $popupType == 'single' ) {
406
+ $arg['anchorClass'] .= ' tpg-single-popup';
407
+ $isSinglePopUp = true;
408
+ } else {
409
+ $arg['anchorClass'] .= ' tpg-multi-popup';
410
+ }
411
+ } else {
412
+ $arg['link_target'] = ! empty( $scMeta['link_target'][0] ) ? " target='{$scMeta['link_target'][0]}'" : null;
413
+ }
414
+ }
415
+
416
+ $parentClass = ( ! empty( $scMeta['parent_class'][0] ) ? trim( $scMeta['parent_class'][0] ) : null );
417
+ $defaultImgId = ( ! empty( $scMeta['default_preview_image'][0] ) ? absint( $scMeta['default_preview_image'][0] ) : null );
418
+ $customImgSize = ( ! empty( $scMeta['custom_image_size'] ) ? $scMeta['custom_image_size'] : [] );
419
+ // Grid Hover Layout
420
+ $fSmallImgSize = ( isset( $scMeta['featured_small_image_size'][0] ) ? $scMeta['featured_small_image_size'][0] : "medium" );
421
+ $customSmallImgSize = ( ! empty( $scMeta['custom_small_image_size'] ) ? $scMeta['custom_small_image_size'] : [] );
422
+
423
+ $arg['scID'] = $scID;
424
+ $arg['items'] = isset( $scMeta['item_fields'] ) ? ( $scMeta['item_fields'] ? $scMeta['item_fields'] : [] ) : [];
425
+ if ( in_array( 'cf', $arg['items'] ) ) {
426
+ $arg['cf_group'] = [];
427
+ $arg['cf_group'] = get_post_meta( $scID, 'cf_group' );
428
+ $arg['format'] = [
429
+ 'hide_empty' => get_post_meta( $scID, 'cf_hide_empty_value', true ),
430
+ 'show_value' => get_post_meta( $scID, 'cf_show_only_value', true ),
431
+ 'hide_group_title' => get_post_meta( $scID, 'cf_hide_group_title', true ),
432
+ ];
433
+ }
434
+
435
+ // Set readmore false if excerpt type = full content
436
+ if ( isset( $arg['excerpt_type'] ) && $arg['excerpt_type'] === 'full' && ( $key = array_search( 'read_more', $arg['items'] ) ) !== false ) {
437
+ unset( $arg['items'][ $key ] );
438
+ }
439
+ if ( empty( $scMeta['ignore_sticky_posts'][0] ) ) {
440
+ $args['ignore_sticky_posts'] = true;
441
+ } else {
442
+ $args['wp_tpg_is_home'] = true;
443
+ }
444
+
445
+ $filters = ! empty( $scMeta['tgp_filter'] ) ? $scMeta['tgp_filter'] : [];
446
+ $action_term = ! empty( $scMeta['tgp_default_filter'][0] ) ? absint( $scMeta['tgp_default_filter'][0] ) : 0;
447
+ $hide_all_button = ! empty( $scMeta['tpg_hide_all_button'][0] ) ? true : false;
448
+ if ( $taxHierarchical ) {
449
+ $terms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true, 0 );
450
+ } else {
451
+ $terms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true );
452
+ }
453
+ if ( $hide_all_button && ! $action_term ) {
454
+ if ( ! empty( $terms ) ) {
455
+ $allKeys = array_keys( $terms );
456
+ $action_term = $allKeys[0];
457
+ }
458
+ }
459
+ if ( in_array( '_taxonomy_filter', $filters ) && $taxFilter && $action_term ) {
460
+ $args['tax_query'] = [
461
+ [
462
+ 'taxonomy' => $taxFilter,
463
+ 'field' => 'term_id',
464
+ 'terms' => [ $action_term ],
465
+ ],
466
+ ];
467
+ }
468
+
469
+ if ( $limit != - 1 && $pagination ) {
470
+ $tempArgs = $args;
471
+ $tempArgs['posts_per_page'] = $limit;
472
+ $tempArgs['paged'] = 1;
473
+ $tempArgs['fields'] = 'ids';
474
+ $tempQ = new \WP_Query( $tempArgs );
475
+ if ( ! empty( $tempQ->posts ) ) {
476
+ $args['post__in'] = $tempQ->posts;
477
+ }
478
+ }
479
+
480
+ if ( $pagination && $queryOffset && isset( $args['paged'] ) ) {
481
+ $queryOffset = ( $posts_per_page * ( $args['paged'] - 1 ) ) + $queryOffset;
482
+ }
483
+ if ($queryOffset) {
484
+ $args['offset'] = $queryOffset;
485
+ }
486
+
487
+ $arg['title_tag'] = ( ! empty( $scMeta['title_tag'][0] ) && in_array( $scMeta['title_tag'][0], array_keys( Options::getTitleTags() ) ) )
488
+ ? esc_attr( $scMeta['title_tag'][0] ) : 'h3';
489
+
490
+ $gridQuery = new \WP_Query( apply_filters( 'tpg_sc_query_args', $args, $scMeta ) );
491
+
492
+ // Start layout
493
+ $html .= Fns::layoutStyle( $layoutID, $scMeta, $layout, $scID );
494
+ $containerDataAttr .= " data-sc-id='{$scID}'";
495
+
496
+ if ( isset( $settings['tpg_load_script'] ) ) {
497
+ $parentClass .= ' loading';
498
+ }
499
+ $html .= "<div class='rt-container-fluid rt-tpg-container tpg-shortcode-main-wrapper {$parentClass}' id='{$layoutID}' {$dataArchive} {$containerDataAttr}>";
500
+
501
+ // widget heading
502
+ $heading_tag = isset( $scMeta['tpg_heading_tag'][0] ) ? $scMeta['tpg_heading_tag'][0] : 'h2';
503
+ $heading_style = isset( $scMeta['tpg_heading_style'][0] ) && ! empty( $scMeta['tpg_heading_style'][0] ) ? $scMeta['tpg_heading_style'][0] : 'style1';
504
+ $heading_alignment = isset( $scMeta['tpg_heading_alignment'][0] ) ? $scMeta['tpg_heading_alignment'][0] : '';
505
+ $heading_link = isset( $scMeta['tpg_heading_link'][0] ) ? $scMeta['tpg_heading_link'][0] : '';
506
+
507
+ if ( ! empty( $arg['items'] ) && in_array( 'heading', $arg['items'] ) ) {
508
+ $html .= sprintf( '<div class="tpg-widget-heading-wrapper heading-%1$s %2$s">', $heading_style, $heading_alignment );
509
+ $html .= '<span class="tpg-widget-heading-line line-left"></span>';
510
+ if ( $heading_link ) {
511
+ $html .= sprintf( '<%1$s class="tpg-widget-heading"><a href="%2$s" title="%3$s">%3$s</a></%1$s>', $heading_tag, $heading_link, get_the_title() );
512
+ } else {
513
+ $html .= sprintf( '<%1$s class="tpg-widget-heading">%2$s</%1$s>', $heading_tag, get_the_title($scID) );
514
+ }
515
+ $html .= '<span class="tpg-widget-heading-line"></span>';
516
+ $html .= '</div>';
517
+ }
518
+
519
+ if ( ! $isCarousel && isset( $settings['tpg_load_script'] ) && isset( $settings['tpg_enable_preloader'] ) ) {
520
+ $html .= '<div id="bottom-script-loader" class="bottom-script-loader"><div class="rt-ball-clip-rotate"><div></div></div></div>';
521
+ }
522
+ if ( ! empty( $filters ) && ( $isGrid || $isOffset || $isWooCom || $isEdd ) ) {
523
+ $html .= "<div class='rt-layout-filter-container rt-clear'><div class='rt-filter-wrap'>";
524
+ $selectedSubTermsForButton = null;
525
+ $allText = apply_filters( 'tpg_filter_all_text', __( "All", "the-post-grid" ), $scMeta );
526
+ if ( in_array( '_taxonomy_filter', $filters ) && $taxFilter ) {
527
+ $filterType = ( ! empty( $scMeta['tgp_filter_type'][0] ) ? $scMeta['tgp_filter_type'][0] : null );
528
+ $post_count = ( ! empty( $scMeta['tpg_post_count'][0] ) ? $scMeta['tpg_post_count'][0] : null );
529
+ $postCountClass = ( $post_count ? " has-post-count" : null );
530
+ $allSelect = " selected";
531
+ $isTermSelected = false;
532
+ if ( $action_term && $taxFilter ) {
533
+ $isTermSelected = true;
534
+ $allSelect = null;
535
+ }
536
+ if ( ! $filterType || $filterType == 'dropdown' ) {
537
+ $html .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-dropdown-wrap parent-dropdown-wrap{$postCountClass}' data-taxonomy='{$taxFilter}'>";
538
+ $termDefaultText = $allText;
539
+ $dataTerm = 'all';
540
+ $htmlButton = "";
541
+ $selectedSubTerms = null;
542
+ $pCount = 0;
543
+ if ( ! empty( $terms ) ) {
544
+ $i = 0;
545
+ foreach ( $terms as $id => $term ) {
546
+ $pCount = $pCount + $term['count'];
547
+ $sT = null;
548
+ if ( $taxHierarchical ) {
549
+ $subTerms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true, $id );
550
+ if ( ! empty( $subTerms ) ) {
551
+ $count = 0;
552
+ $item = $allCount = null;
553
+ foreach ( $subTerms as $stId => $t ) {
554
+ $count = $count + absint( $t['count'] );
555
+ $sTPostCount = ( $post_count ? " (<span class='rt-post-count'>{$t['count']}</span>)" : null );
556
+ $item .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$stId}'><span class='rt-text'>{$t['name']}{$sTPostCount}</span></span>";
557
+ }
558
+ if ( $post_count ) {
559
+ $allCount = " (<span class='rt-post-count'>{$count}</span>)";
560
+ }
561
+ $sT .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-dropdown-wrap sub-dropdown-wrap{$postCountClass}'>";
562
+ $sT .= "<span class='term-default rt-filter-dropdown-default' data-term='{$id}'>
563
+ <span class='rt-text'>" . $allText . "{$allCount}</span>
564
+ <i class='fa fa-angle-down rt-arrow-angle' aria-hidden='true'></i>
565
+ </span>";
566
+ $sT .= '<span class="term-dropdown rt-filter-dropdown">';
567
+ $sT .= $item;
568
+ $sT .= '</span>';
569
+ $sT .= "</div>";
570
+ }
571
+ if ( $action_term === $id ) {
572
+ $selectedSubTerms = $sT;
573
+ }
574
+ }
575
+ $postCount = ( $post_count ? " (<span class='rt-post-count'>{$term['count']}</span>)" : null );
576
+ if ( $action_term && $action_term == $id ) {
577
+ $termDefaultText = $term['name'] . $postCount;
578
+ $dataTerm = $id;
579
+ }
580
+ if ( is_array( $taxFilterTerms ) && ! empty( $taxFilterTerms ) ) {
581
+ if ( $taxFilterOperator == "NOT IN" ) {
582
+ if ( ! in_array( $id, $taxFilterTerms ) && $action_term != $id ) {
583
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$id}'><span class='rt-text'>{$term['name']}{$postCount}</span>{$sT}</span>";
584
+ }
585
+ } else {
586
+ if ( in_array( $id, $taxFilterTerms ) && $action_term != $id ) {
587
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$id}'><span class='rt-text'>{$term['name']}{$postCount}</span>{$sT}</span>";
588
+ }
589
+ }
590
+ } else {
591
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$id}'><span class='rt-text'>{$term['name']}{$postCount}</span>{$sT}</span>";
592
+ }
593
+ $i ++;
594
+ }
595
+ }
596
+ $pAllCount = null;
597
+ if ( $post_count ) {
598
+ $pAllCount = " (<span class='rt-post-count'>{$pCount}</span>)";
599
+ if ( ! $action_term ) {
600
+ $termDefaultText = $termDefaultText . $pAllCount;
601
+ }
602
+ }
603
+ if ( ! $hide_all_button ) {
604
+ $htmlButton = "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='all'><span class='rt-text'>" . $allText
605
+ . "{$pAllCount}</span></span>" . $htmlButton;
606
+ }
607
+ $htmlButton = sprintf( '<span class="term-dropdown rt-filter-dropdown">%s</span>', $htmlButton );
608
+
609
+ $showAllhtml = '<span class="term-default rt-filter-dropdown-default" data-term="' . $dataTerm . '">
610
+ <span class="rt-text">' . $termDefaultText . '</span>
611
+ <i class="fa fa-angle-down rt-arrow-angle" aria-hidden="true"></i>
612
+ </span>';
613
+
614
+ $html .= $showAllhtml . $htmlButton;
615
+ $html .= '</div>' . $selectedSubTerms;
616
+ } else {
617
+ $termDefaultText = $allText;
618
+ $bCount = 0;
619
+ $bItems = null;
620
+ if ( ! empty( $terms ) ) {
621
+ foreach ( $terms as $id => $term ) {
622
+ $bCount = $bCount + absint( $term['count'] );
623
+ $sT = null;
624
+ if ( $taxHierarchical ) {
625
+ $subTerms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true, $id );
626
+ if ( ! empty( $subTerms ) ) {
627
+ $sT .= "<div class='rt-filter-sub-tax sub-button-group'>";
628
+ foreach ( $subTerms as $stId => $t ) {
629
+ $sTPostCount = ( $post_count ? " (<span class='rt-post-count'>{$t['count']}</span>)" : null );
630
+ $sT .= "<span class='rt-filter-button-item' data-term='{$stId}'>{$t['name']}{$sTPostCount}</span>";
631
+ }
632
+ $sT .= "</div>";
633
+ if ( $action_term === $id ) {
634
+ $selectedSubTermsForButton = $sT;
635
+ }
636
+ }
637
+ }
638
+ $postCount = ( $post_count ? " (<span class='rt-post-count'>{$term['count']}</span>)" : null );
639
+ $termSelected = null;
640
+ if ( $isTermSelected && $id == $action_term ) {
641
+ $termSelected = " selected";
642
+ }
643
+ if ( is_array( $taxFilterTerms ) && ! empty( $taxFilterTerms ) ) {
644
+ if ( $taxFilterOperator == "NOT IN" ) {
645
+ if ( ! in_array( $id, $taxFilterTerms ) ) {
646
+ $bItems .= "<span class='term-button-item rt-filter-button-item {$termSelected}' data-term='{$id}'>{$term['name']}{$postCount}{$sT}</span>";
647
+ }
648
+ } else {
649
+ if ( in_array( $id, $taxFilterTerms ) ) {
650
+ $bItems .= "<span class='term-button-item rt-filter-button-item {$termSelected}' data-term='{$id}'>{$term['name']}{$postCount}{$sT}</span>";
651
+ }
652
+ }
653
+ } else {
654
+ $bItems .= "<span class='term-button-item rt-filter-button-item {$termSelected}' data-term='{$id}'>{$term['name']}{$postCount}{$sT}</span>";
655
+ }
656
+ }
657
+ }
658
+ $html .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-button-wrap{$postCountClass}' data-taxonomy='{$taxFilter}'>";
659
+ if ( ! $hide_all_button ) {
660
+ $pCountH = ( $post_count ? " (<span class='rt-post-count'>{$bCount}</span>)" : null );
661
+ $html .= "<span class='term-button-item rt-filter-button-item {$allSelect}' data-term='all'>" . $allText . "{$pCountH}</span>";
662
+ }
663
+ $html .= $bItems;
664
+ $html .= "</div>";
665
+ }
666
+ }
667
+
668
+ // Author filter
669
+ if ( in_array( '_author_filter', $filters ) ) {
670
+ $filterType = ( ! empty( $scMeta['tgp_filter_type'][0] ) ? $scMeta['tgp_filter_type'][0] : null );
671
+ $post_count = ( ! empty( $scMeta['tpg_post_count'][0] ) ? $scMeta['tpg_post_count'][0] : null );
672
+ $users = get_users( apply_filters( 'tpg_author_arg', [] ) );
673
+
674
+ $allSelect = " selected";
675
+ $isTermSelected = false;
676
+ if ( $action_term && $taxFilter ) {
677
+ $isTermSelected = true;
678
+ $allSelect = null;
679
+ }
680
+ if ( ! $filterType || $filterType == 'dropdown' ) {
681
+ $html .= "<div class='rt-filter-item-wrap rt-author-filter rt-filter-dropdown-wrap parent-dropdown-wrap{$postCountClass}'>";
682
+ $termDefaultText = $allText;
683
+ $dataAuthor = 'all';
684
+ $htmlButton = "";
685
+ $htmlButton .= '<span class="author-dropdown rt-filter-dropdown">';
686
+ if ( ! empty( $users ) ) {
687
+ foreach ( $users as $user ) {
688
+ if ( is_array( $filterAuthors ) && ! empty( $filterAuthors ) ) {
689
+ if ( in_array( $user->ID, $filterAuthors ) ) {
690
+ if ( $action_term == $user->ID ) {
691
+ $termDefaultText = $user->display_name;
692
+ $dataTerm = $user->ID;
693
+ } else {
694
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$user->ID}'>{$user->display_name}</span>";
695
+ }
696
+ }
697
+ } else {
698
+ if ( $action_term == $user->ID ) {
699
+ $termDefaultText = $user->display_name;
700
+ $dataTerm = $user->ID;
701
+ } else {
702
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$user->ID}'>{$user->display_name}</span>";
703
+ }
704
+ }
705
+ }
706
+ }
707
+
708
+ if ( $isTermSelected ) {
709
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='all'>" . $allText . "{$pAllCount}</span>";
710
+ }
711
+ $htmlButton .= '</span>';
712
+
713
+ $showAllhtml = '<span class="term-default rt-filter-dropdown-default" data-term="' . $dataAuthor . '">
714
+ <span class="rt-text">' . $termDefaultText . '</span>
715
+ <i class="fa fa-angle-down rt-arrow-angle" aria-hidden="true"></i>
716
+ </span>';
717
+
718
+ $html .= $showAllhtml . $htmlButton;
719
+ $html .= '</div>';
720
+ } else {
721
+ $bCount = 0;
722
+ $bItems = null;
723
+ if ( ! empty( $users ) ) {
724
+ foreach ( $users as $user ) {
725
+ if ( is_array( $filterAuthors ) && ! empty( $filterAuthors ) ) {
726
+ if ( in_array( $user->ID, $filterAuthors ) ) {
727
+ $bItems .= "<span class='author-button-item rt-filter-button-item data-author='{$user->ID}'>{$user->display_name}</span>";
728
+ }
729
+ } else {
730
+ $bItems .= "<span class='author-button-item rt-filter-button-item data-author='{$user->ID}'>{$user->display_name}</span>";
731
+ }
732
+ }
733
+ }
734
+ $html .= "<div class='rt-filter-item-wrap rt-author-filter rt-filter-button-wrap{$postCountClass}' data-taxonomy='{$taxFilter}'>";
735
+ if ( ! $hide_all_button ) {
736
+ $pCountH = ( $post_count ? " (<span class='rt-post-count'>{$bCount}</span>)" : null );
737
+ $html .= "<span class='author-button-item rt-filter-button-item {$allSelect}' data-author='all'>" . $allText . "{$pCountH}</span>";
738
+ }
739
+ $html .= $bItems;
740
+ $html .= "</div>";
741
+ }
742
+ }
743
+
744
+ if ( in_array( '_search', $filters ) ) {
745
+ $html .= '<div class="rt-filter-item-wrap rt-search-filter-wrap">';
746
+ $html .= sprintf( '<input type="text" class="rt-search-input" placeholder="%s">', esc_html__( "Search...", 'the-post-grid' ) );
747
+ $html .= "<span class='rt-action'>&#128269;</span>";
748
+ $html .= "<span class='rt-loading'></span>";
749
+ $html .= '</div>';
750
+ }
751
+
752
+ if ( in_array( '_order_by', $filters ) ) {
753
+ $wooFeature = ( $postType == "product" ? true : false );
754
+ $orders = Options::rtPostOrderBy( $wooFeature );
755
+ $action_orderby = ( ! empty( $args['orderby'] ) ? trim( $args['orderby'] ) : "none" );
756
+ if($action_orderby == 'ID') {
757
+ $action_orderby = 'title';
758
+ }
759
+ if ( $action_orderby == 'none' ) {
760
+ $action_orderby_label = __( "Sort By None", "the-post-grid" );
761
+ } elseif ( in_array( $action_orderby, array_keys( Options::rtMetaKeyType() ) ) ) {
762
+ $action_orderby_label = __( "Meta value", "the-post-grid" );
763
+ } else {
764
+ $action_orderby_label = $orders[ $action_orderby ];
765
+ }
766
+
767
+ if ( $action_orderby !== 'none' ) {
768
+ $orders['none'] = __( "Sort By None", "the-post-grid" );
769
+ }
770
+ $html .= '<div class="rt-filter-item-wrap rt-order-by-action rt-filter-dropdown-wrap">';
771
+ $html .= "<span class='order-by-default rt-filter-dropdown-default' data-order-by='{$action_orderby}'>
772
+ <span class='rt-text-order-by'>{$action_orderby_label}</span>
773
+ <i class='fa fa-angle-down rt-arrow-angle' aria-hidden='true'></i>
774
+ </span>";
775
+ $html .= '<span class="order-by-dropdown rt-filter-dropdown">';
776
+
777
+ foreach ( $orders as $orderKey => $order ) {
778
+ $html .= '<span class="order-by-dropdown-item rt-filter-dropdown-item" data-order-by="' . $orderKey . '">' . $order . '</span>';
779
+ }
780
+ $html .= '</span>';
781
+ $html .= '</div>';
782
+ }
783
+
784
+ if ( in_array( '_sort_order', $filters ) ) {
785
+ $action_order = ( ! empty( $args['order'] ) ? strtoupper( trim( $args['order'] ) ) : "DESC" );
786
+ $html .= '<div class="rt-filter-item-wrap rt-sort-order-action">';
787
+ $html .= "<span class='rt-sort-order-action-arrow' data-sort-order='{$action_order}'>&nbsp;<span></span></span>";
788
+ $html .= '</div>';
789
+ }
790
+
791
+ $html .= "</div>$selectedSubTermsForButton</div>";
792
+ }
793
+
794
+ $html .= "<div data-title='" . __( "Loading ...",
795
+ 'the-post-grid' ) . "' class='rt-row rt-content-loader {$layout}{$masonryG} {$preLoader}'>";
796
+
797
+ $not_found_text = isset( $scMeta['tgp_not_found_text'][0] ) && ! empty( $scMeta['tgp_not_found_text'][0] ) ? esc_html( $scMeta['tgp_not_found_text'][0] )
798
+ : __( 'No post found', 'the-post-grid' );
799
+
800
+ if ( $gridQuery->have_posts() ) {
801
+ if ( $isCarousel ) {
802
+ $cOpt = ! empty( $scMeta['carousel_property'] ) ? $scMeta['carousel_property'] : [];
803
+ $slider_js_options = apply_filters( 'rttpg_slider_js_options', [
804
+ "speed" => ! empty( $scMeta['tpg_carousel_speed'][0] ) ? absint( $scMeta['tpg_carousel_speed'][0] ) : 250,
805
+ "autoPlayTimeOut" => ! empty( $scMeta['tpg_carousel_autoplay_timeout'][0] ) ? absint( $scMeta['tpg_carousel_autoplay_timeout'][0] ) : 5000,
806
+ "autoPlay" => in_array( 'auto_play', $cOpt ),
807
+ "stopOnHover" => in_array( 'stop_hover', $cOpt ),
808
+ "nav" => in_array( 'nav_button', $cOpt ),
809
+ "dots" => in_array( 'pagination', $cOpt ),
810
+ "loop" => in_array( 'loop', $cOpt ),
811
+ "lazyLoad" => in_array( 'lazyLoad', $cOpt ),
812
+ "autoHeight" => in_array( 'auto_height', $cOpt ),
813
+ "rtl" => in_array( 'rtl', $cOpt ) ? 'rtl' : 'ltr',
814
+ ], $scMeta );
815
+ $html .= sprintf( '<div class="rt-swiper-holder swiper" data-rtowl-options="%s" dir="%s"><div class="swiper-wrapper">',
816
+ htmlspecialchars( wp_json_encode( $slider_js_options ) ),
817
+ $slider_js_options['rtl']
818
+ );
819
+ }
820
+ $isotope_filter = null;
821
+ if ( $isIsotope ) {
822
+ $isotope_filter = isset( $scMeta['isotope_filter'][0] ) ? $scMeta['isotope_filter'][0] : null;
823
+ $isotope_dropdown_filter = isset( $scMeta['isotope_filter_dropdown'][0] ) ? $scMeta['isotope_filter_dropdown'][0] : null;
824
+ $selectedTerms = [];
825
+ if ( isset( $scMeta['post_filter'] )
826
+ && in_array( 'tpg_taxonomy',
827
+ $scMeta['post_filter'] )
828
+ && isset( $scMeta['tpg_taxonomy'] )
829
+ && in_array( $isotope_filter,
830
+ $scMeta['tpg_taxonomy'] )
831
+ ) {
832
+ $selectedTerms = ( isset( $scMeta[ 'term_' . $isotope_filter ] ) ? $scMeta[ 'term_' . $isotope_filter ] : [] );
833
+ }
834
+ $termArgs = [
835
+ 'taxonomy' => $isotope_filter,
836
+ 'orderby' => 'meta_value_num',
837
+ 'order' => 'ASC',
838
+ 'hide_empty' => false,
839
+ 'include' => $selectedTerms,
840
+ ];
841
+ if ( rtTPG()->hasPro() ) {
842
+ $termArgs['meta_key'] = '_rt_order';
843
+ }
844
+ $terms = get_terms( $termArgs );
845
+
846
+ $html .= '<div class="tpg-iso-filter">';
847
+ $htmlButton = $drop = null;
848
+ $fSelectTrigger = false;
849
+
850
+ if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
851
+ foreach ( $terms as $term ) {
852
+ $tItem = ! empty( $scMeta['isotope_default_filter'][0] ) ? $scMeta['isotope_default_filter'][0] : null;
853
+ $fSelected = null;
854
+ if ( $tItem == $term->term_id ) {
855
+ $fSelected = 'selected';
856
+ $fSelectTrigger = true;
857
+ }
858
+ $htmlButton .= sprintf( '<button class="rt-iso-btn-%s%s" data-filter=".iso_%d">%s</button>',
859
+ esc_attr( $term->slug ),
860
+ $fSelected ? " " . $fSelected : '',
861
+ $term->term_id,
862
+ $term->name
863
+ );
864
+ $drop .= "<option value='.iso_{$term->term_id}' {$fSelected}>{$term->name}</option>";
865
+ }
866
+ }
867
+ if ( empty( $scMeta['isotope_filter_show_all'][0] ) ) {
868
+ $fSelect = ( $fSelectTrigger ? null : 'class="selected"' );
869
+ $htmlButton = "<button class='rt-iso-btn-all selected' data-filter='*'>" . $arg['show_all_text'] . "</button>" . $htmlButton;
870
+ $drop = "<option value='*' {$fSelect}>{$arg['show_all_text']}</option>" . $drop;
871
+ }
872
+ $filter_count = ! empty( $scMeta['isotope_filter_count'][0] ) ? true : false;
873
+ $filter_url = ! empty( $scMeta['isotope_filter_url'][0] ) ? true : false;
874
+ $htmlButton = "<div id='iso-button-{$rand}' class='rt-tpg-isotope-buttons button-group filter-button-group option-set' data-url='{$filter_url}' data-count='{$filter_count}'>{$htmlButton}</div>";
875
+
876
+ if ( $isotope_dropdown_filter ) {
877
+ $html .= "<select class='isotope-dropdown-filter'>{$drop}</select>";
878
+ } else {
879
+ $html .= $htmlButton;
880
+ }
881
+ if ( ! empty( $scMeta['isotope_search_filter'][0] ) ) {
882
+ $html .= "<div class='iso-search'><input type='text' class='iso-search-input' placeholder='" . __( 'Search',
883
+ 'the-post-grid' ) . "' /></div>";
884
+ }
885
+ $html .= '</div>';
886
+ $html .= "<div class='rt-tpg-isotope' id='iso-tpg-{$rand}'>";
887
+ }
888
+
889
+ $l = $offLoop = 0;
890
+ $offsetBigHtml = $offsetSmallHtml = null;
891
+ $gridPostCount = 0;
892
+ $arg['totalPost'] = $gridQuery->post_count;
893
+
894
+ while ( $gridQuery->have_posts() ) : $gridQuery->the_post();
895
+ if ( $colStore == $l ) {
896
+ if ( $this->l4toggle ) {
897
+ $this->l4toggle = false;
898
+ } else {
899
+ $this->l4toggle = true;
900
+ }
901
+ $l = 0;
902
+ }
903
+ $arg['postCount'] = $gridPostCount ++;
904
+ $pID = get_the_ID();
905
+ $arg['pID'] = $pID;
906
+ $arg['title'] = Fns::get_the_title( $pID, $arg );
907
+ $arg['pLink'] = get_permalink();
908
+ $arg['toggle'] = $this->l4toggle;
909
+ $arg['layoutID'] = $layoutID;
910
+ $arg['author'] = apply_filters( 'rttpg_author_link',
911
+ sprintf( '<a href="%s">%s</a>', get_author_posts_url( get_the_author_meta( 'ID' ) ), get_the_author() ) );
912
+ $comments_number = get_comments_number( $pID );
913
+ $comments_text = sprintf( '(%s)', number_format_i18n( $comments_number ) );
914
+
915
+ $arg['date'] = get_the_date();
916
+ $arg['excerpt'] = Fns::get_the_excerpt( $pID, $arg );
917
+ $arg['categories'] = get_the_term_list( $pID, 'category', null, '<span class="rt-separator">,</span>' );
918
+ $arg['tags'] = get_the_term_list( $pID, 'post_tag', null, '<span class="rt-separator">,</span>' );
919
+ $arg['responsiveCol'] = [ $dCol, $tCol, $mCol ];
920
+ if ( $isIsotope ) {
921
+ $termAs = wp_get_post_terms( $pID, $isotope_filter, [ "fields" => "all" ] );
922
+ $isoFilter = [];
923
+ if ( ! empty( $termAs ) ) {
924
+ foreach ( $termAs as $term ) {
925
+ $isoFilter[] = "iso_" . $term->term_id;
926
+ $isoFilter[] = "rt-item-" . esc_attr( $term->slug );
927
+ }
928
+ }
929
+ $arg['isoFilter'] = ! empty( $isoFilter ) ? implode( " ", $isoFilter ) : '';
930
+ }
931
+ if ( comments_open() ) {
932
+ $arg['comment'] = "<a href='" . get_comments_link( $pID ) . "'>{$comments_text} </a>";
933
+ } else {
934
+ $arg['comment'] = "{$comments_text}";
935
+ }
936
+ $imgSrc = null;
937
+ $arg['smallImgSrc'] = ! $fImg ? Fns::getFeatureImageSrc( $pID, $fSmallImgSize, $mediaSource,
938
+ $defaultImgId,
939
+ $customSmallImgSize ) : null;
940
+ if ( $isOffset ) {
941
+ if ( $offLoop == 0 ) {
942
+ $arg['imgSrc'] = ! $fImg ? Fns::getFeatureImageSrc( $pID, $fImgSize, $mediaSource,
943
+ $defaultImgId,
944
+ $customImgSize ) : null;
945
+ $arg['offset'] = 'big';
946
+ $offsetBigHtml = Fns::get_template_html( 'layouts/' . $layout, $arg );
947
+ } else {
948
+ $arg['offset'] = 'small';
949
+ $arg['offsetCol'] = [ $dCol, $tCol, $mCol ];
950
+ $arg['imgSrc'] = ! $fImg ? Fns::getFeatureImageSrc( $pID, 'thumbnail',
951
+ $mediaSource,
952
+ $defaultImgId,
953
+ $customImgSize ) : null;
954
+ $offsetSmallHtml .= Fns::get_template_html( 'layouts/' . $layout, $arg );
955
+ }
956
+ } else {
957
+ $arg['imgSrc'] = ! $fImg ? Fns::getFeatureImageSrc( $pID, $fImgSize, $mediaSource,
958
+ $defaultImgId,
959
+ $customImgSize ) : null;
960
+ $html .= Fns::get_template_html( 'layouts/' . $layout, $arg );
961
+ }
962
+ $offLoop ++;
963
+ $l ++;
964
+ endwhile;
965
+ if ( $isOffset ) {
966
+ $oDCol = Fns::get_offset_col( $dCol );
967
+ $oTCol = Fns::get_offset_col( $tCol );
968
+ $oMCol = Fns::get_offset_col( $mCol );
969
+ if ( $layout == "offset03" || $layout == "offset04" ) {
970
+ $oDCol['big'] = $oTCol['big'] = $oDCol['small'] = $oTCol['small'] = 6;
971
+ $oMCol['big'] = $oMCol['small'] = 12;
972
+ } elseif ( $layout == "offset06" ) {
973
+ $oDCol['big'] = 7;
974
+ $oDCol['small'] = 5;
975
+ }
976
+ $html .= "<div class='rt-col-md-{$oDCol['big']} rt-col-sm-{$oTCol['big']} rt-col-xs-{$oMCol['big']}'><div class='rt-row'>{$offsetBigHtml}</div></div>";
977
+ $html .= "<div class='rt-col-md-{$oDCol['small']} rt-col-sm-{$oTCol['small']} rt-col-xs-{$oMCol['small']}'><div class='rt-row offset-small-wrap'>{$offsetSmallHtml}</div></div>";
978
+ }
979
+ if ( $isIsotope || $isCarousel ) {
980
+ $html .= '</div>'; // End isotope / Carousel item holder
981
+
982
+ if ($isIsotope) {
983
+ $html .= '<div class="isotope-term-no-post"><p>'.$not_found_text.'</p></div>';
984
+ }
985
+ if ( $isCarousel ) {
986
+
987
+ $html .= '</div>';
988
+
989
+ if ( in_array( 'pagination', $cOpt ) ) {
990
+ $html .= '<div class="swiper-pagination"></div>';
991
+ }
992
+ if ( in_array( 'nav_button', $cOpt ) ) {
993
+ $html .= '<div class="swiper-navigation"><div class="slider-btn swiper-button-prev"></div><div class="slider-btn swiper-button-next"></div></div>';
994
+ }
995
+ }
996
+ }
997
+ } else {
998
+
999
+ $html .= sprintf( '<p>%s</p>',
1000
+ apply_filters( 'tpg_not_found_text', $not_found_text, $args, $scMeta )
1001
+ );
1002
+ }
1003
+ $html .= $preLoaderHtml;
1004
+ $html .= "</div>"; // End row
1005
+ $htmlUtility = null;
1006
+ if ( $pagination && ! $isCarousel ) {
1007
+ if ( $isOffset || $isGridHover ) {
1008
+ $posts_loading_type = "page_prev_next";
1009
+ $htmlUtility .= "<div class='rt-cb-page-prev-next'>
1010
+ <span class='rt-cb-prev-btn'><i class='fa fa-angle-left' aria-hidden='true'></i></span>
1011
+ <span class='rt-cb-next-btn'><i class='fa fa-angle-right' aria-hidden='true'></i></span>
1012
+ </div>";
1013
+ } else {
1014
+ $hide = ( $gridQuery->max_num_pages < 2 ? " rt-hidden-elm" : null );
1015
+ if ( $posts_loading_type == "pagination" ) {
1016
+ if ( $isGrid && empty( $filters ) ) {
1017
+ $htmlUtility .= Fns::rt_pagination( $gridQuery,
1018
+ $args['posts_per_page'] );
1019
+ }
1020
+ } elseif ( $posts_loading_type == "pagination_ajax" && ! $isIsotope ) {
1021
+ $htmlUtility .= "<div class='rt-page-numbers'></div>";
1022
+ } elseif ( $posts_loading_type == "load_more" && rtTPG()->hasPro() ) {
1023
+ $htmlUtility .= "<div class='rt-loadmore-btn rt-loadmore-action rt-loadmore-style{$hide}'>
1024
+ <span class='rt-loadmore-text'>" . __( 'Load More', 'the-post-grid' ) . "</span>
1025
+ <div class='rt-loadmore-loading rt-ball-scale-multiple rt-2x'><div></div><div></div><div></div></div>
1026
+ </div>";
1027
+ } elseif ( $posts_loading_type == "load_on_scroll" && rtTPG()->hasPro() ) {
1028
+ $htmlUtility .= "<div class='rt-infinite-action'>
1029
+ <div class='rt-infinite-loading la-fire la-2x'>
1030
+ <div></div>
1031
+ <div></div>
1032
+ <div></div>
1033
+ </div>
1034
+ </div>";
1035
+ }
1036
+ }
1037
+ }
1038
+
1039
+ if ( $htmlUtility ) {
1040
+ $l4toggle = null;
1041
+ if ( $layout == "layout4" ) {
1042
+ $l4toggle = "data-l4toggle='{$this->l4toggle}'";
1043
+ }
1044
+ $html .= "<div class='rt-pagination-wrap' data-total-pages='{$gridQuery->max_num_pages}' data-posts-per-page='{$args['posts_per_page']}' data-type='{$posts_loading_type}' {$l4toggle} >"
1045
+ . $htmlUtility . "</div>";
1046
+ }
1047
+
1048
+ $html .= "</div>"; // container rt-tpg
1049
+
1050
+ wp_reset_postdata();
1051
+
1052
+ $scriptGenerator = [];
1053
+ $scriptGenerator['layout'] = $layoutID;
1054
+ $scriptGenerator['rand'] = $rand;
1055
+ $scriptGenerator['scMeta'] = $scMeta;
1056
+ $scriptGenerator['isCarousel'] = $isCarousel;
1057
+ $scriptGenerator['isSinglePopUp'] = $isSinglePopUp;
1058
+ $scriptGenerator['isWooCom'] = $isWooCom;
1059
+ $this->scA[] = $scriptGenerator;
1060
+ add_action( 'wp_footer', [ $this, 'register_sc_scripts' ] );
1061
+ } else {
1062
+ $html .= "<p>" . __( "No shortCode found", "the-post-grid" ) . "</p>";
1063
+ }
1064
+
1065
+ //restriction issue
1066
+ $restriction = ( ! empty( $scMeta['restriction_user_role'] ) ? $scMeta['restriction_user_role'] : [] );
1067
+ if ( ! empty( $restriction ) ) {
1068
+ if ( is_user_logged_in() ) {
1069
+ $currentUserRoles = Fns::getCurrentUserRoles();
1070
+ if ( in_array( 'administrator', $currentUserRoles ) ) {
1071
+ $html = $html;
1072
+ } else {
1073
+ if ( count( array_intersect( $restriction, $currentUserRoles ) ) ) {
1074
+ $html = $html;
1075
+ } else {
1076
+ $html = "<p>" . __( "You are not permitted to view this content.",
1077
+ "the-post-grid" ) . "</p>";
1078
+ }
1079
+ }
1080
+ } else {
1081
+ $html = "<p>" . __( "This is a restricted content, you need to logged in to view this content.",
1082
+ "the-post-grid" ) . "</p>";
1083
+ }
1084
+ }
1085
+
1086
+ return $html;
1087
+ }
1088
+
1089
+ }
app/Controllers/WidgetController.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace RT\ThePostGrid\Controllers;
5
+
6
+
7
+ use RT\ThePostGrid\Widgets\TPGWidget;
8
+
9
+ class WidgetController {
10
+ function __construct() {
11
+ add_action( 'widgets_init', [ $this, 'initWidget' ] );
12
+ }
13
+
14
+ function initWidget() {
15
+ register_widget( TPGWidget::class );
16
+ }
17
+ }
app/Helpers/Fns.php ADDED
@@ -0,0 +1,2420 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Helpers;
4
+
5
+ use RT\ThePostGrid\Models\Field;
6
+ use RT\ThePostGrid\Models\ReSizer;
7
+ use RT\ThePostGridPro\Helpers\Functions;
8
+
9
+ class Fns {
10
+
11
+ /**
12
+ * Get Ajax URL.
13
+ *
14
+ * @return string
15
+ */
16
+ public function ajax_url() {
17
+ return admin_url( 'admin-ajax.php', 'relative' );
18
+ }
19
+
20
+
21
+ /**
22
+ * @param $viewName
23
+ * @param array $args
24
+ * @param bool $return
25
+ *
26
+ * @return string|void
27
+ */
28
+ public static function view( $viewName, $args = [], $return = false ) {
29
+ $file = str_replace( ".", "/", $viewName );
30
+ $file = ltrim( $file, '/' );
31
+ $viewFile = trailingslashit( RT_THE_POST_GRID_PLUGIN_PATH . '/resources' ) . $file . '.php';
32
+ if ( ! file_exists( $viewFile ) ) {
33
+ return new \WP_Error( "brock", __( "$viewFile file not found" ) );
34
+ }
35
+ if ( $args ) {
36
+ extract( $args );
37
+ }
38
+ if ( $return ) {
39
+ ob_start();
40
+ include $viewFile;
41
+
42
+ return ob_get_clean();
43
+ }
44
+ include $viewFile;
45
+ }
46
+
47
+ /**
48
+ * @param integer $post_id Listing ID
49
+ */
50
+ static function update_post_views_count( $post_id ) {
51
+ if ( ! $post_id && is_admin() ) {
52
+ return;
53
+ }
54
+
55
+ $user_ip = $_SERVER['REMOTE_ADDR']; // retrieve the current IP address of the visitor
56
+ $key = 'tpg_cache_' . $user_ip . '_' . $post_id;
57
+ $value = [ $user_ip, $post_id ];
58
+ $visited = get_transient( $key );
59
+ if ( false === ( $visited ) ) {
60
+ set_transient( $key, $value, HOUR_IN_SECONDS * 12 ); // store the unique key, Post ID & IP address for 12 hours if it does not exist
61
+
62
+ // now run post views function
63
+ $count_key = self::get_post_view_count_meta_key();
64
+ $count = get_post_meta( $post_id, $count_key, true );
65
+ if ( '' == $count ) {
66
+ update_post_meta( $post_id, $count_key, 1 );
67
+ } else {
68
+ $count = absint( $count );
69
+ $count ++;
70
+ update_post_meta( $post_id, $count_key, $count );
71
+ }
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Template Content
77
+ *
78
+ * @param string $template_name Template name.
79
+ * @param array $args Arguments. (default: array).
80
+ * @param string $template_path Template path. (default: '').
81
+ * @param string $default_path Default path. (default: '').
82
+ */
83
+ static function get_template( $template_name, $args = null, $template_path = '', $default_path = '' ) {
84
+ if ( ! empty( $args ) && is_array( $args ) ) {
85
+ extract( $args ); // @codingStandardsIgnoreLine
86
+ }
87
+
88
+ $located = self::locate_template( $template_name, $template_path, $default_path );
89
+
90
+
91
+ if ( ! file_exists( $located ) ) {
92
+ /* translators: %s template */
93
+ self::doing_it_wrong( __FUNCTION__, sprintf( __( '%s does not exist.', 'the-post-grid' ), '<code>' . $located . '</code>' ), '1.0' );
94
+
95
+ return;
96
+ }
97
+
98
+ // Allow 3rd party plugin filter template file from their plugin.
99
+ $located = apply_filters( 'rttpg_get_template', $located, $template_name, $args );
100
+
101
+ do_action( 'rttpg_before_template_part', $template_name, $located, $args );
102
+
103
+ include $located;
104
+
105
+ do_action( 'rttpg_after_template_part', $template_name, $located, $args );
106
+ }
107
+
108
+ /**
109
+ * Get template content and return
110
+ *
111
+ * @param string $template_name Template name.
112
+ * @param array $args Arguments. (default: array).
113
+ * @param string $template_path Template path. (default: '').
114
+ * @param string $default_path Default path. (default: '').
115
+ *
116
+ * @return string
117
+ */
118
+ public static function get_template_html( $template_name, $args = [], $template_path = '', $default_path = '' ) {
119
+ ob_start();
120
+ self::get_template( $template_name, $args, $template_path, $default_path );
121
+
122
+ return ob_get_clean();
123
+ }
124
+
125
+ /**
126
+ * @param $template_name
127
+ * @param string $template_path
128
+ * @param string $default_path
129
+ *
130
+ * @return mixed|void
131
+ */
132
+ public static function locate_template( $template_name, $template_path = '', $default_path = '' ) {
133
+ $template_name = $template_name . ".php";
134
+ if ( ! $template_path ) {
135
+ $template_path = rtTPG()->get_template_path();
136
+ }
137
+
138
+ if ( ! $default_path ) {
139
+ $default_path = rtTPG()->default_template_path() . '/templates/';
140
+ }
141
+ // Look within passed path within the theme - this is priority.
142
+ $template_files = [];
143
+ $template_files[] = trailingslashit( $template_path ) . $template_name;
144
+
145
+ $template = locate_template( apply_filters( 'rttpg_locate_template_files', $template_files, $template_name, $template_path, $default_path ) );
146
+
147
+ // Get default template/.
148
+ if ( ! $template ) {
149
+ $template = trailingslashit( $default_path ) . $template_name;
150
+ }
151
+
152
+ return apply_filters( 'rttpg_locate_template', $template, $template_name );
153
+ }
154
+
155
+ static function doing_it_wrong( $function, $message, $version ) {
156
+ // @codingStandardsIgnoreStart
157
+ $message .= ' Backtrace: ' . wp_debug_backtrace_summary();
158
+ _doing_it_wrong( $function, $message, $version );
159
+ }
160
+
161
+ public static function verifyNonce() {
162
+ $nonce = isset( $_REQUEST[ rtTPG()->nonceId() ] ) ? $_REQUEST[ rtTPG()->nonceId() ] : null;
163
+ $nonceText = rtTPG()->nonceText();
164
+ if ( ! wp_verify_nonce( $nonce, $nonceText ) ) {
165
+ return false;
166
+ }
167
+
168
+ return true;
169
+ }
170
+
171
+ public static function print_html( $html, $allHtml = false ) {
172
+ if ( $allHtml ) {
173
+ echo stripslashes_deep( $html );
174
+ } else {
175
+ echo wp_kses_post( stripslashes_deep( $html ) );
176
+ }
177
+ }
178
+
179
+ public static function rtAllOptionFields() {
180
+ $fields = array_merge(
181
+ Options::rtTPGCommonFilterFields(),
182
+ Options::rtTPGLayoutSettingFields(),
183
+ Options::responsiveSettingsColumn(),
184
+ Options::layoutMiscSettings(),
185
+ Options::stickySettings(),
186
+ // settings
187
+ Options::rtTPGSCHeadingSettings(),
188
+ Options::rtTPGSCCategorySettings(),
189
+ Options::rtTPGSCTitleSettings(),
190
+ Options::rtTPGSCMetaSettings(),
191
+ Options::rtTPGSCImageSettings(),
192
+ Options::rtTPGSCExcerptSettings(),
193
+ Options::rtTPGSCButtonSettings(),
194
+ // style
195
+ Options::rtTPGStyleFields(),
196
+ Options::rtTPGStyleHeading(),
197
+ Options::rtTPGStyleFullArea(),
198
+ Options::rtTPGStyleContentWrap(),
199
+ Options::rtTPGStyleCategory(),
200
+ Options::rtTPGPostType(),
201
+ Options::rtTPGStyleButtonColorFields(),
202
+ Options::rtTPAdvanceFilters(),
203
+ Options::itemFields()
204
+ );
205
+
206
+ return $fields;
207
+ }
208
+
209
+ public static function rt_get_all_term_by_taxonomy( $taxonomy = null, $count = false, $parent = false ) {
210
+ $terms = [];
211
+ if ( $taxonomy ) {
212
+ $temp_terms = get_terms( [ 'taxonomy' => $taxonomy, 'hide_empty' => 0 ] );
213
+ if ( is_array( $temp_terms ) && ! empty( $temp_terms ) && empty( $temp_terms['errors'] ) ) {
214
+ foreach ( $temp_terms as $term ) {
215
+ $order = get_term_meta( $term->term_id, '_rt_order', true );
216
+ if ( $order === "" ) {
217
+ update_term_meta( $term->term_id, '_rt_order', 0 );
218
+ }
219
+ }
220
+ global $wp_version;
221
+ $args = [
222
+ 'taxonomy' => $taxonomy,
223
+ 'orderby' => 'meta_value_num',
224
+ 'meta_key' => '_rt_order',
225
+ 'hide_empty' => false,
226
+ ];
227
+ if ( $parent >= 0 && $parent !== false ) {
228
+ $args['parent'] = absint( $parent );
229
+ }
230
+ $args['orderby'] = 'meta_value_num';
231
+ $args['meta_key'] = '_rt_order';
232
+
233
+ $termObjs = get_terms( $args );
234
+
235
+ foreach ( $termObjs as $term ) {
236
+ if ( $count ) {
237
+ $terms[ $term->term_id ] = [ 'name' => $term->name, 'count' => $term->count ];
238
+ } else {
239
+ $terms[ $term->term_id ] = $term->name;
240
+ }
241
+ }
242
+ }
243
+ }
244
+
245
+ return $terms;
246
+ }
247
+
248
+ public static function rt_get_selected_term_by_taxonomy( $taxonomy = null, $include = [], $count = false, $parent = false ) {
249
+ $terms = [];
250
+ if ( $taxonomy ) {
251
+ $temp_terms = get_terms( [ 'taxonomy' => $taxonomy, 'hide_empty' => 0 ] );
252
+ if ( is_array( $temp_terms ) && ! empty( $temp_terms ) && empty( $temp_terms['errors'] ) ) {
253
+ foreach ( $temp_terms as $term ) {
254
+ $order = get_term_meta( $term->term_id, '_rt_order', true );
255
+ if ( $order === "" ) {
256
+ update_term_meta( $term->term_id, '_rt_order', 0 );
257
+ }
258
+ }
259
+ global $wp_version;
260
+ $args = [
261
+ 'taxonomy' => $taxonomy,
262
+ 'orderby' => 'meta_value_num',
263
+ 'meta_key' => '_rt_order',
264
+ 'include' => $include,
265
+ 'hide_empty' => false,
266
+ ];
267
+ if ( $parent >= 0 && $parent !== false ) {
268
+ $args['parent'] = absint( $parent );
269
+ }
270
+ $args['orderby'] = 'meta_value_num';
271
+ $args['meta_key'] = '_rt_order';
272
+
273
+ $termObjs = get_terms( $args );
274
+
275
+ foreach ( $termObjs as $term ) {
276
+ if ( $count ) {
277
+ $terms[ $term->term_id ] = [ 'name' => $term->name, 'count' => $term->count ];
278
+ } else {
279
+ $terms[ $term->term_id ] = $term->name;
280
+ }
281
+ }
282
+ }
283
+ }
284
+
285
+ return $terms;
286
+ }
287
+
288
+ public static function getCurrentUserRoles() {
289
+ global $current_user;
290
+
291
+ return $current_user->roles;
292
+ }
293
+
294
+ public static function rt_get_taxonomy_for_filter( $post_type = null ) {
295
+ if ( ! $post_type ) {
296
+ $post_type = get_post_meta( get_the_ID(), 'tpg_post_type', true );
297
+ }
298
+ if ( ! $post_type ) {
299
+ $post_type = 'post';
300
+ }
301
+
302
+ return self::rt_get_all_taxonomy_by_post_type( $post_type );
303
+ }
304
+
305
+ public static function rt_get_all_taxonomy_by_post_type( $post_type = null ) {
306
+ $taxonomies = [];
307
+ if ( $post_type && post_type_exists( $post_type ) ) {
308
+ $taxObj = get_object_taxonomies( $post_type, 'objects' );
309
+ if ( is_array( $taxObj ) && ! empty( $taxObj ) ) {
310
+ foreach ( $taxObj as $tKey => $taxonomy ) {
311
+ $taxonomies[ $tKey ] = $taxonomy->label;
312
+ }
313
+ }
314
+ }
315
+ if ( $post_type == 'post' ) {
316
+ unset( $taxonomies['post_format'] );
317
+ }
318
+
319
+ return $taxonomies;
320
+ }
321
+
322
+ public static function rt_get_users() {
323
+ $users = [];
324
+ $u = get_users( apply_filters( 'tpg_author_arg', [] ) );
325
+ if ( ! empty( $u ) ) {
326
+ foreach ( $u as $user ) {
327
+ $users[ $user->ID ] = $user->display_name;
328
+ }
329
+ }
330
+
331
+ return $users;
332
+ }
333
+
334
+ public static function rtFieldGenerator( $fields = [] ) {
335
+ $html = null;
336
+ if ( is_array( $fields ) && ! empty( $fields ) ) {
337
+ $tpgField = new Field();
338
+ foreach ( $fields as $fieldKey => $field ) {
339
+ $html .= $tpgField->Field( $fieldKey, $field );
340
+ }
341
+ }
342
+
343
+ return $html;
344
+ }
345
+
346
+ /**
347
+ * Sanitize field value
348
+ *
349
+ * @param array $field
350
+ * @param null $value
351
+ *
352
+ * @return array|null
353
+ * @internal param $value
354
+ */
355
+ public static function sanitize( $field = [], $value = null ) {
356
+ $newValue = null;
357
+ if ( is_array( $field ) ) {
358
+ $type = ( ! empty( $field['type'] ) ? $field['type'] : 'text' );
359
+ if ( empty( $field['multiple'] ) ) {
360
+ if ( $type == 'text' || $type == 'number' || $type == 'select' || $type == 'checkbox' || $type == 'radio' ) {
361
+ $newValue = sanitize_text_field( $value );
362
+ } elseif ( $type == 'url' ) {
363
+ $newValue = esc_url( $value );
364
+ } elseif ( $type == 'slug' ) {
365
+ $newValue = sanitize_title_with_dashes( $value );
366
+ } elseif ( $type == 'textarea' ) {
367
+ $newValue = wp_kses_post( $value );
368
+ } elseif ( $type == 'script' ) {
369
+ $newValue = trim( $value );
370
+ } elseif ( $type == 'colorpicker' ) {
371
+ $newValue = self::sanitize_hex_color( $value );
372
+ } elseif ( $type == 'image_size' ) {
373
+ $newValue = [];
374
+ foreach ( $value as $k => $v ) {
375
+ $newValue[ $k ] = esc_attr( $v );
376
+ }
377
+ } elseif ( $type == 'style' ) {
378
+ $newValue = [];
379
+ foreach ( $value as $k => $v ) {
380
+ if ( $k == 'color' ) {
381
+ $newValue[ $k ] = self::sanitize_hex_color( $v );
382
+ } else {
383
+ $newValue[ $k ] = self::sanitize( [ 'type' => 'text' ], $v );
384
+ }
385
+ }
386
+ } else {
387
+ $newValue = sanitize_text_field( $value );
388
+ }
389
+ } else {
390
+ $newValue = [];
391
+ if ( ! empty( $value ) ) {
392
+ if ( is_array( $value ) ) {
393
+ foreach ( $value as $key => $val ) {
394
+ if ( $type == 'style' && $key == 0 ) {
395
+ if ( function_exists( 'sanitize_hex_color' ) ) {
396
+ $newValue = sanitize_hex_color( $val );
397
+ } else {
398
+ $newValue[] = self::sanitize_hex_color( $val );
399
+ }
400
+ } else {
401
+ $newValue[] = sanitize_text_field( $val );
402
+ }
403
+ }
404
+ } else {
405
+ $newValue[] = sanitize_text_field( $value );
406
+ }
407
+ }
408
+ }
409
+ }
410
+
411
+ return $newValue;
412
+ }
413
+
414
+ public static function sanitize_hex_color( $color ) {
415
+ if ( function_exists( 'sanitize_hex_color' ) ) {
416
+ return sanitize_hex_color( $color );
417
+ } else {
418
+ if ( '' === $color ) {
419
+ return '';
420
+ }
421
+
422
+ // 3 or 6 hex digits, or the empty string.
423
+ if ( preg_match( '|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {
424
+ return $color;
425
+ }
426
+ }
427
+ }
428
+
429
+ public static function rtFieldGeneratorBackup( $fields = [], $multi = false ) {
430
+ $html = null;
431
+ if ( is_array( $fields ) && ! empty( $fields ) ) {
432
+ $rtField = new Field();
433
+ if ( $multi ) {
434
+ foreach ( $fields as $field ) {
435
+ $html .= $rtField->Field( $field );
436
+ }
437
+ } else {
438
+ $html .= $rtField->Field( $fields );
439
+ }
440
+ }
441
+
442
+ return $html;
443
+ }
444
+
445
+ public static function rtSmartStyle( $fields = [] ) {
446
+ $h = null;
447
+ if ( ! empty( $fields ) ) {
448
+ foreach ( $fields as $key => $label ) {
449
+ $atts = '';
450
+ $proText = '';
451
+ $class = '';
452
+
453
+ $h .= "<div class='field-holder {$class}'>";
454
+
455
+ $h .= "<div class='field-label'><label>{$label}{$proText}</label></div>";
456
+ $h .= "<div class='field'>";
457
+ // color
458
+ $h .= "<div class='field-inner col-4'>";
459
+ $h .= "<div class='field-inner-container size'>";
460
+ $h .= "<span class='label'>Color</span>";
461
+ $cValue = get_post_meta( get_the_ID(), $key . "_color", true );
462
+ $h .= "<input type='text' value='{$cValue}' class='rt-color' name='{$key}_color'>";
463
+ $h .= "</div>";
464
+ $h .= "</div>";
465
+
466
+ // Font size
467
+ $h .= "<div class='field-inner col-4'>";
468
+ $h .= "<div class='field-inner-container size'>";
469
+ $h .= "<span class='label'>Font size</span>";
470
+ $h .= "<select {$atts} name='{$key}_size' class='rt-select2'>";
471
+ $fSizes = Options::scFontSize();
472
+ $sValue = get_post_meta( get_the_ID(), $key . "_size", true );
473
+ $h .= "<option value=''>Default</option>";
474
+ foreach ( $fSizes as $size => $sizeLabel ) {
475
+ $sSlt = ( $size == $sValue ? "selected" : null );
476
+ $h .= "<option value='{$size}' {$sSlt}>{$sizeLabel}</option>";
477
+ }
478
+ $h .= "</select>";
479
+ $h .= "</div>";
480
+ $h .= "</div>";
481
+
482
+ // Weight
483
+
484
+ $h .= "<div class='field-inner col-4'>";
485
+ $h .= "<div class='field-inner-container weight'>";
486
+ $h .= "<span class='label'>Weight</span>";
487
+ $h .= "<select {$atts} name='{$key}_weight' class='rt-select2'>";
488
+ $h .= "<option value=''>Default</option>";
489
+ $weights = Options::scTextWeight();
490
+ $wValue = get_post_meta( get_the_ID(), $key . "_weight", true );
491
+ foreach ( $weights as $weight => $weightLabel ) {
492
+ $wSlt = ( $weight == $wValue ? "selected" : null );
493
+ $h .= "<option value='{$weight}' {$wSlt}>{$weightLabel}</option>";
494
+ }
495
+ $h .= "</select>";
496
+ $h .= "</div>";
497
+ $h .= "</div>";
498
+
499
+ // Alignment
500
+
501
+ $h .= "<div class='field-inner col-4'>";
502
+ $h .= "<div class='field-inner-container alignment'>";
503
+ $h .= "<span class='label'>Alignment</span>";
504
+ $h .= "<select {$atts} name='{$key}_alignment' class='rt-select2'>";
505
+ $h .= "<option value=''>Default</option>";
506
+ $aligns = Options::scAlignment();
507
+ $aValue = get_post_meta( get_the_ID(), $key . "_alignment", true );
508
+ foreach ( $aligns as $align => $alignLabel ) {
509
+ $aSlt = ( $align == $aValue ? "selected" : null );
510
+ $h .= "<option value='{$align}' {$aSlt}>{$alignLabel}</option>";
511
+ }
512
+ $h .= "</select>";
513
+ $h .= "</div>";
514
+ $h .= "</div>";
515
+
516
+ $h .= "</div>";
517
+ $h .= "</div>";
518
+ }
519
+ }
520
+
521
+ return $h;
522
+ }
523
+
524
+ public static function custom_variation_price( $product ) {
525
+ $price = '';
526
+ $max = $product->get_variation_sale_price( 'max' );
527
+ $min = $product->get_variation_sale_price( 'min' );
528
+
529
+ if ( ! $min || $min !== $max ) {
530
+ $price .= wc_price( $product->get_price() );
531
+ }
532
+
533
+ if ( $max && $max !== $min ) {
534
+ $price .= " - ";
535
+ $price .= wc_price( $max );
536
+ }
537
+
538
+ return $price;
539
+ }
540
+
541
+ public static function getTPGShortCodeList() {
542
+ $scList = null;
543
+ $scQ = get_posts( [
544
+ 'post_type' => rtTPG()->post_type,
545
+ 'order_by' => 'title',
546
+ 'order' => 'DESC',
547
+ 'post_status' => 'publish',
548
+ 'posts_per_page' => - 1,
549
+ 'meta_query' => [
550
+ [
551
+ 'key' => 'layout',
552
+ 'value' => 'layout',
553
+ 'compare' => 'LIKE',
554
+ ],
555
+ ],
556
+ ] );
557
+ if ( ! empty( $scQ ) ) {
558
+ foreach ( $scQ as $sc ) {
559
+ $scList[ $sc->ID ] = $sc->post_title;
560
+ }
561
+ }
562
+
563
+ return $scList;
564
+ }
565
+
566
+ public static function getAllTPGShortCodeList() {
567
+ $scList = null;
568
+ $scQ = get_posts( [
569
+ 'post_type' => rtTPG()->post_type,
570
+ 'order_by' => 'title',
571
+ 'order' => 'ASC',
572
+ 'post_status' => 'publish',
573
+ 'posts_per_page' => - 1,
574
+ ] );
575
+ if ( ! empty( $scQ ) ) {
576
+ foreach ( $scQ as $sc ) {
577
+ $scList[ $sc->ID ] = $sc->post_title;
578
+ }
579
+ }
580
+
581
+ return $scList;
582
+ }
583
+
584
+ public static function socialShare( $pLink ) {
585
+ $html = null;
586
+ $html .= "<div class='single-tpg-share'>
587
+ <div class='fb-share'>
588
+ <div class='fb-share-button' data-href='{$pLink}' data-layout='button_count'></div>
589
+ </div>
590
+ <div class='twitter-share'>
591
+ <a href='{$pLink}' class='twitter-share-button'{count} data-url='https://about.twitter.com/resources/buttons#tweet'>Tweet</a>
592
+ </div>
593
+ <div class='googleplus-share'>
594
+ <div class='g-plusone'></div>
595
+ </div>
596
+ <div class='linkedin-share'>
597
+ <script type='IN/Share' data-counter='right'></script>
598
+ </div>
599
+ <div class='linkedin-share'>
600
+ <a data-pin-do='buttonPin' data-pin-count='beside' href='https://www.pinterest.com/pin/create/button/?url=https%3A%2F%2Fwww.flickr.com%2Fphotos%2Fkentbrew%2F6851755809%2F&media=https%3A%2F%2Ffarm8.staticflickr.com%2F7027%2F6851755809_df5b2051c9_z.jpg&description=Next%20stop%3A%20Pinterest'><img src='//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png' /></a>
601
+ </div>
602
+ </div>";
603
+ $html .= '<div id="fb-root"></div>
604
+ <script>(function(d, s, id) {
605
+ var js, fjs = d.getElementsByTagName(s)[0];
606
+ if (d.getElementById(id)) return;
607
+ js = d.createElement(s); js.id = id;
608
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
609
+ fjs.parentNode.insertBefore(js, fjs);
610
+ }(document, "script", "facebook-jssdk"));</script>';
611
+ $html .= "<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
612
+ <script>window.___gcfg = { lang: 'en-US', parsetags: 'onload', };</script>";
613
+ $html .= "<script src='https://apis.google.com/js/platform.js' async defer></script>";
614
+ $html .= '<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>';
615
+ $html .= '<script async defer src="//assets.pinterest.com/js/pinit.js"></script>';
616
+
617
+ return $html;
618
+ }
619
+
620
+ public static function get_image_sizes() {
621
+ global $_wp_additional_image_sizes;
622
+
623
+ $sizes = [];
624
+ $interSizes = get_intermediate_image_sizes();
625
+ if ( ! empty( $interSizes ) ) {
626
+ foreach ( get_intermediate_image_sizes() as $_size ) {
627
+ if ( in_array( $_size, [ 'thumbnail', 'medium', 'large' ] ) ) {
628
+ $sizes[ $_size ]['width'] = get_option( "{$_size}_size_w" );
629
+ $sizes[ $_size ]['height'] = get_option( "{$_size}_size_h" );
630
+ $sizes[ $_size ]['crop'] = (bool) get_option( "{$_size}_crop" );
631
+ } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
632
+ $sizes[ $_size ] = [
633
+ 'width' => $_wp_additional_image_sizes[ $_size ]['width'],
634
+ 'height' => $_wp_additional_image_sizes[ $_size ]['height'],
635
+ 'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],
636
+ ];
637
+ }
638
+ }
639
+ }
640
+
641
+ $imgSize = [];
642
+ if ( ! empty( $sizes ) ) {
643
+ $imgSize['full'] = __( "Full Size", 'the-post-grid' );
644
+ foreach ( $sizes as $key => $img ) {
645
+ $imgSize[ $key ] = ucfirst( $key ) . " ({$img['width']}*{$img['height']})";
646
+ }
647
+ }
648
+
649
+ return apply_filters( 'tpg_image_sizes', $imgSize );
650
+ }
651
+
652
+ public static function getFeatureImageSrc(
653
+ $post_id = null,
654
+ $fImgSize = 'medium',
655
+ $mediaSource = 'feature_image',
656
+ $defaultImgId = null,
657
+ $customImgSize = [],
658
+ $img_Class = ''
659
+ ) {
660
+ global $post;
661
+ $imgSrc = null;
662
+ $img_class = "rt-img-responsive ";
663
+ if ( $img_Class ) {
664
+ $img_class = $img_Class;
665
+ }
666
+ $post_id = ( $post_id ? absint( $post_id ) : $post->ID );
667
+ $alt = get_the_title( $post_id );
668
+ $image = null;
669
+ $cSize = false;
670
+ if ( $fImgSize == 'rt_custom' ) {
671
+ $fImgSize = 'full';
672
+ $cSize = true;
673
+ }
674
+
675
+ if ( $mediaSource == 'feature_image' ) {
676
+ if ( $aID = get_post_thumbnail_id( $post_id ) ) {
677
+ $image = wp_get_attachment_image( $aID, $fImgSize, '', [ 'class' => $img_class, 'loading' => false ] );
678
+ $imgSrc = wp_get_attachment_image_src( $aID, $fImgSize );
679
+ $imgSrc = ! empty( $imgSrc ) ? $imgSrc[0] : $imgSrc;
680
+ }
681
+ } elseif ( $mediaSource == 'first_image' ) {
682
+ if ( $img = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i',
683
+ get_the_content( $post_id ),
684
+ $matches )
685
+ ) {
686
+ $imgSrc = $matches[1][0];
687
+ $size = '';
688
+
689
+ if ( strpos( $imgSrc, site_url() ) !== false ) {
690
+ $imgAbs = str_replace( trailingslashit( site_url() ), ABSPATH, $imgSrc );
691
+ } else {
692
+ $imgAbs = ABSPATH . $imgSrc;
693
+ }
694
+
695
+ $imgAbs = apply_filters( 'rt_tpg_sc_first_image_src', $imgAbs );
696
+
697
+ if ( file_exists( $imgAbs ) ) {
698
+ $info = getimagesize( $imgAbs );
699
+ $size = isset( $info[3] ) ? $info[3] : '';
700
+ }
701
+
702
+ $image = "<img class='{$img_class}' src='{$imgSrc}' {$size} alt='{$alt}'>";
703
+ }
704
+ }
705
+
706
+ if ( ! $imgSrc && $defaultImgId ) {
707
+ $image = wp_get_attachment_image( $defaultImgId, $fImgSize );
708
+ }
709
+
710
+ if ( $imgSrc && $cSize ) {
711
+ $w = ( ! empty( $customImgSize[0] ) ? absint( $customImgSize[0] ) : null );
712
+ $h = ( ! empty( $customImgSize[1] ) ? absint( $customImgSize[1] ) : null );
713
+ $c = ( ! empty( $customImgSize[2] ) && $customImgSize[2] == 'soft' ? false : true );
714
+ if ( $w && $h ) {
715
+ $imgSrc = Fns::rtImageReSize( $imgSrc, $w, $h, $c );
716
+ if ( $img_Class !== 'swiper-lazy' ) {
717
+ $image = "<img class='{$img_class}' src='{$imgSrc}' width='{$w}' height='{$h}' alt='{$alt}'>";
718
+ } else {
719
+ $image = "<img class='{$img_class}' data-src='{$imgSrc}'>";
720
+ }
721
+ }
722
+ }
723
+
724
+ return $image;
725
+ }
726
+
727
+ public static function getFeatureImageUrl( $post_id = null, $fImgSize = 'medium' ) {
728
+ $image = $imgSrc = null;
729
+
730
+ if ( $aID = get_post_thumbnail_id( $post_id ) ) {
731
+ $image = wp_get_attachment_image_src( $aID, $fImgSize );
732
+ }
733
+
734
+ if ( is_array( $image ) ) {
735
+ $imgSrc = $image[0];
736
+ }
737
+
738
+ return $imgSrc;
739
+ }
740
+
741
+ public static function tpgCharacterLimit( $limit, $content ) {
742
+ $limit ++;
743
+
744
+ $text = '';
745
+
746
+ if ( mb_strlen( $content ) > $limit ) {
747
+ $subex = mb_substr( $content, 0, $limit );
748
+ $exwords = explode( ' ', $subex );
749
+ $excut = - ( mb_strlen( $exwords[ count( $exwords ) - 1 ] ) );
750
+
751
+ if ( $excut < 0 ) {
752
+ $text = mb_substr( $subex, 0, $excut );
753
+ } else {
754
+ $text = $subex;
755
+ }
756
+ } else {
757
+ $text = $content;
758
+ }
759
+
760
+ return $text;
761
+ }
762
+
763
+ public static function get_the_excerpt( $post_id, $data = [] ) {
764
+ $type = $data['excerpt_type'];
765
+ $post = get_post( $post_id );
766
+ if ( empty( $post ) ) {
767
+ return '';
768
+ }
769
+ if ( $type == 'full' ) {
770
+ $content = $post->post_content;
771
+
772
+ return apply_filters( 'tpg_content_full', $content, $post_id, $data );
773
+ } else {
774
+ $limit = isset( $data['excerpt_limit'] ) ? abs( $data['excerpt_limit'] ) : 0;
775
+ if ( class_exists( 'ET_GB_Block_Layout' ) ) {
776
+ $defaultExcerpt = $post->post_excerpt ?: wp_trim_words( $post->post_content, 55 );
777
+ } else {
778
+ $defaultExcerpt = $limit ? $post->post_content : get_the_excerpt( $post_id );
779
+ }
780
+
781
+ $more = $data['excerpt_more_text'];
782
+ $excerpt = preg_replace( '`\[[^\]]*\]`', '', wp_strip_all_tags($defaultExcerpt) );
783
+ $excerpt = strip_shortcodes( $excerpt );
784
+ $excerpt = preg_replace( '`[[^]]*]`', '', $excerpt );
785
+ $excerpt = str_replace( '…', '', $excerpt );
786
+ if ( $limit ) {
787
+ $excerpt = wp_filter_nohtml_kses( $excerpt );
788
+ if ( $type == "word" ) {
789
+ $limit = $limit + 1;
790
+ $rawExcerpt = $excerpt;
791
+ $excerpt = explode( ' ', $excerpt, $limit );
792
+ if ( count( $excerpt ) >= $limit ) {
793
+ array_pop( $excerpt );
794
+ $excerpt = implode( " ", $excerpt );
795
+ } else {
796
+ $excerpt = $rawExcerpt;
797
+ }
798
+ } else {
799
+ $excerpt = self::tpgCharacterLimit( $limit, $excerpt );
800
+ }
801
+ $excerpt = stripslashes( $excerpt );
802
+ } else {
803
+ $allowed_html = [
804
+ 'a' => [
805
+ 'href' => [],
806
+ 'title' => [],
807
+ ],
808
+ 'strong' => [],
809
+ 'b' => [],
810
+ 'br' => [ [] ],
811
+ ];
812
+ $excerpt = nl2br( wp_kses( $excerpt, $allowed_html ) );
813
+ }
814
+
815
+ $excerpt = ( $more ? $excerpt . " " . $more : $excerpt );
816
+
817
+ return apply_filters( 'tpg_get_the_excerpt', $excerpt, $post_id, $data, $defaultExcerpt );
818
+ }
819
+ }
820
+
821
+ public static function get_the_title( $post_id, $data = [] ) {
822
+ $title = $originalTitle = get_the_title( $post_id );
823
+ $limit = isset( $data['title_limit'] ) ? absint( $data['title_limit'] ) : 0;
824
+ $limit_type = isset( $data['title_limit_type'] ) ? trim( $data['title_limit_type'] ) : 'character';
825
+ if ( $limit ) {
826
+ if ( $limit_type == "word" ) {
827
+ $limit = $limit + 1;
828
+ $title = explode( ' ', $title, $limit );
829
+ if ( count( $title ) >= $limit ) {
830
+ array_pop( $title );
831
+ $title = implode( " ", $title );
832
+ } else {
833
+ $title = $originalTitle;
834
+ }
835
+ } else {
836
+ if ( $limit > 0 && strlen( $title ) > $limit ) {
837
+ $title = mb_substr( $title, 0, $limit, "utf-8" );
838
+ $title = preg_replace( '/\W\w+\s*(\W*)$/', '$1', $title );
839
+ }
840
+ }
841
+ }
842
+
843
+ return apply_filters( 'tpg_get_the_title', $title, $post_id, $data, $originalTitle );
844
+ }
845
+
846
+
847
+ public static function rt_pagination( $postGrid, $range = 4, $ajax = false ) {
848
+ $html = $pages = null;
849
+ $showitems = ( $range * 2 ) + 1;
850
+
851
+ $wpQuery = $postGrid;
852
+ global $wp_query;
853
+ if ( empty( $wpQuery ) ) {
854
+ $wpQuery = $wp_query;
855
+ }
856
+
857
+ $pages = ! empty( $wpQuery->max_num_pages ) ? $wpQuery->max_num_pages : 1;
858
+ $paged = ! empty( $wpQuery->query['paged'] ) ? $wpQuery->query['paged'] : 1;
859
+ if ( is_front_page() ) {
860
+ $paged = ! empty( $wp_query->query['paged'] ) ? $wp_query->query['paged'] : 1;
861
+ }
862
+
863
+
864
+ $ajaxClass = null;
865
+ $dataAttr = null;
866
+
867
+ if ( $ajax ) {
868
+ $ajaxClass = ' rt-ajax';
869
+ $dataAttr = "data-paged='1'";
870
+ }
871
+
872
+ if ( 1 != $pages ) {
873
+ $html .= '<div class="rt-pagination' . $ajaxClass . '" ' . $dataAttr . '>';
874
+ $html .= '<ul class="pagination-list">';
875
+ if ( $paged > 2 && $paged > $range + 1 && $showitems < $pages && ! $ajax ) {
876
+ $html .= "<li><a data-paged='1' href='" . get_pagenum_link( 1 ) . "' aria-label='First'>&laquo;</a></li>";
877
+ }
878
+
879
+ if ( $paged > 1 && $showitems < $pages && ! $ajax ) {
880
+ $p = $paged - 1;
881
+ $html .= "<li><a data-paged='{$p}' href='" . get_pagenum_link( $p ) . "' aria-label='Previous'>&lsaquo;</a></li>";
882
+ }
883
+
884
+ if ( $ajax ) {
885
+ for ( $i = 1; $i <= $pages; $i ++ ) {
886
+ $html .= ( $paged == $i ) ? "<li class=\"active\"><span>" . $i . "</span>
887
+
888
+ </li>" : "<li><a data-paged='{$i}' href='" . get_pagenum_link( $i ) . "'>" . $i . "</a></li>";
889
+ }
890
+ } else {
891
+ for ( $i = 1; $i <= $pages; $i ++ ) {
892
+ if ( 1 != $pages && ( ! ( $i >= $paged + $range + 1 || $i <= $paged - $range - 1 ) || $pages <= $showitems ) ) {
893
+ $html .= ( $paged == $i ) ? "<li class=\"active\"><span>" . $i . "</span>
894
+
895
+ </li>" : "<li><a data-paged='{$i}' href='" . get_pagenum_link( $i ) . "'>" . $i . "</a></li>";
896
+ }
897
+ }
898
+ }
899
+
900
+ if ( $paged < $pages && $showitems < $pages && ! $ajax ) {
901
+ $p = $paged + 1;
902
+ $html .= "<li><a data-paged='{$p}' href=\"" . get_pagenum_link( $paged + 1 ) . "\" aria-label='Next'>&rsaquo;</a></li>";
903
+ }
904
+
905
+ if ( $paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages && ! $ajax ) {
906
+ $html .= "<li><a data-paged='{$pages}' href='" . get_pagenum_link( $pages ) . "' aria-label='Last'>&raquo;</a></li>";
907
+ }
908
+
909
+ $html .= "</ul>";
910
+ $html .= "</div>";
911
+ }
912
+
913
+ return $html;
914
+ }
915
+
916
+ public static function rt_pagination_ajax( $scID, $range = 4, $pages = '' ) {
917
+ $html = null;
918
+
919
+
920
+ $html .= "<div class='rt-tpg-pagination-ajax' data-sc-id='{$scID}' data-paged='1'>";
921
+
922
+ $html .= "</div>";
923
+
924
+ return $html;
925
+ }
926
+
927
+ /**
928
+ * Call the Image resize model for resize function
929
+ *
930
+ * @param $url
931
+ * @param null $width
932
+ * @param null $height
933
+ * @param null $crop
934
+ * @param bool|true $single
935
+ * @param bool|false $upscale
936
+ *
937
+ * @return array|bool|string
938
+ * @throws Exception
939
+ * @throws Rt_Exception
940
+ */
941
+ public static function rtImageReSize( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false ) {
942
+ $rtResize = new ReSizer();
943
+
944
+ return $rtResize->process( $url, $width, $height, $crop, $single, $upscale );
945
+ }
946
+
947
+
948
+ /* Convert hexdec color string to rgb(a) string */
949
+ public static function rtHex2rgba( $color, $opacity = .5 ) {
950
+ $default = 'rgb(0,0,0)';
951
+
952
+ //Return default if no color provided
953
+ if ( empty( $color ) ) {
954
+ return $default;
955
+ }
956
+
957
+ //Sanitize $color if "#" is provided
958
+ if ( $color[0] == '#' ) {
959
+ $color = substr( $color, 1 );
960
+ }
961
+
962
+ //Check if color has 6 or 3 characters and get values
963
+ if ( strlen( $color ) == 6 ) {
964
+ $hex = [ $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] ];
965
+ } elseif ( strlen( $color ) == 3 ) {
966
+ $hex = [ $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] ];
967
+ } else {
968
+ return $default;
969
+ }
970
+
971
+ //Convert hexadec to rgb
972
+ $rgb = array_map( 'hexdec', $hex );
973
+
974
+ //Check if opacity is set(rgba or rgb)
975
+ if ( $opacity ) {
976
+ if ( absint( $opacity ) > 1 ) {
977
+ $opacity = 1.0;
978
+ }
979
+ $output = 'rgba(' . implode( ",", $rgb ) . ',' . $opacity . ')';
980
+ } else {
981
+ $output = 'rgb(' . implode( ",", $rgb ) . ')';
982
+ }
983
+
984
+ //Return rgb(a) color string
985
+ return $output;
986
+ }
987
+
988
+ public static function meta_exist( $meta_key, $post_id = null, $type = "post" ) {
989
+ if ( ! $post_id ) {
990
+ return false;
991
+ }
992
+
993
+ return metadata_exists( $type, $post_id, $meta_key );
994
+ }
995
+
996
+
997
+ public static function get_offset_col( $col ) {
998
+ $return = [
999
+ 'big' => 6,
1000
+ 'small' => 6,
1001
+ ];
1002
+ if ( $col ) {
1003
+ if ( $col == 12 ) {
1004
+ $return['big'] = 12;
1005
+ $return['small'] = 12;
1006
+ } elseif ( $col == 6 ) {
1007
+ $return['big'] = 6;
1008
+ $return['small'] = 6;
1009
+ } elseif ( $col == 4 ) {
1010
+ $return['big'] = 4;
1011
+ $return['small'] = 8;
1012
+ }
1013
+ }
1014
+
1015
+ return $return;
1016
+ }
1017
+
1018
+ public static function formatSpacing( $data = '' ) {
1019
+ if ( ! empty( $data ) ) {
1020
+ $spacing = array_filter( explode( ',', $data ), 'is_numeric' );
1021
+ if ( count( $spacing ) > 4 ) {
1022
+ $spacing = array_slice( $spacing, 0, 4, true );
1023
+ }
1024
+ $data = implode( "px ", $spacing );
1025
+ }
1026
+
1027
+ return $data;
1028
+ }
1029
+
1030
+ public static function layoutStyle( $layoutID, $scMeta, $layout, $scId = null ) {
1031
+ $css = null;
1032
+ $css .= "<style type='text/css' media='all'>";
1033
+ // primary color
1034
+ if ( $scId ) {
1035
+ $primaryColor = ( isset( $scMeta['primary_color'][0] ) ? $scMeta['primary_color'][0] : null );
1036
+ $button_bg_color = ( isset( $scMeta['button_bg_color'][0] ) ? $scMeta['button_bg_color'][0] : null );
1037
+ $button_active_bg_color = ( isset( $scMeta['button_active_bg_color'][0] ) ? $scMeta['button_active_bg_color'][0] : null );
1038
+ $button_hover_bg_color = ( isset( $scMeta['button_hover_bg_color'][0] ) ? $scMeta['button_hover_bg_color'][0] : null );
1039
+ $button_text_color = ( isset( $scMeta['button_text_bg_color'][0] ) ? $scMeta['button_text_bg_color'][0]
1040
+ : ( isset( $scMeta['button_text_color'][0] ) ? $scMeta['button_text_color'][0] : null ) );
1041
+ $button_hover_text_color = ( isset( $scMeta['button_hover_text_color'][0] ) ? $scMeta['button_hover_text_color'][0] : null );
1042
+ $button_border_color = ( isset( $scMeta['button_border_color'][0] ) ? $scMeta['button_border_color'][0] : null );
1043
+ $overlay_color = ( ! empty( $scMeta['overlay_color'][0] ) ? Fns::rtHex2rgba( $scMeta['overlay_color'][0],
1044
+ ! empty( $scMeta['overlay_opacity'][0] ) ? absint( $scMeta['overlay_opacity'][0] ) / 10 : .8 ) : null );
1045
+ $overlay_padding = ( ! empty( $scMeta['overlay_padding'][0] ) ? absint( $scMeta['overlay_padding'][0] ) : null );
1046
+ $gutter = ! empty( $scMeta['tgp_gutter'][0] ) ? absint( $scMeta['tgp_gutter'][0] ) : null;
1047
+ $read_more_button_border_radius = isset( $scMeta['tpg_read_more_button_border_radius'][0] ) ? $scMeta['tpg_read_more_button_border_radius'][0] : '';
1048
+ // Section
1049
+ $sectionBg = ( isset( $scMeta['tpg_full_area_bg'][0] ) ? $scMeta['tpg_full_area_bg'][0] : null );
1050
+ $sectionMargin = ( isset( $scMeta['tpg_full_area_margin'][0] ) ? $scMeta['tpg_full_area_margin'][0] : null );
1051
+ $sectionMargin = self::formatSpacing( $sectionMargin );
1052
+ $sectionPadding = ( isset( $scMeta['tpg_full_area_padding'][0] ) ? $scMeta['tpg_full_area_padding'][0] : null );
1053
+ $sectionPadding = self::formatSpacing( $sectionPadding );
1054
+ // Box
1055
+ $boxBg = ( isset( $scMeta['tpg_content_wrap_bg'][0] ) ? $scMeta['tpg_content_wrap_bg'][0] : null );
1056
+ $boxBorder = ( isset( $scMeta['tpg_content_wrap_border'][0] ) ? $scMeta['tpg_content_wrap_border'][0] : null );
1057
+ $boxBorderColor = ( isset( $scMeta['tpg_content_wrap_border_color'][0] ) ? $scMeta['tpg_content_wrap_border_color'][0] : null );
1058
+ $boxBorderRadius = ( isset( $scMeta['tpg_content_wrap_border_radius'][0] ) ? $scMeta['tpg_content_wrap_border_radius'][0] : null );
1059
+ $boxShadow = ( isset( $scMeta['tpg_content_wrap_shadow'][0] ) ? $scMeta['tpg_content_wrap_shadow'][0] : null );
1060
+ $boxPadding = ( isset( $scMeta['tpg_box_padding'][0] ) ? $scMeta['tpg_box_padding'][0] : null );
1061
+ $boxPadding = self::formatSpacing( $boxPadding );
1062
+ $contentPadding = ( isset( $scMeta['tpg_content_padding'][0] ) ? $scMeta['tpg_content_padding'][0] : null );
1063
+ $contentPadding = self::formatSpacing( $contentPadding );
1064
+ // Heading
1065
+ $headingBg = ( isset( $scMeta['tpg_heading_bg'][0] ) ? $scMeta['tpg_heading_bg'][0] : null );
1066
+ $headingColor = ( isset( $scMeta['tpg_heading_color'][0] ) ? $scMeta['tpg_heading_color'][0] : null );
1067
+ $headingBorderColor = ( isset( $scMeta['tpg_heading_border_color'][0] ) ? $scMeta['tpg_heading_border_color'][0] : null );
1068
+ $headingBorderSize = ( isset( $scMeta['tpg_heading_border_size'][0] ) ? $scMeta['tpg_heading_border_size'][0] : null );
1069
+ $headingMargin = ( isset( $scMeta['tpg_heading_margin'][0] ) ? $scMeta['tpg_heading_margin'][0] : null );
1070
+ $headingMargin = self::formatSpacing( $headingMargin );
1071
+ $headingPadding = ( isset( $scMeta['tpg_heading_padding'][0] ) ? $scMeta['tpg_heading_padding'][0] : null );
1072
+ $headingPadding = self::formatSpacing( $headingPadding );
1073
+ // Category
1074
+ $catBg = ( isset( $scMeta['tpg_category_bg'][0] ) ? $scMeta['tpg_category_bg'][0] : null );
1075
+ $catTextColor = ( isset( $scMeta['tpg_category_color'][0] ) ? $scMeta['tpg_category_color'][0] : null );
1076
+ $catBorderRadius = ( isset( $scMeta['tpg_category_border_radius'][0] ) ? $scMeta['tpg_category_border_radius'][0] : null );
1077
+ $catMargin = ( isset( $scMeta['tpg_category_margin'][0] ) ? $scMeta['tpg_category_margin'][0] : null );
1078
+ $catMargin = self::formatSpacing( $catMargin );
1079
+ $catPadding = ( isset( $scMeta['tpg_category_padding'][0] ) ? $scMeta['tpg_category_padding'][0] : null );
1080
+ $catPadding = self::formatSpacing( $catPadding );
1081
+ $categorySize = ( ! empty( $scMeta['rt_tpg_category_font_size'][0] ) ? absint( $scMeta['rt_tpg_category_font_size'][0] ) : null );
1082
+ // Image
1083
+ $image_border_radius = isset( $scMeta['tpg_image_border_radius'][0] ) ? $scMeta['tpg_image_border_radius'][0] : '';
1084
+ // Title
1085
+ $title_color = ( ! empty( $scMeta['title_color'][0] ) ? $scMeta['title_color'][0] : null );
1086
+ $title_size = ( ! empty( $scMeta['title_size'][0] ) ? absint( $scMeta['title_size'][0] ) : null );
1087
+ $title_weight = ( ! empty( $scMeta['title_weight'][0] ) ? $scMeta['title_weight'][0] : null );
1088
+ $title_alignment = ( ! empty( $scMeta['title_alignment'][0] ) ? $scMeta['title_alignment'][0] : null );
1089
+
1090
+ $title_hover_color = ( ! empty( $scMeta['title_hover_color'][0] ) ? $scMeta['title_hover_color'][0] : null );
1091
+
1092
+ $excerpt_color = ( ! empty( $scMeta['excerpt_color'][0] ) ? $scMeta['excerpt_color'][0] : null );
1093
+ $excerpt_size = ( ! empty( $scMeta['excerpt_size'][0] ) ? absint( $scMeta['excerpt_size'][0] ) : null );
1094
+ $excerpt_weight = ( ! empty( $scMeta['excerpt_weight'][0] ) ? $scMeta['excerpt_weight'][0] : null );
1095
+ $excerpt_alignment = ( ! empty( $scMeta['excerpt_alignment'][0] ) ? $scMeta['excerpt_alignment'][0] : null );
1096
+
1097
+ $meta_data_color = ( ! empty( $scMeta['meta_data_color'][0] ) ? $scMeta['meta_data_color'][0] : null );
1098
+ $meta_data_size = ( ! empty( $scMeta['meta_data_size'][0] ) ? absint( $scMeta['meta_data_size'][0] ) : null );
1099
+ $meta_data_weight = ( ! empty( $scMeta['meta_data_weight'][0] ) ? $scMeta['meta_data_weight'][0] : null );
1100
+ $meta_data_alignment = ( ! empty( $scMeta['meta_data_alignment'][0] ) ? $scMeta['meta_data_alignment'][0] : null );
1101
+ } else {
1102
+ $primaryColor = ( isset( $scMeta['primary_color'] ) ? $scMeta['primary_color'] : null );
1103
+ $button_bg_color = ( isset( $scMeta['button_bg_color'] ) ? $scMeta['button_bg_color'] : null );
1104
+ $button_active_bg_color = ( isset( $scMeta['button_active_bg_color'] ) ? $scMeta['button_active_bg_color'] : null );
1105
+ $button_hover_bg_color = ( isset( $scMeta['button_hover_bg_color'] ) ? $scMeta['button_hover_bg_color'] : null );
1106
+ $btn_text_color = get_post_meta( $scMeta['sc_id'], 'button_text_color', true );
1107
+ $button_text_color = ( ! empty( $scMeta['button_text_bg_color'] ) ? $scMeta['button_text_bg_color']
1108
+ : ( ! empty( $btn_text_color ) ? $btn_text_color : null ) );
1109
+ $button_border_color = ( isset( $scMeta['button_border_color'] ) ? $scMeta['button_border_color'] : null );
1110
+ $button_hover_text_color = ( isset( $scMeta['button_hover_text_color'] ) ? $scMeta['button_hover_text_color'] : null );
1111
+ $overlay_color = ( ! empty( $scMeta['overlay_color'] ) ? Fns::rtHex2rgba( $scMeta['overlay_color'],
1112
+ ! empty( $scMeta['overlay_opacity'] ) ? absint( $scMeta['overlay_opacity'] ) / 10 : .8 ) : null );
1113
+ $overlay_padding = ( ! empty( $scMeta['overlay_padding'] ) ? absint( $scMeta['overlay_padding'] ) : null );
1114
+ $gutter = ! empty( $scMeta['tgp_gutter'] ) ? absint( $scMeta['tgp_gutter'] ) : null;
1115
+ $read_more_button_border_radius = isset( $scMeta['tpg_read_more_button_border_radius'] ) ? $scMeta['tpg_read_more_button_border_radius'] : '';
1116
+ // Section
1117
+ $sectionBg = ( isset( $scMeta['tpg_full_area_bg'] ) ? $scMeta['tpg_full_area_bg'] : null );
1118
+ $sectionMargin = ( isset( $scMeta['tpg_full_area_margin'] ) ? $scMeta['tpg_full_area_margin'] : null );
1119
+ $sectionMargin = self::formatSpacing( $sectionMargin );
1120
+ $sectionPadding = ( isset( $scMeta['tpg_full_area_padding'] ) ? $scMeta['tpg_full_area_padding'] : null );
1121
+ $sectionPadding = self::formatSpacing( $sectionPadding );
1122
+ // Box
1123
+ $boxBg = ( isset( $scMeta['tpg_content_wrap_bg'] ) ? $scMeta['tpg_content_wrap_bg'] : null );
1124
+ $boxBorder = ( isset( $scMeta['tpg_content_wrap_border'] ) ? $scMeta['tpg_content_wrap_border'] : null );
1125
+ $boxBorderColor = ( isset( $scMeta['tpg_content_wrap_border_color'] ) ? $scMeta['tpg_content_wrap_border_color'] : null );
1126
+ $boxBorderRadius = ( isset( $scMeta['tpg_content_wrap_border_radius'] ) ? $scMeta['tpg_content_wrap_border_radius'] : null );
1127
+ $boxShadow = ( isset( $scMeta['tpg_content_wrap_shadow'] ) ? $scMeta['tpg_content_wrap_shadow'] : null );
1128
+ $boxPadding = ( isset( $scMeta['tpg_box_padding'] ) ? $scMeta['tpg_box_padding'] : null );
1129
+ $boxPadding = self::formatSpacing( $boxPadding );
1130
+ $contentPadding = ( isset( $scMeta['tpg_content_padding'] ) ? $scMeta['tpg_content_padding'] : null );
1131
+ $contentPadding = self::formatSpacing( $contentPadding );
1132
+ // Heading
1133
+ $headingBg = ( isset( $scMeta['tpg_heading_bg'] ) ? $scMeta['tpg_heading_bg'] : null );
1134
+ $headingColor = ( isset( $scMeta['tpg_heading_color'] ) ? $scMeta['tpg_heading_color'] : null );
1135
+ $headingBorderColor = ( isset( $scMeta['tpg_heading_border_color'] ) ? $scMeta['tpg_heading_border_color'] : null );
1136
+ $headingBorderSize = ( isset( $scMeta['tpg_heading_border_size'] ) ? $scMeta['tpg_heading_border_size'] : null );
1137
+ $headingMargin = ( isset( $scMeta['tpg_heading_margin'] ) ? $scMeta['tpg_heading_margin'] : null );
1138
+ $headingMargin = self::formatSpacing( $headingMargin );
1139
+ $headingPadding = ( isset( $scMeta['tpg_heading_padding'] ) ? $scMeta['tpg_heading_padding'] : null );
1140
+ $headingPadding = self::formatSpacing( $headingPadding );
1141
+ // Category
1142
+ $catBg = ( isset( $scMeta['tpg_category_bg'] ) ? $scMeta['tpg_category_bg'] : null );
1143
+ $catTextColor = ( isset( $scMeta['tpg_category_color'] ) ? $scMeta['tpg_category_color'] : null );
1144
+ $catBorderRadius = ( isset( $scMeta['tpg_category_border_radius'] ) ? $scMeta['tpg_category_border_radius'] : null );
1145
+ $catMargin = ( isset( $scMeta['tpg_category_margin'] ) ? $scMeta['tpg_category_margin'] : null );
1146
+ $catPadding = ( isset( $scMeta['tpg_category_padding'] ) ? $scMeta['tpg_category_padding'] : null );
1147
+ $categorySize = ( ! empty( $scMeta['rt_tpg_category_font_size'] ) ? absint( $scMeta['rt_tpg_category_font_size'] ) : null );
1148
+ // Image
1149
+ $image_border_radius = isset( $scMeta['tpg_image_border_radius'] ) ? $scMeta['tpg_image_border_radius'] : '';
1150
+ // Title
1151
+ $title_color = ( ! empty( $scMeta['title_color'] ) ? $scMeta['title_color'] : null );
1152
+ $title_size = ( ! empty( $scMeta['title_size'] ) ? absint( $scMeta['title_size'] ) : null );
1153
+ $title_weight = ( ! empty( $scMeta['title_weight'] ) ? $scMeta['title_weight'] : null );
1154
+ $title_alignment = ( ! empty( $scMeta['title_alignment'] ) ? $scMeta['title_alignment'] : null );
1155
+
1156
+ $title_hover_color = ( ! empty( $scMeta['title_hover_color'] ) ? $scMeta['title_hover_color'] : null );
1157
+
1158
+ $excerpt_color = ( ! empty( $scMeta['excerpt_color'] ) ? $scMeta['excerpt_color'] : null );
1159
+ $excerpt_size = ( ! empty( $scMeta['excerpt_size'] ) ? absint( $scMeta['excerpt_size'] ) : null );
1160
+ $excerpt_weight = ( ! empty( $scMeta['excerpt_weight'] ) ? $scMeta['excerpt_weight'] : null );
1161
+ $excerpt_alignment = ( ! empty( $scMeta['excerpt_alignment'] ) ? $scMeta['excerpt_alignment'] : null );
1162
+
1163
+ $meta_data_color = ( ! empty( $scMeta['meta_data_color'] ) ? $scMeta['meta_data_color'] : null );
1164
+ $meta_data_size = ( ! empty( $scMeta['meta_data_size'] ) ? absint( $scMeta['meta_data_size'] ) : null );
1165
+ $meta_data_weight = ( ! empty( $scMeta['meta_data_weight'] ) ? $scMeta['meta_data_weight'] : null );
1166
+ $meta_data_alignment = ( ! empty( $scMeta['meta_data_alignment'] ) ? $scMeta['meta_data_alignment'] : null );
1167
+ }
1168
+
1169
+ $id = str_replace( 'rt-tpg-container-', '', $layoutID );
1170
+
1171
+ if ( $primaryColor ) {
1172
+ $css .= "#{$layoutID} .rt-holder .rt-woo-info .price{";
1173
+ $css .= "color:" . $primaryColor . ";";
1174
+ $css .= "}";
1175
+ $css .= "body .rt-tpg-container .rt-tpg-isotope-buttons .selected,
1176
+ #{$layoutID} .layout12 .rt-holder:hover .rt-detail,
1177
+ #{$layoutID} .isotope8 .rt-holder:hover .rt-detail,
1178
+ #{$layoutID} .carousel8 .rt-holder:hover .rt-detail,
1179
+ #{$layoutID} .layout13 .rt-holder .overlay .post-info,
1180
+ #{$layoutID} .isotope9 .rt-holder .overlay .post-info,
1181
+ #{$layoutID}.rt-tpg-container .layout4 .rt-holder .rt-detail,
1182
+ .rt-modal-{$id} .md-content,
1183
+ .rt-modal-{$id} .md-content > .rt-md-content-holder .rt-md-content,
1184
+ .rt-popup-wrap-{$id}.rt-popup-wrap .rt-popup-navigation-wrap,
1185
+ #{$layoutID} .carousel9 .rt-holder .overlay .post-info{";
1186
+ $css .= "background-color:" . $primaryColor . ";";
1187
+ $css .= "}";
1188
+
1189
+
1190
+ $ocp = Fns::rtHex2rgba( $primaryColor,
1191
+ ! empty( $scMeta['overlay_opacity'][0] ) ? absint( $scMeta['overlay_opacity'][0] ) / 10 : .8 );
1192
+ $css .= "#{$layoutID} .layout5 .rt-holder .overlay, #{$layoutID} .isotope2 .rt-holder .overlay, #{$layoutID} .carousel2 .rt-holder .overlay,#{$layoutID} .layout15 .rt-holder h3, #{$layoutID} .isotope11 .rt-holder h3, #{$layoutID} .carousel11 .rt-holder h3, #{$layoutID} .layout16 .rt-holder h3,
1193
+ #{$layoutID} .isotope12 .rt-holder h3, #{$layoutID} .carousel12 .rt-holder h3 {";
1194
+ $css .= "background-color:" . $ocp . ";";
1195
+ $css .= "}";
1196
+ }
1197
+
1198
+ if ( $button_border_color ) {
1199
+ $css .= "#{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item,
1200
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item,
1201
+ #{$layoutID}.rt-tpg-container .swiper-navigation .slider-btn,
1202
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action,
1203
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item,
1204
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap{";
1205
+ $css .= "border-color:" . $button_border_color . " !important;";
1206
+ $css .= "}";
1207
+ $css .= "#{$layoutID} .rt-holder .read-more a {";
1208
+ $css .= "border-color:" . $button_border_color . ";";
1209
+ $css .= "}";
1210
+ }
1211
+
1212
+ if ( $button_bg_color ) {
1213
+ $css .= "#{$layoutID} .pagination-list li a,
1214
+ {$layoutID} .pagination-list li span,
1215
+ {$layoutID} .pagination li a,
1216
+ #{$layoutID} .rt-tpg-isotope-buttons button,
1217
+ #{$layoutID} .rt-tpg-utility .rt-tpg-load-more button,
1218
+ #{$layoutID}.rt-tpg-container .swiper-navigation .slider-btn,
1219
+ #{$layoutID}.rt-tpg-container .swiper-pagination-bullet,
1220
+ #{$layoutID} .wc1 .rt-holder .rt-img-holder .overlay .product-more ul li a,
1221
+ #{$layoutID} .wc2 .rt-detail .rt-wc-add-to-cart,
1222
+ #{$layoutID} .wc3 .rt-detail .rt-wc-add-to-cart,
1223
+ #{$layoutID} .wc4 .rt-detail .rt-wc-add-to-cart,
1224
+ #{$layoutID} .wc-carousel2 .rt-detail .rt-wc-add-to-cart,
1225
+ #{$layoutID} .wc-isotope2 .rt-detail .rt-wc-add-to-cart,
1226
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown,
1227
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item,
1228
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li>a,
1229
+ #{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item,
1230
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn,
1231
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > *,
1232
+ #{$layoutID} .rt-read-more,
1233
+ #rt-tooltip-{$id}, #rt-tooltip-{$id} .rt-tooltip-bottom:after{";
1234
+ $css .= "background-color:" . $button_bg_color . ";";
1235
+ $css .= "}";
1236
+ $css .= "#{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item,
1237
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item{";
1238
+ $css .= "border-color:" . $button_bg_color . ";";
1239
+ $css .= "}";
1240
+ $css .= "#{$layoutID}.rt-tpg-container .layout17 .rt-holder .overlay a.tpg-zoom .fa{";
1241
+ $css .= "color:" . $button_bg_color . ";";
1242
+ $css .= "}";
1243
+
1244
+ $css .= "#{$layoutID} .rt-holder .read-more a {";
1245
+ $css .= "background-color:" . $button_bg_color . ";padding: 8px 15px;";
1246
+ $css .= "}";
1247
+ }
1248
+
1249
+ // button active color
1250
+ if ( $button_active_bg_color ) {
1251
+ $css .= "#{$layoutID} .pagination li.active span,
1252
+ #{$layoutID} .pagination-list li.active span,
1253
+ #{$layoutID} .rt-tpg-isotope-buttons button.selected,
1254
+ #{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected,
1255
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item.selected,
1256
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active>a,
1257
+ #{$layoutID}.rt-tpg-container .swiper-pagination-bullet.swiper-pagination-bullet-active-main{";
1258
+ $css .= "background-color:" . $button_active_bg_color . ";";
1259
+ $css .= "}";
1260
+
1261
+ $css .= "#{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected,
1262
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item.selected,
1263
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active>a{";
1264
+ $css .= "border-color:" . $button_active_bg_color . ";";
1265
+ $css .= "}";
1266
+ }
1267
+
1268
+ // Button hover bg color
1269
+ if ( $button_hover_bg_color ) {
1270
+ $css .= "#{$layoutID} .pagination-list li a:hover,
1271
+ #{$layoutID} .pagination li a:hover,
1272
+ #{$layoutID} .rt-tpg-isotope-buttons button:hover,
1273
+ #{$layoutID} .rt-holder .read-more a:hover,
1274
+ #{$layoutID} .rt-tpg-utility .rt-tpg-load-more button:hover,
1275
+ #{$layoutID}.rt-tpg-container .swiper-pagination-bullet:hover,
1276
+ #{$layoutID}.rt-tpg-container .swiper-navigation .slider-btn:hover,
1277
+ #{$layoutID} .wc1 .rt-holder .rt-img-holder .overlay .product-more ul li a:hover,
1278
+ #{$layoutID} .wc2 .rt-detail .rt-wc-add-to-cart:hover,
1279
+ #{$layoutID} .wc3 .rt-detail .rt-wc-add-to-cart:hover,
1280
+ #{$layoutID} .wc4 .rt-detail .rt-wc-add-to-cart:hover,
1281
+ #{$layoutID} .wc-carousel2 .rt-detail .rt-wc-add-to-cart:hover,
1282
+ #{$layoutID} .wc-isotope2 .rt-detail .rt-wc-add-to-cart:hover,
1283
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item:hover,
1284
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item.selected,
1285
+ #{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover,
1286
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item:hover,
1287
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li>a:hover,
1288
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > *:hover,
1289
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn:hover,
1290
+ #{$layoutID} .rt-read-more:hover,
1291
+ #{$layoutID} .rt-tpg-utility .rt-tpg-load-more button:hover{";
1292
+ $css .= "background-color:" . $button_hover_bg_color . ";";
1293
+ $css .= "}";
1294
+
1295
+ $css .= "#{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover,
1296
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item:hover,
1297
+ #{$layoutID}.rt-tpg-container .swiper-navigation .slider-btn:hover,
1298
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li>a:hover{";
1299
+ $css .= "border-color:" . $button_hover_bg_color . ";";
1300
+ $css .= "}";
1301
+ $css .= "#{$layoutID}.rt-tpg-container .layout17 .rt-holder .overlay a.tpg-zoom:hover .fa{";
1302
+ $css .= "color:" . $button_hover_bg_color . ";";
1303
+ $css .= "}";
1304
+ }
1305
+
1306
+ //Button text color
1307
+ if ( $button_text_color ) {
1308
+ $css .= "#{$layoutID} .pagination-list li a,
1309
+ #{$layoutID} .pagination li a,
1310
+ #{$layoutID} .rt-tpg-isotope-buttons button,
1311
+ #{$layoutID} .rt-holder .read-more a,
1312
+ #{$layoutID} .rt-tpg-utility .rt-tpg-load-more button,
1313
+ #{$layoutID}.rt-tpg-container .swiper-navigation .slider-btn,
1314
+ #{$layoutID} .wc1 .rt-holder .rt-img-holder .overlay .product-more ul li a,
1315
+ #{$layoutID} .edd1 .rt-holder .rt-img-holder .overlay .product-more ul li a,
1316
+ #{$layoutID} .wc2 .rt-detail .rt-wc-add-to-cart,
1317
+ #{$layoutID} .wc3 .rt-detail .rt-wc-add-to-cart,
1318
+ #{$layoutID} .edd2 .rt-detail .rt-wc-add-to-cart,
1319
+ #{$layoutID} .wc4 .rt-detail .rt-wc-add-to-cart,
1320
+ #{$layoutID} .edd3 .rt-detail .rt-wc-add-to-cart,
1321
+ #{$layoutID} .wc-carousel2 .rt-detail .rt-wc-add-to-cart,
1322
+ #{$layoutID} .wc-isotope2 .rt-detail .rt-wc-add-to-cart,
1323
+ #{$layoutID} .rt-tpg-utility .rt-tpg-load-more button,
1324
+ #rt-tooltip-{$id},
1325
+ #{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item,
1326
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item,
1327
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action,
1328
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item,
1329
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li>a,
1330
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > *,
1331
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn,
1332
+ #{$layoutID} .rt-read-more,
1333
+ #rt-tooltip-{$id} .rt-tooltip-bottom:after{";
1334
+ $css .= "color:" . $button_text_color . ";";
1335
+ $css .= "}";
1336
+ }
1337
+
1338
+ if ( $button_hover_text_color ) {
1339
+ $css .= "#{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover,
1340
+ #{$layoutID} .rt-holder .read-more a:hover,
1341
+ #{$layoutID}.rt-tpg-container .swiper-navigation .slider-btn:hover,
1342
+ #{$layoutID} .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item:hover,
1343
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item:hover,
1344
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item.selected,
1345
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action:hover,
1346
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active>a:hover,
1347
+ #{$layoutID} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected,
1348
+ #{$layoutID} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action,
1349
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn:hover,
1350
+ #{$layoutID} .rt-read-more:hover,
1351
+ #{$layoutID}.rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active>a{";
1352
+ $css .= "color:" . $button_hover_text_color . ";";
1353
+ $css .= "}";
1354
+ }
1355
+
1356
+ if ( $overlay_color || $overlay_padding ) {
1357
+ if ( in_array( $layout, [ 'layout15', 'isotope11', 'carousel11' ] ) ) {
1358
+ $css .= "#{$layoutID} .{$layout} .rt-holder:hover .overlay .post-info{";
1359
+ } elseif ( in_array( $layout,
1360
+ [ 'layout10', 'isotope7', 'carousel6', 'carousel7', 'layout9', 'offset04' ] )
1361
+ ) {
1362
+ $css .= "#{$layoutID} .{$layout} .rt-holder .post-info{";
1363
+ } elseif ( in_array( $layout, [ 'layout7', 'isotope4', 'carousel4' ] ) ) {
1364
+ $css .= "#{$layoutID} .{$layout} .rt-holder .overlay:hover{";
1365
+ } elseif ( in_array( $layout, [ 'layout16', 'isotope12', 'carousel12' ] ) ) {
1366
+ $css .= "#{$layoutID} .{$layout} .rt-holder .overlay .post-info {";
1367
+ } elseif ( in_array( $layout, [ 'offset03', 'carousel5' ] ) ) {
1368
+ $css .= "#{$layoutID} .{$layout} .rt-holder .overlay{";
1369
+ } else {
1370
+ $css .= "#{$layoutID} .rt-post-overlay .post-img > a:first-of-type::after,";
1371
+ $css .= "#{$layoutID} .rt-holder .overlay:hover{";
1372
+ }
1373
+ if ( $overlay_color ) {
1374
+ $css .= "background-image: none;";
1375
+ $css .= "background-color:" . $overlay_color . ";";
1376
+ }
1377
+ if ( $overlay_padding ) {
1378
+ $css .= "padding-top:" . $overlay_padding . "%;";
1379
+ }
1380
+ $css .= "}";
1381
+ }
1382
+
1383
+ if ( $boxShadow ) {
1384
+ $css .= "#{$layoutID} .{$layout} .rt-holder {";
1385
+ $css .= "box-shadow : 0px 0px 2px 0px {$boxShadow};";
1386
+ $css .= "}";
1387
+ }
1388
+
1389
+ /* gutter */
1390
+ if ( $gutter ) {
1391
+ $css .= "#{$layoutID} [class*='rt-col-'] {";
1392
+ $css .= "padding-left : {$gutter}px !important;";
1393
+ $css .= "padding-right : {$gutter}px !important;";
1394
+ $css .= "margin-top : {$gutter}px;";
1395
+ $css .= "margin-bottom : {$gutter}px;";
1396
+ $css .= "}";
1397
+ $css .= "#{$layoutID} .rt-row{";
1398
+ $css .= "margin-left : -{$gutter}px !important;";
1399
+ $css .= "margin-right : -{$gutter}px !important;";
1400
+ $css .= "}";
1401
+ $css .= "#{$layoutID}.rt-container-fluid,#{$layoutID}.rt-container{";
1402
+ $css .= "padding-left : {$gutter}px;";
1403
+ $css .= "padding-right : {$gutter}px;";
1404
+ $css .= "}";
1405
+
1406
+ // remove inner row margin
1407
+ $css .= "#{$layoutID} .rt-row .rt-row [class*='rt-col-'] {";
1408
+ $css .= "margin-top : 0;";
1409
+ $css .= "}";
1410
+ }
1411
+
1412
+ // Read more button border radius
1413
+ if ( isset( $read_more_button_border_radius ) || trim( $read_more_button_border_radius ) !== '' ) {
1414
+ $css .= "#{$layoutID} .read-more a{";
1415
+ $css .= "border-radius:" . $read_more_button_border_radius . "px;";
1416
+ $css .= "}";
1417
+ }
1418
+
1419
+ // Section
1420
+ if ( $sectionBg ) {
1421
+ $css .= "#{$layoutID}.rt-tpg-container {";
1422
+ $css .= "background:" . $sectionBg . ";";
1423
+ $css .= "}";
1424
+ }
1425
+ if ( $sectionMargin ) {
1426
+ $css .= "#{$layoutID}.rt-tpg-container {";
1427
+ $css .= "margin:" . $sectionMargin . "px;";
1428
+ $css .= "}";
1429
+ }
1430
+ if ( $sectionPadding ) {
1431
+ $css .= "#{$layoutID}.rt-tpg-container {";
1432
+ $css .= "padding:" . $sectionPadding . "px;";
1433
+ $css .= "}";
1434
+ }
1435
+ // Box
1436
+ if ( $boxBg ) {
1437
+ $css .= "#{$layoutID} .rt-holder, #{$layoutID} .rt-holder .rt-detail,#{$layoutID} .rt-post-overlay .post-img + .post-content {";
1438
+ $css .= "background-color:" . $boxBg . ";";
1439
+ $css .= "}";
1440
+ }
1441
+ if ( $boxBorderColor ) {
1442
+ $css .= "#{$layoutID} .rt-holder {";
1443
+ $css .= "border-color:" . $boxBorderColor . ";";
1444
+ $css .= "}";
1445
+ }
1446
+ if ( $boxBorder ) {
1447
+ $css .= "#{$layoutID} .rt-holder {";
1448
+ $css .= "border-style: solid;";
1449
+ $css .= "border-width:" . $boxBorder . "px;";
1450
+ $css .= "}";
1451
+ }
1452
+ if ( $boxBorderRadius ) {
1453
+ $css .= "#{$layoutID} .rt-holder {";
1454
+ $css .= "border-radius:" . $boxBorderRadius . "px;";
1455
+ $css .= "}";
1456
+ }
1457
+ if ( $boxPadding ) {
1458
+ $css .= "#{$layoutID} .rt-holder {";
1459
+ $css .= "padding:" . $boxPadding . "px;";
1460
+ $css .= "}";
1461
+ }
1462
+ if ( $contentPadding ) {
1463
+ $css .= "#{$layoutID} .rt-holder .rt-detail {";
1464
+ $css .= "padding:" . $contentPadding . "px;";
1465
+ $css .= "}";
1466
+ }
1467
+ // Widget heading
1468
+ if ( $headingBg ) {
1469
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading, #{$layoutID} .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading, #{$layoutID} .tpg-widget-heading-wrapper.heading-style3 .tpg-widget-heading {";
1470
+ $css .= "background:" . $headingBg . ";";
1471
+ $css .= "}";
1472
+
1473
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::after {";
1474
+ $css .= "border-top-color:" . $headingBg . ";";
1475
+ $css .= "}";
1476
+ }
1477
+ if ( $headingColor ) {
1478
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading, #{$layoutID} .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading a, #{$layoutID} .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading, #{$layoutID} .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading a, #{$layoutID} .tpg-widget-heading-wrapper.heading-style3 .tpg-widget-heading, #{$layoutID} .tpg-widget-heading-wrapper.heading-style3 .tpg-widget-heading a {";
1479
+ $css .= "color:" . $headingColor . ";";
1480
+ $css .= "}";
1481
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading::before {";
1482
+ $css .= "background-color:" . $headingColor . ";";
1483
+ $css .= "}";
1484
+ }
1485
+ if ( $headingBorderSize ) {
1486
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper.heading-style1, #{$layoutID} .tpg-widget-heading-wrapper.heading-style2, #{$layoutID} .tpg-widget-heading-wrapper.heading-style3 {";
1487
+ // $css .= "border-bottom-style: solid;";
1488
+ $css .= "border-bottom-width:" . $headingBorderSize . "px;";
1489
+ $css .= "}";
1490
+
1491
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line {";
1492
+ $css .= "border-width:" . $headingBorderSize . "px 0;";
1493
+ $css .= "}";
1494
+ }
1495
+ if ( $headingBorderColor ) {
1496
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line, #{$layoutID} .tpg-widget-heading-wrapper.heading-style2, #{$layoutID} .tpg-widget-heading-wrapper.heading-style3 {";
1497
+ $css .= "border-color:" . $headingBorderColor . ";";
1498
+ $css .= "}";
1499
+ }
1500
+ if ( $headingMargin ) {
1501
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper {";
1502
+ $css .= "margin:" . $headingMargin . "px;";
1503
+ $css .= "}";
1504
+ }
1505
+ if ( $headingPadding ) {
1506
+ $css .= "#{$layoutID} .tpg-widget-heading-wrapper .tpg-widget-heading {";
1507
+ $css .= "padding:" . $headingPadding . "px;";
1508
+ $css .= "}";
1509
+ }
1510
+ // Image border
1511
+ if ( isset( $image_border_radius ) || trim( $image_border_radius ) !== '' ) {
1512
+ $css .= "#{$layoutID} .rt-img-holder img.rt-img-responsive,#{$layoutID} .rt-img-holder,
1513
+ #{$layoutID} .rt-post-overlay .post-img,
1514
+ #{$layoutID} .post-sm .post-img,
1515
+ #{$layoutID} .rt-post-grid .post-img,
1516
+ #{$layoutID} .post-img img {";
1517
+ $css .= "border-radius:" . $image_border_radius . "px;";
1518
+ $css .= "}";
1519
+ }
1520
+
1521
+ // Title decoration
1522
+ if ( $title_color || $title_size || $title_weight || $title_alignment ) {
1523
+ $css .= "#{$layoutID} .{$layout} .rt-holder h2.entry-title,
1524
+ #{$layoutID} .{$layout} .rt-holder h3.entry-title,
1525
+ #{$layoutID} .{$layout} .rt-holder h4.entry-title,
1526
+ #{$layoutID} .{$layout} .rt-holder h2.entry-title a,
1527
+ #{$layoutID} .{$layout} .rt-holder h3.entry-title a,
1528
+ #{$layoutID} .{$layout} .rt-holder h4.entry-title a,
1529
+ #{$layoutID} .rt-holder .rt-woo-info h2 a,
1530
+ #{$layoutID} .rt-holder .rt-woo-info h3 a,
1531
+ #{$layoutID} .rt-holder .rt-woo-info h4 a,
1532
+ #{$layoutID} .post-content .post-title,
1533
+ #{$layoutID} .rt-post-grid .post-title,
1534
+ #{$layoutID} .rt-post-grid .post-title a,
1535
+ #{$layoutID} .post-content .post-title a,
1536
+ #{$layoutID} .rt-holder .rt-woo-info h2,
1537
+ #{$layoutID} .rt-holder .rt-woo-info h3,
1538
+ #{$layoutID} .rt-holder .rt-woo-info h4{";
1539
+ if ( $title_color ) {
1540
+ $css .= "color:" . $title_color . ";";
1541
+ }
1542
+ if ( $title_size ) {
1543
+ $lineHeight = $title_size + 10;
1544
+ $css .= "font-size:" . $title_size . "px;";
1545
+ $css .= "line-height:" . $lineHeight . "px;";
1546
+ }
1547
+ if ( $title_weight ) {
1548
+ $css .= "font-weight:" . $title_weight . ";";
1549
+ }
1550
+ if ( $title_alignment ) {
1551
+ $css .= "text-align:" . $title_alignment . ";";
1552
+ }
1553
+ $css .= "}";
1554
+ if ( $title_size ) {
1555
+ $css .= "#{$layoutID} .post-grid-lg-style-1 .post-title,
1556
+ #{$layoutID} .post-grid-lg-style-1 .post-title a,
1557
+ #{$layoutID} .big-layout .post-title,
1558
+ #{$layoutID} .big-layout .post-title a,
1559
+ #{$layoutID} .post-grid-lg-style-1 .post-title,
1560
+ #{$layoutID} .post-grid-lg-style-1 .post-title a {";
1561
+ $css .= "font-size:" . ( $title_size + 8 ) . "px;";
1562
+ $css .= "line-height:" . ( $lineHeight + 8 ) . "px;";
1563
+ $css .= "}";
1564
+ }
1565
+ }
1566
+ // Title hover color
1567
+ if ( $title_hover_color ) {
1568
+ $css .= "#{$layoutID} .{$layout} .rt-holder h2.entry-title:hover,
1569
+ #{$layoutID} .{$layout} .rt-holder h3.entry-title:hover,
1570
+ #{$layoutID} .{$layout} .rt-holder h4.entry-title:hover,
1571
+ #{$layoutID} .{$layout} .rt-holder h2.entry-title a:hover,
1572
+ #{$layoutID} .{$layout} .rt-holder h3.entry-title a:hover,
1573
+ #{$layoutID} .{$layout} .rt-holder h4.entry-title a:hover,
1574
+ #{$layoutID} .post-content .post-title a:hover,
1575
+ #{$layoutID} .rt-post-grid .post-title a:hover,
1576
+ #{$layoutID} .rt-holder .rt-woo-info h2 a:hover,
1577
+ #{$layoutID} .rt-holder .rt-woo-info h3 a:hover,
1578
+ #{$layoutID} .rt-holder .rt-woo-info h4 a:hover,
1579
+ #{$layoutID} .rt-holder .rt-woo-info h2:hover,
1580
+ #{$layoutID} .rt-holder .rt-woo-info h3:hover,
1581
+ #{$layoutID} .rt-holder .rt-woo-info h4:hover{";
1582
+ $css .= "color:" . $title_hover_color . " !important;";
1583
+ $css .= "}";
1584
+ }
1585
+ // Excerpt decoration
1586
+ if ( $excerpt_color || $excerpt_size || $excerpt_weight || $excerpt_alignment ) {
1587
+ $css .= "#{$layoutID} .{$layout} .rt-holder .tpg-excerpt,#{$layoutID} .{$layout} .tpg-excerpt,#{$layoutID} .{$layout} .rt-holder .post-content,#{$layoutID} .rt-holder .rt-woo-info p,#{$layoutID} .post-content p {";
1588
+ if ( $excerpt_color ) {
1589
+ $css .= "color:" . $excerpt_color . ";";
1590
+ }
1591
+ if ( $excerpt_size ) {
1592
+ $css .= "font-size:" . $excerpt_size . "px;";
1593
+ }
1594
+ if ( $excerpt_weight ) {
1595
+ $css .= "font-weight:" . $excerpt_weight . ";";
1596
+ }
1597
+ if ( $excerpt_alignment ) {
1598
+ $css .= "text-align:" . $excerpt_alignment . ";";
1599
+ }
1600
+ $css .= "}";
1601
+ }
1602
+ // Post meta decoration
1603
+ if ( $meta_data_color || $meta_data_size || $meta_data_weight || $meta_data_alignment ) {
1604
+ $css .= "#{$layoutID} .{$layout} .rt-holder .post-meta-user,
1605
+ #{$layoutID} .{$layout} .rt-meta,
1606
+ #{$layoutID} .{$layout} .rt-meta a,
1607
+ #{$layoutID} .{$layout} .rt-holder .post-meta-user .meta-data,
1608
+ #{$layoutID} .{$layout} .rt-holder .post-meta-user a,
1609
+ #{$layoutID} .{$layout} .rt-holder .rt-detail .post-meta .rt-tpg-social-share,
1610
+ #{$layoutID} .rt-post-overlay .post-meta-user span,
1611
+ #{$layoutID} .rt-post-overlay .post-meta-user,
1612
+ #{$layoutID} .rt-post-overlay .post-meta-user a,
1613
+ #{$layoutID} .rt-post-grid .post-meta-user,
1614
+ #{$layoutID} .rt-post-grid .post-meta-user a,
1615
+ #{$layoutID} .rt-post-box-media-style .post-meta-user,
1616
+ #{$layoutID} .rt-post-box-media-style .post-meta-user a,
1617
+ #{$layoutID} .{$layout} .post-meta-user i,
1618
+ #{$layoutID} .rt-detail .post-meta-category a,
1619
+ #{$layoutID} .{$layout} .post-meta-user a
1620
+ #{$layoutID} .{$layout} .post-meta-user a {";
1621
+ if ( $meta_data_color ) {
1622
+ $css .= "color:" . $meta_data_color . ";";
1623
+ }
1624
+ if ( $meta_data_size ) {
1625
+ $css .= "font-size:" . $meta_data_size . "px;";
1626
+ }
1627
+ if ( $meta_data_weight ) {
1628
+ $css .= "font-weight:" . $meta_data_weight . ";";
1629
+ }
1630
+ if ( $meta_data_alignment ) {
1631
+ $css .= "text-align:" . $meta_data_alignment . ";";
1632
+ }
1633
+ $css .= "}";
1634
+ }
1635
+ // Category
1636
+ if ( $catBg ) {
1637
+ $css .= "#{$layoutID} .cat-over-image.style2 .categories-links a,
1638
+ #{$layoutID} .cat-over-image.style3 .categories-links a,
1639
+ #{$layoutID} .cat-above-title.style2 .categories-links a,
1640
+ #{$layoutID} .cat-above-title.style3 .categories-links a,
1641
+ #{$layoutID} .rt-tpg-category > a {
1642
+ background-color: {$catBg};
1643
+ }";
1644
+
1645
+ $css .= "#{$layoutID} .cat-above-title.style3 .categories-links a:after,
1646
+ .cat-over-image.style3 .categories-links a:after,
1647
+ #{$layoutID} .rt-tpg-category > a,
1648
+ #{$layoutID} .rt-tpg-category.style3 > a:after {
1649
+ border-top-color: {$catBg} ;
1650
+ }";
1651
+
1652
+ $css .= "#{$layoutID} .rt-tpg-category:not(style1) i {
1653
+ color: {$catBg};
1654
+ }";
1655
+ }
1656
+ if ( $catTextColor ) {
1657
+ $css .= "#{$layoutID} .cat-over-image .categories-links a,
1658
+ #{$layoutID} .cat-above-title .categories-links a,
1659
+ #{$layoutID} .rt-tpg-category.style1 > i,
1660
+ #{$layoutID} .rt-tpg-category > a {";
1661
+ $css .= "color:" . $catTextColor . ";";
1662
+ $css .= "}";
1663
+ }
1664
+ if ( $catBorderRadius ) {
1665
+ $css .= "#{$layoutID} .cat-over-image .categories-links a,#{$layoutID} .cat-above-title .categories-links a,#{$layoutID} .rt-tpg-category > a{";
1666
+ $css .= "border-radius:" . $catBorderRadius . "px;";
1667
+ $css .= "}";
1668
+ }
1669
+ if ( $catPadding ) {
1670
+ $css .= "#{$layoutID} .cat-over-image .categories-links a,#{$layoutID} .cat-above-title .categories-links a,#{$layoutID} .rt-tpg-category > a{";
1671
+ $css .= "padding:" . $catPadding . "px;";
1672
+ $css .= "}";
1673
+ }
1674
+ if ( $catMargin ) {
1675
+ $css .= "#{$layoutID} .categories-links,#{$layoutID} .rt-tpg-category > a{";
1676
+ $css .= "margin:" . $catMargin . "px;";
1677
+ $css .= "}";
1678
+ }
1679
+ if ( $categorySize ) {
1680
+ $css .= "#{$layoutID} .categories-links,#{$layoutID} .rt-tpg-category > a {";
1681
+ $css .= "font-size:" . $categorySize . "px;";
1682
+ $css .= "}";
1683
+ }
1684
+
1685
+ $css .= "</style>";
1686
+
1687
+ return $css;
1688
+ }
1689
+
1690
+ public static function get_meta_keys( $post_type ) {
1691
+ // $cache = get_transient( 'tpg_' . $post_type . '_meta_keys' );
1692
+ // $meta_keys = $cache ? $cache : self::generate_meta_keys( $post_type );
1693
+ $meta_keys = self::generate_meta_keys( $post_type );
1694
+
1695
+ return $meta_keys;
1696
+ }
1697
+
1698
+ public static function generate_meta_keys( $post_type ) {
1699
+ $meta_keys = [];
1700
+ if ( $post_type ) {
1701
+ global $wpdb;
1702
+ $query = "SELECT DISTINCT($wpdb->postmeta.meta_key)
1703
+ FROM $wpdb->posts
1704
+ LEFT JOIN $wpdb->postmeta
1705
+ ON $wpdb->posts.ID = $wpdb->postmeta.post_id
1706
+ WHERE $wpdb->posts.post_type = '%s'
1707
+ AND $wpdb->postmeta.meta_key != ''
1708
+ AND $wpdb->postmeta.meta_key NOT RegExp '(^[_0-9].+$)'
1709
+ AND $wpdb->postmeta.meta_key NOT RegExp '(^[0-9]+$)'";
1710
+ $meta_keys = $wpdb->get_col( $wpdb->prepare( $query, $post_type ) );
1711
+ // set_transient( 'tpg_' . $post_type . '_meta_keys', $meta_keys, 60 * 60 * 24 ); # create 1 Day Expiration
1712
+ }
1713
+
1714
+ return $meta_keys;
1715
+ }
1716
+
1717
+ public static function remove_all_shortcode( $content ) {
1718
+ return preg_replace( '#\[[^\]]+\]#', '', $content );
1719
+ }
1720
+
1721
+ public static function remove_divi_shortcodes( $content ) {
1722
+ $content = preg_replace( '/\[\/?et_pb.*?\]/', '', $content );
1723
+
1724
+ return $content;
1725
+ }
1726
+
1727
+ public static function is_acf() {
1728
+ $plugin = null;
1729
+ if ( class_exists( 'acf' ) ) {
1730
+ $plugin = 'acf';
1731
+ }
1732
+
1733
+ return $plugin;
1734
+ }
1735
+
1736
+ public static function get_groups_by_post_type( $post_type ) {
1737
+ $post_type = $post_type ? $post_type : "post";
1738
+ $groups = [];
1739
+ $plugin = self::is_acf();
1740
+ switch ( $plugin ) {
1741
+ case 'acf':
1742
+ $groups = self::get_groups_by_post_type_acf( $post_type );
1743
+ break;
1744
+ }
1745
+
1746
+ return $groups;
1747
+ }
1748
+
1749
+ /**
1750
+ * Get ACF post group
1751
+ *
1752
+ * @param $post_type
1753
+ *
1754
+ * @return array
1755
+ */
1756
+ public static function get_groups_by_post_type_acf( $post_type ) {
1757
+ $groups = [];
1758
+ $groups_q = get_posts( [ 'post_type' => 'acf-field-group', 'posts_per_page' => - 1 ] );
1759
+
1760
+ if ( ! empty( $groups_q ) ) {
1761
+ foreach ( $groups_q as $group ) {
1762
+ $c = $group->post_content ? unserialize( $group->post_content ) : [];
1763
+ $flag = false;
1764
+ if ( ! empty( $c['location'] ) ) {
1765
+ foreach ( $c['location'] as $rules ) {
1766
+ foreach ( $rules as $rule ) {
1767
+ if ( $post_type === 'all' ) {
1768
+ if ( ( ! empty( $rule['param'] ) && $rule['param'] == 'post_type' )
1769
+ && ( ! empty( $rule['operator'] ) && $rule['operator'] == '==' )
1770
+ ) {
1771
+ $flag = true;
1772
+ }
1773
+ } else {
1774
+ if ( ( ! empty( $rule['param'] ) && ( $rule['param'] == 'post_type' || ( $rule['param'] == 'post_category' && 'post' == $post_type ) ) )
1775
+ && ( ! empty( $rule['operator'] ) && $rule['operator'] == '==' )
1776
+ && ( ! empty( $rule['value'] ) && ( $rule['value'] == $post_type || ( $rule['param'] == 'post_category' && 'post' == $post_type ) ) )
1777
+
1778
+ ) {
1779
+ $flag = true;
1780
+ }
1781
+ }
1782
+ }
1783
+ }
1784
+ }
1785
+ if ( $flag ) {
1786
+ $groups[ $group->ID ] = $group->post_title;
1787
+ }
1788
+ }
1789
+ }
1790
+
1791
+ return $groups;
1792
+ }
1793
+
1794
+ /**
1795
+ * Get Post view count meta key
1796
+ *
1797
+ * @return string
1798
+ */
1799
+ public static function get_post_view_count_meta_key() {
1800
+ $count_key = 'tpg-post-view-count';
1801
+
1802
+ return $count_key;
1803
+ }
1804
+
1805
+
1806
+ /**
1807
+ * Elementor Functionality
1808
+ *************************************************
1809
+ */
1810
+
1811
+
1812
+ /**
1813
+ * Default layout style check
1814
+ *
1815
+ * @param $data
1816
+ *
1817
+ * @return bool
1818
+ */
1819
+ public static function el_ignore_layout( $data ) {
1820
+ if ( isset( $data['category'] ) && 'category' == $data['category'] ) {
1821
+ return true;
1822
+ }
1823
+ if ( 'default' == $data['category_position']
1824
+ && in_array( $data['layout'],
1825
+ [
1826
+ 'grid-layout4',
1827
+ 'grid-layout5',
1828
+ 'grid-layout5-2',
1829
+ 'grid-layout6',
1830
+ 'grid-layout6-2',
1831
+ 'list-layout4',
1832
+ 'list-layout5',
1833
+ 'grid_hover-layout5',
1834
+ 'grid_hover-layout6',
1835
+ 'grid_hover-layout7',
1836
+ 'grid_hover-layout8',
1837
+ 'grid_hover-layout9',
1838
+ 'grid_hover-layout10',
1839
+ 'grid_hover-layout5-2',
1840
+ 'grid_hover-layout6-2',
1841
+ 'grid_hover-layout7-2',
1842
+ 'grid_hover-layout9-2',
1843
+ 'slider-layout5',
1844
+ 'slider-layout6',
1845
+ 'slider-layout7',
1846
+ 'slider-layout8',
1847
+ 'slider-layout9',
1848
+ 'slider-layout11',
1849
+ 'slider-layout12',
1850
+ ] )
1851
+ ) {
1852
+ return false;
1853
+ }
1854
+
1855
+ return true;
1856
+ }
1857
+
1858
+ /**
1859
+ * Get Post Link
1860
+ *
1861
+ * @param $data
1862
+ * @param $pID
1863
+ *
1864
+ * @return array
1865
+ */
1866
+ public static function get_post_link( $pID, $data ) {
1867
+ $link_class = $link_start = $link_end = $readmore_link_start = $readmore_link_end = null;
1868
+ if ( 'default' == $data['post_link_type'] ) {
1869
+ $link_class = "tpg-post-link";
1870
+ $link_start = $readmore_link_start = sprintf( '<a data-id="%s" href="%s" class="%s" target="%s">',
1871
+ esc_attr( $pID ),
1872
+ esc_attr( esc_url( get_permalink() ) ),
1873
+ $link_class,
1874
+ $data['link_target'] );
1875
+ $link_end = $readmore_link_end = "</a>";
1876
+ } elseif ( 'popup' == $data['post_link_type'] ) {
1877
+ $link_class = "tpg-single-popup tpg-post-link";
1878
+ if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
1879
+ $link_class = "tpg-post-link";
1880
+ }
1881
+ $link_start = $readmore_link_start = sprintf( '<a data-id="%s" href="%s" class="%s" target="%s">',
1882
+ esc_attr( $pID ),
1883
+ esc_url( get_permalink() ),
1884
+ $link_class,
1885
+ $data['link_target'] );
1886
+ $link_end = $readmore_link_end = "</a>";
1887
+ } elseif ( 'multi_popup' == $data['post_link_type'] ) {
1888
+ $link_class = "tpg-multi-popup tpg-post-link";
1889
+ $link_start = $readmore_link_start = sprintf( '<a data-id="%s" href="%s" class="%s" target="%s">',
1890
+ esc_attr( $pID ),
1891
+ esc_attr( esc_url( get_permalink() ) ),
1892
+ $link_class,
1893
+ $data['link_target'] );
1894
+ $link_end = $readmore_link_end = "</a>";
1895
+ } else {
1896
+ $link_class = "tpg-post-link";
1897
+ $readmore_link_start = sprintf( '<a data-id="%s" href="%s" class="%s" target="%s">',
1898
+ esc_attr( $pID ),
1899
+ esc_attr( esc_url( get_permalink() ) ),
1900
+ $link_class,
1901
+ $data['link_target'] );
1902
+ $readmore_link_end = "</a>";
1903
+ }
1904
+
1905
+ return [
1906
+ 'link_start' => $link_start,
1907
+ 'link_end' => $link_end,
1908
+ 'readmore_link_start' => $readmore_link_start,
1909
+ 'readmore_link_end' => $readmore_link_end,
1910
+ ];
1911
+ }
1912
+
1913
+ /**
1914
+ * Get Post Type
1915
+ *
1916
+ * @return string[]|\WP_Post_Type[]
1917
+ */
1918
+ public static function get_post_types() {
1919
+ $post_types = get_post_types( [ 'public' => true, 'show_in_nav_menus' => true ], 'objects' );
1920
+ $post_types = wp_list_pluck( $post_types, 'label', 'name' );
1921
+
1922
+ return array_diff_key( $post_types, [ 'elementor_library', 'attachment' ] );
1923
+ }
1924
+
1925
+ /**
1926
+ * Get Post Meta HTML for Elementor
1927
+ *
1928
+ * @param $post_id
1929
+ * @param $data
1930
+ *
1931
+ * @return html markup
1932
+ */
1933
+ public static function get_post_meta_html( $post_id, $data ) {
1934
+ global $post;
1935
+ $author_id = $post->post_author;
1936
+ $author_name = get_the_author_meta( 'display_name', $post->post_author );
1937
+ $author = apply_filters( 'rttpg_author_link', sprintf( '<a href="%s">%s</a>', get_author_posts_url( $author_id ), $author_name ) );
1938
+
1939
+ $comments_number = get_comments_number( $post_id );
1940
+
1941
+
1942
+ $comment_label = '';
1943
+ if ( isset($data['show_comment_count_label']) && $data['show_comment_count_label'] ) {
1944
+ $comment_label = $data['comment_count_label_singular'];
1945
+ if ( $comments_number > 1 ) {
1946
+ $comment_label = $data['comment_count_label_plural'];
1947
+ }
1948
+ }
1949
+
1950
+ $comments_text = sprintf( '%s (%s)', esc_html( $comment_label ), number_format_i18n( $comments_number ) );
1951
+ $date = get_the_date();
1952
+
1953
+ //Category and Tags Management
1954
+ $_cat_id = isset( $data['post_type'] ) ? $data['post_type'] . '_taxonomy' : 'category';
1955
+ $_tag_id = isset( $data['post_type'] ) ? $data['post_type'] . '_tags' : 'post_tag';
1956
+ $categories = get_the_term_list( $post_id, $data[ $_cat_id ], null, '<span class="rt-separator">,</span>' );
1957
+ $tags = get_the_term_list( $post_id, $data[ $_tag_id ], null, '<span class="rt-separator">,</span>' );
1958
+
1959
+ $count_key = Fns::get_post_view_count_meta_key();
1960
+ $get_view_count = get_post_meta( $post_id, $count_key, true );
1961
+
1962
+ $meta_separator = ( $data['meta_separator'] && $data['meta_separator'] !== 'default' ) ? sprintf( "<span class='separator'>%s</span>", $data['meta_separator'] ) : null;
1963
+
1964
+ //Author Meta
1965
+
1966
+
1967
+ $post_meta_html = [];
1968
+
1969
+ ob_start();
1970
+ if ( '' !== $data['show_author'] ) {
1971
+ $is_author_avatar = null;
1972
+
1973
+ if ( '' !== $data['show_author_image'] ) {
1974
+ $is_author_avatar = 'has-author-avatar';
1975
+ }
1976
+ ?>
1977
+ <span class='author <?php echo esc_attr( $is_author_avatar ); ?>'>
1978
+
1979
+ <?php
1980
+ if ( '' !== $data['show_author_image'] ) {
1981
+ echo get_avatar( $author_id, 80 );
1982
+ } else {
1983
+ if ( $data['show_meta_icon'] === 'yes' ) {
1984
+ if ( isset( $data['user_icon']['value'] ) && $data['user_icon']['value'] ) {
1985
+ \Elementor\Icons_Manager::render_icon( $data['user_icon'], [ 'aria-hidden' => 'true' ] );
1986
+ } else {
1987
+ echo "<i class='fa fa-user'></i>";
1988
+ }
1989
+ }
1990
+ }
1991
+
1992
+ if ( $data['author_prefix'] ) {
1993
+ echo "<span class='author-prefix'>" . esc_html( $data['author_prefix'] ) . "</span>";
1994
+ }
1995
+ echo $author;
1996
+ ?>
1997
+ </span>
1998
+ <?php echo $meta_separator;
1999
+ }
2000
+
2001
+ $post_meta_html['author'] = ob_get_clean();
2002
+
2003
+ ob_start();
2004
+ //Category Meta
2005
+
2006
+ $category_condition = ( $categories && 'show' == $data['show_category'] && self::el_ignore_layout( $data )
2007
+ && in_array( $data['category_position'],
2008
+ [ 'default', 'with_meta' ] ) );
2009
+ if ( ! rtTPG()->hasPro() ) {
2010
+ $category_condition = ( $categories && 'show' == $data['show_category'] );
2011
+ }
2012
+
2013
+ if ( $category_condition ) { ?>
2014
+ <span class='categories-links'>
2015
+ <?php
2016
+ if ( $data['show_meta_icon'] === 'yes' ) {
2017
+ if ( isset( $data['cat_icon']['value'] ) && $data['cat_icon']['value'] ) {
2018
+ \Elementor\Icons_Manager::render_icon( $data['cat_icon'], [ 'aria-hidden' => 'true' ] );
2019
+ } else {
2020
+ echo "<i class='fa fa-user'></i>";
2021
+ }
2022
+ }
2023
+ echo $categories;
2024
+ ?>
2025
+ </span>
2026
+ <?php
2027
+ echo $meta_separator;
2028
+ }
2029
+ $post_meta_html['category'] = ob_get_clean();
2030
+
2031
+ ob_start();
2032
+ //Date Meta
2033
+ if ( '' !== $data['show_date'] ) {
2034
+ $archive_year = get_the_date( 'Y' );
2035
+ $archive_month = get_the_date( 'm' );
2036
+ $archive_day = get_the_date( 'j' );
2037
+
2038
+ ?>
2039
+ <span class='date'>
2040
+
2041
+ <?php
2042
+ if ( $data['show_meta_icon'] === 'yes' ) {
2043
+ if ( isset( $data['date_icon']['value'] ) && $data['date_icon']['value'] ) {
2044
+ \Elementor\Icons_Manager::render_icon( $data['date_icon'], [ 'aria-hidden' => 'true' ] );
2045
+ } else {
2046
+ echo "<i class='fa fa-user'></i>";
2047
+ }
2048
+ }
2049
+ ?>
2050
+ <a href="<?php echo esc_url( get_day_link( $archive_year, $archive_month, $archive_day ) ); ?>">
2051
+ <?php echo esc_html( $date ); ?>
2052
+ </a>
2053
+ </span>
2054
+ <?php
2055
+ echo $meta_separator;
2056
+ }
2057
+ $post_meta_html['date'] = ob_get_clean();
2058
+
2059
+
2060
+ ob_start();
2061
+ //Tags Meta
2062
+ if ( $tags && 'show' == $data['show_tags'] ) {
2063
+ ?>
2064
+ <span class='post-tags-links'>
2065
+ <?php
2066
+ if ( $data['show_meta_icon'] === 'yes' ) {
2067
+ if ( isset( $data['tag_icon']['value'] ) && $data['tag_icon']['value'] ) {
2068
+ \Elementor\Icons_Manager::render_icon( $data['tag_icon'], [ 'aria-hidden' => 'true' ] );
2069
+ } else {
2070
+ echo "<i class='fa fa-user'></i>";
2071
+ }
2072
+ }
2073
+ echo $tags;
2074
+ ?>
2075
+ </span>
2076
+ <?php
2077
+ echo $meta_separator;
2078
+ }
2079
+ $post_meta_html['tags'] = ob_get_clean();
2080
+
2081
+ ob_start();
2082
+ //Comment Meta
2083
+ if ( 'show' == $data['show_comment_count'] ) {
2084
+ ?>
2085
+ <span class="comment-count">
2086
+ <?php
2087
+ if ( $data['show_meta_icon'] === 'yes' ) {
2088
+ if ( isset( $data['comment_icon']['value'] ) && $data['comment_icon']['value'] ) {
2089
+ \Elementor\Icons_Manager::render_icon( $data['comment_icon'], [ 'aria-hidden' => 'true' ] );
2090
+ } else {
2091
+ echo "<i class='fa fa-user'></i>";
2092
+ }
2093
+ }
2094
+ echo $comments_text;
2095
+ ?>
2096
+ </span>
2097
+ <?php
2098
+ echo $meta_separator;
2099
+ }
2100
+
2101
+ $post_meta_html['comment_count'] = ob_get_clean();
2102
+
2103
+ ob_start();
2104
+ //Comment Meta
2105
+ if ( rtTPG()->hasPro() && 'show' == $data['show_post_count'] && ! empty( $get_view_count ) ) {
2106
+ ?>
2107
+ <span class="post-count">
2108
+ <?php
2109
+ if ( $data['show_meta_icon'] === 'yes' ) {
2110
+ if ( isset( $data['post_count_icon']['value'] ) && $data['post_count_icon']['value'] ) {
2111
+ \Elementor\Icons_Manager::render_icon( $data['post_count_icon'], [ 'aria-hidden' => 'true' ] );
2112
+ } else {
2113
+ echo "<i class='fa fa-eye'></i>";
2114
+ }
2115
+ }
2116
+ echo $get_view_count;
2117
+ ?>
2118
+ </span>
2119
+ <?php
2120
+ echo $meta_separator;
2121
+ }
2122
+
2123
+ $post_meta_html['post_count'] = ob_get_clean();
2124
+
2125
+ $meta_orering = isset( $data['meta_ordering'] ) && is_array( $data['meta_ordering'] ) ? $data['meta_ordering'] : [];
2126
+ foreach ( $meta_orering as $val ) {
2127
+ if ( isset( $post_meta_html[ $val['meta_name'] ] ) ) {
2128
+ echo $post_meta_html[ $val['meta_name'] ];
2129
+ }
2130
+ }
2131
+ }
2132
+
2133
+ /**
2134
+ * Custom wp_kses
2135
+ *
2136
+ * @param $string
2137
+ *
2138
+ * @return string
2139
+ */
2140
+ public static function wp_kses( $string ) {
2141
+ $allowed_html = [
2142
+ 'a' => [
2143
+ 'href' => [],
2144
+ 'title' => [],
2145
+ 'data-id' => [],
2146
+ 'target' => [],
2147
+ 'class' => [],
2148
+ ],
2149
+ 'strong' => [],
2150
+ 'b' => [],
2151
+ 'br' => [ [] ],
2152
+ ];
2153
+
2154
+ return wp_kses( $string, $allowed_html );
2155
+ }
2156
+
2157
+
2158
+ /**
2159
+ * Get Elementor Post Title for Elementor
2160
+ *
2161
+ * @param $title_tag
2162
+ * @param $title
2163
+ * @param $link_start
2164
+ * @param $link_end
2165
+ * @param $data
2166
+ */
2167
+
2168
+ public static function get_el_post_title( $title_tag, $title, $link_start, $link_end, $data ) {
2169
+ echo '<div class="entry-title-wrapper">';
2170
+ if ( rtTPG()->hasPro() && 'above_title' === $data['category_position'] || ! self::el_ignore_layout( $data ) ) {
2171
+ self::get_el_thumb_cat( $data, 'cat-above-title' );
2172
+ }
2173
+ printf( '<%s class="entry-title">', esc_attr( $title_tag ) );
2174
+ echo self::wp_kses( $link_start );
2175
+ echo self::wp_kses( $title );
2176
+ echo self::wp_kses( $link_end );
2177
+ printf( '</%s>', esc_attr( $title_tag ) );
2178
+ echo '</div>';
2179
+ }
2180
+
2181
+ static function get_el_thumb_cat( $data, $class = 'cat-over-image' ) {
2182
+ if ( ! ( 'show' == $data['show_meta'] && 'show' == $data['show_category'] ) ) {
2183
+ return;
2184
+ }
2185
+ $pID = get_the_ID();
2186
+ $_cat_id = $data['post_type'] . '_taxonomy';
2187
+ $categories = get_the_term_list( $pID, $data[ $_cat_id ], null, '<span class="rt-separator">,</span>' );
2188
+ $category_position = $data['category_position'];
2189
+ if ( in_array( $data['layout'], [ 'grid-layout4' ] ) && 'default' === $data['category_position'] ) {
2190
+ $category_position = 'top_left';
2191
+ }
2192
+ ?>
2193
+ <div class="tpg-separate-category <?php echo esc_attr( $data['category_style'] . ' ' . $category_position . ' ' . $class ); ?>">
2194
+ <span class='categories-links'>
2195
+ <?php echo ( $data['show_cat_icon'] === 'yes' ) ? "<i class='fas fa-folder-open'></i>" : null; ?>
2196
+ <?php echo $categories; ?>
2197
+ </span>
2198
+ </div>
2199
+ <?php
2200
+ }
2201
+
2202
+
2203
+ /**
2204
+ * Get first image from the content
2205
+ *
2206
+ * @param $post_id
2207
+ * @param string $type
2208
+ *
2209
+ * @return mixed|string
2210
+ */
2211
+ public static function get_content_first_image( $post_id, $type = 'markup', $imgClass = '' ) {
2212
+ if ( $img = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i',
2213
+ get_the_content( $post_id ),
2214
+ $matches )
2215
+ ) {
2216
+ $imgSrc = $matches[1][0];
2217
+ $size = '';
2218
+
2219
+ $imgAbs = str_replace( trailingslashit( site_url() ), ABSPATH, $imgSrc );
2220
+
2221
+ if ( file_exists( $imgAbs ) ) {
2222
+ $info = getimagesize( $imgAbs );
2223
+ $size = isset( $info[3] ) ? $info[3] : '';
2224
+ }
2225
+ $attachment_id = attachment_url_to_postid( $imgSrc );
2226
+ $alt_text = null;
2227
+ if ( ! empty( $attachment_id ) ) {
2228
+ $alt_text = trim( wp_strip_all_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) );
2229
+ }
2230
+ $alt = $alt_text ? $alt_text : get_the_title( $post_id );
2231
+
2232
+ if ( $type == 'markup' ) {
2233
+ if ( $imgClass !== 'swiper-lazy' ) {
2234
+ return "<img class='rt-img-responsive' src='{$imgSrc}' {$size} alt='{$alt}'>";
2235
+ } else {
2236
+ return "<img class='{$imgClass}' data-src='{$imgSrc}' alt='{$alt}'>";
2237
+ }
2238
+ } else {
2239
+ return $imgSrc;
2240
+ }
2241
+ }
2242
+ }
2243
+
2244
+ /**
2245
+ * Get post thumbnail html
2246
+ *
2247
+ * @param $pID
2248
+ * @param $data
2249
+ * @param $link_start
2250
+ * @param $link_end
2251
+ * @param false $offset_size
2252
+ */
2253
+ public static function get_post_thumbnail( $pID, $data, $link_start, $link_end, $offset_size = false ) {
2254
+ $thumb_cat_condition = ( ! ( 'above_title' === $data['category_position'] || 'default' === $data['category_position'] ) );
2255
+ if ( 'grid-layout4' === $data['layout'] && 'default' === $data['category_position'] ) {
2256
+ $thumb_cat_condition = true;
2257
+ } elseif ( in_array( $data['layout'], [ 'grid-layout4', 'grid_hover-layout11' ] ) && 'default' === $data['category_position'] ) {
2258
+ $thumb_cat_condition = true;
2259
+ }
2260
+
2261
+ if ( rtTPG()->hasPro() && $data['show_category'] == 'show' && $thumb_cat_condition && 'with_meta' !== $data['category_position'] ) {
2262
+ self::get_el_thumb_cat( $data );
2263
+ }
2264
+ $img_link = get_the_post_thumbnail_url( $pID, 'full' );
2265
+
2266
+ $img_size_key = 'image';
2267
+
2268
+
2269
+ if ( $offset_size ) {
2270
+ $img_size_key = 'image_offset';
2271
+ }
2272
+ $lazy_load = ( $data['prefix'] == 'slider' && $data['lazy_load'] == 'yes' ) ? true : false;
2273
+ $lazy_class = 'rt-img-responsive';
2274
+ if ( $lazy_load ) {
2275
+ $lazy_class = 'swiper-lazy';
2276
+ }
2277
+
2278
+ echo $data['is_thumb_linked'] === 'yes' ? self::wp_kses( $link_start ) : null;
2279
+ if ( has_post_thumbnail() && 'feature_image' === $data['media_source'] ) {
2280
+ $fImgSize = $data['image_size'];
2281
+ if ( $offset_size ) {
2282
+ echo get_the_post_thumbnail( $pID, $data['image_offset'] );
2283
+ } else {
2284
+ if ( $data['image_size'] !== 'custom' ) {
2285
+ $attachment_id = get_post_thumbnail_id( $pID );
2286
+ $thumb_info = wp_get_attachment_image_src( $attachment_id, $fImgSize );
2287
+ $thumb_alt = trim( wp_strip_all_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) );
2288
+ if ( $lazy_load ) { ?>
2289
+ <img data-src="<?php echo esc_url( $thumb_info[0] ); ?>"
2290
+ src="#none"
2291
+ class="<?php echo esc_attr( $lazy_class ); ?>"
2292
+ width="<?php echo esc_attr( $thumb_info[1] ); ?>"
2293
+ height="<?php echo esc_attr( $thumb_info[2] ); ?>"
2294
+ alt="<?php echo esc_attr( $thumb_alt ? $thumb_alt : the_title() ) ?>">
2295
+ <?php
2296
+ } else { ?>
2297
+ <img src="<?php echo esc_url( $thumb_info[0] ); ?>"
2298
+ class="<?php echo esc_attr( $lazy_class ); ?>"
2299
+ width="<?php echo esc_attr( $thumb_info[1] ); ?>"
2300
+ height="<?php echo esc_attr( $thumb_info[2] ); ?>"
2301
+ alt="<?php echo esc_attr( $thumb_alt ? $thumb_alt : the_title() ) ?>">
2302
+ <?php
2303
+ }
2304
+ ?>
2305
+
2306
+ <?php
2307
+ } else {
2308
+ $fImgSize = 'rt_custom';
2309
+ $mediaSource = 'feature_image';
2310
+ $defaultImgId = null;
2311
+ $customImgSize = [];
2312
+
2313
+
2314
+ if ( isset( $data['image_custom_dimension'] ) ) {
2315
+ $post_thumb_id = get_post_thumbnail_id( $pID );
2316
+ $default_image_dimension = wp_get_attachment_image_src( $post_thumb_id, 'full' );
2317
+ if ( $default_image_dimension[1] <= $data['image_custom_dimension']['width'] || $default_image_dimension[2] <= $data['image_custom_dimension']['height'] ) {
2318
+ $customImgSize = [];
2319
+ } else {
2320
+ $customImgSize[0] = $data['image_custom_dimension']['width'];
2321
+ $customImgSize[1] = $data['image_custom_dimension']['height'];
2322
+ $customImgSize[2] = $data['img_crop_style'];
2323
+ }
2324
+ }
2325
+ echo Fns::getFeatureImageSrc( $pID, $fImgSize, $mediaSource, $defaultImgId, $customImgSize, $lazy_class );
2326
+ }
2327
+ }
2328
+ } elseif ( 'first_image' === $data['media_source'] && self::get_content_first_image( $pID ) ) {
2329
+ echo self::get_content_first_image( $pID, 'markup', $lazy_class );
2330
+ $img_link = self::get_content_first_image( $pID, 'url' );
2331
+ } elseif ( 'yes' === $data['is_default_img'] || 'grid_hover' == $data['prefix'] ) {
2332
+ echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $data, $img_size_key, 'default_image' );
2333
+ if ( ! empty( $data['default_image'] ) && isset( $data['default_image']['url'] ) ) {
2334
+ $img_link = $data['default_image']['url'];
2335
+ }
2336
+ }
2337
+
2338
+ ?>
2339
+ <?php if ( $lazy_load ) : ?>
2340
+ <div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div>
2341
+ <?php endif; ?>
2342
+
2343
+ <?php echo $data['is_thumb_linked'] === 'yes' ? self::wp_kses( $link_end ) : null; ?>
2344
+
2345
+ <?php if ( 'show' === $data['is_thumb_lightbox']
2346
+ || ( in_array( $data['layout'], [ 'grid-layout7', 'slider-layout4' ] ) && in_array( $data['is_thumb_lightbox'], [ 'default', 'show' ] ) )
2347
+ ) :
2348
+ ?>
2349
+ <a class="tpg-zoom"
2350
+ data-elementor-open-lightbox="yes"
2351
+ data-elementor-lightbox-slideshow="<?php echo esc_attr( $data['layout'] ); ?>"
2352
+ title="<?php echo esc_attr( get_the_title() ); ?>"
2353
+ href="<?php echo esc_url( $img_link ) ?>">
2354
+ <i class="fa fa-plus" aria-hidden="true"></i>
2355
+ </a>
2356
+ <?php endif; ?>
2357
+ <div class="overlay grid-hover-content"></div>
2358
+ <?php
2359
+ }
2360
+
2361
+
2362
+ /**
2363
+ * Get ACF data for elementor
2364
+ *
2365
+ * @param $data
2366
+ * @param $pID
2367
+ *
2368
+ * @return bool
2369
+ */
2370
+ public static function tpg_get_acf_data_elementor( $data, $pID, $return_type = true ) {
2371
+ if ( ! ( rtTPG()->hasPro() && Fns::is_acf() ) ) {
2372
+ return;
2373
+ }
2374
+
2375
+ if ( isset( $data['show_acf'] ) && 'show' == $data['show_acf'] ) {
2376
+ $cf_group = $data['cf_group'];
2377
+
2378
+ $format = [
2379
+ 'hide_empty' => ( isset( $data['cf_hide_empty_value'] ) && $data['cf_hide_empty_value'] ) ? 'yes' : '',
2380
+ 'show_value' => ( isset( $data['cf_show_only_value'] ) && $data['cf_show_only_value'] ) ? '' : 'yes',
2381
+ 'hide_group_title' => ( isset( $data['cf_hide_group_title'] ) && $data['cf_hide_group_title'] ) ? '' : 'yes',
2382
+ ];
2383
+
2384
+ if ( ! empty( $cf_group ) ) {
2385
+ $acf_html = "<div class='acf-custom-field-wrap'>";
2386
+ $acf_html .= Functions::get_cf_formatted_fields( $cf_group, $format, $pID );
2387
+ $acf_html .= "</div>";
2388
+ if ( $return_type ) {
2389
+ echo $acf_html;
2390
+ } else {
2391
+ return $acf_html;
2392
+ }
2393
+ }
2394
+ }
2395
+ }
2396
+
2397
+
2398
+ /**
2399
+ * Check is filter enable or not
2400
+ *
2401
+ * @param $data
2402
+ *
2403
+ * @return bool
2404
+ */
2405
+ public static function is_filter_enable( $data ) {
2406
+ if ( rtTPG()->hasPro()
2407
+ && ( $data['show_taxonomy_filter'] == 'show'
2408
+ || $data['show_author_filter'] == 'show'
2409
+ || $data['show_order_by'] == 'show'
2410
+ || $data['show_sort_order'] == 'show'
2411
+ || $data['show_search'] == 'show'
2412
+ || ( $data['show_pagination'] == 'show' && $data['pagination_type'] != 'pagination' ) )
2413
+ ) {
2414
+ return true;
2415
+ }
2416
+
2417
+ return false;
2418
+ }
2419
+
2420
+ }
app/Helpers/Install.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace RT\ThePostGrid\Helpers;
5
+
6
+
7
+ class Install {
8
+
9
+ public static function activate() {
10
+ self::insertDefaultData();
11
+ add_option('rttpg_activation_redirect', true);
12
+ }
13
+
14
+ public static function deactivate() {
15
+ }
16
+
17
+ public static function insertDefaultData() {
18
+ update_option( rtTPG()->options['installed_version'], RT_THE_POST_GRID_VERSION );
19
+ if ( ! get_option( rtTPG()->options['settings'] ) ) {
20
+ update_option( rtTPG()->options['settings'], rtTPG()->defaultSettings );
21
+ }
22
+ }
23
+
24
+ }
app/Helpers/Options.php ADDED
@@ -0,0 +1,1592 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Helpers;
4
+
5
+ class Options {
6
+
7
+ public static function rtPostTypes() {
8
+ $args = apply_filters( 'tpg_get_post_type',
9
+ [
10
+ '_builtin' => true,
11
+ ] );
12
+
13
+ $post_types = get_post_types( $args );
14
+
15
+ $exclude = [ 'attachment', 'revision', 'nav_menu_item' ];
16
+
17
+ foreach ( $exclude as $ex ) {
18
+ unset( $post_types[ $ex ] );
19
+ }
20
+
21
+ return $post_types;
22
+ }
23
+
24
+ public static function rtPostOrders() {
25
+ return [
26
+ "ASC" => __( "Ascending", 'the-post-grid' ),
27
+ "DESC" => __( "Descending", 'the-post-grid' ),
28
+ ];
29
+ }
30
+
31
+ public static function rtTermOperators() {
32
+ return [
33
+ 'IN' => __( "IN — show posts which associate with one or more of selected terms",
34
+ 'the-post-grid' ),
35
+ 'NOT IN' => __( "NOT IN — show posts which do not associate with any of selected terms",
36
+ 'the-post-grid' ),
37
+ 'AND' => __( "AND — show posts which associate with all of selected terms", 'the-post-grid' ),
38
+ ];
39
+ }
40
+
41
+ public static function rtTermRelations() {
42
+ return [
43
+ 'AND' => __( "AND — show posts which match all settings", 'the-post-grid' ),
44
+ 'OR' => __( "OR — show posts which match one or more settings", 'the-post-grid' ),
45
+ ];
46
+ }
47
+
48
+ public static function rtMetaKeyType() {
49
+ return [
50
+ 'meta_value' => __( 'Meta value', 'the-post-grid' ),
51
+ 'meta_value_num' => __( 'Meta value number', 'the-post-grid' ),
52
+ 'meta_value_datetime' => __( 'Meta value datetime', 'the-post-grid' ),
53
+ ];
54
+ }
55
+
56
+ public static function rtPostOrderBy( $isWoCom = false, $metaOrder = false ) {
57
+ $orderBy = [
58
+ // "ID" => __( "ID", 'the-post-grid' ),
59
+ "title" => __( "Title", 'the-post-grid' ),
60
+ "date" => __( "Created date", 'the-post-grid' ),
61
+ "modified" => __( "Modified date", 'the-post-grid' ),
62
+ "menu_order" => __( "Menu Order", 'the-post-grid' ),
63
+ ];
64
+
65
+ return apply_filters( 'rt_tpg_post_orderby', $orderBy, $isWoCom, $metaOrder );
66
+ }
67
+
68
+ public static function rtTPGSettingsCustomScriptFields() {
69
+ $settings = get_option( rtTPG()->options['settings'] );
70
+
71
+ return [
72
+ "script_before_item_load" => [
73
+ "label" => __( "Script before item load", 'the-post-grid' ),
74
+ 'type' => 'textarea',
75
+ 'holderClass' => 'rt-script-wrapper full',
76
+ 'id' => 'script-before-item-load',
77
+ 'value' => isset( $settings['script_before_item_load'] ) ? stripslashes( $settings['script_before_item_load'] ) : null,
78
+ ],
79
+ "script_after_item_load" => [
80
+ "label" => __( "Script After item load", 'the-post-grid' ),
81
+ 'type' => 'textarea',
82
+ 'holderClass' => 'rt-script-wrapper full',
83
+ 'id' => 'script-after-item-load',
84
+ 'value' => isset( $settings['script_after_item_load'] ) ? stripslashes( $settings['script_after_item_load'] ) : null,
85
+ ],
86
+ "script_loaded" => [
87
+ "label" => __( "After Loaded script", 'the-post-grid' ),
88
+ 'type' => 'textarea',
89
+ 'holderClass' => 'rt-script-wrapper full',
90
+ 'id' => 'script-loaded',
91
+ 'value' => isset( $settings['script_loaded'] ) ? stripslashes( $settings['script_loaded'] ) : null,
92
+ ],
93
+ ];
94
+ }
95
+
96
+ public static function rtTPGSettingsOtherSettingsFields() {
97
+ $settings = get_option( rtTPG()->options['settings'] );
98
+
99
+ $other_settings = [
100
+ 'tpg_block_type' => [
101
+ 'type' => 'select',
102
+ 'name' => 'tpg_block_type',
103
+ 'label' => 'Choose Elementor or Shortcode',
104
+ 'id' => 'tpg_block_type',
105
+ 'holderClass' => 'pro-field',
106
+ 'class' => 'select2',
107
+ 'options' => [
108
+ 'default' => __( 'Default (Both Elementor and Shortcode)', 'the-post-grid' ),
109
+ 'elementor' => __( 'Elementor', 'the-post-grid' ),
110
+ 'shortcode' => __( 'Shortcode', 'the-post-grid' ),
111
+ ],
112
+ 'description' => __( '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' ),
113
+ 'value' => isset( $settings['tpg_block_type'] ) ? $settings['tpg_block_type'] : 'default',
114
+ ],
115
+ 'tpg_load_script' => [
116
+ 'type' => 'switch',
117
+ 'name' => 'tpg_load_script',
118
+ 'label' => __( 'Load Script only ShortCode page', 'the-post-grid' ),
119
+ 'description' => __( 'If you enable this, script will be loaded only ShortCode page.', 'the-post-grid' ),
120
+ 'value' => isset( $settings['tpg_load_script'] ) ? $settings['tpg_load_script'] : false,
121
+ ],
122
+ 'tpg_enable_preloader' => [
123
+ 'type' => 'switch',
124
+ 'name' => 'tpg_enable_preloader',
125
+ 'label' => __( 'Enable Pre-loader', 'the-post-grid' ),
126
+ 'holderClass' => 'tpg-hidden',
127
+ 'value' => isset( $settings['tpg_enable_preloader'] ) ? $settings['tpg_enable_preloader'] : false,
128
+ ],
129
+ 'tpg_skip_fa' => [
130
+ 'type' => 'switch',
131
+ 'name' => 'tpg_skip_fa',
132
+ 'label' => __( 'Disable Font Awesome Script', 'the-post-grid' ),
133
+ 'description' => __( "If Font Awesome 5 exist with theme, don't need to load twice.", 'the-post-grid' ),
134
+ 'value' => isset( $settings['tpg_enable_preloader'] ) ? $settings['tpg_enable_preloader'] : false,
135
+ ],
136
+ 'template_author' => [
137
+ 'type' => 'select',
138
+ 'name' => 'template_author',
139
+ 'label' => 'Template Author',
140
+ 'id' => 'template_author',
141
+ 'holderClass' => 'pro-field',
142
+ 'class' => 'select2',
143
+ 'blank' => 'Select a layout',
144
+ 'options' => Fns::getTPGShortCodeList(),
145
+ 'value' => isset( $settings['template_author'] ) ? $settings['template_author'] : [],
146
+ ],
147
+ 'template_category' => [
148
+ 'type' => 'select',
149
+ 'name' => 'template_category',
150
+ 'label' => 'Template Category',
151
+ 'id' => 'template_category',
152
+ 'holderClass' => 'pro-field',
153
+ 'class' => 'select2',
154
+ 'blank' => 'Select a layout',
155
+ 'options' => Fns::getTPGShortCodeList(),
156
+ 'value' => isset( $settings['template_category'] ) ? $settings['template_category'] : [],
157
+ ],
158
+ 'template_search' => [
159
+ 'type' => 'select',
160
+ 'name' => 'template_search',
161
+ 'label' => 'Template Search',
162
+ 'id' => 'template_search',
163
+ 'holderClass' => 'pro-field',
164
+ 'class' => 'select2',
165
+ 'blank' => 'Select a layout',
166
+ 'options' => Fns::getTPGShortCodeList(),
167
+ 'value' => isset( $settings['template_search'] ) ? $settings['template_search'] : [],
168
+ ],
169
+ 'template_tag' => [
170
+ 'type' => 'select',
171
+ 'name' => 'template_tag',
172
+ 'label' => 'Template Tag',
173
+ 'id' => 'template_tag',
174
+ 'holderClass' => 'pro-field',
175
+ 'class' => 'select2',
176
+ 'blank' => 'Select a layout',
177
+ 'options' => Fns::getTPGShortCodeList(),
178
+ 'value' => isset( $settings['template_tag'] ) ? $settings['template_tag'] : [],
179
+ ],
180
+ 'template_class' => [
181
+ 'type' => 'text',
182
+ 'name' => 'template_class',
183
+ 'label' => 'Template class',
184
+ 'holderClass' => 'pro-field',
185
+ 'id' => 'template_class',
186
+ 'value' => isset( $settings['template_class'] ) ? $settings['template_class'] : '',
187
+ ],
188
+ ];
189
+
190
+ $plugin = Fns::is_acf();
191
+
192
+ if ( $plugin ) {
193
+ $acf_settings = [
194
+ 'show_acf_details' => [
195
+ 'type' => 'switch',
196
+ 'name' => 'show_acf_details',
197
+ 'label' => __( 'Enable Advanced Custom Field (ACF) for Single page', 'the-post-grid' ),
198
+ 'description' => __( "You may enable advanced custom field (ACF) on details page", 'the-post-grid' ),
199
+ 'holderClass' => 'pro-field',
200
+ 'value' => isset( $settings['show_acf_details'] ) ? $settings['show_acf_details'] : false,
201
+ ],
202
+
203
+ 'cf_group_details' => [
204
+ 'type' => 'checkbox',
205
+ 'name' => 'cf_group_details',
206
+ 'label' => __( 'Choose ACF Group', 'the-post-grid' ),
207
+ 'id' => 'cf_group_details',
208
+ 'holderClass' => 'pro-field',
209
+ 'alignment' => 'vertical',
210
+ 'multiple' => true,
211
+ 'options' => Fns::get_groups_by_post_type( 'all' ),
212
+ 'value' => isset( $settings['cf_group_details'] ) ? $settings['cf_group_details'] : [],
213
+ ],
214
+
215
+ 'cf_hide_empty_value_details' => [
216
+ 'type' => 'switch',
217
+ 'name' => 'cf_hide_empty_value_details',
218
+ 'label' => __( 'Hide field with empty value', 'the-post-grid' ),
219
+ 'value' => isset( $settings['cf_hide_empty_value_details'] ) ? $settings['cf_hide_empty_value_details'] : false,
220
+ 'holderClass' => 'pro-field',
221
+ ],
222
+
223
+ 'cf_show_only_value_details' => [
224
+ 'type' => 'switch',
225
+ 'name' => 'cf_show_only_value_details',
226
+ 'label' => __( 'Show Title', 'the-post-grid' ),
227
+ 'description' => __( "By default both name & value of field is shown", 'the-post-grid' ),
228
+ 'value' => isset( $settings['cf_show_only_value_details'] ) ? $settings['cf_show_only_value_details'] : true,
229
+ 'holderClass' => 'pro-field',
230
+ ],
231
+
232
+ 'cf_hide_group_title_details' => [
233
+ 'type' => 'switch',
234
+ 'name' => 'cf_hide_group_title_details',
235
+ 'label' => __( 'Show group title', 'the-post-grid' ),
236
+ 'value' => isset( $settings['cf_hide_group_title_details'] ) ? $settings['cf_hide_group_title_details'] : false,
237
+ 'holderClass' => 'pro-field',
238
+ ],
239
+ ];
240
+
241
+ $other_settings = array_merge( $other_settings, $acf_settings );
242
+ }
243
+
244
+ return $other_settings;
245
+ }
246
+
247
+ public static function rtTPGLicenceField() {
248
+ $settings = get_option( rtTPG()->options['settings'] );
249
+ $status = ! empty( $settings['license_status'] ) && $settings['license_status'] === 'valid' ? true : false;
250
+ $license_status = ! empty( $settings['license_key'] ) ? sprintf( "<span class='license-status'>%s</span>",
251
+ $status
252
+ ? "<input type='submit' class='button-secondary rt-licensing-btn danger' name='license_deactivate' value='" . __( "Deactivate License", "the-post-grid" )
253
+ . "'/>"
254
+ : "<input type='submit' class='button-secondary rt-licensing-btn button-primary' name='license_activate' value='" . __( "Activate License", "the-post-grid" )
255
+ . "'/>"
256
+ ) : ' ';
257
+
258
+ return [
259
+ "license_key" => [
260
+ 'type' => 'text',
261
+ 'name' => 'license_key',
262
+ 'attr' => 'style="min-width:300px;"',
263
+ 'label' => __( 'Enter your license key', 'the-post-grid' ),
264
+ 'description' => $license_status,
265
+ 'id' => 'license_key',
266
+ 'value' => isset( $settings['license_key'] ) ? $settings['license_key'] : '',
267
+ ],
268
+ ];
269
+ }
270
+
271
+ public static function rtTPGSettingsSocialShareFields() {
272
+ $settings = get_option( rtTPG()->options['settings'] );
273
+
274
+ return [
275
+ "social_share_items" => [
276
+ 'type' => 'checkbox',
277
+ 'name' => 'social_share_items',
278
+ 'label' => 'Social share items',
279
+ 'id' => 'social_share_items',
280
+ 'holderClass' => 'pro-field',
281
+ 'alignment' => 'vertical',
282
+ 'multiple' => true,
283
+ 'options' => Options::socialShareItemList(),
284
+ 'value' => isset( $settings['social_share_items'] ) ? $settings['social_share_items'] : [],
285
+ ],
286
+ ];
287
+ }
288
+
289
+ public static function socialShareItemList() {
290
+ return [
291
+ 'facebook' => 'Facebook',
292
+ 'twitter' => 'Twitter',
293
+ 'linkedin' => 'LinkedIn',
294
+ 'pinterest' => 'Pinterest',
295
+ 'reddit' => 'Reddit',
296
+ 'email' => 'Email',
297
+ ];
298
+ }
299
+
300
+ public static function templateOverrideItemList() {
301
+ return [
302
+ 'category-archive' => "Category archive",
303
+ 'tag-archive' => "Tag archive",
304
+ 'author-archive' => "Author archive",
305
+ 'search' => "Search page",
306
+ ];
307
+ }
308
+
309
+ public static function rtTPGCommonFilterFields() {
310
+ return [
311
+ 'post__in' => [
312
+ "name" => "post__in",
313
+ "label" => "Include only",
314
+ "type" => "text",
315
+ "class" => "full",
316
+ "description" => 'List of post IDs to show (comma-separated values, for example: 1,2,3)',
317
+ ],
318
+ 'post__not_in' => [
319
+ "name" => "post__not_in",
320
+ "label" => "Exclude",
321
+ "type" => "text",
322
+ "class" => "full",
323
+ "description" => 'List of post IDs to hide (comma-separated values, for example: 1,2,3)',
324
+ ],
325
+ 'limit' => [
326
+ "name" => "limit",
327
+ "label" => "Limit",
328
+ "type" => "number",
329
+ "class" => "full",
330
+ "description" => 'The number of posts to show. Set empty to show all found posts.',
331
+ ],
332
+ 'offset' => [
333
+ "name" => "offset",
334
+ "label" => __( "Offset", "the-post-grid" ),
335
+ "type" => "number",
336
+ "class" => "full",
337
+ "description" => 'The number of posts to skip from start',
338
+ ],
339
+ ];
340
+ }
341
+
342
+ public static function rtTPGPostType() {
343
+ return [
344
+ 'tpg_post_type' => [
345
+ "label" => "Post Type",
346
+ "type" => "select",
347
+ "id" => "rt-sc-post-type",
348
+ "class" => "-rt-select2",
349
+ "options" => self::rtPostTypes(),
350
+ ],
351
+ ];
352
+ }
353
+
354
+ public static function rtTPAdvanceFilters() {
355
+ $fields = apply_filters( 'rt_tpg_advanced_filters',
356
+ [
357
+ 'tpg_taxonomy' => "Taxonomy",
358
+ 'order' => "Order",
359
+ 'author' => "Author",
360
+ 'tpg_post_status' => "Status",
361
+ 's' => "Search",
362
+ ] );
363
+
364
+ return [
365
+ 'post_filter' => [
366
+ 'type' => "checkboxFilter",
367
+ 'name' => "post_filter",
368
+ 'label' => "Advanced Filters",
369
+ "alignment" => "vertical",
370
+ "multiple" => true,
371
+ 'default' => [ 'tpg_taxonomy', 'order' ],
372
+ "options" => $fields,
373
+ ],
374
+ ];
375
+ }
376
+
377
+ public static function rtTPGPostStatus() {
378
+ return [
379
+ 'publish' => 'Publish',
380
+ 'pending' => 'Pending',
381
+ 'draft' => 'Draft',
382
+ 'auto-draft' => 'Auto draft',
383
+ 'future' => 'Future',
384
+ 'private' => 'Private',
385
+ 'inherit' => 'Inherit',
386
+ 'trash' => 'Trash',
387
+ ];
388
+ }
389
+
390
+ public static function owl_property() {
391
+ return [
392
+ 'auto_play' => 'Auto Play',
393
+ 'loop' => 'Loop',
394
+ 'nav_button' => 'Nav Button',
395
+ 'pagination' => 'Pagination',
396
+ 'stop_hover' => 'Stop Hover',
397
+ 'auto_height' => 'Auto Height',
398
+ 'lazy_load' => 'Lazy Load',
399
+ 'rtl' => 'Right to left (RTL)',
400
+ ];
401
+ }
402
+
403
+ public static function rtTPGLayoutSettingFields() {
404
+ $options = [
405
+ 'layout_type' => [
406
+ "type" => "radio-image",
407
+ "label" => __( "Layout Type", "the-post-grid" ),
408
+ "id" => "rt-tpg-sc-layout-type",
409
+ "options" => self::rtTPGLayoutType(),
410
+ ],
411
+ 'layout' => [
412
+ "type" => "radio-image",
413
+ "label" => __( "Layout", "the-post-grid" ),
414
+ "id" => "rt-tpg-sc-layout",
415
+ "class" => "rt-select2",
416
+ "options" => self::rtTPGLayouts(),
417
+ ],
418
+ 'tgp_filter' => [
419
+ "type" => "checkbox",
420
+ "label" => "Filter",
421
+ 'holderClass' => "sc-tpg-grid-filter tpg-hidden pro-field",
422
+ "multiple" => true,
423
+ "alignment" => 'vertical',
424
+ "options" => self::tgp_filter_list(),
425
+ ],
426
+ 'tgp_filter_taxonomy' => [
427
+ "type" => "select",
428
+ "label" => "Taxonomy Filter",
429
+ 'holderClass' => "sc-tpg-grid-filter sc-tpg-filter tpg-hidden",
430
+ "class" => "rt-select2",
431
+ "options" => Fns::rt_get_taxonomy_for_filter(),
432
+ ],
433
+ 'tgp_filter_taxonomy_hierarchical' => [
434
+ "type" => "switch",
435
+ "label" => "Display as sub category",
436
+ 'holderClass' => "sc-tpg-grid-filter sc-tpg-filter tpg-hidden",
437
+ "option" => "Active",
438
+ ],
439
+ 'tgp_filter_type' => [
440
+ "type" => "select",
441
+ "label" => "Taxonomy filter type",
442
+ 'holderClass' => "sc-tpg-grid-filter sc-tpg-filter tpg-hidden",
443
+ "class" => "rt-select2",
444
+ "options" => self::rt_filter_type(),
445
+ ],
446
+ 'tgp_default_filter' => [
447
+ "type" => "select",
448
+ "label" => "Selected filter term (Selected item)",
449
+ 'holderClass' => "sc-tpg-grid-filter sc-tpg-filter tpg-hidden",
450
+ "class" => "rt-select2",
451
+ "attr" => "data-selected='" . get_post_meta( get_the_ID(), 'tgp_default_filter', true ) . "'",
452
+ "options" => [ '' => __( 'Show All', 'the-post-grid' ) ],
453
+ ],
454
+ 'tpg_hide_all_button' => [
455
+ "type" => "switch",
456
+ "label" => "Hide All (Show all) button",
457
+ 'holderClass' => "sc-tpg-grid-filter sc-tpg-filter tpg-hidden",
458
+ "option" => 'Hide',
459
+ ],
460
+ 'tpg_post_count' => [
461
+ "type" => "switch",
462
+ "label" => "Show post count",
463
+ 'holderClass' => "sc-tpg-grid-filter sc-tpg-filter tpg-hidden",
464
+ "option" => 'Enable',
465
+ ],
466
+ 'isotope_filter' => [
467
+ "type" => "select",
468
+ "label" => "Isotope Filter",
469
+ 'holderClass' => "isotope-item sc-isotope-filter tpg-hidden",
470
+ "id" => "rt-tpg-sc-isotope-filter",
471
+ "class" => "rt-select2",
472
+ "options" => Fns::rt_get_taxonomy_for_filter(),
473
+ ],
474
+ 'isotope_default_filter' => [
475
+ "type" => "select",
476
+ "label" => "Isotope filter (Selected item)",
477
+ 'holderClass' => "isotope-item sc-isotope-default-filter tpg-hidden pro-field",
478
+ "id" => "rt-tpg-sc-isotope-default-filter",
479
+ "class" => "rt-select2",
480
+ "attr" => "data-selected='" . get_post_meta( get_the_ID(),
481
+ 'isotope_default_filter',
482
+ true ) . "'",
483
+ "options" => [ '' => __( 'Show all', 'the-post-grid' ) ],
484
+ ],
485
+ 'tpg_show_all_text' => [
486
+ "type" => "text",
487
+ 'holderClass' => "isotope-item sc-isotope-filter tpg-hidden",
488
+ "label" => esc_html__( "Show all text", 'the-post-grid' ),
489
+ "default" => esc_html__( "Show all", 'the-post-grid' ),
490
+ ],
491
+ 'isotope_filter_dropdown' => [
492
+ "type" => "switch",
493
+ "label" => "Isotope dropdown filter",
494
+ 'holderClass' => "isotope-item sc-isotope-filter sc-isotope-filter-dropdown tpg-hidden pro-field",
495
+ ],
496
+ 'isotope_filter_show_all' => [
497
+ "type" => "switch",
498
+ "name" => "isotope_filter_show_all",
499
+ "label" => "Isotope filter (Show All item)",
500
+ 'holderClass' => "isotope-item sc-isotope-filter-show-all tpg-hidden pro-field",
501
+ "id" => "rt-tpg-sc-isotope-filter-show-all",
502
+ ],
503
+ 'isotope_filter_count' => [
504
+ "type" => "switch",
505
+ "label" => "Isotope filter count number",
506
+ 'holderClass' => "isotope-item sc-isotope-filter tpg-hidden pro-field",
507
+ "option" => 'Enable',
508
+ ],
509
+ 'isotope_filter_url' => [
510
+ "type" => "switch",
511
+ "label" => "Isotope filter URL",
512
+ 'holderClass' => "isotope-item sc-isotope-filter tpg-hidden pro-field",
513
+ ],
514
+ 'isotope_search_filter' => [
515
+ "type" => "switch",
516
+ "label" => "Isotope search filter",
517
+ 'holderClass' => "isotope-item sc-isotope-search-filter tpg-hidden pro-field",
518
+ "id" => "rt-tpg-sc-isotope-search-filter",
519
+ "option" => 'Enable',
520
+ ],
521
+ 'carousel_property' => [
522
+ "type" => "checkbox",
523
+ "label" => "Carousel property",
524
+ "multiple" => true,
525
+ "alignment" => 'vertical',
526
+ 'holderClass' => "carousel-item carousel-property tpg-hidden",
527
+ "id" => "carousel-property",
528
+ "default" => [ 'pagination' ],
529
+ "options" => self::owl_property(),
530
+ ],
531
+ 'tpg_carousel_speed' => [
532
+ "label" => __( "Speed", 'the-post-grid' ),
533
+ "holderClass" => "tpg-hidden carousel-item",
534
+ "type" => "number",
535
+ 'default' => 250,
536
+ "description" => __( 'Auto play Speed in milliseconds', 'the-post-grid' ),
537
+ ],
538
+ 'tpg_carousel_autoplay_timeout' => [
539
+ "label" => __( "Autoplay timeout", 'the-post-grid' ),
540
+ "holderClass" => "tpg-hidden carousel-item tpg-carousel-auto-play-timeout",
541
+ "type" => "number",
542
+ 'default' => 5000,
543
+ "description" => __( 'Autoplay interval timeout', 'the-post-grid' ),
544
+ ],
545
+ ];
546
+
547
+ return apply_filters( 'rt_tpg_layout_options', $options );
548
+ }
549
+
550
+ public static function responsiveSettingsColumn() {
551
+ $options = [
552
+ 'column' => [
553
+ 'type' => 'select',
554
+ 'label' => __( 'Desktop', 'the-post-grid' ),
555
+ 'class' => 'rt-select2',
556
+ 'holderClass' => "offset-column-wrap rt-3-column",
557
+ 'default' => 3,
558
+ 'options' => self::scColumns(),
559
+ "description" => "Desktop > 991px",
560
+ ],
561
+ 'tpg_tab_column' => [
562
+ 'type' => 'select',
563
+ 'label' => __( 'Tab', 'the-post-grid' ),
564
+ 'class' => 'rt-select2',
565
+ 'holderClass' => "offset-column-wrap rt-3-column",
566
+ 'default' => 2,
567
+ 'options' => self::scColumns(),
568
+ "description" => "Tab < 992px",
569
+ ],
570
+ 'tpg_mobile_column' => [
571
+ 'type' => 'select',
572
+ 'label' => __( 'Mobile', 'the-post-grid' ),
573
+ 'class' => 'rt-select2',
574
+ 'holderClass' => "offset-column-wrap rt-3-column",
575
+ 'default' => 1,
576
+ 'options' => self::scColumns(),
577
+ "description" => "Mobile < 768px",
578
+ ],
579
+ ];
580
+
581
+ return apply_filters( 'rt_tpg_layout_column_options', $options );
582
+ }
583
+
584
+ public static function layoutMiscSettings() {
585
+ $options = [
586
+ 'pagination' => [
587
+ "type" => "switch",
588
+ "label" => "Pagination",
589
+ 'holderClass' => "pagination",
590
+ "id" => "rt-tpg-pagination",
591
+ "description" => "Pagination not allow in Grid Hover layout",
592
+ "option" => 'Enable',
593
+ ],
594
+ 'posts_per_page' => [
595
+ "type" => "number",
596
+ "label" => "Display per page",
597
+ 'holderClass' => "pagination-item posts-per-page tpg-hidden",
598
+ "default" => 5,
599
+ "description" => "If value of Limit setting is not blank (empty), this value should be smaller than Limit value.",
600
+ ],
601
+ 'posts_loading_type' => [
602
+ "type" => "radio",
603
+ "label" => "Pagination Type",
604
+ 'holderClass' => "pagination-item posts-loading-type tpg-hidden pro-field",
605
+ "alignment" => "vertical",
606
+ "default" => 'pagination',
607
+ "options" => self::postLoadingType(),
608
+ ],
609
+ 'link_to_detail_page' => [
610
+ "type" => "switch",
611
+ "label" => "Link To Detail Page",
612
+ "alignment" => "vertical",
613
+ "default" => true,
614
+ ],
615
+ 'detail_page_link_type' => [
616
+ "type" => "radio",
617
+ "label" => "Detail page link type",
618
+ 'holderClass' => "detail-page-link-type tpg-hidden pro-field",
619
+ "alignment" => "vertical",
620
+ "default" => "new_page",
621
+ "options" => [
622
+ 'new_page' => "New Page",
623
+ 'popup' => "PopUp",
624
+ ],
625
+ ],
626
+ 'popup_type' => [
627
+ "type" => "radio",
628
+ "label" => "PopUp Type",
629
+ 'holderClass' => "popup-type tpg-hidden pro-field",
630
+ "alignment" => "vertical",
631
+ "default" => "single",
632
+ "options" => [
633
+ 'single' => "Single PopUp",
634
+ 'multi' => "Multi PopUp",
635
+ ],
636
+ ],
637
+ 'link_target' => [
638
+ "type" => "radio",
639
+ "label" => "Link Target",
640
+ 'holderClass' => "tpg-link-target tpg-hidden",
641
+ "alignment" => 'vertical',
642
+ "options" => [
643
+ '' => 'Same Window',
644
+ '_blank' => 'New Window',
645
+ ],
646
+ ],
647
+ ];
648
+
649
+ return apply_filters( 'rt_tpg_layout_misc_options', $options );
650
+ }
651
+
652
+ public static function stickySettings() {
653
+ $options = [
654
+ 'ignore_sticky_posts' => [
655
+ "type" => "switch",
656
+ "label" => "Show sticky posts at the top",
657
+ 'holderClass' => "pro-field",
658
+ "alignment" => "vertical",
659
+ "default" => false,
660
+ ],
661
+ ];
662
+
663
+ return $options;
664
+ }
665
+
666
+ public static function scMarginOpt() {
667
+ return [
668
+ 'default' => "Bootstrap default",
669
+ 'no' => "No Margin",
670
+ ];
671
+ }
672
+
673
+ function scGridType() {
674
+ return [
675
+ 'even' => "Even Grid",
676
+ 'masonry' => "Masonry",
677
+ ];
678
+ }
679
+
680
+ public static function getTitleTags() {
681
+ return [
682
+ 'h2' => "H2",
683
+ 'h3' => "H3",
684
+ 'h4' => "H4",
685
+ ];
686
+ }
687
+
688
+ public static function getHeadingTags() {
689
+ return [
690
+ 'h1' => "H1",
691
+ 'h2' => "H2",
692
+ 'h3' => "H3",
693
+ 'h4' => "H4",
694
+ 'h5' => "H5",
695
+ 'h6' => "H6",
696
+ ];
697
+ }
698
+
699
+ public static function rtTpgSettingsDetailFieldSelection() {
700
+ $settings = get_option( rtTPG()->options['settings'] );
701
+
702
+ $fields = [
703
+ "popup_fields" => [
704
+ 'type' => 'checkbox',
705
+ 'label' => 'Field Selection',
706
+ 'id' => 'popup-fields',
707
+ 'holderClass' => 'pro-field',
708
+ 'alignment' => 'vertical',
709
+ 'multiple' => true,
710
+ 'options' => Options::detailAvailableFields(),
711
+ 'default' => array_keys( Options::detailAvailableFields() ),
712
+ 'value' => isset( $settings['popup_fields'] ) ? $settings['popup_fields'] : [],
713
+ ],
714
+ ];
715
+ $cf = Fns::is_acf();
716
+ if ( $cf ) {
717
+ $plist = self::getCFPluginList();
718
+ $pName = ! empty( $plist[ $cf ] ) ? $plist[ $cf ] : " - ";
719
+ $fields['cf_group'] = [
720
+ "type" => "checkbox",
721
+ "name" => "cf_group",
722
+ "holderClass" => "tpg-hidden cfs-fields cf-group pro-field",
723
+ "label" => "Custom Field group " . " ({$pName})",
724
+ "multiple" => true,
725
+ "alignment" => "vertical",
726
+ "id" => "cf_group",
727
+ "options" => Fns::get_groups_by_post_type( 'all' ),
728
+ "value" => isset( $settings['cf_group'] ) ? $settings['cf_group'] : [],
729
+ ];
730
+ $fields['cf_hide_empty_value'] = [
731
+ "type" => "checkbox",
732
+ "name" => "cf_hide_empty_value",
733
+ "holderClass" => "tpg-hidden cfs-fields pro-field",
734
+ "label" => "Hide field with empty value",
735
+ "value" => ! empty( $settings['cf_hide_empty_value'] ) ? 1 : 0,
736
+ ];
737
+ $fields['cf_show_only_value'] = [
738
+ "type" => "checkbox",
739
+ "name" => "cf_show_only_value",
740
+ "holderClass" => "tpg-hidden cfs-fields pro-field",
741
+ "label" => "Show only value of field",
742
+ "description" => "By default both name & value of field is shown",
743
+ "value" => ! empty( $settings['cf_show_only_value'] ) ? 1 : 0,
744
+ ];
745
+ $fields['cf_hide_group_title'] = [
746
+ "type" => "checkbox",
747
+ "name" => "cf_hide_group_title",
748
+ "holderClass" => "tpg-hidden cfs-fields pro-field",
749
+ "label" => "Hide group title",
750
+ "value" => ! empty( $settings['cf_hide_group_title'] ) ? 1 : 0,
751
+ ];
752
+ }
753
+
754
+ return $fields;
755
+ }
756
+
757
+ public static function detailAvailableFields() {
758
+ $fields = self::rtTPGItemFields();
759
+ $inserted = [
760
+ 'feature_img' => 'Feature Image',
761
+ 'content' => 'Content',
762
+ ];
763
+ unset( $fields['heading'] );
764
+ unset( $fields['excerpt'] );
765
+ unset( $fields['read_more'] );
766
+ unset( $fields['comment_count'] );
767
+ $offset = array_search( 'title', array_keys( $fields ) ) + 1;
768
+ $newFields = array_slice( $fields, 0, $offset, true ) + $inserted + array_slice( $fields,
769
+ $offset,
770
+ null,
771
+ true );
772
+ $newFields['social_share'] = "Social Share";
773
+
774
+ return $newFields;
775
+ }
776
+
777
+ public static function rtTPGSCHeadingSettings() {
778
+ $fields = [
779
+ 'tpg_heading_tag' => [
780
+ 'type' => 'select',
781
+ 'name' => 'tpg_heading_tag',
782
+ 'label' => esc_html__( 'Tag', 'the-post-grid' ),
783
+ 'class' => 'rt-select2',
784
+ 'id' => 'heading-tag',
785
+ 'options' => self::getHeadingTags(),
786
+ 'default' => 'h2',
787
+ ],
788
+ 'tpg_heading_style' => [
789
+ "type" => "select",
790
+ "class" => "rt-select2",
791
+ "label" => esc_html__( "Style", "the-post-grid" ),
792
+ "blank" => esc_html__( "Default", "the-post-grid" ),
793
+ "options" => [
794
+ 'style1' => esc_html__( "Style 1", "the-post-grid" ),
795
+ 'style2' => esc_html__( "Style 2", "the-post-grid" ),
796
+ 'style3' => esc_html__( "Style 3", "the-post-grid" ),
797
+ ],
798
+ ],
799
+ 'tpg_heading_alignment' => [
800
+ "type" => "select",
801
+ "class" => "rt-select2",
802
+ "label" => esc_html__( "Alignment", "the-post-grid" ),
803
+ "blank" => esc_html__( "Default", "the-post-grid" ),
804
+ "options" => [
805
+ 'left' => esc_html__( "Left", "the-post-grid" ),
806
+ 'right' => esc_html__( "Right", "the-post-grid" ),
807
+ 'center' => esc_html__( "Center", "the-post-grid" ),
808
+ ],
809
+ ],
810
+ 'tpg_heading_link' => [
811
+ "type" => "url",
812
+ "label" => __( 'Link', 'the-post-grid' ),
813
+ ],
814
+ ];
815
+
816
+ return $fields;
817
+ }
818
+
819
+ public static function rtTPGSCCategorySettings() {
820
+ $fields = [
821
+ 'tpg_category_position' => [
822
+ "type" => "select",
823
+ "class" => "rt-select2",
824
+ "holderClass" => "pro-field",
825
+ "label" => esc_html__( "Position", "the-post-grid" ),
826
+ "blank" => esc_html__( "Default", "the-post-grid" ),
827
+ "options" => [
828
+ 'above_title' => esc_html__( "Above Title", "the-post-grid" ),
829
+ 'top_left' => esc_html__( "Over image (Top Left)", "the-post-grid" ),
830
+ 'top_right' => esc_html__( "Over image (Top Right)", "the-post-grid" ),
831
+ 'bottom_left' => esc_html__( "Over image (Bottom Left)", "the-post-grid" ),
832
+ 'bottom_right' => esc_html__( "Over image (Bottom Right)", "the-post-grid" ),
833
+ 'image_center' => esc_html__( "Over image (Center)", "the-post-grid" ),
834
+ ],
835
+ ],
836
+ 'tpg_category_style' => [
837
+ "type" => "select",
838
+ "class" => "rt-select2",
839
+ "holderClass" => "pro-field",
840
+ "label" => esc_html__( "Style", "the-post-grid" ),
841
+ "blank" => esc_html__( "Default", "the-post-grid" ),
842
+ "options" => [
843
+ 'style1' => esc_html__( "Style 1", "the-post-grid" ),
844
+ 'style2' => esc_html__( "Style 2", "the-post-grid" ),
845
+ 'style3' => esc_html__( "Style 3", "the-post-grid" ),
846
+ ],
847
+ ],
848
+ 'tpg_category_icon' => [
849
+ "type" => "switch",
850
+ "label" => esc_html__( "Icon", "the-post-grid" ),
851
+ "default" => true,
852
+ ],
853
+ ];
854
+
855
+ return $fields;
856
+ }
857
+
858
+ public static function rtTPGSCTitleSettings() {
859
+ $fields = [
860
+ 'tpg_title_position' => [
861
+ "type" => "select",
862
+ "label" => esc_html__( "Title Position (Above or Below image)", "the-post-grid" ),
863
+ "class" => "rt-select2 ",
864
+ "holderClass" => "pro-field",
865
+ "blank" => esc_html__( "Default", "the-post-grid" ),
866
+ "options" => [
867
+ 'above' => esc_html__( "Above image", "the-post-grid" ),
868
+ 'below' => esc_html__( "Below image", "the-post-grid" ),
869
+ ],
870
+ "description" => __( "<span style='color:#ff0000'>Only Layout 1, Layout 12, Layout 14, Isotope1, Isotope8, Isotope10, Carousel Layout 1, Carousel Layout 8, Carousel Layout 10</span>",
871
+ 'the-post-grid' ),
872
+ ],
873
+ 'title_tag' => [
874
+ 'type' => 'select',
875
+ 'name' => 'title_tag',
876
+ 'label' => esc_html__( 'Title tag', 'the-post-grid' ),
877
+ 'class' => 'rt-select2',
878
+ 'id' => 'title-tag',
879
+ 'options' => self::getTitleTags(),
880
+ 'default' => 'h3',
881
+ ],
882
+ 'tpg_title_limit' => [
883
+ "type" => "number",
884
+ "label" => esc_html__( "Title limit", 'the-post-grid' ),
885
+ "description" => esc_html__( "Title limit only integer number is allowed, Leave it blank for full title.", 'the-post-grid' ),
886
+ ],
887
+ 'tpg_title_limit_type' => [
888
+ "type" => "radio",
889
+ "label" => esc_html__( "Title limit type", 'the-post-grid' ),
890
+ "alignment" => "vertical",
891
+ "default" => 'character',
892
+ "options" => self::get_limit_type(),
893
+ ],
894
+ ];
895
+
896
+ return $fields;
897
+ }
898
+
899
+ public static function rtTPGSCMetaSettings() {
900
+ $fields = [
901
+ 'tpg_meta_position' => [
902
+ "type" => "select",
903
+ "label" => esc_html__( "Position", "the-post-grid" ),
904
+ "class" => "rt-select2 ",
905
+ "holderClass" => "pro-field",
906
+ "blank" => esc_html__( "Default", "the-post-grid" ),
907
+ "options" => [
908
+ 'above_title' => esc_html__( "Above Title", "the-post-grid" ),
909
+ 'above_excerpt' => esc_html__( "Above excerpt", "the-post-grid" ),
910
+ 'below_excerpt' => esc_html__( "Below excerpt", "the-post-grid" ),
911
+ ],
912
+ ],
913
+ 'tpg_meta_icon' => [
914
+ "type" => "switch",
915
+ "label" => esc_html__( "Icon", "the-post-grid" ),
916
+ "default" => true,
917
+ ],
918
+ 'tpg_meta_separator' => [
919
+ "type" => "select",
920
+ "class" => "rt-select2",
921
+ "label" => esc_html__( "Separator", "the-post-grid" ),
922
+ "blank" => esc_html__( "Default", "the-post-grid" ),
923
+ "options" => [
924
+ 'dot' => esc_html__( "Dot ( . )", "the-post-grid" ),
925
+ 's_slash' => esc_html__( "Single Slash ( / )", "the-post-grid" ),
926
+ 'd_slash' => esc_html__( "Double Slash ( // )", "the-post-grid" ),
927
+ 'hypen' => esc_html__( "Hypen ( - )", "the-post-grid" ),
928
+ 'v_pipe' => esc_html__( "Vertical Pipe ( | )", "the-post-grid" ),
929
+ ],
930
+ ],
931
+ ];
932
+
933
+ return $fields;
934
+ }
935
+
936
+ public static function rtTPGSCImageSettings() {
937
+ $fields = [
938
+ 'feature_image' => [
939
+ "type" => "switch",
940
+ "label" => "Hide Feature Image",
941
+ "id" => "rt-tpg-feature-image",
942
+ "default" => false,
943
+ ],
944
+ 'featured_image_size' => [
945
+ "type" => "select",
946
+ "label" => "Feature Image Size",
947
+ "class" => "rt-select2",
948
+ 'holderClass' => "rt-feature-image-option tpg-hidden",
949
+ "options" => Fns::get_image_sizes(),
950
+ ],
951
+ 'custom_image_size' => [
952
+ "type" => "image_size",
953
+ "label" => "Custom Image Size",
954
+ 'holderClass' => "rt-sc-custom-image-size-holder tpg-hidden",
955
+ "multiple" => true,
956
+ ],
957
+ 'media_source' => [
958
+ "type" => "radio",
959
+ "label" => "Media Source",
960
+ "default" => 'feature_image',
961
+ "alignment" => "vertical",
962
+ 'holderClass' => "rt-feature-image-option tpg-hidden",
963
+ "options" => self::rtMediaSource(),
964
+ ],
965
+ 'tgp_layout2_image_column' => [
966
+ 'type' => 'select',
967
+ 'label' => esc_html__( 'Image column', 'the-post-grid' ),
968
+ 'class' => 'rt-select2',
969
+ 'holderClass' => "holder-layout2-image-column tpg-hidden",
970
+ 'default' => 4,
971
+ 'options' => self::scColumns(),
972
+ "description" => "Content column will calculate automatically",
973
+ ],
974
+ 'tpg_image_type' => [
975
+ "type" => "radio",
976
+ "label" => esc_html__( "Type", 'the-post-grid' ),
977
+ "alignment" => "vertical",
978
+ 'holderClass' => "rt-feature-image-option tpg-hidden pro-field",
979
+ "default" => 'normal',
980
+ "options" => self::get_image_types(),
981
+ ],
982
+ 'tpg_image_animation' => [
983
+ "type" => "select",
984
+ "label" => esc_html__( 'Hover Animation', 'the-post-grid' ),
985
+ "class" => "rt-select2",
986
+ "blank" => esc_html__( "Default", "the-post-grid" ),
987
+ "options" => [
988
+ 'img_zoom_in' => esc_html__( 'Zoom in', 'the-post-grid' ),
989
+ 'img_zoom_out' => esc_html__( 'Zoom out', 'the-post-grid' ),
990
+ 'img_no_effect' => esc_html__( 'None', 'the-post-grid' ),
991
+ ],
992
+ ],
993
+ 'tpg_image_border_radius' => [
994
+ "type" => "number",
995
+ "class" => "small-text",
996
+ 'holderClass' => "pro-field",
997
+ "label" => esc_html__( "Border radius", "the-post-grid" ),
998
+ "description" => esc_html__( "Leave it blank for default", 'the-post-grid' ),
999
+ ],
1000
+ ];
1001
+
1002
+ return apply_filters( 'rt_tpg_sc_image_settings', $fields );
1003
+ }
1004
+
1005
+ public static function rtTPGSCExcerptSettings() {
1006
+ $fields = [
1007
+ 'excerpt_limit' => [
1008
+ "type" => "number",
1009
+ "label" => esc_html__( "Excerpt limit", 'the-post-grid' ),
1010
+ "default" => 15,
1011
+ "description" => esc_html__( "Excerpt limit only integer number is allowed, Leave it blank for full excerpt.", 'the-post-grid' ),
1012
+ ],
1013
+ 'tgp_excerpt_type' => [
1014
+ "type" => "radio",
1015
+ "label" => esc_html__( "Excerpt Type", 'the-post-grid' ),
1016
+ "alignment" => "vertical",
1017
+ "default" => 'word',
1018
+ "options" => self::get_limit_type( 'content' ),
1019
+ ],
1020
+ 'tgp_excerpt_more_text' => [
1021
+ "type" => "text",
1022
+ "label" => "Excerpt more text",
1023
+ "default" => '...',
1024
+ ],
1025
+ ];
1026
+
1027
+ return $fields;
1028
+ }
1029
+
1030
+ public static function rtTPGSCButtonSettings() {
1031
+ $fields = [
1032
+ 'tpg_read_more_button_border_radius' => [
1033
+ "type" => "number",
1034
+ "class" => "small-text",
1035
+ "label" => esc_html__( "Border radius", "the-post-grid" ),
1036
+ "description" => __( "Leave it blank for default", 'the-post-grid' ),
1037
+ ],
1038
+ 'tpg_read_more_button_alignment' => [
1039
+ "type" => "select",
1040
+ "class" => "rt-select2",
1041
+ "label" => esc_html__( "Alignment", "the-post-grid" ),
1042
+ "blank" => esc_html__( "Default", "the-post-grid" ),
1043
+ "options" => [
1044
+ 'left' => esc_html__( "Left", "the-post-grid" ),
1045
+ 'right' => esc_html__( "Right", "the-post-grid" ),
1046
+ 'center' => esc_html__( "Center", "the-post-grid" ),
1047
+ ],
1048
+ ],
1049
+ 'tgp_read_more_text' => [
1050
+ "type" => "text",
1051
+ "label" => "Text",
1052
+ ],
1053
+ ];
1054
+
1055
+ return $fields;
1056
+ }
1057
+
1058
+ public static function rtTPGStyleFields() {
1059
+ $fields = [
1060
+ 'parent_class' => [
1061
+ "type" => "text",
1062
+ "label" => "Parent class",
1063
+ "class" => "medium-text",
1064
+ "description" => "Parent class for adding custom css",
1065
+ ],
1066
+ 'primary_color' => [
1067
+ "type" => "text",
1068
+ "label" => "Primary Color",
1069
+ "class" => "rt-color",
1070
+ "default" => "#0367bf",
1071
+ ],
1072
+ ];
1073
+
1074
+ return apply_filters( 'rt_tpg_style_fields', $fields );
1075
+ }
1076
+
1077
+ public static function rtTPGStyleButtonColorFields() {
1078
+ $fields = [
1079
+
1080
+ 'button_bg_color' => [
1081
+ "type" => "text",
1082
+ "name" => "button_bg_color",
1083
+ "label" => "Background",
1084
+ "class" => "rt-color",
1085
+ ],
1086
+ 'button_hover_bg_color' => [
1087
+ "type" => "text",
1088
+ "name" => "button_hover_bg_color",
1089
+ "label" => "Hover Background",
1090
+ "class" => "rt-color",
1091
+ ],
1092
+ 'button_active_bg_color' => [
1093
+ "type" => "text",
1094
+ "label" => "Active Background (Isotop)",
1095
+ "class" => "rt-color",
1096
+ ],
1097
+ 'button_text_bg_color' => [
1098
+ "type" => "text",
1099
+ "label" => "Text",
1100
+ "class" => "rt-color",
1101
+ ],
1102
+ 'button_hover_text_color' => [
1103
+ "type" => "text",
1104
+ "label" => "Text Hover",
1105
+ "class" => "rt-color",
1106
+ ],
1107
+ ];
1108
+
1109
+ return apply_filters( 'rt_tpg_style_button_css_fields', $fields );
1110
+ }
1111
+
1112
+ public static function rtTPGStyleHeading() {
1113
+ $fields = [
1114
+ 'tpg_heading_bg' => [
1115
+ "type" => "text",
1116
+ "class" => "rt-color",
1117
+ "label" => esc_html__( "Background Color", "the-post-grid" ),
1118
+ ],
1119
+ 'tpg_heading_color' => [
1120
+ "type" => "text",
1121
+ "class" => "rt-color",
1122
+ "label" => esc_html__( "Text Color", "the-post-grid" ),
1123
+ ],
1124
+ 'tpg_heading_border_color' => [
1125
+ "type" => "text",
1126
+ "class" => "rt-color",
1127
+ "label" => esc_html__( "Border Color", "the-post-grid" ),
1128
+ ],
1129
+ 'tpg_heading_border_size' => [
1130
+ "type" => "number",
1131
+ "class" => "small-text",
1132
+ "label" => esc_html__( "Border Size", "the-post-grid" ),
1133
+ "description" => __( "Leave it blank for default", 'the-post-grid' ),
1134
+ ],
1135
+ 'tpg_heading_margin' => [
1136
+ "type" => "text",
1137
+ "class" => "medium-text tpg-spacing-field",
1138
+ "label" => esc_html__( "Margin", "the-post-grid" ),
1139
+ "description" => __( "Multiple value allowed separated by comma 12,0,5,10", 'the-post-grid' ),
1140
+ ],
1141
+ 'tpg_heading_padding' => [
1142
+ "type" => "text",
1143
+ "class" => "medium-text tpg-spacing-field",
1144
+ "label" => esc_html__( "Padding", "the-post-grid" ),
1145
+ "description" => __( "Leave it blank for default, multiple value allowed separated by comma 12,0,5,10", 'the-post-grid' ),
1146
+ ],
1147
+ ];
1148
+
1149
+ return apply_filters( 'tpg_heading_style_fields', $fields );
1150
+ }
1151
+
1152
+ public static function rtTPGStyleFullArea() {
1153
+ $fields = [
1154
+ 'tpg_full_area_bg' => [
1155
+ "type" => "text",
1156
+ "class" => "rt-color",
1157
+ "label" => esc_html__( "Background", "the-post-grid" ),
1158
+ ],
1159
+ 'tpg_full_area_margin' => [
1160
+ "type" => "text",
1161
+ "class" => "medium-text",
1162
+ "label" => esc_html__( "Margin", "the-post-grid" ),
1163
+ "description" => __( "Multiple value allowed separated by comma 12,0,5,10", 'the-post-grid' ),
1164
+ ],
1165
+ 'tpg_full_area_padding' => [
1166
+ "type" => "text",
1167
+ "class" => "medium-text",
1168
+ "label" => esc_html__( "Padding", "the-post-grid" ),
1169
+ "description" => __( "Multiple value allowed separated by comma 12,0,5,10", 'the-post-grid' ),
1170
+ ],
1171
+ ];
1172
+
1173
+ return apply_filters( 'tpg_box_style_fields', $fields );
1174
+ }
1175
+
1176
+ public static function rtTPGStyleContentWrap() {
1177
+ $fields = [
1178
+ 'tpg_content_wrap_bg' => [
1179
+ "type" => "text",
1180
+ "class" => "rt-color",
1181
+ "label" => esc_html__( "Background Color", "the-post-grid" ),
1182
+ ],
1183
+ 'tpg_content_wrap_shadow' => [
1184
+ "type" => "text",
1185
+ "class" => "rt-color",
1186
+ "label" => esc_html__( "Box Shadow Color", "the-post-grid" ),
1187
+ ],
1188
+ 'tpg_content_wrap_border_color' => [
1189
+ "type" => "text",
1190
+ "class" => "rt-color",
1191
+ "label" => esc_html__( "Border Color", "the-post-grid" ),
1192
+ ],
1193
+ 'tpg_content_wrap_border' => [
1194
+ "type" => "number",
1195
+ "class" => "small-text",
1196
+ "label" => esc_html__( "Border Width", "the-post-grid" ),
1197
+ "description" => __( "Leave it blank for default", 'the-post-grid' ),
1198
+ ],
1199
+ 'tpg_content_wrap_border_radius' => [
1200
+ "type" => "number",
1201
+ "class" => "small-text",
1202
+ "label" => esc_html__( "Border Radius", "the-post-grid" ),
1203
+ ],
1204
+ 'tpg_box_padding' => [
1205
+ "type" => "text",
1206
+ "class" => "medium-text",
1207
+ "label" => esc_html__( "Box Padding", "the-post-grid" ),
1208
+ "description" => __( "Multiple value allowed separated by comma 12,0,5,10", 'the-post-grid' ),
1209
+ ],
1210
+ 'tpg_content_padding' => [
1211
+ "type" => "text",
1212
+ "class" => "medium-text",
1213
+ "label" => esc_html__( "Content Padding", "the-post-grid" ),
1214
+ "description" => __( "Multiple value allowed separated by comma 12,0,5,10", 'the-post-grid' ),
1215
+ ],
1216
+ ];
1217
+
1218
+ return apply_filters( 'tpg_content_style_fields', $fields );
1219
+ }
1220
+
1221
+ public static function rtTPGStyleCategory() {
1222
+ $fields = [
1223
+ 'tpg_category_bg' => [
1224
+ "type" => "text",
1225
+ "class" => "rt-color",
1226
+ "label" => esc_html__( "Background Color", "the-post-grid" ),
1227
+ ],
1228
+ 'tpg_category_color' => [
1229
+ "type" => "text",
1230
+ "class" => "rt-color",
1231
+ "label" => esc_html__( "Text Color", "the-post-grid" ),
1232
+ ],
1233
+ 'tpg_category_border_radius' => [
1234
+ "type" => "number",
1235
+ "class" => "small-text",
1236
+ "label" => esc_html__( "Border Radius", "the-post-grid" ),
1237
+ "description" => __( "Leave it blank for default", 'the-post-grid' ),
1238
+ ],
1239
+ 'tpg_category_margin' => [
1240
+ "type" => "text",
1241
+ "class" => "medium-text tpg-spacing-field",
1242
+ "label" => esc_html__( "Margin", "the-post-grid" ),
1243
+ "description" => __( "Multiple value allowed separated by comma 12,0,5,10", 'the-post-grid' ),
1244
+ ],
1245
+ 'tpg_category_padding' => [
1246
+ "type" => "text",
1247
+ "class" => "medium-text tpg-spacing-field",
1248
+ "label" => esc_html__( "Padding", "the-post-grid" ),
1249
+ "description" => __( "Multiple value allowed separated by comma 12,0,5,10", 'the-post-grid' ),
1250
+ ],
1251
+ 'rt_tpg_category_font_size' => [
1252
+ "type" => "select",
1253
+ "class" => "rt-select2",
1254
+ "label" => esc_html__( "Font Size", "the-post-grid" ),
1255
+ "blank" => 'Default',
1256
+ "options" => self::scFontSize(),
1257
+ ],
1258
+ ];
1259
+
1260
+ return apply_filters( 'tpg_category_style_fields', $fields );
1261
+ }
1262
+
1263
+
1264
+ public static function itemFields() {
1265
+ $fields = [
1266
+ 'item_fields' => [
1267
+ "type" => "checkbox",
1268
+ "name" => "item_fields",
1269
+ "label" => "Field selection",
1270
+ "id" => "item-fields",
1271
+ "multiple" => true,
1272
+ "alignment" => "vertical",
1273
+ "default" => array_keys( self::rtTPGItemFields() ),
1274
+ "options" => self::rtTPGItemFields(),
1275
+ ],
1276
+ ];
1277
+ if ( $cf = Fns::is_acf() ) {
1278
+ global $post;
1279
+ $post_type = get_post_meta( $post->ID, 'tpg_post_type', true );
1280
+ $plist = self::getCFPluginList();
1281
+ $fields['cf_group'] = [
1282
+ "type" => "checkbox",
1283
+ "name" => "cf_group",
1284
+ "holderClass" => "tpg-hidden cf-fields cf-group",
1285
+ "label" => "Custom Field group " . " ({$plist[$cf]})",
1286
+ "multiple" => true,
1287
+ "alignment" => "vertical",
1288
+ "id" => "cf_group",
1289
+ "options" => Fns::get_groups_by_post_type( $post_type, $cf ),
1290
+ ];
1291
+ $fields['cf_hide_empty_value'] = [
1292
+ "type" => "checkbox",
1293
+ "name" => "cf_hide_empty_value",
1294
+ "holderClass" => "tpg-hidden cf-fields",
1295
+ "label" => "Hide field with empty value",
1296
+ "default" => 1,
1297
+ ];
1298
+ $fields['cf_show_only_value'] = [
1299
+ "type" => "checkbox",
1300
+ "name" => "cf_show_only_value",
1301
+ "holderClass" => "tpg-hidden cf-fields",
1302
+ "label" => "Show only value of field",
1303
+ "description" => "By default both name & value of field is shown",
1304
+ ];
1305
+ $fields['cf_hide_group_title'] = [
1306
+ "type" => "checkbox",
1307
+ "name" => "cf_hide_group_title",
1308
+ "holderClass" => "tpg-hidden cf-fields",
1309
+ "label" => "Hide group title",
1310
+ ];
1311
+ }
1312
+
1313
+ return $fields;
1314
+ }
1315
+
1316
+
1317
+ public static function getCFPluginList() {
1318
+ return [
1319
+ 'acf' => "Advanced Custom Field",
1320
+ ];
1321
+ }
1322
+
1323
+ public static function rtMediaSource() {
1324
+ return [
1325
+ "feature_image" => "Feature Image",
1326
+ "first_image" => "First Image from content",
1327
+ ];
1328
+ }
1329
+
1330
+ public static function get_image_types() {
1331
+ return [
1332
+ 'normal' => "Normal",
1333
+ 'circle' => "Circle",
1334
+ ];
1335
+ }
1336
+
1337
+ public static function get_limit_type( $content = null ) {
1338
+ $types = [
1339
+ 'character' => __( "Character", "the-post-grid" ),
1340
+ 'word' => __( "Word", "the-post-grid" ),
1341
+ ];
1342
+ if ( $content === 'content' ) {
1343
+ $types['full'] = __( "Full Content", "the-post-grid" );
1344
+ }
1345
+
1346
+ return apply_filters( 'tpg_limit_type', $types, $content );
1347
+ }
1348
+
1349
+ public static function scColumns() {
1350
+ return [
1351
+ 1 => "Column 1",
1352
+ 2 => "Column 2",
1353
+ 3 => "Column 3",
1354
+ 4 => "Column 4",
1355
+ 5 => "Column 5",
1356
+ 6 => "Column 6",
1357
+ ];
1358
+ }
1359
+
1360
+ public static function tgp_filter_list() {
1361
+ return [
1362
+ '_taxonomy_filter' => __( 'Taxonomy filter', "the-post-grid" ),
1363
+ '_author_filter' => __( 'Author filter', "the-post-grid" ),
1364
+ '_order_by' => __( 'Order - Sort retrieved posts by parameter', "the-post-grid" ),
1365
+ '_sort_order' => __( 'Sort Order - Designates the ascending or descending order of the "orderby" parameter', "the-post-grid" ),
1366
+ '_search' => __( "Search filter", "the-post-grid" ),
1367
+ ];
1368
+ }
1369
+
1370
+ public static function overflowOpacity() {
1371
+ return [
1372
+ 1 => '10%',
1373
+ 2 => '20%',
1374
+ 3 => '30%',
1375
+ 4 => '40%',
1376
+ 5 => '50%',
1377
+ 6 => '60%',
1378
+ 7 => '70%',
1379
+ 8 => '80%',
1380
+ 9 => '90%',
1381
+ ];
1382
+ }
1383
+
1384
+ public static function rtTPGLayoutType() {
1385
+ $layoutType = [
1386
+ 'grid' => [
1387
+ 'title' => __( "Grid", "the-post-grid" ),
1388
+ 'img' => rtTPG()->get_assets_uri( 'images/grid.png' ),
1389
+ ],
1390
+ 'grid_hover' => [
1391
+ 'title' => __( "Grid Hover", "the-post-grid" ),
1392
+ 'img' => rtTPG()->get_assets_uri( 'images/grid_hover.png' ),
1393
+ ],
1394
+ 'list' => [
1395
+ 'title' => __( "List", "the-post-grid" ),
1396
+ 'img' => rtTPG()->get_assets_uri( 'images/list.png' ),
1397
+ ],
1398
+ 'isotope' => [
1399
+ 'title' => __( "Isotope", "the-post-grid" ),
1400
+ 'img' => rtTPG()->get_assets_uri( 'images/isotope.png' ),
1401
+ ],
1402
+ ];
1403
+
1404
+ return apply_filters( 'rt_tpg_layouts_type', $layoutType );
1405
+ }
1406
+
1407
+ public static function rtTPGLayouts() {
1408
+ $layouts = [
1409
+ 'layout1' => [
1410
+ 'title' => __( "Grid Layout 1", "the-post-grid" ),
1411
+ 'layout' => 'grid',
1412
+ 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/',
1413
+ 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid1.png' ),
1414
+ ],
1415
+ 'layout12' => [
1416
+ 'title' => esc_html__( "Grid Layout 2", "the-post-grid" ),
1417
+ 'layout' => 'grid',
1418
+ 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/grid-layout-2/',
1419
+ 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid10.png' ),
1420
+ ],
1421
+ 'layout5' => [
1422
+ 'title' => __( "Grid Hover 1", "the-post-grid" ),
1423
+ 'layout' => 'grid_hover',
1424
+ 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-1/',
1425
+ 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid3.png' ),
1426
+ ],
1427
+ 'layout6' => [
1428
+ 'title' => esc_html__( "Grid Hover 2", "the-post-grid" ),
1429
+ 'layout' => 'grid_hover',
1430
+ 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-2/',
1431
+ 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid4.png' ),
1432
+ ],
1433
+ 'layout7' => [
1434
+ 'title' => esc_html__( "Grid Hover 3", "the-post-grid" ),
1435
+ 'layout' => 'grid_hover',
1436
+ 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/hover-layout-3/',
1437
+ 'img' => rtTPG()->get_assets_uri( 'images/layouts/grid5.png' ),
1438
+ ],
1439
+ 'layout2' => [
1440
+ 'title' => __( "List Layout 1", "the-post-grid" ),
1441
+ 'layout' => 'list',
1442
+ 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/list-layout-1/',
1443
+ 'img' => rtTPG()->get_assets_uri( 'images/layouts/list1.png' ),
1444
+ ],
1445
+ 'layout3' => [
1446
+ 'title' => __( "List Layout 2", "the-post-grid" ),
1447
+ 'layout' => 'list',
1448
+ 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/list-layout-rounded-image/',
1449
+ 'img' => rtTPG()->get_assets_uri( 'images/layouts/list2.png' ),
1450
+ ],
1451
+ 'isotope1' => [
1452
+ 'title' => __( "Isotope Layout 1", "the-post-grid" ),
1453
+ 'layout' => 'isotope',
1454
+ 'layout_link' => 'https://www.radiustheme.com/demo/plugins/the-post-grid/layout-4-filter/',
1455
+ 'img' => rtTPG()->get_assets_uri( 'images/layouts/isotope1.png' ),
1456
+ ],
1457
+ ];
1458
+
1459
+ return apply_filters( 'tpg_layouts', $layouts );
1460
+ }
1461
+
1462
+ public static function rtTPGItemFields() {
1463
+ $items = [
1464
+ 'heading' => __( "ShortCode Heading", "the-post-grid" ),
1465
+ 'title' => __( "Title", "the-post-grid" ),
1466
+ 'excerpt' => __( "Excerpt", "the-post-grid" ),
1467
+ 'read_more' => __( "Read More", "the-post-grid" ),
1468
+ 'post_date' => __( "Post Date", "the-post-grid" ),
1469
+ 'author' => __( "Author", "the-post-grid" ),
1470
+ 'categories' => __( "Categories", "the-post-grid" ),
1471
+ 'tags' => __( "Tags", "the-post-grid" ),
1472
+ 'comment_count' => __( "Comment count", "the-post-grid" ),
1473
+ ];
1474
+
1475
+ return apply_filters( 'tpg_field_selection_items', $items );
1476
+ }
1477
+
1478
+ public static function postLoadingType() {
1479
+ return apply_filters( 'rttpg_pagination_type',
1480
+ [
1481
+ 'pagination' => __( "Pagination", "the-post-grid" ),
1482
+ ] );
1483
+ }
1484
+
1485
+ public static function scGridOpt() {
1486
+ return [
1487
+ 'even' => "Even",
1488
+ 'masonry' => "Masonry",
1489
+ ];
1490
+ }
1491
+
1492
+ public static function extraStyle() {
1493
+ return apply_filters( 'tpg_extra_style',
1494
+ [
1495
+ 'title' => "Title",
1496
+ 'title_hover' => "Title hover",
1497
+ 'excerpt' => "Excerpt",
1498
+ 'meta_data' => "Meta Data",
1499
+ ] );
1500
+ }
1501
+
1502
+ public static function scFontSize() {
1503
+ $num = [];
1504
+ for ( $i = 10; $i <= 50; $i ++ ) {
1505
+ $num[ $i ] = $i . "px";
1506
+ }
1507
+
1508
+ return $num;
1509
+ }
1510
+
1511
+ public static function scAlignment() {
1512
+ return [
1513
+ 'left' => "Left",
1514
+ 'right' => "Right",
1515
+ 'center' => "Center",
1516
+ 'justify' => "Justify",
1517
+ ];
1518
+ }
1519
+
1520
+ public static function scReadMoreButtonPositionList() {
1521
+ return [
1522
+ 'left' => "Left",
1523
+ 'right' => "Right",
1524
+ 'center' => "Center",
1525
+ ];
1526
+ }
1527
+
1528
+
1529
+ public static function scTextWeight() {
1530
+ return [
1531
+ 'normal' => "Normal",
1532
+ 'bold' => "Bold",
1533
+ 'bolder' => "Bolder",
1534
+ 'lighter' => "Lighter",
1535
+ 'inherit' => "Inherit",
1536
+ 'initial' => "Initial",
1537
+ 'unset' => "Unset",
1538
+ 100 => '100',
1539
+ 200 => '200',
1540
+ 300 => '300',
1541
+ 400 => '400',
1542
+ 500 => '500',
1543
+ 600 => '600',
1544
+ 700 => '700',
1545
+ 800 => '800',
1546
+ 900 => '900',
1547
+ ];
1548
+ }
1549
+
1550
+ public static function imageCropType() {
1551
+ return [
1552
+ 'soft' => "Soft Crop",
1553
+ 'hard' => "Hard Crop",
1554
+ ];
1555
+ }
1556
+
1557
+ public static function rt_filter_type() {
1558
+ return [
1559
+ 'dropdown' => "Dropdown",
1560
+ 'button' => "Button",
1561
+ ];
1562
+ }
1563
+
1564
+ public static function get_pro_feature_list() {
1565
+ return '<ol>
1566
+ <li>Fully responsive and mobile friendly.</li>
1567
+ <li>62 Different Layouts</li>
1568
+ <li>12 New Layouts</li>
1569
+ <li>Even and Masonry Grid.</li>
1570
+ <li>WooCommerce supported.</li>
1571
+ <li>Custom Post Type Supported</li>
1572
+ <li>Display posts by any Taxonomy like category(s), tag(s), author(s), keyword(s)</li>
1573
+ <li>Order by Id, Title, Created date, Modified date and Menu order.</li>
1574
+ <li>Display image size (thumbnail, medium, large, full)</li>
1575
+ <li>Isotope filter for any taxonomy ie. categories, tags...</li>
1576
+ <li>Query Post with Relation.</li>
1577
+ <li>Fields Selection.</li>
1578
+ <li>All Text and Color control.</li>
1579
+ <li>Meta Position Control.</li>
1580
+ <li>Category Position Control.</li>
1581
+ <li>Content Wrapper Style Control.</li>
1582
+ <li>Enable/Disable Pagination.</li>
1583
+ <li>AJAX Pagination (Load more and Load on Scrolling)</li>
1584
+ <li>Archive page builder for Elementor</li>
1585
+ <li>Advanced Custom Field support</li>
1586
+ <li>Post View Count</li>
1587
+ </ol>
1588
+ <a href="https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/" class="rt-admin-btn" target="_blank">' . __( "Get Pro Version", "the-post-grid" )
1589
+ . '</a>';
1590
+ }
1591
+
1592
+ }
app/Models/Field.php ADDED
@@ -0,0 +1,718 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace RT\ThePostGrid\Models;
3
+
4
+ use RT\ThePostGrid\Helpers\Fns;
5
+ use RT\ThePostGrid\Helpers\Options;
6
+
7
+ class Field {
8
+ private $type;
9
+ private $name;
10
+ private $value;
11
+ private $default;
12
+ private $label;
13
+ private $id;
14
+ private $class;
15
+ private $holderClass;
16
+ private $description;
17
+ private $options;
18
+ private $option;
19
+ private $optionLabel;
20
+ private $attr;
21
+ private $multiple;
22
+ private $alignment;
23
+ private $placeholder;
24
+ private $blank;
25
+
26
+ function __construct() {
27
+ }
28
+
29
+ private function setArgument( $key, $attr ) {
30
+ global $pagenow;
31
+
32
+ $this->type = isset( $attr['type'] ) ? ( $attr['type'] ? $attr['type'] : 'text' ) : 'text';
33
+ $this->multiple = isset( $attr['multiple'] ) ? ( $attr['multiple'] ? $attr['multiple'] : false ) : false;
34
+ $this->name = ! empty( $key ) ? $key : null;
35
+ $id = isset( $attr['id'] ) ? $attr['id'] : null;
36
+ $this->id = ! empty( $id ) ? $id : $this->name;
37
+ $this->default = isset( $attr['default'] ) ? $attr['default'] : null;
38
+ $this->value = isset( $attr['value'] ) ? ( $attr['value'] ? $attr['value'] : null ) : null;
39
+
40
+ if ( ! $this->value ) {
41
+ $post_id = get_the_ID();
42
+ if ( ! Fns::meta_exist( $this->name, $post_id ) && $pagenow == 'post-new.php') {
43
+ $this->value = $this->default;
44
+ } else {
45
+ if ( $this->multiple ) {
46
+ if (metadata_exists('post', $post_id, $this->name)) {
47
+ $this->value = get_post_meta( $post_id, $this->name );
48
+ } else {
49
+ $this->value = $this->default;
50
+ }
51
+ } else {
52
+ if (metadata_exists('post', $post_id, $this->name)) {
53
+ $this->value = get_post_meta( $post_id, $this->name, true );
54
+ } else {
55
+ $this->value = $this->default;
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ $this->label = isset( $attr['label'] ) ? ( $attr['label'] ? $attr['label'] : null ) : null;
62
+ $this->class = isset( $attr['class'] ) ? ( $attr['class'] ? $attr['class'] : null ) : null;
63
+ $this->holderClass = isset( $attr['holderClass'] ) ? ( $attr['holderClass'] ? $attr['holderClass'] : null ) : null;
64
+ $this->placeholder = isset( $attr['placeholder'] ) ? ( $attr['placeholder'] ? $attr['placeholder'] : null ) : null;
65
+ $this->description = isset( $attr['description'] ) ? ( $attr['description'] ? $attr['description'] : null ) : null;
66
+ $this->options = isset( $attr['options'] ) ? ( $attr['options'] ? $attr['options'] : array() ) : array();
67
+ $this->option = isset( $attr['option'] ) ? ( $attr['option'] ? $attr['option'] : null ) : null;
68
+ $this->optionLabel = isset( $attr['optionLabel'] ) ? ( $attr['optionLabel'] ? $attr['optionLabel'] : null ) : null;
69
+ $this->attr = isset( $attr['attr'] ) ? ( $attr['attr'] ? $attr['attr'] : null ) : null;
70
+ $this->alignment = isset( $attr['alignment'] ) ? ( $attr['alignment'] ? $attr['alignment'] : null ) : null;
71
+ $this->blank = ! empty( $attr['blank'] ) ? $attr['blank'] : null;
72
+
73
+ }
74
+
75
+ public function Field( $key, $attr = array() ) {
76
+ $this->setArgument( $key, $attr );
77
+ $holderId = $this->name . "_holder";
78
+
79
+ if (!rtTPG()->hasPro()) {
80
+ $class = $this->holderClass;
81
+ } else {
82
+ $class = str_replace('pro-field', '', $this->holderClass);
83
+ }
84
+ $html = null;
85
+ $html .= "<div class='field-holder {$class}' id='{$holderId}'>";
86
+
87
+ $holderClass = explode(' ', $this->holderClass);
88
+
89
+ if ( $this->label ) {
90
+ $html .= "<div class='field-label'>";
91
+ $html .= "<label>{$this->label}</label>";
92
+ if (in_array('pro-field', $holderClass) && ! rtTPG()->hasPro()) {
93
+ $html .= '<span class="rttpg-tooltip">[Pro]<span class="rttpg-tooltip-text">'.esc_html__('Premium Option', 'the-post-grid').'</span></span>';
94
+ }
95
+ $html .= "</div>";
96
+ }
97
+ $html .= "<div class='field'>";
98
+ switch ( $this->type ) {
99
+ case 'text':
100
+ $html .= $this->text();
101
+ break;
102
+
103
+ case 'url':
104
+ $html .= $this->url();
105
+ break;
106
+
107
+ case 'number':
108
+ $html .= $this->number();
109
+ break;
110
+
111
+ case 'select':
112
+ $html .= $this->select();
113
+ break;
114
+
115
+ case 'textarea':
116
+ $html .= $this->textArea();
117
+ break;
118
+
119
+ case 'checkbox':
120
+ $html .= $this->checkbox();
121
+ break;
122
+
123
+ case 'switch':
124
+ $html .= $this->switchField();
125
+ break;
126
+
127
+ case 'checkboxFilter':
128
+ $html .= $this->checkboxFilter();
129
+ break;
130
+
131
+ case 'radio':
132
+ $html .= $this->radioField();
133
+ break;
134
+
135
+ case 'radio-image':
136
+ $html .= $this->radioImage();
137
+ break;
138
+
139
+ case 'date_range':
140
+ $html .= $this->dateRange();
141
+ break;
142
+
143
+ case 'script':
144
+ $html .= $this->script();
145
+ break;
146
+
147
+ case 'image':
148
+ $html .= $this->image();
149
+ break;
150
+
151
+ case 'image_size':
152
+ $html .= $this->imageSize();
153
+ break;
154
+ }
155
+ if ( $this->description ) {
156
+ $html .= "<p class='description'>{$this->description}</p>";
157
+ }
158
+ $html .= "</div>"; // field
159
+ $html .= "</div>"; // field holder
160
+
161
+ return $html;
162
+ }
163
+
164
+ private function text() {
165
+ $holderClass = explode(' ', $this->holderClass);
166
+ $h = null;
167
+ $h .= "<input
168
+ type='text'
169
+ class='{$this->class}'
170
+ id='{$this->id}'
171
+ value='{$this->value}'
172
+ name='{$this->name}'
173
+ placeholder='{$this->placeholder}'
174
+ {$this->attr}
175
+ />";
176
+
177
+ return $h;
178
+ }
179
+
180
+ private function script() {
181
+ $type = "script";
182
+ if ( $this->id == "custom-css" ) {
183
+ $type = "css";
184
+ }
185
+ $h = null;
186
+ $h .= '<div class="rt-script-wrapper" data-type="' . $type . '">';
187
+ $h .= '<div class="rt-script-container">';
188
+ $h .= "<div name='{$this->name}' id='ret-" . mt_rand() . "' class='rt-script'>";
189
+ $h .= '</div>';
190
+ $h .= '</div>';
191
+
192
+ $h .= "<textarea
193
+ style='display: none;'
194
+ class='rt-script-textarea'
195
+ id='{$this->id}'
196
+ name='{$this->name}'
197
+ >{$this->value}</textarea>";
198
+ $h .= '</div>';
199
+
200
+ return $h;
201
+ }
202
+
203
+ private function url() {
204
+ $h = null;
205
+ $h .= "<input
206
+ type='url'
207
+ class='{$this->class}'
208
+ id='{$this->id}'
209
+ value='{$this->value}'
210
+ name='{$this->name}'
211
+ placeholder='{$this->placeholder}'
212
+ {$this->attr}
213
+ />";
214
+
215
+ return $h;
216
+ }
217
+
218
+ private function number() {
219
+ $holderClass = explode(' ', $this->holderClass);
220
+ $h = null;
221
+ $h .= "<input
222
+ type='number'
223
+ class='{$this->class}'
224
+ id='{$this->id}'
225
+ value='{$this->value}'
226
+ name='{$this->name}'
227
+ placeholder='{$this->placeholder}'
228
+ {$this->attr}
229
+ />";
230
+
231
+ return $h;
232
+ }
233
+
234
+ private function select() {
235
+ $holderClass = explode(' ', $this->holderClass);
236
+ $atts = (in_array('pro-field', $holderClass)) && !rtTPG()->hasPro() ? 'disabled="true"' : '';
237
+ $h = null;
238
+ if ( $this->multiple ) {
239
+ $this->attr = " style='min-width:160px;'";
240
+ $this->name = $this->name . "[]";
241
+ $this->attr = $this->attr . " multiple='multiple'";
242
+ $this->value = ( is_array( $this->value ) && ! empty( $this->value ) ? $this->value : array() );
243
+ } else {
244
+ $this->value = array( $this->value );
245
+ }
246
+
247
+ $h .= "<select {$atts} name='{$this->name}' id='{$this->id}' class='{$this->class}' {$this->attr}>";
248
+ if ( $this->blank ) {
249
+ $h .= "<option value=''>{$this->blank}</option>";
250
+ }
251
+ if ( is_array( $this->options ) && ! empty( $this->options ) ) {
252
+ foreach ( $this->options as $key => $value ) {
253
+ $slt = ( in_array( $key, $this->value ) ? "selected" : null );
254
+ $h .= "<option {$slt} value='{$key}'>{$value}</option>";
255
+ }
256
+ }
257
+ $h .= "</select>";
258
+
259
+ return $h;
260
+ }
261
+
262
+ private function textArea() {
263
+ $holderClass = explode(' ', $this->holderClass);
264
+ $h = null;
265
+ $h .= "<textarea
266
+ class='{$this->class} rt-textarea'
267
+ id='{$this->id}'
268
+ name='{$this->name}'
269
+ placeholder='{$this->placeholder}'
270
+ {$this->attr}
271
+ >{$this->value}</textarea>";
272
+
273
+ return $h;
274
+ }
275
+
276
+ private function image() {
277
+ $holderClass = explode(' ', $this->holderClass);
278
+ $h = null;
279
+ $h .= "<div class='rt-image-holder'>";
280
+ $h .= "<input type='hidden' name='{$this->name}' value='{$this->value}' id='{$this->id}' class='hidden-image-id' />";
281
+ $img = null;
282
+ $c = "hidden";
283
+ if ( $id = absint( $this->value ) ) {
284
+ $aImg = wp_get_attachment_image_src( $id, 'thumbnail' );
285
+ $img = "<img src='{$aImg[0]}' >";
286
+ $c = null;
287
+ }
288
+
289
+ $h .= "<div class='rt-image-preview'>{$img}<span class='dashicons dashicons-plus-alt rtAddImage'></span><span class='dashicons dashicons-trash rtRemoveImage {$c}'></span></div>";
290
+
291
+ $h .= "</div>";
292
+
293
+ return $h;
294
+ }
295
+
296
+ private function imageSize() {
297
+ $width = ( ! empty( $this->value[0] ) ? absint( $this->value[0] ) : null );
298
+ $height = ( ! empty( $this->value[1] ) ? absint( $this->value[1] ) : null );
299
+ $cropV = ( ! empty( $this->value[2] ) ? $this->value[2] : 'soft' );
300
+ $h = null;
301
+ $h .= "<div class='rt-image-size-holder'>";
302
+ $h .= "<div class='rt-image-size-width rt-image-size'>";
303
+ $h .= "<label>Width</label>";
304
+ $h .= "<input type='number' name='{$this->name}[]' value='{$width}' />";
305
+ $h .= "</div>";
306
+ $h .= "<div class='rt-image-size-height rt-image-size'>";
307
+ $h .= "<label>Height</label>";
308
+ $h .= "<input type='number' name='{$this->name}[]' value='{$height}' />";
309
+ $h .= "</div>";
310
+ $h .= "<div class='rt-image-size-crop rt-image-size'>";
311
+ $h .= "<label>Crop</label>";
312
+ $h .= "<select name='{$this->name}[]' class='rt-select2'>";
313
+ $cropList = Options::imageCropType();
314
+ foreach ( $cropList as $crop => $cropLabel ) {
315
+ $cSl = ( $crop == $cropV ? "selected" : null );
316
+ $h .= "<option value='{$crop}' {$cSl}>{$cropLabel}</option>";
317
+ }
318
+ $h .= "</select>";
319
+ $h .= "</div>";
320
+ $h .= "</div>";
321
+
322
+ return $h;
323
+ }
324
+
325
+ private function checkbox() {
326
+ $holderClass = explode(' ', $this->holderClass);
327
+ $this->alignment .= (in_array('pro-field', $holderClass)) && !rtTPG()->hasPro() ? ' disabled' : '';
328
+ $h = null;
329
+ if ( $this->multiple ) {
330
+ $this->name = $this->name . "[]";
331
+ $this->value = ( is_array( $this->value ) && ! empty( $this->value ) ? $this->value : array() );
332
+ }
333
+ if ( $this->multiple ) {
334
+ $h .= "<div class='checkbox-group {$this->alignment}' id='{$this->id}'>";
335
+ if ( is_array( $this->options ) && ! empty( $this->options ) ) {
336
+ foreach ( $this->options as $key => $value ) {
337
+ $checked = ( in_array( $key, $this->value ) ? "checked" : null );
338
+
339
+ $h .= "<label for='{$this->id}-{$key}'>
340
+ <input type='checkbox' id='{$this->id}-{$key}' {$checked} name='{$this->name}' value='{$key}'>{$value}
341
+ </label>";
342
+ }
343
+ }
344
+ $h .= "</div>";
345
+ } else {
346
+ $checked = ( $this->value ? "checked" : null );
347
+ $h .= "<label><input type='checkbox' {$checked} id='{$this->id}' name='{$this->name}' value='1' />{$this->option}</label>";
348
+ }
349
+
350
+ return $h;
351
+ }
352
+
353
+ private function switchField() {
354
+ $h = null;
355
+ $checked = $this->value ? "checked" : null;
356
+ $h .= "<label class='rttm-switch'><input type='checkbox' {$checked} id='{$this->id}' name='{$this->name}' value='1' /><span class='rttm-switch-slider round'></span></label>";
357
+
358
+ return $h;
359
+ }
360
+
361
+ private function checkboxFilter() {
362
+
363
+ global $post;
364
+
365
+ $pt = get_post_meta($post->ID, 'tpg_post_type', true);
366
+ $advFilters = Options::rtTPAdvanceFilters();
367
+
368
+ $holderClass = explode(' ', $this->holderClass);
369
+
370
+ $h = null;
371
+ if ( $this->multiple ) {
372
+ $this->name = $this->name . "[]";
373
+ $this->value = ( is_array( $this->value ) && ! empty( $this->value ) ? $this->value : array() );
374
+ }
375
+ if ( $this->multiple ) {
376
+ $h .= "<div class='checkbox-group {$this->alignment}' id='{$this->id}'>";
377
+ if ( is_array( $this->options ) && ! empty( $this->options ) ) {
378
+ foreach ( $this->options as $key => $value ) {
379
+ $checked = ( in_array( $key, $this->value ) ? "checked" : null );
380
+
381
+ $h .= '<div class="checkbox-filter-field">';
382
+
383
+ $h .= "<label for='{$this->id}-{$key}'>
384
+ <input type='checkbox' id='{$this->id}-{$key}' {$checked} name='{$this->name}' value='{$key}'>{$value}
385
+ </label>";
386
+
387
+ //foreach($advFilters['post_filter']['options'] as $key => $filter){
388
+
389
+ if($key == 'tpg_taxonomy'){
390
+ $h .= "<div class='rt-tpg-filter taxonomy tpg_taxonomy tpg-hidden'>";
391
+
392
+ if(isset($pt) && $pt){
393
+ $taxonomies = Fns::rt_get_all_taxonomy_by_post_type($pt);
394
+ $taxA = get_post_meta($post->ID, 'tpg_taxonomy');
395
+ $post_filter = get_post_meta($post->ID, 'post_filter');
396
+
397
+ $h .= "<div class='taxonomy-field'>";
398
+ if(is_array($post_filter) && !empty($post_filter) && in_array('tpg_taxonomy', $post_filter) && !empty($taxonomies)) {
399
+ $h .= Fns::rtFieldGenerator(
400
+ array(
401
+ 'tpg_taxonomy' => array(
402
+ 'type' => 'checkbox',
403
+ 'label' => '',
404
+ 'id' => 'post-taxonomy',
405
+ "multiple" => true,
406
+ 'options' => $taxonomies
407
+ )
408
+ )
409
+ );
410
+ }else{
411
+ $h .= '<div class="field-holder">No Taxonomy found</div>';
412
+ }
413
+ $h .= "</div>";
414
+ $h .= "<div class='rt-tpg-filter-item term-filter-item tpg-hidden'>";
415
+ $h .= '<div class="field-holder">';
416
+ $h .= '<div class="field-label">Terms</div>';
417
+ $h .= '<div class="field term-filter-holder">';
418
+ if(is_array($taxA) && !empty($taxA)){
419
+ foreach($taxA as $tax){
420
+
421
+ $h .="<div class='term-filter-item-container {$tax}'>";
422
+ $h .= Fns::rtFieldGenerator(
423
+ array(
424
+ 'term_'.$tax => array(
425
+ 'type' => 'select',
426
+ 'label' => ucfirst(str_replace('_', ' ', $tax)),
427
+ 'class' => 'rt-select2 full',
428
+ 'holderClass' => "term-filter-item {$tax}",
429
+ 'value' => get_post_meta($post->ID, 'term_'.$tax),
430
+ "multiple" => true,
431
+ 'options' => Fns::rt_get_all_term_by_taxonomy($tax)
432
+ )
433
+ )
434
+ );
435
+ $h .= Fns::rtFieldGenerator(
436
+ array(
437
+ 'term_operator_'.$tax => array(
438
+ 'type' => 'select',
439
+ 'label' => 'Operator',
440
+ 'class' => 'rt-select2 full',
441
+ 'holderClass' => "term-filter-item-operator {$tax}",
442
+ 'value' => get_post_meta($post->ID, 'term_operator_'.$tax, true),
443
+ 'options' => Options::rtTermOperators()
444
+ )
445
+ )
446
+ );
447
+ $h .= "</div>";
448
+ }
449
+ }
450
+ $h .= "</div>";
451
+ $h .= "</div>";
452
+
453
+ $h .= Fns::rtFieldGenerator(
454
+ array(
455
+ 'taxonomy_relation' => array(
456
+ 'type' => 'select',
457
+ 'label' => 'Relation',
458
+ 'class' => 'rt-select2',
459
+ 'holderClass' => "term-filter-item-relation ". (count($taxA) > 1 ? null : "hidden"),
460
+ 'value' => get_post_meta($post->ID, 'taxonomy_relation', true),
461
+ 'options' => Options::rtTermRelations()
462
+ )
463
+ )
464
+ );
465
+
466
+ $h .= "</div>";
467
+ }else{
468
+
469
+ $h .= "<div class='taxonomy-field'>";
470
+ $h .= "</div>";
471
+ $h .= "<div class='rt-tpg-filter-item'>";
472
+ $h .= '<div class="field-holder">';
473
+ $h .= '<div class="field-label">Terms</div>';
474
+ $h .= '<div class="field term-filter-holder">';
475
+ $h .= "</div>";
476
+ $h .= "</div>";
477
+ $h .= "</div>";
478
+ $h .= Fns::rtFieldGenerator(
479
+ array(
480
+ 'taxonomy_relation' => array(
481
+ 'type' => 'select',
482
+ 'label' => 'Relation',
483
+ 'class' => 'rt-select2',
484
+ 'holderClass' => "term-filter-item-relation tpg-hidden",
485
+ 'default' => 'OR',
486
+ 'options' => Options::rtTermRelations()
487
+ )
488
+ )
489
+ );
490
+ }
491
+ $h .= "</div>";
492
+ } else if($key == 'order') {
493
+ $h .= "<div class='rt-tpg-filter {$key} tpg-hidden'>";
494
+ $h .= "<div class='rt-tpg-filter-item'>";
495
+ $h .="<div class='field-holder'>";
496
+ $h .="<div class='field'>";
497
+ $h .= Fns::rtFieldGenerator(
498
+ array(
499
+ 'order_by' => array(
500
+ 'type' => 'select',
501
+ 'label' => 'Order by',
502
+ 'class' => 'rt-select2 filter-item',
503
+ 'value' => get_post_meta($post->ID, 'order_by', true),
504
+ 'options' => Options::rtPostOrderBy(false, true),
505
+ 'description' => __('If "Meta value", "Meta value Number" or "Meta value datetime" is chosen then meta key is required.', 'the-post-grid')
506
+ )
507
+ )
508
+ );
509
+ $h .= Fns::rtFieldGenerator(
510
+ array(
511
+ 'tpg_meta_key' => array(
512
+ 'type' => 'text',
513
+ 'label' => 'Meta key',
514
+ 'class' => 'rt-select2 filter-item',
515
+ 'holderClass' => 'tpg-hidden',
516
+ 'value' => get_post_meta($post->ID, 'tpg_meta_key', true)
517
+ )
518
+ )
519
+ );
520
+ $h .= Fns::rtFieldGenerator(
521
+ array(
522
+ 'order' => array(
523
+ 'type' => 'radio',
524
+ 'label' => 'Order',
525
+ 'class' => 'rt-select2 filter-item',
526
+ 'alignment' => 'vertical',
527
+ 'default' => 'DESC',
528
+ 'value' => get_post_meta($post->ID, 'order', true),
529
+ 'options' => Options::rtPostOrders()
530
+ )
531
+ )
532
+ );
533
+ $h .="</div>";
534
+ $h .="</div>";
535
+ $h .= "</div>";
536
+ $h .= "</div>";
537
+ } else if($key == 'author') {
538
+ $h .= "<div class='rt-tpg-filter {$key} tpg-hidden'>";
539
+ $h .= "<div class='rt-tpg-filter-item'>";
540
+ $h .= Fns::rtFieldGenerator(
541
+ array(
542
+ $key => array(
543
+ 'type' => 'select',
544
+ 'label' => '',
545
+ 'class' => 'rt-select2 filter-item full',
546
+ 'value' => get_post_meta($post->ID, $key),
547
+ "multiple" => true,
548
+ 'options' => Fns::rt_get_users()
549
+ )
550
+ )
551
+ );
552
+ $h .= "</div>";
553
+ $h .= "</div>";
554
+ } else if($key == 'tpg_post_status'){
555
+ $h .= "<div class='rt-tpg-filter {$key} tpg-hidden'>";
556
+ $h .= "<div class='rt-tpg-filter-item'>";
557
+ $h .= Fns::rtFieldGenerator(
558
+ array(
559
+ $key => array(
560
+ 'type' => 'select',
561
+ 'label' => '',
562
+ 'class' => 'rt-select2 filter-item full',
563
+ 'default' => array('publish'),
564
+ 'value' => get_post_meta($post->ID, $key),
565
+ "multiple" => true,
566
+ 'options' => Options::rtTPGPostStatus()
567
+ )
568
+ )
569
+ );
570
+ $h .= "</div>";
571
+ $h .= "</div>";
572
+ } else if($key == 's'){
573
+ $h .= "<div class='rt-tpg-filter {$key} tpg-hidden'>";
574
+ $h .= "<div class='rt-tpg-filter-item'>";
575
+ $h .= Fns::rtFieldGenerator(
576
+ array(
577
+ $key => array(
578
+ 'type' => 'text',
579
+ 'label' => 'Keyword',
580
+ 'class' => 'filter-item full',
581
+ 'value' => get_post_meta($post->ID, $key, true)
582
+ )
583
+ )
584
+ );
585
+ $h .= "</div>";
586
+ $h .= "</div>";
587
+ } else if($key == 'date_range'){
588
+ $range_start = get_post_meta($post->ID, 'date_range_start', true);
589
+ $range_end = get_post_meta($post->ID, 'date_range_end', true);
590
+ $range_value = [
591
+ 'start' => $range_start,
592
+ 'end' => $range_end
593
+ ];
594
+ $h .= "<div class='rt-tpg-filter {$key} tpg-hidden'>";
595
+ $h .= "<div class='rt-tpg-filter-item'>";
596
+ $h .= Fns::rtFieldGenerator(
597
+ array(
598
+ $key=> array(
599
+ 'type' => 'date_range',
600
+ 'label' => '',
601
+ 'class' => 'filter-item full rt-date-range',
602
+ 'value' => $range_value,
603
+ 'description' => "Date format should be 'yyyy-mm-dd'",
604
+ )
605
+ )
606
+ );
607
+ $h .= "</div>";
608
+ $h .= "</div>";
609
+ }
610
+ //}
611
+
612
+ $h .= '</div>';
613
+ }
614
+ }
615
+ $h .= "</div>";
616
+ } else {
617
+ $checked = ( $this->value ? "checked" : null );
618
+ $h .= "<label><input type='checkbox' {$checked} id='{$this->id}' name='{$this->name}' value='1' />{$this->option}</label>";
619
+ }
620
+
621
+ return $h;
622
+ }
623
+
624
+ private function radioField() {
625
+ $holderClass = explode(' ', $this->holderClass);
626
+ $this->alignment .= (in_array('pro-field', $holderClass)) && !rtTPG()->hasPro() ? ' disabled' : '';
627
+ $h = null;
628
+ $h .= "<div class='radio-group {$this->alignment}' id='{$this->id}'>";
629
+ if ( is_array( $this->options ) && ! empty( $this->options ) ) {
630
+ foreach ( $this->options as $key => $value ) {
631
+ $checked = ( $key == $this->value ? "checked" : null );
632
+ /*if(empty($checked)) {
633
+ $checked = ( $key == $this->default ? "checked" : null );
634
+ }*/
635
+ $h .= "<label for='{$this->name}-{$key}'>
636
+ <input type='radio' id='{$this->id}-{$key}' {$checked} name='{$this->name}' value='{$key}'>{$value}
637
+ </label>";
638
+ }
639
+ }
640
+ $h .= "</div>";
641
+
642
+ return $h;
643
+ }
644
+
645
+ /**
646
+ * Radio Image
647
+ *
648
+ * @return String
649
+ */
650
+ private function radioImage() {
651
+ $h = null;
652
+ $id = 'rttpg-' . $this->name;
653
+
654
+ $h .= sprintf("<div class='rttpg-radio-image %s' id='%s'>", esc_attr($this->alignment), esc_attr($id));
655
+ $selected_value = $this->value;
656
+
657
+ if ( is_array($this->options) && !empty($this->options) ) {
658
+ foreach ($this->options as $key => $value) {
659
+ $checked = ( $key == $selected_value ? "checked" : null);
660
+ $title = isset( $value['title'] ) && $value['title'] ? esc_html( $value['title'] ) : '';
661
+ $link = isset( $value['layout_link'] ) && $value['layout_link'] ? $value['layout_link'] : '';
662
+ $linkHtml = empty($link) ? esc_html($title) : '<a href="'.esc_url($link).'" target="_blank">'.esc_html($title).'</a>';
663
+ $layout = isset( $value['layout'] ) ? $value['layout'] : '';
664
+ $taghtml = isset($value['tag']) ? '<div class="rt-tpg-layout-tag"><span>'.$value['tag'].'</span></div>' : '';
665
+ $h .= sprintf('<div class="rt-tpg-radio-layout %7$s"><label data-type="%7$s" class="radio-image %7$s" for="%2$s">
666
+ <input type="radio" id="%2$s" %3$s name="%4$s" value="%2$s">
667
+ <div class="rttpg-radio-image-wrap">
668
+ <img src="%5$s" title="%6$s" alt="%2$s">
669
+ <div class="rttpg-checked"><span class="dashicons dashicons-yes"></span></div>
670
+ %9$s
671
+ </div>
672
+ </label>
673
+ <div class="rttpg-demo-name">%8$s</div>
674
+ </div>',
675
+ '',
676
+ esc_attr( $key ),
677
+ esc_attr($checked),
678
+ esc_attr($this->name),
679
+ esc_url($value['img']),
680
+ esc_attr($title),
681
+ esc_attr($layout),
682
+ $linkHtml,
683
+ $taghtml
684
+ );
685
+ }
686
+ }
687
+ $h .= "</div>";
688
+ return $h;
689
+ }
690
+
691
+ private function dateRange() {
692
+ $h = null;
693
+ $this->name = ( $this->name ? $this->name : "date-range-" . rand( 0, 1000 ) );
694
+ $h .= "<div class='date-range-container' id='{$this->id}'>";
695
+ $h .= "<div class='date-range-content start'><span>" . __( "Start", 'the-post-grid' ) . "</span><input
696
+ type='text'
697
+ class='date-range date-range-start {$this->class}'
698
+ id='{$this->id}-start'
699
+ value='{$this->value['start']}'
700
+ name='{$this->name}_start'
701
+ placeholder='{$this->placeholder}'
702
+ {$this->attr}
703
+ /></div>";
704
+ $h .= "<div class='date-range-content end'><span>" . __( "End", 'the-post-grid' ) . "</span><input
705
+ type='text'
706
+ class='date-range date-range-end {$this->class}'
707
+ id='{$this->id}-end'
708
+ value='{$this->value['end']}'
709
+ name='{$this->name}_end'
710
+ placeholder='{$this->placeholder}'
711
+ {$this->attr}
712
+ /></div>";
713
+ $h .= "</div>";
714
+
715
+ return $h;
716
+ }
717
+
718
+ }
app/Models/ReSizer.php ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Models;
4
+ use WP_Error;
5
+
6
+ /**
7
+ * Image resize Class
8
+ *
9
+ *
10
+ * @package WP_LOGO_SHOWCASE
11
+ * @since 1.0
12
+ * @author RadiusTheme
13
+ */
14
+ class ReSizer {
15
+ /**
16
+ * The singleton instance
17
+ */
18
+ static private $instance = null;
19
+
20
+ /**
21
+ * Should an RtTpgException be thrown on error?
22
+ * If false (default), then the error will just be logged.
23
+ */
24
+ public $throwOnError = false;
25
+
26
+ /**
27
+ * No cloning allowed
28
+ */
29
+ private function __clone() {
30
+ }
31
+
32
+ /**
33
+ * For your custom default usage you may want to initialize an rtTPGReSizer object by yourself and then have own defaults
34
+ */
35
+ static public function getInstance() {
36
+ if ( self::$instance == null ) {
37
+ self::$instance = new self;
38
+ }
39
+
40
+ return self::$instance;
41
+ }
42
+
43
+ /**
44
+ * Run, forest.
45
+ */
46
+ public function process( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false ) {
47
+ try {
48
+ // Validate inputs.
49
+ if ( ! $url ) {
50
+ return new WP_Error( 'broke', __( "$url parameter is required", "the-post-grid" ) );
51
+ }
52
+ if ( ! $width ) {
53
+ return new WP_Error( 'broke', __( "$width parameter is required", "the-post-grid" ) );
54
+ }
55
+ if ( ! $height ) {
56
+ return new WP_Error( 'broke', __( "$height parameter is required", "the-post-grid" ) );
57
+ }
58
+
59
+ // Caipt'n, ready to hook.
60
+ if ( true === $upscale ) {
61
+ add_filter( 'image_resize_dimensions', array( $this, 'aq_upscale' ), 10, 6 );
62
+ }
63
+
64
+ // Define upload path & dir.
65
+ $upload_info = wp_upload_dir();
66
+ $upload_dir = $upload_info['basedir'];
67
+ $upload_url = $upload_info['baseurl'];
68
+
69
+ $http_prefix = "http://";
70
+ $https_prefix = "https://";
71
+ $relative_prefix = "//"; // The protocol-relative URL
72
+
73
+ /* if the $url scheme differs from $upload_url scheme, make them match
74
+ if the schemes differe, images don't show up. */
75
+ if ( ! strncmp( $url, $https_prefix, strlen( $https_prefix ) ) ) { //if url begins with https:// make $upload_url begin with https:// as well
76
+ $upload_url = str_replace( $http_prefix, $https_prefix, $upload_url );
77
+ } elseif ( ! strncmp( $url, $http_prefix, strlen( $http_prefix ) ) ) { //if url begins with http:// make $upload_url begin with http:// as well
78
+ $upload_url = str_replace( $https_prefix, $http_prefix, $upload_url );
79
+ } elseif ( ! strncmp( $url, $relative_prefix, strlen( $relative_prefix ) ) ) { //if url begins with // make $upload_url begin with // as well
80
+ $upload_url = str_replace( array(
81
+ 0 => "$http_prefix",
82
+ 1 => "$https_prefix"
83
+ ), $relative_prefix, $upload_url );
84
+ }
85
+
86
+
87
+ // Check if $img_url is local.
88
+ if ( false === strpos( $url, $upload_url ) ) {
89
+ return new WP_Error( 'broke', __( "Image must be local: $url", "the-post-grid" ) );
90
+ }
91
+
92
+ // Define path of image.
93
+ $rel_path = str_replace( $upload_url, '', $url );
94
+ $img_path = $upload_dir . $rel_path;
95
+
96
+ // Check if img path exists, and is an image indeed.
97
+ if ( ! file_exists( $img_path ) or ! getimagesize( $img_path ) ) {
98
+ return new WP_Error( 'broke', 'Image file does not exist (or is not an image): ' . $img_path );
99
+ // throw new RtTpgException( 'Image file does not exist (or is not an image): ' . $img_path );
100
+ }
101
+
102
+ // Get image info.
103
+ $info = pathinfo( $img_path );
104
+ $ext = $info['extension'];
105
+ list( $orig_w, $orig_h ) = getimagesize( $img_path );
106
+
107
+ // Get image size after cropping.
108
+ $dims = image_resize_dimensions( $orig_w, $orig_h, $width, $height, $crop );
109
+ $dst_w = is_array( $dims ) && isset( $dims[4] ) ? $dims[4] : $orig_w;
110
+ $dst_h = is_array( $dims ) && isset( $dims[5] ) ? $dims[5] : $orig_h;
111
+
112
+ // Return the original image only if it exactly fits the needed measures.
113
+ if ( ! $dims && ( ( ( null === $height && $orig_w == $width ) xor ( null === $width && $orig_h == $height ) ) xor ( $height == $orig_h && $width == $orig_w ) ) ) {
114
+ $img_url = $url;
115
+ $dst_w = $orig_w;
116
+ $dst_h = $orig_h;
117
+ } else {
118
+ // Use this to check if cropped image already exists, so we can return that instead.
119
+ $suffix = "{$dst_w}x{$dst_h}";
120
+ $dst_rel_path = str_replace( '.' . $ext, '', $rel_path );
121
+ $destfilename = "{$upload_dir}{$dst_rel_path}-{$suffix}.{$ext}";
122
+
123
+ if ( ! $dims || ( true == $crop && false == $upscale && ( $dst_w < $width || $dst_h < $height ) ) ) {
124
+ // Can't resize, so return false saying that the action to do could not be processed as planned.
125
+ return new WP_Error( 'broke', 'Image file does not exist (or is not an image): ' . $img_path );
126
+ // throw new RtTpgException( 'Unable to resize image because image_resize_dimensions() failed' );
127
+ } // Else check if cache exists.
128
+ elseif ( file_exists( $destfilename ) && getimagesize( $destfilename ) ) {
129
+ $img_url = "{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}";
130
+ } // Else, we resize the image and return the new resized image url.
131
+ else {
132
+
133
+ $editor = wp_get_image_editor( $img_path );
134
+
135
+ if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) ) {
136
+ return new WP_Error( 'broke', 'Image file does not exist (or is not an image): ' . $img_path );
137
+ // throw new RtTpgException( 'Unable to get WP_Image_Editor: ' .
138
+ // $editor->get_error_message() . ' (is GD or ImageMagick installed?)' );
139
+ }
140
+
141
+ $resized_file = $editor->save();
142
+
143
+ if ( ! is_wp_error( $resized_file ) ) {
144
+ $resized_rel_path = str_replace( $upload_dir, '', $resized_file['path'] );
145
+ $img_url = $upload_url . $resized_rel_path;
146
+ } else {
147
+ return new WP_Error( 'broke', 'Image file does not exist (or is not an image): ' . $img_path );
148
+ // throw new RtTpgException( 'Unable to save resized image file: ' . $editor->get_error_message() );
149
+ }
150
+
151
+ }
152
+ }
153
+
154
+ // Okay, leave the ship.
155
+ if ( true === $upscale ) {
156
+ remove_filter( 'image_resize_dimensions', array( $this, 'aq_upscale' ) );
157
+ }
158
+
159
+ // Return the output.
160
+ if ( $single ) {
161
+ // str return.
162
+ $image = $img_url;
163
+ } else {
164
+ // array return.
165
+ $image = array(
166
+ 0 => $img_url,
167
+ 1 => $dst_w,
168
+ 2 => $dst_h
169
+ );
170
+ }
171
+
172
+ return $image;
173
+ } catch ( RtTpgException $ex ) {
174
+ error_log( 'rtTPGReSizer.process() error: ' . $ex->getMessage() );
175
+
176
+ if ( $this->throwOnError ) {
177
+ // Bubble up exception.
178
+ throw $ex;
179
+ } else {
180
+ // Return false, so that this patch is backwards-compatible.
181
+ return false;
182
+ }
183
+ }
184
+ }
185
+
186
+ /**
187
+ * Callback to overwrite WP computing of thumbnail measures
188
+ */
189
+ function aq_upscale( $default, $orig_w, $orig_h, $dest_w, $dest_h, $crop ) {
190
+ if ( ! $crop ) {
191
+ return null;
192
+ } // Let the wordpress default function handle this.
193
+
194
+ // Here is the point we allow to use larger image size than the original one.
195
+ $aspect_ratio = $orig_w / $orig_h;
196
+ $new_w = $dest_w;
197
+ $new_h = $dest_h;
198
+
199
+ if ( ! $new_w ) {
200
+ $new_w = intval( $new_h * $aspect_ratio );
201
+ }
202
+
203
+ if ( ! $new_h ) {
204
+ $new_h = intval( $new_w / $aspect_ratio );
205
+ }
206
+
207
+ $size_ratio = max( $new_w / $orig_w, $new_h / $orig_h );
208
+
209
+ $crop_w = round( $new_w / $size_ratio );
210
+ $crop_h = round( $new_h / $size_ratio );
211
+
212
+ $s_x = floor( ( $orig_w - $crop_w ) / 2 );
213
+ $s_y = floor( ( $orig_h - $crop_h ) / 2 );
214
+
215
+ return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
216
+ }
217
+ }
218
+
219
+
app/RtTpg.php ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use RT\ThePostGrid\Controllers\Admin\AdminAjaxController;
4
+ use RT\ThePostGrid\Controllers\Admin\MetaController;
5
+ use RT\ThePostGrid\Controllers\Admin\NoticeController;
6
+ use RT\ThePostGrid\Controllers\Admin\PostTypeController;
7
+ use RT\ThePostGrid\Controllers\Admin\SettingsController;
8
+ use RT\ThePostGrid\Controllers\AjaxController;
9
+ use RT\ThePostGrid\Controllers\ElementorController;
10
+ use RT\ThePostGrid\Controllers\GutenBergController;
11
+ use RT\ThePostGrid\Controllers\ScriptController;
12
+ use RT\ThePostGrid\Controllers\ShortcodeController;
13
+ use RT\ThePostGrid\Controllers\Hooks\FilterHooks;
14
+ use RT\ThePostGrid\Controllers\Hooks\ActionHooks;
15
+ use RT\ThePostGrid\Helpers\Install;
16
+ use RT\ThePostGrid\Controllers\Admin\UpgradeController;
17
+
18
+ require_once __DIR__ . './../vendor/autoload.php';
19
+
20
+ if ( ! class_exists( RtTpg::class ) ) {
21
+ final class RtTpg {
22
+
23
+ public $post_type = "rttpg";
24
+ public $options
25
+ = [
26
+ 'settings' => 'rt_the_post_grid_settings',
27
+ 'version' => RT_THE_POST_GRID_VERSION,
28
+ 'installed_version' => 'rt_the_post_grid_current_version',
29
+ 'slug' => RT_THE_POST_GRID_PLUGIN_SLUG,
30
+ ];
31
+ public $defaultSettings
32
+ = [
33
+ 'popup_fields' => [
34
+ 'title',
35
+ 'feature_img',
36
+ 'content',
37
+ 'post_date',
38
+ 'author',
39
+ 'categories',
40
+ 'tags',
41
+ 'social_share',
42
+ ],
43
+ 'social_share_items' => [
44
+ 'facebook',
45
+ 'twitter',
46
+ 'linkedin',
47
+ ],
48
+ ];
49
+
50
+ protected static $_instance;
51
+
52
+ /**
53
+ * Store the singleton object.
54
+ */
55
+ private static $singleton = false;
56
+
57
+ /**
58
+ * Create an inaccessible constructor.
59
+ */
60
+ private function __construct() {
61
+ $this->__init();
62
+ }
63
+
64
+ /**
65
+ * Fetch an instance of the class.
66
+ */
67
+ final public static function getInstance() {
68
+ if ( self::$singleton === false ) {
69
+ self::$singleton = new self();
70
+ }
71
+
72
+ return self::$singleton;
73
+ }
74
+
75
+
76
+ protected function __init() {
77
+ if ( $this->hasPro() && UpgradeController::check_plugin_version() == false ) {
78
+ return;
79
+ }
80
+
81
+ $settings = get_option( $this->options['settings'] );
82
+
83
+
84
+ new PostTypeController();
85
+ new AjaxController();
86
+ new ScriptController();
87
+
88
+ if ( is_admin() ) {
89
+ new AdminAjaxController();
90
+ new NoticeController();
91
+ new MetaController();
92
+ }
93
+
94
+ if ( ! isset( $settings['tpg_block_type'] ) || in_array( $settings['tpg_block_type'], [ 'default', 'shortcode' ] ) ) {
95
+ new ShortcodeController();
96
+ new GutenBergController();
97
+ }
98
+
99
+ FilterHooks::init();
100
+ ActionHooks::init();
101
+
102
+ ( new SettingsController() )->init();
103
+
104
+ if ( ! isset( $settings['tpg_block_type'] ) || in_array( $settings['tpg_block_type'], [ 'default', 'elementor' ] ) ) {
105
+ new ElementorController();
106
+ }
107
+
108
+
109
+ $this->load_hooks();
110
+ }
111
+
112
+ private function load_hooks() {
113
+ register_activation_hook( RT_THE_POST_GRID_PLUGIN_FILE, [ Install::class, 'activate' ] );
114
+ register_deactivation_hook( RT_THE_POST_GRID_PLUGIN_FILE, [ Install::class, 'deactivate' ] );
115
+
116
+ add_action( 'plugins_loaded', [ $this, 'on_plugins_loaded' ], - 1 );
117
+ add_action( 'init', [ &$this, 'init_hooks' ], 0 );
118
+ //add_action( 'init', [ ShortcodeController::class, 'init' ] ); // Init ShortCode.
119
+ add_filter( 'wp_calculate_image_srcset', '__return_false' );
120
+ }
121
+
122
+ public function init_hooks() {
123
+ do_action( 'rttpg_before_init', $this );
124
+
125
+ $this->load_language();
126
+ }
127
+
128
+ public function load_language() {
129
+ do_action( 'rttpg_set_local', null );
130
+ $locale = determine_locale();
131
+ $locale = apply_filters( 'plugin_locale', $locale, 'the-post-grid' );
132
+ unload_textdomain( 'the-post-grid' );
133
+ load_textdomain( 'the-post-grid', WP_LANG_DIR . '/the-post-grid/the-post-grid-' . $locale . '.mo' );
134
+ load_plugin_textdomain( 'the-post-grid', false, plugin_basename( dirname( RT_THE_POST_GRID_PLUGIN_FILE ) ) . '/languages' );
135
+ }
136
+
137
+ public function on_plugins_loaded() {
138
+ do_action( 'rttpg_loaded', $this );
139
+ }
140
+
141
+ /**
142
+ * Get the plugin path.
143
+ *
144
+ * @return string
145
+ */
146
+ public function plugin_path() {
147
+ return untrailingslashit( plugin_dir_path( RT_THE_POST_GRID_PLUGIN_FILE ) );
148
+ }
149
+
150
+ public function plugin_template_path() {
151
+ $plugin_template = $this->plugin_path() . '/templates/';
152
+
153
+ return apply_filters( 'tlp_tpg_template_path', $plugin_template );
154
+ }
155
+
156
+ public function default_template_path() {
157
+ return apply_filters( 'rttpg_default_template_path', untrailingslashit( plugin_dir_path( RT_THE_POST_GRID_PLUGIN_FILE ) ) );
158
+ }
159
+
160
+ public static function nonceText() {
161
+ return "rttpg_nonce_secret";
162
+ }
163
+
164
+ public static function nonceId() {
165
+ return "rttpg_nonce";
166
+ }
167
+
168
+ /**
169
+ * @param $file
170
+ *
171
+ * @return string
172
+ */
173
+ public function get_assets_uri( $file ) {
174
+ $file = ltrim( $file, '/' );
175
+
176
+ return trailingslashit( RT_THE_POST_GRID_PLUGIN_URL . '/assets' ) . $file;
177
+ }
178
+
179
+ /**
180
+ * @param $file
181
+ *
182
+ * @return string
183
+ */
184
+ public function tpg_can_be_rtl( $file ) {
185
+ $file = ltrim( str_replace('.css', '', $file), '/' );
186
+
187
+ if ( is_rtl() ) {
188
+ $file .= '-rtl';
189
+ }
190
+
191
+ return trailingslashit( RT_THE_POST_GRID_PLUGIN_URL . '/assets' ) . $file . '.css';
192
+ }
193
+
194
+ /**
195
+ * Get the template path.
196
+ *
197
+ * @return string
198
+ */
199
+ public function get_template_path() {
200
+ return apply_filters( 'rttpg_template_path', 'the-post-grid/' );
201
+ }
202
+
203
+
204
+ public function hasPro() {
205
+ return class_exists( 'RtTpgPro' ) || class_exists( 'rtTPGP' );
206
+ }
207
+
208
+ }
209
+
210
+ function rtTPG() {
211
+ return rtTPG::getInstance();
212
+ }
213
+
214
+ rtTPG();
215
+ }
216
+
217
+
lib/vendor/RtElementorWidget.php → app/Widgets/ElementorWidget.php RENAMED
@@ -1,6 +1,11 @@
1
  <?php
2
 
3
- class RtElementorWidget extends \Elementor\Widget_Base {
 
 
 
 
 
4
 
5
  public function get_name() {
6
  return 'the-post-grid';
@@ -18,7 +23,7 @@ class RtElementorWidget extends \Elementor\Widget_Base {
18
  return [ 'general' ];
19
  }
20
 
21
- protected function _register_controls() {
22
  $this->start_controls_section(
23
  'content_section',
24
  [
@@ -33,7 +38,7 @@ class RtElementorWidget extends \Elementor\Widget_Base {
33
  'type' => \Elementor\Controls_Manager::SELECT2,
34
  'id' => 'style',
35
  'label' => __( 'Post Grid', 'the-post-grid' ),
36
- 'options' => rtTPG()->getAllTPGShortCodeList()
37
  )
38
  );
39
 
1
  <?php
2
 
3
+ namespace RT\ThePostGrid\Widgets;
4
+
5
+ use Elementor\Widget_Base;
6
+ use RT\ThePostGrid\Helpers\Fns;
7
+
8
+ class ElementorWidget extends Widget_Base {
9
 
10
  public function get_name() {
11
  return 'the-post-grid';
23
  return [ 'general' ];
24
  }
25
 
26
+ protected function register_controls() {
27
  $this->start_controls_section(
28
  'content_section',
29
  [
38
  'type' => \Elementor\Controls_Manager::SELECT2,
39
  'id' => 'style',
40
  'label' => __( 'Post Grid', 'the-post-grid' ),
41
+ 'options' => Fns::getAllTPGShortCodeList()
42
  )
43
  );
44
 
app/Widgets/TPGWidget.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RT\ThePostGrid\Widgets;
4
+
5
+ use RT\ThePostGrid\Helpers\Fns;
6
+ use WP_Widget;
7
+
8
+ /**
9
+ *
10
+ */
11
+ class TPGWidget extends WP_Widget {
12
+
13
+ function __construct() {
14
+
15
+ $widget_ops = [
16
+ 'classname' => 'widget_tpg_post_grid',
17
+ 'description' => __( 'Display the post grid.', 'the-post-grid' )
18
+ ];
19
+ parent::__construct( 'widget_tpg_post_grid', __( 'The Post Grid', 'the-post-grid' ), $widget_ops );
20
+
21
+ }
22
+
23
+ /**
24
+ * display the widgets on the screen.
25
+ */
26
+ function widget( $args, $instance ) {
27
+ extract( $args );
28
+ $id = ( ! empty( $instance['id'] ) ? absint( $instance['id'] ) : null );
29
+
30
+ echo $before_widget;
31
+ if ( ! empty( $instance['title'] ) ) {
32
+ echo $args['before_title'] . apply_filters( 'widget_title',
33
+ ( isset( $instance['title'] ) ? $instance['title'] : "The Post Grid" ) ) . $args['after_title'];
34
+ }
35
+ if ( ! empty( $id ) ) {
36
+ echo do_shortcode( "[the-post-grid id='{$id}' ]" );
37
+ }
38
+ echo $after_widget;
39
+ }
40
+
41
+ function form( $instance ) {
42
+
43
+ $scList = Fns::getAllTPGShortCodeList();
44
+ $defaults = array(
45
+ 'title' => "The Post Grid",
46
+ 'id' => null
47
+ );
48
+ $instance = wp_parse_args( (array) $instance, $defaults ); ?>
49
+
50
+ <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:',
51
+ 'the-post-grid' ); ?></label>
52
+ <input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>"
53
+ name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>"
54
+ style="width:100%;"/></p>
55
+
56
+ <p><label for="<?php echo $this->get_field_id( 'id' ); ?>"><?php _e( 'Select post grid',
57
+ 'the-post-grid' ); ?></label>
58
+ <select id="<?php echo $this->get_field_id( 'id' ); ?>"
59
+ name="<?php echo $this->get_field_name( 'id' ); ?>">
60
+ <option value="">Select one</option>
61
+ <?php
62
+ if ( ! empty( $scList ) ) {
63
+ foreach ( $scList as $scId => $sc ) {
64
+ $selected = ( $scId == $instance['id'] ? "selected" : null );
65
+ echo "<option value='{$scId}' {$selected}>{$sc}</option>";
66
+ }
67
+ }
68
+ ?>
69
+ </select></p>
70
+ <?php
71
+ }
72
+
73
+ public function update( $new_instance, $old_instance ) {
74
+ $instance = array();
75
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
76
+ $instance['id'] = ( ! empty( $new_instance['id'] ) ) ? absint( $new_instance['id'] ) : '';
77
+
78
+ return $instance;
79
+ }
80
+
81
+ }
app/Widgets/elementor/base.php ADDED
@@ -0,0 +1,899 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.0
6
+ */
7
+
8
+
9
+ use Elementor\Widget_Base;
10
+ use RT\ThePostGrid\Helpers\Fns;
11
+ use RT\ThePostGrid\Helpers\Options;
12
+ use RT\ThePostGridPro\Traits\ListingItem;
13
+
14
+ if ( ! defined( 'ABSPATH' ) ) {
15
+ exit;
16
+ } // Exit if accessed directly
17
+
18
+ abstract class Custom_Widget_Base extends Widget_Base {
19
+
20
+ public $tpg_name;
21
+ public $tpg_base;
22
+ public $tpg_category;
23
+ public $tpg_archive_category;
24
+ public $tpg_icon;
25
+ public $tpg_dir;
26
+ public $tpg_pro_dir;
27
+ public $is_post_layout;
28
+ public $pro_label;
29
+ public $get_pro_message;
30
+ public $prefix;
31
+ public $last_post_id;
32
+
33
+ public function __construct( $data = [], $args = null ) {
34
+ $this->tpg_category = RT_THE_POST_GRID_PLUGIN_SLUG . '-elements'; // Category /@dev
35
+ $this->tpg_archive_category = 'tpg-elementor-builder-widgets';
36
+ $this->tpg_icon = 'eicon-gallery-grid tpg-grid-icon';
37
+ $this->tpg_dir = dirname( ( new ReflectionClass( $this ) )->getFileName() );
38
+ $this->tpg_pro_dir = null;
39
+ $this->pro_label = null;
40
+ $this->is_post_layout = null;
41
+ $this->get_pro_message = null;
42
+ $this->last_post_id = $this->get_last_post_id();
43
+
44
+
45
+ if ( ! rtTPG()->hasPro() ) {
46
+ $this->pro_label = __( '<span class="tpg-pro-label">Pro</span>', 'the-post-grid' );
47
+ $this->is_post_layout = ' the-post-grid-pro-needed';
48
+ $this->get_pro_message = __( 'Please <a target="_blank" href="//www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/">upgrade</a> to pro for more options',
49
+ 'the-post-grid' );
50
+ }
51
+
52
+ parent::__construct( $data, $args );
53
+ }
54
+
55
+ public function get_pro_message( $message = 'more options.' ) {
56
+ if ( rtTPG()->hasPro() ) {
57
+ return;
58
+ }
59
+
60
+ return __( 'Please <a target="_blank" href="//www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/">upgrade</a> to pro for ' . $message, 'the-post-grid' );
61
+ }
62
+
63
+ public function get_name() {
64
+ return $this->tpg_base;
65
+ }
66
+
67
+ public function get_title() {
68
+ return $this->tpg_name;
69
+ }
70
+
71
+ public function get_icon() {
72
+ return $this->tpg_icon;
73
+ }
74
+
75
+ public function get_categories() {
76
+ return [ $this->tpg_category ];
77
+ }
78
+
79
+
80
+ public function tpg_template( $data ) {
81
+ $layout = str_replace( '-2', '', $data['layout'] );
82
+ $template_name = '/the-post-grid/elementor/' . $layout . '.php';
83
+ if ( file_exists( STYLESHEETPATH . $template_name ) ) {
84
+ $file = STYLESHEETPATH . $template_name;
85
+ } elseif ( file_exists( TEMPLATEPATH . $template_name ) ) {
86
+ $file = TEMPLATEPATH . $template_name;
87
+ } else {
88
+ $file = RT_THE_POST_GRID_PLUGIN_PATH . '/templates/elementor/' . $layout . '.php';
89
+ if ( ! file_exists( $file ) ) {
90
+ if ( rtTPG()->hasPro() ) {
91
+ $file = RT_THE_POST_GRID_PRO_PLUGIN_PATH . '/templates/elementor/' . $layout . '.php';
92
+ } else {
93
+ $layout = substr( $layout, 0, - 1 );
94
+ $layout = strpos( $layout, '1' ) ? str_replace( '1', '', $layout ) : $layout;
95
+ $file = RT_THE_POST_GRID_PLUGIN_PATH . '/templates/elementor/' . $layout . '1.php';
96
+ }
97
+ }
98
+ }
99
+
100
+
101
+ ob_start();
102
+ include $file;
103
+ echo ob_get_clean();
104
+ }
105
+
106
+
107
+ public function tpg_template_path( $data ) {
108
+ $layout = str_replace( '-2', '', $data['layout'] );
109
+ $template_name = '/the-post-grid/elementor/' . $layout . '.php';
110
+ $path = RT_THE_POST_GRID_PLUGIN_PATH . '/templates/elementor/';
111
+ if ( file_exists( STYLESHEETPATH . $template_name ) ) {
112
+ $path = STYLESHEETPATH . '/the-post-grid/elementor/';
113
+ } elseif ( file_exists( TEMPLATEPATH . $template_name ) ) {
114
+ $path = TEMPLATEPATH . '/the-post-grid/elementor/';
115
+ } else {
116
+ $template_path = RT_THE_POST_GRID_PLUGIN_PATH . '/templates/elementor/' . $layout . '.php';
117
+
118
+ if ( ! file_exists( $template_path ) && rtTPG()->hasPro() ) {
119
+ $path = RT_THE_POST_GRID_PRO_PLUGIN_PATH . '/templates/elementor/';
120
+ }
121
+ }
122
+
123
+ return $path;
124
+ }
125
+
126
+
127
+ /**
128
+ *
129
+ * Get last post id
130
+ *
131
+ * @param string $post_type
132
+ * @param false $all_content
133
+ *
134
+ * @return int
135
+ */
136
+
137
+ public function get_last_post_id( $post_type = 'post' ): int {
138
+ if ( is_singular( $post_type ) ) {
139
+ return get_the_ID();
140
+ }
141
+
142
+ global $wpdb;
143
+ $cache_key = 'tpg_last_post_id';
144
+ $_post_id = get_transient( $cache_key );
145
+
146
+ if ( false === $_post_id || 'publish' !== get_post_status( $_post_id ) ) {
147
+ delete_transient( $cache_key );
148
+ $_post_id = $wpdb->get_var(
149
+ $wpdb->prepare( "SELECT MAX(ID) FROM {$wpdb->prefix}posts WHERE post_type = %s AND post_status = %s", $post_type, 'publish' )
150
+ );
151
+ set_transient( $cache_key, $_post_id, 12 * HOUR_IN_SECONDS );
152
+ }
153
+
154
+ return absint( $_post_id );
155
+ }
156
+
157
+
158
+ /**
159
+ * Get Last Category ID
160
+ *
161
+ * @return mixed
162
+ */
163
+ public function get_last_category_id() {
164
+ if ( is_archive() ) {
165
+ return;
166
+ }
167
+ $categories = get_terms( [
168
+ 'taxonomy' => 'category',
169
+ 'hide_empty' => false,
170
+ 'number' => 1,
171
+ ] );
172
+ if ( ! empty( $categories ) && ! is_wp_error( $categories ) ) {
173
+ return $categories[0]->term_id;
174
+ }
175
+ }
176
+
177
+ //post category list
178
+ function tpg_category_list() {
179
+ $categories = get_categories( [ 'hide_empty' => false ] );
180
+ $lists = [];
181
+ foreach ( $categories as $category ) {
182
+ $lists[ $category->cat_ID ] = $category->name;
183
+ }
184
+
185
+ return $lists;
186
+ }
187
+
188
+ // post tags lists
189
+ function tpg_tag_list() {
190
+ $tags = get_tags( [ 'hide_empty' => false ] );
191
+ $tag_list = [];
192
+ foreach ( $tags as $tag ) {
193
+ $tag_list[ $tag->slug ] = $tag->name;
194
+ }
195
+
196
+ return $tag_list;
197
+ }
198
+
199
+ //Get Custom post category:
200
+ protected function tpg_get_categories_by_slug( $cat ) {
201
+ $terms = get_terms( [
202
+ 'taxonomy' => $cat,
203
+ 'hide_empty' => true,
204
+ ] );
205
+ $options = [ '0' => __( 'All Categories', 'the-post-grid' ) ];
206
+ if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
207
+ foreach ( $terms as $term ) {
208
+ $options[ $term->slug ] = $term->name;
209
+ }
210
+
211
+ return $options;
212
+ }
213
+ }
214
+
215
+ //Get Custom post category:
216
+ public function tpg_get_categories_by_id( $cat ) {
217
+ $terms = get_terms( [
218
+ 'taxonomy' => $cat,
219
+ 'hide_empty' => true,
220
+ ] );
221
+
222
+ $options = [];
223
+ if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
224
+ foreach ( $terms as $term ) {
225
+ $options[ $term->term_id ] = $term->name;
226
+ }
227
+
228
+ return $options;
229
+ }
230
+ }
231
+
232
+
233
+ public function get_all_post_type() {
234
+ $post_types = get_post_types( [], 'objects' );
235
+ $pt_list = [];
236
+ foreach ( $post_types as $type ) {
237
+ if ( isset( $type->rewrite->slug ) ) {
238
+ $pt_list[ $type->rewrite->slug ] = $type->rewrite->name;
239
+ }
240
+ }
241
+
242
+ return $pt_list;
243
+ }
244
+
245
+ public static function get_post_types() {
246
+ $post_types = get_post_types( [ 'public' => true, 'show_in_nav_menus' => true ], 'objects' );
247
+ $post_types = wp_list_pluck( $post_types, 'label', 'name' );
248
+
249
+ return array_diff_key( $post_types, [ 'elementor_library', 'attachment' ] );
250
+ }
251
+
252
+ /**
253
+ * Get Excluded Taxonomy
254
+ *
255
+ * @return string[]
256
+ */
257
+ public static function get_excluded_taxonomy() {
258
+ return [
259
+ 'post_format',
260
+ 'nav_menu',
261
+ 'link_category',
262
+ 'wp_theme',
263
+ 'elementor_library_type',
264
+ 'elementor_library_type',
265
+ 'elementor_library_category',
266
+ 'product_visibility',
267
+ 'product_shipping_class',
268
+ ];
269
+ }
270
+
271
+ /**
272
+ * Get Filter markup
273
+ *
274
+ * @param $data
275
+ *
276
+ * @return string
277
+ */
278
+ public function get_frontend_filter_markup( $data ) {
279
+ if ( ! rtTPG()->hasPro()
280
+ || ! ( $data['show_taxonomy_filter'] == 'show' || $data['show_author_filter'] == 'show' || $data['show_order_by'] == 'show'
281
+ || $data['show_sort_order'] == 'show'
282
+ || $data['show_search'] == 'show' )
283
+ ) {
284
+ return;
285
+ }
286
+
287
+ $html = null;
288
+ $wrapperContainer = $wrapperClass = $itemClass = $filter_btn_item_per_page = '';
289
+
290
+ if ( 'carousel' === $data['filter_btn_style'] ) {
291
+ $wrapperContainer = 'swiper';
292
+ $wrapperClass = 'swiper-wrapper';
293
+ $itemClass = 'swiper-slide';
294
+ $filter_btn_mobile = isset( $data['filter_btn_item_per_page_mobile'] ) ? $data['filter_btn_item_per_page_mobile'] : 'auto';
295
+ $filter_btn_tablet = isset( $data['filter_btn_item_per_page_tablet'] ) ? $data['filter_btn_item_per_page_tablet'] : 'auto';
296
+ $filter_btn_item_per_page
297
+ = "data-per-page = '{$data['filter_btn_item_per_page']}' data-per-page-mobile = '{$filter_btn_mobile}' data-per-tablet = '{$filter_btn_tablet}'";
298
+ }
299
+
300
+ $html .= "<div class='rt-layout-filter-container rt-clear'><div class='rt-filter-wrap'>";
301
+
302
+ if ( 'show' == $data['show_author_filter'] || 'show' == $data['show_taxonomy_filter'] ) {
303
+ $html .= "<div class='filter-left-wrapper {$wrapperContainer}' {$filter_btn_item_per_page}>";
304
+ }
305
+ // if($data['filter_btn_style'] == 'carousel') {
306
+ // $html .= "<div class='swiper-pagination'></div>";
307
+ // }
308
+ $selectedSubTermsForButton = null;
309
+
310
+ $filterType = $data['filter_type'];
311
+ $post_count = ( 'yes' == $data['filter_post_count'] ) ? true : false;
312
+
313
+
314
+ if ( 'show' == $data['show_taxonomy_filter'] ) {
315
+ $postCountClass = ( $post_count ? " has-post-count" : null );
316
+ $allSelect = " selected";
317
+ $isTermSelected = false;
318
+
319
+ $taxFilterOperator = $data['relation'];
320
+
321
+ $section_term_key = $data['post_type'] . '_filter_taxonomy';
322
+ $taxFilter = $data[ $section_term_key ];
323
+
324
+ $taxonomy_label = '';
325
+ if ( $taxFilter ) {
326
+ $taxonomy_details = get_taxonomy( $taxFilter );
327
+ $taxonomy_label = $taxonomy_details->label;
328
+ }
329
+
330
+
331
+ $default_term_key = $taxFilter . '_default_terms';
332
+ $default_term = $data[ $default_term_key ];
333
+
334
+ $allText = $data['tax_filter_all_text'] ? $data['tax_filter_all_text'] : __( "All ", "the-post-grid" ) . $taxonomy_label;
335
+
336
+
337
+ $_taxonomies = get_object_taxonomies( $data['post_type'], 'objects' );
338
+ $terms = [];
339
+ foreach ( $_taxonomies as $index => $object ) {
340
+ if ( $object->name != $taxFilter ) {
341
+ continue;
342
+ }
343
+ $setting_key = $object->name . '_ids';
344
+ if ( ! empty( $data[ $setting_key ] ) ) {
345
+ $terms = $data[ $setting_key ];
346
+ } else {
347
+ $terms = get_terms( [
348
+ 'taxonomy' => $taxFilter,
349
+ 'fields' => 'ids',
350
+ ] );
351
+ }
352
+ }
353
+ $taxFilterTerms = $terms;
354
+
355
+
356
+ if ( $default_term && $taxFilter ) {
357
+ $isTermSelected = true;
358
+ $allSelect = null;
359
+ }
360
+ if ( $filterType == 'dropdown' ) {
361
+ $html .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-dropdown-wrap parent-dropdown-wrap{$postCountClass}' data-taxonomy='{$taxFilter}' data-filter='taxonomy'>";
362
+ $termDefaultText = $allText;
363
+ $dataTerm = 'all';
364
+ $htmlButton = "";
365
+ $selectedSubTerms = null;
366
+ $pCount = 0;
367
+
368
+
369
+ if ( ! empty( $terms ) ) {
370
+ $i = 0;
371
+ foreach ( $terms as $term_id ) {
372
+ $term = get_term( $term_id, $taxFilter, ARRAY_A );
373
+ $id = $term['term_id'];
374
+ $pCount = $pCount + $term['count'];
375
+ $sT = null;
376
+ if ( $data['tgp_filter_taxonomy_hierarchical'] == 'yes' ) {
377
+ $subTerms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true, $id );
378
+ if ( ! empty( $subTerms ) ) {
379
+ $count = 0;
380
+ $item = $allCount = null;
381
+ foreach ( $subTerms as $stId => $t ) {
382
+ $count = $count + absint( $t['count'] );
383
+ $sTPostCount = ( $post_count ? " (<span class='rt-post-count'>{$t['count']}</span>)" : null );
384
+ $item .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$stId}'><span class='rt-text'>{$t['name']}{$sTPostCount}</span></span>";
385
+ }
386
+ if ( $post_count ) {
387
+ $allCount = " (<span class='rt-post-count'>{$count}</span>)";
388
+ }
389
+ $sT .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-dropdown-wrap sub-dropdown-wrap{$postCountClass}'>";
390
+ $sT .= "<span class='term-default rt-filter-dropdown-default' data-term='{$id}'>
391
+ <span class='rt-text'>" . $allText . "</span>
392
+ <i class='fa fa-angle-down rt-arrow-angle' aria-hidden='true'></i>
393
+ </span>";
394
+ $sT .= '<span class="term-dropdown rt-filter-dropdown">';
395
+ $sT .= $item;
396
+ $sT .= '</span>';
397
+ $sT .= "</div>";
398
+ }
399
+ if ( $default_term === $id ) {
400
+ $selectedSubTerms = $sT;
401
+ }
402
+ }
403
+ $postCount = ( $post_count ? " (<span class='rt-post-count'>{$term['count']}</span>)" : null );
404
+ if ( $default_term && $default_term == $id ) {
405
+ $termDefaultText = $term['name'] . $postCount;
406
+ $dataTerm = $id;
407
+ }
408
+ if ( is_array( $taxFilterTerms ) && ! empty( $taxFilterTerms ) ) {
409
+ if ( in_array( $id, $taxFilterTerms ) ) {
410
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$id}'><span class='rt-text'>{$term['name']}{$postCount}</span>{$sT}</span>";
411
+ }
412
+ } else {
413
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$id}'><span class='rt-text'>{$term['name']}{$postCount}</span>{$sT}</span>";
414
+ }
415
+ $i ++;
416
+ }
417
+ }
418
+ $pAllCount = null;
419
+ if ( $post_count ) {
420
+ $pAllCount = " (<span class='rt-post-count'>{$pCount}</span>)";
421
+ if ( ! $default_term ) {
422
+ $termDefaultText = $termDefaultText;
423
+ }
424
+ }
425
+
426
+ if ( 'yes' == $data['tpg_hide_all_button'] ) {
427
+ $htmlButton = "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='all'><span class='rt-text'>" . $allText . "</span></span>"
428
+ . $htmlButton;
429
+ }
430
+ $htmlButton = sprintf( '<span class="term-dropdown rt-filter-dropdown">%s</span>', $htmlButton );
431
+
432
+ $showAllhtml = '<span class="term-default rt-filter-dropdown-default" data-term="' . $dataTerm . '">
433
+ <span class="rt-text">' . $termDefaultText . '</span>
434
+ <i class="fa fa-angle-down rt-arrow-angle" aria-hidden="true"></i>
435
+ </span>';
436
+
437
+ $html .= $showAllhtml . $htmlButton;
438
+ $html .= '</div>' . $selectedSubTerms;
439
+ } else {
440
+ //if Button the execute
441
+ //$termDefaultText = $allText;
442
+
443
+ $bCount = 0;
444
+ $bItems = null;
445
+ if ( ! empty( $terms ) ) {
446
+ foreach ( $terms as $term_id ) {
447
+ $term = get_term( $term_id, $taxFilter, ARRAY_A );
448
+
449
+ $id = $term['term_id'];
450
+ $bCount = $bCount + absint( $term['count'] );
451
+ $sT = null;
452
+ if ( $data['tgp_filter_taxonomy_hierarchical'] == 'yes' && $data['filter_btn_style'] === 'default' && $data['filter_type'] == 'button' ) {
453
+ $subTerms = Fns::rt_get_all_term_by_taxonomy( $taxFilter, true, $id );
454
+ if ( ! empty( $subTerms ) ) {
455
+ $sT .= "<div class='rt-filter-sub-tax sub-button-group '>";
456
+ foreach ( $subTerms as $stId => $t ) {
457
+ $sTPostCount = ( $post_count ? " (<span class='rt-post-count'>{$t['count']}</span>)" : null );
458
+ $sT .= "<span class='term-button-item rt-filter-button-item ' data-term='{$stId}'>{$t['name']}{$sTPostCount}</span>";
459
+ }
460
+ $sT .= "</div>";
461
+ if ( $default_term === $id ) {
462
+ $selectedSubTermsForButton = $sT;
463
+ }
464
+ }
465
+ }
466
+ $postCount = ( $post_count ? " (<span class='rt-post-count'>{$term['count']}</span>)" : null );
467
+ $termSelected = null;
468
+ if ( $isTermSelected && $id == $default_term ) {
469
+ $termSelected = " selected";
470
+ }
471
+ if ( is_array( $taxFilterTerms ) && ! empty( $taxFilterTerms ) ) {
472
+ if ( in_array( $id, $taxFilterTerms ) ) {
473
+ $bItems .= "<span class='term-button-item rt-filter-button-item {$termSelected} {$itemClass}' data-term='{$id}'>{$term['name']}{$postCount}{$sT}</span>";
474
+ }
475
+ } else {
476
+ $bItems .= "<span class='term-button-item rt-filter-button-item {$termSelected} {$itemClass}' data-term='{$id}'>{$term['name']}{$postCount}{$sT}</span>";
477
+ }
478
+ }
479
+ }
480
+ $html .= "<div class='rt-filter-item-wrap rt-tax-filter rt-filter-button-wrap{$postCountClass} {$wrapperClass}' data-taxonomy='{$taxFilter}' data-filter='taxonomy'>";
481
+
482
+ //$pCountH = ( $post_count ? " (<span class='rt-post-count'>{$bCount}</span>)" : null );
483
+ if ( 'yes' == $data['tpg_hide_all_button'] ) {
484
+ $html .= "<span class='term-button-item rt-filter-button-item {$allSelect} {$itemClass}' data-term='all'>" . $allText . "</span>";
485
+ }
486
+
487
+ $html .= $bItems;
488
+
489
+ $html .= "</div>";
490
+ if ( 'carousel' === $data['filter_btn_style'] ) {
491
+ $html .= '<div class="swiper-navigation"><div class="swiper-button-prev slider-btn"></div><div class="swiper-button-next slider-btn"></div></div>';
492
+ }
493
+ }
494
+ }
495
+
496
+ // TODO: Author filter
497
+ if ( 'show' == $data['show_author_filter'] ) {
498
+ $user_el = $data['author'];
499
+
500
+ $filterAuthors = $user_el;
501
+
502
+ if ( ! empty( $user_el ) ) {
503
+ $users = get_users( apply_filters( 'tpg_author_arg', [ 'include' => $user_el ] ) );
504
+ } else {
505
+ $users = get_users( apply_filters( 'tpg_author_arg', [] ) );
506
+ }
507
+ $allText = $allText = $data['author_filter_all_text'] ? $data['author_filter_all_text'] : __( "All Users", "the-post-grid" );
508
+ $allSelect = " selected";
509
+ //$isTermSelected = false;
510
+ // if ( $default_term && $taxFilter ) {
511
+ $isTermSelected = true;
512
+ // $allSelect = null;
513
+ // }
514
+ if ( $filterType == 'dropdown' ) {
515
+ $html .= "<div class='rt-filter-item-wrap rt-author-filter rt-filter-dropdown-wrap parent-dropdown-wrap{$postCountClass}' data-filter='author'>";
516
+ $termDefaultText = $allText;
517
+ $dataAuthor = 'all';
518
+ $htmlButton = "";
519
+ $htmlButton .= '<span class="author-dropdown rt-filter-dropdown">';
520
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='all'>" . $allText . "</span>";
521
+
522
+ if ( ! empty( $users ) ) {
523
+ foreach ( $users as $user ) {
524
+ $user_post_count = false;
525
+ $post_count ? "(" . count_user_posts( $user->ID, $data['post_type'] ) . ")" : null;
526
+ if ( is_array( $filterAuthors ) && ! empty( $filterAuthors ) ) {
527
+ if ( in_array( $user->ID, $filterAuthors ) ) {
528
+ if ( $default_term == $user->ID ) {
529
+ $termDefaultText = $user->display_name;
530
+ $dataTerm = $user->ID;
531
+ } else {
532
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$user->ID}'>{$user->display_name} <span class='rt-text'>{$user_post_count}</span></span>";
533
+ }
534
+ }
535
+ } else {
536
+ if ( $default_term == $user->ID ) {
537
+ $termDefaultText = $user->display_name;
538
+ $dataTerm = $user->ID;
539
+ } else {
540
+ $htmlButton .= "<span class='term-dropdown-item rt-filter-dropdown-item' data-term='{$user->ID}'><span class='rt-text'>{$user->display_name} {$user_post_count}</span></span>";
541
+ }
542
+ }
543
+ }
544
+ }
545
+
546
+
547
+ $htmlButton .= '</span>';
548
+
549
+ $showAllhtml = '<span class="term-default rt-filter-dropdown-default" data-term="' . $dataAuthor . '">
550
+ <span class="rt-text">' . $termDefaultText . '</span>
551
+ <i class="fa fa-angle-down rt-arrow-angle" aria-hidden="true"></i>
552
+ </span>';
553
+
554
+ $html .= $showAllhtml . $htmlButton;
555
+ $html .= '</div>';
556
+ } else {
557
+ $bCount = 0;
558
+ $bItems = null;
559
+
560
+ if ( ! empty( $users ) ) {
561
+ foreach ( $users as $user ) {
562
+ if ( is_array( $filterAuthors ) && ! empty( $filterAuthors ) ) {
563
+ if ( in_array( $user->ID, $filterAuthors ) ) {
564
+ $bItems .= "<span class='author-button-item rt-filter-button-item' data-term='{$user->ID}'>{$user->display_name}</span>";
565
+ }
566
+ } else {
567
+ $bItems .= "<span class='author-button-item rt-filter-button-item' data-term='{$user->ID}'>{$user->display_name}</span>";
568
+ }
569
+ }
570
+ }
571
+
572
+ $html .= "<div class='rt-filter-item-wrap rt-author-filter rt-filter-button-wrap{$postCountClass}' data-filter='author'>";
573
+ // if ( 'yes' == $data['tax_filter_all_text'] ) {
574
+ //$pCountH = ( $post_count ? " (<span class='rt-post-count'>{$bCount}</span>)" : null );
575
+ $html .= "<span class='author-button-item rt-filter-button-item {$allSelect}' data-author='all'>" . $allText . "</span>";
576
+ // }
577
+ $html .= $bItems;
578
+ $html .= "</div>";
579
+ }
580
+ }
581
+
582
+
583
+ if ( 'show' == $data['show_author_filter'] || 'show' == $data['show_taxonomy_filter'] ) {
584
+ $html .= "</div>";
585
+ }
586
+
587
+
588
+ if ( 'show' == $data['show_order_by'] || 'show' == $data['show_sort_order'] || 'show' == $data['show_search'] ) {
589
+ $html .= "<div class='filter-right-wrapper'>";
590
+ }
591
+
592
+
593
+ // TODO: Order Filter
594
+ if ( 'show' == $data['show_sort_order'] ) {
595
+ $action_order = ( $data['order'] ? strtoupper( $data['order'] ) : "DESC" );
596
+ $html .= '<div class="rt-filter-item-wrap rt-sort-order-action" data-filter="order">';
597
+ $html .= "<span class='rt-sort-order-action-arrow' data-sort-order='{$action_order}'>&nbsp;<span></span></span>";
598
+ $html .= '</div>';
599
+ }
600
+
601
+ //TODO: Orderby Filter
602
+ if ( 'show' == $data['show_order_by'] ) {
603
+ $wooFeature = ( $data['post_type'] == "product" ? true : false );
604
+ $orders = Options::rtPostOrderBy( $wooFeature );
605
+ $action_orderby = ( ! empty( $data['orderby'] ) ? $data['orderby'] : "none" );
606
+ if ( $action_orderby == 'none' ) {
607
+ $action_orderby_label = __( "Sort By", "the-post-grid" );
608
+ } elseif ( in_array( $action_orderby, array_keys( Options::rtMetaKeyType() ) ) ) {
609
+ $action_orderby_label = __( "Meta value", "the-post-grid" );
610
+ } else {
611
+ $action_orderby_label = $orders[ $action_orderby ];
612
+ }
613
+ if ( $action_orderby !== 'none' ) {
614
+ $orders['none'] = __( "Sort By", "the-post-grid" );
615
+ }
616
+ $html .= '<div class="rt-filter-item-wrap rt-order-by-action rt-filter-dropdown-wrap" data-filter="orderby">';
617
+ $html .= "<span class='order-by-default rt-filter-dropdown-default' data-order-by='{$action_orderby}'>
618
+ <span class='rt-text-order-by'>{$action_orderby_label}</span>
619
+ <i class='fa fa-angle-down rt-arrow-angle' aria-hidden='true'></i>
620
+ </span>";
621
+ $html .= '<span class="order-by-dropdown rt-filter-dropdown">';
622
+
623
+ foreach ( $orders as $orderKey => $order ) {
624
+ $html .= '<span class="order-by-dropdown-item rt-filter-dropdown-item" data-order-by="' . $orderKey . '">' . $order . '</span>';
625
+ }
626
+ $html .= '</span>';
627
+ $html .= '</div>';
628
+ }
629
+
630
+ //TODO: Search Filter
631
+ if ( 'show' == $data['show_search'] ) {
632
+ $html .= '<div class="rt-filter-item-wrap rt-search-filter-wrap" data-filter="search">';
633
+ $html .= sprintf( '<input type="text" class="rt-search-input" placeholder="%s">', esc_html__( "Search...", 'the-post-grid' ) );
634
+ $html .= "<span class='rt-action'>&#128269;</span>";
635
+ $html .= "<span class='rt-loading'></span>";
636
+ $html .= '</div>';
637
+ }
638
+
639
+ if ( 'show' == $data['show_order_by'] || 'show' == $data['show_sort_order'] || 'show' == $data['show_search'] ) {
640
+ $html .= "</div>";
641
+ }
642
+
643
+ $html .= "</div>$selectedSubTermsForButton</div>";
644
+
645
+ return $html;
646
+ }
647
+
648
+ /**
649
+ * Get Post Pagination, Load more & Scroll markup
650
+ *
651
+ * @param $query
652
+ * @param $data
653
+ *
654
+ * @return false|string|void
655
+ */
656
+ public function get_pagination_markup( $query, $data ) {
657
+ if ( 'show' !== $data['show_pagination'] ) {
658
+ return;
659
+ }
660
+
661
+ $htmlUtility = null;
662
+
663
+ $posts_loading_type = $data['pagination_type'];
664
+ $posts_per_page = ( isset( $data['display_per_page'] ) && $data['display_per_page'] ) ? $data['display_per_page']
665
+ : ( $data['post_limit'] ? $data['post_limit'] : get_option( 'posts_per_page' ) );
666
+ $hide = ( $query->max_num_pages < 2 ? " rt-hidden-elm" : null );
667
+
668
+ if ( $posts_loading_type == "pagination" ) {
669
+ $htmlUtility .= Fns::rt_pagination( $query, $posts_per_page );
670
+ } elseif ( rtTPG()->hasPro() && $posts_loading_type == "pagination_ajax" ) { //&& ! $isIsotope
671
+ $htmlUtility .= "<div class='rt-page-numbers'></div>";
672
+ } elseif ( rtTPG()->hasPro() && $posts_loading_type == "load_more" ) {
673
+ $htmlUtility .= "<div class='rt-loadmore-btn rt-loadmore-action rt-loadmore-style{$hide}'>
674
+ <span class='rt-loadmore-text'>" . __( 'Load More', 'the-post-grid' ) . "</span>
675
+ <div class='rt-loadmore-loading rt-ball-scale-multiple rt-2x'><div></div><div></div><div></div></div>
676
+ </div>";
677
+ } elseif ( rtTPG()->hasPro() && $posts_loading_type == "load_on_scroll" ) {
678
+ $htmlUtility .= "<div class='rt-infinite-action'>
679
+ <div class='rt-infinite-loading la-fire la-2x'>
680
+ <div></div><div></div><div></div>
681
+ </div>
682
+ </div>";
683
+ }
684
+
685
+
686
+ if ( $htmlUtility ) {
687
+ $html = "<div class='rt-pagination-wrap' data-total-pages='{$query->max_num_pages}' data-posts-per-page='{$posts_per_page}' data-type='{$posts_loading_type}' >"
688
+ . $htmlUtility . "</div>";
689
+
690
+ return $html;
691
+ }
692
+
693
+ return false;
694
+ }
695
+
696
+ /**
697
+ * Get Popup Modal Markup
698
+ */
699
+ function get_modal_markup() {
700
+ $html = null;
701
+ $html .= '<div class="md-modal rt-md-effect" id="rt-modal">
702
+ <div class="md-content">
703
+ <div class="rt-md-content-holder"></div>
704
+ <div class="md-cls-btn">
705
+ <button class="md-close"><i class="fa fa-times" aria-hidden="true"></i></button>
706
+ </div>
707
+ </div>
708
+ </div>';
709
+ $html .= "<div class='md-overlay'></div>";
710
+ echo $html;
711
+ }
712
+
713
+ /**
714
+ * Get Archive page title
715
+ */
716
+ function get_archive_title() {
717
+ $queried_obj = get_queried_object();
718
+ if ( is_tag() || is_category() ) {
719
+ echo esc_html( $queried_obj->name );
720
+ } elseif ( is_author() ) {
721
+ echo esc_html( $queried_obj->display_name );
722
+ } elseif ( is_date() ) {
723
+ $year = get_query_var( 'year' );
724
+ $monthnum = get_query_var( 'monthnum' );
725
+ $day = get_query_var( 'day' );
726
+ $time_string = $year . '/' . $monthnum . '/' . $day;
727
+ $time_stamp = strtotime( $time_string );
728
+ echo date( get_option( 'date_format' ), $time_stamp );
729
+ }
730
+ }
731
+
732
+ /**
733
+ * Get Section Title
734
+ *
735
+ * @param $data
736
+ */
737
+ function get_section_title( $data ) {
738
+ if ( 'show' != $data['show_section_title'] ) {
739
+ return;
740
+ }
741
+
742
+ $_is_link = false;
743
+ if ( ! empty( $data['section_title_link']['url'] ) ) {
744
+ $this->add_link_attributes( 'section_title_link', $data['section_title_link'] );
745
+ $_is_link = true;
746
+ }
747
+
748
+
749
+ $this->add_inline_editing_attributes( 'section_title_text', 'none' );
750
+ ob_start();
751
+ ?>
752
+
753
+ <div class="tpg-widget-heading-wrapper rt-clear heading-<?php echo esc_attr( $data['section_title_style'] ); ?> ">
754
+ <span class="tpg-widget-heading-line line-left"></span>
755
+
756
+ <?php printf( "<%s class='tpg-widget-heading'>", $data['section_title_tag'] ); ?>
757
+
758
+ <?php
759
+ if ( $_is_link ) : ?>
760
+ <a <?php echo $this->get_render_attribute_string( 'section_title_link' ); ?>>
761
+ <?php endif; ?>
762
+
763
+ <?php
764
+ if ( 'page_title' == $data['section_title_source'] ) {
765
+ $archive_prefix = $data['title_prefix'] ? $data['title_prefix'] . ' ' : null;
766
+ $archive_suffix = $data['title_suffix'] ? ' ' . $data['title_suffix'] : null;
767
+ printf( "<span class='prefix-text'>%s</span>", esc_html( $archive_prefix ) );
768
+ if ( is_archive() ) {
769
+ $this->get_archive_title();
770
+ } elseif ( is_search() ) {
771
+ echo get_query_var( 's' );
772
+ } else {
773
+ the_title();
774
+ }
775
+ printf( "<span class='suffix-text'>%s</span>", esc_html( $archive_suffix ) );
776
+ } else {
777
+ ?>
778
+ <span <?php $this->print_render_attribute_string( 'section_title_text' ); ?>>
779
+ <?php $this->print_unescaped_setting( 'section_title_text' ); ?>
780
+ </span>
781
+ <?php
782
+ }
783
+ ?>
784
+
785
+ <?php if ( $_is_link ) : ?>
786
+ </a>
787
+
788
+ <?php endif; ?>
789
+ <?php printf( "</%s>", $data['section_title_tag'] ); ?>
790
+ <span class="tpg-widget-heading-line line-right"></span>
791
+ </div>
792
+
793
+ <?php if ( isset( $data['show_cat_desc'] ) && $data['show_cat_desc'] == 'yes' && category_description( $this->get_last_category_id() ) ) : ?>
794
+ <div class="tpg-category-description">
795
+ <?php echo category_description( $this->get_last_category_id() ); ?>
796
+ </div>
797
+ <?php endif; ?>
798
+
799
+ <?php echo ob_get_clean();
800
+ }
801
+
802
+
803
+ /**
804
+ * Get Post Data for render post
805
+ *
806
+ * @param $data
807
+ * @param $total_pages
808
+ * @param $posts_per_page
809
+ *
810
+ * @return array
811
+ */
812
+ function get_render_data_set( $data, $total_pages, $posts_per_page ) {
813
+ $_prefix = $this->prefix;
814
+
815
+ $data_set = [
816
+ 'block_type' => 'elementor',
817
+ 'prefix' => $_prefix,
818
+ 'gird_column' => $data[ $_prefix . '_column' ],
819
+ 'gird_column_tablet' => isset( $data[ $_prefix . '_column_tablet' ] ) ? $data[ $_prefix . '_column_tablet' ] : '0',
820
+ 'gird_column_mobile' => isset( $data[ $_prefix . '_column_mobile' ] ) ? $data[ $_prefix . '_column_mobile' ] : '0',
821
+ 'layout' => $data[ $_prefix . '_layout' ],
822
+ 'pagination_type' => 'slider' === $_prefix ? 'slider' : $data['pagination_type'],
823
+ 'total_pages' => $total_pages,
824
+ 'posts_per_page' => $posts_per_page,
825
+ 'layout_style' => isset( $data[ $_prefix . '_layout_style' ] ) ? $data[ $_prefix . '_layout_style' ] : '',
826
+ 'show_title' => $data['show_title'],
827
+ 'excerpt_type' => $data['excerpt_type'],
828
+ 'excerpt_limit' => $data['excerpt_limit'],
829
+ 'excerpt_more_text' => $data['excerpt_more_text'],
830
+ 'title_limit' => $data['title_limit'],
831
+ 'title_limit_type' => $data['title_limit_type'],
832
+ 'title_visibility_style' => $data['title_visibility_style'],
833
+ 'post_link_type' => $data['post_link_type'],
834
+ 'link_target' => $data['link_target'],
835
+ 'hover_animation' => isset( $data['hover_animation'] ) ? $data['hover_animation'] : '',
836
+ 'show_thumb' => $data['show_thumb'],
837
+ 'show_meta' => $data['show_meta'],
838
+ 'show_author' => $data['show_author'],
839
+ 'show_author_image' => $data['show_author_image'],
840
+ 'show_meta_icon' => $data['show_meta_icon'],
841
+ 'show_category' => $data['show_category'],
842
+ 'show_date' => $data['show_date'],
843
+ 'show_tags' => $data['show_tags'],
844
+ 'show_comment_count' => $data['show_comment_count'],
845
+ 'show_comment_count_label' => isset( $data['show_comment_count_label'] ) ? $data['show_comment_count_label'] : '',
846
+ 'comment_count_label_singular' => isset( $data['comment_count_label_singular'] ) ? $data['comment_count_label_singular'] : '',
847
+ 'comment_count_label_plural' => isset( $data['comment_count_label_plural'] ) ? $data['comment_count_label_plural'] : '',
848
+ 'show_post_count' => $data['show_post_count'],
849
+ 'post_count_icon' => $data['post_count_icon'],
850
+ 'show_excerpt' => $data['show_excerpt'],
851
+ 'show_read_more' => $data['show_read_more'],
852
+ 'show_btn_icon' => $data['show_btn_icon'],
853
+ 'show_social_share' => $data['show_social_share'],
854
+ 'show_cat_icon' => isset( $data['show_cat_icon'] ) ? $data['show_cat_icon'] : '',
855
+ 'is_thumb_linked' => $data['is_thumb_linked'],
856
+ 'media_source' => $data['media_source'],
857
+ 'no_posts_found_text' => isset( $data['no_posts_found_text'] ) ? $data['no_posts_found_text'] : '',
858
+ 'image_size' => $data['image_size'],
859
+ 'image_offset' => $data['image_offset_size'],
860
+ 'is_default_img' => $data['is_default_img'],
861
+ 'default_image' => $data['default_image'],
862
+ 'thumb_overlay_visibility' => isset( $data['thumb_overlay_visibility'] ) ? $data['thumb_overlay_visibility'] : '',
863
+ 'overlay_type' => isset( $data['overlay_type'] ) ? $data['overlay_type'] : '',
864
+ 'title_tag' => $data['title_tag'],
865
+ 'post_type' => $data['post_type'],
866
+ 'meta_separator' => $data['meta_separator'],
867
+ 'readmore_icon_position' => $data['readmore_icon_position'],
868
+ 'read_more_label' => $data['read_more_label'],
869
+ 'readmore_btn_icon' => $data['readmore_btn_icon'],
870
+ 'category_position' => $data['category_position'],
871
+ 'title_position' => $data['title_position'],
872
+ 'category_style' => $data['category_style'],
873
+ 'is_thumb_lightbox' => $data['is_thumb_lightbox'],
874
+ 'author_prefix' => $data['author_prefix'],
875
+ 'cat_icon' => $data['cat_icon'],
876
+ 'tag_icon' => $data['tag_icon'],
877
+ 'date_icon' => $data['date_icon'],
878
+ 'user_icon' => $data['user_icon'],
879
+ 'meta_ordering' => $data['meta_ordering'],
880
+ 'comment_icon' => $data['comment_icon'],
881
+ 'image_custom_dimension' => ( $data['image_size'] == 'custom' && isset( $data['image_custom_dimension'] ) ) ? $data['image_custom_dimension'] : '',
882
+ 'img_crop_style' => ( $data['image_size'] == 'custom' && isset( $data['img_crop_style'] ) ) ? $data['img_crop_style'] : '',
883
+ 'show_acf' => isset( $data['show_acf'] ) ? $data['show_acf'] : '',
884
+ ];
885
+
886
+ $cf = Fns::is_acf();
887
+ if ( $cf && rtTPG()->hasPro() ) {
888
+ $post_type = $data['post_type'];
889
+ $data_set['cf_group'] = $data[ $post_type . '_cf_group' ];
890
+ $data_set['cf_hide_empty_value'] = $data['cf_hide_empty_value'];
891
+ $data_set['cf_show_only_value'] = $data['cf_show_only_value'];
892
+ $data_set['cf_hide_group_title'] = $data['cf_hide_group_title'];
893
+ }
894
+
895
+ return $data_set;
896
+ }
897
+
898
+
899
+ }
app/Widgets/elementor/rtTPGElementorHelper.php ADDED
@@ -0,0 +1,8040 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ use Elementor\Controls_Manager;
13
+ use RT\ThePostGrid\Helpers\Fns;
14
+ use RT\ThePostGrid\Helpers\Options;
15
+
16
+ require_once( RT_THE_POST_GRID_PLUGIN_PATH . '/app/Widgets/elementor/rtTPGElementorQuery.php' );
17
+
18
+ class rtTPGElementorHelper {
19
+
20
+
21
+ /**
22
+ * Post Query Settings
23
+ *
24
+ * @param $ref
25
+ */
26
+ public static function query( $ref ) {
27
+ $post_types = Fns::get_post_types();
28
+
29
+ $taxonomies = get_taxonomies( [], 'objects' );
30
+
31
+ do_action( 'rt_tpg_el_query_build', $ref );
32
+ $ref->start_controls_section(
33
+ 'rt_post_query',
34
+ [
35
+ 'label' => esc_html__( 'Query Build', 'the-post-grid' ),
36
+ 'tab' => Controls_Manager::TAB_CONTENT,
37
+ ]
38
+ );
39
+
40
+ $ref->add_control(
41
+ 'post_type',
42
+ [
43
+ 'label' => esc_html__( 'Post Source', 'the-post-grid' ),
44
+ 'type' => Controls_Manager::SELECT,
45
+ 'options' => $post_types,
46
+ 'default' => 'post',
47
+ ]
48
+ );
49
+
50
+ //TODO: Common Filter
51
+
52
+ $ref->add_control(
53
+ 'common_filters_heading',
54
+ [
55
+ 'label' => __( 'Common Filters:', 'the-post-grid' ),
56
+ 'type' => \Elementor\Controls_Manager::HEADING,
57
+ 'separator' => 'before',
58
+ 'classes' => 'tpg-control-type-heading',
59
+ ]
60
+ );
61
+
62
+ $ref->add_control(
63
+ 'post_id',
64
+ [
65
+ 'label' => __( 'Include only', 'the-post-grid' ),
66
+ 'type' => \Elementor\Controls_Manager::TEXT,
67
+ 'description' => __( 'Enter the post IDs separated by comma for include', 'the-post-grid' ),
68
+ 'placeholder' => "Eg. 10, 15, 17",
69
+ ]
70
+ );
71
+
72
+ $ref->add_control(
73
+ 'exclude',
74
+ [
75
+ 'label' => __( 'Exclude', 'the-post-grid' ),
76
+ 'type' => \Elementor\Controls_Manager::TEXT,
77
+ 'description' => __( 'Enter the post IDs separated by comma for exclude', 'the-post-grid' ),
78
+ 'placeholder' => "Eg. 12, 13",
79
+ ]
80
+ );
81
+
82
+ $ref->add_control(
83
+ 'post_limit',
84
+ [
85
+ 'label' => __( 'Limit', 'the-post-grid' ),
86
+ 'type' => \Elementor\Controls_Manager::NUMBER,
87
+ 'description' => __( 'The number of posts to show. Enter -1 to show all found posts.', 'the-post-grid' ),
88
+ ]
89
+ );
90
+
91
+ $ref->add_control(
92
+ 'offset',
93
+ [
94
+ 'label' => __( 'Offset', 'the-post-grid' ),
95
+ 'type' => \Elementor\Controls_Manager::TEXT,
96
+ 'placeholder' => __( 'Enter Post offset', 'the-post-grid' ),
97
+ 'description' => __( 'Number of posts to skip. The offset parameter is ignored when post limit => -1 is used.', 'the-post-grid' ),
98
+ ]
99
+ );
100
+
101
+ //TODO: Advance Filter
102
+
103
+ $ref->add_control(
104
+ 'advanced_filters_heading',
105
+ [
106
+ 'label' => __( 'Advanced Filters:', 'the-post-grid' ),
107
+ 'type' => \Elementor\Controls_Manager::HEADING,
108
+ 'separator' => 'before',
109
+ 'classes' => 'tpg-control-type-heading',
110
+ ]
111
+ );
112
+
113
+ foreach ( $taxonomies as $taxonomy => $object ) {
114
+ if ( ! isset( $object->object_type[0] ) || ! in_array( $object->object_type[0], array_keys( $post_types ) )
115
+ || in_array( $taxonomy, Custom_Widget_Base::get_excluded_taxonomy() )
116
+ ) {
117
+ continue;
118
+ }
119
+ $ref->add_control(
120
+ $taxonomy . '_ids',
121
+ [
122
+ 'label' => __( "By ", 'the-post-grid' ) . $object->label,
123
+ 'type' => \Elementor\Controls_Manager::SELECT2,
124
+ 'label_block' => true,
125
+ 'multiple' => true,
126
+ 'options' => $ref->tpg_get_categories_by_id( $taxonomy ),
127
+ 'condition' => [
128
+ 'post_type' => $object->object_type,
129
+ ],
130
+ ]
131
+ );
132
+ }
133
+
134
+ $ref->add_control(
135
+ 'author',
136
+ [
137
+ 'label' => __( 'By Author', 'the-post-grid' ),
138
+ 'type' => \Elementor\Controls_Manager::SELECT2,
139
+ 'multiple' => true,
140
+ 'label_block' => true,
141
+ 'options' => Fns::rt_get_users(),
142
+ ]
143
+ );
144
+
145
+ $ref->add_control(
146
+ 'post_keyword',
147
+ [
148
+ 'label' => __( 'By Keyword', 'the-post-grid' ),
149
+ 'type' => \Elementor\Controls_Manager::TEXT,
150
+ 'label_block' => true,
151
+ 'placeholder' => __( 'Search by keyword', 'the-post-grid' ),
152
+ 'description' => __( 'Search by post title or content keyword', 'the-post-grid' ),
153
+ ]
154
+ );
155
+
156
+ $ref->add_control(
157
+ 'relation',
158
+ [
159
+ 'label' => __( 'Taxonomies Relation', 'the-post-grid' ),
160
+ 'type' => \Elementor\Controls_Manager::SELECT,
161
+ 'default' => 'OR',
162
+ 'options' => [
163
+ 'OR' => __( 'OR', 'the-post-grid' ),
164
+ 'AND' => __( 'AND', 'the-post-grid' ),
165
+ 'NOT IN' => __( 'NOT IN', 'the-post-grid' ),
166
+ ],
167
+ ]
168
+ );
169
+
170
+
171
+ $ref->add_control(
172
+ 'date_range',
173
+ [
174
+ 'label' => __( 'Date Range (Start to End)', 'the-post-grid' ) . $ref->pro_label,
175
+ 'type' => \Elementor\Controls_Manager::DATE_TIME,
176
+ 'placeholder' => "Choose date...",
177
+ 'description' => __( "NB: Enter DEL button for delete date range", "the-post-grid" ),
178
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
179
+ 'picker_options' => [
180
+ 'enableTime' => false,
181
+ 'mode' => "range",
182
+ 'dateFormat' => "M j, Y",
183
+ ],
184
+ ]
185
+ );
186
+
187
+
188
+ $orderby_opt = [
189
+ 'date' => __( 'Date', 'the-post-grid' ),
190
+ 'ID' => __( 'Order by post ID', 'the-post-grid' ),
191
+ 'author' => __( 'Author', 'the-post-grid' ),
192
+ 'title' => __( 'Title', 'the-post-grid' ),
193
+ 'modified' => __( 'Last modified date', 'the-post-grid' ),
194
+ 'parent' => __( 'Post parent ID', 'the-post-grid' ),
195
+ 'comment_count' => __( 'Number of comments', 'the-post-grid' ),
196
+ 'menu_order' => __( 'Menu order', 'the-post-grid' ),
197
+
198
+ ];
199
+ if ( rtTPG()->hasPro() ) {
200
+ $prderby_pro_opt = [
201
+ 'rand' => __( 'Random order', 'the-post-grid' ),
202
+ ];
203
+ $orderby_opt = array_merge( $orderby_opt, $prderby_pro_opt );
204
+ }
205
+
206
+ $ref->add_control(
207
+ 'orderby',
208
+ [
209
+ 'label' => __( 'Order by', 'the-post-grid' ),
210
+ 'type' => \Elementor\Controls_Manager::SELECT,
211
+ 'options' => $orderby_opt,
212
+ 'default' => 'date',
213
+ 'description' => $ref->get_pro_message( 'Random Order.' ),
214
+ ]
215
+ );
216
+
217
+ $ref->add_control(
218
+ 'order',
219
+ [
220
+ 'label' => __( 'Sort order', 'the-post-grid' ),
221
+ 'type' => \Elementor\Controls_Manager::SELECT,
222
+ 'options' => [
223
+ 'ASC' => __( 'ASC', 'the-post-grid' ),
224
+ 'DESC' => __( 'DESC', 'the-post-grid' ),
225
+ ],
226
+ 'default' => 'DESC',
227
+ 'condition' => [
228
+ 'orderby!' => 'menu_order',
229
+ ],
230
+ ]
231
+ );
232
+
233
+ $ref->add_control(
234
+ 'post_status',
235
+ [
236
+ 'label' => esc_html__( 'Post Status', 'the-post-grid' ),
237
+ 'type' => Controls_Manager::SELECT,
238
+ 'options' => Options::rtTPGPostStatus(),
239
+ 'default' => 'publish',
240
+ ]
241
+ );
242
+
243
+
244
+ $ref->add_control(
245
+ 'ignore_sticky_posts',
246
+ [
247
+ 'label' => __( 'Ignore sticky posts at the top', 'the-post-grid' ) . $ref->pro_label,
248
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
249
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
250
+ 'label_off' => __( 'No', 'the-post-grid' ),
251
+ 'return_value' => 'yes',
252
+ 'default' => 'no',
253
+ 'disabled' => true,
254
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
255
+ ]
256
+ );
257
+
258
+ $ref->add_control(
259
+ 'no_posts_found_text',
260
+ [
261
+ 'label' => __( 'No post found Text', 'the-post-grid' ),
262
+ 'type' => \Elementor\Controls_Manager::TEXT,
263
+ 'default' => __( 'No posts found.', 'the-post-grid' ),
264
+ 'placeholder' => __( 'Enter No post found', 'the-post-grid' ),
265
+ 'separator' => 'before',
266
+ ]
267
+ );
268
+
269
+
270
+ $ref->end_controls_section();
271
+ }
272
+
273
+
274
+ /**
275
+ * Builder Post Query Settings
276
+ *
277
+ * @param $ref
278
+ */
279
+ public static function query_builder( $ref, $layout_type = '' ) {
280
+ $post_types = Fns::get_post_types();
281
+
282
+ $taxonomies = get_object_taxonomies( 'post', 'object' );
283
+
284
+ do_action( 'rt_tpg_el_query_build', $ref );
285
+ $ref->start_controls_section(
286
+ 'rt_post_query',
287
+ [
288
+ 'label' => esc_html__( 'Query Build', 'the-post-grid' ),
289
+ 'tab' => Controls_Manager::TAB_CONTENT,
290
+ ]
291
+ );
292
+
293
+ $ref->add_control(
294
+ 'post_limit',
295
+ [
296
+ 'label' => __( 'Posts per page', 'the-post-grid' ),
297
+ 'type' => \Elementor\Controls_Manager::NUMBER,
298
+ 'description' => __( 'The number of posts to show. Enter -1 to show all found posts.', 'the-post-grid' ),
299
+ ]
300
+ );
301
+
302
+
303
+ if ( 'single' == $layout_type ) {
304
+ $get_all_taxonomy = [];
305
+ foreach ( $taxonomies as $taxonomy => $object ) {
306
+ if ( ! isset( $object->object_type[0] ) || ! in_array( $object->object_type[0], array_keys( $post_types ) )
307
+ || in_array( $taxonomy, Custom_Widget_Base::get_excluded_taxonomy() )
308
+ ) {
309
+ continue;
310
+ }
311
+ $get_all_taxonomy[ $object->name ] = $object->label;
312
+ }
313
+
314
+ $ref->add_control(
315
+ 'taxonomy_lists',
316
+ [
317
+ 'label' => __( 'Select a Taxonomy for relation', 'the-post-grid' ),
318
+ 'type' => \Elementor\Controls_Manager::SELECT,
319
+ 'default' => 'category',
320
+ 'options' => $get_all_taxonomy,
321
+ ]
322
+ );
323
+
324
+ $orderby_opt = [
325
+ 'date' => __( 'Date', 'the-post-grid' ),
326
+ 'ID' => __( 'Order by post ID', 'the-post-grid' ),
327
+ 'author' => __( 'Author', 'the-post-grid' ),
328
+ 'title' => __( 'Title', 'the-post-grid' ),
329
+ 'modified' => __( 'Last modified date', 'the-post-grid' ),
330
+ 'parent' => __( 'Post parent ID', 'the-post-grid' ),
331
+ 'comment_count' => __( 'Number of comments', 'the-post-grid' ),
332
+ 'menu_order' => __( 'Menu order', 'the-post-grid' ),
333
+ 'rand' => __( 'Random order', 'the-post-grid' ),
334
+
335
+ ];
336
+
337
+ $ref->add_control(
338
+ 'orderby',
339
+ [
340
+ 'label' => __( 'Order by', 'the-post-grid' ),
341
+ 'type' => \Elementor\Controls_Manager::SELECT,
342
+ 'options' => $orderby_opt,
343
+ 'default' => 'date',
344
+ ]
345
+ );
346
+
347
+ $ref->add_control(
348
+ 'order',
349
+ [
350
+ 'label' => __( 'Sort order', 'the-post-grid' ),
351
+ 'type' => \Elementor\Controls_Manager::SELECT,
352
+ 'options' => [
353
+ 'ASC' => __( 'ASC', 'the-post-grid' ),
354
+ 'DESC' => __( 'DESC', 'the-post-grid' ),
355
+ ],
356
+ 'default' => 'DESC',
357
+ 'condition' => [
358
+ 'orderby!' => 'menu_order',
359
+ ],
360
+ ]
361
+ );
362
+ } else {
363
+ $ref->add_control(
364
+ 'post_id',
365
+ [
366
+ 'label' => __( 'Include only', 'the-post-grid' ),
367
+ 'type' => \Elementor\Controls_Manager::TEXT,
368
+ 'description' => __( 'Enter the post IDs separated by comma for include', 'the-post-grid' ),
369
+ 'placeholder' => "Eg. 10, 15, 17",
370
+ ]
371
+ );
372
+
373
+ $ref->add_control(
374
+ 'exclude',
375
+ [
376
+ 'label' => __( 'Exclude', 'the-post-grid' ),
377
+ 'type' => \Elementor\Controls_Manager::TEXT,
378
+ 'description' => __( 'Enter the post IDs separated by comma for exclude', 'the-post-grid' ),
379
+ 'placeholder' => "Eg. 12, 13",
380
+ ]
381
+ );
382
+
383
+ $ref->add_control(
384
+ 'offset',
385
+ [
386
+ 'label' => __( 'Offset', 'the-post-grid' ),
387
+ 'type' => \Elementor\Controls_Manager::TEXT,
388
+ 'placeholder' => __( 'Enter Post offset', 'the-post-grid' ),
389
+ 'description' => __( 'Number of posts to skip. The offset parameter is ignored when post limit => -1 is used.', 'the-post-grid' ),
390
+ ]
391
+ );
392
+ }
393
+ $ref->end_controls_section();
394
+ }
395
+
396
+ /**
397
+ * Grid Layout Settings
398
+ *
399
+ * @param $ref
400
+ */
401
+ public static function grid_layouts( $ref, $layout_type = '' ) {
402
+ $prefix = $ref->prefix;
403
+
404
+ $ref->start_controls_section(
405
+ $prefix . '_layout_settings',
406
+ [
407
+ 'label' => __( 'Layout', 'the-post-grid' ),
408
+ 'tab' => Controls_Manager::TAB_CONTENT,
409
+ ]
410
+ );
411
+
412
+ if ( 'grid' === $prefix ) {
413
+ $layout_class = 'grid-layout';
414
+ $layout_options = [
415
+ $prefix . '-layout1' => [
416
+ 'title' => __( 'Layout 1', 'the-post-grid' ),
417
+ ],
418
+ $prefix . '-layout3' => [
419
+ 'title' => __( 'Layout 2', 'the-post-grid' ),
420
+ ],
421
+ $prefix . '-layout4' => [
422
+ 'title' => __( 'Layout 3', 'the-post-grid' ),
423
+ ],
424
+ $prefix . '-layout2' => [
425
+ 'title' => __( 'Layout 4', 'the-post-grid' ),
426
+ ],
427
+ $prefix . '-layout5' => [
428
+ 'title' => __( 'Layout 5', 'the-post-grid' ),
429
+ ],
430
+ $prefix . '-layout5-2' => [
431
+ 'title' => __( 'Layout 6', 'the-post-grid' ),
432
+ ],
433
+ $prefix . '-layout6' => [
434
+ 'title' => __( 'Layout 7', 'the-post-grid' ),
435
+ ],
436
+ $prefix . '-layout6-2' => [
437
+ 'title' => __( 'Layout 8', 'the-post-grid' ),
438
+ ],
439
+ $prefix . '-layout7' => [
440
+ 'title' => __( 'Gallery', 'the-post-grid' ),
441
+ ],
442
+ ];
443
+ }
444
+
445
+ if ( 'grid_hover' === $prefix ) {
446
+ $layout_class = 'grid-hover-layout';
447
+ $layout_options = [
448
+ $prefix . '-layout1' => [
449
+ 'title' => __( 'Layout 1', 'the-post-grid' ),
450
+ ],
451
+ $prefix . '-layout2' => [
452
+ 'title' => __( 'Layout 2', 'the-post-grid' ),
453
+ ],
454
+ $prefix . '-layout3' => [
455
+ 'title' => __( 'Layout 3', 'the-post-grid' ),
456
+ ],
457
+ $prefix . '-layout4' => [
458
+ 'title' => __( 'Layout 4', 'the-post-grid' ),
459
+ ],
460
+ $prefix . '-layout4-2' => [
461
+ 'title' => __( 'Layout 5', 'the-post-grid' ),
462
+ ],
463
+ $prefix . '-layout5' => [
464
+ 'title' => __( 'Layout 6', 'the-post-grid' ),
465
+ ],
466
+ $prefix . '-layout5-2' => [
467
+ 'title' => __( 'Layout 7', 'the-post-grid' ),
468
+ ],
469
+ $prefix . '-layout6' => [
470
+ 'title' => __( 'Layout 8', 'the-post-grid' ),
471
+ ],
472
+ $prefix . '-layout6-2' => [
473
+ 'title' => __( 'Layout 9', 'the-post-grid' ),
474
+ ],
475
+ $prefix . '-layout7' => [
476
+ 'title' => __( 'Layout 10', 'the-post-grid' ),
477
+ ],
478
+ $prefix . '-layout7-2' => [
479
+ 'title' => __( 'Layout 11', 'the-post-grid' ),
480
+ ],
481
+ $prefix . '-layout8' => [
482
+ 'title' => __( 'Layout 12', 'the-post-grid' ),
483
+ ],
484
+ $prefix . '-layout9' => [
485
+ 'title' => __( 'Layout 13', 'the-post-grid' ),
486
+ ],
487
+ $prefix . '-layout9-2' => [
488
+ 'title' => __( 'Layout 14', 'the-post-grid' ),
489
+ ],
490
+ $prefix . '-layout10' => [
491
+ 'title' => __( 'Layout 15', 'the-post-grid' ),
492
+ ],
493
+ $prefix . '-layout11' => [
494
+ 'title' => __( 'Layout 16', 'the-post-grid' ),
495
+ ],
496
+ ];
497
+ }
498
+
499
+ if ( 'slider' === $prefix ) {
500
+ $layout_class = 'slider-layout';
501
+ $layout_options = [
502
+ $prefix . '-layout1' => [
503
+ 'title' => __( 'Layout 1', 'the-post-grid' ),
504
+ ],
505
+ $prefix . '-layout2' => [
506
+ 'title' => __( 'Layout 2', 'the-post-grid' ),
507
+ ],
508
+ $prefix . '-layout3' => [
509
+ 'title' => __( 'Layout 3', 'the-post-grid' ),
510
+ ],
511
+ $prefix . '-layout4' => [
512
+ 'title' => __( 'Layout 4', 'the-post-grid' ),
513
+ ],
514
+ $prefix . '-layout5' => [
515
+ 'title' => __( 'Layout 5', 'the-post-grid' ),
516
+ ],
517
+ $prefix . '-layout6' => [
518
+ 'title' => __( 'Layout 6', 'the-post-grid' ),
519
+ ],
520
+ $prefix . '-layout7' => [
521
+ 'title' => __( 'Layout 7', 'the-post-grid' ),
522
+ ],
523
+ $prefix . '-layout8' => [
524
+ 'title' => __( 'Layout 8', 'the-post-grid' ),
525
+ ],
526
+ $prefix . '-layout9' => [
527
+ 'title' => __( 'Layout 9', 'the-post-grid' ),
528
+ ],
529
+ $prefix . '-layout10' => [
530
+ 'title' => __( 'Layout 10', 'the-post-grid' ),
531
+ ],
532
+ $prefix . '-layout11' => [
533
+ 'title' => __( 'Layout 11', 'the-post-grid' ),
534
+ ],
535
+ $prefix . '-layout12' => [
536
+ 'title' => __( 'Layout 12', 'the-post-grid' ),
537
+ ],
538
+ $prefix . '-layout13' => [
539
+ 'title' => __( 'Layout 13', 'the-post-grid' ),
540
+ ],
541
+ ];
542
+
543
+ if ( 'single' === $layout_type ) {
544
+ $layout_options = array_slice( $layout_options, 0, 9 );
545
+ }
546
+ }
547
+
548
+ $ref->add_control(
549
+ $prefix . '_layout',
550
+ [
551
+ 'label' => __( 'Choose Layout', 'the-post-grid' ),
552
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
553
+ 'label_block' => true,
554
+ 'options' => $layout_options,
555
+ 'toggle' => false,
556
+ 'default' => $prefix . '-layout1',
557
+ 'style_transfer' => true,
558
+ 'classes' => 'tpg-image-select ' . $layout_class . ' ' . $ref->is_post_layout,
559
+ ]
560
+ );
561
+
562
+ $ref->add_control(
563
+ 'layout_options_heading',
564
+ [
565
+ 'label' => __( 'Layout Options:', 'the-post-grid' ),
566
+ 'type' => \Elementor\Controls_Manager::HEADING,
567
+ 'classes' => 'tpg-control-type-heading',
568
+ ]
569
+ );
570
+
571
+
572
+ $column_options = [
573
+ '0' => __( 'Default from layout', 'the-post-grid' ),
574
+ '12' => __( '1 Columns', 'the-post-grid' ),
575
+ '6' => __( '2 Columns', 'the-post-grid' ),
576
+ '4' => __( '3 Columns', 'the-post-grid' ),
577
+ '3' => __( '4 Columns', 'the-post-grid' ),
578
+ ];
579
+
580
+ if ( 'grid' === $prefix ) {
581
+ $grid_column_condition = [
582
+ 'grid_layout!' => [ 'grid-layout5', 'grid-layout5-2', 'grid-layout6', 'grid-layout6-2' ],
583
+ ];
584
+ }
585
+
586
+ if ( 'grid_hover' === $prefix ) {
587
+ $grid_column_condition = [
588
+ 'grid_hover_layout!' => [ 'grid_hover-layout8' ],
589
+ ];
590
+ }
591
+
592
+ if ( 'slider' === $prefix ) {
593
+ $column_options = [
594
+ '0' => __( 'Default from layout', 'the-post-grid' ),
595
+ '1' => __( '1 Columns', 'the-post-grid' ),
596
+ '2' => __( '2 Columns', 'the-post-grid' ),
597
+ '3' => __( '3 Columns', 'the-post-grid' ),
598
+ '4' => __( '4 Columns', 'the-post-grid' ),
599
+ '5' => __( '5 Columns', 'the-post-grid' ),
600
+ '6' => __( '6 Columns', 'the-post-grid' ),
601
+ ];
602
+ $grid_column_condition = [
603
+ 'slider_layout!' => [ 'slider-layout10', 'slider-layout11', 'slider-layout13' ],
604
+ ];
605
+ }
606
+
607
+ $ref->add_responsive_control(
608
+ $prefix . '_column',
609
+ [
610
+ 'label' => esc_html__( 'Column', 'the-post-grid' ),
611
+ 'type' => Controls_Manager::SELECT,
612
+ 'options' => $column_options,
613
+ 'default' => '0',
614
+ 'tablet_default' => '0',
615
+ 'mobile_default' => '0',
616
+ 'description' => __( 'Choose Column for layout.', 'the-post-grid' ),
617
+ 'condition' => $grid_column_condition,
618
+ ]
619
+ );
620
+
621
+ if ( 'single' === $layout_type ) {
622
+ $ref->add_control(
623
+ 'enable_related_slider',
624
+ [
625
+ 'label' => __( 'Enable Slider', 'the-post-grid' ),
626
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
627
+ 'label_on' => __( 'Show', 'the-post-grid' ),
628
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
629
+ 'return_value' => 'yes',
630
+ 'default' => 'yes',
631
+ ]
632
+ );
633
+
634
+ $ref->add_responsive_control(
635
+ 'slider_gap_2',
636
+ [
637
+ 'label' => __( 'Grid Gap', 'the-post-grid' ),
638
+ 'type' => Controls_Manager::SLIDER,
639
+ 'size_units' => [ 'px' ],
640
+ 'range' => [
641
+ 'px' => [
642
+ 'min' => 0,
643
+ 'max' => 100,
644
+ 'step' => 1,
645
+ ],
646
+ ],
647
+ 'selectors' => [
648
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .rt-slider-item' => 'padding-left: {{SIZE}}{{UNIT}};padding-right: {{SIZE}}{{UNIT}}; padding-bottom: calc({{SIZE}}{{UNIT}} * 2)',
649
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .rt-content-loader' => 'margin-left: -{{SIZE}}{{UNIT}};margin-right: -{{SIZE}}{{UNIT}};',
650
+ ],
651
+ 'condition' => [
652
+ 'enable_related_slider!' => 'yes',
653
+ ],
654
+ ]
655
+ );
656
+ }
657
+
658
+ $ref->add_responsive_control(
659
+ $prefix . '_offset_col_width',
660
+ [
661
+ 'label' => __( 'Offset Column Width', 'the-post-grid' ),
662
+ 'type' => Controls_Manager::SLIDER,
663
+ 'size_units' => [ '%' ],
664
+ 'range' => [
665
+ 'px' => [
666
+ 'min' => 30,
667
+ 'max' => 70,
668
+ 'step' => 1,
669
+ ],
670
+ '%' => [
671
+ 'min' => 30,
672
+ 'max' => 70,
673
+ 'step' => 1,
674
+ ],
675
+ ],
676
+ 'selectors' => [
677
+ '{{WRAPPER}} .tpg-el-main-wrapper .offset-left' => 'width: {{SIZE}}%;',
678
+ '{{WRAPPER}} .tpg-el-main-wrapper .offset-right' => 'width: calc( 100% - {{SIZE}}%);',
679
+ ],
680
+ 'condition' => [
681
+ $prefix . '_layout' => [
682
+ 'grid-layout5',
683
+ 'grid-layout5-2',
684
+ 'grid-layout6',
685
+ 'grid-layout6-2',
686
+ 'grid_hover-layout4',
687
+ 'grid_hover-layout4-2',
688
+ 'grid_hover-layout5',
689
+ 'grid_hover-layout5-2',
690
+ 'grid_hover-layout6',
691
+ 'grid_hover-layout6-2',
692
+ 'grid_hover-layout7',
693
+ 'grid_hover-layout7-2',
694
+ 'grid_hover-layout9',
695
+ 'grid_hover-layout9-2',
696
+ ],
697
+ ],
698
+ ]
699
+ );
700
+
701
+
702
+ if ( 'grid' === $prefix ) {
703
+ $layout_style_opt = [
704
+ 'tpg-even' => __( 'Grid', 'the-post-grid' ),
705
+ 'tpg-full-height' => __( 'Grid Equal Height', 'the-post-grid' ),
706
+ ];
707
+ if ( rtTPG()->hasPro() ) {
708
+ $layout_style_new_opt = [
709
+ 'masonry' => __( 'Masonry', 'the-post-grid' ),
710
+ ];
711
+ $layout_style_opt = array_merge( $layout_style_opt, $layout_style_new_opt );
712
+ }
713
+
714
+ $ref->add_control(
715
+ $prefix . '_layout_style',
716
+ [
717
+ 'label' => __( 'Layout Style', 'the-post-grid' ),
718
+ 'type' => \Elementor\Controls_Manager::SELECT,
719
+ 'default' => 'tpg-full-height',
720
+ 'options' => $layout_style_opt,
721
+ 'description' => __( 'If you use card border then equal height will work. ', 'the-post-grid' ) . $ref->get_pro_message( "masonry layout" ),
722
+ 'classes' => rtTPG()->hasPro() ? '' : 'tpg-should-hide-field',
723
+ 'condition' => [
724
+ $prefix . '_layout!' => [ 'grid-layout2', 'grid-layout5', 'grid-layout5-2', 'grid-layout6', 'grid-layout6-2', 'grid-layout7', 'grid-layout7-2' ],
725
+ ],
726
+ ]
727
+ );
728
+ }
729
+
730
+ if ( $prefix !== 'slider' ) {
731
+ $layout_align_css = [
732
+ '{{WRAPPER}} .rt-tpg-container .grid-layout2 .rt-holder .post-right-content' => 'justify-content: {{VALUE}};',
733
+ ];
734
+
735
+ if ( $prefix === 'grid_hover' ) {
736
+ $layout_align_css = [
737
+ '{{WRAPPER}} .rt-tpg-container .rt-grid-hover-item .rt-holder .grid-hover-content' => 'justify-content: {{VALUE}};',
738
+ ];
739
+ }
740
+
741
+ //Grid layout
742
+ $ref->add_control(
743
+ $prefix . '_layout_alignment',
744
+ [
745
+ 'label' => __( 'Vertical Align', 'the-post-grid' ),
746
+ 'type' => \Elementor\Controls_Manager::SELECT,
747
+ 'options' => [
748
+ '' => __( 'Default', 'the-post-grid' ),
749
+ 'flex-start' => __( 'Start', 'the-post-grid' ),
750
+ 'center' => __( 'Center', 'the-post-grid' ),
751
+ 'flex-end' => __( 'End', 'the-post-grid' ),
752
+ 'space-around' => __( 'Space Around', 'the-post-grid' ),
753
+ 'space-between' => __( 'Space Between', 'the-post-grid' ),
754
+ ],
755
+ 'condition' => [
756
+ $prefix . '_layout!' => [
757
+ 'grid-layout1',
758
+ 'grid-layout3',
759
+ 'grid-layout4',
760
+ 'grid-layout5',
761
+ 'grid-layout5-2',
762
+ 'grid-layout6',
763
+ 'grid-layout6-2',
764
+ 'grid-layout7',
765
+ 'grid_hover-layout2',
766
+ 'grid_hover-layout4',
767
+ 'grid_hover-layout4-2',
768
+ ],
769
+ ],
770
+ 'selectors' => $layout_align_css,
771
+ ]
772
+ );
773
+ }
774
+
775
+ if ( $prefix === 'slider' ) {
776
+ //Grid layout
777
+ $ref->add_control(
778
+ $prefix . '_layout_alignment_2',
779
+ [
780
+ 'label' => __( 'Vertical Align', 'the-post-grid' ),
781
+ 'type' => \Elementor\Controls_Manager::SELECT,
782
+ 'options' => [
783
+ '' => __( 'Default', 'the-post-grid' ),
784
+ 'flex-start' => __( 'Start', 'the-post-grid' ),
785
+ 'center' => __( 'Center', 'the-post-grid' ),
786
+ 'flex-end' => __( 'End', 'the-post-grid' ),
787
+ 'space-around' => __( 'Space Around', 'the-post-grid' ),
788
+ 'space-between' => __( 'Space Between', 'the-post-grid' ),
789
+ ],
790
+ 'condition' => [
791
+ $prefix . '_layout!' => [ 'slider-layout1', 'slider-layout2', 'slider-layout3', 'slider-layout13', 'grid-layout7' ],
792
+ ],
793
+ 'selectors' => [
794
+ '{{WRAPPER}} .tpg-el-main-wrapper .grid-behaviour .rt-holder .rt-el-content-wrapper .gallery-content' => 'justify-content: {{VALUE}};height:100%;',
795
+ '{{WRAPPER}} .rt-tpg-container .rt-grid-hover-item .rt-holder .grid-hover-content' => 'justify-content: {{VALUE}};',
796
+ ],
797
+ ]
798
+ );
799
+ }
800
+
801
+ $ref->add_responsive_control(
802
+ 'full_wrapper_align',
803
+ [
804
+ 'label' => esc_html__( 'Text Align', 'the-post-grid' ),
805
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
806
+ 'options' => [
807
+ 'left' => [
808
+ 'title' => esc_html__( 'Left', 'the-post-grid' ),
809
+ 'icon' => 'eicon-text-align-left',
810
+ ],
811
+ 'center' => [
812
+ 'title' => esc_html__( 'Center', 'the-post-grid' ),
813
+ 'icon' => 'eicon-text-align-center',
814
+ ],
815
+ 'right' => [
816
+ 'title' => esc_html__( 'Right', 'the-post-grid' ),
817
+ 'icon' => 'eicon-text-align-right',
818
+ ],
819
+ ],
820
+ 'prefix_class' => 'tpg-wrapper-align-',
821
+ 'toggle' => true,
822
+ 'condition' => [
823
+ $prefix . '_layout!' => [ 'grid-layout7' ],
824
+ ],
825
+
826
+ ]
827
+ );
828
+
829
+
830
+ $ref->end_controls_section();
831
+ }
832
+
833
+
834
+ /**
835
+ * Front-end Filter Settings
836
+ *
837
+ * @param $ref
838
+ */
839
+ public static function filter_settings( $ref ) {
840
+ $prefix = $ref->prefix;
841
+
842
+ if ( ! rtTPG()->hasPro() ) {
843
+ return;
844
+ }
845
+ $ref->start_controls_section(
846
+ $prefix . '_filter_settings',
847
+ [
848
+ 'label' => __( 'Filter (Front-end)', 'the-post-grid' ),
849
+ 'tab' => Controls_Manager::TAB_CONTENT,
850
+ ]
851
+ );
852
+
853
+ $ref->add_control(
854
+ 'show_taxonomy_filter',
855
+ [
856
+ 'label' => __( 'Taxonomy Filter', 'the-post-grid' ),
857
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
858
+ 'label_on' => __( 'Show', 'the-post-grid' ),
859
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
860
+ 'return_value' => 'show',
861
+ 'default' => 'hide',
862
+ ]
863
+ );
864
+
865
+ $ref->add_control(
866
+ 'show_author_filter',
867
+ [
868
+ 'label' => __( 'Author filter', 'the-post-grid' ),
869
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
870
+ 'label_on' => __( 'Show', 'the-post-grid' ),
871
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
872
+ 'return_value' => 'show',
873
+ 'default' => 'hide',
874
+ ]
875
+ );
876
+
877
+ $ref->add_control(
878
+ 'show_order_by',
879
+ [
880
+ 'label' => __( 'Order By Filter', 'the-post-grid' ),
881
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
882
+ 'label_on' => __( 'Show', 'the-post-grid' ),
883
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
884
+ 'return_value' => 'show',
885
+ 'default' => 'hide',
886
+ ]
887
+ );
888
+
889
+ $ref->add_control(
890
+ 'show_sort_order',
891
+ [
892
+ 'label' => __( 'Sort Order Filter', 'the-post-grid' ),
893
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
894
+ 'label_on' => __( 'Show', 'the-post-grid' ),
895
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
896
+ 'return_value' => 'show',
897
+ 'default' => 'hide',
898
+ ]
899
+ );
900
+
901
+ $ref->add_control(
902
+ 'show_search',
903
+ [
904
+ 'label' => __( 'Search filter', 'the-post-grid' ),
905
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
906
+ 'label_on' => __( 'Show', 'the-post-grid' ),
907
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
908
+ 'return_value' => 'show',
909
+ 'default' => 'hide',
910
+ ]
911
+ );
912
+
913
+ //TODO: Filter Settings
914
+ //======================================================
915
+
916
+ $front_end_filter_condition = [
917
+ 'relation' => 'or',
918
+ 'terms' => [
919
+ [
920
+ 'name' => 'show_taxonomy_filter',
921
+ 'operator' => '==',
922
+ 'value' => 'show',
923
+ ],
924
+ [
925
+ 'name' => 'show_author_filter',
926
+ 'operator' => '==',
927
+ 'value' => 'show',
928
+ ],
929
+ [
930
+ 'name' => 'show_order_by',
931
+ 'operator' => '==',
932
+ 'value' => 'show',
933
+ ],
934
+ [
935
+ 'name' => 'show_sort_order',
936
+ 'operator' => '==',
937
+ 'value' => 'show',
938
+ ],
939
+ [
940
+ 'name' => 'show_search',
941
+ 'operator' => '==',
942
+ 'value' => 'show',
943
+ ],
944
+ ],
945
+ ];
946
+
947
+
948
+ $ref->add_control(
949
+ 'filter_type',
950
+ [
951
+ 'label' => __( 'Filter Type', 'the-post-grid' ),
952
+ 'type' => \Elementor\Controls_Manager::SELECT,
953
+ 'default' => 'dropdown',
954
+ 'options' => [
955
+ 'dropdown' => __( 'Dropdown', 'the-post-grid' ),
956
+ 'button' => __( 'Button', 'the-post-grid' ),
957
+ ],
958
+ 'render_type' => 'template',
959
+ 'prefix_class' => 'tpg-filter-type-',
960
+ 'conditions' => $front_end_filter_condition,
961
+ 'separator' => 'before',
962
+ ]
963
+ );
964
+
965
+ $ref->add_control(
966
+ 'filter_btn_style',
967
+ [
968
+ 'label' => __( 'Filter Style', 'the-post-grid' ),
969
+ 'type' => \Elementor\Controls_Manager::SELECT,
970
+ 'default' => 'default',
971
+ 'options' => [
972
+ 'default' => __( 'Default', 'the-post-grid' ),
973
+ 'carousel' => __( 'Collapsable', 'the-post-grid' ),
974
+ ],
975
+ 'condition' => [
976
+ 'filter_type' => 'button',
977
+ ],
978
+ 'conditions' => $front_end_filter_condition,
979
+ 'description' => __( 'If you use collapsable then only category section show on the filter', 'the-post-grid' ),
980
+ ]
981
+ );
982
+
983
+ $ref->add_responsive_control(
984
+ 'filter_btn_item_per_page',
985
+ [
986
+ 'label' => __( 'Button Item Per Slider', 'the-post-grid' ),
987
+ 'type' => \Elementor\Controls_Manager::SELECT,
988
+ 'options' => [
989
+ 'auto' => __( 'Auto', 'the-post-grid' ),
990
+ '2' => __( '2', 'the-post-grid' ),
991
+ '3' => __( '3', 'the-post-grid' ),
992
+ '4' => __( '4', 'the-post-grid' ),
993
+ '5' => __( '5', 'the-post-grid' ),
994
+ '6' => __( '6', 'the-post-grid' ),
995
+ '7' => __( '7', 'the-post-grid' ),
996
+ '8' => __( '8', 'the-post-grid' ),
997
+ '9' => __( '9', 'the-post-grid' ),
998
+ '10' => __( '10', 'the-post-grid' ),
999
+ '11' => __( '11', 'the-post-grid' ),
1000
+ '12' => __( '12', 'the-post-grid' ),
1001
+ ],
1002
+ 'default' => 'auto',
1003
+ 'tablet_default' => 'auto',
1004
+ 'mobile_default' => 'auto',
1005
+ 'condition' => [
1006
+ 'filter_type' => 'button',
1007
+ 'filter_btn_style' => 'carousel',
1008
+ ],
1009
+ 'conditions' => $front_end_filter_condition,
1010
+ 'description' => __( 'If you use carousel then only category section show on the filter', 'the-post-grid' ),
1011
+ ]
1012
+ );
1013
+
1014
+
1015
+ $post_types = Fns::get_post_types();
1016
+ foreach ( $post_types as $post_type => $label ) {
1017
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
1018
+ if ( empty( $_taxonomies ) ) {
1019
+ continue;
1020
+ }
1021
+ $taxonomies_list = [];
1022
+ foreach ( $_taxonomies as $tax ) {
1023
+ if ( in_array( $tax->name, [ 'post_format', 'elementor_library_type', 'product_visibility', 'product_shipping_class' ] ) ) {
1024
+ continue;
1025
+ }
1026
+ $taxonomies_list[ $tax->name ] = $tax->label;
1027
+ }
1028
+
1029
+ if ( 'post' === $post_type ) {
1030
+ $default_cat = 'category';
1031
+ } elseif ( 'product' === $post_type ) {
1032
+ $default_cat = 'product_cat';
1033
+ } elseif ( 'download' === $post_type ) {
1034
+ $default_cat = 'download_category';
1035
+ } elseif ( 'docs' === $post_type ) {
1036
+ $default_cat = 'doc_category';
1037
+ } elseif ( 'lp_course' === $post_type ) {
1038
+ $default_cat = 'course_category';
1039
+ } else {
1040
+ $taxonomie_keys = array_keys( $_taxonomies );
1041
+ $filter_cat = array_filter(
1042
+ $taxonomie_keys,
1043
+ function ( $item ) {
1044
+ return strpos( $item, 'cat' ) !== false;
1045
+ }
1046
+ );
1047
+
1048
+ if ( is_array( $filter_cat ) && ! empty( $filter_cat ) ) {
1049
+ $default_cat = array_shift( $filter_cat );
1050
+ }
1051
+ }
1052
+
1053
+ $ref->add_control(
1054
+ $post_type . '_filter_taxonomy',
1055
+ [
1056
+ 'label' => __( 'Choose Taxonomy', 'the-post-grid' ),
1057
+ 'type' => \Elementor\Controls_Manager::SELECT,
1058
+ 'default' => $default_cat,
1059
+ 'options' => $taxonomies_list,
1060
+ 'condition' => [
1061
+ 'post_type' => $post_type,
1062
+ 'show_taxonomy_filter' => 'show',
1063
+ ],
1064
+ 'description' => __( 'Select a taxonomy for showing in filter', 'the-post-grid' ),
1065
+ ]
1066
+ );
1067
+
1068
+ foreach ( $_taxonomies as $tax ) {
1069
+ if ( in_array( $tax->name, [ 'post_format', 'elementor_library_type', 'product_visibility', 'product_shipping_class' ] ) ) {
1070
+ continue;
1071
+ }
1072
+
1073
+ $term_first = [ '0' => __( '--Select--', 'the-post-grid' ) ];
1074
+ $term_lists = get_terms(
1075
+ [
1076
+ 'taxonomy' => $tax->name, //Custom taxonomy name
1077
+ 'hide_empty' => true,
1078
+ 'fields' => "id=>name",
1079
+ ]
1080
+ );
1081
+
1082
+ $term_lists = $term_first + $term_lists;
1083
+
1084
+ $ref->add_control(
1085
+ $tax->name . '_default_terms',
1086
+ [
1087
+ 'label' => __( 'Default ', 'the-post-grid' ) . $tax->label,
1088
+ 'type' => \Elementor\Controls_Manager::SELECT,
1089
+ 'default' => '0',
1090
+ 'options' => $term_lists,
1091
+ 'condition' => [
1092
+ $post_type . '_filter_taxonomy' => $tax->name,
1093
+ 'post_type' => $post_type,
1094
+ 'show_taxonomy_filter' => 'show',
1095
+ ],
1096
+ ]
1097
+ );
1098
+ }
1099
+ }
1100
+
1101
+ $front_end_filter_tax_condition = [
1102
+ 'relation' => 'or',
1103
+ 'terms' => [
1104
+ [
1105
+ 'name' => 'show_taxonomy_filter',
1106
+ 'operator' => '==',
1107
+ 'value' => 'show',
1108
+ ],
1109
+ [
1110
+ 'name' => 'show_author_filter',
1111
+ 'operator' => '==',
1112
+ 'value' => 'show',
1113
+ ],
1114
+ ],
1115
+ ];
1116
+
1117
+ $ref->add_control(
1118
+ 'filter_post_count',
1119
+ [
1120
+ 'label' => __( 'Filter Post Count', 'the-post-grid' ),
1121
+ 'type' => \Elementor\Controls_Manager::SELECT,
1122
+ 'default' => 'no',
1123
+ 'options' => [
1124
+ 'yes' => __( 'Yes', 'the-post-grid' ),
1125
+ 'no' => __( 'No', 'the-post-grid' ),
1126
+ ],
1127
+ 'conditions' => $front_end_filter_tax_condition,
1128
+ ]
1129
+ );
1130
+
1131
+
1132
+ $ref->add_control(
1133
+ 'tgp_filter_taxonomy_hierarchical',
1134
+ [
1135
+ 'label' => __( 'Tax Hierarchical', 'the-post-grid' ),
1136
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1137
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
1138
+ 'label_off' => __( 'No', 'the-post-grid' ),
1139
+ 'return_value' => 'yes',
1140
+ 'default' => 'yes',
1141
+ 'conditions' => $front_end_filter_tax_condition,
1142
+ 'condition' => [
1143
+ 'filter_type' => 'button',
1144
+ 'filter_btn_style' => 'default',
1145
+ ],
1146
+ ]
1147
+ );
1148
+
1149
+ $ref->add_control(
1150
+ 'tpg_hide_all_button',
1151
+ [
1152
+ 'label' => __( 'Hide Show all button', 'the-post-grid' ),
1153
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1154
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1155
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1156
+ 'return_value' => 'yes',
1157
+ 'default' => 'yes',
1158
+ 'conditions' => $front_end_filter_tax_condition,
1159
+ 'condition' => [
1160
+ 'filter_type' => 'button',
1161
+ ],
1162
+ ]
1163
+ );
1164
+
1165
+ $ref->add_control(
1166
+ 'tax_filter_all_text',
1167
+ [
1168
+ 'label' => __( 'All Taxonomy Text', 'the-post-grid' ),
1169
+ 'type' => \Elementor\Controls_Manager::TEXT,
1170
+ 'placeholder' => __( 'Enter All Category Text Here..', 'the-post-grid' ),
1171
+ 'conditions' => $front_end_filter_tax_condition,
1172
+ ]
1173
+ );
1174
+ $ref->add_control(
1175
+ 'author_filter_all_text',
1176
+ [
1177
+ 'label' => __( 'All Users Text', 'the-post-grid' ),
1178
+ 'type' => \Elementor\Controls_Manager::TEXT,
1179
+ 'placeholder' => __( 'Enter All Users Text Here..', 'the-post-grid' ),
1180
+ 'condition' => [
1181
+ 'show_author_filter' => 'show',
1182
+ 'filter_btn_style' => 'default',
1183
+ ],
1184
+ ]
1185
+ );
1186
+
1187
+
1188
+ $ref->end_controls_section();
1189
+ }
1190
+
1191
+
1192
+ /**
1193
+ * List Layout Settings
1194
+ *
1195
+ * @param $ref
1196
+ */
1197
+ public static function list_layouts( $ref, $layout_type = '' ) {
1198
+ $prefix = $ref->prefix;
1199
+ $ref->start_controls_section(
1200
+ 'list_layout_settings',
1201
+ [
1202
+ 'label' => esc_html__( 'Layout', 'the-post-grid' ),
1203
+ 'tab' => Controls_Manager::TAB_CONTENT,
1204
+ ]
1205
+ );
1206
+
1207
+ $ref->add_control(
1208
+ 'list_layout',
1209
+ [
1210
+ 'label' => __( 'Choose Layout', 'the-post-grid' ),
1211
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
1212
+ 'label_block' => true,
1213
+ 'options' => [
1214
+ 'list-layout1' => [
1215
+ 'title' => __( 'Layout 1', 'the-post-grid' ),
1216
+ ],
1217
+ 'list-layout2' => [
1218
+ 'title' => __( 'Layout 2', 'the-post-grid' ),
1219
+ ],
1220
+ 'list-layout2-2' => [
1221
+ 'title' => __( 'Layout 3', 'the-post-grid' ),
1222
+ ],
1223
+ 'list-layout3' => [
1224
+ 'title' => __( 'Layout 4', 'the-post-grid' ),
1225
+ ],
1226
+ 'list-layout3-2' => [
1227
+ 'title' => __( 'Layout 5', 'the-post-grid' ),
1228
+ ],
1229
+ 'list-layout4' => [
1230
+ 'title' => __( 'Layout 6', 'the-post-grid' ),
1231
+ ],
1232
+ 'list-layout5' => [
1233
+ 'title' => __( 'Layout 7', 'the-post-grid' ),
1234
+ ],
1235
+ ],
1236
+ 'toggle' => false,
1237
+ 'default' => 'list-layout1',
1238
+ 'style_transfer' => true,
1239
+ 'classes' => 'tpg-image-select list-layout ' . $ref->is_post_layout,
1240
+ ]
1241
+ );
1242
+
1243
+ $ref->add_control(
1244
+ 'layout_options_heading2',
1245
+ [
1246
+ 'label' => __( 'Layout Options:', 'the-post-grid' ),
1247
+ 'type' => \Elementor\Controls_Manager::HEADING,
1248
+ 'classes' => 'tpg-control-type-heading',
1249
+ ]
1250
+ );
1251
+
1252
+ $ref->add_responsive_control(
1253
+ 'list_column',
1254
+ [
1255
+ 'label' => esc_html__( 'Column', 'the-post-grid' ),
1256
+ 'type' => Controls_Manager::SELECT,
1257
+ 'options' => [
1258
+ '0' => __( 'Default from layout', 'the-post-grid' ),
1259
+ '12' => __( '1 Columns', 'the-post-grid' ),
1260
+ '6' => __( '2 Columns', 'the-post-grid' ),
1261
+ '4' => __( '3 Columns', 'the-post-grid' ),
1262
+ '3' => __( '4 Columns', 'the-post-grid' ),
1263
+ ],
1264
+ 'default' => '0',
1265
+ 'tablet_default' => '0',
1266
+ 'mobile_default' => '0',
1267
+ 'description' => __( 'Choose Column for layout', 'the-post-grid' ),
1268
+ 'condition' => [
1269
+ 'list_layout!' => [ 'list-layout2', 'list-layout2-2', 'list-layout4' ],
1270
+ ],
1271
+ ]
1272
+ );
1273
+
1274
+
1275
+ $ref->add_responsive_control(
1276
+ 'list_layout_alignment',
1277
+ [
1278
+ 'label' => __( 'Vertical Alignment', 'the-post-grid' ),
1279
+ 'type' => \Elementor\Controls_Manager::SELECT,
1280
+ 'options' => [
1281
+ '' => __( 'Default', 'the-post-grid' ),
1282
+ 'flex-start' => __( 'Start', 'the-post-grid' ),
1283
+ 'center' => __( 'Center', 'the-post-grid' ),
1284
+ 'flex-end' => __( 'End', 'the-post-grid' ),
1285
+ 'space-around' => __( 'Space Around', 'the-post-grid' ),
1286
+ 'space-between' => __( 'Space Between', 'the-post-grid' ),
1287
+ ],
1288
+ 'selectors' => [
1289
+ '{{WRAPPER}} .tpg-el-main-wrapper .list-behaviour .rt-holder .rt-el-content-wrapper' => 'align-items: {{VALUE}};',
1290
+ ],
1291
+ 'condition' => [
1292
+ 'list_layout!' => [ 'list-layout2', 'list-layout2-2' ],
1293
+ ],
1294
+ ]
1295
+ );
1296
+
1297
+ $ref->add_responsive_control(
1298
+ 'list_left_side_width',
1299
+ [
1300
+ 'label' => __( 'Offset Width', 'the-post-grid' ),
1301
+ 'type' => Controls_Manager::SLIDER,
1302
+ 'size_units' => [ '%' ],
1303
+ 'range' => [
1304
+ 'px' => [
1305
+ 'min' => 0,
1306
+ 'max' => 700,
1307
+ 'step' => 5,
1308
+ ],
1309
+ '%' => [
1310
+ 'min' => 0,
1311
+ 'max' => 100,
1312
+ ],
1313
+ ],
1314
+ 'selectors' => [
1315
+ '{{WRAPPER}} .rt-tpg-container .list-layout-wrapper .offset-left' => 'width: {{SIZE}}%;',
1316
+ '{{WRAPPER}} .rt-tpg-container .list-layout-wrapper .offset-right' => 'width: calc( 100% - {{SIZE}}%);',
1317
+ ],
1318
+ 'condition' => [
1319
+ 'list_layout' => [ 'list-layout2', 'list-layout3', 'list-layout2-2', 'list-layout3-2' ],
1320
+ ],
1321
+ ]
1322
+ );
1323
+
1324
+
1325
+ $layout_style_opt = [
1326
+ 'tpg-even' => __( ucwords( $ref->prefix ) . ' Default', 'the-post-grid' ),
1327
+ ];
1328
+ if ( rtTPG()->hasPro() ) {
1329
+ $layout_style_new_opt = [
1330
+ 'masonry' => __( 'Masonry', 'the-post-grid' ),
1331
+ ];
1332
+ $layout_style_opt = array_merge( $layout_style_opt, $layout_style_new_opt );
1333
+ }
1334
+
1335
+ $ref->add_control(
1336
+ 'list_layout_style',
1337
+ [
1338
+ 'label' => __( 'Layout Style', 'the-post-grid' ),
1339
+ 'type' => \Elementor\Controls_Manager::SELECT,
1340
+ 'default' => 'tpg-even',
1341
+ 'options' => $layout_style_opt,
1342
+ 'description' => $ref->get_pro_message( "masonry layout" ),
1343
+ 'condition' => [
1344
+ 'list_layout' => [ 'list-layout1', 'list-layout5' ],
1345
+ 'list_column!' => [ '0', '12' ],
1346
+ ],
1347
+ ]
1348
+ );
1349
+
1350
+ $ref->add_responsive_control(
1351
+ 'full_wrapper_align',
1352
+ [
1353
+ 'label' => esc_html__( 'Text Align', 'the-post-grid' ),
1354
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
1355
+ 'options' => [
1356
+ 'left' => [
1357
+ 'title' => esc_html__( 'Left', 'the-post-grid' ),
1358
+ 'icon' => 'eicon-text-align-left',
1359
+ ],
1360
+ 'center' => [
1361
+ 'title' => esc_html__( 'Center', 'the-post-grid' ),
1362
+ 'icon' => 'eicon-text-align-center',
1363
+ ],
1364
+ 'right' => [
1365
+ 'title' => esc_html__( 'Right', 'the-post-grid' ),
1366
+ 'icon' => 'eicon-text-align-right',
1367
+ ],
1368
+ ],
1369
+ 'prefix_class' => 'tpg-wrapper-align-',
1370
+ 'toggle' => true,
1371
+ ]
1372
+ );
1373
+
1374
+ $ref->end_controls_section();
1375
+ }
1376
+
1377
+ /**
1378
+ * Pagination and Load more style tab
1379
+ *
1380
+ * @param $ref
1381
+ * @param bool $is_print
1382
+ */
1383
+ public static function pagination_settings( $ref, $layout_type = '' ) {
1384
+ $ref->start_controls_section(
1385
+ 'pagination_settings',
1386
+ [
1387
+ 'label' => __( 'Pagination', 'the-post-grid' ),
1388
+ 'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
1389
+ ]
1390
+ );
1391
+
1392
+ $ref->add_control(
1393
+ 'show_pagination',
1394
+ [
1395
+ 'label' => __( 'Show Pagination', 'the-post-grid' ),
1396
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1397
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1398
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1399
+ 'return_value' => 'show',
1400
+ 'default' => 'default',
1401
+ 'render_type' => 'template',
1402
+ 'prefix_class' => 'pagination-visibility-',
1403
+ ]
1404
+ );
1405
+
1406
+
1407
+ if ( 'archive' !== $layout_type ) {
1408
+ $ref->add_control(
1409
+ 'display_per_page',
1410
+ [
1411
+ 'label' => __( 'Display Per Page', 'the-post-grid' ),
1412
+ 'type' => \Elementor\Controls_Manager::NUMBER,
1413
+ 'default' => 6,
1414
+ 'description' => __( 'Enter how may posts will display per page', 'the-post-grid' ),
1415
+ 'condition' => [
1416
+ 'show_pagination' => 'show',
1417
+ ],
1418
+ ]
1419
+ );
1420
+ }
1421
+
1422
+
1423
+ $default_pagination = 'pagination';
1424
+ if ( 'archive' == $layout_type ) {
1425
+ $pagination_type = [];
1426
+ $default_pagination = 'pagination_ajax';
1427
+ } else {
1428
+ $pagination_type = [
1429
+ 'pagination' => __( 'Default Pagination', 'the-post-grid' ),
1430
+ ];
1431
+ }
1432
+
1433
+ if ( rtTPG()->hasPro() ) {
1434
+ $pagination_type_pro = [
1435
+ 'pagination_ajax' => __( 'Ajax Pagination ( Only for Grid )', 'the-post-grid' ),
1436
+ 'load_more' => __( 'Load More - On Click', 'the-post-grid' ),
1437
+ 'load_on_scroll' => __( 'Load On Scroll', 'the-post-grid' ),
1438
+ ];
1439
+ $pagination_type = array_merge( $pagination_type, $pagination_type_pro );
1440
+ }
1441
+
1442
+ $ref->add_control(
1443
+ 'pagination_type',
1444
+ [
1445
+ 'label' => __( 'Pagination Type', 'the-post-grid' ),
1446
+ 'type' => \Elementor\Controls_Manager::SELECT,
1447
+ 'default' => $default_pagination,
1448
+ 'options' => $pagination_type,
1449
+ 'description' => $ref->get_pro_message( 'loadmore and ajax pagination' ),
1450
+ 'condition' => [
1451
+ 'show_pagination' => 'show',
1452
+ ],
1453
+ ]
1454
+ );
1455
+
1456
+ $ref->add_control(
1457
+ 'ajax_pagination_type',
1458
+ [
1459
+ 'label' => __( 'Enable Ajax Next Previous', 'the-post-grid' ),
1460
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1461
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
1462
+ 'label_off' => __( 'No', 'the-post-grid' ),
1463
+ 'return_value' => 'yes',
1464
+ 'default' => false,
1465
+ 'condition' => [
1466
+ 'pagination_type' => 'pagination_ajax',
1467
+ 'show_pagination' => 'show',
1468
+ ],
1469
+ 'prefix_class' => 'ajax-pagination-type-next-prev-',
1470
+ ]
1471
+ );
1472
+
1473
+
1474
+ $ref->add_control(
1475
+ 'load_more_button_text',
1476
+ [
1477
+ 'label' => __( 'Button Text', 'the-post-grid' ),
1478
+ 'type' => \Elementor\Controls_Manager::TEXT,
1479
+ 'default' => __( 'Load More', 'the-post-grid' ),
1480
+ 'condition' => [
1481
+ 'pagination_type' => 'load_more',
1482
+ 'show_pagination' => 'show',
1483
+ ],
1484
+ ]
1485
+ );
1486
+
1487
+
1488
+ $ref->end_controls_section();
1489
+ }
1490
+
1491
+ /**
1492
+ * Get Field Selections
1493
+ *
1494
+ * @param $ref
1495
+ */
1496
+
1497
+ public static function field_selection( $ref ) {
1498
+ $prefix = $ref->prefix;
1499
+ $ref->start_controls_section(
1500
+ 'field_selection_settings',
1501
+ [
1502
+ 'label' => esc_html__( 'Field Selection', 'the-post-grid' ),
1503
+ 'tab' => Controls_Manager::TAB_SETTINGS,
1504
+ ]
1505
+ );
1506
+
1507
+ $ref->add_control(
1508
+ 'show_section_title',
1509
+ [
1510
+ 'label' => __( 'Section Title', 'the-post-grid' ),
1511
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1512
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1513
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1514
+ 'return_value' => 'show',
1515
+ 'default' => 'show',
1516
+ 'render_type' => 'template',
1517
+ 'prefix_class' => 'section-title-visibility-',
1518
+ ]
1519
+ );
1520
+
1521
+ $ref->add_control(
1522
+ 'show_title',
1523
+ [
1524
+ 'label' => __( 'Post Title', 'the-post-grid' ),
1525
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1526
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1527
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1528
+ 'return_value' => 'show',
1529
+ 'default' => 'show',
1530
+ 'render_type' => 'template',
1531
+ 'prefix_class' => 'title-visibility-',
1532
+ 'condition' => [
1533
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1534
+ ],
1535
+
1536
+ ]
1537
+ );
1538
+
1539
+ $ref->add_control(
1540
+ 'show_thumb',
1541
+ [
1542
+ 'label' => __( 'Post Thumbnail', 'the-post-grid' ),
1543
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1544
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1545
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1546
+ 'return_value' => 'show',
1547
+ 'default' => 'show',
1548
+ 'render_type' => 'template',
1549
+ 'prefix_class' => 'thumbnail-visibility-',
1550
+ ]
1551
+ );
1552
+
1553
+ $ref->add_control(
1554
+ 'show_excerpt',
1555
+ [
1556
+ 'label' => __( 'Post Excerpt', 'the-post-grid' ),
1557
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1558
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1559
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1560
+ 'return_value' => 'show',
1561
+ 'default' => 'show',
1562
+ 'render_type' => 'template',
1563
+ 'prefix_class' => 'excerpt-visibility-',
1564
+ 'condition' => [
1565
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1566
+ ],
1567
+ ]
1568
+ );
1569
+
1570
+ $ref->add_control(
1571
+ 'show_meta',
1572
+ [
1573
+ 'label' => __( 'Post Meta', 'the-post-grid' ),
1574
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1575
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1576
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1577
+ 'return_value' => 'show',
1578
+ 'default' => 'show',
1579
+ 'render_type' => 'template',
1580
+ 'prefix_class' => 'meta-visibility-',
1581
+ 'condition' => [
1582
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1583
+ ],
1584
+ ]
1585
+ );
1586
+
1587
+ $ref->add_control(
1588
+ 'show_date',
1589
+ [
1590
+ 'label' => __( 'Post Date', 'the-post-grid' ),
1591
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1592
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1593
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1594
+ 'return_value' => 'show',
1595
+ 'default' => 'show',
1596
+ 'render_type' => 'template',
1597
+ 'classes' => 'tpg-padding-left',
1598
+ 'prefix_class' => 'date-visibility-',
1599
+ 'condition' => [
1600
+ 'show_meta' => 'show',
1601
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1602
+ ],
1603
+ ]
1604
+ );
1605
+
1606
+ $ref->add_control(
1607
+ 'show_category',
1608
+ [
1609
+ 'label' => __( 'Post Categories', 'the-post-grid' ),
1610
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1611
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1612
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1613
+ 'return_value' => 'show',
1614
+ 'default' => 'show',
1615
+ 'render_type' => 'template',
1616
+ 'classes' => 'tpg-padding-left',
1617
+ 'prefix_class' => 'category-visibility-',
1618
+ 'condition' => [
1619
+ 'show_meta' => 'show',
1620
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1621
+ ],
1622
+ ]
1623
+ );
1624
+
1625
+ $ref->add_control(
1626
+ 'show_author',
1627
+ [
1628
+ 'label' => __( 'Post Author', 'the-post-grid' ),
1629
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1630
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1631
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1632
+ 'return_value' => 'show',
1633
+ 'default' => 'show',
1634
+ 'classes' => 'tpg-padding-left',
1635
+ 'condition' => [
1636
+ 'show_meta' => 'show',
1637
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1638
+ ],
1639
+ ]
1640
+ );
1641
+
1642
+ $ref->add_control(
1643
+ 'show_tags',
1644
+ [
1645
+ 'label' => __( 'Post Tags', 'the-post-grid' ),
1646
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1647
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1648
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1649
+ 'return_value' => 'show',
1650
+ 'default' => false,
1651
+ 'classes' => 'tpg-padding-left',
1652
+ 'condition' => [
1653
+ 'show_meta' => 'show',
1654
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1655
+ ],
1656
+ ]
1657
+ );
1658
+
1659
+ $ref->add_control(
1660
+ 'show_comment_count',
1661
+ [
1662
+ 'label' => __( 'Post Comment Count', 'the-post-grid' ),
1663
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1664
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1665
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1666
+ 'return_value' => 'show',
1667
+ 'default' => false,
1668
+ 'classes' => 'tpg-padding-left',
1669
+ 'condition' => [
1670
+ 'show_meta' => 'show',
1671
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1672
+ ],
1673
+ ]
1674
+ );
1675
+
1676
+ $ref->add_control(
1677
+ 'show_post_count',
1678
+ [
1679
+ 'label' => __( 'Post View Count', 'the-post-grid' ) . $ref->pro_label,
1680
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1681
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1682
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1683
+ 'return_value' => 'show',
1684
+ 'default' => false,
1685
+ 'classes' => rtTPG()->hasPro() ? 'tpg-padding-left' : 'the-post-grid-field-hide tpg-padding-left',
1686
+
1687
+ 'condition' => [
1688
+ 'show_meta' => 'show',
1689
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1690
+ ],
1691
+ ]
1692
+ );
1693
+
1694
+ $ref->add_control(
1695
+ 'show_read_more',
1696
+ [
1697
+ 'label' => __( 'Read More Button', 'the-post-grid' ),
1698
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1699
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1700
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1701
+ 'return_value' => 'show',
1702
+ 'default' => false,
1703
+ 'condition' => [
1704
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1705
+ ],
1706
+ ]
1707
+ );
1708
+
1709
+ $ref->add_control(
1710
+ 'show_social_share',
1711
+ [
1712
+ 'label' => __( 'Social Share', 'the-post-grid' ) . $ref->pro_label,
1713
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1714
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1715
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1716
+ 'return_value' => 'show',
1717
+ 'default' => 'default',
1718
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
1719
+ 'condition' => [
1720
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1721
+ ],
1722
+ ]
1723
+ );
1724
+
1725
+ $ref->add_control(
1726
+ 'show_woocommerce_rating',
1727
+ [
1728
+ 'label' => __( 'Rating (WooCommerce)', 'the-post-grid' ),
1729
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1730
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1731
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1732
+ 'return_value' => 'show',
1733
+ 'default' => 'default',
1734
+ 'condition' => [
1735
+ 'post_type' => [ 'product', 'download' ],
1736
+ ],
1737
+ ]
1738
+ );
1739
+
1740
+ $cf = Fns::is_acf();
1741
+ if ( $cf ) {
1742
+ $ref->add_control(
1743
+ 'show_acf',
1744
+ [
1745
+ 'label' => __( 'Advanced Custom Field', 'the-post-grid' ) . $ref->pro_label,
1746
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1747
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1748
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1749
+ 'return_value' => 'show',
1750
+ 'default' => false,
1751
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
1752
+ 'condition' => [
1753
+ $prefix . '_layout!' => [ 'grid-layout7' ],
1754
+ ],
1755
+ ]
1756
+ );
1757
+ }
1758
+
1759
+ $ref->end_controls_section();
1760
+ }
1761
+
1762
+
1763
+ /**
1764
+ * Section Title Settings
1765
+ *
1766
+ * @param $ref
1767
+ */
1768
+
1769
+ public static function section_title_settings( $ref, $layout_type = '' ) {
1770
+ $default = $layout_type == 'single' ? 'Related Posts' : 'Section Title';
1771
+ $ref->start_controls_section(
1772
+ 'section_title_settings',
1773
+ [
1774
+ 'label' => esc_html__( 'Section Title', 'the-post-grid' ),
1775
+ 'tab' => Controls_Manager::TAB_SETTINGS,
1776
+ 'condition' => [
1777
+ 'show_section_title' => 'show',
1778
+ ],
1779
+ ]
1780
+ );
1781
+
1782
+
1783
+ $ref->add_control(
1784
+ 'section_title_style',
1785
+ [
1786
+ 'label' => __( 'Section Title Style', 'the-post-grid' ),
1787
+ 'type' => \Elementor\Controls_Manager::SELECT,
1788
+ 'default' => 'style1',
1789
+ 'options' => [
1790
+ 'default' => __( 'Default', 'the-post-grid' ),
1791
+ 'style1' => __( 'Style 1', 'the-post-grid' ),
1792
+ 'style2' => __( 'Style 2', 'the-post-grid' ),
1793
+ 'style3' => __( 'Style 3', 'the-post-grid' ),
1794
+ ],
1795
+ 'prefix_class' => 'section-title-style-',
1796
+ 'render_type' => 'template',
1797
+ 'condition' => [
1798
+ 'show_section_title' => 'show',
1799
+ ],
1800
+ ]
1801
+ );
1802
+
1803
+ if ( 'single' === $layout_type ) {
1804
+ $ref->add_control(
1805
+ 'section_title_source',
1806
+ [
1807
+ 'label' => esc_html__( 'Title source', 'the-post-grid' ),
1808
+ 'type' => \Elementor\Controls_Manager::HIDDEN,
1809
+ 'default' => 'custom_title',
1810
+ ]
1811
+ );
1812
+ } else {
1813
+ $ref->add_control(
1814
+ 'section_title_source',
1815
+ [
1816
+ 'label' => __( 'Title Source', 'the-post-grid' ),
1817
+ 'type' => \Elementor\Controls_Manager::SELECT,
1818
+ 'default' => 'custom_title',
1819
+ 'options' => [
1820
+ 'page_title' => __( 'Page Title', 'the-post-grid' ),
1821
+ 'custom_title' => __( 'Custom Title', 'the-post-grid' ),
1822
+ ],
1823
+ 'condition' => [
1824
+ 'show_section_title' => 'show',
1825
+ ],
1826
+ ]
1827
+ );
1828
+ }
1829
+
1830
+ $ref->add_control(
1831
+ 'section_title_text',
1832
+ [
1833
+ 'label' => __( 'Title', 'the-post-grid' ),
1834
+ 'type' => \Elementor\Controls_Manager::TEXT,
1835
+ 'placeholder' => __( 'Type your title here', 'the-post-grid' ),
1836
+ 'default' => __( $default, 'the-post-grid' ),
1837
+ 'label_block' => true,
1838
+ 'condition' => [
1839
+ 'section_title_source' => 'custom_title',
1840
+ 'show_section_title' => 'show',
1841
+ ],
1842
+ ]
1843
+ );
1844
+
1845
+
1846
+ $ref->add_control(
1847
+ 'title_prefix',
1848
+ [
1849
+ 'label' => __( 'Title Prefix Text', 'the-post-grid' ),
1850
+ 'type' => \Elementor\Controls_Manager::TEXT,
1851
+ 'placeholder' => __( 'Title prefix text', 'the-post-grid' ),
1852
+ 'condition' => [
1853
+ 'section_title_source' => 'page_title',
1854
+ ],
1855
+ ]
1856
+ );
1857
+
1858
+ $ref->add_control(
1859
+ 'title_suffix',
1860
+ [
1861
+ 'label' => __( 'Title Suffix Text', 'the-post-grid' ),
1862
+ 'type' => \Elementor\Controls_Manager::TEXT,
1863
+ 'placeholder' => __( 'Title suffix text', 'the-post-grid' ),
1864
+ 'condition' => [
1865
+ 'section_title_source' => 'page_title',
1866
+ ],
1867
+ ]
1868
+ );
1869
+
1870
+ $ref->add_control(
1871
+ 'section_title_tag',
1872
+ [
1873
+ 'label' => __( 'Title Tag', 'the-post-grid' ),
1874
+ 'type' => Controls_Manager::SELECT,
1875
+ 'default' => 'h2',
1876
+ 'options' => [
1877
+ 'h1' => __( 'H1', 'the-post-grid' ),
1878
+ 'h2' => __( 'H2', 'the-post-grid' ),
1879
+ 'h3' => __( 'H3', 'the-post-grid' ),
1880
+ 'h4' => __( 'H4', 'the-post-grid' ),
1881
+ 'h5' => __( 'H5', 'the-post-grid' ),
1882
+ 'h6' => __( 'H6', 'the-post-grid' ),
1883
+ ],
1884
+ 'condition' => [
1885
+ 'show_section_title' => 'show',
1886
+ ],
1887
+ ]
1888
+ );
1889
+
1890
+ if ( 'archive' == $layout_type ) {
1891
+ $ref->add_control(
1892
+ 'show_cat_desc',
1893
+ [
1894
+ 'label' => __( 'Show Archive Description', 'the-post-grid' ),
1895
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
1896
+ 'label_on' => __( 'Show', 'the-post-grid' ),
1897
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
1898
+ 'return_value' => 'yes',
1899
+ 'default' => false,
1900
+ ]
1901
+ );
1902
+ }
1903
+
1904
+ $ref->end_controls_section();
1905
+ }
1906
+
1907
+
1908
+ /**
1909
+ * Thumbnail Settings
1910
+ *
1911
+ * @param $ref
1912
+ */
1913
+
1914
+ public static function post_thumbnail_settings( $ref ) {
1915
+ $prefix = $ref->prefix;
1916
+ $ref->start_controls_section(
1917
+ 'post_thumbnail_settings',
1918
+ [
1919
+ 'label' => esc_html__( 'Post Thumbnail', 'the-post-grid' ),
1920
+ 'tab' => Controls_Manager::TAB_SETTINGS,
1921
+ 'condition' => [
1922
+ 'show_thumb' => 'show',
1923
+ ],
1924
+ ]
1925
+ );
1926
+
1927
+
1928
+ $ref->add_control(
1929
+ 'media_source',
1930
+ [
1931
+ 'label' => __( 'Media Source', 'the-post-grid' ),
1932
+ 'type' => \Elementor\Controls_Manager::SELECT,
1933
+ 'default' => 'feature_image',
1934
+ 'options' => [
1935
+ 'feature_image' => __( 'Feature Image', 'the-post-grid' ),
1936
+ 'first_image' => __( 'First Image from content', 'the-post-grid' ),
1937
+ ],
1938
+ ]
1939
+ );
1940
+
1941
+ $thumb_exclude = '';
1942
+ if ( ! rtTPG()->hasPro() ) {
1943
+ $thumb_exclude = 'custom';
1944
+ }
1945
+
1946
+
1947
+ //Default Image
1948
+ $ref->add_group_control(
1949
+ \Elementor\Group_Control_Image_Size::get_type(),
1950
+ [
1951
+ 'name' => 'image',
1952
+ 'exclude' => [ $thumb_exclude ],
1953
+ 'default' => 'medium_large',
1954
+ 'label' => $ref->get_pro_message( "custom dimension." ),
1955
+ 'condition' => [
1956
+ 'media_source' => 'feature_image',
1957
+ ],
1958
+ ]
1959
+ );
1960
+
1961
+ $ref->add_control(
1962
+ 'img_crop_style',
1963
+ [
1964
+ 'label' => __( 'Image Crop Style', 'the-post-grid' ),
1965
+ 'type' => \Elementor\Controls_Manager::SELECT,
1966
+ 'default' => 'hard',
1967
+ 'options' => [
1968
+ 'soft' => __( 'Soft Crop', 'the-post-grid' ),
1969
+ 'hard' => __( 'Hard Crop', 'the-post-grid' ),
1970
+ ],
1971
+ 'condition' => [
1972
+ 'image_size' => 'custom',
1973
+ 'media_source' => 'feature_image',
1974
+ ],
1975
+ ]
1976
+ );
1977
+
1978
+
1979
+ $thumb_condition = [
1980
+ 'media_source' => 'feature_image',
1981
+ 'grid_layout' => [ 'grid-layout5', 'grid-layout5-2', 'grid-layout6', 'grid-layout6-2' ],
1982
+ ];
1983
+
1984
+ if ( $ref->prefix === 'list' ) {
1985
+ $thumb_condition = [
1986
+ 'media_source' => 'feature_image',
1987
+ 'list_layout' => [ 'list-layout2', 'list-layout3', 'list-layout2-2', 'list-layout3-2' ],
1988
+ ];
1989
+ }
1990
+
1991
+ if ( $ref->prefix === 'grid_hover' ) {
1992
+ $thumb_condition = [
1993
+ 'media_source' => 'feature_image',
1994
+ 'grid_hover_layout' => [
1995
+ 'grid_hover-layout4',
1996
+ 'grid_hover-layout4-2',
1997
+ 'grid_hover-layout5',
1998
+ 'grid_hover-layout5-2',
1999
+ 'grid_hover-layout6',
2000
+ 'grid_hover-layout6-2',
2001
+ 'grid_hover-layout7',
2002
+ 'grid_hover-layout7-2',
2003
+ 'grid_hover-layout9',
2004
+ 'grid_hover-layout9-2',
2005
+ ],
2006
+ ];
2007
+ }
2008
+ if ( $ref->prefix === 'slider' ) {
2009
+ $thumb_condition = [
2010
+ 'media_source' => 'feature_image',
2011
+ 'slider_layout' => [ 'slider-layout10' ],
2012
+ ];
2013
+ }
2014
+
2015
+ //Offset Image
2016
+ $ref->add_group_control(
2017
+ \Elementor\Group_Control_Image_Size::get_type(),
2018
+ [
2019
+ 'name' => 'image_offset',
2020
+ 'exclude' => [ 'custom' ],
2021
+ 'default' => 'medium_large',
2022
+ 'condition' => $thumb_condition,
2023
+ 'classes' => 'tpg-offset-thumb-size',
2024
+ ]
2025
+ );
2026
+
2027
+ if ( 'list' == $prefix ) {
2028
+ $ref->add_responsive_control(
2029
+ 'list_image_side_width',
2030
+ [
2031
+ 'label' => __( 'List Image Width', 'the-post-grid' ),
2032
+ 'type' => Controls_Manager::SLIDER,
2033
+ 'size_units' => [ 'px', '%' ],
2034
+ 'range' => [
2035
+ 'px' => [
2036
+ 'min' => 0,
2037
+ 'max' => 700,
2038
+ 'step' => 5,
2039
+ ],
2040
+ '%' => [
2041
+ 'min' => 0,
2042
+ 'max' => 100,
2043
+ ],
2044
+ ],
2045
+ 'selectors' => [
2046
+ '{{WRAPPER}} .rt-tpg-container .list-layout-wrapper [class*="rt-col"]:not(.offset-left) .rt-holder .tpg-el-image-wrap' => 'flex: 0 0 {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}};',
2047
+ ],
2048
+ 'condition' => [
2049
+ 'list_layout!' => [ 'list-layout4' ],
2050
+ ],
2051
+ ]
2052
+ );
2053
+ }
2054
+
2055
+ if ( rtTPG()->hasPro() ) {
2056
+ $ref->add_responsive_control(
2057
+ 'image_height',
2058
+ [
2059
+ 'label' => __( 'Image Height', 'the-post-grid' ),
2060
+ 'type' => Controls_Manager::SLIDER,
2061
+ 'size_units' => [ '%', 'px' ],
2062
+ 'range' => [
2063
+ '%' => [
2064
+ 'min' => 0,
2065
+ 'max' => 100,
2066
+ ],
2067
+ 'px' => [
2068
+ 'min' => 0,
2069
+ 'max' => 1000,
2070
+ 'step' => 1,
2071
+ ],
2072
+ ],
2073
+ 'selectors' => [
2074
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-content-loader > :not(.offset-right) .tpg-el-image-wrap' => 'height: {{SIZE}}{{UNIT}};',
2075
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-content-loader > :not(.offset-right) .tpg-el-image-wrap img' => 'height: {{SIZE}}{{UNIT}};',
2076
+ '{{WRAPPER}} .tpg-el-main-wrapper.slider-layout11-main .rt-grid-hover-item .rt-holder .rt-el-content-wrapper' => 'height: {{SIZE}}{{UNIT}};',
2077
+ '{{WRAPPER}} .tpg-el-main-wrapper.slider-layout12-main .rt-grid-hover-item .rt-holder .rt-el-content-wrapper' => 'height: {{SIZE}}{{UNIT}};',
2078
+ ],
2079
+ ]
2080
+ );
2081
+
2082
+ $ref->add_responsive_control(
2083
+ 'offset_image_height',
2084
+ [
2085
+ 'label' => __( 'Offset Image Height', 'the-post-grid' ),
2086
+ 'type' => Controls_Manager::SLIDER,
2087
+ 'size_units' => [ '%', 'px' ],
2088
+ 'range' => [
2089
+ '%' => [
2090
+ 'min' => 0,
2091
+ 'max' => 100,
2092
+ ],
2093
+ 'px' => [
2094
+ 'min' => 0,
2095
+ 'max' => 1000,
2096
+ 'step' => 1,
2097
+ ],
2098
+ ],
2099
+ 'condition' => $thumb_condition,
2100
+ 'selectors' => [
2101
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-content-loader .offset-right .tpg-el-image-wrap' => 'height: {{SIZE}}{{UNIT}};',
2102
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-content-loader .offset-right .tpg-el-image-wrap img' => 'height: {{SIZE}}{{UNIT}};',
2103
+ ],
2104
+ ]
2105
+ );
2106
+ }
2107
+
2108
+ $ref->add_control(
2109
+ 'hover_animation',
2110
+ [
2111
+ 'label' => __( 'Image Hover Animation', 'the-post-grid' ),
2112
+ 'type' => \Elementor\Controls_Manager::SELECT,
2113
+ 'default' => 'default',
2114
+ 'options' => [
2115
+ 'default' => __( 'Default', 'the-post-grid' ),
2116
+ 'img_zoom_in' => __( 'Zoom In', 'the-post-grid' ),
2117
+ 'img_zoom_out' => __( 'Zoom Out', 'the-post-grid' ),
2118
+ 'slide_to_right' => __( 'Slide to Right', 'the-post-grid' ),
2119
+ 'slide_to_left' => __( 'Slide to Left', 'the-post-grid' ),
2120
+ 'img_no_effect' => __( 'None', 'the-post-grid' ),
2121
+ ],
2122
+ 'render_type' => 'template',
2123
+ 'prefix_class' => 'img_hover_animation_',
2124
+ ]
2125
+ );
2126
+
2127
+ $ref->add_control(
2128
+ 'is_thumb_lightbox',
2129
+ [
2130
+ 'label' => __( 'Light Box', 'the-post-grid' ) . $ref->pro_label,
2131
+ 'type' => \Elementor\Controls_Manager::SELECT,
2132
+ 'default' => 'default',
2133
+ 'options' => [
2134
+ 'default' => __( 'Default', 'the-post-grid' ),
2135
+ 'show' => __( 'Show', 'the-post-grid' ),
2136
+ 'hide' => __( 'Hide', 'the-post-grid' ),
2137
+ ],
2138
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
2139
+ ]
2140
+ );
2141
+
2142
+ $ref->add_control(
2143
+ 'is_default_img',
2144
+ [
2145
+ 'label' => __( 'Enable Default Image', 'the-post-grid' ) . $ref->pro_label,
2146
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
2147
+ 'label_on' => __( 'Show', 'the-post-grid' ),
2148
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
2149
+ 'return_value' => 'yes',
2150
+ 'default' => false,
2151
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
2152
+ ]
2153
+ );
2154
+
2155
+
2156
+ $ref->add_control(
2157
+ 'default_image',
2158
+ [
2159
+ 'label' => __( 'Default Image', 'the-post-grid' ) . $ref->pro_label,
2160
+ 'type' => \Elementor\Controls_Manager::MEDIA,
2161
+ 'default' => [
2162
+ 'url' => rtTPG()->get_assets_uri('images/placeholder.png'),
2163
+ ],
2164
+ 'condition' => [
2165
+ 'is_default_img' => 'yes',
2166
+ ],
2167
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
2168
+ ]
2169
+ );
2170
+
2171
+ $ref->end_controls_section();
2172
+ }
2173
+
2174
+
2175
+ /**
2176
+ * Post Title Settings
2177
+ *
2178
+ * @param $ref
2179
+ */
2180
+
2181
+ public static function post_title_settings( $ref ) {
2182
+ $prefix = $ref->prefix;
2183
+
2184
+ $ref->start_controls_section(
2185
+ 'post_title_settings',
2186
+ [
2187
+ 'label' => esc_html__( 'Post Title', 'the-post-grid' ),
2188
+ 'tab' => Controls_Manager::TAB_SETTINGS,
2189
+ 'condition' => [
2190
+ 'show_title' => 'show',
2191
+ $prefix . '_layout!' => [ 'grid-layout7' ],
2192
+ ],
2193
+ ]
2194
+ );
2195
+
2196
+ $ref->add_control(
2197
+ 'title_tag',
2198
+ [
2199
+ 'label' => __( 'Title Tag', 'the-post-grid' ),
2200
+ 'type' => Controls_Manager::SELECT,
2201
+ 'default' => 'h3',
2202
+ 'options' => [
2203
+ 'h1' => __( 'H1', 'the-post-grid' ),
2204
+ 'h2' => __( 'H2', 'the-post-grid' ),
2205
+ 'h3' => __( 'H3', 'the-post-grid' ),
2206
+ 'h4' => __( 'H4', 'the-post-grid' ),
2207
+ 'h5' => __( 'H5', 'the-post-grid' ),
2208
+ 'h6' => __( 'H6', 'the-post-grid' ),
2209
+ ],
2210
+ ]
2211
+ );
2212
+
2213
+ $ref->add_control(
2214
+ 'title_visibility_style',
2215
+ [
2216
+ 'label' => __( 'Title Visibility Style', 'the-post-grid' ),
2217
+ 'type' => \Elementor\Controls_Manager::SELECT,
2218
+ 'default' => 'default',
2219
+ 'options' => [
2220
+ 'default' => __( 'Default', 'the-post-grid' ),
2221
+ 'one-line' => __( 'Show in 1 line', 'the-post-grid' ),
2222
+ 'two-line' => __( 'Show in 2 lines', 'the-post-grid' ),
2223
+ 'three-line' => __( 'Show in 3 lines', 'the-post-grid' ),
2224
+ 'custom' => __( 'Custom', 'the-post-grid' ),
2225
+ ],
2226
+ 'render_type' => 'template',
2227
+ 'prefix_class' => 'title-',
2228
+ ]
2229
+ );
2230
+
2231
+ $ref->add_control(
2232
+ 'title_limit',
2233
+ [
2234
+ 'label' => __( 'Title Length', 'the-post-grid' ),
2235
+ 'type' => \Elementor\Controls_Manager::NUMBER,
2236
+ 'step' => 1,
2237
+ 'classes' => 'tpg-padding-left',
2238
+ 'condition' => [
2239
+ 'title_visibility_style' => 'custom',
2240
+ ],
2241
+ ]
2242
+ );
2243
+
2244
+ $ref->add_control(
2245
+ 'title_limit_type',
2246
+ [
2247
+ 'label' => __( 'Title Crop by', 'the-post-grid' ),
2248
+ 'type' => \Elementor\Controls_Manager::SELECT,
2249
+ 'default' => 'word',
2250
+ 'options' => [
2251
+ 'word' => __( 'Words', 'the-post-grid' ),
2252
+ 'character' => __( 'Characters', 'the-post-grid' ),
2253
+ ],
2254
+ 'classes' => 'tpg-padding-left',
2255
+ 'conditions' => [
2256
+ 'relation' => 'and',
2257
+ 'terms' => [
2258
+ [
2259
+ 'name' => 'title_limit',
2260
+ 'operator' => '>',
2261
+ 'value' => 0,
2262
+ ],
2263
+ [
2264
+ 'name' => 'title_visibility_style',
2265
+ 'operator' => '==',
2266
+ 'value' => 'custom',
2267
+ ],
2268
+ ],
2269
+
2270
+ ],
2271
+ ]
2272
+ );
2273
+
2274
+ $title_position = [
2275
+ 'default' => __( 'Default', 'the-post-grid' ),
2276
+ ];
2277
+ if ( rtTPG()->hasPro() ) {
2278
+ $title_position_pro = [
2279
+ 'above_image' => __( 'Above Image', 'the-post-grid' ),
2280
+ 'below_image' => __( 'Below Image', 'the-post-grid' ),
2281
+ ];
2282
+ $title_position = array_merge( $title_position, $title_position_pro );
2283
+ }
2284
+
2285
+ $ref->add_control(
2286
+ 'title_position',
2287
+ [
2288
+ 'label' => __( 'Title Position', 'the-post-grid' ) . $ref->pro_label,
2289
+ 'type' => \Elementor\Controls_Manager::SELECT,
2290
+ 'default' => 'default',
2291
+ 'prefix_class' => 'title_position_',
2292
+ 'render_type' => 'template',
2293
+ 'classes' => rtTPG()->hasPro() ? '' : 'tpg-should-hide-field',
2294
+ 'options' => $title_position,
2295
+ 'description' => $ref->get_pro_message( 'more position (above/below image)' ),
2296
+ 'condition' => [
2297
+ $prefix . '_layout' => [
2298
+ 'grid-layout1',
2299
+ 'grid-layout2',
2300
+ 'grid-layout3',
2301
+ 'grid-layout4',
2302
+ 'slider-layout1',
2303
+ 'slider-layout2',
2304
+ 'slider-layout3',
2305
+ ],
2306
+ ],
2307
+ ]
2308
+ );
2309
+
2310
+ $ref->add_control(
2311
+ 'title_position_hidden',
2312
+ [
2313
+ 'label' => __( 'Title Position', 'the-post-grid' ),
2314
+ 'type' => \Elementor\Controls_Manager::SELECT,
2315
+ 'default' => 'default',
2316
+ 'prefix_class' => 'title_position_',
2317
+ 'render_type' => 'template',
2318
+ 'classes' => 'tpg-should-hide-field',
2319
+ 'options' => [
2320
+ 'default' => __( 'Default', 'the-post-grid' )
2321
+ ],
2322
+ 'condition' => [
2323
+ $prefix . '_layout!' => [
2324
+ 'grid-layout1',
2325
+ 'grid-layout2',
2326
+ 'grid-layout3',
2327
+ 'grid-layout4',
2328
+ 'slider-layout1',
2329
+ 'slider-layout2',
2330
+ 'slider-layout3',
2331
+ ],
2332
+ ],
2333
+ ]
2334
+ );
2335
+
2336
+ $ref->add_control(
2337
+ 'title_hover_underline',
2338
+ [
2339
+ 'label' => __( 'Title Hover Underline', 'the-post-grid' ),
2340
+ 'type' => \Elementor\Controls_Manager::SELECT,
2341
+ 'default' => 'default',
2342
+ 'prefix_class' => 'title_hover_border_',
2343
+ 'render_type' => 'template',
2344
+ 'options' => [
2345
+ 'default' => __( 'Default', 'the-post-grid' ),
2346
+ 'enable' => __( 'Enable', 'the-post-grid' ),
2347
+ 'disable' => __( 'Disable', 'the-post-grid' ),
2348
+ ],
2349
+ ]
2350
+ );
2351
+
2352
+
2353
+ $ref->end_controls_section();
2354
+ }
2355
+
2356
+
2357
+ /**
2358
+ * Post Excerpt Settings
2359
+ *
2360
+ * @param $ref
2361
+ */
2362
+
2363
+ public static function post_excerpt_settings( $ref ) {
2364
+ $prefix = $ref->prefix;
2365
+
2366
+ $ref->start_controls_section(
2367
+ 'post_excerpt_settings',
2368
+ [
2369
+ 'label' => esc_html__( 'Excerpt', 'the-post-grid' ),
2370
+ 'tab' => Controls_Manager::TAB_SETTINGS,
2371
+ 'condition' => [
2372
+ 'show_excerpt' => 'show',
2373
+ $prefix . '_layout!' => [ 'grid-layout7' ],
2374
+ ],
2375
+ ]
2376
+ );
2377
+
2378
+ $excerpt_type = [
2379
+ 'character' => __( 'Character', 'the-post-grid' ),
2380
+ 'word' => __( 'Word', 'the-post-grid' ),
2381
+ ];
2382
+
2383
+
2384
+ if ( in_array( $prefix, [ 'grid', 'list' ] ) ) {
2385
+ $excerpt_type['full'] = __( 'Full Content', 'the-post-grid' );
2386
+ }
2387
+
2388
+ $ref->add_control(
2389
+ 'excerpt_type',
2390
+ [
2391
+ 'label' => __( 'Excerpt Type', 'the-post-grid' ),
2392
+ 'type' => \Elementor\Controls_Manager::SELECT,
2393
+ 'default' => 'character',
2394
+ 'options' => $excerpt_type,
2395
+ ]
2396
+ );
2397
+
2398
+ $default_excerpt_limit = 100;
2399
+ if ( 'grid' == $prefix ) {
2400
+ $default_excerpt_limit = 200;
2401
+ }
2402
+
2403
+ $ref->add_control(
2404
+ 'excerpt_limit',
2405
+ [
2406
+ 'label' => __( 'Excerpt Limit', 'the-post-grid' ),
2407
+ 'type' => \Elementor\Controls_Manager::NUMBER,
2408
+ 'step' => 1,
2409
+ 'default' => $default_excerpt_limit,
2410
+ 'condition' => [
2411
+ 'excerpt_type' => [ 'character', 'word' ],
2412
+ ],
2413
+ ]
2414
+ );
2415
+
2416
+ $ref->add_control(
2417
+ 'excerpt_more_text',
2418
+ [
2419
+ 'label' => __( 'Expansion Indicator', 'the-post-grid' ),
2420
+ 'type' => \Elementor\Controls_Manager::TEXT,
2421
+ 'default' => '...',
2422
+ 'condition' => [
2423
+ 'excerpt_type' => [ 'character', 'word' ],
2424
+ ],
2425
+ ]
2426
+ );
2427
+
2428
+ $ref->end_controls_section();
2429
+ }
2430
+
2431
+ /**
2432
+ * Post Meta Settings
2433
+ *
2434
+ * @param $ref
2435
+ */
2436
+
2437
+ public static function post_meta_settings( $ref ) {
2438
+ $prefix = $ref->prefix;
2439
+
2440
+ $ref->start_controls_section(
2441
+ 'post_meta_settings',
2442
+ [
2443
+ 'label' => esc_html__( 'Meta Data', 'the-post-grid' ),
2444
+ 'tab' => Controls_Manager::TAB_SETTINGS,
2445
+ 'conditions' => [
2446
+ 'relation' => 'or',
2447
+ 'terms' => [
2448
+ [
2449
+ 'name' => 'show_date',
2450
+ 'operator' => '==',
2451
+ 'value' => 'show',
2452
+ ],
2453
+ [
2454
+ 'name' => 'show_category',
2455
+ 'operator' => '==',
2456
+ 'value' => 'show',
2457
+ ],
2458
+ [
2459
+ 'name' => 'show_author',
2460
+ 'operator' => '==',
2461
+ 'value' => 'show',
2462
+ ],
2463
+ [
2464
+ 'name' => 'show_tags',
2465
+ 'operator' => '==',
2466
+ 'value' => 'show',
2467
+ ],
2468
+ [
2469
+ 'name' => 'show_comment_count',
2470
+ 'operator' => '==',
2471
+ 'value' => 'show',
2472
+ ],
2473
+ [
2474
+ 'name' => 'show_post_count',
2475
+ 'operator' => '==',
2476
+ 'value' => 'show',
2477
+ ],
2478
+ ],
2479
+ ],
2480
+ 'condition' => [
2481
+ 'show_meta' => 'show',
2482
+ $prefix . '_layout!' => [ 'grid-layout7' ],
2483
+ ],
2484
+ ]
2485
+ );
2486
+
2487
+ $meta_position = [
2488
+ 'default' => __( 'Default', 'the-post-grid' ),
2489
+ ];
2490
+ if ( rtTPG()->hasPro() ) {
2491
+ $meta_position_pro = [
2492
+ 'above_title' => __( 'Above Title', 'the-post-grid' ),
2493
+ 'below_title' => __( 'Below Title', 'the-post-grid' ),
2494
+ 'above_excerpt' => __( 'Above excerpt', 'the-post-grid' ),
2495
+ 'below_excerpt' => __( 'Below excerpt', 'the-post-grid' ),
2496
+ ];
2497
+ $meta_position = array_merge( $meta_position, $meta_position_pro );
2498
+ }
2499
+
2500
+ $ref->add_control(
2501
+ 'meta_position',
2502
+ [
2503
+ 'label' => __( 'Meta Position', 'the-post-grid' ) . $ref->pro_label,
2504
+ 'type' => \Elementor\Controls_Manager::SELECT,
2505
+ 'default' => 'default',
2506
+ 'prefix_class' => 'meta_position_',
2507
+ 'render_type' => 'template',
2508
+ 'options' => $meta_position,
2509
+ 'classes' => rtTPG()->hasPro() ? '' : 'tpg-should-hide-field',
2510
+ ]
2511
+ );
2512
+
2513
+ $ref->add_control(
2514
+ 'show_meta_icon',
2515
+ [
2516
+ 'label' => __( 'Show Meta Icon', 'the-post-grid' ),
2517
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
2518
+ 'label_on' => __( 'Show', 'the-post-grid' ),
2519
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
2520
+ 'return_value' => 'yes',
2521
+ 'default' => 'yes',
2522
+ ]
2523
+ );
2524
+
2525
+ $ref->add_control(
2526
+ 'meta_separator',
2527
+ [
2528
+ 'label' => __( 'Meta Separator', 'the-post-grid' ),
2529
+ 'type' => \Elementor\Controls_Manager::SELECT,
2530
+ 'default' => 'default',
2531
+ 'options' => [
2532
+ 'default' => __( 'Default - None', 'the-post-grid' ),
2533
+ '.' => __( 'Dot ( . )', 'the-post-grid' ),
2534
+ '/' => __( 'Single Slash ( / )', 'the-post-grid' ),
2535
+ '//' => __( 'Double Slash ( // )', 'the-post-grid' ),
2536
+ '-' => __( 'Hyphen ( - )', 'the-post-grid' ),
2537
+ '|' => __( 'Vertical Pipe ( | )', 'the-post-grid' ),
2538
+ ],
2539
+ ]
2540
+ );
2541
+
2542
+
2543
+ $ref->add_control(
2544
+ 'meta_popover_toggle',
2545
+ [
2546
+ 'label' => __( 'Change Meta Icon', 'the-post-grid' ),
2547
+ 'type' => \Elementor\Controls_Manager::POPOVER_TOGGLE,
2548
+ 'label_off' => __( 'Default', 'the-post-grid' ),
2549
+ 'label_on' => __( 'Custom', 'the-post-grid' ),
2550
+ 'return_value' => 'yes',
2551
+ 'condition' => [
2552
+ 'show_meta_icon' => 'yes',
2553
+ ],
2554
+ ]
2555
+ );
2556
+
2557
+ $ref->start_popover();
2558
+
2559
+ $ref->add_control(
2560
+ 'user_icon',
2561
+ [
2562
+ 'label' => __( 'Author Icon', 'the-post-grid' ),
2563
+ 'type' => \Elementor\Controls_Manager::ICONS,
2564
+ 'default' => [
2565
+ 'value' => 'fas fa-user',
2566
+ 'library' => 'solid',
2567
+ ],
2568
+ 'condition' => [
2569
+ 'show_author_image!' => 'show',
2570
+ ],
2571
+ ]
2572
+ );
2573
+
2574
+ $ref->add_control(
2575
+ 'cat_icon',
2576
+ [
2577
+ 'label' => __( 'Category Icon', 'the-post-grid' ),
2578
+ 'type' => \Elementor\Controls_Manager::ICONS,
2579
+ 'default' => [
2580
+ 'value' => 'fas fa-folder-open',
2581
+ 'library' => 'solid',
2582
+ ],
2583
+ 'condition' => [
2584
+ 'show_category' => 'show',
2585
+ ],
2586
+ ]
2587
+ );
2588
+
2589
+ $ref->add_control(
2590
+ 'date_icon',
2591
+ [
2592
+ 'label' => __( 'Date Icon', 'the-post-grid' ),
2593
+ 'type' => \Elementor\Controls_Manager::ICONS,
2594
+ 'default' => [
2595
+ 'value' => 'far fa-calendar-alt',
2596
+ 'library' => 'solid',
2597
+ ],
2598
+ 'condition' => [
2599
+ 'show_date' => 'show',
2600
+ ],
2601
+ ]
2602
+ );
2603
+
2604
+ $ref->add_control(
2605
+ 'tag_icon',
2606
+ [
2607
+ 'label' => __( 'Tags Icon', 'the-post-grid' ),
2608
+ 'type' => \Elementor\Controls_Manager::ICONS,
2609
+ 'default' => [
2610
+ 'value' => 'fa fa-tags',
2611
+ 'library' => 'solid',
2612
+ ],
2613
+ 'condition' => [
2614
+ 'show_tags' => 'show',
2615
+ ],
2616
+ ]
2617
+ );
2618
+
2619
+ $ref->add_control(
2620
+ 'comment_icon',
2621
+ [
2622
+ 'label' => __( 'Comment Icon', 'the-post-grid' ),
2623
+ 'type' => \Elementor\Controls_Manager::ICONS,
2624
+ 'default' => [
2625
+ 'value' => 'fas fa-comments',
2626
+ 'library' => 'solid',
2627
+ ],
2628
+ 'condition' => [
2629
+ 'show_comment_count' => 'show',
2630
+ ],
2631
+ ]
2632
+ );
2633
+
2634
+ $ref->add_control(
2635
+ 'post_count_icon',
2636
+ [
2637
+ 'label' => __( 'Post Count Icon', 'the-post-grid' ),
2638
+ 'type' => \Elementor\Controls_Manager::ICONS,
2639
+ 'default' => [
2640
+ 'value' => 'fas fa-eye',
2641
+ 'library' => 'solid',
2642
+ ],
2643
+ 'condition' => [
2644
+ 'show_post_count' => 'show',
2645
+ ],
2646
+ ]
2647
+ );
2648
+
2649
+ $ref->end_popover();
2650
+
2651
+
2652
+ /**
2653
+ * TODO: Author Style
2654
+ * ********************
2655
+ */
2656
+
2657
+ $ref->add_control(
2658
+ 'meta_author_divider',
2659
+ [
2660
+ 'type' => \Elementor\Controls_Manager::DIVIDER,
2661
+ 'condition' => [
2662
+ 'show_author!' => '',
2663
+ ],
2664
+ ]
2665
+ );
2666
+
2667
+ $ref->add_control(
2668
+ 'meta_author_heading',
2669
+ [
2670
+ 'label' => __( 'Author Setting:', 'the-post-grid' ),
2671
+ 'type' => \Elementor\Controls_Manager::HEADING,
2672
+ 'classes' => 'tpg-control-type-heading',
2673
+ 'condition' => [
2674
+ 'show_author!' => '',
2675
+ ],
2676
+ ]
2677
+ );
2678
+
2679
+ $ref->add_control(
2680
+ 'author_prefix',
2681
+ [
2682
+ 'label' => __( 'Author Prefix', 'the-post-grid' ),
2683
+ 'type' => \Elementor\Controls_Manager::TEXT,
2684
+ 'placeholder' => __( 'By', 'the-post-grid' ),
2685
+ 'condition' => [
2686
+ 'show_author!' => '',
2687
+ ],
2688
+ ]
2689
+ );
2690
+
2691
+ $ref->add_control(
2692
+ 'author_icon_visibility',
2693
+ [
2694
+ 'label' => __( 'Author Icon Visibility', 'the-post-grid' ),
2695
+ 'type' => \Elementor\Controls_Manager::SELECT,
2696
+ 'default' => 'default',
2697
+ 'options' => [
2698
+ 'default' => __( 'Default', 'the-post-grid' ),
2699
+ 'hide' => __( 'Hide', 'the-post-grid' ),
2700
+ 'show' => __( 'Show', 'the-post-grid' ),
2701
+ ],
2702
+ 'condition' => [
2703
+ 'show_author!' => '',
2704
+ ],
2705
+ 'prefix_class' => 'tpg-is-author-icon-',
2706
+ ]
2707
+ );
2708
+
2709
+ $ref->add_control(
2710
+ 'show_author_image',
2711
+ [
2712
+ 'label' => __( 'Author Image / Icon', 'the-post-grid' ),
2713
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
2714
+ 'label_on' => __( 'Image', 'the-post-grid' ),
2715
+ 'label_off' => __( 'Icon', 'the-post-grid' ),
2716
+ 'return_value' => 'show',
2717
+ 'default' => 'show',
2718
+ 'render_type' => 'template',
2719
+ 'prefix_class' => 'author-image-visibility-',
2720
+ 'condition' => [
2721
+ 'show_author!' => '',
2722
+ 'author_icon_visibility!' => 'hide',
2723
+ $prefix . '_layout!' => [ 'grid-layout7' ],
2724
+ ],
2725
+ ]
2726
+ );
2727
+
2728
+ $ref->add_responsive_control(
2729
+ 'author_icon_width',
2730
+ [
2731
+ 'label' => __( 'Author Image Width', 'the-post-grid' ),
2732
+ 'type' => Controls_Manager::SLIDER,
2733
+ 'size_units' => [ 'px' ],
2734
+ 'range' => [
2735
+ 'px' => [
2736
+ 'min' => 10,
2737
+ 'max' => 100,
2738
+ 'step' => 1,
2739
+ ],
2740
+ ],
2741
+ 'selectors' => [
2742
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags span img' => 'width: {{SIZE}}{{UNIT}} !important;max-width:{{SIZE}}{{UNIT}};height:{{SIZE}}{{UNIT}} !important;',
2743
+ ],
2744
+ 'condition' => [
2745
+ 'show_author!' => '',
2746
+ 'show_author_image!' => '',
2747
+ ],
2748
+ ]
2749
+ );
2750
+
2751
+ /**
2752
+ * TODO: Category Style
2753
+ * ********************
2754
+ */
2755
+
2756
+ $ref->add_control(
2757
+ 'category_heading',
2758
+ [
2759
+ 'label' => __( 'Category and Tags Setting:', 'the-post-grid' ),
2760
+ 'type' => \Elementor\Controls_Manager::HEADING,
2761
+ 'classes' => 'tpg-control-type-heading',
2762
+ 'conditions' => [
2763
+ 'relation' => 'or',
2764
+ 'terms' => [
2765
+ [
2766
+ 'name' => 'show_category',
2767
+ 'operator' => '==',
2768
+ 'value' => 'show',
2769
+ ],
2770
+ [
2771
+ 'name' => 'show_tags',
2772
+ 'operator' => '==',
2773
+ 'value' => 'show',
2774
+ ],
2775
+ ],
2776
+ ],
2777
+ ]
2778
+ );
2779
+
2780
+
2781
+ $ref->add_control(
2782
+ 'category_position',
2783
+ [
2784
+ 'label' => __( 'Category Position', 'the-post-grid' ) . $ref->pro_label,
2785
+ 'type' => \Elementor\Controls_Manager::SELECT,
2786
+ 'default' => 'default',
2787
+ 'options' => [
2788
+ 'default' => __( 'Default', 'the-post-grid' ),
2789
+ 'above_title' => __( 'Above Title', 'the-post-grid' ),
2790
+ 'with_meta' => __( 'With Meta', 'the-post-grid' ),
2791
+ 'top_left' => __( 'Over image (Top Left)', 'the-post-grid' ),
2792
+ 'top_right' => __( 'Over image (Top Right)', 'the-post-grid' ),
2793
+ 'bottom_left' => __( 'Over image (Bottom Left)', 'the-post-grid' ),
2794
+ 'bottom_right' => __( 'Over image (Bottom Right)', 'the-post-grid' ),
2795
+ 'image_center' => __( 'Over image (Center)', 'the-post-grid' ),
2796
+ ],
2797
+ 'condition' => [
2798
+ 'show_category' => 'show',
2799
+ ],
2800
+ 'render_type' => 'template',
2801
+ 'divider' => 'before',
2802
+ 'prefix_class' => 'tpg-category-position-',
2803
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
2804
+ ]
2805
+ );
2806
+
2807
+ $ref->add_control(
2808
+ 'category_style',
2809
+ [
2810
+ 'label' => __( 'Category Style', 'the-post-grid' ) . $ref->pro_label,
2811
+ 'type' => \Elementor\Controls_Manager::SELECT,
2812
+ 'default' => 'style1',
2813
+ 'options' => [
2814
+ 'style1' => __( 'Style 1', 'the-post-grid' ),
2815
+ 'style2' => __( 'Style 2', 'the-post-grid' ),
2816
+ 'style3' => __( 'Style 3', 'the-post-grid' ),
2817
+ ],
2818
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
2819
+ 'condition' => [
2820
+ 'category_position!' => 'default',
2821
+ ],
2822
+ ]
2823
+ );
2824
+
2825
+ if ( rtTPG()->hasPro() ) {
2826
+ $ref->add_control(
2827
+ 'show_cat_icon',
2828
+ [
2829
+ 'label' => __( 'Show Over Image Category Icon', 'the-post-grid' ),
2830
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
2831
+ 'label_on' => __( 'Show', 'the-post-grid' ),
2832
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
2833
+ 'return_value' => 'yes',
2834
+ 'default' => false,
2835
+ 'condition' => [
2836
+ 'category_position!' => 'default',
2837
+ ],
2838
+ ]
2839
+ );
2840
+ }
2841
+
2842
+ $post_types = Fns::get_post_types();
2843
+ foreach ( $post_types as $post_type => $label ) {
2844
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
2845
+ if ( empty( $_taxonomies ) ) {
2846
+ continue;
2847
+ }
2848
+ $term_options = [];
2849
+ foreach ( $_taxonomies as $tax ) {
2850
+ if ( 'post_format' == $tax->name ) {
2851
+ continue;
2852
+ }
2853
+ $term_options[ $tax->name ] = $tax->label;
2854
+ }
2855
+
2856
+ if ( 'post' === $post_type ) {
2857
+ $default_cat = 'category';
2858
+ $default_tag = 'post_tag';
2859
+ } elseif ( 'product' === $post_type ) {
2860
+ $default_cat = 'product_cat';
2861
+ $default_tag = 'product_tag';
2862
+ } elseif ( 'download' === $post_type ) {
2863
+ $default_cat = 'download_category';
2864
+ $default_tag = 'download_tag';
2865
+ } elseif ( 'docs' === $post_type ) {
2866
+ $default_cat = 'doc_category';
2867
+ $default_tag = 'doc_tag';
2868
+ } elseif ( 'lp_course' === $post_type ) {
2869
+ $default_cat = 'course_category';
2870
+ $default_tag = 'course_tag';
2871
+ } else {
2872
+ $taxonomie_keys = array_keys( $_taxonomies );
2873
+ $filter_cat = array_filter(
2874
+ $taxonomie_keys,
2875
+ function ( $item ) {
2876
+ return strpos( $item, 'cat' ) !== false;
2877
+ }
2878
+ );
2879
+ $filter_tag = array_filter(
2880
+ $taxonomie_keys,
2881
+ function ( $item ) {
2882
+ return strpos( $item, 'tag' ) !== false;
2883
+ }
2884
+ );
2885
+
2886
+ if ( is_array( $filter_cat ) && ! empty( $filter_cat ) ) {
2887
+ $default_cat = array_shift( $filter_cat );
2888
+ }
2889
+ if ( is_array( $filter_tag ) && ! empty( $filter_tag ) ) {
2890
+ $default_tag = array_shift( $filter_tag );
2891
+ }
2892
+ }
2893
+
2894
+ $ref->add_control(
2895
+ $post_type . '_taxonomy',
2896
+ [
2897
+ 'label' => __( 'Category Source', 'the-post-grid' ),
2898
+ 'type' => \Elementor\Controls_Manager::SELECT,
2899
+ 'default' => $default_cat,
2900
+ 'options' => $term_options,
2901
+ 'condition' => [
2902
+ 'show_category' => 'show',
2903
+ 'post_type' => $post_type,
2904
+ ],
2905
+ 'description' => __( 'Select which taxonomy should sit in the place of categories. Default: Category', 'the-post-grid' ),
2906
+ ]
2907
+ );
2908
+
2909
+ $ref->add_control(
2910
+ $post_type . '_tags',
2911
+ [
2912
+ 'label' => __( 'Tags Source', 'the-post-grid' ),
2913
+ 'type' => \Elementor\Controls_Manager::SELECT,
2914
+ 'default' => $default_tag,
2915
+ 'options' => $term_options,
2916
+ 'condition' => [
2917
+ 'show_category' => 'show',
2918
+ 'post_type' => $post_type,
2919
+ ],
2920
+ 'description' => __( 'Select which taxonomy should sit in the place of tags. Default: Tags', 'the-post-grid' ),
2921
+ ]
2922
+ );
2923
+ }
2924
+
2925
+ $ref->add_control(
2926
+ 'comment_count_heading',
2927
+ [
2928
+ 'label' => __( 'Comment Count ', 'the-post-grid' ),
2929
+ 'type' => \Elementor\Controls_Manager::HEADING,
2930
+ 'classes' => 'tpg-control-type-heading',
2931
+ 'condition' => [
2932
+ 'show_comment_count' => 'show',
2933
+ ],
2934
+ ]
2935
+ );
2936
+
2937
+ $ref->add_control(
2938
+ 'show_comment_count_label',
2939
+ [
2940
+ 'label' => __( 'Show Comment Label', 'the-post-grid' ),
2941
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
2942
+ 'label_on' => __( 'Show', 'the-post-grid' ),
2943
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
2944
+ 'return_value' => 'yes',
2945
+ 'default' => 'yes',
2946
+ 'condition' => [
2947
+ 'show_comment_count' => 'show',
2948
+ ],
2949
+ ]
2950
+ );
2951
+
2952
+ $ref->add_control(
2953
+ 'comment_count_label_singular',
2954
+ [
2955
+ 'label' => __( 'Comment Label Singular', 'the-post-grid' ),
2956
+ 'type' => \Elementor\Controls_Manager::TEXT,
2957
+ 'default' => __( 'Comment', 'the-post-grid' ),
2958
+ 'placeholder' => __( 'Type your title here', 'the-post-grid' ),
2959
+ 'condition' => [
2960
+ 'show_comment_count' => 'show',
2961
+ 'show_comment_count_label' => 'yes',
2962
+ ],
2963
+ ]
2964
+ );
2965
+
2966
+ $ref->add_control(
2967
+ 'comment_count_label_plural',
2968
+ [
2969
+ 'label' => __( 'Comment Label Plural', 'the-post-grid' ),
2970
+ 'type' => \Elementor\Controls_Manager::TEXT,
2971
+ 'default' => __( 'Comments', 'the-post-grid' ),
2972
+ 'placeholder' => __( 'Type your title here', 'the-post-grid' ),
2973
+ 'condition' => [
2974
+ 'show_comment_count' => 'show',
2975
+ 'show_comment_count_label' => 'yes',
2976
+ ],
2977
+ ]
2978
+ );
2979
+
2980
+ $ref->add_control(
2981
+ 'meta_ordering_heading',
2982
+ [
2983
+ 'label' => __( 'Meta Ordering', 'the-post-grid' ),
2984
+ 'type' => \Elementor\Controls_Manager::HEADING,
2985
+ 'classes' => 'tpg-control-type-heading',
2986
+ ]
2987
+ );
2988
+
2989
+ $repeater = new \Elementor\Repeater();
2990
+
2991
+ $repeater->add_control(
2992
+ 'repeater_hidden',
2993
+ [
2994
+ 'type' => \Elementor\Controls_Manager::HIDDEN,
2995
+ ]
2996
+ );
2997
+
2998
+ $ref->add_control(
2999
+ 'meta_ordering',
3000
+ [
3001
+ 'label' => esc_html__( 'Meta Ordering (Drag and Drop)', 'the-post-grid' ),
3002
+ 'type' => \Elementor\Controls_Manager::REPEATER,
3003
+ 'fields' => $repeater->get_controls(),
3004
+ 'default' => [
3005
+ [
3006
+ 'meta_title' => esc_html__( 'Author', 'the-post-grid' ),
3007
+ 'meta_name' => 'author',
3008
+ ],
3009
+ [
3010
+ 'meta_title' => esc_html__( 'Date', 'the-post-grid' ),
3011
+ 'meta_name' => 'date',
3012
+ ],
3013
+ [
3014
+ 'meta_title' => esc_html__( 'Category', 'the-post-grid' ),
3015
+ 'meta_name' => 'category',
3016
+ ],
3017
+ [
3018
+ 'meta_title' => esc_html__( 'Tags', 'the-post-grid' ),
3019
+ 'meta_name' => 'tags',
3020
+ ],
3021
+ [
3022
+ 'meta_title' => esc_html__( 'Comment Count', 'the-post-grid' ),
3023
+ 'meta_name' => 'comment_count',
3024
+ ],
3025
+ [
3026
+ 'meta_title' => esc_html__( 'Post Count', 'the-post-grid' ),
3027
+ 'meta_name' => 'post_count',
3028
+ ],
3029
+ [
3030
+ 'meta_title' => esc_html__( 'Post Like', 'the-post-grid' ),
3031
+ 'meta_name' => 'post_like',
3032
+ ],
3033
+ ],
3034
+ 'classes' => 'tpg-item-order-repeater',
3035
+ 'title_field' => '{{{ meta_title }}}',
3036
+ ]
3037
+ );
3038
+
3039
+ $ref->end_controls_section();
3040
+ }
3041
+
3042
+
3043
+ /**
3044
+ * Read More Settings
3045
+ *
3046
+ * @param $ref
3047
+ */
3048
+
3049
+ public static function post_readmore_settings( $ref ) {
3050
+ $prefix = $ref->prefix;
3051
+
3052
+ $ref->start_controls_section(
3053
+ 'post_readmore_settings',
3054
+ [
3055
+ 'label' => esc_html__( 'Read More', 'the-post-grid' ),
3056
+ 'tab' => Controls_Manager::TAB_SETTINGS,
3057
+ 'condition' => [
3058
+ 'show_read_more' => 'show',
3059
+ $prefix . '_layout!' => [ 'grid-layout7' ],
3060
+ ],
3061
+ ]
3062
+ );
3063
+
3064
+
3065
+ $ref->add_control(
3066
+ 'readmore_btn_style',
3067
+ [
3068
+ 'label' => __( 'Button Style', 'the-post-grid' ),
3069
+ 'type' => \Elementor\Controls_Manager::SELECT,
3070
+ 'default' => 'default-style',
3071
+ 'options' => [
3072
+ 'default-style' => __( 'Default from style', 'the-post-grid' ),
3073
+ 'only-text' => __( 'Only Text Button', 'the-post-grid' ),
3074
+ ],
3075
+ 'prefix_class' => 'readmore-btn-',
3076
+ ]
3077
+ );
3078
+
3079
+ $ref->add_control(
3080
+ 'read_more_label',
3081
+ [
3082
+ 'label' => __( 'Read More Label', 'the-post-grid' ),
3083
+ 'type' => \Elementor\Controls_Manager::TEXT,
3084
+ 'default' => __( 'Read More', 'the-post-grid' ),
3085
+ 'placeholder' => __( 'Type Read More Label here', 'the-post-grid' ),
3086
+ ]
3087
+ );
3088
+
3089
+
3090
+ $ref->add_control(
3091
+ 'show_btn_icon',
3092
+ [
3093
+ 'label' => __( 'Show Button Icon', 'the-post-grid' ),
3094
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
3095
+ 'label_on' => __( 'Show', 'the-post-grid' ),
3096
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
3097
+ 'return_value' => 'yes',
3098
+ 'default' => false,
3099
+ ]
3100
+ );
3101
+
3102
+ $ref->add_control(
3103
+ 'readmore_btn_icon',
3104
+ [
3105
+ 'label' => __( 'Choose Icon', 'the-post-grid' ),
3106
+ 'type' => \Elementor\Controls_Manager::ICONS,
3107
+ 'default' => [
3108
+ 'value' => 'fas fa-angle-right',
3109
+ 'library' => 'solid',
3110
+ ],
3111
+ 'condition' => [
3112
+ 'show_btn_icon' => 'yes',
3113
+ ],
3114
+ ]
3115
+ );
3116
+
3117
+ $ref->end_controls_section();
3118
+ }
3119
+
3120
+
3121
+ /**
3122
+ * Advanced Custom Field ACF Settings
3123
+ *
3124
+ * @param $ref
3125
+ */
3126
+
3127
+ public static function tpg_acf_settings( $ref ) {
3128
+ $prefix = $ref->prefix;
3129
+ $cf = Fns::is_acf();
3130
+
3131
+ if ( ! $cf || ! rtTPG()->hasPro() ) {
3132
+ return;
3133
+ }
3134
+
3135
+ $ref->start_controls_section(
3136
+ 'tgp_acf_settings',
3137
+ [
3138
+ 'label' => esc_html__( 'ACF Settings', 'the-post-grid' ),
3139
+ 'tab' => Controls_Manager::TAB_SETTINGS,
3140
+ 'condition' => [
3141
+ 'show_acf' => 'show',
3142
+ $prefix . '_layout!' => [ 'grid-layout7' ],
3143
+ ],
3144
+ ]
3145
+ );
3146
+
3147
+ self::get_tpg_acf_settings( $ref );
3148
+
3149
+ $ref->end_controls_section();
3150
+ }
3151
+
3152
+ public static function get_tpg_acf_settings( $ref ) {
3153
+ // $ref->add_control(
3154
+ // 'cf_group',
3155
+ // [
3156
+ // 'label' => __( 'Choose Advanced Custom Field (ACF)', 'the-post-grid' ),
3157
+ // 'type' => \Elementor\Controls_Manager::SELECT2,
3158
+ // 'multiple' => true,
3159
+ // 'label_block' => true,
3160
+ // 'default' => [ $selected_acf_id ],
3161
+ // 'options' => Fns::get_groups_by_post_type( 'post' ),
3162
+ // 'condition' => [
3163
+ // 'show_acf' => 'show',
3164
+ // ],
3165
+ // ]
3166
+ // );
3167
+
3168
+ $post_types = Fns::get_post_types();
3169
+
3170
+ foreach ( $post_types as $post_type => $post_type_title ) {
3171
+ $get_acf_field = Fns::get_groups_by_post_type( $post_type );
3172
+ $selected_acf_id = '';
3173
+ if ( ! empty( $get_acf_field ) && is_array( $get_acf_field ) ) {
3174
+ $selected_acf_id = array_key_first( $get_acf_field );
3175
+ }
3176
+
3177
+ $ref->add_control(
3178
+ $post_type . '_cf_group',
3179
+ [
3180
+ 'label' => __( "Choose Advanced Custom Field (ACF)", 'the-post-grid' ),
3181
+ 'type' => \Elementor\Controls_Manager::SELECT2,
3182
+ 'label_block' => true,
3183
+ 'multiple' => true,
3184
+ 'default' => [ $selected_acf_id ],
3185
+ 'options' => Fns::get_groups_by_post_type( $post_type ),
3186
+ 'condition' => [
3187
+ 'post_type' => $post_type,
3188
+ ],
3189
+ ]
3190
+ );
3191
+ }
3192
+
3193
+ $ref->add_control(
3194
+ 'cf_hide_empty_value',
3195
+ [
3196
+ 'label' => __( 'Hide field with empty value?', 'the-post-grid' ),
3197
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
3198
+ 'label_on' => __( 'No', 'the-post-grid' ),
3199
+ 'label_off' => __( 'Yes', 'the-post-grid' ),
3200
+ 'return_value' => 'yes',
3201
+ 'default' => 'yes',
3202
+ ]
3203
+ );
3204
+
3205
+ $ref->add_control(
3206
+ 'cf_hide_group_title',
3207
+ [
3208
+ 'label' => __( 'Show group title?', 'the-post-grid' ),
3209
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
3210
+ 'label_on' => __( 'No', 'the-post-grid' ),
3211
+ 'label_off' => __( 'Yes', 'the-post-grid' ),
3212
+ 'return_value' => 'yes',
3213
+ 'default' => 'yes',
3214
+ ]
3215
+ );
3216
+
3217
+ $ref->add_control(
3218
+ 'cf_show_only_value',
3219
+ [
3220
+ 'label' => __( 'Show label?', 'the-post-grid' ),
3221
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
3222
+ 'label_on' => __( 'No', 'the-post-grid' ),
3223
+ 'label_off' => __( 'Yes', 'the-post-grid' ),
3224
+ 'return_value' => 'yes',
3225
+ 'default' => 'yes',
3226
+ ]
3227
+ );
3228
+ }
3229
+
3230
+
3231
+ /**
3232
+ * Links Settings
3233
+ *
3234
+ * @param $ref
3235
+ */
3236
+ public static function links( $ref ) {
3237
+ $prefix = $ref->prefix;
3238
+
3239
+ $ref->start_controls_section(
3240
+ 'tpg_links_settings',
3241
+ [
3242
+ 'label' => esc_html__( 'Links', 'the-post-grid' ),
3243
+ 'tab' => Controls_Manager::TAB_CONTENT,
3244
+ 'condition' => [
3245
+ $prefix . '_layout!' => [ 'grid-layout7' ],
3246
+ ],
3247
+
3248
+ ]
3249
+ );
3250
+
3251
+ $link_type = [
3252
+ 'default' => __( 'Link to details page', 'the-post-grid' ),
3253
+ ];
3254
+ if ( rtTPG()->hasPro() ) {
3255
+ $link_type['popup'] = __( 'Single Popup', 'the-post-grid' );
3256
+ $link_type['multi_popup'] = __( 'Multi Popup', 'the-post-grid' );
3257
+ }
3258
+ $link_type['none'] = __( 'No Link', 'the-post-grid' );
3259
+
3260
+ $ref->add_control(
3261
+ 'post_link_type',
3262
+ [
3263
+ 'label' => __( 'Post link type', 'the-post-grid' ),
3264
+ 'type' => \Elementor\Controls_Manager::SELECT,
3265
+ 'default' => 'default',
3266
+ 'options' => $link_type,
3267
+ 'description' => $ref->get_pro_message( 'popup options' ),
3268
+ ]
3269
+ );
3270
+
3271
+ $ref->add_control(
3272
+ 'link_target',
3273
+ [
3274
+ 'label' => __( 'Link Target', 'the-post-grid' ),
3275
+ 'type' => \Elementor\Controls_Manager::SELECT,
3276
+ 'default' => '_self',
3277
+ 'options' => [
3278
+ '_self' => __( 'Same Window', 'the-post-grid' ),
3279
+ '_blank' => __( 'New Window', 'the-post-grid' ),
3280
+ ],
3281
+ 'condition' => [
3282
+ 'post_link_type' => 'default',
3283
+ ],
3284
+ ]
3285
+ );
3286
+
3287
+ $ref->add_control(
3288
+ 'is_thumb_linked',
3289
+ [
3290
+ 'label' => __( 'Thumbnail Link', 'the-post-grid' ),
3291
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
3292
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
3293
+ 'label_off' => __( 'No', 'the-post-grid' ),
3294
+ 'return_value' => 'yes',
3295
+ 'default' => 'yes',
3296
+ ]
3297
+ );
3298
+
3299
+ $ref->end_controls_section();
3300
+ }
3301
+
3302
+
3303
+ /**
3304
+ * Promotions
3305
+ *
3306
+ * @param $ref
3307
+ */
3308
+ public static function promotions( $ref ) {
3309
+ if ( rtTPG()->hasPro() ) {
3310
+ return;
3311
+ }
3312
+ $pro_url = "//www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/";
3313
+
3314
+ $ref->start_controls_section(
3315
+ 'tpg_pro_alert',
3316
+ [
3317
+ 'label' => sprintf(
3318
+ '<span style="color: #f54">%s</span>',
3319
+ __( 'Go Premium for More Features', 'the-post-grid' )
3320
+ ),
3321
+ ]
3322
+ );
3323
+
3324
+ $ref->add_control(
3325
+ 'tpg_control_get_pro',
3326
+ [
3327
+ 'type' => Controls_Manager::RAW_HTML,
3328
+ 'raw' => '<div class="elementor-nerd-box"><div class="elementor-nerd-box-title" style="margin-top: 0; margin-bottom: 20px;">Unlock more possibilities</div><div class="elementor-nerd-box-message"><span class="pro-feature" style="font-size: 13px;"> Get the <a href="'
3329
+ . $pro_url
3330
+ . '" target="_blank" style="color: #f54">Pro version</a> for more stunning layouts and customization options.</span></div><a class="elementor-nerd-box-link elementor-button elementor-button-default elementor-button-go-pro" href="'
3331
+ . $pro_url . '" target="_blank">Get Pro</a></div>',
3332
+ ]
3333
+ );
3334
+
3335
+ $ref->end_controls_section();
3336
+ }
3337
+
3338
+
3339
+ /**
3340
+ * Section Title Style
3341
+ *
3342
+ * @param $ref
3343
+ */
3344
+ public static function sectionTitle( $ref, $layout_type = '' ) {
3345
+ $prefix = $ref->prefix;
3346
+ $ref->start_controls_section(
3347
+ 'tpg_section_title_style',
3348
+ [
3349
+ 'label' => esc_html__( 'Section Title', 'the-post-grid' ),
3350
+ 'tab' => Controls_Manager::TAB_STYLE,
3351
+ 'condition' => [
3352
+ 'show_section_title' => 'show',
3353
+ ],
3354
+ ]
3355
+ );
3356
+
3357
+ $section_title_condition = [];
3358
+ if ( 'archive' !== $layout_type ) {
3359
+ $section_title_condition = [
3360
+ 'filter_btn_style!' => 'carousel',
3361
+ ];
3362
+ }
3363
+
3364
+ $ref->add_responsive_control(
3365
+ 'section_title_alignment',
3366
+ [
3367
+ 'label' => __( 'Alignment', 'the-post-grid' ),
3368
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
3369
+ 'options' => [
3370
+ 'left' => [
3371
+ 'title' => __( 'Left', 'the-post-grid' ),
3372
+ 'icon' => 'eicon-text-align-left',
3373
+ ],
3374
+ 'center' => [
3375
+ 'title' => __( 'Center', 'the-post-grid' ),
3376
+ 'icon' => 'eicon-text-align-center',
3377
+ ],
3378
+ 'right' => [
3379
+ 'title' => __( 'Right', 'the-post-grid' ),
3380
+ 'icon' => 'eicon-text-align-right',
3381
+ ],
3382
+ ],
3383
+ 'render_type' => 'template',
3384
+ 'prefix_class' => 'section-title-align-',
3385
+ 'condition' => $section_title_condition,
3386
+ ]
3387
+ );
3388
+
3389
+
3390
+ $ref->add_responsive_control(
3391
+ 'section_title_margin',
3392
+ [
3393
+ 'label' => __( 'Margin Y axis', 'the-post-grid' ),
3394
+ 'type' => Controls_Manager::DIMENSIONS,
3395
+ 'size_units' => [ 'px' ],
3396
+ 'allowed_dimensions' => 'vertical', //horizontal, vertical, [ 'top', 'right', 'bottom', 'left' ]
3397
+ 'default' => [
3398
+ 'top' => '',
3399
+ 'right' => '',
3400
+ 'bottom' => '',
3401
+ 'left' => '',
3402
+ 'isLinked' => false,
3403
+ ],
3404
+ 'selectors' => [
3405
+ '{{WRAPPER}} .tpg-widget-heading-wrapper' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',
3406
+ ],
3407
+ ]
3408
+ );
3409
+
3410
+ if ( 'slider' === $prefix ) {
3411
+ $ref->add_responsive_control(
3412
+ 'section_title_padding',
3413
+ [
3414
+ 'label' => __( 'Padding', 'the-post-grid' ),
3415
+ 'type' => Controls_Manager::DIMENSIONS,
3416
+ 'size_units' => [ 'px' ],
3417
+ 'allowed_dimensions' => 'all', //horizontal, vertical, [ 'top', 'right', 'bottom', 'left' ]
3418
+ 'default' => [
3419
+ 'top' => '',
3420
+ 'right' => '',
3421
+ 'bottom' => '',
3422
+ 'left' => '',
3423
+ 'isLinked' => false,
3424
+ ],
3425
+ 'selectors' => [
3426
+ '{{WRAPPER}} .slider-layout-main .tpg-widget-heading-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3427
+ ],
3428
+ ]
3429
+ );
3430
+ }
3431
+
3432
+ $ref->add_group_control(
3433
+ \Elementor\Group_Control_Typography::get_type(),
3434
+ [
3435
+ 'name' => 'section_title_typography',
3436
+ 'label' => __( 'Typography', 'the-post-grid' ),
3437
+ 'selector' => '{{WRAPPER}} .tpg-widget-heading-wrapper .tpg-widget-heading',
3438
+ ]
3439
+ );
3440
+
3441
+ $ref->add_control(
3442
+ 'section_title_color',
3443
+ [
3444
+ 'label' => __( 'Title Color', 'the-post-grid' ),
3445
+ 'type' => \Elementor\Controls_Manager::COLOR,
3446
+ 'selectors' => [
3447
+ '{{WRAPPER}} .tpg-widget-heading-wrapper .tpg-widget-heading' => 'color: {{VALUE}}',
3448
+ ],
3449
+ ]
3450
+ );
3451
+
3452
+ $ref->add_control(
3453
+ 'section_title_bg_color',
3454
+ [
3455
+ 'label' => __( 'Title Background Color', 'the-post-grid' ),
3456
+ 'type' => \Elementor\Controls_Manager::COLOR,
3457
+ 'selectors' => [
3458
+ '{{WRAPPER}} .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading, {{WRAPPER}} .tpg-widget-heading-wrapper.heading-style3 .tpg-widget-heading' => 'background-color: {{VALUE}}',
3459
+ '{{WRAPPER}} .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::after, {{WRAPPER}} .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::before' => 'border-color: {{VALUE}} transparent',
3460
+ ],
3461
+ 'condition' => [
3462
+ 'section_title_style' => [ 'style2', 'style3' ],
3463
+ ],
3464
+ ]
3465
+ );
3466
+
3467
+
3468
+ $ref->add_control(
3469
+ 'section_title_dot_color',
3470
+ [
3471
+ 'label' => __( 'Dot Color', 'the-post-grid' ),
3472
+ 'type' => \Elementor\Controls_Manager::COLOR,
3473
+ 'selectors' => [
3474
+ '{{WRAPPER}} .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading::before' => 'background-color: {{VALUE}}',
3475
+ ],
3476
+ 'condition' => [
3477
+ 'section_title_style' => 'style1',
3478
+ ],
3479
+ ]
3480
+ );
3481
+
3482
+ $ref->add_control(
3483
+ 'section_title_line_color',
3484
+ [
3485
+ 'label' => __( 'Line / Border Color', 'the-post-grid' ),
3486
+ 'type' => \Elementor\Controls_Manager::COLOR,
3487
+ 'selectors' => [
3488
+ '{{WRAPPER}} .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line' => 'border-color: {{VALUE}}',
3489
+ //'{{WRAPPER}}.section-title-style-style2 .tpg-header-wrapper, {{WRAPPER}}.section-title-style-style3 .tpg-header-wrapper' => 'border-bottom-color: {{VALUE}}',
3490
+ '{{WRAPPER}}.section-title-style-style2 .tpg-header-wrapper:not(.carousel) .tpg-widget-heading-wrapper,{{WRAPPER}}.section-title-style-style3 .tpg-header-wrapper:not(.carousel) .tpg-widget-heading-wrapper,{{WRAPPER}}.section-title-style-style2 .tpg-header-wrapper.carousel, {{WRAPPER}}.section-title-style-style3 .tpg-header-wrapper.carousel' => 'border-bottom-color: {{VALUE}}',
3491
+ '{{WRAPPER}}.section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide.selected, {{WRAPPER}}.section-title-style-style3 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide.selected' => 'color: {{VALUE}}',
3492
+ '{{WRAPPER}}.section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide:hover, {{WRAPPER}}.section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide:hover' => 'color: {{VALUE}}',
3493
+ '{{WRAPPER}}.section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide::before, {{WRAPPER}}.section-title-style-style3 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide::before' => 'border-bottom-color: {{VALUE}}',
3494
+
3495
+ ],
3496
+ 'condition' => [
3497
+ 'section_title_style!' => 'default',
3498
+ ],
3499
+ ]
3500
+ );
3501
+
3502
+ $ref->add_control(
3503
+ 'prefix_text_color',
3504
+ [
3505
+ 'label' => __( 'Prefix Color', 'the-post-grid' ),
3506
+ 'type' => \Elementor\Controls_Manager::COLOR,
3507
+ 'selectors' => [
3508
+ '{{WRAPPER}} .tpg-widget-heading-wrapper .tpg-widget-heading .prefix-text' => 'color: {{VALUE}}',
3509
+ ],
3510
+ 'condition' => [
3511
+ 'section_title_source' => 'page_title',
3512
+ ],
3513
+ ]
3514
+ );
3515
+ $ref->add_control(
3516
+ 'suffix_text_color',
3517
+ [
3518
+ 'label' => __( 'Suffix Color', 'the-post-grid' ),
3519
+ 'type' => \Elementor\Controls_Manager::COLOR,
3520
+ 'selectors' => [
3521
+ '{{WRAPPER}} .tpg-widget-heading-wrapper .tpg-widget-heading .suffix-text' => 'color: {{VALUE}}',
3522
+ ],
3523
+ 'condition' => [
3524
+ 'section_title_source' => 'page_title',
3525
+ ],
3526
+ ]
3527
+ );
3528
+
3529
+
3530
+ if ( 'archive' == $layout_type ) {
3531
+ $ref->add_control(
3532
+ 'cat_tag_description_heading',
3533
+ [
3534
+ 'label' => __( 'Category / Tag Description', 'the-post-grid' ),
3535
+ 'type' => \Elementor\Controls_Manager::HEADING,
3536
+ 'classes' => 'tpg-control-type-heading',
3537
+ 'condition' => [
3538
+ 'show_cat_desc' => 'yes',
3539
+ ],
3540
+ ]
3541
+ );
3542
+
3543
+ $ref->add_group_control(
3544
+ \Elementor\Group_Control_Typography::get_type(),
3545
+ [
3546
+ 'name' => 'taxonomy_des_typography',
3547
+ 'label' => __( 'Description Typography', 'the-post-grid' ),
3548
+ 'selector' => '{{WRAPPER}} .tpg-category-description',
3549
+ 'condition' => [
3550
+ 'show_cat_desc' => 'yes',
3551
+ ],
3552
+ ]
3553
+ );
3554
+
3555
+ $ref->add_responsive_control(
3556
+ 'taxonomy_des_alignment',
3557
+ [
3558
+ 'label' => __( 'Alignment', 'the-post-grid' ),
3559
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
3560
+ 'options' => [
3561
+ 'left' => [
3562
+ 'title' => __( 'Left', 'the-post-grid' ),
3563
+ 'icon' => 'eicon-text-align-left',
3564
+ ],
3565
+ 'center' => [
3566
+ 'title' => __( 'Center', 'the-post-grid' ),
3567
+ 'icon' => 'eicon-text-align-center',
3568
+ ],
3569
+ 'right' => [
3570
+ 'title' => __( 'Right', 'the-post-grid' ),
3571
+ 'icon' => 'eicon-text-align-right',
3572
+ ],
3573
+ ],
3574
+ 'selectors' => [
3575
+ '{{WRAPPER}} .tpg-category-description' => 'text-align: {{VALUE}}',
3576
+ ],
3577
+ 'condition' => [
3578
+ 'show_cat_desc' => 'yes',
3579
+ ],
3580
+ ]
3581
+ );
3582
+
3583
+ $ref->add_control(
3584
+ 'taxonomy_des_color',
3585
+ [
3586
+ 'label' => __( 'Title Color', 'the-post-grid' ),
3587
+ 'type' => \Elementor\Controls_Manager::COLOR,
3588
+ 'selectors' => [
3589
+ '{{WRAPPER}} .tpg-category-description' => 'color: {{VALUE}}',
3590
+ ],
3591
+ 'condition' => [
3592
+ 'show_cat_desc' => 'yes',
3593
+ ],
3594
+ ]
3595
+ );
3596
+
3597
+ $ref->add_responsive_control(
3598
+ 'taxonomy_des_dimension',
3599
+ [
3600
+ 'label' => __( 'Padding', 'the-post-grid' ),
3601
+ 'type' => Controls_Manager::DIMENSIONS,
3602
+ 'size_units' => [ 'px' ],
3603
+ 'selectors' => [
3604
+ '{{WRAPPER}} .tpg-category-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3605
+ ],
3606
+ 'condition' => [
3607
+ 'show_cat_desc' => 'yes',
3608
+ ],
3609
+ ]
3610
+ );
3611
+ }
3612
+
3613
+ $ref->end_controls_section();
3614
+ }
3615
+
3616
+
3617
+ /**
3618
+ * Thumbnail Style Tab
3619
+ *
3620
+ * @param $ref
3621
+ */
3622
+ public static function thumbnailStyle( $ref ) {
3623
+ $prefix = $ref->prefix;
3624
+ // Thumbnail style
3625
+ //========================================================
3626
+ $ref->start_controls_section(
3627
+ 'thumbnail_style',
3628
+ [
3629
+ 'label' => __( 'Thumbnail', 'the-post-grid' ),
3630
+ 'tab' => Controls_Manager::TAB_STYLE,
3631
+ 'condition' => [
3632
+ 'show_thumb' => 'show',
3633
+ ],
3634
+ ]
3635
+ );
3636
+
3637
+ $ref->add_responsive_control(
3638
+ 'img_border_radius',
3639
+ [
3640
+ 'label' => __( 'Border Radius', 'the-post-grid' ) . $ref->pro_label,
3641
+ 'type' => Controls_Manager::DIMENSIONS,
3642
+ 'size_units' => [ 'px', '%', 'em' ],
3643
+ 'allowed_dimensions' => 'all', //horizontal, vertical, [ 'top', 'right', 'bottom', 'left' ]
3644
+ 'default' => [
3645
+ 'top' => '',
3646
+ 'right' => '',
3647
+ 'bottom' => '',
3648
+ 'left' => '',
3649
+ 'isLinked' => true,
3650
+ ],
3651
+ 'selectors' => [
3652
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-el-image-wrap, {{WRAPPER}} .tpg-el-main-wrapper .tpg-el-image-wrap img, {{WRAPPER}} .rt-grid-hover-item .grid-hover-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;',
3653
+ ],
3654
+ 'description' => $ref->get_pro_message( "image radius." ),
3655
+ 'classes' => rtTPG()->hasPro() ? '' : 'the-post-grid-field-hide',
3656
+ ]
3657
+ );
3658
+
3659
+ $ref->add_control(
3660
+ 'image_width',
3661
+ [
3662
+ 'label' => __( 'Image Width (Optional)', 'the-post-grid' ),
3663
+ 'type' => \Elementor\Controls_Manager::SELECT,
3664
+ 'default' => 'inherit',
3665
+ 'options' => [
3666
+ 'inherit' => __( 'Default', 'the-post-grid' ),
3667
+ '100%' => __( '100%', 'the-post-grid' ),
3668
+ 'auto' => __( 'Auto', 'the-post-grid' ),
3669
+ ],
3670
+ 'selectors' => [
3671
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-el-image-wrap img' => 'width: {{VALUE}};',
3672
+ ],
3673
+ ]
3674
+ );
3675
+
3676
+ if ( 'grid_hover' != $prefix ) {
3677
+ $ref->add_responsive_control(
3678
+ 'thumbnail_spacing',
3679
+ [
3680
+ 'label' => __( 'Thumbnail Margin', 'the-post-grid' ),
3681
+ 'type' => Controls_Manager::DIMENSIONS,
3682
+ 'size_units' => [ 'px' ],
3683
+ 'selectors' => [
3684
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-el-image-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3685
+ ],
3686
+ 'default' => [
3687
+ 'top' => '',
3688
+ 'right' => '',
3689
+ 'bottom' => '',
3690
+ 'left' => '',
3691
+ 'isLinked' => false,
3692
+ ],
3693
+ ]
3694
+ );
3695
+ }
3696
+
3697
+ if ( in_array( $prefix, [ 'grid_hover', 'slider' ] ) ) {
3698
+ if ( 'slider' == $prefix ) {
3699
+ $thumbnail_padding_condition = [
3700
+ 'slider_layout' => [ 'slider-layout4', 'slider-layout5', 'slider-layout6', 'slider-layout7', 'slider-layout8', 'slider-layout9', 'slider-layout10' ],
3701
+ ];
3702
+ } else {
3703
+ $thumbnail_padding_condition = [
3704
+ 'grid_hover_layout!' => '',
3705
+ ];
3706
+ }
3707
+ $ref->add_responsive_control(
3708
+ 'grid_hover_thumbnail_margin',
3709
+ [
3710
+ 'label' => __( 'Thumbnail padding', 'the-post-grid' ),
3711
+ 'type' => Controls_Manager::DIMENSIONS,
3712
+ 'size_units' => [ 'px' ],
3713
+ 'selectors' => [
3714
+ '{{WRAPPER}} .rt-tpg-container .rt-grid-hover-item .rt-holder .grid-hover-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3715
+ '{{WRAPPER}} .rt-tpg-container .rt-el-content-wrapper .gallery-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3716
+ ],
3717
+ 'condition' => $thumbnail_padding_condition,
3718
+ ]
3719
+ );
3720
+ }
3721
+
3722
+ //Overlay Style Heading
3723
+
3724
+ $ref->add_control(
3725
+ 'thumb_overlay_style_heading',
3726
+ [
3727
+ 'label' => __( 'Overlay Style:', 'the-post-grid' ),
3728
+ 'type' => \Elementor\Controls_Manager::HEADING,
3729
+ 'classes' => 'tpg-control-type-heading',
3730
+ ]
3731
+ );
3732
+
3733
+ //TODO: Tab normal
3734
+ $ref->start_controls_tabs(
3735
+ 'grid_hover_style_tabs'
3736
+ );
3737
+
3738
+ $ref->start_controls_tab(
3739
+ 'grid_hover_style_normal_tab',
3740
+ [
3741
+ 'label' => __( 'Normal', 'the-post-grid' ),
3742
+ ]
3743
+ );
3744
+
3745
+ $ref->add_group_control(
3746
+ \Elementor\Group_Control_Background::get_type(),
3747
+ [
3748
+ 'name' => 'grid_hover_overlay_color',
3749
+ 'label' => __( 'Overlay BG', 'the-post-grid' ),
3750
+ 'types' => [ 'classic', 'gradient' ],
3751
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .rt-grid-hover-item .rt-holder .grid-hover-content:before, {{WRAPPER}} .tpg-el-main-wrapper .tpg-el-image-wrap .overlay',
3752
+ 'exclude' => [ 'image' ],
3753
+ 'fields_options' => [
3754
+ 'background' => [
3755
+ 'label' => esc_html__( 'Overlay Background Type', 'the-post-grid' ),
3756
+ ],
3757
+ 'color' => [
3758
+ 'label' => 'Background Color',
3759
+ ],
3760
+ 'color_b' => [
3761
+ 'label' => 'Background Color 2',
3762
+ ],
3763
+ ],
3764
+ ]
3765
+ );
3766
+
3767
+ $ref->add_control(
3768
+ 'thumb_lightbox_bg',
3769
+ [
3770
+ 'label' => __( 'Light Box Background', 'the-post-grid' ),
3771
+ 'type' => \Elementor\Controls_Manager::COLOR,
3772
+ 'selectors' => [
3773
+ '{{WRAPPER}} .rt-tpg-container .rt-holder .rt-img-holder .tpg-zoom .fa' => 'background-color: {{VALUE}}',
3774
+ ],
3775
+ 'condition' => [
3776
+ 'is_thumb_lightbox' => 'show',
3777
+ ],
3778
+ ]
3779
+ );
3780
+
3781
+ $ref->add_control(
3782
+ 'thumb_lightbox_color',
3783
+ [
3784
+ 'label' => __( 'Light Box Color', 'the-post-grid' ),
3785
+ 'type' => \Elementor\Controls_Manager::COLOR,
3786
+ 'selectors' => [
3787
+ '{{WRAPPER}} .rt-tpg-container .rt-holder .rt-img-holder .tpg-zoom .fa' => 'color: {{VALUE}}',
3788
+ ],
3789
+ 'condition' => [
3790
+ 'is_thumb_lightbox' => 'show',
3791
+ ],
3792
+ ]
3793
+ );
3794
+
3795
+ $ref->end_controls_tab();
3796
+
3797
+ //TODO: Tab Hover
3798
+ $ref->start_controls_tab(
3799
+ 'grid_hover_style_hover_tab',
3800
+ [
3801
+ 'label' => __( 'Hover', 'the-post-grid' ),
3802
+ ]
3803
+ );
3804
+
3805
+ $ref->add_group_control(
3806
+ \Elementor\Group_Control_Background::get_type(),
3807
+ [
3808
+ 'name' => 'grid_hover_overlay_color_hover',
3809
+ 'label' => __( 'Overlay BG - Hover', 'the-post-grid' ),
3810
+ 'types' => [ 'classic', 'gradient' ],
3811
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .rt-grid-hover-item .rt-holder .grid-hover-content:after, {{WRAPPER}} .tpg-el-main-wrapper .rt-holder:hover .tpg-el-image-wrap .overlay',
3812
+ 'exclude' => [ 'image' ],
3813
+ 'fields_options' => [
3814
+ 'background' => [
3815
+ 'label' => esc_html__( 'Overlay Background Type - Hover', 'the-post-grid' ),
3816
+ ],
3817
+ 'color' => [
3818
+ 'label' => 'Background Color',
3819
+ ],
3820
+ 'color_b' => [
3821
+ 'label' => 'Background Color 2',
3822
+ ],
3823
+ ],
3824
+ ]
3825
+ );
3826
+
3827
+
3828
+ $ref->add_control(
3829
+ 'thumb_lightbox_bg_hover',
3830
+ [
3831
+ 'label' => __( 'Light Box Background - Hover', 'the-post-grid' ),
3832
+ 'type' => \Elementor\Controls_Manager::COLOR,
3833
+ 'selectors' => [
3834
+ '{{WRAPPER}} .rt-tpg-container .rt-holder .rt-img-holder .tpg-zoom .fa' => 'background-color: {{VALUE}}',
3835
+ ],
3836
+ 'condition' => [
3837
+ 'is_thumb_lightbox' => 'show',
3838
+ ],
3839
+ ]
3840
+ );
3841
+
3842
+ $ref->add_control(
3843
+ 'thumb_lightbox_color_hover',
3844
+ [
3845
+ 'label' => __( 'Light Box Color - Hover', 'the-post-grid' ),
3846
+ 'type' => \Elementor\Controls_Manager::COLOR,
3847
+ 'selectors' => [
3848
+ '{{WRAPPER}} .rt-tpg-container .rt-holder .rt-img-holder .tpg-zoom .fa' => 'color: {{VALUE}}',
3849
+ ],
3850
+ 'condition' => [
3851
+ 'is_thumb_lightbox' => 'show',
3852
+ ],
3853
+ ]
3854
+ );
3855
+
3856
+ $ref->end_controls_tab();
3857
+
3858
+ $ref->end_controls_tabs();
3859
+
3860
+ $ref->add_control(
3861
+ 'hr_for_overlay',
3862
+ [
3863
+ 'type' => \Elementor\Controls_Manager::DIVIDER,
3864
+ ]
3865
+ );
3866
+
3867
+ $overlay_type_opt = [
3868
+ 'always' => __( 'Show Always', 'the-post-grid' ),
3869
+ 'fadein-on-hover' => __( 'FadeIn on hover', 'the-post-grid' ),
3870
+ 'fadeout-on-hover' => __( 'FadeOut on hover', 'the-post-grid' ),
3871
+ 'slidein-on-hover' => __( 'SlideIn on hover', 'the-post-grid' ),
3872
+ 'slideout-on-hover' => __( 'SlideOut on hover', 'the-post-grid' ),
3873
+ 'zoomin-on-hover' => __( 'ZoomIn on hover', 'the-post-grid' ),
3874
+ 'zoomout-on-hover' => __( 'ZoomOut on hover', 'the-post-grid' ),
3875
+ 'zoominall-on-hover' => __( 'ZoomIn Content on hover', 'the-post-grid' ),
3876
+ 'zoomoutall-on-hover' => __( 'ZoomOut Content on hover', 'the-post-grid' ),
3877
+ ];
3878
+
3879
+ if ( $ref->prefix == 'grid_hover' || $ref->prefix == 'slider' ) {
3880
+ $overlay_type_opt2 = [
3881
+ 'flipin-on-hover' => __( 'FlipIn on hover', 'the-post-grid' ),
3882
+ 'flipout-on-hover' => __( 'FlipOut on hover', 'the-post-grid' ),
3883
+ ];
3884
+ $overlay_type_opt = array_merge( $overlay_type_opt, $overlay_type_opt2 );
3885
+ }
3886
+
3887
+ $ref->add_control(
3888
+ 'grid_hover_overlay_type',
3889
+ [
3890
+ 'label' => __( 'Overlay Interaction', 'the-post-grid' ),
3891
+ 'type' => \Elementor\Controls_Manager::SELECT,
3892
+ 'default' => 'always',
3893
+ 'options' => $overlay_type_opt,
3894
+ 'description' => __( 'If you don\'t choose overlay background then it will work only for some selected layout ', 'the-post-grid' ),
3895
+ 'prefix_class' => 'grid-hover-overlay-type-',
3896
+ ]
3897
+ );
3898
+
3899
+ $overlay_height_condition = [
3900
+ 'grid_hover_layout!' => [ 'grid_hover-layout3' ],
3901
+ ];
3902
+ if ( $ref->prefix === 'slider' ) {
3903
+ $overlay_height_condition = [
3904
+ 'slider_layout!' => [ '' ],
3905
+ ];
3906
+ }
3907
+ $ref->add_control(
3908
+ 'grid_hover_overlay_height',
3909
+ [
3910
+ 'label' => __( 'Overlay Height', 'the-post-grid' ),
3911
+ 'type' => \Elementor\Controls_Manager::SELECT,
3912
+ 'default' => 'default',
3913
+ 'options' => [
3914
+ 'default' => __( 'Default', 'the-post-grid' ),
3915
+ 'full' => __( '100%', 'the-post-grid' ),
3916
+ 'auto' => __( 'Auto', 'the-post-grid' ),
3917
+ ],
3918
+ 'condition' => $overlay_height_condition,
3919
+ 'prefix_class' => 'grid-hover-overlay-height-',
3920
+ ]
3921
+ );
3922
+
3923
+ $ref->add_control(
3924
+ 'on_hover_overlay',
3925
+ [
3926
+ 'label' => __( 'Overlay Height on hover', 'the-post-grid' ),
3927
+ 'type' => \Elementor\Controls_Manager::SELECT,
3928
+ 'default' => 'default',
3929
+ 'options' => [
3930
+ 'default' => __( 'Default', 'the-post-grid' ),
3931
+ 'full' => __( '100%', 'the-post-grid' ),
3932
+ 'auto' => __( 'Auto', 'the-post-grid' ),
3933
+ ],
3934
+ 'condition' => $overlay_height_condition,
3935
+ 'prefix_class' => 'hover-overlay-height-',
3936
+ ]
3937
+ );
3938
+
3939
+ $ref->end_controls_section();
3940
+ }
3941
+
3942
+
3943
+ /**
3944
+ * Post Title Style
3945
+ *
3946
+ * @param $ref
3947
+ */
3948
+ public static function titleStyle( $ref ) {
3949
+ $prefix = $ref->prefix;
3950
+
3951
+ $ref->start_controls_section(
3952
+ 'title_style',
3953
+ [
3954
+ 'label' => __( 'Post Title', 'the-post-grid' ),
3955
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
3956
+ 'condition' => [
3957
+ 'show_title' => 'show',
3958
+ $prefix . '_layout!' => [ 'grid-layout7' ],
3959
+ ],
3960
+ ]
3961
+ );
3962
+
3963
+ $ref->add_responsive_control(
3964
+ 'title_spacing',
3965
+ [
3966
+ 'label' => __( 'Title Margin', 'the-post-grid' ),
3967
+ 'type' => Controls_Manager::DIMENSIONS,
3968
+ 'size_units' => [ 'px' ],
3969
+ 'selectors' => [
3970
+ '{{WRAPPER}} .rt-tpg-container .rt-holder .entry-title-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3971
+ ],
3972
+ 'allowed_dimensions' => 'all',
3973
+ 'default' => [
3974
+ 'top' => '',
3975
+ 'right' => '',
3976
+ 'bottom' => '',
3977
+ 'left' => '',
3978
+ 'isLinked' => false,
3979
+ ],
3980
+ ]
3981
+ );
3982
+
3983
+ $ref->add_responsive_control(
3984
+ 'title_padding',
3985
+ [
3986
+ 'label' => __( 'Title Padding', 'the-post-grid' ),
3987
+ 'type' => Controls_Manager::DIMENSIONS,
3988
+ 'size_units' => [ 'px' ],
3989
+ 'selectors' => [
3990
+ '{{WRAPPER}} .rt-tpg-container .rt-holder .entry-title-wrapper .entry-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3991
+ ],
3992
+ 'allowed_dimensions' => 'all',
3993
+ 'default' => [
3994
+ 'top' => '',
3995
+ 'right' => '',
3996
+ 'bottom' => '',
3997
+ 'left' => '',
3998
+ 'isLinked' => false,
3999
+ ],
4000
+ ]
4001
+ );
4002
+
4003
+ $ref->add_group_control(
4004
+ \Elementor\Group_Control_Typography::get_type(),
4005
+ [
4006
+ 'name' => 'title_typography',
4007
+ 'label' => esc_html__( 'Typography', 'the-post-grid' ),
4008
+ 'selector' => '{{WRAPPER}} .tpg-el-main-wrapper .entry-title-wrapper .entry-title',
4009
+ ]
4010
+ );
4011
+
4012
+ //Offset Title
4013
+ $ref->add_group_control(
4014
+ \Elementor\Group_Control_Typography::get_type(),
4015
+ [
4016
+ 'name' => 'title_offset_typography',
4017
+ 'label' => esc_html__( 'Offset Typography', 'the-post-grid' ),
4018
+ 'selector' => '{{WRAPPER}} .tpg-el-main-wrapper .offset-left .entry-title-wrapper .entry-title',
4019
+ 'description' => __( 'You can overwrite offset title font style', 'the-post-grid' ),
4020
+ 'condition' => [
4021
+ $prefix . '_layout' => [
4022
+ 'grid-layout5',
4023
+ 'grid-layout5-2',
4024
+ 'grid-layout6',
4025
+ 'grid-layout6-2',
4026
+ 'list-layout2',
4027
+ 'list-layout3',
4028
+ 'list-layout2-2',
4029
+ 'list-layout3-2',
4030
+ 'grid_hover-layout4',
4031
+ 'grid_hover-layout4-2',
4032
+ 'grid_hover-layout5',
4033
+ 'grid_hover-layout5-2',
4034
+ 'grid_hover-layout6',
4035
+ 'grid_hover-layout6-2',
4036
+ 'grid_hover-layout7',
4037
+ 'grid_hover-layout7-2',
4038
+ 'grid_hover-layout9',
4039
+ 'grid_hover-layout9-2',
4040
+ ],
4041
+ ],
4042
+ ]
4043
+ );
4044
+
4045
+ $ref->add_control(
4046
+ 'title_border_visibility',
4047
+ [
4048
+ 'label' => __( 'Title Border Bottom', 'the-post-grid' ),
4049
+ 'type' => \Elementor\Controls_Manager::SELECT,
4050
+ 'default' => 'default',
4051
+ 'options' => [
4052
+ 'default' => __( 'Default', 'the-post-grid' ),
4053
+ 'show' => __( 'Show', 'the-post-grid' ),
4054
+ 'hide' => __( 'Hide', 'the-post-grid' ),
4055
+ ],
4056
+ 'prefix_class' => 'tpg-title-border-',
4057
+ 'condition' => [
4058
+ $prefix . '_layout' => 'grid_hover-layout3',
4059
+ ],
4060
+ ]
4061
+ );
4062
+
4063
+ $ref->add_responsive_control(
4064
+ 'title_alignment',
4065
+ [
4066
+ 'label' => __( 'Alignment', 'the-post-grid' ),
4067
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
4068
+ 'options' => [
4069
+ 'left' => [
4070
+ 'title' => __( 'Left', 'the-post-grid' ),
4071
+ 'icon' => 'eicon-text-align-left',
4072
+ ],
4073
+ 'center' => [
4074
+ 'title' => __( 'Center', 'the-post-grid' ),
4075
+ 'icon' => 'eicon-text-align-center',
4076
+ ],
4077
+ 'right' => [
4078
+ 'title' => __( 'Right', 'the-post-grid' ),
4079
+ 'icon' => 'eicon-text-align-right',
4080
+ ],
4081
+ 'justify' => [
4082
+ 'title' => __( 'Justify', 'the-post-grid' ),
4083
+ 'icon' => 'eicon-text-align-justify',
4084
+ ],
4085
+ ],
4086
+ 'prefix_class' => 'title-alignment-',
4087
+ 'toggle' => true,
4088
+ 'selectors' => [
4089
+ '{{WRAPPER}} .tpg-el-main-wrapper .entry-title' => 'text-align: {{VALUE}};',
4090
+ ],
4091
+ ]
4092
+ );
4093
+
4094
+ //TODO: Start Title Style Tba
4095
+ $ref->start_controls_tabs(
4096
+ 'title_style_tabs'
4097
+ );
4098
+
4099
+ $ref->start_controls_tab(
4100
+ 'title_normal_tab',
4101
+ [
4102
+ 'label' => __( 'Normal', 'the-post-grid' ),
4103
+ ]
4104
+ );
4105
+ //TODO: Normal Tab
4106
+ $ref->add_control(
4107
+ 'title_color',
4108
+ [
4109
+ 'label' => __( 'Title Color', 'the-post-grid' ),
4110
+ 'type' => \Elementor\Controls_Manager::COLOR,
4111
+ 'selectors' => [
4112
+ '{{WRAPPER}} .tpg-el-main-wrapper .entry-title' => 'color: {{VALUE}}',
4113
+ ],
4114
+ ]
4115
+ );
4116
+
4117
+ $ref->add_control(
4118
+ 'title_bg_color',
4119
+ [
4120
+ 'label' => __( 'Title Background', 'the-post-grid' ),
4121
+ 'type' => \Elementor\Controls_Manager::COLOR,
4122
+ 'selectors' => [
4123
+ '{{WRAPPER}} .tpg-el-main-wrapper .entry-title' => 'background-color: {{VALUE}}',
4124
+ ],
4125
+ ]
4126
+ );
4127
+
4128
+ $ref->add_control(
4129
+ 'title_border_color',
4130
+ [
4131
+ 'label' => __( 'Title Separator Color', 'the-post-grid' ),
4132
+ 'type' => \Elementor\Controls_Manager::COLOR,
4133
+ 'selectors' => [
4134
+ '{{WRAPPER}} .rt-tpg-container .rt-holder .entry-title-wrapper .entry-title::before' => 'background-color: {{VALUE}}',
4135
+ ],
4136
+ 'condition' => [
4137
+ $prefix . '_layout' => 'grid_hover-layout3',
4138
+ 'title_border_visibility!' => 'hide',
4139
+ ],
4140
+ ]
4141
+ );
4142
+
4143
+ $ref->add_control(
4144
+ 'title_hover_border_color',
4145
+ [
4146
+ 'label' => __( 'Title Hover Border Color', 'the-post-grid' ),
4147
+ 'type' => \Elementor\Controls_Manager::COLOR,
4148
+ 'selectors' => [
4149
+ '{{WRAPPER}}' => '--tpg-primary-color: {{VALUE}}',
4150
+ ],
4151
+ 'condition' => [
4152
+ 'title_hover_underline' => 'enable',
4153
+ ],
4154
+ ]
4155
+ );
4156
+
4157
+ $ref->end_controls_tab();
4158
+
4159
+ $ref->start_controls_tab(
4160
+ 'title_hover_tab',
4161
+ [
4162
+ 'label' => __( 'Hover', 'the-post-grid' ),
4163
+ ]
4164
+ );
4165
+
4166
+ //TODO: Hover Tab
4167
+ $ref->add_control(
4168
+ 'title_hover_color',
4169
+ [
4170
+ 'label' => __( 'Title Color on Hover', 'the-post-grid' ),
4171
+ 'type' => \Elementor\Controls_Manager::COLOR,
4172
+ 'selectors' => [
4173
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder .entry-title:hover, {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder .entry-title a:hover' => 'color: {{VALUE}} !important',
4174
+ ],
4175
+ ]
4176
+ );
4177
+
4178
+ $ref->add_control(
4179
+ 'title_bg_color_hover',
4180
+ [
4181
+ 'label' => __( 'Title Background on hover', 'the-post-grid' ),
4182
+ 'type' => \Elementor\Controls_Manager::COLOR,
4183
+ 'selectors' => [
4184
+ '{{WRAPPER}} .tpg-el-main-wrapper .entry-title:hover' => 'background-color: {{VALUE}} !important',
4185
+ ],
4186
+ ]
4187
+ );
4188
+
4189
+ $ref->end_controls_tab();
4190
+
4191
+ $ref->start_controls_tab(
4192
+ 'title_box_hover_tab',
4193
+ [
4194
+ 'label' => __( 'Box Hover', 'the-post-grid' ),
4195
+ ]
4196
+ );
4197
+
4198
+ //TODO: Box Hover Tab
4199
+ $ref->add_control(
4200
+ 'title_color_box_hover',
4201
+ [
4202
+ 'label' => __( 'Title color on boxhover', 'the-post-grid' ),
4203
+ 'type' => \Elementor\Controls_Manager::COLOR,
4204
+ 'selectors' => [
4205
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .entry-title, {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .entry-title a' => 'color: {{VALUE}}',
4206
+ ],
4207
+ ]
4208
+ );
4209
+
4210
+ $ref->add_control(
4211
+ 'title_bg_color_box_hover',
4212
+ [
4213
+ 'label' => __( 'Title Background on boxhover', 'the-post-grid' ),
4214
+ 'type' => \Elementor\Controls_Manager::COLOR,
4215
+ 'selectors' => [
4216
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .entry-title' => 'background-color: {{VALUE}}',
4217
+ ],
4218
+ ]
4219
+ );
4220
+
4221
+ $ref->add_control(
4222
+ 'title_border_color_hover',
4223
+ [
4224
+ 'label' => __( 'Title Separator color - boxhover', 'the-post-grid' ),
4225
+ 'type' => \Elementor\Controls_Manager::COLOR,
4226
+ 'selectors' => [
4227
+ '{{WRAPPER}} .rt-tpg-container .rt-holder:hover .entry-title-wrapper .entry-title::before' => 'background-color: {{VALUE}}',
4228
+ ],
4229
+ 'condition' => [
4230
+ $prefix . '_layout' => 'grid_hover-layout3',
4231
+ 'title_border_visibility!' => 'hide',
4232
+ ],
4233
+ ]
4234
+ );
4235
+
4236
+ $ref->end_controls_tab();
4237
+
4238
+ $ref->end_controls_tabs();
4239
+
4240
+ $ref->end_controls_section();
4241
+ }
4242
+
4243
+ /**
4244
+ * Content Style Tab
4245
+ *
4246
+ * @param $ref
4247
+ */
4248
+ public static function contentStyle( $ref ) {
4249
+ $prefix = $ref->prefix;
4250
+
4251
+ $ref->start_controls_section(
4252
+ 'excerpt_style',
4253
+ [
4254
+ 'label' => __( 'Excerpt / Content', 'the-post-grid' ),
4255
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
4256
+ 'condition' => [
4257
+ 'show_excerpt' => 'show',
4258
+ $prefix . '_layout!' => [ 'grid-layout7' ],
4259
+ ],
4260
+ ]
4261
+ );
4262
+
4263
+ $ref->add_group_control(
4264
+ \Elementor\Group_Control_Typography::get_type(),
4265
+ [
4266
+ 'name' => 'content_typography',
4267
+ 'selector' => '{{WRAPPER}} .tpg-el-main-wrapper .tpg-el-excerpt .tpg-excerpt-inner',
4268
+ ]
4269
+ );
4270
+
4271
+ $ref->add_responsive_control(
4272
+ 'excerpt_spacing',
4273
+ [
4274
+ 'label' => __( 'Excerpt Spacing', 'the-post-grid' ),
4275
+ 'type' => Controls_Manager::DIMENSIONS,
4276
+ 'size_units' => [ 'px' ],
4277
+ 'selectors' => [
4278
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-el-excerpt' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4279
+ ],
4280
+ 'allowed_dimensions' => 'all',
4281
+ 'default' => [
4282
+ 'top' => '',
4283
+ 'right' => '',
4284
+ 'bottom' => '',
4285
+ 'left' => '',
4286
+ 'isLinked' => false,
4287
+ ],
4288
+ ]
4289
+ );
4290
+
4291
+ $ref->add_responsive_control(
4292
+ 'content_alignment',
4293
+ [
4294
+ 'label' => __( 'Alignment', 'the-post-grid' ),
4295
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
4296
+ 'options' => [
4297
+ 'left' => [
4298
+ 'title' => __( 'Left', 'the-post-grid' ),
4299
+ 'icon' => 'eicon-text-align-left',
4300
+ ],
4301
+ 'center' => [
4302
+ 'title' => __( 'Center', 'the-post-grid' ),
4303
+ 'icon' => 'eicon-text-align-center',
4304
+ ],
4305
+ 'right' => [
4306
+ 'title' => __( 'Right', 'the-post-grid' ),
4307
+ 'icon' => 'eicon-text-align-right',
4308
+ ],
4309
+ 'justify' => [
4310
+ 'title' => __( 'Justify', 'the-post-grid' ),
4311
+ 'icon' => 'eicon-text-align-justify',
4312
+ ],
4313
+ ],
4314
+ 'toggle' => true,
4315
+ 'selectors' => [
4316
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-el-excerpt .tpg-excerpt-inner' => 'text-align: {{VALUE}}',
4317
+ ],
4318
+ ]
4319
+ );
4320
+
4321
+ //TODO: Start Content Tab
4322
+
4323
+ $ref->start_controls_tabs(
4324
+ 'excerpt_style_tabs'
4325
+ );
4326
+
4327
+ $ref->start_controls_tab(
4328
+ 'excerpt_normal_tab',
4329
+ [
4330
+ 'label' => __( 'Normal', 'the-post-grid' ),
4331
+ ]
4332
+ );
4333
+
4334
+ //TODO: Normal Tab
4335
+ $ref->add_control(
4336
+ 'excerpt_color',
4337
+ [
4338
+ 'label' => __( 'Excerpt color', 'the-post-grid' ),
4339
+ 'type' => \Elementor\Controls_Manager::COLOR,
4340
+ 'selectors' => [
4341
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-el-excerpt .tpg-excerpt-inner' => 'color: {{VALUE}}',
4342
+ ],
4343
+ ]
4344
+ );
4345
+
4346
+ $ref->add_control(
4347
+ 'excerpt_border',
4348
+ [
4349
+ 'label' => __( 'Border color', 'the-post-grid' ),
4350
+ 'type' => \Elementor\Controls_Manager::COLOR,
4351
+ 'selectors' => [
4352
+ '{{WRAPPER}}.meta_position_default .tpg-el-main-wrapper .grid-layout3 .rt-holder .rt-el-post-meta::before' => 'background: {{VALUE}}',
4353
+ ],
4354
+ 'condition' => [
4355
+ 'meta_position' => 'default',
4356
+ $prefix . '_layout' => [ 'grid-layout3' ],
4357
+ ],
4358
+ ]
4359
+ );
4360
+
4361
+ $ref->end_controls_tab();
4362
+
4363
+ $ref->start_controls_tab(
4364
+ 'excerpt_hover_tab',
4365
+ [
4366
+ 'label' => __( 'Box Hover', 'the-post-grid' ),
4367
+ ]
4368
+ );
4369
+
4370
+ //TODO: Hover Tab
4371
+ $ref->add_control(
4372
+ 'excerpt_hover_color',
4373
+ [
4374
+ 'label' => __( 'Excerpt color on hover', 'the-post-grid' ),
4375
+ 'type' => \Elementor\Controls_Manager::COLOR,
4376
+ 'selectors' => [
4377
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .tpg-el-excerpt .tpg-excerpt-inner' => 'color: {{VALUE}} !important',
4378
+ ],
4379
+ ]
4380
+ );
4381
+
4382
+ $ref->add_control(
4383
+ 'excerpt_border_hover',
4384
+ [
4385
+ 'label' => __( 'Border color - Hover', 'the-post-grid' ),
4386
+ 'type' => \Elementor\Controls_Manager::COLOR,
4387
+ 'selectors' => [
4388
+ '{{WRAPPER}}.meta_position_default .tpg-el-main-wrapper .grid-layout3 .rt-holder:hover .rt-el-post-meta::before' => 'background: {{VALUE}}',
4389
+ ],
4390
+ 'condition' => [
4391
+ 'meta_position' => 'default',
4392
+ $prefix . '_layout' => [ 'grid-layout3' ],
4393
+ ],
4394
+ ]
4395
+ );
4396
+
4397
+ $ref->end_controls_tab();
4398
+
4399
+ $ref->end_controls_tabs();
4400
+
4401
+ $ref->end_controls_section();
4402
+ }
4403
+
4404
+ /**
4405
+ * Post Meta Style
4406
+ *
4407
+ * @param $ref
4408
+ */
4409
+ public static function metaInfoStyle( $ref ) {
4410
+ $prefix = $ref->prefix;
4411
+
4412
+ $ref->start_controls_section(
4413
+ 'post_meta_style',
4414
+ [
4415
+ 'label' => __( 'Post Meta', 'the-post-grid' ),
4416
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
4417
+ 'condition' => [
4418
+ 'show_meta' => 'show',
4419
+ $prefix . '_layout!' => [ 'grid-layout7' ],
4420
+ ],
4421
+ ]
4422
+ );
4423
+
4424
+ $ref->add_group_control(
4425
+ \Elementor\Group_Control_Typography::get_type(),
4426
+ [
4427
+ 'name' => 'post_meta_typography',
4428
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-el-post-meta, {{WRAPPER}} .tpg-post-holder .tpg-separate-category .categories-links a',
4429
+ ]
4430
+ );
4431
+
4432
+ $ref->add_responsive_control(
4433
+ 'meta_spacing',
4434
+ [
4435
+ 'label' => __( 'Meta Spacing', 'the-post-grid' ),
4436
+ 'type' => Controls_Manager::DIMENSIONS,
4437
+ 'size_units' => [ 'px' ],
4438
+ 'selectors' => [
4439
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-holder .rt-el-post-meta' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4440
+ ],
4441
+ 'allowed_dimensions' => 'all',
4442
+ 'default' => [
4443
+ 'top' => '',
4444
+ 'right' => '',
4445
+ 'bottom' => '',
4446
+ 'left' => '',
4447
+ 'isLinked' => false,
4448
+ ],
4449
+ ]
4450
+ );
4451
+
4452
+ $ref->add_control(
4453
+ 'separator_cat_heading',
4454
+ [
4455
+ 'label' => __( 'Separate Category', 'the-post-grid' ),
4456
+ 'type' => \Elementor\Controls_Manager::HEADING,
4457
+ 'classes' => 'tpg-control-type-heading',
4458
+ 'condition' => [
4459
+ 'category_position!' => 'default',
4460
+ ],
4461
+ ]
4462
+ );
4463
+
4464
+ $ref->add_group_control(
4465
+ \Elementor\Group_Control_Typography::get_type(),
4466
+ [
4467
+ 'name' => 'separator_cat_typography',
4468
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .tpg-separate-category',
4469
+ 'condition' => [
4470
+ 'category_position!' => 'default',
4471
+ ],
4472
+ ]
4473
+ );
4474
+
4475
+ $ref->add_control(
4476
+ 'category_margin_bottom',
4477
+ [
4478
+ 'label' => __( 'Category Margin Bottom', 'the-post-grid' ),
4479
+ 'type' => \Elementor\Controls_Manager::NUMBER,
4480
+ 'min' => 0,
4481
+ 'max' => 50,
4482
+ 'step' => 1,
4483
+ 'condition' => [
4484
+ 'category_position' => 'above_title',
4485
+ ],
4486
+ 'selectors' => [
4487
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category.above_title' => 'margin-bottom: {{VALUE}}px;',
4488
+ ],
4489
+ ]
4490
+ );
4491
+
4492
+
4493
+ $ref->add_responsive_control(
4494
+ 'category_radius',
4495
+ [
4496
+ 'label' => __( 'Category Border Radius', 'the-post-grid' ),
4497
+ 'type' => Controls_Manager::DIMENSIONS,
4498
+ 'size_units' => [ 'px' ],
4499
+ 'selectors' => [
4500
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category.style1 .categories-links' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4501
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category:not(.style1) .categories-links a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4502
+ ],
4503
+ 'condition' => [
4504
+ 'category_position!' => 'default',
4505
+ 'category_style!' => 'style3',
4506
+ ],
4507
+ ]
4508
+ );
4509
+
4510
+
4511
+ /**
4512
+ * TODO: Tags Style
4513
+ * ********************
4514
+ */
4515
+
4516
+
4517
+ //TODO: Start Content Tab
4518
+
4519
+ $ref->start_controls_tabs(
4520
+ 'meta_info_style_tabs'
4521
+ );
4522
+
4523
+ $ref->start_controls_tab(
4524
+ 'meta_info_normal_tab',
4525
+ [
4526
+ 'label' => __( 'Normal', 'the-post-grid' ),
4527
+ ]
4528
+ );
4529
+
4530
+ //TODO: Normal Tab
4531
+
4532
+ $ref->add_control(
4533
+ 'meta_info_color',
4534
+ [
4535
+ 'label' => __( 'Meta Color', 'the-post-grid' ),
4536
+ 'type' => \Elementor\Controls_Manager::COLOR,
4537
+ 'selectors' => [
4538
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags span' => 'color: {{VALUE}}',
4539
+ ],
4540
+ ]
4541
+ );
4542
+
4543
+ $ref->add_control(
4544
+ 'meta_link_color',
4545
+ [
4546
+ 'label' => __( 'Meta Link Color', 'the-post-grid' ),
4547
+ 'type' => \Elementor\Controls_Manager::COLOR,
4548
+ 'selectors' => [
4549
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags a' => 'color: {{VALUE}}',
4550
+ ],
4551
+ ]
4552
+ );
4553
+
4554
+ $ref->add_control(
4555
+ 'meta_separator_color',
4556
+ [
4557
+ 'label' => __( 'Separator Color', 'the-post-grid' ),
4558
+ 'type' => \Elementor\Controls_Manager::COLOR,
4559
+ 'selectors' => [
4560
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags .separator' => 'color: {{VALUE}}',
4561
+ ],
4562
+ 'condition' => [
4563
+ 'meta_separator!' => 'default',
4564
+ ],
4565
+ ]
4566
+ );
4567
+
4568
+ $ref->add_control(
4569
+ 'meta_icon_color',
4570
+ [
4571
+ 'label' => __( 'Icon Color', 'the-post-grid' ),
4572
+ 'type' => \Elementor\Controls_Manager::COLOR,
4573
+ 'selectors' => [
4574
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags i' => 'color: {{VALUE}}',
4575
+ ],
4576
+ ]
4577
+ );
4578
+
4579
+ $ref->add_control(
4580
+ 'separate_category_color',
4581
+ [
4582
+ 'label' => __( 'Category Color', 'the-post-grid' ),
4583
+ 'type' => \Elementor\Controls_Manager::COLOR,
4584
+ 'separator' => 'before',
4585
+ 'selectors' => [
4586
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category .categories-links' => 'color: {{VALUE}}',
4587
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category .categories-links a' => 'color: {{VALUE}}',
4588
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags .categories-links a' => 'color: {{VALUE}}',
4589
+ ],
4590
+ ]
4591
+ );
4592
+ $ref->add_control(
4593
+ 'separate_category_bg',
4594
+ [
4595
+ 'label' => __( 'Category Background', 'the-post-grid' ),
4596
+ 'type' => \Elementor\Controls_Manager::COLOR,
4597
+ 'selectors' => [
4598
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category.style1 .categories-links' => 'background-color: {{VALUE}};padding: 3px 8px 1px;',
4599
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category:not(.style1) .categories-links a' => 'background-color: {{VALUE}}',
4600
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category:not(.style1) .categories-links a:after' => 'border-top-color: {{VALUE}}',
4601
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags .categories-links a' => 'background-color: {{VALUE}}',
4602
+ ],
4603
+ ]
4604
+ );
4605
+ $ref->add_control(
4606
+ 'separate_category_icon_color',
4607
+ [
4608
+ 'label' => __( 'Category Icon Color', 'the-post-grid' ),
4609
+ 'type' => \Elementor\Controls_Manager::COLOR,
4610
+ 'selectors' => [
4611
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category .categories-links i' => 'color: {{VALUE}}',
4612
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags .categories-links i' => 'color: {{VALUE}}',
4613
+ ],
4614
+ 'condition' => [
4615
+ 'show_cat_icon' => 'yes',
4616
+ ],
4617
+ ]
4618
+ );
4619
+
4620
+ $ref->end_controls_tab();
4621
+
4622
+ $ref->start_controls_tab(
4623
+ 'meta_info_hover_tab',
4624
+ [
4625
+ 'label' => __( 'Hover', 'the-post-grid' ),
4626
+ ]
4627
+ );
4628
+
4629
+ //TODO: Hover Tab
4630
+
4631
+
4632
+ $ref->add_control(
4633
+ 'meta_link_colo_hover',
4634
+ [
4635
+ 'label' => __( 'Meta Link Color - Hover', 'the-post-grid' ),
4636
+ 'type' => \Elementor\Controls_Manager::COLOR,
4637
+ 'selectors' => [
4638
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder .post-meta-tags a:hover' => 'color: {{VALUE}}',
4639
+ ],
4640
+ ]
4641
+ );
4642
+
4643
+ $ref->add_control(
4644
+ 'separate_category_color_hover',
4645
+ [
4646
+ 'label' => __( 'Category Color - Hover', 'the-post-grid' ),
4647
+ 'type' => \Elementor\Controls_Manager::COLOR,
4648
+ 'separator' => 'before',
4649
+ 'selectors' => [
4650
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category .categories-links a:hover' => 'color: {{VALUE}} !important',
4651
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags .categories-links a:hover' => 'color: {{VALUE}} !important',
4652
+ ],
4653
+ ]
4654
+ );
4655
+
4656
+ $ref->add_control(
4657
+ 'separate_category_bg_hover',
4658
+ [
4659
+ 'label' => __( 'Category Background - Hover', 'the-post-grid' ),
4660
+ 'type' => \Elementor\Controls_Manager::COLOR,
4661
+ 'selectors' => [
4662
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category.style1 .categories-links:hover' => 'background-color: {{VALUE}};padding: 3px 8px;',
4663
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category .categories-links:not(.style1) a:hover' => 'background-color: {{VALUE}}',
4664
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-separate-category .categories-links:not(.style1) a:hover::after' => 'border-top-color: {{VALUE}}',
4665
+ '{{WRAPPER}} .tpg-el-main-wrapper .post-meta-tags .categories-links a:hover' => 'background-color: {{VALUE}}',
4666
+ ],
4667
+ ]
4668
+ );
4669
+
4670
+ $ref->end_controls_tab();
4671
+
4672
+ $ref->start_controls_tab(
4673
+ 'meta_info_box_hover_tab',
4674
+ [
4675
+ 'label' => __( 'Box Hover', 'the-post-grid' ),
4676
+ ]
4677
+ );
4678
+
4679
+ //TODO: Box Hover Tab
4680
+
4681
+
4682
+ $ref->add_control(
4683
+ 'meta_link_colo_box_hover',
4684
+ [
4685
+ 'label' => __( 'Meta Color - Box Hover', 'the-post-grid' ),
4686
+ 'type' => \Elementor\Controls_Manager::COLOR,
4687
+ 'selectors' => [
4688
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .post-meta-tags *' => 'color: {{VALUE}}',
4689
+ ],
4690
+ ]
4691
+ );
4692
+
4693
+ $ref->add_control(
4694
+ 'separate_category_color_box_hover',
4695
+ [
4696
+ 'label' => __( 'Category Color - Hover', 'the-post-grid' ),
4697
+ 'type' => \Elementor\Controls_Manager::COLOR,
4698
+ 'separator' => 'before',
4699
+ 'selectors' => [
4700
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .tpg-separate-category .categories-links a' => 'color: {{VALUE}}',
4701
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .post-meta-tags .categories-links a' => 'color: {{VALUE}}',
4702
+ ],
4703
+ ]
4704
+ );
4705
+ $ref->add_control(
4706
+ 'separate_category_bg_box_hover',
4707
+ [
4708
+ 'label' => __( 'Category Background - Box Hover', 'the-post-grid' ),
4709
+ 'type' => \Elementor\Controls_Manager::COLOR,
4710
+ 'selectors' => [
4711
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .tpg-separate-category.style1 .categories-links' => 'background-color: {{VALUE}};padding: 3px 8px;',
4712
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .tpg-separate-category:not(.style1) .categories-links a' => 'background-color: {{VALUE}}',
4713
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .tpg-separate-category:not(.style1) .categories-links a::after' => 'border-top-color: {{VALUE}}',
4714
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .post-meta-tags .categories-links a' => 'background-color: {{VALUE}}',
4715
+ ],
4716
+ ]
4717
+ );
4718
+
4719
+ $ref->add_control(
4720
+ 'separate_category_icon_color_box_hover',
4721
+ [
4722
+ 'label' => __( 'Category Icon Color - Box Hover', 'the-post-grid' ),
4723
+ 'type' => \Elementor\Controls_Manager::COLOR,
4724
+ 'selectors' => [
4725
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .tpg-separate-category .categories-links i' => 'color: {{VALUE}}',
4726
+ '{{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover .post-meta-tags .categories-links i' => 'color: {{VALUE}}',
4727
+ ],
4728
+ 'condition' => [
4729
+ 'show_cat_icon' => 'yes',
4730
+ ],
4731
+ ]
4732
+ );
4733
+
4734
+ $ref->end_controls_tab();
4735
+
4736
+ $ref->end_controls_tabs();
4737
+
4738
+ $ref->end_controls_section();
4739
+ }
4740
+
4741
+
4742
+ /**
4743
+ * Read More style
4744
+ *
4745
+ * @param $ref
4746
+ */
4747
+ public static function readmoreStyle( $ref ) {
4748
+ $prefix = $ref->prefix;
4749
+
4750
+ $ref->start_controls_section(
4751
+ 'readmore_button_style',
4752
+ [
4753
+ 'label' => __( 'Read More', 'the-post-grid' ),
4754
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
4755
+ 'condition' => [
4756
+ 'show_read_more' => 'show',
4757
+ $prefix . '_layout!' => [ 'grid-layout7' ],
4758
+ ],
4759
+ ]
4760
+ );
4761
+
4762
+ $ref->add_group_control(
4763
+ \Elementor\Group_Control_Typography::get_type(),
4764
+ [
4765
+ 'name' => 'readmore_typography',
4766
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a',
4767
+ ]
4768
+ );
4769
+
4770
+
4771
+ $ref->add_responsive_control(
4772
+ 'readmore_spacing',
4773
+ [
4774
+ 'label' => __( 'Button Spacing', 'the-post-grid' ),
4775
+ 'type' => Controls_Manager::DIMENSIONS,
4776
+ 'size_units' => [ 'px' ],
4777
+ 'allowed_dimensions' => 'all',
4778
+ 'default' => [
4779
+ 'top' => '',
4780
+ 'right' => '',
4781
+ 'bottom' => '',
4782
+ 'left' => '',
4783
+ 'isLinked' => false,
4784
+ ],
4785
+ 'selectors' => [
4786
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4787
+ ],
4788
+ ]
4789
+ );
4790
+
4791
+ $ref->add_responsive_control(
4792
+ 'readmore_padding',
4793
+ [
4794
+ 'label' => __( 'Button Padding', 'the-post-grid' ),
4795
+ 'type' => Controls_Manager::DIMENSIONS,
4796
+ 'size_units' => [ 'px' ],
4797
+ 'selectors' => [
4798
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4799
+ ],
4800
+ 'condition' => [
4801
+ 'readmore_btn_style' => 'default-style',
4802
+ ],
4803
+ ]
4804
+ );
4805
+
4806
+
4807
+ $ref->add_responsive_control(
4808
+ 'readmore_btn_alignment',
4809
+ [
4810
+ 'label' => __( 'Button Alignment', 'the-post-grid' ),
4811
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
4812
+ 'options' => [
4813
+ 'left' => [
4814
+ 'title' => __( 'Left', 'the-post-grid' ),
4815
+ 'icon' => 'eicon-text-align-left',
4816
+ ],
4817
+ 'center' => [
4818
+ 'title' => __( 'Center', 'the-post-grid' ),
4819
+ 'icon' => 'eicon-text-align-center',
4820
+ ],
4821
+ 'right' => [
4822
+ 'title' => __( 'Right', 'the-post-grid' ),
4823
+ 'icon' => 'eicon-text-align-right',
4824
+ ],
4825
+ ],
4826
+ 'selectors' => [
4827
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more' => 'text-align:{{VALUE}}',
4828
+ ],
4829
+ 'toggle' => true,
4830
+ ]
4831
+ );
4832
+
4833
+ $ref->add_control(
4834
+ 'readmore_icon_position',
4835
+ [
4836
+ 'label' => __( 'Icon Position', 'the-post-grid' ),
4837
+ 'type' => \Elementor\Controls_Manager::SELECT,
4838
+ 'default' => 'right',
4839
+ 'options' => [
4840
+ 'left' => __( 'Left', 'the-post-grid' ),
4841
+ 'right' => __( 'Right', 'the-post-grid' ),
4842
+ ],
4843
+ 'separator' => 'before',
4844
+ 'condition' => [
4845
+ 'show_btn_icon' => 'yes',
4846
+ ],
4847
+ ]
4848
+ );
4849
+
4850
+ $ref->add_responsive_control(
4851
+ 'readmore_icon_size',
4852
+ [
4853
+ 'label' => __( 'Icon Size', 'the-post-grid' ),
4854
+ 'type' => Controls_Manager::SLIDER,
4855
+ 'size_units' => [ 'px' ],
4856
+ 'range' => [
4857
+ 'px' => [
4858
+ 'min' => 10,
4859
+ 'max' => 50,
4860
+ 'step' => 1,
4861
+ ],
4862
+ ],
4863
+ 'selectors' => [
4864
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a i' => 'font-size: {{SIZE}}{{UNIT}};',
4865
+ ],
4866
+ 'condition' => [
4867
+ 'show_btn_icon' => 'yes',
4868
+ ],
4869
+ ]
4870
+ );
4871
+
4872
+ $ref->add_responsive_control(
4873
+ 'readmore_icon_y_position',
4874
+ [
4875
+ 'label' => __( 'Icon Vertical Position', 'the-post-grid' ),
4876
+ 'type' => Controls_Manager::SLIDER,
4877
+ 'size_units' => [ 'px' ],
4878
+ 'range' => [
4879
+ 'px' => [
4880
+ 'min' => - 20,
4881
+ 'max' => 20,
4882
+ 'step' => 1,
4883
+ ],
4884
+ ],
4885
+ 'selectors' => [
4886
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a i' => 'transform: translateY( {{SIZE}}{{UNIT}} );',
4887
+ ],
4888
+ 'condition' => [
4889
+ 'show_btn_icon' => 'yes',
4890
+ ],
4891
+ ]
4892
+ );
4893
+
4894
+ //TODO: Button style Tabs
4895
+ $ref->start_controls_tabs(
4896
+ 'readmore_style_tabs'
4897
+ );
4898
+
4899
+ $ref->start_controls_tab(
4900
+ 'readmore_style_normal_tab',
4901
+ [
4902
+ 'label' => __( 'Normal', 'the-post-grid' ),
4903
+ ]
4904
+ );
4905
+
4906
+ $ref->add_control(
4907
+ 'readmore_text_color',
4908
+ [
4909
+ 'label' => __( 'Text Color', 'the-post-grid' ),
4910
+ 'type' => \Elementor\Controls_Manager::COLOR,
4911
+ 'selectors' => [
4912
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a' => 'color: {{VALUE}}',
4913
+ ],
4914
+ ]
4915
+ );
4916
+
4917
+ $ref->add_control(
4918
+ 'readmore_icon_color',
4919
+ [
4920
+ 'label' => __( 'Icon Color', 'the-post-grid' ),
4921
+ 'type' => \Elementor\Controls_Manager::COLOR,
4922
+ 'selectors' => [
4923
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a i' => 'color: {{VALUE}}',
4924
+ ],
4925
+ 'condition' => [
4926
+ 'show_btn_icon' => 'yes',
4927
+ ],
4928
+ ]
4929
+ );
4930
+
4931
+ $ref->add_control(
4932
+ 'readmore_bg',
4933
+ [
4934
+ 'label' => __( 'Background Color', 'the-post-grid' ),
4935
+ 'type' => \Elementor\Controls_Manager::COLOR,
4936
+ 'selectors' => [
4937
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a' => 'background-color: {{VALUE}}',
4938
+ ],
4939
+ 'condition' => [
4940
+ 'readmore_btn_style' => 'default-style',
4941
+ ],
4942
+ ]
4943
+ );
4944
+
4945
+ $ref->add_responsive_control(
4946
+ 'readmore_icon_margin',
4947
+ [
4948
+ 'label' => __( 'Icon Spacing', 'the-post-grid' ),
4949
+ 'type' => Controls_Manager::DIMENSIONS,
4950
+ 'size_units' => [ 'px' ],
4951
+ 'allowed_dimensions' => 'horizontal',
4952
+ 'default' => [
4953
+ 'top' => '',
4954
+ 'right' => '',
4955
+ 'bottom' => '',
4956
+ 'left' => '',
4957
+ 'isLinked' => false,
4958
+ ],
4959
+ 'selectors' => [
4960
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a i' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4961
+ ],
4962
+ 'condition' => [
4963
+ 'show_btn_icon' => 'yes',
4964
+ ],
4965
+ ]
4966
+ );
4967
+
4968
+ $ref->add_responsive_control(
4969
+ 'border_radius',
4970
+ [
4971
+ 'label' => __( 'Border Radius', 'the-post-grid' ),
4972
+ 'type' => Controls_Manager::DIMENSIONS,
4973
+ 'size_units' => [ 'px', '%', 'em' ],
4974
+ 'allowed_dimensions' => 'all',
4975
+ 'selectors' => [
4976
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4977
+ ],
4978
+ 'condition' => [
4979
+ 'readmore_btn_style' => 'default-style',
4980
+ ],
4981
+ ]
4982
+ );
4983
+
4984
+ $ref->add_group_control(
4985
+ \Elementor\Group_Control_Border::get_type(),
4986
+ [
4987
+ 'name' => 'readmore_border',
4988
+ 'label' => __( 'Button Border', 'the-post-grid' ),
4989
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a',
4990
+ 'fields_options' => [
4991
+ 'border' => [
4992
+ 'default' => 'solid',
4993
+ ],
4994
+ 'width' => [
4995
+ 'default' => [
4996
+ 'top' => '1',
4997
+ 'right' => '1',
4998
+ 'bottom' => '1',
4999
+ 'left' => '1',
5000
+ 'isLinked' => true,
5001
+ ],
5002
+ ],
5003
+ 'color' => [
5004
+ 'default' => '#D4D4D4',
5005
+ ],
5006
+ ],
5007
+ 'condition' => [
5008
+ 'readmore_btn_style' => 'default-style',
5009
+ ],
5010
+ ]
5011
+ );
5012
+
5013
+ $ref->end_controls_tab();
5014
+
5015
+ //TODO: Hover Tab
5016
+
5017
+ $ref->start_controls_tab(
5018
+ 'readmore_style_hover_tab',
5019
+ [
5020
+ 'label' => __( 'Hover', 'the-post-grid' ),
5021
+ ]
5022
+ );
5023
+
5024
+ $ref->add_control(
5025
+ 'readmore_text_color_hover',
5026
+ [
5027
+ 'label' => __( 'Text Color hover', 'the-post-grid' ),
5028
+ 'type' => \Elementor\Controls_Manager::COLOR,
5029
+ 'selectors' => [
5030
+ 'body {{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a:hover' => 'color: {{VALUE}}',
5031
+ ],
5032
+ ]
5033
+ );
5034
+
5035
+ $ref->add_control(
5036
+ 'readmore_icon_color_hover',
5037
+ [
5038
+ 'label' => __( 'Icon Color Hover', 'the-post-grid' ),
5039
+ 'type' => \Elementor\Controls_Manager::COLOR,
5040
+ 'selectors' => [
5041
+ 'body {{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a:hover i' => 'color: {{VALUE}}',
5042
+ ],
5043
+ 'condition' => [
5044
+ 'show_btn_icon' => 'yes',
5045
+ ],
5046
+ ]
5047
+ );
5048
+
5049
+ $ref->add_control(
5050
+ 'readmore_bg_hover',
5051
+ [
5052
+ 'label' => __( 'Background Color hover', 'the-post-grid' ),
5053
+ 'type' => \Elementor\Controls_Manager::COLOR,
5054
+ 'selectors' => [
5055
+ 'body {{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a:hover' => 'background-color: {{VALUE}}',
5056
+ ],
5057
+ 'condition' => [
5058
+ 'readmore_btn_style' => 'default-style',
5059
+ ],
5060
+ ]
5061
+ );
5062
+
5063
+ $ref->add_responsive_control(
5064
+ 'readmore_icon_margin_hover',
5065
+ [
5066
+ 'label' => __( 'Icon Spacing - Hover', 'the-post-grid' ),
5067
+ 'type' => Controls_Manager::DIMENSIONS,
5068
+ 'size_units' => [ 'px' ],
5069
+ 'allowed_dimensions' => 'horizontal',
5070
+ 'default' => [
5071
+ 'top' => '',
5072
+ 'right' => '',
5073
+ 'bottom' => '',
5074
+ 'left' => '',
5075
+ 'isLinked' => false,
5076
+ ],
5077
+ 'selectors' => [
5078
+ 'body {{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a:hover i' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5079
+ ],
5080
+ 'condition' => [
5081
+ 'show_btn_icon' => 'yes',
5082
+ ],
5083
+ ]
5084
+ );
5085
+
5086
+ $ref->add_responsive_control(
5087
+ 'border_radius_hover',
5088
+ [
5089
+ 'label' => __( 'Border Radius - Hover', 'the-post-grid' ),
5090
+ 'type' => Controls_Manager::DIMENSIONS,
5091
+ 'size_units' => [ 'px', '%', 'em' ],
5092
+ 'allowed_dimensions' => 'all',
5093
+ 'selectors' => [
5094
+ 'body {{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5095
+ ],
5096
+ 'condition' => [
5097
+ 'readmore_btn_style' => 'default-style',
5098
+ ],
5099
+ ]
5100
+ );
5101
+
5102
+ $ref->add_group_control(
5103
+ \Elementor\Group_Control_Border::get_type(),
5104
+ [
5105
+ 'name' => 'readmore_border_hover',
5106
+ 'label' => __( 'Button Border - Hover', 'the-post-grid' ),
5107
+ 'selector' => 'body {{WRAPPER}} .rt-tpg-container .tpg-post-holder .rt-detail .read-more a:hover',
5108
+ 'fields_options' => [
5109
+ 'border' => [
5110
+ 'default' => 'solid',
5111
+ ],
5112
+ 'width' => [
5113
+ 'default' => [
5114
+ 'top' => '1',
5115
+ 'right' => '1',
5116
+ 'bottom' => '1',
5117
+ 'left' => '1',
5118
+ 'isLinked' => true,
5119
+ ],
5120
+ ],
5121
+ 'color' => [
5122
+ 'default' => '#7a64f2',
5123
+ ],
5124
+ ],
5125
+ 'condition' => [
5126
+ 'readmore_btn_style' => 'default-style',
5127
+ ],
5128
+ ]
5129
+ );
5130
+
5131
+ $ref->end_controls_tab();
5132
+
5133
+
5134
+ //TODO: Box Hover Tab
5135
+
5136
+ $ref->start_controls_tab(
5137
+ 'readmore_style_box_hover_tab',
5138
+ [
5139
+ 'label' => __( 'Box Hover', 'the-post-grid' ),
5140
+ ]
5141
+ );
5142
+
5143
+ $ref->add_control(
5144
+ 'readmore_text_color_box_hover',
5145
+ [
5146
+ 'label' => __( 'Text Color - BoxHover', 'the-post-grid' ),
5147
+ 'type' => \Elementor\Controls_Manager::COLOR,
5148
+ 'selectors' => [
5149
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder:hover .rt-detail .read-more a' => 'color: {{VALUE}}',
5150
+ ],
5151
+ ]
5152
+ );
5153
+
5154
+ $ref->add_control(
5155
+ 'readmore_icon_color_box_hover',
5156
+ [
5157
+ 'label' => __( 'Icon Color - BoxHover', 'the-post-grid' ),
5158
+ 'type' => \Elementor\Controls_Manager::COLOR,
5159
+ 'selectors' => [
5160
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder:hover .rt-detail .read-more a i' => 'color: {{VALUE}}',
5161
+ ],
5162
+ 'condition' => [
5163
+ 'show_btn_icon' => 'yes',
5164
+ ],
5165
+ ]
5166
+ );
5167
+
5168
+ $ref->add_control(
5169
+ 'readmore_bg_box_hover',
5170
+ [
5171
+ 'label' => __( 'Background Color - BoxHover', 'the-post-grid' ),
5172
+ 'type' => \Elementor\Controls_Manager::COLOR,
5173
+ 'selectors' => [
5174
+ '{{WRAPPER}} .rt-tpg-container .tpg-post-holder:hover .rt-detail .read-more a' => 'background-color: {{VALUE}}',
5175
+ ],
5176
+ 'condition' => [
5177
+ 'readmore_btn_style' => 'default-style',
5178
+ ],
5179
+ ]
5180
+ );
5181
+
5182
+ $ref->add_group_control(
5183
+ \Elementor\Group_Control_Border::get_type(),
5184
+ [
5185
+ 'name' => 'readmore_border_box_hover',
5186
+ 'label' => __( 'Button Border - Box Hover', 'the-post-grid' ),
5187
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .tpg-post-holder:hover .rt-detail .read-more a',
5188
+ 'condition' => [
5189
+ 'readmore_btn_style' => 'default-style',
5190
+ ],
5191
+ ]
5192
+ );
5193
+
5194
+
5195
+ $ref->end_controls_tab();
5196
+
5197
+ $ref->end_controls_tabs();
5198
+
5199
+ $ref->end_controls_section();
5200
+ }
5201
+
5202
+
5203
+ /**
5204
+ * Pagination and Load more style tab
5205
+ *
5206
+ * @param $ref
5207
+ */
5208
+ public static function paginationStyle( $ref ) {
5209
+ $ref->start_controls_section(
5210
+ 'pagination_loadmore_style',
5211
+ [
5212
+ 'label' => __( 'Pagination / Load More', 'the-post-grid' ),
5213
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
5214
+ 'condition' => [
5215
+ 'show_pagination' => 'show',
5216
+ ],
5217
+ ]
5218
+ );
5219
+
5220
+ $ref->add_group_control(
5221
+ \Elementor\Group_Control_Typography::get_type(),
5222
+ [
5223
+ 'name' => 'pagination_typography',
5224
+ 'selector' => '{{WRAPPER}} .rt-pagination .pagination-list > li > a, {{WRAPPER}} .rt-pagination .pagination-list > li > span',
5225
+
5226
+ ]
5227
+ );
5228
+
5229
+ $ref->add_responsive_control(
5230
+ 'pagination_text_align',
5231
+ [
5232
+ 'label' => esc_html__( 'Alignment', 'the-post-grid' ),
5233
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
5234
+ 'options' => [
5235
+ 'flex-start' => [
5236
+ 'title' => esc_html__( 'Left', 'the-post-grid' ),
5237
+ 'icon' => 'eicon-text-align-left',
5238
+ ],
5239
+ 'center' => [
5240
+ 'title' => esc_html__( 'Center', 'the-post-grid' ),
5241
+ 'icon' => 'eicon-text-align-center',
5242
+ ],
5243
+ 'flex-end' => [
5244
+ 'title' => esc_html__( 'Right', 'the-post-grid' ),
5245
+ 'icon' => 'eicon-text-align-right',
5246
+ ],
5247
+ ],
5248
+ 'selectors' => [
5249
+ '{{WRAPPER}} .rt-pagination-wrap' => 'justify-content: {{VALUE}};',
5250
+ ],
5251
+ 'default' => 'center',
5252
+ 'toggle' => true,
5253
+ ]
5254
+ );
5255
+
5256
+ $ref->add_responsive_control(
5257
+ 'pagination_spacing',
5258
+ [
5259
+ 'label' => __( 'Button Vertical Spacing', 'the-post-grid' ),
5260
+ 'type' => Controls_Manager::DIMENSIONS,
5261
+ 'size_units' => [ 'px' ],
5262
+ 'allowed_dimensions' => 'vertical',
5263
+ 'default' => [
5264
+ 'top' => '',
5265
+ 'right' => '',
5266
+ 'bottom' => '',
5267
+ 'left' => '',
5268
+ 'isLinked' => false,
5269
+ ],
5270
+ 'selectors' => [
5271
+ '{{WRAPPER}} .rt-pagination-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5272
+ ],
5273
+ 'condition' => [
5274
+ 'pagination_type!' => 'load_on_scroll',
5275
+ ],
5276
+ ]
5277
+ );
5278
+
5279
+ $ref->add_responsive_control(
5280
+ 'pagination_padding',
5281
+ [
5282
+ 'label' => __( 'Button Padding', 'the-post-grid' ),
5283
+ 'type' => Controls_Manager::DIMENSIONS,
5284
+ 'size_units' => [ 'px' ],
5285
+ 'allowed_dimensions' => 'all',
5286
+ 'selectors' => [
5287
+ '{{WRAPPER}} .rt-pagination .pagination-list > li > a, {{WRAPPER}} .rt-pagination .pagination-list > li > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5288
+ ],
5289
+ 'condition' => [
5290
+ 'pagination_type!' => 'load_on_scroll',
5291
+ ],
5292
+ ]
5293
+ );
5294
+
5295
+ $ref->add_responsive_control(
5296
+ 'pagination_border_radius',
5297
+ [
5298
+ 'label' => __( 'Border Radius', 'the-post-grid' ),
5299
+ 'type' => Controls_Manager::SLIDER,
5300
+ 'size_units' => [ 'px', '%' ],
5301
+ 'range' => [
5302
+ 'px' => [
5303
+ 'min' => 0,
5304
+ 'max' => 100,
5305
+ 'step' => 1,
5306
+ ],
5307
+ '%' => [
5308
+ 'min' => 0,
5309
+ 'max' => 100,
5310
+ ],
5311
+ ],
5312
+ 'selectors' => [
5313
+ '{{WRAPPER}} .rt-pagination .pagination-list > li:first-child > a, {{WRAPPER}} .rt-pagination .pagination-list > li:first-child > span' => 'border-bottom-left-radius: {{SIZE}}{{UNIT}}; border-top-left-radius: {{SIZE}}{{UNIT}};',
5314
+ '{{WRAPPER}} .rt-pagination .pagination-list > li:last-child > a, {{WRAPPER}} .rt-pagination .pagination-list > li:last-child > span' => 'border-bottom-right-radius: {{SIZE}}{{UNIT}}; border-top-right-radius: {{SIZE}}{{UNIT}};',
5315
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn' => 'border-radius: {{SIZE}}{{UNIT}};',
5316
+ ],
5317
+ 'condition' => [
5318
+ 'pagination_type!' => 'load_on_scroll',
5319
+ ],
5320
+ ]
5321
+ );
5322
+
5323
+ //Button style Tabs
5324
+ $ref->start_controls_tabs(
5325
+ 'pagination_style_tabs',
5326
+ [
5327
+ 'condition' => [
5328
+ 'pagination_type!' => 'load_on_scroll',
5329
+ ],
5330
+ ]
5331
+ );
5332
+
5333
+
5334
+ //TODO: Normal Tab
5335
+ $ref->start_controls_tab(
5336
+ 'pagination_style_normal_tab',
5337
+ [
5338
+ 'label' => __( 'Normal', 'the-post-grid' ),
5339
+ ]
5340
+ );
5341
+
5342
+ $ref->add_control(
5343
+ 'pagination_color',
5344
+ [
5345
+ 'label' => __( 'Color', 'the-post-grid' ),
5346
+ 'type' => \Elementor\Controls_Manager::COLOR,
5347
+ 'selectors' => [
5348
+ '{{WRAPPER}} .rt-pagination .pagination-list > li:not(:hover) > a, {{WRAPPER}} .rt-pagination .pagination-list > li:not(:hover) > span' => 'color: {{VALUE}}',
5349
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li:not(:hover) > a' => 'color: {{VALUE}}',
5350
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li:not(:hover)' => 'color: {{VALUE}}',
5351
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn' => 'color: {{VALUE}}',
5352
+ ],
5353
+ ]
5354
+ );
5355
+
5356
+ $ref->add_control(
5357
+ 'pagination_bg',
5358
+ [
5359
+ 'label' => __( 'Background Color', 'the-post-grid' ),
5360
+ 'type' => \Elementor\Controls_Manager::COLOR,
5361
+ 'selectors' => [
5362
+ '{{WRAPPER}} .rt-pagination .pagination-list > li > a:not(:hover), {{WRAPPER}} .rt-pagination .pagination-list > li:not(:hover) > span' => 'background-color: {{VALUE}}',
5363
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li:not(:hover) > a' => 'background-color: {{VALUE}}',
5364
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn' => 'background-color: {{VALUE}}',
5365
+ ],
5366
+
5367
+ ]
5368
+ );
5369
+
5370
+ $ref->add_control(
5371
+ 'pagination_border_color',
5372
+ [
5373
+ 'label' => __( 'Border Color', 'the-post-grid' ),
5374
+ 'type' => \Elementor\Controls_Manager::COLOR,
5375
+ 'selectors' => [
5376
+ '{{WRAPPER}} .rt-pagination .pagination-list > li > a:not(:hover), {{WRAPPER}} .rt-pagination .pagination-list > li:not(:hover) > span' => 'border-color: {{VALUE}}',
5377
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li:not(:hover) > a' => 'border-color: {{VALUE}}',
5378
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn' => 'border-color: {{VALUE}}',
5379
+ ],
5380
+ ]
5381
+ );
5382
+
5383
+ $ref->end_controls_tab();
5384
+
5385
+ //TODO: Hover Tab
5386
+ $ref->start_controls_tab(
5387
+ 'pagination_style_hover_tab',
5388
+ [
5389
+ 'label' => __( 'Hover', 'the-post-grid' ),
5390
+ ]
5391
+ );
5392
+
5393
+ $ref->add_control(
5394
+ 'pagination_color_hover',
5395
+ [
5396
+ 'label' => __( 'Color - hover', 'the-post-grid' ),
5397
+ 'type' => \Elementor\Controls_Manager::COLOR,
5398
+ 'selectors' => [
5399
+ '{{WRAPPER}} .rt-pagination .pagination-list > li:hover > a, {{WRAPPER}} .rt-pagination .pagination-list > li:hover > span' => 'color: {{VALUE}} !important',
5400
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li:hover > a' => 'color: {{VALUE}} !important',
5401
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn:hover' => 'color: {{VALUE}} !important',
5402
+ ],
5403
+ ]
5404
+ );
5405
+
5406
+ $ref->add_control(
5407
+ 'pagination_bg_hover',
5408
+ [
5409
+ 'label' => __( 'Background Color - Hover', 'the-post-grid' ),
5410
+ 'type' => \Elementor\Controls_Manager::COLOR,
5411
+ 'selectors' => [
5412
+ '{{WRAPPER}} .rt-pagination .pagination-list > li:hover > a, {{WRAPPER}} .rt-pagination .pagination-list > li:hover > span' => 'background-color: {{VALUE}} !important',
5413
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li:hover > a' => 'background-color: {{VALUE}} !important',
5414
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn:hover' => 'background-color: {{VALUE}} !important',
5415
+ ],
5416
+ ]
5417
+ );
5418
+
5419
+ $ref->add_control(
5420
+ 'pagination_border_color_hover',
5421
+ [
5422
+ 'label' => __( 'Border Color - Hover', 'the-post-grid' ),
5423
+ 'type' => \Elementor\Controls_Manager::COLOR,
5424
+ 'selectors' => [
5425
+ '{{WRAPPER}} .rt-pagination .pagination-list > li:hover > a, {{WRAPPER}} .rt-pagination .pagination-list > li:hover > span' => 'border-color: {{VALUE}} !important',
5426
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li:hover > a' => 'border-color: {{VALUE}} !important',
5427
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn:hover' => 'border-color: {{VALUE}} !important',
5428
+ ],
5429
+ ]
5430
+ );
5431
+
5432
+ $ref->end_controls_tab();
5433
+
5434
+
5435
+ //TODO: Active Tab
5436
+ $ref->start_controls_tab(
5437
+ 'pagination_style_active_tab',
5438
+ [
5439
+ 'label' => __( 'Active', 'the-post-grid' ),
5440
+ ]
5441
+ );
5442
+
5443
+ $ref->add_control(
5444
+ 'pagination_color_active',
5445
+ [
5446
+ 'label' => __( 'Color - Active', 'the-post-grid' ),
5447
+ 'type' => \Elementor\Controls_Manager::COLOR,
5448
+ 'selectors' => [
5449
+ '{{WRAPPER}} .rt-pagination .pagination-list > .active > a,
5450
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span,
5451
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > a:hover,
5452
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span:hover,
5453
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > a:focus,
5454
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span:focus' => 'color: {{VALUE}} !important',
5455
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active > a' => 'color: {{VALUE}}',
5456
+ ],
5457
+ ]
5458
+ );
5459
+
5460
+
5461
+ $ref->add_control(
5462
+ 'pagination_bg_active',
5463
+ [
5464
+ 'label' => __( 'Background Color - Active', 'the-post-grid' ),
5465
+ 'type' => \Elementor\Controls_Manager::COLOR,
5466
+ 'selectors' => [
5467
+ '{{WRAPPER}} .rt-pagination .pagination-list > .active > a,
5468
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span,
5469
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > a:hover,
5470
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span:hover,
5471
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > a:focus,
5472
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span:focus' => 'background-color: {{VALUE}} !important',
5473
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active > a' => 'background-color: {{VALUE}}',
5474
+ ],
5475
+ ]
5476
+ );
5477
+
5478
+ $ref->add_control(
5479
+ 'pagination_border_color_active',
5480
+ [
5481
+ 'label' => __( 'Border Color - Active', 'the-post-grid' ),
5482
+ 'type' => \Elementor\Controls_Manager::COLOR,
5483
+ 'selectors' => [
5484
+ '{{WRAPPER}} .rt-pagination .pagination-list > .active > a,
5485
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span,
5486
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > a:hover,
5487
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span:hover,
5488
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > a:focus,
5489
+ {{WRAPPER}} .rt-pagination .pagination-list > .active > span:focus' => 'border-color: {{VALUE}} !important',
5490
+ '{{WRAPPER}} .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active > a' => 'border-color: {{VALUE}}',
5491
+ ],
5492
+ ]
5493
+ );
5494
+
5495
+ $ref->end_controls_tab();
5496
+
5497
+ $ref->end_controls_tabs();
5498
+
5499
+ $ref->end_controls_section();
5500
+ }
5501
+
5502
+
5503
+ /**
5504
+ * Front-End Filter style
5505
+ *
5506
+ * @param $ref
5507
+ */
5508
+ public static function frontEndFilter( $ref ) {
5509
+ if ( ! rtTPG()->hasPro() ) {
5510
+ return;
5511
+ }
5512
+ $ref->start_controls_section(
5513
+ 'front_end_filter_style',
5514
+ [
5515
+ 'label' => esc_html__( 'Front-End Filter', 'the-post-grid' ),
5516
+ 'tab' => Controls_Manager::TAB_STYLE,
5517
+ 'conditions' => [
5518
+ 'relation' => 'or',
5519
+ 'terms' => [
5520
+ [
5521
+ 'name' => 'show_taxonomy_filter',
5522
+ 'operator' => '==',
5523
+ 'value' => 'show',
5524
+ ],
5525
+ [
5526
+ 'name' => 'show_author_filter',
5527
+ 'operator' => '==',
5528
+ 'value' => 'show',
5529
+ ],
5530
+ [
5531
+ 'name' => 'show_order_by',
5532
+ 'operator' => '==',
5533
+ 'value' => 'show',
5534
+ ],
5535
+ [
5536
+ 'name' => 'show_sort_order',
5537
+ 'operator' => '==',
5538
+ 'value' => 'show',
5539
+ ],
5540
+ [
5541
+ 'name' => 'show_search',
5542
+ 'operator' => '==',
5543
+ 'value' => 'show',
5544
+ ],
5545
+ ],
5546
+ ],
5547
+ ]
5548
+ );
5549
+
5550
+ $ref->add_group_control(
5551
+ \Elementor\Group_Control_Typography::get_type(),
5552
+ [
5553
+ 'name' => 'front_filter_typography',
5554
+ 'label' => __( 'Filter Typography', 'the-post-grid' ),
5555
+ 'selector' => '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap, {{WRAPPER}} .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide',
5556
+ ]
5557
+ );
5558
+
5559
+ $ref->add_responsive_control(
5560
+ 'filter_text_alignment',
5561
+ [
5562
+ 'label' => esc_html__( 'Alignment', 'the-post-grid' ),
5563
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
5564
+ 'options' => [
5565
+ 'left' => [
5566
+ 'title' => esc_html__( 'Left', 'the-post-grid' ),
5567
+ 'icon' => 'eicon-text-align-left',
5568
+ ],
5569
+ 'center' => [
5570
+ 'title' => esc_html__( 'Center', 'the-post-grid' ),
5571
+ 'icon' => 'eicon-text-align-center',
5572
+ ],
5573
+ 'right' => [
5574
+ 'title' => esc_html__( 'Right', 'the-post-grid' ),
5575
+ 'icon' => 'eicon-text-align-right',
5576
+ ],
5577
+ ],
5578
+ 'condition' => [
5579
+ 'filter_type' => 'button',
5580
+ 'filter_btn_style' => 'default',
5581
+ ],
5582
+ 'toggle' => true,
5583
+ 'selectors' => [
5584
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-layout-filter-container .rt-filter-wrap' => 'text-align: {{VALUE}};',
5585
+ ],
5586
+ ]
5587
+ );
5588
+
5589
+ $ref->add_control(
5590
+ 'filter_v_alignment',
5591
+ [
5592
+ 'label' => esc_html__( 'Vertical Alignment', 'the-post-grid' ),
5593
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
5594
+ 'options' => [
5595
+ 'left' => [
5596
+ 'title' => esc_html__( 'Top', 'the-post-grid' ),
5597
+ 'icon' => 'eicon-v-align-top',
5598
+ ],
5599
+ 'center' => [
5600
+ 'title' => esc_html__( 'Center', 'the-post-grid' ),
5601
+ 'icon' => 'eicon-v-align-middle',
5602
+ ],
5603
+ 'right' => [
5604
+ 'title' => esc_html__( 'Right', 'the-post-grid' ),
5605
+ 'icon' => 'eicon-v-align-bottom',
5606
+ ],
5607
+ ],
5608
+ 'condition' => [
5609
+ 'filter_type' => 'button',
5610
+ 'filter_btn_style' => 'default',
5611
+ ],
5612
+ 'prefix_class' => 'tpg-filter-alignment-',
5613
+ 'toggle' => true,
5614
+ ]
5615
+ );
5616
+
5617
+ $ref->add_responsive_control(
5618
+ 'filter_button_width',
5619
+ [
5620
+ 'label' => __( 'Filter Width', 'the-post-grid' ),
5621
+ 'type' => Controls_Manager::SLIDER,
5622
+ 'size_units' => [ 'px', '%' ],
5623
+ 'range' => [
5624
+ 'px' => [
5625
+ 'min' => 0,
5626
+ 'max' => 1000,
5627
+ 'step' => 5,
5628
+ ],
5629
+ '%' => [
5630
+ 'min' => 0,
5631
+ 'max' => 100,
5632
+ ],
5633
+ ],
5634
+ 'selectors' => [
5635
+ '{{WRAPPER}} .tpg-header-wrapper.carousel .rt-layout-filter-container' => 'flex: 0 0 {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}};',
5636
+ ],
5637
+ 'condition' => [
5638
+ 'filter_type' => 'button',
5639
+ 'filter_btn_style' => 'carousel',
5640
+ ],
5641
+ ]
5642
+ );
5643
+
5644
+
5645
+ $ref->add_control(
5646
+ 'border_style',
5647
+ [
5648
+ 'label' => __( 'Filter Border', 'the-post-grid' ),
5649
+ 'type' => \Elementor\Controls_Manager::SELECT,
5650
+ 'default' => 'disable',
5651
+ 'options' => [
5652
+ 'disable' => __( 'Disable', 'the-post-grid' ),
5653
+ 'enable' => __( 'Enable', 'the-post-grid' ),
5654
+ ],
5655
+ 'condition' => [
5656
+ 'filter_type' => 'button',
5657
+ 'filter_btn_style' => 'carousel',
5658
+ 'section_title_style!' => [ 'style2', 'style3' ],
5659
+ ],
5660
+ 'prefix_class' => 'filter-button-border-',
5661
+ ]
5662
+ );
5663
+
5664
+ $ref->add_control(
5665
+ 'filter_next_prev_btn',
5666
+ [
5667
+ 'label' => __( 'Next/Prev Button', 'the-post-grid' ),
5668
+ 'type' => \Elementor\Controls_Manager::SELECT,
5669
+ 'default' => 'visible',
5670
+ 'options' => [
5671
+ 'visible' => __( 'Visible', 'the-post-grid' ),
5672
+ 'hidden' => __( 'Hidden', 'the-post-grid' ),
5673
+ ],
5674
+ 'condition' => [
5675
+ 'filter_type' => 'button',
5676
+ 'filter_btn_style' => 'carousel',
5677
+ ],
5678
+ 'prefix_class' => 'filter-nex-prev-btn-',
5679
+ ]
5680
+ );
5681
+
5682
+ $ref->add_control(
5683
+ 'filter_h_alignment',
5684
+ [
5685
+ 'label' => esc_html__( 'Vertical Alignment', 'the-post-grid' ),
5686
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
5687
+ 'options' => [
5688
+ 'left' => [
5689
+ 'title' => esc_html__( 'Top', 'the-post-grid' ),
5690
+ 'icon' => 'eicon-justify-start-h',
5691
+ ],
5692
+ 'center' => [
5693
+ 'title' => esc_html__( 'Center', 'the-post-grid' ),
5694
+ 'icon' => 'eicon-justify-center-h',
5695
+ ],
5696
+ 'right' => [
5697
+ 'title' => esc_html__( 'Right', 'the-post-grid' ),
5698
+ 'icon' => 'eicon-justify-end-h',
5699
+ ],
5700
+ 'space-between' => [
5701
+ 'title' => esc_html__( 'Space Between', 'the-post-grid' ),
5702
+ 'icon' => 'eicon-justify-space-between-h',
5703
+ ],
5704
+ ],
5705
+ 'condition' => [
5706
+ 'filter_type!' => 'button',
5707
+ ],
5708
+ 'prefix_class' => 'tpg-filter-h-alignment-',
5709
+ 'toggle' => true,
5710
+ ]
5711
+ );
5712
+
5713
+ $ref->add_responsive_control(
5714
+ 'filter_btn_radius',
5715
+ [
5716
+ 'label' => __( 'Border Radius', 'the-post-grid' ),
5717
+ 'type' => Controls_Manager::DIMENSIONS,
5718
+ 'size_units' => [ 'px' ],
5719
+ 'selectors' => [
5720
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5721
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5722
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5723
+ ],
5724
+ 'condition' => [
5725
+ 'filter_btn_style' => 'default',
5726
+ ],
5727
+ ]
5728
+ );
5729
+
5730
+
5731
+ //TODO: Start Tab
5732
+ $ref->start_controls_tabs(
5733
+ 'frontend_filter_style_tabs'
5734
+ );
5735
+
5736
+ $ref->start_controls_tab(
5737
+ 'frontend_filter_style_normal_tab',
5738
+ [
5739
+ 'label' => __( 'Normal', 'the-post-grid' ),
5740
+ ]
5741
+ );
5742
+
5743
+ $ref->add_control(
5744
+ 'filter_color',
5745
+ [
5746
+ 'label' => __( 'Filter Color', 'the-post-grid' ),
5747
+ 'type' => \Elementor\Controls_Manager::COLOR,
5748
+ 'selectors' => [
5749
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item, {{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item' => 'color: {{VALUE}}',
5750
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap' => 'color: {{VALUE}}',
5751
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span:before, {{WRAPPER}} .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span:after' => 'background-color: {{VALUE}}',
5752
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input' => 'color: {{VALUE}}',
5753
+ ],
5754
+ ]
5755
+ );
5756
+
5757
+ $ref->add_control(
5758
+ 'filter_bg_color',
5759
+ [
5760
+ 'label' => __( 'Filter Background Color', 'the-post-grid' ),
5761
+ 'type' => \Elementor\Controls_Manager::COLOR,
5762
+ 'selectors' => [
5763
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item' => 'background-color: {{VALUE}}',
5764
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap' => 'background-color: {{VALUE}}',
5765
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action' => 'background-color: {{VALUE}}',
5766
+ ],
5767
+ ]
5768
+ );
5769
+
5770
+ $ref->add_control(
5771
+ 'filter_border_color',
5772
+ [
5773
+ 'label' => __( 'Filter Border Color', 'the-post-grid' ),
5774
+ 'type' => \Elementor\Controls_Manager::COLOR,
5775
+ 'selectors' => [
5776
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item' => 'border-color: {{VALUE}}',
5777
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap' => 'border-color: {{VALUE}}',
5778
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action' => 'border-color: {{VALUE}}',
5779
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input' => 'border-color: {{VALUE}}',
5780
+ '{{WRAPPER}}.filter-button-border-enable .tpg-header-wrapper.carousel .rt-layout-filter-container' => 'border-color: {{VALUE}}',
5781
+ ],
5782
+ ]
5783
+ );
5784
+
5785
+ $ref->add_control(
5786
+ 'filter_search_bg',
5787
+ [
5788
+ 'label' => __( 'Search Background', 'the-post-grid' ),
5789
+ 'type' => \Elementor\Controls_Manager::COLOR,
5790
+ 'selectors' => [
5791
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input' => 'background-color: {{VALUE}}',
5792
+ ],
5793
+ 'condition' => [
5794
+ 'show_search' => 'show',
5795
+ 'filter_btn_style' => 'default',
5796
+ ],
5797
+ ]
5798
+ );
5799
+
5800
+ $ref->add_control(
5801
+ 'sub_menu_color_heading',
5802
+ [
5803
+ 'label' => __( 'Sub Menu Options', 'the-post-grid' ),
5804
+ 'type' => \Elementor\Controls_Manager::HEADING,
5805
+ 'separator' => 'before',
5806
+ 'classes' => 'tpg-control-type-heading',
5807
+ 'condition' => [
5808
+ 'filter_type' => 'dropdown',
5809
+ ],
5810
+ ]
5811
+ );
5812
+
5813
+ $ref->add_control(
5814
+ 'sub_menu_bg_color',
5815
+ [
5816
+ 'label' => __( 'Submenu Background', 'the-post-grid' ),
5817
+ 'type' => \Elementor\Controls_Manager::COLOR,
5818
+ 'selectors' => [
5819
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown' => 'background-color: {{VALUE}}',
5820
+ ],
5821
+ 'condition' => [
5822
+ 'filter_type' => 'dropdown',
5823
+ ],
5824
+ ]
5825
+ );
5826
+
5827
+ $ref->add_control(
5828
+ 'sub_menu_color',
5829
+ [
5830
+ 'label' => __( 'Submenu Color', 'the-post-grid' ),
5831
+ 'type' => \Elementor\Controls_Manager::COLOR,
5832
+ 'selectors' => [
5833
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item' => 'color: {{VALUE}}',
5834
+ ],
5835
+ 'condition' => [
5836
+ 'filter_type' => 'dropdown',
5837
+ ],
5838
+ ]
5839
+ );
5840
+
5841
+ $ref->add_control(
5842
+ 'sub_menu_border_bottom',
5843
+ [
5844
+ 'label' => __( 'Submenu Border', 'the-post-grid' ),
5845
+ 'type' => \Elementor\Controls_Manager::COLOR,
5846
+ 'selectors' => [
5847
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item' => 'border-bottom-color: {{VALUE}}',
5848
+ ],
5849
+ 'condition' => [
5850
+ 'filter_type' => 'dropdown',
5851
+ ],
5852
+ ]
5853
+ );
5854
+
5855
+ $ref->add_control(
5856
+ 'filter_nav_color',
5857
+ [
5858
+ 'label' => __( 'Filter Nav Color', 'the-post-grid' ),
5859
+ 'type' => \Elementor\Controls_Manager::COLOR,
5860
+ 'selectors' => [
5861
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'color: {{VALUE}}',
5862
+ ],
5863
+ 'condition' => [
5864
+ 'filter_btn_style' => 'carousel',
5865
+ 'filter_next_prev_btn' => 'visible',
5866
+ ],
5867
+ ]
5868
+ );
5869
+
5870
+ $ref->add_control(
5871
+ 'filter_nav_bg',
5872
+ [
5873
+ 'label' => __( 'Filter Nav Background', 'the-post-grid' ),
5874
+ 'type' => \Elementor\Controls_Manager::COLOR,
5875
+ 'selectors' => [
5876
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'background-color: {{VALUE}}',
5877
+ ],
5878
+ 'condition' => [
5879
+ 'filter_btn_style' => 'carousel',
5880
+ 'filter_next_prev_btn' => 'visible',
5881
+ ],
5882
+ ]
5883
+ );
5884
+
5885
+ $ref->add_control(
5886
+ 'filter_nav_border',
5887
+ [
5888
+ 'label' => __( 'Filter Nav Border', 'the-post-grid' ),
5889
+ 'type' => \Elementor\Controls_Manager::COLOR,
5890
+ 'selectors' => [
5891
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'border-color: {{VALUE}}',
5892
+ ],
5893
+ 'condition' => [
5894
+ 'filter_btn_style' => 'carousel',
5895
+ 'filter_next_prev_btn' => 'visible',
5896
+ ],
5897
+ ]
5898
+ );
5899
+
5900
+ $ref->end_controls_tab();
5901
+
5902
+ //TODO: Start Tab Hover
5903
+ $ref->start_controls_tab(
5904
+ 'frontend_filter_style_hover_tab',
5905
+ [
5906
+ 'label' => __( 'Hover / Active', 'the-post-grid' ),
5907
+ ]
5908
+ );
5909
+
5910
+ $ref->add_control(
5911
+ 'filter_color_hover',
5912
+ [
5913
+ 'label' => __( 'Filter Color - Hover', 'the-post-grid' ),
5914
+ 'type' => \Elementor\Controls_Manager::COLOR,
5915
+ 'selectors' => [
5916
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected, {{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover' => 'color: {{VALUE}}',
5917
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap:hover' => 'color: {{VALUE}}',
5918
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-sort-order-action:hover .rt-sort-order-action-arrow > span:before, {{WRAPPER}} .rt-filter-item-wrap.rt-sort-order-action:hover .rt-sort-order-action-arrow > span:after' => 'background-color: {{VALUE}}',
5919
+ ],
5920
+ ]
5921
+ );
5922
+
5923
+ $ref->add_control(
5924
+ 'filter_bg_color_hover',
5925
+ [
5926
+ 'label' => __( 'Filter Background Color - Hover', 'the-post-grid' ),
5927
+ 'type' => \Elementor\Controls_Manager::COLOR,
5928
+ 'selectors' => [
5929
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected, {{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover' => 'background-color: {{VALUE}}',
5930
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap:hover' => 'background-color: {{VALUE}}',
5931
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action:hover' => 'background-color: {{VALUE}}',
5932
+ ],
5933
+ ]
5934
+ );
5935
+
5936
+ $ref->add_control(
5937
+ 'filter_border_color_hover',
5938
+ [
5939
+ 'label' => __( 'Filter Border Color - Hover', 'the-post-grid' ),
5940
+ 'type' => \Elementor\Controls_Manager::COLOR,
5941
+ 'selectors' => [
5942
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected, {{WRAPPER}} .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover' => 'border-color: {{VALUE}}',
5943
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap:hover' => 'border-color: {{VALUE}}',
5944
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action:hover' => 'border-color: {{VALUE}}',
5945
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input:hover' => 'border-color: {{VALUE}}',
5946
+ '{{WRAPPER}}.filter-button-border-enable .tpg-header-wrapper.carousel .rt-layout-filter-container:hover' => 'border-color: {{VALUE}}',
5947
+ ],
5948
+ ]
5949
+ );
5950
+
5951
+ $ref->add_control(
5952
+ 'filter_search_bg_hover',
5953
+ [
5954
+ 'label' => __( 'Search Background - Hover', 'the-post-grid' ),
5955
+ 'type' => \Elementor\Controls_Manager::COLOR,
5956
+ 'selectors' => [
5957
+ '{{WRAPPER}} .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input:hover' => 'background-color: {{VALUE}}',
5958
+ ],
5959
+ 'condition' => [
5960
+ 'show_search' => 'show',
5961
+ 'filter_btn_style' => 'default',
5962
+ ],
5963
+ ]
5964
+ );
5965
+
5966
+ $ref->add_control(
5967
+ 'sub_menu_color_heading_hover',
5968
+ [
5969
+ 'label' => __( 'Sub Menu Options - Hover', 'the-post-grid' ),
5970
+ 'type' => \Elementor\Controls_Manager::HEADING,
5971
+ 'separator' => 'before',
5972
+ 'classes' => 'tpg-control-type-heading',
5973
+ 'condition' => [
5974
+ 'filter_type' => 'dropdown',
5975
+ ],
5976
+ ]
5977
+ );
5978
+
5979
+ $ref->add_control(
5980
+ 'sub_menu_bg_color_hover',
5981
+ [
5982
+ 'label' => __( 'Submenu Background - Hover', 'the-post-grid' ),
5983
+ 'type' => \Elementor\Controls_Manager::COLOR,
5984
+ 'selectors' => [
5985
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item:hover' => 'background-color: {{VALUE}}',
5986
+ ],
5987
+ 'condition' => [
5988
+ 'filter_type' => 'dropdown',
5989
+ ],
5990
+ ]
5991
+ );
5992
+
5993
+ $ref->add_control(
5994
+ 'sub_menu_color_hover',
5995
+ [
5996
+ 'label' => __( 'Submenu Color - Hover', 'the-post-grid' ),
5997
+ 'type' => \Elementor\Controls_Manager::COLOR,
5998
+ 'selectors' => [
5999
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item:hover' => 'color: {{VALUE}}',
6000
+ ],
6001
+ 'condition' => [
6002
+ 'filter_type' => 'dropdown',
6003
+ ],
6004
+ ]
6005
+ );
6006
+
6007
+ $ref->add_control(
6008
+ 'sub_menu_border_bottom_hover',
6009
+ [
6010
+ 'label' => __( 'Submenu Border - Hover', 'the-post-grid' ),
6011
+ 'type' => \Elementor\Controls_Manager::COLOR,
6012
+ 'selectors' => [
6013
+ '{{WRAPPER}} .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item:hover' => 'border-bottom-color: {{VALUE}}',
6014
+ ],
6015
+ 'condition' => [
6016
+ 'filter_type' => 'dropdown',
6017
+ ],
6018
+ ]
6019
+ );
6020
+
6021
+ $ref->add_control(
6022
+ 'filter_nav_color_hover',
6023
+ [
6024
+ 'label' => __( 'Filter Nav Color - Hover', 'the-post-grid' ),
6025
+ 'type' => \Elementor\Controls_Manager::COLOR,
6026
+ 'selectors' => [
6027
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn:hover' => 'color: {{VALUE}}',
6028
+ ],
6029
+ 'condition' => [
6030
+ 'filter_btn_style' => 'carousel',
6031
+ 'filter_next_prev_btn' => 'visible',
6032
+ ],
6033
+ ]
6034
+ );
6035
+
6036
+ $ref->add_control(
6037
+ 'filter_nav_bg_hover',
6038
+ [
6039
+ 'label' => __( 'Filter Nav Background - Hover', 'the-post-grid' ),
6040
+ 'type' => \Elementor\Controls_Manager::COLOR,
6041
+ 'selectors' => [
6042
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn:hover' => 'background-color: {{VALUE}}',
6043
+ ],
6044
+ 'condition' => [
6045
+ 'filter_btn_style' => 'carousel',
6046
+ 'filter_next_prev_btn' => 'visible',
6047
+ ],
6048
+ ]
6049
+ );
6050
+
6051
+ $ref->add_control(
6052
+ 'filter_nav_border_hover',
6053
+ [
6054
+ 'label' => __( 'Filter Nav Border - Hover', 'the-post-grid' ),
6055
+ 'type' => \Elementor\Controls_Manager::COLOR,
6056
+ 'selectors' => [
6057
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn:hover' => 'border-color: {{VALUE}}',
6058
+ ],
6059
+ 'condition' => [
6060
+ 'filter_btn_style' => 'carousel',
6061
+ 'filter_next_prev_btn' => 'visible',
6062
+ ],
6063
+ ]
6064
+ );
6065
+
6066
+
6067
+ $ref->end_controls_tab();
6068
+
6069
+ $ref->end_controls_tabs();
6070
+ //TODO: End Tab
6071
+
6072
+
6073
+ $ref->end_controls_section();
6074
+ }
6075
+
6076
+
6077
+ /**
6078
+ * Social Share control
6079
+ *
6080
+ * @param $ref
6081
+ */
6082
+ public static function socialShareStyle( $ref ) {
6083
+ $prefix = $ref->prefix;
6084
+ $ref->start_controls_section(
6085
+ 'social_share_style',
6086
+ [
6087
+ 'label' => esc_html__( 'Social Share', 'the-post-grid' ),
6088
+ 'tab' => Controls_Manager::TAB_STYLE,
6089
+ 'condition' => [
6090
+ 'show_social_share' => 'show',
6091
+ $prefix . '_layout!' => [ 'grid-layout7' ],
6092
+ ],
6093
+ ]
6094
+ );
6095
+
6096
+ self::get_social_share_control( $ref );
6097
+
6098
+ $ref->end_controls_section();
6099
+ }
6100
+
6101
+ /**
6102
+ * Get Social Share
6103
+ *
6104
+ * @param $ref
6105
+ * @param $prefix
6106
+ */
6107
+ public static function get_social_share_control( $ref ) {
6108
+ $ref->add_control(
6109
+ 'social_icon_style',
6110
+ [
6111
+ 'label' => __( 'Icon Color Style', 'the-post-grid' ),
6112
+ 'type' => \Elementor\Controls_Manager::SELECT,
6113
+ 'default' => 'default',
6114
+ 'options' => [
6115
+ 'default' => __( 'Default (Brand Color)', 'the-post-grid' ),
6116
+ 'different_color' => __( 'Different Color for each', 'the-post-grid' ),
6117
+ 'custom' => __( 'Custom color', 'the-post-grid' ),
6118
+ ],
6119
+ 'description' => __( 'Select Custom for your own customize', 'the-post-grid' ),
6120
+ ]
6121
+ );
6122
+
6123
+ $settings = get_option( rtTPG()->options['settings'] );
6124
+ $ssList = ! empty( $settings['social_share_items'] ) ? $settings['social_share_items'] : [];
6125
+
6126
+ $ref->add_responsive_control(
6127
+ 'social_icon_margin',
6128
+ [
6129
+ 'label' => __( 'Icon Margin', 'the-post-grid' ),
6130
+ 'type' => Controls_Manager::DIMENSIONS,
6131
+ 'size_units' => [ 'px' ],
6132
+ 'allowed_dimensions' => 'all',
6133
+ 'selectors' => [
6134
+ '{{WRAPPER}} .rt-tpg-social-share a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6135
+ ],
6136
+ ]
6137
+ );
6138
+
6139
+ $ref->add_responsive_control(
6140
+ 'social_wrapper_margin',
6141
+ [
6142
+ 'label' => __( 'Icon Wrapper Spacing', 'the-post-grid' ),
6143
+ 'type' => Controls_Manager::DIMENSIONS,
6144
+ 'size_units' => [ 'px' ],
6145
+ 'allowed_dimensions' => 'all', //horizontal, vertical, [ 'top', 'right', 'bottom', 'left' ]
6146
+ 'default' => [
6147
+ 'top' => '',
6148
+ 'right' => '',
6149
+ 'bottom' => '',
6150
+ 'left' => '',
6151
+ 'isLinked' => false,
6152
+ ],
6153
+ 'selectors' => [
6154
+ '{{WRAPPER}} .rt-tpg-social-share' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6155
+ ],
6156
+ ]
6157
+ );
6158
+
6159
+ $ref->add_responsive_control(
6160
+ 'social_icon_radius',
6161
+ [
6162
+ 'label' => __( 'Border Radius', 'the-post-grid' ),
6163
+ 'type' => Controls_Manager::DIMENSIONS,
6164
+ 'size_units' => [ 'px', '%', 'em' ],
6165
+ 'allowed_dimensions' => 'all',
6166
+ 'default' => [
6167
+ 'top' => '',
6168
+ 'right' => '',
6169
+ 'bottom' => '',
6170
+ 'left' => '',
6171
+ 'isLinked' => true,
6172
+ ],
6173
+ 'selectors' => [
6174
+ '{{WRAPPER}} .rt-tpg-social-share i' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6175
+ ],
6176
+ ]
6177
+ );
6178
+
6179
+ $ref->add_control(
6180
+ 'icon_width_height',
6181
+ [
6182
+ 'label' => __( 'Icon Dimension', 'the-post-grid' ),
6183
+ 'type' => \Elementor\Controls_Manager::IMAGE_DIMENSIONS,
6184
+ 'default' => [
6185
+ 'width' => '',
6186
+ 'height' => '',
6187
+ ],
6188
+ 'selectors' => [
6189
+ '{{WRAPPER}} .rt-tpg-social-share a i' => 'width:{{width}}px; height:{{height}}px; line-height:{{height}}px; text-align:center',
6190
+ ],
6191
+ 'description' => __( 'Just write number. Don\'t use (px or em).', 'the-post-grid' ),
6192
+ 'classes' => 'should-show-title',
6193
+ ]
6194
+ );
6195
+
6196
+ $ref->add_responsive_control(
6197
+ 'icon_font_size',
6198
+ [
6199
+ 'label' => __( 'Icon Font Size', 'the-post-grid' ),
6200
+ 'type' => Controls_Manager::SLIDER,
6201
+ 'size_units' => [ 'px' ],
6202
+ 'range' => [
6203
+ 'px' => [
6204
+ 'min' => 12,
6205
+ 'max' => 50,
6206
+ 'step' => 1,
6207
+ ],
6208
+ ],
6209
+ 'selectors' => [
6210
+ '{{WRAPPER}} .rt-tpg-social-share a i' => 'font-size: {{SIZE}}{{UNIT}};',
6211
+ ],
6212
+ ]
6213
+ );
6214
+
6215
+ //TODO: Start Social Share Tabs Tab
6216
+ $ref->start_controls_tabs(
6217
+ 'social_share_style_tabs'
6218
+ );
6219
+
6220
+ $ref->start_controls_tab(
6221
+ 'social_share_normal_tab',
6222
+ [
6223
+ 'label' => __( 'Normal', 'the-post-grid' ),
6224
+ ]
6225
+ );
6226
+ //TODO: Normal Tab
6227
+
6228
+
6229
+ $ref->add_control(
6230
+ 'social_icon_color',
6231
+ [
6232
+ 'label' => __( 'Social Icon color', 'the-post-grid' ),
6233
+ 'type' => \Elementor\Controls_Manager::COLOR,
6234
+ 'selectors' => [
6235
+ '{{WRAPPER}} .rt-tpg-social-share a i' => 'color: {{VALUE}}',
6236
+ ],
6237
+ 'condition' => [
6238
+ 'social_icon_style' => 'custom',
6239
+ ],
6240
+ ]
6241
+ );
6242
+
6243
+ $ref->add_control(
6244
+ 'social_icon_bg_color',
6245
+ [
6246
+ 'label' => __( 'Social Icon Background', 'the-post-grid' ),
6247
+ 'type' => \Elementor\Controls_Manager::COLOR,
6248
+ 'selectors' => [
6249
+ '{{WRAPPER}} .rt-tpg-social-share a i' => 'background-color: {{VALUE}}',
6250
+ ],
6251
+ 'condition' => [
6252
+ 'social_icon_style' => 'custom',
6253
+ ],
6254
+ ]
6255
+ );
6256
+
6257
+
6258
+ foreach ( $ssList as $ss ) {
6259
+ $ref->add_control(
6260
+ $ss . '_social_icon_color',
6261
+ [
6262
+ 'label' => ucwords( $ss ) . __( ' color', 'the-post-grid' ),
6263
+ 'type' => \Elementor\Controls_Manager::COLOR,
6264
+ 'selectors' => [
6265
+ '{{WRAPPER}} .rt-tpg-social-share a.' . $ss . ' i' => 'color: {{VALUE}}',
6266
+ ],
6267
+ 'condition' => [
6268
+ 'social_icon_style' => 'different_color',
6269
+ ],
6270
+ ]
6271
+ );
6272
+
6273
+ $ref->add_control(
6274
+ $ss . '_social_icon_bg_color',
6275
+ [
6276
+ 'label' => __( ucwords( $ss ) . ' Background', 'the-post-grid' ),
6277
+ 'type' => \Elementor\Controls_Manager::COLOR,
6278
+ 'selectors' => [
6279
+ '{{WRAPPER}} .rt-tpg-social-share a.' . $ss . ' i' => 'background-color: {{VALUE}}',
6280
+ ],
6281
+ 'condition' => [
6282
+ 'social_icon_style' => 'different_color',
6283
+ ],
6284
+ ]
6285
+ );
6286
+ }
6287
+
6288
+
6289
+ $ref->add_group_control(
6290
+ \Elementor\Group_Control_Border::get_type(),
6291
+ [
6292
+ 'name' => 'social_icon_border',
6293
+ 'label' => __( 'Icon Border', 'the-post-grid' ),
6294
+ 'selector' => '{{WRAPPER}} .rt-tpg-social-share a i',
6295
+ ]
6296
+ );
6297
+
6298
+ $ref->end_controls_tab();
6299
+
6300
+ $ref->start_controls_tab(
6301
+ 'socia_hover_tab',
6302
+ [
6303
+ 'label' => __( 'Hover', 'the-post-grid' ),
6304
+ ]
6305
+ );
6306
+
6307
+ //TODO: Hover Tab
6308
+
6309
+ $ref->add_control(
6310
+ 'social_icon_color_hover',
6311
+ [
6312
+ 'label' => __( 'Icon color', 'the-post-grid' ),
6313
+ 'type' => \Elementor\Controls_Manager::COLOR,
6314
+ 'selectors' => [
6315
+ '{{WRAPPER}} .rt-tpg-social-share a:hover i' => 'color: {{VALUE}}',
6316
+ ],
6317
+ 'condition' => [
6318
+ 'social_icon_style' => 'custom',
6319
+ ],
6320
+ ]
6321
+ );
6322
+
6323
+ $ref->add_control(
6324
+ 'social_icon_bg_color_hover',
6325
+ [
6326
+ 'label' => __( 'Social Icon Background', 'the-post-grid' ),
6327
+ 'type' => \Elementor\Controls_Manager::COLOR,
6328
+ 'selectors' => [
6329
+ '{{WRAPPER}} .rt-tpg-social-share a:hover i' => 'background-color: {{VALUE}}',
6330
+ ],
6331
+ 'condition' => [
6332
+ 'social_icon_style' => 'custom',
6333
+ ],
6334
+ ]
6335
+ );
6336
+
6337
+ foreach ( $ssList as $ss ) {
6338
+ $ref->add_control(
6339
+ $ss . '_social_icon_color_hover',
6340
+ [
6341
+ 'label' => ucwords( $ss ) . __( ' color - Hover', 'the-post-grid' ),
6342
+ 'type' => \Elementor\Controls_Manager::COLOR,
6343
+ 'selectors' => [
6344
+ '{{WRAPPER}} .rt-tpg-social-share a.' . $ss . ':hover i' => 'color: {{VALUE}}',
6345
+ ],
6346
+ 'condition' => [
6347
+ 'social_icon_style' => 'different_color',
6348
+ ],
6349
+ ]
6350
+ );
6351
+
6352
+ $ref->add_control(
6353
+ $ss . '_social_icon_bg_color_hover',
6354
+ [
6355
+ 'label' => __( ucwords( $ss ) . ' Background - Hover', 'the-post-grid' ),
6356
+ 'type' => \Elementor\Controls_Manager::COLOR,
6357
+ 'selectors' => [
6358
+ '{{WRAPPER}} .rt-tpg-social-share a.' . $ss . ':hover i' => 'background-color: {{VALUE}}',
6359
+ ],
6360
+ 'condition' => [
6361
+ 'social_icon_style' => 'different_color',
6362
+ ],
6363
+ ]
6364
+ );
6365
+ }
6366
+
6367
+ $ref->add_group_control(
6368
+ \Elementor\Group_Control_Border::get_type(),
6369
+ [
6370
+ 'name' => 'social_icon_border_hover',
6371
+ 'label' => __( 'Icon Border - Hover', 'the-post-grid' ),
6372
+ 'selector' => '{{WRAPPER}} .rt-tpg-social-share a:hover i',
6373
+ ]
6374
+ );
6375
+
6376
+ $ref->end_controls_tab();
6377
+
6378
+ $ref->end_controls_tabs();
6379
+ }
6380
+
6381
+ /**
6382
+ * Box Settings
6383
+ *
6384
+ * @param $ref
6385
+ */
6386
+ public static function articlBoxSettings( $ref ) {
6387
+ $prefix = $ref->prefix;
6388
+ $ref->start_controls_section(
6389
+ 'article_box_settings',
6390
+ [
6391
+ 'label' => esc_html__( 'Card', 'the-post-grid' ),
6392
+ 'tab' => Controls_Manager::TAB_STYLE,
6393
+ ]
6394
+ );
6395
+
6396
+ if ( 'slider' !== $prefix ) {
6397
+ $ref->add_responsive_control(
6398
+ 'box_margin',
6399
+ [
6400
+ 'label' => __( 'Card Gap', 'the-post-grid' ),
6401
+ 'type' => Controls_Manager::DIMENSIONS,
6402
+ 'size_units' => [ 'px' ],
6403
+ 'render_type' => 'template',
6404
+ 'selectors' => [
6405
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-row [class*="rt-col"]' => 'padding-left: {{LEFT}}{{UNIT}} !important; padding-right: {{RIGHT}}{{UNIT}} !important; padding-bottom: calc(2 * {{BOTTOM}}{{UNIT}}) !important;',
6406
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-row' => 'margin-left: -{{LEFT}}{{UNIT}}; margin-right: -{{RIGHT}}{{UNIT}}',
6407
+ '{{WRAPPER}} .tpg-el-main-wrapper .rt-row .rt-row' => 'margin-bottom: -{{RIGHT}}{{UNIT}}',
6408
+ '{{WRAPPER}} .rt-tpg-container .grid_hover-layout8 .display-grid-wrapper' => 'grid-gap: {{TOP}}{{UNIT}};margin-bottom: {{TOP}}{{UNIT}}',
6409
+ ],
6410
+ 'condition' => [
6411
+ $prefix . '_layout!' => [
6412
+ 'grid-layout2',
6413
+ 'grid-layout5',
6414
+ 'grid-layout5-2',
6415
+ 'grid-layout6',
6416
+ 'grid-layout6-2',
6417
+ 'list-layout4',
6418
+ ],
6419
+ ],
6420
+ ]
6421
+ );
6422
+ }
6423
+
6424
+
6425
+ if ( in_array( $prefix, [ 'grid', 'list', 'slider' ] ) ) {
6426
+ if ( 'slider' == $prefix ) {
6427
+ $box_padding = [
6428
+ $prefix . '_layout' => [
6429
+ 'slider-layout1',
6430
+ 'slider-layout2',
6431
+ 'slider-layout3',
6432
+ ],
6433
+ ];
6434
+ } else {
6435
+ $box_padding = [
6436
+ $prefix . '_layout!' => [
6437
+ 'grid-layout5',
6438
+ 'grid-layout5-2',
6439
+ 'grid-layout6',
6440
+ 'grid-layout6-2',
6441
+ 'grid-layout7',
6442
+ 'list-layout1',
6443
+ 'list-layout2',
6444
+ 'list-layout2-2',
6445
+ 'list-layout3',
6446
+ 'list-layout3-2',
6447
+ 'list-layout4',
6448
+ 'list-layout5',
6449
+ 'slider-layout1',
6450
+ 'slider-layout2',
6451
+ 'slider-layout3',
6452
+ ],
6453
+ ];
6454
+ }
6455
+ $ref->add_responsive_control(
6456
+ 'content_box_padding',
6457
+ [
6458
+ 'label' => __( 'Content Padding', 'the-post-grid' ),
6459
+ 'type' => Controls_Manager::DIMENSIONS,
6460
+ 'size_units' => [ 'px' ],
6461
+ 'allowed_dimensions' => 'all',
6462
+ 'selectors' => [
6463
+ 'body {{WRAPPER}} .rt-tpg-container .rt-el-content-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
6464
+ 'body {{WRAPPER}} .rt-tpg-container .rt-el-content-wrapper-flex .post-right-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
6465
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .rt-holder .rt-el-content-wrapper .tpg-el-image-wrap' => 'margin-left: -{{LEFT}}{{UNIT}}; margin-right: -{{RIGHT}}{{UNIT}};',
6466
+ ],
6467
+ 'condition' => $box_padding,
6468
+ ]
6469
+ );
6470
+
6471
+
6472
+ $ref->add_responsive_control(
6473
+ 'content_box_padding_offset',
6474
+ [
6475
+ 'label' => __( 'Content Padding', 'the-post-grid' ),
6476
+ 'type' => Controls_Manager::DIMENSIONS,
6477
+ 'size_units' => [ 'px' ],
6478
+ 'allowed_dimensions' => 'all',
6479
+ 'selectors' => [
6480
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .offset-left .tpg-post-holder .offset-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
6481
+ '{{WRAPPER}} .rt-tpg-container .list-layout4 .post-right-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
6482
+ ],
6483
+ 'condition' => [
6484
+ $prefix . '_layout' => [
6485
+ 'grid-layout5',
6486
+ 'grid-layout5-2',
6487
+ 'list-layout4',
6488
+ ],
6489
+ ],
6490
+ ]
6491
+ );
6492
+ }
6493
+
6494
+ $ref->add_responsive_control(
6495
+ 'content_box_padding_2',
6496
+ [
6497
+ 'label' => __( 'Content Padding', 'the-post-grid' ),
6498
+ 'type' => Controls_Manager::DIMENSIONS,
6499
+ 'size_units' => [ 'px' ],
6500
+ 'allowed_dimensions' => 'all',
6501
+ 'selectors' => [
6502
+ 'body {{WRAPPER}} .rt-tpg-container .slider-layout13 .rt-holder .post-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
6503
+ ],
6504
+ 'condition' => [
6505
+ $prefix . '_layout' => [ 'slider-layout13' ],
6506
+ ],
6507
+ ]
6508
+ );
6509
+
6510
+ $ref->add_responsive_control(
6511
+ 'box_radius',
6512
+ [
6513
+ 'label' => __( 'Card Border Radius', 'the-post-grid' ),
6514
+ 'type' => Controls_Manager::DIMENSIONS,
6515
+ 'size_units' => [ 'px', '%' ],
6516
+ 'selectors' => [
6517
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};overflow:hidden;',
6518
+ 'body {{WRAPPER}} .rt-tpg-container .slider-layout13 .rt-holder .post-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};overflow:hidden;',
6519
+ ],
6520
+ 'condition' => [
6521
+ $prefix . '_layout!' => [
6522
+ 'list-layout2',
6523
+ 'list-layout2-2',
6524
+ 'list-layout3',
6525
+ 'list-layout3-2',
6526
+ 'list-layout4',
6527
+ 'list-layout4-2',
6528
+ 'list-layout5',
6529
+ 'list-layout5-2',
6530
+ 'slider-layout11',
6531
+ 'slider-layout12',
6532
+ 'slider-layout13',
6533
+ ],
6534
+ ],
6535
+ ]
6536
+ );
6537
+
6538
+ if ( in_array( $prefix, [ 'grid', 'list' ] ) ) {
6539
+ $ref->add_control(
6540
+ 'is_box_border',
6541
+ [
6542
+ 'label' => __( 'Enable Border & Box Shadow', 'the-post-grid' ),
6543
+ 'type' => \Elementor\Controls_Manager::SELECT,
6544
+ 'default' => 'enable',
6545
+ 'options' => [
6546
+ 'enable' => __( 'Enable', 'the-post-grid' ),
6547
+ 'disable' => __( 'Disable', 'the-post-grid' ),
6548
+ ],
6549
+ 'prefix_class' => 'tpg-el-box-border-',
6550
+ 'condition' => [
6551
+ $prefix . '_layout!' => [
6552
+ 'slider-layout11',
6553
+ 'slider-layout12',
6554
+ 'slider-layout13',
6555
+ ],
6556
+ ],
6557
+ ]
6558
+ );
6559
+ }
6560
+
6561
+ if ( 'grid_hover' !== $prefix ) {
6562
+ //TODO: Start Tab
6563
+ $ref->start_controls_tabs(
6564
+ 'box_style_tabs'
6565
+ );
6566
+
6567
+ //TODO: Normal Tab
6568
+ $ref->start_controls_tab(
6569
+ 'box_style_normal_tab',
6570
+ [
6571
+ 'label' => __( 'Normal', 'the-post-grid' ),
6572
+ ]
6573
+ );
6574
+
6575
+ $ref->add_group_control(
6576
+ \Elementor\Group_Control_Background::get_type(),
6577
+ [
6578
+ 'name' => 'box_background',
6579
+ 'label' => __( 'Background', 'the-post-grid' ),
6580
+ 'fields_options' => [
6581
+ 'background' => [
6582
+ 'label' => esc_html__( 'Card Background', 'the-post-grid' ),
6583
+ ],
6584
+ ],
6585
+ 'types' => [ 'classic', 'gradient' ],
6586
+ 'selector' => 'body {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder',
6587
+ 'condition' => [
6588
+ $prefix . '_layout!' => [ 'slider-layout13' ],
6589
+ ],
6590
+ ]
6591
+ );
6592
+
6593
+ $ref->add_group_control(
6594
+ \Elementor\Group_Control_Background::get_type(),
6595
+ [
6596
+ 'name' => 'box_background2',
6597
+ 'label' => __( 'Background', 'the-post-grid' ),
6598
+ 'fields_options' => [
6599
+ 'background' => [
6600
+ 'label' => esc_html__( 'Card Background', 'the-post-grid' ),
6601
+ ],
6602
+ ],
6603
+ 'types' => [ 'classic', 'gradient' ],
6604
+ 'selector' => 'body {{WRAPPER}} .rt-tpg-container .slider-layout13 .rt-holder .post-content',
6605
+ 'condition' => [
6606
+ $prefix . '_layout' => [ 'slider-layout13' ],
6607
+ ],
6608
+ ]
6609
+ );
6610
+
6611
+ if ( in_array( $prefix, [ 'grid', 'list' ] ) ) {
6612
+ $ref->add_control(
6613
+ 'box_border',
6614
+ [
6615
+ 'label' => __( 'Border Color', 'the-post-grid' ),
6616
+ 'type' => \Elementor\Controls_Manager::COLOR,
6617
+ 'selectors' => [
6618
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder' => 'border: 1px solid {{VALUE}}',
6619
+ ],
6620
+ 'condition' => [
6621
+ 'is_box_border' => 'enable',
6622
+ $prefix . '_layout!' => [
6623
+ 'slider-layout11',
6624
+ 'slider-layout12',
6625
+ 'slider-layout13',
6626
+ ],
6627
+ ],
6628
+ ]
6629
+ );
6630
+
6631
+
6632
+ $ref->add_group_control(
6633
+ \Elementor\Group_Control_Box_Shadow::get_type(),
6634
+ [
6635
+ 'name' => 'box_box_shadow',
6636
+ 'label' => __( 'Box Shadow', 'the-post-grid' ),
6637
+ 'selector' => 'body {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder',
6638
+ 'condition' => [
6639
+ 'is_box_border' => 'enable',
6640
+ $prefix . '_layout!' => [
6641
+ 'slider-layout11',
6642
+ 'slider-layout12',
6643
+ 'slider-layout13',
6644
+ ],
6645
+ ],
6646
+ ]
6647
+ );
6648
+ }
6649
+
6650
+ $ref->add_group_control(
6651
+ \Elementor\Group_Control_Box_Shadow::get_type(),
6652
+ [
6653
+ 'name' => 'box_box_shadow2',
6654
+ 'label' => __( 'Box Shadow', 'the-post-grid' ),
6655
+ 'selector' => 'body {{WRAPPER}} .rt-tpg-container .slider-layout13 .rt-holder .post-content',
6656
+ 'condition' => [
6657
+ $prefix . '_layout' => [ 'slider-layout13' ],
6658
+ ],
6659
+ ]
6660
+ );
6661
+
6662
+
6663
+ $ref->end_controls_tab();
6664
+
6665
+
6666
+ //TODO: Hover Tab
6667
+ $ref->start_controls_tab(
6668
+ 'box_style_hover_tab',
6669
+ [
6670
+ 'label' => __( 'Hover', 'the-post-grid' ),
6671
+ ]
6672
+ );
6673
+
6674
+ $ref->add_group_control(
6675
+ \Elementor\Group_Control_Background::get_type(),
6676
+ [
6677
+ 'name' => 'box_background_hover',
6678
+ 'label' => __( 'Background - Hover', 'the-post-grid' ),
6679
+ 'fields_options' => [
6680
+ 'background' => [
6681
+ 'label' => esc_html__( 'Card Background - Hover', 'the-post-grid' ),
6682
+ ],
6683
+ ],
6684
+ 'types' => [ 'classic', 'gradient' ],
6685
+ 'selector' => 'body {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover',
6686
+ 'condition' => [
6687
+ $prefix . '_layout!' => [ 'slider-layout13' ],
6688
+ ],
6689
+ ]
6690
+ );
6691
+
6692
+ $ref->add_group_control(
6693
+ \Elementor\Group_Control_Background::get_type(),
6694
+ [
6695
+ 'name' => 'box_background_hover2',
6696
+ 'label' => __( 'Background - Hover', 'the-post-grid' ),
6697
+ 'fields_options' => [
6698
+ 'background' => [
6699
+ 'label' => esc_html__( 'Card Background - Hover', 'the-post-grid' ),
6700
+ ],
6701
+ ],
6702
+ 'types' => [ 'classic', 'gradient' ],
6703
+ 'selector' => 'body {{WRAPPER}} .rt-tpg-container .slider-layout13 .rt-holder .post-content',
6704
+ 'condition' => [
6705
+ $prefix . '_layout' => [ 'slider-layout13' ],
6706
+ ],
6707
+ ]
6708
+ );
6709
+
6710
+ if ( in_array( $prefix, [ 'grid', 'list' ] ) ) {
6711
+ $ref->add_control(
6712
+ 'box_border_hover',
6713
+ [
6714
+ 'label' => __( 'Border Color - Hover', 'the-post-grid' ),
6715
+ 'type' => \Elementor\Controls_Manager::COLOR,
6716
+ 'selectors' => [
6717
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover' => 'border: 1px solid {{VALUE}}',
6718
+ ],
6719
+ 'condition' => [
6720
+ 'is_box_border' => 'enable',
6721
+ $prefix . '_layout!' => [
6722
+ 'slider-layout11',
6723
+ 'slider-layout12',
6724
+ 'slider-layout13',
6725
+ ],
6726
+ ],
6727
+ ]
6728
+ );
6729
+
6730
+ $ref->add_group_control(
6731
+ \Elementor\Group_Control_Box_Shadow::get_type(),
6732
+ [
6733
+ 'name' => 'box_box_shadow_hover',
6734
+ 'label' => __( 'Box Shadow - Hover', 'the-post-grid' ),
6735
+ 'selector' => 'body {{WRAPPER}} .tpg-el-main-wrapper .tpg-post-holder:hover',
6736
+ 'condition' => [
6737
+ 'is_box_border' => 'enable',
6738
+ $prefix . '_layout!' => [
6739
+ 'slider-layout11',
6740
+ 'slider-layout12',
6741
+ 'slider-layout13',
6742
+ ],
6743
+ ],
6744
+ ]
6745
+ );
6746
+ }
6747
+
6748
+
6749
+ $ref->add_group_control(
6750
+ \Elementor\Group_Control_Box_Shadow::get_type(),
6751
+ [
6752
+ 'name' => 'box_box_shadow_hover2',
6753
+ 'label' => __( 'Box Shadow - Hover', 'the-post-grid' ),
6754
+ 'selector' => 'body {{WRAPPER}} .rt-tpg-container .slider-layout13 .rt-holder .post-content',
6755
+ 'condition' => [
6756
+ $prefix . '_layout' => [ 'slider-layout13' ],
6757
+ ],
6758
+ ]
6759
+ );
6760
+
6761
+
6762
+ $ref->end_controls_tab();
6763
+
6764
+ $ref->end_controls_tabs();
6765
+ //TODO: End Tab
6766
+
6767
+ }
6768
+
6769
+ $ref->end_controls_section();
6770
+ }
6771
+
6772
+
6773
+ /**
6774
+ * Slider Settings
6775
+ *
6776
+ * @param $ref
6777
+ */
6778
+
6779
+ public static function slider_settings( $ref, $layout_type = '' ) {
6780
+ $slider_condition = '';
6781
+ if ( 'single' === $layout_type ) {
6782
+ $slider_condition = [
6783
+ 'enable_related_slider!' => '',
6784
+ ];
6785
+ }
6786
+ $prefix = $ref->prefix;
6787
+ $ref->start_controls_section(
6788
+ 'slider_settings',
6789
+ [
6790
+ 'label' => esc_html__( 'Slider', 'the-post-grid' ),
6791
+ 'tab' => Controls_Manager::TAB_SETTINGS,
6792
+ 'condition' => $slider_condition,
6793
+ ]
6794
+ );
6795
+
6796
+ $ref->add_responsive_control(
6797
+ 'slider_gap',
6798
+ [
6799
+ 'label' => __( 'Slider Gap', 'the-post-grid' ),
6800
+ 'type' => Controls_Manager::SLIDER,
6801
+ 'size_units' => [ 'px' ],
6802
+ 'range' => [
6803
+ 'px' => [
6804
+ 'min' => 0,
6805
+ 'max' => 100,
6806
+ 'step' => 1,
6807
+ ],
6808
+ ],
6809
+ 'selectors' => [
6810
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .rt-slider-item' => 'padding-left: {{SIZE}}{{UNIT}};padding-right: {{SIZE}}{{UNIT}};',
6811
+ 'body {{WRAPPER}} .tpg-el-main-wrapper .rt-swiper-holder' => 'margin-left: calc(-{{SIZE}}{{UNIT}} - 5px);margin-right: -{{SIZE}}{{UNIT}};',
6812
+ '{{WRAPPER}} .rt-tpg-container .slider-column.swiper-slide .rt-slider-item' => 'padding-top: {{SIZE}}{{UNIT}}; padding-bottom: {{SIZE}}{{UNIT}};',
6813
+ ],
6814
+ 'condition' => [
6815
+ $prefix . '_layout!' => [ 'slider-layout10', 'slider-layout11', 'slider-layout12', 'slider-layout13' ],
6816
+ ],
6817
+ ]
6818
+ );
6819
+
6820
+
6821
+ $ref->add_control(
6822
+ 'arrows',
6823
+ [
6824
+ 'label' => __( 'Arrow Visibility', 'the-post-grid' ),
6825
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
6826
+ 'label_on' => __( 'Show', 'the-post-grid' ),
6827
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
6828
+ 'return_value' => 'yes',
6829
+ 'default' => 'yes',
6830
+ 'condition' => [
6831
+ $prefix . '_layout!' => [ 'slider-layout13', 'slider-layout11', 'slider-layout12' ],
6832
+ ],
6833
+ ]
6834
+ );
6835
+
6836
+
6837
+ $ref->add_control(
6838
+ 'arrow_position',
6839
+ [
6840
+ 'label' => __( 'Arrow Position', 'the-post-grid' ),
6841
+ 'type' => \Elementor\Controls_Manager::SELECT,
6842
+ 'default' => 'default',
6843
+ 'options' => [
6844
+ 'default' => __( 'Default', 'the-post-grid' ),
6845
+ 'top-right' => __( 'Top Right', 'the-post-grid' ),
6846
+ 'top-left' => __( 'Top Left', 'the-post-grid' ),
6847
+ 'show-hover' => __( 'Center (Show on hover)', 'the-post-grid' ),
6848
+ ],
6849
+ 'condition' => [
6850
+ 'arrows' => 'yes',
6851
+ $prefix . '_layout!' => [ 'slider-layout13', 'slider-layout11', 'slider-layout12' ],
6852
+ ],
6853
+ 'prefix_class' => 'slider-arrow-position-',
6854
+ ]
6855
+ );
6856
+
6857
+ $ref->add_control(
6858
+ 'dots',
6859
+ [
6860
+ 'label' => __( 'Dots Visibility', 'the-post-grid' ),
6861
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
6862
+ 'label_on' => __( 'Show', 'the-post-grid' ),
6863
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
6864
+ 'return_value' => 'yes',
6865
+ 'default' => 'yes',
6866
+ 'prefix_class' => 'slider-dot-enable-',
6867
+ 'render_type' => 'template',
6868
+ 'condition' => [
6869
+ $prefix . '_layout!' => [ 'slider-layout13', 'slider-layout11', 'slider-layout12' ],
6870
+ ],
6871
+ ]
6872
+ );
6873
+
6874
+ $ref->add_control(
6875
+ 'dots_style',
6876
+ [
6877
+ 'label' => __( 'Dots Style', 'the-post-grid' ),
6878
+ 'type' => \Elementor\Controls_Manager::SELECT,
6879
+ 'default' => 'default',
6880
+ 'options' => [
6881
+ 'default' => __( 'Default', 'the-post-grid' ),
6882
+ 'background' => __( 'With Background', 'the-post-grid' ),
6883
+ ],
6884
+ 'condition' => [
6885
+ 'dots' => 'yes',
6886
+ $prefix . '_layout!' => [ 'slider-layout13', 'slider-layout11', 'slider-layout12' ],
6887
+ ],
6888
+ 'prefix_class' => 'slider-dots-style-',
6889
+ ]
6890
+ );
6891
+
6892
+ $ref->add_control(
6893
+ 'infinite',
6894
+ [
6895
+ 'label' => __( 'Infinite', 'the-post-grid' ),
6896
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
6897
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
6898
+ 'label_off' => __( 'No', 'the-post-grid' ),
6899
+ 'return_value' => 'yes',
6900
+ 'default' => 'yes',
6901
+ ]
6902
+ );
6903
+
6904
+ $ref->add_control(
6905
+ 'autoplay',
6906
+ [
6907
+ 'label' => __( 'Autoplay', 'the-post-grid' ),
6908
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
6909
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
6910
+ 'label_off' => __( 'No', 'the-post-grid' ),
6911
+ 'return_value' => 'yes',
6912
+ 'default' => false,
6913
+ ]
6914
+ );
6915
+
6916
+ $ref->add_control(
6917
+ 'autoplaySpeed',
6918
+ [
6919
+ 'label' => __( 'Autoplay Speed', 'the-post-grid' ),
6920
+ 'type' => \Elementor\Controls_Manager::NUMBER,
6921
+ 'min' => 1000,
6922
+ 'max' => 10000,
6923
+ 'step' => 500,
6924
+ 'default' => 3000,
6925
+ 'condition' => [
6926
+ 'autoplay' => 'yes',
6927
+ ],
6928
+ ]
6929
+ );
6930
+
6931
+ $ref->add_control(
6932
+ 'stopOnHover',
6933
+ [
6934
+ 'label' => __( 'Stop On Hover', 'the-post-grid' ),
6935
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
6936
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
6937
+ 'label_off' => __( 'No', 'the-post-grid' ),
6938
+ 'return_value' => 'yes',
6939
+ 'default' => 'yes',
6940
+ ]
6941
+ );
6942
+
6943
+
6944
+ $ref->add_control(
6945
+ 'autoHeight',
6946
+ [
6947
+ 'label' => __( 'Auto Height', 'the-post-grid' ),
6948
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
6949
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
6950
+ 'label_off' => __( 'No', 'the-post-grid' ),
6951
+ 'return_value' => 'yes',
6952
+ 'default' => false,
6953
+ 'condition' => [
6954
+ 'enable_2_rows!' => 'yes',
6955
+ ],
6956
+ ]
6957
+ );
6958
+
6959
+ $ref->add_control(
6960
+ 'lazyLoad',
6961
+ [
6962
+ 'label' => __( 'lazy Load', 'the-post-grid' ),
6963
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
6964
+ 'label_on' => __( 'Yes', 'the-post-grid' ),
6965
+ 'label_off' => __( 'No', 'the-post-grid' ),
6966
+ 'return_value' => 'yes',
6967
+ 'default' => false,
6968
+ 'prefix_class' => 'is-lazy-load-',
6969
+ ]
6970
+ );
6971
+
6972
+ $ref->add_control(
6973
+ 'speed',
6974
+ [
6975
+ 'label' => __( 'Speed', 'the-post-grid' ),
6976
+ 'type' => \Elementor\Controls_Manager::NUMBER,
6977
+ 'min' => 100,
6978
+ 'max' => 3000,
6979
+ 'step' => 100,
6980
+ 'default' => 500,
6981
+ ]
6982
+ );
6983
+
6984
+ $ref->add_control(
6985
+ 'enable_2_rows',
6986
+ [
6987
+ 'label' => __( 'Enable 2 Rows', 'the-post-grid' ),
6988
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
6989
+ 'label_on' => __( 'Show', 'the-post-grid' ),
6990
+ 'label_off' => __( 'Hide', 'the-post-grid' ),
6991
+ 'return_value' => 'yes',
6992
+ 'default' => false,
6993
+ 'prefix_class' => 'enable-two-rows-',
6994
+ 'render_type' => 'template',
6995
+ 'description' => __( 'If you use 2 rows then you have to put an even number for post limit', 'the-post-grid' ),
6996
+ 'condition' => [
6997
+ $prefix . '_layout!' => [ 'slider-layout13', 'slider-layout11', 'slider-layout12', 'slider-layout10' ],
6998
+ ],
6999
+ ]
7000
+ );
7001
+
7002
+ $ref->add_control(
7003
+ 'carousel_overflow',
7004
+ [
7005
+ 'label' => __( 'Slider Overflow', 'the-post-grid' ),
7006
+ 'type' => \Elementor\Controls_Manager::SELECT,
7007
+ 'default' => 'hidden',
7008
+ 'options' => [
7009
+ 'hidden' => __( 'Hidden', 'the-post-grid' ),
7010
+ 'none' => __( 'None', 'the-post-grid' ),
7011
+ ],
7012
+ 'render_type' => 'template',
7013
+ 'prefix_class' => 'is-carousel-overflow-',
7014
+ 'condition' => [
7015
+ 'lazyLoad!' => 'yes',
7016
+ ],
7017
+ ]
7018
+ );
7019
+
7020
+ $ref->add_control(
7021
+ 'slider_direction',
7022
+ [
7023
+ 'label' => __( 'Direction', 'the-post-grid' ),
7024
+ 'type' => \Elementor\Controls_Manager::SELECT,
7025
+ 'default' => 'ltr',
7026
+ 'options' => [
7027
+ 'ltr' => __( 'LTR', 'the-post-grid' ),
7028
+ 'rtl' => __( 'RTL', 'the-post-grid' ),
7029
+ ],
7030
+ 'prefix_class' => 'slider-direction-',
7031
+ 'render_type' => 'template',
7032
+ ]
7033
+ );
7034
+
7035
+ $ref->end_controls_section();
7036
+ }
7037
+
7038
+ /**
7039
+ * Slider Style
7040
+ *
7041
+ * @param $ref
7042
+ */
7043
+
7044
+ public static function slider_style( $ref, $layout_type = '' ) {
7045
+ $prefix = $ref->prefix;
7046
+ if ( 'single' === $layout_type ) {
7047
+ $slider_condition = [
7048
+ 'enable_related_slider!' => '',
7049
+ $prefix . '_layout!' => [ 'slider-layout11', 'slider-layout12' ],
7050
+ ];
7051
+ } else {
7052
+ $slider_condition = [
7053
+ $prefix . '_layout!' => [ 'slider-layout11', 'slider-layout12' ],
7054
+ ];
7055
+ }
7056
+
7057
+ $ref->start_controls_section(
7058
+ 'slider_style',
7059
+ [
7060
+ 'label' => esc_html__( 'Slider', 'the-post-grid' ),
7061
+ 'tab' => Controls_Manager::TAB_STYLE,
7062
+ 'condition' => $slider_condition,
7063
+ ]
7064
+ );
7065
+
7066
+ $ref->add_control(
7067
+ 'arrow_style_heading',
7068
+ [
7069
+ 'label' => __( 'Arrow Style', 'the-post-grid' ),
7070
+ 'type' => \Elementor\Controls_Manager::HEADING,
7071
+ 'separator' => 'before',
7072
+ 'classes' => 'tpg-control-type-heading',
7073
+ 'condition' => [
7074
+ 'arrows' => 'yes',
7075
+ ],
7076
+ ]
7077
+ );
7078
+
7079
+ $ref->add_responsive_control(
7080
+ 'arrow_font_size',
7081
+ [
7082
+ 'label' => __( 'Arrow Font Size', 'the-post-grid' ),
7083
+ 'type' => Controls_Manager::SLIDER,
7084
+ 'size_units' => [ 'px' ],
7085
+ 'range' => [
7086
+ 'px' => [
7087
+ 'min' => 0,
7088
+ 'max' => 100,
7089
+ 'step' => 1,
7090
+ ],
7091
+ ],
7092
+ 'selectors' => [
7093
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'font-size: {{SIZE}}{{UNIT}};',
7094
+ ],
7095
+ 'condition' => [
7096
+ 'arrows' => 'yes',
7097
+ ],
7098
+ ]
7099
+ );
7100
+
7101
+ $ref->add_responsive_control(
7102
+ 'arrow_border_radius',
7103
+ [
7104
+ 'label' => __( 'Arrow Radius', 'the-post-grid' ),
7105
+ 'type' => Controls_Manager::SLIDER,
7106
+ 'size_units' => [ 'px', '%' ],
7107
+ 'range' => [
7108
+ 'px' => [
7109
+ 'min' => 0,
7110
+ 'max' => 100,
7111
+ 'step' => 1,
7112
+ ],
7113
+ '%' => [
7114
+ 'min' => 0,
7115
+ 'max' => 100,
7116
+ 'step' => 1,
7117
+ ],
7118
+ ],
7119
+ 'selectors' => [
7120
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'border-radius: {{SIZE}}{{UNIT}};',
7121
+ ],
7122
+ 'condition' => [
7123
+ 'arrows' => 'yes',
7124
+ ],
7125
+ ]
7126
+ );
7127
+
7128
+ $ref->add_responsive_control(
7129
+ 'arrow_width',
7130
+ [
7131
+ 'label' => __( 'Arrow Width', 'the-post-grid' ),
7132
+ 'type' => Controls_Manager::SLIDER,
7133
+ 'size_units' => [ 'px' ],
7134
+ 'range' => [
7135
+ 'px' => [
7136
+ 'min' => 0,
7137
+ 'max' => 200,
7138
+ 'step' => 1,
7139
+ ],
7140
+ ],
7141
+ 'selectors' => [
7142
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'width: {{SIZE}}{{UNIT}};',
7143
+ ],
7144
+ 'condition' => [
7145
+ 'arrows' => 'yes',
7146
+ ],
7147
+ ]
7148
+ );
7149
+
7150
+ $ref->add_responsive_control(
7151
+ 'arrow_height',
7152
+ [
7153
+ 'label' => __( 'Arrow Height', 'the-post-grid' ),
7154
+ 'type' => Controls_Manager::SLIDER,
7155
+ 'size_units' => [ 'px' ],
7156
+ 'range' => [
7157
+ 'px' => [
7158
+ 'min' => 0,
7159
+ 'max' => 200,
7160
+ 'step' => 1,
7161
+ ],
7162
+ ],
7163
+ 'selectors' => [
7164
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'height: {{SIZE}}{{UNIT}}; line-height:{{SIZE}}{{UNIT}};',
7165
+ ],
7166
+ 'condition' => [
7167
+ 'arrows' => 'yes',
7168
+ ],
7169
+ ]
7170
+ );
7171
+
7172
+ $ref->add_responsive_control(
7173
+ 'arrow_x_position',
7174
+ [
7175
+ 'label' => __( 'Arrow X Position', 'the-post-grid' ),
7176
+ 'type' => Controls_Manager::SLIDER,
7177
+ 'size_units' => [ 'px' ],
7178
+ 'range' => [
7179
+ 'px' => [
7180
+ 'min' => - 300,
7181
+ 'max' => 300,
7182
+ 'step' => 1,
7183
+ ],
7184
+ ],
7185
+ 'selectors' => [
7186
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn.swiper-button-prev' => 'left: {{SIZE}}{{UNIT}};',
7187
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn.swiper-button-next' => 'right: {{SIZE}}{{UNIT}};',
7188
+ '{{WRAPPER}}.slider-arrow-position-top-right .swiper-navigation' => 'right: {{SIZE}}{{UNIT}};',
7189
+ '{{WRAPPER}}.slider-arrow-position-top-left .swiper-navigation' => 'left: {{SIZE}}{{UNIT}};',
7190
+ ],
7191
+ 'condition' => [
7192
+ 'arrows' => 'yes',
7193
+ ],
7194
+ ]
7195
+ );
7196
+
7197
+ $ref->add_responsive_control(
7198
+ 'arrow_y_position',
7199
+ [
7200
+ 'label' => __( 'Arrow Y Position', 'the-post-grid' ),
7201
+ 'type' => Controls_Manager::SLIDER,
7202
+ 'size_units' => [ 'px', '%' ],
7203
+ 'range' => [
7204
+ 'px' => [
7205
+ 'min' => - 150,
7206
+ 'max' => 500,
7207
+ 'step' => 1,
7208
+ ],
7209
+ ],
7210
+ 'selectors' => [
7211
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'top: {{SIZE}}{{UNIT}};',
7212
+ '{{WRAPPER}}.slider-arrow-position-top-right .swiper-navigation, {{WRAPPER}}.slider-arrow-position-top-left .swiper-navigation' => 'top: {{SIZE}}{{UNIT}};',
7213
+ ],
7214
+ 'condition' => [
7215
+ 'arrows' => 'yes',
7216
+ ],
7217
+ ]
7218
+ );
7219
+
7220
+ //TODO: Arrow Tabs Start
7221
+ $ref->start_controls_tabs(
7222
+ 'arrow_style_tabs',
7223
+ [
7224
+ 'condition' => [
7225
+ 'arrows' => 'yes',
7226
+ ],
7227
+ ]
7228
+ );
7229
+
7230
+ $ref->start_controls_tab(
7231
+ 'arrow_style_normal_tab',
7232
+ [
7233
+ 'label' => __( 'Normal', 'the-post-grid' ),
7234
+ ]
7235
+ );
7236
+
7237
+ $ref->add_control(
7238
+ 'arrow_color',
7239
+ [
7240
+ 'type' => Controls_Manager::COLOR,
7241
+ 'label' => esc_html__( 'Arrow Icon Color', 'the-post-grid' ),
7242
+ 'selectors' => [
7243
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'color: {{VALUE}}',
7244
+ ],
7245
+ ]
7246
+ );
7247
+
7248
+ $ref->add_control(
7249
+ 'arrow_arrow_bg_color',
7250
+ [
7251
+ 'type' => Controls_Manager::COLOR,
7252
+ 'label' => esc_html__( 'Arrow Background', 'the-post-grid' ),
7253
+ 'selectors' => [
7254
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn' => 'background-color: {{VALUE}}',
7255
+ ],
7256
+ ]
7257
+ );
7258
+
7259
+ $ref->add_group_control(
7260
+ \Elementor\Group_Control_Box_Shadow::get_type(),
7261
+ [
7262
+ 'name' => 'arrow_box_shadow',
7263
+ 'label' => __( 'Box Shadow', 'the-post-grid' ),
7264
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn',
7265
+ ]
7266
+ );
7267
+
7268
+ $ref->add_group_control(
7269
+ \Elementor\Group_Control_Border::get_type(),
7270
+ [
7271
+ 'name' => 'border',
7272
+ 'label' => esc_html__( 'Border', 'the-post-grid' ),
7273
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn',
7274
+ ]
7275
+ );
7276
+
7277
+ $ref->end_controls_tab();
7278
+
7279
+ $ref->start_controls_tab(
7280
+ 'arrow_style_hover_tab',
7281
+ [
7282
+ 'label' => __( 'Hover', 'the-post-grid' ),
7283
+ ]
7284
+ );
7285
+
7286
+ $ref->add_control(
7287
+ 'arrow_hover_color',
7288
+ [
7289
+ 'type' => Controls_Manager::COLOR,
7290
+ 'label' => esc_html__( 'Arrow Icon Color - Hover', 'the-post-grid' ),
7291
+ 'selectors' => [
7292
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn:hover' => 'color: {{VALUE}}',
7293
+ ],
7294
+ ]
7295
+ );
7296
+
7297
+ $ref->add_control(
7298
+ 'arrow_bg_hover_color',
7299
+ [
7300
+ 'type' => Controls_Manager::COLOR,
7301
+ 'label' => esc_html__( 'Arrow Background - Hover', 'the-post-grid' ),
7302
+ 'selectors' => [
7303
+ '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn:hover' => 'background-color: {{VALUE}}',
7304
+ ],
7305
+ ]
7306
+ );
7307
+
7308
+ $ref->add_group_control(
7309
+ \Elementor\Group_Control_Box_Shadow::get_type(),
7310
+ [
7311
+ 'name' => 'arrow_box_shadow_hover',
7312
+ 'label' => __( 'Box Shadow - Hover', 'the-post-grid' ),
7313
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn:hover',
7314
+ ]
7315
+ );
7316
+
7317
+ $ref->add_group_control(
7318
+ \Elementor\Group_Control_Border::get_type(),
7319
+ [
7320
+ 'name' => 'border_hover',
7321
+ 'label' => esc_html__( 'Border - Hover', 'the-post-grid' ),
7322
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .swiper-navigation .slider-btn:hover',
7323
+ ]
7324
+ );
7325
+
7326
+ $ref->end_controls_tab();
7327
+
7328
+ $ref->end_controls_tabs();
7329
+ //TODO: Arrow Tabs End
7330
+
7331
+
7332
+ //TODO: Dots style Start
7333
+
7334
+ $ref->add_control(
7335
+ 'dot_style_heading',
7336
+ [
7337
+ 'label' => __( 'Dots Style', 'the-post-grid' ),
7338
+ 'type' => \Elementor\Controls_Manager::HEADING,
7339
+ 'separator' => 'before',
7340
+ 'classes' => 'tpg-control-type-heading',
7341
+ 'condition' => [
7342
+ 'dots' => 'yes',
7343
+ ],
7344
+ ]
7345
+ );
7346
+
7347
+ $ref->add_control(
7348
+ 'dots_text_align',
7349
+ [
7350
+ 'label' => __( 'Dots Alignment', 'the-post-grid' ),
7351
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
7352
+ 'options' => [
7353
+ 'left' => [
7354
+ 'title' => __( 'Left', 'the-post-grid' ),
7355
+ 'icon' => 'eicon-text-align-left',
7356
+ ],
7357
+ 'center' => [
7358
+ 'title' => __( 'Center', 'the-post-grid' ),
7359
+ 'icon' => 'eicon-text-align-center',
7360
+ ],
7361
+ 'right' => [
7362
+ 'title' => __( 'Right', 'the-post-grid' ),
7363
+ 'icon' => 'eicon-text-align-right',
7364
+ ],
7365
+ ],
7366
+ 'toggle' => true,
7367
+ 'condition' => [
7368
+ 'dots' => 'yes',
7369
+ ],
7370
+ 'prefix_class' => 'slider-dots-align-',
7371
+ ]
7372
+ );
7373
+
7374
+
7375
+ $ref->add_responsive_control(
7376
+ 'dot_wrapper_radius',
7377
+ [
7378
+ 'label' => __( 'Dots Wrapper Radius', 'the-post-grid' ),
7379
+ 'type' => Controls_Manager::SLIDER,
7380
+ 'size_units' => [ 'px', '%' ],
7381
+ 'range' => [
7382
+ 'px' => [
7383
+ 'min' => 0,
7384
+ 'max' => 1000,
7385
+ 'step' => 5,
7386
+ ],
7387
+ ],
7388
+ 'selectors' => [
7389
+ '{{WRAPPER}}.slider-dots-style-background .tpg-el-main-wrapper .swiper-pagination' => 'border-radius: {{SIZE}}{{UNIT}};',
7390
+ ],
7391
+ 'condition' => [
7392
+ 'dots_style' => 'background',
7393
+ 'dots' => 'yes',
7394
+ ],
7395
+ ]
7396
+ );
7397
+
7398
+ $ref->add_responsive_control(
7399
+ 'dots_border_radius',
7400
+ [
7401
+ 'label' => __( 'Dots Radius', 'the-post-grid' ),
7402
+ 'type' => Controls_Manager::SLIDER,
7403
+ 'size_units' => [ 'px', '%' ],
7404
+ 'range' => [
7405
+ 'px' => [
7406
+ 'min' => 0,
7407
+ 'max' => 100,
7408
+ 'step' => 1,
7409
+ ],
7410
+ '%' => [
7411
+ 'min' => 0,
7412
+ 'max' => 100,
7413
+ 'step' => 1,
7414
+ ],
7415
+ ],
7416
+ 'selectors' => [
7417
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination .swiper-pagination-bullet' => 'border-radius: {{SIZE}}{{UNIT}};',
7418
+ ],
7419
+ 'condition' => [
7420
+ 'dots' => 'yes',
7421
+ ],
7422
+ ]
7423
+ );
7424
+
7425
+ $ref->add_responsive_control(
7426
+ 'dots_width',
7427
+ [
7428
+ 'label' => __( 'Dots Width', 'the-post-grid' ),
7429
+ 'type' => Controls_Manager::SLIDER,
7430
+ 'size_units' => [ 'px' ],
7431
+ 'range' => [
7432
+ 'px' => [
7433
+ 'min' => 0,
7434
+ 'max' => 200,
7435
+ 'step' => 1,
7436
+ ],
7437
+ ],
7438
+ 'selectors' => [
7439
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};',
7440
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active' => 'width: calc({{SIZE}}{{UNIT}} + 15px);',
7441
+ ],
7442
+ 'condition' => [
7443
+ 'dots' => 'yes',
7444
+ ],
7445
+ ]
7446
+ );
7447
+
7448
+ $ref->add_responsive_control(
7449
+ 'dots_height',
7450
+ [
7451
+ 'label' => __( 'Dots Height', 'the-post-grid' ),
7452
+ 'type' => Controls_Manager::SLIDER,
7453
+ 'size_units' => [ 'px' ],
7454
+ 'range' => [
7455
+ 'px' => [
7456
+ 'min' => 0,
7457
+ 'max' => 200,
7458
+ 'step' => 1,
7459
+ ],
7460
+ ],
7461
+ 'selectors' => [
7462
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}}',
7463
+ ],
7464
+ 'condition' => [
7465
+ 'dots' => 'yes',
7466
+ ],
7467
+ ]
7468
+ );
7469
+
7470
+
7471
+ $ref->add_responsive_control(
7472
+ 'dots_margin',
7473
+ [
7474
+ 'label' => __( 'Dots Margin', 'the-post-grid' ),
7475
+ 'type' => Controls_Manager::SLIDER,
7476
+ 'size_units' => [ 'px' ],
7477
+ 'range' => [
7478
+ 'px' => [
7479
+ 'min' => 0,
7480
+ 'max' => 50,
7481
+ 'step' => 1,
7482
+ ],
7483
+ ],
7484
+ 'selectors' => [
7485
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination .swiper-pagination-bullet' => 'margin-left: {{SIZE}}{{UNIT}}; margin-right: {{SIZE}}{{UNIT}}',
7486
+ ],
7487
+ 'condition' => [
7488
+ 'dots' => 'yes',
7489
+ ],
7490
+ ]
7491
+ );
7492
+
7493
+ $ref->add_responsive_control(
7494
+ 'dots_position',
7495
+ [
7496
+ 'label' => __( 'Dots Y Position', 'the-post-grid' ),
7497
+ 'type' => Controls_Manager::SLIDER,
7498
+ 'size_units' => [ 'px' ],
7499
+ 'range' => [
7500
+ 'px' => [
7501
+ 'min' => - 150,
7502
+ 'max' => 150,
7503
+ 'step' => 1,
7504
+ ],
7505
+ ],
7506
+ 'selectors' => [
7507
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination' => 'bottom: {{SIZE}}{{UNIT}} !important ;',
7508
+ ],
7509
+ 'condition' => [
7510
+ 'dots' => 'yes',
7511
+ ],
7512
+ ]
7513
+ );
7514
+
7515
+
7516
+ //TODO: Dots Tab Start
7517
+ $ref->start_controls_tabs(
7518
+ 'dots_style_tabs',
7519
+ [
7520
+ 'condition' => [
7521
+ 'dots' => 'yes',
7522
+ ],
7523
+ ]
7524
+ );
7525
+
7526
+ $ref->start_controls_tab(
7527
+ 'dots_style_normal_tab',
7528
+ [
7529
+ 'label' => __( 'Normal', 'the-post-grid' ),
7530
+ ]
7531
+ );
7532
+
7533
+ $ref->add_control(
7534
+ 'dots_color',
7535
+ [
7536
+ 'type' => Controls_Manager::COLOR,
7537
+ 'label' => esc_html__( 'Dots Color', 'the-post-grid' ),
7538
+ 'selectors' => [
7539
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination .swiper-pagination-bullet' => 'background-color: {{VALUE}}',
7540
+ ],
7541
+ 'condition' => [
7542
+ 'dots' => 'yes',
7543
+ ],
7544
+ ]
7545
+ );
7546
+
7547
+ $ref->add_control(
7548
+ 'dots_border_color',
7549
+ [
7550
+ 'type' => Controls_Manager::COLOR,
7551
+ 'label' => esc_html__( 'Active Dots Color', 'the-post-grid' ),
7552
+ 'selectors' => [
7553
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active' => 'background-color: {{VALUE}}',
7554
+ ],
7555
+ 'condition' => [
7556
+ 'dots' => 'yes',
7557
+ ],
7558
+ ]
7559
+ );
7560
+
7561
+ $ref->add_control(
7562
+ 'dots_wrap_bg',
7563
+ [
7564
+ 'type' => Controls_Manager::COLOR,
7565
+ 'label' => esc_html__( 'Dots Wrapper Background', 'the-post-grid' ),
7566
+ 'selectors' => [
7567
+ '{{WRAPPER}}.slider-dots-style-background .tpg-el-main-wrapper .swiper-pagination' => 'background-color: {{VALUE}}',
7568
+ ],
7569
+ 'condition' => [
7570
+ 'dots' => 'yes',
7571
+ 'dots_style' => 'background',
7572
+ ],
7573
+ ]
7574
+ );
7575
+
7576
+
7577
+ $ref->end_controls_tab();
7578
+
7579
+ $ref->start_controls_tab(
7580
+ 'dots_style_hover_tab',
7581
+ [
7582
+ 'label' => __( 'Hover', 'the-post-grid' ),
7583
+ ]
7584
+ );
7585
+
7586
+ $ref->add_control(
7587
+ 'dots_color_hover',
7588
+ [
7589
+ 'type' => Controls_Manager::COLOR,
7590
+ 'label' => esc_html__( 'Dots Color - Hover', 'the-post-grid' ),
7591
+ 'selectors' => [
7592
+ '{{WRAPPER}} .rt-tpg-container .swiper-pagination .swiper-pagination-bullet:hover' => 'background-color: {{VALUE}}',
7593
+ ],
7594
+ 'condition' => [
7595
+ 'dots' => 'yes',
7596
+ ],
7597
+ ]
7598
+ );
7599
+
7600
+ $ref->end_controls_tab();
7601
+
7602
+ $ref->end_controls_tabs();
7603
+
7604
+ $ref->end_controls_section();
7605
+ }
7606
+
7607
+
7608
+ /**
7609
+ * Link Style
7610
+ *
7611
+ * @param $ref
7612
+ */
7613
+
7614
+ public static function linkStyle( $ref ) {
7615
+ $ref->start_controls_section(
7616
+ 'linkStyle',
7617
+ [
7618
+ 'label' => esc_html__( 'Popup Style', 'the-post-grid' ),
7619
+ 'tab' => Controls_Manager::TAB_STYLE,
7620
+ 'condition' => [
7621
+ 'post_link_type' => [ 'popup', 'multi_popup' ],
7622
+ ],
7623
+ ]
7624
+ );
7625
+
7626
+ $ref->add_control(
7627
+ 'popup_head_bg',
7628
+ [
7629
+ 'label' => __( 'Header Background', 'the-post-grid' ),
7630
+ 'type' => \Elementor\Controls_Manager::COLOR,
7631
+ 'selectors' => [
7632
+ 'body .rt-popup-wrap .rt-popup-navigation-wrap' => 'background-color: {{VALUE}}',
7633
+ ],
7634
+ ]
7635
+ );
7636
+
7637
+ $ref->add_control(
7638
+ 'popup_head_txt_color',
7639
+ [
7640
+ 'label' => __( 'Header Text Color', 'the-post-grid' ),
7641
+ 'type' => \Elementor\Controls_Manager::COLOR,
7642
+ 'selectors' => [
7643
+ 'body #rt-popup-wrap .rt-popup-singlePage-counter' => 'color: {{VALUE}}',
7644
+ ],
7645
+ ]
7646
+ );
7647
+
7648
+ $ref->add_control(
7649
+ 'popup_title_color',
7650
+ [
7651
+ 'label' => __( 'Popup Title Color', 'the-post-grid' ),
7652
+ 'type' => \Elementor\Controls_Manager::COLOR,
7653
+ 'selectors' => [
7654
+ 'body .md-content .rt-md-content-holder > .md-header .entry-title' => 'color: {{VALUE}}',
7655
+ 'body .rt-popup-content .rt-tpg-container h1.entry-title' => 'color: {{VALUE}}',
7656
+ ],
7657
+
7658
+ ]
7659
+ );
7660
+
7661
+
7662
+ $ref->add_control(
7663
+ 'popup_meta_color',
7664
+ [
7665
+ 'label' => __( 'Popup Meta Color', 'the-post-grid' ),
7666
+ 'type' => \Elementor\Controls_Manager::COLOR,
7667
+ 'selectors' => [
7668
+ 'body .md-content .rt-md-content-holder > .md-header .post-meta-user *' => 'color: {{VALUE}}',
7669
+ 'body .rt-popup-content .rt-tpg-container .post-meta-user *' => 'color: {{VALUE}}',
7670
+ ],
7671
+
7672
+ ]
7673
+ );
7674
+
7675
+ $ref->add_control(
7676
+ 'popup_content_color',
7677
+ [
7678
+ 'label' => __( 'Popup Content Color', 'the-post-grid' ),
7679
+ 'type' => \Elementor\Controls_Manager::COLOR,
7680
+ 'selectors' => [
7681
+ 'body .md-content .rt-md-content *' => 'color: {{VALUE}}',
7682
+ 'body .rt-popup-content .rt-tpg-container .tpg-content *' => 'color: {{VALUE}}',
7683
+ ],
7684
+
7685
+ ]
7686
+ );
7687
+
7688
+ $ref->add_control(
7689
+ 'popup_bg',
7690
+ [
7691
+ 'label' => __( 'Popup Background', 'the-post-grid' ),
7692
+ 'type' => \Elementor\Controls_Manager::COLOR,
7693
+ 'selectors' => [
7694
+ 'body .md-content, body #rt-popup-wrap .rt-popup-content' => 'background-color: {{VALUE}}',
7695
+ ],
7696
+
7697
+ ]
7698
+ );
7699
+
7700
+
7701
+ $ref->end_controls_section();
7702
+ }
7703
+
7704
+
7705
+ /**
7706
+ * Slider thumb Settings for layout- 11, 12
7707
+ *
7708
+ * @param $ref
7709
+ */
7710
+
7711
+ public static function slider_thumb_style( $ref ) {
7712
+ $ref->start_controls_section(
7713
+ 'slider_thumb_style',
7714
+ [
7715
+ 'label' => esc_html__( 'Slider', 'the-post-grid' ),
7716
+ 'tab' => Controls_Manager::TAB_STYLE,
7717
+ 'condition' => [
7718
+ 'slider_layout' => [ 'slider-layout11', 'slider-layout12' ],
7719
+ ],
7720
+ ]
7721
+ );
7722
+
7723
+ //TODO: Crative slider style:
7724
+ $ref->add_control(
7725
+ 'scroll_bar_color',
7726
+ [
7727
+ 'type' => Controls_Manager::COLOR,
7728
+ 'label' => esc_html__( 'Scroll Foreground Color', 'the-post-grid' ),
7729
+ 'selectors' => [
7730
+ '{{WRAPPER}} .tpg-el-main-wrapper .swiper-thumb-pagination .swiper-pagination-progressbar-fill' => 'background-color: {{VALUE}}',
7731
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout12 .slider-thumb-main-wrapper .swiper-thumb-wrapper .post-thumbnail-wrap .p-thumbnail::before' => 'background-color: {{VALUE}}',
7732
+ ],
7733
+ ]
7734
+ );
7735
+
7736
+
7737
+ $ref->add_control(
7738
+ 'scroll_bar_bg_color',
7739
+ [
7740
+ 'type' => Controls_Manager::COLOR,
7741
+ 'label' => esc_html__( 'Scroll Background Color', 'the-post-grid' ),
7742
+ 'selectors' => [
7743
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-thumb-main-wrapper .swiper-pagination-progressbar' => 'background-color: {{VALUE}}',
7744
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout12 .slider-thumb-main-wrapper .swiper-thumb-wrapper::before' => 'background-color: {{VALUE}};opacity:1;',
7745
+ ],
7746
+ ]
7747
+ );
7748
+
7749
+ $ref->add_control(
7750
+ 'thumb_font_color',
7751
+ [
7752
+ 'type' => Controls_Manager::COLOR,
7753
+ 'label' => esc_html__( 'Thumb Font Color', 'the-post-grid' ),
7754
+ 'selectors' => [
7755
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout11 .swiper-thumb-wrapper .swiper-wrapper .p-content *' => 'color: {{VALUE}}',
7756
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout12 .swiper-thumb-wrapper .swiper-wrapper .p-content *' => 'color: {{VALUE}}',
7757
+ ],
7758
+ ]
7759
+ );
7760
+
7761
+ $ref->add_control(
7762
+ 'slider_thumb_bg',
7763
+ [
7764
+ 'type' => Controls_Manager::COLOR,
7765
+ 'label' => esc_html__( 'Thumb Background', 'the-post-grid' ),
7766
+ 'selectors' => [
7767
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout11 .swiper-thumb-wrapper .swiper-wrapper .p-thumbnail img' => 'background-color: {{VALUE}}',
7768
+ ],
7769
+ 'condition' => [
7770
+ 'slider_layout' => [ 'slider-layout11' ],
7771
+ ],
7772
+ ]
7773
+ );
7774
+ $ref->add_control(
7775
+ 'slider_thumb_bg_active',
7776
+ [
7777
+ 'type' => Controls_Manager::COLOR,
7778
+ 'label' => esc_html__( 'Thumb Active/Hover Background', 'the-post-grid' ),
7779
+ 'selectors' => [
7780
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout11 .swiper-thumb-wrapper .swiper-wrapper .swiper-slide:hover .p-thumbnail img' => 'background-color: {{VALUE}}',
7781
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout11 .swiper-thumb-wrapper .swiper-wrapper .swiper-slide-thumb-active .p-thumbnail img' => 'background-color: {{VALUE}}',
7782
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout11 .swiper-thumb-wrapper .swiper-wrapper .post-thumbnail-wrap::before' => 'background-color: {{VALUE}}',
7783
+ '{{WRAPPER}} .tpg-el-main-wrapper .slider-layout12 .slider-thumb-main-wrapper .swiper-thumb-wrapper .post-thumbnail-wrap .p-thumbnail' => 'background-color: {{VALUE}}',
7784
+ ],
7785
+ ]
7786
+ );
7787
+
7788
+ $ref->add_group_control(
7789
+ \Elementor\Group_Control_Background::get_type(),
7790
+ [
7791
+ 'name' => 'thumb_wrapper_bg',
7792
+ 'label' => __( 'Thumb Wrapper Background', 'the-post-grid' ),
7793
+ 'fields_options' => [
7794
+ 'background' => [
7795
+ 'label' => esc_html__( 'Thumb Wrapper Background', 'the-post-grid' ),
7796
+ ],
7797
+ ],
7798
+ 'types' => [ 'classic', 'gradient' ],
7799
+ 'selector' => '{{WRAPPER}} .tpg-el-main-wrapper .slider-thumb-main-wrapper, {{WRAPPER}} .tpg-el-main-wrapper .slider-layout12 .slider-thumb-main-wrapper',
7800
+ 'exclude' => [ 'image' ],
7801
+ ]
7802
+ );
7803
+
7804
+ $ref->end_controls_section();
7805
+ }
7806
+
7807
+
7808
+ /**
7809
+ * Advanced Custom Field ACF Style
7810
+ *
7811
+ * @param $ref
7812
+ */
7813
+
7814
+ public static function tpg_acf_style( $ref ) {
7815
+ $cf = Fns::is_acf();
7816
+ if ( ! $cf || ! rtTPG()->hasPro() ) {
7817
+ return;
7818
+ }
7819
+
7820
+ $prefix = $ref->prefix;
7821
+ $ref->start_controls_section(
7822
+ 'tgp_acf_style',
7823
+ [
7824
+ 'label' => esc_html__( 'Advanced Custom Field', 'the-post-grid' ),
7825
+ 'tab' => Controls_Manager::TAB_STYLE,
7826
+ 'condition' => [
7827
+ 'show_acf' => 'show',
7828
+ $prefix . '_layout!' => [ 'grid-layout7' ],
7829
+ ],
7830
+ ]
7831
+ );
7832
+
7833
+ self::get_tpg_acf_style( $ref );
7834
+
7835
+ $ref->end_controls_section();
7836
+ }
7837
+
7838
+ public static function get_tpg_acf_style( $ref, $hover_control = true ) {
7839
+ $ref->add_group_control(
7840
+ \Elementor\Group_Control_Typography::get_type(),
7841
+ [
7842
+ 'name' => 'acf_group_title_typography',
7843
+ 'label' => __( 'Group Title Typography', 'the-post-grid' ),
7844
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .tpg-cf-group-title',
7845
+ ]
7846
+ );
7847
+
7848
+ $ref->add_group_control(
7849
+ \Elementor\Group_Control_Typography::get_type(),
7850
+ [
7851
+ 'name' => 'acf_typography',
7852
+ 'label' => __( 'ACF Fields Typography', 'the-post-grid' ),
7853
+ 'selector' => '{{WRAPPER}} .rt-tpg-container .tpg-cf-fields',
7854
+ ]
7855
+ );
7856
+
7857
+ $ref->add_control(
7858
+ 'acf_label_style',
7859
+ [
7860
+ 'label' => __( 'Label Style', 'the-post-grid' ),
7861
+ 'type' => \Elementor\Controls_Manager::SELECT,
7862
+ 'default' => 'inline',
7863
+ 'options' => [
7864
+ 'default' => __( 'Default', 'the-post-grid' ),
7865
+ 'inline' => __( 'Inline', 'the-post-grid' ),
7866
+ 'block' => __( 'Block', 'the-post-grid' ),
7867
+ ],
7868
+ 'condition' => [
7869
+ 'cf_show_only_value' => 'yes',
7870
+ ],
7871
+ 'render_type' => 'template',
7872
+ 'prefix_class' => 'act-label-style-',
7873
+ ]
7874
+ );
7875
+
7876
+ $ref->add_responsive_control(
7877
+ 'acf_label_width',
7878
+ [
7879
+ 'label' => __( 'Label Min Width', 'the-post-grid' ),
7880
+ 'type' => Controls_Manager::SLIDER,
7881
+ 'size_units' => [ 'px' ],
7882
+ 'range' => [
7883
+ 'px' => [
7884
+ 'min' => 0,
7885
+ 'max' => 1000,
7886
+ 'step' => 5,
7887
+ ],
7888
+ ],
7889
+ 'condition' => [
7890
+ 'acf_label_style' => 'default',
7891
+ ],
7892
+ 'selectors' => [
7893
+ '{{WRAPPER}} .tgp-cf-field-label' => 'min-width: {{SIZE}}{{UNIT}};',
7894
+ ],
7895
+ ]
7896
+ );
7897
+
7898
+ $ref->add_control(
7899
+ 'acf_alignment',
7900
+ [
7901
+ 'label' => esc_html__( 'Text Align', 'the-post-grid' ),
7902
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
7903
+ 'options' => [
7904
+ 'left' => [
7905
+ 'title' => esc_html__( 'Left', 'the-post-grid' ),
7906
+ 'icon' => 'eicon-text-align-left',
7907
+ ],
7908
+ 'center' => [
7909
+ 'title' => esc_html__( 'Center', 'the-post-grid' ),
7910
+ 'icon' => 'eicon-text-align-center',
7911
+ ],
7912
+ 'right' => [
7913
+ 'title' => esc_html__( 'Right', 'the-post-grid' ),
7914
+ 'icon' => 'eicon-text-align-right',
7915
+ ],
7916
+ ],
7917
+ 'prefix_class' => 'tpg-acf-align-',
7918
+ 'toggle' => true,
7919
+ 'condition' => [
7920
+ 'grid_layout!' => [ 'grid-layout7' ],
7921
+ ],
7922
+
7923
+ ]
7924
+ );
7925
+
7926
+
7927
+ if ( $hover_control ) {
7928
+ //Start Tab
7929
+ $ref->start_controls_tabs(
7930
+ 'acf_style_tabs'
7931
+ );
7932
+
7933
+ //Normal Tab
7934
+ $ref->start_controls_tab(
7935
+ 'acf_style_normal_tab',
7936
+ [
7937
+ 'label' => __( 'Normal', 'the-post-grid' ),
7938
+ ]
7939
+ );
7940
+ }
7941
+ $ref->add_control(
7942
+ 'acf_group_title_color',
7943
+ [
7944
+ 'label' => __( 'Group Title Color', 'the-post-grid' ),
7945
+ 'type' => \Elementor\Controls_Manager::COLOR,
7946
+ 'selectors' => [
7947
+ '{{WRAPPER}} .acf-custom-field-wrap .tpg-cf-group-title' => 'color: {{VALUE}}',
7948
+ ],
7949
+ 'condition' => [
7950
+ 'cf_hide_group_title' => 'yes',
7951
+ ],
7952
+ ]
7953
+ );
7954
+
7955
+ $ref->add_control(
7956
+ 'acf_label_color',
7957
+ [
7958
+ 'label' => __( 'Label Color', 'the-post-grid' ),
7959
+ 'type' => \Elementor\Controls_Manager::COLOR,
7960
+ 'selectors' => [
7961
+ '{{WRAPPER}} .acf-custom-field-wrap .tgp-cf-field-label' => 'color: {{VALUE}}',
7962
+ ],
7963
+ 'condition' => [
7964
+ 'cf_show_only_value' => 'yes',
7965
+ ],
7966
+ ]
7967
+ );
7968
+
7969
+ $ref->add_control(
7970
+ 'acf_value_color',
7971
+ [
7972
+ 'label' => __( 'Value Color', 'the-post-grid' ),
7973
+ 'type' => \Elementor\Controls_Manager::COLOR,
7974
+ 'selectors' => [
7975
+ '{{WRAPPER}} .acf-custom-field-wrap .tgp-cf-field-value' => 'color: {{VALUE}}',
7976
+ ],
7977
+ ]
7978
+ );
7979
+
7980
+ if ( $hover_control ) {
7981
+ $ref->end_controls_tab();
7982
+
7983
+
7984
+ //Hover Tab
7985
+ $ref->start_controls_tab(
7986
+ 'acf_style_hover_tab',
7987
+ [
7988
+ 'label' => __( 'Hover', 'the-post-grid' ),
7989
+ ]
7990
+ );
7991
+
7992
+ $ref->add_control(
7993
+ 'acf_group_title_color_hover',
7994
+ [
7995
+ 'label' => __( 'Group Title Color - Hover', 'the-post-grid' ),
7996
+ 'type' => \Elementor\Controls_Manager::COLOR,
7997
+ 'selectors' => [
7998
+ '{{WRAPPER}} .rt-tpg-container .rt-holder:hover .tpg-cf-group-title' => 'color: {{VALUE}}',
7999
+ ],
8000
+ 'condition' => [
8001
+ 'cf_hide_group_title' => 'yes',
8002
+ ],
8003
+ ]
8004
+ );
8005
+
8006
+ $ref->add_control(
8007
+ 'acf_label_color_hover',
8008
+ [
8009
+ 'label' => __( 'Label Color - Hover', 'the-post-grid' ),
8010
+ 'type' => \Elementor\Controls_Manager::COLOR,
8011
+ 'selectors' => [
8012
+ '{{WRAPPER}} .rt-tpg-container .rt-holder:hover .tgp-cf-field-label' => 'color: {{VALUE}}',
8013
+ ],
8014
+ 'condition' => [
8015
+ 'cf_show_only_value' => 'yes',
8016
+ ],
8017
+ ]
8018
+ );
8019
+
8020
+ $ref->add_control(
8021
+ 'acf_value_color_hover',
8022
+ [
8023
+ 'label' => __( 'Value Color - Hover', 'the-post-grid' ),
8024
+ 'type' => \Elementor\Controls_Manager::COLOR,
8025
+ 'selectors' => [
8026
+ '{{WRAPPER}} .rt-tpg-container .rt-holder:hover .tgp-cf-field-value' => 'color: {{VALUE}}',
8027
+ ],
8028
+ ]
8029
+ );
8030
+
8031
+ $ref->end_controls_tab();
8032
+
8033
+ $ref->end_controls_tabs();
8034
+ //End Tab
8035
+ }
8036
+ }
8037
+
8038
+
8039
+ //End the class
8040
+ }
app/Widgets/elementor/rtTPGElementorQuery.php ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use JetBrains\PhpStorm\ArrayShape;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class rtTPGElementorQuery {
15
+
16
+ /**
17
+ * Post Query for normal grid widget
18
+ *
19
+ * @param $data
20
+ * @param string $prefix
21
+ *
22
+ * @return array
23
+ */
24
+ public static function post_query( $data, $prefix = '' ): array {
25
+ $args = [
26
+ 'post_type' => [ $data['post_type'] ],
27
+ 'post_status' => $data['post_status'],
28
+ ];
29
+
30
+ $excluded_ids = null;
31
+
32
+
33
+
34
+ if ( $data['post_id'] ) {
35
+ $post_ids = explode( ',', $data['post_id'] );
36
+ $post_ids = array_map( 'trim', $post_ids );
37
+
38
+ $args['post__in'] = $post_ids;
39
+
40
+ if ( $excluded_ids != null && is_array( $excluded_ids ) ) {
41
+ $args['post__in'] = array_diff( $post_ids, $excluded_ids );
42
+ }
43
+ }
44
+
45
+ if ( $prefix !== 'slider' && 'show' === $data['show_pagination'] ) {
46
+ $_paged = is_front_page() ? "page" : "paged";
47
+ $args['paged'] = get_query_var( $_paged ) ? absint( get_query_var( $_paged ) ) : 1;
48
+ }
49
+
50
+ if ( rtTPG()->hasPro() && 'yes' == $data['ignore_sticky_posts'] ) {
51
+ $args['ignore_sticky_posts'] = 1;
52
+ }
53
+
54
+ if ( $orderby = $data['orderby'] ) {
55
+ if(! rtTPG()->hasPro() && 'rand' == $orderby) {
56
+ $orderby = 'date';
57
+ }
58
+ $args['orderby'] = $orderby;
59
+ }
60
+
61
+ if ( $data['order'] ) {
62
+ $args['order'] = $data['order'];
63
+ }
64
+
65
+ if ( $data['author'] ) {
66
+ $args['author__in'] = $data['author'];
67
+ }
68
+
69
+ if ( rtTPG()->hasPro() && $data['date_range'] ) {
70
+ if ( strpos( $data['date_range'], 'to' ) ) {
71
+ $date_range = explode( 'to', $data['date_range'] );
72
+ $args['date_query'] = [
73
+ [
74
+ 'after' => trim( $date_range[0] ),
75
+ 'before' => trim( $date_range[1] ),
76
+ 'inclusive' => true,
77
+ ],
78
+ ];
79
+ }
80
+ }
81
+
82
+ $_taxonomies = get_object_taxonomies( $data['post_type'], 'objects' );
83
+
84
+ foreach ( $_taxonomies as $index => $object ) {
85
+ if ( in_array( $object->name, Custom_Widget_Base::get_excluded_taxonomy() ) ) {
86
+ continue;
87
+ }
88
+
89
+ if ( $prefix !== 'slider' && rtTPG()->hasPro() && 'show' === $data['show_taxonomy_filter'] ) {
90
+ if ( ( $data[ $data['post_type'] . '_filter_taxonomy' ] == $object->name ) && $data[ $object->name . '_default_terms' ] !== '0' ) {
91
+ $args['tax_query'][] = [
92
+ 'taxonomy' => $data[ $data['post_type'] . '_filter_taxonomy' ],
93
+ 'field' => 'term_id',
94
+ 'terms' => $data[ $object->name . '_default_terms' ],
95
+ ];
96
+ }
97
+ } else {
98
+ $setting_key = $object->name . '_ids';
99
+ if ( ! empty( $data[ $setting_key ] ) ) {
100
+ $args['tax_query'][] = [
101
+ 'taxonomy' => $object->name,
102
+ 'field' => 'term_id',
103
+ 'terms' => $data[ $setting_key ],
104
+ ];
105
+ }
106
+ }
107
+ }
108
+
109
+ if ( ! empty( $args['tax_query'] ) && $data['relation'] ) {
110
+ $args['tax_query']['relation'] = $data['relation'];
111
+ }
112
+
113
+ if ( $data['post_keyword'] ) {
114
+ $args['s'] = $data['post_keyword'];
115
+ }
116
+
117
+ if ( $prefix !== 'slider' ) {
118
+ if ( $data['post_limit'] ) {
119
+ if ( 'show' !== $data['show_pagination'] ) {
120
+ $args['posts_per_page'] = $data['post_limit'];
121
+ } else {
122
+ $tempArgs = $args;
123
+ $tempArgs['posts_per_page'] = $data['post_limit'];
124
+ $tempArgs['paged'] = 1;
125
+ $tempArgs['fields'] = 'ids';
126
+ $tempQ = new WP_Query( $tempArgs );
127
+ if ( ! empty( $tempQ->posts ) ) {
128
+ $args['post__in'] = $tempQ->posts;
129
+ $args['posts_per_page'] = $data['post_limit'];
130
+ }
131
+ }
132
+ } else {
133
+ $_posts_per_page = 9;
134
+ if ( 'grid' === $prefix ) {
135
+ if ( $data['grid_layout'] == 'grid-layout5' ) {
136
+ $_posts_per_page = 5;
137
+ } elseif ( in_array( $data['grid_layout'], [ 'grid-layout6', 'grid-layout6-2' ] ) ) {
138
+ $_posts_per_page = 3;
139
+ } elseif ( in_array( $data['grid_layout'], [ 'grid-layout5', 'grid-layout5-2' ] ) ) {
140
+ $_posts_per_page = 5;
141
+ }
142
+ } elseif ( 'list' === $prefix ) {
143
+ if ( in_array( $data['list_layout'], [ 'list-layout2', 'list-layout2-2' ] ) ) {
144
+ $_posts_per_page = 9;
145
+ } elseif ( in_array( $data['list_layout'], [ 'list-layout3', 'list-layout3-2' ] ) ) {
146
+ $_posts_per_page = 5;
147
+ }
148
+ } elseif ( 'grid_hover' === $prefix ) {
149
+ if ( in_array( $data['grid_hover_layout'], [ 'grid_hover-layout4', 'grid_hover-layout4-2' ] ) ) {
150
+ $_posts_per_page = 7;
151
+ } elseif ( in_array( $data['grid_hover_layout'], [ 'grid_hover-layout5', 'grid_hover-layout5-2' ] ) ) {
152
+ $_posts_per_page = 3;
153
+ } elseif ( in_array( $data['grid_hover_layout'],
154
+ [ 'grid_hover-layout6', 'grid_hover-layout6-2', 'grid_hover-layout9', 'grid_hover-layout9-2', 'grid_hover-layout10', 'grid_hover-layout11' ] )
155
+ ) {
156
+ $_posts_per_page = 4;
157
+ } elseif ( in_array( $data['grid_hover_layout'], [ 'grid_hover-layout7', 'grid_hover-layout7-2', 'grid_hover-layout8' ] ) ) {
158
+ $_posts_per_page = 5;
159
+ } elseif ( in_array( $data['grid_hover_layout'], [ 'grid_hover-layout6', 'grid_hover-layout6-2' ] ) ) {
160
+ $_posts_per_page = 4;
161
+ }
162
+ }
163
+
164
+ $args['posts_per_page'] = $_posts_per_page;
165
+ }
166
+
167
+ if ( 'show' === $data['show_pagination'] && $data['display_per_page'] ) {
168
+ $args['posts_per_page'] = $data['display_per_page'];
169
+ }
170
+ } else {
171
+ $slider_per_page = $data['post_limit'];
172
+ if ( $data['slider_layout'] == 'slider-layout10' ) {
173
+ $slider_reminder = ( intval( $data['post_limit'], 10 ) % 5 );
174
+ if ( $slider_reminder ) {
175
+ $slider_per_page = ( $data['post_limit'] - $slider_reminder + 5 );
176
+ }
177
+ }
178
+ $args['posts_per_page'] = $slider_per_page;
179
+ }
180
+
181
+
182
+ if ( $data['exclude'] || $data['offset'] ) {
183
+ $excluded_ids = [];
184
+ if ( $data['exclude'] ) {
185
+ $excluded_ids = explode( ',', $data['exclude'] );
186
+ $excluded_ids = array_map( 'trim', $excluded_ids );
187
+ }
188
+
189
+ $offset_posts = [];
190
+ if ( $data['offset'] ) {
191
+ $_temp_args = $args;
192
+ unset($_temp_args['paged']);
193
+ $_temp_args['posts_per_page'] = $data['offset'];
194
+ $_temp_args['fields'] = 'ids';
195
+
196
+ $offset_posts = get_posts( $_temp_args );
197
+ }
198
+
199
+ $excluded_post_ids = array_merge( $offset_posts, $excluded_ids );
200
+ $args['post__not_in'] = array_unique( $excluded_post_ids );
201
+ }
202
+
203
+ return $args;
204
+ }
205
+
206
+
207
+ /**
208
+ * Post Query for page builder block
209
+ *
210
+ * @param $data
211
+ * @param string $prefix
212
+ * @param string $template_type
213
+ *
214
+ * @return array
215
+ */
216
+ public static function post_query_builder( $data, $prefix = '', $template_type = '' ): array {
217
+ if ( 'single' === $template_type ) {
218
+ $rt_post_cat = wp_get_object_terms( $data['last_post_id'], $data['taxonomy_lists'], [ 'fields' => 'ids' ] );
219
+ $args = [
220
+ 'post_type' => 'post',
221
+ 'post_status' => 'publish',
222
+ 'tax_query' => [
223
+ [
224
+ 'taxonomy' => $data['taxonomy_lists'],
225
+ 'field' => 'id',
226
+ 'terms' => $rt_post_cat,
227
+ ],
228
+ ],
229
+ 'post__not_in' => [ $data['last_post_id'] ],
230
+ ];
231
+
232
+ if ( $orderby = $data['orderby'] ) {
233
+ $args['orderby'] = $orderby;
234
+ }
235
+
236
+ if ( $data['order'] ) {
237
+ $args['order'] = $data['order'];
238
+ }
239
+
240
+ $slider_per_page = $data['post_limit'];
241
+ if ( $data['slider_layout'] == 'slider-layout10' ) {
242
+ $slider_reminder = ( intval( $data['post_limit'], 10 ) % 5 );
243
+ if ( $slider_reminder ) {
244
+ $slider_per_page = ( $data['post_limit'] - $slider_reminder + 5 );
245
+ }
246
+ }
247
+ $args['posts_per_page'] = $slider_per_page;
248
+ } else {
249
+ $args = [
250
+ 'post_type' => 'post',
251
+ 'post_status' => 'publish',
252
+ 'posts_per_page' => $data['post_limit'],
253
+ ];
254
+
255
+ $excluded_ids = null;
256
+
257
+ if ( $data['exclude'] || $data['offset'] ) {
258
+ $excluded_ids = [];
259
+ if ( $data['exclude'] ) {
260
+ $excluded_ids = explode( ',', $data['exclude'] );
261
+ $excluded_ids = array_map( 'trim', $excluded_ids );
262
+ }
263
+
264
+ $offset_posts = [];
265
+ if ( $data['offset'] ) {
266
+ $_temp_args = [
267
+ 'post_type' => 'post',
268
+ 'posts_per_page' => $data['offset'],
269
+ 'post_status' => 'publish',
270
+ 'fields' => 'ids',
271
+ ];
272
+
273
+ if ( is_tag() ) {
274
+ $_temp_args['tag'] = get_query_var( 'tag' );
275
+ }
276
+
277
+ if ( is_category() ) {
278
+ $_temp_args['cat'] = get_query_var( 'cat' );
279
+ }
280
+
281
+ if ( is_author() ) {
282
+ $_temp_args['author'] = get_query_var( 'author' );
283
+ }
284
+
285
+ if ( is_date() ) {
286
+ $year = get_query_var( 'year' );
287
+ $monthnum = get_query_var( 'monthnum' );
288
+ $day = get_query_var( 'day' );
289
+
290
+ $_temp_args = [
291
+ 'date_query' => [
292
+ [
293
+ 'year' => $year,
294
+ 'month' => $monthnum,
295
+ 'day' => $day,
296
+ ],
297
+ ],
298
+ ];
299
+ }
300
+
301
+ $offset_posts = get_posts( $_temp_args );
302
+ }
303
+
304
+ $excluded_post_ids = array_merge( $offset_posts, $excluded_ids );
305
+ $args['post__not_in'] = array_unique( $excluded_post_ids );
306
+ }
307
+
308
+ if ( $data['post_id'] ) {
309
+ $post_ids = explode( ',', $data['post_id'] );
310
+ $post_ids = array_map( 'trim', $post_ids );
311
+
312
+ $args['post__in'] = $post_ids;
313
+
314
+ if ( $excluded_ids != null && is_array( $excluded_ids ) ) {
315
+ $args['post__in'] = array_diff( $post_ids, $excluded_ids );
316
+ }
317
+ }
318
+
319
+ if ( 'slider' !== $prefix && 'show' === $data['show_pagination'] ) {
320
+ $args['paged'] = get_query_var( "paged" ) ? absint( get_query_var( "paged" ) ) : 1;
321
+ }
322
+
323
+ if ( is_tag() ) {
324
+ $args['tag'] = get_query_var( 'tag' );
325
+ }
326
+
327
+ if ( is_category() ) {
328
+ $args['cat'] = get_query_var( 'cat' );
329
+ }
330
+
331
+ if ( is_author() ) {
332
+ $args['author'] = get_query_var( 'author' );
333
+ }
334
+
335
+ if ( is_date() ) {
336
+ $year = get_query_var( 'year' );
337
+ $monthnum = get_query_var( 'monthnum' );
338
+ $day = get_query_var( 'day' );
339
+
340
+ $args = [
341
+ 'date_query' => [
342
+ [
343
+ 'year' => $year,
344
+ 'month' => $monthnum,
345
+ 'day' => $day,
346
+ ],
347
+ ],
348
+ ];
349
+ }
350
+
351
+ if ( is_search() ) {
352
+ $search = get_query_var( 's' );
353
+ $args['s'] = $search;
354
+ }
355
+ }
356
+
357
+ return $args;
358
+ }
359
+
360
+ }
app/Widgets/elementor/widgets/default.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use RT\ThePostGrid\Helpers\Fns;
4
+
5
+ class RtElementorWidget extends \Elementor\Widget_Base {
6
+
7
+ public function get_name() {
8
+ return 'the-post-grid';
9
+ }
10
+
11
+ public function get_title() {
12
+ return __( 'The Post Grid <br> (Deprecated)', 'the-post-grid' );
13
+ }
14
+
15
+ public function get_icon() {
16
+ return 'eicon-gallery-grid tpg-grid-icon';
17
+ }
18
+
19
+ public function get_categories() {
20
+ return [ RT_THE_POST_GRID_PLUGIN_SLUG . '-elements' ];
21
+ }
22
+
23
+ protected function register_controls() {
24
+ $this->start_controls_section(
25
+ 'content_section',
26
+ [
27
+ 'label' => __( 'The Post Grid (Deprecated)', 'the-post-grid' ),
28
+ 'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
29
+ ]
30
+ );
31
+
32
+ $this->add_control(
33
+ 'post_grid_id',
34
+ array(
35
+ 'type' => \Elementor\Controls_Manager::SELECT2,
36
+ 'id' => 'style',
37
+ 'label' => __( 'Post Grid', 'the-post-grid' ),
38
+ 'options' => Fns::getAllTPGShortCodeList()
39
+ )
40
+ );
41
+
42
+ $this->end_controls_section();
43
+ }
44
+
45
+ protected function render() {
46
+ $settings = $this->get_settings_for_display();
47
+ if(isset($settings['post_grid_id']) && !empty($settings['post_grid_id']) && $id = absint($settings['post_grid_id'])){
48
+ echo do_shortcode( '[the-post-grid id="' . $id . '"]' );
49
+ }else{
50
+ echo "Please select a post grid";
51
+ }
52
+ }
53
+ }
app/Widgets/elementor/widgets/grid-hover-layout-archive.php ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGGridHoverLayoutArchive extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'grid_hover';
28
+ $this->tpg_name = esc_html__( 'TPG - Grid Hover Layout', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-grid-hover-layout-archive';
30
+ $this->tpg_icon = 'eicon-image-rollover tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ $this->tpg_category = $this->tpg_archive_category;
32
+ }
33
+
34
+ protected function register_controls() {
35
+ /**
36
+ * Content Tab
37
+ * ===========
38
+ */
39
+
40
+ //Layout
41
+ rtTPGElementorHelper::grid_layouts( $this, 'archive' );
42
+
43
+ //Query
44
+ rtTPGElementorHelper::query_builder( $this, 'archive' );
45
+
46
+ //Filter Settings
47
+ //rtTPGElementorHelper::filter_settings( $this );
48
+
49
+ //Pagination Settings
50
+ rtTPGElementorHelper::pagination_settings( $this, 'archive' );
51
+
52
+ //Links
53
+ rtTPGElementorHelper::links( $this );
54
+
55
+ /**
56
+ * Settings Tab
57
+ * =============
58
+ */
59
+
60
+ //Field Selection
61
+ rtTPGElementorHelper::field_selection( $this );
62
+
63
+ //Section Title Settings
64
+ rtTPGElementorHelper::section_title_settings( $this, 'archive' );
65
+
66
+ //Title Settings
67
+ rtTPGElementorHelper::post_title_settings( $this );
68
+
69
+ //Thumbnail Settings
70
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
71
+
72
+ //Excerpt Settings
73
+ rtTPGElementorHelper::post_excerpt_settings( $this );
74
+
75
+ //Meta Settings
76
+ rtTPGElementorHelper::post_meta_settings( $this );
77
+
78
+ //Advanced Custom Field ACF Settings
79
+ rtTPGElementorHelper::tpg_acf_settings( $this );
80
+
81
+ //Readmore Settings
82
+ rtTPGElementorHelper::post_readmore_settings( $this );
83
+
84
+ /**
85
+ * Style Tab
86
+ * ==========
87
+ */
88
+
89
+ //Section Title Style
90
+ rtTPGElementorHelper::sectionTitle( $this, 'archive' );
91
+
92
+ // Title Style
93
+ rtTPGElementorHelper::titleStyle( $this );
94
+
95
+ //Thumbnail Style
96
+ rtTPGElementorHelper::thumbnailStyle( $this );
97
+
98
+ // Content Style
99
+ rtTPGElementorHelper::contentStyle( $this );
100
+
101
+ // Meta Info Style
102
+ rtTPGElementorHelper::metaInfoStyle( $this );
103
+
104
+ //Box Style
105
+ rtTPGElementorHelper::socialShareStyle( $this );
106
+
107
+ //ACF Style
108
+ rtTPGElementorHelper::tpg_acf_style( $this );
109
+
110
+ //Read More Style
111
+ rtTPGElementorHelper::readmoreStyle( $this );
112
+
113
+ //Link Style
114
+ rtTPGElementorHelper::linkStyle( $this );
115
+
116
+ //Pagination - Loadmore Style
117
+ rtTPGElementorHelper::paginationStyle( $this );
118
+
119
+ //Box Style
120
+ rtTPGElementorHelper::articlBoxSettings( $this );
121
+
122
+ //Promotions Style
123
+ rtTPGElementorHelper::promotions( $this );
124
+ }
125
+
126
+ protected function render() {
127
+ $data = $this->get_settings();
128
+ $_prefix = $this->prefix;
129
+ $data['post_type'] = 'post';
130
+
131
+ if ( ! rtTPG()->hasPro() && ! in_array( $data[ $_prefix . '_layout' ], [ 'grid_hover-layout1', 'grid_hover-layout2', 'grid_hover-layout3' ] ) ) {
132
+ $data[ $_prefix . '_layout' ] = 'grid_hover-layout1';
133
+ }
134
+
135
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
136
+ wp_enqueue_style( 'rt-scrollbar' );
137
+ wp_enqueue_style( 'rt-magnific-popup' );
138
+ wp_enqueue_script( 'rt-scrollbar' );
139
+ wp_enqueue_script( 'rt-magnific-popup' );
140
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ] );
141
+ }
142
+
143
+ //Query
144
+ $query_args = rtTPGElementorQuery::post_query_builder( $data, $_prefix );
145
+ $query = new WP_Query( $query_args );
146
+ $rand = mt_rand();
147
+ $layoutID = "rt-tpg-container-" . $rand;
148
+ $posts_per_page = $data['post_limit'];
149
+
150
+
151
+ //TODO: Get Post Data for render post
152
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
153
+
154
+ //Post type render
155
+ $post_types = Fns::get_post_types();
156
+ foreach ( $post_types as $post_type => $label ) {
157
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
158
+ if ( empty( $_taxonomies ) ) {
159
+ continue;
160
+ }
161
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
162
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
163
+ }
164
+ $template_path = $this->tpg_template_path( $post_data );
165
+ $_layout = $data[ $_prefix . '_layout' ];
166
+ ?>
167
+
168
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper <?php echo esc_attr( $_layout . '-main' ); ?>"
169
+ id="<?php echo esc_attr( $layoutID ); ?>"
170
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
171
+ data-sc-id="elementor"
172
+ data-el-settings='<?php echo htmlspecialchars( wp_json_encode( $post_data ) ); ?>'
173
+ data-el-query='<?php echo htmlspecialchars( wp_json_encode( $query_args ) ); ?>'
174
+ data-el-path='<?php echo esc_attr( $template_path ); ?>'
175
+ >
176
+ <?php
177
+ $wrapper_class = [];
178
+ if ( in_array( $_layout,
179
+ [
180
+ 'grid_hover-layout6',
181
+ 'grid_hover-layout7',
182
+ 'grid_hover-layout8',
183
+ 'grid_hover-layout9',
184
+ 'grid_hover-layout10',
185
+ 'grid_hover-layout11',
186
+ 'grid_hover-layout5-2',
187
+ 'grid_hover-layout6-2',
188
+ 'grid_hover-layout7-2',
189
+ 'grid_hover-layout9-2',
190
+ ] )
191
+ ) {
192
+ $wrapper_class[] = 'grid_hover-layout5';
193
+ }
194
+ $wrapper_class[] = str_replace( '-2', null, $_layout );
195
+ $wrapper_class[] = 'tpg-even grid-behaviour';
196
+ $wrapper_class[] = $_prefix . '_layout_wrapper';
197
+
198
+ //section title settings
199
+
200
+
201
+ echo "<div class='tpg-header-wrapper'>";
202
+ $this->get_section_title( $data );
203
+ echo "</div>";
204
+ ?>
205
+
206
+ <div data-title="Loading ..." class="rt-row rt-content-loader <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
207
+ <?php
208
+ if ( $query->have_posts() ) {
209
+ $pCount = 1;
210
+ while ( $query->have_posts() ) {
211
+ $query->the_post();
212
+ set_query_var( 'tpg_post_count', $pCount );
213
+ set_query_var( 'tpg_total_posts', $query->post_count );
214
+ $this->tpg_template( $post_data );
215
+ $pCount ++;
216
+ }
217
+ } else {
218
+ if ( $data['no_posts_found_text'] ) {
219
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
220
+ } else {
221
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
222
+ }
223
+ }
224
+ wp_reset_postdata();
225
+ ?>
226
+ </div>
227
+
228
+ <?php echo $this->get_pagination_markup( $query, $data ); ?>
229
+ </div>
230
+ <?php
231
+ do_action('tpg_elementor_script');
232
+ }
233
+
234
+ }
app/Widgets/elementor/widgets/grid-hover-layout.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGGridHoverLayout extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'grid_hover';
28
+ $this->tpg_name = esc_html__( 'TPG - Grid Hover Layout', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-grid-hover-layout';
30
+ $this->tpg_icon = 'eicon-image-rollover tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ }
32
+
33
+ protected function register_controls() {
34
+ /**
35
+ * Content Tab
36
+ * ===========
37
+ */
38
+
39
+ //Layout
40
+ rtTPGElementorHelper::grid_layouts( $this );
41
+
42
+ //Query
43
+ rtTPGElementorHelper::query( $this );
44
+
45
+ //Filter Settings
46
+ rtTPGElementorHelper::filter_settings( $this );
47
+
48
+ //Pagination Settings
49
+ rtTPGElementorHelper::pagination_settings( $this );
50
+
51
+ //Links
52
+ rtTPGElementorHelper::links( $this );
53
+
54
+ /**
55
+ * Settings Tab
56
+ * =============
57
+ */
58
+
59
+ //Field Selection
60
+ rtTPGElementorHelper::field_selection( $this );
61
+
62
+ //Section Title Settings
63
+ rtTPGElementorHelper::section_title_settings( $this );
64
+
65
+ //Title Settings
66
+ rtTPGElementorHelper::post_title_settings( $this );
67
+
68
+ //Thumbnail Settings
69
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
70
+
71
+ //Excerpt Settings
72
+ rtTPGElementorHelper::post_excerpt_settings( $this );
73
+
74
+ //Meta Settings
75
+ rtTPGElementorHelper::post_meta_settings( $this );
76
+
77
+ //Advanced Custom Field ACF Settings
78
+ rtTPGElementorHelper::tpg_acf_settings( $this );
79
+
80
+ //Readmore Settings
81
+ rtTPGElementorHelper::post_readmore_settings( $this );
82
+
83
+ /**
84
+ * Style Tab
85
+ * ==========
86
+ */
87
+
88
+ //Section Title Style
89
+ rtTPGElementorHelper::sectionTitle( $this );
90
+
91
+ // Title Style
92
+ rtTPGElementorHelper::titleStyle( $this );
93
+
94
+ //Thumbnail Style
95
+ rtTPGElementorHelper::thumbnailStyle( $this );
96
+
97
+ // Content Style
98
+ rtTPGElementorHelper::contentStyle( $this );
99
+
100
+ // Meta Info Style
101
+ rtTPGElementorHelper::metaInfoStyle( $this );
102
+
103
+ //Box Style
104
+ rtTPGElementorHelper::socialShareStyle( $this );
105
+
106
+ //ACF Style
107
+ rtTPGElementorHelper::tpg_acf_style( $this );
108
+
109
+ //Read More Style
110
+ rtTPGElementorHelper::readmoreStyle( $this );
111
+
112
+ //Link Style
113
+ rtTPGElementorHelper::linkStyle( $this );
114
+
115
+ //Box Style
116
+ rtTPGElementorHelper::frontEndFilter( $this );
117
+
118
+ //Pagination - Loadmore Style
119
+ rtTPGElementorHelper::paginationStyle( $this );
120
+
121
+ //Box Style
122
+ rtTPGElementorHelper::articlBoxSettings( $this );
123
+
124
+ //Promotions Style
125
+ rtTPGElementorHelper::promotions( $this );
126
+ }
127
+
128
+ protected function render() {
129
+ $data = $this->get_settings();
130
+ $_prefix = $this->prefix;
131
+ if ( ! rtTPG()->hasPro() && ! in_array( $data[ $_prefix . '_layout' ], [ 'grid_hover-layout1', 'grid_hover-layout2', 'grid_hover-layout3' ] ) ) {
132
+ $data[ $_prefix . '_layout' ] = 'grid_hover-layout1';
133
+ }
134
+
135
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
136
+ wp_enqueue_style( 'rt-scrollbar' );
137
+ wp_enqueue_style( 'rt-magnific-popup' );
138
+ wp_enqueue_script( 'rt-scrollbar' );
139
+ wp_enqueue_script( 'rt-magnific-popup' );
140
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ] );
141
+ }
142
+
143
+ //Query
144
+ $query_args = rtTPGElementorQuery::post_query( $data, $_prefix );
145
+ $query = new WP_Query( $query_args );
146
+ $rand = mt_rand();
147
+ $layoutID = "rt-tpg-container-" . $rand;
148
+ $posts_per_page = $data['display_per_page'] ? $data['display_per_page'] : $data['post_limit'];
149
+
150
+
151
+ //TODO: Get Post Data for render post
152
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
153
+
154
+ //Post type render
155
+ $post_types = Fns::get_post_types();
156
+ foreach ( $post_types as $post_type => $label ) {
157
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
158
+ if ( empty( $_taxonomies ) ) {
159
+ continue;
160
+ }
161
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
162
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
163
+ }
164
+ $template_path = $this->tpg_template_path( $post_data );
165
+ $_layout = $data[ $_prefix . '_layout' ];
166
+ ?>
167
+
168
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper <?php echo esc_attr( $_layout . '-main' ); ?>"
169
+ id="<?php echo esc_attr( $layoutID ); ?>"
170
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
171
+ data-sc-id="elementor"
172
+ data-el-settings='<?php echo Fns::is_filter_enable( $data ) ? htmlspecialchars( wp_json_encode( $post_data ) ) : ''; ?>'
173
+ data-el-query='<?php echo Fns::is_filter_enable( $data ) ? htmlspecialchars( wp_json_encode( $query_args ) ) : ''; ?>'
174
+ data-el-path='<?php echo Fns::is_filter_enable( $data ) ? esc_attr( $template_path ) : ''; ?>'
175
+ >
176
+ <?php
177
+ $wrapper_class = [];
178
+ if ( in_array( $_layout, [ 'grid_hover-layout6', 'grid_hover-layout7', 'grid_hover-layout8', 'grid_hover-layout9', 'grid_hover-layout10', 'grid_hover-layout11', 'grid_hover-layout5-2', 'grid_hover-layout6-2', 'grid_hover-layout7-2', 'grid_hover-layout9-2', ] ) ) {
179
+ $wrapper_class[] = 'grid_hover-layout5';
180
+ }
181
+ $wrapper_class[] = str_replace('-2', null, $_layout);
182
+ $wrapper_class[] = 'tpg-even grid-behaviour';
183
+ $wrapper_class[] = $_prefix . '_layout_wrapper';
184
+
185
+ //section title settings
186
+ $is_carousel = '';
187
+ if ( rtTPG()->hasPro() && 'carousel' == $data['filter_btn_style'] && 'button' == $data['filter_type'] ) {
188
+ $is_carousel = 'carousel';
189
+ }
190
+
191
+ echo "<div class='tpg-header-wrapper {$is_carousel}'>";
192
+ $this->get_section_title( $data );
193
+ echo $this->get_frontend_filter_markup( $data );
194
+ echo "</div>";
195
+ ?>
196
+
197
+ <div data-title="Loading ..." class="rt-row rt-content-loader <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
198
+ <?php
199
+ if ( $query->have_posts() ) {
200
+ $pCount = 1;
201
+ while ( $query->have_posts() ) {
202
+ $query->the_post();
203
+ set_query_var( 'tpg_post_count', $pCount );
204
+ set_query_var( 'tpg_total_posts', $query->post_count );
205
+ $this->tpg_template( $post_data );
206
+ $pCount ++;
207
+ }
208
+ } else {
209
+ if ( $data['no_posts_found_text'] ) {
210
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
211
+ } else {
212
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
213
+ }
214
+ }
215
+ wp_reset_postdata();
216
+ ?>
217
+ </div>
218
+
219
+ <?php echo $this->get_pagination_markup( $query, $data ); ?>
220
+ </div>
221
+ <?php
222
+ do_action('tpg_elementor_script');
223
+ }
224
+
225
+ }
app/Widgets/elementor/widgets/grid-layout-archive.php ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGGridLayoutArchive extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'grid';
28
+ $this->tpg_name = esc_html__( 'TPG - Grid Layout Archive', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-grid-layout-archive';
30
+ $this->tpg_icon = 'eicon-posts-grid tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ $this->tpg_category = $this->tpg_archive_category;
32
+ }
33
+
34
+ protected function register_controls() {
35
+ /** Content TAB **/
36
+
37
+ //Layout
38
+ rtTPGElementorHelper::grid_layouts( $this, 'archive' );
39
+
40
+ //Query
41
+ rtTPGElementorHelper::query_builder( $this );
42
+
43
+ //Filter Settings
44
+ //rtTPGElementorHelper::filter_settings( $this, 'archive' );
45
+
46
+ //Pagination Settings
47
+ rtTPGElementorHelper::pagination_settings( $this, 'archive' );
48
+
49
+ //Links
50
+ rtTPGElementorHelper::links( $this );
51
+
52
+ /**
53
+ * Settings Tab
54
+ * ===========
55
+ */
56
+
57
+ //Field Selection
58
+ rtTPGElementorHelper::field_selection( $this );
59
+
60
+ //Section Title Settings
61
+ rtTPGElementorHelper::section_title_settings( $this, 'archive' );
62
+
63
+ //Title Settings
64
+ rtTPGElementorHelper::post_title_settings( $this );
65
+
66
+ //Thumbnail Settings
67
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
68
+
69
+ //Excerpt Settings
70
+ rtTPGElementorHelper::post_excerpt_settings( $this );
71
+
72
+ //Meta Settings
73
+ rtTPGElementorHelper::post_meta_settings( $this );
74
+
75
+ //Advanced Custom Field ACF Settings
76
+ rtTPGElementorHelper::tpg_acf_settings( $this );
77
+
78
+ //Readmore Settings
79
+ rtTPGElementorHelper::post_readmore_settings( $this );
80
+
81
+
82
+ /** Style TAB **/
83
+
84
+ //Section Title Style
85
+ rtTPGElementorHelper::sectionTitle( $this, 'archive' );
86
+
87
+ // Title Style
88
+ rtTPGElementorHelper::titleStyle( $this );
89
+
90
+ //Thumbnail Style
91
+ rtTPGElementorHelper::thumbnailStyle( $this );
92
+
93
+ // Content Style
94
+ rtTPGElementorHelper::contentStyle( $this );
95
+
96
+ // Meta Info Style
97
+ rtTPGElementorHelper::metaInfoStyle( $this );
98
+
99
+ //Social Share Settings
100
+ rtTPGElementorHelper::socialShareStyle( $this );
101
+
102
+ //ACF Style
103
+ rtTPGElementorHelper::tpg_acf_style( $this );
104
+
105
+ //Read More Style
106
+ rtTPGElementorHelper::readmoreStyle( $this );
107
+
108
+ //Link Style
109
+ rtTPGElementorHelper::linkStyle( $this );
110
+
111
+
112
+ //Pagination - Loadmore Style
113
+ rtTPGElementorHelper::paginationStyle( $this );
114
+
115
+ //Box Settings
116
+ rtTPGElementorHelper::articlBoxSettings( $this );
117
+
118
+ //Promotions
119
+ rtTPGElementorHelper::promotions( $this );
120
+ }
121
+
122
+ protected function render() {
123
+ $data = $this->get_settings();
124
+ $_prefix = $this->prefix;
125
+ $data['post_type'] = 'post';
126
+
127
+ if ( ! rtTPG()->hasPro() && ! in_array( $data[ $_prefix . '_layout' ], [ 'grid-layout1', 'grid-layout2' ] ) ) {
128
+ $data[ $_prefix . '_layout' ] = 'grid-layout1';
129
+ }
130
+
131
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
132
+ wp_enqueue_style( 'rt-scrollbar' );
133
+ wp_enqueue_style( 'rt-magnific-popup' );
134
+ wp_enqueue_script( 'rt-scrollbar' );
135
+ wp_enqueue_script( 'rt-magnific-popup' );
136
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ] );
137
+ }
138
+
139
+ if ( 'masonry' === $data['grid_layout_style'] ) {
140
+ wp_enqueue_script( 'imagesloaded' );
141
+ wp_enqueue_script( 'rt-isotope-js' );
142
+ wp_enqueue_script( 'jquery-masonry' );
143
+ wp_enqueue_script( 'rt-image-load-js' );
144
+ }
145
+
146
+ //Query
147
+ $query_args = rtTPGElementorQuery::post_query_builder( $data, $_prefix );
148
+ $query = new WP_Query( $query_args );
149
+ $rand = mt_rand();
150
+ $layoutID = "rt-tpg-container-" . $rand;
151
+ $posts_per_page = $data['post_limit'];
152
+
153
+ /**
154
+ * TODO: Get Post Data for render post
155
+ */
156
+
157
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
158
+
159
+ /**
160
+ * Post type render
161
+ */
162
+
163
+ $post_types = Fns::get_post_types();
164
+ foreach ( $post_types as $post_type => $label ) {
165
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
166
+ if ( empty( $_taxonomies ) ) {
167
+ continue;
168
+ }
169
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
170
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
171
+ }
172
+
173
+ $template_path = $this->tpg_template_path( $post_data );
174
+ $_layout = $data[ $_prefix . '_layout' ];
175
+ $_layout_style = $data[ $_prefix . '_layout_style' ];
176
+
177
+ ?>
178
+
179
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper clearfix <?php echo esc_attr( $_layout . '-main' ); ?>"
180
+ id="<?php echo esc_attr( $layoutID ); ?>"
181
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
182
+ data-grid-style="<?php echo esc_attr( $data[ $_prefix . '_layout_style' ] ); ?>"
183
+ data-sc-id="elementor"
184
+ data-el-settings='<?php echo htmlspecialchars( wp_json_encode( $post_data ) ); ?>'
185
+ data-el-query='<?php echo htmlspecialchars( wp_json_encode( $query_args ) ); ?>'
186
+ data-el-path='<?php echo esc_attr( $template_path ); ?>'
187
+ >
188
+ <?php
189
+
190
+ $wrapper_class = [];
191
+ $wrapper_class[] = str_replace( '-2', null, $_layout );
192
+ $wrapper_class[] = 'grid-behaviour';
193
+ $wrapper_class[] = ( in_array( $_layout, [ 'grid-layout2' ] ) ) ? "tpg-even" : $_layout_style;
194
+ $wrapper_class[] = $_prefix . '_layout_wrapper';
195
+ if ( 'masonry' === $_layout_style && ! in_array( $_layout, [ $this->prefix . '-layout2', $this->prefix . '-layout5', $this->prefix . '-layout6' ] ) ) {
196
+ $wrapper_class[] = 'tpg-masonry';
197
+ }
198
+
199
+ //section title settings
200
+
201
+ echo "<div class='tpg-header-wrapper '>";
202
+ $this->get_section_title( $data );
203
+ echo "</div>";
204
+ ?>
205
+
206
+ <div data-title="Loading ..." class="rt-row rt-content-loader <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
207
+ <?php
208
+ if ( $query->have_posts() ) {
209
+ $pCount = 1;
210
+ while ( $query->have_posts() ) {
211
+ $query->the_post();
212
+ set_query_var( 'tpg_post_count', $pCount );
213
+ set_query_var( 'tpg_total_posts', $query->post_count );
214
+ $this->tpg_template( $post_data );
215
+ $pCount ++;
216
+ //rtTPGElementorHelper::tpg_template($data, $this->tpg_dir);
217
+ }
218
+ } else {
219
+ if ( $data['no_posts_found_text'] ) {
220
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
221
+ } else {
222
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
223
+ }
224
+ }
225
+ wp_reset_postdata();
226
+ ?>
227
+ </div>
228
+
229
+ <?php echo $this->get_pagination_markup( $query, $data ); ?>
230
+ </div>
231
+ <?php
232
+ if ( 'masonry' === $data[ $_prefix . '_layout_style' ] && \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
233
+ ?>
234
+ <script>jQuery('.rt-row.rt-content-loader.tpg-masonry').isotope();</script>
235
+ <?php
236
+ }
237
+ do_action('tpg_elementor_script');
238
+ }
239
+
240
+ }
app/Widgets/elementor/widgets/grid-layout.php ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGGridLayout extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'grid';
28
+ $this->tpg_name = esc_html__( 'TPG - Grid Layout', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-grid-layout';
30
+ $this->tpg_icon = 'eicon-posts-grid tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ }
32
+
33
+ protected function register_controls() {
34
+ /** Content TAB **/
35
+
36
+ //Layout
37
+ rtTPGElementorHelper::grid_layouts( $this );
38
+
39
+ //Query
40
+ rtTPGElementorHelper::query( $this );
41
+
42
+ //Filter Settings
43
+ rtTPGElementorHelper::filter_settings( $this );
44
+
45
+ //Pagination Settings
46
+ rtTPGElementorHelper::pagination_settings( $this );
47
+
48
+ //Links
49
+ rtTPGElementorHelper::links( $this );
50
+
51
+ /**
52
+ * Settings Tab
53
+ * ===========
54
+ */
55
+
56
+ //Field Selection
57
+ rtTPGElementorHelper::field_selection( $this );
58
+
59
+ //Section Title Settings
60
+ rtTPGElementorHelper::section_title_settings( $this );
61
+
62
+ //Title Settings
63
+ rtTPGElementorHelper::post_title_settings( $this );
64
+
65
+ //Thumbnail Settings
66
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
67
+
68
+ //Excerpt Settings
69
+ rtTPGElementorHelper::post_excerpt_settings( $this );
70
+
71
+ //Meta Settings
72
+ rtTPGElementorHelper::post_meta_settings( $this );
73
+
74
+ //Advanced Custom Field ACF Settings
75
+ rtTPGElementorHelper::tpg_acf_settings( $this );
76
+
77
+ //Readmore Settings
78
+ rtTPGElementorHelper::post_readmore_settings( $this );
79
+
80
+
81
+ /** Style TAB **/
82
+
83
+ //Section Title Style
84
+ rtTPGElementorHelper::sectionTitle( $this );
85
+
86
+ // Title Style
87
+ rtTPGElementorHelper::titleStyle( $this );
88
+
89
+ //Thumbnail Style
90
+ rtTPGElementorHelper::thumbnailStyle( $this );
91
+
92
+ // Content Style
93
+ rtTPGElementorHelper::contentStyle( $this );
94
+
95
+ // Meta Info Style
96
+ rtTPGElementorHelper::metaInfoStyle( $this );
97
+
98
+ //Box Style
99
+ rtTPGElementorHelper::socialShareStyle( $this );
100
+
101
+ //ACF Style
102
+ rtTPGElementorHelper::tpg_acf_style( $this );
103
+
104
+ //Read More Style
105
+ rtTPGElementorHelper::readmoreStyle( $this );
106
+
107
+ //Link Style
108
+ rtTPGElementorHelper::linkStyle( $this );
109
+
110
+ //Pagination - Load more Style
111
+ rtTPGElementorHelper::paginationStyle( $this );
112
+
113
+ //Box Style
114
+ rtTPGElementorHelper::frontEndFilter( $this );
115
+
116
+ //Box Settings
117
+ rtTPGElementorHelper::articlBoxSettings( $this );
118
+
119
+ //Promotions
120
+ rtTPGElementorHelper::promotions( $this );
121
+ }
122
+
123
+ protected function render() {
124
+ $data = $this->get_settings();
125
+ $_prefix = $this->prefix;
126
+
127
+ if ( ! rtTPG()->hasPro() && ! in_array( $data[ $_prefix . '_layout' ], [ 'grid-layout1', 'grid-layout4', 'grid-layout3' ] ) ) {
128
+ $data[ $_prefix . '_layout' ] = 'grid-layout1';
129
+ }
130
+
131
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
132
+ wp_enqueue_style( 'rt-scrollbar' );
133
+ wp_enqueue_style( 'rt-magnific-popup' );
134
+ wp_enqueue_script( 'rt-scrollbar' );
135
+ wp_enqueue_script( 'rt-magnific-popup' );
136
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ] );
137
+ }
138
+
139
+ if ( 'masonry' === $data['grid_layout_style'] ) {
140
+ wp_enqueue_script( 'imagesloaded' );
141
+ wp_enqueue_script( 'rt-isotope-js' );
142
+ wp_enqueue_script( 'jquery-masonry' );
143
+ wp_enqueue_script( 'rt-image-load-js' );
144
+ }
145
+
146
+ //Query
147
+ $query_args = rtTPGElementorQuery::post_query( $data, $_prefix );
148
+ $query = new WP_Query( $query_args );
149
+ $rand = mt_rand();
150
+ $layoutID = "rt-tpg-container-" . $rand;
151
+ $posts_per_page = $data['display_per_page'] ? $data['display_per_page'] : $data['post_limit'];
152
+
153
+ /**
154
+ * TODO: Get Post Data for render post
155
+ */
156
+
157
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
158
+
159
+ /**
160
+ * Post type render
161
+ */
162
+
163
+ $post_types = Fns::get_post_types();
164
+ foreach ( $post_types as $post_type => $label ) {
165
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
166
+ if ( empty( $_taxonomies ) ) {
167
+ continue;
168
+ }
169
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
170
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
171
+ }
172
+
173
+ $template_path = $this->tpg_template_path( $post_data );
174
+ $_layout = $data[ $_prefix . '_layout' ];
175
+ $_layout_style = $data[ $_prefix . '_layout_style' ];
176
+
177
+ ?>
178
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper clearfix <?php echo esc_attr( $_layout . '-main' ); ?>"
179
+ id="<?php echo esc_attr( $layoutID ); ?>"
180
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
181
+ data-grid-style="<?php echo esc_attr( $data[ $_prefix . '_layout_style' ] ); ?>"
182
+ data-sc-id="elementor"
183
+ data-el-settings='<?php echo Fns::is_filter_enable( $data ) ? htmlspecialchars( wp_json_encode( $post_data ) ) : ''; ?>'
184
+ data-el-query='<?php echo Fns::is_filter_enable( $data ) ? htmlspecialchars( wp_json_encode( $query_args ) ) : ''; ?>'
185
+ data-el-path='<?php echo Fns::is_filter_enable( $data ) ? esc_attr( $template_path ) : ''; ?>'
186
+ >
187
+ <?php
188
+
189
+ $wrapper_class = [];
190
+ $wrapper_class[] = str_replace( '-2', '', $_layout );
191
+ $wrapper_class[] = 'grid-behaviour';
192
+ $wrapper_class[] = ( in_array( $_layout, [ 'grid-layout2' ] ) ) ? "tpg-even" : $_layout_style;
193
+ $wrapper_class[] = $_prefix . '_layout_wrapper';
194
+ if ( 'masonry' === $_layout_style && in_array( $_layout, [ 'grid-layout1', 'grid-layout3', 'grid-layout4' ] ) ) {
195
+ $wrapper_class[] = 'tpg-masonry';
196
+ }
197
+
198
+ //section title settings
199
+ $is_carousel = '';
200
+ if ( rtTPG()->hasPro() && 'carousel' == $data['filter_btn_style'] && 'button' == $data['filter_type'] ) {
201
+ $is_carousel = 'carousel';
202
+ }
203
+
204
+ echo "<div class='tpg-header-wrapper {$is_carousel}'>";
205
+ $this->get_section_title( $data );
206
+ echo $this->get_frontend_filter_markup( $data );
207
+ echo "</div>";
208
+ ?>
209
+
210
+ <div data-title="Loading ..." class="rt-row rt-content-loader <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
211
+ <?php
212
+ if ( $query->have_posts() ) {
213
+ $pCount = 1;
214
+ while ( $query->have_posts() ) {
215
+ $query->the_post();
216
+ set_query_var( 'tpg_post_count', $pCount );
217
+ set_query_var( 'tpg_total_posts', $query->post_count );
218
+ $this->tpg_template( $post_data );
219
+ $pCount ++;
220
+ //rtTPGElementorHelper::tpg_template($data, $this->tpg_dir);
221
+ }
222
+ } else {
223
+ if ( $data['no_posts_found_text'] ) {
224
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
225
+ } else {
226
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
227
+ }
228
+ }
229
+ wp_reset_postdata();
230
+ ?>
231
+ </div>
232
+
233
+ <?php echo $this->get_pagination_markup( $query, $data ); ?>
234
+
235
+ </div>
236
+ <?php
237
+ if ( 'masonry' === $data[ $_prefix . '_layout_style' ] && \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
238
+ ?>
239
+ <script>jQuery('.rt-row.rt-content-loader.tpg-masonry').isotope();</script>
240
+ <?php
241
+ }
242
+
243
+ do_action('tpg_elementor_script');
244
+ }
245
+
246
+ }
app/Widgets/elementor/widgets/list-layout-archive.php ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGListLayoutArchive extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'list';
28
+ $this->tpg_name = esc_html__( 'TPG - List Layout Archive', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-list-layout-archive';
30
+ $this->tpg_icon = 'eicon-post-list tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ $this->tpg_category = $this->tpg_archive_category;
32
+ }
33
+
34
+ protected function register_controls() {
35
+ /**
36
+ * Content Tabs
37
+ * ===========
38
+ */
39
+
40
+ //Layout
41
+ rtTPGElementorHelper::list_layouts( $this, 'archive' );
42
+
43
+ //Query
44
+ rtTPGElementorHelper::query_builder( $this );
45
+
46
+ //Filter Settings
47
+ //rtTPGElementorHelper::filter_settings( $this );
48
+
49
+ //Pagination Settings
50
+ rtTPGElementorHelper::pagination_settings( $this, 'archive' );
51
+
52
+ //Links
53
+ rtTPGElementorHelper::links( $this );
54
+
55
+ /**
56
+ * Settings Tabs
57
+ * =============
58
+ */
59
+
60
+ //Field Selection
61
+ rtTPGElementorHelper::field_selection( $this );
62
+
63
+ //Section Title Settings
64
+ rtTPGElementorHelper::section_title_settings( $this, 'archive' );
65
+
66
+ //Title Settings
67
+ rtTPGElementorHelper::post_title_settings( $this );
68
+
69
+ //Thumbnail Settings
70
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
71
+
72
+ //Excerpt Settings
73
+ rtTPGElementorHelper::post_excerpt_settings( $this );
74
+
75
+ //Meta Settings
76
+ rtTPGElementorHelper::post_meta_settings( $this );
77
+
78
+ //Advanced Custom Field ACF Settings
79
+ rtTPGElementorHelper::tpg_acf_settings( $this );
80
+
81
+ //Readmore Settings
82
+ rtTPGElementorHelper::post_readmore_settings( $this );
83
+
84
+
85
+ /**
86
+ * Style Tabs
87
+ * ===========
88
+ */
89
+
90
+ //Section Title Style
91
+ rtTPGElementorHelper::sectionTitle( $this, 'archive' );
92
+
93
+ // Title Style
94
+ rtTPGElementorHelper::titleStyle( $this );
95
+
96
+ //Thumbnail Style
97
+ rtTPGElementorHelper::thumbnailStyle( $this );
98
+
99
+ // Content Style
100
+ rtTPGElementorHelper::contentStyle( $this );
101
+
102
+ // Meta Info Style
103
+ rtTPGElementorHelper::metaInfoStyle( $this );
104
+
105
+ //Social Share Style
106
+ rtTPGElementorHelper::socialShareStyle( $this );
107
+
108
+ //ACF Style
109
+ rtTPGElementorHelper::tpg_acf_style( $this );
110
+
111
+ //ReadMore Style
112
+ rtTPGElementorHelper::readmoreStyle( $this );
113
+
114
+ //Link Style
115
+ rtTPGElementorHelper::linkStyle( $this );
116
+
117
+ //Pagination - LoadMore Style
118
+ rtTPGElementorHelper::paginationStyle( $this );
119
+
120
+ //Box Settings
121
+ rtTPGElementorHelper::articlBoxSettings( $this );
122
+
123
+ //Promotions
124
+ rtTPGElementorHelper::promotions( $this );
125
+ }
126
+
127
+
128
+ protected function render() {
129
+ $data = $this->get_settings();
130
+ $_prefix = $this->prefix;
131
+ $data['post_type'] = 'post';
132
+
133
+ if ( ! rtTPG()->hasPro() && ! in_array( $data[ $_prefix . '_layout' ], [ 'list-layout1', 'list-layout2', 'list-layout2-2' ] ) ) {
134
+ $data[ $_prefix . '_layout' ] = 'list-layout1';
135
+ }
136
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
137
+ wp_enqueue_style( 'rt-scrollbar' );
138
+ wp_enqueue_style( 'rt-magnific-popup' );
139
+ wp_enqueue_script( 'rt-scrollbar' );
140
+ wp_enqueue_script( 'rt-magnific-popup' );
141
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ] );
142
+ }
143
+
144
+ if ( 'masonry' === $data['list_layout_style'] ) {
145
+ wp_enqueue_script( 'imagesloaded' );
146
+ wp_enqueue_script( 'isotope' );
147
+ wp_enqueue_script( 'jquery-masonry' );
148
+ wp_enqueue_script( 'rt-image-load-js' );
149
+ }
150
+
151
+ //Query
152
+ $query_args = rtTPGElementorQuery::post_query_builder( $data, $_prefix );
153
+ $query = new WP_Query( $query_args );
154
+ $rand = mt_rand();
155
+ $layoutID = "rt-tpg-container-" . $rand;
156
+ $posts_per_page = $data['post_limit'];
157
+
158
+ /**
159
+ * TODO: Get Post Data for render post
160
+ */
161
+
162
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
163
+
164
+ /**
165
+ * Post type render
166
+ */
167
+ $post_types = Fns::get_post_types();
168
+ foreach ( $post_types as $post_type => $label ) {
169
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
170
+ if ( empty( $_taxonomies ) ) {
171
+ continue;
172
+ }
173
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
174
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
175
+ }
176
+
177
+ $template_path = $this->tpg_template_path( $post_data );
178
+ $_layout = $data[ $_prefix . '_layout' ];
179
+ $_layout_style = $data[ $_prefix . '_layout_style' ];
180
+ ?>
181
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper <?php echo esc_attr( $_layout . '-main' ); ?>"
182
+ data-sc-id="elementor"
183
+ id="<?php echo esc_attr( $layoutID ); ?>"
184
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
185
+ data-grid-style="<?php echo esc_attr( $data[ $_prefix . '_layout_style' ] ); ?>"
186
+ data-el-settings='<?php echo htmlspecialchars( wp_json_encode( $post_data ) ); ?>'
187
+ data-el-query='<?php echo htmlspecialchars( wp_json_encode( $query_args ) ); ?>'
188
+ data-el-path='<?php echo esc_attr( $template_path ); ?>'
189
+ >
190
+ <?php
191
+ $wrapper_class = [];
192
+ $wrapper_class[] = str_replace( '-2', null, $_layout );
193
+ $wrapper_class[] = 'tpg-even list-behaviour';
194
+ $wrapper_class[] = $_prefix . '-layout-wrapper';
195
+ if ( 'masonry' === $_layout_style && ! in_array( $_layout, [ 'list-layout2', 'list-layout3' ] ) ) {
196
+ $wrapper_class[] = 'tpg-masonry';
197
+ }
198
+
199
+ //section title settings
200
+
201
+
202
+ echo "<div class='tpg-header-wrapper'>";
203
+ $this->get_section_title( $data );
204
+ echo "</div>";
205
+ ?>
206
+
207
+ <div data-title="Loading ..." class="rt-row rt-content-loader <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
208
+ <?php
209
+ if ( $query->have_posts() ) {
210
+ $pCount = 1;
211
+ while ( $query->have_posts() ) {
212
+ $query->the_post();
213
+ set_query_var( 'tpg_post_count', $pCount );
214
+ set_query_var( 'tpg_total_posts', $query->post_count );
215
+ $this->tpg_template( $post_data );
216
+ $pCount ++;
217
+ }
218
+ } else {
219
+ if ( $data['no_posts_found_text'] ) {
220
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
221
+ } else {
222
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
223
+ }
224
+ }
225
+ wp_reset_postdata();
226
+ ?>
227
+ </div>
228
+
229
+ <?php echo $this->get_pagination_markup( $query, $data ); ?>
230
+
231
+ </div>
232
+ <?php
233
+ if ( 'masonry' === $data[ $_prefix . '_layout_style' ] && \Elementor\Plugin::$instance->editor->is_edit_mode() ) { ?>
234
+ <script>jQuery('.rt-row.rt-content-loader.tpg-masonry').isotope();</script>
235
+ <?php
236
+ }
237
+ do_action('tpg_elementor_script');
238
+ }
239
+
240
+ }
app/Widgets/elementor/widgets/list-layout.php ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGListLayout extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'list';
28
+ $this->tpg_name = esc_html__( 'TPG - List Layout', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-list-layout';
30
+ $this->tpg_icon = 'eicon-post-list tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ }
32
+
33
+ protected function register_controls() {
34
+ /**
35
+ * Content Tabs
36
+ * ===========
37
+ */
38
+
39
+ //Layout
40
+ rtTPGElementorHelper::list_layouts( $this );
41
+
42
+ //Query
43
+ rtTPGElementorHelper::query( $this );
44
+
45
+
46
+ //Filter Settings
47
+ rtTPGElementorHelper::filter_settings( $this );
48
+
49
+ //Pagination Settings
50
+ rtTPGElementorHelper::pagination_settings( $this );
51
+
52
+ //Links
53
+ rtTPGElementorHelper::links( $this );
54
+
55
+ /**
56
+ * Settings Tabs
57
+ * =============
58
+ */
59
+
60
+ //Field Selection
61
+ rtTPGElementorHelper::field_selection( $this );
62
+
63
+ //Section Title Settings
64
+ rtTPGElementorHelper::section_title_settings( $this );
65
+
66
+ //Title Settings
67
+ rtTPGElementorHelper::post_title_settings( $this );
68
+
69
+ //Thumbnail Settings
70
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
71
+
72
+ //Excerpt Settings
73
+ rtTPGElementorHelper::post_excerpt_settings( $this );
74
+
75
+ //Meta Settings
76
+ rtTPGElementorHelper::post_meta_settings( $this );
77
+
78
+ //Advanced Custom Field ACF Settings
79
+ rtTPGElementorHelper::tpg_acf_settings( $this );
80
+
81
+ //Readmore Settings
82
+ rtTPGElementorHelper::post_readmore_settings( $this );
83
+
84
+
85
+ /**
86
+ * Style Tabs
87
+ * ===========
88
+ */
89
+
90
+ //Section Title Style
91
+ rtTPGElementorHelper::sectionTitle( $this );
92
+
93
+ // Title Style
94
+ rtTPGElementorHelper::titleStyle( $this );
95
+
96
+ //Thumbnail Style
97
+ rtTPGElementorHelper::thumbnailStyle( $this );
98
+
99
+ // Content Style
100
+ rtTPGElementorHelper::contentStyle( $this );
101
+
102
+ // Meta Info Style
103
+ rtTPGElementorHelper::metaInfoStyle( $this );
104
+
105
+ //Box Style
106
+ rtTPGElementorHelper::socialShareStyle( $this );
107
+
108
+ //ACF Style
109
+ rtTPGElementorHelper::tpg_acf_style( $this );
110
+
111
+ //Read More Style
112
+ rtTPGElementorHelper::readmoreStyle( $this );
113
+
114
+ //Link Style
115
+ rtTPGElementorHelper::linkStyle( $this );
116
+
117
+ //Box Style
118
+ rtTPGElementorHelper::frontEndFilter( $this );
119
+
120
+ //Pagination - Loadmore Style
121
+ rtTPGElementorHelper::paginationStyle( $this );
122
+
123
+ //Box Settings
124
+ rtTPGElementorHelper::articlBoxSettings( $this );
125
+
126
+ //Promotions
127
+ rtTPGElementorHelper::promotions( $this );
128
+ }
129
+
130
+
131
+ protected function render() {
132
+ $data = $this->get_settings();
133
+ $_prefix = $this->prefix;
134
+ if ( ! rtTPG()->hasPro() && ! in_array( $data[ $_prefix . '_layout' ], [ 'list-layout1', 'list-layout2', 'list-layout2-2' ] ) ) {
135
+ $data[ $_prefix . '_layout' ] = 'list-layout1';
136
+ }
137
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
138
+ wp_enqueue_style( 'rt-scrollbar' );
139
+ wp_enqueue_style( 'rt-magnific-popup' );
140
+ wp_enqueue_script( 'rt-scrollbar' );
141
+ wp_enqueue_script( 'rt-magnific-popup' );
142
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ] );
143
+ }
144
+
145
+ if ( 'masonry' === $data['list_layout_style'] ) {
146
+ wp_enqueue_script( 'imagesloaded' );
147
+ wp_enqueue_script( 'isotope' );
148
+ wp_enqueue_script( 'jquery-masonry' );
149
+ wp_enqueue_script( 'rt-image-load-js' );
150
+ }
151
+
152
+ $query_args = rtTPGElementorQuery::post_query( $data, $_prefix );
153
+ $query = new WP_Query( $query_args );
154
+
155
+ $rand = mt_rand();
156
+ $layoutID = "rt-tpg-container-" . $rand;
157
+ $posts_per_page = $data['display_per_page'] ? $data['display_per_page'] : $data['post_limit'];
158
+
159
+ /**
160
+ * TODO: Get Post Data for render post
161
+ */
162
+
163
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
164
+
165
+ /**
166
+ * Post type render
167
+ */
168
+ $post_types = Fns::get_post_types();
169
+ foreach ( $post_types as $post_type => $label ) {
170
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
171
+ if ( empty( $_taxonomies ) ) {
172
+ continue;
173
+ }
174
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
175
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
176
+ }
177
+
178
+ $template_path = $this->tpg_template_path( $post_data );
179
+ $_layout = $data[ $_prefix . '_layout' ];
180
+ $_layout_style = $data[ $_prefix . '_layout_style' ];
181
+ ?>
182
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper <?php echo esc_attr( $_layout . '-main' ); ?>"
183
+ data-sc-id="elementor"
184
+ id="<?php echo esc_attr( $layoutID ); ?>"
185
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
186
+ data-grid-style="<?php echo esc_attr( $data[ $_prefix . '_layout_style' ] ); ?>"
187
+ data-el-settings='<?php echo Fns::is_filter_enable( $data ) ? htmlspecialchars( wp_json_encode( $post_data ) ) : ''; ?>'
188
+ data-el-query='<?php echo Fns::is_filter_enable( $data ) ? htmlspecialchars( wp_json_encode( $query_args ) ) : ''; ?>'
189
+ data-el-path='<?php echo Fns::is_filter_enable( $data ) ? esc_attr( $template_path ) : ''; ?>'
190
+ >
191
+ <?php
192
+ $wrapper_class = [];
193
+ $wrapper_class[] = str_replace( '-2', null, $_layout );
194
+ $wrapper_class[] = 'tpg-even list-behaviour';
195
+ $wrapper_class[] = $_prefix . '-layout-wrapper';
196
+ if ( 'masonry' === $_layout_style && ! in_array( $_layout, [ 'list-layout2', 'list-layout3' ] ) ) {
197
+ $wrapper_class[] = 'tpg-masonry';
198
+ }
199
+
200
+ //section title settings
201
+ $is_carousel = '';
202
+ if ( rtTPG()->hasPro() && 'carousel' == $data['filter_btn_style'] && 'button' == $data['filter_type'] ) {
203
+ $is_carousel = 'carousel';
204
+ }
205
+
206
+ echo "<div class='tpg-header-wrapper {$is_carousel}'>";
207
+ $this->get_section_title( $data );
208
+ echo $this->get_frontend_filter_markup( $data );
209
+ echo "</div>";
210
+ ?>
211
+
212
+ <div data-title="Loading ..." class="rt-row rt-content-loader <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
213
+ <?php
214
+ if ( $query->have_posts() ) {
215
+ $pCount = 1;
216
+ while ( $query->have_posts() ) {
217
+ $query->the_post();
218
+ set_query_var( 'tpg_post_count', $pCount );
219
+ set_query_var( 'tpg_total_posts', $query->post_count );
220
+ $this->tpg_template( $post_data );
221
+ $pCount ++;
222
+ }
223
+ } else {
224
+ if ( $data['no_posts_found_text'] ) {
225
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
226
+ } else {
227
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
228
+ }
229
+ }
230
+ wp_reset_postdata();
231
+ ?>
232
+ </div>
233
+
234
+ <?php echo $this->get_pagination_markup( $query, $data ); ?>
235
+
236
+ </div>
237
+ <?php
238
+ if ( 'masonry' === $data[ $_prefix . '_layout_style' ] && \Elementor\Plugin::$instance->editor->is_edit_mode() ) { ?>
239
+ <script>jQuery('.rt-row.rt-content-loader.tpg-masonry').isotope();</script>
240
+ <?php
241
+ }
242
+
243
+ do_action('tpg_elementor_script');
244
+ }
245
+
246
+ }
app/Widgets/elementor/widgets/related-post.php ADDED
@@ -0,0 +1,327 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGRelatedPost extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'slider';
28
+ $this->tpg_name = esc_html__( 'TPG - Related Post', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-related-post';
30
+ $this->tpg_icon = 'eicon-posts-grid tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ $this->tpg_category = $this->tpg_archive_category;
32
+ }
33
+
34
+ protected function register_controls() {
35
+ /**
36
+ * Content Tabs
37
+ * =============
38
+ */
39
+
40
+ //Layout
41
+ rtTPGElementorHelper::grid_layouts( $this, 'single' );
42
+
43
+ //Query
44
+ rtTPGElementorHelper::query_builder( $this, 'single' );
45
+
46
+ //Links
47
+ rtTPGElementorHelper::links( $this );
48
+
49
+ /**
50
+ * Settings Tabs
51
+ * =============
52
+ */
53
+
54
+ //Field Selection
55
+ rtTPGElementorHelper::field_selection( $this );
56
+
57
+ //Section Title Settings
58
+ rtTPGElementorHelper::section_title_settings( $this, 'single' );
59
+
60
+ //Title Settings
61
+ rtTPGElementorHelper::post_title_settings( $this );
62
+
63
+ //Thumbnail Settings
64
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
65
+
66
+ //Excerpt Settings
67
+ rtTPGElementorHelper::post_excerpt_settings( $this );
68
+
69
+ //Meta Settings
70
+ rtTPGElementorHelper::post_meta_settings( $this );
71
+
72
+ //Advanced Custom Field ACF Settings
73
+ rtTPGElementorHelper::tpg_acf_settings( $this );
74
+
75
+ //Readmore Settings
76
+ rtTPGElementorHelper::post_readmore_settings( $this );
77
+
78
+ //Slider Settings
79
+ rtTPGElementorHelper::slider_settings( $this, 'single' );
80
+
81
+
82
+ /**
83
+ * Style Tabs
84
+ * =============
85
+ */
86
+
87
+ //Section Title
88
+ rtTPGElementorHelper::sectionTitle( $this );
89
+
90
+ // Title Style
91
+ rtTPGElementorHelper::titleStyle( $this );
92
+
93
+ //Thumbnail Style
94
+ rtTPGElementorHelper::thumbnailStyle( $this );
95
+
96
+ // Content Style
97
+ rtTPGElementorHelper::contentStyle( $this );
98
+
99
+ // Meta Info Style
100
+ rtTPGElementorHelper::metaInfoStyle( $this );
101
+
102
+ //ACF Style
103
+ rtTPGElementorHelper::tpg_acf_style( $this );
104
+
105
+ //Social Style
106
+ rtTPGElementorHelper::socialShareStyle( $this );
107
+
108
+ //Read more style
109
+ rtTPGElementorHelper::readmoreStyle( $this );
110
+
111
+ //Slider Style
112
+ rtTPGElementorHelper::slider_style( $this, 'single' );
113
+ rtTPGElementorHelper::slider_thumb_style( $this );
114
+
115
+ //Link Style
116
+ rtTPGElementorHelper::linkStyle( $this );
117
+
118
+ //Box Settings
119
+ rtTPGElementorHelper::articlBoxSettings( $this );
120
+
121
+ //Promotions
122
+ rtTPGElementorHelper::promotions( $this );
123
+ }
124
+
125
+ protected function render() {
126
+ $data = $this->get_settings();
127
+ $data['post_type'] = 'post';
128
+ $data['last_post_id'] = $this->last_post_id;
129
+ $_prefix = $this->prefix;
130
+ $enable_related_slider = $data['enable_related_slider'];
131
+ if ( ! rtTPG()->hasPro() ) { ?>
132
+ <h3 style="text-align: center"><?php echo esc_html__( 'Please upgrade to pro for slider layout!', 'the-post-grid' ) ?></h3>
133
+ <?php
134
+ return;
135
+ }
136
+
137
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
138
+ wp_enqueue_style( 'rt-scrollbar' );
139
+ wp_enqueue_style( 'rt-magnific-popup' );
140
+ wp_enqueue_script( 'rt-scrollbar' );
141
+ wp_enqueue_script( 'rt-magnific-popup' );
142
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ], 1 );
143
+ }
144
+
145
+ //Query
146
+ $query_args = rtTPGElementorQuery::post_query_builder( $data, $_prefix, 'single' );
147
+ $query = new WP_Query( $query_args );
148
+ $rand = mt_rand();
149
+ $layoutID = "rt-tpg-container-" . $rand;
150
+ $posts_per_page = $data['post_limit'];
151
+
152
+ /**
153
+ * TODO: Get Post Data for render post
154
+ */
155
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
156
+ $_layout = $data[ $_prefix . '_layout' ];
157
+
158
+ $post_data['lazy_load'] = $data['lazyLoad'];
159
+
160
+ /**
161
+ * Post type render
162
+ */
163
+
164
+ $post_types = Fns::get_post_types();
165
+ foreach ( $post_types as $post_type => $label ) {
166
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
167
+ if ( empty( $_taxonomies ) ) {
168
+ continue;
169
+ }
170
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
171
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
172
+ }
173
+
174
+ $post_data['enable_2_rows'] = false;
175
+
176
+
177
+ $default_gird_column_desktop = $enable_related_slider ? '3' : '4';
178
+ $default_gird_column_tab = $enable_related_slider ? '2' : '6';
179
+ $default_gird_column_mobile = $enable_related_slider ? '1' : '12';
180
+
181
+
182
+ $gird_column_desktop = '0' !== $post_data['gird_column'] ? $post_data['gird_column'] : $default_gird_column_desktop;
183
+ $gird_column_tab = '0' !== $post_data['gird_column_tablet'] ? $post_data['gird_column_tablet'] : $default_gird_column_tab;
184
+ $gird_column_mobile = '0' !== $post_data['gird_column_mobile'] ? $post_data['gird_column_mobile'] : $default_gird_column_mobile;
185
+
186
+ $item_column = "rt-col-md-{$gird_column_desktop} rt-col-sm-{$gird_column_tab} rt-col-xs-{$gird_column_mobile}";
187
+
188
+ $slider_main_class = $enable_related_slider ? "slider-layout-main loading" : 'slider-is-disable';
189
+
190
+ if ( $query->have_posts() ) : ?>
191
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper <?php echo esc_attr( $_layout . '-main' . ' ' . $slider_main_class ); ?>"
192
+ id="<?php echo esc_attr( $layoutID ); ?>"
193
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
194
+ data-grid-style=""
195
+ data-desktop-col="<?php echo esc_attr( $gird_column_desktop ); ?>"
196
+ data-tab-col="<?php echo esc_attr( $gird_column_tab ); ?>"
197
+ data-mobile-col="<?php echo esc_attr( $gird_column_mobile ); ?>"
198
+ data-sc-id="elementor"
199
+ data-el-query=''
200
+ >
201
+ <?php
202
+
203
+ $wrapper_class = [];
204
+ $wrapper_class[] = 'rt-content-loader grid-behaviour';
205
+
206
+ if ( $_layout == 'slider-layout1' ) {
207
+ $wrapper_class[] = 'grid-layout1 ';
208
+ } elseif ( $_layout == 'slider-layout2' ) {
209
+ $wrapper_class[] = 'grid-layout3';
210
+ } elseif ( $_layout == 'slider-layout3' ) {
211
+ $wrapper_class[] = 'grid-layout4';
212
+ } elseif ( $_layout == 'slider-layout4' ) {
213
+ $wrapper_class[] = 'grid-layout7';
214
+ } elseif ( $_layout == 'slider-layout5' ) {
215
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout1 grid_hover_layout_wrapper';
216
+ } elseif ( $_layout == 'slider-layout6' ) {
217
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout3 grid_hover_layout_wrapper';
218
+ } elseif ( $_layout == 'slider-layout7' ) {
219
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover_layout_wrapper';
220
+ } elseif ( $_layout == 'slider-layout8' ) {
221
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout10 grid_hover_layout_wrapper';
222
+ } elseif ( $_layout == 'slider-layout9' ) {
223
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout11 grid_hover_layout_wrapper';
224
+ } elseif ( $_layout == 'slider-layout10' ) {
225
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout7 grid_hover_layout_wrapper';
226
+ } elseif ( $_layout == 'slider-layout11' ) {
227
+ $wrapper_class[] = ' grid_hover-layout5 slider-layout';
228
+ } elseif ( $_layout == 'slider-layout12' ) {
229
+ $wrapper_class[] = ' grid_hover-layout5 slider-layout';
230
+ }
231
+
232
+ $wrapper_class[] = $_prefix . '_layout_wrapper';
233
+
234
+ //section title settings
235
+ $this->get_section_title( $data );
236
+
237
+ $slider_data = [
238
+ "speed" => $data['speed'],
239
+ "autoPlayTimeOut" => $data['autoplaySpeed'],
240
+ "autoPlay" => $data['autoplay'] == "yes" ? true : false,
241
+ "stopOnHover" => $data['stopOnHover'] == "yes" ? true : false,
242
+ "nav" => $data['arrows'] == "yes" ? true : false,
243
+ "dots" => $data['dots'] == "yes" ? true : false,
244
+ "loop" => $data['infinite'] == "yes" ? true : false,
245
+ "lazyLoad" => $data['lazyLoad'] == "yes" ? true : false,
246
+ "autoHeight" => $data['autoHeight'] == "yes" ? true : false,
247
+ ];
248
+
249
+ if ( $data['enable_2_rows'] == 'yes' ) {
250
+ $slider_data['autoHeight'] = false;
251
+ }
252
+
253
+ $col_start_class = $col_end_class = null;
254
+
255
+ ?>
256
+
257
+ <?php if ( $enable_related_slider ) { ?>
258
+ <div class="slider-main-wrapper <?php echo esc_attr( $_layout ) ?>">
259
+
260
+ <div class="rt-swiper-holder swiper"
261
+ data-rtowl-options='<?php echo wp_json_encode( $slider_data ) ?>'
262
+ dir="<?php echo esc_attr( $data['slider_direction'] ); ?>">
263
+ <div class="swiper-wrapper <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
264
+ <?php } else { ?>
265
+ <div class="rt-row rt-content-loader <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
266
+ <?php
267
+ } ?>
268
+
269
+ <?php
270
+ $pCount = 1;
271
+ while ( $query->have_posts() ) {
272
+ $query->the_post();
273
+ set_query_var( 'tpg_post_count', $pCount );
274
+ set_query_var( 'tpg_total_posts', $query->post_count );
275
+ ?>
276
+ <?php if ( !$enable_related_slider ) { ?>
277
+ <div class='<?php echo esc_attr( $item_column ) ?>'>
278
+ <?php } ?>
279
+ <?php
280
+ $this->tpg_template( $post_data );
281
+ ?>
282
+ <?php if ( !$enable_related_slider ) { ?>
283
+ </div>
284
+ <?php } ?>
285
+ <?php
286
+
287
+ if ( $_layout == 'slider-layout10' && $pCount == 5 ) {
288
+ $pCount = 0;
289
+ }
290
+ $pCount ++;
291
+ }
292
+ wp_reset_postdata();
293
+ ?>
294
+
295
+
296
+ <?php if ( $enable_related_slider ) { ?>
297
+ </div>
298
+
299
+ </div>
300
+
301
+
302
+ <!--swiper-pagination-horizontal-->
303
+ <?php if ( $data['dots'] == "yes" ) : ?>
304
+ <div class="swiper-pagination"></div>
305
+ <?php endif; ?>
306
+
307
+ <?php if ( $data['arrows'] == "yes" ) : ?>
308
+ <div class="swiper-navigation">
309
+ <div class="slider-btn swiper-button-prev"></div>
310
+ <div class="slider-btn swiper-button-next"></div>
311
+ </div>
312
+ <?php endif; ?>
313
+
314
+
315
+ <?php } ?>
316
+ </div>
317
+
318
+
319
+ </div>
320
+ <?php
321
+ endif;
322
+
323
+ do_action('tpg_elementor_script');
324
+
325
+ }
326
+
327
+ }
app/Widgets/elementor/widgets/slider-layout-archive.php ADDED
@@ -0,0 +1,367 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGSliderLayoutArchive extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'slider';
28
+ $this->tpg_name = esc_html__( 'TPG - Slider Layout Archive', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-slider-layout-archive';
30
+ $this->tpg_icon = 'eicon-post-slider tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ $this->tpg_category = $this->tpg_archive_category;
32
+ }
33
+
34
+ protected function register_controls() {
35
+ /**
36
+ * Content Tabs
37
+ * =============
38
+ */
39
+
40
+ //Layout
41
+ rtTPGElementorHelper::grid_layouts( $this, 'archive' );
42
+
43
+ //Query
44
+ rtTPGElementorHelper::query_builder( $this );
45
+
46
+ //Links
47
+ rtTPGElementorHelper::links( $this );
48
+
49
+ /**
50
+ * Settings Tabs
51
+ * =============
52
+ */
53
+
54
+ //Field Selection
55
+ rtTPGElementorHelper::field_selection( $this );
56
+
57
+ //Section Title Settings
58
+ rtTPGElementorHelper::section_title_settings( $this, 'archive' );
59
+
60
+ //Title Settings
61
+ rtTPGElementorHelper::post_title_settings( $this );
62
+
63
+ //Thumbnail Settings
64
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
65
+
66
+ //Excerpt Settings
67
+ rtTPGElementorHelper::post_excerpt_settings( $this );
68
+
69
+ //Meta Settings
70
+ rtTPGElementorHelper::post_meta_settings( $this );
71
+
72
+ //Advanced Custom Field ACF Settings
73
+ rtTPGElementorHelper::tpg_acf_settings( $this );
74
+
75
+ //Readmore Settings
76
+ rtTPGElementorHelper::post_readmore_settings( $this );
77
+
78
+ //Slider Settings
79
+ rtTPGElementorHelper::slider_settings( $this );
80
+
81
+ /**
82
+ * Style Tabs
83
+ * =============
84
+ */
85
+
86
+ //Section Title
87
+ rtTPGElementorHelper::sectionTitle( $this, 'archive' );
88
+
89
+ // Title Style
90
+ rtTPGElementorHelper::titleStyle( $this );
91
+
92
+ //Thumbnail Style
93
+ rtTPGElementorHelper::thumbnailStyle( $this );
94
+
95
+ // Content Style
96
+ rtTPGElementorHelper::contentStyle( $this );
97
+
98
+ // Meta Info Style
99
+ rtTPGElementorHelper::metaInfoStyle( $this );
100
+
101
+ //Social Style
102
+ rtTPGElementorHelper::socialShareStyle( $this );
103
+
104
+ //ACF Style
105
+ rtTPGElementorHelper::tpg_acf_style( $this );
106
+
107
+ //Read more style
108
+ rtTPGElementorHelper::readmoreStyle( $this );
109
+
110
+ //Link Style
111
+ rtTPGElementorHelper::linkStyle( $this );
112
+
113
+ //Slider Style
114
+ rtTPGElementorHelper::slider_style( $this );
115
+ rtTPGElementorHelper::slider_thumb_style( $this );
116
+
117
+ //Box Settings
118
+ rtTPGElementorHelper::articlBoxSettings( $this );
119
+
120
+ //Promotions
121
+ rtTPGElementorHelper::promotions( $this );
122
+ }
123
+
124
+ protected function render() {
125
+ $data = $this->get_settings();
126
+ $_prefix = $this->prefix;
127
+ $data['post_type'] = 'post';
128
+
129
+ if ( ! rtTPG()->hasPro() ) { ?>
130
+ <h3 style="text-align: center"><?php echo esc_html__( 'Please upgrade to pro for slider layout!', 'the-post-grid' ) ?></h3>
131
+ <?php
132
+ return;
133
+ }
134
+
135
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
136
+ wp_enqueue_style( 'rt-scrollbar' );
137
+ wp_enqueue_style( 'rt-magnific-popup' );
138
+ wp_enqueue_script( 'rt-scrollbar' );
139
+ wp_enqueue_script( 'rt-magnific-popup' );
140
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ], 1 );
141
+ }
142
+
143
+
144
+ //Query
145
+ $query_args = rtTPGElementorQuery::post_query_builder( $data, $_prefix );
146
+ $query = new WP_Query( $query_args );
147
+ $rand = mt_rand();
148
+ $layoutID = "rt-tpg-container-" . $rand;
149
+ $posts_per_page = $data['post_limit'];
150
+
151
+ /**
152
+ * TODO: Get Post Data for render post
153
+ */
154
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
155
+ $_layout = $data[ $_prefix . '_layout' ];
156
+
157
+ $post_data['lazy_load'] = $data['lazyLoad'];
158
+
159
+ /**
160
+ * Post type render
161
+ */
162
+
163
+ $post_types = Fns::get_post_types();
164
+ foreach ( $post_types as $post_type => $label ) {
165
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
166
+ if ( empty( $_taxonomies ) ) {
167
+ continue;
168
+ }
169
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
170
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
171
+ }
172
+
173
+ $post_data['enable_2_rows'] = $data['enable_2_rows'];
174
+
175
+ $default_gird_column_desktop = '3';
176
+ $default_gird_column_tab = '2';
177
+ $default_gird_column_mobile = '1';
178
+
179
+ if ( $_layout == 'slider-layout13' ) {
180
+ $default_gird_column_desktop = '1';
181
+ $default_gird_column_tab = '1';
182
+ $default_gird_column_mobile = '1';
183
+ }
184
+
185
+ $gird_column_desktop = '0' !== $post_data['gird_column'] ? $post_data['gird_column'] : $default_gird_column_desktop;
186
+ $gird_column_tab = '0' !== $post_data['gird_column_tablet'] ? $post_data['gird_column_tablet'] : $default_gird_column_tab;
187
+ $gird_column_mobile = '0' !== $post_data['gird_column_mobile'] ? $post_data['gird_column_mobile'] : $default_gird_column_mobile;
188
+
189
+
190
+ if ( in_array( $_layout, [ 'slider-layout10', 'slider-layout11' ] ) ) {
191
+ $gird_column_desktop = $gird_column_tab = $gird_column_mobile = '1';
192
+ }
193
+
194
+ ?>
195
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper slider-layout-main loading <?php echo esc_attr( $_layout . '-main' ); ?>"
196
+ id="<?php echo esc_attr( $layoutID ); ?>"
197
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
198
+ data-grid-style=""
199
+ data-desktop-col="<?php echo esc_attr( $gird_column_desktop ); ?>"
200
+ data-tab-col="<?php echo esc_attr( $gird_column_tab ); ?>"
201
+ data-mobile-col="<?php echo esc_attr( $gird_column_mobile ); ?>"
202
+ data-sc-id="elementor"
203
+ data-el-query=''
204
+ >
205
+ <?php
206
+
207
+
208
+ $wrapper_class = [];
209
+ // $wrapper_class[] = $_layout;
210
+ $wrapper_class[] = 'rt-content-loader grid-behaviour';
211
+
212
+ if ( $_layout == 'slider-layout1' ) {
213
+ $wrapper_class[] = 'grid-layout1 ';
214
+ } elseif ( $_layout == 'slider-layout2' ) {
215
+ $wrapper_class[] = 'grid-layout3';
216
+ } elseif ( $_layout == 'slider-layout3' ) {
217
+ $wrapper_class[] = 'grid-layout4';
218
+ } elseif ( $_layout == 'slider-layout4' ) {
219
+ $wrapper_class[] = 'grid-layout7';
220
+ } elseif ( $_layout == 'slider-layout5' ) {
221
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout1 grid_hover_layout_wrapper';
222
+ } elseif ( $_layout == 'slider-layout6' ) {
223
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout3 grid_hover_layout_wrapper';
224
+ } elseif ( $_layout == 'slider-layout7' ) {
225
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover_layout_wrapper';
226
+ } elseif ( $_layout == 'slider-layout8' ) {
227
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout10 grid_hover_layout_wrapper';
228
+ } elseif ( $_layout == 'slider-layout9' ) {
229
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout11 grid_hover_layout_wrapper';
230
+ } elseif ( $_layout == 'slider-layout10' ) {
231
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout7 grid_hover_layout_wrapper';
232
+ } elseif ( $_layout == 'slider-layout11' ) {
233
+ $wrapper_class[] = ' grid_hover-layout5 slider-layout';
234
+ } elseif ( $_layout == 'slider-layout12' ) {
235
+ $wrapper_class[] = ' grid_hover-layout5 slider-layout';
236
+ }
237
+
238
+ $wrapper_class[] = $_prefix . '_layout_wrapper';
239
+
240
+ //section title settings
241
+ $this->get_section_title( $data );
242
+
243
+ //$data['carousel_overflow']
244
+ //$data['slider_gap']
245
+
246
+ $slider_data = [
247
+ "speed" => $data['speed'],
248
+ "autoPlayTimeOut" => $data['autoplaySpeed'],
249
+ "autoPlay" => $data['autoplay'] == "yes" ? true : false,
250
+ "stopOnHover" => $data['stopOnHover'] == "yes" ? true : false,
251
+ "nav" => $data['arrows'] == "yes" ? true : false,
252
+ "dots" => $data['dots'] == "yes" ? true : false,
253
+ "loop" => $data['infinite'] == "yes" ? true : false,
254
+ "lazyLoad" => $data['lazyLoad'] == "yes" ? true : false,
255
+ "autoHeight" => $data['autoHeight'] == "yes" ? true : false,
256
+ ];
257
+
258
+ if ( $data['enable_2_rows'] == 'yes' ) {
259
+ $slider_data['autoHeight'] = false;
260
+ }
261
+ ?>
262
+
263
+ <div class="slider-main-wrapper <?php echo esc_attr( $_layout ) ?>">
264
+ <div class="rt-swiper-holder swiper"
265
+ data-rtowl-options='<?php echo wp_json_encode( $slider_data ) ?>'
266
+ dir="<?php echo esc_attr( $data['slider_direction'] ); ?>">
267
+ <div class="swiper-wrapper <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
268
+ <?php
269
+ if ( $query->have_posts() ) {
270
+ $pCount = 1;
271
+ while ( $query->have_posts() ) {
272
+ $query->the_post();
273
+ set_query_var( 'tpg_post_count', $pCount );
274
+ set_query_var( 'tpg_total_posts', $query->post_count );
275
+ $this->tpg_template( $post_data );
276
+
277
+ if ( $_layout == 'slider-layout10' && $pCount == 5 ) {
278
+ $pCount = 0;
279
+ }
280
+ $pCount ++;
281
+ }
282
+ } else {
283
+ if ( $data['no_posts_found_text'] ) {
284
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
285
+ } else {
286
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
287
+ }
288
+ }
289
+ wp_reset_postdata();
290
+ ?>
291
+ </div>
292
+
293
+ </div>
294
+
295
+
296
+ <?php if ( ! in_array( $_layout, [ 'slider-layout11', 'slider-layout12' ] ) ) : ?>
297
+ <!--swiper-pagination-horizontal-->
298
+ <?php if ( $data['dots'] == "yes" ) : ?>
299
+ <div class="swiper-pagination"></div>
300
+ <?php endif; ?>
301
+
302
+ <?php if ( $data['arrows'] == "yes" ) : ?>
303
+ <div class="swiper-navigation">
304
+ <div class="slider-btn swiper-button-prev"></div>
305
+ <div class="slider-btn swiper-button-next"></div>
306
+ </div>
307
+ <?php endif; ?>
308
+ <?php endif; ?>
309
+
310
+ <?php if ( in_array( $_layout, [ 'slider-layout11', 'slider-layout12' ] ) ) : ?>
311
+ <div class="slider-thumb-main-wrapper">
312
+ <div class="swiper-thumb-wrapper gallery-thumbs swiper">
313
+ <div class="swiper-wrapper">
314
+ <?php
315
+ if ( $query->have_posts() ) {
316
+ $pCount = 1;
317
+ while ( $query->have_posts() ) {
318
+ $query->the_post();
319
+ set_query_var( 'tpg_post_count', $pCount );
320
+ set_query_var( 'tpg_total_posts', $query->post_count );
321
+ // $this->tpg_template( $post_data );
322
+ ?>
323
+ <div class="swiper-slide">
324
+ <div class="post-thumbnail-wrap">
325
+ <div class="p-thumbnail">
326
+ <?php echo get_the_post_thumbnail( get_the_ID(), 'thumbnail' ); ?>
327
+ </div>
328
+ <div class="p-content">
329
+ <div class="post-taxonomy">
330
+ <?php
331
+ $_cat_id = $data['post_type'] . '_taxonomy';
332
+ echo get_the_term_list( get_the_ID(), $data[ $_cat_id ], null, '<span class="rt-separator">,</span>' );
333
+ ?>
334
+ </div>
335
+ <h3 class="thumb-title"><?php echo get_the_title() ?></h3>
336
+ <span class="thumb-date"><?php echo get_the_date() ?></span>
337
+ </div>
338
+ </div>
339
+ </div>
340
+ <?php
341
+ $pCount ++;
342
+ }
343
+ } else {
344
+ if ( $data['no_posts_found_text'] ) {
345
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
346
+ } else {
347
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
348
+ }
349
+ }
350
+ wp_reset_postdata();
351
+ ?>
352
+ </div>
353
+ <div class="swiper-thumb-pagination"></div>
354
+ </div>
355
+ </div>
356
+ <?php endif; ?>
357
+
358
+
359
+ </div>
360
+
361
+
362
+ </div>
363
+ <?php
364
+ do_action('tpg_elementor_script');
365
+ }
366
+
367
+ }
app/Widgets/elementor/widgets/slider-layout.php ADDED
@@ -0,0 +1,368 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author RadiusTheme
4
+ * @since 1.0
5
+ * @version 1.2
6
+ */
7
+
8
+ use RT\ThePostGrid\Helpers\Fns;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class TPGSliderLayout extends Custom_Widget_Base {
15
+
16
+ /**
17
+ * GridLayout constructor.
18
+ *
19
+ * @param array $data
20
+ * @param null $args
21
+ *
22
+ * @throws \Exception
23
+ */
24
+
25
+ public function __construct( $data = [], $args = null ) {
26
+ parent::__construct( $data, $args );
27
+ $this->prefix = 'slider';
28
+ $this->tpg_name = esc_html__( 'TPG - Slider Layout', 'the-post-grid' );
29
+ $this->tpg_base = 'tpg-slider-layout';
30
+ $this->tpg_icon = 'eicon-post-slider tpg-grid-icon'; //.tpg-grid-icon class for just style
31
+ }
32
+
33
+ protected function register_controls() {
34
+ /**
35
+ * Content Tabs
36
+ * =============
37
+ */
38
+
39
+ //Layout
40
+ rtTPGElementorHelper::grid_layouts( $this );
41
+
42
+ //Query
43
+ rtTPGElementorHelper::query( $this );
44
+
45
+ //Links
46
+ rtTPGElementorHelper::links( $this );
47
+
48
+ /**
49
+ * Settings Tabs
50
+ * =============
51
+ */
52
+
53
+ //Field Selection
54
+ rtTPGElementorHelper::field_selection( $this );
55
+
56
+ //Section Title Settings
57
+ rtTPGElementorHelper::section_title_settings( $this );
58
+
59
+ //Title Settings
60
+ rtTPGElementorHelper::post_title_settings( $this );
61
+
62
+ //Thumbnail Settings
63
+ rtTPGElementorHelper::post_thumbnail_settings( $this );
64
+
65
+ //Excerpt Settings
66
+ rtTPGElementorHelper::post_excerpt_settings( $this );
67
+
68
+ //Meta Settings
69
+ rtTPGElementorHelper::post_meta_settings( $this );
70
+
71
+ //Advanced Custom Field ACF Settings
72
+ rtTPGElementorHelper::tpg_acf_settings( $this );
73
+
74
+ //Readmore Settings
75
+ rtTPGElementorHelper::post_readmore_settings( $this );
76
+
77
+ //Slider Settings
78
+ rtTPGElementorHelper::slider_settings( $this );
79
+
80
+
81
+
82
+ /**
83
+ * Style Tabs
84
+ * =============
85
+ */
86
+
87
+ //Section Title
88
+ rtTPGElementorHelper::sectionTitle( $this );
89
+
90
+ // Title Style
91
+ rtTPGElementorHelper::titleStyle( $this );
92
+
93
+ //Thumbnail Style
94
+ rtTPGElementorHelper::thumbnailStyle( $this );
95
+
96
+ // Content Style
97
+ rtTPGElementorHelper::contentStyle( $this );
98
+
99
+ // Meta Info Style
100
+ rtTPGElementorHelper::metaInfoStyle( $this );
101
+
102
+ //Social Style
103
+ rtTPGElementorHelper::socialShareStyle( $this );
104
+
105
+ //ACF Style
106
+ rtTPGElementorHelper::tpg_acf_style( $this );
107
+
108
+ //Read more style
109
+ rtTPGElementorHelper::readmoreStyle( $this );
110
+
111
+ //Slider Style
112
+ rtTPGElementorHelper::slider_style( $this );
113
+ rtTPGElementorHelper::slider_thumb_style( $this );
114
+
115
+ //Link Style
116
+ rtTPGElementorHelper::linkStyle( $this );
117
+
118
+ //Box Settings
119
+ rtTPGElementorHelper::articlBoxSettings( $this );
120
+
121
+ //Promotions
122
+ rtTPGElementorHelper::promotions( $this );
123
+ }
124
+
125
+ protected function render() {
126
+ $data = $this->get_settings();
127
+ $_prefix = $this->prefix;
128
+ if ( ! rtTPG()->hasPro() ) { ?>
129
+ <h3 style="text-align: center"><?php echo esc_html__( 'Please upgrade to pro for slider layout!', 'the-post-grid' ) ?></h3>
130
+ <?php
131
+ return;
132
+ }
133
+
134
+ if ( rtTPG()->hasPro() && ( 'popup' == $data['post_link_type'] || 'multi_popup' == $data['post_link_type'] ) ) {
135
+ wp_enqueue_style( 'rt-scrollbar' );
136
+ wp_enqueue_style( 'rt-magnific-popup' );
137
+ wp_enqueue_script( 'rt-scrollbar' );
138
+ wp_enqueue_script( 'rt-magnific-popup' );
139
+ add_action( 'wp_footer', [ $this, 'get_modal_markup' ], 1 );
140
+ }
141
+
142
+
143
+ //Query
144
+ $query_args = rtTPGElementorQuery::post_query( $data, $_prefix );
145
+ $query = new WP_Query( $query_args );
146
+ $rand = mt_rand();
147
+ $layoutID = "rt-tpg-container-" . $rand;
148
+ $posts_per_page = $data['post_limit'];
149
+
150
+ /**
151
+ * TODO: Get Post Data for render post
152
+ */
153
+ $post_data = $this->get_render_data_set( $data, $query->max_num_pages, $posts_per_page );
154
+ $_layout = $data[ $_prefix . '_layout' ];
155
+
156
+ $post_data['lazy_load'] = $data['lazyLoad'];
157
+
158
+ /**
159
+ * Post type render
160
+ */
161
+
162
+ $post_types = Fns::get_post_types();
163
+ foreach ( $post_types as $post_type => $label ) {
164
+ $_taxonomies = get_object_taxonomies( $post_type, 'object' );
165
+ if ( empty( $_taxonomies ) ) {
166
+ continue;
167
+ }
168
+ $post_data[ $data['post_type'] . '_taxonomy' ] = $data[ $data['post_type'] . '_taxonomy' ];
169
+ $post_data[ $data['post_type'] . '_tags' ] = $data[ $data['post_type'] . '_tags' ];
170
+ }
171
+
172
+
173
+ $post_data['enable_2_rows'] = $data['enable_2_rows'];
174
+
175
+
176
+ $default_gird_column_desktop = '3';
177
+ $default_gird_column_tab = '2';
178
+ $default_gird_column_mobile = '1';
179
+
180
+ if ( $_layout == 'slider-layout13' ) {
181
+ $default_gird_column_desktop = '1';
182
+ $default_gird_column_tab = '1';
183
+ $default_gird_column_mobile = '1';
184
+ }
185
+
186
+ $gird_column_desktop = '0' !== $post_data['gird_column'] ? $post_data['gird_column'] : $default_gird_column_desktop;
187
+ $gird_column_tab = '0' !== $post_data['gird_column_tablet'] ? $post_data['gird_column_tablet'] : $default_gird_column_tab;
188
+ $gird_column_mobile = '0' !== $post_data['gird_column_mobile'] ? $post_data['gird_column_mobile'] : $default_gird_column_mobile;
189
+
190
+
191
+ if ( in_array( $_layout, [ 'slider-layout10', 'slider-layout11' ] ) ) {
192
+ $gird_column_desktop = $gird_column_tab = $gird_column_mobile = '1';
193
+ }
194
+
195
+ ?>
196
+ <div class="rt-container-fluid rt-tpg-container tpg-el-main-wrapper slider-layout-main loading <?php echo esc_attr( $_layout . '-main' ); ?>"
197
+ id="<?php echo esc_attr( $layoutID ); ?>"
198
+ data-layout="<?php echo esc_attr( $data[ $_prefix . '_layout' ] ); ?>"
199
+ data-grid-style=""
200
+ data-desktop-col="<?php echo esc_attr( $gird_column_desktop ); ?>"
201
+ data-tab-col="<?php echo esc_attr( $gird_column_tab ); ?>"
202
+ data-mobile-col="<?php echo esc_attr( $gird_column_mobile ); ?>"
203
+ data-sc-id="elementor"
204
+ data-el-query=''
205
+ >
206
+ <?php
207
+
208
+
209
+ $wrapper_class = [];
210
+ // $wrapper_class[] = $_layout;
211
+ $wrapper_class[] = 'rt-content-loader grid-behaviour';
212
+
213
+ if ( $_layout == 'slider-layout1' ) {
214
+ $wrapper_class[] = 'grid-layout1 ';
215
+ } elseif ( $_layout == 'slider-layout2' ) {
216
+ $wrapper_class[] = 'grid-layout3';
217
+ } elseif ( $_layout == 'slider-layout3' ) {
218
+ $wrapper_class[] = 'grid-layout4';
219
+ } elseif ( $_layout == 'slider-layout4' ) {
220
+ $wrapper_class[] = 'grid-layout7';
221
+ } elseif ( $_layout == 'slider-layout5' ) {
222
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout1 grid_hover_layout_wrapper';
223
+ } elseif ( $_layout == 'slider-layout6' ) {
224
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout3 grid_hover_layout_wrapper';
225
+ } elseif ( $_layout == 'slider-layout7' ) {
226
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover_layout_wrapper';
227
+ } elseif ( $_layout == 'slider-layout8' ) {
228
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout10 grid_hover_layout_wrapper';
229
+ } elseif ( $_layout == 'slider-layout9' ) {
230
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout11 grid_hover_layout_wrapper';
231
+ } elseif ( $_layout == 'slider-layout10' ) {
232
+ $wrapper_class[] = 'grid_hover-layout5 grid_hover-layout7 grid_hover_layout_wrapper';
233
+ } elseif ( $_layout == 'slider-layout11' ) {
234
+ $wrapper_class[] = ' grid_hover-layout5 slider-layout';
235
+ } elseif ( $_layout == 'slider-layout12' ) {
236
+ $wrapper_class[] = ' grid_hover-layout5 slider-layout';
237
+ }
238
+
239
+ $wrapper_class[] = $_prefix . '_layout_wrapper';
240
+
241
+ //section title settings
242
+ $this->get_section_title( $data );
243
+
244
+ //$data['carousel_overflow']
245
+ //$data['slider_gap']
246
+
247
+ $slider_data = [
248
+ "speed" => $data['speed'],
249
+ "autoPlayTimeOut" => $data['autoplaySpeed'],
250
+ "autoPlay" => $data['autoplay'] == "yes" ? true : false,
251
+ "stopOnHover" => $data['stopOnHover'] == "yes" ? true : false,
252
+ "nav" => $data['arrows'] == "yes" ? true : false,
253
+ "dots" => $data['dots'] == "yes" ? true : false,
254
+ "loop" => $data['infinite'] == "yes" ? true : false,
255
+ "lazyLoad" => $data['lazyLoad'] == "yes" ? true : false,
256
+ "autoHeight" => $data['autoHeight'] == "yes" ? true : false,
257
+ ];
258
+
259
+ if ( $data['enable_2_rows'] == 'yes' ) {
260
+ $slider_data['autoHeight'] = false;
261
+ }
262
+ ?>
263
+
264
+ <div class="slider-main-wrapper <?php echo esc_attr( $_layout ) ?>">
265
+ <div class="rt-swiper-holder swiper"
266
+ data-rtowl-options='<?php echo wp_json_encode( $slider_data ) ?>'
267
+ dir="<?php echo esc_attr( $data['slider_direction'] ); ?>">
268
+ <div class="swiper-wrapper <?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
269
+ <?php
270
+ if ( $query->have_posts() ) {
271
+ $pCount = 1;
272
+ while ( $query->have_posts() ) {
273
+ $query->the_post();
274
+ set_query_var( 'tpg_post_count', $pCount );
275
+ set_query_var( 'tpg_total_posts', $query->post_count );
276
+ $this->tpg_template( $post_data );
277
+
278
+ if ( $_layout == 'slider-layout10' && $pCount == 5 ) {
279
+ $pCount = 0;
280
+ }
281
+ $pCount ++;
282
+ }
283
+ } else {
284
+ if ( $data['no_posts_found_text'] ) {
285
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
286
+ } else {
287
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
288
+ }
289
+ }
290
+ wp_reset_postdata();
291
+ ?>
292
+ </div>
293
+
294
+ </div>
295
+
296
+
297
+ <?php if ( ! in_array( $_layout, [ 'slider-layout11', 'slider-layout12' ] ) ) : ?>
298
+ <!--swiper-pagination-horizontal-->
299
+ <?php if ( $data['dots'] == "yes" ) : ?>
300
+ <div class="swiper-pagination"></div>
301
+ <?php endif; ?>
302
+
303
+ <?php if ( $data['arrows'] == "yes" ) : ?>
304
+ <div class="swiper-navigation">
305
+ <div class="slider-btn swiper-button-prev"></div>
306
+ <div class="slider-btn swiper-button-next"></div>
307
+ </div>
308
+ <?php endif; ?>
309
+ <?php endif; ?>
310
+
311
+ <?php if ( in_array( $_layout, [ 'slider-layout11', 'slider-layout12' ] ) ) : ?>
312
+ <div class="slider-thumb-main-wrapper">
313
+ <div class="swiper-thumb-wrapper gallery-thumbs swiper">
314
+ <div class="swiper-wrapper">
315
+ <?php
316
+ if ( $query->have_posts() ) {
317
+ $pCount = 1;
318
+ while ( $query->have_posts() ) {
319
+ $query->the_post();
320
+ set_query_var( 'tpg_post_count', $pCount );
321
+ set_query_var( 'tpg_total_posts', $query->post_count );
322
+ // $this->tpg_template( $post_data );
323
+ ?>
324
+ <div class="swiper-slide">
325
+ <div class="post-thumbnail-wrap">
326
+ <div class="p-thumbnail">
327
+ <?php echo get_the_post_thumbnail( get_the_ID(), 'thumbnail' ); ?>
328
+ </div>
329
+ <div class="p-content">
330
+ <div class="post-taxonomy">
331
+ <?php
332
+ $_cat_id = $data['post_type'] . '_taxonomy';
333
+ echo get_the_term_list( get_the_ID(), $data[ $_cat_id ], null, '<span class="rt-separator">,</span>' );
334
+ ?>
335
+ </div>
336
+ <h3 class="thumb-title"><?php echo get_the_title() ?></h3>
337
+ <span class="thumb-date"><?php echo get_the_date() ?></span>
338
+ </div>
339
+ </div>
340
+ </div>
341
+ <?php
342
+ $pCount ++;
343
+ }
344
+ } else {
345
+ if ( $data['no_posts_found_text'] ) {
346
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html( $data['no_posts_found_text'] ) );
347
+ } else {
348
+ printf( "<div class='no_posts_found_text'>%s</div>", esc_html__( 'No post found', 'the-post-grid' ) );
349
+ }
350
+ }
351
+ wp_reset_postdata();
352
+ ?>
353
+ </div>
354
+ <div class="swiper-thumb-pagination"></div>
355
+ </div>
356
+ </div>
357
+ <?php endif; ?>
358
+
359
+
360
+ </div>
361
+
362
+
363
+ </div>
364
+ <?php
365
+ do_action('tpg_elementor_script');
366
+ }
367
+
368
+ }
assets/css/admin-preview.css CHANGED
@@ -1,3 +1,4 @@
 
1
  @import url('thepostgrid.css');
2
  @import url(https://fonts.googleapis.com/css?family=Open+Sans);
3
  #tpg-preview-container .rt-tpg-utility .rt-tgp-load-more button {
1
+ @import url('rt-tpg-common.css');
2
  @import url('thepostgrid.css');
3
  @import url(https://fonts.googleapis.com/css?family=Open+Sans);
4
  #tpg-preview-container .rt-tpg-utility .rt-tgp-load-more button {
assets/css/admin.css CHANGED
@@ -361,6 +361,11 @@ body .meta-box-sortables .field-holder select {
361
  margin-bottom: 15px;
362
  }
363
 
 
 
 
 
 
364
  .rt-tab-content .field-holder:first-child {
365
  border-top: none;
366
  padding-top: 15px;
@@ -370,10 +375,6 @@ body .meta-box-sortables .field-holder select {
370
  width: 100%;
371
  }
372
 
373
- .rt-tab-content .field-holder .disabled input {
374
- opacity: 0.7;
375
- }
376
-
377
  .rt-tpg-filter.taxonomy {
378
  background: var(--rt-primary-color) 3 b;
379
  }
@@ -770,7 +771,7 @@ div#column_holder:before {
770
  color: #000;
771
  top: 45%;
772
  text-align: center;
773
- display: block;
774
  font-size: 20px;
775
  position: absolute;
776
  left: 0;
361
  margin-bottom: 15px;
362
  }
363
 
364
+ #settings-tabs .rt-tab-content .field-holder#show_acf_details_holder {
365
+ border-top: 1px solid #ddd;
366
+ padding-top: 20px;
367
+ }
368
+
369
  .rt-tab-content .field-holder:first-child {
370
  border-top: none;
371
  padding-top: 15px;
375
  width: 100%;
376
  }
377
 
 
 
 
 
378
  .rt-tpg-filter.taxonomy {
379
  background: var(--rt-primary-color) 3 b;
380
  }
771
  color: #000;
772
  top: 45%;
773
  text-align: center;
774
+ display: none;
775
  font-size: 20px;
776
  position: absolute;
777
  left: 0;
assets/css/rt-tpg-common-rtl.css ADDED
@@ -0,0 +1,2579 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***********************************************************************/
2
+ /**************************** The Post Grid ****************************/
3
+ /********************** support@radiustheme.com ************************/
4
+ /*************************** Common Style ******************************/
5
+ /***********************************************************************/
6
+
7
+
8
+ /***************************** Common Grid Style ******************************/
9
+
10
+ body .tpg-el-main-wrapper .rt-grid-item {
11
+ padding: 0 15px;
12
+ }
13
+
14
+ body .elementor-section .tpg-el-main-wrapper .rt-grid-item {
15
+ background: none;
16
+ }
17
+
18
+ body .elementor-section .tpg-el-main-wrapper .offset-left,
19
+ body .elementor-section .tpg-el-main-wrapper .offset-right {
20
+ padding-bottom: 0;
21
+ }
22
+
23
+ .rt-tpg-container a {
24
+ text-decoration: none;
25
+ }
26
+
27
+ html.rt-model-open,
28
+ body.rt-model-open,
29
+ .rt-model-open {
30
+ overflow: hidden;
31
+ }
32
+
33
+ .rt-tpg-container * {
34
+ -webkit-box-sizing: border-box;
35
+ -moz-box-sizing: border-box;
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ .rt-tpg-container *:before,
40
+ .rt-tpg-container *:after {
41
+ -webkit-box-sizing: border-box;
42
+ -moz-box-sizing: border-box;
43
+ box-sizing: border-box;
44
+ }
45
+
46
+ .rt-container {
47
+ margin-left: auto;
48
+ margin-right: auto;
49
+ padding-right: 15px;
50
+ padding-left: 15px;
51
+ }
52
+
53
+ .rt-container-fluid {
54
+ margin-left: auto;
55
+ margin-right: auto;
56
+ padding-right: 15px;
57
+ padding-left: 15px;
58
+ }
59
+
60
+ .rt-container-fluid.slider-layout13-main {
61
+ padding: 0 0 15px;
62
+ }
63
+
64
+ .rt-tpg-container ul {
65
+ margin: 0;
66
+ }
67
+
68
+ img, svg {
69
+ vertical-align: middle;
70
+ }
71
+
72
+ a:link, a:visited {
73
+ transition: all ease 0.31s;
74
+ }
75
+
76
+ .clearfix:before, .clearfix:after, .rt-container-fluid:before, .rt-container-fluid:after, .rt-row:before, .rt-row:after {
77
+ content: " ";
78
+ display: table;
79
+ }
80
+
81
+ .clearfix:after,
82
+ .rt-container:after,
83
+ .rt-container-fluid:after,
84
+ .rt-row:after {
85
+ clear: both;
86
+ }
87
+
88
+ .rt-row {
89
+ margin-right: -15px;
90
+ margin-left: -15px;
91
+ }
92
+
93
+ .grid-layout2.rt-row {
94
+ margin-right: 0;
95
+ margin-left: 0;
96
+ }
97
+
98
+ .rt-row > .rt-row {
99
+ padding-right: 15px;
100
+ padding-left: 15px;
101
+ }
102
+
103
+ .grid_hover6.rt-row {
104
+ margin-right: -2px;
105
+ margin-left: -2px;
106
+ }
107
+
108
+ .rt-col-xs-1, .rt-col-sm-1, .rt-col-md-1, .rt-col-lg-1, .rt-col-xs-2, .rt-col-sm-2, .rt-col-md-2, .rt-col-lg-2, .rt-col-xs-3, .rt-col-sm-3, .rt-col-md-3, .rt-col-lg-3, .rt-col-xs-4, .rt-col-sm-4, .rt-col-md-4, .rt-col-lg-4, .rt-col-xs-5, .rt-col-sm-5, .rt-col-md-5, .rt-col-lg-5, .rt-col-xs-6, .rt-col-sm-6, .rt-col-md-6, .rt-col-lg-6, .rt-col-xs-7, .rt-col-sm-7, .rt-col-md-7, .rt-col-lg-7, .rt-col-xs-8, .rt-col-sm-8, .rt-col-md-8, .rt-col-lg-8, .rt-col-xs-9, .rt-col-sm-9, .rt-col-md-9, .rt-col-lg-9, .rt-col-xs-10, .rt-col-sm-10, .rt-col-md-10, .rt-col-lg-10, .rt-col-xs-11, .rt-col-sm-11, .rt-col-md-11, .rt-col-lg-11, .rt-col-xs-12, .rt-col-sm-12, .rt-col-md-12, .rt-col-lg-12, .rt-col-xs-24, .rt-col-sm-24, .rt-col-md-24, .rt-col-lg-24 {
109
+ position: relative;
110
+ min-height: 1px;
111
+ padding-right: 15px;
112
+ padding-left: 15px;
113
+ }
114
+
115
+ .rt-col-xs-1, .rt-col-xs-2, .rt-col-xs-3, .rt-col-xs-4, .rt-col-xs-5, .rt-col-xs-6, .rt-col-xs-7, .rt-col-xs-8, .rt-col-xs-9, .rt-col-xs-10, .rt-col-xs-11, .rt-col-xs-12, .rt-col-xs-24 {
116
+ float: right;
117
+ }
118
+
119
+ .rt-col-xs-24 {
120
+ width: 20%;
121
+ }
122
+
123
+ .rt-col-xs-12 {
124
+ width: 100%;
125
+ }
126
+
127
+ .rt-col-xs-11 {
128
+ width: 91.66666667%;
129
+ }
130
+
131
+ .rt-col-xs-10 {
132
+ width: 83.33333333%;
133
+ }
134
+
135
+ .rt-col-xs-9 {
136
+ width: 75%;
137
+ }
138
+
139
+ .rt-col-xs-8 {
140
+ width: 66.66666667%;
141
+ }
142
+
143
+ .rt-col-xs-7 {
144
+ width: 58.33333333%;
145
+ }
146
+
147
+ .rt-col-xs-6 {
148
+ width: 50%;
149
+ }
150
+
151
+ .rt-col-xs-5 {
152
+ width: 41.66666667%;
153
+ }
154
+
155
+ .rt-col-xs-4 {
156
+ width: 33.33333333%;
157
+ }
158
+
159
+ .rt-col-xs-3 {
160
+ width: 25%;
161
+ }
162
+
163
+ .rt-col-xs-2 {
164
+ width: 16.66666667%;
165
+ }
166
+
167
+ .rt-col-xs-1 {
168
+ width: 8.33333333%;
169
+ }
170
+
171
+ #rt-main {
172
+ margin: 35px auto;
173
+ }
174
+
175
+ .rt-tpg-container h3.entry-title {
176
+ line-height: 1.25;
177
+ margin: 0px 0px 12px;
178
+ }
179
+
180
+ .rt-tpg-container .offset-small-wrap .rt-holder .overlay {
181
+ min-height: 60px !important;
182
+ }
183
+
184
+ .rt-tpg-container .offset-small-wrap .rt-holder .rt-img-responsive {
185
+ height: auto;
186
+ width: 100%;
187
+ object-fit: cover;
188
+ }
189
+
190
+ .rt-tpg-container .offset-small-wrap .rt-col-md-6 .rt-holder .rt-img-responsive {
191
+ height: auto;
192
+ }
193
+
194
+ .rt-tpg-container .offset-small-wrap .rt-holder .overlay h3 a {
195
+ overflow: hidden !important;
196
+ text-overflow: ellipsis !important;
197
+ display: -webkit-box !important;
198
+ -webkit-line-clamp: 1 !important;
199
+ -webkit-box-orient: vertical;
200
+ }
201
+
202
+ .rt-tpg-container .offset-big .post-meta-user.above_title {
203
+ margin-top: 15px;
204
+ }
205
+
206
+ .rt-tpg-container .offset-big .post-meta-user.above_title + h3.entry-title {
207
+ margin-top: 0;
208
+ }
209
+
210
+ .rt-tpg-container .offset-big h3.entry-title {
211
+ margin: 20px 0px 15px;
212
+ }
213
+
214
+ .rt-tpg-container .offset-big .cat-above-title {
215
+ margin-bottom: -15px;
216
+ padding-top: 10px;
217
+ }
218
+
219
+ .rt-tpg-container .owl-controls .owl-dots {
220
+ margin-top: 15px;
221
+ }
222
+
223
+ .rt-popup-content .rt-tpg-container i {
224
+ margin-left: 5px;
225
+ }
226
+
227
+ /**********************************************************************/
228
+ /********************************* Media Query *************************/
229
+ /**********************************************************************/
230
+
231
+ @media (min-width: 992px) {
232
+ .rt-container {
233
+ width: 970px;
234
+ }
235
+ }
236
+
237
+ @media (min-width: 1200px) {
238
+ .rt-container {
239
+ width: 1170px;
240
+ }
241
+ }
242
+
243
+ @media (max-width: 767px) {
244
+ .hidden-xs {
245
+ display: none !important;
246
+ }
247
+ }
248
+
249
+ @media screen and (max-width: 768px) {
250
+ .rt-member-feature-img, .rt-member-description-container {
251
+ float: none;
252
+ width: 100%;
253
+ }
254
+ }
255
+
256
+ @media (min-width: 768px) {
257
+ .rt-col-sm-1, .rt-col-sm-2, .rt-col-sm-3, .rt-col-sm-4, .rt-col-sm-5, .rt-col-sm-6, .rt-col-sm-7, .rt-col-sm-8, .rt-col-sm-9, .rt-col-sm-10, .rt-col-sm-11, .rt-col-sm-12, .rt-col-sm-24 {
258
+ float: right;
259
+ }
260
+
261
+ .rt-col-sm-24 {
262
+ width: 20%;
263
+ }
264
+
265
+ .rt-col-sm-12 {
266
+ width: 100%;
267
+ }
268
+
269
+ .rt-col-sm-11 {
270
+ width: 91.66666667%;
271
+ }
272
+
273
+ .rt-col-sm-10 {
274
+ width: 83.33333333%;
275
+ }
276
+
277
+ .rt-col-sm-9 {
278
+ width: 75%;
279
+ }
280
+
281
+ .rt-col-sm-8 {
282
+ width: 66.66666667%;
283
+ }
284
+
285
+ .rt-col-sm-7 {
286
+ width: 58.33333333%;
287
+ }
288
+
289
+ .rt-col-sm-6 {
290
+ width: 50%;
291
+ }
292
+
293
+ .rt-col-sm-5 {
294
+ width: 41.66666667%;
295
+ }
296
+
297
+ .rt-col-sm-4 {
298
+ width: 33.33333333%;
299
+ }
300
+
301
+ .rt-col-sm-3 {
302
+ width: 25%;
303
+ }
304
+
305
+ .rt-col-sm-2 {
306
+ width: 16.66666667%;
307
+ }
308
+
309
+ .rt-col-sm-1 {
310
+ width: 8.33333333%;
311
+ }
312
+
313
+ }
314
+
315
+ @media (min-width: 992px) {
316
+ .rt-col-md-1, .rt-col-md-2, .rt-col-md-3, .rt-col-md-4, .rt-col-md-5, .rt-col-md-6, .rt-col-md-7, .rt-col-md-8, .rt-col-md-9, .rt-col-md-10, .rt-col-md-11, .rt-col-md-12, .rt-col-md-24 {
317
+ float: right;
318
+ }
319
+
320
+ .rt-col-md-24 {
321
+ width: 20%;
322
+ }
323
+
324
+ .rt-col-md-12 {
325
+ width: 100%;
326
+ }
327
+
328
+ .rt-col-md-11 {
329
+ width: 91.66666667%;
330
+ }
331
+
332
+ .rt-col-md-10 {
333
+ width: 83.33333333%;
334
+ }
335
+
336
+ .rt-col-md-9 {
337
+ width: 75%;
338
+ }
339
+
340
+ .rt-col-md-8 {
341
+ width: 66.66666667%;
342
+ }
343
+
344
+ .rt-col-md-7 {
345
+ width: 58.33333333%;
346
+ }
347
+
348
+ .rt-col-md-6 {
349
+ width: 50%;
350
+ }
351
+
352
+ .rt-col-md-5 {
353
+ width: 41.66666667%;
354
+ }
355
+
356
+ .rt-col-md-4 {
357
+ width: 33.33333333%;
358
+ }
359
+
360
+ .rt-col-md-3 {
361
+ width: 25%;
362
+ }
363
+
364
+ .rt-col-md-2 {
365
+ width: 16.66666667%;
366
+ }
367
+
368
+ .rt-col-md-1 {
369
+ width: 8.33333333%;
370
+ }
371
+
372
+ }
373
+
374
+ @media (min-width: 1200px) {
375
+ .rt-col-lg-1, .rt-col-lg-2, .rt-col-lg-3, .rt-col-lg-4, .rt-col-lg-5, .rt-col-lg-6, .rt-col-lg-7, .rt-col-lg-8, .rt-col-lg-9, .rt-col-lg-10, .rt-col-lg-11, .rt-col-lg-12 {
376
+ float: right;
377
+ }
378
+
379
+ .rt-col-lg-24 {
380
+ width: 20%;
381
+ }
382
+
383
+ .rt-col-lg-12 {
384
+ width: 100%;
385
+ }
386
+
387
+ .rt-col-lg-11 {
388
+ width: 91.66666667%;
389
+ }
390
+
391
+ .rt-col-lg-10 {
392
+ width: 83.33333333%;
393
+ }
394
+
395
+ .rt-col-lg-9 {
396
+ width: 75%;
397
+ }
398
+
399
+ .rt-col-lg-8 {
400
+ width: 66.66666667%;
401
+ }
402
+
403
+ .rt-col-lg-7 {
404
+ width: 58.33333333%;
405
+ }
406
+
407
+ .rt-col-lg-6 {
408
+ width: 50%;
409
+ }
410
+
411
+ .rt-col-lg-5 {
412
+ width: 41.66666667%;
413
+ }
414
+
415
+ .rt-col-lg-4 {
416
+ width: 33.33333333%;
417
+ }
418
+
419
+ .rt-col-lg-3 {
420
+ width: 25%;
421
+ }
422
+
423
+ .rt-col-lg-2 {
424
+ width: 16.66666667%;
425
+ }
426
+
427
+ .rt-col-lg-1 {
428
+ width: 8.33333333%;
429
+ }
430
+
431
+ }
432
+
433
+
434
+ /***************************************
435
+ Pagination Style
436
+ **************************************/
437
+
438
+ .paginationjs {
439
+ line-height: 1.6;
440
+ font-family: Marmelad, "Lucida Grande", Arial, "Hiragino Sans GB", Georgia, sans-serif;
441
+ font-size: 14px;
442
+ box-sizing: initial
443
+ }
444
+
445
+ .paginationjs:after {
446
+ display: table;
447
+ content: " ";
448
+ clear: both
449
+ }
450
+
451
+ .paginationjs .paginationjs-pages {
452
+ float: right
453
+ }
454
+
455
+ .paginationjs .paginationjs-pages ul {
456
+ float: right;
457
+ margin: 0;
458
+ padding: 0
459
+ }
460
+
461
+ .paginationjs .paginationjs-go-button, .paginationjs .paginationjs-go-input, .paginationjs .paginationjs-nav {
462
+ float: right;
463
+ margin-right: 10px;
464
+ font-size: 14px
465
+ }
466
+
467
+ .paginationjs .paginationjs-pages li {
468
+ float: right;
469
+ border: 1px solid #aaa;
470
+ border-left: none;
471
+ list-style: none
472
+ }
473
+
474
+ .paginationjs .paginationjs-pages li > a {
475
+ min-width: 30px;
476
+ height: 28px;
477
+ line-height: 28px;
478
+ display: block;
479
+ background: #fff;
480
+ font-size: 14px;
481
+ color: #333;
482
+ text-decoration: none;
483
+ text-align: center
484
+ }
485
+
486
+ .paginationjs .paginationjs-pages li:hover > a {
487
+ background: var(--tpg-primary-color);
488
+ color: #ffffff !important;
489
+ border-color: var(--tpg-primary-color) !important;
490
+ }
491
+
492
+ .paginationjs .paginationjs-pages li.active {
493
+ border: none
494
+ }
495
+
496
+ .paginationjs .paginationjs-pages li.active > a {
497
+ height: 30px;
498
+ line-height: 30px;
499
+ background: #aaa;
500
+ color: #fff
501
+ }
502
+
503
+ .paginationjs .paginationjs-pages li.disabled > a {
504
+ opacity: .3
505
+ }
506
+
507
+ .paginationjs .paginationjs-pages li.disabled > a:hover {
508
+ background: 100% 0
509
+ }
510
+
511
+ .paginationjs .paginationjs-pages li:first-child, .paginationjs .paginationjs-pages li:first-child > a {
512
+ border-radius: 0 3px 3px 0
513
+ }
514
+
515
+ .paginationjs .paginationjs-pages li:last-child {
516
+ border-left: 1px solid #aaa;
517
+ border-radius: 3px 0 0 3px
518
+ }
519
+
520
+ .paginationjs .paginationjs-pages li:last-child > a {
521
+ border-radius: 3px 0 0 3px
522
+ }
523
+
524
+ .paginationjs .paginationjs-go-input > input[type=text] {
525
+ width: 30px;
526
+ height: 28px;
527
+ background: #fff;
528
+ border-radius: 3px;
529
+ border: 1px solid #aaa;
530
+ padding: 0;
531
+ font-size: 14px;
532
+ text-align: center;
533
+ vertical-align: baseline;
534
+ outline: 0;
535
+ box-shadow: none;
536
+ box-sizing: initial
537
+ }
538
+
539
+ .paginationjs .paginationjs-go-button > input[type=button] {
540
+ min-width: 40px;
541
+ height: 30px;
542
+ line-height: 28px;
543
+ background: #fff;
544
+ border-radius: 3px;
545
+ border: 1px solid #aaa;
546
+ text-align: center;
547
+ padding: 0 8px;
548
+ font-size: 14px;
549
+ vertical-align: baseline;
550
+ outline: 0;
551
+ box-shadow: none;
552
+ color: #333;
553
+ cursor: pointer;
554
+ vertical-align: middle \9
555
+ }
556
+
557
+ .paginationjs.paginationjs-theme-blue .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-blue .paginationjs-pages li {
558
+ border-color: #289de9
559
+ }
560
+
561
+ .paginationjs .paginationjs-go-button > input[type=button]:hover {
562
+ background-color: #f8f8f8
563
+ }
564
+
565
+ .paginationjs .paginationjs-nav {
566
+ height: 30px;
567
+ line-height: 30px
568
+ }
569
+
570
+ .paginationjs .paginationjs-go-button, .paginationjs .paginationjs-go-input {
571
+ margin-right: 5px \9
572
+ }
573
+
574
+ .paginationjs.paginationjs-small {
575
+ font-size: 12px
576
+ }
577
+
578
+ .paginationjs.paginationjs-small .paginationjs-pages li > a {
579
+ min-width: 26px;
580
+ height: 24px;
581
+ line-height: 24px;
582
+ font-size: 12px
583
+ }
584
+
585
+ .paginationjs.paginationjs-small .paginationjs-pages li.active > a {
586
+ height: 26px;
587
+ line-height: 26px
588
+ }
589
+
590
+ .paginationjs.paginationjs-small .paginationjs-go-input {
591
+ font-size: 12px
592
+ }
593
+
594
+ .paginationjs.paginationjs-small .paginationjs-go-input > input[type=text] {
595
+ width: 26px;
596
+ height: 24px;
597
+ font-size: 12px
598
+ }
599
+
600
+ .paginationjs.paginationjs-small .paginationjs-go-button {
601
+ font-size: 12px
602
+ }
603
+
604
+ .paginationjs.paginationjs-small .paginationjs-go-button > input[type=button] {
605
+ min-width: 30px;
606
+ height: 26px;
607
+ line-height: 24px;
608
+ padding: 0 6px;
609
+ font-size: 12px
610
+ }
611
+
612
+ .paginationjs.paginationjs-small .paginationjs-nav {
613
+ height: 26px;
614
+ line-height: 26px;
615
+ font-size: 12px
616
+ }
617
+
618
+ .paginationjs.paginationjs-big {
619
+ font-size: 16px
620
+ }
621
+
622
+ .paginationjs.paginationjs-big .paginationjs-pages li > a {
623
+ min-width: 36px;
624
+ height: 34px;
625
+ line-height: 34px;
626
+ font-size: 16px
627
+ }
628
+
629
+ .paginationjs.paginationjs-big .paginationjs-pages li.active > a {
630
+ height: 36px;
631
+ line-height: 36px
632
+ }
633
+
634
+ .paginationjs.paginationjs-big .paginationjs-go-input {
635
+ font-size: 16px
636
+ }
637
+
638
+ .paginationjs.paginationjs-big .paginationjs-go-input > input[type=text] {
639
+ width: 36px;
640
+ height: 34px;
641
+ font-size: 16px
642
+ }
643
+
644
+ .paginationjs.paginationjs-big .paginationjs-go-button {
645
+ font-size: 16px
646
+ }
647
+
648
+ .paginationjs.paginationjs-big .paginationjs-go-button > input[type=button] {
649
+ min-width: 50px;
650
+ height: 36px;
651
+ line-height: 34px;
652
+ padding: 0 12px;
653
+ font-size: 16px
654
+ }
655
+
656
+ .paginationjs.paginationjs-big .paginationjs-nav {
657
+ height: 36px;
658
+ line-height: 36px;
659
+ font-size: 16px
660
+ }
661
+
662
+ .paginationjs.paginationjs-theme-blue .paginationjs-pages li > a {
663
+ color: #289de9
664
+ }
665
+
666
+ .paginationjs.paginationjs-theme-blue .paginationjs-pages li:hover > a {
667
+ background: #e9f4fc
668
+ }
669
+
670
+ .paginationjs.paginationjs-theme-blue .paginationjs-pages li.active > a {
671
+ background: #289de9;
672
+ color: #fff
673
+ }
674
+
675
+ .paginationjs.paginationjs-theme-blue .paginationjs-pages li.disabled:hover > a {
676
+ background: 100% 0
677
+ }
678
+
679
+ .paginationjs.paginationjs-theme-blue .paginationjs-go-button > input[type=button] {
680
+ background: #289de9;
681
+ border-color: #289de9;
682
+ color: #fff
683
+ }
684
+
685
+ .paginationjs.paginationjs-theme-green .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-green .paginationjs-pages li {
686
+ border-color: #449d44
687
+ }
688
+
689
+ .paginationjs.paginationjs-theme-blue .paginationjs-go-button > input[type=button]:hover {
690
+ background-color: #3ca5ea
691
+ }
692
+
693
+ .paginationjs.paginationjs-theme-green .paginationjs-pages li > a {
694
+ color: #449d44
695
+ }
696
+
697
+ .paginationjs.paginationjs-theme-green .paginationjs-pages li:hover > a {
698
+ background: #ebf4eb
699
+ }
700
+
701
+ .paginationjs.paginationjs-theme-green .paginationjs-pages li.active > a {
702
+ background: #449d44;
703
+ color: #fff
704
+ }
705
+
706
+ .paginationjs.paginationjs-theme-green .paginationjs-pages li.disabled:hover > a {
707
+ background: 100% 0
708
+ }
709
+
710
+ .paginationjs.paginationjs-theme-green .paginationjs-go-button > input[type=button] {
711
+ background: #449d44;
712
+ border-color: #449d44;
713
+ color: #fff
714
+ }
715
+
716
+ .paginationjs.paginationjs-theme-yellow .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-yellow .paginationjs-pages li {
717
+ border-color: #ec971f
718
+ }
719
+
720
+ .paginationjs.paginationjs-theme-green .paginationjs-go-button > input[type=button]:hover {
721
+ background-color: #55a555
722
+ }
723
+
724
+ .paginationjs.paginationjs-theme-yellow .paginationjs-pages li > a {
725
+ color: #ec971f
726
+ }
727
+
728
+ .paginationjs.paginationjs-theme-yellow .paginationjs-pages li:hover > a {
729
+ background: #fdf5e9
730
+ }
731
+
732
+ .paginationjs.paginationjs-theme-yellow .paginationjs-pages li.active > a {
733
+ background: #ec971f;
734
+ color: #fff
735
+ }
736
+
737
+ .paginationjs.paginationjs-theme-yellow .paginationjs-pages li.disabled:hover > a {
738
+ background: 100% 0
739
+ }
740
+
741
+ .paginationjs.paginationjs-theme-yellow .paginationjs-go-button > input[type=button] {
742
+ background: #ec971f;
743
+ border-color: #ec971f;
744
+ color: #fff
745
+ }
746
+
747
+ .paginationjs.paginationjs-theme-red .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-red .paginationjs-pages li {
748
+ border-color: #c9302c
749
+ }
750
+
751
+ .paginationjs.paginationjs-theme-yellow .paginationjs-go-button > input[type=button]:hover {
752
+ background-color: #eea135
753
+ }
754
+
755
+ .paginationjs.paginationjs-theme-red .paginationjs-pages li > a {
756
+ color: #c9302c
757
+ }
758
+
759
+ .paginationjs.paginationjs-theme-red .paginationjs-pages li:hover > a {
760
+ background: #faeaea
761
+ }
762
+
763
+ .paginationjs.paginationjs-theme-red .paginationjs-pages li.active > a {
764
+ background: #c9302c;
765
+ color: #fff
766
+ }
767
+
768
+ .paginationjs.paginationjs-theme-red .paginationjs-pages li.disabled:hover > a {
769
+ background: 100% 0
770
+ }
771
+
772
+ .paginationjs.paginationjs-theme-red .paginationjs-go-button > input[type=button] {
773
+ background: #c9302c;
774
+ border-color: #c9302c;
775
+ color: #fff
776
+ }
777
+
778
+ .paginationjs.paginationjs-theme-red .paginationjs-go-button > input[type=button]:hover {
779
+ background-color: #ce4541
780
+ }
781
+
782
+ .paginationjs .paginationjs-pages li.paginationjs-next {
783
+ border-left: 1px solid #aaa \9
784
+ }
785
+
786
+ .paginationjs .paginationjs-go-input > input[type=text] {
787
+ line-height: 28px \9;
788
+ vertical-align: middle \9
789
+ }
790
+
791
+ .paginationjs.paginationjs-big .paginationjs-pages li > a {
792
+ line-height: 36px \9
793
+ }
794
+
795
+ .paginationjs.paginationjs-big .paginationjs-go-input > input[type=text] {
796
+ height: 36px \9;
797
+ line-height: 36px \9
798
+ }
799
+
800
+
801
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li:not(.paginationjs-next):not(.paginationjs-prev) {
802
+ display: none;
803
+ }
804
+
805
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li {
806
+ color: #ffffff;
807
+ }
808
+
809
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li > a {
810
+ color: #ffffff;
811
+ background-color: var(--tpg-primary-color);
812
+ }
813
+
814
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li:hover a {
815
+ background-color: var(--tpg-secondary-color);
816
+ }
817
+
818
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li.paginationjs-page:nth-child(2) {
819
+ display: inline-block;
820
+ position: relative;
821
+ pointer-events: none;
822
+ }
823
+
824
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li.paginationjs-page:nth-child(2) a {
825
+ text-indent: -99999px;
826
+ pointer-events: none;
827
+ }
828
+
829
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li.paginationjs-page:nth-child(2):before {
830
+ content: "\f100";
831
+ font-family: "Font Awesome 5 Free";
832
+ position: absolute;
833
+ right: 50%;
834
+ top: 50%;
835
+ z-index: 99999;
836
+ opacity: .5;
837
+ font-weight: 900;
838
+ transform: translate(50%, -50%);
839
+
840
+ }
841
+
842
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li.paginationjs-prev + li {
843
+ display: none !important;
844
+ }
845
+
846
+
847
+ /************************ Common ***************************/
848
+
849
+ .rt-tpg-container button {
850
+ border: none;
851
+ padding: 10px 15px;
852
+ }
853
+
854
+ .rt-tpg-container .rt-tgp-load-more button {
855
+ background: #8e8e8e;
856
+ border-radius: 4px;
857
+ }
858
+
859
+ .rt-tpg-container .tpg-wc-product-filter {
860
+ margin-bottom: 15px;
861
+ text-align: left;
862
+ padding-left: 15px;
863
+ }
864
+
865
+ .rt-img-holder > a {
866
+ text-align: center;
867
+ display: block;
868
+ }
869
+
870
+ .rt-img-responsive {
871
+ max-width: 100%;
872
+ display: block;
873
+ height: auto;
874
+ transition: 0.4s ease-in-out;
875
+ }
876
+
877
+
878
+ @media (max-width: 991px) {
879
+ .rt-img-holder > a,
880
+ .rt-img-responsive {
881
+ width: 100%;
882
+ }
883
+ }
884
+
885
+ .rt-tpg-container .no-margin {
886
+ margin: 0px !important;
887
+ padding: 0px !important;
888
+ }
889
+
890
+ span.more-loading {
891
+ background: url("../images/loading.gif") center left no-repeat;
892
+ padding-left: 20px;
893
+ display: inline-block;
894
+ }
895
+
896
+ .rt-tgp-scroll-load-more, .rt-tgp-load-more {
897
+ text-align: center;
898
+ display: block;
899
+ margin: 30px 0 20px;
900
+ }
901
+
902
+ .post-meta-user,
903
+ .post-meta-tags {
904
+ padding: 0;
905
+ margin-bottom: 15px;
906
+ line-height: 1.5;
907
+ font-size: 95%;
908
+ }
909
+
910
+ .post-meta-user span,
911
+ .post-meta-tags span {
912
+ display: inline-block;
913
+ padding-left: 8px;
914
+ }
915
+
916
+ .post-meta-user span.rt-separator,
917
+ .post-meta-tags span.rt-separator {
918
+ display: inline-block;
919
+ padding-left: 5px;
920
+ }
921
+
922
+ .post-meta-user span.comment-link {
923
+ text-align: left;
924
+ float: left;
925
+ padding-left: 0px;
926
+ }
927
+
928
+ .rt-holder .entry-title a {
929
+ color: #000000;
930
+ }
931
+
932
+ .rt-tpg-container .rt-holder .post-meta.center .read-more {
933
+ float: none;
934
+ }
935
+
936
+ .rt-tpg-container .rt-holder .post-meta .rt-tpg-social-share {
937
+ float: none;
938
+ text-align: right;
939
+ display: block;
940
+ margin-bottom: 15px;
941
+ width: 100%;
942
+ }
943
+
944
+ .rt-tpg-container .rt-holder .post-meta.center .rt-tpg-social-share {
945
+ text-align: right;
946
+ }
947
+
948
+ .rt-tpg-container .rt-holder .post-meta.right .rt-tpg-social-share {
949
+ text-align: right;
950
+ }
951
+
952
+ .rt-tpg-container .rt-holder .read-more a {
953
+ /*padding: 8px 15px;*/
954
+ font-size: 15px;
955
+ display: inline-block;
956
+ line-height: 1.5;
957
+ }
958
+
959
+ .rt-tpg-container .rt-holder .tpg-excerpt {
960
+ margin-bottom: 10px;
961
+ }
962
+
963
+ @media (max-width: 991px) {
964
+ .rt-tpg-container .rt-holder .tpg-excerpt {
965
+ overflow: hidden !important;
966
+ text-overflow: ellipsis !important;
967
+ display: -webkit-box !important;
968
+ -webkit-line-clamp: 3 !important;
969
+ -webkit-box-orient: vertical;
970
+ }
971
+ }
972
+
973
+
974
+ /***************************************************
975
+ Isotope Buttons
976
+ ****************************************************/
977
+
978
+ .rt-tpg-container .tpg-iso-filter {
979
+ text-align: center;
980
+ margin: 15px 0 45px;
981
+ }
982
+
983
+ .rt-tpg-container .tpg-iso-filter input[type="text"] {
984
+ display: inline-block;
985
+ padding: 12px 10px;
986
+ border-radius: 3px;
987
+ margin-right: 4px;
988
+ }
989
+
990
+ .rt-tpg-container .tpg-iso-filter > div {
991
+ display: inline-block;
992
+ }
993
+
994
+ .rt-tpg-container .rt-tpg-isotope-buttons .selected {
995
+ background: var(--tpg-primary-color);
996
+ }
997
+
998
+ .rt-tpg-container .rt-tpg-isotope-buttons button {
999
+ border: none;
1000
+ margin: 4px;
1001
+ padding: 8px 20px;
1002
+ outline: 0;
1003
+ text-transform: none;
1004
+ font-weight: 400;
1005
+ font-size: 15px;
1006
+ line-height: 1.8;
1007
+ background: #8e8e8e;
1008
+ color: #fff;
1009
+ border-radius: 3px;
1010
+ box-shadow: none !important;
1011
+ text-shadow: none !important;
1012
+ }
1013
+
1014
+ .rt-tpg-container .rt-tpg-isotope-buttons button {
1015
+ box-shadow: none !important;
1016
+ text-shadow: none !important;
1017
+ }
1018
+
1019
+ /**********************************
1020
+ Ajax Loader
1021
+ *************************************/
1022
+
1023
+ .rt-tpg-container .tpg-pre-loader {
1024
+ position: relative;
1025
+ overflow: hidden;
1026
+ }
1027
+
1028
+ .rt-tpg-container .rt-loading-overlay {
1029
+ opacity: 0;
1030
+ visibility: hidden;
1031
+ position: absolute;
1032
+ top: 0;
1033
+ right: 0;
1034
+ width: 100%;
1035
+ height: 100%;
1036
+ z-index: 1;
1037
+ background-color: #fff;
1038
+ }
1039
+
1040
+ .rt-tpg-container .rt-loading {
1041
+ color: var(--tpg-primary-color);
1042
+ position: absolute;
1043
+ top: 40%;
1044
+ right: 50%;
1045
+ margin-right: -16px;
1046
+ z-index: 2;
1047
+ opacity: 0;
1048
+ visibility: hidden;
1049
+ }
1050
+
1051
+ .rt-tpg-container .tpg-pre-loader .rt-loading-overlay {
1052
+ opacity: 0.8;
1053
+ visibility: visible;
1054
+ }
1055
+
1056
+ .rt-tpg-container .tpg-pre-loader .rt-loading {
1057
+ opacity: 1;
1058
+ visibility: visible;
1059
+ }
1060
+
1061
+ .rt-ball-clip-rotate {
1062
+ width: 32px;
1063
+ height: 32px;
1064
+ }
1065
+
1066
+ .rt-ball-clip-rotate {
1067
+ display: block;
1068
+ font-size: 0;
1069
+ color: #fff;
1070
+ }
1071
+
1072
+ .rt-ball-clip-rotate, .rt-ball-clip-rotate > div {
1073
+ position: relative;
1074
+ -webkit-box-sizing: border-box;
1075
+ -moz-box-sizing: border-box;
1076
+ box-sizing: border-box;
1077
+ }
1078
+
1079
+ .rt-ball-clip-rotate > div {
1080
+ display: inline-block;
1081
+ float: none;
1082
+ background-color: currentColor;
1083
+ border: 0 solid currentColor;
1084
+ }
1085
+
1086
+ .rt-ball-clip-rotate > div {
1087
+ width: 32px;
1088
+ height: 32px;
1089
+ background: transparent;
1090
+ border-width: 2px;
1091
+ border-bottom-color: transparent;
1092
+ border-radius: 100%;
1093
+ -webkit-animation: ball-clip-rotate 0.75s linear infinite;
1094
+ -moz-animation: ball-clip-rotate 0.75s linear infinite;
1095
+ -o-animation: ball-clip-rotate 0.75s linear infinite;
1096
+ animation: ball-clip-rotate 0.75s linear infinite;
1097
+ }
1098
+
1099
+ /****************************************
1100
+ Filter
1101
+ *****************************************/
1102
+
1103
+ .rt-layout-filter-container.rt-clear:after {
1104
+ clear: both;
1105
+ display: block;
1106
+ content: "";
1107
+ }
1108
+
1109
+ .rt-clear:after,
1110
+ .rt-clear::-ms-ticks-after {
1111
+ clear: both;
1112
+ display: block;
1113
+ content: "";
1114
+ }
1115
+
1116
+ .rt-layout-filter-container {
1117
+ font-size: 0;
1118
+ line-height: 0;
1119
+ padding: 0;
1120
+ margin: -5px -5px 30px;
1121
+ }
1122
+
1123
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item {
1124
+ padding: 8px 10px;
1125
+ border: 1px solid;
1126
+ margin: 4px;
1127
+ display: inline-block;
1128
+ transition: 0.4s;
1129
+ }
1130
+
1131
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected,
1132
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover {
1133
+ background: #222222;
1134
+ color: #b4b4b4;
1135
+ }
1136
+
1137
+ /*Filter carousel style*/
1138
+
1139
+
1140
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap {
1141
+ padding-left: 82px;
1142
+ }
1143
+
1144
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap .filter-left-wrapper {
1145
+ margin-left: 0;
1146
+ width: 100%;
1147
+ position: static;
1148
+ }
1149
+
1150
+ .tpg-header-wrapper.carousel {
1151
+ display: flex;
1152
+ overflow: hidden;
1153
+ margin-bottom: 30px;
1154
+ align-items: center;
1155
+ }
1156
+
1157
+ .section-title-style-style1 .tpg-header-wrapper.carousel,
1158
+ .section-title-style-default .tpg-header-wrapper.carousel {
1159
+ min-height: 36px;
1160
+ }
1161
+
1162
+ .tpg-header-wrapper.carousel .swiper {
1163
+ overflow: hidden;
1164
+ }
1165
+
1166
+ .section-title-style-style2 .tpg-header-wrapper.carousel .swiper,
1167
+ .section-title-style-style3 .tpg-header-wrapper.carousel .swiper {
1168
+ height: 51px;
1169
+ margin-bottom: -0.5px;
1170
+ }
1171
+
1172
+ .tpg-header-wrapper.carousel .swiper .swiper-navigation {
1173
+ position: absolute;
1174
+ top: 50%;
1175
+ left: 0;
1176
+ z-index: 9;
1177
+ transform: translateY(-50%);
1178
+ }
1179
+
1180
+ .tpg-header-wrapper.carousel .swiper .swiper-button-next, .tpg-header-wrapper.carousel .swiper .swiper-button-prev {
1181
+ top: 0;
1182
+ margin-top: 0;
1183
+ }
1184
+
1185
+ .tpg-header-wrapper.carousel .tpg-widget-heading-wrapper {
1186
+ flex: 1;
1187
+ margin: 0;
1188
+ padding-left: 10px;
1189
+ }
1190
+
1191
+ .tpg-header-wrapper.carousel .rt-layout-filter-container {
1192
+ margin: 0;
1193
+ flex: 0 0 60%;
1194
+ max-width: 60%;
1195
+ }
1196
+
1197
+ .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper {
1198
+ position: relative;
1199
+ width: 100%;
1200
+ height: 100%;
1201
+ z-index: 1;
1202
+ display: flex;
1203
+ transition-property: transform;
1204
+ box-sizing: content-box;
1205
+ margin: 0;
1206
+ }
1207
+
1208
+ .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide {
1209
+ text-align: center;
1210
+ width: auto;
1211
+ height: auto;
1212
+ padding: 0 10px;
1213
+ border: none;
1214
+ text-transform: initial;
1215
+ font-size: 15px;
1216
+ color: #212121;
1217
+ /* Center slide text vertically */
1218
+ display: -webkit-box;
1219
+ display: -ms-flexbox;
1220
+ display: -webkit-flex;
1221
+ display: flex;
1222
+ -webkit-box-pack: center;
1223
+ -ms-flex-pack: center;
1224
+ -webkit-justify-content: center;
1225
+ justify-content: center;
1226
+ -webkit-box-align: center;
1227
+ -ms-flex-align: center;
1228
+ -webkit-align-items: center;
1229
+ align-items: center;
1230
+ margin: 0;
1231
+ position: relative;
1232
+ }
1233
+
1234
+ .section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide::before,
1235
+ .section-title-style-style3 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide::before {
1236
+ content: "";
1237
+ position: absolute;
1238
+ right: 50%;
1239
+ bottom: 0;
1240
+ -webkit-transform: translateX(50%);
1241
+ transform: translateX(50%);
1242
+ width: 0;
1243
+ height: 0;
1244
+ border-style: solid;
1245
+ border-width: 0 7px 7px 7px;
1246
+ border-top-color: transparent;
1247
+ border-right-color: transparent;
1248
+ border-left-color: transparent;
1249
+ border-bottom-color: var(--tpg-primary-color);
1250
+ visibility: hidden;
1251
+ opacity: 0;
1252
+ transition: all 0.3s ease;
1253
+ }
1254
+
1255
+ .section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide.selected::before,
1256
+ .section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide:hover::before,
1257
+ .section-title-style-style3 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide.selected::before,
1258
+ .section-title-style-style3 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide:hover::before {
1259
+ opacity: 1;
1260
+ visibility: visible;
1261
+ }
1262
+
1263
+
1264
+ .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide.selected,
1265
+ .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide:hover {
1266
+ color: var(--tpg-primary-color);
1267
+ }
1268
+
1269
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap .filter-right-wrapper,
1270
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap .rt-author-filter {
1271
+ display: none;
1272
+ }
1273
+
1274
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.swiper-wrapper {
1275
+ letter-spacing: 0;
1276
+ }
1277
+
1278
+ .tpg-header-wrapper.carousel .swiper-button-next.swiper-button-disabled,
1279
+ .tpg-header-wrapper.carousel .swiper-button-prev.swiper-button-disabled {
1280
+ opacity: 1;
1281
+ }
1282
+
1283
+ .tpg-header-wrapper.carousel .swiper-button-next.swiper-button-disabled::after,
1284
+ .tpg-header-wrapper.carousel .swiper-button-prev.swiper-button-disabled::after {
1285
+ opacity: .35;
1286
+ }
1287
+
1288
+ .filter-button-border-enable .tpg-header-wrapper.carousel .rt-layout-filter-container {
1289
+ border: 1px solid #ddd;
1290
+ border-radius: 3px;
1291
+ }
1292
+
1293
+ .filter-button-border-enable .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide {
1294
+ padding: 6px 15px;
1295
+ white-space: nowrap;
1296
+ }
1297
+
1298
+ .filter-button-border-enable .tpg-header-wrapper.carousel .swiper .swiper-navigation {
1299
+ left: 3px;
1300
+ }
1301
+
1302
+ .filter-nex-prev-btn-hidden .tpg-header-wrapper.carousel .swiper .swiper-navigation {
1303
+ display: none;
1304
+ }
1305
+
1306
+ .filter-nex-prev-btn-hidden .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap {
1307
+ margin-left: 0;
1308
+ }
1309
+
1310
+ @media (max-width: 767px) {
1311
+ .tpg-header-wrapper.carousel {
1312
+ display: block;
1313
+ }
1314
+
1315
+ .tpg-header-wrapper.carousel .rt-layout-filter-container {
1316
+ max-width: 100%;
1317
+ position: relative;
1318
+ margin-bottom: 8px;
1319
+ }
1320
+
1321
+ .tpg-header-wrapper.carousel .rt-layout-filter-container {
1322
+ margin-right: -9px;
1323
+ margin-top: 10px;
1324
+ }
1325
+ }
1326
+
1327
+ /*End Filter Carousel*/
1328
+
1329
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected,
1330
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover {
1331
+ background: none;
1332
+ color: #000000;
1333
+ }
1334
+
1335
+
1336
+ .rt-filter-item-wrap.rt-order-by-action, .rt-filter-item-wrap.rt-sort-order-action {
1337
+ float: left;
1338
+ }
1339
+
1340
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap {
1341
+ line-height: 1.55;
1342
+ display: inline-block;
1343
+ vertical-align: top;
1344
+ font-size: 13px;
1345
+ letter-spacing: 0.1em;
1346
+ text-transform: uppercase;
1347
+ margin: 4px;
1348
+ padding: 8px 10px;
1349
+ cursor: pointer;
1350
+ position: relative;
1351
+ user-select: none;
1352
+ -webkit-user-select: none;
1353
+ -moz-user-select: none;
1354
+ transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1355
+ -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1356
+ -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1357
+ color: #666;
1358
+ }
1359
+
1360
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-button-wrap {
1361
+ padding: 0;
1362
+ margin-top: 0;
1363
+ margin-right: 0;
1364
+ }
1365
+
1366
+ @media (max-width: 767px) {
1367
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-button-wrap {
1368
+ display: inline;
1369
+ }
1370
+ }
1371
+
1372
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-button-item .rt-filter-sub-tax {
1373
+ display: none;
1374
+ }
1375
+
1376
+ .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group {
1377
+ margin: 0 4px;
1378
+ }
1379
+
1380
+ .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item {
1381
+ cursor: pointer;
1382
+ }
1383
+
1384
+ .rt-layout-filter-container > .rt-filter-sub-tax.sub-button-group > span {
1385
+ padding: 8px 10px;
1386
+ border: 1px solid;
1387
+ margin: 4px;
1388
+ display: inline-block;
1389
+ line-height: 1.55;
1390
+ vertical-align: top;
1391
+ font-size: 13px;
1392
+ letter-spacing: 0.1em;
1393
+ text-transform: uppercase;
1394
+ }
1395
+
1396
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap {
1397
+ border: 1px solid #666;
1398
+ color: #666;
1399
+ position: relative;
1400
+ }
1401
+
1402
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap:hover {
1403
+ border-color: #222;
1404
+ color: #222;
1405
+ }
1406
+
1407
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action:hover {
1408
+ border-color: #222;
1409
+ }
1410
+
1411
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap > .rt-filter-dropdown-default {
1412
+ min-width: 135px;
1413
+ max-width: 135px;
1414
+ overflow: hidden;
1415
+ text-overflow: ellipsis;
1416
+ text-align: center;
1417
+ display: block;
1418
+ white-space: nowrap;
1419
+ }
1420
+
1421
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown {
1422
+ display: block;
1423
+ position: absolute;
1424
+ top: 100%;
1425
+ right: -1px;
1426
+ left: -1px;
1427
+ background-color: #222;
1428
+ z-index: 2;
1429
+ margin-top: 1px;
1430
+ border: none;
1431
+ opacity: 0;
1432
+ visibility: hidden;
1433
+ transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1434
+ -webkit-transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1435
+ -ms-transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1436
+ border-top: 1px solid transparent;
1437
+ }
1438
+
1439
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap:hover .rt-filter-dropdown {
1440
+ border-top-color: #000;
1441
+ }
1442
+
1443
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item.selected {
1444
+ background: #000;
1445
+ }
1446
+
1447
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap.active-dropdown .rt-filter-dropdown {
1448
+ opacity: 1;
1449
+ visibility: visible;
1450
+ }
1451
+
1452
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap.active-dropdown .rt-arrow-angle {
1453
+ transform: rotate(-180deg);
1454
+ -webkit-transform: rotate(-180deg);
1455
+ -ms-transform: rotate(-180deg);
1456
+ }
1457
+
1458
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item {
1459
+ display: block;
1460
+ padding: 10px 15px 9px 15px;
1461
+ border-bottom: 1px solid #323232;
1462
+ color: #b4b4b4;
1463
+ text-align: center;
1464
+ }
1465
+
1466
+ .rt-filter-dropdown-item .sub-dropdown-wrap,
1467
+ .rt-filter-dropdown-default .sub-dropdown-wrap {
1468
+ display: none !important;
1469
+ }
1470
+
1471
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-arrow-angle {
1472
+ letter-spacing: 0;
1473
+ transition: transform 0.2s ease-in-out;
1474
+ -webkit-transition: transform 0.2s ease-in-out;
1475
+ -ms-transition: transform 0.2s ease-in-out;
1476
+ backface-visibility: hidden;
1477
+ -webkit-backface-visibility: hidden;
1478
+ }
1479
+
1480
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action {
1481
+ border: 1px solid #666;
1482
+ color: #666;
1483
+ position: relative;
1484
+ min-width: 38px;
1485
+ }
1486
+
1487
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow {
1488
+ position: static;
1489
+ }
1490
+
1491
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span {
1492
+ display: block;
1493
+ position: absolute;
1494
+ width: 14px;
1495
+ height: 8px;
1496
+ top: 50%;
1497
+ right: 50%;
1498
+ margin-top: -4px;
1499
+ margin-right: -7px;
1500
+ backface-visibility: hidden;
1501
+ -webkit-backface-visibility: hidden;
1502
+ transition: transform 0.2s ease-in-out;
1503
+ -webkit-transition: transform 0.2s ease-in-out;
1504
+ -ms-transition: transform 0.2s ease-in-out;
1505
+ }
1506
+
1507
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow[data-sort-order="ASC"] > span {
1508
+ transform: rotate(-180deg);
1509
+ -webkit-transform: rotate(-180deg);
1510
+ -ms-transform: rotate(-180deg);
1511
+ }
1512
+
1513
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span:before {
1514
+ content: '';
1515
+ display: block;
1516
+ width: 2px;
1517
+ height: 9px;
1518
+ position: absolute;
1519
+ background-color: #666;
1520
+ transform: rotate(45deg);
1521
+ -webkit-transform: rotate(45deg);
1522
+ -ms-transform: rotate(45deg);
1523
+ top: 0;
1524
+ right: 3px;
1525
+ transition: background-color 0.2s ease-in-out;
1526
+ -webkit-transition: background-color 0.2s ease-in-out;
1527
+ -ms-transition: background-color 0.2s ease-in-out;
1528
+ }
1529
+
1530
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span:after {
1531
+ content: '';
1532
+ display: block;
1533
+ width: 2px;
1534
+ height: 9px;
1535
+ position: absolute;
1536
+ background-color: #666;
1537
+ transform: rotate(-45deg);
1538
+ -webkit-transform: rotate(-45deg);
1539
+ -ms-transform: rotate(-45deg);
1540
+ top: 0;
1541
+ right: 9px;
1542
+ transition: background-color 0.2s ease-in-out;
1543
+ -webkit-transition: background-color 0.2s ease-in-out;
1544
+ -ms-transition: background-color 0.2s ease-in-out;
1545
+ }
1546
+
1547
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-search-filter-wrap {
1548
+ padding: 0;
1549
+ position: relative;
1550
+ float: left;
1551
+ }
1552
+
1553
+ .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input {
1554
+ -webkit-appearance: none;
1555
+ -moz-appearance: none;
1556
+ appearance: none;
1557
+ padding: 11px;
1558
+ background: transparent;
1559
+ font-size: 12px;
1560
+ font-weight: 600;
1561
+ font-family: "Dosis", sans-serif;
1562
+ border: 1px solid #666;
1563
+ color: #666;
1564
+ }
1565
+
1566
+ .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input:focus {
1567
+ box-shadow: none;
1568
+ outline: none;
1569
+ }
1570
+
1571
+ .rt-filter-item-wrap.rt-search-filter-wrap span.rt-action {
1572
+ position: absolute;
1573
+ left: 5px;
1574
+ top: 6px;
1575
+ font-size: 15px;
1576
+ display: inline-block;
1577
+ cursor: pointer;
1578
+ }
1579
+
1580
+ .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input::-webkit-input-placeholder {
1581
+ font-size: 12px;
1582
+ font-weight: 600;
1583
+ font-family: "Dosis", sans-serif;
1584
+ }
1585
+
1586
+ .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input::-moz-placeholder {
1587
+ font-size: 12px;
1588
+ font-weight: 600;
1589
+ font-family: "Dosis", sans-serif;
1590
+ }
1591
+
1592
+ .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input:-ms-input-placeholder {
1593
+ font-size: 12px;
1594
+ font-weight: 600;
1595
+ font-family: "Dosis", sans-serif;
1596
+ }
1597
+
1598
+ .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input:-moz-placeholder {
1599
+ font-size: 12px;
1600
+ font-weight: 600;
1601
+ font-family: "Dosis", sans-serif;
1602
+ }
1603
+
1604
+ @media (max-width: 600px) {
1605
+ .rt-filter-item-wrap.rt-tax-filter.rt-filter-dropdown-wrap {
1606
+ display: block;
1607
+ margin-bottom: 10px;
1608
+ }
1609
+
1610
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap > .rt-filter-dropdown-default {
1611
+ margin: 0 auto;
1612
+ }
1613
+ }
1614
+
1615
+ /***************************
1616
+ Tooltip Style
1617
+ ****************************/
1618
+
1619
+ .rt-tpg-social-share.a {
1620
+ position: relative;
1621
+ }
1622
+
1623
+ body > .rt-tooltip {
1624
+ font-size: 100%;
1625
+ position: absolute;
1626
+ z-index: 9999;
1627
+ -o-box-shadow: 0 0 5px #aaa;
1628
+ -moz-box-shadow: 0 0 5px #aaa;
1629
+ -webkit-box-shadow: 0 0 5px #aaa;
1630
+ box-shadow: 0 0 5px #aaa;
1631
+ color: #fff;
1632
+ border-radius: 3px;
1633
+ background: #666;
1634
+ padding: 5px 10px;
1635
+ border-width: 2px;
1636
+ opacity: 0;
1637
+ pointer-events: none;
1638
+ -webkit-transition: opacity 1s ease-in-out;
1639
+ -moz-transition: opacity 1s ease-in-out;
1640
+ -ms-transition: opacity 1s ease-in-out;
1641
+ -o-transition: opacity 1s ease-in-out;
1642
+ transition: opacity 1s ease-in-out;
1643
+ }
1644
+
1645
+ body > .rt-tooltip .rt-tooltip-content {
1646
+ font-size: 90%;
1647
+ }
1648
+
1649
+ body > .rt-tooltip,
1650
+ body > .rt-tooltip .rt-tooltip-bottom:after {
1651
+ background: #000;
1652
+ border-radius: 2px;
1653
+ }
1654
+
1655
+ body > .rt-tooltip .rt-tooltip-bottom {
1656
+ width: 70px;
1657
+ height: 18px;
1658
+ overflow: hidden;
1659
+ position: absolute;
1660
+ right: 50%;
1661
+ margin-right: -32px;
1662
+ bottom: -16px;
1663
+ }
1664
+
1665
+ body > .rt-tooltip .rt-tooltip-bottom:after {
1666
+ content: "";
1667
+ position: absolute;
1668
+ right: 20px;
1669
+ top: -20px;
1670
+ width: 25px;
1671
+ height: 25px;
1672
+ -webkit-transform: rotate(-45deg);
1673
+ -moz-transform: rotate(-45deg);
1674
+ -ms-transform: rotate(-45deg);
1675
+ -o-transform: rotate(-45deg);
1676
+ tranform: rotate(45deg);
1677
+ }
1678
+
1679
+ /******************************************
1680
+ Common Layout Style
1681
+ ********************************************/
1682
+
1683
+
1684
+ .rt-tpg-container .rt-holder .rt-img-holder {
1685
+ position: relative;
1686
+ overflow: hidden;
1687
+ }
1688
+
1689
+ .rt-tpg-container .rt-holder .tpg-el-image-wrap {
1690
+ margin: -15px -15px 15px;
1691
+ }
1692
+
1693
+ .rt-tpg-container .list-behaviour .rt-holder .tpg-el-image-wrap {
1694
+ margin: 0;
1695
+ }
1696
+
1697
+ .rt-tpg-container .rt-holder:hover .rt-img-holder img:not(.avatar) {
1698
+ -webkit-transform: scale(1.1);
1699
+ -moz-transform: scale(1.1);
1700
+ -ms-transform: scale(1.1);
1701
+ -o-transform: scale(1.1);
1702
+ transform: scale(1.1);
1703
+ }
1704
+
1705
+ .rt-tpg-container .img_zoom_out .rt-holder .rt-img-holder img:not(.avatar) {
1706
+ -webkit-transform: scale(1.1);
1707
+ -moz-transform: scale(1.1);
1708
+ -ms-transform: scale(1.1);
1709
+ -o-transform: scale(1.1);
1710
+ transform: scale(1.1);
1711
+ }
1712
+
1713
+ .rt-tpg-container .img_no_effect .rt-holder:hover .rt-img-holder img,
1714
+ .rt-tpg-container .img_zoom_out .rt-holder:hover .rt-img-holder img {
1715
+ -webkit-transform: scale(1);
1716
+ -moz-transform: scale(1);
1717
+ -ms-transform: scale(1);
1718
+ -o-transform: scale(1);
1719
+ transform: scale(1);
1720
+ }
1721
+
1722
+
1723
+ .rt-tpg-container .rt-holder .rt-detail {
1724
+ padding: 15px 15px 0;
1725
+ }
1726
+
1727
+ .rt-tpg-container .entry-title-wrapper .entry-title {
1728
+ font-size: 26px;
1729
+ line-height: 1.25;
1730
+ margin: 0 0 18px;
1731
+ font-weight: 500;
1732
+ }
1733
+
1734
+ @media (max-width: 767px) {
1735
+ .rt-tpg-container .entry-title-wrapper .entry-title {
1736
+ font-size: 20px;
1737
+ margin: 0 0 15px;
1738
+ }
1739
+ }
1740
+
1741
+ .rt-tpg-container .rt-holder .rt-detail .entry-title-wrapper {
1742
+ margin-bottom: 15px;
1743
+ }
1744
+
1745
+ .rt-tpg-container .rt-detail .tpg-excerpt-inner {
1746
+ margin-bottom: 15px;
1747
+ }
1748
+
1749
+ .rt-tpg-container .list-layout2 .rt-detail .tpg-excerpt-inner,
1750
+ .rt-tpg-container .list-layout3 .rt-detail .tpg-excerpt-inner {
1751
+ margin-bottom: 0;
1752
+ }
1753
+
1754
+
1755
+ .rt-tpg-container .rt-holder .rt-detail .post-meta {
1756
+ line-height: 25px;
1757
+ overflow: hidden;
1758
+ }
1759
+
1760
+ .rt-tpg-container .rt-holder .rt-detail .read-more a {
1761
+ overflow: hidden;
1762
+ display: inline-flex;
1763
+ flex-direction: row;
1764
+ flex-wrap: wrap;
1765
+ justify-content: left;
1766
+ align-items: center;
1767
+ padding: 8px 20px;
1768
+ font-size: 15px;
1769
+ line-height: 1.8;
1770
+ border: 1px solid rgb(203 203 203 / 40%)
1771
+ }
1772
+
1773
+ .rt-tpg-container .rt-holder .rt-detail .read-more a:hover {
1774
+ color: #7a64f2;
1775
+ border-color: #7a64f2;
1776
+ }
1777
+
1778
+ .rt-tpg-container .rt-holder .rt-detail .read-more a {
1779
+ color: #1a1a1a;
1780
+ }
1781
+
1782
+ .rt-tpg-container .rt-holder .rt-detail .post-meta.right {
1783
+ text-align: left;
1784
+ }
1785
+
1786
+ .rt-tpg-container .rt-holder .rt-detail .post-meta.center {
1787
+ text-align: center;
1788
+ }
1789
+
1790
+ .tpg-img-circle .rt-img-holder img {
1791
+ border-radius: 50% !important;
1792
+ }
1793
+
1794
+
1795
+ /*
1796
+ * Animation
1797
+ */
1798
+ @-webkit-keyframes ball-scale-multiple {
1799
+ 0% {
1800
+ opacity: 0;
1801
+ -webkit-transform: scale(0);
1802
+ transform: scale(0);
1803
+ }
1804
+ 5% {
1805
+ opacity: .75;
1806
+ }
1807
+ 100% {
1808
+ opacity: 0;
1809
+ -webkit-transform: scale(1);
1810
+ transform: scale(1);
1811
+ }
1812
+ }
1813
+
1814
+ @-moz-keyframes ball-scale-multiple {
1815
+ 0% {
1816
+ opacity: 0;
1817
+ -moz-transform: scale(0);
1818
+ transform: scale(0);
1819
+ }
1820
+ 5% {
1821
+ opacity: .75;
1822
+ }
1823
+ 100% {
1824
+ opacity: 0;
1825
+ -moz-transform: scale(1);
1826
+ transform: scale(1);
1827
+ }
1828
+ }
1829
+
1830
+ @-o-keyframes ball-scale-multiple {
1831
+ 0% {
1832
+ opacity: 0;
1833
+ -o-transform: scale(0);
1834
+ transform: scale(0);
1835
+ }
1836
+ 5% {
1837
+ opacity: .75;
1838
+ }
1839
+ 100% {
1840
+ opacity: 0;
1841
+ -o-transform: scale(1);
1842
+ transform: scale(1);
1843
+ }
1844
+ }
1845
+
1846
+ @keyframes ball-scale-multiple {
1847
+ 0% {
1848
+ opacity: 0;
1849
+ -webkit-transform: scale(0);
1850
+ -moz-transform: scale(0);
1851
+ -o-transform: scale(0);
1852
+ transform: scale(0);
1853
+ }
1854
+ 5% {
1855
+ opacity: .75;
1856
+ }
1857
+ 100% {
1858
+ opacity: 0;
1859
+ -webkit-transform: scale(1);
1860
+ -moz-transform: scale(1);
1861
+ -o-transform: scale(1);
1862
+ transform: scale(1);
1863
+ }
1864
+ }
1865
+
1866
+ @-webkit-keyframes ball-clip-rotate {
1867
+ 0% {
1868
+ -webkit-transform: rotate(0deg);
1869
+ transform: rotate(0deg);
1870
+ }
1871
+ 50% {
1872
+ -webkit-transform: rotate(-180deg);
1873
+ transform: rotate(-180deg);
1874
+ }
1875
+ 100% {
1876
+ -webkit-transform: rotate(-360deg);
1877
+ transform: rotate(-360deg);
1878
+ }
1879
+ }
1880
+
1881
+ @-moz-keyframes ball-clip-rotate {
1882
+ 0% {
1883
+ -moz-transform: rotate(0deg);
1884
+ transform: rotate(0deg);
1885
+ }
1886
+ 50% {
1887
+ -moz-transform: rotate(-180deg);
1888
+ transform: rotate(-180deg);
1889
+ }
1890
+ 100% {
1891
+ -moz-transform: rotate(-360deg);
1892
+ transform: rotate(-360deg);
1893
+ }
1894
+ }
1895
+
1896
+ @-o-keyframes ball-clip-rotate {
1897
+ 0% {
1898
+ -o-transform: rotate(0deg);
1899
+ transform: rotate(0deg);
1900
+ }
1901
+ 50% {
1902
+ -o-transform: rotate(-180deg);
1903
+ transform: rotate(-180deg);
1904
+ }
1905
+ 100% {
1906
+ -o-transform: rotate(-360deg);
1907
+ transform: rotate(-360deg);
1908
+ }
1909
+ }
1910
+
1911
+ @keyframes ball-clip-rotate {
1912
+ 0% {
1913
+ -webkit-transform: rotate(0deg);
1914
+ -moz-transform: rotate(0deg);
1915
+ -o-transform: rotate(0deg);
1916
+ transform: rotate(0deg);
1917
+ }
1918
+ 50% {
1919
+ -webkit-transform: rotate(-180deg);
1920
+ -moz-transform: rotate(-180deg);
1921
+ -o-transform: rotate(-180deg);
1922
+ transform: rotate(-180deg);
1923
+ }
1924
+ 100% {
1925
+ -webkit-transform: rotate(-360deg);
1926
+ -moz-transform: rotate(-360deg);
1927
+ -o-transform: rotate(-360deg);
1928
+ transform: rotate(-360deg);
1929
+ }
1930
+ }
1931
+
1932
+ .rt-container-fluid {
1933
+ position: relative;
1934
+ }
1935
+
1936
+ #bottom-script-loader {
1937
+ position: absolute;
1938
+ width: 100%;
1939
+ height: 100%;
1940
+ z-index: 20;
1941
+ background: rgba(255, 255, 255, 0.95);
1942
+ }
1943
+
1944
+ #bottom-script-loader .rt-ball-clip-rotate {
1945
+ color: var(--tpg-primary-color);
1946
+ position: absolute;
1947
+ top: 80px;
1948
+ right: 50%;
1949
+ margin-right: -16px;
1950
+ z-index: 2;
1951
+ }
1952
+
1953
+ /*----------- Widget Heading -------------*/
1954
+
1955
+ .tpg-widget-heading-wrapper {
1956
+ position: relative;
1957
+ margin-bottom: 30px;
1958
+ display: flex;
1959
+ }
1960
+
1961
+ .tpg-widget-heading-wrapper .tpg-widget-heading {
1962
+ position: relative;
1963
+ padding-left: 15px;
1964
+ margin-top: 0;
1965
+ padding-top: 0;
1966
+ margin-bottom: -1px;
1967
+ line-height: 1;
1968
+ }
1969
+
1970
+ .search .tpg-widget-heading-wrapper .tpg-widget-heading {
1971
+ line-height: 1.5
1972
+ }
1973
+
1974
+ @meia (max-width: 767px) {
1975
+ .tpg-widget-heading-wrapper .tpg-widget-heading {
1976
+ line-height: 1.2;
1977
+ }
1978
+ }
1979
+
1980
+ .tpg-widget-heading-wrapper.center .tpg-widget-heading {
1981
+ margin: 0;
1982
+ padding: 0;
1983
+ }
1984
+
1985
+ .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading::before {
1986
+ content: '';
1987
+ position: absolute;
1988
+ top: 50%;
1989
+ left: -7.5px;
1990
+ width: 8px;
1991
+ height: 8px;
1992
+ margin-top: -4px;
1993
+ border-radius: 50%;
1994
+ background-color: var(--tpg-primary-color);
1995
+ margin-left: 7px;
1996
+ display: inline-block;
1997
+ }
1998
+
1999
+ .tpg-widget-heading-wrapper.heading-style1.center .tpg-widget-heading::before {
2000
+ display: none;
2001
+ }
2002
+
2003
+ .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line.line-left {
2004
+ display: none;
2005
+ }
2006
+
2007
+ .tpg-widget-heading-wrapper.heading-style1.center .tpg-widget-heading-line.line-left {
2008
+ display: block;
2009
+ margin-right: 0;
2010
+ margin-left: 15px;
2011
+ }
2012
+
2013
+ .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line-left,
2014
+ .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line {
2015
+ /*border: 1px solid;*/
2016
+ border-style: solid;
2017
+ border-color: #e5e5e5;
2018
+ border-width: 1px 0;
2019
+ -webkit-box-flex: 1;
2020
+ align-self: center;
2021
+ margin-right: 15px;
2022
+ -ms-flex-positive: 1;
2023
+ flex-grow: 1;
2024
+ height: 4px;
2025
+ }
2026
+
2027
+ .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading,
2028
+ .tpg-widget-heading-wrapper.heading-style3 .tpg-widget-heading {
2029
+ background-color: var(--tpg-primary-color);
2030
+ color: #fff;
2031
+ line-height: 1.4;
2032
+ padding: 5px 15px;
2033
+ margin-bottom: -.5px;
2034
+ }
2035
+
2036
+ .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading a,
2037
+ .tpg-widget-heading-wrapper.heading-style3 .tpg-widget-heading a {
2038
+ color: inherit;
2039
+ }
2040
+
2041
+ .tpg-widget-heading-wrapper.center {
2042
+ justify-content: center;
2043
+ }
2044
+
2045
+ .tpg-widget-heading-wrapper.right {
2046
+ flex-direction: row-reverse;
2047
+ }
2048
+
2049
+ .tpg-widget-heading-wrapper.right .tpg-widget-heading {
2050
+ padding-right: 15px;
2051
+ padding-left: 0;
2052
+ }
2053
+
2054
+ .tpg-widget-heading-wrapper.right .tpg-widget-heading::before {
2055
+ right: 0;
2056
+ left: auto;
2057
+ }
2058
+
2059
+ .tpg-widget-heading-wrapper.right .tpg-widget-heading-line {
2060
+ margin-right: 0;
2061
+ margin-left: 15px;
2062
+ }
2063
+
2064
+ .tpg-el-main-wrapper .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::before,
2065
+ .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::after {
2066
+ content: "";
2067
+ position: absolute;
2068
+ top: 0;
2069
+ left: -11px;
2070
+ border-width: 12px 0 0 12px;
2071
+ border-style: solid;
2072
+ border-color: var(--tpg-primary-color) transparent;
2073
+ }
2074
+
2075
+ .section-title-align-center .tpg-el-main-wrapper .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::before {
2076
+ left: auto;
2077
+ right: -11px;
2078
+ border-width: 12px 12px 0 0;
2079
+ }
2080
+
2081
+ .tpg-widget-heading-wrapper.heading-style2.right .tpg-widget-heading::after {
2082
+ right: -11px;
2083
+ left: auto;
2084
+ border-width: 12px 12px 0 0;
2085
+ }
2086
+
2087
+ .tpg-widget-heading-wrapper.heading-style2.center .tpg-widget-heading::after {
2088
+ content: none;
2089
+ }
2090
+
2091
+ .section-title-style-style2 .tpg-header-wrapper:not(.carousel) .tpg-widget-heading-wrapper,
2092
+ .section-title-style-style3 .tpg-header-wrapper:not(.carousel) .tpg-widget-heading-wrapper,
2093
+ .section-title-style-style2 .tpg-header-wrapper.carousel,
2094
+ .section-title-style-style3 .tpg-header-wrapper.carousel {
2095
+ border-bottom: 2px solid var(--tpg-primary-color);
2096
+ }
2097
+
2098
+
2099
+ /*End Widget Heading*/
2100
+
2101
+ /*===============
2102
+ TPG EVEN Style
2103
+ ==================*/
2104
+
2105
+ .tpg-full-height,
2106
+ .tpg-even {
2107
+ display: -ms-flexbox;
2108
+ display: flex;
2109
+ -ms-flex-wrap: wrap;
2110
+ flex-wrap: wrap;
2111
+ }
2112
+
2113
+
2114
+ @media (max-width: 767px) {
2115
+ .tpg-even .even-grid-item {
2116
+ width: 100%;
2117
+ }
2118
+ }
2119
+
2120
+ @media (max-width: 767px) {
2121
+ .rt-content-loader .rt-holder,
2122
+ .tpg-even .rt-holder {
2123
+ flex-direction: column;
2124
+ }
2125
+ }
2126
+
2127
+ /**********************************************************************/
2128
+ /********************************* pagination *************************/
2129
+ /**********************************************************************/
2130
+ .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > * {
2131
+ margin-right: 1px;
2132
+ margin-left: 1px;
2133
+ font-size: 16px;
2134
+ line-height: 1.55;
2135
+ display: inline-block;
2136
+ width: 30px;
2137
+ height: 30px;
2138
+ text-align: center;
2139
+ font-size: 18px;
2140
+ background-color: #bcbcbc;
2141
+ color: #fff;
2142
+ line-height: 30px;
2143
+ bottom: auto;
2144
+ cursor: pointer;
2145
+ transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2146
+ -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2147
+ -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2148
+ }
2149
+
2150
+ .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > * i {
2151
+ line-height: 1;
2152
+ }
2153
+
2154
+ .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > .rt-disabled {
2155
+ opacity: 0.5;
2156
+ pointer-events: none;
2157
+ }
2158
+
2159
+ .rt-cb-page-prev-next {
2160
+ text-align: right;
2161
+ }
2162
+
2163
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style .rt-loadmore-loading {
2164
+ color: #fff;
2165
+ position: absolute;
2166
+ top: 50%;
2167
+ right: 50%;
2168
+ margin-top: -32px;
2169
+ margin-right: -32px;
2170
+ visibility: hidden;
2171
+ opacity: 0;
2172
+ }
2173
+
2174
+ .rt-ball-scale-multiple.rt-2x {
2175
+ width: 64px;
2176
+ height: 64px;
2177
+ }
2178
+
2179
+ .rt-ball-scale-multiple.rt-2x > div {
2180
+ width: 64px;
2181
+ height: 64px;
2182
+ }
2183
+
2184
+ .rt-ball-scale-multiple, .rt-ball-scale-multiple > div {
2185
+ position: relative;
2186
+ -webkit-box-sizing: border-box;
2187
+ -moz-box-sizing: border-box;
2188
+ box-sizing: border-box;
2189
+ }
2190
+
2191
+ .rt-ball-scale-multiple > div {
2192
+ display: inline-block;
2193
+ float: none;
2194
+ background-color: currentColor;
2195
+ border: 0 solid currentColor;
2196
+ }
2197
+
2198
+ .rt-ball-scale-multiple > div:nth-child(2) {
2199
+ -webkit-animation-delay: .2s;
2200
+ -moz-animation-delay: .2s;
2201
+ -o-animation-delay: .2s;
2202
+ animation-delay: .2s;
2203
+ }
2204
+
2205
+ .rt-ball-scale-multiple > div {
2206
+ position: absolute;
2207
+ top: 0;
2208
+ right: 0;
2209
+ width: 32px;
2210
+ height: 32px;
2211
+ border-radius: 100%;
2212
+ opacity: 0;
2213
+ -webkit-animation: ball-scale-multiple 1s 0s linear infinite;
2214
+ -moz-animation: ball-scale-multiple 1s 0s linear infinite;
2215
+ -o-animation: ball-scale-multiple 1s 0s linear infinite;
2216
+ animation: ball-scale-multiple 1s 0s linear infinite;
2217
+ }
2218
+
2219
+ .rt-tpg-container .rt-pagination-wrap {
2220
+ text-align: center;
2221
+ margin-top: 10px;
2222
+ display: inline-block;
2223
+ width: 100%;
2224
+ }
2225
+
2226
+ .tpg-el-main-wrapper .rt-pagination-wrap {
2227
+ display: flex;
2228
+ flex-direction: row;
2229
+ justify-content: center;
2230
+ margin-top: 30px;
2231
+ }
2232
+
2233
+ .tpg-el-main-wrapper .rt-pagination-wrap .rt-pagination {
2234
+ margin: 0;
2235
+ }
2236
+
2237
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style {
2238
+ cursor: pointer;
2239
+ position: relative;
2240
+ user-select: none;
2241
+ -webkit-user-select: none;
2242
+ }
2243
+
2244
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-hidden-elm,
2245
+ .rt-tpg-container .rt-pagination-wrap .rt-infinite-action.rt-hidden-elm,
2246
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers.rt-hidden-elm,
2247
+ .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next.rt-hidden-elm {
2248
+ display: none !important;
2249
+ }
2250
+
2251
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-lm-loading .rt-loadmore-text {
2252
+ opacity: 0;
2253
+ visibility: hidden;
2254
+ }
2255
+
2256
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-lm-loading .rt-loadmore-loading {
2257
+ opacity: 1;
2258
+ visibility: visible;
2259
+ }
2260
+
2261
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn {
2262
+ font-size: 13px;
2263
+ letter-spacing: 0.1em;
2264
+ text-transform: uppercase;
2265
+ margin-top: 30px;
2266
+ color: #fff;
2267
+ background-color: var(--tpg-primary-color);
2268
+ text-decoration: none;
2269
+ padding: 9px 20px 8px 20px;
2270
+ display: inline-block;
2271
+ transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2272
+ -webkit-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2273
+ -ms-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2274
+ }
2275
+
2276
+ .rt-tpg-container .rt-loadmore-btn:hover {
2277
+ background-color: var(--tpg-secondary-color);
2278
+ }
2279
+
2280
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages {
2281
+ float: none;
2282
+ padding-top: 0.1px;
2283
+ padding-bottom: 0.1px;
2284
+ }
2285
+
2286
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers.rt-lm-loading {
2287
+ pointer-events: none;
2288
+ opacity: 0.5;
2289
+ }
2290
+
2291
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul {
2292
+ float: none;
2293
+ text-align: center;
2294
+ font-size: 0;
2295
+ line-height: 0;
2296
+ margin: -2px;
2297
+ }
2298
+
2299
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li {
2300
+ float: none;
2301
+ font-size: 16px;
2302
+ line-height: 1.55;
2303
+ display: inline-block;
2304
+ min-width: 48px;
2305
+ min-height: 45px;
2306
+ border: none;
2307
+ padding: 2px;
2308
+ }
2309
+
2310
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li > a {
2311
+ border-radius: 3px;
2312
+ text-decoration: none;
2313
+ min-width: 48px;
2314
+ min-height: 45px;
2315
+ line-height: 45px;
2316
+ font-size: 16px;
2317
+ font-weight: normal;
2318
+ letter-spacing: 0;
2319
+ border: 1px solid #dee2e6;
2320
+ display: block;
2321
+ padding-right: 8px;
2322
+ padding-left: 8px;
2323
+ color: #212121;
2324
+ }
2325
+
2326
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active > a {
2327
+ background-color: var(--tpg-primary-color);
2328
+ border-color: var(--tpg-primary-color);
2329
+ color: #ffffff;
2330
+ }
2331
+
2332
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.paginationjs-ellipsis {
2333
+ padding: 0;
2334
+ min-width: auto;
2335
+ }
2336
+
2337
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.paginationjs-ellipsis a {
2338
+ border: none !important;
2339
+ pointer-events: none !important;
2340
+ color: #000 !important;
2341
+ opacity: 1;
2342
+ font-size: 18px;
2343
+ min-width: auto;
2344
+ background: none !important;
2345
+ }
2346
+
2347
+ /* old pagination */
2348
+
2349
+ .rt-pagination {
2350
+ text-align: center;
2351
+ margin: 30px 0;
2352
+ }
2353
+
2354
+ .rt-pagination .pagination-list {
2355
+ display: inline-block;
2356
+ padding-right: 0;
2357
+ border-radius: 4px;
2358
+ background: transparent;
2359
+ border-top: 0;
2360
+ }
2361
+
2362
+ .rt-pagination .pagination-list a {
2363
+ box-shadow: none;
2364
+ }
2365
+
2366
+ .rt-pagination .pagination-list > li {
2367
+ display: inline-block;
2368
+ margin: 2px 2px;
2369
+ }
2370
+
2371
+ .rt-pagination .pagination-list > li > a,
2372
+ .rt-pagination .pagination-list > li > span {
2373
+ position: relative;
2374
+ padding: 0 5px;
2375
+ line-height: 45px;
2376
+ text-decoration: none;
2377
+ color: #212121;
2378
+ background-color: #ffffff;
2379
+ border: 1px solid #dddddd;
2380
+ margin-right: -1px;
2381
+ transition: 0.4s ease-in-out;
2382
+ min-width: 48px;
2383
+ min-height: 45px;
2384
+ border-radius: 3px;
2385
+ display: block;
2386
+ }
2387
+
2388
+ .rt-pagination .pagination-list > li > a:hover,
2389
+ .rt-pagination .pagination-list > li > span:hover,
2390
+ .rt-pagination .pagination-list > li > a:focus,
2391
+ .rt-pagination .pagination-list > li > span:focus {
2392
+ z-index: 2;
2393
+ color: #ffffff;
2394
+ background-color: var(--tpg-primary-color);
2395
+ border-color: var(--tpg-primary-color);
2396
+ }
2397
+
2398
+ .rt-pagination .pagination-list > .active > a,
2399
+ .rt-pagination .pagination-list > .active > span,
2400
+ .rt-pagination .pagination-list > .active > a:hover,
2401
+ .rt-pagination .pagination-list > .active > span:hover,
2402
+ .rt-pagination .pagination-list > .active > a:focus,
2403
+ .rt-pagination .pagination-list > .active > span:focus {
2404
+ z-index: 3;
2405
+ color: #ffffff;
2406
+ background-color: var(--tpg-primary-color);
2407
+ border-color: var(--tpg-primary-color);
2408
+ cursor: default;
2409
+ }
2410
+
2411
+ .rt-pagination .pagination-list > .disabled > span,
2412
+ .rt-pagination .pagination-list > .disabled > span:hover,
2413
+ .rt-pagination .pagination-list > .disabled > span:focus,
2414
+ .rt-pagination .pagination-list > .disabled > a,
2415
+ .rt-pagination .pagination-list > .disabled > a:hover,
2416
+ .rt-pagination .pagination-list > .disabled > a:focus {
2417
+ color: #212121;
2418
+ background-color: #ffffff;
2419
+ border-color: #dddddd;
2420
+ cursor: not-allowed;
2421
+ /*pointer-events: none;*/
2422
+ }
2423
+
2424
+
2425
+ /*---------- Swiper Pagination --------*/
2426
+
2427
+ .rt-tpg-container .swiper-pagination-bullet {
2428
+ background: #D6D6D6;
2429
+ opacity: 1;
2430
+ width: 10px;
2431
+ height: 10px;
2432
+ }
2433
+
2434
+ .rt-tpg-container .swiper-wrapper {
2435
+ padding-bottom: 45px;
2436
+ }
2437
+
2438
+ .rt-tpg-container.slider-layout13-main .swiper-wrapper {
2439
+ padding-bottom: 0;
2440
+ }
2441
+
2442
+ .rt-tpg-container .swiper-pagination-bullets.swiper-pagination-horizontal {
2443
+ bottom: 0;
2444
+ }
2445
+
2446
+ .rt-tpg-container .swiper-pagination-bullet.swiper-pagination-bullet-active-main {
2447
+ background: #007bff;
2448
+ }
2449
+
2450
+ .rt-tpg-container .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev,
2451
+ .rt-tpg-container .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
2452
+ transform: scale(.6);
2453
+ }
2454
+
2455
+ .rt-tpg-container .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next,
2456
+ .rt-tpg-container .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
2457
+ transform: scale(0.8);
2458
+ }
2459
+
2460
+ /*---------- Swiper Navigation -------------*/
2461
+
2462
+ .rt-tpg-container > div {
2463
+ position: relative;
2464
+ }
2465
+
2466
+ .rt-tpg-container .slider-main-wrapper {
2467
+ position: relative;
2468
+ }
2469
+
2470
+ .rt-tpg-container .swiper-navigation .slider-btn {
2471
+ position: absolute;
2472
+ font-size: 14px;
2473
+ color: #2962ff;
2474
+ background-color: #fff;
2475
+ width: 34px;
2476
+ height: 32px;
2477
+ border-radius: 3px;
2478
+ display: -webkit-inline-box;
2479
+ display: -ms-inline-flexbox;
2480
+ display: inline-flex;
2481
+ -webkit-box-pack: center;
2482
+ -ms-flex-pack: center;
2483
+ justify-content: center;
2484
+ -webkit-box-align: center;
2485
+ -ms-flex-align: center;
2486
+ align-items: center;
2487
+ border: 1px solid #e5e5e5;
2488
+ background-image: none;
2489
+ transition: all 0.3s ease;
2490
+ -webkit-transition: all 0.3s ease;
2491
+ -moz-transition: all 0.3s ease;
2492
+ -ms-transition: all 0.3s ease;
2493
+ }
2494
+
2495
+ .rt-tpg-container .tpg-header-wrapper .swiper-navigation .slider-btn,
2496
+ .slider-arrow-position-top-left .rt-tpg-container .swiper-navigation .slider-btn,
2497
+ .slider-arrow-position-top-right .rt-tpg-container .swiper-navigation .slider-btn {
2498
+ position: static;
2499
+ }
2500
+
2501
+ .rt-tpg-container .swiper-navigation .slider-btn:hover {
2502
+ color: #fff;
2503
+ background-color: #2962ff;
2504
+ border-color: #2962ff;
2505
+ }
2506
+
2507
+ .rt-tpg-container .swiper-navigation .slider-btn:focus {
2508
+ outline: 0;
2509
+ -webkit-box-shadow: none;
2510
+ box-shadow: none;
2511
+ }
2512
+
2513
+ .rt-tpg-container .swiper-navigation .slider-btn.swiper-button-next {
2514
+ margin-right: 3px;
2515
+ }
2516
+
2517
+ .rt-tpg-container .swiper-navigation .swiper-button-next:after,
2518
+ .rt-tpg-container .swiper-navigation .swiper-button-prev:after {
2519
+ font-size: inherit;
2520
+ }
2521
+
2522
+ /*ACF Style*/
2523
+
2524
+ .rt-tpg-container .tpg-cf-group-title {
2525
+ font-size: 16px;
2526
+ margin-bottom: 0;
2527
+ }
2528
+
2529
+ .rt-tpg-container .tpg-cf-fields {
2530
+ margin-top: 0;
2531
+ font-size: 95%;
2532
+ line-height: 1.6;
2533
+ }
2534
+
2535
+ .tpg-el-main-wrapper .tpg-cf-wrap {
2536
+ margin: 10px 0 0;
2537
+ }
2538
+
2539
+ .rt-tpg-container .tpg-cf-wrap:empty {
2540
+ margin: 0;
2541
+ }
2542
+
2543
+ .act-label-style-inline .tgp-cf-field-label {
2544
+ margin-left: 8px;
2545
+ min-width: inherit;
2546
+ }
2547
+
2548
+ .act-label-style-inline .tgp-cf-field-label::after {
2549
+ content: ":";
2550
+ }
2551
+
2552
+ .act-label-style-block .tgp-cf-field-label {
2553
+ margin-left: 0;
2554
+ float: none;
2555
+ display: block !important;
2556
+ min-width: inherit;
2557
+ }
2558
+
2559
+ .act-label-style-block .tpg-cf-fields {
2560
+ display: block;
2561
+ margin-bottom: 5px;
2562
+ }
2563
+
2564
+ .rt-tpg-container .rt-holder .tgp-cf-field-value * {
2565
+ color: inherit;
2566
+ transition: none;
2567
+ margin: 0;
2568
+ display: inline;
2569
+ }
2570
+
2571
+ /*End ACF Style*/
2572
+
2573
+ .isotope-term-no-post {
2574
+ min-height: 30px;
2575
+ }
2576
+ .isotope-term-no-post p {
2577
+ margin-bottom: 0;
2578
+ display: none;
2579
+ }
assets/css/rt-tpg-common.css ADDED
@@ -0,0 +1,2579 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***********************************************************************/
2
+ /**************************** The Post Grid ****************************/
3
+ /********************** support@radiustheme.com ************************/
4
+ /*************************** Common Style ******************************/
5
+ /***********************************************************************/
6
+
7
+
8
+ /***************************** Common Grid Style ******************************/
9
+
10
+ body .tpg-el-main-wrapper .rt-grid-item {
11
+ padding: 0 15px;
12
+ }
13
+
14
+ body .elementor-section .tpg-el-main-wrapper .rt-grid-item {
15
+ background: none;
16
+ }
17
+
18
+ body .elementor-section .tpg-el-main-wrapper .offset-left,
19
+ body .elementor-section .tpg-el-main-wrapper .offset-right {
20
+ padding-bottom: 0;
21
+ }
22
+
23
+ .rt-tpg-container a {
24
+ text-decoration: none;
25
+ }
26
+
27
+ html.rt-model-open,
28
+ body.rt-model-open,
29
+ .rt-model-open {
30
+ overflow: hidden;
31
+ }
32
+
33
+ .rt-tpg-container * {
34
+ -webkit-box-sizing: border-box;
35
+ -moz-box-sizing: border-box;
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ .rt-tpg-container *:before,
40
+ .rt-tpg-container *:after {
41
+ -webkit-box-sizing: border-box;
42
+ -moz-box-sizing: border-box;
43
+ box-sizing: border-box;
44
+ }
45
+
46
+ .rt-container {
47
+ margin-right: auto;
48
+ margin-left: auto;
49
+ padding-left: 15px;
50
+ padding-right: 15px;
51
+ }
52
+
53
+ .rt-container-fluid {
54
+ margin-right: auto;
55
+ margin-left: auto;
56
+ padding-left: 15px;
57
+ padding-right: 15px;
58
+ }
59
+
60
+ .rt-container-fluid.slider-layout13-main {
61
+ padding: 0 0 15px;
62
+ }
63
+
64
+ .rt-tpg-container ul {
65
+ margin: 0;
66
+ }
67
+
68
+ img, svg {
69
+ vertical-align: middle;
70
+ }
71
+
72
+ a:link, a:visited {
73
+ transition: all ease 0.31s;
74
+ }
75
+
76
+ .clearfix:before, .clearfix:after, .rt-container-fluid:before, .rt-container-fluid:after, .rt-row:before, .rt-row:after {
77
+ content: " ";
78
+ display: table;
79
+ }
80
+
81
+ .clearfix:after,
82
+ .rt-container:after,
83
+ .rt-container-fluid:after,
84
+ .rt-row:after {
85
+ clear: both;
86
+ }
87
+
88
+ .rt-row {
89
+ margin-left: -15px;
90
+ margin-right: -15px;
91
+ }
92
+
93
+ .grid-layout2.rt-row {
94
+ margin-left: 0;
95
+ margin-right: 0;
96
+ }
97
+
98
+ .rt-row > .rt-row {
99
+ padding-left: 15px;
100
+ padding-right: 15px;
101
+ }
102
+
103
+ .grid_hover6.rt-row {
104
+ margin-left: -2px;
105
+ margin-right: -2px;
106
+ }
107
+
108
+ .rt-col-xs-1, .rt-col-sm-1, .rt-col-md-1, .rt-col-lg-1, .rt-col-xs-2, .rt-col-sm-2, .rt-col-md-2, .rt-col-lg-2, .rt-col-xs-3, .rt-col-sm-3, .rt-col-md-3, .rt-col-lg-3, .rt-col-xs-4, .rt-col-sm-4, .rt-col-md-4, .rt-col-lg-4, .rt-col-xs-5, .rt-col-sm-5, .rt-col-md-5, .rt-col-lg-5, .rt-col-xs-6, .rt-col-sm-6, .rt-col-md-6, .rt-col-lg-6, .rt-col-xs-7, .rt-col-sm-7, .rt-col-md-7, .rt-col-lg-7, .rt-col-xs-8, .rt-col-sm-8, .rt-col-md-8, .rt-col-lg-8, .rt-col-xs-9, .rt-col-sm-9, .rt-col-md-9, .rt-col-lg-9, .rt-col-xs-10, .rt-col-sm-10, .rt-col-md-10, .rt-col-lg-10, .rt-col-xs-11, .rt-col-sm-11, .rt-col-md-11, .rt-col-lg-11, .rt-col-xs-12, .rt-col-sm-12, .rt-col-md-12, .rt-col-lg-12, .rt-col-xs-24, .rt-col-sm-24, .rt-col-md-24, .rt-col-lg-24 {
109
+ position: relative;
110
+ min-height: 1px;
111
+ padding-left: 15px;
112
+ padding-right: 15px;
113
+ }
114
+
115
+ .rt-col-xs-1, .rt-col-xs-2, .rt-col-xs-3, .rt-col-xs-4, .rt-col-xs-5, .rt-col-xs-6, .rt-col-xs-7, .rt-col-xs-8, .rt-col-xs-9, .rt-col-xs-10, .rt-col-xs-11, .rt-col-xs-12, .rt-col-xs-24 {
116
+ float: left;
117
+ }
118
+
119
+ .rt-col-xs-24 {
120
+ width: 20%;
121
+ }
122
+
123
+ .rt-col-xs-12 {
124
+ width: 100%;
125
+ }
126
+
127
+ .rt-col-xs-11 {
128
+ width: 91.66666667%;
129
+ }
130
+
131
+ .rt-col-xs-10 {
132
+ width: 83.33333333%;
133
+ }
134
+
135
+ .rt-col-xs-9 {
136
+ width: 75%;
137
+ }
138
+
139
+ .rt-col-xs-8 {
140
+ width: 66.66666667%;
141
+ }
142
+
143
+ .rt-col-xs-7 {
144
+ width: 58.33333333%;
145
+ }
146
+
147
+ .rt-col-xs-6 {
148
+ width: 50%;
149
+ }
150
+
151
+ .rt-col-xs-5 {
152
+ width: 41.66666667%;
153
+ }
154
+
155
+ .rt-col-xs-4 {
156
+ width: 33.33333333%;
157
+ }
158
+
159
+ .rt-col-xs-3 {
160
+ width: 25%;
161
+ }
162
+
163
+ .rt-col-xs-2 {
164
+ width: 16.66666667%;
165
+ }
166
+
167
+ .rt-col-xs-1 {
168
+ width: 8.33333333%;
169
+ }
170
+
171
+ #rt-main {
172
+ margin: 35px auto;
173
+ }
174
+
175
+ .rt-tpg-container h3.entry-title {
176
+ line-height: 1.25;
177
+ margin: 0px 0px 12px;
178
+ }
179
+
180
+ .rt-tpg-container .offset-small-wrap .rt-holder .overlay {
181
+ min-height: 60px !important;
182
+ }
183
+
184
+ .rt-tpg-container .offset-small-wrap .rt-holder .rt-img-responsive {
185
+ height: auto;
186
+ width: 100%;
187
+ object-fit: cover;
188
+ }
189
+
190
+ .rt-tpg-container .offset-small-wrap .rt-col-md-6 .rt-holder .rt-img-responsive {
191
+ height: auto;
192
+ }
193
+
194
+ .rt-tpg-container .offset-small-wrap .rt-holder .overlay h3 a {
195
+ overflow: hidden !important;
196
+ text-overflow: ellipsis !important;
197
+ display: -webkit-box !important;
198
+ -webkit-line-clamp: 1 !important;
199
+ -webkit-box-orient: vertical;
200
+ }
201
+
202
+ .rt-tpg-container .offset-big .post-meta-user.above_title {
203
+ margin-top: 15px;
204
+ }
205
+
206
+ .rt-tpg-container .offset-big .post-meta-user.above_title + h3.entry-title {
207
+ margin-top: 0;
208
+ }
209
+
210
+ .rt-tpg-container .offset-big h3.entry-title {
211
+ margin: 20px 0px 15px;
212
+ }
213
+
214
+ .rt-tpg-container .offset-big .cat-above-title {
215
+ margin-bottom: -15px;
216
+ padding-top: 10px;
217
+ }
218
+
219
+ .rt-tpg-container .owl-controls .owl-dots {
220
+ margin-top: 15px;
221
+ }
222
+
223
+ .rt-popup-content .rt-tpg-container i {
224
+ margin-right: 5px;
225
+ }
226
+
227
+ /**********************************************************************/
228
+ /********************************* Media Query *************************/
229
+ /**********************************************************************/
230
+
231
+ @media (min-width: 992px) {
232
+ .rt-container {
233
+ width: 970px;
234
+ }
235
+ }
236
+
237
+ @media (min-width: 1200px) {
238
+ .rt-container {
239
+ width: 1170px;
240
+ }
241
+ }
242
+
243
+ @media (max-width: 767px) {
244
+ .hidden-xs {
245
+ display: none !important;
246
+ }
247
+ }
248
+
249
+ @media screen and (max-width: 768px) {
250
+ .rt-member-feature-img, .rt-member-description-container {
251
+ float: none;
252
+ width: 100%;
253
+ }
254
+ }
255
+
256
+ @media (min-width: 768px) {
257
+ .rt-col-sm-1, .rt-col-sm-2, .rt-col-sm-3, .rt-col-sm-4, .rt-col-sm-5, .rt-col-sm-6, .rt-col-sm-7, .rt-col-sm-8, .rt-col-sm-9, .rt-col-sm-10, .rt-col-sm-11, .rt-col-sm-12, .rt-col-sm-24 {
258
+ float: left;
259
+ }
260
+
261
+ .rt-col-sm-24 {
262
+ width: 20%;
263
+ }
264
+
265
+ .rt-col-sm-12 {
266
+ width: 100%;
267
+ }
268
+
269
+ .rt-col-sm-11 {
270
+ width: 91.66666667%;
271
+ }
272
+
273
+ .rt-col-sm-10 {
274
+ width: 83.33333333%;
275
+ }
276
+
277
+ .rt-col-sm-9 {
278
+ width: 75%;
279
+ }
280
+
281
+ .rt-col-sm-8 {
282
+ width: 66.66666667%;
283
+ }
284
+
285
+ .rt-col-sm-7 {
286
+ width: 58.33333333%;
287
+ }
288
+
289
+ .rt-col-sm-6 {
290
+ width: 50%;
291
+ }
292
+
293
+ .rt-col-sm-5 {
294
+ width: 41.66666667%;
295
+ }
296
+
297
+ .rt-col-sm-4 {
298
+ width: 33.33333333%;
299
+ }
300
+
301
+ .rt-col-sm-3 {
302
+ width: 25%;
303
+ }
304
+
305
+ .rt-col-sm-2 {
306
+ width: 16.66666667%;
307
+ }
308
+
309
+ .rt-col-sm-1 {
310
+ width: 8.33333333%;
311
+ }
312
+
313
+ }
314
+
315
+ @media (min-width: 992px) {
316
+ .rt-col-md-1, .rt-col-md-2, .rt-col-md-3, .rt-col-md-4, .rt-col-md-5, .rt-col-md-6, .rt-col-md-7, .rt-col-md-8, .rt-col-md-9, .rt-col-md-10, .rt-col-md-11, .rt-col-md-12, .rt-col-md-24 {
317
+ float: left;
318
+ }
319
+
320
+ .rt-col-md-24 {
321
+ width: 20%;
322
+ }
323
+
324
+ .rt-col-md-12 {
325
+ width: 100%;
326
+ }
327
+
328
+ .rt-col-md-11 {
329
+ width: 91.66666667%;
330
+ }
331
+
332
+ .rt-col-md-10 {
333
+ width: 83.33333333%;
334
+ }
335
+
336
+ .rt-col-md-9 {
337
+ width: 75%;
338
+ }
339
+
340
+ .rt-col-md-8 {
341
+ width: 66.66666667%;
342
+ }
343
+
344
+ .rt-col-md-7 {
345
+ width: 58.33333333%;
346
+ }
347
+
348
+ .rt-col-md-6 {
349
+ width: 50%;
350
+ }
351
+
352
+ .rt-col-md-5 {
353
+ width: 41.66666667%;
354
+ }
355
+
356
+ .rt-col-md-4 {
357
+ width: 33.33333333%;
358
+ }
359
+
360
+ .rt-col-md-3 {
361
+ width: 25%;
362
+ }
363
+
364
+ .rt-col-md-2 {
365
+ width: 16.66666667%;
366
+ }
367
+
368
+ .rt-col-md-1 {
369
+ width: 8.33333333%;
370
+ }
371
+
372
+ }
373
+
374
+ @media (min-width: 1200px) {
375
+ .rt-col-lg-1, .rt-col-lg-2, .rt-col-lg-3, .rt-col-lg-4, .rt-col-lg-5, .rt-col-lg-6, .rt-col-lg-7, .rt-col-lg-8, .rt-col-lg-9, .rt-col-lg-10, .rt-col-lg-11, .rt-col-lg-12 {
376
+ float: left;
377
+ }
378
+
379
+ .rt-col-lg-24 {
380
+ width: 20%;
381
+ }
382
+
383
+ .rt-col-lg-12 {
384
+ width: 100%;
385
+ }
386
+
387
+ .rt-col-lg-11 {
388
+ width: 91.66666667%;
389
+ }
390
+
391
+ .rt-col-lg-10 {
392
+ width: 83.33333333%;
393
+ }
394
+
395
+ .rt-col-lg-9 {
396
+ width: 75%;
397
+ }
398
+
399
+ .rt-col-lg-8 {
400
+ width: 66.66666667%;
401
+ }
402
+
403
+ .rt-col-lg-7 {
404
+ width: 58.33333333%;
405
+ }
406
+
407
+ .rt-col-lg-6 {
408
+ width: 50%;
409
+ }
410
+
411
+ .rt-col-lg-5 {
412
+ width: 41.66666667%;
413
+ }
414
+
415
+ .rt-col-lg-4 {
416
+ width: 33.33333333%;
417
+ }
418
+
419
+ .rt-col-lg-3 {
420
+ width: 25%;
421
+ }
422
+
423
+ .rt-col-lg-2 {
424
+ width: 16.66666667%;
425
+ }
426
+
427
+ .rt-col-lg-1 {
428
+ width: 8.33333333%;
429
+ }
430
+
431
+ }
432
+
433
+
434
+ /***************************************
435
+ Pagination Style
436
+ **************************************/
437
+
438
+ .paginationjs {
439
+ line-height: 1.6;
440
+ font-family: Marmelad, "Lucida Grande", Arial, "Hiragino Sans GB", Georgia, sans-serif;
441
+ font-size: 14px;
442
+ box-sizing: initial
443
+ }
444
+
445
+ .paginationjs:after {
446
+ display: table;
447
+ content: " ";
448
+ clear: both
449
+ }
450
+
451
+ .paginationjs .paginationjs-pages {
452
+ float: left
453
+ }
454
+
455
+ .paginationjs .paginationjs-pages ul {
456
+ float: left;
457
+ margin: 0;
458
+ padding: 0
459
+ }
460
+
461
+ .paginationjs .paginationjs-go-button, .paginationjs .paginationjs-go-input, .paginationjs .paginationjs-nav {
462
+ float: left;
463
+ margin-left: 10px;
464
+ font-size: 14px
465
+ }
466
+
467
+ .paginationjs .paginationjs-pages li {
468
+ float: left;
469
+ border: 1px solid #aaa;
470
+ border-right: none;
471
+ list-style: none
472
+ }
473
+
474
+ .paginationjs .paginationjs-pages li > a {
475
+ min-width: 30px;
476
+ height: 28px;
477
+ line-height: 28px;
478
+ display: block;
479
+ background: #fff;
480
+ font-size: 14px;
481
+ color: #333;
482
+ text-decoration: none;
483
+ text-align: center
484
+ }
485
+
486
+ .paginationjs .paginationjs-pages li:hover > a {
487
+ background: var(--tpg-primary-color);
488
+ color: #ffffff !important;
489
+ border-color: var(--tpg-primary-color) !important;
490
+ }
491
+
492
+ .paginationjs .paginationjs-pages li.active {
493
+ border: none
494
+ }
495
+
496
+ .paginationjs .paginationjs-pages li.active > a {
497
+ height: 30px;
498
+ line-height: 30px;
499
+ background: #aaa;
500
+ color: #fff
501
+ }
502
+
503
+ .paginationjs .paginationjs-pages li.disabled > a {
504
+ opacity: .3
505
+ }
506
+
507
+ .paginationjs .paginationjs-pages li.disabled > a:hover {
508
+ background: 0 0
509
+ }
510
+
511
+ .paginationjs .paginationjs-pages li:first-child, .paginationjs .paginationjs-pages li:first-child > a {
512
+ border-radius: 3px 0 0 3px
513
+ }
514
+
515
+ .paginationjs .paginationjs-pages li:last-child {
516
+ border-right: 1px solid #aaa;
517
+ border-radius: 0 3px 3px 0
518
+ }
519
+
520
+ .paginationjs .paginationjs-pages li:last-child > a {
521
+ border-radius: 0 3px 3px 0
522
+ }
523
+
524
+ .paginationjs .paginationjs-go-input > input[type=text] {
525
+ width: 30px;
526
+ height: 28px;
527
+ background: #fff;
528
+ border-radius: 3px;
529
+ border: 1px solid #aaa;
530
+ padding: 0;
531
+ font-size: 14px;
532
+ text-align: center;
533
+ vertical-align: baseline;
534
+ outline: 0;
535
+ box-shadow: none;
536
+ box-sizing: initial
537
+ }
538
+
539
+ .paginationjs .paginationjs-go-button > input[type=button] {
540
+ min-width: 40px;
541
+ height: 30px;
542
+ line-height: 28px;
543
+ background: #fff;
544
+ border-radius: 3px;
545
+ border: 1px solid #aaa;
546
+ text-align: center;
547
+ padding: 0 8px;
548
+ font-size: 14px;
549
+ vertical-align: baseline;
550
+ outline: 0;
551
+ box-shadow: none;
552
+ color: #333;
553
+ cursor: pointer;
554
+ vertical-align: middle \9
555
+ }
556
+
557
+ .paginationjs.paginationjs-theme-blue .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-blue .paginationjs-pages li {
558
+ border-color: #289de9
559
+ }
560
+
561
+ .paginationjs .paginationjs-go-button > input[type=button]:hover {
562
+ background-color: #f8f8f8
563
+ }
564
+
565
+ .paginationjs .paginationjs-nav {
566
+ height: 30px;
567
+ line-height: 30px
568
+ }
569
+
570
+ .paginationjs .paginationjs-go-button, .paginationjs .paginationjs-go-input {
571
+ margin-left: 5px \9
572
+ }
573
+
574
+ .paginationjs.paginationjs-small {
575
+ font-size: 12px
576
+ }
577
+
578
+ .paginationjs.paginationjs-small .paginationjs-pages li > a {
579
+ min-width: 26px;
580
+ height: 24px;
581
+ line-height: 24px;
582
+ font-size: 12px
583
+ }
584
+
585
+ .paginationjs.paginationjs-small .paginationjs-pages li.active > a {
586
+ height: 26px;
587
+ line-height: 26px
588
+ }
589
+
590
+ .paginationjs.paginationjs-small .paginationjs-go-input {
591
+ font-size: 12px
592
+ }
593
+
594
+ .paginationjs.paginationjs-small .paginationjs-go-input > input[type=text] {
595
+ width: 26px;
596
+ height: 24px;
597
+ font-size: 12px
598
+ }
599
+
600
+ .paginationjs.paginationjs-small .paginationjs-go-button {
601
+ font-size: 12px
602
+ }
603
+
604
+ .paginationjs.paginationjs-small .paginationjs-go-button > input[type=button] {
605
+ min-width: 30px;
606
+ height: 26px;
607
+ line-height: 24px;
608
+ padding: 0 6px;
609
+ font-size: 12px
610
+ }
611
+
612
+ .paginationjs.paginationjs-small .paginationjs-nav {
613
+ height: 26px;
614
+ line-height: 26px;
615
+ font-size: 12px
616
+ }
617
+
618
+ .paginationjs.paginationjs-big {
619
+ font-size: 16px
620
+ }
621
+
622
+ .paginationjs.paginationjs-big .paginationjs-pages li > a {
623
+ min-width: 36px;
624
+ height: 34px;
625
+ line-height: 34px;
626
+ font-size: 16px
627
+ }
628
+
629
+ .paginationjs.paginationjs-big .paginationjs-pages li.active > a {
630
+ height: 36px;
631
+ line-height: 36px
632
+ }
633
+
634
+ .paginationjs.paginationjs-big .paginationjs-go-input {
635
+ font-size: 16px
636
+ }
637
+
638
+ .paginationjs.paginationjs-big .paginationjs-go-input > input[type=text] {
639
+ width: 36px;
640
+ height: 34px;
641
+ font-size: 16px
642
+ }
643
+
644
+ .paginationjs.paginationjs-big .paginationjs-go-button {
645
+ font-size: 16px
646
+ }
647
+
648
+ .paginationjs.paginationjs-big .paginationjs-go-button > input[type=button] {
649
+ min-width: 50px;
650
+ height: 36px;
651
+ line-height: 34px;
652
+ padding: 0 12px;
653
+ font-size: 16px
654
+ }
655
+
656
+ .paginationjs.paginationjs-big .paginationjs-nav {
657
+ height: 36px;
658
+ line-height: 36px;
659
+ font-size: 16px
660
+ }
661
+
662
+ .paginationjs.paginationjs-theme-blue .paginationjs-pages li > a {
663
+ color: #289de9
664
+ }
665
+
666
+ .paginationjs.paginationjs-theme-blue .paginationjs-pages li:hover > a {
667
+ background: #e9f4fc
668
+ }
669
+
670
+ .paginationjs.paginationjs-theme-blue .paginationjs-pages li.active > a {
671
+ background: #289de9;
672
+ color: #fff
673
+ }
674
+
675
+ .paginationjs.paginationjs-theme-blue .paginationjs-pages li.disabled:hover > a {
676
+ background: 0 0
677
+ }
678
+
679
+ .paginationjs.paginationjs-theme-blue .paginationjs-go-button > input[type=button] {
680
+ background: #289de9;
681
+ border-color: #289de9;
682
+ color: #fff
683
+ }
684
+
685
+ .paginationjs.paginationjs-theme-green .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-green .paginationjs-pages li {
686
+ border-color: #449d44
687
+ }
688
+
689
+ .paginationjs.paginationjs-theme-blue .paginationjs-go-button > input[type=button]:hover {
690
+ background-color: #3ca5ea
691
+ }
692
+
693
+ .paginationjs.paginationjs-theme-green .paginationjs-pages li > a {
694
+ color: #449d44
695
+ }
696
+
697
+ .paginationjs.paginationjs-theme-green .paginationjs-pages li:hover > a {
698
+ background: #ebf4eb
699
+ }
700
+
701
+ .paginationjs.paginationjs-theme-green .paginationjs-pages li.active > a {
702
+ background: #449d44;
703
+ color: #fff
704
+ }
705
+
706
+ .paginationjs.paginationjs-theme-green .paginationjs-pages li.disabled:hover > a {
707
+ background: 0 0
708
+ }
709
+
710
+ .paginationjs.paginationjs-theme-green .paginationjs-go-button > input[type=button] {
711
+ background: #449d44;
712
+ border-color: #449d44;
713
+ color: #fff
714
+ }
715
+
716
+ .paginationjs.paginationjs-theme-yellow .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-yellow .paginationjs-pages li {
717
+ border-color: #ec971f
718
+ }
719
+
720
+ .paginationjs.paginationjs-theme-green .paginationjs-go-button > input[type=button]:hover {
721
+ background-color: #55a555
722
+ }
723
+
724
+ .paginationjs.paginationjs-theme-yellow .paginationjs-pages li > a {
725
+ color: #ec971f
726
+ }
727
+
728
+ .paginationjs.paginationjs-theme-yellow .paginationjs-pages li:hover > a {
729
+ background: #fdf5e9
730
+ }
731
+
732
+ .paginationjs.paginationjs-theme-yellow .paginationjs-pages li.active > a {
733
+ background: #ec971f;
734
+ color: #fff
735
+ }
736
+
737
+ .paginationjs.paginationjs-theme-yellow .paginationjs-pages li.disabled:hover > a {
738
+ background: 0 0
739
+ }
740
+
741
+ .paginationjs.paginationjs-theme-yellow .paginationjs-go-button > input[type=button] {
742
+ background: #ec971f;
743
+ border-color: #ec971f;
744
+ color: #fff
745
+ }
746
+
747
+ .paginationjs.paginationjs-theme-red .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-red .paginationjs-pages li {
748
+ border-color: #c9302c
749
+ }
750
+
751
+ .paginationjs.paginationjs-theme-yellow .paginationjs-go-button > input[type=button]:hover {
752
+ background-color: #eea135
753
+ }
754
+
755
+ .paginationjs.paginationjs-theme-red .paginationjs-pages li > a {
756
+ color: #c9302c
757
+ }
758
+
759
+ .paginationjs.paginationjs-theme-red .paginationjs-pages li:hover > a {
760
+ background: #faeaea
761
+ }
762
+
763
+ .paginationjs.paginationjs-theme-red .paginationjs-pages li.active > a {
764
+ background: #c9302c;
765
+ color: #fff
766
+ }
767
+
768
+ .paginationjs.paginationjs-theme-red .paginationjs-pages li.disabled:hover > a {
769
+ background: 0 0
770
+ }
771
+
772
+ .paginationjs.paginationjs-theme-red .paginationjs-go-button > input[type=button] {
773
+ background: #c9302c;
774
+ border-color: #c9302c;
775
+ color: #fff
776
+ }
777
+
778
+ .paginationjs.paginationjs-theme-red .paginationjs-go-button > input[type=button]:hover {
779
+ background-color: #ce4541
780
+ }
781
+
782
+ .paginationjs .paginationjs-pages li.paginationjs-next {
783
+ border-right: 1px solid #aaa \9
784
+ }
785
+
786
+ .paginationjs .paginationjs-go-input > input[type=text] {
787
+ line-height: 28px \9;
788
+ vertical-align: middle \9
789
+ }
790
+
791
+ .paginationjs.paginationjs-big .paginationjs-pages li > a {
792
+ line-height: 36px \9
793
+ }
794
+
795
+ .paginationjs.paginationjs-big .paginationjs-go-input > input[type=text] {
796
+ height: 36px \9;
797
+ line-height: 36px \9
798
+ }
799
+
800
+
801
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li:not(.paginationjs-next):not(.paginationjs-prev) {
802
+ display: none;
803
+ }
804
+
805
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li {
806
+ color: #ffffff;
807
+ }
808
+
809
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li > a {
810
+ color: #ffffff;
811
+ background-color: var(--tpg-primary-color);
812
+ }
813
+
814
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li:hover a {
815
+ background-color: var(--tpg-secondary-color);
816
+ }
817
+
818
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li.paginationjs-page:nth-child(2) {
819
+ display: inline-block;
820
+ position: relative;
821
+ pointer-events: none;
822
+ }
823
+
824
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li.paginationjs-page:nth-child(2) a {
825
+ text-indent: -99999px;
826
+ pointer-events: none;
827
+ }
828
+
829
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li.paginationjs-page:nth-child(2):before {
830
+ content: "\f100";
831
+ font-family: "Font Awesome 5 Free";
832
+ position: absolute;
833
+ left: 50%;
834
+ top: 50%;
835
+ z-index: 99999;
836
+ opacity: .5;
837
+ font-weight: 900;
838
+ transform: translate(-50%, -50%);
839
+
840
+ }
841
+
842
+ .ajax-pagination-type-next-prev-yes .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs ul li.paginationjs-prev + li {
843
+ display: none !important;
844
+ }
845
+
846
+
847
+ /************************ Common ***************************/
848
+
849
+ .rt-tpg-container button {
850
+ border: none;
851
+ padding: 10px 15px;
852
+ }
853
+
854
+ .rt-tpg-container .rt-tgp-load-more button {
855
+ background: #8e8e8e;
856
+ border-radius: 4px;
857
+ }
858
+
859
+ .rt-tpg-container .tpg-wc-product-filter {
860
+ margin-bottom: 15px;
861
+ text-align: right;
862
+ padding-right: 15px;
863
+ }
864
+
865
+ .rt-img-holder > a {
866
+ text-align: center;
867
+ display: block;
868
+ }
869
+
870
+ .rt-img-responsive {
871
+ max-width: 100%;
872
+ display: block;
873
+ height: auto;
874
+ transition: 0.4s ease-in-out;
875
+ }
876
+
877
+
878
+ @media (max-width: 991px) {
879
+ .rt-img-holder > a,
880
+ .rt-img-responsive {
881
+ width: 100%;
882
+ }
883
+ }
884
+
885
+ .rt-tpg-container .no-margin {
886
+ margin: 0px !important;
887
+ padding: 0px !important;
888
+ }
889
+
890
+ span.more-loading {
891
+ background: url("../images/loading.gif") center right no-repeat;
892
+ padding-right: 20px;
893
+ display: inline-block;
894
+ }
895
+
896
+ .rt-tgp-scroll-load-more, .rt-tgp-load-more {
897
+ text-align: center;
898
+ display: block;
899
+ margin: 30px 0 20px;
900
+ }
901
+
902
+ .post-meta-user,
903
+ .post-meta-tags {
904
+ padding: 0;
905
+ margin-bottom: 15px;
906
+ line-height: 1.5;
907
+ font-size: 95%;
908
+ }
909
+
910
+ .post-meta-user span,
911
+ .post-meta-tags span {
912
+ display: inline-block;
913
+ padding-right: 8px;
914
+ }
915
+
916
+ .post-meta-user span.rt-separator,
917
+ .post-meta-tags span.rt-separator {
918
+ display: inline-block;
919
+ padding-right: 5px;
920
+ }
921
+
922
+ .post-meta-user span.comment-link {
923
+ text-align: right;
924
+ float: right;
925
+ padding-right: 0px;
926
+ }
927
+
928
+ .rt-holder .entry-title a {
929
+ color: #000000;
930
+ }
931
+
932
+ .rt-tpg-container .rt-holder .post-meta.center .read-more {
933
+ float: none;
934
+ }
935
+
936
+ .rt-tpg-container .rt-holder .post-meta .rt-tpg-social-share {
937
+ float: none;
938
+ text-align: left;
939
+ display: block;
940
+ margin-bottom: 15px;
941
+ width: 100%;
942
+ }
943
+
944
+ .rt-tpg-container .rt-holder .post-meta.center .rt-tpg-social-share {
945
+ text-align: left;
946
+ }
947
+
948
+ .rt-tpg-container .rt-holder .post-meta.right .rt-tpg-social-share {
949
+ text-align: left;
950
+ }
951
+
952
+ .rt-tpg-container .rt-holder .read-more a {
953
+ /*padding: 8px 15px;*/
954
+ font-size: 15px;
955
+ display: inline-block;
956
+ line-height: 1.5;
957
+ }
958
+
959
+ .rt-tpg-container .rt-holder .tpg-excerpt {
960
+ margin-bottom: 10px;
961
+ }
962
+
963
+ @media (max-width: 991px) {
964
+ .rt-tpg-container .rt-holder .tpg-excerpt {
965
+ overflow: hidden !important;
966
+ text-overflow: ellipsis !important;
967
+ display: -webkit-box !important;
968
+ -webkit-line-clamp: 3 !important;
969
+ -webkit-box-orient: vertical;
970
+ }
971
+ }
972
+
973
+
974
+ /***************************************************
975
+ Isotope Buttons
976
+ ****************************************************/
977
+
978
+ .rt-tpg-container .tpg-iso-filter {
979
+ text-align: center;
980
+ margin: 15px 0 45px;
981
+ }
982
+
983
+ .rt-tpg-container .tpg-iso-filter input[type="text"] {
984
+ display: inline-block;
985
+ padding: 12px 10px;
986
+ border-radius: 3px;
987
+ margin-left: 4px;
988
+ }
989
+
990
+ .rt-tpg-container .tpg-iso-filter > div {
991
+ display: inline-block;
992
+ }
993
+
994
+ .rt-tpg-container .rt-tpg-isotope-buttons .selected {
995
+ background: var(--tpg-primary-color);
996
+ }
997
+
998
+ .rt-tpg-container .rt-tpg-isotope-buttons button {
999
+ border: none;
1000
+ margin: 4px;
1001
+ padding: 8px 20px;
1002
+ outline: 0;
1003
+ text-transform: none;
1004
+ font-weight: 400;
1005
+ font-size: 15px;
1006
+ line-height: 1.8;
1007
+ background: #8e8e8e;
1008
+ color: #fff;
1009
+ border-radius: 3px;
1010
+ box-shadow: none !important;
1011
+ text-shadow: none !important;
1012
+ }
1013
+
1014
+ .rt-tpg-container .rt-tpg-isotope-buttons button {
1015
+ box-shadow: none !important;
1016
+ text-shadow: none !important;
1017
+ }
1018
+
1019
+ /**********************************
1020
+ Ajax Loader
1021
+ *************************************/
1022
+
1023
+ .rt-tpg-container .tpg-pre-loader {
1024
+ position: relative;
1025
+ overflow: hidden;
1026
+ }
1027
+
1028
+ .rt-tpg-container .rt-loading-overlay {
1029
+ opacity: 0;
1030
+ visibility: hidden;
1031
+ position: absolute;
1032
+ top: 0;
1033
+ left: 0;
1034
+ width: 100%;
1035
+ height: 100%;
1036
+ z-index: 1;
1037
+ background-color: #fff;
1038
+ }
1039
+
1040
+ .rt-tpg-container .rt-loading {
1041
+ color: var(--tpg-primary-color);
1042
+ position: absolute;
1043
+ top: 40%;
1044
+ left: 50%;
1045
+ margin-left: -16px;
1046
+ z-index: 2;
1047
+ opacity: 0;
1048
+ visibility: hidden;
1049
+ }
1050
+
1051
+ .rt-tpg-container .tpg-pre-loader .rt-loading-overlay {
1052
+ opacity: 0.8;
1053
+ visibility: visible;
1054
+ }
1055
+
1056
+ .rt-tpg-container .tpg-pre-loader .rt-loading {
1057
+ opacity: 1;
1058
+ visibility: visible;
1059
+ }
1060
+
1061
+ .rt-ball-clip-rotate {
1062
+ width: 32px;
1063
+ height: 32px;
1064
+ }
1065
+
1066
+ .rt-ball-clip-rotate {
1067
+ display: block;
1068
+ font-size: 0;
1069
+ color: #fff;
1070
+ }
1071
+
1072
+ .rt-ball-clip-rotate, .rt-ball-clip-rotate > div {
1073
+ position: relative;
1074
+ -webkit-box-sizing: border-box;
1075
+ -moz-box-sizing: border-box;
1076
+ box-sizing: border-box;
1077
+ }
1078
+
1079
+ .rt-ball-clip-rotate > div {
1080
+ display: inline-block;
1081
+ float: none;
1082
+ background-color: currentColor;
1083
+ border: 0 solid currentColor;
1084
+ }
1085
+
1086
+ .rt-ball-clip-rotate > div {
1087
+ width: 32px;
1088
+ height: 32px;
1089
+ background: transparent;
1090
+ border-width: 2px;
1091
+ border-bottom-color: transparent;
1092
+ border-radius: 100%;
1093
+ -webkit-animation: ball-clip-rotate 0.75s linear infinite;
1094
+ -moz-animation: ball-clip-rotate 0.75s linear infinite;
1095
+ -o-animation: ball-clip-rotate 0.75s linear infinite;
1096
+ animation: ball-clip-rotate 0.75s linear infinite;
1097
+ }
1098
+
1099
+ /****************************************
1100
+ Filter
1101
+ *****************************************/
1102
+
1103
+ .rt-layout-filter-container.rt-clear:after {
1104
+ clear: both;
1105
+ display: block;
1106
+ content: "";
1107
+ }
1108
+
1109
+ .rt-clear:after,
1110
+ .rt-clear::-ms-ticks-after {
1111
+ clear: both;
1112
+ display: block;
1113
+ content: "";
1114
+ }
1115
+
1116
+ .rt-layout-filter-container {
1117
+ font-size: 0;
1118
+ line-height: 0;
1119
+ padding: 0;
1120
+ margin: -5px -5px 30px;
1121
+ }
1122
+
1123
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item {
1124
+ padding: 8px 10px;
1125
+ border: 1px solid;
1126
+ margin: 4px;
1127
+ display: inline-block;
1128
+ transition: 0.4s;
1129
+ }
1130
+
1131
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected,
1132
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover {
1133
+ background: #222222;
1134
+ color: #b4b4b4;
1135
+ }
1136
+
1137
+ /*Filter carousel style*/
1138
+
1139
+
1140
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap {
1141
+ padding-right: 82px;
1142
+ }
1143
+
1144
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap .filter-left-wrapper {
1145
+ margin-right: 0;
1146
+ width: 100%;
1147
+ position: static;
1148
+ }
1149
+
1150
+ .tpg-header-wrapper.carousel {
1151
+ display: flex;
1152
+ overflow: hidden;
1153
+ margin-bottom: 30px;
1154
+ align-items: center;
1155
+ }
1156
+
1157
+ .section-title-style-style1 .tpg-header-wrapper.carousel,
1158
+ .section-title-style-default .tpg-header-wrapper.carousel {
1159
+ min-height: 36px;
1160
+ }
1161
+
1162
+ .tpg-header-wrapper.carousel .swiper {
1163
+ overflow: hidden;
1164
+ }
1165
+
1166
+ .section-title-style-style2 .tpg-header-wrapper.carousel .swiper,
1167
+ .section-title-style-style3 .tpg-header-wrapper.carousel .swiper {
1168
+ height: 51px;
1169
+ margin-bottom: -0.5px;
1170
+ }
1171
+
1172
+ .tpg-header-wrapper.carousel .swiper .swiper-navigation {
1173
+ position: absolute;
1174
+ top: 50%;
1175
+ right: 0;
1176
+ z-index: 9;
1177
+ transform: translateY(-50%);
1178
+ }
1179
+
1180
+ .tpg-header-wrapper.carousel .swiper .swiper-button-next, .tpg-header-wrapper.carousel .swiper .swiper-button-prev {
1181
+ top: 0;
1182
+ margin-top: 0;
1183
+ }
1184
+
1185
+ .tpg-header-wrapper.carousel .tpg-widget-heading-wrapper {
1186
+ flex: 1;
1187
+ margin: 0;
1188
+ padding-right: 10px;
1189
+ }
1190
+
1191
+ .tpg-header-wrapper.carousel .rt-layout-filter-container {
1192
+ margin: 0;
1193
+ flex: 0 0 60%;
1194
+ max-width: 60%;
1195
+ }
1196
+
1197
+ .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper {
1198
+ position: relative;
1199
+ width: 100%;
1200
+ height: 100%;
1201
+ z-index: 1;
1202
+ display: flex;
1203
+ transition-property: transform;
1204
+ box-sizing: content-box;
1205
+ margin: 0;
1206
+ }
1207
+
1208
+ .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide {
1209
+ text-align: center;
1210
+ width: auto;
1211
+ height: auto;
1212
+ padding: 0 10px;
1213
+ border: none;
1214
+ text-transform: initial;
1215
+ font-size: 15px;
1216
+ color: #212121;
1217
+ /* Center slide text vertically */
1218
+ display: -webkit-box;
1219
+ display: -ms-flexbox;
1220
+ display: -webkit-flex;
1221
+ display: flex;
1222
+ -webkit-box-pack: center;
1223
+ -ms-flex-pack: center;
1224
+ -webkit-justify-content: center;
1225
+ justify-content: center;
1226
+ -webkit-box-align: center;
1227
+ -ms-flex-align: center;
1228
+ -webkit-align-items: center;
1229
+ align-items: center;
1230
+ margin: 0;
1231
+ position: relative;
1232
+ }
1233
+
1234
+ .section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide::before,
1235
+ .section-title-style-style3 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide::before {
1236
+ content: "";
1237
+ position: absolute;
1238
+ left: 50%;
1239
+ bottom: 0;
1240
+ -webkit-transform: translateX(-50%);
1241
+ transform: translateX(-50%);
1242
+ width: 0;
1243
+ height: 0;
1244
+ border-style: solid;
1245
+ border-width: 0 7px 7px 7px;
1246
+ border-top-color: transparent;
1247
+ border-left-color: transparent;
1248
+ border-right-color: transparent;
1249
+ border-bottom-color: var(--tpg-primary-color);
1250
+ visibility: hidden;
1251
+ opacity: 0;
1252
+ transition: all 0.3s ease;
1253
+ }
1254
+
1255
+ .section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide.selected::before,
1256
+ .section-title-style-style2 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide:hover::before,
1257
+ .section-title-style-style3 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide.selected::before,
1258
+ .section-title-style-style3 .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide:hover::before {
1259
+ opacity: 1;
1260
+ visibility: visible;
1261
+ }
1262
+
1263
+
1264
+ .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide.selected,
1265
+ .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide:hover {
1266
+ color: var(--tpg-primary-color);
1267
+ }
1268
+
1269
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap .filter-right-wrapper,
1270
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap .rt-author-filter {
1271
+ display: none;
1272
+ }
1273
+
1274
+ .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.swiper-wrapper {
1275
+ letter-spacing: 0;
1276
+ }
1277
+
1278
+ .tpg-header-wrapper.carousel .swiper-button-next.swiper-button-disabled,
1279
+ .tpg-header-wrapper.carousel .swiper-button-prev.swiper-button-disabled {
1280
+ opacity: 1;
1281
+ }
1282
+
1283
+ .tpg-header-wrapper.carousel .swiper-button-next.swiper-button-disabled::after,
1284
+ .tpg-header-wrapper.carousel .swiper-button-prev.swiper-button-disabled::after {
1285
+ opacity: .35;
1286
+ }
1287
+
1288
+ .filter-button-border-enable .tpg-header-wrapper.carousel .rt-layout-filter-container {
1289
+ border: 1px solid #ddd;
1290
+ border-radius: 3px;
1291
+ }
1292
+
1293
+ .filter-button-border-enable .tpg-header-wrapper.carousel .rt-filter-item-wrap.swiper-wrapper .swiper-slide {
1294
+ padding: 6px 15px;
1295
+ white-space: nowrap;
1296
+ }
1297
+
1298
+ .filter-button-border-enable .tpg-header-wrapper.carousel .swiper .swiper-navigation {
1299
+ right: 3px;
1300
+ }
1301
+
1302
+ .filter-nex-prev-btn-hidden .tpg-header-wrapper.carousel .swiper .swiper-navigation {
1303
+ display: none;
1304
+ }
1305
+
1306
+ .filter-nex-prev-btn-hidden .tpg-header-wrapper.carousel .rt-layout-filter-container .rt-filter-wrap {
1307
+ margin-right: 0;
1308
+ }
1309
+
1310
+ @media (max-width: 767px) {
1311
+ .tpg-header-wrapper.carousel {
1312
+ display: block;
1313
+ }
1314
+
1315
+ .tpg-header-wrapper.carousel .rt-layout-filter-container {
1316
+ max-width: 100%;
1317
+ position: relative;
1318
+ margin-bottom: 8px;
1319
+ }
1320
+
1321
+ .tpg-header-wrapper.carousel .rt-layout-filter-container {
1322
+ margin-left: -9px;
1323
+ margin-top: 10px;
1324
+ }
1325
+ }
1326
+
1327
+ /*End Filter Carousel*/
1328
+
1329
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected,
1330
+ .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover {
1331
+ background: none;
1332
+ color: #000000;
1333
+ }
1334
+
1335
+
1336
+ .rt-filter-item-wrap.rt-order-by-action, .rt-filter-item-wrap.rt-sort-order-action {
1337
+ float: right;
1338
+ }
1339
+
1340
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap {
1341
+ line-height: 1.55;
1342
+ display: inline-block;
1343
+ vertical-align: top;
1344
+ font-size: 13px;
1345
+ letter-spacing: 0.1em;
1346
+ text-transform: uppercase;
1347
+ margin: 4px;
1348
+ padding: 8px 10px;
1349
+ cursor: pointer;
1350
+ position: relative;
1351
+ user-select: none;
1352
+ -webkit-user-select: none;
1353
+ -moz-user-select: none;
1354
+ transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1355
+ -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1356
+ -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1357
+ color: #666;
1358
+ }
1359
+
1360
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-button-wrap {
1361
+ padding: 0;
1362
+ margin-top: 0;
1363
+ margin-left: 0;
1364
+ }
1365
+
1366
+ @media (max-width: 767px) {
1367
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-button-wrap {
1368
+ display: inline;
1369
+ }
1370
+ }
1371
+
1372
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-button-item .rt-filter-sub-tax {
1373
+ display: none;
1374
+ }
1375
+
1376
+ .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group {
1377
+ margin: 0 4px;
1378
+ }
1379
+
1380
+ .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item {
1381
+ cursor: pointer;
1382
+ }
1383
+
1384
+ .rt-layout-filter-container > .rt-filter-sub-tax.sub-button-group > span {
1385
+ padding: 8px 10px;
1386
+ border: 1px solid;
1387
+ margin: 4px;
1388
+ display: inline-block;
1389
+ line-height: 1.55;
1390
+ vertical-align: top;
1391
+ font-size: 13px;
1392
+ letter-spacing: 0.1em;
1393
+ text-transform: uppercase;
1394
+ }
1395
+
1396
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap {
1397
+ border: 1px solid #666;
1398
+ color: #666;
1399
+ position: relative;
1400
+ }
1401
+
1402
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap:hover {
1403
+ border-color: #222;
1404
+ color: #222;
1405
+ }
1406
+
1407
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action:hover {
1408
+ border-color: #222;
1409
+ }
1410
+
1411
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap > .rt-filter-dropdown-default {
1412
+ min-width: 135px;
1413
+ max-width: 135px;
1414
+ overflow: hidden;
1415
+ text-overflow: ellipsis;
1416
+ text-align: center;
1417
+ display: block;
1418
+ white-space: nowrap;
1419
+ }
1420
+
1421
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown {
1422
+ display: block;
1423
+ position: absolute;
1424
+ top: 100%;
1425
+ left: -1px;
1426
+ right: -1px;
1427
+ background-color: #222;
1428
+ z-index: 2;
1429
+ margin-top: 1px;
1430
+ border: none;
1431
+ opacity: 0;
1432
+ visibility: hidden;
1433
+ transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1434
+ -webkit-transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1435
+ -ms-transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1436
+ border-top: 1px solid transparent;
1437
+ }
1438
+
1439
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap:hover .rt-filter-dropdown {
1440
+ border-top-color: #000;
1441
+ }
1442
+
1443
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item.selected {
1444
+ background: #000;
1445
+ }
1446
+
1447
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap.active-dropdown .rt-filter-dropdown {
1448
+ opacity: 1;
1449
+ visibility: visible;
1450
+ }
1451
+
1452
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap.active-dropdown .rt-arrow-angle {
1453
+ transform: rotate(180deg);
1454
+ -webkit-transform: rotate(180deg);
1455
+ -ms-transform: rotate(180deg);
1456
+ }
1457
+
1458
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item {
1459
+ display: block;
1460
+ padding: 10px 15px 9px 15px;
1461
+ border-bottom: 1px solid #323232;
1462
+ color: #b4b4b4;
1463
+ text-align: center;
1464
+ }
1465
+
1466
+ .rt-filter-dropdown-item .sub-dropdown-wrap,
1467
+ .rt-filter-dropdown-default .sub-dropdown-wrap {
1468
+ display: none !important;
1469
+ }
1470
+
1471
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-arrow-angle {
1472
+ letter-spacing: 0;
1473
+ transition: transform 0.2s ease-in-out;
1474
+ -webkit-transition: transform 0.2s ease-in-out;
1475
+ -ms-transition: transform 0.2s ease-in-out;
1476
+ backface-visibility: hidden;
1477
+ -webkit-backface-visibility: hidden;
1478
+ }
1479
+
1480
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action {
1481
+ border: 1px solid #666;
1482
+ color: #666;
1483
+ position: relative;
1484
+ min-width: 38px;
1485
+ }
1486
+
1487
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow {
1488
+ position: static;
1489
+ }
1490
+
1491
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span {
1492
+ display: block;
1493
+ position: absolute;
1494
+ width: 14px;
1495
+ height: 8px;
1496
+ top: 50%;
1497
+ left: 50%;
1498
+ margin-top: -4px;
1499
+ margin-left: -7px;
1500
+ backface-visibility: hidden;
1501
+ -webkit-backface-visibility: hidden;
1502
+ transition: transform 0.2s ease-in-out;
1503
+ -webkit-transition: transform 0.2s ease-in-out;
1504
+ -ms-transition: transform 0.2s ease-in-out;
1505
+ }
1506
+
1507
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow[data-sort-order="ASC"] > span {
1508
+ transform: rotate(180deg);
1509
+ -webkit-transform: rotate(180deg);
1510
+ -ms-transform: rotate(180deg);
1511
+ }
1512
+
1513
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span:before {
1514
+ content: '';
1515
+ display: block;
1516
+ width: 2px;
1517
+ height: 9px;
1518
+ position: absolute;
1519
+ background-color: #666;
1520
+ transform: rotate(-45deg);
1521
+ -webkit-transform: rotate(-45deg);
1522
+ -ms-transform: rotate(-45deg);
1523
+ top: 0;
1524
+ left: 3px;
1525
+ transition: background-color 0.2s ease-in-out;
1526
+ -webkit-transition: background-color 0.2s ease-in-out;
1527
+ -ms-transition: background-color 0.2s ease-in-out;
1528
+ }
1529
+
1530
+ .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span:after {
1531
+ content: '';
1532
+ display: block;
1533
+ width: 2px;
1534
+ height: 9px;
1535
+ position: absolute;
1536
+ background-color: #666;
1537
+ transform: rotate(45deg);
1538
+ -webkit-transform: rotate(45deg);
1539
+ -ms-transform: rotate(45deg);
1540
+ top: 0;
1541
+ left: 9px;
1542
+ transition: background-color 0.2s ease-in-out;
1543
+ -webkit-transition: background-color 0.2s ease-in-out;
1544
+ -ms-transition: background-color 0.2s ease-in-out;
1545
+ }
1546
+
1547
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-search-filter-wrap {
1548
+ padding: 0;
1549
+ position: relative;
1550
+ float: right;
1551
+ }
1552
+
1553
+ .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input {
1554
+ -webkit-appearance: none;
1555
+ -moz-appearance: none;
1556
+ appearance: none;
1557
+ padding: 11px;
1558
+ background: transparent;
1559
+ font-size: 12px;
1560
+ font-weight: 600;
1561
+ font-family: "Dosis", sans-serif;
1562
+ border: 1px solid #666;
1563
+ color: #666;
1564
+ }
1565
+
1566
+ .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input:focus {
1567
+ box-shadow: none;
1568
+ outline: none;
1569
+ }
1570
+
1571
+ .rt-filter-item-wrap.rt-search-filter-wrap span.rt-action {
1572
+ position: absolute;
1573
+ right: 5px;
1574
+ top: 6px;
1575
+ font-size: 15px;
1576
+ display: inline-block;
1577
+ cursor: pointer;
1578
+ }
1579
+
1580
+ .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input::-webkit-input-placeholder {
1581
+ font-size: 12px;
1582
+ font-weight: 600;
1583
+ font-family: "Dosis", sans-serif;
1584
+ }
1585
+
1586
+ .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input::-moz-placeholder {
1587
+ font-size: 12px;
1588
+ font-weight: 600;
1589
+ font-family: "Dosis", sans-serif;
1590
+ }
1591
+
1592
+ .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input:-ms-input-placeholder {
1593
+ font-size: 12px;
1594
+ font-weight: 600;
1595
+ font-family: "Dosis", sans-serif;
1596
+ }
1597
+
1598
+ .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input:-moz-placeholder {
1599
+ font-size: 12px;
1600
+ font-weight: 600;
1601
+ font-family: "Dosis", sans-serif;
1602
+ }
1603
+
1604
+ @media (max-width: 600px) {
1605
+ .rt-filter-item-wrap.rt-tax-filter.rt-filter-dropdown-wrap {
1606
+ display: block;
1607
+ margin-bottom: 10px;
1608
+ }
1609
+
1610
+ .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap > .rt-filter-dropdown-default {
1611
+ margin: 0 auto;
1612
+ }
1613
+ }
1614
+
1615
+ /***************************
1616
+ Tooltip Style
1617
+ ****************************/
1618
+
1619
+ .rt-tpg-social-share.a {
1620
+ position: relative;
1621
+ }
1622
+
1623
+ body > .rt-tooltip {
1624
+ font-size: 100%;
1625
+ position: absolute;
1626
+ z-index: 9999;
1627
+ -o-box-shadow: 0 0 5px #aaa;
1628
+ -moz-box-shadow: 0 0 5px #aaa;
1629
+ -webkit-box-shadow: 0 0 5px #aaa;
1630
+ box-shadow: 0 0 5px #aaa;
1631
+ color: #fff;
1632
+ border-radius: 3px;
1633
+ background: #666;
1634
+ padding: 5px 10px;
1635
+ border-width: 2px;
1636
+ opacity: 0;
1637
+ pointer-events: none;
1638
+ -webkit-transition: opacity 1s ease-in-out;
1639
+ -moz-transition: opacity 1s ease-in-out;
1640
+ -ms-transition: opacity 1s ease-in-out;
1641
+ -o-transition: opacity 1s ease-in-out;
1642
+ transition: opacity 1s ease-in-out;
1643
+ }
1644
+
1645
+ body > .rt-tooltip .rt-tooltip-content {
1646
+ font-size: 90%;
1647
+ }
1648
+
1649
+ body > .rt-tooltip,
1650
+ body > .rt-tooltip .rt-tooltip-bottom:after {
1651
+ background: #000;
1652
+ border-radius: 2px;
1653
+ }
1654
+
1655
+ body > .rt-tooltip .rt-tooltip-bottom {
1656
+ width: 70px;
1657
+ height: 18px;
1658
+ overflow: hidden;
1659
+ position: absolute;
1660
+ left: 50%;
1661
+ margin-left: -32px;
1662
+ bottom: -16px;
1663
+ }
1664
+
1665
+ body > .rt-tooltip .rt-tooltip-bottom:after {
1666
+ content: "";
1667
+ position: absolute;
1668
+ left: 20px;
1669
+ top: -20px;
1670
+ width: 25px;
1671
+ height: 25px;
1672
+ -webkit-transform: rotate(45deg);
1673
+ -moz-transform: rotate(45deg);
1674
+ -ms-transform: rotate(45deg);
1675
+ -o-transform: rotate(45deg);
1676
+ tranform: rotate(45deg);
1677
+ }
1678
+
1679
+ /******************************************
1680
+ Common Layout Style
1681
+ ********************************************/
1682
+
1683
+
1684
+ .rt-tpg-container .rt-holder .rt-img-holder {
1685
+ position: relative;
1686
+ overflow: hidden;
1687
+ }
1688
+
1689
+ .rt-tpg-container .rt-holder .tpg-el-image-wrap {
1690
+ margin: -15px -15px 15px;
1691
+ }
1692
+
1693
+ .rt-tpg-container .list-behaviour .rt-holder .tpg-el-image-wrap {
1694
+ margin: 0;
1695
+ }
1696
+
1697
+ .rt-tpg-container .rt-holder:hover .rt-img-holder img:not(.avatar) {
1698
+ -webkit-transform: scale(1.1);
1699
+ -moz-transform: scale(1.1);
1700
+ -ms-transform: scale(1.1);
1701
+ -o-transform: scale(1.1);
1702
+ transform: scale(1.1);
1703
+ }
1704
+
1705
+ .rt-tpg-container .img_zoom_out .rt-holder .rt-img-holder img:not(.avatar) {
1706
+ -webkit-transform: scale(1.1);
1707
+ -moz-transform: scale(1.1);
1708
+ -ms-transform: scale(1.1);
1709
+ -o-transform: scale(1.1);
1710
+ transform: scale(1.1);
1711
+ }
1712
+
1713
+ .rt-tpg-container .img_no_effect .rt-holder:hover .rt-img-holder img,
1714
+ .rt-tpg-container .img_zoom_out .rt-holder:hover .rt-img-holder img {
1715
+ -webkit-transform: scale(1);
1716
+ -moz-transform: scale(1);
1717
+ -ms-transform: scale(1);
1718
+ -o-transform: scale(1);
1719
+ transform: scale(1);
1720
+ }
1721
+
1722
+
1723
+ .rt-tpg-container .rt-holder .rt-detail {
1724
+ padding: 15px 15px 0;
1725
+ }
1726
+
1727
+ .rt-tpg-container .entry-title-wrapper .entry-title {
1728
+ font-size: 26px;
1729
+ line-height: 1.25;
1730
+ margin: 0 0 18px;
1731
+ font-weight: 500;
1732
+ }
1733
+
1734
+ @media (max-width: 767px) {
1735
+ .rt-tpg-container .entry-title-wrapper .entry-title {
1736
+ font-size: 20px;
1737
+ margin: 0 0 15px;
1738
+ }
1739
+ }
1740
+
1741
+ .rt-tpg-container .rt-holder .rt-detail .entry-title-wrapper {
1742
+ margin-bottom: 15px;
1743
+ }
1744
+
1745
+ .rt-tpg-container .rt-detail .tpg-excerpt-inner {
1746
+ margin-bottom: 15px;
1747
+ }
1748
+
1749
+ .rt-tpg-container .list-layout2 .rt-detail .tpg-excerpt-inner,
1750
+ .rt-tpg-container .list-layout3 .rt-detail .tpg-excerpt-inner {
1751
+ margin-bottom: 0;
1752
+ }
1753
+
1754
+
1755
+ .rt-tpg-container .rt-holder .rt-detail .post-meta {
1756
+ line-height: 25px;
1757
+ overflow: hidden;
1758
+ }
1759
+
1760
+ .rt-tpg-container .rt-holder .rt-detail .read-more a {
1761
+ overflow: hidden;
1762
+ display: inline-flex;
1763
+ flex-direction: row;
1764
+ flex-wrap: wrap;
1765
+ justify-content: left;
1766
+ align-items: center;
1767
+ padding: 8px 20px;
1768
+ font-size: 15px;
1769
+ line-height: 1.8;
1770
+ border: 1px solid rgb(203 203 203 / 40%)
1771
+ }
1772
+
1773
+ .rt-tpg-container .rt-holder .rt-detail .read-more a:hover {
1774
+ color: #7a64f2;
1775
+ border-color: #7a64f2;
1776
+ }
1777
+
1778
+ .rt-tpg-container .rt-holder .rt-detail .read-more a {
1779
+ color: #1a1a1a;
1780
+ }
1781
+
1782
+ .rt-tpg-container .rt-holder .rt-detail .post-meta.right {
1783
+ text-align: right;
1784
+ }
1785
+
1786
+ .rt-tpg-container .rt-holder .rt-detail .post-meta.center {
1787
+ text-align: center;
1788
+ }
1789
+
1790
+ .tpg-img-circle .rt-img-holder img {
1791
+ border-radius: 50% !important;
1792
+ }
1793
+
1794
+
1795
+ /*
1796
+ * Animation
1797
+ */
1798
+ @-webkit-keyframes ball-scale-multiple {
1799
+ 0% {
1800
+ opacity: 0;
1801
+ -webkit-transform: scale(0);
1802
+ transform: scale(0);
1803
+ }
1804
+ 5% {
1805
+ opacity: .75;
1806
+ }
1807
+ 100% {
1808
+ opacity: 0;
1809
+ -webkit-transform: scale(1);
1810
+ transform: scale(1);
1811
+ }
1812
+ }
1813
+
1814
+ @-moz-keyframes ball-scale-multiple {
1815
+ 0% {
1816
+ opacity: 0;
1817
+ -moz-transform: scale(0);
1818
+ transform: scale(0);
1819
+ }
1820
+ 5% {
1821
+ opacity: .75;
1822
+ }
1823
+ 100% {
1824
+ opacity: 0;
1825
+ -moz-transform: scale(1);
1826
+ transform: scale(1);
1827
+ }
1828
+ }
1829
+
1830
+ @-o-keyframes ball-scale-multiple {
1831
+ 0% {
1832
+ opacity: 0;
1833
+ -o-transform: scale(0);
1834
+ transform: scale(0);
1835
+ }
1836
+ 5% {
1837
+ opacity: .75;
1838
+ }
1839
+ 100% {
1840
+ opacity: 0;
1841
+ -o-transform: scale(1);
1842
+ transform: scale(1);
1843
+ }
1844
+ }
1845
+
1846
+ @keyframes ball-scale-multiple {
1847
+ 0% {
1848
+ opacity: 0;
1849
+ -webkit-transform: scale(0);
1850
+ -moz-transform: scale(0);
1851
+ -o-transform: scale(0);
1852
+ transform: scale(0);
1853
+ }
1854
+ 5% {
1855
+ opacity: .75;
1856
+ }
1857
+ 100% {
1858
+ opacity: 0;
1859
+ -webkit-transform: scale(1);
1860
+ -moz-transform: scale(1);
1861
+ -o-transform: scale(1);
1862
+ transform: scale(1);
1863
+ }
1864
+ }
1865
+
1866
+ @-webkit-keyframes ball-clip-rotate {
1867
+ 0% {
1868
+ -webkit-transform: rotate(0deg);
1869
+ transform: rotate(0deg);
1870
+ }
1871
+ 50% {
1872
+ -webkit-transform: rotate(180deg);
1873
+ transform: rotate(180deg);
1874
+ }
1875
+ 100% {
1876
+ -webkit-transform: rotate(360deg);
1877
+ transform: rotate(360deg);
1878
+ }
1879
+ }
1880
+
1881
+ @-moz-keyframes ball-clip-rotate {
1882
+ 0% {
1883
+ -moz-transform: rotate(0deg);
1884
+ transform: rotate(0deg);
1885
+ }
1886
+ 50% {
1887
+ -moz-transform: rotate(180deg);
1888
+ transform: rotate(180deg);
1889
+ }
1890
+ 100% {
1891
+ -moz-transform: rotate(360deg);
1892
+ transform: rotate(360deg);
1893
+ }
1894
+ }
1895
+
1896
+ @-o-keyframes ball-clip-rotate {
1897
+ 0% {
1898
+ -o-transform: rotate(0deg);
1899
+ transform: rotate(0deg);
1900
+ }
1901
+ 50% {
1902
+ -o-transform: rotate(180deg);
1903
+ transform: rotate(180deg);
1904
+ }
1905
+ 100% {
1906
+ -o-transform: rotate(360deg);
1907
+ transform: rotate(360deg);
1908
+ }
1909
+ }
1910
+
1911
+ @keyframes ball-clip-rotate {
1912
+ 0% {
1913
+ -webkit-transform: rotate(0deg);
1914
+ -moz-transform: rotate(0deg);
1915
+ -o-transform: rotate(0deg);
1916
+ transform: rotate(0deg);
1917
+ }
1918
+ 50% {
1919
+ -webkit-transform: rotate(180deg);
1920
+ -moz-transform: rotate(180deg);
1921
+ -o-transform: rotate(180deg);
1922
+ transform: rotate(180deg);
1923
+ }
1924
+ 100% {
1925
+ -webkit-transform: rotate(360deg);
1926
+ -moz-transform: rotate(360deg);
1927
+ -o-transform: rotate(360deg);
1928
+ transform: rotate(360deg);
1929
+ }
1930
+ }
1931
+
1932
+ .rt-container-fluid {
1933
+ position: relative;
1934
+ }
1935
+
1936
+ #bottom-script-loader {
1937
+ position: absolute;
1938
+ width: 100%;
1939
+ height: 100%;
1940
+ z-index: 20;
1941
+ background: rgba(255, 255, 255, 0.95);
1942
+ }
1943
+
1944
+ #bottom-script-loader .rt-ball-clip-rotate {
1945
+ color: var(--tpg-primary-color);
1946
+ position: absolute;
1947
+ top: 80px;
1948
+ left: 50%;
1949
+ margin-left: -16px;
1950
+ z-index: 2;
1951
+ }
1952
+
1953
+ /*----------- Widget Heading -------------*/
1954
+
1955
+ .tpg-widget-heading-wrapper {
1956
+ position: relative;
1957
+ margin-bottom: 30px;
1958
+ display: flex;
1959
+ }
1960
+
1961
+ .tpg-widget-heading-wrapper .tpg-widget-heading {
1962
+ position: relative;
1963
+ padding-right: 15px;
1964
+ margin-top: 0;
1965
+ padding-top: 0;
1966
+ margin-bottom: -1px;
1967
+ line-height: 1;
1968
+ }
1969
+
1970
+ .search .tpg-widget-heading-wrapper .tpg-widget-heading {
1971
+ line-height: 1.5
1972
+ }
1973
+
1974
+ @meia (max-width: 767px) {
1975
+ .tpg-widget-heading-wrapper .tpg-widget-heading {
1976
+ line-height: 1.2;
1977
+ }
1978
+ }
1979
+
1980
+ .tpg-widget-heading-wrapper.center .tpg-widget-heading {
1981
+ margin: 0;
1982
+ padding: 0;
1983
+ }
1984
+
1985
+ .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading::before {
1986
+ content: '';
1987
+ position: absolute;
1988
+ top: 50%;
1989
+ right: -7.5px;
1990
+ width: 8px;
1991
+ height: 8px;
1992
+ margin-top: -4px;
1993
+ border-radius: 50%;
1994
+ background-color: var(--tpg-primary-color);
1995
+ margin-right: 7px;
1996
+ display: inline-block;
1997
+ }
1998
+
1999
+ .tpg-widget-heading-wrapper.heading-style1.center .tpg-widget-heading::before {
2000
+ display: none;
2001
+ }
2002
+
2003
+ .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line.line-left {
2004
+ display: none;
2005
+ }
2006
+
2007
+ .tpg-widget-heading-wrapper.heading-style1.center .tpg-widget-heading-line.line-left {
2008
+ display: block;
2009
+ margin-left: 0;
2010
+ margin-right: 15px;
2011
+ }
2012
+
2013
+ .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line-left,
2014
+ .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading-line {
2015
+ /*border: 1px solid;*/
2016
+ border-style: solid;
2017
+ border-color: #e5e5e5;
2018
+ border-width: 1px 0;
2019
+ -webkit-box-flex: 1;
2020
+ align-self: center;
2021
+ margin-left: 15px;
2022
+ -ms-flex-positive: 1;
2023
+ flex-grow: 1;
2024
+ height: 4px;
2025
+ }
2026
+
2027
+ .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading,
2028
+ .tpg-widget-heading-wrapper.heading-style3 .tpg-widget-heading {
2029
+ background-color: var(--tpg-primary-color);
2030
+ color: #fff;
2031
+ line-height: 1.4;
2032
+ padding: 5px 15px;
2033
+ margin-bottom: -.5px;
2034
+ }
2035
+
2036
+ .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading a,
2037
+ .tpg-widget-heading-wrapper.heading-style3 .tpg-widget-heading a {
2038
+ color: inherit;
2039
+ }
2040
+
2041
+ .tpg-widget-heading-wrapper.center {
2042
+ justify-content: center;
2043
+ }
2044
+
2045
+ .tpg-widget-heading-wrapper.right {
2046
+ flex-direction: row-reverse;
2047
+ }
2048
+
2049
+ .tpg-widget-heading-wrapper.right .tpg-widget-heading {
2050
+ padding-left: 15px;
2051
+ padding-right: 0;
2052
+ }
2053
+
2054
+ .tpg-widget-heading-wrapper.right .tpg-widget-heading::before {
2055
+ left: 0;
2056
+ right: auto;
2057
+ }
2058
+
2059
+ .tpg-widget-heading-wrapper.right .tpg-widget-heading-line {
2060
+ margin-left: 0;
2061
+ margin-right: 15px;
2062
+ }
2063
+
2064
+ .tpg-el-main-wrapper .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::before,
2065
+ .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::after {
2066
+ content: "";
2067
+ position: absolute;
2068
+ top: 0;
2069
+ right: -11px;
2070
+ border-width: 12px 12px 0 0;
2071
+ border-style: solid;
2072
+ border-color: var(--tpg-primary-color) transparent;
2073
+ }
2074
+
2075
+ .section-title-align-center .tpg-el-main-wrapper .tpg-widget-heading-wrapper.heading-style2 .tpg-widget-heading::before {
2076
+ right: auto;
2077
+ left: -11px;
2078
+ border-width: 12px 0 0 12px;
2079
+ }
2080
+
2081
+ .tpg-widget-heading-wrapper.heading-style2.right .tpg-widget-heading::after {
2082
+ left: -11px;
2083
+ right: auto;
2084
+ border-width: 12px 0 0 12px;
2085
+ }
2086
+
2087
+ .tpg-widget-heading-wrapper.heading-style2.center .tpg-widget-heading::after {
2088
+ content: none;
2089
+ }
2090
+
2091
+ .section-title-style-style2 .tpg-header-wrapper:not(.carousel) .tpg-widget-heading-wrapper,
2092
+ .section-title-style-style3 .tpg-header-wrapper:not(.carousel) .tpg-widget-heading-wrapper,
2093
+ .section-title-style-style2 .tpg-header-wrapper.carousel,
2094
+ .section-title-style-style3 .tpg-header-wrapper.carousel {
2095
+ border-bottom: 2px solid var(--tpg-primary-color);
2096
+ }
2097
+
2098
+
2099
+ /*End Widget Heading*/
2100
+
2101
+ /*===============
2102
+ TPG EVEN Style
2103
+ ==================*/
2104
+
2105
+ .tpg-full-height,
2106
+ .tpg-even {
2107
+ display: -ms-flexbox;
2108
+ display: flex;
2109
+ -ms-flex-wrap: wrap;
2110
+ flex-wrap: wrap;
2111
+ }
2112
+
2113
+
2114
+ @media (max-width: 767px) {
2115
+ .tpg-even .even-grid-item {
2116
+ width: 100%;
2117
+ }
2118
+ }
2119
+
2120
+ @media (max-width: 767px) {
2121
+ .rt-content-loader .rt-holder,
2122
+ .tpg-even .rt-holder {
2123
+ flex-direction: column;
2124
+ }
2125
+ }
2126
+
2127
+ /**********************************************************************/
2128
+ /********************************* pagination *************************/
2129
+ /**********************************************************************/
2130
+ .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > * {
2131
+ margin-left: 1px;
2132
+ margin-right: 1px;
2133
+ font-size: 16px;
2134
+ line-height: 1.55;
2135
+ display: inline-block;
2136
+ width: 30px;
2137
+ height: 30px;
2138
+ text-align: center;
2139
+ font-size: 18px;
2140
+ background-color: #bcbcbc;
2141
+ color: #fff;
2142
+ line-height: 30px;
2143
+ bottom: auto;
2144
+ cursor: pointer;
2145
+ transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2146
+ -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2147
+ -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2148
+ }
2149
+
2150
+ .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > * i {
2151
+ line-height: 1;
2152
+ }
2153
+
2154
+ .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > .rt-disabled {
2155
+ opacity: 0.5;
2156
+ pointer-events: none;
2157
+ }
2158
+
2159
+ .rt-cb-page-prev-next {
2160
+ text-align: left;
2161
+ }
2162
+
2163
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style .rt-loadmore-loading {
2164
+ color: #fff;
2165
+ position: absolute;
2166
+ top: 50%;
2167
+ left: 50%;
2168
+ margin-top: -32px;
2169
+ margin-left: -32px;
2170
+ visibility: hidden;
2171
+ opacity: 0;
2172
+ }
2173
+
2174
+ .rt-ball-scale-multiple.rt-2x {
2175
+ width: 64px;
2176
+ height: 64px;
2177
+ }
2178
+
2179
+ .rt-ball-scale-multiple.rt-2x > div {
2180
+ width: 64px;
2181
+ height: 64px;
2182
+ }
2183
+
2184
+ .rt-ball-scale-multiple, .rt-ball-scale-multiple > div {
2185
+ position: relative;
2186
+ -webkit-box-sizing: border-box;
2187
+ -moz-box-sizing: border-box;
2188
+ box-sizing: border-box;
2189
+ }
2190
+
2191
+ .rt-ball-scale-multiple > div {
2192
+ display: inline-block;
2193
+ float: none;
2194
+ background-color: currentColor;
2195
+ border: 0 solid currentColor;
2196
+ }
2197
+
2198
+ .rt-ball-scale-multiple > div:nth-child(2) {
2199
+ -webkit-animation-delay: .2s;
2200
+ -moz-animation-delay: .2s;
2201
+ -o-animation-delay: .2s;
2202
+ animation-delay: .2s;
2203
+ }
2204
+
2205
+ .rt-ball-scale-multiple > div {
2206
+ position: absolute;
2207
+ top: 0;
2208
+ left: 0;
2209
+ width: 32px;
2210
+ height: 32px;
2211
+ border-radius: 100%;
2212
+ opacity: 0;
2213
+ -webkit-animation: ball-scale-multiple 1s 0s linear infinite;
2214
+ -moz-animation: ball-scale-multiple 1s 0s linear infinite;
2215
+ -o-animation: ball-scale-multiple 1s 0s linear infinite;
2216
+ animation: ball-scale-multiple 1s 0s linear infinite;
2217
+ }
2218
+
2219
+ .rt-tpg-container .rt-pagination-wrap {
2220
+ text-align: center;
2221
+ margin-top: 10px;
2222
+ display: inline-block;
2223
+ width: 100%;
2224
+ }
2225
+
2226
+ .tpg-el-main-wrapper .rt-pagination-wrap {
2227
+ display: flex;
2228
+ flex-direction: row;
2229
+ justify-content: center;
2230
+ margin-top: 30px;
2231
+ }
2232
+
2233
+ .tpg-el-main-wrapper .rt-pagination-wrap .rt-pagination {
2234
+ margin: 0;
2235
+ }
2236
+
2237
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style {
2238
+ cursor: pointer;
2239
+ position: relative;
2240
+ user-select: none;
2241
+ -webkit-user-select: none;
2242
+ }
2243
+
2244
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-hidden-elm,
2245
+ .rt-tpg-container .rt-pagination-wrap .rt-infinite-action.rt-hidden-elm,
2246
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers.rt-hidden-elm,
2247
+ .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next.rt-hidden-elm {
2248
+ display: none !important;
2249
+ }
2250
+
2251
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-lm-loading .rt-loadmore-text {
2252
+ opacity: 0;
2253
+ visibility: hidden;
2254
+ }
2255
+
2256
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-lm-loading .rt-loadmore-loading {
2257
+ opacity: 1;
2258
+ visibility: visible;
2259
+ }
2260
+
2261
+ .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn {
2262
+ font-size: 13px;
2263
+ letter-spacing: 0.1em;
2264
+ text-transform: uppercase;
2265
+ margin-top: 30px;
2266
+ color: #fff;
2267
+ background-color: var(--tpg-primary-color);
2268
+ text-decoration: none;
2269
+ padding: 9px 20px 8px 20px;
2270
+ display: inline-block;
2271
+ transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2272
+ -webkit-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2273
+ -ms-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2274
+ }
2275
+
2276
+ .rt-tpg-container .rt-loadmore-btn:hover {
2277
+ background-color: var(--tpg-secondary-color);
2278
+ }
2279
+
2280
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages {
2281
+ float: none;
2282
+ padding-top: 0.1px;
2283
+ padding-bottom: 0.1px;
2284
+ }
2285
+
2286
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers.rt-lm-loading {
2287
+ pointer-events: none;
2288
+ opacity: 0.5;
2289
+ }
2290
+
2291
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul {
2292
+ float: none;
2293
+ text-align: center;
2294
+ font-size: 0;
2295
+ line-height: 0;
2296
+ margin: -2px;
2297
+ }
2298
+
2299
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li {
2300
+ float: none;
2301
+ font-size: 16px;
2302
+ line-height: 1.55;
2303
+ display: inline-block;
2304
+ min-width: 48px;
2305
+ min-height: 45px;
2306
+ border: none;
2307
+ padding: 2px;
2308
+ }
2309
+
2310
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li > a {
2311
+ border-radius: 3px;
2312
+ text-decoration: none;
2313
+ min-width: 48px;
2314
+ min-height: 45px;
2315
+ line-height: 45px;
2316
+ font-size: 16px;
2317
+ font-weight: normal;
2318
+ letter-spacing: 0;
2319
+ border: 1px solid #dee2e6;
2320
+ display: block;
2321
+ padding-left: 8px;
2322
+ padding-right: 8px;
2323
+ color: #212121;
2324
+ }
2325
+
2326
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active > a {
2327
+ background-color: var(--tpg-primary-color);
2328
+ border-color: var(--tpg-primary-color);
2329
+ color: #ffffff;
2330
+ }
2331
+
2332
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.paginationjs-ellipsis {
2333
+ padding: 0;
2334
+ min-width: auto;
2335
+ }
2336
+
2337
+ .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.paginationjs-ellipsis a {
2338
+ border: none !important;
2339
+ pointer-events: none !important;
2340
+ color: #000 !important;
2341
+ opacity: 1;
2342
+ font-size: 18px;
2343
+ min-width: auto;
2344
+ background: none !important;
2345
+ }
2346
+
2347
+ /* old pagination */
2348
+
2349
+ .rt-pagination {
2350
+ text-align: center;
2351
+ margin: 30px 0;
2352
+ }
2353
+
2354
+ .rt-pagination .pagination-list {
2355
+ display: inline-block;
2356
+ padding-left: 0;
2357
+ border-radius: 4px;
2358
+ background: transparent;
2359
+ border-top: 0;
2360
+ }
2361
+
2362
+ .rt-pagination .pagination-list a {
2363
+ box-shadow: none;
2364
+ }
2365
+
2366
+ .rt-pagination .pagination-list > li {
2367
+ display: inline-block;
2368
+ margin: 2px 2px;
2369
+ }
2370
+
2371
+ .rt-pagination .pagination-list > li > a,
2372
+ .rt-pagination .pagination-list > li > span {
2373
+ position: relative;
2374
+ padding: 0 5px;
2375
+ line-height: 45px;
2376
+ text-decoration: none;
2377
+ color: #212121;
2378
+ background-color: #ffffff;
2379
+ border: 1px solid #dddddd;
2380
+ margin-left: -1px;
2381
+ transition: 0.4s ease-in-out;
2382
+ min-width: 48px;
2383
+ min-height: 45px;
2384
+ border-radius: 3px;
2385
+ display: block;
2386
+ }
2387
+
2388
+ .rt-pagination .pagination-list > li > a:hover,
2389
+ .rt-pagination .pagination-list > li > span:hover,
2390
+ .rt-pagination .pagination-list > li > a:focus,
2391
+ .rt-pagination .pagination-list > li > span:focus {
2392
+ z-index: 2;
2393
+ color: #ffffff;
2394
+ background-color: var(--tpg-primary-color);
2395
+ border-color: var(--tpg-primary-color);
2396
+ }
2397
+
2398
+ .rt-pagination .pagination-list > .active > a,
2399
+ .rt-pagination .pagination-list > .active > span,
2400
+ .rt-pagination .pagination-list > .active > a:hover,
2401
+ .rt-pagination .pagination-list > .active > span:hover,
2402
+ .rt-pagination .pagination-list > .active > a:focus,
2403
+ .rt-pagination .pagination-list > .active > span:focus {
2404
+ z-index: 3;
2405
+ color: #ffffff;
2406
+ background-color: var(--tpg-primary-color);
2407
+ border-color: var(--tpg-primary-color);
2408
+ cursor: default;
2409
+ }
2410
+
2411
+ .rt-pagination .pagination-list > .disabled > span,
2412
+ .rt-pagination .pagination-list > .disabled > span:hover,
2413
+ .rt-pagination .pagination-list > .disabled > span:focus,
2414
+ .rt-pagination .pagination-list > .disabled > a,
2415
+ .rt-pagination .pagination-list > .disabled > a:hover,
2416
+ .rt-pagination .pagination-list > .disabled > a:focus {
2417
+ color: #212121;
2418
+ background-color: #ffffff;
2419
+ border-color: #dddddd;
2420
+ cursor: not-allowed;
2421
+ /*pointer-events: none;*/
2422
+ }
2423
+
2424
+
2425
+ /*---------- Swiper Pagination --------*/
2426
+
2427
+ .rt-tpg-container .swiper-pagination-bullet {
2428
+ background: #D6D6D6;
2429
+ opacity: 1;
2430
+ width: 10px;
2431
+ height: 10px;
2432
+ }
2433
+
2434
+ .rt-tpg-container .swiper-wrapper {
2435
+ padding-bottom: 45px;
2436
+ }
2437
+
2438
+ .rt-tpg-container.slider-layout13-main .swiper-wrapper {
2439
+ padding-bottom: 0;
2440
+ }
2441
+
2442
+ .rt-tpg-container .swiper-pagination-bullets.swiper-pagination-horizontal {
2443
+ bottom: 0;
2444
+ }
2445
+
2446
+ .rt-tpg-container .swiper-pagination-bullet.swiper-pagination-bullet-active-main {
2447
+ background: #007bff;
2448
+ }
2449
+
2450
+ .rt-tpg-container .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev,
2451
+ .rt-tpg-container .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
2452
+ transform: scale(.6);
2453
+ }
2454
+
2455
+ .rt-tpg-container .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next,
2456
+ .rt-tpg-container .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
2457
+ transform: scale(0.8);
2458
+ }
2459
+
2460
+ /*---------- Swiper Navigation -------------*/
2461
+
2462
+ .rt-tpg-container > div {
2463
+ position: relative;
2464
+ }
2465
+
2466
+ .rt-tpg-container .slider-main-wrapper {
2467
+ position: relative;
2468
+ }
2469
+
2470
+ .rt-tpg-container .swiper-navigation .slider-btn {
2471
+ position: absolute;
2472
+ font-size: 14px;
2473
+ color: #2962ff;
2474
+ background-color: #fff;
2475
+ width: 34px;
2476
+ height: 32px;
2477
+ border-radius: 3px;
2478
+ display: -webkit-inline-box;
2479
+ display: -ms-inline-flexbox;
2480
+ display: inline-flex;
2481
+ -webkit-box-pack: center;
2482
+ -ms-flex-pack: center;
2483
+ justify-content: center;
2484
+ -webkit-box-align: center;
2485
+ -ms-flex-align: center;
2486
+ align-items: center;
2487
+ border: 1px solid #e5e5e5;
2488
+ background-image: none;
2489
+ transition: all 0.3s ease;
2490
+ -webkit-transition: all 0.3s ease;
2491
+ -moz-transition: all 0.3s ease;
2492
+ -ms-transition: all 0.3s ease;
2493
+ }
2494
+
2495
+ .rt-tpg-container .tpg-header-wrapper .swiper-navigation .slider-btn,
2496
+ .slider-arrow-position-top-left .rt-tpg-container .swiper-navigation .slider-btn,
2497
+ .slider-arrow-position-top-right .rt-tpg-container .swiper-navigation .slider-btn {
2498
+ position: static;
2499
+ }
2500
+
2501
+ .rt-tpg-container .swiper-navigation .slider-btn:hover {
2502
+ color: #fff;
2503
+ background-color: #2962ff;
2504
+ border-color: #2962ff;
2505
+ }
2506
+
2507
+ .rt-tpg-container .swiper-navigation .slider-btn:focus {
2508
+ outline: 0;
2509
+ -webkit-box-shadow: none;
2510
+ box-shadow: none;
2511
+ }
2512
+
2513
+ .rt-tpg-container .swiper-navigation .slider-btn.swiper-button-next {
2514
+ margin-left: 3px;
2515
+ }
2516
+
2517
+ .rt-tpg-container .swiper-navigation .swiper-button-next:after,
2518
+ .rt-tpg-container .swiper-navigation .swiper-button-prev:after {
2519
+ font-size: inherit;
2520
+ }
2521
+
2522
+ /*ACF Style*/
2523
+
2524
+ .rt-tpg-container .tpg-cf-group-title {
2525
+ font-size: 16px;
2526
+ margin-bottom: 0;
2527
+ }
2528
+
2529
+ .rt-tpg-container .tpg-cf-fields {
2530
+ margin-top: 0;
2531
+ font-size: 95%;
2532
+ line-height: 1.6;
2533
+ }
2534
+
2535
+ .tpg-el-main-wrapper .tpg-cf-wrap {
2536
+ margin: 10px 0 0;
2537
+ }
2538
+
2539
+ .rt-tpg-container .tpg-cf-wrap:empty {
2540
+ margin: 0;
2541
+ }
2542
+
2543
+ .act-label-style-inline .tgp-cf-field-label {
2544
+ margin-right: 8px;
2545
+ min-width: inherit;
2546
+ }
2547
+
2548
+ .act-label-style-inline .tgp-cf-field-label::after {
2549
+ content: ":";
2550
+ }
2551
+
2552
+ .act-label-style-block .tgp-cf-field-label {
2553
+ margin-right: 0;
2554
+ float: none;
2555
+ display: block !important;
2556
+ min-width: inherit;
2557
+ }
2558
+
2559
+ .act-label-style-block .tpg-cf-fields {
2560
+ display: block;
2561
+ margin-bottom: 5px;
2562
+ }
2563
+
2564
+ .rt-tpg-container .rt-holder .tgp-cf-field-value * {
2565
+ color: inherit;
2566
+ transition: none;
2567
+ margin: 0;
2568
+ display: inline;
2569
+ }
2570
+
2571
+ /*End ACF Style*/
2572
+
2573
+ .isotope-term-no-post {
2574
+ min-height: 30px;
2575
+ }
2576
+ .isotope-term-no-post p {
2577
+ margin-bottom: 0;
2578
+ display: none;
2579
+ }
assets/css/thepostgrid-rtl.css CHANGED
@@ -1,24 +1,1409 @@
1
- .rt-col-xs-1, .rt-col-xs-2, .rt-col-xs-3, .rt-col-xs-4, .rt-col-xs-5, .rt-col-xs-6, .rt-col-xs-7, .rt-col-xs-8, .rt-col-xs-9, .rt-col-xs-10, .rt-col-xs-11, .rt-col-xs-12 {
2
- float: right;
 
 
 
 
 
 
 
 
 
 
3
  }
4
- .rt-tpg-container i {
 
5
  margin-left: 5px;
6
  }
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  @media (min-width: 768px) {
9
- .rt-col-sm-1, .rt-col-sm-2, .rt-col-sm-3, .rt-col-sm-4, .rt-col-sm-5, .rt-col-sm-6, .rt-col-sm-7, .rt-col-sm-8, .rt-col-sm-9, .rt-col-sm-10, .rt-col-sm-11, .rt-col-sm-12 {
10
- float: right;
11
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  }
13
 
14
- @media (min-width: 992px) {
15
- .rt-col-md-1, .rt-col-md-2, .rt-col-md-3, .rt-col-md-4, .rt-col-md-5, .rt-col-md-6, .rt-col-md-7, .rt-col-md-8, .rt-col-md-9, .rt-col-md-10, .rt-col-md-11, .rt-col-md-12 {
16
- float: right;
17
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  }
 
20
  @media (min-width: 1200px) {
21
- .rt-col-lg-1, .rt-col-lg-2, .rt-col-lg-3, .rt-col-lg-4, .rt-col-lg-5, .rt-col-lg-6, .rt-col-lg-7, .rt-col-lg-8, .rt-col-lg-9, .rt-col-lg-10, .rt-col-lg-11, .rt-col-lg-12 {
22
- float: right;
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**********************************************************************/
2
+ /************************* The Post Grid **************************/
3
+ /********************** support@radiustheme.com ***********************/
4
+ /************ Copyright @ 2015-2017, RadiusTheme.com ******************/
5
+ /**********************************************************************/
6
+
7
+
8
+ /************************ Common ***************************/
9
+
10
+ .tpg-shortcode-main-wrapper .masonry-grid-item,
11
+ .tpg-shortcode-main-wrapper .even-grid-item {
12
+ margin-bottom: 30px;
13
  }
14
+
15
+ .tpg-shortcode-main-wrapper i {
16
  margin-left: 5px;
17
  }
18
 
19
+ .tpg-shortcode-main-wrapper .list_layout1 .masonry-grid-item,
20
+ .tpg-shortcode-main-wrapper .list_layout1 .even-grid-item,
21
+ .tpg-shortcode-main-wrapper .grid_hover5 .masonry-grid-item,
22
+ .tpg-shortcode-main-wrapper .grid_hover5 .even-grid-item,
23
+ .tpg-shortcode-main-wrapper .grid_hover4 .masonry-grid-item,
24
+ .tpg-shortcode-main-wrapper .grid_hover4 .even-grid-item,
25
+ .tpg-shortcode-main-wrapper .grid_hover3 .masonry-grid-item,
26
+ .tpg-shortcode-main-wrapper .grid_hover3 .even-grid-item,
27
+ .tpg-shortcode-main-wrapper .grid_hover2 .masonry-grid-item,
28
+ .tpg-shortcode-main-wrapper .grid_hover2 .even-grid-item,
29
+ .tpg-shortcode-main-wrapper .grid_hover1 .masonry-grid-item,
30
+ .tpg-shortcode-main-wrapper .grid_hover1 .even-grid-item {
31
+ margin-bottom: initial;
32
+ }
33
+
34
+ .layout3 .rt-img-responsive {
35
+ display: inline-block;
36
+ }
37
+
38
+ .list_layout2 .post-meta-user,
39
+ .list_layout2 .post-meta-tags {
40
+ font-size: 14px;
41
+ color: #A5A6AA;
42
+ }
43
+
44
+ .rt-content-loader.layout14 .post-meta-user,
45
+ .rt-content-loader.layout14 .post-meta-tags {
46
+ margin-bottom: 0;
47
+ }
48
+
49
+ .offset06 .post-meta-user span,
50
+ .offset06 .post-meta-tags span {
51
+ font-weight: 500;
52
+ padding-left: 15px;
53
+ font-size: 14px;
54
+ color: #A5A6AA;
55
+ }
56
+
57
+ .offset06 .post-meta-user span a,
58
+ .offset06 .post-meta-tags span a {
59
+ color: #444444;
60
+ }
61
+
62
+ .offset06 .post-meta-user span a:hover,
63
+ .offset06 .post-meta-tags span a:hover {
64
+ color: #2962ff;
65
+ }
66
+
67
+ .tpg-shortcode-main-wrapper .rt-detail .entry-title a {
68
+ text-decoration: none;
69
+ }
70
+
71
+ .categories-links {
72
+ display: inline-block;
73
+ line-height: 1.3;
74
+ }
75
+
76
+ .tpg-shortcode-main-wrapper .rt-holder {
77
+ overflow: hidden;
78
+ }
79
+
80
+ .tpg-shortcode-main-wrapper .grid_hover6 .rt-grid-item {
81
+ padding: 0 2px;
82
+ margin-bottom: 4px;
83
+ }
84
+
85
+ .tpg-shortcode-main-wrapper .grid_hover7 .rt-grid-item .post-img img,
86
+ .tpg-shortcode-main-wrapper .grid_hover6 .rt-grid-item .post-img img {
87
+ min-height: 350px;
88
+ object-fit: cover;
89
+ }
90
+
91
+ .grid_hover4 .rt-grid-item {
92
+ padding: 0;
93
+ }
94
+
95
+ /*********************************************************************
96
+ /********************************* Layout 1 *************************/
97
+ /**********************************************************************/
98
+
99
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-img-holder,
100
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-img-holder,
101
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-img-holder {
102
+ position: relative;
103
+ overflow: hidden;
104
+ }
105
+
106
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-img-holder img,
107
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-img-holder img,
108
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-img-holder img {
109
+ -webkit-transition: all 1.1s ease;
110
+ -moz-transition: all 1.1s ease;
111
+ -o-transition: all 1.1s ease;
112
+ -ms-transition: all 1.1s ease;
113
+ transition: all 1.1s ease;
114
+ max-width: 100%;
115
+ }
116
+
117
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-img-holder:hover img,
118
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-img-holder:hover img,
119
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-img-holder:hover img {
120
+ -webkit-transform: scale(1.1);
121
+ -moz-transform: scale(1.1);
122
+ -ms-transform: scale(1.1);
123
+ -o-transform: scale(1.1);
124
+ transform: scale(1.1);
125
+ }
126
+
127
+ .tpg-shortcode-main-wrapper .layout1 .img_zoom_out .rt-holder .rt-img-holder img {
128
+ -webkit-transform: scale(1.1);
129
+ -moz-transform: scale(1.1);
130
+ -ms-transform: scale(1.1);
131
+ -o-transform: scale(1.1);
132
+ transform: scale(1.1);
133
+ }
134
+
135
+ .tpg-shortcode-main-wrapper .layout1 .img_no_effect .rt-holder .rt-img-holder:hover img,
136
+ .tpg-shortcode-main-wrapper .layout1 .img_zoom_out .rt-holder .rt-img-holder:hover img {
137
+ -webkit-transform: scale(1);
138
+ -moz-transform: scale(1);
139
+ -ms-transform: scale(1);
140
+ -o-transform: scale(1);
141
+ transform: scale(1);
142
+ }
143
+
144
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder,
145
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder,
146
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder {
147
+ box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
148
+ -webkit-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
149
+ -moz-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
150
+ }
151
+
152
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail,
153
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail,
154
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail {
155
+ background: #fff;
156
+ padding: 15px;
157
+ }
158
+
159
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail h2,
160
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail h3,
161
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail h4,
162
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail h2,
163
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail h3,
164
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail h4,
165
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail h2,
166
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail h3,
167
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail h4 {
168
+ font-size: 26px;
169
+ line-height: 1.25;
170
+ margin: 0 0 18px;
171
+ font-weight: 400;
172
+ }
173
+
174
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail.rt-with-title h2,
175
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail.rt-with-title h3,
176
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail.rt-with-title h4,
177
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail.rt-with-title h2,
178
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail.rt-with-title h3,
179
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail.rt-with-title h4,
180
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail.rt-with-title h2,
181
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail.rt-with-title h3,
182
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail.rt-with-title h4 {
183
+ margin-bottom: 15px;
184
+ }
185
+
186
+ .tpg-shortcode-main-wrapper .rt-holder .rt-detail.rt-with-title {
187
+ padding-top: 0;
188
+ }
189
+
190
+ .tpg-shortcode-main-wrapper .layout1 .rt-detail .tpg-excerpt,
191
+ .tpg-shortcode-main-wrapper .isotope1 .rt-detail .tpg-excerpt {
192
+ margin-bottom: 20px;
193
+ }
194
+
195
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail .post-meta,
196
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail .post-meta,
197
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail .post-meta {
198
+ line-height: 25px;
199
+ overflow: hidden;
200
+ }
201
+
202
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail .read-more a,
203
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail .read-more a,
204
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail .read-more a {
205
+ padding: 8px 20px;
206
+ display: inline-block;
207
+ font-size: 15px;
208
+ line-height: 1.8;
209
+ border: 1px solid rgb(203 203 203 / 40%)
210
+ }
211
+
212
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail .read-more a,
213
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail .read-more a,
214
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail .read-more a {
215
+ color: #1a1a1a;
216
+ }
217
+
218
+ .tpg-shortcode-main-wrapper .rt-holder .rt-detail .post-meta.right {
219
+ text-align: left;
220
+ }
221
+
222
+ .tpg-shortcode-main-wrapper .rt-holder .rt-detail .post-meta.center {
223
+ text-align: center;
224
+ }
225
+
226
+ .tpg-img-circle .rt-img-holder img {
227
+ border-radius: 50% !important;
228
+ }
229
+
230
+ /**********************************************************************/
231
+ /********************************* Layout 2 *************************/
232
+ /**********************************************************************/
233
+
234
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-img-holder {
235
+ position: relative;
236
+ overflow: hidden;
237
+ }
238
+
239
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-img-holder img {
240
+ -webkit-transition: all 1.1s ease;
241
+ -moz-transition: all 1.1s ease;
242
+ -o-transition: all 1.1s ease;
243
+ -ms-transition: all 1.1s ease;
244
+ transition: all 1.1s ease;
245
+ max-width: 100%;
246
+ }
247
+
248
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-img-holder:hover img {
249
+ -webkit-transform: scale(1.1);
250
+ -moz-transform: scale(1.1);
251
+ -ms-transform: scale(1.1);
252
+ -o-transform: scale(1.1);
253
+ transform: scale(1.1);
254
+ }
255
+
256
+ .tpg-shortcode-main-wrapper .layout2 .img_zoom_out .rt-holder .rt-img-holder img {
257
+ -webkit-transform: scale(1.1);
258
+ -moz-transform: scale(1.1);
259
+ -ms-transform: scale(1.1);
260
+ -o-transform: scale(1.1);
261
+ transform: scale(1.1);
262
+ }
263
+
264
+ .tpg-shortcode-main-wrapper .layout2 .img_zoom_out .rt-holder .rt-img-holder:hover img {
265
+ -webkit-transform: scale(1);
266
+ -moz-transform: scale(1);
267
+ -ms-transform: scale(1);
268
+ -o-transform: scale(1);
269
+ transform: scale(1);
270
+ }
271
+
272
+ .tpg-shortcode-main-wrapper .layout2 .img_no_effect .rt-holder .rt-img-holder img,
273
+ .tpg-shortcode-main-wrapper .layout2 .img_no_effect .rt-holder .rt-img-holder:hover img {
274
+ -webkit-transform: scale(1);
275
+ -moz-transform: scale(1);
276
+ -ms-transform: scale(1);
277
+ -o-transform: scale(1);
278
+ transform: scale(1);
279
+ }
280
+
281
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail h2,
282
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail h3,
283
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail h4 {
284
+ font-size: 26px;
285
+ line-height: 1.25;
286
+ margin: 0px 0 15px 0;
287
+ font-weight: 400;
288
+ }
289
+
290
+ .tpg-shortcode-main-wrapper .layout2 .rt-detail .tpg-excerpt {
291
+ margin-bottom: 20px;
292
+ }
293
+
294
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .read-more a {
295
+ line-height: 1.8;
296
+ border-radius: 5px;
297
+ display: inline-block;
298
+ }
299
+
300
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .read-more {
301
+ display: inline-block;
302
+ width: 100%;
303
+ }
304
+
305
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .read-more.right {
306
+ text-align: left;
307
+ }
308
+
309
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .read-more.center {
310
+ text-align: center;
311
+ }
312
+
313
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .rt-tpg-social-share {
314
+ margin-bottom: 15px;
315
+ }
316
+
317
+ @media all and (max-width: 767px) {
318
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail,
319
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail {
320
+ padding: 15px 0;
321
+ }
322
+ }
323
+
324
+ /**********************************************************************/
325
+ /********************************* Layout 3 *************************/
326
+ /**********************************************************************/
327
+
328
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail p {
329
+ margin-bottom: 20px;
330
+ }
331
+
332
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail h2,
333
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail h3,
334
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail h4 {
335
+ font-size: 26px;
336
+ margin: 0px 0 18px 0;
337
+ line-height: 1.25;
338
+ font-weight: 400;
339
+ }
340
+
341
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-img-holder .overlay {
342
+ width: 100%;
343
+ height: 100%;
344
+ display: block;
345
+ background: rgba(0, 0, 0, 0.7);
346
+ position: absolute;
347
+ z-index: 1;
348
+ opacity: 0;
349
+ -webkit-transition: all 0.3s ease-out 0s;
350
+ -moz-transition: all 0.3s ease-out 0s;
351
+ -ms-transition: all 0.3s ease-out 0s;
352
+ -o-transition: all 0.3s ease-out 0s;
353
+ transition: all 0.3s ease-out 0s;
354
+ text-align: center;
355
+ }
356
+
357
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .read-more a {
358
+ line-height: 1.8;
359
+ display: inline-block;
360
+ }
361
+
362
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-img-holder,
363
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-img-holder > a.rounded img {
364
+ border-radius: 50%;
365
+ overflow: hidden;
366
+ }
367
+
368
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .read-more {
369
+ display: inline-block;
370
+ width: 100%;
371
+ }
372
+
373
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .read-more.right {
374
+ text-align: left;
375
+ }
376
+
377
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .read-more.center {
378
+ text-align: center;
379
+ }
380
+
381
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .rt-tpg-social-share {
382
+ margin-bottom: 15px;
383
+ }
384
+
385
+ /**********************************************************************/
386
+ /********************************* Layout 5 *************************/
387
+ /**********************************************************************/
388
+
389
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder,
390
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder,
391
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder,
392
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder {
393
+ position: relative;
394
+ overflow: hidden;
395
+ }
396
+
397
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay,
398
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay,
399
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay,
400
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay {
401
+ right: 0;
402
+ bottom: 0;
403
+ display: block;
404
+ background: rgba(235, 0, 0, 0.8);
405
+ position: absolute;
406
+ z-index: 1;
407
+ opacity: 1;
408
+ padding: 20px;
409
+ width: 100%;
410
+ height: 25%;
411
+ transition: all 1s ease;
412
+ min-height: 150px;
413
+ }
414
+
415
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .rt-detail,
416
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .rt-detail,
417
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .rt-detail {
418
+ opacity: 0;
419
+ visibility: hidden;
420
+ padding: 0;
421
+ color: #fff;
422
+ transition: all 0.8s ease-in-out;
423
+ max-height: 0;
424
+ }
425
+
426
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder:hover .overlay .rt-detail,
427
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder:hover .overlay .rt-detail,
428
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder:hover .overlay .rt-detail {
429
+ max-height: 450px;
430
+ transition: all 1.2s ease-in-out 0.2s;
431
+ }
432
+
433
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .rt-detail {
434
+ padding: 0 0 15px;
435
+ color: #fff;
436
+ }
437
+
438
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .rt-detail > *:not(.post-meta-user) {
439
+ opacity: 0;
440
+ visibility: hidden;
441
+ }
442
+
443
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder:hover .overlay .rt-detail > *:not(.post-meta-user) {
444
+ opacity: 1;
445
+ visibility: visible;
446
+ }
447
+
448
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .post-meta-user,
449
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .post-meta-user a,
450
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .post-meta-user,
451
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .post-meta-user a,
452
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .post-meta-user,
453
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .post-meta-user a,
454
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .post-meta-user,
455
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .post-meta-user a {
456
+ color: #fff;
457
+ }
458
+
459
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h2,
460
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h3,
461
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h4,
462
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h2,
463
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h3,
464
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h4,
465
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h2,
466
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h3,
467
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h4,
468
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h2,
469
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h3,
470
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h4 {
471
+ font-size: 22px;
472
+ line-height: 1.3;
473
+ color: #ffffff;
474
+ margin: 0px 0 10px;
475
+ font-weight: 400;
476
+ }
477
+
478
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h2 a,
479
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h3 a,
480
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h4 a,
481
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h2 a,
482
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h3 a,
483
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h4 a,
484
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h2 a,
485
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h3 a,
486
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h4 a,
487
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h2 a,
488
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h3 a,
489
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h4 a {
490
+ color: #ffffff;
491
+ }
492
+
493
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder:hover .overlay,
494
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder:hover .overlay,
495
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder:hover .overlay,
496
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder:hover .overlay {
497
+ width: 100%;
498
+ height: 100%;
499
+ }
500
+
501
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder:hover .overlay .rt-detail,
502
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder:hover .overlay .rt-detail,
503
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder:hover .overlay .rt-detail,
504
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder:hover .overlay .rt-detail {
505
+ opacity: 1;
506
+ visibility: visible;
507
+ }
508
+
509
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .post-meta-user,
510
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .post-meta-user,
511
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .post-meta-user,
512
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .post-meta-user {
513
+ display: block;
514
+ }
515
+
516
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .post-meta .rt-tpg-social-share,
517
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .post-meta {
518
+ text-align: center;
519
+ }
520
+
521
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .post-meta.left {
522
+ text-align: right;
523
+ }
524
+
525
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay > *:not(.entry-title),
526
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .rt-detail,
527
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay > *:not(.entry-title) {
528
+ overflow: hidden;
529
+ max-height: 0;
530
+ transition: 0.6s !important;
531
+ opacity: 0;
532
+ }
533
+
534
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .overlay > *:not(.entry-title),
535
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder:hover .overlay .rt-detail,
536
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .overlay > *:not(.entry-title) {
537
+ max-height: 300px;
538
+ opacity: 1;
539
+ }
540
+
541
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder {
542
+ min-height: 250px;
543
+ display: flex;
544
+ }
545
+
546
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .rt-img-responsive {
547
+ height: 100%;
548
+ object-fit: cover;
549
+ }
550
+
551
+ /**********************************************************************/
552
+ /********************************* Layout 6 *************************/
553
+ /**********************************************************************/
554
+
555
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder,
556
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder,
557
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder {
558
+ position: relative;
559
+ }
560
+
561
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay,
562
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay,
563
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay {
564
+ width: 100%;
565
+ height: 100%;
566
+ display: flex;
567
+ background: rgba(0, 0, 0, 0.7);
568
+ position: absolute;
569
+ -webkit-transition: all 300ms ease-out;
570
+ -moz-transition: all 300ms ease-out;
571
+ -o-transition: all 300ms ease-out;
572
+ transition: all 300ms ease-out;
573
+ opacity: 0;
574
+ text-decoration: none;
575
+ text-align: center;
576
+ padding: 15px;
577
+ z-index: 9;
578
+ flex-direction: column;
579
+ justify-content: center;
580
+ align-items: center;
581
+ }
582
+
583
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .line,
584
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .line,
585
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .line {
586
+ height: 2px;
587
+ min-height: 2px;
588
+ width: 0%;
589
+ margin: 12px auto;
590
+ background-color: #ffffff;
591
+ -webkit-transition: all 500ms ease-out;
592
+ -moz-transition: all 500ms ease-out;
593
+ -o-transition: all 500ms ease-out;
594
+ transition: all 500ms ease-out;
595
+ }
596
+
597
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay:hover .line,
598
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay:hover .line,
599
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay:hover .line {
600
+ width: 40%;
601
+ }
602
+
603
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h2,
604
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h3,
605
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h4,
606
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h2,
607
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h3,
608
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h4,
609
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h2,
610
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h3,
611
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h4 {
612
+ padding-top: 5%;
613
+ color: #ffffff;
614
+ font-size: 22px;
615
+ line-height: 1.25;
616
+ font-weight: 400;
617
+ margin: 0px 0 18px 0;
618
+ }
619
+
620
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h2 a,
621
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h3 a,
622
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h4 a,
623
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h2 a,
624
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h3 a,
625
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h4 a,
626
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h2 a,
627
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h3 a,
628
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h4 a {
629
+ color: #ffffff;
630
+ }
631
+
632
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta.left,
633
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta.left,
634
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta.left {
635
+ text-align: right;
636
+ }
637
+
638
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta.right,
639
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta.right,
640
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta.right {
641
+ text-align: left;
642
+ }
643
+
644
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .rt-tpg-social-share,
645
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .rt-tpg-social-share,
646
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .rt-tpg-social-share {
647
+ float: none;
648
+ text-align: center;
649
+ }
650
+
651
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .read-more,
652
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .read-more,
653
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .read-more {
654
+ float: none;
655
+ }
656
+
657
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta-user,
658
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta-user,
659
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta-user {
660
+ color: #fff;
661
+ }
662
+
663
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta-user p,
664
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta-user p,
665
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta-user p {
666
+ margin-bottom: 0;
667
+ }
668
+
669
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta-user a,
670
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta-user a,
671
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta-user a {
672
+ color: #fff;
673
+ }
674
+
675
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder:hover .overlay .tpg-excerpt,
676
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder:hover .overlay .tpg-excerpt,
677
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder:hover .overlay .tpg-excerpt {
678
+ color: #ffffff;
679
+ }
680
+
681
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder:hover .overlay,
682
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder:hover .overlay,
683
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder:hover .overlay {
684
+ opacity: 1;
685
+ }
686
+
687
+ /**********************************************************************/
688
+ /********************************* Layout 7 *************************/
689
+ /**********************************************************************/
690
+
691
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder,
692
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder,
693
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder {
694
+ position: relative;
695
+ }
696
+
697
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder img,
698
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder img,
699
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder img {
700
+ opacity: 0.9;
701
+ -webkit-transition: opacity 0.35s;
702
+ transition: opacity 0.35s;
703
+ }
704
+
705
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay,
706
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay,
707
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay {
708
+ display: flex;
709
+ justify-content: center;
710
+ flex-direction: column;
711
+ align-items: center;
712
+ position: absolute;
713
+ top: 0;
714
+ right: 0;
715
+ width: 100%;
716
+ height: 100%;
717
+ padding: 0 12px;
718
+ background: rgba(0, 0, 0, 0.3);
719
+ }
720
+
721
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay:hover,
722
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay:hover,
723
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay:hover {
724
+ background: rgba(0, 0, 0, 0.5);
725
+ }
726
+
727
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay::before,
728
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay::before,
729
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay::before {
730
+ position: absolute;
731
+ top: 20px;
732
+ left: 20px;
733
+ bottom: 20px;
734
+ right: 20px;
735
+ border: 2px solid #fff;
736
+ box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.2);
737
+ content: '';
738
+ opacity: 0;
739
+ -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
740
+ transition: opacity 0.35s, transform 0.35s;
741
+ -webkit-transform: scale3d(1.4, 1.4, 1);
742
+ transform: scale3d(1.4, 1.4, 1);
743
+ }
744
+
745
+
746
+ .tpg-shortcode-main-wrapper .carousel12 .rt-holder .post-info .cat-above-title,
747
+ .tpg-shortcode-main-wrapper .carousel11 .rt-holder .post-info .cat-above-title,
748
+ .tpg-shortcode-main-wrapper .carousel7 .rt-holder .cat-above-title {
749
+ color: #ffffff;
750
+ text-align: center;
751
+ }
752
+
753
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder .cat-above-title,
754
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .cat-above-title {
755
+ text-align: center;
756
+ opacity: 0;
757
+ margin-top: 30px;
758
+ color: #ffffff;
759
+ }
760
+
761
+ .tpg-shortcode-main-wrapper .carousel12 .rt-holder .post-info .cat-above-title *,
762
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .cat-above-title *,
763
+ .tpg-shortcode-main-wrapper .carousel7 .rt-holder .cat-above-title a,
764
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder .cat-above-title a,
765
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .cat-above-title a {
766
+ color: inherit;
767
+ }
768
+
769
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder:hover .cat-above-title,
770
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .cat-above-title {
771
+ opacity: 1;
772
+ }
773
+
774
+ .tpg-shortcode-main-wrapper .carousel12 .rt-holder .post-info .cat-above-title,
775
+ .tpg-shortcode-main-wrapper .carousel11 .rt-holder .post-info .cat-above-title,
776
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder:hover .cat-above-title + .entry-title {
777
+ padding-top: 10px;
778
+ }
779
+
780
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .cat-above-title + .entry-title {
781
+ margin-top: 10px;
782
+ }
783
+
784
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h2,
785
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h3,
786
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h4,
787
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h2,
788
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h3,
789
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h4,
790
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h2,
791
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h3,
792
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h4 {
793
+ color: #ffffff;
794
+ font-size: 22px;
795
+ font-weight: 400;
796
+ line-height: 1.25;
797
+ margin: 30% 0 10px 0;
798
+ text-align: center;
799
+ -webkit-transition: -webkit-transform 0.35s;
800
+ transition: transform 0.35s;
801
+ }
802
+
803
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h2 a,
804
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h3 a,
805
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h4 a,
806
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h2 a,
807
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h3 a,
808
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h4 a,
809
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h2 a,
810
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h3 a,
811
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h4 a {
812
+ color: #ffffff;
813
+ }
814
+
815
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder p,
816
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder p,
817
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder p,
818
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .tpg-excerpt,
819
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .tpg-excerpt,
820
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .tpg-excerpt {
821
+ color: #ffffff;
822
+ padding: 0 15px;
823
+ opacity: 0;
824
+ text-align: center;
825
+ -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
826
+ transition: opacity 0.35s, transform 0.35s;
827
+ -webkit-transform: scale(1.5);
828
+ transform: scale(1.5);
829
+ }
830
+
831
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .post-meta-user p,
832
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .post-meta-user p,
833
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .post-meta-user p {
834
+ margin-bottom: 0;
835
+ }
836
+
837
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .post-meta-user a,
838
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .post-meta-user a,
839
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .post-meta-user a {
840
+ color: #ffffff;
841
+ }
842
+
843
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover h3,
844
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover h3,
845
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover h3 {
846
+ margin: 7% 0 10px 0;
847
+ -webkit-transform: scale(0.9);
848
+ transform: scale(0.9);
849
+ }
850
+
851
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .overlay::before,
852
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover .overlay::before,
853
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .overlay::before,
854
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .tpg-excerpt,
855
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover .tpg-excerpt,
856
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .tpg-excerpt,
857
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover p,
858
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover p,
859
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover p {
860
+ opacity: 1;
861
+ -webkit-transform: scale3d(1, 1, 1);
862
+ transform: scale3d(1, 1, 1);
863
+ }
864
+
865
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .cat-above-title,
866
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .post-meta,
867
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay .post-meta,
868
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay .post-meta {
869
+ color: #ffffff;
870
+ text-align: center;
871
+ overflow: hidden;
872
+ opacity: 0;
873
+ }
874
+
875
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .post-meta.left,
876
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay .post-meta.left,
877
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay .post-meta.left {
878
+ text-align: right;
879
+ }
880
+
881
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .post-meta.right,
882
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay .post-meta.right,
883
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay .post-meta.right {
884
+ text-align: left;
885
+ }
886
+
887
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .cat-above-title,
888
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .overlay .post-meta,
889
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover .overlay .post-meta,
890
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .overlay .post-meta {
891
+ opacity: 1;
892
+ -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
893
+ transition: opacity 0.35s, transform 0.35s;
894
+ -webkit-transform: scale(1);
895
+ transform: scale(1);
896
+ }
897
+
898
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .rt-tpg-social-share,
899
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay .rt-tpg-social-share,
900
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay .rt-tpg-social-share {
901
+ float: none;
902
+ text-align: center;
903
+ }
904
+
905
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .read-more,
906
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .read-more,
907
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .read-more {
908
+ float: none;
909
+ }
910
+
911
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .entry-title,
912
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h3 {
913
+ margin: 0 !important;
914
+ transition: 0.4s;
915
+ }
916
+
917
+ /**********************************************************************/
918
+ /********************************* Layout 12 *************************/
919
+ /**********************************************************************/
920
+
921
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder,
922
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder,
923
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder {
924
+ background: #fff;
925
+ -webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.22);
926
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.22);
927
+ }
928
+
929
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-img-holder,
930
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-img-holder,
931
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-img-holder {
932
+ position: relative;
933
+ overflow: hidden;
934
+ }
935
+
936
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover img,
937
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover img,
938
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover img {
939
+ -webkit-transition: all 0.25s ease-in-out;
940
+ transform: scale(1.05, 1.05);
941
+ -webkit-transform: scale(1.05, 1.05);
942
+ -moz-transform: scale(1.05, 1.05);
943
+ -ms-transform: scale(1.05, 1.05);
944
+ -o-transform: scale(1.05, 1.05);
945
+ }
946
+
947
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail,
948
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail,
949
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail {
950
+ background: #fff;
951
+ padding: 25px;
952
+ -webkit-transition: all 0.3s ease-out 0s;
953
+ -moz-transition: all 0.3s ease-out 0s;
954
+ -ms-transition: all 0.3s ease-out 0s;
955
+ -o-transition: all 0.3s ease-out 0s;
956
+ transition: all 0.3s ease-out 0s;
957
+ display: inline-block;
958
+ width: 100%;
959
+ }
960
+
961
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail.rt-with-title,
962
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail.rt-with-title,
963
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail.rt-with-title {
964
+ padding-top: 0;
965
+ padding-bottom: 0;
966
+ }
967
+
968
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder.rt-with-title-below h2.entry-title,
969
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder.rt-with-title-below h3.entry-title,
970
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder.rt-with-title-below h4.entry-title,
971
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder.rt-with-title-below h2.entry-title,
972
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder.rt-with-title-below h3.entry-title,
973
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder.rt-with-title-below h4.entry-title,
974
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder.rt-with-title-below h2.entry-title,
975
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder.rt-with-title-below h3.entry-title,
976
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder.rt-with-title-below h4.entry-title {
977
+ margin-top: 0;
978
+ }
979
+
980
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail.rt-with-title .entry-title,
981
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail.rt-with-title .entry-title,
982
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail.rt-with-title .entry-title {
983
+ display: inline-block;
984
+ }
985
+
986
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder.rt-with-title .post-meta-user,
987
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder.rt-with-title .post-meta-user,
988
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder.rt-with-title .post-meta-user {
989
+ margin-bottom: 15px;
990
+ }
991
+
992
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h2,
993
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h3,
994
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h4,
995
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h2,
996
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h3,
997
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h4,
998
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h2,
999
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h3,
1000
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h4 {
1001
+ font-size: 22px;
1002
+ line-height: 1.25;
1003
+ margin: 15px 0px 15px;
1004
+ font-weight: 400;
1005
+ }
1006
+
1007
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h2 a,
1008
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h3 a,
1009
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h4 a,
1010
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h2 a,
1011
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h3 a,
1012
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h4 a,
1013
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h2 a,
1014
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h3 a,
1015
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h4 a {
1016
+ color: #000;
1017
+ }
1018
+
1019
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h2 a:hover,
1020
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h3 a:hover,
1021
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h4 a:hover,
1022
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h2 a:hover,
1023
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h3 a:hover,
1024
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h4 a:hover,
1025
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h2 a:hover,
1026
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h3 a:hover,
1027
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h4 a:hover {
1028
+ color: #fff;
1029
+ }
1030
+
1031
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover .rt-detail,
1032
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail,
1033
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail {
1034
+ background: #0850d0;
1035
+ color: #fff;
1036
+ }
1037
+
1038
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail .read-more,
1039
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail .read-more,
1040
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail .read-more {
1041
+ text-align: left;
1042
+ }
1043
+
1044
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail .post-meta-user,
1045
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail .post-meta-user .meta-data,
1046
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail .post-meta-user a,
1047
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail .post-meta-user i[class^='fa'],
1048
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail h3 a,
1049
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail .post-meta-user,
1050
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail .post-meta-user .meta-data,
1051
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail .post-meta-user i[class^='fa'],
1052
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail .post-meta-user a,
1053
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover .rt-detail .post-meta-user,
1054
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover .rt-detail i,
1055
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover .rt-detail .post-meta-user a {
1056
+ color: #fff !important;
1057
+ }
1058
+
1059
+
1060
+ /**********************************************************************/
1061
+ /********************************* Media Query *************************/
1062
+ /**********************************************************************/
1063
+
1064
+ @media (min-width: 992px) {
1065
+ .rt-container {
1066
+ width: 970px;
1067
+ }
1068
+ }
1069
+
1070
+ @media (min-width: 1200px) {
1071
+ .rt-container {
1072
+ width: 1170px;
1073
+ }
1074
+ }
1075
+
1076
+ @media (max-width: 767px) {
1077
+ .hidden-xs {
1078
+ display: none !important;
1079
+ }
1080
+ }
1081
+
1082
+ @media screen and (max-width: 768px) {
1083
+ .rt-member-feature-img, .rt-member-description-container {
1084
+ float: none;
1085
+ width: 100%;
1086
+ }
1087
+ }
1088
+
1089
  @media (min-width: 768px) {
1090
+ .rt-col-sm-1, .rt-col-sm-2, .rt-col-sm-3, .rt-col-sm-4, .rt-col-sm-5, .rt-col-sm-6, .rt-col-sm-7, .rt-col-sm-8, .rt-col-sm-9, .rt-col-sm-10, .rt-col-sm-11, .rt-col-sm-12, .rt-col-sm-24 {
1091
+ float: right;
1092
+ }
1093
+
1094
+ .rt-col-sm-24 {
1095
+ width: 20%;
1096
+ }
1097
+
1098
+ .rt-col-sm-12 {
1099
+ width: 100%;
1100
+ }
1101
+
1102
+ .rt-col-sm-11 {
1103
+ width: 91.66666667%;
1104
+ }
1105
+
1106
+ .rt-col-sm-10 {
1107
+ width: 83.33333333%;
1108
+ }
1109
+
1110
+ .rt-col-sm-9 {
1111
+ width: 75%;
1112
+ }
1113
+
1114
+ .rt-col-sm-8 {
1115
+ width: 66.66666667%;
1116
+ }
1117
+
1118
+ .rt-col-sm-7 {
1119
+ width: 58.33333333%;
1120
+ }
1121
+
1122
+ .rt-col-sm-6 {
1123
+ width: 50%;
1124
+ }
1125
+
1126
+ .rt-col-sm-5 {
1127
+ width: 41.66666667%;
1128
+ }
1129
+
1130
+ .rt-col-sm-4 {
1131
+ width: 33.33333333%;
1132
+ }
1133
+
1134
+ .rt-col-sm-3 {
1135
+ width: 25%;
1136
+ }
1137
+
1138
+ .rt-col-sm-2 {
1139
+ width: 16.66666667%;
1140
+ }
1141
+
1142
+ .rt-col-sm-1 {
1143
+ width: 8.33333333%;
1144
+ }
1145
+
1146
  }
1147
 
1148
+ @media (min-width: 992px) {
1149
+ .rt-col-md-1, .rt-col-md-2, .rt-col-md-3, .rt-col-md-4, .rt-col-md-5, .rt-col-md-6, .rt-col-md-7, .rt-col-md-8, .rt-col-md-9, .rt-col-md-10, .rt-col-md-11, .rt-col-md-12, .rt-col-md-24 {
1150
+ float: right;
1151
+ }
1152
+
1153
+ .rt-col-md-24 {
1154
+ width: 20%;
1155
+ }
1156
+
1157
+ .rt-col-md-12 {
1158
+ width: 100%;
1159
+ }
1160
+
1161
+ .rt-col-md-11 {
1162
+ width: 91.66666667%;
1163
+ }
1164
+
1165
+ .rt-col-md-10 {
1166
+ width: 83.33333333%;
1167
+ }
1168
+
1169
+ .rt-col-md-9 {
1170
+ width: 75%;
1171
+ }
1172
+
1173
+ .rt-col-md-8 {
1174
+ width: 66.66666667%;
1175
+ }
1176
+
1177
+ .rt-col-md-7 {
1178
+ width: 58.33333333%;
1179
+ }
1180
+
1181
+ .rt-col-md-6 {
1182
+ width: 50%;
1183
+ }
1184
+
1185
+ .rt-col-md-5 {
1186
+ width: 41.66666667%;
1187
+ }
1188
+
1189
+ .rt-col-md-4 {
1190
+ width: 33.33333333%;
1191
+ }
1192
+
1193
+ .rt-col-md-3 {
1194
+ width: 25%;
1195
+ }
1196
+
1197
+ .rt-col-md-2 {
1198
+ width: 16.66666667%;
1199
+ }
1200
+
1201
+ .rt-col-md-1 {
1202
+ width: 8.33333333%;
1203
+ }
1204
 
1205
  }
1206
+
1207
  @media (min-width: 1200px) {
1208
+ .rt-col-lg-1, .rt-col-lg-2, .rt-col-lg-3, .rt-col-lg-4, .rt-col-lg-5, .rt-col-lg-6, .rt-col-lg-7, .rt-col-lg-8, .rt-col-lg-9, .rt-col-lg-10, .rt-col-lg-11, .rt-col-lg-12 {
1209
+ float: right;
1210
+ }
1211
+
1212
+ .rt-col-lg-24 {
1213
+ width: 20%;
1214
+ }
1215
+
1216
+ .rt-col-lg-12 {
1217
+ width: 100%;
1218
+ }
1219
+
1220
+ .rt-col-lg-11 {
1221
+ width: 91.66666667%;
1222
+ }
1223
+
1224
+ .rt-col-lg-10 {
1225
+ width: 83.33333333%;
1226
+ }
1227
+
1228
+ .rt-col-lg-9 {
1229
+ width: 75%;
1230
+ }
1231
+
1232
+ .rt-col-lg-8 {
1233
+ width: 66.66666667%;
1234
+ }
1235
+
1236
+ .rt-col-lg-7 {
1237
+ width: 58.33333333%;
1238
+ }
1239
+
1240
+ .rt-col-lg-6 {
1241
+ width: 50%;
1242
+ }
1243
+
1244
+ .rt-col-lg-5 {
1245
+ width: 41.66666667%;
1246
+ }
1247
+
1248
+ .rt-col-lg-4 {
1249
+ width: 33.33333333%;
1250
+ }
1251
+
1252
+ .rt-col-lg-3 {
1253
+ width: 25%;
1254
+ }
1255
+
1256
+ .rt-col-lg-2 {
1257
+ width: 16.66666667%;
1258
+ }
1259
+
1260
+ .rt-col-lg-1 {
1261
+ width: 8.33333333%;
1262
+ }
1263
+
1264
+ }
1265
+
1266
+ /**********************************************************************/
1267
+ /**************************** End Media Query *************************/
1268
+ /**********************************************************************/
1269
+
1270
+ /*--------- Settings Style -----------*/
1271
+
1272
+
1273
+ /*Image ZoomIn Effect*/
1274
+ .rt-img-holder {
1275
+ overflow: hidden;
1276
+ }
1277
+
1278
+ .layout4 .rt-img-holder,
1279
+ .layout4 .rt-img-holder a,
1280
+ .layout4 .rt-img-holder img {
1281
+ height: 100%;
1282
+ }
1283
+
1284
+ .img_zoom_out img.rt-img-responsive,
1285
+ .img_zoom_in img.rt-img-responsive {
1286
+ transition: all 1s !important;
1287
+ min-width: 100%;
1288
+ }
1289
+
1290
+ .img_zoom_in:hover img.rt-img-responsive {
1291
+ transform: scale(1.2) !important;
1292
+ }
1293
+
1294
+ .img_zoom_out img.rt-img-responsive {
1295
+ transform: scale(1.2) !important;
1296
+ }
1297
+
1298
+ .img_zoom_out:hover img.rt-img-responsive {
1299
+ transform: scale(1) !important;
1300
+ }
1301
+
1302
+ .tpg-shortcode-main-wrapper .img_no_effect:hover img.rt-img-responsive {
1303
+ transform: none;
1304
+ }
1305
+
1306
+ /*TPG EVEN Style */
1307
+
1308
+ .tpg-even .rt-holder {
1309
+ display: flex;
1310
+ height: 100%;
1311
+ }
1312
+
1313
+ .tpg-even.layout12 .rt-holder,
1314
+ .tpg-even.edd1 .rt-holder,
1315
+ .tpg-even.layout1 .rt-holder,
1316
+ .tpg-even.offset02 .offset-big .rt-holder,
1317
+ .tpg-even.offset01 .offset-big .rt-holder {
1318
+ flex-direction: column;
1319
+ }
1320
+
1321
+ .tpg-even.layout1 .rt-holder .rt-img-holder,
1322
+ .tpg-even.edd1 .rt-holder .rt-img-holder,
1323
+ .tpg-even.layout11 .rt-holder .rt-img-holder,
1324
+ .tpg-even.layout11 .rt-holder .rt-img-holder * {
1325
+ height: auto;
1326
+ }
1327
+
1328
+
1329
+ @media (min-width: 768px) and (max-width: 991px) {
1330
+ .tpg-even.layout4 .even-grid-item:nth-of-type(4n+2) .rt-holder [class*='rt-col']:first-child {
1331
+ order: 2;
1332
+ }
1333
+
1334
+ .tpg-even.layout4 .even-grid-item:nth-of-type(4n+3) .rt-holder [class*='rt-col']:first-child {
1335
+ order: 2;
1336
+ }
1337
+ }
1338
+
1339
+ @media (max-width: 767px) {
1340
+ .tpg-even.layout4 .even-grid-item .rt-holder .layoutInner-img {
1341
+ order: -1 !important;
1342
+ }
1343
+ }
1344
+
1345
+ .tpg-shortcode-main-wrapper .rt-holder .overlay,
1346
+ .tpg-shortcode-main-wrapper .rt-holder .overlay > a[data-id],
1347
+ .tpg-shortcode-main-wrapper .rt-holder > a[data-id] {
1348
+ width: 100%;
1349
+ }
1350
+
1351
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay,
1352
+ .tpg-shortcode-main-wrapper .carousel12 .rt-holder .post-info,
1353
+ .tpg-shortcode-main-wrapper .carousel11 .rt-holder .post-info,
1354
+ .tpg-shortcode-main-wrapper .carousel7 .rt-holder .overlay .post-info,
1355
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder .overlay,
1356
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay,
1357
+ .tpg-shortcode-main-wrapper .isotope12 .rt-holder .post-info,
1358
+ .tpg-shortcode-main-wrapper .isotope9 .rt-holder .overlay .post-info,
1359
+ .tpg-shortcode-main-wrapper .isotope7 .rt-holder .post-info,
1360
+ .tpg-shortcode-main-wrapper .isotope5 .rt-holder .overlay,
1361
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder:hover .overlay,
1362
+ .tpg-shortcode-main-wrapper .layout16 .rt-holder .overlay .post-info,
1363
+ .tpg-shortcode-main-wrapper .layout15 .rt-holder .overlay .post-info,
1364
+ .tpg-shortcode-main-wrapper .isotope11 .rt-holder .overlay .post-info,
1365
+ .tpg-shortcode-main-wrapper .carousel11 .rt-holder .overlay .post-info
1366
+ .tpg-shortcode-main-wrapper .layout13 .rt-holder .overlay .post-info,
1367
+ .tpg-shortcode-main-wrapper .layout10 .rt-holder .overlay .post-info,
1368
+ .tpg-shortcode-main-wrapper .layout8 .rt-holder .overlay {
1369
+ display: flex;
1370
+ flex-direction: column;
1371
+ justify-content: center;
1372
+ }
1373
+
1374
+ .tpg-shortcode-main-wrapper .carousel9 .rt-holder .overlay .post-info .read-more a,
1375
+ .tpg-shortcode-main-wrapper .isotope5 .rt-holder .overlay .post-meta .read-more a,
1376
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .post-meta .read-more a,
1377
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .post-meta .read-more a,
1378
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .read-more a,
1379
+ .tpg-shortcode-main-wrapper .carousel12 .rt-holder .post-info .read-more a,
1380
+ .tpg-shortcode-main-wrapper .carousel11 .rt-holder .post-info .read-more a,
1381
+ .tpg-shortcode-main-wrapper .carousel7 .rt-holder .overlay .post-info .read-more a,
1382
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder .overlay .post-info .read-more a,
1383
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .read-more a,
1384
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .read-more a,
1385
+ .tpg-shortcode-main-wrapper .isotope12 .rt-holder .post-info .read-more a,
1386
+ .tpg-shortcode-main-wrapper .isotope11 .rt-holder .overlay .post-info .read-more a,
1387
+ .tpg-shortcode-main-wrapper .isotope9 .rt-holder .overlay .post-info .read-more a,
1388
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .post-meta .read-more a,
1389
+ .tpg-shortcode-main-wrapper .layout16 .rt-holder .read-more a,
1390
+ .tpg-shortcode-main-wrapper .layout15 .rt-holder .read-more a,
1391
+ .tpg-shortcode-main-wrapper .layout13 .rt-holder .read-more a,
1392
+ .tpg-shortcode-main-wrapper .layout10 .rt-holder .read-more a,
1393
+ .tpg-shortcode-main-wrapper .layout8 .rt-holder .read-more a,
1394
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .read-more a,
1395
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .read-more a,
1396
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .read-more a,
1397
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .read-more a {
1398
+ border: 1px solid rgba(255, 255, 255, .4);
1399
+ padding: 8px 15px;
1400
+ }
1401
+
1402
+ .tpg-shortcode-main-wrapper .isotope12 .rt-holder .post-info .post-meta .rt-tpg-social-share,
1403
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta,
1404
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta,
1405
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta {
1406
+ color: #ffffff;
1407
+ text-align: center;
1408
+ overflow: hidden;
1409
+ }
assets/css/thepostgrid.css CHANGED
@@ -4,1362 +4,108 @@
4
  /************ Copyright @ 2015-2017, RadiusTheme.com ******************/
5
  /**********************************************************************/
6
 
7
- /* pagination css*/
8
- .paginationjs {
9
- line-height: 1.6;
10
- font-family: Marmelad, "Lucida Grande", Arial, "Hiragino Sans GB", Georgia, sans-serif;
11
- font-size: 14px;
12
- box-sizing: initial
13
- }
14
-
15
- .paginationjs:after {
16
- display: table;
17
- content: " ";
18
- clear: both
19
- }
20
-
21
- .paginationjs .paginationjs-pages {
22
- float: left
23
- }
24
-
25
- .paginationjs .paginationjs-pages ul {
26
- float: left;
27
- margin: 0;
28
- padding: 0
29
- }
30
-
31
- .paginationjs .paginationjs-go-button, .paginationjs .paginationjs-go-input, .paginationjs .paginationjs-nav {
32
- float: left;
33
- margin-left: 10px;
34
- font-size: 14px
35
- }
36
-
37
- .paginationjs .paginationjs-pages li {
38
- float: left;
39
- border: 1px solid #aaa;
40
- border-right: none;
41
- list-style: none
42
- }
43
-
44
- .paginationjs .paginationjs-pages li > a {
45
- min-width: 30px;
46
- height: 28px;
47
- line-height: 28px;
48
- display: block;
49
- background: #fff;
50
- font-size: 14px;
51
- color: #333;
52
- text-decoration: none;
53
- text-align: center
54
- }
55
-
56
- .paginationjs .paginationjs-pages li > a:hover {
57
- background: #eee
58
- }
59
-
60
- .paginationjs .paginationjs-pages li.active {
61
- border: none
62
- }
63
-
64
- .paginationjs .paginationjs-pages li.active > a {
65
- height: 30px;
66
- line-height: 30px;
67
- background: #aaa;
68
- color: #fff
69
- }
70
-
71
- .paginationjs .paginationjs-pages li.disabled > a {
72
- opacity: .3
73
- }
74
-
75
- .paginationjs .paginationjs-pages li.disabled > a:hover {
76
- background: 0 0
77
- }
78
-
79
- .paginationjs .paginationjs-pages li:first-child, .paginationjs .paginationjs-pages li:first-child > a {
80
- border-radius: 3px 0 0 3px
81
- }
82
-
83
- .paginationjs .paginationjs-pages li:last-child {
84
- border-right: 1px solid #aaa;
85
- border-radius: 0 3px 3px 0
86
- }
87
-
88
- .paginationjs .paginationjs-pages li:last-child > a {
89
- border-radius: 0 3px 3px 0
90
- }
91
-
92
- .paginationjs .paginationjs-go-input > input[type=text] {
93
- width: 30px;
94
- height: 28px;
95
- background: #fff;
96
- border-radius: 3px;
97
- border: 1px solid #aaa;
98
- padding: 0;
99
- font-size: 14px;
100
- text-align: center;
101
- vertical-align: baseline;
102
- outline: 0;
103
- box-shadow: none;
104
- box-sizing: initial
105
- }
106
-
107
- .paginationjs .paginationjs-go-button > input[type=button] {
108
- min-width: 40px;
109
- height: 30px;
110
- line-height: 28px;
111
- background: #fff;
112
- border-radius: 3px;
113
- border: 1px solid #aaa;
114
- text-align: center;
115
- padding: 0 8px;
116
- font-size: 14px;
117
- vertical-align: baseline;
118
- outline: 0;
119
- box-shadow: none;
120
- color: #333;
121
- cursor: pointer;
122
- vertical-align: middle \9
123
- }
124
-
125
- .paginationjs.paginationjs-theme-blue .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-blue .paginationjs-pages li {
126
- border-color: #289de9
127
- }
128
-
129
- .paginationjs .paginationjs-go-button > input[type=button]:hover {
130
- background-color: #f8f8f8
131
- }
132
-
133
- .paginationjs .paginationjs-nav {
134
- height: 30px;
135
- line-height: 30px
136
- }
137
-
138
- .paginationjs .paginationjs-go-button, .paginationjs .paginationjs-go-input {
139
- margin-left: 5px \9
140
- }
141
-
142
- .paginationjs.paginationjs-small {
143
- font-size: 12px
144
- }
145
-
146
- .paginationjs.paginationjs-small .paginationjs-pages li > a {
147
- min-width: 26px;
148
- height: 24px;
149
- line-height: 24px;
150
- font-size: 12px
151
- }
152
-
153
- .paginationjs.paginationjs-small .paginationjs-pages li.active > a {
154
- height: 26px;
155
- line-height: 26px
156
- }
157
-
158
- .paginationjs.paginationjs-small .paginationjs-go-input {
159
- font-size: 12px
160
- }
161
-
162
- .paginationjs.paginationjs-small .paginationjs-go-input > input[type=text] {
163
- width: 26px;
164
- height: 24px;
165
- font-size: 12px
166
- }
167
-
168
- .paginationjs.paginationjs-small .paginationjs-go-button {
169
- font-size: 12px
170
- }
171
-
172
- .paginationjs.paginationjs-small .paginationjs-go-button > input[type=button] {
173
- min-width: 30px;
174
- height: 26px;
175
- line-height: 24px;
176
- padding: 0 6px;
177
- font-size: 12px
178
- }
179
-
180
- .paginationjs.paginationjs-small .paginationjs-nav {
181
- height: 26px;
182
- line-height: 26px;
183
- font-size: 12px
184
- }
185
-
186
- .paginationjs.paginationjs-big {
187
- font-size: 16px
188
- }
189
-
190
- .paginationjs.paginationjs-big .paginationjs-pages li > a {
191
- min-width: 36px;
192
- height: 34px;
193
- line-height: 34px;
194
- font-size: 16px
195
- }
196
-
197
- .paginationjs.paginationjs-big .paginationjs-pages li.active > a {
198
- height: 36px;
199
- line-height: 36px
200
- }
201
-
202
- .paginationjs.paginationjs-big .paginationjs-go-input {
203
- font-size: 16px
204
- }
205
-
206
- .paginationjs.paginationjs-big .paginationjs-go-input > input[type=text] {
207
- width: 36px;
208
- height: 34px;
209
- font-size: 16px
210
- }
211
-
212
- .paginationjs.paginationjs-big .paginationjs-go-button {
213
- font-size: 16px
214
- }
215
-
216
- .paginationjs.paginationjs-big .paginationjs-go-button > input[type=button] {
217
- min-width: 50px;
218
- height: 36px;
219
- line-height: 34px;
220
- padding: 0 12px;
221
- font-size: 16px
222
- }
223
-
224
- .paginationjs.paginationjs-big .paginationjs-nav {
225
- height: 36px;
226
- line-height: 36px;
227
- font-size: 16px
228
- }
229
-
230
- .paginationjs.paginationjs-theme-blue .paginationjs-pages li > a {
231
- color: #289de9
232
- }
233
-
234
- .paginationjs.paginationjs-theme-blue .paginationjs-pages li > a:hover {
235
- background: #e9f4fc
236
- }
237
-
238
- .paginationjs.paginationjs-theme-blue .paginationjs-pages li.active > a {
239
- background: #289de9;
240
- color: #fff
241
- }
242
-
243
- .paginationjs.paginationjs-theme-blue .paginationjs-pages li.disabled > a:hover {
244
- background: 0 0
245
- }
246
-
247
- .paginationjs.paginationjs-theme-blue .paginationjs-go-button > input[type=button] {
248
- background: #289de9;
249
- border-color: #289de9;
250
- color: #fff
251
- }
252
-
253
- .paginationjs.paginationjs-theme-green .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-green .paginationjs-pages li {
254
- border-color: #449d44
255
- }
256
-
257
- .paginationjs.paginationjs-theme-blue .paginationjs-go-button > input[type=button]:hover {
258
- background-color: #3ca5ea
259
- }
260
-
261
- .paginationjs.paginationjs-theme-green .paginationjs-pages li > a {
262
- color: #449d44
263
- }
264
-
265
- .paginationjs.paginationjs-theme-green .paginationjs-pages li > a:hover {
266
- background: #ebf4eb
267
- }
268
-
269
- .paginationjs.paginationjs-theme-green .paginationjs-pages li.active > a {
270
- background: #449d44;
271
- color: #fff
272
- }
273
-
274
- .paginationjs.paginationjs-theme-green .paginationjs-pages li.disabled > a:hover {
275
- background: 0 0
276
- }
277
-
278
- .paginationjs.paginationjs-theme-green .paginationjs-go-button > input[type=button] {
279
- background: #449d44;
280
- border-color: #449d44;
281
- color: #fff
282
- }
283
-
284
- .paginationjs.paginationjs-theme-yellow .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-yellow .paginationjs-pages li {
285
- border-color: #ec971f
286
- }
287
-
288
- .paginationjs.paginationjs-theme-green .paginationjs-go-button > input[type=button]:hover {
289
- background-color: #55a555
290
- }
291
-
292
- .paginationjs.paginationjs-theme-yellow .paginationjs-pages li > a {
293
- color: #ec971f
294
- }
295
-
296
- .paginationjs.paginationjs-theme-yellow .paginationjs-pages li > a:hover {
297
- background: #fdf5e9
298
- }
299
-
300
- .paginationjs.paginationjs-theme-yellow .paginationjs-pages li.active > a {
301
- background: #ec971f;
302
- color: #fff
303
- }
304
-
305
- .paginationjs.paginationjs-theme-yellow .paginationjs-pages li.disabled > a:hover {
306
- background: 0 0
307
- }
308
-
309
- .paginationjs.paginationjs-theme-yellow .paginationjs-go-button > input[type=button] {
310
- background: #ec971f;
311
- border-color: #ec971f;
312
- color: #fff
313
- }
314
-
315
- .paginationjs.paginationjs-theme-red .paginationjs-go-input > input[type=text], .paginationjs.paginationjs-theme-red .paginationjs-pages li {
316
- border-color: #c9302c
317
- }
318
-
319
- .paginationjs.paginationjs-theme-yellow .paginationjs-go-button > input[type=button]:hover {
320
- background-color: #eea135
321
- }
322
-
323
- .paginationjs.paginationjs-theme-red .paginationjs-pages li > a {
324
- color: #c9302c
325
- }
326
-
327
- .paginationjs.paginationjs-theme-red .paginationjs-pages li > a:hover {
328
- background: #faeaea
329
- }
330
-
331
- .paginationjs.paginationjs-theme-red .paginationjs-pages li.active > a {
332
- background: #c9302c;
333
- color: #fff
334
- }
335
-
336
- .paginationjs.paginationjs-theme-red .paginationjs-pages li.disabled > a:hover {
337
- background: 0 0
338
- }
339
-
340
- .paginationjs.paginationjs-theme-red .paginationjs-go-button > input[type=button] {
341
- background: #c9302c;
342
- border-color: #c9302c;
343
- color: #fff
344
- }
345
-
346
- .paginationjs.paginationjs-theme-red .paginationjs-go-button > input[type=button]:hover {
347
- background-color: #ce4541
348
- }
349
-
350
- .paginationjs .paginationjs-pages li.paginationjs-next {
351
- border-right: 1px solid #aaa \9
352
- }
353
-
354
- .paginationjs .paginationjs-go-input > input[type=text] {
355
- line-height: 28px \9;
356
- vertical-align: middle \9
357
- }
358
-
359
- .paginationjs.paginationjs-big .paginationjs-pages li > a {
360
- line-height: 36px \9
361
- }
362
-
363
- .paginationjs.paginationjs-big .paginationjs-go-input > input[type=text] {
364
- height: 36px \9;
365
- line-height: 36px \9
366
- }
367
-
368
- /***************************** Grid ******************************/
369
- .rt-tpg-container a {
370
- text-decoration: none;
371
- }
372
-
373
- html.rt-model-open,
374
- body.rt-model-open,
375
- .rt-model-open {
376
- overflow: hidden;
377
- }
378
-
379
- .rt-tpg-container * {
380
- -webkit-box-sizing: border-box;
381
- -moz-box-sizing: border-box;
382
- box-sizing: border-box;
383
- }
384
-
385
- .rt-tpg-container *:before,
386
- .rt-tpg-container *:after {
387
- -webkit-box-sizing: border-box;
388
- -moz-box-sizing: border-box;
389
- box-sizing: border-box;
390
- }
391
-
392
- .rt-container {
393
- margin-right: auto;
394
- margin-left: auto;
395
- padding-left: 15px;
396
- padding-right: 15px;
397
- }
398
-
399
- .rt-container-fluid {
400
- margin-right: auto;
401
- margin-left: auto;
402
- padding-left: 15px;
403
- padding-right: 15px;
404
- }
405
-
406
- .rt-tpg-container ul {
407
- margin: 0;
408
- }
409
-
410
- .rt-tpg-container i {
411
- margin-right: 5px;
412
- }
413
-
414
- .clearfix:before, .clearfix:after, .rt-container-fluid:before, .rt-container-fluid:after, .rt-row:before, .rt-row:after {
415
- content: " ";
416
- display: table;
417
- }
418
-
419
- .clearfix:after,
420
- .rt-container:after,
421
- .rt-container-fluid:after,
422
- .rt-row:after {
423
- clear: both;
424
- }
425
-
426
- .rt-row {
427
- margin-left: -15px;
428
- margin-right: -15px;
429
- }
430
-
431
- .rt-row > .rt-row {
432
- padding-left: 15px;
433
- padding-right: 15px;
434
- }
435
-
436
- .grid_hover6.rt-row {
437
- margin-left: -2px;
438
- margin-right: -2px;
439
- }
440
-
441
- .rt-tpg-container .grid_hover6 .rt-grid-item {
442
- padding: 0 2px;
443
- margin-bottom: 4px;
444
- }
445
-
446
- .rt-tpg-container .grid_hover7 .rt-grid-item .post-img img,
447
- .rt-tpg-container .grid_hover6 .rt-grid-item .post-img img {
448
- min-height: 350px;
449
- object-fit: cover;
450
- }
451
-
452
- .grid_hover4 .rt-grid-item {
453
- padding: 0;
454
- }
455
-
456
- .rt-col-xs-1, .rt-col-sm-1, .rt-col-md-1, .rt-col-lg-1, .rt-col-xs-2, .rt-col-sm-2, .rt-col-md-2, .rt-col-lg-2, .rt-col-xs-3, .rt-col-sm-3, .rt-col-md-3, .rt-col-lg-3, .rt-col-xs-4, .rt-col-sm-4, .rt-col-md-4, .rt-col-lg-4, .rt-col-xs-5, .rt-col-sm-5, .rt-col-md-5, .rt-col-lg-5, .rt-col-xs-6, .rt-col-sm-6, .rt-col-md-6, .rt-col-lg-6, .rt-col-xs-7, .rt-col-sm-7, .rt-col-md-7, .rt-col-lg-7, .rt-col-xs-8, .rt-col-sm-8, .rt-col-md-8, .rt-col-lg-8, .rt-col-xs-9, .rt-col-sm-9, .rt-col-md-9, .rt-col-lg-9, .rt-col-xs-10, .rt-col-sm-10, .rt-col-md-10, .rt-col-lg-10, .rt-col-xs-11, .rt-col-sm-11, .rt-col-md-11, .rt-col-lg-11, .rt-col-xs-12, .rt-col-sm-12, .rt-col-md-12, .rt-col-lg-12, .rt-col-xs-24, .rt-col-sm-24, .rt-col-md-24, .rt-col-lg-24 {
457
- position: relative;
458
- min-height: 1px;
459
- padding-left: 15px;
460
- padding-right: 15px;
461
- }
462
-
463
- .rt-col-xs-1, .rt-col-xs-2, .rt-col-xs-3, .rt-col-xs-4, .rt-col-xs-5, .rt-col-xs-6, .rt-col-xs-7, .rt-col-xs-8, .rt-col-xs-9, .rt-col-xs-10, .rt-col-xs-11, .rt-col-xs-12, .rt-col-xs-24 {
464
- float: left;
465
- }
466
-
467
- .rt-col-xs-24 {
468
- width: 20%;
469
- }
470
-
471
- .rt-col-xs-12 {
472
- width: 100%;
473
- }
474
-
475
- .rt-col-xs-11 {
476
- width: 91.66666667%;
477
- }
478
-
479
- .rt-col-xs-10 {
480
- width: 83.33333333%;
481
- }
482
-
483
- .rt-col-xs-9 {
484
- width: 75%;
485
- }
486
-
487
- .rt-col-xs-8 {
488
- width: 66.66666667%;
489
- }
490
-
491
- .rt-col-xs-7 {
492
- width: 58.33333333%;
493
- }
494
-
495
- .rt-col-xs-6 {
496
- width: 50%;
497
- }
498
-
499
- .rt-col-xs-5 {
500
- width: 41.66666667%;
501
- }
502
-
503
- .rt-col-xs-4 {
504
- width: 33.33333333%;
505
- }
506
-
507
- .rt-col-xs-3 {
508
- width: 25%;
509
- }
510
-
511
- .rt-col-xs-2 {
512
- width: 16.66666667%;
513
- }
514
-
515
- .rt-col-xs-1 {
516
- width: 8.33333333%;
517
- }
518
-
519
- #rt-main {
520
- margin: 35px auto;
521
- }
522
-
523
- .rt-tpg-container h3.entry-title {
524
- line-height: 1.25;
525
- margin: 0px 0px 12px;
526
- }
527
-
528
- .rt-tpg-container .offset-small-wrap .rt-holder .overlay {
529
- min-height: 60px !important;
530
- }
531
-
532
- .rt-tpg-container .offset-small-wrap .rt-holder .rt-img-responsive {
533
- height: auto;
534
- width: 100%;
535
- object-fit: cover;
536
- }
537
-
538
- .rt-tpg-container .offset-small-wrap .rt-col-md-6 .rt-holder .rt-img-responsive {
539
- height: auto;
540
- }
541
-
542
- .rt-tpg-container .offset-small-wrap .rt-holder .overlay h3 a {
543
- overflow: hidden !important;
544
- text-overflow: ellipsis !important;
545
- display: -webkit-box !important;
546
- -webkit-line-clamp: 1 !important;
547
- -webkit-box-orient: vertical;
548
- }
549
-
550
- @media (max-width: 991px) {
551
- .rt-post-overlay .post-img + .post-content .post-title a {
552
- overflow: hidden !important;
553
- text-overflow: ellipsis !important;
554
- display: -webkit-box !important;
555
- -webkit-line-clamp: 2 !important;
556
- -webkit-box-orient: vertical;
557
- }
558
- }
559
-
560
- .rt-tpg-container .offset-big .post-meta-user.above_title {
561
- margin-top: 15px;
562
- }
563
-
564
- .rt-tpg-container .offset-big .post-meta-user.above_title + h3.entry-title {
565
- margin-top: 0;
566
- }
567
-
568
- .rt-tpg-container .offset-big h3.entry-title {
569
- margin: 20px 0px 15px;
570
- }
571
-
572
- .rt-tpg-container .offset-big .cat-above-title {
573
- margin-bottom: -15px;
574
- padding-top: 10px;
575
- }
576
-
577
- .rt-tpg-container .owl-controls .owl-dots {
578
- margin-top: 15px;
579
- }
580
-
581
- /**********************************************************************/
582
- /********************************* End Grid *************************/
583
- /**********************************************************************/
584
-
585
- /************************ Common ***************************/
586
-
587
- .rt-tpg-container .masonry-grid-item,
588
- .rt-tpg-container .even-grid-item {
589
- margin-bottom: 30px;
590
- }
591
-
592
- .rt-tpg-container .list_layout1 .masonry-grid-item,
593
- .rt-tpg-container .list_layout1 .even-grid-item,
594
- .rt-tpg-container .grid_hover5 .masonry-grid-item,
595
- .rt-tpg-container .grid_hover5 .even-grid-item,
596
- .rt-tpg-container .grid_hover4 .masonry-grid-item,
597
- .rt-tpg-container .grid_hover4 .even-grid-item,
598
- .rt-tpg-container .grid_hover3 .masonry-grid-item,
599
- .rt-tpg-container .grid_hover3 .even-grid-item,
600
- .rt-tpg-container .grid_hover2 .masonry-grid-item,
601
- .rt-tpg-container .grid_hover2 .even-grid-item,
602
- .rt-tpg-container .grid_hover1 .masonry-grid-item,
603
- .rt-tpg-container .grid_hover1 .even-grid-item {
604
- margin-bottom: initial;
605
- }
606
-
607
- .rt-tpg-container button {
608
- border: none;
609
- padding: 10px 15px;
610
- }
611
-
612
- .rt-tpg-container .rt-tgp-load-more button {
613
- background: #8e8e8e;
614
- border-radius: 4px;
615
- }
616
-
617
- .rt-tpg-container .tpg-wc-product-filter {
618
- margin-bottom: 15px;
619
- text-align: right;
620
- padding-right: 15px;
621
- }
622
-
623
- .rt-img-holder > a {
624
- text-align: center;
625
- display: block;
626
- }
627
-
628
- .rt-img-responsive {
629
- max-width: 100%;
630
- display: block;
631
- height: auto;
632
- }
633
-
634
- .layout3 .rt-img-responsive {
635
- display: inline-block;
636
- }
637
-
638
- @media (max-width: 991px) {
639
- .rt-img-holder > a,
640
- .rt-img-responsive {
641
- width: 100%;
642
- }
643
- }
644
-
645
- .rt-tpg-container .no-margin {
646
- margin: 0px !important;
647
- padding: 0px !important;
648
- }
649
-
650
- span.more-loading {
651
- background: url("../images/loading.gif") center right no-repeat;
652
- padding-right: 20px;
653
- display: inline-block;
654
- }
655
-
656
- .rt-tgp-scroll-load-more, .rt-tgp-load-more {
657
- text-align: center;
658
- display: block;
659
- margin: 30px 0 20px;
660
- }
661
-
662
- .post-meta-user,
663
- .post-meta-tags {
664
- padding: 0px;
665
- margin-bottom: 10px;
666
- line-height: 1.5;
667
- font-size: 95%;
668
- }
669
-
670
- .list_layout2 .post-meta-user,
671
- .list_layout2 .post-meta-tags {
672
- font-size: 14px;
673
- color: #A5A6AA;
674
- }
675
-
676
- .rt-content-loader.layout14 .post-meta-user,
677
- .rt-content-loader.layout14 .post-meta-tags {
678
- margin-bottom: 0;
679
- }
680
-
681
- .post-meta-user span, .post-meta-tags span {
682
- display: inline-block;
683
- padding-right: 8px;
684
- }
685
-
686
- .offset06 .post-meta-user span,
687
- .offset06 .post-meta-tags span {
688
- font-weight: 500;
689
- padding-right: 15px;
690
- font-size: 14px;
691
- color: #A5A6AA;
692
- }
693
-
694
- .offset06 .post-meta-user span a,
695
- .offset06 .post-meta-tags span a {
696
- color: #444444;
697
- }
698
-
699
- .offset06 .post-meta-user span a:hover,
700
- .offset06 .post-meta-tags span a:hover {
701
- color: #2962ff;
702
- }
703
-
704
- .post-meta-user span.rt-separator, .post-meta-tags span.rt-separator {
705
- display: inline-block;
706
- padding-right: 5px;
707
- }
708
-
709
- .post-meta-user span.comment-link {
710
- text-align: right;
711
- float: right;
712
- padding-right: 0px;
713
- }
714
-
715
- .rt-holder .entry-title a {
716
- color: #000000;
717
- }
718
-
719
- .rt-tpg-container .rt-holder .post-meta.center .read-more {
720
- float: none;
721
- }
722
-
723
- .rt-tpg-container .rt-holder .post-meta .rt-tpg-social-share {
724
- float: none;
725
- text-align: left;
726
- display: block;
727
- margin-bottom: 15px;
728
- width: 100%;
729
- }
730
-
731
- .rt-tpg-container .rt-holder .post-meta.center .rt-tpg-social-share {
732
- text-align: left;
733
- }
734
-
735
- .rt-tpg-container .rt-holder .post-meta.right .rt-tpg-social-share {
736
- text-align: left;
737
- }
738
-
739
- .rt-tpg-container .rt-holder .read-more a {
740
- /*padding: 8px 15px;*/
741
- font-size: 15px;
742
- display: inline-block;
743
- line-height: 1.5;
744
- }
745
-
746
- .rt-tpg-container .rt-holder .tpg-excerpt {
747
- margin-bottom: 10px;
748
- }
749
-
750
- @media (max-width: 991px) {
751
- .rt-tpg-container .rt-post-overlay .post-img + .post-content .tpg-excerpt {
752
- overflow: hidden !important;
753
- text-overflow: ellipsis !important;
754
- display: -webkit-box !important;
755
- -webkit-line-clamp: 3 !important;
756
- -webkit-box-orient: vertical;
757
- }
758
- }
759
-
760
- /* isotope Buttons */
761
-
762
- .rt-tpg-container .tpg-iso-filter {
763
- text-align: center;
764
- margin: 15px 0 45px;
765
- }
766
-
767
- .rt-tpg-container .tpg-iso-filter input[type="text"] {
768
- display: inline-block;
769
- padding: 12px 10px;
770
- border-radius: 3px;
771
- margin-left: 4px;
772
- }
773
-
774
- .rt-tpg-container .tpg-iso-filter > div {
775
- display: inline-block;
776
- }
777
-
778
- .rt-tpg-container .rt-tpg-isotope-buttons .selected {
779
- background: #1e73be;
780
- }
781
-
782
- .rt-tpg-container .rt-tpg-isotope-buttons button {
783
- border: none;
784
- margin: 4px;
785
- padding: 8px 20px;
786
- outline: 0;
787
- text-transform: none;
788
- font-weight: 400;
789
- font-size: 15px;
790
- line-height: 1.8;
791
- background: #8e8e8e;
792
- color: #fff;
793
- border-radius: 3px;
794
- box-shadow: none !important;
795
- text-shadow: none !important;
796
- }
797
-
798
- .rt-tpg-container .rt-tpg-isotope-buttons button {
799
- box-shadow: none !important;
800
- text-shadow: none !important;
801
- }
802
-
803
- /* --------------------------
804
- Social share List View
805
- -----------------*/
806
- .rt-tpg-social-share {
807
- display: inline-block;
808
- margin: 0px 0;
809
- float: left;
810
- font-weight: bold;
811
- }
812
-
813
- .rt-tpg-social-share:after {
814
- display: block;
815
- clear: both;
816
- content: '';
817
- }
818
-
819
- .rt-tpg-social-share a {
820
- display: inline-block;
821
- padding: 3px 6px;
822
- margin-right: 0px;
823
- outline: none;
824
- }
825
-
826
- .rt-tpg-social-share a:first-child {
827
- padding-left: 0;
828
- }
829
-
830
- .rt-tpg-social-share a:first-child {
831
- padding-right: 0;
832
- }
833
-
834
- .rt-tpg-social-share a i {
835
- font-size: 16px;
836
- outline: none;
837
- }
838
-
839
- .rt-tpg-container .rt-tpg-social-share a.facebook i {
840
- color: #3b5998;
841
- }
842
-
843
- .rt-tpg-container .rt-tpg-social-share a.facebook:hover i {
844
- color: #456dc2;
845
- }
846
-
847
- .rt-tpg-container .rt-tpg-social-share a.twitter i {
848
- color: #00aced;
849
- }
850
-
851
- .rt-tpg-container .rt-tpg-social-share a.twitter:hover i {
852
- color: #1ab8f5;
853
- }
854
-
855
- .rt-tpg-container .rt-tpg-social-share a.linkedin i {
856
- color: #007bb6;
857
- }
858
-
859
- .rt-tpg-container .layout16 .rt-tpg-social-share a.linkedin i {
860
- color: #289bd3;
861
- }
862
-
863
- .rt-tpg-container .rt-tpg-social-share a.linkedin:hover i {
864
- color: #289bd3;
865
- }
866
-
867
- .rt-tpg-container .rt-tpg-social-share a.pinterest i {
868
- color: #cb2027;
869
- }
870
-
871
- .rt-tpg-container .rt-tpg-social-share a.reddit i {
872
- color: rgb(255, 69, 0);
873
- }
874
-
875
- .rt-tpg-container .rt-tpg-social-share a.email i {
876
- color: #0489c9;
877
- }
878
-
879
- /* loader */
880
-
881
- .rt-tpg-container .tpg-pre-loader {
882
- position: relative;
883
- overflow: hidden;
884
- }
885
-
886
- .rt-tpg-container .rt-loading-overlay {
887
- opacity: 0;
888
- visibility: hidden;
889
- position: absolute;
890
- top: 0;
891
- left: 0;
892
- width: 100%;
893
- height: 100%;
894
- z-index: 1;
895
- background-color: #fff;
896
- }
897
-
898
- .rt-tpg-container .rt-loading {
899
- color: #fb4c35;
900
- position: absolute;
901
- top: 60px;
902
- left: 50%;
903
- margin-left: -16px;
904
- z-index: 2;
905
- opacity: 0;
906
- visibility: hidden;
907
- }
908
-
909
- .rt-tpg-container .tpg-pre-loader .rt-loading-overlay {
910
- opacity: 0.8;
911
- visibility: visible;
912
- }
913
-
914
- .rt-tpg-container .tpg-pre-loader .rt-loading {
915
- opacity: 1;
916
- visibility: visible;
917
- }
918
-
919
- .rt-ball-clip-rotate {
920
- width: 32px;
921
- height: 32px;
922
- }
923
-
924
- .rt-ball-clip-rotate {
925
- display: block;
926
- font-size: 0;
927
- color: #fff;
928
- }
929
-
930
- .rt-ball-clip-rotate, .rt-ball-clip-rotate > div {
931
- position: relative;
932
- -webkit-box-sizing: border-box;
933
- -moz-box-sizing: border-box;
934
- box-sizing: border-box;
935
- }
936
-
937
- .rt-ball-clip-rotate > div {
938
- display: inline-block;
939
- float: none;
940
- background-color: currentColor;
941
- border: 0 solid currentColor;
942
- }
943
-
944
- .rt-ball-clip-rotate > div {
945
- width: 32px;
946
- height: 32px;
947
- background: transparent;
948
- border-width: 2px;
949
- border-bottom-color: transparent;
950
- border-radius: 100%;
951
- -webkit-animation: ball-clip-rotate 0.75s linear infinite;
952
- -moz-animation: ball-clip-rotate 0.75s linear infinite;
953
- -o-animation: ball-clip-rotate 0.75s linear infinite;
954
- animation: ball-clip-rotate 0.75s linear infinite;
955
- }
956
-
957
- /* filter */
958
- .rt-layout-filter-container.rt-clear:after {
959
- clear: both;
960
- display: block;
961
- content: "";
962
- }
963
-
964
- .rt-clear:after,
965
- .rt-clear::-ms-ticks-after {
966
- clear: both;
967
- display: block;
968
- content: "";
969
- }
970
-
971
- .rt-layout-filter-container {
972
- font-size: 0;
973
- line-height: 0;
974
- padding: 0;
975
- margin: -5px -5px 30px;
976
- }
977
-
978
- .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item {
979
- padding: 8px 10px;
980
- border: 1px solid;
981
- margin: 4px;
982
- display: inline-block;
983
- }
984
-
985
- .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item.selected,
986
- .rt-filter-item-wrap.rt-filter-button-wrap span.rt-filter-button-item:hover {
987
- background: #222222;
988
- color: #b4b4b4;
989
- }
990
- .rt-filter-wrap {
991
- display: flex;
992
- flex-wrap: wrap;
993
- }
994
- /*.rt-filter-item-wrap.rt-order-by-action, .rt-filter-item-wrap.rt-sort-order-action {
995
- float: right;
996
- }*/
997
-
998
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap {
999
- line-height: 1.55;
1000
- display: inline-block;
1001
- vertical-align: top;
1002
- font-size: 13px;
1003
- letter-spacing: 0.1em;
1004
- text-transform: uppercase;
1005
- margin: 4px;
1006
- padding: 8px 10px;
1007
- cursor: pointer;
1008
- position: relative;
1009
- border: 1px solid transparent;
1010
- user-select: none;
1011
- -webkit-user-select: none;
1012
- -moz-user-select: none;
1013
- transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1014
- -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1015
- -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
1016
- color: #666;
1017
- }
1018
-
1019
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-button-wrap {
1020
- padding: 0;
1021
- margin-top: 0;
1022
- margin-left: 0;
1023
- }
1024
-
1025
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-button-item .rt-filter-sub-tax {
1026
- display: none;
1027
- }
1028
-
1029
- .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group {
1030
- margin: 0 4px;
1031
- }
1032
-
1033
- .rt-layout-filter-container .rt-filter-sub-tax.sub-button-group .rt-filter-button-item {
1034
- cursor: pointer;
1035
- }
1036
-
1037
- .rt-layout-filter-container > .rt-filter-sub-tax.sub-button-group > span {
1038
- padding: 8px 10px;
1039
- border: 1px solid;
1040
- margin: 4px;
1041
- display: inline-block;
1042
- line-height: 1.55;
1043
- vertical-align: top;
1044
- font-size: 13px;
1045
- letter-spacing: 0.1em;
1046
- text-transform: uppercase;
1047
- }
1048
-
1049
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap {
1050
- border: 1px solid #666;
1051
- color: #666;
1052
- position: relative;
1053
- }
1054
-
1055
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap:hover {
1056
- border-color: #222;
1057
- color: #222;
1058
- }
1059
 
1060
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action:hover {
1061
- border-color: #222;
1062
- }
1063
-
1064
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap > .rt-filter-dropdown-default {
1065
- min-width: 135px;
1066
- max-width: 135px;
1067
- overflow: hidden;
1068
- text-overflow: ellipsis;
1069
- text-align: center;
1070
- display: block;
1071
- white-space: nowrap;
1072
- }
1073
-
1074
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown {
1075
- display: block;
1076
- position: absolute;
1077
- top: 100%;
1078
- left: -1px;
1079
- right: -1px;
1080
- background-color: #222;
1081
- z-index: 2;
1082
- margin-top: 1px;
1083
- border: none;
1084
- opacity: 0;
1085
- visibility: hidden;
1086
- transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1087
- -webkit-transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1088
- -ms-transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
1089
- }
1090
-
1091
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap.active-dropdown .rt-filter-dropdown {
1092
- opacity: 1;
1093
- visibility: visible;
1094
- }
1095
-
1096
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap.active-dropdown .rt-arrow-angle {
1097
- transform: rotate(180deg);
1098
- -webkit-transform: rotate(180deg);
1099
- -ms-transform: rotate(180deg);
1100
- }
1101
-
1102
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-filter-dropdown .rt-filter-dropdown-item {
1103
- display: block;
1104
- padding: 10px 15px 9px 15px;
1105
- border-bottom: 1px solid #323232;
1106
- color: #b4b4b4;
1107
- text-align: center;
1108
- }
1109
-
1110
- .rt-filter-dropdown-item .sub-dropdown-wrap,
1111
- .rt-filter-dropdown-default .sub-dropdown-wrap {
1112
- display: none !important;
1113
- }
1114
-
1115
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap .rt-arrow-angle {
1116
- letter-spacing: 0;
1117
- transition: transform 0.2s ease-in-out;
1118
- -webkit-transition: transform 0.2s ease-in-out;
1119
- -ms-transition: transform 0.2s ease-in-out;
1120
- backface-visibility: hidden;
1121
- -webkit-backface-visibility: hidden;
1122
- }
1123
-
1124
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-sort-order-action {
1125
- border: 1px solid #666;
1126
- color: #666;
1127
- position: relative;
1128
- min-width: 38px;
1129
- }
1130
-
1131
- .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow {
1132
- position: static;
1133
- }
1134
-
1135
- .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span {
1136
- display: block;
1137
- position: absolute;
1138
- width: 14px;
1139
- height: 8px;
1140
- top: 50%;
1141
- left: 50%;
1142
- margin-top: -4px;
1143
- margin-left: -7px;
1144
- backface-visibility: hidden;
1145
- -webkit-backface-visibility: hidden;
1146
- transition: transform 0.2s ease-in-out;
1147
- -webkit-transition: transform 0.2s ease-in-out;
1148
- -ms-transition: transform 0.2s ease-in-out;
1149
- }
1150
-
1151
- .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow[data-sort-order="ASC"] > span {
1152
- transform: rotate(180deg);
1153
- -webkit-transform: rotate(180deg);
1154
- -ms-transform: rotate(180deg);
1155
- }
1156
-
1157
- .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span:before {
1158
- content: '';
1159
- display: block;
1160
- width: 2px;
1161
- height: 9px;
1162
- position: absolute;
1163
- background-color: #666;
1164
- transform: rotate(-45deg);
1165
- -webkit-transform: rotate(-45deg);
1166
- -ms-transform: rotate(-45deg);
1167
- top: 0;
1168
- left: 3px;
1169
- transition: background-color 0.2s ease-in-out;
1170
- -webkit-transition: background-color 0.2s ease-in-out;
1171
- -ms-transition: background-color 0.2s ease-in-out;
1172
- }
1173
 
1174
- .rt-filter-item-wrap.rt-sort-order-action .rt-sort-order-action-arrow > span:after {
1175
- content: '';
1176
- display: block;
1177
- width: 2px;
1178
- height: 9px;
1179
- position: absolute;
1180
- background-color: #666;
1181
- transform: rotate(45deg);
1182
- -webkit-transform: rotate(45deg);
1183
- -ms-transform: rotate(45deg);
1184
- top: 0;
1185
- left: 9px;
1186
- transition: background-color 0.2s ease-in-out;
1187
- -webkit-transition: background-color 0.2s ease-in-out;
1188
- -ms-transition: background-color 0.2s ease-in-out;
1189
  }
1190
 
1191
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-search-filter-wrap {
1192
- padding: 0;
1193
- position: relative;
1194
- margin-left: auto;
1195
- /*float: right;*/
1196
  }
1197
 
1198
- .rt-filter-item-wrap.rt-search-filter-wrap input.rt-search-input {
1199
- -webkit-appearance: none;
1200
- -moz-appearance: none;
1201
- appearance: none;
1202
- padding: 10px;
1203
- background: transparent;
1204
- font-size: 12px;
1205
- font-weight: 600;
1206
- font-family: "Dosis", sans-serif;
1207
- border: 1px solid #666;
1208
- color: #666;
 
 
1209
  }
1210
 
1211
- .rt-filter-item-wrap.rt-search-filter-wrap span.rt-action {
1212
- position: absolute;
1213
- right: 5px;
1214
- top: 6px;
1215
- font-size: 15px;
1216
  display: inline-block;
1217
- cursor: pointer;
1218
- }
1219
-
1220
- .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input::-webkit-input-placeholder {
1221
- font-size: 12px;
1222
- font-weight: 600;
1223
- font-family: "Dosis", sans-serif;
1224
- }
1225
-
1226
- .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input::-moz-placeholder {
1227
- font-size: 12px;
1228
- font-weight: 600;
1229
- font-family: "Dosis", sans-serif;
1230
  }
1231
 
1232
- .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input:-ms-input-placeholder {
1233
- font-size: 12px;
1234
- font-weight: 600;
1235
- font-family: "Dosis", sans-serif;
1236
- }
1237
-
1238
- .rt-filter-item-wrap.rt-search-filter-wrap .rt-search-input:-moz-placeholder {
1239
- font-size: 12px;
1240
- font-weight: 600;
1241
- font-family: "Dosis", sans-serif;
1242
  }
1243
 
1244
- @media (max-width: 600px) {
1245
- .rt-filter-item-wrap.rt-tax-filter.rt-filter-dropdown-wrap {
1246
- display: block;
1247
- margin-bottom: 10px;
1248
- width: 100%;
1249
- }
1250
- .rt-layout-filter-container .rt-filter-wrap .rt-filter-item-wrap.rt-filter-dropdown-wrap > .rt-filter-dropdown-default {
1251
- margin: 0 auto;
1252
- }
1253
- .rt-layout-filter-container .rt-filter-wrap .rt-author-filter > .rt-filter-dropdown-default {
1254
- min-width: 120px !important;
1255
- max-width: 120px !important;
1256
- }
1257
- .rt-layout-filter-container .rt-filter-wrap .rt-order-by-action {
1258
- flex-grow: 1;
1259
- }
1260
- .rt-search-filter-wrap {
1261
- order: 5;
1262
- width: 100%;
1263
- }
1264
- .rt-search-filter-wrap input {
1265
- width: 100%;
1266
- }
1267
  }
1268
 
1269
- @media (max-width: 400px) {
1270
- .rt-layout-filter-container .rt-filter-wrap .rt-author-filter {
1271
- width: 100%;
1272
- }
 
 
1273
  }
1274
 
1275
- /*************************** Tool Tip ****************/
1276
- .rt-tpg-social-share.a {
1277
- position: relative;
1278
  }
1279
 
1280
- body > .rt-tooltip {
1281
- font-size: 100%;
1282
- position: absolute;
1283
- z-index: 9999;
1284
- -o-box-shadow: 0 0 5px #aaa;
1285
- -moz-box-shadow: 0 0 5px #aaa;
1286
- -webkit-box-shadow: 0 0 5px #aaa;
1287
- box-shadow: 0 0 5px #aaa;
1288
- color: #fff;
1289
- border-radius: 3px;
1290
- background: #666;
1291
- padding: 5px 10px;
1292
- border-width: 2px;
1293
- opacity: 0;
1294
- pointer-events: none;
1295
- -webkit-transition: opacity 1s ease-in-out;
1296
- -moz-transition: opacity 1s ease-in-out;
1297
- -ms-transition: opacity 1s ease-in-out;
1298
- -o-transition: opacity 1s ease-in-out;
1299
- transition: opacity 1s ease-in-out;
1300
  }
1301
 
1302
- body > .rt-tooltip .rt-tooltip-content {
1303
- font-size: 90%;
1304
  }
1305
 
1306
- body > .rt-tooltip,
1307
- body > .rt-tooltip .rt-tooltip-bottom:after {
1308
- background: #000;
1309
- border-radius: 2px;
1310
  }
1311
 
1312
- body > .rt-tooltip .rt-tooltip-bottom {
1313
- width: 70px;
1314
- height: 18px;
1315
  overflow: hidden;
1316
- position: absolute;
1317
- left: 50%;
1318
- margin-left: -32px;
1319
- bottom: -16px;
1320
- }
1321
-
1322
- body > .rt-tooltip .rt-tooltip-bottom:after {
1323
- content: "";
1324
- position: absolute;
1325
- left: 20px;
1326
- top: -20px;
1327
- width: 25px;
1328
- height: 25px;
1329
- -webkit-transform: rotate(45deg);
1330
- -moz-transform: rotate(45deg);
1331
- -ms-transform: rotate(45deg);
1332
- -o-transform: rotate(45deg);
1333
- tranform: rotate(45deg);
1334
  }
1335
 
1336
- .rt-tpg-container .rt-detail .entry-title a {
1337
- text-decoration: none;
 
1338
  }
1339
 
1340
- .categories-links {
1341
- display: inline-block;
1342
- line-height: 1.3;
 
1343
  }
1344
 
1345
- .rt-tpg-container .rt-holder {
1346
- overflow: hidden;
1347
  }
1348
 
1349
  /*********************************************************************
1350
  /********************************* Layout 1 *************************/
1351
  /**********************************************************************/
1352
 
1353
- .rt-tpg-container .layout1 .rt-holder .rt-img-holder,
1354
- .rt-tpg-container .isotope1 .rt-holder .rt-img-holder,
1355
- .rt-tpg-container .carousel1 .rt-holder .rt-img-holder {
1356
  position: relative;
1357
  overflow: hidden;
1358
  }
1359
 
1360
- .rt-tpg-container .layout1 .rt-holder .rt-img-holder img,
1361
- .rt-tpg-container .isotope1 .rt-holder .rt-img-holder img,
1362
- .rt-tpg-container .carousel1 .rt-holder .rt-img-holder img {
1363
  -webkit-transition: all 1.1s ease;
1364
  -moz-transition: all 1.1s ease;
1365
  -o-transition: all 1.1s ease;
@@ -1368,9 +114,9 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1368
  max-width: 100%;
1369
  }
1370
 
1371
- .rt-tpg-container .layout1 .rt-holder .rt-img-holder:hover img,
1372
- .rt-tpg-container .isotope1 .rt-holder .rt-img-holder:hover img,
1373
- .rt-tpg-container .carousel1 .rt-holder .rt-img-holder:hover img {
1374
  -webkit-transform: scale(1.1);
1375
  -moz-transform: scale(1.1);
1376
  -ms-transform: scale(1.1);
@@ -1378,7 +124,7 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1378
  transform: scale(1.1);
1379
  }
1380
 
1381
- .rt-tpg-container .layout1 .img_zoom_out .rt-holder .rt-img-holder img {
1382
  -webkit-transform: scale(1.1);
1383
  -moz-transform: scale(1.1);
1384
  -ms-transform: scale(1.1);
@@ -1386,8 +132,8 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1386
  transform: scale(1.1);
1387
  }
1388
 
1389
- .rt-tpg-container .layout1 .img_no_effect .rt-holder .rt-img-holder:hover img,
1390
- .rt-tpg-container .layout1 .img_zoom_out .rt-holder .rt-img-holder:hover img {
1391
  -webkit-transform: scale(1);
1392
  -moz-transform: scale(1);
1393
  -ms-transform: scale(1);
@@ -1395,67 +141,67 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1395
  transform: scale(1);
1396
  }
1397
 
1398
- .rt-tpg-container .layout1 .rt-holder,
1399
- .rt-tpg-container .isotope1 .rt-holder,
1400
- .rt-tpg-container .carousel1 .rt-holder {
1401
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
1402
  -webkit-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
1403
  -moz-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
1404
  }
1405
 
1406
- .rt-tpg-container .layout1 .rt-holder .rt-detail,
1407
- .rt-tpg-container .isotope1 .rt-holder .rt-detail,
1408
- .rt-tpg-container .carousel1 .rt-holder .rt-detail {
1409
  background: #fff;
1410
  padding: 15px;
1411
  }
1412
 
1413
- .rt-tpg-container .layout1 .rt-holder .rt-detail h2,
1414
- .rt-tpg-container .layout1 .rt-holder .rt-detail h3,
1415
- .rt-tpg-container .layout1 .rt-holder .rt-detail h4,
1416
- .rt-tpg-container .isotope1 .rt-holder .rt-detail h2,
1417
- .rt-tpg-container .isotope1 .rt-holder .rt-detail h3,
1418
- .rt-tpg-container .isotope1 .rt-holder .rt-detail h4,
1419
- .rt-tpg-container .carousel1 .rt-holder .rt-detail h2,
1420
- .rt-tpg-container .carousel1 .rt-holder .rt-detail h3,
1421
- .rt-tpg-container .carousel1 .rt-holder .rt-detail h4 {
1422
  font-size: 26px;
1423
  line-height: 1.25;
1424
  margin: 0 0 18px;
1425
  font-weight: 400;
1426
  }
1427
 
1428
- .rt-tpg-container .layout1 .rt-holder .rt-detail.rt-with-title h2,
1429
- .rt-tpg-container .layout1 .rt-holder .rt-detail.rt-with-title h3,
1430
- .rt-tpg-container .layout1 .rt-holder .rt-detail.rt-with-title h4,
1431
- .rt-tpg-container .isotope1 .rt-holder .rt-detail.rt-with-title h2,
1432
- .rt-tpg-container .isotope1 .rt-holder .rt-detail.rt-with-title h3,
1433
- .rt-tpg-container .isotope1 .rt-holder .rt-detail.rt-with-title h4,
1434
- .rt-tpg-container .carousel1 .rt-holder .rt-detail.rt-with-title h2,
1435
- .rt-tpg-container .carousel1 .rt-holder .rt-detail.rt-with-title h3,
1436
- .rt-tpg-container .carousel1 .rt-holder .rt-detail.rt-with-title h4 {
1437
  margin-bottom: 15px;
1438
  }
1439
 
1440
- .rt-tpg-container .rt-holder .rt-detail.rt-with-title {
1441
  padding-top: 0;
1442
  }
1443
 
1444
- .rt-tpg-container .layout1 .rt-detail .tpg-excerpt,
1445
- .rt-tpg-container .isotope1 .rt-detail .tpg-excerpt {
1446
  margin-bottom: 20px;
1447
  }
1448
 
1449
- .rt-tpg-container .layout1 .rt-holder .rt-detail .post-meta,
1450
- .rt-tpg-container .isotope1 .rt-holder .rt-detail .post-meta,
1451
- .rt-tpg-container .carousel1 .rt-holder .rt-detail .post-meta {
1452
  line-height: 25px;
1453
  overflow: hidden;
1454
  }
1455
 
1456
- .rt-tpg-container .layout1 .rt-holder .rt-detail .read-more a,
1457
- .rt-tpg-container .isotope1 .rt-holder .rt-detail .read-more a,
1458
- .rt-tpg-container .carousel1 .rt-holder .rt-detail .read-more a {
1459
  padding: 8px 20px;
1460
  display: inline-block;
1461
  font-size: 15px;
@@ -1463,17 +209,17 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1463
  border: 1px solid rgb(203 203 203 / 40%)
1464
  }
1465
 
1466
- .rt-tpg-container .layout1 .rt-holder .rt-detail .read-more a,
1467
- .rt-tpg-container .isotope1 .rt-holder .rt-detail .read-more a,
1468
- .rt-tpg-container .carousel1 .rt-holder .rt-detail .read-more a {
1469
  color: #1a1a1a;
1470
  }
1471
 
1472
- .rt-tpg-container .rt-holder .rt-detail .post-meta.right {
1473
  text-align: right;
1474
  }
1475
 
1476
- .rt-tpg-container .rt-holder .rt-detail .post-meta.center {
1477
  text-align: center;
1478
  }
1479
 
@@ -1485,12 +231,12 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1485
  /********************************* Layout 2 *************************/
1486
  /**********************************************************************/
1487
 
1488
- .rt-tpg-container .layout2 .rt-holder .rt-img-holder {
1489
  position: relative;
1490
  overflow: hidden;
1491
  }
1492
 
1493
- .rt-tpg-container .layout2 .rt-holder .rt-img-holder img {
1494
  -webkit-transition: all 1.1s ease;
1495
  -moz-transition: all 1.1s ease;
1496
  -o-transition: all 1.1s ease;
@@ -1499,7 +245,7 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1499
  max-width: 100%;
1500
  }
1501
 
1502
- .rt-tpg-container .layout2 .rt-holder .rt-img-holder:hover img {
1503
  -webkit-transform: scale(1.1);
1504
  -moz-transform: scale(1.1);
1505
  -ms-transform: scale(1.1);
@@ -1507,7 +253,7 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1507
  transform: scale(1.1);
1508
  }
1509
 
1510
- .rt-tpg-container .layout2 .img_zoom_out .rt-holder .rt-img-holder img {
1511
  -webkit-transform: scale(1.1);
1512
  -moz-transform: scale(1.1);
1513
  -ms-transform: scale(1.1);
@@ -1515,7 +261,7 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1515
  transform: scale(1.1);
1516
  }
1517
 
1518
- .rt-tpg-container .layout2 .img_zoom_out .rt-holder .rt-img-holder:hover img {
1519
  -webkit-transform: scale(1);
1520
  -moz-transform: scale(1);
1521
  -ms-transform: scale(1);
@@ -1523,8 +269,8 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1523
  transform: scale(1);
1524
  }
1525
 
1526
- .rt-tpg-container .layout2 .img_no_effect .rt-holder .rt-img-holder img,
1527
- .rt-tpg-container .layout2 .img_no_effect .rt-holder .rt-img-holder:hover img {
1528
  -webkit-transform: scale(1);
1529
  -moz-transform: scale(1);
1530
  -ms-transform: scale(1);
@@ -1532,45 +278,45 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1532
  transform: scale(1);
1533
  }
1534
 
1535
- .rt-tpg-container .layout2 .rt-holder .rt-detail h2,
1536
- .rt-tpg-container .layout2 .rt-holder .rt-detail h3,
1537
- .rt-tpg-container .layout2 .rt-holder .rt-detail h4 {
1538
  font-size: 26px;
1539
  line-height: 1.25;
1540
  margin: 0px 0 15px 0;
1541
  font-weight: 400;
1542
  }
1543
 
1544
- .rt-tpg-container .layout2 .rt-detail .tpg-excerpt {
1545
  margin-bottom: 20px;
1546
  }
1547
 
1548
- .rt-tpg-container .layout2 .rt-holder .rt-detail .read-more a {
1549
  line-height: 1.8;
1550
  border-radius: 5px;
1551
  display: inline-block;
1552
  }
1553
 
1554
- .rt-tpg-container .layout2 .rt-holder .rt-detail .read-more {
1555
  display: inline-block;
1556
  width: 100%;
1557
  }
1558
 
1559
- .rt-tpg-container .layout2 .rt-holder .rt-detail .read-more.right {
1560
  text-align: right;
1561
  }
1562
 
1563
- .rt-tpg-container .layout2 .rt-holder .rt-detail .read-more.center {
1564
  text-align: center;
1565
  }
1566
 
1567
- .rt-tpg-container .layout2 .rt-holder .rt-detail .rt-tpg-social-share {
1568
  margin-bottom: 15px;
1569
  }
1570
 
1571
  @media all and (max-width: 767px) {
1572
- .rt-tpg-container .layout3 .rt-holder .rt-detail,
1573
- .rt-tpg-container .layout2 .rt-holder .rt-detail {
1574
  padding: 15px 0;
1575
  }
1576
  }
@@ -1579,20 +325,20 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1579
  /********************************* Layout 3 *************************/
1580
  /**********************************************************************/
1581
 
1582
- .rt-tpg-container .layout3 .rt-holder .rt-detail p {
1583
  margin-bottom: 20px;
1584
  }
1585
 
1586
- .rt-tpg-container .layout3 .rt-holder .rt-detail h2,
1587
- .rt-tpg-container .layout3 .rt-holder .rt-detail h3,
1588
- .rt-tpg-container .layout3 .rt-holder .rt-detail h4 {
1589
  font-size: 26px;
1590
  margin: 0px 0 18px 0;
1591
  line-height: 1.25;
1592
  font-weight: 400;
1593
  }
1594
 
1595
- .rt-tpg-container .layout3 .rt-holder .rt-img-holder .overlay {
1596
  width: 100%;
1597
  height: 100%;
1598
  display: block;
@@ -1608,31 +354,31 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1608
  text-align: center;
1609
  }
1610
 
1611
- .rt-tpg-container .layout3 .rt-holder .rt-detail .read-more a {
1612
  line-height: 1.8;
1613
  display: inline-block;
1614
  }
1615
 
1616
- .rt-tpg-container .layout3 .rt-holder .rt-img-holder,
1617
- .rt-tpg-container .layout3 .rt-holder .rt-img-holder > a.rounded img {
1618
  border-radius: 50%;
1619
  overflow: hidden;
1620
  }
1621
 
1622
- .rt-tpg-container .layout3 .rt-holder .rt-detail .read-more {
1623
  display: inline-block;
1624
  width: 100%;
1625
  }
1626
 
1627
- .rt-tpg-container .layout3 .rt-holder .rt-detail .read-more.right {
1628
  text-align: right;
1629
  }
1630
 
1631
- .rt-tpg-container .layout3 .rt-holder .rt-detail .read-more.center {
1632
  text-align: center;
1633
  }
1634
 
1635
- .rt-tpg-container .layout3 .rt-holder .rt-detail .rt-tpg-social-share {
1636
  margin-bottom: 15px;
1637
  }
1638
 
@@ -1640,18 +386,18 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1640
  /********************************* Layout 5 *************************/
1641
  /**********************************************************************/
1642
 
1643
- .rt-tpg-container .layout5 .rt-holder,
1644
- .rt-tpg-container .isotope2 .rt-holder,
1645
- .rt-tpg-container .carousel2 .rt-holder,
1646
- .rt-tpg-container .offset03 .rt-holder {
1647
  position: relative;
1648
  overflow: hidden;
1649
  }
1650
 
1651
- .rt-tpg-container .layout5 .rt-holder .overlay,
1652
- .rt-tpg-container .isotope2 .rt-holder .overlay,
1653
- .rt-tpg-container .carousel2 .rt-holder .overlay,
1654
- .rt-tpg-container .offset03 .rt-holder .overlay {
1655
  left: 0;
1656
  bottom: 0;
1657
  display: block;
@@ -1666,9 +412,9 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1666
  min-height: 150px;
1667
  }
1668
 
1669
- .rt-tpg-container .layout5 .rt-holder .overlay .rt-detail,
1670
- .rt-tpg-container .isotope2 .rt-holder .overlay .rt-detail,
1671
- .rt-tpg-container .carousel2 .rt-holder .overlay .rt-detail {
1672
  opacity: 0;
1673
  visibility: hidden;
1674
  padding: 0;
@@ -1677,51 +423,51 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1677
  max-height: 0;
1678
  }
1679
 
1680
- .rt-tpg-container .layout5 .rt-holder:hover .overlay .rt-detail,
1681
- .rt-tpg-container .isotope2 .rt-holder:hover .overlay .rt-detail,
1682
- .rt-tpg-container .carousel2 .rt-holder:hover .overlay .rt-detail {
1683
  max-height: 450px;
1684
  transition: all 1.2s ease-in-out 0.2s;
1685
  }
1686
 
1687
- .rt-tpg-container .offset03 .rt-holder .overlay .rt-detail {
1688
  padding: 0 0 15px;
1689
  color: #fff;
1690
  }
1691
 
1692
- .rt-tpg-container .offset03 .rt-holder .overlay .rt-detail > *:not(.post-meta-user) {
1693
  opacity: 0;
1694
  visibility: hidden;
1695
  }
1696
 
1697
- .rt-tpg-container .offset03 .rt-holder:hover .overlay .rt-detail > *:not(.post-meta-user) {
1698
  opacity: 1;
1699
  visibility: visible;
1700
  }
1701
 
1702
- .rt-tpg-container .layout5 .rt-holder .overlay .post-meta-user,
1703
- .rt-tpg-container .layout5 .rt-holder .overlay .post-meta-user a,
1704
- .rt-tpg-container .isotope2 .rt-holder .overlay .post-meta-user,
1705
- .rt-tpg-container .isotope2 .rt-holder .overlay .post-meta-user a,
1706
- .rt-tpg-container .offset03 .rt-holder .overlay .post-meta-user,
1707
- .rt-tpg-container .offset03 .rt-holder .overlay .post-meta-user a,
1708
- .rt-tpg-container .carousel2 .rt-holder .overlay .post-meta-user,
1709
- .rt-tpg-container .carousel2 .rt-holder .overlay .post-meta-user a {
1710
  color: #fff;
1711
  }
1712
 
1713
- .rt-tpg-container .layout5 .rt-holder .overlay h2,
1714
- .rt-tpg-container .layout5 .rt-holder .overlay h3,
1715
- .rt-tpg-container .layout5 .rt-holder .overlay h4,
1716
- .rt-tpg-container .isotope2 .rt-holder .overlay h2,
1717
- .rt-tpg-container .isotope2 .rt-holder .overlay h3,
1718
- .rt-tpg-container .isotope2 .rt-holder .overlay h4,
1719
- .rt-tpg-container .offset03 .rt-holder .overlay h2,
1720
- .rt-tpg-container .offset03 .rt-holder .overlay h3,
1721
- .rt-tpg-container .offset03 .rt-holder .overlay h4,
1722
- .rt-tpg-container .carousel2 .rt-holder .overlay h2,
1723
- .rt-tpg-container .carousel2 .rt-holder .overlay h3,
1724
- .rt-tpg-container .carousel2 .rt-holder .overlay h4 {
1725
  font-size: 22px;
1726
  line-height: 1.3;
1727
  color: #ffffff;
@@ -1729,75 +475,75 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1729
  font-weight: 400;
1730
  }
1731
 
1732
- .rt-tpg-container .layout5 .rt-holder .overlay h2 a,
1733
- .rt-tpg-container .layout5 .rt-holder .overlay h3 a,
1734
- .rt-tpg-container .layout5 .rt-holder .overlay h4 a,
1735
- .rt-tpg-container .isotope2 .rt-holder .overlay h2 a,
1736
- .rt-tpg-container .isotope2 .rt-holder .overlay h3 a,
1737
- .rt-tpg-container .isotope2 .rt-holder .overlay h4 a,
1738
- .rt-tpg-container .offset03 .rt-holder .overlay h2 a,
1739
- .rt-tpg-container .offset03 .rt-holder .overlay h3 a,
1740
- .rt-tpg-container .offset03 .rt-holder .overlay h4 a,
1741
- .rt-tpg-container .carousel2 .rt-holder .overlay h2 a,
1742
- .rt-tpg-container .carousel2 .rt-holder .overlay h3 a,
1743
- .rt-tpg-container .carousel2 .rt-holder .overlay h4 a {
1744
  color: #ffffff;
1745
  }
1746
 
1747
- .rt-tpg-container .layout5 .rt-holder:hover .overlay,
1748
- .rt-tpg-container .isotope2 .rt-holder:hover .overlay,
1749
- .rt-tpg-container .offset03 .rt-holder:hover .overlay,
1750
- .rt-tpg-container .carousel2 .rt-holder:hover .overlay {
1751
  width: 100%;
1752
  height: 100%;
1753
  }
1754
 
1755
- .rt-tpg-container .layout5 .rt-holder:hover .overlay .rt-detail,
1756
- .rt-tpg-container .isotope2 .rt-holder:hover .overlay .rt-detail,
1757
- .rt-tpg-container .offset03 .rt-holder:hover .overlay .rt-detail,
1758
- .rt-tpg-container .carousel2 .rt-holder:hover .overlay .rt-detail {
1759
  opacity: 1;
1760
  visibility: visible;
1761
  }
1762
 
1763
- .rt-tpg-container .layout5 .rt-holder .overlay .post-meta-user,
1764
- .rt-tpg-container .isotope2 .rt-holder .overlay .post-meta-user,
1765
- .rt-tpg-container .offset03 .rt-holder .overlay .post-meta-user,
1766
- .rt-tpg-container .carousel2 .rt-holder .overlay .post-meta-user {
1767
  display: block;
1768
  }
1769
 
1770
- .rt-tpg-container .isotope2 .rt-holder .post-meta .rt-tpg-social-share,
1771
- .rt-tpg-container .isotope2 .rt-holder .post-meta {
1772
  text-align: center;
1773
  }
1774
 
1775
- .rt-tpg-container .isotope2 .rt-holder .post-meta.left {
1776
  text-align: left;
1777
  }
1778
 
1779
- .rt-tpg-container .layout7 .rt-holder .overlay > *:not(.entry-title),
1780
- .rt-tpg-container .layout5 .rt-holder .overlay .rt-detail,
1781
- .rt-tpg-container .carousel4 .rt-holder .overlay > *:not(.entry-title) {
1782
  overflow: hidden;
1783
  max-height: 0;
1784
  transition: 0.6s !important;
1785
  opacity: 0;
1786
  }
1787
 
1788
- .rt-tpg-container .layout7 .rt-holder:hover .overlay > *:not(.entry-title),
1789
- .rt-tpg-container .layout5 .rt-holder:hover .overlay .rt-detail,
1790
- .rt-tpg-container .carousel4 .rt-holder:hover .overlay > *:not(.entry-title) {
1791
  max-height: 300px;
1792
  opacity: 1;
1793
  }
1794
 
1795
- .rt-tpg-container .layout5 .rt-holder {
1796
  min-height: 250px;
1797
  display: flex;
1798
  }
1799
 
1800
- .rt-tpg-container .layout5 .rt-holder .rt-img-responsive {
1801
  height: 100%;
1802
  object-fit: cover;
1803
  }
@@ -1806,15 +552,15 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1806
  /********************************* Layout 6 *************************/
1807
  /**********************************************************************/
1808
 
1809
- .rt-tpg-container .layout6 .rt-holder,
1810
- .rt-tpg-container .isotope3 .rt-holder,
1811
- .rt-tpg-container .carousel3 .rt-holder {
1812
  position: relative;
1813
  }
1814
 
1815
- .rt-tpg-container .layout6 .rt-holder .overlay,
1816
- .rt-tpg-container .isotope3 .rt-holder .overlay,
1817
- .rt-tpg-container .carousel3 .rt-holder .overlay {
1818
  width: 100%;
1819
  height: 100%;
1820
  display: flex;
@@ -1834,9 +580,9 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1834
  align-items: center;
1835
  }
1836
 
1837
- .rt-tpg-container .layout6 .rt-holder .overlay .line,
1838
- .rt-tpg-container .isotope3 .rt-holder .overlay .line,
1839
- .rt-tpg-container .carousel3 .rt-holder .overlay .line {
1840
  height: 2px;
1841
  min-height: 2px;
1842
  width: 0%;
@@ -1848,21 +594,21 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1848
  transition: all 500ms ease-out;
1849
  }
1850
 
1851
- .rt-tpg-container .layout6 .rt-holder .overlay:hover .line,
1852
- .rt-tpg-container .isotope3 .rt-holder .overlay:hover .line,
1853
- .rt-tpg-container .carousel3 .rt-holder .overlay:hover .line {
1854
  width: 40%;
1855
  }
1856
 
1857
- .rt-tpg-container .layout6 .rt-holder .overlay h2,
1858
- .rt-tpg-container .layout6 .rt-holder .overlay h3,
1859
- .rt-tpg-container .layout6 .rt-holder .overlay h4,
1860
- .rt-tpg-container .isotope3 .rt-holder .overlay h2,
1861
- .rt-tpg-container .isotope3 .rt-holder .overlay h3,
1862
- .rt-tpg-container .isotope3 .rt-holder .overlay h4,
1863
- .rt-tpg-container .carousel3 .rt-holder .overlay h2,
1864
- .rt-tpg-container .carousel3 .rt-holder .overlay h3,
1865
- .rt-tpg-container .carousel3 .rt-holder .overlay h4 {
1866
  padding-top: 5%;
1867
  color: #ffffff;
1868
  font-size: 22px;
@@ -1871,70 +617,70 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1871
  margin: 0px 0 18px 0;
1872
  }
1873
 
1874
- .rt-tpg-container .layout6 .rt-holder .overlay h2 a,
1875
- .rt-tpg-container .layout6 .rt-holder .overlay h3 a,
1876
- .rt-tpg-container .layout6 .rt-holder .overlay h4 a,
1877
- .rt-tpg-container .isotope3 .rt-holder .overlay h2 a,
1878
- .rt-tpg-container .isotope3 .rt-holder .overlay h3 a,
1879
- .rt-tpg-container .isotope3 .rt-holder .overlay h4 a,
1880
- .rt-tpg-container .carousel3 .rt-holder .overlay h2 a,
1881
- .rt-tpg-container .carousel3 .rt-holder .overlay h3 a,
1882
- .rt-tpg-container .carousel3 .rt-holder .overlay h4 a {
1883
  color: #ffffff;
1884
  }
1885
 
1886
- .rt-tpg-container .layout6 .rt-holder .overlay .post-meta.left,
1887
- .rt-tpg-container .isotope3 .rt-holder .overlay .post-meta.left,
1888
- .rt-tpg-container .carousel3 .rt-holder .overlay .post-meta.left {
1889
  text-align: left;
1890
  }
1891
 
1892
- .rt-tpg-container .layout6 .rt-holder .overlay .post-meta.right,
1893
- .rt-tpg-container .isotope3 .rt-holder .overlay .post-meta.right,
1894
- .rt-tpg-container .carousel3 .rt-holder .overlay .post-meta.right {
1895
  text-align: right;
1896
  }
1897
 
1898
- .rt-tpg-container .layout6 .rt-holder .overlay .rt-tpg-social-share,
1899
- .rt-tpg-container .isotope3 .rt-holder .overlay .rt-tpg-social-share,
1900
- .rt-tpg-container .carousel3 .rt-holder .overlay .rt-tpg-social-share {
1901
  float: none;
1902
  text-align: center;
1903
  }
1904
 
1905
- .rt-tpg-container .layout6 .rt-holder .read-more,
1906
- .rt-tpg-container .layout6 .rt-holder .read-more,
1907
- .rt-tpg-container .carousel3 .rt-holder .read-more {
1908
  float: none;
1909
  }
1910
 
1911
- .rt-tpg-container .layout6 .rt-holder .overlay .post-meta-user,
1912
- .rt-tpg-container .isotope3 .rt-holder .overlay .post-meta-user,
1913
- .rt-tpg-container .carousel3 .rt-holder .overlay .post-meta-user {
1914
  color: #fff;
1915
  }
1916
 
1917
- .rt-tpg-container .layout6 .rt-holder .overlay .post-meta-user p,
1918
- .rt-tpg-container .isotope3 .rt-holder .overlay .post-meta-user p,
1919
- .rt-tpg-container .carousel3 .rt-holder .overlay .post-meta-user p {
1920
  margin-bottom: 0;
1921
  }
1922
 
1923
- .rt-tpg-container .layout6 .rt-holder .overlay .post-meta-user a,
1924
- .rt-tpg-container .isotope3 .rt-holder .overlay .post-meta-user a,
1925
- .rt-tpg-container .carousel3 .rt-holder .overlay .post-meta-user a {
1926
  color: #fff;
1927
  }
1928
 
1929
- .rt-tpg-container .layout6 .rt-holder:hover .overlay .tpg-excerpt,
1930
- .rt-tpg-container .isotope3 .rt-holder:hover .overlay .tpg-excerpt,
1931
- .rt-tpg-container .carousel3 .rt-holder:hover .overlay .tpg-excerpt {
1932
  color: #ffffff;
1933
  }
1934
 
1935
- .rt-tpg-container .layout6 .rt-holder:hover .overlay,
1936
- .rt-tpg-container .isotope3 .rt-holder:hover .overlay,
1937
- .rt-tpg-container .carousel3 .rt-holder:hover .overlay {
1938
  opacity: 1;
1939
  }
1940
 
@@ -1942,23 +688,23 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1942
  /********************************* Layout 7 *************************/
1943
  /**********************************************************************/
1944
 
1945
- .rt-tpg-container .layout7 .rt-holder,
1946
- .rt-tpg-container .isotope4 .rt-holder,
1947
- .rt-tpg-container .carousel4 .rt-holder {
1948
  position: relative;
1949
  }
1950
 
1951
- .rt-tpg-container .layout7 .rt-holder img,
1952
- .rt-tpg-container .isotope4 .rt-holder img,
1953
- .rt-tpg-container .carousel4 .rt-holder img {
1954
  opacity: 0.9;
1955
  -webkit-transition: opacity 0.35s;
1956
  transition: opacity 0.35s;
1957
  }
1958
 
1959
- .rt-tpg-container .layout7 .rt-holder .overlay,
1960
- .rt-tpg-container .isotope4 .rt-holder .overlay,
1961
- .rt-tpg-container .carousel4 .rt-holder .overlay {
1962
  display: flex;
1963
  justify-content: center;
1964
  flex-direction: column;
@@ -1972,15 +718,15 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1972
  background: rgba(0, 0, 0, 0.3);
1973
  }
1974
 
1975
- .rt-tpg-container .layout7 .rt-holder .overlay:hover,
1976
- .rt-tpg-container .isotope4 .rt-holder .overlay:hover,
1977
- .rt-tpg-container .carousel4 .rt-holder .overlay:hover {
1978
  background: rgba(0, 0, 0, 0.5);
1979
  }
1980
 
1981
- .rt-tpg-container .layout7 .rt-holder .overlay::before,
1982
- .rt-tpg-container .isotope4 .rt-holder .overlay::before,
1983
- .rt-tpg-container .carousel4 .rt-holder .overlay::before {
1984
  position: absolute;
1985
  top: 20px;
1986
  right: 20px;
@@ -1997,53 +743,53 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
1997
  }
1998
 
1999
 
2000
- .rt-tpg-container .carousel12 .rt-holder .post-info .cat-above-title,
2001
- .rt-tpg-container .carousel11 .rt-holder .post-info .cat-above-title,
2002
- .rt-tpg-container .carousel7 .rt-holder .cat-above-title {
2003
  color: #ffffff;
2004
  text-align: center;
2005
  }
2006
 
2007
- .rt-tpg-container .carousel5 .rt-holder .cat-above-title,
2008
- .rt-tpg-container .carousel4 .rt-holder .cat-above-title {
2009
  text-align: center;
2010
  opacity: 0;
2011
  margin-top: 30px;
2012
  color: #ffffff;
2013
  }
2014
 
2015
- .rt-tpg-container .carousel12 .rt-holder .post-info .cat-above-title *,
2016
- .rt-tpg-container .carousel8 .rt-holder .cat-above-title *,
2017
- .rt-tpg-container .carousel7 .rt-holder .cat-above-title a,
2018
- .rt-tpg-container .carousel5 .rt-holder .cat-above-title a,
2019
- .rt-tpg-container .carousel4 .rt-holder .cat-above-title a {
2020
  color: inherit;
2021
  }
2022
 
2023
- .rt-tpg-container .carousel5 .rt-holder:hover .cat-above-title,
2024
- .rt-tpg-container .carousel4 .rt-holder:hover .cat-above-title {
2025
  opacity: 1;
2026
  }
2027
 
2028
- .rt-tpg-container .carousel12 .rt-holder .post-info .cat-above-title,
2029
- .rt-tpg-container .carousel11 .rt-holder .post-info .cat-above-title,
2030
- .rt-tpg-container .carousel5 .rt-holder:hover .cat-above-title + .entry-title {
2031
  padding-top: 10px;
2032
  }
2033
 
2034
- .rt-tpg-container .carousel4 .rt-holder:hover .cat-above-title + .entry-title {
2035
  margin-top: 10px;
2036
  }
2037
 
2038
- .rt-tpg-container .layout7 .rt-holder h2,
2039
- .rt-tpg-container .layout7 .rt-holder h3,
2040
- .rt-tpg-container .layout7 .rt-holder h4,
2041
- .rt-tpg-container .isotope4 .rt-holder h2,
2042
- .rt-tpg-container .isotope4 .rt-holder h3,
2043
- .rt-tpg-container .isotope4 .rt-holder h4,
2044
- .rt-tpg-container .carousel4 .rt-holder h2,
2045
- .rt-tpg-container .carousel4 .rt-holder h3,
2046
- .rt-tpg-container .carousel4 .rt-holder h4 {
2047
  color: #ffffff;
2048
  font-size: 22px;
2049
  font-weight: 400;
@@ -2054,563 +800,260 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
2054
  transition: transform 0.35s;
2055
  }
2056
 
2057
- .rt-tpg-container .layout7 .rt-holder h2 a,
2058
- .rt-tpg-container .layout7 .rt-holder h3 a,
2059
- .rt-tpg-container .layout7 .rt-holder h4 a,
2060
- .rt-tpg-container .isotope4 .rt-holder h2 a,
2061
- .rt-tpg-container .isotope4 .rt-holder h3 a,
2062
- .rt-tpg-container .isotope4 .rt-holder h4 a,
2063
- .rt-tpg-container .carousel4 .rt-holder h2 a,
2064
- .rt-tpg-container .carousel4 .rt-holder h3 a,
2065
- .rt-tpg-container .carousel4 .rt-holder h4 a {
2066
  color: #ffffff;
2067
  }
2068
 
2069
- .rt-tpg-container .layout7 .rt-holder p,
2070
- .rt-tpg-container .isotope4 .rt-holder p,
2071
- .rt-tpg-container .carousel4 .rt-holder p,
2072
- .rt-tpg-container .layout7 .rt-holder .tpg-excerpt,
2073
- .rt-tpg-container .isotope4 .rt-holder .tpg-excerpt,
2074
- .rt-tpg-container .carousel4 .rt-holder .tpg-excerpt {
2075
  color: #ffffff;
2076
  padding: 0 15px;
2077
  opacity: 0;
2078
  text-align: center;
2079
  -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
2080
- transition: opacity 0.35s, transform 0.35s;
2081
- -webkit-transform: scale(1.5);
2082
- transform: scale(1.5);
2083
- }
2084
-
2085
- .rt-tpg-container .layout7 .rt-holder .post-meta-user p,
2086
- .rt-tpg-container .isotope4 .rt-holder .post-meta-user p,
2087
- .rt-tpg-container .carousel4 .rt-holder .post-meta-user p {
2088
- margin-bottom: 0;
2089
- }
2090
-
2091
- .rt-tpg-container .layout7 .rt-holder .post-meta-user a,
2092
- .rt-tpg-container .isotope4 .rt-holder .post-meta-user a,
2093
- .rt-tpg-container .carousel4 .rt-holder .post-meta-user a {
2094
- color: #ffffff;
2095
- }
2096
-
2097
- .rt-tpg-container .layout7 .rt-holder:hover h3,
2098
- .rt-tpg-container .isotope4 .rt-holder:hover h3,
2099
- .rt-tpg-container .carousel4 .rt-holder:hover h3 {
2100
- margin: 7% 0 10px 0;
2101
- -webkit-transform: scale(0.9);
2102
- transform: scale(0.9);
2103
- }
2104
-
2105
- .rt-tpg-container .layout7 .rt-holder:hover .overlay::before,
2106
- .rt-tpg-container .isotope4 .rt-holder:hover .overlay::before,
2107
- .rt-tpg-container .carousel4 .rt-holder:hover .overlay::before,
2108
- .rt-tpg-container .layout7 .rt-holder:hover .tpg-excerpt,
2109
- .rt-tpg-container .isotope4 .rt-holder:hover .tpg-excerpt,
2110
- .rt-tpg-container .carousel4 .rt-holder:hover .tpg-excerpt,
2111
- .rt-tpg-container .layout7 .rt-holder:hover p,
2112
- .rt-tpg-container .isotope4 .rt-holder:hover p,
2113
- .rt-tpg-container .carousel4 .rt-holder:hover p {
2114
- opacity: 1;
2115
- -webkit-transform: scale3d(1, 1, 1);
2116
- transform: scale3d(1, 1, 1);
2117
- }
2118
-
2119
- .rt-tpg-container .layout7 .rt-holder .cat-above-title,
2120
- .rt-tpg-container .layout7 .rt-holder .overlay .post-meta,
2121
- .rt-tpg-container .isotope4 .rt-holder .overlay .post-meta,
2122
- .rt-tpg-container .carousel4 .rt-holder .overlay .post-meta {
2123
- color: #ffffff;
2124
- text-align: center;
2125
- overflow: hidden;
2126
- opacity: 0;
2127
- }
2128
-
2129
- .rt-tpg-container .layout7 .rt-holder .overlay .post-meta.left,
2130
- .rt-tpg-container .isotope4 .rt-holder .overlay .post-meta.left,
2131
- .rt-tpg-container .carousel4 .rt-holder .overlay .post-meta.left {
2132
- text-align: left;
2133
- }
2134
-
2135
- .rt-tpg-container .layout7 .rt-holder .overlay .post-meta.right,
2136
- .rt-tpg-container .isotope4 .rt-holder .overlay .post-meta.right,
2137
- .rt-tpg-container .carousel4 .rt-holder .overlay .post-meta.right {
2138
- text-align: right;
2139
- }
2140
-
2141
- .rt-tpg-container .layout7 .rt-holder:hover .cat-above-title,
2142
- .rt-tpg-container .layout7 .rt-holder:hover .overlay .post-meta,
2143
- .rt-tpg-container .isotope4 .rt-holder:hover .overlay .post-meta,
2144
- .rt-tpg-container .carousel4 .rt-holder:hover .overlay .post-meta {
2145
- opacity: 1;
2146
- -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
2147
- transition: opacity 0.35s, transform 0.35s;
2148
- -webkit-transform: scale(1);
2149
- transform: scale(1);
2150
- }
2151
-
2152
- .rt-tpg-container .layout7 .rt-holder .overlay .rt-tpg-social-share,
2153
- .rt-tpg-container .isotope4 .rt-holder .overlay .rt-tpg-social-share,
2154
- .rt-tpg-container .carousel4 .rt-holder .overlay .rt-tpg-social-share {
2155
- float: none;
2156
- text-align: center;
2157
- }
2158
-
2159
- .rt-tpg-container .layout7 .rt-holder .read-more,
2160
- .rt-tpg-container .isotope4 .rt-holder .read-more,
2161
- .rt-tpg-container .carousel4 .rt-holder .read-more {
2162
- float: none;
2163
- }
2164
-
2165
- .rt-tpg-container .layout7 .rt-holder .overlay .entry-title,
2166
- .rt-tpg-container .carousel4 .rt-holder h3 {
2167
- margin: 0 !important;
2168
- transition: 0.4s;
2169
- }
2170
-
2171
- /**********************************************************************/
2172
- /********************************* Layout 12 *************************/
2173
- /**********************************************************************/
2174
-
2175
- .rt-tpg-container .layout12 .rt-holder,
2176
- .rt-tpg-container .isotope8 .rt-holder,
2177
- .rt-tpg-container .carousel8 .rt-holder {
2178
- background: #fff;
2179
- -webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.22);
2180
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.22);
2181
- }
2182
-
2183
- .rt-tpg-container .layout12 .rt-holder .rt-img-holder,
2184
- .rt-tpg-container .isotope8 .rt-holder .rt-img-holder,
2185
- .rt-tpg-container .carousel8 .rt-holder .rt-img-holder {
2186
- position: relative;
2187
- overflow: hidden;
2188
- }
2189
-
2190
- .rt-tpg-container .layout12 .rt-holder:hover img,
2191
- .rt-tpg-container .isotope8 .rt-holder:hover img,
2192
- .rt-tpg-container .carousel8 .rt-holder:hover img {
2193
- -webkit-transition: all 0.25s ease-in-out;
2194
- transform: scale(1.05, 1.05);
2195
- -webkit-transform: scale(1.05, 1.05);
2196
- -moz-transform: scale(1.05, 1.05);
2197
- -ms-transform: scale(1.05, 1.05);
2198
- -o-transform: scale(1.05, 1.05);
2199
- }
2200
-
2201
- .rt-tpg-container .layout12 .rt-holder .rt-detail,
2202
- .rt-tpg-container .isotope8 .rt-holder .rt-detail,
2203
- .rt-tpg-container .carousel8 .rt-holder .rt-detail {
2204
- background: #fff;
2205
- padding: 25px;
2206
- -webkit-transition: all 0.3s ease-out 0s;
2207
- -moz-transition: all 0.3s ease-out 0s;
2208
- -ms-transition: all 0.3s ease-out 0s;
2209
- -o-transition: all 0.3s ease-out 0s;
2210
- transition: all 0.3s ease-out 0s;
2211
- display: inline-block;
2212
- width: 100%;
2213
- }
2214
-
2215
- .rt-tpg-container .layout12 .rt-holder .rt-detail.rt-with-title,
2216
- .rt-tpg-container .isotope8 .rt-holder .rt-detail.rt-with-title,
2217
- .rt-tpg-container .carousel8 .rt-holder .rt-detail.rt-with-title {
2218
- padding-top: 0;
2219
- padding-bottom: 0;
2220
- }
2221
-
2222
- .rt-tpg-container .layout12 .rt-holder.rt-with-title-below h2.entry-title,
2223
- .rt-tpg-container .layout12 .rt-holder.rt-with-title-below h3.entry-title,
2224
- .rt-tpg-container .layout12 .rt-holder.rt-with-title-below h4.entry-title,
2225
- .rt-tpg-container .isotope8 .rt-holder.rt-with-title-below h2.entry-title,
2226
- .rt-tpg-container .isotope8 .rt-holder.rt-with-title-below h3.entry-title,
2227
- .rt-tpg-container .isotope8 .rt-holder.rt-with-title-below h4.entry-title,
2228
- .rt-tpg-container .carousel8 .rt-holder.rt-with-title-below h2.entry-title,
2229
- .rt-tpg-container .carousel8 .rt-holder.rt-with-title-below h3.entry-title,
2230
- .rt-tpg-container .carousel8 .rt-holder.rt-with-title-below h4.entry-title {
2231
- margin-top: 0;
2232
- }
2233
-
2234
- .rt-tpg-container .layout12 .rt-holder .rt-detail.rt-with-title .entry-title,
2235
- .rt-tpg-container .isotope8 .rt-holder .rt-detail.rt-with-title .entry-title,
2236
- .rt-tpg-container .carousel8 .rt-holder .rt-detail.rt-with-title .entry-title {
2237
- display: inline-block;
2238
- }
2239
-
2240
- .rt-tpg-container .layout12 .rt-holder.rt-with-title .post-meta-user,
2241
- .rt-tpg-container .isotope8 .rt-holder.rt-with-title .post-meta-user,
2242
- .rt-tpg-container .carousel8 .rt-holder.rt-with-title .post-meta-user {
2243
- margin-bottom: 15px;
2244
- }
2245
-
2246
- .rt-tpg-container .layout12 .rt-holder .rt-detail h2,
2247
- .rt-tpg-container .layout12 .rt-holder .rt-detail h3,
2248
- .rt-tpg-container .layout12 .rt-holder .rt-detail h4,
2249
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h2,
2250
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h3,
2251
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h4,
2252
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h2,
2253
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h3,
2254
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h4 {
2255
- font-size: 22px;
2256
- line-height: 1.25;
2257
- margin: 15px 0px 15px;
2258
- font-weight: 400;
2259
- }
2260
-
2261
- .rt-tpg-container .layout12 .rt-holder .rt-detail h2 a,
2262
- .rt-tpg-container .layout12 .rt-holder .rt-detail h3 a,
2263
- .rt-tpg-container .layout12 .rt-holder .rt-detail h4 a,
2264
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h2 a,
2265
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h3 a,
2266
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h4 a,
2267
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h2 a,
2268
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h3 a,
2269
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h4 a {
2270
- color: #000;
2271
- }
2272
-
2273
- .rt-tpg-container .layout12 .rt-holder:hover .entry-title a,
2274
- .rt-tpg-container .isotope8 .rt-holder:hover .entry-title a,
2275
- .rt-tpg-container .carousel8 .rt-holder:hover .entry-title a {
2276
- color: #fff !important;
2277
- }
2278
-
2279
- .rt-tpg-container .layout12 .rt-holder:hover .rt-detail .tpg-excerpt,
2280
- .rt-tpg-container .isotope8 .rt-holder:hover .rt-detail .tpg-excerpt,
2281
- .rt-tpg-container .carousel8 .rt-holder:hover .rt-detail .tpg-excerpt {
2282
- color: #fff !important;
2283
- }
2284
-
2285
- .rt-tpg-container .layout12 .rt-holder .rt-detail h2 a:hover,
2286
- .rt-tpg-container .layout12 .rt-holder .rt-detail h3 a:hover,
2287
- .rt-tpg-container .layout12 .rt-holder .rt-detail h4 a:hover,
2288
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h2 a:hover,
2289
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h3 a:hover,
2290
- .rt-tpg-container .isotope8 .rt-holder .rt-detail h4 a:hover,
2291
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h2 a:hover,
2292
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h3 a:hover,
2293
- .rt-tpg-container .carousel8 .rt-holder .rt-detail h4 a:hover {
2294
- color: #fff;
2295
- }
2296
-
2297
- .rt-tpg-container .layout12 .rt-holder:hover .rt-detail,
2298
- .rt-tpg-container .isotope8 .rt-holder:hover .rt-detail,
2299
- .rt-tpg-container .carousel8 .rt-holder:hover .rt-detail {
2300
- background: #0850d0;
2301
- color: #fff !important;
2302
- }
2303
-
2304
- .rt-tpg-container .layout12 .rt-holder .rt-detail .read-more,
2305
- .rt-tpg-container .isotope8 .rt-holder .rt-detail .read-more,
2306
- .rt-tpg-container .carousel8 .rt-holder .rt-detail .read-more {
2307
- text-align: right;
2308
- }
2309
-
2310
- .rt-tpg-container .carousel8 .rt-holder:hover .rt-detail .post-meta-user,
2311
- .rt-tpg-container .carousel8 .rt-holder:hover .rt-detail .post-meta-user .meta-data,
2312
- .rt-tpg-container .carousel8 .rt-holder:hover .rt-detail .post-meta-user a,
2313
- .rt-tpg-container .carousel8 .rt-holder:hover .rt-detail .post-meta-user i[class^='fa'],
2314
- .rt-tpg-container .carousel8 .rt-holder:hover .rt-detail h3 a,
2315
- .rt-tpg-container .isotope8 .rt-holder:hover .rt-detail .post-meta-user,
2316
- .rt-tpg-container .isotope8 .rt-holder:hover .rt-detail .post-meta-user .meta-data,
2317
- .rt-tpg-container .isotope8 .rt-holder:hover .rt-detail .post-meta-user i[class^='fa'],
2318
- .rt-tpg-container .isotope8 .rt-holder:hover .rt-detail .post-meta-user a,
2319
- .rt-tpg-container .layout12 .rt-holder:hover .rt-detail .post-meta-user,
2320
- .rt-tpg-container .layout12 .rt-holder:hover .rt-detail i,
2321
- .rt-tpg-container .layout12 .rt-holder:hover .rt-detail .post-meta-user a {
2322
- color: #fff !important;
2323
- }
2324
-
2325
- /**********************************************************************/
2326
- /********************************* pagination *************************/
2327
- /**********************************************************************/
2328
- .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > * {
2329
- margin-left: 1px;
2330
- margin-right: 1px;
2331
- font-size: 16px;
2332
- line-height: 1.55;
2333
- display: inline-block;
2334
- width: 30px;
2335
- height: 30px;
2336
- text-align: center;
2337
- font-size: 18px;
2338
- background-color: #bcbcbc;
2339
- color: #fff;
2340
- line-height: 30px;
2341
- bottom: auto;
2342
- cursor: pointer;
2343
- transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2344
- -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2345
- -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
2346
- }
2347
-
2348
- .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > * i {
2349
- line-height: 1;
2350
- }
2351
-
2352
- .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next > .rt-disabled {
2353
- opacity: 0.5;
2354
- pointer-events: none;
2355
- }
2356
-
2357
- .rt-cb-page-prev-next {
2358
- text-align: left;
2359
- }
2360
-
2361
- .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style .rt-loadmore-loading {
2362
- color: #fff;
2363
- position: absolute;
2364
- top: 50%;
2365
- left: 50%;
2366
- margin-top: -32px;
2367
- margin-left: -32px;
2368
- visibility: hidden;
2369
- opacity: 0;
2370
- }
2371
-
2372
- .rt-ball-scale-multiple.rt-2x {
2373
- width: 64px;
2374
- height: 64px;
2375
  }
2376
 
2377
- .rt-ball-scale-multiple.rt-2x > div {
2378
- width: 64px;
2379
- height: 64px;
 
2380
  }
2381
 
2382
- .rt-ball-scale-multiple, .rt-ball-scale-multiple > div {
2383
- position: relative;
2384
- -webkit-box-sizing: border-box;
2385
- -moz-box-sizing: border-box;
2386
- box-sizing: border-box;
2387
  }
2388
 
2389
- .rt-ball-scale-multiple > div {
2390
- display: inline-block;
2391
- float: none;
2392
- background-color: currentColor;
2393
- border: 0 solid currentColor;
 
2394
  }
2395
 
2396
- .rt-ball-scale-multiple > div:nth-child(2) {
2397
- -webkit-animation-delay: .2s;
2398
- -moz-animation-delay: .2s;
2399
- -o-animation-delay: .2s;
2400
- animation-delay: .2s;
 
 
 
 
 
 
 
2401
  }
2402
 
2403
- .rt-ball-scale-multiple > div {
2404
- position: absolute;
2405
- top: 0;
2406
- left: 0;
2407
- width: 32px;
2408
- height: 32px;
2409
- border-radius: 100%;
2410
  opacity: 0;
2411
- -webkit-animation: ball-scale-multiple 1s 0s linear infinite;
2412
- -moz-animation: ball-scale-multiple 1s 0s linear infinite;
2413
- -o-animation: ball-scale-multiple 1s 0s linear infinite;
2414
- animation: ball-scale-multiple 1s 0s linear infinite;
2415
  }
2416
 
2417
- .rt-tpg-container .rt-pagination-wrap {
2418
- text-align: center;
2419
- margin-top: 10px;
2420
- display: inline-block;
2421
- width: 100%;
2422
  }
2423
 
2424
- .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style {
2425
- cursor: pointer;
2426
- position: relative;
2427
- user-select: none;
2428
- -webkit-user-select: none;
2429
  }
2430
 
2431
- .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-hidden-elm,
2432
- .rt-tpg-container .rt-pagination-wrap .rt-infinite-action.rt-hidden-elm,
2433
- .rt-tpg-container .rt-pagination-wrap .rt-page-numbers.rt-hidden-elm,
2434
- .rt-tpg-container .rt-pagination-wrap .rt-cb-page-prev-next.rt-hidden-elm {
2435
- display: none !important;
 
 
 
 
2436
  }
2437
 
2438
- .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-lm-loading .rt-loadmore-text {
2439
- opacity: 0;
2440
- visibility: hidden;
 
 
2441
  }
2442
 
2443
- .rt-tpg-container .rt-pagination-wrap .rt-loadmore-style.rt-lm-loading .rt-loadmore-loading {
2444
- opacity: 1;
2445
- visibility: visible;
 
2446
  }
2447
 
2448
- .rt-tpg-container .rt-pagination-wrap .rt-loadmore-btn {
2449
- font-size: 13px;
2450
- letter-spacing: 0.1em;
2451
- text-transform: uppercase;
2452
- margin-top: 30px;
2453
- color: #fff;
2454
- background-color: #fb4c35;
2455
- text-decoration: none;
2456
- padding: 9px 20px 8px 20px;
2457
- display: inline-block;
2458
- transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2459
- -webkit-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2460
- -ms-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
2461
  }
2462
 
2463
- .rt-tpg-container .rt-loadmore-btn:hover {
2464
- background-color: #666;
2465
- }
2466
 
2467
- .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages {
2468
- float: none;
2469
- padding-top: 0.1px;
2470
- padding-bottom: 0.1px;
 
 
2471
  }
2472
 
2473
- .rt-tpg-container .rt-pagination-wrap .rt-page-numbers.rt-lm-loading {
2474
- pointer-events: none;
2475
- opacity: 0.5;
 
 
2476
  }
2477
 
2478
- .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul {
2479
- float: none;
2480
- text-align: center;
2481
- font-size: 0;
2482
- line-height: 0;
2483
- margin: -2px;
 
 
 
2484
  }
2485
 
2486
- .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li {
2487
- float: none;
2488
- font-size: 16px;
2489
- line-height: 1.55;
 
 
 
 
 
 
2490
  display: inline-block;
2491
- min-width: 30px;
2492
- min-height: 30px;
2493
- border: none;
2494
- padding: 2px;
2495
- }
2496
-
2497
- .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li > a {
2498
- -moz-border-top-left-radius: 0;
2499
- -ms-border-top-left-radius: 0;
2500
- -o-border-top-left-radius: 0;
2501
- -moz-border-top-right-radius: 0;
2502
- -ms-border-top-right-radius: 0;
2503
- -o-border-top-right-radius: 0;
2504
- -moz-border-bottom-left-radius: 0;
2505
- -ms-border-bottom-left-radius: 0;
2506
- -o-border-bottom-left-radius: 0;
2507
- border-radius: 0;
2508
- -webkit-border-radius: 0;
2509
- -moz-border-bottom-right-radius: 0;
2510
- -ms-border-bottom-right-radius: 0;
2511
- -o-border-bottom-right-radius: 0;
2512
- text-decoration: none;
2513
- min-width: 30px;
2514
- height: 30px;
2515
- font-size: 16px;
2516
- line-height: 1.55;
2517
- font-weight: normal;
2518
- color: #999;
2519
- letter-spacing: 0;
2520
- line-height: 29px;
2521
- border: 1px solid #d7d7d7;
2522
- display: block;
2523
- padding-left: 8px;
2524
- padding-right: 8px;
2525
- color: #999;
2526
  }
2527
 
2528
- .rt-tpg-container .rt-pagination-wrap .rt-page-numbers .paginationjs .paginationjs-pages ul li.active > a {
2529
- background-color: #fb4c35;
2530
- color: #fff;
 
 
2531
  }
2532
 
2533
- /* old pagination */
2534
-
2535
- .rt-pagination {
2536
- text-align: center;
2537
- margin: 30px;
 
 
 
 
 
2538
  }
2539
 
2540
- .rt-pagination .pagination-list {
 
 
2541
  display: inline-block;
2542
- padding-left: 0;
2543
- border-radius: 4px;
2544
- background: transparent;
2545
- border-top: 0;
2546
  }
2547
 
2548
- .rt-pagination .pagination-list a {
2549
- box-shadow: none;
 
 
2550
  }
2551
 
2552
- .rt-pagination .pagination-list > li {
2553
- display: inline-block;
 
 
 
 
 
 
 
 
 
 
 
2554
  }
2555
 
2556
- .rt-pagination .pagination-list > li > a,
2557
- .rt-pagination .pagination-list > li > span {
2558
- position: relative;
2559
- padding: 6px 12px;
2560
- line-height: 1.42857143;
2561
- text-decoration: none;
2562
- color: #337ab7;
2563
- background-color: #ffffff;
2564
- border: 1px solid #dddddd;
2565
- margin-left: -1px;
2566
  }
2567
 
2568
- .rt-pagination .pagination-list > li:first-child > a,
2569
- .rt-pagination .pagination-list > li:first-child > span {
2570
- margin-left: 0;
2571
- border-bottom-left-radius: 4px;
2572
- border-top-left-radius: 4px;
 
 
 
 
 
2573
  }
2574
 
2575
- .rt-pagination .pagination-list > li:last-child > a,
2576
- .rt-pagination .pagination-list > li:last-child > span {
2577
- border-bottom-right-radius: 4px;
2578
- border-top-right-radius: 4px;
 
2579
  }
2580
 
2581
- .rt-pagination .pagination-list > li > a:hover,
2582
- .rt-pagination .pagination-list > li > span:hover,
2583
- .rt-pagination .pagination-list > li > a:focus,
2584
- .rt-pagination .pagination-list > li > span:focus {
2585
- z-index: 2;
2586
- color: #23527c;
2587
- background-color: #eeeeee;
2588
- border-color: #dddddd;
2589
  }
2590
 
2591
- .rt-pagination .pagination-list > .active > a,
2592
- .rt-pagination .pagination-list > .active > span,
2593
- .rt-pagination .pagination-list > .active > a:hover,
2594
- .rt-pagination .pagination-list > .active > span:hover,
2595
- .rt-pagination .pagination-list > .active > a:focus,
2596
- .rt-pagination .pagination-list > .active > span:focus {
2597
- z-index: 3;
2598
- color: #ffffff;
2599
- background-color: #337ab7;
2600
- border-color: #337ab7;
2601
- cursor: default;
2602
- }
2603
-
2604
- .rt-pagination .pagination-list > .disabled > span,
2605
- .rt-pagination .pagination-list > .disabled > span:hover,
2606
- .rt-pagination .pagination-list > .disabled > span:focus,
2607
- .rt-pagination .pagination-list > .disabled > a,
2608
- .rt-pagination .pagination-list > .disabled > a:hover,
2609
- .rt-pagination .pagination-list > .disabled > a:focus {
2610
- color: #777777;
2611
- background-color: #ffffff;
2612
- border-color: #dddddd;
2613
- cursor: not-allowed;
2614
  }
2615
 
2616
 
@@ -2823,440 +1266,9 @@ body > .rt-tooltip .rt-tooltip-bottom:after {
2823
  /**********************************************************************/
2824
  /**************************** End Media Query *************************/
2825
  /**********************************************************************/
2826
- /*
2827
- * Animation
2828
- */
2829
- @-webkit-keyframes ball-scale-multiple {
2830
- 0% {
2831
- opacity: 0;
2832
- -webkit-transform: scale(0);
2833
- transform: scale(0);
2834
- }
2835
- 5% {
2836
- opacity: .75;
2837
- }
2838
- 100% {
2839
- opacity: 0;
2840
- -webkit-transform: scale(1);
2841
- transform: scale(1);
2842
- }
2843
- }
2844
-
2845
- @-moz-keyframes ball-scale-multiple {
2846
- 0% {
2847
- opacity: 0;
2848
- -moz-transform: scale(0);
2849
- transform: scale(0);
2850
- }
2851
- 5% {
2852
- opacity: .75;
2853
- }
2854
- 100% {
2855
- opacity: 0;
2856
- -moz-transform: scale(1);
2857
- transform: scale(1);
2858
- }
2859
- }
2860
-
2861
- @-o-keyframes ball-scale-multiple {
2862
- 0% {
2863
- opacity: 0;
2864
- -o-transform: scale(0);
2865
- transform: scale(0);
2866
- }
2867
- 5% {
2868
- opacity: .75;
2869
- }
2870
- 100% {
2871
- opacity: 0;
2872
- -o-transform: scale(1);
2873
- transform: scale(1);
2874
- }
2875
- }
2876
-
2877
- @keyframes ball-scale-multiple {
2878
- 0% {
2879
- opacity: 0;
2880
- -webkit-transform: scale(0);
2881
- -moz-transform: scale(0);
2882
- -o-transform: scale(0);
2883
- transform: scale(0);
2884
- }
2885
- 5% {
2886
- opacity: .75;
2887
- }
2888
- 100% {
2889
- opacity: 0;
2890
- -webkit-transform: scale(1);
2891
- -moz-transform: scale(1);
2892
- -o-transform: scale(1);
2893
- transform: scale(1);
2894
- }
2895
- }
2896
-
2897
- @-webkit-keyframes ball-clip-rotate {
2898
- 0% {
2899
- -webkit-transform: rotate(0deg);
2900
- transform: rotate(0deg);
2901
- }
2902
- 50% {
2903
- -webkit-transform: rotate(180deg);
2904
- transform: rotate(180deg);
2905
- }
2906
- 100% {
2907
- -webkit-transform: rotate(360deg);
2908
- transform: rotate(360deg);
2909
- }
2910
- }
2911
-
2912
- @-moz-keyframes ball-clip-rotate {
2913
- 0% {
2914
- -moz-transform: rotate(0deg);
2915
- transform: rotate(0deg);
2916
- }
2917
- 50% {
2918
- -moz-transform: rotate(180deg);
2919
- transform: rotate(180deg);
2920
- }
2921
- 100% {
2922
- -moz-transform: rotate(360deg);
2923
- transform: rotate(360deg);
2924
- }
2925
- }
2926
-
2927
- @-o-keyframes ball-clip-rotate {
2928
- 0% {
2929
- -o-transform: rotate(0deg);
2930
- transform: rotate(0deg);
2931
- }
2932
- 50% {
2933
- -o-transform: rotate(180deg);
2934
- transform: rotate(180deg);
2935
- }
2936
- 100% {
2937
- -o-transform: rotate(360deg);
2938
- transform: rotate(360deg);
2939
- }
2940
- }
2941
-
2942
- @keyframes ball-clip-rotate {
2943
- 0% {
2944
- -webkit-transform: rotate(0deg);
2945
- -moz-transform: rotate(0deg);
2946
- -o-transform: rotate(0deg);
2947
- transform: rotate(0deg);
2948
- }
2949
- 50% {
2950
- -webkit-transform: rotate(180deg);
2951
- -moz-transform: rotate(180deg);
2952
- -o-transform: rotate(180deg);
2953
- transform: rotate(180deg);
2954
- }
2955
- 100% {
2956
- -webkit-transform: rotate(360deg);
2957
- -moz-transform: rotate(360deg);
2958
- -o-transform: rotate(360deg);
2959
- transform: rotate(360deg);
2960
- }
2961
- }
2962
-
2963
- .rt-container-fluid {
2964
- position: relative;
2965
- }
2966
-
2967
- #bottom-script-loader {
2968
- position: absolute;
2969
- width: 100%;
2970
- height: 100%;
2971
- z-index: 99999;
2972
- background: rgba(255, 255, 255, 0.8);
2973
- }
2974
-
2975
- #bottom-script-loader .rt-ball-clip-rotate {
2976
- color: #fb4c35;
2977
- position: absolute;
2978
- top: 80px;
2979
- left: 50%;
2980
- margin-left: -16px;
2981
- z-index: 2;
2982
- }
2983
 
2984
  /*--------- Settings Style -----------*/
2985
 
2986
- /* Category */
2987
- .cat-above-title .rt-separator {
2988
- margin-right: 4px;
2989
- display: inline-block;
2990
- }
2991
-
2992
- /*.category-have-bg .cat-above-title .categories-links .rt-separator,
2993
- .category-have-bg .cat-over-image .categories-links .rt-separator,
2994
- .category-have-bg .cat-above-title .categories-links > i,
2995
- .category-have-bg .cat-over-image .categories-links > i {
2996
- display: none;
2997
- }
2998
- .category-have-bg .categories-links a {
2999
- margin-right: 4px;
3000
- }*/
3001
- .cat-above-title.style2 .categories-links .rt-separator,
3002
- .cat-above-title.style3 .categories-links .rt-separator,
3003
- .cat-over-image.style2 .categories-links .rt-separator,
3004
- .cat-over-image.style3 .categories-links .rt-separator {
3005
- display: none;
3006
- }
3007
-
3008
- .cat-above-title.style2 .categories-links a,
3009
- .cat-above-title.style3 .categories-links a,
3010
- .cat-over-image.style2 .categories-links a,
3011
- .cat-over-image.style3 .categories-links a {
3012
- margin-right: 4px;
3013
- background-color: #1e73be;
3014
- color: #fff;
3015
- padding: 3px 8px;
3016
- letter-spacing: 0.03em;
3017
- display: inline-block;
3018
- position: relative;
3019
- }
3020
-
3021
- .cat-above-title.style3 .categories-links a,
3022
- .cat-over-image.style3 .categories-links a {
3023
- margin-right: 12px;
3024
- }
3025
-
3026
- .cat-over-image.style3 .categories-links a {
3027
- margin-top: 2px;
3028
- margin-bottom: 2px;
3029
- }
3030
-
3031
- .cat-above-title.style3 .categories-links a:after,
3032
- .cat-over-image.style3 .categories-links a:after {
3033
- content: "";
3034
- position: absolute;
3035
- top: 0;
3036
- right: -7px;
3037
- border-top: 8px solid #1e73be;
3038
- border-right: 8px solid transparent;
3039
- }
3040
-
3041
- .cat-over-image {
3042
- position: absolute;
3043
- z-index: 5;
3044
- }
3045
-
3046
- .cat-over-image.top_left {
3047
- top: 10px;
3048
- left: 10px;
3049
- }
3050
-
3051
- .cat-over-image.top_right {
3052
- top: 10px;
3053
- right: 10px;
3054
- }
3055
-
3056
- .cat-over-image.bottom_left {
3057
- bottom: 10px;
3058
- left: 10px;
3059
- }
3060
-
3061
- .cat-over-image.bottom_right {
3062
- bottom: 10px;
3063
- right: 10px;
3064
- }
3065
-
3066
- .cat-over-image.image_center {
3067
- top: 50%;
3068
- left: 50%;
3069
- transform: translate(-50%, -50%);
3070
- }
3071
-
3072
- /*----------- Widget Heading -------------*/
3073
- .tpg-widget-heading-wrapper {
3074
- position: relative;
3075
- margin-bottom: 20px;
3076
- display: flex;
3077
- }
3078
-
3079
- .tpg-widget-heading-wrapper .tpg-widget-heading {
3080
- position: relative;
3081
- padding-right: 15px;
3082
- margin-bottom: 0;
3083
- margin-top: 0;
3084
- padding-top: 0;
3085
- }
3086
-
3087
- .tpg-widget-heading-wrapper.center .tpg-widget-heading {
3088
- margin: 0;
3089
- padding: 0;
3090
- }
3091
-
3092
- .tpg-widget-heading-wrapper.heading-style1 .tpg-widget-heading::before {
3093
- content: '';
3094
- position: absolute;
3095
- top: 50%;
3096
- right: -7.5px;
3097
- width: 8px;
3098
- height: 8px;
3099
- margin-top: -4px;
3100
- border-radius: 50%;
3101
- background-color: #1e73be;
3102
- margin-right: 7px;
3103
- display: inline-block;
3104
- }
3105
-
3106
- .tpg-widget-heading-wrapper.heading-style1.center .tpg-widget-heading::before {
3107
-
4
  /************ Copyright @ 2015-2017, RadiusTheme.com ******************/
5
  /**********************************************************************/
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ /************************ Common ***************************/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
+ .tpg-shortcode-main-wrapper .masonry-grid-item,
11
+ .tpg-shortcode-main-wrapper .even-grid-item {
12
+ margin-bottom: 30px;
 
 
 
 
 
 
 
 
 
 
 
 
13
  }
14
 
15
+ .tpg-shortcode-main-wrapper i {
16
+ margin-right: 5px;
 
 
 
17
  }
18
 
19
+ .tpg-shortcode-main-wrapper .list_layout1 .masonry-grid-item,
20
+ .tpg-shortcode-main-wrapper .list_layout1 .even-grid-item,
21
+ .tpg-shortcode-main-wrapper .grid_hover5 .masonry-grid-item,
22
+ .tpg-shortcode-main-wrapper .grid_hover5 .even-grid-item,
23
+ .tpg-shortcode-main-wrapper .grid_hover4 .masonry-grid-item,
24
+ .tpg-shortcode-main-wrapper .grid_hover4 .even-grid-item,
25
+ .tpg-shortcode-main-wrapper .grid_hover3 .masonry-grid-item,
26
+ .tpg-shortcode-main-wrapper .grid_hover3 .even-grid-item,
27
+ .tpg-shortcode-main-wrapper .grid_hover2 .masonry-grid-item,
28
+ .tpg-shortcode-main-wrapper .grid_hover2 .even-grid-item,
29
+ .tpg-shortcode-main-wrapper .grid_hover1 .masonry-grid-item,
30
+ .tpg-shortcode-main-wrapper .grid_hover1 .even-grid-item {
31
+ margin-bottom: initial;
32
  }
33
 
34
+ .layout3 .rt-img-responsive {
 
 
 
 
35
  display: inline-block;
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
+ .list_layout2 .post-meta-user,
39
+ .list_layout2 .post-meta-tags {
40
+ font-size: 14px;
41
+ color: #A5A6AA;
 
 
 
 
 
 
42
  }
43
 
44
+ .rt-content-loader.layout14 .post-meta-user,
45
+ .rt-content-loader.layout14 .post-meta-tags {
46
+ margin-bottom: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
+ .offset06 .post-meta-user span,
50
+ .offset06 .post-meta-tags span {
51
+ font-weight: 500;
52
+ padding-right: 15px;
53
+ font-size: 14px;
54
+ color: #A5A6AA;
55
  }
56
 
57
+ .offset06 .post-meta-user span a,
58
+ .offset06 .post-meta-tags span a {
59
+ color: #444444;
60
  }
61
 
62
+ .offset06 .post-meta-user span a:hover,
63
+ .offset06 .post-meta-tags span a:hover {
64
+ color: #2962ff;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  }
66
 
67
+ .tpg-shortcode-main-wrapper .rt-detail .entry-title a {
68
+ text-decoration: none;
69
  }
70
 
71
+ .categories-links {
72
+ display: inline-block;
73
+ line-height: 1.3;
 
74
  }
75
 
76
+ .tpg-shortcode-main-wrapper .rt-holder {
 
 
77
  overflow: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
 
80
+ .tpg-shortcode-main-wrapper .grid_hover6 .rt-grid-item {
81
+ padding: 0 2px;
82
+ margin-bottom: 4px;
83
  }
84
 
85
+ .tpg-shortcode-main-wrapper .grid_hover7 .rt-grid-item .post-img img,
86
+ .tpg-shortcode-main-wrapper .grid_hover6 .rt-grid-item .post-img img {
87
+ min-height: 350px;
88
+ object-fit: cover;
89
  }
90
 
91
+ .grid_hover4 .rt-grid-item {
92
+ padding: 0;
93
  }
94
 
95
  /*********************************************************************
96
  /********************************* Layout 1 *************************/
97
  /**********************************************************************/
98
 
99
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-img-holder,
100
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-img-holder,
101
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-img-holder {
102
  position: relative;
103
  overflow: hidden;
104
  }
105
 
106
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-img-holder img,
107
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-img-holder img,
108
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-img-holder img {
109
  -webkit-transition: all 1.1s ease;
110
  -moz-transition: all 1.1s ease;
111
  -o-transition: all 1.1s ease;
114
  max-width: 100%;
115
  }
116
 
117
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-img-holder:hover img,
118
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-img-holder:hover img,
119
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-img-holder:hover img {
120
  -webkit-transform: scale(1.1);
121
  -moz-transform: scale(1.1);
122
  -ms-transform: scale(1.1);
124
  transform: scale(1.1);
125
  }
126
 
127
+ .tpg-shortcode-main-wrapper .layout1 .img_zoom_out .rt-holder .rt-img-holder img {
128
  -webkit-transform: scale(1.1);
129
  -moz-transform: scale(1.1);
130
  -ms-transform: scale(1.1);
132
  transform: scale(1.1);
133
  }
134
 
135
+ .tpg-shortcode-main-wrapper .layout1 .img_no_effect .rt-holder .rt-img-holder:hover img,
136
+ .tpg-shortcode-main-wrapper .layout1 .img_zoom_out .rt-holder .rt-img-holder:hover img {
137
  -webkit-transform: scale(1);
138
  -moz-transform: scale(1);
139
  -ms-transform: scale(1);
141
  transform: scale(1);
142
  }
143
 
144
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder,
145
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder,
146
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder {
147
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
148
  -webkit-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
149
  -moz-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.3);
150
  }
151
 
152
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail,
153
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail,
154
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail {
155
  background: #fff;
156
  padding: 15px;
157
  }
158
 
159
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail h2,
160
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail h3,
161
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail h4,
162
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail h2,
163
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail h3,
164
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail h4,
165
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail h2,
166
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail h3,
167
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail h4 {
168
  font-size: 26px;
169
  line-height: 1.25;
170
  margin: 0 0 18px;
171
  font-weight: 400;
172
  }
173
 
174
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail.rt-with-title h2,
175
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail.rt-with-title h3,
176
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail.rt-with-title h4,
177
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail.rt-with-title h2,
178
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail.rt-with-title h3,
179
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail.rt-with-title h4,
180
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail.rt-with-title h2,
181
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail.rt-with-title h3,
182
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail.rt-with-title h4 {
183
  margin-bottom: 15px;
184
  }
185
 
186
+ .tpg-shortcode-main-wrapper .rt-holder .rt-detail.rt-with-title {
187
  padding-top: 0;
188
  }
189
 
190
+ .tpg-shortcode-main-wrapper .layout1 .rt-detail .tpg-excerpt,
191
+ .tpg-shortcode-main-wrapper .isotope1 .rt-detail .tpg-excerpt {
192
  margin-bottom: 20px;
193
  }
194
 
195
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail .post-meta,
196
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail .post-meta,
197
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail .post-meta {
198
  line-height: 25px;
199
  overflow: hidden;
200
  }
201
 
202
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail .read-more a,
203
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail .read-more a,
204
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail .read-more a {
205
  padding: 8px 20px;
206
  display: inline-block;
207
  font-size: 15px;
209
  border: 1px solid rgb(203 203 203 / 40%)
210
  }
211
 
212
+ .tpg-shortcode-main-wrapper .layout1 .rt-holder .rt-detail .read-more a,
213
+ .tpg-shortcode-main-wrapper .isotope1 .rt-holder .rt-detail .read-more a,
214
+ .tpg-shortcode-main-wrapper .carousel1 .rt-holder .rt-detail .read-more a {
215
  color: #1a1a1a;
216
  }
217
 
218
+ .tpg-shortcode-main-wrapper .rt-holder .rt-detail .post-meta.right {
219
  text-align: right;
220
  }
221
 
222
+ .tpg-shortcode-main-wrapper .rt-holder .rt-detail .post-meta.center {
223
  text-align: center;
224
  }
225
 
231
  /********************************* Layout 2 *************************/
232
  /**********************************************************************/
233
 
234
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-img-holder {
235
  position: relative;
236
  overflow: hidden;
237
  }
238
 
239
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-img-holder img {
240
  -webkit-transition: all 1.1s ease;
241
  -moz-transition: all 1.1s ease;
242
  -o-transition: all 1.1s ease;
245
  max-width: 100%;
246
  }
247
 
248
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-img-holder:hover img {
249
  -webkit-transform: scale(1.1);
250
  -moz-transform: scale(1.1);
251
  -ms-transform: scale(1.1);
253
  transform: scale(1.1);
254
  }
255
 
256
+ .tpg-shortcode-main-wrapper .layout2 .img_zoom_out .rt-holder .rt-img-holder img {
257
  -webkit-transform: scale(1.1);
258
  -moz-transform: scale(1.1);
259
  -ms-transform: scale(1.1);
261
  transform: scale(1.1);
262
  }
263
 
264
+ .tpg-shortcode-main-wrapper .layout2 .img_zoom_out .rt-holder .rt-img-holder:hover img {
265
  -webkit-transform: scale(1);
266
  -moz-transform: scale(1);
267
  -ms-transform: scale(1);
269
  transform: scale(1);
270
  }
271
 
272
+ .tpg-shortcode-main-wrapper .layout2 .img_no_effect .rt-holder .rt-img-holder img,
273
+ .tpg-shortcode-main-wrapper .layout2 .img_no_effect .rt-holder .rt-img-holder:hover img {
274
  -webkit-transform: scale(1);
275
  -moz-transform: scale(1);
276
  -ms-transform: scale(1);
278
  transform: scale(1);
279
  }
280
 
281
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail h2,
282
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail h3,
283
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail h4 {
284
  font-size: 26px;
285
  line-height: 1.25;
286
  margin: 0px 0 15px 0;
287
  font-weight: 400;
288
  }
289
 
290
+ .tpg-shortcode-main-wrapper .layout2 .rt-detail .tpg-excerpt {
291
  margin-bottom: 20px;
292
  }
293
 
294
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .read-more a {
295
  line-height: 1.8;
296
  border-radius: 5px;
297
  display: inline-block;
298
  }
299
 
300
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .read-more {
301
  display: inline-block;
302
  width: 100%;
303
  }
304
 
305
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .read-more.right {
306
  text-align: right;
307
  }
308
 
309
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .read-more.center {
310
  text-align: center;
311
  }
312
 
313
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail .rt-tpg-social-share {
314
  margin-bottom: 15px;
315
  }
316
 
317
  @media all and (max-width: 767px) {
318
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail,
319
+ .tpg-shortcode-main-wrapper .layout2 .rt-holder .rt-detail {
320
  padding: 15px 0;
321
  }
322
  }
325
  /********************************* Layout 3 *************************/
326
  /**********************************************************************/
327
 
328
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail p {
329
  margin-bottom: 20px;
330
  }
331
 
332
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail h2,
333
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail h3,
334
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail h4 {
335
  font-size: 26px;
336
  margin: 0px 0 18px 0;
337
  line-height: 1.25;
338
  font-weight: 400;
339
  }
340
 
341
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-img-holder .overlay {
342
  width: 100%;
343
  height: 100%;
344
  display: block;
354
  text-align: center;
355
  }
356
 
357
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .read-more a {
358
  line-height: 1.8;
359
  display: inline-block;
360
  }
361
 
362
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-img-holder,
363
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-img-holder > a.rounded img {
364
  border-radius: 50%;
365
  overflow: hidden;
366
  }
367
 
368
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .read-more {
369
  display: inline-block;
370
  width: 100%;
371
  }
372
 
373
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .read-more.right {
374
  text-align: right;
375
  }
376
 
377
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .read-more.center {
378
  text-align: center;
379
  }
380
 
381
+ .tpg-shortcode-main-wrapper .layout3 .rt-holder .rt-detail .rt-tpg-social-share {
382
  margin-bottom: 15px;
383
  }
384
 
386
  /********************************* Layout 5 *************************/
387
  /**********************************************************************/
388
 
389
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder,
390
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder,
391
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder,
392
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder {
393
  position: relative;
394
  overflow: hidden;
395
  }
396
 
397
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay,
398
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay,
399
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay,
400
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay {
401
  left: 0;
402
  bottom: 0;
403
  display: block;
412
  min-height: 150px;
413
  }
414
 
415
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .rt-detail,
416
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .rt-detail,
417
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .rt-detail {
418
  opacity: 0;
419
  visibility: hidden;
420
  padding: 0;
423
  max-height: 0;
424
  }
425
 
426
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder:hover .overlay .rt-detail,
427
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder:hover .overlay .rt-detail,
428
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder:hover .overlay .rt-detail {
429
  max-height: 450px;
430
  transition: all 1.2s ease-in-out 0.2s;
431
  }
432
 
433
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .rt-detail {
434
  padding: 0 0 15px;
435
  color: #fff;
436
  }
437
 
438
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .rt-detail > *:not(.post-meta-user) {
439
  opacity: 0;
440
  visibility: hidden;
441
  }
442
 
443
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder:hover .overlay .rt-detail > *:not(.post-meta-user) {
444
  opacity: 1;
445
  visibility: visible;
446
  }
447
 
448
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .post-meta-user,
449
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .post-meta-user a,
450
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .post-meta-user,
451
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .post-meta-user a,
452
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .post-meta-user,
453
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .post-meta-user a,
454
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .post-meta-user,
455
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .post-meta-user a {
456
  color: #fff;
457
  }
458
 
459
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h2,
460
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h3,
461
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h4,
462
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h2,
463
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h3,
464
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h4,
465
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h2,
466
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h3,
467
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h4,
468
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h2,
469
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h3,
470
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h4 {
471
  font-size: 22px;
472
  line-height: 1.3;
473
  color: #ffffff;
475
  font-weight: 400;
476
  }
477
 
478
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h2 a,
479
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h3 a,
480
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay h4 a,
481
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h2 a,
482
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h3 a,
483
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay h4 a,
484
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h2 a,
485
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h3 a,
486
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay h4 a,
487
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h2 a,
488
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h3 a,
489
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay h4 a {
490
  color: #ffffff;
491
  }
492
 
493
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder:hover .overlay,
494
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder:hover .overlay,
495
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder:hover .overlay,
496
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder:hover .overlay {
497
  width: 100%;
498
  height: 100%;
499
  }
500
 
501
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder:hover .overlay .rt-detail,
502
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder:hover .overlay .rt-detail,
503
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder:hover .overlay .rt-detail,
504
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder:hover .overlay .rt-detail {
505
  opacity: 1;
506
  visibility: visible;
507
  }
508
 
509
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .post-meta-user,
510
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .overlay .post-meta-user,
511
+ .tpg-shortcode-main-wrapper .offset03 .rt-holder .overlay .post-meta-user,
512
+ .tpg-shortcode-main-wrapper .carousel2 .rt-holder .overlay .post-meta-user {
513
  display: block;
514
  }
515
 
516
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .post-meta .rt-tpg-social-share,
517
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .post-meta {
518
  text-align: center;
519
  }
520
 
521
+ .tpg-shortcode-main-wrapper .isotope2 .rt-holder .post-meta.left {
522
  text-align: left;
523
  }
524
 
525
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay > *:not(.entry-title),
526
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .overlay .rt-detail,
527
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay > *:not(.entry-title) {
528
  overflow: hidden;
529
  max-height: 0;
530
  transition: 0.6s !important;
531
  opacity: 0;
532
  }
533
 
534
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .overlay > *:not(.entry-title),
535
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder:hover .overlay .rt-detail,
536
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .overlay > *:not(.entry-title) {
537
  max-height: 300px;
538
  opacity: 1;
539
  }
540
 
541
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder {
542
  min-height: 250px;
543
  display: flex;
544
  }
545
 
546
+ .tpg-shortcode-main-wrapper .layout5 .rt-holder .rt-img-responsive {
547
  height: 100%;
548
  object-fit: cover;
549
  }
552
  /********************************* Layout 6 *************************/
553
  /**********************************************************************/
554
 
555
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder,
556
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder,
557
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder {
558
  position: relative;
559
  }
560
 
561
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay,
562
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay,
563
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay {
564
  width: 100%;
565
  height: 100%;
566
  display: flex;
580
  align-items: center;
581
  }
582
 
583
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .line,
584
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .line,
585
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .line {
586
  height: 2px;
587
  min-height: 2px;
588
  width: 0%;
594
  transition: all 500ms ease-out;
595
  }
596
 
597
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay:hover .line,
598
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay:hover .line,
599
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay:hover .line {
600
  width: 40%;
601
  }
602
 
603
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h2,
604
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h3,
605
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h4,
606
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h2,
607
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h3,
608
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h4,
609
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h2,
610
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h3,
611
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h4 {
612
  padding-top: 5%;
613
  color: #ffffff;
614
  font-size: 22px;
617
  margin: 0px 0 18px 0;
618
  }
619
 
620
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h2 a,
621
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h3 a,
622
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay h4 a,
623
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h2 a,
624
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h3 a,
625
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay h4 a,
626
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h2 a,
627
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h3 a,
628
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay h4 a {
629
  color: #ffffff;
630
  }
631
 
632
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta.left,
633
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta.left,
634
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta.left {
635
  text-align: left;
636
  }
637
 
638
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta.right,
639
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta.right,
640
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta.right {
641
  text-align: right;
642
  }
643
 
644
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .rt-tpg-social-share,
645
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .rt-tpg-social-share,
646
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .rt-tpg-social-share {
647
  float: none;
648
  text-align: center;
649
  }
650
 
651
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .read-more,
652
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .read-more,
653
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .read-more {
654
  float: none;
655
  }
656
 
657
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta-user,
658
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta-user,
659
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta-user {
660
  color: #fff;
661
  }
662
 
663
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta-user p,
664
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta-user p,
665
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta-user p {
666
  margin-bottom: 0;
667
  }
668
 
669
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder .overlay .post-meta-user a,
670
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder .overlay .post-meta-user a,
671
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder .overlay .post-meta-user a {
672
  color: #fff;
673
  }
674
 
675
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder:hover .overlay .tpg-excerpt,
676
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder:hover .overlay .tpg-excerpt,
677
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder:hover .overlay .tpg-excerpt {
678
  color: #ffffff;
679
  }
680
 
681
+ .tpg-shortcode-main-wrapper .layout6 .rt-holder:hover .overlay,
682
+ .tpg-shortcode-main-wrapper .isotope3 .rt-holder:hover .overlay,
683
+ .tpg-shortcode-main-wrapper .carousel3 .rt-holder:hover .overlay {
684
  opacity: 1;
685
  }
686
 
688
  /********************************* Layout 7 *************************/
689
  /**********************************************************************/
690
 
691
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder,
692
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder,
693
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder {
694
  position: relative;
695
  }
696
 
697
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder img,
698
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder img,
699
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder img {
700
  opacity: 0.9;
701
  -webkit-transition: opacity 0.35s;
702
  transition: opacity 0.35s;
703
  }
704
 
705
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay,
706
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay,
707
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay {
708
  display: flex;
709
  justify-content: center;
710
  flex-direction: column;
718
  background: rgba(0, 0, 0, 0.3);
719
  }
720
 
721
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay:hover,
722
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay:hover,
723
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay:hover {
724
  background: rgba(0, 0, 0, 0.5);
725
  }
726
 
727
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay::before,
728
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay::before,
729
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay::before {
730
  position: absolute;
731
  top: 20px;
732
  right: 20px;
743
  }
744
 
745
 
746
+ .tpg-shortcode-main-wrapper .carousel12 .rt-holder .post-info .cat-above-title,
747
+ .tpg-shortcode-main-wrapper .carousel11 .rt-holder .post-info .cat-above-title,
748
+ .tpg-shortcode-main-wrapper .carousel7 .rt-holder .cat-above-title {
749
  color: #ffffff;
750
  text-align: center;
751
  }
752
 
753
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder .cat-above-title,
754
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .cat-above-title {
755
  text-align: center;
756
  opacity: 0;
757
  margin-top: 30px;
758
  color: #ffffff;
759
  }
760
 
761
+ .tpg-shortcode-main-wrapper .carousel12 .rt-holder .post-info .cat-above-title *,
762
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .cat-above-title *,
763
+ .tpg-shortcode-main-wrapper .carousel7 .rt-holder .cat-above-title a,
764
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder .cat-above-title a,
765
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .cat-above-title a {
766
  color: inherit;
767
  }
768
 
769
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder:hover .cat-above-title,
770
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .cat-above-title {
771
  opacity: 1;
772
  }
773
 
774
+ .tpg-shortcode-main-wrapper .carousel12 .rt-holder .post-info .cat-above-title,
775
+ .tpg-shortcode-main-wrapper .carousel11 .rt-holder .post-info .cat-above-title,
776
+ .tpg-shortcode-main-wrapper .carousel5 .rt-holder:hover .cat-above-title + .entry-title {
777
  padding-top: 10px;
778
  }
779
 
780
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .cat-above-title + .entry-title {
781
  margin-top: 10px;
782
  }
783
 
784
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h2,
785
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h3,
786
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h4,
787
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h2,
788
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h3,
789
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h4,
790
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h2,
791
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h3,
792
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h4 {
793
  color: #ffffff;
794
  font-size: 22px;
795
  font-weight: 400;
800
  transition: transform 0.35s;
801
  }
802
 
803
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h2 a,
804
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h3 a,
805
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder h4 a,
806
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h2 a,
807
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h3 a,
808
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder h4 a,
809
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h2 a,
810
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h3 a,
811
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h4 a {
812
  color: #ffffff;
813
  }
814
 
815
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder p,
816
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder p,
817
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder p,
818
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .tpg-excerpt,
819
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .tpg-excerpt,
820
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .tpg-excerpt {
821
  color: #ffffff;
822
  padding: 0 15px;
823
  opacity: 0;
824
  text-align: center;
825
  -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
826
+ transition: opacity 0.35s, transform 0.35s;
827
+ -webkit-transform: scale(1.5);
828
+ transform: scale(1.5);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
829
  }
830
 
831
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .post-meta-user p,
832
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .post-meta-user p,
833
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .post-meta-user p {
834
+ margin-bottom: 0;
835
  }
836
 
837
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .post-meta-user a,
838
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .post-meta-user a,
839
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .post-meta-user a {
840
+ color: #ffffff;
 
841
  }
842
 
843
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover h3,
844
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover h3,
845
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover h3 {
846
+ margin: 7% 0 10px 0;
847
+ -webkit-transform: scale(0.9);
848
+ transform: scale(0.9);
849
  }
850
 
851
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .overlay::before,
852
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover .overlay::before,
853
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .overlay::before,
854
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .tpg-excerpt,
855
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover .tpg-excerpt,
856
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .tpg-excerpt,
857
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover p,
858
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover p,
859
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover p {
860
+ opacity: 1;
861
+ -webkit-transform: scale3d(1, 1, 1);
862
+ transform: scale3d(1, 1, 1);
863
  }
864
 
865
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .cat-above-title,
866
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .post-meta,
867
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay .post-meta,
868
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay .post-meta {
869
+ color: #ffffff;
870
+ text-align: center;
871
+ overflow: hidden;
872
  opacity: 0;
 
 
 
 
873
  }
874
 
875
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .post-meta.left,
876
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay .post-meta.left,
877
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay .post-meta.left {
878
+ text-align: left;
 
879
  }
880
 
881
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .post-meta.right,
882
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay .post-meta.right,
883
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay .post-meta.right {
884
+ text-align: right;
 
885
  }
886
 
887
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .cat-above-title,
888
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder:hover .overlay .post-meta,
889
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder:hover .overlay .post-meta,
890
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder:hover .overlay .post-meta {
891
+ opacity: 1;
892
+ -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
893
+ transition: opacity 0.35s, transform 0.35s;
894
+ -webkit-transform: scale(1);
895
+ transform: scale(1);
896
  }
897
 
898
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .rt-tpg-social-share,
899
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .overlay .rt-tpg-social-share,
900
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .overlay .rt-tpg-social-share {
901
+ float: none;
902
+ text-align: center;
903
  }
904
 
905
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .read-more,
906
+ .tpg-shortcode-main-wrapper .isotope4 .rt-holder .read-more,
907
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder .read-more {
908
+ float: none;
909
  }
910
 
911
+ .tpg-shortcode-main-wrapper .layout7 .rt-holder .overlay .entry-title,
912
+ .tpg-shortcode-main-wrapper .carousel4 .rt-holder h3 {
913
+ margin: 0 !important;
914
+ transition: 0.4s;
 
 
 
 
 
 
 
 
 
915
  }
916
 
917
+ /**********************************************************************/
918
+ /********************************* Layout 12 *************************/
919
+ /**********************************************************************/
920
 
921
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder,
922
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder,
923
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder {
924
+ background: #fff;
925
+ -webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.22);
926
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.22);
927
  }
928
 
929
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-img-holder,
930
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-img-holder,
931
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-img-holder {
932
+ position: relative;
933
+ overflow: hidden;
934
  }
935
 
936
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover img,
937
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover img,
938
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover img {
939
+ -webkit-transition: all 0.25s ease-in-out;
940
+ transform: scale(1.05, 1.05);
941
+ -webkit-transform: scale(1.05, 1.05);
942
+ -moz-transform: scale(1.05, 1.05);
943
+ -ms-transform: scale(1.05, 1.05);
944
+ -o-transform: scale(1.05, 1.05);
945
  }
946
 
947
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail,
948
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail,
949
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail {
950
+ background: #fff;
951
+ padding: 25px;
952
+ -webkit-transition: all 0.3s ease-out 0s;
953
+ -moz-transition: all 0.3s ease-out 0s;
954
+ -ms-transition: all 0.3s ease-out 0s;
955
+ -o-transition: all 0.3s ease-out 0s;
956
+ transition: all 0.3s ease-out 0s;
957
  display: inline-block;
958
+ width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
959
  }
960
 
961
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail.rt-with-title,
962
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail.rt-with-title,
963
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail.rt-with-title {
964
+ padding-top: 0;
965
+ padding-bottom: 0;
966
  }
967
 
968
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder.rt-with-title-below h2.entry-title,
969
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder.rt-with-title-below h3.entry-title,
970
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder.rt-with-title-below h4.entry-title,
971
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder.rt-with-title-below h2.entry-title,
972
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder.rt-with-title-below h3.entry-title,
973
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder.rt-with-title-below h4.entry-title,
974
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder.rt-with-title-below h2.entry-title,
975
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder.rt-with-title-below h3.entry-title,
976
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder.rt-with-title-below h4.entry-title {
977
+ margin-top: 0;
978
  }
979
 
980
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail.rt-with-title .entry-title,
981
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail.rt-with-title .entry-title,
982
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail.rt-with-title .entry-title {
983
  display: inline-block;
 
 
 
 
984
  }
985
 
986
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder.rt-with-title .post-meta-user,
987
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder.rt-with-title .post-meta-user,
988
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder.rt-with-title .post-meta-user {
989
+ margin-bottom: 15px;
990
  }
991
 
992
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h2,
993
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h3,
994
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h4,
995
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h2,
996
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h3,
997
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h4,
998
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h2,
999
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h3,
1000
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h4 {
1001
+ font-size: 22px;
1002
+ line-height: 1.25;
1003
+ margin: 15px 0px 15px;
1004
+ font-weight: 400;
1005
  }
1006
 
1007
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h2 a,
1008
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h3 a,
1009
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h4 a,
1010
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h2 a,
1011
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h3 a,
1012
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h4 a,
1013
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h2 a,
1014
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h3 a,
1015
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h4 a {
1016
+ color: #000;
1017
  }
1018
 
1019
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h2 a:hover,
1020
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h3 a:hover,
1021
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail h4 a:hover,
1022
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h2 a:hover,
1023
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h3 a:hover,
1024
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail h4 a:hover,
1025
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h2 a:hover,
1026
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h3 a:hover,
1027
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail h4 a:hover {
1028
+ color: #fff;
1029
  }
1030
 
1031
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover .rt-detail,
1032
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail,
1033
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail {
1034
+ background: #0850d0;
1035
+ color: #fff;
1036
  }
1037
 
1038
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder .rt-detail .read-more,
1039
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder .rt-detail .read-more,
1040
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder .rt-detail .read-more {
1041
+ text-align: right;
 
 
 
 
1042
  }
1043
 
1044
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail .post-meta-user,
1045
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail .post-meta-user .meta-data,
1046
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail .post-meta-user a,
1047
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail .post-meta-user i[class^='fa'],
1048
+ .tpg-shortcode-main-wrapper .carousel8 .rt-holder:hover .rt-detail h3 a,
1049
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail .post-meta-user,
1050
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail .post-meta-user .meta-data,
1051
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail .post-meta-user i[class^='fa'],
1052
+ .tpg-shortcode-main-wrapper .isotope8 .rt-holder:hover .rt-detail .post-meta-user a,
1053
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover .rt-detail .post-meta-user,
1054
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover .rt-detail i,
1055
+ .tpg-shortcode-main-wrapper .layout12 .rt-holder:hover .rt-detail .post-meta-user a {
1056
+ color: #fff !important;
 
 
 
 
 
 
 
 
 
 
1057
  }
1058
 
1059
 
1266
  /**********************************************************************/
1267
  /**************************** End Media Query *************************/
1268
  /**********************************************************************/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1269
 
1270
  /*--------- Settings Style -----------*/
1271