Version Description
Download this release
Release Info
Developer | slickremix |
Plugin | Feed Them Social – Facebook, Instagram, Twitter, YouTube, Pinterest |
Version | 2.6.1 |
Comparing to | |
See all releases |
Code changes from version 2.6.0 to 2.6.1
- admin/class-fts-instagram-options-page.php +54 -40
- feed-them.php +6 -6
- includes/feed-them-functions.php +3328 -3150
- readme.txt +6 -2
admin/class-fts-instagram-options-page.php
CHANGED
@@ -30,12 +30,14 @@ class FTS_Instagram_Options_Page {
|
|
30 |
public function __construct() {
|
31 |
}
|
32 |
|
|
|
33 |
/**
|
34 |
* Feed Them Instagram Options Page
|
35 |
*
|
36 |
* @since 1.9.6
|
37 |
*/
|
38 |
public function feed_them_instagram_options_page() {
|
|
|
39 |
$fts_instagram_access_token = get_option( 'fts_instagram_custom_api_token' );
|
40 |
$fts_instagram_custom_id = get_option( 'fts_instagram_custom_id' );
|
41 |
$fts_instagram_show_follow_btn = get_option( 'instagram_show_follow_btn' );
|
@@ -82,7 +84,8 @@ class FTS_Instagram_Options_Page {
|
|
82 |
</h3>
|
83 |
<?php
|
84 |
|
85 |
-
|
|
|
86 |
// Get Data for Instagram!
|
87 |
$response = wp_remote_fopen( $insta_url );
|
88 |
// Error Check!
|
@@ -90,13 +93,14 @@ class FTS_Instagram_Options_Page {
|
|
90 |
?>
|
91 |
<p>
|
92 |
<?php
|
93 |
-
echo
|
94 |
-
|
95 |
-
'<a href="' . esc_url( 'https://www.slickremix.com/docs/how-to-create-instagram-access-token/' ) . '" target="_blank">',
|
96 |
-
'</a>'
|
97 |
-
);
|
98 |
-
?>
|
99 |
</p>
|
|
|
|
|
|
|
|
|
|
|
100 |
<p>
|
101 |
<?php
|
102 |
echo sprintf(
|
@@ -121,44 +125,54 @@ class FTS_Instagram_Options_Page {
|
|
121 |
|
122 |
<div class="feed-them-social-admin-input-wrap">
|
123 |
<div class="feed-them-social-admin-input-label fts-instagram-border-bottom-color-label">
|
124 |
-
<?php esc_html_e( 'Access Token
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
</div>
|
126 |
|
127 |
<input type="text" name="fts_instagram_custom_api_token" class="feed-them-social-admin-input" id="fts_instagram_custom_api_token" value="<?php echo esc_attr( $access_token ); ?>"/>
|
128 |
<div class="fts-clear"></div>
|
129 |
</div>
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
162 |
<div class="fts-clear"></div>
|
163 |
</div>
|
164 |
|
30 |
public function __construct() {
|
31 |
}
|
32 |
|
33 |
+
|
34 |
/**
|
35 |
* Feed Them Instagram Options Page
|
36 |
*
|
37 |
* @since 1.9.6
|
38 |
*/
|
39 |
public function feed_them_instagram_options_page() {
|
40 |
+
$fts_functions = new feed_them_social_functions();
|
41 |
$fts_instagram_access_token = get_option( 'fts_instagram_custom_api_token' );
|
42 |
$fts_instagram_custom_id = get_option( 'fts_instagram_custom_id' );
|
43 |
$fts_instagram_show_follow_btn = get_option( 'instagram_show_follow_btn' );
|
84 |
</h3>
|
85 |
<?php
|
86 |
|
87 |
+
|
88 |
+
$insta_url = esc_url( 'https://api.instagram.com/v1/users/self/?access_token=' . $fts_instagram_access_token );
|
89 |
// Get Data for Instagram!
|
90 |
$response = wp_remote_fopen( $insta_url );
|
91 |
// Error Check!
|
93 |
?>
|
94 |
<p>
|
95 |
<?php
|
96 |
+
echo esc_html( 'This is required to make the Instagram Feed work. Click the button below and it will connect to your Instagram Account to get an access token. It will then return to this page and save it in the inputs below. After it finishes you will be able to generate your Instagram feed.', 'feed-them-social' );
|
97 |
+
?>
|
|
|
|
|
|
|
|
|
98 |
</p>
|
99 |
+
<p>
|
100 |
+
<?php
|
101 |
+
echo esc_html( 'If you need to generate more than one feed simply remove the Instagram ID and Access Token and click the Save All Changes button at the bottom of the page. Make sure you are logged out of your current Instagram Account and click the button to get a new access token. You will be prompted to login to Instagram with your new account username and password. Once the new access token is returned you can then create another feed.', 'feed-them-social' );
|
102 |
+
?>
|
103 |
+
</p>
|
104 |
<p>
|
105 |
<?php
|
106 |
echo sprintf(
|
125 |
|
126 |
<div class="feed-them-social-admin-input-wrap">
|
127 |
<div class="feed-them-social-admin-input-label fts-instagram-border-bottom-color-label">
|
128 |
+
<?php esc_html_e( 'Access Token', 'feed-them-social' );
|
129 |
+
|
130 |
+
|
131 |
+
if ( isset( $_GET['access_token'] ) ) {
|
132 |
+
// START AJAX TO SAVE TOKEN TO DB
|
133 |
+
$fts_functions->feed_them_instagram_save_token();
|
134 |
+
}
|
135 |
+
?>
|
136 |
</div>
|
137 |
|
138 |
<input type="text" name="fts_instagram_custom_api_token" class="feed-them-social-admin-input" id="fts_instagram_custom_api_token" value="<?php echo esc_attr( $access_token ); ?>"/>
|
139 |
<div class="fts-clear"></div>
|
140 |
</div>
|
141 |
+
|
142 |
+
<div class="feed-them-social-admin-input-wrap fts-instagram-last-row" style="margin-top: 0; padding-top: 0">
|
143 |
+
<?php
|
144 |
+
// Error Check
|
145 |
+
// if the combined streams plugin is active we won't allow the settings page link to open up the Instagram Feed, instead we'll remove the #feed_type=instagram and just let the user manually select the combined streams or single instagram feed.
|
146 |
+
if ( is_plugin_active( 'feed-them-social-combined-streams/feed-them-social-combined-streams.php' ) ) {
|
147 |
+
$custom_instagram_link_hash = '';
|
148 |
+
} else {
|
149 |
+
$custom_instagram_link_hash = '#feed_type=instagram';
|
150 |
+
}
|
151 |
+
if ( ! isset( $test_app_token_response->meta->error_message ) && ! isset( $test_app_token_response->error_message ) && ! empty( $fts_instagram_access_token ) || isset( $test_app_token_response->meta->error_message ) && 'This client has not been approved to access this resource.' === $test_app_token_response->meta->error_message ) {
|
152 |
+
echo sprintf(
|
153 |
+
esc_html( '%1$sYour access token is working! Generate your shortcode on the %2$sSettings Page%3$s', 'feed-them-social' ),
|
154 |
+
'<div class="fts-successful-api-token">',
|
155 |
+
'<a href="' . esc_url( 'admin.php?page=feed-them-settings-page' . $custom_instagram_link_hash ) . '">',
|
156 |
+
'</a></div>'
|
157 |
+
);
|
158 |
+
} elseif ( isset( $test_app_token_response->meta->error_message ) && ! empty( $fts_instagram_access_token ) || isset( $test_app_token_response->error_message ) && ! empty( $fts_instagram_access_token ) ) {
|
159 |
+
$text = isset( $test_app_token_response->meta->error_message ) ? $test_app_token_response->meta->error_message : $test_app_token_response->error_message;
|
160 |
+
echo sprintf(
|
161 |
+
esc_html( '%1$sOh No something\'s wrong. %2$s. Please try clicking the button again to get a new access token. If you need additional assistance please email us at support@slickremix.com %3$s', 'feed-them-social' ),
|
162 |
+
'<div class="fts-failed-api-token">',
|
163 |
+
esc_html( $text ),
|
164 |
+
'</div>'
|
165 |
+
);
|
166 |
+
}
|
167 |
+
if ( empty( $fts_instagram_access_token ) && empty($_GET['access_token']) ) {
|
168 |
+
echo sprintf(
|
169 |
+
esc_html( '%1$sYou are required to get an access token to view your photos.%2$s', 'feed-them-social' ),
|
170 |
+
'<div class="fts-failed-api-token">',
|
171 |
+
'</div>'
|
172 |
+
);
|
173 |
+
}
|
174 |
+
?>
|
175 |
+
</div>
|
176 |
<div class="fts-clear"></div>
|
177 |
</div>
|
178 |
|
feed-them.php
CHANGED
@@ -7,20 +7,20 @@
|
|
7 |
* Plugin Name: Feed Them Social (Facebook, Instagram, Twitter, etc)
|
8 |
* Plugin URI: https://feedthemsocial.com/
|
9 |
* Description: Customize feeds for Facebook Pages, Album Photos, Videos & Covers, Instagram, Twitter, Pinterest & YouTube on pages, posts or widgets.
|
10 |
-
* Version: 2.6.
|
11 |
* Author: SlickRemix
|
12 |
* Author URI: https://www.slickremix.com/
|
13 |
* Text Domain: feed-them-social
|
14 |
* Domain Path: /languages
|
15 |
* Requires at least: WordPress 4.0.0
|
16 |
-
* Tested up to: WordPress
|
17 |
-
* Stable tag: 2.6.
|
18 |
* License: GPLv2 or later
|
19 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
20 |
*
|
21 |
-
* @version 2.6.
|
22 |
* @package FeedThemSocial/Core
|
23 |
-
* @copyright Copyright (c) 2012-
|
24 |
*
|
25 |
* Need Support: https://wordpress.org/support/plugin/feed-them-social
|
26 |
* Paid Extension Support: https://www.slickremix.com/my-account/#tab-support
|
@@ -31,7 +31,7 @@
|
|
31 |
*
|
32 |
* Makes sure any js or css changes are reloaded properly. Added to enqued css and js files throughout!
|
33 |
*/
|
34 |
-
define( 'FTS_CURRENT_VERSION', '2.6.
|
35 |
|
36 |
define( 'FEED_THEM_SOCIAL_NOTICE_STATUS', get_option( 'rating_fts_slick_notice', false ) );
|
37 |
|
7 |
* Plugin Name: Feed Them Social (Facebook, Instagram, Twitter, etc)
|
8 |
* Plugin URI: https://feedthemsocial.com/
|
9 |
* Description: Customize feeds for Facebook Pages, Album Photos, Videos & Covers, Instagram, Twitter, Pinterest & YouTube on pages, posts or widgets.
|
10 |
+
* Version: 2.6.1
|
11 |
* Author: SlickRemix
|
12 |
* Author URI: https://www.slickremix.com/
|
13 |
* Text Domain: feed-them-social
|
14 |
* Domain Path: /languages
|
15 |
* Requires at least: WordPress 4.0.0
|
16 |
+
* Tested up to: WordPress 5.0.1
|
17 |
+
* Stable tag: 2.6.1
|
18 |
* License: GPLv2 or later
|
19 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
20 |
*
|
21 |
+
* @version 2.6.1
|
22 |
* @package FeedThemSocial/Core
|
23 |
+
* @copyright Copyright (c) 2012-2019 SlickRemix
|
24 |
*
|
25 |
* Need Support: https://wordpress.org/support/plugin/feed-them-social
|
26 |
* Paid Extension Support: https://www.slickremix.com/my-account/#tab-support
|
31 |
*
|
32 |
* Makes sure any js or css changes are reloaded properly. Added to enqued css and js files throughout!
|
33 |
*/
|
34 |
+
define( 'FTS_CURRENT_VERSION', '2.6.1' );
|
35 |
|
36 |
define( 'FEED_THEM_SOCIAL_NOTICE_STATUS', get_option( 'rating_fts_slick_notice', false ) );
|
37 |
|
includes/feed-them-functions.php
CHANGED
@@ -7,1151 +7,1292 @@ namespace feedthemsocial;
|
|
7 |
* @package feedthemsocial
|
8 |
* @since 1.9.6
|
9 |
*/
|
10 |
-
class feed_them_social_functions
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
|
134 |
$hide_share = get_option( 'fts_disable_share_button', true ) ? get_option( 'fts_disable_share_button', true ) : '';
|
135 |
|
136 |
-
if ( isset($hide_share) && '1' !== $hide_share ) {
|
137 |
// Social media sharing URLs
|
138 |
-
$link
|
139 |
-
$description
|
140 |
$ft_gallery_share_linkedin = 'https://www.linkedin.com/shareArticle?mini=true&url=' . $link;
|
141 |
-
$ft_gallery_share_email
|
142 |
$ft_gallery_share_facebook = 'https://www.facebook.com/sharer/sharer.php?u=' . $link;
|
143 |
-
$ft_gallery_share_twitter
|
144 |
-
$ft_gallery_share_google
|
145 |
|
146 |
// The share wrap and links
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
return $output;
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
224 |
<?php
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
229 |
</span></div>
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
</span></div>
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
959 |
'fb_view_on_fb_fts',
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1155 |
<script>jQuery(".fb-page").hide(); (function(d, s, id) {
|
1156 |
var js, fjs = d.getElementsByTagName(s)[0];
|
1157 |
if (d.getElementById(id)) return;
|
@@ -1159,2083 +1300,2120 @@ class feed_them_social_functions {
|
|
1159 |
js.src = "//connect.facebook.net/' . esc_html( $language_option ) . '/sdk.js#xfbml=1&appId=&version=v3.1";
|
1160 |
fjs.parentNode.insertBefore(js, fjs);
|
1161 |
}(document, "script", "facebook-jssd"));</script>';
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
|
|
|
|
1542 |
}
|
1543 |
if ( ! empty( $fts_social_icons_color ) ) {
|
1544 |
?>
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
|
|
1549 |
}
|
1550 |
if ( ! empty( $fts_social_icons_hover_color ) ) {
|
1551 |
?>
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
|
1556 |
-
|
1557 |
}
|
1558 |
if ( ! empty( $fts_social_icons_back_color ) ) {
|
1559 |
?>
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
|
1564 |
-
|
1565 |
}
|
1566 |
if ( ! empty( $twitter_text_size ) ) {
|
1567 |
?>
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
|
1572 |
-
|
1573 |
}
|
1574 |
if ( ! empty( $fb_text_size ) ) {
|
1575 |
?>
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
|
1580 |
-
|
1581 |
}
|
1582 |
if ( ! empty( $youtube_loadmore_background_color ) ) {
|
1583 |
?>
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
|
|
1593 |
}
|
1594 |
if ( ! empty( $youtube_loadmore_text_color ) ) {
|
1595 |
?>
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
|
|
|
|
|
|
|
|
|
|
1953 |
<div class="instructional-text facebook-message-generator group inst-text-facebook-group">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-facebook-group-id/" target="_blank">' . esc_html( 'Facebook Group ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>
|
1954 |
<div class="instructional-text facebook-message-generator event-list inst-text-facebook-event-list">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-facebook-event-id/" target="_blank">' . esc_html( 'Facebook Event ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below. PLEASE NOTE: This will only work with Facebook Page Events and you cannot have more than 25 events on Facebook.', 'feed-them-social' ) . '</div>
|
1955 |
<div class="instructional-text facebook-message-generator event inst-text-facebook-event">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-facebook-event-id/" target="_blank">' . esc_html( 'Facebook Event ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>
|
1956 |
<div class="instructional-text facebook-message-generator album_photos inst-text-facebook-album-photos">' . esc_html( 'To show a specific Album copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/docs/how-to-get-your-facebook-photo-gallery-id/" target="_blank">' . esc_html( 'Facebook Album ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the second input below. If you want to show all your uploaded photos leave the Album ID input blank.', 'feed-them-social' ) . '</div>
|
1957 |
<div class="instructional-text facebook-message-generator albums inst-text-facebook-albums">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/docs/how-to-get-your-facebook-photo-gallery-id/" target="_blank">' . esc_html( 'Facebook Album Covers ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>
|
1958 |
<div class="instructional-text facebook-message-generator video inst-text-facebook-video">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/docs/how-to-get-your-facebook-id-and-video-gallery-id" target="_blank">' . esc_html( 'Facebook ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>';
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
<input type="text" name="fts-slicker-instagram-container-image-width" id="fts-slicker-facebook-container-image-width" class="feed-them-social-admin-input" value="250px" placeholder="">
|
2084 |
<div class="fts-clear"></div> </div>';
|
2085 |
-
|
2086 |
-
|
2087 |
<input type="text" name="fts-slicker-instagram-container-image-height" id="fts-slicker-facebook-container-image-height" class="feed-them-social-admin-input" value="250px" placeholder="">
|
2088 |
<div class="fts-clear"></div> </div>';
|
2089 |
-
|
2090 |
-
|
2091 |
<input type="text" name="fts-slicker-facebook-container-margin" id="fts-slicker-facebook-container-margin" class="feed-them-social-admin-input" value="1px" placeholder="">
|
2092 |
<div class="fts-clear"></div></div>';
|
2093 |
-
|
2094 |
-
|
2095 |
<select id="fts-slicker-facebook-container-hide-date-likes-comments" name="fts-slicker-facebook-container-hide-date-likes-comments" class="feed-them-social-admin-input">
|
2096 |
<option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2097 |
|
2098 |
-
|
2099 |
-
|
2100 |
<select id="fts-slicker-facebook-container-position" name="fts-slicker-facebook-container-position" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2101 |
-
|
2102 |
-
|
2103 |
<select id="fts-slicker-facebook-container-animation" name="fts-slicker-facebook-container-animation" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2104 |
-
|
2105 |
-
|
2106 |
<div class="feed-them-social-admin-input-wrap facebook_name"><div class="feed-them-social-admin-input-label">' . esc_html( 'Make photo larger', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Helps with blackspace', 'feed-them-social' ) . '</small></div>
|
2107 |
<input type="text" id="fts-slicker-facebook-image-position-lr" name="fts-slicker-facebook-image-position-lr" class="feed-them-social-admin-input" value="-0%" placeholder="eg. -50%. -0% ' . esc_html( 'is default', 'feed-them-social' ) . '">
|
2108 |
<div class="fts-clear"></div></div>';
|
2109 |
-
|
2110 |
-
|
2111 |
<input type="text" id="fts-slicker-facebook-image-position-top" name="fts-slicker-facebook-image-position-top" class="feed-them-social-admin-input" value="-0%" placeholder="eg. -10%. -0% ' . esc_html( 'is default', 'feed-them-social' ) . '">
|
2112 |
<div class="fts-clear"></div></div>';
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
<div class="feed-them-social-admin-input-default" style="display: block !important;">' . esc_html( 'Must have ', 'feed-them-social' ) . ' <a target="_blank" href="http://www.slickremix.com/downloads/feed-them-social-premium-extension/">' . esc_html( 'premium', 'feed-them-social' ) . '</a> ' . esc_html( 'and', 'feed-them-social' ) . ' <a target="_blank" href="http://www.slickremix.com/downloads/feed-them-carousel-premium/">' . esc_html( 'carousel', 'feed-them-social' ) . '</a> ' . esc_html( 'plugin ', 'feed-them-social' ) . '</a> ' . esc_html( 'to edit.', 'feed-them-social' ) . '</div> <div class="fts-clear"></div></div>';
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
|
|
|
|
2365 |
<input type="text" name="fts-slicker-instagram-container-image-size" id="fts-slicker-instagram-container-image-size" class="feed-them-social-admin-input" value="250px" placeholder="">
|
2366 |
<div class="fts-clear"></div> </div>';
|
2367 |
-
|
2368 |
<input type="text" name="fts-slicker-instagram-icon-center" id="fts-slicker-instagram-icon-center" class="feed-them-social-admin-input" value="65px" placeholder="">
|
2369 |
<div class="fts-clear"></div></div>';
|
2370 |
-
|
2371 |
<input type="text" name="fts-slicker-instagram-container-margin" id="fts-slicker-instagram-container-margin" class="feed-them-social-admin-input" value="1px" placeholder="">
|
2372 |
<div class="fts-clear"></div></div>';
|
2373 |
-
|
2374 |
<select id="fts-slicker-instagram-container-hide-date-likes-comments" name="fts-slicker-instagram-container-hide-date-likes-comments" class="feed-them-social-admin-input">
|
2375 |
<option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2376 |
-
|
2377 |
<select id="fts-slicker-instagram-container-position" name="fts-slicker-instagram-container-position" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select>
|
2378 |
<div class="fts-clear"></div></div>';
|
2379 |
-
|
2380 |
<select id="fts-slicker-instagram-container-animation" name="fts-slicker-instagram-container-animation" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2381 |
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3240 |
}//end class
|
3241 |
?>
|
7 |
* @package feedthemsocial
|
8 |
* @since 1.9.6
|
9 |
*/
|
10 |
+
class feed_them_social_functions
|
11 |
+
{
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Construct
|
15 |
+
*
|
16 |
+
* Functions constructor.
|
17 |
+
*
|
18 |
+
* @since 1.9.6
|
19 |
+
*/
|
20 |
+
public function __construct ()
|
21 |
+
{
|
22 |
+
$root_file = plugin_dir_path( dirname( __FILE__ ) );
|
23 |
+
$this->premium = str_replace( 'feed-them-social/', 'feed-them-premium/', $root_file );
|
24 |
+
$this->facebook_carousel_premium = str_replace( 'feed-them-social/', 'feed-them-carousel-premium/', $root_file );
|
25 |
+
$this->facebook_reviews = str_replace( 'feed-them-social/', 'feed-them-social-facebook-reviews/', $root_file );
|
26 |
+
|
27 |
+
// FTS Activation Function. Commenting out for future use. SRL!
|
28 |
+
register_deactivation_hook( __FILE__, array($this, 'fts_get_check_plugin_version') );
|
29 |
+
// Widget Code!
|
30 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
31 |
+
// This is for the fts_clear_cache_ajax submission!
|
32 |
+
if ( 'show-admin-bar-menu' === get_option( 'fts_admin_bar_menu' ) ) {
|
33 |
+
add_action( 'init', array($this, 'fts_clear_cache_script') );
|
34 |
+
add_action( 'wp_head', array($this, 'my_fts_ajaxurl') );
|
35 |
+
add_action( 'wp_ajax_fts_clear_cache_ajax', array($this, 'fts_clear_cache_ajax') );
|
36 |
+
}
|
37 |
+
add_action( 'wp_ajax_fts_refresh_token_ajax', array($this, 'fts_refresh_token_ajax') );
|
38 |
+
add_action( 'wp_ajax_fts_instagram_token_ajax', array($this, 'fts_instagram_token_ajax') );
|
39 |
+
|
40 |
+
if ( is_admin() || is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) || is_plugin_active( 'feed-them-social-facebook-reviews/feed-them-social-facebook-reviews.php' ) || is_plugin_active( 'fts-bar/fts-bar.php' ) ) {
|
41 |
+
// Load More Options!
|
42 |
+
add_action( 'wp_ajax_my_fts_fb_load_more', array($this, 'my_fts_fb_load_more') );
|
43 |
+
add_action( 'wp_ajax_nopriv_my_fts_fb_load_more', array($this, 'my_fts_fb_load_more') );
|
44 |
+
add_action( 'wp_ajax_my_fts_fb_options_page_load_more', array($this, 'my_fts_fb_options_page_load_more') );
|
45 |
+
}
|
46 |
+
|
47 |
+
add_shortcode( 'fts_fb_page_token', array($this, 'fts_fb_page_token_func') );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Init
|
52 |
+
*
|
53 |
+
* For Loading in the Admin.
|
54 |
+
*
|
55 |
+
* @since 1.9.6
|
56 |
+
*/
|
57 |
+
public function init ()
|
58 |
+
{
|
59 |
+
if ( is_admin() ) {
|
60 |
+
// Register Settings!
|
61 |
+
add_action( 'admin_init', array($this, 'fts_settings_page_register_settings') );
|
62 |
+
add_action( 'admin_init', array($this, 'fts_facebook_style_options_page') );
|
63 |
+
add_action( 'admin_init', array($this, 'fts_twitter_style_options_page') );
|
64 |
+
add_action( 'admin_init', array($this, 'fts_instagram_style_options_page') );
|
65 |
+
add_action( 'admin_init', array($this, 'fts_pinterest_style_options_page') );
|
66 |
+
add_action( 'admin_init', array($this, 'fts_youtube_style_options_page') );
|
67 |
+
|
68 |
+
// Adds setting page to FTS menu!
|
69 |
+
add_action( 'admin_menu', array($this, 'feed_them_main_menu') );
|
70 |
+
add_action( 'admin_menu', array($this, 'feed_them_submenu_pages') );
|
71 |
+
// THIS GIVES US SOME OPTIONS FOR STYLING THE ADMIN AREA!
|
72 |
+
add_action( 'admin_enqueue_scripts', array($this, 'feed_them_admin_css') );
|
73 |
+
// Main Settings Page!
|
74 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-facebook-feed-styles-submenu-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-twitter-feed-styles-submenu-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-instagram-feed-styles-submenu-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-pinterest-feed-styles-submenu-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-youtube-feed-styles-submenu-page' === $_GET['page'] ) {
|
75 |
+
add_action( 'admin_enqueue_scripts', array($this, 'feed_them_settings') );
|
76 |
+
}
|
77 |
+
// System Info Page!
|
78 |
+
if ( isset( $_GET['page'] ) && 'fts-system-info-submenu-page' === $_GET['page'] ) {
|
79 |
+
add_action( 'admin_enqueue_scripts', array($this, 'feed_them_system_info_css') );
|
80 |
+
}
|
81 |
+
// FTS License Page!
|
82 |
+
if ( isset( $_GET['page'] ) && 'fts-license-page' === $_GET['page'] ) {
|
83 |
+
add_action( 'admin_footer', array($this, 'fts_plugin_license') );
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
// FTS Admin Bar!
|
88 |
+
add_action( 'wp_before_admin_bar_render', array($this, 'fts_admin_bar_menu'), 999 );
|
89 |
+
// Settings option. Add Custom CSS to the header of FTS pages only!
|
90 |
+
$fts_include_custom_css_checked_css = get_option( 'fts-color-options-settings-custom-css' );
|
91 |
+
if ( '1' === $fts_include_custom_css_checked_css ) {
|
92 |
+
add_action( 'wp_enqueue_scripts', array($this, 'fts_color_options_head_css') );
|
93 |
+
}
|
94 |
+
// Facebook Settings option. Add Custom CSS to the header of FTS pages only!
|
95 |
+
$fts_include_fb_custom_css_checked_css = '1';
|
96 |
+
if ( '1' === $fts_include_fb_custom_css_checked_css ) {
|
97 |
+
add_action( 'wp_enqueue_scripts', array($this, 'fts_fb_color_options_head_css') );
|
98 |
+
}
|
99 |
+
// Settings option. Custom Powered by Feed Them Social Option!
|
100 |
+
$fts_powered_text_options_settings = get_option( 'fts-powered-text-options-settings' );
|
101 |
+
if ( '1' !== $fts_powered_text_options_settings ) {
|
102 |
+
add_action( 'wp_enqueue_scripts', array($this, 'fts_powered_by_js') );
|
103 |
+
}
|
104 |
+
|
105 |
+
if ( is_plugin_active( 'jetpack/jetpack.php' ) ) {
|
106 |
+
add_filter( 'jetpack_photon_skip_image', array($this, 'fts_jetpack_photon_exception'), 10, 3 );
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* FTS Instagram Token Ajax
|
112 |
+
*
|
113 |
+
* This will save the returned token to the database.
|
114 |
+
*
|
115 |
+
* @since 2.3.3
|
116 |
+
*/
|
117 |
+
public function fts_instagram_token_ajax ()
|
118 |
+
{
|
119 |
+
|
120 |
+
$fts_refresh_token_nonce = wp_create_nonce( 'fts_token_nonce' );
|
121 |
+
$access_token = $_REQUEST['access_token'];
|
122 |
+
if ( wp_verify_nonce( $fts_refresh_token_nonce, 'fts_token_nonce' ) ) {
|
123 |
+
if ( isset( $access_token ) ) {
|
124 |
+
update_option( 'fts_instagram_custom_api_token', sanitize_text_field( $access_token ) );
|
125 |
+
$insta_id = substr( $access_token, 0, strpos( $access_token, "." ) );
|
126 |
+
update_option( 'fts_instagram_custom_id', sanitize_text_field( $insta_id ) );
|
127 |
+
}
|
128 |
+
}
|
129 |
+
die;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Feed Them Instagram Save Token
|
134 |
+
*
|
135 |
+
* FTS Check and Save Instagram Token Validity.
|
136 |
+
*
|
137 |
+
* @return bool
|
138 |
+
* @since 2.6.1
|
139 |
+
*/
|
140 |
+
public function feed_them_instagram_save_token ()
|
141 |
+
{
|
142 |
+
|
143 |
+
$fts_refresh_token_nonce = wp_create_nonce( 'access_token' );
|
144 |
+
|
145 |
+
if ( wp_verify_nonce( $fts_refresh_token_nonce, 'access_token' ) ) {
|
146 |
+
|
147 |
+
$auth_obj = $_GET['access_token'];
|
148 |
+
|
149 |
+
if ( isset( $auth_obj ) ) {
|
150 |
+
?>
|
151 |
+
<script>
|
152 |
+
jQuery(document).ready(function () {
|
153 |
+
var access_token = '<?php echo sanitize_text_field( $auth_obj ) ?>';
|
154 |
+
jQuery.ajax({
|
155 |
+
data: {
|
156 |
+
action: 'fts_instagram_token_ajax',
|
157 |
+
access_token: access_token,
|
158 |
+
},
|
159 |
+
type: 'POST',
|
160 |
+
url: ftsAjax.ajaxurl,
|
161 |
+
success: function (response) {
|
162 |
+
<?php
|
163 |
+
$auth_obj = $_GET['access_token'];
|
164 |
+
$insta_url = esc_url( 'https://api.instagram.com/v1/users/self/?access_token=' . $auth_obj );
|
165 |
+
// Get Data for Instagram to check for errors
|
166 |
+
$response = wp_remote_fopen( $insta_url );
|
167 |
+
$test_app_token_response = json_decode( $response );
|
168 |
+
|
169 |
+
// if the combined streams plugin is active we won't allow the settings page link to open up the Instagram Feed, instead we'll remove the #feed_type=instagram and just let the user manually select the combined streams or single instagram feed.
|
170 |
+
if ( is_plugin_active( 'feed-them-social-combined-streams/feed-them-social-combined-streams.php' ) ) {
|
171 |
+
$custom_instagram_link_hash = '';
|
172 |
+
} else {
|
173 |
+
$custom_instagram_link_hash = '#feed_type=instagram';
|
174 |
+
}
|
175 |
+
if ( !isset( $test_app_token_response->meta->error_message ) && !isset( $test_app_token_response->error_message ) || isset( $test_app_token_response->meta->error_message ) && 'This client has not been approved to access this resource.' === $test_app_token_response->meta->error_message ) {
|
176 |
+
$fts_instagram_message = sprintf(
|
177 |
+
esc_html( '%1$sYour access token is working! Generate your shortcode on the %2$sSettings Page%3$s', 'feed-them-social' ),
|
178 |
+
'<div class="fts-successful-api-token">',
|
179 |
+
'<a href="' . esc_url( 'admin.php?page=feed-them-settings-page' . $custom_instagram_link_hash ) . '">',
|
180 |
+
'</a></div>'
|
181 |
+
);
|
182 |
+
?>
|
183 |
+
jQuery('.fts-failed-api-token').hide();
|
184 |
+
if (!jQuery('.fts-successful-api-token').length) {
|
185 |
+
jQuery('.fts-instagram-last-row').append('<?php echo $fts_instagram_message; ?>');
|
186 |
+
}
|
187 |
+
jQuery('.fts-success').show();
|
188 |
+
<?php
|
189 |
+
} elseif ( isset( $test_app_token_response->meta->error_message ) || isset( $test_app_token_response->error_message ) ) {
|
190 |
+
$text = isset( $test_app_token_response->meta->error_message ) ? $test_app_token_response->meta->error_message : $test_app_token_response->error_message;
|
191 |
+
$fts_instagram_message = sprintf(
|
192 |
+
esc_html( '%1$sOh No something\'s wrong. %2$s. Please try clicking the button again to get a new access token. If you need additional assistance please email us at support@slickremix.com %3$s.', 'feed-them-social' ),
|
193 |
+
'<div class="fts-failed-api-token">',
|
194 |
+
esc_html( $text ),
|
195 |
+
'</div>'
|
196 |
+
);
|
197 |
+
?>
|
198 |
+
if (jQuery('.fts-failed-api-token').length) {
|
199 |
+
jQuery('.fts-failed-api-token').hide();
|
200 |
+
jQuery('.fts-instagram-last-row').append('<?php echo $fts_instagram_message; ?>');
|
201 |
+
}
|
202 |
+
<?php
|
203 |
+
}
|
204 |
+
?>
|
205 |
+
}
|
206 |
+
}); // end of ajax()
|
207 |
+
return false;
|
208 |
+
}); // end of document.ready
|
209 |
+
</script>
|
210 |
+
<?php
|
211 |
+
}
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* FTS JetPack Photon Option Exception
|
217 |
+
*
|
218 |
+
* This function resolves issues with images and JetPack
|
219 |
+
*
|
220 |
+
* @param string $val value.
|
221 |
+
* @param string $src source.
|
222 |
+
* @param string $tag tag.
|
223 |
+
* @return bool
|
224 |
+
* @since @since 1.9.6
|
225 |
+
*/
|
226 |
+
public function fts_jetpack_photon_exception ($val, $src, $tag)
|
227 |
+
{
|
228 |
+
if ( strpos( $src, 'fbcdn.net' ) ) {
|
229 |
+
return true;
|
230 |
+
}
|
231 |
+
return $val;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* FTS Share Option
|
236 |
+
*
|
237 |
+
* @param string $fb_link link for social network.
|
238 |
+
* @param string $description description field for some of the social networks.
|
239 |
+
* @since
|
240 |
+
*/
|
241 |
+
public function fts_share_option ($fb_link, $description)
|
242 |
+
{
|
243 |
|
244 |
$hide_share = get_option( 'fts_disable_share_button', true ) ? get_option( 'fts_disable_share_button', true ) : '';
|
245 |
|
246 |
+
if ( isset( $hide_share ) && '1' !== $hide_share ) {
|
247 |
// Social media sharing URLs
|
248 |
+
$link = $fb_link;
|
249 |
+
$description = wp_strip_all_tags( $description );
|
250 |
$ft_gallery_share_linkedin = 'https://www.linkedin.com/shareArticle?mini=true&url=' . $link;
|
251 |
+
$ft_gallery_share_email = 'mailto:?subject=Shared Link&body=' . $link . ' - ' . $description;
|
252 |
$ft_gallery_share_facebook = 'https://www.facebook.com/sharer/sharer.php?u=' . $link;
|
253 |
+
$ft_gallery_share_twitter = 'https://twitter.com/intent/tweet?text=' . $link . '+' . $description;
|
254 |
+
$ft_gallery_share_google = 'https://plus.google.com/share?url=' . $link;
|
255 |
|
256 |
// The share wrap and links
|
257 |
+
$output = '<div class="fts-share-wrap">';
|
258 |
+
$output .= '<a href="javascript:;" class="ft-gallery-link-popup">' . esc_html( '', 'feed-them-social' ) . '</a>';
|
259 |
+
$output .= '<div class="ft-gallery-share-wrap">';
|
260 |
+
$output .= '<a href="' . esc_attr( $ft_gallery_share_facebook ) . '" target="_blank" class="ft-galleryfacebook-icon"><i class="fa fa-facebook-square"></i></a>';
|
261 |
+
$output .= '<a href="' . esc_attr( $ft_gallery_share_twitter ) . '" target="_blank" class="ft-gallerytwitter-icon"><i class="fa fa-twitter"></i></a>';
|
262 |
+
$output .= '<a href="' . esc_attr( $ft_gallery_share_google ) . '" target="_blank" class="ft-gallerygoogle-icon"><i class="fa fa-google-plus"></i></a>';
|
263 |
+
$output .= '<a href="' . esc_attr( $ft_gallery_share_linkedin ) . '" target="_blank" class="ft-gallerylinkedin-icon"><i class="fa fa-linkedin"></i></a>';
|
264 |
+
$output .= '<a href="' . esc_attr( $ft_gallery_share_email ) . '" target="_blank" class="ft-galleryemail-icon"><i class="fa fa-envelope"></i></a>';
|
265 |
+
$output .= '</div>';
|
266 |
+
$output .= '</div>';
|
267 |
return $output;
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* FTS FB Options Page Function
|
273 |
+
*
|
274 |
+
* Display FB Page tokens for users
|
275 |
+
*
|
276 |
+
* @return mixed
|
277 |
+
* @since 2.1.4
|
278 |
+
*/
|
279 |
+
public function fts_fb_page_token_func ()
|
280 |
+
{
|
281 |
+
$fts_fb_page_token_users_nonce = wp_create_nonce( 'fts-fb-page-token-users-nonce' );
|
282 |
+
|
283 |
+
if ( wp_verify_nonce( $fts_fb_page_token_users_nonce, 'fts-fb-page-token-users-nonce' ) ) {
|
284 |
+
|
285 |
+
// Make sure it's not ajaxing!
|
286 |
+
if ( !isset( $_GET['load_more_ajaxing'] ) ) {
|
287 |
+
$_REQUEST['fts_dynamic_name'] = sanitize_key( $this->feed_them_social_rand_string() );
|
288 |
+
} //End make sure it's not ajaxing!
|
289 |
+
|
290 |
+
ob_start();
|
291 |
+
|
292 |
+
if ( !isset( $_GET['locations'] ) ) {
|
293 |
+
$fb_token_response = isset( $_REQUEST['next_url'] ) ? wp_remote_fopen( esc_url_raw( $_REQUEST['next_url'] ) ) : wp_remote_fopen( 'https://graph.facebook.com/me/accounts?fields=locations{name,id,page_username,locations,store_number,store_location_descriptor,access_token},name,id,link,access_token&access_token=' . $_GET['access_token'] . '&limit=25' );
|
294 |
+
$test_fb_app_token_response = json_decode( $fb_token_response );
|
295 |
+
$_REQUEST['next_url'] = isset( $test_fb_app_token_response->paging->next ) ? esc_url_raw( $test_fb_app_token_response->paging->next ) : '';
|
296 |
+
} else {
|
297 |
+
$fb_token_response = isset( $_REQUEST['next_location_url'] ) ? wp_remote_fopen( esc_url_raw( $_REQUEST['next_location_url'] ) ) : '';
|
298 |
+
$test_fb_app_token_response = json_decode( $fb_token_response );
|
299 |
+
}
|
300 |
+
|
301 |
+
// echo '<pre>';
|
302 |
+
// echo _r($test_fb_app_token_response);
|
303 |
+
// echo '</pre>';
|
304 |
+
// Make sure it's not ajaxing!
|
305 |
+
if ( !isset( $_GET['load_more_ajaxing'] ) ) {
|
306 |
+
// ******************
|
307 |
+
// Load More BUTTON Start
|
308 |
+
// ******************
|
309 |
+
?>
|
310 |
+
<div class="fts-clear"></div>
|
311 |
+
<?php
|
312 |
+
} //End make sure it's not ajaxing!
|
313 |
+
|
314 |
+
$build_shortcode = 'fts_fb_page_token';
|
315 |
+
|
316 |
+
// Make sure it's not ajaxing!
|
317 |
+
if (!isset( $_GET['load_more_ajaxing'] )) {
|
318 |
+
|
319 |
+
$reviews_token = isset( $_GET['reviews_token'] ) ? 'yes' : 'no';
|
320 |
+
?>
|
321 |
+
<div id="fb-list-wrap">
|
322 |
+
<div class="fts-pages-info"> <?php echo esc_html( 'Click on a page in the list below and it will add the Page ID and Access Token above, then click save.', 'feed-them-social' ); ?></div>
|
323 |
+
<ul class="fb-page-list fb-page-master-list">
|
324 |
+
<?php
|
325 |
+
} //End make sure it's not ajaxing!
|
326 |
+
|
327 |
+
foreach ( $test_fb_app_token_response->data as $data ) {
|
328 |
+
?>
|
329 |
+
<li class="fts-fb-main-page-li">
|
330 |
+
<div class="fb-click-wrapper">
|
331 |
+
<div class="fb-image">
|
332 |
+
<img border="0" height="50" width="50"
|
333 |
+
src="<?php echo esc_url( 'https://graph.facebook.com/' . $data->id . '/picture' ); ?>"/>
|
334 |
+
</div>
|
335 |
+
<div class="fb-name-wrap"><span class="fb-name">
|
336 |
<?php
|
337 |
+
echo esc_html( $data->name );
|
338 |
+
if ( isset( $data->store_number, $data->store_location_descriptor ) ) {
|
339 |
+
print '(' . $data->store_location_descriptor . ')';
|
340 |
+
}
|
341 |
+
?>
|
342 |
</span></div>
|
343 |
+
<div class="fb-other-wrap">
|
344 |
+
<small>
|
345 |
+
<?php echo esc_html( 'ID: ', 'feed-them-social' ); ?>
|
346 |
+
<span class="fts-api-facebook-id"><?php echo esc_html( $data->id ); ?></span>
|
347 |
+
<?php echo isset( $data->store_number ) ? esc_html( '| Location: ' . $data->store_number, 'feed-them-social' ) : ''; ?>
|
348 |
+
</small>
|
349 |
+
</div>
|
350 |
+
<div class="page-token"><?php echo esc_attr( $data->access_token ); ?></div>
|
351 |
+
<?php
|
352 |
+
$facebook_input_token = get_option( 'fts_facebook_custom_api_token' );
|
353 |
+
$facebook_access_token = $data->access_token;
|
354 |
+
if ( $facebook_input_token === $facebook_access_token ) {
|
355 |
+
?>
|
356 |
+
<div class="feed-them-social-admin-submit-btn " style="display: block !important;">
|
357 |
+
Active
|
358 |
+
</div>
|
359 |
+
<?php } else { ?>
|
360 |
+
<div class="feed-them-social-admin-submit-btn fts-token-save">Save</div>
|
361 |
+
<?php } ?>
|
362 |
+
<div class="fts-clear"></div>
|
363 |
+
</div>
|
364 |
+
<?php
|
365 |
+
$_REQUEST['next_location_url'] = isset( $data->locations->paging->next ) ? esc_url_raw( $data->locations->paging->next ) : '';
|
366 |
+
$remove_class_or_not = isset( $data->locations->paging->next ) ? 'fb-sublist-page-id-' . esc_attr( $data->id ) : '';
|
367 |
+
if ( isset( $data->locations->data ) ) {
|
368 |
+
$location_count = count( $data->locations->data );
|
369 |
+
$location_plus_sign = isset( $data->locations->paging->next ) ? '+' : '';
|
370 |
+
$location_text = 1 === $location_count ? esc_html( $location_count . ' ' . esc_html( 'Location for', 'feed-them-social' ) ) : esc_html( $location_count . $location_plus_sign . ' ' . esc_html( 'Locations for', 'feed-them-social' ) );
|
371 |
+
// if the locations equal 3 or less we will set the location container height to auto so the scroll loadmore does not fire.
|
372 |
+
$location_scroll_loadmore_needed_check = $location_count <= 3 ? 'height:auto !important' : 'height: 200px !important;';
|
373 |
+
}
|
374 |
+
|
375 |
+
if ( !isset( $_GET['locations'] ) && isset( $data->locations->data ) ) {
|
376 |
+
?>
|
377 |
+
<div class="fts-fb-location-text-wrap"><?php echo esc_html( $location_text . ' ' . $data->name ); ?></div>
|
378 |
+
<ul class="fb-page-list fb-sublist <?php echo esc_attr( $remove_class_or_not ); ?>"
|
379 |
+
style="<?php echo esc_attr( $location_scroll_loadmore_needed_check ); ?>">
|
380 |
+
<?php foreach ( $data->locations->data as $location ) { ?>
|
381 |
+
<li>
|
382 |
+
<div class="fb-click-wrapper">
|
383 |
+
<div class="fb-image">
|
384 |
+
<img border="0" height="50" width="50"
|
385 |
+
src="<?php echo esc_url( 'https://graph.facebook.com/' . $location->id . '/picture' ); ?>"/>
|
386 |
+
</div>
|
387 |
+
<div class="fb-name-wrap"><span
|
388 |
+
class="fb-name"><?php echo esc_html( $location->name ); ?>
|
389 |
+
<?php
|
390 |
+
if ( isset( $location->store_location_descriptor ) ) {
|
391 |
+
echo '(' . esc_html( $location->store_location_descriptor ) . ')';
|
392 |
+
}
|
393 |
+
?>
|
394 |
</span></div>
|
395 |
+
<div class="fb-other-wrap">
|
396 |
+
<small>
|
397 |
+
<?php echo esc_html( 'ID: ', 'feed-them-social' ); ?>
|
398 |
+
<span class="fts-api-facebook-id"><?php echo esc_html( $location->id ); ?></span>
|
399 |
+
<?php
|
400 |
+
if ( isset( $location->store_number ) ) {
|
401 |
+
print '| ';
|
402 |
+
esc_html( 'Location:', 'feed-them-social' );
|
403 |
+
print ' ' . esc_html( $location->store_number );
|
404 |
+
}
|
405 |
+
?>
|
406 |
+
</small>
|
407 |
+
</div>
|
408 |
+
|
409 |
+
<div class="page-token"><?php echo esc_html( $location->access_token ); ?></div>
|
410 |
+
<?php
|
411 |
+
$facebook_input_token = get_option( 'fts_facebook_custom_api_token' );
|
412 |
+
$facebook_access_token = $location->access_token;
|
413 |
+
if ( $facebook_input_token === $facebook_access_token ) {
|
414 |
+
?>
|
415 |
+
<div class="feed-them-social-admin-submit-btn "
|
416 |
+
style="display: block !important;">Active
|
417 |
+
</div>
|
418 |
+
<?php } else { ?>
|
419 |
+
<div class="feed-them-social-admin-submit-btn fts-token-save">Save
|
420 |
+
</div>
|
421 |
+
<?php } ?>
|
422 |
+
<div class="fts-clear"></div>
|
423 |
+
</div>
|
424 |
+
</li>
|
425 |
+
<?php } ?>
|
426 |
+
</ul>
|
427 |
+
|
428 |
+
<?php
|
429 |
+
// Make sure it's not ajaxing locations!
|
430 |
+
if ( !isset( $_GET['locations'] ) && isset( $data->locations->paging->next ) ) {
|
431 |
+
echo '<div id="loadMore_' . esc_attr( $data->id ) . '_location" class="fts-fb-load-more" style="background:none !Important;">' . esc_html( 'Scroll to view more Locations', 'feed-them-instagram' ) . '</div>';
|
432 |
+
}//End Check
|
433 |
+
|
434 |
+
// Make sure it's not ajaxing locations!
|
435 |
+
if (!isset( $_GET['locations'] )) {
|
436 |
+
$time = time();
|
437 |
+
$nonce = wp_create_nonce( $time . 'load-more-nonce' );
|
438 |
+
$fb_page_id = $data->id;
|
439 |
+
?>
|
440 |
+
<script>
|
441 |
+
jQuery(document).ready(function () {
|
442 |
+
jQuery(".fb-sublist-page-id-<?php echo esc_js( $fb_page_id ); ?>").bind("scroll", function () {
|
443 |
+
if (jQuery(this).scrollTop() + jQuery(this).innerHeight() >= jQuery(this)[0].scrollHeight) {
|
444 |
+
if (!jQuery('.fts-no-more-locations-<?php echo esc_js( $fb_page_id ); ?>').length) {
|
445 |
+
jQuery("#loadMore_<?php echo esc_js( $fb_page_id ); ?>_location").addClass('fts-fb-spinner');
|
446 |
+
var button = jQuery('#loadMore_<?php echo esc_js( $fb_page_id ); ?>_location').html('<div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div>');
|
447 |
+
console.log(button);
|
448 |
+
var build_shortcode = "<?php echo esc_js( $build_shortcode ); ?>";
|
449 |
+
var yes_ajax = "yes";
|
450 |
+
var fts_d_name = "<?php echo esc_js( $fb_page_id ); ?>";
|
451 |
+
var fts_security = "<?php echo esc_js( $nonce ); ?>";
|
452 |
+
var fts_time = "<?php echo esc_js( $time ); ?>";
|
453 |
+
var fts_reviews_feed = "<?php echo esc_js( $reviews_token ); ?>";
|
454 |
+
jQuery.ajax({
|
455 |
+
data: {
|
456 |
+
action: "my_fts_fb_load_more",
|
457 |
+
next_location_url: nextURL_location_<?php echo esc_js( $fb_page_id ); ?>,
|
458 |
+
fts_dynamic_name: fts_d_name,
|
459 |
+
rebuilt_shortcode: build_shortcode,
|
460 |
+
load_more_ajaxing: yes_ajax,
|
461 |
+
fts_security: fts_security,
|
462 |
+
fts_time: fts_time,
|
463 |
+
feed_name: build_shortcode,
|
464 |
+
fts_reviews_feed: fts_reviews_feed,
|
465 |
+
locations: 'yes'
|
466 |
+
},
|
467 |
+
type: 'GET',
|
468 |
+
url: ajaxurl,
|
469 |
+
success: function (data) {
|
470 |
+
console.log('Well Done and got this from sever: ' + data);
|
471 |
+
jQuery('.fb-sublist-page-id-<?php echo esc_js( $fb_page_id ); ?>').append(data).filter('.fb-sublist-page-id-<?php echo esc_js( $fb_page_id ); ?>').html();
|
472 |
+
jQuery('.fb-sublist-page-id-<?php echo esc_js( $fb_page_id ); ?>').animate({scrollTop: '+=100px'}, 800); // scroll down a 100px after new items are added
|
473 |
+
|
474 |
+
|
475 |
+
|
476 |
+
<?php if ( isset( $data->locations->paging->next ) && $data->locations->paging->next === $_REQUEST['next_location_url'] ) { ?>
|
477 |
+
jQuery('#loadMore_<?php echo esc_js( $fb_page_id ); ?>_location').replaceWith('<div class="fts-fb-load-more no-more-posts-fts-fb fts-no-more-locations-<?php echo esc_js( $fb_page_id ); ?>" style="background:none !important"><?php echo esc_html( 'All Locations loaded', 'feed-them-social' ); ?></div>');
|
478 |
+
jQuery('#loadMore_<?php echo esc_js( $fb_page_id ); ?>_location').removeAttr('id');
|
479 |
+
<?php } ?>
|
480 |
+
jQuery("#loadMore_<?php echo esc_js( $fb_page_id ); ?>_location").removeClass('fts-fb-spinner');
|
481 |
+
}
|
482 |
+
}); // end of ajax()
|
483 |
+
return false;
|
484 |
+
|
485 |
+
} //stop ajax from submitting again if the fts-no-more-locations class is found
|
486 |
+
|
487 |
+
}
|
488 |
+
}); // end of form.submit
|
489 |
+
|
490 |
+
}); // end of document.ready
|
491 |
+
</script>
|
492 |
+
<?php
|
493 |
+
} //END Make sure it's not ajaxing locations
|
494 |
+
?>
|
495 |
+
<script>var nextURL_location_<?php echo esc_js( $fb_page_id ); ?>= "<?php echo isset( $data->locations->paging->next ) ? esc_url_raw( $data->locations->paging->next ) : ''; ?>";</script>
|
496 |
+
<?php } ?>
|
497 |
+
</li>
|
498 |
+
|
499 |
+
<?php
|
500 |
+
} // foreach loop of locations
|
501 |
+
|
502 |
+
// Make sure it's not ajaxing!
|
503 |
+
if (!isset( $_GET['load_more_ajaxing'] )) {
|
504 |
+
?>
|
505 |
+
</ul>
|
506 |
+
<div class="fts-clear"></div>
|
507 |
+
</div>
|
508 |
+
<?php
|
509 |
+
} //End make sure it's not ajaxing
|
510 |
+
|
511 |
+
// Make sure it's not ajaxing!
|
512 |
+
if ( !isset( $_GET['load_more_ajaxing'] ) && !isset( $_GET['locations'] ) ) {
|
513 |
+
$fts_dynamic_name = isset( $_REQUEST['fts_dynamic_name'] ) ? sanitize_key( $_REQUEST['fts_dynamic_name'] ) : '';
|
514 |
+
$time = time();
|
515 |
+
$nonce = wp_create_nonce( $time . 'load-more-nonce' );
|
516 |
+
?>
|
517 |
+
<script>
|
518 |
+
jQuery(document).ready(function () {
|
519 |
+
|
520 |
+
jQuery("#loadMore_<?php echo esc_js( $fts_dynamic_name ); ?>").click(function () {
|
521 |
+
|
522 |
+
jQuery("#loadMore_<?php echo esc_js( $fts_dynamic_name ); ?>").addClass('fts-fb-spinner');
|
523 |
+
var button = jQuery('#loadMore_<?php echo esc_js( $fts_dynamic_name ); ?>').html('<div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div>');
|
524 |
+
console.log(button);
|
525 |
+
var build_shortcode = "<?php echo esc_js( $build_shortcode ); ?>";
|
526 |
+
var yes_ajax = "yes";
|
527 |
+
var fts_d_name = "<?php echo esc_js( $fts_dynamic_name ); ?>";
|
528 |
+
var fts_security = "<?php echo esc_js( $nonce ); ?>";
|
529 |
+
var fts_time = "<?php echo esc_js( $time ); ?>";
|
530 |
+
var fts_reviews_feed = "<?php echo esc_js( $reviews_token ); ?>";
|
531 |
+
jQuery.ajax({
|
532 |
+
data: {
|
533 |
+
action: "my_fts_fb_load_more",
|
534 |
+
next_url: nextURL_<?php echo esc_js( $fts_dynamic_name ); ?>,
|
535 |
+
fts_dynamic_name: fts_d_name,
|
536 |
+
rebuilt_shortcode: build_shortcode,
|
537 |
+
load_more_ajaxing: yes_ajax,
|
538 |
+
fts_security: fts_security,
|
539 |
+
fts_time: fts_time,
|
540 |
+
feed_name: build_shortcode,
|
541 |
+
fts_reviews_feed: fts_reviews_feed
|
542 |
+
},
|
543 |
+
type: 'GET',
|
544 |
+
url: ajaxurl,
|
545 |
+
success: function (data) {
|
546 |
+
console.log('Well Done and got this from sever: ' + data);
|
547 |
+
jQuery('.fb-page-master-list').append(data).filter('.fb-page-list').html();
|
548 |
+
|
549 |
+
if (!nextURL_<?php echo esc_js( sanitize_text_field( wp_unslash( $_REQUEST['fts_dynamic_name'] ) ) ); ?> || 'no more' === nextURL_<?php echo esc_js( sanitize_text_field( wp_unslash( $_REQUEST['fts_dynamic_name'] ) ) ); ?>) {
|
550 |
+
jQuery('#loadMore_<?php echo esc_js( $fts_dynamic_name ); ?>').replaceWith('<div class="fts-fb-load-more no-more-posts-fts-fb"><?php echo esc_js( 'No More Pages', 'feed-them-social' ); ?></div>');
|
551 |
+
jQuery('#loadMore_<?php echo esc_js( $fts_dynamic_name ); ?>').removeAttr('id');
|
552 |
+
}
|
553 |
+
jQuery('#loadMore_<?php echo esc_js( $fts_dynamic_name ); ?>').html('<?php echo esc_js( 'Load More', 'feed-them-social' ); ?>');
|
554 |
+
// jQuery('#loadMore_< ?php echo $fts_dynamic_name ?>').removeClass('flip360-fts-load-more');
|
555 |
+
jQuery("#loadMore_<?php echo esc_js( $fts_dynamic_name ); ?>").removeClass('fts-fb-spinner');
|
556 |
+
|
557 |
+
|
558 |
+
}
|
559 |
+
}); // end of ajax()
|
560 |
+
return false;
|
561 |
+
}); // end of form.submit
|
562 |
+
}); // end of document.ready
|
563 |
+
</script>
|
564 |
+
<?php
|
565 |
+
|
566 |
+
} //END Make sure it's not ajaxing
|
567 |
+
?>
|
568 |
+
<script>
|
569 |
+
<?php if ( !isset( $_GET['locations'] ) ) { ?>
|
570 |
+
var nextURL_<?php echo esc_js( sanitize_text_field( wp_unslash( $_REQUEST['fts_dynamic_name'] ) ) ); ?>= "<?php echo esc_url_raw( $_REQUEST['next_url'] ); ?>";
|
571 |
+
// alert('nextURL_<?php echo esc_js( sanitize_text_field( wp_unslash( $_REQUEST['fts_dynamic_name'] ) ) ); ?>');
|
572 |
+
<?php } ?>
|
573 |
+
|
574 |
+
|
575 |
+
if (document.querySelector('#fts-fb-token-wrap .fts-pages-info') !== null) {
|
576 |
+
jQuery(".fts-successful-api-token.default-token").hide();
|
577 |
+
}
|
578 |
+
<?php if ( 'yes' === $reviews_token || isset( $_GET['fts_reviews_feed'] ) && 'yes' === $_GET['fts_reviews_feed'] ) { ?>
|
579 |
+
if (document.querySelector('.default-token') !== null) {
|
580 |
+
jQuery(".default-token").show();
|
581 |
+
}
|
582 |
+
|
583 |
+
<?php } ?>
|
584 |
+
|
585 |
+
jQuery(document).ready(function ($) {
|
586 |
+
$(".feed-them-social-admin-submit-btn").click(function () {
|
587 |
+
// alert('test');
|
588 |
+
var newUrl = "<?php echo esc_url( admin_url( 'admin.php?page=fts-facebook-feed-styles-submenu-page/' ) ); ?>";
|
589 |
+
history.replaceState({}, null, newUrl);
|
590 |
+
$("#fts-facebook-feed-options-form").submit();
|
591 |
+
});
|
592 |
+
|
593 |
+
var fb = ".fb-page-list .fb-click-wrapper";
|
594 |
+
$('#fb-list-wrap').show();
|
595 |
+
//alert("reviews_token");
|
596 |
+
|
597 |
+
$(fb).click(function () {
|
598 |
+
var fb_page_id = $(this).find('.fts-api-facebook-id').html();
|
599 |
+
var token = $(this).find('.page-token').html();
|
600 |
+
// alert(token);
|
601 |
+
var name = $(this).find('.fb-name').html();
|
602 |
+
<?php if ( 'no' === $reviews_token || isset( $_GET['fts_reviews_feed'] ) && 'no' === $_GET['fts_reviews_feed'] ) { ?>
|
603 |
+
$("#fts_facebook_custom_api_token").val(token);
|
604 |
+
$("#fts_facebook_custom_api_token_user_id").val(fb_page_id);
|
605 |
+
$("#fts_facebook_custom_api_token_user_name").val(name);
|
606 |
+
<?php } else { ?>
|
607 |
+
$("#fts_facebook_custom_api_token_biz").val(token);
|
608 |
+
$("#fts_facebook_custom_api_token_user_id_biz").val(fb_page_id);
|
609 |
+
$("#fts_facebook_custom_api_token_user_name_biz").val(name);
|
610 |
+
<?php } ?>
|
611 |
+
$('.fb-page-list .feed-them-social-admin-submit-btn').hide();
|
612 |
+
$(this).find('.feed-them-social-admin-submit-btn').toggle();
|
613 |
+
// alert(name + token)
|
614 |
+
})
|
615 |
+
});
|
616 |
+
</script>
|
617 |
+
<?php
|
618 |
+
// Make sure it's not ajaxing!
|
619 |
+
if ( !isset( $_GET['load_more_ajaxing'] ) && isset( $test_fb_app_token_response->paging->next ) && !isset( $_GET['locations'] ) ) {
|
620 |
+
$fts_dynamic_name = sanitize_key( $_REQUEST['fts_dynamic_name'] );
|
621 |
+
echo '<div class="fts-clear"></div>';
|
622 |
+
|
623 |
+
echo '<div id="loadMore_' . esc_attr( $fts_dynamic_name ) . '" class="fts-fb-load-more">' . esc_html( 'Load More', 'feed-them-social' ) . '</div>';
|
624 |
+
}//End make sure it's not ajaxing
|
625 |
+
|
626 |
+
// Lastly if we can't find a next url we unset the next url from the page to not let the loadmore button be active.
|
627 |
+
if ( isset( $_GET['locations'] ) ) {
|
628 |
+
unset( $_REQUEST['next_location_url'] );
|
629 |
+
} else {
|
630 |
+
unset( $_REQUEST['next_url'] );
|
631 |
+
}
|
632 |
+
return ob_get_clean();
|
633 |
+
}
|
634 |
+
exit;
|
635 |
+
}
|
636 |
+
|
637 |
+
|
638 |
+
/**
|
639 |
+
* My FTS Plugin License
|
640 |
+
*
|
641 |
+
* Put in place to only show the Activate Plugin license if the input has a value
|
642 |
+
*
|
643 |
+
* @since 2.1.4
|
644 |
+
*/
|
645 |
+
public function fts_plugin_license ()
|
646 |
+
{
|
647 |
+
wp_enqueue_script( 'jquery' );
|
648 |
+
?>
|
649 |
+
<style>.fts-license-master-form th {
|
650 |
+
background: #f9f9f9;
|
651 |
+
padding: 14px;
|
652 |
+
border-bottom: 1px solid #ccc;
|
653 |
+
margin: -14px -14px 20px;
|
654 |
+
width: 100%;
|
655 |
+
display: block
|
656 |
+
}
|
657 |
+
|
658 |
+
.fts-license-master-form .form-table tr {
|
659 |
+
float: left;
|
660 |
+
margin: 0 15px 15px 0;
|
661 |
+
background: #fff;
|
662 |
+
border: 1px solid #ccc;
|
663 |
+
width: 30.5%;
|
664 |
+
max-width: 350px;
|
665 |
+
padding: 14px;
|
666 |
+
min-height: 220px;
|
667 |
+
position: relative;
|
668 |
+
box-sizing: border-box
|
669 |
+
}
|
670 |
+
|
671 |
+
.fts-license-master-form .form-table td {
|
672 |
+
padding: 0;
|
673 |
+
display: block
|
674 |
+
}
|
675 |
+
|
676 |
+
.fts-license-master-form td input.regular-text {
|
677 |
+
margin: 0 0 8px;
|
678 |
+
width: 100%
|
679 |
+
}
|
680 |
+
|
681 |
+
.fts-license-master-form .edd-license-data[class*=edd-license-] {
|
682 |
+
position: absolute;
|
683 |
+
background: #fafafa;
|
684 |
+
padding: 14px;
|
685 |
+
border-top: 1px solid #eee;
|
686 |
+
margin: 20px -14px -14px;
|
687 |
+
min-height: 67px;
|
688 |
+
width: 100%;
|
689 |
+
bottom: 14px;
|
690 |
+
box-sizing: border-box
|
691 |
+
}
|
692 |
+
|
693 |
+
.fts-license-master-form .edd-license-data p {
|
694 |
+
font-size: 13px;
|
695 |
+
margin-top: 0
|
696 |
+
}
|
697 |
+
|
698 |
+
.fts-license-master-form tr {
|
699 |
+
display: none
|
700 |
+
}
|
701 |
+
|
702 |
+
.fts-license-master-form tr.fts-license-wrap {
|
703 |
+
display: block
|
704 |
+
}
|
705 |
+
|
706 |
+
.fts-license-master-form .edd-license-msg-error {
|
707 |
+
background: rgba(255, 0, 0, 0.49)
|
708 |
+
}
|
709 |
+
|
710 |
+
.fts-license-master-form tr.fts-license-wrap {
|
711 |
+
display: block
|
712 |
+
}
|
713 |
+
|
714 |
+
.fts-license-master-form .edd-license-msg-error {
|
715 |
+
background: #e24e4e !important;
|
716 |
+
color: #FFF
|
717 |
+
}
|
718 |
+
|
719 |
+
.fts-license-wrap .edd-license-data p {
|
720 |
+
color: #1e981e
|
721 |
+
}
|
722 |
+
|
723 |
+
.edd-license-msg-error p {
|
724 |
+
color: #FFF !important
|
725 |
+
}
|
726 |
+
|
727 |
+
.feed-them_page_fts-license-page .button-secondary {
|
728 |
+
display: none;
|
729 |
+
}</style>
|
730 |
+
<script type="text/javascript">
|
731 |
+
jQuery(document).ready(function () {
|
732 |
+
if (jQuery('#feed_them_social_premium_license_key').val() !== '') {
|
733 |
+
jQuery('#feed_them_social_premium_license_key').next('label').find('.button-secondary').show()
|
734 |
+
}
|
735 |
+
if (jQuery('#feed_them_social_combined_streams_license_key').val() !== '') {
|
736 |
+
jQuery('#feed_them_social_combined_streams_license_key').next('label').find('.button-secondary').show()
|
737 |
+
}
|
738 |
+
if (jQuery('#feed-them-social-facebook-reviews_license_key').val() !== '') {
|
739 |
+
jQuery('#feed-them-social-facebook-reviews_license_key').next('label').find('.button-secondary').show()
|
740 |
+
}
|
741 |
+
if (jQuery('#fts_bar_license_key').val() !== '') {
|
742 |
+
jQuery('#fts_bar_license_key').next('label').find('.button-secondary').show()
|
743 |
+
}
|
744 |
+
if (jQuery('#feed_them_carousel_premium_license_key').val() !== '') {
|
745 |
+
jQuery('#feed_them_carousel_premium_license_key').next('label').find('.button-secondary').show()
|
746 |
+
}
|
747 |
+
});
|
748 |
+
</script>
|
749 |
+
<?php
|
750 |
+
}
|
751 |
+
|
752 |
+
/**
|
753 |
+
* My FTS Ajaxurl
|
754 |
+
*
|
755 |
+
* Ajax var on front end for twitter videos and loadmore button (if premium active.
|
756 |
+
*
|
757 |
+
* @since 1.9.6
|
758 |
+
*/
|
759 |
+
public function my_fts_ajaxurl ()
|
760 |
+
{
|
761 |
+
wp_enqueue_script( 'jquery' );
|
762 |
+
}
|
763 |
+
|
764 |
+
/**
|
765 |
+
* My FTS FB Load More
|
766 |
+
*
|
767 |
+
* This function is being called from the fb feed... it calls the ajax in this case.
|
768 |
+
*
|
769 |
+
* @since 1.9.6
|
770 |
+
* @updated 2.1.4 (fts_fb_page_token)
|
771 |
+
*/
|
772 |
+
public function my_fts_fb_load_more ()
|
773 |
+
{
|
774 |
+
if ( isset( $_REQUEST['fts_security'], $_REQUEST['fts_time'] ) && !wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['fts_security'] ) ), sanitize_text_field( wp_unslash( $_REQUEST['fts_time'] ) ) . 'load-more-nonce' ) ) {
|
775 |
+
exit( 'Sorry, You can\'t do that!' );
|
776 |
+
} else {
|
777 |
+
|
778 |
+
if ( isset( $_REQUEST['feed_name'] ) && 'fts_fb_page_token' === $_REQUEST['feed_name'] ) {
|
779 |
+
if ( isset( $_REQUEST['next_url'] ) && false === strpos( sanitize_text_field( wp_unslash( $_REQUEST['next_url'] ) ), 'https://graph.facebook.com/v3.1' ) ||
|
780 |
+
isset( $_REQUEST['next_location_url'] ) && false === strpos( sanitize_text_field( wp_unslash( $_REQUEST['next_location_url'] ) ), 'https://graph.facebook.com/v3.1' ) ||
|
781 |
+
isset( $_REQUEST['next_url'] ) && sanitize_text_field( wp_unslash( $_REQUEST['next_url'] ) ) !== sanitize_text_field( wp_unslash( $_REQUEST['next_url'] ) ) ||
|
782 |
+
isset( $_REQUEST['next_location_url'] ) && sanitize_text_field( wp_unslash( $_REQUEST['next_location_url'] ) ) !== sanitize_text_field( wp_unslash( $_REQUEST['next_location_url'] ) ) ) {
|
783 |
+
|
784 |
+
exit( 'That is not an FTS shortcode!' );
|
785 |
+
}
|
786 |
+
}
|
787 |
+
|
788 |
+
if ( isset( $_REQUEST['feed_name'] ) && 'fts_fb_page_token' === $_REQUEST['feed_name'] ||
|
789 |
+
isset( $_REQUEST['feed_name'] ) && 'fts_twitter' === $_REQUEST['feed_name'] ||
|
790 |
+
isset( $_REQUEST['feed_name'] ) && 'fts_youtube' === $_REQUEST['feed_name'] ||
|
791 |
+
isset( $_REQUEST['feed_name'] ) && 'fts_facebook' === $_REQUEST['feed_name'] ||
|
792 |
+
isset( $_REQUEST['feed_name'] ) && 'fts_facebookbiz' === $_REQUEST['feed_name'] ||
|
793 |
+
isset( $_REQUEST['feed_name'] ) && 'fts_instagram' === $_REQUEST['feed_name'] ) {
|
794 |
+
|
795 |
+
$feed_atts = isset( $_REQUEST['feed_attributes'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['feed_attributes'] ) ) : '';
|
796 |
+
|
797 |
+
$build_shortcode = '[' . sanitize_text_field( wp_unslash( $_REQUEST['feed_name'] ) ) . '';
|
798 |
+
foreach ( $feed_atts as $attribute => $value ) {
|
799 |
+
$build_shortcode .= ' ' . $attribute . '=' . $value;
|
800 |
+
}
|
801 |
+
|
802 |
+
if ( 'fts_twitter' === $_REQUEST['feed_name'] ) {
|
803 |
+
$loadmore_count = isset( $_REQUEST['loadmore_count'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['loadmore_count'] ) ) : '';
|
804 |
+
$build_shortcode .= ' ' . $loadmore_count . ']';
|
805 |
+
} elseif ( 'fts_youtube' === $_REQUEST['feed_name'] ) {
|
806 |
+
$loadmore_count = isset( $_REQUEST['loadmore_count'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['loadmore_count'] ) ) : '';
|
807 |
+
$build_shortcode .= ' ' . $loadmore_count . ']';
|
808 |
+
} else {
|
809 |
+
$build_shortcode .= ' ]';
|
810 |
+
}
|
811 |
+
|
812 |
+
echo do_shortcode( $build_shortcode );
|
813 |
+
|
814 |
+
} else {
|
815 |
+
exit( esc_html( 'That is not an FTS shortcode!' ) );
|
816 |
+
}
|
817 |
+
}
|
818 |
+
die();
|
819 |
+
}
|
820 |
+
|
821 |
+
/**
|
822 |
+
* FTS Clear Cache Script
|
823 |
+
*
|
824 |
+
* This is for the fts_clear_cache_ajax submission.
|
825 |
+
*
|
826 |
+
* @since 1.9.6
|
827 |
+
*/
|
828 |
+
public function fts_clear_cache_script ()
|
829 |
+
{
|
830 |
+
|
831 |
+
$fts_admin_activation_clear_cache = get_option( 'Feed_Them_Social_Activated_Plugin' );
|
832 |
+
$fts_dev_mode_cache = get_option( 'fts_clear_cache_developer_mode' );
|
833 |
+
if ( '1' === $fts_dev_mode_cache || 'feed-them-social' === $fts_admin_activation_clear_cache ) {
|
834 |
+
wp_enqueue_script( 'fts_clear_cache_script', plugins_url( 'feed-them-social/admin/js/developer-admin.js' ), array('jquery'), FTS_CURRENT_VERSION, false );
|
835 |
+
wp_localize_script( 'fts_clear_cache_script', 'ftsAjax', array('ajaxurl' => admin_url( 'admin-ajax.php' )) );
|
836 |
+
wp_enqueue_script( 'jquery' );
|
837 |
+
wp_enqueue_script( 'fts_clear_cache_script' );
|
838 |
+
}
|
839 |
+
if ( 'hide-admin-bar-menu' !== $fts_dev_mode_cache && '1' !== $fts_dev_mode_cache ) {
|
840 |
+
wp_enqueue_script( 'jquery' );
|
841 |
+
wp_enqueue_script( 'fts_clear_cache_script', plugins_url( 'feed-them-social/admin/js/admin.js' ), array(), FTS_CURRENT_VERSION, false );
|
842 |
+
wp_enqueue_script( 'fts_clear_cache_script', plugins_url( 'feed-them-social/admin/js/developer-admin.js' ), array('jquery'), FTS_CURRENT_VERSION, false );
|
843 |
+
wp_localize_script( 'fts_clear_cache_script', 'ftsAjax', array('ajaxurl' => admin_url( 'admin-ajax.php' )) );
|
844 |
+
wp_enqueue_script( 'fts_clear_cache_script' );
|
845 |
+
}
|
846 |
+
|
847 |
+
// we delete this option if found so we only empty the cache once when the plugin is ever activated or updated!
|
848 |
+
delete_option( 'Feed_Them_Social_Activated_Plugin' );
|
849 |
+
}
|
850 |
+
|
851 |
+
/**
|
852 |
+
* Feed Them Main Menu
|
853 |
+
*
|
854 |
+
* Admin Submenu buttons // Add the word Settings in place of the default menu page name 'Feed Them'.
|
855 |
+
*
|
856 |
+
* @since 1.9.6
|
857 |
+
*/
|
858 |
+
public function feed_them_main_menu ()
|
859 |
+
{
|
860 |
+
// Main Settings Page!
|
861 |
+
$main_settings_page = new FTS_Settings_Page();
|
862 |
+
add_menu_page( 'Feed Them Social', 'Feed Them', 'manage_options', 'feed-them-settings-page', array($main_settings_page, 'feed_them_settings_page'), '' );
|
863 |
+
add_submenu_page( 'feed-them-settings-page', esc_html( 'Settings', 'feed-them-social' ), esc_html( 'Settings', 'feed-them-social' ), 'manage_options', 'feed-them-settings-page' );
|
864 |
+
}
|
865 |
+
|
866 |
+
/**
|
867 |
+
* Feed Them Submenu Pages
|
868 |
+
*
|
869 |
+
* @since 1.9.6
|
870 |
+
*/
|
871 |
+
public function feed_them_submenu_pages ()
|
872 |
+
{
|
873 |
+
|
874 |
+
// Facebook Options Page!
|
875 |
+
$facebook_options_page = new FTS_Facebook_Options_Page();
|
876 |
+
add_submenu_page(
|
877 |
+
'feed-them-settings-page',
|
878 |
+
esc_html( 'Facebook Options', 'feed-them-social' ),
|
879 |
+
esc_html( 'Facebook Options', 'feed-them-social' ),
|
880 |
+
'manage_options',
|
881 |
+
'fts-facebook-feed-styles-submenu-page',
|
882 |
+
array($facebook_options_page, 'feed_them_facebook_options_page')
|
883 |
+
);
|
884 |
+
// Instagram Options Page!
|
885 |
+
$instagram_options_page = new FTS_Instagram_Options_Page();
|
886 |
+
add_submenu_page(
|
887 |
+
'feed-them-settings-page',
|
888 |
+
esc_html( 'Instagram Options', 'feed-them-social' ),
|
889 |
+
esc_html( 'Instagram Options', 'feed-them-social' ),
|
890 |
+
'manage_options',
|
891 |
+
'fts-instagram-feed-styles-submenu-page',
|
892 |
+
array($instagram_options_page, 'feed_them_instagram_options_page')
|
893 |
+
);
|
894 |
+
// Twitter Options Page!
|
895 |
+
$twitter_options_page = new FTS_Twitter_Options_Page();
|
896 |
+
add_submenu_page(
|
897 |
+
'feed-them-settings-page',
|
898 |
+
esc_html( 'Twitter Options', 'feed-them-social' ),
|
899 |
+
esc_html( 'Twitter Options', 'feed-them-social' ),
|
900 |
+
'manage_options',
|
901 |
+
'fts-twitter-feed-styles-submenu-page',
|
902 |
+
array($twitter_options_page, 'feed_them_twitter_options_page')
|
903 |
+
);
|
904 |
+
// Pinterest Options Page!
|
905 |
+
$pinterest_options_page = new FTS_Pinterest_Options_Page();
|
906 |
+
add_submenu_page(
|
907 |
+
'feed-them-settings-page',
|
908 |
+
esc_html( 'Pinterest Options', 'feed-them-social' ),
|
909 |
+
esc_html( 'Pinterest Options', 'feed-them-social' ),
|
910 |
+
'manage_options',
|
911 |
+
'fts-pinterest-feed-styles-submenu-page',
|
912 |
+
array($pinterest_options_page, 'feed_them_pinterest_options_page')
|
913 |
+
);
|
914 |
+
// Youtube Options Page!
|
915 |
+
$youtube_options_page = new FTS_Youtube_Options_Page();
|
916 |
+
add_submenu_page(
|
917 |
+
'feed-them-settings-page',
|
918 |
+
esc_html( 'YouTube Options', 'feed-them-social' ),
|
919 |
+
esc_html( 'YouTube Options', 'feed-them-social' ),
|
920 |
+
'manage_options',
|
921 |
+
'fts-youtube-feed-styles-submenu-page',
|
922 |
+
array($youtube_options_page, 'feed_them_youtube_options_page')
|
923 |
+
);
|
924 |
+
// System Info!
|
925 |
+
$system_info_page = new FTS_System_Info_Page();
|
926 |
+
add_submenu_page(
|
927 |
+
'feed-them-settings-page',
|
928 |
+
esc_html( 'System Info', 'feed-them-social' ),
|
929 |
+
esc_html( 'System Info', 'feed-them-social' ),
|
930 |
+
'manage_options',
|
931 |
+
'fts-system-info-submenu-page',
|
932 |
+
array($system_info_page, 'feed_them_system_info_page')
|
933 |
+
);
|
934 |
+
}
|
935 |
+
|
936 |
+
/**
|
937 |
+
* Feed Them Admin CSS
|
938 |
+
*
|
939 |
+
* Admin CSS.
|
940 |
+
*
|
941 |
+
* @since 1.9.6
|
942 |
+
*/
|
943 |
+
public function feed_them_admin_css ()
|
944 |
+
{
|
945 |
+
wp_register_style( 'feed_them_admin', plugins_url( 'admin/css/admin.css', dirname( __FILE__ ) ), array(), FTS_CURRENT_VERSION );
|
946 |
+
wp_enqueue_style( 'feed_them_admin' );
|
947 |
+
}
|
948 |
+
|
949 |
+
/**
|
950 |
+
* Feed Them System Info CSS
|
951 |
+
*
|
952 |
+
* Admin System Info CSS.
|
953 |
+
*
|
954 |
+
* @since 1.9.6
|
955 |
+
*/
|
956 |
+
public function feed_them_system_info_css ()
|
957 |
+
{
|
958 |
+
wp_register_style( 'fts-settings-admin-css', plugins_url( 'admin/css/admin-settings.css', dirname( __FILE__ ) ), array(), FTS_CURRENT_VERSION );
|
959 |
+
wp_enqueue_style( 'fts-settings-admin-css' );
|
960 |
+
}
|
961 |
+
|
962 |
+
/**
|
963 |
+
* Feed Them Settings
|
964 |
+
*
|
965 |
+
* Admin Settings Scripts and CSS.
|
966 |
+
*
|
967 |
+
* @since 1.9.6
|
968 |
+
*/
|
969 |
+
public function feed_them_settings ()
|
970 |
+
{
|
971 |
+
$fts_functions_load_settings_nonce = wp_create_nonce( 'fts-functions-load-settings-nonce' );
|
972 |
+
|
973 |
+
if ( wp_verify_nonce( $fts_functions_load_settings_nonce, 'fts-functions-load-settings-nonce' ) ) {
|
974 |
+
wp_register_style( 'feed_them_settings_css', plugins_url( 'admin/css/settings-page.css', dirname( __FILE__ ) ), array(), FTS_CURRENT_VERSION, false );
|
975 |
+
wp_enqueue_style( 'feed_them_settings_css' );
|
976 |
+
if ( isset( $_GET['page'] ) && 'fts-youtube-feed-styles-submenu-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-instagram-feed-styles-submenu-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-facebook-feed-styles-submenu-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-twitter-feed-styles-submenu-page' === $_GET['page'] || isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] || isset( $_GET['page'] ) && 'fts-pinterest-feed-styles-submenu-page' === $_GET['page'] ) {
|
977 |
+
wp_enqueue_script( 'feed_them_style_options_color_js', plugins_url( 'admin/js/jscolor/jscolor.js', dirname( __FILE__ ) ), array(), FTS_CURRENT_VERSION, false );
|
978 |
+
}
|
979 |
+
}
|
980 |
+
}
|
981 |
+
|
982 |
+
/**
|
983 |
+
* Need FTS Premium Fields
|
984 |
+
*
|
985 |
+
* Admin Premium Settings Fields.
|
986 |
+
*
|
987 |
+
* @param array $fields settings fields to display premium notice for.
|
988 |
+
* @since 1.9.6
|
989 |
+
*/
|
990 |
+
public function need_fts_premium_fields ($fields)
|
991 |
+
{
|
992 |
+
foreach ( $fields as $key => $label ) {
|
993 |
+
$output = '<div class="feed-them-social-admin-input-wrap">';
|
994 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( $label ) . '</div>';
|
995 |
+
$output .= '<div class="feed-them-social-admin-input-default">';
|
996 |
+
$output .= sprintf(
|
997 |
+
esc_html( 'Must have %1$sPremium Extension%3$s to edit.', 'feed-them-social' ),
|
998 |
+
'<a href="' . esc_url( 'https://www.slickremix.com/downloads/feed-them-social-premium-extension/' ) . '" target="_blank">',
|
999 |
+
'</a>'
|
1000 |
+
);
|
1001 |
+
$output .= '</div>';
|
1002 |
+
$output .= '<div class="fts-clear"></div>';
|
1003 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
1004 |
+
}//END Foreach
|
1005 |
+
|
1006 |
+
return $output;
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
|
1010 |
+
/**
|
1011 |
+
* Register Settings
|
1012 |
+
*
|
1013 |
+
* Generic Register Settings function.
|
1014 |
+
*
|
1015 |
+
* @param string $settings_name settings name.
|
1016 |
+
* @param array $settings settings parameters.
|
1017 |
+
* @since
|
1018 |
+
*/
|
1019 |
+
public function register_settings ($settings_name, $settings)
|
1020 |
+
{
|
1021 |
+
foreach ( $settings as $key => $setting ) {
|
1022 |
+
register_setting( $settings_name, $setting );
|
1023 |
+
}
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
/**
|
1027 |
+
* FTS Facebook Style Options Page
|
1028 |
+
*
|
1029 |
+
* Register Facebook Style Options.
|
1030 |
+
*
|
1031 |
+
* @since 1.9.6
|
1032 |
+
*/
|
1033 |
+
public function fts_facebook_style_options_page ()
|
1034 |
+
{
|
1035 |
+
$fb_style_options = array(
|
1036 |
+
'fb_like_btn_color',
|
1037 |
+
'fb_language',
|
1038 |
+
'fb_show_follow_btn',
|
1039 |
+
'fb_show_follow_like_box_cover',
|
1040 |
+
'fb_show_follow_btn_where',
|
1041 |
+
'fb_header_extra_text_color',
|
1042 |
+
'fb_text_color',
|
1043 |
+
'fb_link_color',
|
1044 |
+
'fb_link_color_hover',
|
1045 |
+
'fb_feed_width',
|
1046 |
+
'fb_feed_margin',
|
1047 |
+
'fb_feed_padding',
|
1048 |
+
'fb_feed_background_color',
|
1049 |
+
'fb_post_background_color',
|
1050 |
+
'fb_grid_border_bottom_color',
|
1051 |
+
'fb_grid_posts_background_color',
|
1052 |
+
'fb_border_bottom_color',
|
1053 |
+
'fts_facebook_custom_api_token',
|
1054 |
+
'fb_event_title_color',
|
1055 |
+
'fb_event_title_size',
|
1056 |
+
'fb_event_maplink_color',
|
1057 |
+
'fb_events_title_color',
|
1058 |
+
'fb_events_title_size',
|
1059 |
+
'fb_events_map_link_color',
|
1060 |
+
'fb_hide_shared_by_etc_text',
|
1061 |
+
'fts_facebook_custom_api_token_biz',
|
1062 |
+
'fb_reviews_text_color',
|
1063 |
+
'fb_reviews_backg_color',
|
1064 |
+
'fb_reviews_star_language',
|
1065 |
+
'fb_reviews_recommended_language',
|
1066 |
+
'fb_reviews_see_more_reviews_language',
|
1067 |
+
'fb_reviews_see_more_reviews_language',
|
1068 |
+
'fb_reviews_overall_rating_background_border_hide',
|
1069 |
+
'fb_reviews_overall_rating_background_color',
|
1070 |
+
'fb_reviews_overall_rating_border_color',
|
1071 |
+
'fb_reviews_overall_rating_text_color',
|
1072 |
+
'fb_reviews_overall_rating_background_padding',
|
1073 |
+
'fb_reviews_remove_see_reviews_link',
|
1074 |
+
'fb_reviews_overall_rating_of_5_stars_text',
|
1075 |
+
'fb_reviews_overall_rating_reviews_text',
|
1076 |
+
'fb_max_image_width',
|
1077 |
+
'fb_hide_images_in_posts',
|
1078 |
+
'fb_hide_error_handler_message',
|
1079 |
+
'fb_count_offset',
|
1080 |
+
'fb_hide_no_posts_message',
|
1081 |
+
'fts_facebook_custom_api_token_user_id',
|
1082 |
+
'fts_facebook_custom_api_token_user_name',
|
1083 |
+
'fts_facebook_custom_api_token_user_id_biz',
|
1084 |
+
'fts_facebook_custom_api_token_user_name_biz',
|
1085 |
+
'fb_loadmore_background_color',
|
1086 |
+
'fb_loadmore_text_color',
|
1087 |
+
'fb_load_more_text',
|
1088 |
+
'fb_no_more_posts_text',
|
1089 |
+
'fb_no_more_photos_text',
|
1090 |
+
'fb_no_more_videos_text',
|
1091 |
+
'fb_no_more_reviews_text',
|
1092 |
+
'fb_text_size',
|
1093 |
'fb_view_on_fb_fts',
|
1094 |
+
);
|
1095 |
+
$this->register_settings( 'fts-facebook-feed-style-options', $fb_style_options );
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
/**
|
1099 |
+
* FTS Twitter Style Options Page
|
1100 |
+
*
|
1101 |
+
* Register Twitter Style Options.
|
1102 |
+
*
|
1103 |
+
* @since 1.9.6
|
1104 |
+
*/
|
1105 |
+
public function fts_twitter_style_options_page ()
|
1106 |
+
{
|
1107 |
+
$twitter_style_options = array(
|
1108 |
+
'twitter_show_follow_btn',
|
1109 |
+
'twitter_show_follow_count',
|
1110 |
+
'twitter_show_follow_btn_where',
|
1111 |
+
'twitter_allow_videos',
|
1112 |
+
'twitter_allow_shortlink_conversion',
|
1113 |
+
'twitter_full_width',
|
1114 |
+
'twitter_text_color',
|
1115 |
+
'twitter_link_color',
|
1116 |
+
'twitter_link_color_hover',
|
1117 |
+
'twitter_feed_width',
|
1118 |
+
'twitter_feed_margin',
|
1119 |
+
'twitter_feed_padding',
|
1120 |
+
'twitter_feed_background_color',
|
1121 |
+
'twitter_border_bottom_color',
|
1122 |
+
'twitter_grid_posts_background_color',
|
1123 |
+
'twitter_grid_border_bottom_color',
|
1124 |
+
'fts_twitter_custom_consumer_key',
|
1125 |
+
'fts_twitter_custom_consumer_secret',
|
1126 |
+
'fts_twitter_custom_access_token',
|
1127 |
+
'fts_twitter_custom_access_token_secret',
|
1128 |
+
'fts_twitter_hide_images_in_posts',
|
1129 |
+
'twitter_max_image_width',
|
1130 |
+
'twitter_loadmore_background_color',
|
1131 |
+
'twitter_loadmore_text_color',
|
1132 |
+
'twitter_load_more_text',
|
1133 |
+
'twitter_no_more_tweets_text',
|
1134 |
+
'twitter_text_size',
|
1135 |
+
'twitter_load_more_text',
|
1136 |
+
'fts_twitter_custom_tokens',
|
1137 |
+
);
|
1138 |
+
$this->register_settings( 'fts-twitter-feed-style-options', $twitter_style_options );
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
/**
|
1142 |
+
* FTS Instagram Style Options Page
|
1143 |
+
*
|
1144 |
+
* Register Instagram Options.
|
1145 |
+
*
|
1146 |
+
* @since 1.9.6
|
1147 |
+
*/
|
1148 |
+
public function fts_instagram_style_options_page ()
|
1149 |
+
{
|
1150 |
+
$instagram_style_options = array(
|
1151 |
+
'fts_instagram_custom_api_token',
|
1152 |
+
'fts_instagram_custom_id',
|
1153 |
+
'instagram_show_follow_btn',
|
1154 |
+
'instagram_show_follow_btn_where',
|
1155 |
+
'instagram_loadmore_background_color',
|
1156 |
+
'instagram_loadmore_text_color',
|
1157 |
+
'instagram_load_more_text',
|
1158 |
+
'instagram_no_more_photos_text',
|
1159 |
+
);
|
1160 |
+
$this->register_settings( 'fts-instagram-feed-style-options', $instagram_style_options );
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
/**
|
1164 |
+
* FTS Pinterest Style Options Page
|
1165 |
+
*
|
1166 |
+
* Register Pinterest Options.
|
1167 |
+
*
|
1168 |
+
* @since 1.9.6
|
1169 |
+
*/
|
1170 |
+
public function fts_pinterest_style_options_page ()
|
1171 |
+
{
|
1172 |
+
$pinterest_style_options = array(
|
1173 |
+
'fts_pinterest_custom_api_token',
|
1174 |
+
'pinterest_show_follow_btn',
|
1175 |
+
'pinterest_show_follow_btn_where',
|
1176 |
+
'pinterest_board_title_color',
|
1177 |
+
'pinterest_board_title_size',
|
1178 |
+
'pinterest_board_backg_hover_color',
|
1179 |
+
);
|
1180 |
+
$this->register_settings( 'fts-pinterest-feed-style-options', $pinterest_style_options );
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
/**
|
1184 |
+
* FTS Youtube Style Options Page
|
1185 |
+
*
|
1186 |
+
* Register YouTube Options.
|
1187 |
+
*
|
1188 |
+
* @since 1.9.6
|
1189 |
+
*/
|
1190 |
+
public function fts_youtube_style_options_page ()
|
1191 |
+
{
|
1192 |
+
$youtube_style_options = array(
|
1193 |
+
'youtube_show_follow_btn',
|
1194 |
+
'youtube_show_follow_btn_where',
|
1195 |
+
'youtube_custom_api_token',
|
1196 |
+
'youtube_loadmore_background_color',
|
1197 |
+
'youtube_loadmore_text_color',
|
1198 |
+
'youtube_load_more_text',
|
1199 |
+
'youtube_no_more_videos_text',
|
1200 |
+
'youtube_custom_refresh_token',
|
1201 |
+
'youtube_custom_access_token',
|
1202 |
+
'youtube_custom_token_exp_time',
|
1203 |
+
);
|
1204 |
+
$this->register_settings( 'fts-youtube-feed-style-options', $youtube_style_options );
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
/**
|
1208 |
+
* FTS Settings Page Register Settings
|
1209 |
+
*
|
1210 |
+
* Register Free Version Settings.
|
1211 |
+
*
|
1212 |
+
* @since 1.9.6
|
1213 |
+
*/
|
1214 |
+
public function fts_settings_page_register_settings ()
|
1215 |
+
{
|
1216 |
+
$settings = array(
|
1217 |
+
'fts_admin_bar_menu',
|
1218 |
+
'fts_clear_cache_developer_mode',
|
1219 |
+
'fts-date-and-time-format',
|
1220 |
+
'fts-timezone',
|
1221 |
+
'fts_fix_magnific',
|
1222 |
+
'fts-color-options-settings-custom-css',
|
1223 |
+
'fts-color-options-main-wrapper-css-input',
|
1224 |
+
'fts-powered-text-options-settings',
|
1225 |
+
'fts-slicker-instagram-icon-center',
|
1226 |
+
'fts-slicker-instagram-container-image-size',
|
1227 |
+
'fts-slicker-instagram-container-hide-date-likes-comments',
|
1228 |
+
'fts-slicker-instagram-container-position',
|
1229 |
+
'fts-slicker-instagram-container-animation',
|
1230 |
+
'fts-slicker-instagram-container-margin',
|
1231 |
+
'fts_fix_loadmore',
|
1232 |
+
'fts_curl_option',
|
1233 |
+
'fts-custom-date',
|
1234 |
+
'fts-custom-time',
|
1235 |
+
'fts_twitter_time_offset',
|
1236 |
+
'fts_language_second',
|
1237 |
+
'fts_language_seconds',
|
1238 |
+
'fts_language_minute',
|
1239 |
+
'fts_language_minutes',
|
1240 |
+
'fts_language_hour',
|
1241 |
+
'fts_language_hours',
|
1242 |
+
'fts_language_day',
|
1243 |
+
'fts_language_days',
|
1244 |
+
'fts_language_week',
|
1245 |
+
'fts_language_weeks',
|
1246 |
+
'fts_language_month',
|
1247 |
+
'fts_language_months',
|
1248 |
+
'fts_language_year',
|
1249 |
+
'fts_language_years',
|
1250 |
+
'fts_language_ago',
|
1251 |
+
'fts_disable_share_button',
|
1252 |
+
'fts_social_icons_color',
|
1253 |
+
'fts_social_icons_hover_color',
|
1254 |
+
'fts_social_icons_back_color',
|
1255 |
+
'fts_slick_rating_notice_waiting',
|
1256 |
+
'fts_slick_rating_notice',
|
1257 |
+
'fts_slick_ignore_rating_notice_nag',
|
1258 |
+
);
|
1259 |
+
$this->register_settings( 'feed-them-social-settings', $settings );
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
/**
|
1263 |
+
* Social Follow Buttons
|
1264 |
+
*
|
1265 |
+
* @param string $feed feed type.
|
1266 |
+
* @param string $user_id user id.
|
1267 |
+
* @param null $access_token access token.
|
1268 |
+
* @param null $fb_shortcode shortcode attribute.
|
1269 |
+
* @since 1.9.6
|
1270 |
+
*/
|
1271 |
+
public function social_follow_button ($feed, $user_id, $access_token = null, $fb_shortcode = null)
|
1272 |
+
{
|
1273 |
+
$fts_social_follow_nonce = wp_create_nonce( 'fts-social-follow-nonce' );
|
1274 |
+
|
1275 |
+
if ( wp_verify_nonce( $fts_social_follow_nonce, 'fts-social-follow-nonce' ) ) {
|
1276 |
+
|
1277 |
+
global $channel_id, $playlist_id, $username_subscribe_btn, $username;
|
1278 |
+
switch ($feed) {
|
1279 |
+
case 'facebook':
|
1280 |
+
// Facebook settings options for follow button!
|
1281 |
+
$fb_show_follow_btn = get_option( 'fb_show_follow_btn' );
|
1282 |
+
$fb_show_follow_like_box_cover = get_option( 'fb_show_follow_like_box_cover' );
|
1283 |
+
$language_option_check = get_option( 'fb_language' );
|
1284 |
+
|
1285 |
+
if ( isset( $language_option_check ) && 'Please Select Option' !== $language_option_check ) {
|
1286 |
+
$language_option = get_option( 'fb_language', 'en_US' );
|
1287 |
+
} else {
|
1288 |
+
$language_option = 'en_US';
|
1289 |
+
}
|
1290 |
+
$fb_like_btn_color = get_option( 'fb_like_btn_color', 'light' );
|
1291 |
+
$show_faces = 'like-button-share-faces' === $fb_show_follow_btn || 'like-button-faces' === $fb_show_follow_btn || 'like-box-faces' === $fb_show_follow_btn ? 'true' : 'false';
|
1292 |
+
$share_button = 'like-button-share-faces' === $fb_show_follow_btn || 'like-button-share' === $fb_show_follow_btn ? 'true' : 'false';
|
1293 |
+
$page_cover = 'fb_like_box_cover-yes' === $fb_show_follow_like_box_cover ? 'true' : 'false';
|
1294 |
+
if ( !isset( $_POST['fts_facebook_script_loaded'] ) ) {
|
1295 |
+
echo '<div id="fb-root"></div>
|
1296 |
<script>jQuery(".fb-page").hide(); (function(d, s, id) {
|
1297 |
var js, fjs = d.getElementsByTagName(s)[0];
|
1298 |
if (d.getElementById(id)) return;
|
1300 |
js.src = "//connect.facebook.net/' . esc_html( $language_option ) . '/sdk.js#xfbml=1&appId=&version=v3.1";
|
1301 |
fjs.parentNode.insertBefore(js, fjs);
|
1302 |
}(document, "script", "facebook-jssd"));</script>';
|
1303 |
+
$_POST['fts_facebook_script_loaded'] = 'yes';
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
// Page Box!
|
1307 |
+
if ( 'like-box' === $fb_show_follow_btn || 'like-box-faces' === $fb_show_follow_btn ) {
|
1308 |
+
|
1309 |
+
$like_box_width = isset( $fb_shortcode['like_box_width'] ) && '' !== $fb_shortcode['like_box_width'] ? $fb_shortcode['like_box_width'] : '500px';
|
1310 |
+
|
1311 |
+
echo '<div class="fb-page" data-href="' . esc_url( 'https://www.facebook.com/' . $user_id ) . '" data-hide-cover="' . esc_html( $page_cover ) . '" data-width="' . esc_html( $like_box_width ) . '" data-show-facepile="' . esc_html( $show_faces ) . '" data-show-posts="false"></div>';
|
1312 |
+
} else {
|
1313 |
+
echo '<div class="fb-like" data-href="' . esc_url( 'https://www.facebook.com/' . $user_id ) . '" data-layout="standard" data-action="like" data-colorscheme="' . esc_html( $fb_like_btn_color ) . '" data-show-faces="' . esc_html( $show_faces ) . '" data-share="' . esc_html( $share_button ) . '" data-width:"100%"></div>';
|
1314 |
+
}
|
1315 |
+
break;
|
1316 |
+
case 'instagram':
|
1317 |
+
echo '<a href="' . esc_url( 'https://instagram.com/' . $user_id . '/' ) . '" target="_blank">' . esc_html( 'Follow on Instagram', 'feed-them-social' ) . '</a>';
|
1318 |
+
break;
|
1319 |
+
case 'twitter':
|
1320 |
+
if ( !isset( $_POST['fts_twitter_script_loaded'] ) ) {
|
1321 |
+
echo "<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>";
|
1322 |
+
$_POST['fts_twitter_script_loaded'] = 'yes';
|
1323 |
+
}
|
1324 |
+
// CAN't ESCAPE Twitter link because then JS doesn't work!
|
1325 |
+
echo '<a class="twitter-follow-button" href="' . ' https://twitter.com/' . $user_id . ' " data-show-count="false" data-lang="en"> Follow @' . esc_html( $user_id ) . '</a>';
|
1326 |
+
break;
|
1327 |
+
case 'pinterest':
|
1328 |
+
if ( !isset( $_POST['fts_pinterest_script_loaded'] ) ) {
|
1329 |
+
echo '<script>jQuery(function () {jQuery.getScript("//assets.pinterest.com/js/pinit.js");});</script>';
|
1330 |
+
$_POST['fts_pinterest_script_loaded'] = 'yes';
|
1331 |
+
}
|
1332 |
+
// we return this one until we echo out the pinterest feed instead of $output.=.
|
1333 |
+
return '<a data-pin-do="buttonFollow" href="https://www.pinterest.com/' . esc_html( $user_id ) . '/">' . esc_html( $user_id ) . '</a>';
|
1334 |
+
break;
|
1335 |
+
case 'youtube':
|
1336 |
+
if ( !isset( $_POST['fts_youtube_script_loaded'] ) ) {
|
1337 |
+
echo '<script src="' . esc_url( 'https://apis.google.com/js/platform.js' ) . '"></script>';
|
1338 |
+
$_POST['fts_youtube_script_loaded'] = 'yes';
|
1339 |
+
}
|
1340 |
+
if ( '' === $channel_id && '' === $playlist_id && '' !== $username || '' !== $playlist_id && '' !== $username_subscribe_btn ) {
|
1341 |
+
|
1342 |
+
if ( '' !== $username_subscribe_btn ) {
|
1343 |
+
echo '<div class="g-ytsubscribe" data-channel="' . esc_html( $username_subscribe_btn ) . '" data-layout="full" data-count="default"></div>';
|
1344 |
+
} else {
|
1345 |
+
echo '<div class="g-ytsubscribe" data-channel="' . esc_html( $user_id ) . '" data-layout="full" data-count="default"></div>';
|
1346 |
+
}
|
1347 |
+
} elseif ( '' !== $channel_id && '' !== $playlist_id || '' !== $channel_id ) {
|
1348 |
+
echo '<div class="g-ytsubscribe" data-channelid="' . esc_html( $channel_id ) . '" data-layout="full" data-count="default"></div>';
|
1349 |
+
}
|
1350 |
+
break;
|
1351 |
+
}
|
1352 |
+
}
|
1353 |
+
}
|
1354 |
+
|
1355 |
+
/**
|
1356 |
+
* FTS Color Options Head CSS
|
1357 |
+
*
|
1358 |
+
* @since 1.9.6
|
1359 |
+
*/
|
1360 |
+
public function fts_color_options_head_css ()
|
1361 |
+
{
|
1362 |
+
?>
|
1363 |
+
<style type="text/css"><?php echo get_option( 'fts-color-options-main-wrapper-css-input' ); ?></style>
|
1364 |
+
<?php
|
1365 |
+
}
|
1366 |
+
|
1367 |
+
/**
|
1368 |
+
* FTS FB Color Options Head CSS
|
1369 |
+
*
|
1370 |
+
* Color Options CSS for Facebook.
|
1371 |
+
*
|
1372 |
+
* @since 1.9.6
|
1373 |
+
*/
|
1374 |
+
public function fts_fb_color_options_head_css ()
|
1375 |
+
{
|
1376 |
+
$fb_hide_no_posts_message = get_option( 'fb_hide_no_posts_message' );
|
1377 |
+
$fb_header_extra_text_color = get_option( 'fb_header_extra_text_color' );
|
1378 |
+
$fb_text_color = get_option( 'fb_text_color' );
|
1379 |
+
$fb_link_color = get_option( 'fb_link_color' );
|
1380 |
+
$fb_link_color_hover = get_option( 'fb_link_color_hover' );
|
1381 |
+
$fb_feed_width = get_option( 'fb_feed_width' );
|
1382 |
+
$fb_feed_margin = get_option( 'fb_feed_margin' );
|
1383 |
+
$fb_feed_padding = get_option( 'fb_feed_padding' );
|
1384 |
+
$fb_feed_background_color = get_option( 'fb_feed_background_color' );
|
1385 |
+
$fb_post_background_color = get_option( 'fb_post_background_color' );
|
1386 |
+
$fb_grid_posts_background_color = get_option( 'fb_grid_posts_background_color' );
|
1387 |
+
$fb_grid_border_bottom_color = get_option( 'fb_grid_border_bottom_color' );
|
1388 |
+
$fb_loadmore_background_color = get_option( 'fb_loadmore_background_color' );
|
1389 |
+
$fb_loadmore_text_color = get_option( 'fb_loadmore_text_color' );
|
1390 |
+
$fb_border_bottom_color = get_option( 'fb_border_bottom_color' );
|
1391 |
+
$fb_grid_posts_background_color = get_option( 'fb_grid_posts_background_color' );
|
1392 |
+
$fb_reviews_backg_color = get_option( 'fb_reviews_backg_color' );
|
1393 |
+
$fb_reviews_text_color = get_option( 'fb_reviews_text_color' );
|
1394 |
+
|
1395 |
+
$fb_reviews_overall_rating_background_color = get_option( 'fb_reviews_overall_rating_background_color' );
|
1396 |
+
$fb_reviews_overall_rating_border_color = get_option( 'fb_reviews_overall_rating_border_color' );
|
1397 |
+
$fb_reviews_overall_rating_text_color = get_option( 'fb_reviews_overall_rating_text_color' );
|
1398 |
+
$fb_reviews_overall_rating_background_padding = get_option( 'fb_reviews_overall_rating_background_padding' );
|
1399 |
+
|
1400 |
+
$fb_max_image_width = get_option( 'fb_max_image_width' );
|
1401 |
+
|
1402 |
+
$fb_events_title_color = get_option( 'fb_events_title_color' );
|
1403 |
+
$fb_events_title_size = get_option( 'fb_events_title_size' );
|
1404 |
+
$fb_events_maplink_color = get_option( 'fb_events_map_link_color' );
|
1405 |
+
|
1406 |
+
$twitter_hide_profile_photo = get_option( 'twitter_hide_profile_photo' );
|
1407 |
+
$twitter_text_color = get_option( 'twitter_text_color' );
|
1408 |
+
$twitter_link_color = get_option( 'twitter_link_color' );
|
1409 |
+
$twitter_link_color_hover = get_option( 'twitter_link_color_hover' );
|
1410 |
+
$twitter_feed_width = get_option( 'twitter_feed_width' );
|
1411 |
+
$twitter_feed_margin = get_option( 'twitter_feed_margin' );
|
1412 |
+
$twitter_feed_padding = get_option( 'twitter_feed_padding' );
|
1413 |
+
$twitter_feed_background_color = get_option( 'twitter_feed_background_color' );
|
1414 |
+
$twitter_border_bottom_color = get_option( 'twitter_border_bottom_color' );
|
1415 |
+
$twitter_max_image_width = get_option( 'twitter_max_image_width' );
|
1416 |
+
$twitter_grid_border_bottom_color = get_option( 'twitter_grid_border_bottom_color' );
|
1417 |
+
$twitter_grid_posts_background_color = get_option( 'twitter_grid_posts_background_color' );
|
1418 |
+
$twitter_loadmore_background_color = get_option( 'twitter_loadmore_background_color' );
|
1419 |
+
$twitter_loadmore_text_color = get_option( 'twitter_loadmore_text_color' );
|
1420 |
+
|
1421 |
+
$instagram_loadmore_background_color = get_option( 'instagram_loadmore_background_color' );
|
1422 |
+
$instagram_loadmore_text_color = get_option( 'instagram_loadmore_text_color' );
|
1423 |
+
|
1424 |
+
$pinterest_board_title_color = get_option( 'pinterest_board_title_color' );
|
1425 |
+
$pinterest_board_title_size = get_option( 'pinterest_board_title_size' );
|
1426 |
+
$pinterest_board_backg_hover_color = get_option( 'pinterest_board_backg_hover_color' );
|
1427 |
+
|
1428 |
+
$fts_social_icons_color = get_option( 'fts_social_icons_color' );
|
1429 |
+
$fts_social_icons_hover_color = get_option( 'fts_social_icons_hover_color' );
|
1430 |
+
$fts_social_icons_back_color = get_option( 'fts_social_icons_back_color' );
|
1431 |
+
|
1432 |
+
$youtube_loadmore_background_color = get_option( 'youtube_loadmore_background_color' );
|
1433 |
+
$youtube_loadmore_text_color = get_option( 'youtube_loadmore_text_color' );
|
1434 |
+
|
1435 |
+
$fb_text_size = get_option( 'fb_text_size' );
|
1436 |
+
$twitter_text_size = get_option( 'twitter_text_size' );
|
1437 |
+
?>
|
1438 |
+
<style type="text/css"><?php if ( ! empty( $fb_header_extra_text_color ) ) { ?>
|
1439 |
+
|
1440 |
+
<?php }if ( ! empty( $fb_hide_no_posts_message ) && 'yes' === $fb_hide_no_posts_message ) { ?>
|
1441 |
+
.fts-facebook-add-more-posts-notice {
|
1442 |
+
display: none !important;
|
1443 |
+
}
|
1444 |
+
|
1445 |
+
.fts-jal-single-fb-post .fts-jal-fb-user-name {
|
1446 |
+
color: <?php echo esc_html( $fb_header_extra_text_color ); ?> !important;
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
<?php }if ( ! empty( $fb_loadmore_background_color ) ) { ?>
|
1450 |
+
.fts-fb-load-more-wrapper .fts-fb-load-more {
|
1451 |
+
background: <?php echo esc_html( $fb_loadmore_background_color ); ?> !important;
|
1452 |
+
}
|
1453 |
+
|
1454 |
+
<?php }if ( ! empty( $fb_loadmore_text_color ) ) { ?>
|
1455 |
+
.fts-fb-load-more-wrapper .fts-fb-load-more {
|
1456 |
+
color: <?php echo esc_html( $fb_loadmore_text_color ); ?> !important;
|
1457 |
+
}
|
1458 |
+
|
1459 |
+
<?php }if ( ! empty( $fb_loadmore_text_color ) ) { ?>
|
1460 |
+
.fts-fb-load-more-wrapper .fts-fb-spinner > div {
|
1461 |
+
background: <?php echo esc_html( $fb_loadmore_text_color ); ?> !important;
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
<?php }if ( ! empty( $fb_text_color ) ) { ?>
|
1465 |
+
.fts-simple-fb-wrapper .fts-jal-single-fb-post,
|
1466 |
+
.fts-simple-fb-wrapper .fts-jal-fb-description-wrap,
|
1467 |
+
.fts-simple-fb-wrapper .fts-jal-fb-post-time,
|
1468 |
+
.fts-slicker-facebook-posts .fts-jal-single-fb-post,
|
1469 |
+
.fts-slicker-facebook-posts .fts-jal-fb-description-wrap,
|
1470 |
+
.fts-slicker-facebook-posts .fts-jal-fb-post-time {
|
1471 |
+
color: <?php echo esc_html( $fb_text_color ); ?> !important;
|
1472 |
+
}
|
1473 |
+
|
1474 |
+
<?php }if ( ! empty( $fb_link_color ) ) { ?>
|
1475 |
+
.fts-simple-fb-wrapper .fts-jal-single-fb-post .fts-review-name,
|
1476 |
+
.fts-simple-fb-wrapper .fts-jal-single-fb-post a,
|
1477 |
+
.fts-slicker-facebook-posts .fts-jal-single-fb-post a,
|
1478 |
+
.fts-jal-fb-group-header-desc a {
|
1479 |
+
color: <?php echo esc_html( $fb_link_color ); ?> !important;
|
1480 |
+
}
|
1481 |
+
|
1482 |
+
<?php }if ( ! empty( $fb_link_color_hover ) ) { ?>
|
1483 |
+
.fts-simple-fb-wrapper .fts-jal-single-fb-post a:hover,
|
1484 |
+
.fts-simple-fb-wrapper .fts-fb-load-more:hover,
|
1485 |
+
.fts-slicker-facebook-posts .fts-jal-single-fb-post a:hover,
|
1486 |
+
.fts-slicker-facebook-posts .fts-fb-load-more:hover,
|
1487 |
+
.fts-jal-fb-group-header-desc a:hover {
|
1488 |
+
color: <?php echo esc_html( $fb_link_color_hover ); ?> !important;
|
1489 |
+
}
|
1490 |
+
|
1491 |
+
<?php }if ( ! empty( $fb_feed_width ) ) { ?>
|
1492 |
+
.fts-simple-fb-wrapper, .fts-fb-header-wrapper, .fts-fb-load-more-wrapper, .fts-jal-fb-header, .fb-social-btn-top, .fb-social-btn-bottom, .fb-social-btn-below-description {
|
1493 |
+
max-width: <?php echo esc_html( $fb_feed_width ); ?> !important;
|
1494 |
+
}
|
1495 |
+
|
1496 |
+
<?php }if ( ! empty( $fb_max_image_width ) ) { ?>
|
1497 |
+
.fts-fb-large-photo, .fts-jal-fb-vid-picture, .fts-jal-fb-picture, .fts-fluid-videoWrapper-html5 {
|
1498 |
+
max-width: <?php echo esc_html( $fb_max_image_width ); ?> !important;
|
1499 |
+
float: left;
|
1500 |
+
}
|
1501 |
+
|
1502 |
+
<?php }if ( ! empty( $fb_events_title_color ) ) { ?>
|
1503 |
+
.fts-simple-fb-wrapper .fts-events-list-wrap a.fts-jal-fb-name {
|
1504 |
+
color: <?php echo esc_html( $fb_events_title_color ); ?> !important;
|
1505 |
+
}
|
1506 |
+
|
1507 |
+
<?php }if ( ! empty( $fb_events_title_size ) ) { ?>
|
1508 |
+
.fts-simple-fb-wrapper .fts-events-list-wrap a.fts-jal-fb-name {
|
1509 |
+
font-size: <?php echo esc_html( $fb_events_title_size ); ?> !important;
|
1510 |
+
line-height: <?php echo esc_html( $fb_events_title_size ); ?> !important;
|
1511 |
+
}
|
1512 |
+
|
1513 |
+
<?php }if ( ! empty( $fb_events_maplink_color ) ) { ?>
|
1514 |
+
.fts-simple-fb-wrapper a.fts-fb-get-directions {
|
1515 |
+
color: <?php echo esc_html( $fb_events_maplink_color ); ?> !important;
|
1516 |
+
}
|
1517 |
+
|
1518 |
+
<?php }if ( ! empty( $fb_feed_margin ) ) { ?>
|
1519 |
+
.fts-simple-fb-wrapper, .fts-fb-header-wrapper, .fts-fb-load-more-wrapper, .fts-jal-fb-header, .fb-social-btn-top, .fb-social-btn-bottom, .fb-social-btn-below-description {
|
1520 |
+
margin: <?php echo esc_html( $fb_feed_margin ); ?> !important;
|
1521 |
+
}
|
1522 |
+
|
1523 |
+
<?php }if ( ! empty( $fb_feed_padding ) ) { ?>
|
1524 |
+
.fts-simple-fb-wrapper {
|
1525 |
+
padding: <?php echo esc_html( $fb_feed_padding ); ?> !important;
|
1526 |
+
}
|
1527 |
+
|
1528 |
+
<?php }if ( ! empty( $fb_feed_background_color ) ) { ?>
|
1529 |
+
.fts-simple-fb-wrapper, .fts-fb-load-more-wrapper .fts-fb-load-more {
|
1530 |
+
background: <?php echo esc_html( $fb_feed_background_color ); ?> !important;
|
1531 |
+
}
|
1532 |
+
|
1533 |
+
<?php }if ( ! empty( $fb_post_background_color ) ) { ?>
|
1534 |
+
.fts-mashup-media-top .fts-jal-single-fb-post {
|
1535 |
+
background: <?php echo esc_html( $fb_post_background_color ); ?> !important;
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
<?php }if ( ! empty( $fb_grid_posts_background_color ) ) { ?>
|
1539 |
+
.fts-slicker-facebook-posts .fts-jal-single-fb-post {
|
1540 |
+
background: <?php echo esc_html( $fb_grid_posts_background_color ); ?> !important;
|
1541 |
+
}
|
1542 |
+
|
1543 |
+
<?php }if ( ! empty( $fb_border_bottom_color ) ) { ?>
|
1544 |
+
.fts-jal-single-fb-post {
|
1545 |
+
border-bottom-color: <?php echo esc_html( $fb_border_bottom_color ); ?> !important;
|
1546 |
+
}
|
1547 |
+
|
1548 |
+
<?php }if ( ! empty( $fb_grid_border_bottom_color ) ) { ?>
|
1549 |
+
.fts-slicker-facebook-posts .fts-jal-single-fb-post {
|
1550 |
+
border-bottom-color: <?php echo esc_html( $fb_grid_border_bottom_color ); ?> !important;
|
1551 |
+
}
|
1552 |
+
|
1553 |
+
<?php }if ( ! empty( $twitter_grid_posts_background_color ) ) { ?>
|
1554 |
+
.fts-slicker-twitter-posts .fts-tweeter-wrap {
|
1555 |
+
background: <?php echo esc_html( $twitter_grid_posts_background_color ); ?> !important;
|
1556 |
+
}
|
1557 |
+
|
1558 |
+
<?php }if ( ! empty( $twitter_grid_border_bottom_color ) ) { ?>
|
1559 |
+
.fts-slicker-twitter-posts .fts-tweeter-wrap {
|
1560 |
+
border-bottom-color: <?php echo esc_html( $twitter_grid_border_bottom_color ); ?> !important;
|
1561 |
+
}
|
1562 |
+
|
1563 |
+
<?php }if ( ! empty( $twitter_loadmore_background_color ) ) { ?>
|
1564 |
+
.fts-twitter-load-more-wrapper .fts-fb-load-more {
|
1565 |
+
background: <?php echo esc_html( $twitter_loadmore_background_color ); ?> !important;
|
1566 |
+
}
|
1567 |
+
|
1568 |
+
<?php }if ( ! empty( $twitter_loadmore_text_color ) ) { ?>
|
1569 |
+
.fts-twitter-load-more-wrapper .fts-fb-load-more {
|
1570 |
+
color: <?php echo esc_html( $twitter_loadmore_text_color ); ?> !important;
|
1571 |
+
}
|
1572 |
+
|
1573 |
+
<?php }if ( ! empty( $twitter_loadmore_text_color ) ) { ?>
|
1574 |
+
.fts-twitter-load-more-wrapper .fts-fb-spinner > div {
|
1575 |
+
background: <?php echo esc_html( $twitter_loadmore_text_color ); ?> !important;
|
1576 |
+
}
|
1577 |
+
|
1578 |
+
<?php }if ( ! empty( $fb_reviews_backg_color ) ) { ?>
|
1579 |
+
.fts-review-star {
|
1580 |
+
background: <?php echo esc_html( $fb_reviews_backg_color ); ?> !important;
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
<?php }if ( ! empty( $fb_reviews_overall_rating_background_color ) ) { ?>
|
1584 |
+
.fts-review-details-master-wrap {
|
1585 |
+
background: <?php echo esc_html( $fb_reviews_overall_rating_background_color ); ?> !important;
|
1586 |
+
}
|
1587 |
+
|
1588 |
+
<?php }if ( ! empty( $fb_reviews_overall_rating_border_color ) ) { ?>
|
1589 |
+
.fts-review-details-master-wrap {
|
1590 |
+
border-bottom-color: <?php echo esc_html( $fb_reviews_overall_rating_border_color ); ?> !important;
|
1591 |
+
}
|
1592 |
+
|
1593 |
+
<?php }if ( ! empty( $fb_reviews_overall_rating_background_padding ) ) { ?>
|
1594 |
+
.fts-review-details-master-wrap {
|
1595 |
+
padding: <?php echo esc_html( $fb_reviews_overall_rating_background_padding ); ?> !important;
|
1596 |
+
}
|
1597 |
+
|
1598 |
+
<?php }if ( ! empty( $fb_reviews_overall_rating_text_color ) ) { ?>
|
1599 |
+
.fts-review-details-master-wrap {
|
1600 |
+
color: <?php echo esc_html( $fb_reviews_overall_rating_text_color ); ?> !important;
|
1601 |
+
}
|
1602 |
+
|
1603 |
+
<?php }if ( ! empty( $fb_reviews_text_color ) ) { ?>
|
1604 |
+
.fts-review-star {
|
1605 |
+
color: <?php echo esc_html( $fb_reviews_text_color ); ?> !important;
|
1606 |
+
}
|
1607 |
+
|
1608 |
+
<?php }if ( ! empty( $twitter_text_color ) ) { ?>
|
1609 |
+
.tweeter-info .fts-twitter-text, .fts-twitter-reply-wrap:before, a span.fts-video-loading-notice {
|
1610 |
+
color: <?php echo esc_html( $twitter_text_color ); ?> !important;
|
1611 |
+
}
|
1612 |
+
|
1613 |
+
<?php }if ( ! empty( $twitter_link_color ) ) { ?>
|
1614 |
+
.tweeter-info .fts-twitter-text a, .tweeter-info .fts-twitter-text .time a, .fts-twitter-reply-wrap a, .tweeter-info a, .twitter-followers-fts a, body.fts-twitter-reply-wrap a {
|
1615 |
+
color: <?php echo esc_html( $twitter_link_color ); ?> !important;
|
1616 |
+
}
|
1617 |
+
|
1618 |
+
<?php }if ( ! empty( $twitter_link_color_hover ) ) { ?>
|
1619 |
+
.tweeter-info a:hover, .tweeter-info:hover .fts-twitter-reply, body.fts-twitter-reply-wrap a:hover {
|
1620 |
+
color: <?php echo esc_html( $twitter_link_color_hover ); ?> !important;
|
1621 |
+
}
|
1622 |
+
|
1623 |
+
<?php }if ( ! empty( $twitter_feed_width ) ) { ?>
|
1624 |
+
.fts-twitter-div {
|
1625 |
+
max-width: <?php echo esc_html( $twitter_feed_width ); ?> !important;
|
1626 |
+
}
|
1627 |
+
|
1628 |
+
<?php }if ( ! empty( $twitter_feed_margin ) ) { ?>
|
1629 |
+
.fts-twitter-div {
|
1630 |
+
margin: <?php echo esc_html( $twitter_feed_margin ); ?> !important;
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
<?php }if ( ! empty( $twitter_feed_padding ) ) { ?>
|
1634 |
+
.fts-twitter-div {
|
1635 |
+
padding: <?php echo esc_html( $twitter_feed_padding ); ?> !important;
|
1636 |
+
}
|
1637 |
+
|
1638 |
+
<?php }if ( ! empty( $twitter_feed_background_color ) ) { ?>
|
1639 |
+
.fts-twitter-div {
|
1640 |
+
background: <?php echo esc_html( $twitter_feed_background_color ); ?> !important;
|
1641 |
+
}
|
1642 |
+
|
1643 |
+
<?php }if ( ! empty( $twitter_border_bottom_color ) ) { ?>
|
1644 |
+
.tweeter-info {
|
1645 |
+
border-bottom: 1px solid <?php echo esc_html( $twitter_border_bottom_color ); ?> !important;
|
1646 |
+
}
|
1647 |
+
|
1648 |
+
<?php }if ( ! empty( $twitter_max_image_width ) ) { ?>
|
1649 |
+
.fts-twitter-link-image {
|
1650 |
+
max-width: <?php echo esc_html( $twitter_max_image_width ); ?> !important;
|
1651 |
+
display: block;
|
1652 |
+
}
|
1653 |
+
|
1654 |
+
<?php }if ( ! empty( $instagram_loadmore_background_color ) ) { ?>
|
1655 |
+
.fts-instagram-load-more-wrapper .fts-fb-load-more {
|
1656 |
+
background: <?php echo esc_html( $instagram_loadmore_background_color ); ?> !important;
|
1657 |
+
}
|
1658 |
+
|
1659 |
+
<?php }if ( ! empty( $instagram_loadmore_text_color ) ) { ?>
|
1660 |
+
.fts-instagram-load-more-wrapper .fts-fb-load-more {
|
1661 |
+
color: <?php echo esc_html( $instagram_loadmore_text_color ); ?> !important;
|
1662 |
+
}
|
1663 |
+
|
1664 |
+
<?php }if ( ! empty( $instagram_loadmore_text_color ) ) { ?>
|
1665 |
+
.fts-instagram-load-more-wrapper .fts-fb-spinner > div {
|
1666 |
+
background: <?php echo esc_html( $instagram_loadmore_text_color ); ?> !important;
|
1667 |
+
}
|
1668 |
+
|
1669 |
+
<?php } if ( ! empty( $pinterest_board_backg_hover_color ) ) { ?>
|
1670 |
+
a.fts-pin-board-wrap:hover {
|
1671 |
+
background: <?php echo esc_html( $pinterest_board_backg_hover_color ); ?> !important;
|
1672 |
+
}
|
1673 |
+
|
1674 |
+
<?php } if ( ! empty( $pinterest_board_title_color ) ) { ?>
|
1675 |
+
body h3.fts-pin-board-board_title {
|
1676 |
+
color: <?php echo esc_html( $pinterest_board_title_color ); ?> !important;
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
<?php } if ( ! empty( $pinterest_board_title_size ) ) { ?>
|
1680 |
+
body h3.fts-pin-board-board_title {
|
1681 |
+
font-size: <?php echo esc_html( $pinterest_board_title_size ); ?> !important;
|
1682 |
+
}
|
1683 |
+
|
1684 |
+
<?php
|
1685 |
}
|
1686 |
if ( ! empty( $fts_social_icons_color ) ) {
|
1687 |
?>
|
1688 |
+
.ft-gallery-share-wrap a.ft-galleryfacebook-icon, .ft-gallery-share-wrap a.ft-gallerytwitter-icon, .ft-gallery-share-wrap a.ft-gallerygoogle-icon, .ft-gallery-share-wrap a.ft-gallerylinkedin-icon, .ft-gallery-share-wrap a.ft-galleryemail-icon {
|
1689 |
+
color: <?php echo esc_html( $fts_social_icons_color ); ?> !important;
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
<?php
|
1693 |
}
|
1694 |
if ( ! empty( $fts_social_icons_hover_color ) ) {
|
1695 |
?>
|
1696 |
+
.ft-gallery-share-wrap a.ft-galleryfacebook-icon:hover, .ft-gallery-share-wrap a.ft-gallerytwitter-icon:hover, .ft-gallery-share-wrap a.ft-gallerygoogle-icon:hover, .ft-gallery-share-wrap a.ft-gallerylinkedin-icon:hover, .ft-gallery-share-wrap a.ft-galleryemail-icon:hover {
|
1697 |
+
color: <?php echo esc_html( $fts_social_icons_hover_color ); ?> !important;
|
1698 |
+
}
|
1699 |
|
1700 |
+
<?php
|
1701 |
}
|
1702 |
if ( ! empty( $fts_social_icons_back_color ) ) {
|
1703 |
?>
|
1704 |
+
.ft-gallery-share-wrap {
|
1705 |
+
background: <?php echo esc_html( $fts_social_icons_back_color ); ?> !important;
|
1706 |
+
}
|
1707 |
|
1708 |
+
<?php
|
1709 |
}
|
1710 |
if ( ! empty( $twitter_text_size ) ) {
|
1711 |
?>
|
1712 |
+
span.fts-twitter-text {
|
1713 |
+
font-size: <?php echo esc_html( $twitter_text_size ); ?> !important;
|
1714 |
+
}
|
1715 |
|
1716 |
+
<?php
|
1717 |
}
|
1718 |
if ( ! empty( $fb_text_size ) ) {
|
1719 |
?>
|
1720 |
+
.fts-jal-fb-group-display .fts-jal-fb-message, .fts-jal-fb-group-display .fts-jal-fb-message p, .fts-jal-fb-group-header-desc, .fts-jal-fb-group-header-desc p, .fts-jal-fb-group-header-desc a {
|
1721 |
+
font-size: <?php echo esc_html( $fb_text_size ); ?> !important;
|
1722 |
+
}
|
1723 |
|
1724 |
+
<?php
|
1725 |
}
|
1726 |
if ( ! empty( $youtube_loadmore_background_color ) ) {
|
1727 |
?>
|
1728 |
+
.fts-youtube-load-more-wrapper .fts-fb-load-more {
|
1729 |
+
background: <?php echo esc_html( $youtube_loadmore_background_color ); ?> !important;
|
1730 |
+
}
|
1731 |
+
|
1732 |
+
<?php }if ( ! empty( $youtube_loadmore_text_color ) ) { ?>
|
1733 |
+
.fts-youtube-load-more-wrapper .fts-fb-load-more {
|
1734 |
+
color: <?php echo esc_html( $youtube_loadmore_text_color ); ?> !important;
|
1735 |
+
}
|
1736 |
+
|
1737 |
+
<?php
|
1738 |
}
|
1739 |
if ( ! empty( $youtube_loadmore_text_color ) ) {
|
1740 |
?>
|
1741 |
+
.fts-youtube-load-more-wrapper .fts-fb-spinner > div {
|
1742 |
+
background: <?php echo esc_html( $youtube_loadmore_text_color ); ?> !important;
|
1743 |
+
}
|
1744 |
+
|
1745 |
+
<?php } ?>
|
1746 |
+
|
1747 |
+
</style>
|
1748 |
+
<?php
|
1749 |
+
}
|
1750 |
+
|
1751 |
+
/**
|
1752 |
+
* FTS Powered By JS
|
1753 |
+
*
|
1754 |
+
* @since 1.9.6
|
1755 |
+
*/
|
1756 |
+
public function fts_powered_by_js ()
|
1757 |
+
{
|
1758 |
+
wp_enqueue_script( 'fts_powered_by_js', plugins_url( 'feeds/js/powered-by.js', dirname( __FILE__ ) ), array('jquery'), FTS_CURRENT_VERSION, false );
|
1759 |
+
}
|
1760 |
+
|
1761 |
+
/**
|
1762 |
+
* Required Premium Field
|
1763 |
+
*
|
1764 |
+
* Admin Required Premium Settings Fields.
|
1765 |
+
*
|
1766 |
+
* @param array $fields_info fields info.
|
1767 |
+
* @since 2.0.7
|
1768 |
+
*/
|
1769 |
+
public function need_fts_premium_plugin_field ($fields_info)
|
1770 |
+
{
|
1771 |
+
$output = '<div class="feed-them-social-admin-input-default">' . wp_kses(
|
1772 |
+
$fields_info['no_active_msg'],
|
1773 |
+
array(
|
1774 |
+
'a' => array(
|
1775 |
+
'href' => array(),
|
1776 |
+
'title' => array(),
|
1777 |
+
'target' => array(),
|
1778 |
+
),
|
1779 |
+
'br' => array(),
|
1780 |
+
'em' => array(),
|
1781 |
+
'strong' => array(),
|
1782 |
+
)
|
1783 |
+
) . '</div>';
|
1784 |
+
|
1785 |
+
return $output;
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
/**
|
1789 |
+
* Settings Form Fields Output
|
1790 |
+
*
|
1791 |
+
* @param bool $save_options save options.
|
1792 |
+
* @param array $feed_settings_array feed settings information.
|
1793 |
+
* @param array $required_plugins The plugins that are required for this form.
|
1794 |
+
* @since 2.0.8
|
1795 |
+
*/
|
1796 |
+
public function fts_settings_html_form ($save_options = false, $feed_settings_array, $required_plugins)
|
1797 |
+
{
|
1798 |
+
|
1799 |
+
$output = '';
|
1800 |
+
|
1801 |
+
// Start creation of fields for each Feed!
|
1802 |
+
foreach ( $feed_settings_array as $section => $section_info ) {
|
1803 |
+
$output .= '<div class="' . esc_attr( $section_info['section_wrap_class'] ) . '">';
|
1804 |
+
$output .= '<form class="feed-them-social-admin-form shortcode-generator-form ' . esc_attr( $section_info['form_wrap_classes'] ) . '" id="' . esc_attr( $section_info['form_wrap_id'] ) . '">';
|
1805 |
+
|
1806 |
+
// Check to see if token is in place otherwise show a message letting person no what they need to do!
|
1807 |
+
if ( isset( $section_info['token_check'] ) ) {
|
1808 |
+
foreach ( $section_info['token_check'] as $token_key => $token_info ) {
|
1809 |
+
if ( !isset( $token_info['req_plugin'] ) || isset( $token_info['req_plugin'] ) && is_plugin_active( $required_plugins[$token_info['req_plugin']]['plugin_url'] ) ) {
|
1810 |
+
$token_check = get_option( $token_info['option_name'] ) ? 'Yes' : 'No';
|
1811 |
+
$output .= isset( $token_check ) && 'No' !== $token_check ? "\n" : '<div class="feed-them-social-admin-input-wrap fts-required-token-message">' . wp_kses(
|
1812 |
+
$token_info['no_token_msg'],
|
1813 |
+
array(
|
1814 |
+
'a' => array(
|
1815 |
+
'href' => array(),
|
1816 |
+
'title' => array(),
|
1817 |
+
'target' => array(),
|
1818 |
+
),
|
1819 |
+
'br' => array(),
|
1820 |
+
'em' => array(),
|
1821 |
+
'strong' => array(),
|
1822 |
+
'small' => array(),
|
1823 |
+
)
|
1824 |
+
) . '</div>' . "\n";
|
1825 |
+
}
|
1826 |
+
}
|
1827 |
+
}
|
1828 |
+
// Section Title!
|
1829 |
+
$output .= isset( $section_info['section_title'] ) ? '<h2>' . esc_html( $section_info['section_title'] ) . '</h2>' : '';
|
1830 |
+
// Feed Types select!
|
1831 |
+
if ( isset( $section_info['feeds_types'] ) ) {
|
1832 |
+
$output .= '<div class="feed-them-social-admin-input-wrap ' . esc_attr( $section_info['feed_type_select']['select_wrap_classes'] ) . '">';
|
1833 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . wp_kses(
|
1834 |
+
$section_info['feed_type_select']['label'],
|
1835 |
+
array(
|
1836 |
+
'a' => array(
|
1837 |
+
'href' => array(),
|
1838 |
+
'title' => array(),
|
1839 |
+
'target' => array(),
|
1840 |
+
),
|
1841 |
+
'br' => array(),
|
1842 |
+
'em' => array(),
|
1843 |
+
'strong' => array(),
|
1844 |
+
)
|
1845 |
+
) . '</div>';
|
1846 |
+
$output .= '<select name="' . esc_attr( $section_info['feed_type_select']['select_name'] ) . '" id="' . esc_attr( $section_info['feed_type_select']['select_id'] ) . '" class="feed-them-social-admin-input ' . esc_attr( $section_info['feed_type_select']['select_classes'] ) . '">';
|
1847 |
+
foreach ( $section_info['feeds_types'] as $feed_type_name => $feed_type ) {
|
1848 |
+
if ( 'main_options' !== $feed_type_name ) {
|
1849 |
+
$output .= '<option value="' . esc_attr( $feed_type['value'] ) . '">' . esc_html( $feed_type['title'] ) . '</option>';
|
1850 |
+
}
|
1851 |
+
}
|
1852 |
+
$output .= '</select>';
|
1853 |
+
$output .= '<div class="fts-clear"></div>';
|
1854 |
+
$output .= '</div><!--/Feed Types Select Div Wrap-->';
|
1855 |
+
}
|
1856 |
+
|
1857 |
+
// Conversion Input!
|
1858 |
+
if ( isset( $section_info['conversion_input'] ) ) {
|
1859 |
+
$output .= '<div class="' . esc_attr( $section_info['conversion_input']['main_wrap_class'] ) . '">';
|
1860 |
+
$output .= '<h2>' . esc_html( $section_info['conversion_input']['conv_section_title'] ) . '</h2>';
|
1861 |
+
$output .= '<div class="feed-them-social-admin-input-wrap ' . esc_attr( $section_info['conversion_input']['input_wrap_class'] ) . '">';
|
1862 |
+
// Instructional Text!
|
1863 |
+
$output .= '<div class="instructional-text">' . esc_html( $section_info['conversion_input']['instructional-text'] ) . '</div>';
|
1864 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( $section_info['conversion_input']['label'] ) . '</div>';
|
1865 |
+
// Input!
|
1866 |
+
$output .= '<input type="input" name="' . esc_attr( $section_info['conversion_input']['name'] ) . '" id="' . esc_attr( $section_info['conversion_input']['id'] ) . '" class="feed-them-social-admin-input ' . (isset( $section_info['conversion_input']['class'] ) ? esc_attr( $section_info['conversion_input']['class'] ) : '') . '" value="" />';
|
1867 |
+
$output .= '<div class="fts-clear"></div>';
|
1868 |
+
$output .= '</div><!--/Conversion Input Wrap-->';
|
1869 |
+
|
1870 |
+
$output .= '<input type="button" class="feed-them-social-admin-submit-btn" value="' . esc_attr( $section_info['conversion_input']['btn-value'] ) . '" onclick="' . esc_js( $section_info['conversion_input']['onclick'] ) . '" tabindex="4" style="margin-right:1em;" />';
|
1871 |
+
$output .= '</div>';
|
1872 |
+
|
1873 |
+
}
|
1874 |
+
|
1875 |
+
$output .= '</form>';
|
1876 |
+
|
1877 |
+
// Feed Options!
|
1878 |
+
$output .= '<form class="feed-them-social-admin-form shortcode-generator-form ' . esc_attr( $section_info['form_wrap_classes'] ) . ' ' . esc_attr( $section ) . '_options_wrap">';
|
1879 |
+
|
1880 |
+
// Create settings fields for Feed OPTIONS!
|
1881 |
+
foreach ( $section_info['main_options'] as $option ) {
|
1882 |
+
if ( !isset( $option['no_html'] ) || isset( $option['no_html'] ) && 'yes' !== $option['no_html'] ) {
|
1883 |
+
|
1884 |
+
// Is a premium extension required?
|
1885 |
+
$required_plugin = (!isset( $option['req_plugin'] ) || isset( $option['req_plugin'] ) && is_plugin_active( $required_plugins[$option['req_plugin']]['plugin_url'] ));
|
1886 |
+
$or_required_plugin = (isset( $option['or_req_plugin'] ) && is_plugin_active( $required_plugins[$option['or_req_plugin']]['plugin_url'] ));
|
1887 |
+
$or_required_plugin_three = (isset( $option['or_req_plugin_three'] ) && is_plugin_active( $required_plugins[$option['or_req_plugin_three']]['plugin_url'] ));
|
1888 |
+
|
1889 |
+
// Sub option output START?
|
1890 |
+
$output .= isset( $option['sub_options'] ) ? '<div class="' . esc_attr( $option['sub_options']['sub_options_wrap_class'] ) . (!$required_plugin ? ' not-active-premium-fields' : '') . '">' . (isset( $option['sub_options']['sub_options_title'] ) ? '<h3>' . esc_html( $option['sub_options']['sub_options_title'] ) . '</h3>' : '') . (isset( $option['sub_options']['sub_options_instructional_txt'] ) ? '<div class="instructional-text">' . esc_html( $option['sub_options']['sub_options_instructional_txt'] ) . '</div>' : '') : '';
|
1891 |
+
|
1892 |
+
$output .= isset( $option['grouped_options_title'] ) ? '<h3 class="sectioned-options-title">' . esc_html( $option['grouped_options_title'] ) . '</h3>' : '';
|
1893 |
+
|
1894 |
+
// Only on a few options generally!
|
1895 |
+
$output .= isset( $option['outer_wrap_class'] ) || isset( $option['outer_wrap_display'] ) ? '<div ' . (isset( $option['outer_wrap_class'] ) ? 'class="' . esc_attr( $option['outer_wrap_class'] ) . '"' : '') . ' ' . (isset( $option['outer_wrap_display'] ) && !empty( $option['outer_wrap_display'] ) ? 'style="display:' . esc_attr( $option['outer_wrap_display'] ) . '"' : '') . '>' : '';
|
1896 |
+
// Main Input Wrap!
|
1897 |
+
$output .= '<div class="feed-them-social-admin-input-wrap ' . (isset( $option['input_wrap_class'] ) ? esc_attr( $option['input_wrap_class'] ) : '') . '" ' . (isset( $section_info['input_wrap_id'] ) ? 'id="' . esc_attr( $section_info['input_wrap_id'] ) . '"' : '') . '>';
|
1898 |
+
// Instructional Text!
|
1899 |
+
$output .= !empty( $option['instructional-text'] ) && !is_array( $option['instructional-text'] ) ? '<div class="instructional-text ' . (isset( $option['instructional-class'] ) ? esc_attr( $option['instructional-class'] ) : '') . '">' . wp_kses(
|
1900 |
+
$option['instructional-text'],
|
1901 |
+
array(
|
1902 |
+
'a' => array(
|
1903 |
+
'href' => array(),
|
1904 |
+
'title' => array(),
|
1905 |
+
'target' => array(),
|
1906 |
+
),
|
1907 |
+
'br' => array(),
|
1908 |
+
'em' => array(),
|
1909 |
+
'strong' => array(),
|
1910 |
+
)
|
1911 |
+
) . '</div>' : '';
|
1912 |
+
|
1913 |
+
if ( !empty( $option['instructional-text'] ) && is_array( $option['instructional-text'] ) ) {
|
1914 |
+
foreach ( $option['instructional-text'] as $instructional_txt ) {
|
1915 |
+
// Instructional Text!
|
1916 |
+
$output .= '<div class="instructional-text ' . (isset( $instructional_txt['class'] ) ? esc_attr( $instructional_txt['class'] ) : '') . '">' . wp_kses(
|
1917 |
+
$instructional_txt['text'],
|
1918 |
+
array(
|
1919 |
+
'a' => array(
|
1920 |
+
'href' => array(),
|
1921 |
+
'title' => array(),
|
1922 |
+
'target' => array(),
|
1923 |
+
),
|
1924 |
+
'br' => array(),
|
1925 |
+
'em' => array(),
|
1926 |
+
'strong' => array(),
|
1927 |
+
)
|
1928 |
+
) . '</div>';
|
1929 |
+
}
|
1930 |
+
}
|
1931 |
+
|
1932 |
+
// Label Text!
|
1933 |
+
$output .= isset( $option['label'] ) && !is_array( $option['label'] ) ? '<div class="feed-them-social-admin-input-label ' . (isset( $option['label_class'] ) ? esc_attr( $option['label_class'] ) : '') . '">' . wp_kses(
|
1934 |
+
$option['label'],
|
1935 |
+
array(
|
1936 |
+
'a' => array(
|
1937 |
+
'href' => array(),
|
1938 |
+
'title' => array(),
|
1939 |
+
'target' => array(),
|
1940 |
+
),
|
1941 |
+
'br' => array(),
|
1942 |
+
'em' => array(),
|
1943 |
+
'strong' => array(),
|
1944 |
+
'small' => array(),
|
1945 |
+
)
|
1946 |
+
) . '</div>' : '';
|
1947 |
+
|
1948 |
+
if ( !empty( $option['label'] ) && is_array( $option['label'] ) ) {
|
1949 |
+
foreach ( $option['label'] as $label_txt ) {
|
1950 |
+
// Label Text!
|
1951 |
+
$output .= '<div class="feed-them-social-admin-input-label ' . (isset( $label_txt['class'] ) ? esc_attr( $label_txt['class'] ) : '') . '">' . wp_kses(
|
1952 |
+
$label_txt['text'],
|
1953 |
+
array(
|
1954 |
+
'a' => array(
|
1955 |
+
'href' => array(),
|
1956 |
+
'title' => array(),
|
1957 |
+
'target' => array(),
|
1958 |
+
),
|
1959 |
+
'br' => array(),
|
1960 |
+
'em' => array(),
|
1961 |
+
'strong' => array(),
|
1962 |
+
'small' => array(),
|
1963 |
+
)
|
1964 |
+
) . '</div>';
|
1965 |
+
}
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
if ( $required_plugin || $or_required_plugin || $or_required_plugin_three ) {
|
1969 |
+
// Option_Type = INPUT!
|
1970 |
+
$output .= isset( $option['option_type'] ) && 'input' === $option['option_type'] ? '<input type="' . esc_attr( $option['type'] ) . '" name="' . esc_attr( $option['name'] ) . '" id="' . esc_attr( $option['id'] ) . '" class="' . (isset( $option['color_picker'] ) && 'yes' === $option['color_picker'] ? 'color {hash:true,caps:false,required:false,adjust:false,pickerFaceColor:\'#eee\',pickerFace:3,pickerBorder:0,pickerInsetColor:\'white\'} ' : '') . 'feed-them-social-admin-input ' . (isset( $option['class'] ) ? esc_attr( $option['class'] ) : '') . '" placeholder="' . (isset( $option['placeholder'] ) ? esc_attr( $option['placeholder'] ) : '') . '" value="' . (isset( $option['value'] ) ? '' . esc_html( $option['value'] ) : '') . '" />' : '';
|
1971 |
+
|
1972 |
+
// Option_Type = Select!
|
1973 |
+
if ( isset( $option['option_type'] ) && 'select' === $option['option_type'] ) {
|
1974 |
+
$output .= '<select name="' . esc_attr( $option['name'] ) . '" id="' . esc_attr( $option['id'] ) . '" class="feed-them-social-admin-input">';
|
1975 |
+
foreach ( $option['options'] as $select_option ) {
|
1976 |
+
$output .= '<option value="' . esc_html( $select_option['value'] ) . '"' . (isset( $option['default_value'] ) && $option['default_value'] === $select_option['value'] ? ' selected' : '') . '>' . esc_html( $select_option['label'] ) . '</option>';
|
1977 |
+
}
|
1978 |
+
$output .= '</select>';
|
1979 |
+
}
|
1980 |
+
} else {
|
1981 |
+
// Create Required Plugin fields!
|
1982 |
+
$output .= $this->need_fts_premium_plugin_field( $required_plugins[$option['req_plugin']] );
|
1983 |
+
}
|
1984 |
+
$output .= '<div class="fts-clear"></div>';
|
1985 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
1986 |
+
|
1987 |
+
$output .= isset( $option['outer_wrap_class'] ) || isset( $option['outer_wrap_display'] ) ? '</div>' : '';
|
1988 |
+
|
1989 |
+
// Sub option output END?
|
1990 |
+
if ( isset( $option['sub_options_end'] ) ) {
|
1991 |
+
$output .= !is_numeric( $option['sub_options_end'] ) ? '</div>' : '';
|
1992 |
+
// Multiple Div needed?
|
1993 |
+
if ( is_numeric( $option['sub_options_end'] ) ) {
|
1994 |
+
$x = 1;
|
1995 |
+
while ($x <= $option['sub_options_end']) {
|
1996 |
+
$output .= '</div>';
|
1997 |
+
$x++;
|
1998 |
+
}
|
1999 |
+
}
|
2000 |
+
}
|
2001 |
+
}
|
2002 |
+
}
|
2003 |
+
$output .= $this->generate_shortcode( 'updateTextArea_' . $section . '();', $section_info['generator_title'], $section_info['generator_class'] );
|
2004 |
+
$output .= '</form>';
|
2005 |
+
|
2006 |
+
$output .= '</div> <!--/Section Wrap Class END (Main-Section-Div)-->';
|
2007 |
+
|
2008 |
+
// Premium Message Boxes!
|
2009 |
+
if ( isset( $section_info['premium_msg_boxes'] ) ) {
|
2010 |
+
foreach ( $section_info['premium_msg_boxes'] as $key => $premium_msg ) {
|
2011 |
+
if ( !is_plugin_active( $required_plugins[$premium_msg['req_plugin']]['plugin_url'] ) ) {
|
2012 |
+
$output .= '<div class="feed-them-social-admin-input-wrap fts-premium-options-message" id="not_active_' . esc_attr( $key ) . '"><a class="not-active-title" href="' . esc_url( $required_plugins[$premium_msg['req_plugin']]['slick_url'] ) . '" target="_blank">' .
|
2013 |
+
|
2014 |
+
wp_kses(
|
2015 |
+
$required_plugins[$premium_msg['req_plugin']]['name'],
|
2016 |
+
array(
|
2017 |
+
'h3' => array(),
|
2018 |
+
)
|
2019 |
+
) .
|
2020 |
+
|
2021 |
+
'</a>' . wp_kses(
|
2022 |
+
$premium_msg['msg'],
|
2023 |
+
array(
|
2024 |
+
'a' => array(
|
2025 |
+
'href' => array(),
|
2026 |
+
'title' => array(),
|
2027 |
+
'target' => array(),
|
2028 |
+
),
|
2029 |
+
'br' => array(),
|
2030 |
+
'em' => array(),
|
2031 |
+
'strong' => array(),
|
2032 |
+
'small' => array(),
|
2033 |
+
)
|
2034 |
+
) . '</div>';
|
2035 |
+
}
|
2036 |
+
}
|
2037 |
+
}
|
2038 |
+
}
|
2039 |
+
return $output;
|
2040 |
+
}
|
2041 |
+
|
2042 |
+
/**
|
2043 |
+
* FTS Facebook Page Form
|
2044 |
+
*
|
2045 |
+
* @param bool $save_options save options.
|
2046 |
+
* @since 1.9.6
|
2047 |
+
*/
|
2048 |
+
public function fts_facebook_page_form ($save_options = false)
|
2049 |
+
{
|
2050 |
+
$fts_fb_page_form_nonce = wp_create_nonce( 'fts-facebook-page-form-nonce' );
|
2051 |
+
|
2052 |
+
if ( wp_verify_nonce( $fts_fb_page_form_nonce, 'fts-facebook-page-form-nonce' ) ) {
|
2053 |
+
if ( $save_options ) {
|
2054 |
+
$fb_page_id_option = get_option( 'fb_page_id' );
|
2055 |
+
$fb_page_posts_displayed_option = get_option( 'fb_page_posts_displayed' );
|
2056 |
+
$fb_page_post_count_option = get_option( 'fb_page_post_count' );
|
2057 |
+
$fb_page_title_option = get_option( 'fb_page_title_option' );
|
2058 |
+
$fb_page_description_option = get_option( 'fb_page_description_option' );
|
2059 |
+
$fb_page_word_count_option = get_option( 'fb_page_word_count_option' );
|
2060 |
+
$fts_bar_fb_prefix = 'fb_page_';
|
2061 |
+
$fb_load_more_option = get_option( 'fb_page_fb_load_more_option' );
|
2062 |
+
$fb_load_more_style = get_option( 'fb_page_fb_load_more_style' );
|
2063 |
+
$facebook_popup = get_option( 'fb_page_facebook_popup' );
|
2064 |
+
}
|
2065 |
+
$output = '<div class="fts-facebook_page-shortcode-form">';
|
2066 |
+
if ( false === $save_options ) {
|
2067 |
+
$output = '<form class="feed-them-social-admin-form shortcode-generator-form fb-page-shortcode-form" id="fts-fb-page-form">';
|
2068 |
+
|
2069 |
+
// Check to see if token is in place otherwise show a message letting person no what they need to do!
|
2070 |
+
$facebook_options = get_option( 'fts_facebook_custom_api_token' ) ? 'Yes' : 'No';
|
2071 |
+
$output .= isset( $facebook_options ) && 'No' !== $facebook_options ? '' . "\n" : '<div class="feed-them-social-admin-input-wrap fts-required-token-message">Please get your Access Token on our <a href="admin.php?page=fts-facebook-feed-styles-submenu-page">Facebook Options</a> page.</div>' . "\n";
|
2072 |
+
// end custom message for requiring token!
|
2073 |
+
if ( is_plugin_active( 'feed-them-social-facebook-reviews/feed-them-social-facebook-reviews.php' ) ) {
|
2074 |
+
$facebook_options2 = get_option( 'fts_facebook_custom_api_token_biz' ) ? 'Yes' : 'No';
|
2075 |
+
// Check to see if token is in place otherwise show a message letting person no what they need to do
|
2076 |
+
// $output .= isset($facebook_options2) && $facebook_options2 !== 'No' ? '' . "\n" : '<div class="feed-them-social-admin-input-wrap fts-required-token-message">Please add a Facebook Page Reviews API Token to our <a href="admin.php?page=fts-facebook-feed-styles-submenu-page">Facebook Options</a> page before trying to view your Facebook Reviews feed.</div>' . "\n";
|
2077 |
+
// end custom message for requiring token!
|
2078 |
+
}
|
2079 |
+
|
2080 |
+
$output .= '<h2>' . esc_html( 'Facebook Page Shortcode Generator', 'feed-them-social' ) . '</h2>';
|
2081 |
+
}
|
2082 |
+
$fb_page_id_option = isset( $fb_page_id_option ) ? $fb_page_id_option : '';
|
2083 |
+
// ONLY SHOW SUPER GALLERY OPTIONS ON FTS SETTINGS PAGE FOR NOW, NOT FTS BAR!
|
2084 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
|
2085 |
+
// FACEBOOK FEED TYPE!
|
2086 |
+
$output .= '<div class="feed-them-social-admin-input-wrap" id="fts-social-selector">';
|
2087 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Feed Type', 'feed-them-social' ) . '</div>';
|
2088 |
+
$output .= '<select name="facebook-messages-selector" id="facebook-messages-selector" class="feed-them-social-admin-input">';
|
2089 |
+
$output .= '<option value="page">' . esc_html( 'Facebook Page', 'feed-them-social' ) . '</option>';
|
2090 |
+
$output .= '<option value="events">' . esc_html( 'Facebook Page List of Events', 'feed-them-social' ) . '</option>';
|
2091 |
+
$output .= '<option value="event">' . esc_html( 'Facebook Page Single Event Posts', 'feed-them-social' ) . '</option>';
|
2092 |
+
$output .= '<option value="group">' . esc_html( 'Facebook Group', 'feed-them-social' ) . '</option>';
|
2093 |
+
$output .= '<option value="album_photos">' . esc_html( 'Facebook Album Photos', 'feed-them-social' ) . '</option>';
|
2094 |
+
$output .= '<option value="albums">' . esc_html( 'Facebook Album Covers', 'feed-them-social' ) . '</option>';
|
2095 |
+
$output .= '<option value="album_videos">' . esc_html( 'Facebook Videos', 'feed-them-social' ) . '</option>';
|
2096 |
+
$output .= '<option value="reviews">' . esc_html( 'Facebook Page Reviews', 'feed-them-social' ) . '</option>';
|
2097 |
+
$output .= '</select>';
|
2098 |
+
$output .= '<div class="fts-clear"></div>';
|
2099 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2100 |
+
};
|
2101 |
+
// INSTRUCTIONAL TEXT FOR FACEBOOK TYPE SELECTION. PAGE, GROUP, EVENT, ALBUMS, ALBUM COVERS AND HASH TAGS!
|
2102 |
+
$output .= '<div class="instructional-text facebook-message-generator page inst-text-facebook-page" style="display:block;">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-facebook-page-vanity-url/" target="_blank">' . esc_html( 'Facebook Page ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below. You cannot use Personal Profiles it must be a Facebook Page. If your page ID looks something like, My-Page-Name-50043151918, only use the number portion, 50043151918.', 'feed-them-social' ) . ' <a href="https://feedthemsocial.com/?feedID=50043151918" target="_blank">' . esc_html( 'Test your Page ID on our demo', 'feed-them-social' ) . '</a></div>
|
2103 |
<div class="instructional-text facebook-message-generator group inst-text-facebook-group">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-facebook-group-id/" target="_blank">' . esc_html( 'Facebook Group ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>
|
2104 |
<div class="instructional-text facebook-message-generator event-list inst-text-facebook-event-list">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-facebook-event-id/" target="_blank">' . esc_html( 'Facebook Event ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below. PLEASE NOTE: This will only work with Facebook Page Events and you cannot have more than 25 events on Facebook.', 'feed-them-social' ) . '</div>
|
2105 |
<div class="instructional-text facebook-message-generator event inst-text-facebook-event">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-facebook-event-id/" target="_blank">' . esc_html( 'Facebook Event ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>
|
2106 |
<div class="instructional-text facebook-message-generator album_photos inst-text-facebook-album-photos">' . esc_html( 'To show a specific Album copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/docs/how-to-get-your-facebook-photo-gallery-id/" target="_blank">' . esc_html( 'Facebook Album ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the second input below. If you want to show all your uploaded photos leave the Album ID input blank.', 'feed-them-social' ) . '</div>
|
2107 |
<div class="instructional-text facebook-message-generator albums inst-text-facebook-albums">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/docs/how-to-get-your-facebook-photo-gallery-id/" target="_blank">' . esc_html( 'Facebook Album Covers ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>
|
2108 |
<div class="instructional-text facebook-message-generator video inst-text-facebook-video">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/docs/how-to-get-your-facebook-id-and-video-gallery-id" target="_blank">' . esc_html( 'Facebook ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>';
|
2109 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
|
2110 |
+
// this is for the facebook videos!
|
2111 |
+
$output .= '<div class="feed-them-social-admin-input-wrap fts-premium-options-message" style="display:none;"><a target="_blank" href="http://www.slickremix.com/downloads/feed-them-social-premium-extension/">Premium Version Required</a><br/>The Facebook video feed allows you to view your uploaded videos from facebook. See these great examples and options of all the different ways you can bring new life to your WordPress site!<br/><a href="https://feedthemsocial.com/facebook-videos-demo/" target="_blank">View Demo</a><br/><br/>Additionally if you purchase the Carousel Plugin you can showcase your videos in a slideshow or carousel. Works with your Facebook Photos too!<br/><a href="https://feedthemsocial.com/facebook-carousels/" target="_blank">View Carousel Demo</a> </div>';
|
2112 |
+
// this is for the facebook reviews!
|
2113 |
+
$output .= '<div class="feed-them-social-admin-input-wrap fts-premium-options-message2" style="display:none;"><a target="_blank" href="http://www.slickremix.com/downloads/feed-them-social-facebook-reviews/">Facebook Reviews Required</a><br/>The Facebook Reviews feed allows you to view all of the reviews people have made on your Facebook Page. See these great examples and options of all the different ways you can display your Facebook Page Reviews on your website. <a href="https://feedthemsocial.com/facebook-page-reviews-demo/" target="_blank">View Demo</a></div>';
|
2114 |
+
}
|
2115 |
+
// FACEBOOK PAGE ID!
|
2116 |
+
if ( isset( $_GET['page'] ) && 'fts-bar-settings-page' !== $_GET['page'] ) {
|
2117 |
+
$output .= '<div class="fb-options-wrap">';
|
2118 |
+
}
|
2119 |
+
$output .= '<div class="feed-them-social-admin-input-wrap fb_page_id ">';
|
2120 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Facebook ID (required)', 'feed-them-social' ) . '</div>';
|
2121 |
+
$output .= '<input type="text" name="fb_page_id" id="fb_page_id" class="feed-them-social-admin-input" value="' . esc_html( $fb_page_id_option ) . '" />';
|
2122 |
+
$output .= '<div class="fts-clear"></div>';
|
2123 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2124 |
+
// FACEBOOK ALBUM PHOTOS ID!
|
2125 |
+
$output .= '<div class="feed-them-social-admin-input-wrap fb_album_photos_id" style="display:none;">';
|
2126 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Album ID ', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Leave blank to show all uploaded photos', 'feed-them-social' ) . '</small></div>';
|
2127 |
+
$output .= '<input type="text" name="fb_album_id" id="fb_album_id" class="feed-them-social-admin-input" value="" />';
|
2128 |
+
$output .= '<div class="fts-clear"></div>';
|
2129 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2130 |
+
$fb_page_posts_displayed_option = isset( $fb_page_posts_displayed_option ) ? $fb_page_posts_displayed_option : '';
|
2131 |
+
// FACEBOOK PAGE POST TYPE VISIBLE!
|
2132 |
+
$output .= '<div class="feed-them-social-admin-input-wrap facebook-post-type-visible">';
|
2133 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Post Type Visible', 'feed-them-social' ) . '</div>';
|
2134 |
+
$output .= '<select name="fb_page_posts_displayed" id="fb_page_posts_displayed" class="feed-them-social-admin-input">';
|
2135 |
+
$output .= '<option ' . selected( $fb_page_posts_displayed_option, 'page_only', false ) . ' value="page_only">' . esc_html( 'Display Posts made by Page only', 'feed-them-social' ) . '</option>';
|
2136 |
+
$output .= '<option ' . selected( $fb_page_posts_displayed_option, 'page_and_others', false ) . ' value="page_and_others">' . esc_html( 'Display Posts made by Page and Others', 'feed-them-social' ) . '</option>';
|
2137 |
+
$output .= '</select>';
|
2138 |
+
$output .= '<div class="fts-clear"></div>';
|
2139 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2140 |
+
|
2141 |
+
$fb_page_post_count_option = isset( $fb_page_post_count_option ) ? $fb_page_post_count_option : '';
|
2142 |
+
$output .= '<div class="feed-them-social-admin-input-wrap">';
|
2143 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( '# of Posts', 'feed-them-premium' );
|
2144 |
+
|
2145 |
+
if ( !is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) || !is_plugin_active( 'feed-them-social-facebook-reviews/feed-them-social-facebook-reviews.php' ) ) {
|
2146 |
+
$output .= '<br/><small>' . esc_html( 'More than 6 Requires <a target="_blank" href="http://www.slickremix.com/downloads/feed-them-social-premium-extension/">Premium version</a>', 'feed-them-premium' ) . '</small>';
|
2147 |
+
}
|
2148 |
+
$output .= '</div>';
|
2149 |
+
$output .= '<input type="text" name="fb_page_post_count" id="fb_page_post_count" class="feed-them-social-admin-input" value="' . esc_html( $fb_page_post_count_option ) . '" placeholder="5 ' . esc_html( 'is the default number', 'feed-them-premium' ) . '" />';
|
2150 |
+
$output .= '<div class="fts-clear"></div>';
|
2151 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2152 |
+
|
2153 |
+
// ONLY SHOW SUPER GALLERY OPTIONS ON FTS SETTINGS PAGE FOR NOW, NOT FTS BAR!
|
2154 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
|
2155 |
+
// FACEBOOK HEIGHT OPTION!
|
2156 |
+
$output .= '<div class="feed-them-social-admin-input-wrap twitter_name fixed_height_option">';
|
2157 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Facebook Fixed Height', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Leave blank for auto height', 'feed-them-social' ) . '</small></div>';
|
2158 |
+
$output .= '<input type="text" name="facebook_page_height" id="facebook_page_height" class="feed-them-social-admin-input" value="" placeholder="450px ' . esc_html( 'for example', 'feed-them-social' ) . '" />';
|
2159 |
+
$output .= '<div class="fts-clear"></div>';
|
2160 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2161 |
+
}
|
2162 |
+
|
2163 |
+
if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) && !is_plugin_active( 'feed-them-social-facebook-reviews/feed-them-social-facebook-reviews.php' ) ) {
|
2164 |
+
|
2165 |
+
include $this->premium . 'admin/facebook-page-settings-fields.php';
|
2166 |
+
if ( isset( $_GET['page'] ) && 'fts-bar-settings-page' === $_GET['page'] ) {
|
2167 |
+
// PREMIUM LOAD MORE SETTINGS & LOADS in FTS BAR!
|
2168 |
+
include $this->premium . 'admin/facebook-loadmore-settings-fields.php';
|
2169 |
+
}
|
2170 |
+
} elseif ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) && is_plugin_active( 'feed-them-social-facebook-reviews/feed-them-social-facebook-reviews.php' ) ) {
|
2171 |
+
|
2172 |
+
// these are the new options for reviews only!
|
2173 |
+
include $this->facebook_reviews . 'admin/facebook-review-settings-fields.php';
|
2174 |
+
|
2175 |
+
include $this->premium . 'admin/facebook-page-settings-fields.php';
|
2176 |
+
if ( isset( $_GET['page'] ) && 'fts-bar-settings-page' === $_GET['page'] ) {
|
2177 |
+
// PREMIUM LOAD MORE SETTINGS & LOADS in FTS BAR!
|
2178 |
+
include $this->premium . 'admin/facebook-loadmore-settings-fields.php';
|
2179 |
+
}
|
2180 |
+
} elseif ( is_plugin_active( 'feed-them-social-facebook-reviews/feed-them-social-facebook-reviews.php' ) && !is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
|
2181 |
+
// include($this->facebook_reviews.'admin/facebook-page-settings-fields.php');
|
2182 |
+
// these are the new options for reviews only!
|
2183 |
+
include $this->facebook_reviews . 'admin/facebook-review-settings-fields.php';
|
2184 |
+
|
2185 |
+
// these are the additional options only for reviews from premium!
|
2186 |
+
include $this->facebook_reviews . 'admin/facebook-loadmore-settings-fields.php';
|
2187 |
+
|
2188 |
+
// Create Need Premium Fields!
|
2189 |
+
$fields = array(
|
2190 |
+
esc_html( 'Show the Page Title', 'feed-them-social' ),
|
2191 |
+
esc_html( 'Align Title', 'feed-them-social' ),
|
2192 |
+
esc_html( 'Show the Page Description', 'feed-them-social' ),
|
2193 |
+
esc_html( 'Amount of words per post', 'feed-them-social' ),
|
2194 |
+
esc_html( 'Load More Posts', 'feed-them-social' ),
|
2195 |
+
esc_html( 'Display Photos in Popup', 'feed-them-social' ),
|
2196 |
+
esc_html( 'Display Posts in Grid', 'feed-them-social' ),
|
2197 |
+
esc_html( 'Center Grid', 'feed-them-social' ),
|
2198 |
+
esc_html( 'Grid Stack Animation', 'feed-them-social' ),
|
2199 |
+
esc_html( 'Hide Like Button or Box', 'feed-them-social' ),
|
2200 |
+
esc_html( 'Like Box Width', 'feed-them-social' ),
|
2201 |
+
esc_html( 'Position Like Box', 'feed-them-social' ),
|
2202 |
+
esc_html( 'Align Like Button or Box', 'feed-them-social' ),
|
2203 |
+
);
|
2204 |
+
$output .= '<div class="need-for-premium-fields-wrap">';
|
2205 |
+
$output .= $this->need_fts_premium_fields( $fields );
|
2206 |
+
$output .= '</div>';
|
2207 |
+
} else {
|
2208 |
+
|
2209 |
+
// Create Need Premium Fields!
|
2210 |
+
$fields = array(
|
2211 |
+
esc_html( 'Show the Page Title', 'feed-them-social' ),
|
2212 |
+
esc_html( 'Align Title', 'feed-them-social' ),
|
2213 |
+
esc_html( 'Show the Page Description', 'feed-them-social' ),
|
2214 |
+
esc_html( 'Amount of words per post', 'feed-them-social' ),
|
2215 |
+
esc_html( 'Load More Posts', 'feed-them-social' ),
|
2216 |
+
esc_html( 'Display Photos in Popup', 'feed-them-social' ),
|
2217 |
+
esc_html( 'Display Posts in Grid', 'feed-them-social' ),
|
2218 |
+
esc_html( 'Center Grid', 'feed-them-social' ),
|
2219 |
+
esc_html( 'Grid Stack Animation', 'feed-them-social' ),
|
2220 |
+
esc_html( 'Hide Like Button or Box', 'feed-them-social' ),
|
2221 |
+
esc_html( 'Like Box Width', 'feed-them-social' ),
|
2222 |
+
esc_html( 'Position Like Box', 'feed-them-social' ),
|
2223 |
+
esc_html( 'Align Like Button or Box', 'feed-them-social' ),
|
2224 |
+
);
|
2225 |
+
$output .= $this->need_fts_premium_fields( $fields );
|
2226 |
+
}
|
2227 |
+
// ONLY SHOW SUPER GALLERY OPTIONS ON FTS SETTINGS PAGE FOR NOW, NOT FTS BAR!
|
2228 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
|
2229 |
+
// SUPER FACEBOOK GALLERY OPTIONS!
|
2230 |
+
$output .= '<div class="fts-super-facebook-options-wrap" style="display:none">';
|
2231 |
+
// FACEBOOK IMAGE HEIGHT!
|
2232 |
+
$output .= '<div class="feed-them-social-admin-input-wrap facebook_name"><div class="feed-them-social-admin-input-label">' . esc_html( 'Facebook Image Width', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Max width is 640px', 'feed-them-social' ) . '</small></div>
|
2233 |
<input type="text" name="fts-slicker-instagram-container-image-width" id="fts-slicker-facebook-container-image-width" class="feed-them-social-admin-input" value="250px" placeholder="">
|
2234 |
<div class="fts-clear"></div> </div>';
|
2235 |
+
// FACEBOOK IMAGE WIDTH!
|
2236 |
+
$output .= '<div class="feed-them-social-admin-input-wrap facebook_name"><div class="feed-them-social-admin-input-label">' . esc_html( 'Facebook Image Height', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Max width is 640px', 'feed-them-social' ) . '</small></div>
|
2237 |
<input type="text" name="fts-slicker-instagram-container-image-height" id="fts-slicker-facebook-container-image-height" class="feed-them-social-admin-input" value="250px" placeholder="">
|
2238 |
<div class="fts-clear"></div> </div>';
|
2239 |
+
// FACEBOOK SPACE BETWEEN PHOTOS!
|
2240 |
+
$output .= '<div class="feed-them-social-admin-input-wrap facebook_name"><div class="feed-them-social-admin-input-label">' . esc_html( 'The space between photos', 'feed-them-social' ) . '</div>
|
2241 |
<input type="text" name="fts-slicker-facebook-container-margin" id="fts-slicker-facebook-container-margin" class="feed-them-social-admin-input" value="1px" placeholder="">
|
2242 |
<div class="fts-clear"></div></div>';
|
2243 |
+
// HIDE DATES, LIKES AND COMMENTS ETC!
|
2244 |
+
$output .= '<div class="feed-them-social-admin-input-wrap facebook_name"><div class="feed-them-social-admin-input-label">' . esc_html( 'Hide Date, Likes and Comments', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Good for image sizes under 120px', 'feed-them-social' ) . '</small></div>
|
2245 |
<select id="fts-slicker-facebook-container-hide-date-likes-comments" name="fts-slicker-facebook-container-hide-date-likes-comments" class="feed-them-social-admin-input">
|
2246 |
<option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2247 |
|
2248 |
+
// CENTER THE FACEBOOK CONTAINER!
|
2249 |
+
$output .= '<div class="feed-them-social-admin-input-wrap" id="facebook_super_gallery_container"><div class="feed-them-social-admin-input-label">' . esc_html( 'Center Facebook Container', 'feed-them-social' ) . '</div>
|
2250 |
<select id="fts-slicker-facebook-container-position" name="fts-slicker-facebook-container-position" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2251 |
+
// ANIMATE PHOTO POSITIONING!
|
2252 |
+
$output .= ' <div class="feed-them-social-admin-input-wrap" id="facebook_super_gallery_animate"><div class="feed-them-social-admin-input-label">' . esc_html( 'Image Stacking Animation On', 'feed-them-social' ) . '<br/><small>' . esc_html( 'This happens when resizing browsert', 'feed-them-social' ) . '</small></div>
|
2253 |
<select id="fts-slicker-facebook-container-animation" name="fts-slicker-facebook-container-animation" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2254 |
+
// POSITION IMAGE LEFT RIGHT!
|
2255 |
+
$output .= '<div class="instructional-text" style="display: block;">' . esc_html( 'These options allow you to make the thumbnail larger if you do not want to see black bars above or below your photos.', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/docs/fit-thumbnail-on-facebook-galleries/" target="_blank">' . esc_html( 'View Examples', 'feed-them-social' ) . '</a> ' . esc_html( 'and simple details or leave default options.', 'feed-them-social' ) . '</div>
|
2256 |
<div class="feed-them-social-admin-input-wrap facebook_name"><div class="feed-them-social-admin-input-label">' . esc_html( 'Make photo larger', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Helps with blackspace', 'feed-them-social' ) . '</small></div>
|
2257 |
<input type="text" id="fts-slicker-facebook-image-position-lr" name="fts-slicker-facebook-image-position-lr" class="feed-them-social-admin-input" value="-0%" placeholder="eg. -50%. -0% ' . esc_html( 'is default', 'feed-them-social' ) . '">
|
2258 |
<div class="fts-clear"></div></div>';
|
2259 |
+
// POSITION IMAGE TOP!
|
2260 |
+
$output .= ' <div class="feed-them-social-admin-input-wrap facebook_name"><div class="feed-them-social-admin-input-label">' . esc_html( 'Image Position Top', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Helps center image', 'feed-them-social' ) . '</small></div>
|
2261 |
<input type="text" id="fts-slicker-facebook-image-position-top" name="fts-slicker-facebook-image-position-top" class="feed-them-social-admin-input" value="-0%" placeholder="eg. -10%. -0% ' . esc_html( 'is default', 'feed-them-social' ) . '">
|
2262 |
<div class="fts-clear"></div></div>';
|
2263 |
+
$output .= '</div><!--fts-super-facebook-options-wrap-->';
|
2264 |
+
|
2265 |
+
if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
|
2266 |
+
// PREMIUM LOAD MORE SETTINGS!
|
2267 |
+
include $this->premium . 'admin/facebook-loadmore-settings-fields.php';
|
2268 |
+
}
|
2269 |
+
|
2270 |
+
// Slideshow Carousel Options!
|
2271 |
+
$output .= '<div class="slideshow-wrap" style="display: none;">';
|
2272 |
+
$output .= '<div class="instructional-text" style="display: block;">' . esc_html( 'Create a Carousel or Slideshow with these options.', 'feed-them-social' ) . ' <a href="https://feedthemsocial.com/facebook-carousels-or-sliders/" target="_blank">' . esc_html( 'View Demos', 'feed-them-social' ) . '</a> ' . esc_html( 'and copy easy to use shortcode examples.', 'feed-them-social' ) . '</div>';
|
2273 |
+
|
2274 |
+
if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) && is_plugin_active( 'feed-them-carousel-premium/feed-them-carousel-premium.php' ) ) {
|
2275 |
+
include $this->facebook_carousel_premium . 'admin/facebook-carousel-options-settings-page.php';
|
2276 |
+
} else {
|
2277 |
+
// if slider plugin is active!
|
2278 |
+
$output .= '<div class="feed-them-social-admin-input-wrap facebook_name"><div class="feed-them-social-admin-input-label">' . esc_html( 'Carousel or Slideshow', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Many more options when active', 'feed-them-social' ) . '</small></div>
|
2279 |
<div class="feed-them-social-admin-input-default" style="display: block !important;">' . esc_html( 'Must have ', 'feed-them-social' ) . ' <a target="_blank" href="http://www.slickremix.com/downloads/feed-them-social-premium-extension/">' . esc_html( 'premium', 'feed-them-social' ) . '</a> ' . esc_html( 'and', 'feed-them-social' ) . ' <a target="_blank" href="http://www.slickremix.com/downloads/feed-them-carousel-premium/">' . esc_html( 'carousel', 'feed-them-social' ) . '</a> ' . esc_html( 'plugin ', 'feed-them-social' ) . '</a> ' . esc_html( 'to edit.', 'feed-them-social' ) . '</div> <div class="fts-clear"></div></div>';
|
2280 |
+
}
|
2281 |
+
|
2282 |
+
// end slideshow wrap!
|
2283 |
+
$output .= '</div>';
|
2284 |
+
|
2285 |
+
}
|
2286 |
+
if ( $save_options ) {
|
2287 |
+
$output .= '<input type="submit" class="feed-them-social-admin-submit-btn" value="Save Changes" />';
|
2288 |
+
} else {
|
2289 |
+
$output .= $this->generate_shortcode( 'updateTextArea_fb_page();', 'Facebook Page Feed Shortcode', 'facebook-page-final-shortcode' );
|
2290 |
+
if ( isset( $_GET['page'] ) && 'fts-bar-settings-page' !== $_GET['page'] ) {
|
2291 |
+
$output .= '</div>';
|
2292 |
+
// END fb-options-wrap!
|
2293 |
+
}
|
2294 |
+
$output .= '</form>';
|
2295 |
+
}
|
2296 |
+
$output .= '</div><!--/fts-facebook_page-shortcode-form-->';
|
2297 |
+
}
|
2298 |
+
return $output;
|
2299 |
+
}
|
2300 |
+
|
2301 |
+
/**
|
2302 |
+
* FTS Twitter Form
|
2303 |
+
*
|
2304 |
+
* @param bool $save_options save options.
|
2305 |
+
* @since 1.9.6
|
2306 |
+
*/
|
2307 |
+
public function fts_twitter_form ($save_options = false)
|
2308 |
+
{
|
2309 |
+
$fts_twitter_form_nonce = wp_create_nonce( 'fts-twitter-form-nonce' );
|
2310 |
+
|
2311 |
+
if ( wp_verify_nonce( $fts_twitter_form_nonce, 'fts-twitter-form-nonce' ) ) {
|
2312 |
+
|
2313 |
+
if ( $save_options ) {
|
2314 |
+
$twitter_name_option = get_option( 'twitter_name' );
|
2315 |
+
$tweets_count_option = get_option( 'tweets_count' );
|
2316 |
+
$twitter_popup_option = get_option( 'twitter_popup_option' );
|
2317 |
+
$twitter_hashtag_etc_name = get_option( 'twitter_hashtag_etc_name' );
|
2318 |
+
$twitter_load_more_option = get_option( 'twitter_load_more_option' );
|
2319 |
+
}
|
2320 |
+
|
2321 |
+
$twitter_name_option = isset( $twitter_name_option ) ? $twitter_name_option : '';
|
2322 |
+
$tweets_count_option = isset( $tweets_count_option ) ? $tweets_count_option : '';
|
2323 |
+
$twitter_hashtag_etc_name = isset( $twitter_hashtag_etc_name ) ? $twitter_hashtag_etc_name : '';
|
2324 |
+
$output = '<div class="fts-twitter-shortcode-form">';
|
2325 |
+
if ( false === $save_options ) {
|
2326 |
+
$output .= '<form class="feed-them-social-admin-form shortcode-generator-form twitter-shortcode-form" id="fts-twitter-form">';
|
2327 |
+
|
2328 |
+
// Check to see if token is in place otherwise show a message letting person no what they need to do!
|
2329 |
+
$twitter_options4 = get_option( 'fts_twitter_custom_access_token_secret' ) ? 'Yes' : 'No';
|
2330 |
+
$output .= isset( $twitter_options4 ) && 'No' !== $twitter_options4 ? '' . "\n" : '<div class="feed-them-social-admin-input-wrap fts-required-token-message">Please add Twitter API Tokens to our <a href="admin.php?page=fts-twitter-feed-styles-submenu-page">Twitter Options</a> page before trying to view your feed.</div>' . "\n";
|
2331 |
+
// end custom message for requiring token!
|
2332 |
+
$output .= '<h2>' . esc_html( 'Twitter Shortcode Generator', 'feed-them-social' ) . '</h2>';
|
2333 |
+
}
|
2334 |
+
|
2335 |
+
// TWITTER FEED TYPE!
|
2336 |
+
$output .= '<div class="feed-them-social-admin-input-wrap twitter-gen-selection">';
|
2337 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Feed Type', 'feed-them-social' ) . '</div>';
|
2338 |
+
$output .= '<select name="twitter-messages-selector" id="twitter-messages-selector" class="feed-them-social-admin-input">';
|
2339 |
+
$output .= '<option value="user">' . esc_html( 'User Feed', 'feed-them-social' ) . '</option>';
|
2340 |
+
$output .= '<option value="hashtag">' . esc_html( '#hashtag, @person, or single words', 'feed-them-social' ) . '</option>';
|
2341 |
+
$output .= '</select>';
|
2342 |
+
$output .= '<div class="fts-clear"></div>';
|
2343 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2344 |
+
|
2345 |
+
$output .= '<div class="twitter-hashtag-etc-wrap">';
|
2346 |
+
$output .= '<h3>' . esc_html( 'Twitter Search', 'feed-them-social' ) . '</h3>';
|
2347 |
+
$output .= '<div class="instructional-text">';
|
2348 |
+
$output .= sprintf(
|
2349 |
+
esc_html( 'You can use #hashtag, @person, or single words. For example, weather or weather-channel.%1$sIf you want to filter a specific users hashtag copy this example into the first input below and replace the user_name and YourHashtag name. DO NOT remove the from: or %# characters. NOTE: Only displays last 7 days worth of Tweets. %2$sfrom:user_name%#YourHashtag%3$s', 'feed-them-social' ),
|
2350 |
+
'<br/><br/>',
|
2351 |
+
'<strong style="color:#225DE2;">',
|
2352 |
+
'</strong>'
|
2353 |
+
);
|
2354 |
+
$output .= '</div>';
|
2355 |
+
$output .= '<div class="feed-them-social-admin-input-wrap twitter_hashtag_etc_name">';
|
2356 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Twitter Search Name (required)', 'feed-them-social' ) . '</div>';
|
2357 |
+
$output .= '<input type="text" name="twitter_hashtag_etc_name" id="twitter_hashtag_etc_name" class="feed-them-social-admin-input" value="' . esc_html( $twitter_hashtag_etc_name ) . '" />';
|
2358 |
+
$output .= '<div class="fts-clear"></div>';
|
2359 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2360 |
+
$output .= '</div><!--/twitter-hashtag-etc-wrap-->';
|
2361 |
+
|
2362 |
+
$output .= '<div class="instructional-text"><span class="hashtag-option-small-text">' . esc_html( 'Twitter Name is only required if you want to show a', 'feed-them-social' ) . ' <a href="admin.php?page=fts-twitter-feed-styles-submenu-page">' . esc_html( 'Follow Button', 'feed-them-social' ) . '</a>.</span><span class="must-copy-twitter-name">' . esc_html( 'You must copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-twitter-name/" target="_blank">' . esc_html( 'Twitter Name', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</span></div>';
|
2363 |
+
$output .= '<div class="feed-them-social-admin-input-wrap twitter_name">';
|
2364 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Twitter Name', 'feed-them-social' ) . ' <span class="hashtag-option-not-required">' . esc_html( '(required)', 'feed-them-social' ) . '</span></div>';
|
2365 |
+
$output .= '<input type="text" name="twitter_name" id="twitter_name" class="feed-them-social-admin-input" value="' . esc_html( $twitter_name_option ) . '" />';
|
2366 |
+
$output .= '<div class="fts-clear"></div>';
|
2367 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2368 |
+
|
2369 |
+
$output .= '<div class="feed-them-social-admin-input-wrap">';
|
2370 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( '# of Tweets (optional)', 'feed-them-premium' );
|
2371 |
+
if ( !is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
|
2372 |
+
$output .= sprintf(
|
2373 |
+
esc_html( '%1$s More than 6 Requires the %2$sPremium Extension%3$s', 'feed-them-social' ),
|
2374 |
+
'<br/><small>',
|
2375 |
+
'<a target="_blank" href="' . esc_url( 'http://www.slickremix.com/downloads/feed-them-social-premium-extension/' ) . '">',
|
2376 |
+
'</a></small>'
|
2377 |
+
);
|
2378 |
+
}
|
2379 |
+
$output .= '</div>';
|
2380 |
+
$output .= '<input type="text" name="tweets_count" id="tweets_count" placeholder="5 is the default number" class="feed-them-social-admin-input" value="' . esc_html( $tweets_count_option ) . '" />';
|
2381 |
+
$output .= '<div class="fts-clear"></div>';
|
2382 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2383 |
+
|
2384 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
|
2385 |
+
$output .= '<div class="feed-them-social-admin-input-wrap">';
|
2386 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Twitter Fixed Height', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Leave blank for auto height', 'feed-them-social' ) . '</small></div>';
|
2387 |
+
$output .= '<input type="text" name="twitter_height" id="twitter_height" class="feed-them-social-admin-input" value="" placeholder="450px ' . esc_html( 'for example', 'feed-them-social' ) . '" />';
|
2388 |
+
$output .= '<div class="fts-clear"></div>';
|
2389 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2390 |
+
}
|
2391 |
+
|
2392 |
+
$output .= '<div class="feed-them-social-admin-input-wrap">';
|
2393 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Show Retweets', 'feed-them-social' ) . '</div>';
|
2394 |
+
$output .= '<select name="twitter-show-retweets" id="twitter-show-retweets" class="feed-them-social-admin-input">';
|
2395 |
+
$output .= '<option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option>';
|
2396 |
+
$output .= '<option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option>';
|
2397 |
+
$output .= '</select>';
|
2398 |
+
$output .= '<div class="fts-clear"></div>';
|
2399 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2400 |
+
|
2401 |
+
if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
|
2402 |
+
include $this->premium . 'admin/twitter-settings-fields.php';
|
2403 |
+
} else {
|
2404 |
+
// Create Need Premium Fields!
|
2405 |
+
$fields = array(
|
2406 |
+
__( 'Display Photos in Popup', 'feed-them-social' ),
|
2407 |
+
);
|
2408 |
+
$output .= $this->need_fts_premium_fields( $fields );
|
2409 |
+
}
|
2410 |
+
if ( $save_options ) {
|
2411 |
+
$output .= '<input type="submit" class="feed-them-social-admin-submit-btn" value="' . esc_html( 'Save Changes', 'feed-them-social' ) . '" />';
|
2412 |
+
} else {
|
2413 |
+
$output .= $this->generate_shortcode( 'updateTextArea_twitter();', 'Twitter Feed Shortcode', 'twitter-final-shortcode' );
|
2414 |
+
$output .= '</form>';
|
2415 |
+
}
|
2416 |
+
$output .= '</div><!--/fts-twitter-shortcode-form-->';
|
2417 |
+
}
|
2418 |
+
|
2419 |
+
return $output;
|
2420 |
+
}
|
2421 |
+
|
2422 |
+
/**
|
2423 |
+
* FTS Instagram Form
|
2424 |
+
*
|
2425 |
+
* @param bool $save_options save options.
|
2426 |
+
* @since 1.9.7
|
2427 |
+
*/
|
2428 |
+
public function fts_instagram_form ($save_options = false)
|
2429 |
+
{
|
2430 |
+
$fts_instagram_form_nonce = wp_create_nonce( 'fts-instagram-form-nonce' );
|
2431 |
+
|
2432 |
+
if ( wp_verify_nonce( $fts_instagram_form_nonce, 'fts-instagram-form-nonce' ) ) {
|
2433 |
+
|
2434 |
+
if ( $save_options ) {
|
2435 |
+
$instagram_name_option = get_option( 'convert_instagram_username' );
|
2436 |
+
$instagram_id_option = get_option( 'instagram_id' );
|
2437 |
+
$pics_count_option = get_option( 'pics_count' );
|
2438 |
+
$instagram_popup_option = get_option( 'instagram_popup_option' );
|
2439 |
+
$instagram_load_more_option = get_option( 'instagram_load_more_option' );
|
2440 |
+
}
|
2441 |
+
$output = '<div class="fts-instagram-shortcode-form">';
|
2442 |
+
if ( false === $save_options ) {
|
2443 |
+
$output .= '<form class="feed-them-social-admin-form shortcode-generator-form instagram-shortcode-form" id="fts-instagram-form">';
|
2444 |
+
|
2445 |
+
// Check to see if token is in place otherwise show a message letting person no what they need to do!
|
2446 |
+
$instagram_options = get_option( 'fts_instagram_custom_api_token' ) ? 'Yes' : 'No';
|
2447 |
+
$output .= isset( $instagram_options ) && 'No' !== $instagram_options ? '' . "\n" : '<div class="feed-them-social-admin-input-wrap fts-required-token-message">Please get your Access Token on the <a href="admin.php?page=fts-instagram-feed-styles-submenu-page">Instagram Options</a> page or you won\'t be able to view your photos.</div>' . "\n";
|
2448 |
+
// end custom message for requiring token!
|
2449 |
+
// ONLY SHOW SUPER GALLERY OPTIONS ON FTS SETTINGS PAGE FOR NOW, NOT FTS BAR!
|
2450 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
|
2451 |
+
// INSTAGRAM FEED TYPE!
|
2452 |
+
$output .= '<h2>' . esc_html( 'Instagram Shortcode Generator', 'feed-them-social' ) . '</h2><div class="feed-them-social-admin-input-wrap instagram-gen-selection">';
|
2453 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Feed Type', 'feed-them-social' ) . '</div>';
|
2454 |
+
$output .= '<select name="instagram-messages-selector" id="instagram-messages-selector" class="feed-them-social-admin-input">';
|
2455 |
+
$output .= '<option value="user">' . esc_html( 'User Feed', 'feed-them-social' ) . '</option>';
|
2456 |
+
$output .= '<option value="hashtag">' . esc_html( 'Hashtag Feed', 'feed-them-social' ) . '</option>';
|
2457 |
+
$output .= '</select>';
|
2458 |
+
$output .= '<div class="fts-clear"></div>';
|
2459 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2460 |
+
};
|
2461 |
+
$output .= '<div class="instagram-id-option-wrap">';
|
2462 |
+
$output .= '<h3>' . esc_html( 'Convert Instagram Name to ID', 'feed-them-social' ) . '</h3>';
|
2463 |
+
}
|
2464 |
+
$instagram_name_option = isset( $instagram_name_option ) ? $instagram_name_option : '';
|
2465 |
+
$instagram_id_option = isset( $instagram_id_option ) ? $instagram_id_option : '';
|
2466 |
+
$output .= '<div class="instructional-text">' . esc_html( 'You must copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-instagram-name-and-convert-to-id/" target="_blank">' . esc_html( 'Instagram Name', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below', 'feed-them-social' ) . '</div>';
|
2467 |
+
$output .= '<div class="feed-them-social-admin-input-wrap convert_instagram_username">';
|
2468 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Instagram Name (required)', 'feed-them-social' ) . '</div>';
|
2469 |
+
$output .= '<input type="text" id="convert_instagram_username" name="convert_instagram_username" class="feed-them-social-admin-input" value="' . esc_html( $instagram_name_option ) . '" />';
|
2470 |
+
$output .= '<div class="fts-clear"></div>';
|
2471 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2472 |
+
$output .= '<input type="button" class="feed-them-social-admin-submit-btn" value="' . esc_html( 'Convert Instagram Username', 'feed-them-social' ) . '" onclick="converter_instagram_username();" tabindex="4" style="margin-right:1em;" />';
|
2473 |
+
// ONLY THIS DIV IF ON OUR SETTINGS PAGE!
|
2474 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
|
2475 |
+
$output .= '</div><!--instagram-id-option-wrap-->';
|
2476 |
+
};
|
2477 |
+
if ( false === $save_options ) {
|
2478 |
+
$output .= '</form>';
|
2479 |
+
}
|
2480 |
+
if ( false === $save_options ) {
|
2481 |
+
$output .= '<form class="feed-them-social-admin-form shortcode-generator-form instagram-shortcode-form">';
|
2482 |
+
}
|
2483 |
+
$output .= '<div class="instructional-text instagram-user-option-text" style="margin-top:12px;"><div class="fts-insta-info-plus-wrapper">' . esc_html( 'Choose a different ID if yours is not the first name below after clicking Convert Instagram Username button.', 'feed-them-social' ) . '</div><!-- the li list comes from an ajax call after looking up the user ID --><ul id="fts-instagram-username-picker-wrap" class="fts-instagram-username-picker-wrap"></ul></div>';
|
2484 |
+
$output .= '<div class="instructional-text instagram-hashtag-option-text" style="display:none;margin-top:12px;">' . esc_html( 'Add your Hashtag below. Do not add the #, just the name.', 'feed-them-social' ) . '</div>';
|
2485 |
+
$output .= '<div class="feed-them-social-admin-input-wrap instagram_name">';
|
2486 |
+
$output .= '<div class="feed-them-social-admin-input-label instagram-user-option-text">' . esc_html( 'Instagram ID # (required)', 'feed-them-social' ) . '</div>';
|
2487 |
+
$output .= '<div class="feed-them-social-admin-input-label instagram-hashtag-option-text" style="display:none;">' . esc_html( 'Hashtag (required)', 'feed-them-social' ) . '</div>';
|
2488 |
+
$output .= '<input type="text" name="instagram_id" id="instagram_id" class="feed-them-social-admin-input" value="' . esc_html( $instagram_id_option ) . '" />';
|
2489 |
+
$output .= '<div class="fts-clear"></div>';
|
2490 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2491 |
+
// Super Instagram Options!
|
2492 |
+
$pics_count_option = isset( $pics_count_option ) ? $pics_count_option : '';
|
2493 |
+
// Pic Count Option!
|
2494 |
+
$output .= '<div class="feed-them-social-admin-input-wrap">';
|
2495 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( '# of Pics (optional)', 'feed-them-premium' );
|
2496 |
+
if ( !is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
|
2497 |
+
$output .= sprintf(
|
2498 |
+
esc_html( '%1$s More than 6 Requires the %2$sPremium Extension%3$s', 'feed-them-social' ),
|
2499 |
+
'<br/><small>',
|
2500 |
+
'<a target="_blank" href="' . esc_url( 'http://www.slickremix.com/downloads/feed-them-social-premium-extension/' ) . '">',
|
2501 |
+
'</a></small>'
|
2502 |
+
);
|
2503 |
+
}
|
2504 |
+
$output .= '</div>';
|
2505 |
+
$output .= '<input type="text" name="pics_count" id="pics_count" class="feed-them-social-admin-input" value="' . esc_html( $pics_count_option ) . '" placeholder="6 is the default number" />';
|
2506 |
+
$output .= '<div class="fts-clear"></div>';
|
2507 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2508 |
+
|
2509 |
+
if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
|
2510 |
+
|
2511 |
+
$output .= '<div class="feed-them-social-admin-input-wrap">';
|
2512 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Super Instagram Gallery', 'feed-them-social' ) . '</div>';
|
2513 |
+
$output .= '<select id="instagram-custom-gallery" name="instagram-custom-gallery" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select>';
|
2514 |
+
$output .= '<div class="fts-clear"></div>';
|
2515 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2516 |
+
$output .= '<div class="feed-them-social-admin-input-wrap"><div class="feed-them-social-admin-input-label">' . esc_html( 'Instagram Image Size', 'feed-them-social' ) . '<br/><small><a href="https://feedthemsocial.com/instagram-feed-demo/" target="_blank">' . esc_html( 'View demo', 'feed-them-social' ) . '</a></small></div>
|
2517 |
<input type="text" name="fts-slicker-instagram-container-image-size" id="fts-slicker-instagram-container-image-size" class="feed-them-social-admin-input" value="250px" placeholder="">
|
2518 |
<div class="fts-clear"></div> </div>';
|
2519 |
+
$output .= '<div class="feed-them-social-admin-input-wrap"><div class="feed-them-social-admin-input-label">' . esc_html( 'Size of the Instagram Icon', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Visible when you hover over photo', 'feed-them-social' ) . '</small></div>
|
2520 |
<input type="text" name="fts-slicker-instagram-icon-center" id="fts-slicker-instagram-icon-center" class="feed-them-social-admin-input" value="65px" placeholder="">
|
2521 |
<div class="fts-clear"></div></div>';
|
2522 |
+
$output .= '<div class="feed-them-social-admin-input-wrap"><div class="feed-them-social-admin-input-label">' . esc_html( 'The space between photos', 'feed-them-social' ) . '</div>
|
2523 |
<input type="text" name="fts-slicker-instagram-container-margin" id="fts-slicker-instagram-container-margin" class="feed-them-social-admin-input" value="1px" placeholder="">
|
2524 |
<div class="fts-clear"></div></div>';
|
2525 |
+
$output .= '<div class="feed-them-social-admin-input-wrap"><div class="feed-them-social-admin-input-label">' . esc_html( 'Hide Date, Likes and comments', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Good for image sizes under 120px', 'feed-them-social' ) . '</small></div>
|
2526 |
<select id="fts-slicker-instagram-container-hide-date-likes-comments" name="fts-slicker-instagram-container-hide-date-likes-comments" class="feed-them-social-admin-input">
|
2527 |
<option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2528 |
+
$output .= '<div class="feed-them-social-admin-input-wrap"><div class="feed-them-social-admin-input-label">' . esc_html( 'Center Instagram Container', 'feed-them-social' ) . '</div>
|
2529 |
<select id="fts-slicker-instagram-container-position" name="fts-slicker-instagram-container-position" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select>
|
2530 |
<div class="fts-clear"></div></div>';
|
2531 |
+
$output .= ' <div class="feed-them-social-admin-input-wrap"><div class="feed-them-social-admin-input-label">' . esc_html( 'Image Stacking Animation On', 'feed-them-social' ) . '<br/><small>' . esc_html( 'This happens when resizing browser', 'feed-them-social' ) . '</small></div>
|
2532 |
<select id="fts-slicker-instagram-container-animation" name="fts-slicker-instagram-container-animation" class="feed-them-social-admin-input"><option value="no">' . esc_html( 'No', 'feed-them-social' ) . '</option><option value="yes">' . esc_html( 'Yes', 'feed-them-social' ) . '</option></select><div class="fts-clear"></div></div>';
|
2533 |
|
2534 |
+
// INSTAGRAM HEIGHT OPTION!
|
2535 |
+
$output .= '<div class="feed-them-social-admin-input-wrap instagram_fixed_height_option">';
|
2536 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Instagram Fixed Height', 'feed-them-social' ) . '<br/><small>' . esc_html( 'Leave blank for auto height', 'feed-them-social' ) . '</small></div>';
|
2537 |
+
$output .= '<input type="text" name="instagram_page_height" id="instagram_page_height" class="feed-them-social-admin-input" value="" placeholder="450px ' . esc_html( 'for example', 'feed-them-social' ) . '" />';
|
2538 |
+
$output .= '<div class="fts-clear"></div>';
|
2539 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2540 |
+
|
2541 |
+
$output .= '</div><!--fts-super-instagram-options-wrap-->';
|
2542 |
+
|
2543 |
+
}
|
2544 |
+
|
2545 |
+
if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
|
2546 |
+
|
2547 |
+
include $this->premium . 'admin/instagram-settings-fields.php';
|
2548 |
+
|
2549 |
+
} else {
|
2550 |
+
// Create Need Premium Fields!
|
2551 |
+
$fields = array(
|
2552 |
+
__( 'Display Photos & Videos in Popup', 'feed-them-social' ),
|
2553 |
+
__( 'Load More Posts', 'feed-them-social' ),
|
2554 |
+
);
|
2555 |
+
$output .= $this->need_fts_premium_fields( $fields );
|
2556 |
+
}
|
2557 |
+
if ( $save_options ) {
|
2558 |
+
$output .= '<input type="submit" class="feed-them-social-admin-submit-btn instagram-submit" value="' . esc_html( 'Save Changes', 'feed-them-social' ) . '" />';
|
2559 |
+
} else {
|
2560 |
+
$output .= $this->generate_shortcode( 'updateTextArea_instagram();', 'Instagram Feed Shortcode', 'instagram-final-shortcode' );
|
2561 |
+
$output .= '</form>';
|
2562 |
+
}
|
2563 |
+
$output .= '</div> <!--/fts-instagram-shortcode-form-->';
|
2564 |
+
}
|
2565 |
+
return $output;
|
2566 |
+
}
|
2567 |
+
|
2568 |
+
/**
|
2569 |
+
* FTS Youtube Form
|
2570 |
+
*
|
2571 |
+
* @param bool $save_options save options.
|
2572 |
+
* @since 1.9.6
|
2573 |
+
*/
|
2574 |
+
public function fts_youtube_form ($save_options = false)
|
2575 |
+
{
|
2576 |
+
$fts_youtube_form_nonce = wp_create_nonce( 'fts-youtube-form-nonce' );
|
2577 |
+
|
2578 |
+
if ( wp_verify_nonce( $fts_youtube_form_nonce, 'fts-youtube-form-nonce' ) ) {
|
2579 |
+
if ( $save_options ) {
|
2580 |
+
$youtube_name_option = get_option( 'youtube_name' );
|
2581 |
+
$youtube_vid_count_option = get_option( 'youtube_vid_count' );
|
2582 |
+
$youtube_columns_option = get_option( 'youtube_columns' );
|
2583 |
+
$youtube_first_video_option = get_option( 'youtube_first_video' );
|
2584 |
+
}
|
2585 |
+
$output = '<div class="fts-youtube-shortcode-form">';
|
2586 |
+
if ( false === $save_options ) {
|
2587 |
+
$output .= '<form class="feed-them-social-admin-form shortcode-generator-form youtube-shortcode-form" id="fts-youtube-form">';
|
2588 |
+
|
2589 |
+
// Check to see if token is in place otherwise show a message letting person no what they need to do!
|
2590 |
+
$youtube_options = get_option( 'youtube_custom_api_token' ) || get_option( 'youtube_custom_access_token' ) && get_option( 'youtube_custom_refresh_token' ) && get_option( 'youtube_custom_token_exp_time' ) ? 'Yes' : 'No';
|
2591 |
+
$output .= isset( $youtube_options ) && 'No' !== $youtube_options ? '' . "\n" : '<div class="feed-them-social-admin-input-wrap fts-required-token-message">Please add a YouTube API Key to our <a href="admin.php?page=fts-youtube-feed-styles-submenu-page">YouTube Options</a> page before trying to view your feed.</div>' . "\n";
|
2592 |
+
// end custom message for requiring token!
|
2593 |
+
$output .= '<h2>' . esc_html( 'YouTube Shortcode Generator', 'feed-them-social' ) . '</h2>';
|
2594 |
+
}
|
2595 |
+
$output .= '<div class="instructional-text">' . esc_html( 'You must copy your YouTube ', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-youtube-name/" target="_blank">' . esc_html( 'Username, Channel ID and or Playlist ID', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it below.', 'feed-them-social' ) . '</div>';
|
2596 |
+
if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
|
2597 |
+
include $this->premium . 'admin/youtube-settings-fields.php';
|
2598 |
+
} else {
|
2599 |
+
// Create Need Premium Fields!
|
2600 |
+
$fields = array(
|
2601 |
+
__( 'YouTube Name', 'feed-them-social' ),
|
2602 |
+
__( '# of videos', 'feed-them-social' ),
|
2603 |
+
__( '# of videos in each row', 'feed-them-social' ),
|
2604 |
+
__( 'Display First video full size', 'feed-them-social' ),
|
2605 |
+
);
|
2606 |
+
$output .= $this->need_fts_premium_fields( $fields );
|
2607 |
+
$output .= '<a href="http://www.slickremix.com/downloads/feed-them-social-premium-extension/" target="_blank" class="feed-them-social-admin-submit-btn" style="margin-right:1em; margin-top: 15px; display:inline-block; text-decoration:none !important;">' . esc_html( 'Click to see Premium Version', 'feed-them-social' ) . '</a>';
|
2608 |
+
$output .= '</form>';
|
2609 |
+
}
|
2610 |
+
$output .= '</div><!--/fts-youtube-shortcode-form-->';
|
2611 |
+
}
|
2612 |
+
return $output;
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
/**
|
2616 |
+
* FTS Pinterest Form
|
2617 |
+
*
|
2618 |
+
* @param bool $save_options save options.
|
2619 |
+
* @since 1.9.6
|
2620 |
+
*/
|
2621 |
+
public function fts_pinterest_form ($save_options = false)
|
2622 |
+
{
|
2623 |
+
$fts_pinterest_form_nonce = wp_create_nonce( 'fts-pinterest-form-nonce' );
|
2624 |
+
|
2625 |
+
if ( wp_verify_nonce( $fts_pinterest_form_nonce, 'fts-pinterest-form-nonce' ) ) {
|
2626 |
+
if ( $save_options ) {
|
2627 |
+
$pinterest_name_option = get_option( 'pinterest_name' );
|
2628 |
+
$boards_count_option = get_option( 'boards_count' );
|
2629 |
+
}
|
2630 |
+
$output = '<div class="fts-pinterest-shortcode-form">';
|
2631 |
+
if ( false === $save_options ) {
|
2632 |
+
$output = '<form class="feed-them-social-admin-form shortcode-generator-form pinterest-shortcode-form" id="fts-pinterest-form">';
|
2633 |
+
}
|
2634 |
+
// Pinterest FEED TYPE!
|
2635 |
+
$output .= '<h2>' . esc_html( 'Pinterest Shortcode Generator', 'feed-them-social' ) . '</h2><div class="feed-them-social-admin-input-wrap pinterest-gen-selection">';
|
2636 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Feed Type', 'feed-them-social' ) . '</div>';
|
2637 |
+
$output .= '<select name="pinterest-messages-selector" id="pinterest-messages-selector" class="feed-them-social-admin-input">';
|
2638 |
+
$output .= '<option value="boards_list">' . esc_html( 'Board List', 'feed-them-social' ) . '</option>';
|
2639 |
+
$output .= '<option value="single_board_pins">' . esc_html( 'Pins From a Specific Board', 'feed-them-social' ) . '</option>';
|
2640 |
+
$output .= '<option value="pins_from_user">' . esc_html( 'Latest Pins from a User', 'feed-them-social' ) . '</option>';
|
2641 |
+
$output .= '</select>';
|
2642 |
+
$output .= '<div class="fts-clear"></div>';
|
2643 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2644 |
+
$output .= '<h3>' . esc_html( 'Pinterest Feed', 'feed-them-social' ) . '</h3><div class="instructional-text pinterest-name-text">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-pinterest-name/" target="_blank">' . esc_html( 'Pinterest Name', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste it in the first input below.', 'feed-them-social' ) . '</div>';
|
2645 |
+
$output .= '<div class="instructional-text pinterest-board-and-name-text" style="display:none;">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="http://www.slickremix.com/how-to-get-your-pinterest-name/" target="_blank">' . esc_html( 'Pinterest and Board Name', 'feed-them-social' ) . '</a> ' . esc_html( 'and paste them below.', 'feed-them-social' ) . '</div>';
|
2646 |
+
$pinterest_name_option = isset( $pinterest_name_option ) ? $pinterest_name_option : '';
|
2647 |
+
$boards_count_option = isset( $boards_count_option ) ? $boards_count_option : '';
|
2648 |
+
$output .= '<div class="feed-them-social-admin-input-wrap pinterest_name">';
|
2649 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Pinterest Username (required)', 'feed-them-social' ) . '</div>';
|
2650 |
+
$output .= '<input type="text" name="pinterest_name" id="pinterest_name" class="feed-them-social-admin-input" value="' . esc_html( $pinterest_name_option ) . '" />';
|
2651 |
+
$output .= '<div class="fts-clear"></div>';
|
2652 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2653 |
+
$output .= '<div class="feed-them-social-admin-input-wrap board-name" style="display:none;">';
|
2654 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Pinterest Board Name (required)', 'feed-them-premium' ) . '</div>';
|
2655 |
+
$output .= '<input type="text" name="pinterest_board_name" id="pinterest_board_name" class="feed-them-social-admin-input" value="' . esc_html( $pinterest_name_option ) . '" />';
|
2656 |
+
$output .= '<div class="fts-clear"></div>';
|
2657 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2658 |
+
if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
|
2659 |
+
include $this->premium . 'admin/pinterest-settings-fields.php';
|
2660 |
+
} else {
|
2661 |
+
// Create Need Premium Fields!
|
2662 |
+
$fields = array(
|
2663 |
+
esc_html( '# of Boards (default 6)', 'feed-them-social' ),
|
2664 |
+
esc_html( '# of Pins (default 6)', 'feed-them-social' ),
|
2665 |
+
);
|
2666 |
+
$output .= $this->need_fts_premium_fields( $fields );
|
2667 |
+
}
|
2668 |
+
if ( $save_options ) {
|
2669 |
+
$output .= '<input type="submit" class="feed-them-social-admin-submit-btn" value="' . esc_html( 'Save Changes', 'feed-them-social' ) . '" />';
|
2670 |
+
} else {
|
2671 |
+
$output .= $this->generate_shortcode( 'updateTextArea_pinterest();', '' . esc_html( 'Pinterest Feed Shortcode', 'feed-them-social' ) . '', 'pinterest-final-shortcode' );
|
2672 |
+
$output .= '</form>';
|
2673 |
+
}
|
2674 |
+
$output .= '</div><!--/fts-pinterest-shortcode-form-->';
|
2675 |
+
}
|
2676 |
+
return $output;
|
2677 |
+
}
|
2678 |
+
|
2679 |
+
/**
|
2680 |
+
* Generate Shortcode
|
2681 |
+
*
|
2682 |
+
* Generate Shortcode Button and Input for FTS settings Page.
|
2683 |
+
*
|
2684 |
+
* @param string $onclick onclick.
|
2685 |
+
* @param string $label label.
|
2686 |
+
* @param string $input_class input class.
|
2687 |
+
* @since 1.9.6
|
2688 |
+
*/
|
2689 |
+
public function generate_shortcode ($onclick, $label, $input_class)
|
2690 |
+
{
|
2691 |
+
$output = '<input type="button" class="feed-them-social-admin-submit-btn" value="' . esc_html( 'Generate Shortcode', 'feed-them-social' ) . '" onclick="' . esc_js( $onclick ) . '" tabindex="4" style="margin-right:1em;" />';
|
2692 |
+
$output .= '<div class="feed-them-social-admin-input-wrap final-shortcode-textarea">';
|
2693 |
+
$output .= '<h4>' . esc_html( 'Copy the ShortCode below and paste it on a page or post that you want to display your feed.', 'feed-them-social' ) . '</h4>';
|
2694 |
+
$output .= '<div class="feed-them-social-admin-input-label">' . esc_html( $label ) . '</div>';
|
2695 |
+
$output .= '<input class="copyme ' . esc_html( $input_class ) . ' feed-them-social-admin-input" value="" />';
|
2696 |
+
$output .= '<div class="fts-clear"></div>';
|
2697 |
+
$output .= '</div><!--/feed-them-social-admin-input-wrap-->';
|
2698 |
+
return $output;
|
2699 |
+
}
|
2700 |
+
|
2701 |
+
/**
|
2702 |
+
* FTS Get Feed json
|
2703 |
+
*
|
2704 |
+
* Generate Get Json (includes MultiCurl).
|
2705 |
+
*
|
2706 |
+
* @param array $feeds_mulit_data feeds data info.
|
2707 |
+
* @return array
|
2708 |
+
* @since 1.9.6
|
2709 |
+
*/
|
2710 |
+
public function fts_get_feed_json ($feeds_mulit_data)
|
2711 |
+
{
|
2712 |
+
// Make Multiple Requests from array with more than 2 keys!
|
2713 |
+
if ( is_array( $feeds_mulit_data ) && count( $feeds_mulit_data ) > 1 ) {
|
2714 |
+
$new_feeds_mulit_data = array();
|
2715 |
+
|
2716 |
+
foreach ( $feeds_mulit_data as $key => $url ) {
|
2717 |
+
$new_feeds_mulit_data[$key]['url'] = $url;
|
2718 |
+
$new_feeds_mulit_data[$key]['type'] = 'GET';
|
2719 |
+
}
|
2720 |
+
// Fetch Multiple Requests!
|
2721 |
+
$responses = \Requests::request_multiple( $new_feeds_mulit_data );
|
2722 |
+
|
2723 |
+
$data = array();
|
2724 |
+
foreach ( $responses as $key => $response ) {
|
2725 |
+
|
2726 |
+
if ( is_a( $response, 'Requests_Response' ) ) {
|
2727 |
+
$data[$key] = $response->body;
|
2728 |
+
}
|
2729 |
+
}
|
2730 |
+
} else {
|
2731 |
+
// Make Single Requests from array with 1 keys!
|
2732 |
+
if ( is_array( $feeds_mulit_data ) ) {
|
2733 |
+
foreach ( $feeds_mulit_data as $key => $url ) {
|
2734 |
+
|
2735 |
+
$single_response = \Requests::get( $url );
|
2736 |
+
|
2737 |
+
$data = array();
|
2738 |
+
if ( is_a( $single_response, 'Requests_Response' ) ) {
|
2739 |
+
$data[$key] = $single_response->body;
|
2740 |
+
}
|
2741 |
+
}
|
2742 |
+
} else {
|
2743 |
+
// Make Single request from just url!
|
2744 |
+
$single_response_url = $feeds_mulit_data;
|
2745 |
+
|
2746 |
+
if ( !empty( $single_response_url ) ) {
|
2747 |
+
$single_response = \Requests::get( $single_response_url );
|
2748 |
+
|
2749 |
+
if ( is_a( $single_response, 'Requests_Response' ) ) {
|
2750 |
+
$data['data'] = $single_response->body;
|
2751 |
+
}
|
2752 |
+
}
|
2753 |
+
}
|
2754 |
+
}
|
2755 |
+
// Do nothing if Curl was Successful!
|
2756 |
+
return $data;
|
2757 |
+
}
|
2758 |
+
|
2759 |
+
/**
|
2760 |
+
* FTS Create Feed Cache
|
2761 |
+
*
|
2762 |
+
* @param string $transient_name transient name.
|
2763 |
+
* @param array $response Data returned from response.
|
2764 |
+
* @since 1.9.6
|
2765 |
+
*/
|
2766 |
+
public function fts_create_feed_cache ($transient_name, $response)
|
2767 |
+
{
|
2768 |
+
$cache_time_limit = true === get_option( 'fts_clear_cache_developer_mode' ) && '1' !== get_option( 'fts_clear_cache_developer_mode' ) ? get_option( 'fts_clear_cache_developer_mode' ) : '900';
|
2769 |
+
set_transient( 'fts_' . $transient_name, $response, $cache_time_limit );
|
2770 |
+
}
|
2771 |
+
|
2772 |
+
/**
|
2773 |
+
* FTS Get Feed Cache
|
2774 |
+
*
|
2775 |
+
* @param string $transient_name transient name.
|
2776 |
+
* @return mixed
|
2777 |
+
* @since 1.9.6
|
2778 |
+
*/
|
2779 |
+
public function fts_get_feed_cache ($transient_name)
|
2780 |
+
{
|
2781 |
+
$returned_cache_data = get_transient( 'fts_' . $transient_name );
|
2782 |
+
return $returned_cache_data;
|
2783 |
+
}
|
2784 |
+
|
2785 |
+
/**
|
2786 |
+
* FTS Check Feed Cache Exists
|
2787 |
+
*
|
2788 |
+
* @param string $transient_name transient name.
|
2789 |
+
* @return bool
|
2790 |
+
* @since 1.9.6
|
2791 |
+
*/
|
2792 |
+
public function fts_check_feed_cache_exists ($transient_name)
|
2793 |
+
{
|
2794 |
+
if ( false === get_transient( 'fts_' . $transient_name ) ) {
|
2795 |
+
return false;
|
2796 |
+
}
|
2797 |
+
return true;
|
2798 |
+
}
|
2799 |
+
|
2800 |
+
/**
|
2801 |
+
* FTS Clear Cache Ajax
|
2802 |
+
*
|
2803 |
+
* @since 1.9.6
|
2804 |
+
*/
|
2805 |
+
public function fts_clear_cache_ajax ()
|
2806 |
+
{
|
2807 |
+
global $wpdb;
|
2808 |
+
// Clear UnExpired!
|
2809 |
+
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name LIKE %s ", '_transient_fts_%' ) );
|
2810 |
+
// Clear Exired Transients!
|
2811 |
+
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name LIKE %s ", '_transient_timeout_fts_%' ) );
|
2812 |
+
wp_reset_query();
|
2813 |
+
}
|
2814 |
+
|
2815 |
+
/**
|
2816 |
+
* Feed Them Clear Cache
|
2817 |
+
*
|
2818 |
+
* Clear Cache Folder.
|
2819 |
+
*
|
2820 |
+
* @return string
|
2821 |
+
* @since 1.9.6
|
2822 |
+
*/
|
2823 |
+
public function feed_them_clear_cache ()
|
2824 |
+
{
|
2825 |
+
global $wpdb;
|
2826 |
+
// Clear UnExpired!
|
2827 |
+
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name LIKE %s ", '_transient_fts_%' ) );
|
2828 |
+
// Clear Exired Transients!
|
2829 |
+
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name LIKE %s ", '_transient_timeout_fts_%' ) );
|
2830 |
+
wp_reset_query();
|
2831 |
+
return 'Cache for all FTS Feeds cleared!';
|
2832 |
+
}
|
2833 |
+
|
2834 |
+
/**
|
2835 |
+
* FTS Admin Bar Menu
|
2836 |
+
*
|
2837 |
+
* Create our custom menu in the admin bar.
|
2838 |
+
*
|
2839 |
+
* @since 1.9.6
|
2840 |
+
*/
|
2841 |
+
public function fts_admin_bar_menu ()
|
2842 |
+
{
|
2843 |
+
global $wp_admin_bar;
|
2844 |
+
|
2845 |
+
$fts_admin_bar_menu = get_option( 'fts_admin_bar_menu' );
|
2846 |
+
$fts_dev_mode_cache = get_option( 'fts_clear_cache_developer_mode' );
|
2847 |
+
if ( !is_super_admin() || !is_admin_bar_showing() || 'hide-admin-bar-menu' === $fts_admin_bar_menu ) {
|
2848 |
+
return;
|
2849 |
+
}
|
2850 |
+
$wp_admin_bar->add_menu(
|
2851 |
+
array(
|
2852 |
+
'id' => 'feed_them_social_admin_bar',
|
2853 |
+
'title' => __( 'Feed Them Social', 'feed-them-social' ),
|
2854 |
+
'href' => false,
|
2855 |
+
)
|
2856 |
+
);
|
2857 |
+
if ( '1' === $fts_dev_mode_cache ) {
|
2858 |
+
$wp_admin_bar->add_menu(
|
2859 |
+
array(
|
2860 |
+
'id' => 'feed_them_social_admin_bar_clear_cache',
|
2861 |
+
'parent' => 'feed_them_social_admin_bar',
|
2862 |
+
'title' => __( 'Cache clears on page refresh now', 'feed-them-social' ),
|
2863 |
+
'href' => false,
|
2864 |
+
)
|
2865 |
+
);
|
2866 |
+
} else {
|
2867 |
+
$wp_admin_bar->add_menu(
|
2868 |
+
array(
|
2869 |
+
'id' => 'feed_them_social_admin_set_cache',
|
2870 |
+
'parent' => 'feed_them_social_admin_bar',
|
2871 |
+
'title' => __( 'Clear Cache', 'feed-them-social' ),
|
2872 |
+
'href' => '#',
|
2873 |
+
)
|
2874 |
+
);
|
2875 |
+
}
|
2876 |
+
$wp_admin_bar->add_menu(
|
2877 |
+
array(
|
2878 |
+
'id' => 'feed_them_social_admin_bar_set_cache',
|
2879 |
+
'parent' => 'feed_them_social_admin_bar',
|
2880 |
+
'title' => sprintf(
|
2881 |
+
__( 'Set Cache Time %1$s%2$s%3$s', 'feed-them-social' ),
|
2882 |
+
'<span>',
|
2883 |
+
$this->fts_cachetime_amount( get_option( 'fts_clear_cache_developer_mode' ) ),
|
2884 |
+
'</span>'
|
2885 |
+
),
|
2886 |
+
'href' => admin_url( 'admin.php?page=feed-them-settings-page&tab=global_options' ),
|
2887 |
+
|
2888 |
+
)
|
2889 |
+
);
|
2890 |
+
$wp_admin_bar->add_menu(
|
2891 |
+
array(
|
2892 |
+
'id' => 'feed_them_social_admin_bar_settings',
|
2893 |
+
'parent' => 'feed_them_social_admin_bar',
|
2894 |
+
'title' => __( 'Settings', 'feed-them-social' ),
|
2895 |
+
'href' => admin_url( 'admin.php?page=feed-them-settings-page' ),
|
2896 |
+
)
|
2897 |
+
);
|
2898 |
+
$wp_admin_bar->add_menu(
|
2899 |
+
array(
|
2900 |
+
'id' => 'feed_them_social_admin_bar_global_options',
|
2901 |
+
'parent' => 'feed_them_social_admin_bar',
|
2902 |
+
'title' => __( 'Global Options', 'feed-them-social' ),
|
2903 |
+
'href' => admin_url( 'admin.php?page=feed-them-settings-page&tab=global_options' ),
|
2904 |
+
)
|
2905 |
+
);
|
2906 |
+
}
|
2907 |
+
|
2908 |
+
/**
|
2909 |
+
* FTS Cachetime amount
|
2910 |
+
*
|
2911 |
+
* @param string $fts_cachetime Cache time.
|
2912 |
+
* @return mixed
|
2913 |
+
* @since
|
2914 |
+
*/
|
2915 |
+
public function fts_cachetime_amount ($fts_cachetime)
|
2916 |
+
{
|
2917 |
+
switch ($fts_cachetime) {
|
2918 |
+
case '1':
|
2919 |
+
$fts_display_cache_time = __( 'Clear cache on every page load', 'feed-them-social' );
|
2920 |
+
break;
|
2921 |
+
default:
|
2922 |
+
case '86400':
|
2923 |
+
$fts_display_cache_time = __( '1 Day (Default)', 'feed-them-social' );
|
2924 |
+
break;
|
2925 |
+
case '172800':
|
2926 |
+
$fts_display_cache_time = __( '2 Days', 'feed-them-social' );
|
2927 |
+
break;
|
2928 |
+
case '259200':
|
2929 |
+
$fts_display_cache_time = __( '3 Days', 'feed-them-social' );
|
2930 |
+
break;
|
2931 |
+
case '604800':
|
2932 |
+
$fts_display_cache_time = __( '1 Week', 'feed-them-social' );
|
2933 |
+
break;
|
2934 |
+
case '1209600':
|
2935 |
+
$fts_display_cache_time = __( '2 Weeks', 'feed-them-social' );
|
2936 |
+
break;
|
2937 |
+
}
|
2938 |
+
return $fts_display_cache_time;
|
2939 |
+
}
|
2940 |
+
|
2941 |
+
/**
|
2942 |
+
* XML json Parse
|
2943 |
+
*
|
2944 |
+
* @param string $url string to parse the content for.
|
2945 |
+
* @return mixed
|
2946 |
+
* @since 1.9.6
|
2947 |
+
*/
|
2948 |
+
public function xml_json_parse ($url)
|
2949 |
+
{
|
2950 |
+
$url_to_get['url'] = $url;
|
2951 |
+
$file_contents_returned = $this->fts_get_feed_json( $url_to_get );
|
2952 |
+
$file_contents = $file_contents_returned['url'];
|
2953 |
+
$file_contents = str_replace( array("\n", "\r", "\t"), '', $file_contents );
|
2954 |
+
$file_contents = trim( str_replace( '"', "'", $file_contents ) );
|
2955 |
+
$simple_xml = simplexml_load_string( $file_contents );
|
2956 |
+
$encoded_json = json_encode( $simple_xml );
|
2957 |
+
|
2958 |
+
return $encoded_json;
|
2959 |
+
}
|
2960 |
+
|
2961 |
+
/**
|
2962 |
+
* FTS Ago
|
2963 |
+
*
|
2964 |
+
* Create date format like fb and twitter. Thanks: http://php.quicoto.com/how-to-calculate-relative-time-like-facebook/ .
|
2965 |
+
*
|
2966 |
+
* @param string $timestamp Timestamp!
|
2967 |
+
* @return string
|
2968 |
+
* @since 1.9.6
|
2969 |
+
*/
|
2970 |
+
function fts_ago ($timestamp)
|
2971 |
+
{
|
2972 |
+
// not setting isset'ing anything because you have to save the settings page to even enable this feature
|
2973 |
+
$fts_language_second = get_option( 'fts_language_second' );
|
2974 |
+
if ( empty( $fts_language_second ) ) {
|
2975 |
+
$fts_language_second = 'second';
|
2976 |
+
}
|
2977 |
+
$fts_language_seconds = get_option( 'fts_language_seconds' );
|
2978 |
+
if ( empty( $fts_language_seconds ) ) {
|
2979 |
+
$fts_language_seconds = 'seconds';
|
2980 |
+
}
|
2981 |
+
$fts_language_minute = get_option( 'fts_language_minute' );
|
2982 |
+
if ( empty( $fts_language_minute ) ) {
|
2983 |
+
$fts_language_minute = 'minute';
|
2984 |
+
}
|
2985 |
+
$fts_language_minutes = get_option( 'fts_language_minutes' );
|
2986 |
+
if ( empty( $fts_language_minute ) ) {
|
2987 |
+
$fts_language_minute = 'minutes';
|
2988 |
+
}
|
2989 |
+
$fts_language_hour = get_option( 'fts_language_hour' );
|
2990 |
+
if ( empty( $fts_language_hour ) ) {
|
2991 |
+
$fts_language_hour = 'hour';
|
2992 |
+
}
|
2993 |
+
$fts_language_hours = get_option( 'fts_language_hours' );
|
2994 |
+
if ( empty( $fts_language_hours ) ) {
|
2995 |
+
$fts_language_hours = 'hours';
|
2996 |
+
}
|
2997 |
+
$fts_language_day = get_option( 'fts_language_day' );
|
2998 |
+
if ( empty( $fts_language_day ) ) {
|
2999 |
+
$fts_language_day = 'day';
|
3000 |
+
}
|
3001 |
+
$fts_language_days = get_option( 'fts_language_days' );
|
3002 |
+
if ( empty( $fts_language_days ) ) {
|
3003 |
+
$fts_language_days = 'days';
|
3004 |
+
}
|
3005 |
+
$fts_language_week = get_option( 'fts_language_week' );
|
3006 |
+
if ( empty( $fts_language_week ) ) {
|
3007 |
+
$fts_language_week = 'week';
|
3008 |
+
}
|
3009 |
+
$fts_language_weeks = get_option( 'fts_language_weeks' );
|
3010 |
+
if ( empty( $fts_language_weeks ) ) {
|
3011 |
+
$fts_language_weeks = 'weeks';
|
3012 |
+
}
|
3013 |
+
$fts_language_month = get_option( 'fts_language_month' );
|
3014 |
+
if ( empty( $fts_language_month ) ) {
|
3015 |
+
$fts_language_month = 'month';
|
3016 |
+
}
|
3017 |
+
$fts_language_months = get_option( 'fts_language_months' );
|
3018 |
+
if ( empty( $fts_language_months ) ) {
|
3019 |
+
$fts_language_months = 'months';
|
3020 |
+
}
|
3021 |
+
$fts_language_year = get_option( 'fts_language_year' );
|
3022 |
+
if ( empty( $fts_language_year ) ) {
|
3023 |
+
$fts_language_year = 'year';
|
3024 |
+
}
|
3025 |
+
$fts_language_years = get_option( 'fts_language_years' );
|
3026 |
+
if ( empty( $fts_language_years ) ) {
|
3027 |
+
$fts_language_years = 'years';
|
3028 |
+
}
|
3029 |
+
$fts_language_ago = get_option( 'fts_language_ago' );
|
3030 |
+
if ( empty( $fts_language_ago ) ) {
|
3031 |
+
$fts_language_ago = 'ago';
|
3032 |
+
}
|
3033 |
+
|
3034 |
+
// $periods = array( "sec", "min", "hour", "day", "week", "month", "years", "decade" );.
|
3035 |
+
$periods = array($fts_language_second, $fts_language_minute, $fts_language_hour, $fts_language_day, $fts_language_week, $fts_language_month, $fts_language_year, 'decade');
|
3036 |
+
$periods_plural = array($fts_language_seconds, $fts_language_minutes, $fts_language_hours, $fts_language_days, $fts_language_weeks, $fts_language_months, $fts_language_years, 'decades');
|
3037 |
+
|
3038 |
+
if ( !is_numeric( $timestamp ) ) {
|
3039 |
+
$timestamp = strtotime( $timestamp );
|
3040 |
+
if ( !is_numeric( $timestamp ) ) {
|
3041 |
+
return '';
|
3042 |
+
}
|
3043 |
+
}
|
3044 |
+
$difference = time() - $timestamp;
|
3045 |
+
// Customize in your own language. Why thank-you I will.
|
3046 |
+
$lengths = array('60', '60', '24', '7', '4.35', '12', '10');
|
3047 |
+
|
3048 |
+
if ( $difference > 0 ) {
|
3049 |
+
// this was in the past
|
3050 |
+
$ending = $fts_language_ago;
|
3051 |
+
} else {
|
3052 |
+
// this was in the future
|
3053 |
+
$difference = -$difference;
|
3054 |
+
// not doing dates in the future for posts
|
3055 |
+
$ending = 'to go';
|
3056 |
+
}
|
3057 |
+
for ( $j = 0; $difference >= $lengths[$j] && $j < count( $lengths ) - 1; $j++ ) {
|
3058 |
+
$difference /= $lengths[$j];
|
3059 |
+
}
|
3060 |
+
|
3061 |
+
$difference = round( $difference );
|
3062 |
+
|
3063 |
+
if ( $difference > 1 ) {
|
3064 |
+
$periods[$j] = $periods_plural[$j];
|
3065 |
+
}
|
3066 |
+
|
3067 |
+
return "$difference $periods[$j] $ending";
|
3068 |
+
}
|
3069 |
+
|
3070 |
+
/**
|
3071 |
+
* FTS Custom Date
|
3072 |
+
*
|
3073 |
+
* @param string $created_time Created time.
|
3074 |
+
* @param string $feed_type Feed type.
|
3075 |
+
* @return string
|
3076 |
+
* @since 1.9.6
|
3077 |
+
*/
|
3078 |
+
public function fts_custom_date ($created_time, $feed_type)
|
3079 |
+
{
|
3080 |
+
$fts_custom_date = get_option( 'fts-custom-date' );
|
3081 |
+
$fts_custom_time = get_option( 'fts-custom-time' );
|
3082 |
+
$custom_date_check = get_option( 'fts-date-and-time-format' );
|
3083 |
+
$fts_twitter_offset_time = get_option( 'fts_twitter_time_offset' );
|
3084 |
+
$fts_timezone = get_option( 'fts-timezone' );
|
3085 |
+
|
3086 |
+
if ( '' === $fts_custom_date && '' === $fts_custom_time ) {
|
3087 |
+
$custom_date_check = $custom_date_check;
|
3088 |
+
} elseif ( '' !== $fts_custom_date || '' !== $fts_custom_time ) {
|
3089 |
+
$custom_date_check = $fts_custom_date . ' ' . $fts_custom_time;
|
3090 |
+
} else {
|
3091 |
+
$custom_date_check = 'F jS, Y \a\t g:ia';
|
3092 |
+
}
|
3093 |
+
if ( !empty( $fts_timezone ) ) {
|
3094 |
+
date_default_timezone_set( $fts_timezone );
|
3095 |
+
}
|
3096 |
+
// Twitter date time!
|
3097 |
+
if ( 'twitter' === $feed_type ) {
|
3098 |
+
|
3099 |
+
$fts_twitter_offset_time_final = 1 === $fts_twitter_offset_time ? strtotime( $created_time ) : strtotime( $created_time ) - 3 * 3600;
|
3100 |
+
|
3101 |
+
if ( 'one-day-ago' === $custom_date_check ) {
|
3102 |
+
$u_time = $this->fts_ago( $created_time );
|
3103 |
+
} else {
|
3104 |
+
$u_time = !empty( $custom_date_check ) ? date_i18n( $custom_date_check, $fts_twitter_offset_time_final ) : $this->fts_ago( $created_time );
|
3105 |
+
}
|
3106 |
+
}
|
3107 |
+
// Instagram date time!
|
3108 |
+
if ( 'instagram' === $feed_type ) {
|
3109 |
+
if ( 'one-day-ago' === $custom_date_check ) {
|
3110 |
+
$u_time = $this->fts_ago( $created_time );
|
3111 |
+
} else {
|
3112 |
+
$u_time = !empty( $custom_date_check ) ? date_i18n( $custom_date_check, $created_time ) : $this->fts_ago( $created_time );
|
3113 |
+
}
|
3114 |
+
}
|
3115 |
+
// Youtube and Pinterest date time!
|
3116 |
+
if ( 'pinterest' === $feed_type ) {
|
3117 |
+
if ( 'one-day-ago' === $custom_date_check ) {
|
3118 |
+
$u_time = $this->fts_ago( $created_time );
|
3119 |
+
} else {
|
3120 |
+
$u_time = !empty( $custom_date_check ) ? date_i18n( $custom_date_check, strtotime( $created_time ) ) : $this->fts_ago( $created_time );
|
3121 |
+
}
|
3122 |
+
}
|
3123 |
+
// WP Gallery and Pinterest date time!
|
3124 |
+
if ( 'wp_gallery' === $feed_type ) {
|
3125 |
+
if ( 'one-day-ago' === $custom_date_check ) {
|
3126 |
+
$u_time = $this->fts_ago( $created_time );
|
3127 |
+
} else {
|
3128 |
+
$u_time = !empty( $custom_date_check ) ? date_i18n( $custom_date_check, strtotime( $created_time ) ) : $this->fts_ago( $created_time );
|
3129 |
+
}
|
3130 |
+
}
|
3131 |
+
// Facebook date time!
|
3132 |
+
if ( 'facebook' === $feed_type ) {
|
3133 |
+
$time_set = $fts_timezone;
|
3134 |
+
$time_set_check = isset( $time_set ) ? $time_set : 'America/New_York';
|
3135 |
+
date_default_timezone_set( $time_set_check );
|
3136 |
+
|
3137 |
+
if ( 'one-day-ago' === $custom_date_check ) {
|
3138 |
+
$u_time = $this->fts_ago( $created_time );
|
3139 |
+
} else {
|
3140 |
+
$u_time = !empty( $custom_date_check ) ? date_i18n( $custom_date_check, $created_time ) : $this->fts_ago( $created_time );
|
3141 |
+
}
|
3142 |
+
}
|
3143 |
+
// Instagram date time!
|
3144 |
+
if ( 'youtube' === $feed_type ) {
|
3145 |
+
if ( 'one-day-ago' === $custom_date_check ) {
|
3146 |
+
$u_time = $this->fts_ago( $created_time );
|
3147 |
+
} else {
|
3148 |
+
$u_time = !empty( $custom_date_check ) ? date_i18n( $custom_date_check, strtotime( $created_time ) ) : $this->fts_ago( $created_time );
|
3149 |
+
}
|
3150 |
+
}
|
3151 |
+
// Return the time!
|
3152 |
+
return $u_time;
|
3153 |
+
}
|
3154 |
+
|
3155 |
+
/**
|
3156 |
+
* Random String generator For All Feeds
|
3157 |
+
*
|
3158 |
+
* @param int $length Random string length.
|
3159 |
+
* @return string
|
3160 |
+
* @since 2.0.7
|
3161 |
+
*/
|
3162 |
+
public function feed_them_social_rand_string ($length = 10)
|
3163 |
+
{
|
3164 |
+
$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
3165 |
+
$characters_length = strlen( $characters );
|
3166 |
+
$random_string = '';
|
3167 |
+
for ( $i = 0; $i < $length; $i++ ) {
|
3168 |
+
$random_string .= $characters[wp_rand( 0, $characters_length - 1 )];
|
3169 |
+
}
|
3170 |
+
return $random_string;
|
3171 |
+
}
|
3172 |
+
|
3173 |
+
|
3174 |
+
/**
|
3175 |
+
* FTS Refresh YouTube Token
|
3176 |
+
*
|
3177 |
+
* @since 2.3.3
|
3178 |
+
*/
|
3179 |
+
public function fts_refresh_token_ajax ()
|
3180 |
+
{
|
3181 |
+
|
3182 |
+
$fts_refresh_token_nonce = wp_create_nonce( 'fts_refresh_token_nonce' );
|
3183 |
+
|
3184 |
+
if ( wp_verify_nonce( $fts_refresh_token_nonce, 'fts_refresh_token_nonce' ) ) {
|
3185 |
+
if ( isset( $_REQUEST['refresh_token'], $_REQUEST['button_pushed'] ) && 'yes' === $_REQUEST['button_pushed'] ) {
|
3186 |
+
update_option( 'youtube_custom_refresh_token', sanitize_text_field( wp_unslash( $_REQUEST['refresh_token'] ) ) );
|
3187 |
+
}
|
3188 |
+
if ( isset( $_REQUEST['access_token'] ) ) {
|
3189 |
+
update_option( 'youtube_custom_access_token', sanitize_text_field( wp_unslash( $_REQUEST['access_token'] ) ) );
|
3190 |
+
}
|
3191 |
+
$startoftime = isset( $_REQUEST['expires_in'] ) ? strtotime( '+' . sanitize_text_field( wp_unslash( $_REQUEST['expires_in'] ) ) . ' seconds' ) : '';
|
3192 |
+
$start_of_time_final = false !== $startoftime ? sanitize_key( $startoftime ) : '';
|
3193 |
+
update_option( 'youtube_custom_token_exp_time', $start_of_time_final );
|
3194 |
+
|
3195 |
+
// This only happens if the token is expired on the YouTube Options page and you go to re-save or refresh the page for some reason. It will also run this function if the cache is emptied and the token is found to be expired.
|
3196 |
+
if ( 'no' === $_REQUEST['button_pushed'] ) {
|
3197 |
+
return 'Token Refreshed';
|
3198 |
+
// $output .= do_shortcode('[fts _youtube vid_count=3 large_vid=no large_vid_title=no large_vid_description=no thumbs_play_in_iframe=popup vids_in_row=3 space_between_videos=1px force_columns=yes maxres_thumbnail_images=yes thumbs_wrap_color=#000 wrap=none video_wrap_display=none comments_count=12 channel_id=UCqhnX4jA0A5paNd1v-zEysw loadmore=button loadmore_count=5 loadmore_btn_maxwidth=300px loadmore_btn_margin=10px]');
|
3199 |
+
}
|
3200 |
+
}
|
3201 |
+
|
3202 |
+
}
|
3203 |
+
|
3204 |
+
/**
|
3205 |
+
* FTS Check YouTube Token Validity
|
3206 |
+
*
|
3207 |
+
* @since 2.3.3
|
3208 |
+
*/
|
3209 |
+
public function feed_them_youtube_refresh_token ()
|
3210 |
+
{
|
3211 |
+
|
3212 |
+
$fts_refresh_token_nonce = wp_create_nonce( 'fts_refresh_token_nonce' );
|
3213 |
+
|
3214 |
+
if ( wp_verify_nonce( $fts_refresh_token_nonce, 'fts_refresh_token_nonce' ) ) {
|
3215 |
+
|
3216 |
+
// Used some methods from this link http://ieg.wnet.org/2015/09/using-oauth-in-wordpress-plugins-part-2-persistence/
|
3217 |
+
// save all 3 get options: happens when clicking the get access token button on the youtube options page!
|
3218 |
+
if ( isset( $_GET['refresh_token'], $_GET['access_token'] ) && isset( $_GET['expires_in'] ) ) {
|
3219 |
+
$button_pushed = 'yes';
|
3220 |
+
$clienttoken_post['refresh_token'] = sanitize_text_field( wp_unslash( $_GET['refresh_token'] ) );
|
3221 |
+
$auth_obj['access_token'] = sanitize_text_field( wp_unslash( $_GET['access_token'] ) );
|
3222 |
+
$auth_obj['expires_in'] = sanitize_key( wp_unslash( $_GET['expires_in'] ) );
|
3223 |
+
} else {
|
3224 |
+
// refresh token!
|
3225 |
+
$button_pushed = 'no';
|
3226 |
+
$oauth2token_url = 'https://accounts.google.com/o/oauth2/token';
|
3227 |
+
$clienttoken_post = array(
|
3228 |
+
'client_id' => '802796800957-6nannpdq8h8l720ls430ahnnq063n22u.apps.googleusercontent.com',
|
3229 |
+
'client_secret' => 'CbieVhgOudjrpya1IDpv3uRa',
|
3230 |
+
);
|
3231 |
+
// The "refresh token" grant type is to use a refresh token to get a new access token!
|
3232 |
+
$clienttoken_post['refresh_token'] = get_option( 'youtube_custom_refresh_token' );
|
3233 |
+
$clienttoken_post['grant_type'] = 'refresh_token';
|
3234 |
+
|
3235 |
+
$postargs = array(
|
3236 |
+
'body' => $clienttoken_post,
|
3237 |
+
);
|
3238 |
+
$response = wp_remote_post( $oauth2token_url, $postargs );
|
3239 |
+
$auth_obj = json_decode( wp_remote_retrieve_body( $response ), true );
|
3240 |
+
}
|
3241 |
+
?>
|
3242 |
+
<script>
|
3243 |
+
jQuery(document).ready(function () {
|
3244 |
+
jQuery.ajax({
|
3245 |
+
data: {
|
3246 |
+
action: "fts_refresh_token_ajax",
|
3247 |
+
refresh_token: '<?php echo esc_js( $clienttoken_post['refresh_token'] ); ?>',
|
3248 |
+
access_token: '<?php echo esc_js( $auth_obj['access_token'] ); ?>',
|
3249 |
+
expires_in: '<?php echo esc_js( $auth_obj['expires_in'] ); ?>',
|
3250 |
+
button_pushed: '<?php echo esc_js( $button_pushed ); ?>'
|
3251 |
+
},
|
3252 |
+
type: 'POST',
|
3253 |
+
url: ftsAjax.ajaxurl,
|
3254 |
+
success: function (response) {
|
3255 |
+
console.log(response);
|
3256 |
+
<?php
|
3257 |
+
if ( isset( $_GET['page'] ) && 'fts-youtube-feed-styles-submenu-page' === $_GET['page'] ) {
|
3258 |
+
foreach ( $auth_obj as $user_id ) {
|
3259 |
+
if ( !isset( $user_id->error->errors[0]->reason ) ) {
|
3260 |
+
$type_of_key = __( 'API key', 'feed-them-social' );
|
3261 |
+
} elseif ( !isset( $user_id->error->errors[0]->reason ) && !empty( $youtube_access_token ) ) {
|
3262 |
+
$type_of_key = __( 'Access Token', 'feed-them-social' );
|
3263 |
+
}
|
3264 |
+
|
3265 |
+
// Error Check!
|
3266 |
+
if ( !isset( $auth_obj->error->errors[0]->reason ) ) {
|
3267 |
+
$fts_youtube_message = sprintf(
|
3268 |
+
esc_html( '%1$s Your %2$s is working! Generate your shortcode on the %3$s settings page.%4$s %5$s', 'feed-them-social' ),
|
3269 |
+
'<div class="fts-successful-api-token">',
|
3270 |
+
esc_html( $type_of_key ),
|
3271 |
+
'<a href="' . esc_url( 'admin.php?page=feed-them-settings-page' ) . '">',
|
3272 |
+
'</a>',
|
3273 |
+
'</div><div class="clear"></div>'
|
3274 |
+
);
|
3275 |
+
} elseif ( isset( $user_id->error->errors[0]->reason ) ) {
|
3276 |
+
$fts_youtube_message = sprintf(
|
3277 |
+
esc_html( '%1$s This %2$s does not appear to be valid. YouTube responded with: %3$s %4$s ', 'feed-them-social' ),
|
3278 |
+
'<div class="fts-failed-api-token">',
|
3279 |
+
esc_html( $type_of_key ),
|
3280 |
+
esc_html( $user_id->errors[0]->reason ),
|
3281 |
+
'</div><div class="clear"></div>'
|
3282 |
+
);
|
3283 |
+
}
|
3284 |
+
|
3285 |
+
break;
|
3286 |
+
}
|
3287 |
+
|
3288 |
+
?>
|
3289 |
+
jQuery('#youtube_custom_access_token, #youtube_custom_token_exp_time').val('');
|
3290 |
+
|
3291 |
+
<?php if ( isset( $_GET['refresh_token'], $_GET['access_token'] ) && isset( $_GET['expires_in'] ) ) { ?>
|
3292 |
+
jQuery('#youtube_custom_refresh_token').val(jQuery('#youtube_custom_refresh_token').val() + '<?php echo esc_js( $clienttoken_post['refresh_token'] ); ?>');
|
3293 |
+
jQuery('.fts-failed-api-token').hide();
|
3294 |
+
|
3295 |
+
if (!jQuery('.fts-successful-api-token').length) {
|
3296 |
+
jQuery('.fts-youtube-last-row').append('<?php echo $fts_youtube_message; ?>');
|
3297 |
+
}
|
3298 |
+
<?php
|
3299 |
+
} else {
|
3300 |
+
?>
|
3301 |
+
if (jQuery('.fts-failed-api-token').length) {
|
3302 |
+
jQuery('.fts-youtube-last-row').append('<?php echo $fts_youtube_message; ?>');
|
3303 |
+
jQuery('.fts-failed-api-token').hide();
|
3304 |
+
}
|
3305 |
+
<?php } ?>
|
3306 |
+
|
3307 |
+
jQuery('#youtube_custom_access_token').val(jQuery('#youtube_custom_access_token').val() + '<?php echo esc_js( $auth_obj['access_token'] ); ?>');
|
3308 |
+
jQuery('#youtube_custom_token_exp_time').val(jQuery('#youtube_custom_token_exp_time').val() + '<?php echo esc_js( strtotime( '+' . $auth_obj['expires_in'] . ' seconds' ) ); ?>');
|
3309 |
+
jQuery('<div class="fa fa-check-circle fa-3x fa-fw fts-success"></div>').insertBefore('.hide-button-tokens-options .feed-them-social-admin-input-wrap .fts-clear');
|
3310 |
+
jQuery('.fts-success').fadeIn('slow');
|
3311 |
+
<?php } ?>
|
3312 |
+
return false;
|
3313 |
+
}
|
3314 |
+
}); // end of ajax()
|
3315 |
+
return false;
|
3316 |
+
}); // end of document.ready
|
3317 |
+
</script>
|
3318 |
+
<?php
|
3319 |
+
return $auth_obj['access_token'];
|
3320 |
+
}
|
3321 |
+
}
|
3322 |
+
|
3323 |
+
|
3324 |
+
/**
|
3325 |
+
* FTS YouTube Link Filter
|
3326 |
+
*
|
3327 |
+
* @param string $youtube_description youtube description.
|
3328 |
+
* @return string
|
3329 |
+
* @since 1.9.6
|
3330 |
+
*/
|
3331 |
+
public function fts_youtube_link_filter ($youtube_description)
|
3332 |
+
{
|
3333 |
+
// Converts URLs to Links!
|
3334 |
+
$youtube_description = preg_replace( '@(?!(?!.*?<a)[^<]*<\/a>)(?:(?:https?|ftp|file)://|www\.|ftp\.)[-A-Z0-9+&#/%=~_|$?!:,.]*[A-Z0-9+&#/%=~_|$]@i', '<a href="\0" target="_blank">\0</a>', $youtube_description );
|
3335 |
+
|
3336 |
+
$splitano = explode( 'www', $youtube_description );
|
3337 |
+
$count = count( $splitano );
|
3338 |
+
$return_value = '';
|
3339 |
+
|
3340 |
+
for ( $i = 0; $i < $count; $i++ ) {
|
3341 |
+
if ( 'href=' === substr( $splitano[$i], -6, 5 ) ) {
|
3342 |
+
$return_value .= $splitano[$i] . 'http://www';
|
3343 |
+
} elseif ( $i < $count - 1 ) {
|
3344 |
+
$return_value .= $splitano[$i] . 'www';
|
3345 |
+
} else {
|
3346 |
+
$return_value .= $splitano[$i];
|
3347 |
+
}
|
3348 |
+
}
|
3349 |
+
return $return_value;
|
3350 |
+
}
|
3351 |
+
|
3352 |
+
/**
|
3353 |
+
* FTS Youtube Video and Wrap
|
3354 |
+
*
|
3355 |
+
* @param object $post_data post data.
|
3356 |
+
* @param string $username username.
|
3357 |
+
* @param string $playlist_id playlist id.
|
3358 |
+
* @since 1.9.6
|
3359 |
+
*/
|
3360 |
+
public function fts_youtube_video_and_wrap ($post_data, $username, $playlist_id)
|
3361 |
+
{
|
3362 |
+
$ssl = is_ssl() ? 'https' : 'http';
|
3363 |
+
$youtube_video_user_or_playlist_url = isset( $post_data->snippet->resourceId->videoId ) ? $post_data->snippet->resourceId->videoId : '';
|
3364 |
+
$youtube_video_channel_url = isset( $post_data->id->videoId ) ? $post_data->id->videoId : '';
|
3365 |
+
|
3366 |
+
if ( '' !== $username || '' !== $playlist_id ) {
|
3367 |
+
$youtube_video_iframe = '<div class="fts-fluid-videoWrapper"><iframe src="' . esc_url( $ssl . '://www.youtube.com/embed/' . $youtube_video_user_or_playlist_url ) . '?wmode=transparent&HD=0&rel=0&showinfo=0&controls=1&autoplay=0" frameborder="0" allowfullscreen></iframe></div>';
|
3368 |
+
|
3369 |
+
} else {
|
3370 |
+
$youtube_video_iframe = '<div class="fts-fluid-videoWrapper"><iframe src="' . esc_url( $ssl . '://www.youtube.com/embed/' . $youtube_video_channel_url ) . '?wmode=transparent&HD=0&rel=0&showinfo=0&controls=1&autoplay=0" frameborder="0" allowfullscreen></iframe></div>';
|
3371 |
+
}
|
3372 |
+
return $youtube_video_iframe;
|
3373 |
+
}
|
3374 |
+
|
3375 |
+
|
3376 |
+
/**
|
3377 |
+
* Youtube Description
|
3378 |
+
*
|
3379 |
+
* @param object $post_data post data.
|
3380 |
+
* @return string
|
3381 |
+
* @since 1.9.6
|
3382 |
+
*/
|
3383 |
+
public function fts_youtube_description ($post_data)
|
3384 |
+
{
|
3385 |
+
|
3386 |
+
$pinterest_description = isset( $post_data->snippet->description ) ? $post_data->snippet->description : '';
|
3387 |
+
return $pinterest_description;
|
3388 |
+
}
|
3389 |
+
|
3390 |
+
/**
|
3391 |
+
* Youtube Title
|
3392 |
+
*
|
3393 |
+
* @param object $post_data post data.
|
3394 |
+
* @return string
|
3395 |
+
* @since 1.9.6
|
3396 |
+
*/
|
3397 |
+
public function fts_youtube_title ($post_data)
|
3398 |
+
{
|
3399 |
+
$youtube_post_title = isset( $post_data->snippet->title ) ? $post_data->snippet->title : '';
|
3400 |
+
return $youtube_post_title;
|
3401 |
+
}
|
3402 |
+
|
3403 |
+
/**
|
3404 |
+
* FTS Facebook Group Form
|
3405 |
+
*
|
3406 |
+
* @param bool $save_options Save Options.
|
3407 |
+
* @since 1.9.6
|
3408 |
+
*/
|
3409 |
+
public function fts_facebook_group_form ($save_options = false)
|
3410 |
+
{
|
3411 |
+
// DEPRECIATED!
|
3412 |
+
}
|
3413 |
+
|
3414 |
+
public function fts_facebook_event_form ($save_options = false)
|
3415 |
+
{
|
3416 |
+
// DEPRECIATED!
|
3417 |
+
}
|
3418 |
}//end class
|
3419 |
?>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: slickremix
|
3 |
Tags: Facebook, Instagram, Twitter, YouTube, Feed
|
4 |
Requires at least: 3.6.0
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 2.6.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Custom feeds for Facebook Pages, Album Photos, Videos & Covers, Instagram, Twitter, Pinterest & YouTube on pages, posts or widgets.
|
@@ -75,6 +75,10 @@ Feed Them Social was Developed By SlickRemix --> [https://www.slickremix.com/](h
|
|
75 |
* Log into WordPress dashboard then click **Plugins** > **Add new** > Then under the title "Install Plugins" click **Upload** > **choose the zip** > **Activate the plugin!**
|
76 |
|
77 |
== Changelog ==
|
|
|
|
|
|
|
|
|
78 |
= Version 2.6.0 Tuesday, December 4th, 2018 =
|
79 |
* FIX: Global Options: Share button not hiding when option was checked.
|
80 |
* FIX: Review Notice showing on activation.
|
2 |
Contributors: slickremix
|
3 |
Tags: Facebook, Instagram, Twitter, YouTube, Feed
|
4 |
Requires at least: 3.6.0
|
5 |
+
Tested up to: 5.0.1
|
6 |
+
Stable tag: 2.6.1
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Custom feeds for Facebook Pages, Album Photos, Videos & Covers, Instagram, Twitter, Pinterest & YouTube on pages, posts or widgets.
|
75 |
* Log into WordPress dashboard then click **Plugins** > **Add new** > Then under the title "Install Plugins" click **Upload** > **choose the zip** > **Activate the plugin!**
|
76 |
|
77 |
== Changelog ==
|
78 |
+
= Version 2.6.1 Saturday, December 15th, 2018 =
|
79 |
+
* NEW: Instagram Options: After clicking the button to get an access token the information will now automatically save to the database.
|
80 |
+
* FIX: Instagram Options: Incorrect call to check error status.
|
81 |
+
|
82 |
= Version 2.6.0 Tuesday, December 4th, 2018 =
|
83 |
* FIX: Global Options: Share button not hiding when option was checked.
|
84 |
* FIX: Review Notice showing on activation.
|