Feed Them Social – Facebook, Instagram, Twitter, YouTube, Pinterest - Version 2.8.5

Version Description

Download this release

Release Info

Developer slickremix
Plugin Icon 128x128 Feed Them Social – Facebook, Instagram, Twitter, YouTube, Pinterest
Version 2.8.5
Comparing to
See all releases

Code changes from version 2.8.4 to 2.8.5

Files changed (3) hide show
  1. feed-them.php +4 -4
  2. includes/feed-them-functions.php +115 -103
  3. readme.txt +6 -1
feed-them.php CHANGED
@@ -7,18 +7,18 @@
7
  * Plugin Name: Feed Them Social - for Twitter feed, Youtube, Pinterest and more
8
  * Plugin URI: https://feedthemsocial.com/
9
  * Description: Display a Custom Facebook feed, Instagram feed, Twitter feed, Pinterest feed & YouTube feed on pages, posts or widgets.
10
- * Version: 2.8.4
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.4.2
17
- * Stable tag: 2.8.4
18
  * License: GPLv2 or later
19
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
20
  *
21
- * @version 2.8.4
22
  * @package FeedThemSocial/Core
23
  * @copyright Copyright (c) 2012-2020 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.8.4' );
35
 
36
  define( 'FEED_THEM_SOCIAL_NOTICE_STATUS', get_option( 'rating_fts_slick_notice', false ) );
37
 
7
  * Plugin Name: Feed Them Social - for Twitter feed, Youtube, Pinterest and more
8
  * Plugin URI: https://feedthemsocial.com/
9
  * Description: Display a Custom Facebook feed, Instagram feed, Twitter feed, Pinterest feed & YouTube feed on pages, posts or widgets.
10
+ * Version: 2.8.5
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.4.2
17
+ * Stable tag: 2.8.5
18
  * License: GPLv2 or later
19
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
20
  *
21
+ * @version 2.8.5
22
  * @package FeedThemSocial/Core
23
  * @copyright Copyright (c) 2012-2020 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.8.5' );
35
 
36
  define( 'FEED_THEM_SOCIAL_NOTICE_STATUS', get_option( 'rating_fts_slick_notice', false ) );
37
 
includes/feed-them-functions.php CHANGED
@@ -115,13 +115,13 @@ class feed_them_social_functions {
115
 
116
  $fts_refresh_token_nonce = wp_create_nonce( 'fts_token_nonce' );
117
  $access_token = $_REQUEST['access_token'];
118
- $user_id = $_REQUEST['user_id'];
119
 
120
  if ( wp_verify_nonce( $fts_refresh_token_nonce, 'fts_token_nonce' ) ) {
121
  if ( isset( $access_token ) ) {
122
  update_option( 'fts_instagram_custom_api_token', sanitize_text_field( $access_token ) );
123
  // $insta_id = substr( $access_token, 0, strpos( $access_token, '.' ) );
124
- update_option( 'fts_instagram_custom_id', sanitize_text_field( $user_id ) );
125
  }
126
  }
127
  die;
@@ -143,32 +143,31 @@ class feed_them_social_functions {
143
 
144
  $auth_obj = $_GET['access_token'];
145
  $feed_type = $_GET['feed_type'];
146
- $user_id = $_GET['user_id'];
147
 
148
  if ( isset( $auth_obj ) && 'original_instagram' === $feed_type || isset( $auth_obj ) && 'instagram_basic' === $feed_type ) {
149
  ?>
150
  <script>
151
  jQuery(document).ready(function () {
152
  var access_token = '<?php echo sanitize_text_field( $auth_obj ); ?>';
153
- var user_id = '<?php echo sanitize_text_field( $user_id ); ?>';
154
 
155
  jQuery.ajax({
156
  data: {
157
  action: 'fts_instagram_token_ajax',
158
  access_token: access_token,
159
- user_id: user_id,
160
  },
161
  type: 'POST',
162
  url: ftsAjax.ajaxurl,
163
  success: function (response) {
164
  <?php
165
- $auth_obj = $_GET['access_token'];
166
- if ( 'instagram_basic' === $feed_type ){
167
- $insta_url = esc_url_raw( 'https://graph.instagram.com/me?fields=id,username&access_token=' . $auth_obj );
168
- }
169
- else {
170
- $insta_url = esc_url( 'https://api.instagram.com/v1/users/self/?access_token=' . $auth_obj );
171
- }
172
  // Get Data for Instagram to check for errors
173
  $response = wp_remote_fopen( $insta_url );
174
  $test_app_token_response = json_decode( $response );
@@ -209,7 +208,7 @@ class feed_them_social_functions {
209
  <?php
210
  }
211
  ?>
212
- console.log( 'success saving instagram access token' );
213
  }
214
  }); // end of ajax()
215
  return false;
@@ -238,41 +237,41 @@ class feed_them_social_functions {
238
  return $val;
239
  }
240
 
241
- /**
242
- * FTS Share Option
243
- *
244
- * @param string $fb_link link for social network.
245
- * @param string $description description field for some of the social networks.
246
- * @since
247
- */
248
- public function fts_share_option( $fb_link, $description ) {
249
-
250
- $hide_share = get_option( 'fts_disable_share_button', true ) ? get_option( 'fts_disable_share_button', true ) : '';
251
-
252
- if ( isset( $hide_share ) && '1' !== $hide_share ) {
253
- // Social media sharing URLs
254
- $link = $fb_link;
255
- $description = wp_strip_all_tags( $description );
256
- $ft_gallery_share_linkedin = 'https://www.linkedin.com/shareArticle?mini=true&url=' . $link;
257
- $ft_gallery_share_email = 'mailto:?subject=Shared Link&body=' . $link . ' - ' . $description;
258
- $ft_gallery_share_facebook = 'https://www.facebook.com/sharer/sharer.php?u=' . $link;
259
- $ft_gallery_share_twitter = 'https://twitter.com/intent/tweet?text=' . $link . '+' . $description;
260
- $ft_gallery_share_google = 'https://plus.google.com/share?url=' . $link;
261
-
262
- // The share wrap and links
263
- $output = '<div class="fts-share-wrap">';
264
- $output .= '<a href="javascript:;" class="ft-gallery-link-popup" title="' . esc_html( 'Social Share Options', 'feed-them-social' ) . '">' . esc_html( '', 'feed-them-social' ) . '</a>';
265
- $output .= '<div class="ft-gallery-share-wrap">';
266
- $output .= '<a href="' . esc_attr( $ft_gallery_share_facebook ) . '" target="_blank" rel="noreferrer" class="ft-galleryfacebook-icon" title="Share this post on Facebook"><i class="fa fa-facebook-square"></i></a>';
267
- $output .= '<a href="' . esc_attr( $ft_gallery_share_twitter ) . '" target="_blank" rel="noreferrer" class="ft-gallerytwitter-icon" title="Share this post on Twitter"><i class="fa fa-twitter"></i></a>';
268
- $output .= '<a href="' . esc_attr( $ft_gallery_share_google ) . '" target="_blank" rel="noreferrer" class="ft-gallerygoogle-icon" title="Share this post on Google"><i class="fa fa-google-plus"></i></a>';
269
- $output .= '<a href="' . esc_attr( $ft_gallery_share_linkedin ) . '" target="_blank" rel="noreferrer" class="ft-gallerylinkedin-icon" title="Share this post on Linkedin"><i class="fa fa-linkedin"></i></a>';
270
- $output .= '<a href="' . esc_attr( $ft_gallery_share_email ) . '" target="_blank" rel="noreferrer" class="ft-galleryemail-icon" title="Share this post in your email"><i class="fa fa-envelope"></i></a>';
271
- $output .= '</div>';
272
- $output .= '</div>';
273
- return $output;
274
- }
275
- }
276
 
277
  /**
278
  * FTS FB Options Page Function
@@ -295,9 +294,9 @@ class feed_them_social_functions {
295
  ob_start();
296
 
297
  if ( ! isset( $_GET['locations'] ) ) {
298
- $fb_url = 'fts-facebook-feed-styles-submenu-page' == $_GET['page'] ? 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' ) : wp_remote_fopen( 'https://graph.facebook.com/me/accounts?fields=instagram_business_account{id,username,profile_picture_url},locations{instagram_business_account{profile_picture_url,id,username},name,id,page_username,locations,store_number,store_location_descriptor,access_token},name,id,link,access_token&access_token=' . $_GET['access_token'] . '&limit=25' );
299
- $fb_token_response = isset( $_REQUEST['next_url'] ) ? wp_remote_fopen( esc_url_raw( $_REQUEST['next_url'] ) ) : $fb_url;
300
- $test_fb_app_token_response = json_decode( $fb_token_response );
301
  $_REQUEST['next_url'] = isset( $test_fb_app_token_response->paging->next ) ? esc_url_raw( $test_fb_app_token_response->paging->next ) : '';
302
  } else {
303
  $fb_token_response = isset( $_REQUEST['next_location_url'] ) ? wp_remote_fopen( esc_url_raw( $_REQUEST['next_location_url'] ) ) : '';
@@ -333,7 +332,6 @@ class feed_them_social_functions {
333
  foreach ( $test_fb_app_token_response->data as $data ) {
334
 
335
  // if( !empty( $data->instagram_business_account ) ){
336
-
337
  $data_id = isset( $data->instagram_business_account ) && 'fts-facebook-feed-styles-submenu-page' !== $_GET['page'] ? $data->instagram_business_account->id : $data->id;
338
  $data_user_name = isset( $data->instagram_business_account ) && 'fts-facebook-feed-styles-submenu-page' !== $_GET['page'] ? '<span class="fts-insta-icon"></span>' . $data->instagram_business_account->username . '<span class="fts-arrow-icon"></span><span class="fts-fb-icon"></span>' . $data->name : $data->name;
339
  $data_thumbnail = isset( $data->instagram_business_account->profile_picture_url ) && 'fts-facebook-feed-styles-submenu-page' !== $_GET['page'] ? $data->instagram_business_account->profile_picture_url : 'https://graph.facebook.com/' . $data->id . '/picture';
@@ -2126,18 +2124,18 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2126
  $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2127
  };
2128
  // INSTRUCTIONAL TEXT FOR FACEBOOK TYPE SELECTION. PAGE, GROUP, EVENT, ALBUMS, ALBUM COVERS AND HASH TAGS!
2129
- $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>
2130
- <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>
2131
- <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>
2132
- <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>
2133
- <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>
2134
- <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>
2135
- <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>';
2136
  if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
2137
  // this is for the facebook videos!
2138
- $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>';
2139
  // this is for the facebook reviews!
2140
- $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>';
2141
  }
2142
  // FACEBOOK PAGE ID!
2143
  if ( isset( $_GET['page'] ) && 'fts-bar-settings-page' !== $_GET['page'] ) {
@@ -2169,8 +2167,8 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2169
  $output .= '<div class="feed-them-social-admin-input-wrap">';
2170
  $output .= '<div class="feed-them-social-admin-input-label">' . esc_html( '# of Posts', 'feed-them-premium' );
2171
 
2172
- 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' ) ) {
2173
- $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>';
2174
  }
2175
  $output .= '</div>';
2176
  $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' ) . '" />';
@@ -2279,7 +2277,7 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2279
  $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>
2280
  <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>';
2281
  // POSITION IMAGE LEFT RIGHT!
2282
- $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>
2283
  <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>
2284
  <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' ) . '">
2285
  <div class="fts-clear"></div></div>';
@@ -2303,7 +2301,7 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2303
  } else {
2304
  // if slider plugin is active!
2305
  $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>
2306
- <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>';
2307
  }
2308
 
2309
  // end slideshow wrap!
@@ -2385,7 +2383,7 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2385
  $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2386
  $output .= '</div><!--/twitter-hashtag-etc-wrap-->';
2387
 
2388
- $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>';
2389
  $output .= '<div class="feed-them-social-admin-input-wrap twitter_name">';
2390
  $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>';
2391
  $output .= '<input type="text" name="twitter_name" id="twitter_name" class="feed-them-social-admin-input" value="' . esc_html( $twitter_name_option ) . '" />';
@@ -2398,7 +2396,7 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2398
  $output .= sprintf(
2399
  esc_html( '%1$s More than 6 Requires the %2$sPremium Extension%3$s', 'feed-them-social' ),
2400
  '<br/><small>',
2401
- '<a target="_blank" href="' . esc_url( 'http://www.slickremix.com/downloads/feed-them-social-premium-extension/' ) . '">',
2402
  '</a></small>'
2403
  );
2404
  }
@@ -2457,8 +2455,10 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2457
  if ( wp_verify_nonce( $fts_instagram_form_nonce, 'fts-instagram-form-nonce' ) ) {
2458
 
2459
  if ( $save_options ) {
2460
- $instagram_name_option = get_option( 'convert_instagram_username' );
 
2461
  $instagram_id_option = get_option( 'instagram_id' );
 
2462
  $pics_count_option = get_option( 'pics_count' );
2463
  $instagram_popup_option = get_option( 'instagram_popup_option' );
2464
  $instagram_load_more_option = get_option( 'instagram_load_more_option' );
@@ -2472,47 +2472,59 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2472
  $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";
2473
  // end custom message for requiring token!
2474
  // ONLY SHOW SUPER GALLERY OPTIONS ON FTS SETTINGS PAGE FOR NOW, NOT FTS BAR!
2475
- if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
2476
  // INSTAGRAM FEED TYPE!
2477
- $output .= '<h2>' . esc_html( 'Instagram Shortcode Generator', 'feed-them-social' ) . '</h2><div class="feed-them-social-admin-input-wrap instagram-gen-selection">';
2478
- $output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Feed Type', 'feed-them-social' ) . '</div>';
2479
- $output .= '<select name="instagram-messages-selector" id="instagram-messages-selector" class="feed-them-social-admin-input">';
2480
- $output .= '<option value="user">' . esc_html( 'User Feed', 'feed-them-social' ) . '</option>';
2481
- $output .= '<option value="hashtag">' . esc_html( 'Hashtag Feed', 'feed-them-social' ) . '</option>';
2482
- $output .= '</select>';
2483
- $output .= '<div class="fts-clear"></div>';
2484
- $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2485
- };
2486
- $output .= '<div class="instagram-id-option-wrap">';
2487
- $output .= '<h3>' . esc_html( 'Convert Instagram Name to ID', 'feed-them-social' ) . '</h3>';
2488
- }
2489
- $instagram_name_option = isset( $instagram_name_option ) ? $instagram_name_option : '';
2490
- $instagram_id_option = isset( $instagram_id_option ) ? $instagram_id_option : '';
2491
- $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>';
2492
- $output .= '<div class="feed-them-social-admin-input-wrap convert_instagram_username">';
2493
- $output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Instagram Name (required)', 'feed-them-social' ) . '</div>';
2494
- $output .= '<input type="text" id="convert_instagram_username" name="convert_instagram_username" class="feed-them-social-admin-input" value="' . esc_html( $instagram_name_option ) . '" />';
2495
- $output .= '<div class="fts-clear"></div>';
2496
- $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2497
- $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;" />';
2498
- // ONLY THIS DIV IF ON OUR SETTINGS PAGE!
2499
- if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
2500
- $output .= '</div><!--instagram-id-option-wrap-->';
2501
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2502
  if ( false === $save_options ) {
2503
  $output .= '</form>';
2504
  }
2505
  if ( false === $save_options ) {
2506
  $output .= '<form class="feed-them-social-admin-form shortcode-generator-form instagram-shortcode-form">';
2507
  }
2508
- $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>';
2509
- $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>';
 
 
 
 
 
 
 
 
 
 
2510
  $output .= '<div class="feed-them-social-admin-input-wrap instagram_name">';
2511
  $output .= '<div class="feed-them-social-admin-input-label instagram-user-option-text">' . esc_html( 'Instagram ID # (required)', 'feed-them-social' ) . '</div>';
2512
- $output .= '<div class="feed-them-social-admin-input-label instagram-hashtag-option-text" style="display:none;">' . esc_html( 'Hashtag (required)', 'feed-them-social' ) . '</div>';
2513
  $output .= '<input type="text" name="instagram_id" id="instagram_id" class="feed-them-social-admin-input" value="' . esc_html( $instagram_id_option ) . '" />';
2514
  $output .= '<div class="fts-clear"></div>';
2515
  $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
 
 
 
 
 
 
 
 
 
2516
  // Super Instagram Options!
2517
  $pics_count_option = isset( $pics_count_option ) ? $pics_count_option : '';
2518
  // Pic Count Option!
@@ -2522,7 +2534,7 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2522
  $output .= sprintf(
2523
  esc_html( '%1$s More than 6 Requires the %2$sPremium Extension%3$s', 'feed-them-social' ),
2524
  '<br/><small>',
2525
- '<a target="_blank" href="' . esc_url( 'http://www.slickremix.com/downloads/feed-them-social-premium-extension/' ) . '">',
2526
  '</a></small>'
2527
  );
2528
  }
@@ -2616,7 +2628,7 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2616
  // end custom message for requiring token!
2617
  $output .= '<h2>' . esc_html( 'YouTube Shortcode Generator', 'feed-them-social' ) . '</h2>';
2618
  }
2619
- $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>';
2620
  if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
2621
  include $this->premium . 'admin/youtube-settings-fields.php';
2622
  } else {
@@ -2628,7 +2640,7 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2628
  __( 'Display First video full size', 'feed-them-social' ),
2629
  );
2630
  $output .= $this->need_fts_premium_fields( $fields );
2631
- $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>';
2632
  $output .= '</form>';
2633
  }
2634
  $output .= '</div><!--/fts-youtube-shortcode-form-->';
@@ -2664,8 +2676,8 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2664
  $output .= '</select>';
2665
  $output .= '<div class="fts-clear"></div>';
2666
  $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2667
- $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>';
2668
- $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>';
2669
  $pinterest_name_option = isset( $pinterest_name_option ) ? $pinterest_name_option : '';
2670
  $boards_count_option = isset( $boards_count_option ) ? $boards_count_option : '';
2671
  $output .= '<div class="feed-them-social-admin-input-wrap pinterest_name">';
@@ -2825,8 +2837,8 @@ if ( ! empty( $youtube_loadmore_text_color ) ) {
2825
  /**
2826
  * FTS Check Feed Cache Exists
2827
  *
2828
- * @param string $transient_name transient name.
2829
- * @param boolean $errored Error Check.
2830
  * @return bool
2831
  * @since 1.9.6
2832
  */
115
 
116
  $fts_refresh_token_nonce = wp_create_nonce( 'fts_token_nonce' );
117
  $access_token = $_REQUEST['access_token'];
118
+ $user_id = $_REQUEST['user_id'];
119
 
120
  if ( wp_verify_nonce( $fts_refresh_token_nonce, 'fts_token_nonce' ) ) {
121
  if ( isset( $access_token ) ) {
122
  update_option( 'fts_instagram_custom_api_token', sanitize_text_field( $access_token ) );
123
  // $insta_id = substr( $access_token, 0, strpos( $access_token, '.' ) );
124
+ update_option( 'fts_instagram_custom_id', sanitize_text_field( $user_id ) );
125
  }
126
  }
127
  die;
143
 
144
  $auth_obj = $_GET['access_token'];
145
  $feed_type = $_GET['feed_type'];
146
+ $user_id = $_GET['user_id'];
147
 
148
  if ( isset( $auth_obj ) && 'original_instagram' === $feed_type || isset( $auth_obj ) && 'instagram_basic' === $feed_type ) {
149
  ?>
150
  <script>
151
  jQuery(document).ready(function () {
152
  var access_token = '<?php echo sanitize_text_field( $auth_obj ); ?>';
153
+ var user_id = '<?php echo sanitize_text_field( $user_id ); ?>';
154
 
155
  jQuery.ajax({
156
  data: {
157
  action: 'fts_instagram_token_ajax',
158
  access_token: access_token,
159
+ user_id: user_id,
160
  },
161
  type: 'POST',
162
  url: ftsAjax.ajaxurl,
163
  success: function (response) {
164
  <?php
165
+ $auth_obj = $_GET['access_token'];
166
+ if ( 'instagram_basic' === $feed_type ) {
167
+ $insta_url = esc_url_raw( 'https://graph.instagram.com/me?fields=id,username&access_token=' . $auth_obj );
168
+ } else {
169
+ $insta_url = esc_url( 'https://api.instagram.com/v1/users/self/?access_token=' . $auth_obj );
170
+ }
 
171
  // Get Data for Instagram to check for errors
172
  $response = wp_remote_fopen( $insta_url );
173
  $test_app_token_response = json_decode( $response );
208
  <?php
209
  }
210
  ?>
211
+ console.log( 'success saving instagram access token' );
212
  }
213
  }); // end of ajax()
214
  return false;
237
  return $val;
238
  }
239
 
240
+ /**
241
+ * FTS Share Option
242
+ *
243
+ * @param string $fb_link link for social network.
244
+ * @param string $description description field for some of the social networks.
245
+ * @since
246
+ */
247
+ public function fts_share_option( $fb_link, $description ) {
248
+
249
+ $hide_share = get_option( 'fts_disable_share_button', true ) ? get_option( 'fts_disable_share_button', true ) : '';
250
+
251
+ if ( isset( $hide_share ) && '1' !== $hide_share ) {
252
+ // Social media sharing URLs
253
+ $link = $fb_link;
254
+ $description = wp_strip_all_tags( $description );
255
+ $ft_gallery_share_linkedin = 'https://www.linkedin.com/shareArticle?mini=true&url=' . $link;
256
+ $ft_gallery_share_email = 'mailto:?subject=Shared Link&body=' . $link . ' - ' . $description;
257
+ $ft_gallery_share_facebook = 'https://www.facebook.com/sharer/sharer.php?u=' . $link;
258
+ $ft_gallery_share_twitter = 'https://twitter.com/intent/tweet?text=' . $link . '+' . $description;
259
+ $ft_gallery_share_google = 'https://plus.google.com/share?url=' . $link;
260
+
261
+ // The share wrap and links
262
+ $output = '<div class="fts-share-wrap">';
263
+ $output .= '<a href="javascript:;" class="ft-gallery-link-popup" title="' . esc_html( 'Social Share Options', 'feed-them-social' ) . '">' . esc_html( '', 'feed-them-social' ) . '</a>';
264
+ $output .= '<div class="ft-gallery-share-wrap">';
265
+ $output .= '<a href="' . esc_attr( $ft_gallery_share_facebook ) . '" target="_blank" rel="noreferrer" class="ft-galleryfacebook-icon" title="Share this post on Facebook"><i class="fa fa-facebook-square"></i></a>';
266
+ $output .= '<a href="' . esc_attr( $ft_gallery_share_twitter ) . '" target="_blank" rel="noreferrer" class="ft-gallerytwitter-icon" title="Share this post on Twitter"><i class="fa fa-twitter"></i></a>';
267
+ $output .= '<a href="' . esc_attr( $ft_gallery_share_google ) . '" target="_blank" rel="noreferrer" class="ft-gallerygoogle-icon" title="Share this post on Google"><i class="fa fa-google-plus"></i></a>';
268
+ $output .= '<a href="' . esc_attr( $ft_gallery_share_linkedin ) . '" target="_blank" rel="noreferrer" class="ft-gallerylinkedin-icon" title="Share this post on Linkedin"><i class="fa fa-linkedin"></i></a>';
269
+ $output .= '<a href="' . esc_attr( $ft_gallery_share_email ) . '" target="_blank" rel="noreferrer" class="ft-galleryemail-icon" title="Share this post in your email"><i class="fa fa-envelope"></i></a>';
270
+ $output .= '</div>';
271
+ $output .= '</div>';
272
+ return $output;
273
+ }
274
+ }
275
 
276
  /**
277
  * FTS FB Options Page Function
294
  ob_start();
295
 
296
  if ( ! isset( $_GET['locations'] ) ) {
297
+ $fb_url = 'fts-facebook-feed-styles-submenu-page' == $_GET['page'] ? 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' ) : wp_remote_fopen( 'https://graph.facebook.com/me/accounts?fields=instagram_business_account{id,username,profile_picture_url},locations{instagram_business_account{profile_picture_url,id,username},name,id,page_username,locations,store_number,store_location_descriptor,access_token},name,id,link,access_token&access_token=' . $_GET['access_token'] . '&limit=25' );
298
+ $fb_token_response = isset( $_REQUEST['next_url'] ) ? wp_remote_fopen( esc_url_raw( $_REQUEST['next_url'] ) ) : $fb_url;
299
+ $test_fb_app_token_response = json_decode( $fb_token_response );
300
  $_REQUEST['next_url'] = isset( $test_fb_app_token_response->paging->next ) ? esc_url_raw( $test_fb_app_token_response->paging->next ) : '';
301
  } else {
302
  $fb_token_response = isset( $_REQUEST['next_location_url'] ) ? wp_remote_fopen( esc_url_raw( $_REQUEST['next_location_url'] ) ) : '';
332
  foreach ( $test_fb_app_token_response->data as $data ) {
333
 
334
  // if( !empty( $data->instagram_business_account ) ){
 
335
  $data_id = isset( $data->instagram_business_account ) && 'fts-facebook-feed-styles-submenu-page' !== $_GET['page'] ? $data->instagram_business_account->id : $data->id;
336
  $data_user_name = isset( $data->instagram_business_account ) && 'fts-facebook-feed-styles-submenu-page' !== $_GET['page'] ? '<span class="fts-insta-icon"></span>' . $data->instagram_business_account->username . '<span class="fts-arrow-icon"></span><span class="fts-fb-icon"></span>' . $data->name : $data->name;
337
  $data_thumbnail = isset( $data->instagram_business_account->profile_picture_url ) && 'fts-facebook-feed-styles-submenu-page' !== $_GET['page'] ? $data->instagram_business_account->profile_picture_url : 'https://graph.facebook.com/' . $data->id . '/picture';
2124
  $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2125
  };
2126
  // INSTRUCTIONAL TEXT FOR FACEBOOK TYPE SELECTION. PAGE, GROUP, EVENT, ALBUMS, ALBUM COVERS AND HASH TAGS!
2127
+ $output .= '<div class="instructional-text facebook-message-generator page inst-text-facebook-page" style="display:block;">' . esc_html( 'If your Access Token is set on the Facebook Options page of our plugin your ID should appear below.', 'feed-them-social' ) . ' </div>
2128
+ <div class="instructional-text facebook-message-generator group inst-text-facebook-group">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="https://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>
2129
+ <div class="instructional-text facebook-message-generator event-list inst-text-facebook-event-list">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="https://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>
2130
+ <div class="instructional-text facebook-message-generator event inst-text-facebook-event">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="https://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>
2131
+ <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="https://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>
2132
+ <div class="instructional-text facebook-message-generator albums inst-text-facebook-albums">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="https://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>
2133
+ <div class="instructional-text facebook-message-generator video inst-text-facebook-video">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="https://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>';
2134
  if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
2135
  // this is for the facebook videos!
2136
+ $output .= '<div class="feed-them-social-admin-input-wrap fts-premium-options-message" style="display:none;"><a target="_blank" href="https://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>';
2137
  // this is for the facebook reviews!
2138
+ $output .= '<div class="feed-them-social-admin-input-wrap fts-premium-options-message2" style="display:none;"><a target="_blank" href="https://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>';
2139
  }
2140
  // FACEBOOK PAGE ID!
2141
  if ( isset( $_GET['page'] ) && 'fts-bar-settings-page' !== $_GET['page'] ) {
2167
  $output .= '<div class="feed-them-social-admin-input-wrap">';
2168
  $output .= '<div class="feed-them-social-admin-input-label">' . esc_html( '# of Posts', 'feed-them-premium' );
2169
 
2170
+ if ( ! is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
2171
+ $output .= '<br/><small>' . esc_html( 'More than 6 Requires <a target="_blank" href="https://www.slickremix.com/downloads/feed-them-social-premium-extension/">Premium version</a>', 'feed-them-premium' ) . '</small>';
2172
  }
2173
  $output .= '</div>';
2174
  $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' ) . '" />';
2277
  $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>
2278
  <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>';
2279
  // POSITION IMAGE LEFT RIGHT!
2280
+ $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="https://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>
2281
  <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>
2282
  <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' ) . '">
2283
  <div class="fts-clear"></div></div>';
2301
  } else {
2302
  // if slider plugin is active!
2303
  $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>
2304
+ <div class="feed-them-social-admin-input-default" style="display: block !important;">' . esc_html( 'Must have ', 'feed-them-social' ) . ' <a target="_blank" href="https://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="https://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>';
2305
  }
2306
 
2307
  // end slideshow wrap!
2383
  $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2384
  $output .= '</div><!--/twitter-hashtag-etc-wrap-->';
2385
 
2386
+ $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="https://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>';
2387
  $output .= '<div class="feed-them-social-admin-input-wrap twitter_name">';
2388
  $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>';
2389
  $output .= '<input type="text" name="twitter_name" id="twitter_name" class="feed-them-social-admin-input" value="' . esc_html( $twitter_name_option ) . '" />';
2396
  $output .= sprintf(
2397
  esc_html( '%1$s More than 6 Requires the %2$sPremium Extension%3$s', 'feed-them-social' ),
2398
  '<br/><small>',
2399
+ '<a target="_blank" href="' . esc_url( 'https://www.slickremix.com/downloads/feed-them-social-premium-extension/' ) . '">',
2400
  '</a></small>'
2401
  );
2402
  }
2455
  if ( wp_verify_nonce( $fts_instagram_form_nonce, 'fts-instagram-form-nonce' ) ) {
2456
 
2457
  if ( $save_options ) {
2458
+ // $instagram_name_option = get_option( 'convert_instagram_username' );
2459
+ $instagram_feed_type = get_option( 'instagram_feed_type' );
2460
  $instagram_id_option = get_option( 'instagram_id' );
2461
+ $instagram_hashtag_option = get_option( 'instagram_hashtag_name' );
2462
  $pics_count_option = get_option( 'pics_count' );
2463
  $instagram_popup_option = get_option( 'instagram_popup_option' );
2464
  $instagram_load_more_option = get_option( 'instagram_load_more_option' );
2472
  $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";
2473
  // end custom message for requiring token!
2474
  // ONLY SHOW SUPER GALLERY OPTIONS ON FTS SETTINGS PAGE FOR NOW, NOT FTS BAR!
2475
+ // if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
2476
  // INSTAGRAM FEED TYPE!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2477
  };
2478
+ // $output .= '<div class="instagram-id-option-wrap">';
2479
+ // $output .= '<h3>' . esc_html( 'Convert Instagram Name to ID', 'feed-them-social' ) . '</h3>';
2480
+ // }
2481
+ $instagram_name_option = isset( $instagram_name_option ) ? $instagram_name_option : '';
2482
+ $instagram_id_option = isset( $instagram_id_option ) ? $instagram_id_option : '';
2483
+ $instagram_hashtag_option = isset( $instagram_hashtag_option ) ? $instagram_hashtag_option : '';
2484
+ $instagram_feed_type = isset( $instagram_feed_type ) ? $instagram_feed_type : '';
2485
+ // $output .= '<div class="instructional-text">' . esc_html( 'You must copy your', 'feed-them-social' ) . ' <a href="https://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>';
2486
+ // $output .= '<div class="feed-them-social-admin-input-wrap convert_instagram_username">';
2487
+ // $output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Instagram Name (required)', 'feed-them-social' ) . '</div>';
2488
+ // $output .= '<input type="text" id="convert_instagram_username" name="convert_instagram_username" class="feed-them-social-admin-input" value="' . esc_html( $instagram_name_option ) . '" />';
2489
+ // $output .= '<div class="fts-clear"></div>';
2490
+ // $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2491
+ // $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;" />';
2492
+ // ONLY THIS DIV IF ON OUR SETTINGS PAGE!
2493
+ // if ( isset( $_GET['page'] ) && 'feed-them-settings-page' === $_GET['page'] ) {
2494
+ // $output .= '</div><!--instagram-id-option-wrap-->';
2495
+ // };
2496
  if ( false === $save_options ) {
2497
  $output .= '</form>';
2498
  }
2499
  if ( false === $save_options ) {
2500
  $output .= '<form class="feed-them-social-admin-form shortcode-generator-form instagram-shortcode-form">';
2501
  }
2502
+
2503
+ $output .= '<div class="feed-them-social-admin-input-wrap instagram-gen-selection">';
2504
+ $output .= '<div class="feed-them-social-admin-input-label">' . esc_html( 'Feed Type', 'feed-them-social' ) . '</div>';
2505
+ $output .= '<select name="instagram_feed_type" id="instagram-messages-selector" class="feed-them-social-admin-input">';
2506
+ $output .= '<option value="basic" ' . selected( $instagram_feed_type, 'basic', false ) . ' >' . esc_html( 'Basic Feed', 'feed-them-social' ) . '</option>';
2507
+ $output .= '<option value="business" ' . selected( $instagram_feed_type, 'business', false ) . '>' . esc_html( 'Business Feed', 'feed-them-social' ) . '</option>';
2508
+ $output .= '<option value="hashtag" ' . selected( $instagram_feed_type, 'hashtag', false ) . '>' . esc_html( 'Hashtag Feed', 'feed-them-social' ) . '</option>';
2509
+ $output .= '</select>';
2510
+ $output .= '<div class="fts-clear"></div>';
2511
+ $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2512
+
2513
+ $output .= '<div class="instructional-text instagram-user-option-text" style="margin-top:12px;"><div class="fts-insta-info-plus-wrapper">' . esc_html( 'If your Access Token is set on the Instagram Options page of our plugin your ID should appear below.', '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>';
2514
  $output .= '<div class="feed-them-social-admin-input-wrap instagram_name">';
2515
  $output .= '<div class="feed-them-social-admin-input-label instagram-user-option-text">' . esc_html( 'Instagram ID # (required)', 'feed-them-social' ) . '</div>';
 
2516
  $output .= '<input type="text" name="instagram_id" id="instagram_id" class="feed-them-social-admin-input" value="' . esc_html( $instagram_id_option ) . '" />';
2517
  $output .= '<div class="fts-clear"></div>';
2518
  $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2519
+
2520
+ $output .= '<div class="instructional-text instagram-hashtag-option-text">Add your hashtag below. <strong>DO NOT</strong> add the #, just the name. Only one hashtag allowed at this time. Hashtag media only stays on Instagram for 24 hours and the API does not give us a date/time. In order to use the Instagram hashtag feed you must have your Instagram account linked to a Facebook Business Page. <a target="_blank" href="https://www.slickremix.com/docs/link-instagram-account-to-facebook/">Read Instructions.</a></div>';
2521
+
2522
+ $output .= '<div class="feed-them-social-admin-input-wrap instagram_hashtag">';
2523
+ $output .= '<div class="feed-them-social-admin-input-label instagram-hashtag-option-text">' . esc_html( 'Hashtag (required)', 'feed-them-social' ) . '</div>';
2524
+ $output .= '<input type="text" name="instagram_hashtag_name" id="instagram_hashtag_name" class="feed-them-social-admin-input" value="' . esc_html( $instagram_hashtag_option ) . '" />';
2525
+ $output .= '<div class="fts-clear"></div>';
2526
+ $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2527
+
2528
  // Super Instagram Options!
2529
  $pics_count_option = isset( $pics_count_option ) ? $pics_count_option : '';
2530
  // Pic Count Option!
2534
  $output .= sprintf(
2535
  esc_html( '%1$s More than 6 Requires the %2$sPremium Extension%3$s', 'feed-them-social' ),
2536
  '<br/><small>',
2537
+ '<a target="_blank" href="' . esc_url( 'https://www.slickremix.com/downloads/feed-them-social-premium-extension/' ) . '">',
2538
  '</a></small>'
2539
  );
2540
  }
2628
  // end custom message for requiring token!
2629
  $output .= '<h2>' . esc_html( 'YouTube Shortcode Generator', 'feed-them-social' ) . '</h2>';
2630
  }
2631
+ $output .= '<div class="instructional-text">' . esc_html( 'You must copy your YouTube ', 'feed-them-social' ) . ' <a href="https://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>';
2632
  if ( is_plugin_active( 'feed-them-premium/feed-them-premium.php' ) ) {
2633
  include $this->premium . 'admin/youtube-settings-fields.php';
2634
  } else {
2640
  __( 'Display First video full size', 'feed-them-social' ),
2641
  );
2642
  $output .= $this->need_fts_premium_fields( $fields );
2643
+ $output .= '<a href="https://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>';
2644
  $output .= '</form>';
2645
  }
2646
  $output .= '</div><!--/fts-youtube-shortcode-form-->';
2676
  $output .= '</select>';
2677
  $output .= '<div class="fts-clear"></div>';
2678
  $output .= '</div><!--/feed-them-social-admin-input-wrap-->';
2679
+ $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="https://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>';
2680
+ $output .= '<div class="instructional-text pinterest-board-and-name-text" style="display:none;">' . esc_html( 'Copy your', 'feed-them-social' ) . ' <a href="https://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>';
2681
  $pinterest_name_option = isset( $pinterest_name_option ) ? $pinterest_name_option : '';
2682
  $boards_count_option = isset( $boards_count_option ) ? $boards_count_option : '';
2683
  $output .= '<div class="feed-them-social-admin-input-wrap pinterest_name">';
2837
  /**
2838
  * FTS Check Feed Cache Exists
2839
  *
2840
+ * @param string $transient_name transient name.
2841
+ * @param boolean $errored Error Check.
2842
  * @return bool
2843
  * @since 1.9.6
2844
  */
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: slickremix, slickchris
3
  Tags: Facebook, Instagram, Twitter, YouTube, Feed
4
  Requires at least: 3.6.0
5
  Tested up to: 5.4.2
6
- Stable tag: 2.8.4
7
  License: GPLv2 or later
8
 
9
  Display a Custom Facebook feed, Instagram feed, Twitter feed, Pinterest feed & YouTube feed on pages, posts or widgets.
@@ -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.8.4 Friday, June 19th, 2020 =
79
  * FIX: Custom CSS Option: Replace wp_enqueue_scripts with wp_print_styles.
80
  * FIX: Facebook Albums Feed: The main photos are now appearing for album feeds again.
3
  Tags: Facebook, Instagram, Twitter, YouTube, Feed
4
  Requires at least: 3.6.0
5
  Tested up to: 5.4.2
6
+ Stable tag: 2.8.5
7
  License: GPLv2 or later
8
 
9
  Display a Custom Facebook feed, Instagram feed, Twitter feed, Pinterest feed & YouTube feed on pages, posts or widgets.
75
  * Log into WordPress dashboard then click **Plugins** > **Add new** > Then under the title "Install Plugins" click **Upload** > **choose the zip** > **Activate the plugin!**
76
 
77
  == Changelog ==
78
+ = Version 2.8.5 Friday, June 26th, 2020 =
79
+ * NEW: Works with WordPress 5.4.2
80
+ * FTS BAR EXTENSION NEW: Instagram: Now includes, Basic, Business and Hashtag Feed options.
81
+ * FTS BAR EXTENSION NEW: Option to display FTS bar on a specific page ID.
82
+
83
  = Version 2.8.4 Friday, June 19th, 2020 =
84
  * FIX: Custom CSS Option: Replace wp_enqueue_scripts with wp_print_styles.
85
  * FIX: Facebook Albums Feed: The main photos are now appearing for album feeds again.