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