Instagram Feed - Version 2.9.5

Version Description

  • Fix: Fixed an issue when reconnecting a personal account.
  • Fix: Using showheader="true" in the shortcode would not work if the related setting was disabled on the settings page.
  • Fix: Added additional plugin hardening.
Download this release

Release Info

Developer smashballoon
Plugin Icon 128x128 Instagram Feed
Version 2.9.5
Comparing to
See all releases

Code changes from version 2.9.4 to 2.9.5

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon, craig-at-smash-balloon
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.4
5
  Tested up to: 5.8
6
- Stable tag: 2.9.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -331,6 +331,11 @@ We understand that sometimes you need help, have issues or just have questions.
331
  * Plus more customization options added all the time!
332
 
333
  == Changelog ==
 
 
 
 
 
334
  = 2.9.4 =
335
  * Tweak: All Instagram data is now encrypted in your WordPress database.
336
  * Tweak: Access Tokens are no longer able to be viewed on the settings page.
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.4
5
  Tested up to: 5.8
6
+ Stable tag: 2.9.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
331
  * Plus more customization options added all the time!
332
 
333
  == Changelog ==
334
+ = 2.9.5 =
335
+ * Fix: Fixed an issue when reconnecting a personal account.
336
+ * Fix: Using showheader="true" in the shortcode would not work if the related setting was disabled on the settings page.
337
+ * Fix: Added additional plugin hardening.
338
+
339
  = 2.9.4 =
340
  * Tweak: All Instagram data is now encrypted in your WordPress database.
341
  * Tweak: Access Tokens are no longer able to be viewed on the settings page.
inc/admin/actions.php CHANGED
@@ -21,6 +21,9 @@ function sb_instagram_admin_style() {
21
  add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_style' );
22
 
23
  function sb_instagram_admin_scripts() {
 
 
 
24
  wp_enqueue_script( 'sb_instagram_admin_js', SBI_PLUGIN_URL . 'js/sb-instagram-admin-2-2.js', array(), SBIVER );
25
  wp_localize_script( 'sb_instagram_admin_js', 'sbiA', array(
26
  'ajax_url' => admin_url( 'admin-ajax.php' ),
@@ -93,16 +96,14 @@ function sbi_add_settings_link( $links, $file ) {
93
  * retrieved with the big blue button
94
  */
95
  function sbi_auto_save_tokens() {
96
- $nonce = $_POST['sbi_nonce'];
97
 
98
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
99
- die ( 'You did not do this the right way!' );
100
  }
101
 
102
- wp_cache_delete ( 'alloptions', 'options' );
103
-
104
  $options = sbi_get_database_settings();
105
- $new_access_token = isset( $_POST['access_token'] ) ? sanitize_text_field( $_POST['access_token'] ) : false;
106
  $split_token = $new_access_token ? explode( '.', $new_access_token ) : array();
107
  $new_user_id = isset( $split_token[0] ) ? $split_token[0] : '';
108
 
@@ -148,10 +149,10 @@ function sbi_delete_local_avatar( $username ) {
148
  }
149
 
150
  function sbi_connect_business_accounts() {
151
- $nonce = $_POST['sbi_nonce'];
152
 
153
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
154
- die ( 'You did not do this the right way!' );
155
  }
156
 
157
  $accounts = isset( $_POST['accounts'] ) ? json_decode( stripslashes( $_POST['accounts'] ), true ) : false;
@@ -177,18 +178,18 @@ function sbi_connect_business_accounts() {
177
  add_action( 'wp_ajax_sbi_connect_business_accounts', 'sbi_connect_business_accounts' );
178
 
179
  function sbi_auto_save_id() {
180
- $nonce = $_POST['sbi_nonce'];
181
 
182
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
183
- die ( 'You did not do this the right way!' );
184
  }
185
- if ( current_user_can( 'edit_posts' ) && isset( $_POST['id'] ) ) {
186
- $options = get_option( 'sb_instagram_settings', array() );
187
 
188
- $options['sb_instagram_user_id'] = array( sanitize_text_field( $_POST['id'] ) );
 
 
 
 
189
 
190
- update_option( 'sb_instagram_settings', $options );
191
- }
192
  die();
193
  }
194
  add_action( 'wp_ajax_sbi_auto_save_id', 'sbi_auto_save_id' );
@@ -213,8 +214,14 @@ function sbi_formatted_error( $response ) {
213
  }
214
 
215
  function sbi_test_token() {
216
- $access_token = isset( $_POST['access_token'] ) ? trim( sanitize_text_field( $_POST['access_token'] ) ) : false;
217
- $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( $_POST['account_id'] ) : false;
 
 
 
 
 
 
218
 
219
  $return = sbi_connect_new_account( $access_token, $account_id );
220
 
@@ -224,12 +231,12 @@ function sbi_test_token() {
224
  add_action( 'wp_ajax_sbi_test_token', 'sbi_test_token' );
225
 
226
  function sbi_delete_account() {
227
- $nonce = $_POST['sbi_nonce'];
228
 
229
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
230
- die ( 'You did not do this the right way!' );
231
  }
232
- $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( $_POST['account_id'] ) : false;
233
 
234
  sbi_do_account_delete( $account_id );
235
 
@@ -283,7 +290,7 @@ function sbi_do_account_delete( $account_id ) {
283
  $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
284
  global $sb_instagram_posts_manager;
285
  $sb_instagram_posts_manager->reset_api_errors();
286
- wp_cache_delete ( 'alloptions', 'options' );
287
  $username = $connected_accounts[ $account_id ]['username'];
288
  $sb_instagram_posts_manager->add_action_log( 'Deleting account ' . $username );
289
 
@@ -311,8 +318,10 @@ function sbi_do_account_delete( $account_id ) {
311
  }
312
 
313
  function sbi_delete_platform_data_listener() {
 
 
314
  if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
315
- die( 'No!' );
316
  }
317
  sbi_delete_all_platform_data();
318
 
@@ -353,18 +362,18 @@ function sbi_connect_new_account( $access_token, $account_id ) {
353
  }
354
 
355
  function sbi_no_js_connected_account_management() {
356
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
357
  return;
358
  }
359
  if ( isset( $_POST['sb_manual_at'] ) ) {
360
- $access_token = isset( $_POST['sb_manual_at'] ) ? trim( sanitize_text_field( $_POST['sb_manual_at'] ) ) : false;
361
- $account_id = isset( $_POST['sb_manual_account_id'] ) ? sanitize_text_field( $_POST['sb_manual_account_id'] ) : false;
362
  if ( ! $access_token || ! $account_id ) {
363
  return;
364
  }
365
  sbi_connect_new_account( $access_token, $account_id );
366
  } elseif ( isset( $_GET['disconnect'] ) && isset( $_GET['page'] ) && $_GET['page'] === 'sb-instagram-feed' ) {
367
- $account_id = sanitize_text_field( $_GET['disconnect'] );
368
  sbi_do_account_delete( $account_id );
369
  }
370
 
@@ -373,7 +382,9 @@ add_action( 'admin_init', 'sbi_no_js_connected_account_management' );
373
 
374
  add_action('admin_notices', 'sbi_admin_ssl_notice');
375
  function sbi_admin_ssl_notice() {
376
-
 
 
377
  if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' )) ) {
378
  global $current_user;
379
  $user_id = $current_user->ID;
@@ -390,6 +401,9 @@ function sbi_admin_ssl_notice() {
390
 
391
  add_action( 'admin_init', 'sbi_check_notice_dismiss' );
392
  function sbi_check_notice_dismiss() {
 
 
 
393
  global $current_user;
394
  $user_id = $current_user->ID;
395
 
@@ -521,6 +535,8 @@ function sbi_connect_basic_account( $new_account_details ) {
521
  $accounts_to_save[ $new_account_details['user_id'] ]['private'] = true;
522
  }
523
 
 
 
524
  $options['connected_accounts'] = $accounts_to_save;
525
  $options['sb_instagram_user_id'] = $ids_to_save;
526
 
@@ -611,9 +627,14 @@ function sbi_business_account_request( $url, $account, $remove_access_token = tr
611
  }
612
 
613
  function sbi_after_connection() {
 
614
 
 
 
 
 
615
  if ( isset( $_POST['access_token'] ) ) {
616
- $access_token = sanitize_text_field( $_POST['access_token'] );
617
  $account_info = sbi_account_data_for_token( $access_token );
618
  echo sbi_json_encode( $account_info );
619
  }
@@ -622,8 +643,8 @@ function sbi_after_connection() {
622
  }
623
  add_action( 'wp_ajax_sbi_after_connection', 'sbi_after_connection' );
624
 
625
- function sbi_get_business_account_connection_modal($sb_instagram_user_id) {
626
- $access_token = sbi_maybe_clean(urldecode($_GET['sbi_access_token']));
627
  //
628
  $url = 'https://graph.facebook.com/me/accounts?fields=instagram_business_account,access_token&limit=500&access_token='.$access_token;
629
  $args = array(
@@ -741,10 +762,10 @@ function sbi_get_business_account_connection_modal($sb_instagram_user_id) {
741
  }
742
 
743
  function sbi_get_personal_connection_modal( $connected_accounts, $action_url = 'admin.php?page=sb-instagram-feed' ) {
744
- $access_token = sanitize_text_field( $_GET['sbi_access_token'] );
745
- $account_type = sanitize_text_field( $_GET['sbi_account_type'] );
746
- $user_id = sanitize_text_field( $_GET['sbi_id'] );
747
- $user_name = sanitize_text_field( $_GET['sbi_username'] );
748
  $expires_in = (int)$_GET['sbi_expires_in'];
749
  $expires_timestamp = time() + $expires_in;
750
 
@@ -801,12 +822,12 @@ function sbi_account_type_display( $type, $private = false ) {
801
  }
802
 
803
  function sbi_clear_backups() {
804
- $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
805
 
806
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
807
- die ( 'You did not do this the right way!' );
808
  }
809
-
810
  //Delete all transients
811
  global $wpdb;
812
  $table_name = $wpdb->prefix . "options";
@@ -831,7 +852,12 @@ function sbi_clear_backups() {
831
  add_action( 'wp_ajax_sbi_clear_backups', 'sbi_clear_backups' );
832
 
833
  function sbi_reset_resized() {
 
834
 
 
 
 
 
835
  global $sb_instagram_posts_manager;
836
  $sb_instagram_posts_manager->delete_all_sbi_instagram_posts();
837
  delete_option( 'sbi_top_api_calls' );
@@ -845,6 +871,12 @@ function sbi_reset_resized() {
845
  add_action( 'wp_ajax_sbi_reset_resized', 'sbi_reset_resized' );
846
 
847
  function sbi_reset_log() {
 
 
 
 
 
 
848
  global $sb_instagram_posts_manager;
849
 
850
  $sb_instagram_posts_manager->remove_all_errors();
@@ -856,6 +888,12 @@ function sbi_reset_log() {
856
  add_action( 'wp_ajax_sbi_reset_log', 'sbi_reset_log' );
857
 
858
  function sbi_reset_api_errors() {
 
 
 
 
 
 
859
  global $sb_instagram_posts_manager;
860
  $sb_instagram_posts_manager->add_action_log( 'View feed and retry button clicked.' );
861
 
@@ -868,10 +906,10 @@ function sbi_reset_api_errors() {
868
  add_action( 'wp_ajax_sbi_reset_api_errors', 'sbi_reset_api_errors' );
869
 
870
  function sbi_lite_dismiss() {
871
- $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
872
 
873
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
874
- die ( 'You did not do this the right way!' );
875
  }
876
 
877
  set_transient( 'instagram_feed_dismiss_lite', 'dismiss', 1 * WEEK_IN_SECONDS );
@@ -882,7 +920,9 @@ add_action( 'wp_ajax_sbi_lite_dismiss', 'sbi_lite_dismiss' );
882
 
883
  add_action('admin_notices', 'sbi_admin_error_notices');
884
  function sbi_admin_error_notices() {
885
-
 
 
886
  if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' )) ) {
887
 
888
  global $sb_instagram_posts_manager;
@@ -1042,6 +1082,9 @@ add_action( 'admin_print_scripts', 'sbi_admin_hide_unrelated_notices' );
1042
  /* Usage */
1043
  add_action( 'admin_notices', 'sbi_usage_opt_in' );
1044
  function sbi_usage_opt_in() {
 
 
 
1045
  if ( isset( $_GET['trackingdismiss'] ) ) {
1046
  $usage_tracking = get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => false ) );
1047
 
@@ -1081,10 +1124,10 @@ function sbi_usage_opt_in() {
1081
  }
1082
 
1083
  function sbi_usage_opt_in_or_out() {
1084
- $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
1085
 
1086
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
1087
- die ( 'You did not do this the right way!' );
1088
  }
1089
 
1090
  $usage_tracking = sbi_get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => false ) );
@@ -1098,12 +1141,12 @@ function sbi_usage_opt_in_or_out() {
1098
  add_action( 'wp_ajax_sbi_usage_opt_in_or_out', 'sbi_usage_opt_in_or_out' );
1099
 
1100
  function sbi_oembed_disable() {
1101
- $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
1102
 
1103
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
1104
- die ( 'You did not do this the right way!' );
1105
  }
1106
-
1107
  $oembed_settings = get_option( 'sbi_oembed_token', array() );
1108
  $oembed_settings['access_token'] = '';
1109
  $oembed_settings['disabled'] = true;
21
  add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_style' );
22
 
23
  function sb_instagram_admin_scripts() {
24
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
25
+ return;
26
+ }
27
  wp_enqueue_script( 'sb_instagram_admin_js', SBI_PLUGIN_URL . 'js/sb-instagram-admin-2-2.js', array(), SBIVER );
28
  wp_localize_script( 'sb_instagram_admin_js', 'sbiA', array(
29
  'ajax_url' => admin_url( 'admin-ajax.php' ),
96
  * retrieved with the big blue button
97
  */
98
  function sbi_auto_save_tokens() {
99
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
100
 
101
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
102
+ wp_send_json_error();
103
  }
104
 
 
 
105
  $options = sbi_get_database_settings();
106
+ $new_access_token = isset( $_POST['access_token'] ) ? sanitize_text_field( wp_unslash( $_POST['access_token'] ) ) : false;
107
  $split_token = $new_access_token ? explode( '.', $new_access_token ) : array();
108
  $new_user_id = isset( $split_token[0] ) ? $split_token[0] : '';
109
 
149
  }
150
 
151
  function sbi_connect_business_accounts() {
152
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
153
 
154
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
155
+ wp_send_json_error();
156
  }
157
 
158
  $accounts = isset( $_POST['accounts'] ) ? json_decode( stripslashes( $_POST['accounts'] ), true ) : false;
178
  add_action( 'wp_ajax_sbi_connect_business_accounts', 'sbi_connect_business_accounts' );
179
 
180
  function sbi_auto_save_id() {
181
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
182
 
183
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
184
+ wp_send_json_error();
185
  }
 
 
186
 
187
+ $options = get_option( 'sb_instagram_settings', array() );
188
+
189
+ $options['sb_instagram_user_id'] = array( sanitize_text_field( wp_unslash( $_POST['id'] ) ) );
190
+
191
+ update_option( 'sb_instagram_settings', $options );
192
 
 
 
193
  die();
194
  }
195
  add_action( 'wp_ajax_sbi_auto_save_id', 'sbi_auto_save_id' );
214
  }
215
 
216
  function sbi_test_token() {
217
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
218
+
219
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
220
+ wp_send_json_error();
221
+ }
222
+
223
+ $access_token = isset( $_POST['access_token'] ) ? trim( sanitize_text_field( wp_unslash( $_POST['access_token'] ) ) ) : false;
224
+ $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( wp_unslash( $_POST['account_id'] ) ) : false;
225
 
226
  $return = sbi_connect_new_account( $access_token, $account_id );
227
 
231
  add_action( 'wp_ajax_sbi_test_token', 'sbi_test_token' );
232
 
233
  function sbi_delete_account() {
234
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
235
 
236
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
237
+ wp_send_json_error();
238
  }
239
+ $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( wp_unslash( $_POST['account_id'] ) ) : false;
240
 
241
  sbi_do_account_delete( $account_id );
242
 
290
  $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
291
  global $sb_instagram_posts_manager;
292
  $sb_instagram_posts_manager->reset_api_errors();
293
+
294
  $username = $connected_accounts[ $account_id ]['username'];
295
  $sb_instagram_posts_manager->add_action_log( 'Deleting account ' . $username );
296
 
318
  }
319
 
320
  function sbi_delete_platform_data_listener() {
321
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
322
+
323
  if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
324
+ wp_send_json_error();
325
  }
326
  sbi_delete_all_platform_data();
327
 
362
  }
363
 
364
  function sbi_no_js_connected_account_management() {
365
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
366
  return;
367
  }
368
  if ( isset( $_POST['sb_manual_at'] ) ) {
369
+ $access_token = isset( $_POST['sb_manual_at'] ) ? trim( sanitize_text_field( wp_unslash( $_POST['sb_manual_at'] ) ) ) : false;
370
+ $account_id = isset( $_POST['sb_manual_account_id'] ) ? sanitize_text_field( wp_unslash( $_POST['sb_manual_account_id'] ) ) : false;
371
  if ( ! $access_token || ! $account_id ) {
372
  return;
373
  }
374
  sbi_connect_new_account( $access_token, $account_id );
375
  } elseif ( isset( $_GET['disconnect'] ) && isset( $_GET['page'] ) && $_GET['page'] === 'sb-instagram-feed' ) {
376
+ $account_id = sanitize_text_field( wp_unslash( $_GET['disconnect'] ) );
377
  sbi_do_account_delete( $account_id );
378
  }
379
 
382
 
383
  add_action('admin_notices', 'sbi_admin_ssl_notice');
384
  function sbi_admin_ssl_notice() {
385
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
386
+ return;
387
+ }
388
  if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' )) ) {
389
  global $current_user;
390
  $user_id = $current_user->ID;
401
 
402
  add_action( 'admin_init', 'sbi_check_notice_dismiss' );
403
  function sbi_check_notice_dismiss() {
404
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
405
+ return;
406
+ }
407
  global $current_user;
408
  $user_id = $current_user->ID;
409
 
535
  $accounts_to_save[ $new_account_details['user_id'] ]['private'] = true;
536
  }
537
 
538
+ $accounts_to_save[ $new_account_details['user_id'] ] = SB_Instagram_Connected_Account::encrypt_connected_account_tokens( $accounts_to_save[ $new_account_details['user_id'] ] );
539
+
540
  $options['connected_accounts'] = $accounts_to_save;
541
  $options['sb_instagram_user_id'] = $ids_to_save;
542
 
627
  }
628
 
629
  function sbi_after_connection() {
630
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
631
 
632
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
633
+ wp_send_json_error();
634
+ }
635
+
636
  if ( isset( $_POST['access_token'] ) ) {
637
+ $access_token = sanitize_text_field( wp_unslash( $_POST['access_token'] ) );
638
  $account_info = sbi_account_data_for_token( $access_token );
639
  echo sbi_json_encode( $account_info );
640
  }
643
  }
644
  add_action( 'wp_ajax_sbi_after_connection', 'sbi_after_connection' );
645
 
646
+ function sbi_get_business_account_connection_modal( $sb_instagram_user_id ) {
647
+ $access_token = sbi_maybe_clean(urldecode( ( $_GET['sbi_access_token'] ) ));
648
  //
649
  $url = 'https://graph.facebook.com/me/accounts?fields=instagram_business_account,access_token&limit=500&access_token='.$access_token;
650
  $args = array(
762
  }
763
 
764
  function sbi_get_personal_connection_modal( $connected_accounts, $action_url = 'admin.php?page=sb-instagram-feed' ) {
765
+ $access_token = sanitize_text_field( wp_unslash( $_GET['sbi_access_token'] ) );
766
+ $account_type = sanitize_text_field( wp_unslash( $_GET['sbi_account_type'] ) );
767
+ $user_id = sanitize_text_field( wp_unslash( $_GET['sbi_id'] ) );
768
+ $user_name = sanitize_text_field( wp_unslash( $_GET['sbi_username'] ) );
769
  $expires_in = (int)$_GET['sbi_expires_in'];
770
  $expires_timestamp = time() + $expires_in;
771
 
822
  }
823
 
824
  function sbi_clear_backups() {
825
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
826
 
827
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
828
+ wp_send_json_error();
829
  }
830
+
831
  //Delete all transients
832
  global $wpdb;
833
  $table_name = $wpdb->prefix . "options";
852
  add_action( 'wp_ajax_sbi_clear_backups', 'sbi_clear_backups' );
853
 
854
  function sbi_reset_resized() {
855
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
856
 
857
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
858
+ wp_send_json_error();
859
+ }
860
+
861
  global $sb_instagram_posts_manager;
862
  $sb_instagram_posts_manager->delete_all_sbi_instagram_posts();
863
  delete_option( 'sbi_top_api_calls' );
871
  add_action( 'wp_ajax_sbi_reset_resized', 'sbi_reset_resized' );
872
 
873
  function sbi_reset_log() {
874
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
875
+
876
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
877
+ wp_send_json_error();
878
+ }
879
+
880
  global $sb_instagram_posts_manager;
881
 
882
  $sb_instagram_posts_manager->remove_all_errors();
888
  add_action( 'wp_ajax_sbi_reset_log', 'sbi_reset_log' );
889
 
890
  function sbi_reset_api_errors() {
891
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
892
+
893
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
894
+ wp_send_json_error();
895
+ }
896
+
897
  global $sb_instagram_posts_manager;
898
  $sb_instagram_posts_manager->add_action_log( 'View feed and retry button clicked.' );
899
 
906
  add_action( 'wp_ajax_sbi_reset_api_errors', 'sbi_reset_api_errors' );
907
 
908
  function sbi_lite_dismiss() {
909
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
910
 
911
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
912
+ wp_send_json_error();
913
  }
914
 
915
  set_transient( 'instagram_feed_dismiss_lite', 'dismiss', 1 * WEEK_IN_SECONDS );
920
 
921
  add_action('admin_notices', 'sbi_admin_error_notices');
922
  function sbi_admin_error_notices() {
923
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
924
+ return;
925
+ }
926
  if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' )) ) {
927
 
928
  global $sb_instagram_posts_manager;
1082
  /* Usage */
1083
  add_action( 'admin_notices', 'sbi_usage_opt_in' );
1084
  function sbi_usage_opt_in() {
1085
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
1086
+ return;
1087
+ }
1088
  if ( isset( $_GET['trackingdismiss'] ) ) {
1089
  $usage_tracking = get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => false ) );
1090
 
1124
  }
1125
 
1126
  function sbi_usage_opt_in_or_out() {
1127
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
1128
 
1129
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
1130
+ wp_send_json_error();
1131
  }
1132
 
1133
  $usage_tracking = sbi_get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => false ) );
1141
  add_action( 'wp_ajax_sbi_usage_opt_in_or_out', 'sbi_usage_opt_in_or_out' );
1142
 
1143
  function sbi_oembed_disable() {
1144
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
1145
 
1146
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
1147
+ wp_send_json_error();
1148
  }
1149
+
1150
  $oembed_settings = get_option( 'sbi_oembed_token', array() );
1151
  $oembed_settings['access_token'] = '';
1152
  $oembed_settings['disabled'] = true;
inc/admin/addon-functions.php CHANGED
@@ -12,17 +12,17 @@ function sbi_deactivate_addon() {
12
  check_ajax_referer( 'sbi-admin', 'nonce' );
13
 
14
  // Check for permissions.
15
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
16
  wp_send_json_error();
17
  }
18
 
19
  $type = 'addon';
20
  if ( ! empty( $_POST['type'] ) ) {
21
- $type = sanitize_key( $_POST['type'] );
22
  }
23
 
24
  if ( isset( $_POST['plugin'] ) ) {
25
- deactivate_plugins( $_POST['plugin'] );
26
 
27
  if ( 'plugin' === $type ) {
28
  wp_send_json_success( esc_html__( 'Plugin deactivated.', 'instagram-feed' ) );
@@ -46,18 +46,18 @@ function sbi_activate_addon() {
46
  check_ajax_referer( 'sbi-admin', 'nonce' );
47
 
48
  // Check for permissions.
49
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
50
- wp_send_json_error();
51
  }
52
 
53
  if ( isset( $_POST['plugin'] ) ) {
54
 
55
  $type = 'addon';
56
  if ( ! empty( $_POST['type'] ) ) {
57
- $type = sanitize_key( $_POST['type'] );
58
  }
59
 
60
- $activate = activate_plugins( $_POST['plugin'] );
61
 
62
  if ( ! is_wp_error( $activate ) ) {
63
  if ( 'plugin' === $type ) {
@@ -83,7 +83,7 @@ function sbi_install_addon() {
83
  check_ajax_referer( 'sbi-admin', 'nonce' );
84
 
85
  // Check for permissions.
86
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
87
  wp_send_json_error();
88
  }
89
 
@@ -134,7 +134,7 @@ function sbi_install_addon() {
134
  wp_send_json_error( $error );
135
  }
136
 
137
- $installer->install( $_POST['plugin'] ); // phpcs:ignore
138
 
139
  // Flush the cache and return the newly installed plugin basename.
140
  wp_cache_flush();
@@ -145,7 +145,7 @@ function sbi_install_addon() {
145
 
146
  $type = 'addon';
147
  if ( ! empty( $_POST['type'] ) ) {
148
- $type = sanitize_key( $_POST['type'] );
149
  }
150
 
151
  // Activate the plugin silently.
12
  check_ajax_referer( 'sbi-admin', 'nonce' );
13
 
14
  // Check for permissions.
15
+ if ( ! current_user_can( 'deactivate_plugins' ) ) {
16
  wp_send_json_error();
17
  }
18
 
19
  $type = 'addon';
20
  if ( ! empty( $_POST['type'] ) ) {
21
+ $type = sanitize_key( wp_unslash( $_POST['type'] ) );
22
  }
23
 
24
  if ( isset( $_POST['plugin'] ) ) {
25
+ deactivate_plugins( wp_unslash( $_POST['plugin'] ) );
26
 
27
  if ( 'plugin' === $type ) {
28
  wp_send_json_success( esc_html__( 'Plugin deactivated.', 'instagram-feed' ) );
46
  check_ajax_referer( 'sbi-admin', 'nonce' );
47
 
48
  // Check for permissions.
49
+ if ( ! current_user_can( 'activate_plugins' ) ) {
50
+ wp_send_json_error(esc_html__( 'Cant deactivate.', 'instagram-feed' ));
51
  }
52
 
53
  if ( isset( $_POST['plugin'] ) ) {
54
 
55
  $type = 'addon';
56
  if ( ! empty( $_POST['type'] ) ) {
57
+ $type = sanitize_key( wp_unslash( $_POST['type'] ) );
58
  }
59
 
60
+ $activate = activate_plugins( wp_unslash( $_POST['plugin'] ) );
61
 
62
  if ( ! is_wp_error( $activate ) ) {
63
  if ( 'plugin' === $type ) {
83
  check_ajax_referer( 'sbi-admin', 'nonce' );
84
 
85
  // Check for permissions.
86
+ if ( ! current_user_can( 'install_plugins' ) ) {
87
  wp_send_json_error();
88
  }
89
 
134
  wp_send_json_error( $error );
135
  }
136
 
137
+ $installer->install( esc_url_raw( wp_unslash( $_POST['plugin'] ) ) );
138
 
139
  // Flush the cache and return the newly installed plugin basename.
140
  wp_cache_flush();
145
 
146
  $type = 'addon';
147
  if ( ! empty( $_POST['type'] ) ) {
148
+ $type = sanitize_key( wp_unslash( $_POST['type'] ) );
149
  }
150
 
151
  // Activate the plugin silently.
inc/admin/blocks/class-sbi-blocks.php CHANGED
@@ -141,8 +141,6 @@ class SB_Instagram_Blocks {
141
  * @return bool True if is Gutenberg REST API call.
142
  */
143
  public static function is_gb_editor() {
144
-
145
- // TODO: Find a better way to check if is GB editor API call.
146
  return defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore
147
  }
148
 
141
  * @return bool True if is Gutenberg REST API call.
142
  */
143
  public static function is_gb_editor() {
 
 
144
  return defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore
145
  }
146
 
inc/admin/class-sbi-about.php CHANGED
@@ -95,7 +95,7 @@ class SB_Instagram_About {
95
  public function init() {
96
 
97
  // Check what page we are on.
98
- $page = isset( $_GET['page'] ) ? $_GET['page'] : '';
99
 
100
  // Only load if we are actually on the settings page.
101
  if ( self::SLUG !== $page ) {
@@ -134,7 +134,7 @@ class SB_Instagram_About {
134
  }
135
 
136
  // Determine the current active settings tab.
137
- $this->view = ! empty( $_GET['view'] ) ? esc_html( $_GET['view'] ) : self::DEFAULT_TAB;
138
 
139
  // If the user tries to load an invalid view - fallback to About Us.
140
  if (
@@ -289,7 +289,7 @@ class SB_Instagram_About {
289
 
290
  <div class="sbi-admin-about-image sbi-admin-column-last">
291
  <figure>
292
- <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/team.jpg" alt="<?php esc_attr_e( 'The Sbi Team photo', 'instagram-feed' ); ?>">
293
  <figcaption>
294
  <?php esc_html_e( 'The Smash Balloon Team', 'instagram-feed' ); ?><br>
295
  </figcaption>
@@ -319,14 +319,14 @@ class SB_Instagram_About {
319
  ?>
320
  <div id="sbi-admin-addons">
321
  <div class="addons-container">
322
- <h3><?php echo __( 'Our Other Plugins', 'instagram-feed' ); ?></h3>
323
  <?php
324
  foreach ( $am_plugins as $plugin => $details ) :
325
 
326
  $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
327
 
328
  if ( $plugin === 'wpforms-lite/wpforms.php' ) {
329
- echo '<h3>' .__( 'Plugins We Recommend', 'instagram-feed' ). '</h3>';
330
  }
331
 
332
  ?>
@@ -625,7 +625,7 @@ class SB_Instagram_About {
625
 
626
  <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
627
  <div class="sbi-admin-column-20">
628
- <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/steps.png" alt="">
629
  </div>
630
  <div class="sbi-admin-column-80">
631
  <h2>
@@ -644,7 +644,7 @@ class SB_Instagram_About {
644
 
645
  <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
646
  <div class="sbi-admin-column-20">
647
- <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/api-error.png" alt="">
648
  </div>
649
  <div class="sbi-admin-column-80">
650
  <h2>
95
  public function init() {
96
 
97
  // Check what page we are on.
98
+ $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
99
 
100
  // Only load if we are actually on the settings page.
101
  if ( self::SLUG !== $page ) {
134
  }
135
 
136
  // Determine the current active settings tab.
137
+ $this->view = ! empty( $_GET['view'] ) ? esc_html( wp_unslash( $_GET['view'] ) ) : self::DEFAULT_TAB;
138
 
139
  // If the user tries to load an invalid view - fallback to About Us.
140
  if (
289
 
290
  <div class="sbi-admin-about-image sbi-admin-column-last">
291
  <figure>
292
+ <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/team.jpg' ); ?>" alt="<?php esc_attr_e( 'The Sbi Team photo', 'instagram-feed' ); ?>">
293
  <figcaption>
294
  <?php esc_html_e( 'The Smash Balloon Team', 'instagram-feed' ); ?><br>
295
  </figcaption>
319
  ?>
320
  <div id="sbi-admin-addons">
321
  <div class="addons-container">
322
+ <h3><?php esc_html_e( 'Our Other Plugins', 'instagram-feed' ); ?></h3>
323
  <?php
324
  foreach ( $am_plugins as $plugin => $details ) :
325
 
326
  $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
327
 
328
  if ( $plugin === 'wpforms-lite/wpforms.php' ) {
329
+ echo '<h3>' . esc_html__( 'Plugins We Recommend', 'instagram-feed' ). '</h3>';
330
  }
331
 
332
  ?>
625
 
626
  <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
627
  <div class="sbi-admin-column-20">
628
+ <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/steps.png' ); ?>" alt="">
629
  </div>
630
  <div class="sbi-admin-column-80">
631
  <h2>
644
 
645
  <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
646
  <div class="sbi-admin-column-20">
647
+ <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/api-error.png' ); ?>" alt="">
648
  </div>
649
  <div class="sbi-admin-column-80">
650
  <h2>
inc/admin/class-sbi-tracking.php CHANGED
@@ -146,7 +146,7 @@ class SB_Instagram_Tracking {
146
  $data['php_version'] = $php_version;
147
  $data['mi_version'] = SBIVER;
148
  $data['wp_version'] = $wp_version;
149
- $data['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
150
  $data['multisite'] = is_multisite();
151
  $data['url'] = home_url();
152
  $data['themename'] = $theme_data->Name;
146
  $data['php_version'] = $php_version;
147
  $data['mi_version'] = SBIVER;
148
  $data['wp_version'] = $wp_version;
149
+ $data['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '';
150
  $data['multisite'] = is_multisite();
151
  $data['url'] = home_url();
152
  $data['themename'] = $theme_data->Name;
inc/admin/main.php CHANGED
@@ -123,20 +123,20 @@ function sbi_oembeds_page() {
123
  ?>
124
  <div id="sbi-notice-bar" style="display:none">
125
  <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
126
- <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
127
  </button>
128
  </div>
129
  <?php endif; ?>
130
  <div id="header">
131
- <h1><?php _e('Instagram oEmbeds', 'instagram-feed'); ?></h1>
132
  </div>
133
 
134
  <p>
135
  <?php
136
- _e( "You can use the Instagram Feed plugin to power your Instagram oEmbeds, both old and new.", 'instagram-feed' );
137
  if ( ! SB_Instagram_Oembed::can_do_oembed() ) {
138
  echo ' ';
139
- _e( "Just click the button below and we'll do the rest.", 'instagram-feed' );
140
  }
141
  ?>
142
  </p>
@@ -209,13 +209,13 @@ function sbi_oembeds_page() {
209
  }
210
 
211
  ?>
212
- <a href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn<?php echo $need_to_connect_class; ?>"><i class="fa fa-instagram"></i> <?php _e( 'Enable Instagram oEmbeds', 'instagram-feed' ); ?></a>
213
  <div id="sbi_config_info" class="sb_get_token" style="display: none;">
214
  <div class="sbi_config_modal">
215
- <?php _e( 'As Instagram is part of Facebook, in order to display Instagram oEmbeds, you must connect to Facebook. Click on the button below to connect', 'instagram-feed' ); ?>
216
 
217
  <p>
218
- <a style="display: inline-block; float: none; margin-bottom: 0;" href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn"><?php _e( 'Connect to Facebook', 'instagram-feed' ); ?></a>
219
  </p>
220
 
221
  <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
@@ -223,7 +223,7 @@ function sbi_oembeds_page() {
223
  </div>
224
  <div class="sbi-oembed-promo sbi-oembed-desc">
225
  <div class="sbi-col">
226
- <h2><?php _e("What are oEmbeds?", "instagram-feed"); ?></h2>
227
  <p><?php _e("Anytime you share a link to an Instagram post in WordPress, it is automatically converted into an embedded version of that Instagram post (an \"oEmbed\").</p><p>However, WordPress is discontinuing support for Instagram oEmbeds due to them now requiring an Access Token to work. Don't worry though, we have your back. Just use the button above to connect to Facebook and we'll make sure your Instagram oEmbeds keep working.", "instagram-feed"); ?></p>
228
  </div>
229
 
@@ -245,14 +245,14 @@ function sbi_oembeds_page() {
245
  <?php if ( $show_token_expiration_modal ) : ?>
246
  <div id="sbi_config_info" class="sb_get_token">
247
  <div class="sbi_config_modal">
248
- <p><strong><?php _e( 'Heads up!', 'instagram-feed' ); ?></strong><br></p>
249
 
250
  <p>
251
- <?php _e( 'Your access token will expire in 60 days. Facebook requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Click the button below for instructions on creating a Facebook page and extending your access token to never expire.', 'instagram-feed' ); ?>
252
  </p>
253
  <p>
254
- <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" class="sbi-oembed-connect-btn" target="_blank" rel="noopener"><?php _e( 'How to Create a Facebook Page', 'instagram-feed' ); ?></a>
255
- &nbsp;&nbsp;<a href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="button button-secondary" style="height: 47px;line-height: 47px;font-size: 14px;padding: 0 21px;"><?php _e( 'Try Again', 'instagram-feed' ); ?></a>
256
  </p>
257
 
258
  <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
@@ -262,7 +262,7 @@ function sbi_oembeds_page() {
262
  <?php } else {
263
  if ( ! isset( $oembed_token_settings['expiration_date'] ) || (int)$oembed_token_settings['expiration_date'] === 0 || $oembed_token_settings['expiration_date'] > time() ) :
264
  ?>
265
- <div><p class="sbi-success-message"><?php _e("The Instagram Feed plugin is now powering your Instagram oEmbeds.", 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php _e("Disable", 'instagram-feed' ); ?></a></p></div>
266
  <?php
267
  endif;
268
  if ( ! empty( $oembed_token_settings['expiration_date'] )
@@ -286,7 +286,7 @@ function sbi_oembeds_page() {
286
  <?php echo sprintf( __( 'Instagram requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Visit %1sthis link%2s for instructions on extending your access token to never expire.', 'instagram-feed' ), $link_1, $link_2 ); ?>
287
  </p>
288
  <p>
289
- <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="sbi-oembed-connect-btn"><?php _e( 'Connect to Facebook and Recheck Access Token', 'instagram-feed' ); ?></a>
290
  </p>
291
  </div>
292
 
@@ -294,20 +294,20 @@ function sbi_oembeds_page() {
294
 
295
  <?php } ?>
296
  <div class="sbi-oembed-promo">
297
- <h2><?php _e("Did you know, you can also use this Instagram Feed plugin to easily add Instagram content on your website?", 'instagram-feed'); ?></h2>
298
  <div class="sbi-reasons">
299
- <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="clock" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-clock fa-w-16 fa-2x"><path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z" class=""></path></svg><span><?php _e("Save time", 'instagram-feed'); ?></span></div>
300
- <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-line" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-line fa-w-16 fa-2x"><path fill="currentColor" d="M117.65 277.65c6.25 6.25 16.38 6.25 22.63 0L192 225.94l84.69 84.69c6.25 6.25 16.38 6.25 22.63 0L409.54 200.4l29.49 29.5c15.12 15.12 40.97 4.41 40.97-16.97V112c0-8.84-7.16-16-16-16H363.07c-21.38 0-32.09 25.85-16.97 40.97l29.5 29.49-87.6 87.6-84.69-84.69c-6.25-6.25-16.38-6.25-22.63 0l-74.34 74.34c-6.25 6.25-6.25 16.38 0 22.63l11.31 11.31zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z" class=""></path></svg><span><?php _e("Increase social engagement", 'instagram-feed'); ?></span></div>
301
- <div><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-heart fa-w-16 fa-2x"><path fill="currentColor" d="M462.3 62.7c-54.5-46.4-136-38.7-186.6 13.5L256 96.6l-19.7-20.3C195.5 34.1 113.2 8.7 49.7 62.7c-62.8 53.6-66.1 149.8-9.9 207.8l193.5 199.8c6.2 6.4 14.4 9.7 22.6 9.7 8.2 0 16.4-3.2 22.6-9.7L472 270.5c56.4-58 53.1-154.2-9.7-207.8zm-13.1 185.6L256.4 448.1 62.8 248.3c-38.4-39.6-46.4-115.1 7.7-161.2 54.8-46.8 119.2-12.9 142.8 11.5l42.7 44.1 42.7-44.1c23.2-24 88.2-58 142.8-11.5 54 46 46.1 121.5 7.7 161.2z" class=""></path></svg><span><?php _e("Keep Your Site Looking Fresh.", 'instagram-feed'); ?></span></div>
302
  </div>
303
  <p>
304
  <?php $check_svg = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-check fa-w-16 fa-2x"><path fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg>'; ?>
305
- <?php echo $check_svg; ?><span><?php _e("Super simple to set up", 'instagram-feed'); ?></span>
306
- <?php echo $check_svg; ?><span><?php _e("Optimized for speed", 'instagram-feed'); ?></span>
307
- <?php echo $check_svg; ?><span><?php _e("Completely customizable", 'instagram-feed'); ?></span>
308
- <?php echo $check_svg; ?><span><?php _e("SEO friendly", 'instagram-feed'); ?></span>
309
  </p>
310
- <a href="?page=sb-instagram-feed" class="button button-primary"><?php _e("Add an Instagram feed now", 'instagram-feed'); ?></a>
311
  </div>
312
 
313
  <?php } ?>
@@ -542,14 +542,14 @@ function sb_instagram_settings_page() {
542
  $sb_instagram_user_id[] = sanitize_text_field( $_POST[ 'sb_instagram_user_id' ] );
543
  }
544
  }
545
- isset($_POST[ 'sb_instagram_preserve_settings' ]) ? $sb_instagram_preserve_settings = sanitize_text_field( $_POST[ 'sb_instagram_preserve_settings' ] ) : $sb_instagram_preserve_settings = '';
546
- isset($_POST[ 'sb_instagram_cache_time' ]) ? $sb_instagram_cache_time = sanitize_text_field( $_POST[ 'sb_instagram_cache_time' ] ) : $sb_instagram_cache_time = '';
547
- isset($_POST[ 'sb_instagram_cache_time_unit' ]) ? $sb_instagram_cache_time_unit = sanitize_text_field( $_POST[ 'sb_instagram_cache_time_unit' ] ) : $sb_instagram_cache_time_unit = '';
548
 
549
- isset($_POST[ 'sbi_caching_type' ]) ? $sbi_caching_type = sanitize_text_field( $_POST[ 'sbi_caching_type' ] ) : $sbi_caching_type = '';
550
- isset($_POST[ 'sbi_cache_cron_interval' ]) ? $sbi_cache_cron_interval = sanitize_text_field( $_POST[ 'sbi_cache_cron_interval' ] ) : $sbi_cache_cron_interval = '';
551
- isset($_POST[ 'sbi_cache_cron_time' ]) ? $sbi_cache_cron_time = sanitize_text_field( $_POST[ 'sbi_cache_cron_time' ] ) : $sbi_cache_cron_time = '';
552
- isset($_POST[ 'sbi_cache_cron_am_pm' ]) ? $sbi_cache_cron_am_pm = sanitize_text_field( $_POST[ 'sbi_cache_cron_am_pm' ] ) : $sbi_cache_cron_am_pm = '';
553
 
554
  $options[ 'sb_instagram_at' ] = $sb_instagram_at;
555
  $options[ 'sb_instagram_user_id' ] = $sb_instagram_user_id;
@@ -612,7 +612,7 @@ function sb_instagram_settings_page() {
612
  $sb_instagram_width = $safe_width;
613
 
614
  $sb_instagram_width_unit = sanitize_text_field( $_POST[ 'sb_instagram_width_unit' ] );
615
- isset($_POST[ 'sb_instagram_feed_width_resp' ]) ? $sb_instagram_feed_width_resp = sanitize_text_field( $_POST[ 'sb_instagram_feed_width_resp' ] ) : $sb_instagram_feed_width_resp = '';
616
 
617
  //Validate and sanitize height field
618
  $safe_height = intval( sanitize_text_field( $_POST['sb_instagram_height'] ) );
@@ -620,7 +620,7 @@ function sb_instagram_settings_page() {
620
  if ( strlen( $safe_height ) > 4 ) $safe_height = substr( $safe_height, 0, 4 );
621
  $sb_instagram_height = $safe_height;
622
 
623
- $sb_instagram_height_unit = sanitize_text_field( $_POST[ 'sb_instagram_height_unit' ] );
624
 
625
  //Validate and sanitize number of photos field
626
  $safe_num = intval( sanitize_text_field( $_POST['sb_instagram_num'] ) );
@@ -629,7 +629,7 @@ function sb_instagram_settings_page() {
629
  $sb_instagram_num = $safe_num;
630
 
631
  $sb_instagram_cols = sanitize_text_field( $_POST[ 'sb_instagram_cols' ] );
632
- isset($_POST[ 'sb_instagram_disable_mobile' ]) ? $sb_instagram_disable_mobile = sanitize_text_field( $_POST[ 'sb_instagram_disable_mobile' ] ) : $sb_instagram_disable_mobile = '';
633
 
634
  //Validate and sanitize padding field
635
  $safe_padding = intval( sanitize_text_field( $_POST['sb_instagram_image_padding'] ) );
@@ -637,46 +637,50 @@ function sb_instagram_settings_page() {
637
  if ( strlen( $safe_padding ) > 4 ) $safe_padding = substr( $safe_padding, 0, 4 );
638
  $sb_instagram_image_padding = $safe_padding;
639
 
640
- $sb_instagram_image_padding_unit = sanitize_text_field( $_POST[ 'sb_instagram_image_padding_unit' ] );
641
- $sb_instagram_sort = sanitize_text_field( $_POST[ 'sb_instagram_sort' ] );
642
- $sb_instagram_background = sanitize_text_field( $_POST[ 'sb_instagram_background' ] );
643
- isset($_POST[ 'sb_instagram_show_btn' ]) ? $sb_instagram_show_btn = sanitize_text_field( $_POST[ 'sb_instagram_show_btn' ] ) : $sb_instagram_show_btn = '';
644
- $sb_instagram_btn_background = sanitize_text_field( $_POST[ 'sb_instagram_btn_background' ] );
645
- $sb_instagram_btn_text_color = sanitize_text_field( $_POST[ 'sb_instagram_btn_text_color' ] );
646
- $sb_instagram_btn_text = sanitize_text_field( $_POST[ 'sb_instagram_btn_text' ] );
647
- $sb_instagram_image_res = sanitize_text_field( $_POST[ 'sb_instagram_image_res' ] );
648
  //Header
649
- isset($_POST[ 'sb_instagram_show_header' ]) ? $sb_instagram_show_header = sanitize_text_field( $_POST[ 'sb_instagram_show_header' ] ) : $sb_instagram_show_header = '';
650
- isset($_POST[ 'sb_instagram_show_bio' ]) ? $sb_instagram_show_bio = sanitize_text_field( $_POST[ 'sb_instagram_show_bio' ] ) : $sb_instagram_show_bio = '';
651
  if ( function_exists( 'sanitize_textarea_field' ) ) {
652
- isset($_POST[ 'sb_instagram_custom_bio' ]) ? $sb_instagram_custom_bio = sanitize_textarea_field( $_POST[ 'sb_instagram_custom_bio' ] ) : $sb_instagram_custom_bio = '';
653
  } else {
654
- isset($_POST[ 'sb_instagram_custom_bio' ]) ? $sb_instagram_custom_bio = sanitize_text_field( $_POST[ 'sb_instagram_custom_bio' ] ) : $sb_instagram_custom_bio = '';
655
  }
656
- isset($_POST[ 'sb_instagram_custom_avatar' ]) ? $sb_instagram_custom_avatar = sanitize_text_field( $_POST[ 'sb_instagram_custom_avatar' ] ) : $sb_instagram_custom_avatar = '';
657
- if (isset($_POST[ 'sb_instagram_header_size' ]) ) $sb_instagram_header_size = $_POST[ 'sb_instagram_header_size' ];
658
 
659
- $sb_instagram_header_color = sanitize_text_field( $_POST[ 'sb_instagram_header_color' ] );
660
  //Follow button
661
- isset($_POST[ 'sb_instagram_show_follow_btn' ]) ? $sb_instagram_show_follow_btn = sanitize_text_field( $_POST[ 'sb_instagram_show_follow_btn' ] ) : $sb_instagram_show_follow_btn = '';
662
- $sb_instagram_folow_btn_background = sanitize_text_field( $_POST[ 'sb_instagram_folow_btn_background' ] );
663
- $sb_instagram_follow_btn_text_color = sanitize_text_field( $_POST[ 'sb_instagram_follow_btn_text_color' ] );
664
- $sb_instagram_follow_btn_text = sanitize_text_field( $_POST[ 'sb_instagram_follow_btn_text' ] );
665
  //Misc
666
- $sb_instagram_custom_css = $_POST[ 'sb_instagram_custom_css' ];
 
 
 
 
667
  $sb_instagram_custom_js = $_POST[ 'sb_instagram_custom_js' ];
668
- isset($_POST[ 'sb_instagram_ajax_theme' ]) ? $sb_instagram_ajax_theme = sanitize_text_field( $_POST[ 'sb_instagram_ajax_theme' ] ) : $sb_instagram_ajax_theme = '';
669
- isset($_POST[ 'gdpr' ]) ? $gdpr = sanitize_text_field( $_POST[ 'gdpr' ] ) : $gdpr = '';
670
- isset($_POST[ 'enqueue_js_in_head' ]) ? $enqueue_js_in_head = $_POST[ 'enqueue_js_in_head' ] : $enqueue_js_in_head = '';
671
- isset($_POST[ 'disable_js_image_loading' ]) ? $disable_js_image_loading = $_POST[ 'disable_js_image_loading' ] : $disable_js_image_loading = '';
672
- isset($_POST[ 'sb_instagram_disable_resize' ]) ? $sb_instagram_disable_resize= sanitize_text_field( $_POST[ 'sb_instagram_disable_resize' ] ) : $sb_instagram_disable_resize = '';
673
- isset($_POST[ 'sb_instagram_favor_local' ]) ? $sb_instagram_favor_local = sanitize_text_field( $_POST[ 'sb_instagram_favor_local' ] ) : $sb_instagram_favor_local = '';
674
- isset($_POST[ 'sb_instagram_minnum' ]) ? $sb_instagram_minnum = sanitize_text_field( $_POST[ 'sb_instagram_minnum' ] ) : $sb_instagram_minnum = '';
675
-
676
- if (isset($_POST[ 'sb_instagram_cron' ]) ) $sb_instagram_cron = $_POST[ 'sb_instagram_cron' ];
677
- isset($_POST[ 'sb_instagram_backup' ]) ? $sb_instagram_backup = $_POST[ 'sb_instagram_backup' ] : $sb_instagram_backup = '';
678
- isset($_POST[ 'sb_ajax_initial' ]) ? $sb_ajax_initial = $_POST[ 'sb_ajax_initial' ] : $sb_ajax_initial = '';
679
- isset($_POST[ 'enqueue_css_in_shortcode' ]) ? $enqueue_css_in_shortcode = $_POST[ 'enqueue_css_in_shortcode' ] : $enqueue_css_in_shortcode = '';
680
 
681
  $options[ 'sb_instagram_width' ] = $sb_instagram_width;
682
  $options[ 'sb_instagram_width_unit' ] = $sb_instagram_width_unit;
@@ -725,23 +729,23 @@ function sb_instagram_settings_page() {
725
  $options['sb_instagram_backup'] = $sb_instagram_backup;
726
  $options['enqueue_css_in_shortcode'] = $enqueue_css_in_shortcode;
727
 
728
- isset($_POST[ 'sb_instagram_custom_template' ]) ? $sb_instagram_custom_template = $_POST[ 'sb_instagram_custom_template' ] : $sb_instagram_custom_template = '';
729
  $options['custom_template'] = $sb_instagram_custom_template;
730
- isset($_POST[ 'sb_instagram_disable_admin_notice' ]) ? $sb_instagram_disable_admin_notice = $_POST[ 'sb_instagram_disable_admin_notice' ] : $sb_instagram_disable_admin_notice = '';
731
  $options['disable_admin_notice'] = $sb_instagram_disable_admin_notice;
732
- isset($_POST[ 'sb_instagram_enable_email_report' ]) ? $sb_instagram_enable_email_report = $_POST[ 'sb_instagram_enable_email_report' ] : $sb_instagram_enable_email_report = '';
733
  $options['enable_email_report'] = $sb_instagram_enable_email_report;
734
- isset($_POST[ 'sb_instagram_email_notification' ]) ? $sb_instagram_email_notification = $_POST[ 'sb_instagram_email_notification' ] : $sb_instagram_email_notification = '';
735
  $original = $options['email_notification'];
736
  $options['email_notification'] = $sb_instagram_email_notification;
737
- isset($_POST[ 'sb_instagram_email_notification_addresses' ]) ? $sb_instagram_email_notification_addresses = $_POST[ 'sb_instagram_email_notification_addresses' ] : $sb_instagram_email_notification_addresses = get_option( 'admin_email' );
738
  $options['email_notification_addresses'] = $sb_instagram_email_notification_addresses;
739
 
740
  if ( $original !== $sb_instagram_email_notification && $sb_instagram_enable_email_report === 'on' ){
741
  //Clear the existing cron event
742
  wp_clear_scheduled_hook('sb_instagram_feed_issue_email');
743
 
744
- $input = sanitize_text_field($_POST[ 'sb_instagram_email_notification' ] );
745
  $timestamp = strtotime( 'next ' . $input );
746
 
747
  if ( $timestamp - (3600 * 1) < time() ) {
@@ -803,7 +807,7 @@ function sb_instagram_settings_page() {
803
  update_option( 'sb_instagram_settings', $options );
804
 
805
  ?>
806
- <div class="updated"><p><strong><?php _e( 'Settings saved.', 'instagram-feed' ); ?></strong></p></div>
807
  <?php } ?>
808
 
809
  <?php } //End nonce check ?>
@@ -817,7 +821,7 @@ function sb_instagram_settings_page() {
817
  ?>
818
  <div id="sbi-notice-bar" style="display:none">
819
  <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
820
- <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
821
  </button>
822
  </div>
823
  <?php endif; ?>
@@ -826,7 +830,7 @@ function sb_instagram_settings_page() {
826
 
827
 
828
  <div id="header">
829
- <h1><?php _e( 'Instagram Feed', 'instagram-feed' ); ?></h1>
830
  </div>
831
  <?php
832
  $sb_instagram_type = 'user';
@@ -845,8 +849,8 @@ function sb_instagram_settings_page() {
845
 
846
  SBI_Account_Connector::maybe_launch_modals( $sb_instagram_user_id );
847
  if ( isset( $_POST['sbi_connect_username'] ) ) {
848
- $new_user_name = sanitize_text_field( $_POST['sbi_connect_username'] );
849
- $new_account_details = json_decode( stripslashes( $_POST['sbi_account_json'] ), true );
850
  array_map( 'sanitize_text_field', $new_account_details );
851
 
852
  $updated_options = sbi_connect_basic_account( $new_account_details );
@@ -877,11 +881,11 @@ function sb_instagram_settings_page() {
877
 
878
  <?php $sbi_active_tab = isset( $_GET[ 'tab' ] ) ? sanitize_text_field( $_GET['tab'] ) : 'configure'; ?>
879
  <h2 class="nav-tab-wrapper">
880
- <a href="?page=sb-instagram-feed&amp;tab=configure" class="nav-tab <?php echo $sbi_active_tab == 'configure' ? 'nav-tab-active' : ''; ?>"><?php _e( '1. Configure', 'instagram-feed' ); ?></a>
881
- <a href="?page=sb-instagram-feed&amp;tab=customize" class="nav-tab <?php echo $sbi_active_tab == 'customize' ? 'nav-tab-active' : ''; ?>"><?php _e( '2. Customize', 'instagram-feed' ); ?></a>
882
- <a href="?page=sb-instagram-feed&amp;tab=display" class="nav-tab <?php echo $sbi_active_tab == 'display' ? 'nav-tab-active' : ''; ?>"><?php _e( '3. Display Your Feed', 'instagram-feed' ); ?></a>
883
- <a href="?page=sb-instagram-feed&amp;tab=support" class="nav-tab <?php echo $sbi_active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Support', 'instagram-feed' ); ?></a>
884
- <a href="?page=sb-instagram-feed&amp;tab=more" class="nav-tab <?php echo $sbi_active_tab == 'more' ? 'nav-tab-active' : ''; ?>"><?php _e( 'More Social Feeds', 'instagram-feed' ); ?>
885
  <?php
886
  $seen_more_plugins_page = get_user_meta(get_current_user_id(), 'seen_more_plugins_page_1', true);
887
  if( !$seen_more_plugins_page ) echo '<span class="sbi-alert-bubble">1</span>';
@@ -894,25 +898,25 @@ function sb_instagram_settings_page() {
894
 
895
  <table class="form-table">
896
  <tbody>
897
- <h3><?php _e( 'Configure', 'instagram-feed' ); ?></h3>
898
  <?php $sb_admin_email = get_option('admin_email');
899
  $connect_url = 'https://connect.smashballoon.com/auth/ig/?wordpress_user=' . $sb_admin_email . '&state=' . admin_url('admin.php?page=sb-instagram-feed');
900
  ?>
901
  <div id="sbi_config">
902
  <a data-personal-basic-api="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>"
903
  data-new-api="<?php echo esc_attr( $connect_url ); ?>"
904
- href="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>" class="sbi_admin_btn"><i class="fa fa-user-plus" aria-hidden="true" style="font-size: 20px;"></i>&nbsp; <?php _e('Connect an Instagram Account', 'instagram-feed' ); ?></a>
905
- <a href="https://smashballoon.com/instagram-feed/token/" target="_blank" style="position: relative; top: 14px; left: 15px;"><?php _e('Button not working?', 'instagram-feed'); ?></a>
906
  </div>
907
 
908
  <!-- Old Access Token -->
909
  <input name="sb_instagram_at" id="sb_instagram_at" type="hidden" value="<?php echo esc_attr( $sb_instagram_at ); ?>" size="80" maxlength="100" placeholder="Click button above to get your Access Token" />
910
 
911
  <tr valign="top">
912
- <th scope="row"><label><?php _e( 'Instagram Accounts', 'instagram-feed' ); ?></label><span style="font-weight:normal; font-style:italic; font-size: 12px; display: block;"><?php _e('Use the button above to connect an Instagram account', 'instagram-feed'); ?></span></th>
913
  <td class="sbi_connected_accounts_wrap">
914
  <?php if ( empty( $connected_accounts ) ) : ?>
915
- <p class="sbi_no_accounts"><?php _e( 'No Instagram accounts connected. Click the button above to connect an account.', 'instagram-feed' ); ?></p><br />
916
  <?php else:
917
  $doing_account_error_messages = count( $connected_accounts ) > 1;
918
  global $sb_instagram_posts_manager;
@@ -959,16 +963,16 @@ function sb_instagram_settings_page() {
959
  <div class="sbi_connected_account<?php echo $is_invalid_class . $updated_or_new_account_class; ?><?php if ( $in_user_feed ) echo ' sbi_account_active' ?> sbi_account_type_<?php echo $account_type; ?>" id="sbi_connected_account_<?php esc_attr_e( $account['user_id'] ); ?>" data-accesstoken="" data-userid="<?php esc_attr_e( $account['user_id'] ); ?>" data-username="<?php esc_attr_e( $account['username'] ); ?>" data-type="<?php esc_attr_e( $account_type ); ?>" data-permissions="<?php if ( $use_tagged ) echo 'tagged'; ?>">
960
  <?php if ( $doing_account_error_messages && $sb_instagram_posts_manager->connected_account_has_error( $account ) ) : ?>
961
  <div class="sbi_deprecated">
962
- <span><i class="fa fa-exclamation-circle" aria-hidden="true"></i><?php _e( 'Feeds using this account might not be updating due to an error. Try viewing these feeds after reconnecting the account and saving your settings below.', 'instagram-feed' ); ?></span>
963
  </div>
964
  <?php endif; ?>
965
  <div class="sbi_ca_alert">
966
- <span><?php _e( 'The Access Token for this account is expired or invalid. Click the button above to attempt to renew it.', 'instagram-feed' ); ?></span>
967
  </div>
968
  <div class="sbi_ca_info">
969
 
970
  <div class="sbi_ca_delete">
971
- <a href="<?php echo add_query_arg( 'disconnect', $account['user_id'], get_admin_url( null, 'admin.php?page=sb-instagram-feed' ) ); ?>" class="sbi_delete_account"><i class="fa fa-times"></i><span class="sbi_remove_text"><?php _e( 'Remove', 'instagram-feed' ); ?></span></a>
972
  </div>
973
 
974
  <div class="sbi_ca_username">
@@ -978,12 +982,12 @@ function sb_instagram_settings_page() {
978
 
979
  <div class="sbi_ca_actions">
980
  <?php if ( ! $in_user_feed ) : ?>
981
- <a href="JavaScript:void(0);" class="sbi_use_in_user_feed button-primary"><i class="fa fa-plus-circle" aria-hidden="true"></i><?php _e( 'Add to Primary Feed', 'instagram-feed' ); ?></a>
982
  <?php else : ?>
983
- <a href="JavaScript:void(0);" class="sbi_remove_from_user_feed button-primary"><i class="fa fa-minus-circle" aria-hidden="true"></i><?php _e( 'Remove from Primary Feed', 'instagram-feed' ); ?></a>
984
  <?php endif; ?>
985
- <a class="sbi_ca_token_shortcode button-secondary" href="JavaScript:void(0);"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i><?php _e( 'Add to another Feed', 'instagram-feed' ); ?></a>
986
- <a class="sbi_ca_show_token button-secondary" href="JavaScript:void(0);" title="<?php _e('Show access token and account info', 'instagram-feed'); ?>"><i class="fa fa-cog"></i></a>
987
  <?php if ( $is_private ) :
988
  $expires_in = max( 0, floor( ($account['expires_timestamp'] - time()) / DAY_IN_SECONDS ) );
989
  $message = $expires_in > 0 ? sprintf( __( 'Expires in %s days', 'instagram-feed' ), $expires_in ) : __( 'Access Token Expired', 'instagram-feed' );
@@ -993,7 +997,7 @@ function sb_instagram_settings_page() {
993
  <span><?php echo esc_html( $message ); ?></span>
994
  <a class="sbi_tooltip_link sbi_tooltip_outside" href="JavaScript:void(0);" style="position: relative; top: 2px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
995
 
996
- <a href="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url( 'admin.php?page=sb-instagram-feed' ); ?>" class="button button-secondary"><?php _e( 'Refresh now', 'instagram-feed' ); ?></a>
997
  </div>
998
  <p class="sbi_tooltip sbi-more-info" style="display: none; width: 100%; box-sizing: border-box;"><?php echo sprintf( __( 'This account is a "private" account on Instagram. It needs to be manually reconnected every 60 days. %sChange this account to be "public"%s to have access tokens that are automatically refreshed.', 'instagram-feed' ), '<a href="https://help.instagram.com/116024195217477/In" target="_blank">', '</a>' ); ?></p>
999
  <?php endif; ?>
@@ -1002,13 +1006,13 @@ function sb_instagram_settings_page() {
1002
 
1003
  <div class="sbi_ca_shortcode">
1004
 
1005
- <p><?php _e('Copy and paste this shortcode into your page or widget area', 'instagram-feed'); ?>:<br>
1006
  <?php if ( !empty( $account['username'] ) ) : ?>
1007
  <code>[instagram-feed user="<?php echo $account['username']; ?>"]</code>
1008
  <?php endif; ?>
1009
  </p>
1010
 
1011
- <p><?php _e('To add multiple users in the same feed, simply separate them using commas', 'instagram-feed'); ?>:<br>
1012
  <?php if ( !empty( $account['username'] ) ) : ?>
1013
  <code>[instagram-feed user="<?php echo $account['username']; ?>, a_second_user, a_third_user"]</code>
1014
  <?php endif; ?>
@@ -1017,7 +1021,7 @@ function sb_instagram_settings_page() {
1017
  </div>
1018
 
1019
  <div class="sbi_ca_accesstoken">
1020
- <span class="sbi_ca_token_label"><?php _e('User ID', 'instagram-feed');?>:</span><input type="text" class="sbi_ca_user_id" value="<?php echo $account['user_id']; ?>" readonly="readonly" onclick="this.focus();this.select()" title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed');?>"><br>
1021
  </div>
1022
 
1023
  </div>
@@ -1026,26 +1030,26 @@ function sb_instagram_settings_page() {
1026
 
1027
  <?php endforeach; ?>
1028
  <?php endif; ?>
1029
- <a href="JavaScript:void(0);" class="sbi_manually_connect button-secondary"><?php _e( 'Manually Connect an Account', 'instagram-feed' ); ?></a>
1030
  <div class="sbi_manually_connect_wrap">
1031
- <input name="sb_manual_at" id="sb_manual_at" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="64" minlength="15" maxlength="400" placeholder="<?php esc_attr_e( 'Enter a valid Instagram Access Token', 'instagram-feed' ); ?>" /><span class='sbi_business_profile_tag'><?php _e('Business or Basic Display', 'instagram-feed');?></span>
1032
  <div class="sbi_manual_account_id_toggle">
1033
- <label><?php _e('Please enter the User ID for this Profile:', 'instagram-feed');?></label>
1034
  <input name="sb_manual_account_id" id="sb_manual_account_id" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="40" minlength="5" maxlength="100" placeholder="Eg: 15641403491391489" />
1035
  </div>
1036
  <p id="sbi_no_js_warning" class="sbi_nojs_notice"><?php echo sprintf( __('It looks like JavaScript is not working on this page. Some features may not work fully. Visit %sthis page%s for help resolving this issue.', 'instagram-feed'), '<a href="https://smashballoon.com/i-cant-connect-or-manage-accounts-on-the-instagram-feed-settings-page/" target="_blank" rel="noopener">', '</a>' ); ?></p>
1037
- <p class="sbi_submit" style="display: inline-block;"><input type="submit" name="sbi_submit" id="sbi_manual_submit" class="button button-primary" value="<?php _e('Connect This Account', 'instagram-feed' );?>"></p>
1038
  </div>
1039
  </td>
1040
  </tr>
1041
 
1042
  <tr valign="top" class="sbi_feed_type">
1043
- <th scope="row"><label><?php _e('Select a Feed Type', 'instagram-feed'); ?>:</label><code class="sbi_shortcode"> type
1044
  Eg: type=user user=smashballoon
1045
  </code>
1046
  <?php if ( SB_Instagram_Feed_Locator::count_unique() > 1 ) : ?>
1047
  <div class="sbi_locations_link">
1048
- <a href="?page=sb-instagram-feed&amp;tab=allfeeds"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="search" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-search fa-w-16 fa-2x"><path fill="currentColor" d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z" class=""></path></svg> <?php _e('Feed Finder', 'instagram-feed'); ?></a>
1049
  </div>
1050
  <?php endif; ?>
1051
 
@@ -1054,7 +1058,7 @@ function sb_instagram_settings_page() {
1054
  <div class="sbi_row">
1055
  <div class="sbi_col sbi_one">
1056
  <input type="radio" name="sb_instagram_type" id="sb_instagram_type_user" value="user" <?php if($sb_instagram_type == "user") echo "checked"; ?> />
1057
- <label class="sbi_radio_label" for="sb_instagram_type_user"><?php _e( 'User Account:', 'instagram-feed' ); ?></label>
1058
  </div>
1059
  <div class="sbi_col sbi_two">
1060
  <div class="sbi_user_feed_ids_wrap">
@@ -1074,10 +1078,10 @@ function sb_instagram_settings_page() {
1074
  </div>
1075
 
1076
  <?php if ( empty( $user_feed_ids ) ) : ?>
1077
- <p class="sbi_no_accounts" style="margin-top: -3px; margin-right: 10px;"><?php _e( 'Connect a user account above', 'instagram-feed' ); ?></p>
1078
  <?php endif; ?>
1079
 
1080
- <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="margin: 5px 0 10px 0; display: inline-block; height: 19px;"><?php _e("How to display User feeds", 'instagram-feed' ); ?></a>
1081
  <div class="sbi_tooltip"><?php _e("<p><b>Displaying Posts from Your User Account</b><br />Simply connect an account using the button above.</p><p style='padding-top:8px;'><b>Displaying Posts from Other Instagram Accounts</b><br />Due to recent changes in the Instagram API it is no longer possible to display photos from other Instagram accounts which you do not have access to. You can only display the user feed of an account which you connect above. You can connect as many account as you like by logging in using the button above, or manually copy/pasting an Access Token by selecting the 'Manually Connect an Account' option.</p><p style='padding-top:10px;'><b>Multiple Acounts</b><br />It is only possible to display feeds from Instagram accounts which you own. In order to display feeds from multiple accounts, first connect them above and then use the buttons to add the account either to your primary feed or to another feed on your site.</p>", 'instagram-feed'); ?></div><br />
1082
  </div>
1083
 
@@ -1086,30 +1090,30 @@ function sb_instagram_settings_page() {
1086
  <div class="sbi_pro sbi_row">
1087
  <div class="sbi_col sbi_one">
1088
  <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_hashtag" value="hashtag" <?php if($sb_instagram_type == "hashtag") echo "checked"; ?> />
1089
- <label class="sbi_radio_label" for="sb_instagram_type_hashtag"><?php _e( 'Hashtag:', 'instagram-feed' ); ?></label>
1090
  </div>
1091
  <div class="sbi_col sbi_two">
1092
 
1093
- <p class="sbi_pro_tooltip"><?php _e( 'Upgrade to the Pro version to display Hashtag and Tagged feeds', 'instagram-feed' ); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1094
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=hashtags" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php _e('Pro', 'instagram-feed'); ?></a>
1095
 
1096
  <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1097
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1098
 
1099
- <p class="sbi_tooltip"><?php _e( 'Display posts from a specific hashtag instead of from a user', 'instagram-feed' ); ?></p>
1100
  </div>
1101
  </div>
1102
 
1103
  <div class="sbi_pro sbi_row">
1104
  <div class="sbi_col sbi_one">
1105
  <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_tagged" value="tagged" <?php if($sb_instagram_type == "tagged") echo "checked"; ?> />
1106
- <label class="sbi_radio_label" for="sb_instagram_type_tagged"><?php _e( 'Tagged:', 'instagram-feed' ); ?></label>
1107
  </div>
1108
  <div class="sbi_col sbi_two">
1109
  <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1110
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1111
 
1112
- <p class="sbi_tooltip"><?php _e( 'Display posts that your account has been tagged in.', 'instagram-feed' ); ?></p>
1113
  </div>
1114
  </div>
1115
 
@@ -1120,7 +1124,7 @@ function sb_instagram_settings_page() {
1120
  </div>
1121
  <div class="sbi_col sbi_two">
1122
  <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1123
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1124
 
1125
  <div class="sbi_tooltip sbi_type_tooltip">
1126
  <p>
@@ -1135,7 +1139,7 @@ function sb_instagram_settings_page() {
1135
 
1136
  <div class="sbi_row sbi_pro">
1137
  <br>
1138
- <a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);" style="margin-left: 0;"><i class="fa fa-question-circle" aria-hidden="true" style="margin-right: 6px;"></i><?php _e('Combine multiple feed types into a single feed', 'instagram-feed'); ?></a>
1139
  <p class="sbi_tooltip">
1140
  <b><?php _e( 'Please note: this is only available in the <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=multipletypes" target="_blank">Pro version</a>', 'instagram-feed' ); ?>.</b><br />
1141
  <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add each user name or hashtag of each feed into the shortcode, like so: %s. This will combine a user feed and a hashtag feed into the same feed.', 'instagram-feed'), 'type="mixed"', '<code>[instagram-feed type="mixed" user="smashballoon" hashtag="#awesomeplugins"]</code>' ); ?>
@@ -1146,24 +1150,24 @@ function sb_instagram_settings_page() {
1146
  </tr>
1147
 
1148
  <tr>
1149
- <th class="bump-left"><label for="sb_instagram_preserve_settings" class="bump-left"><?php _e("Preserve settings when plugin is removed", 'instagram-feed'); ?></label></th>
1150
  <td>
1151
  <input name="sb_instagram_preserve_settings" type="checkbox" id="sb_instagram_preserve_settings" <?php if($sb_instagram_preserve_settings == true) echo "checked"; ?> />
1152
- <label for="sb_instagram_preserve_settings"><?php _e('Yes', 'instagram-feed'); ?></label>
1153
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1154
- <p class="sbi_tooltip"><?php _e('When removing the plugin your settings are automatically erased. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.', 'instagram-feed'); ?></p>
1155
  </td>
1156
  </tr>
1157
 
1158
 
1159
  <tr valign="top" class="sbi_cron_cache_opts">
1160
- <th scope="row"><?php _e( 'Check for new posts', 'instagram-feed' ); ?></th>
1161
  <td>
1162
  <div class="sbi_row">
1163
  <input type="radio" name="sbi_caching_type" id="sbi_caching_type_cron" value="background" <?php if ( $sbi_caching_type === 'background' ) echo 'checked'; ?>>
1164
- <label for="sbi_caching_type_cron"><?php _e( 'In the background', 'instagram-feed' ); ?></label>
1165
  <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 2px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
1166
- <p class="sbi_tooltip sbi-more-info"><?php _e( 'Your Instagram post data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data', 'instagram-feed' ); ?>:<br><br>
1167
  <?php _e( '<b>1. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from Instagram when the page first loads, but then after that will check in the background on the schedule selected - unless the cache is cleared.', 'instagram-feed' ); ?>
1168
  <br><br>
1169
  <?php _e( '<b>2. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check Instagram for new posts the next time that the feed is loaded. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you\'re experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>\'Force cache to clear on interval\'</b> which is located on the \'Customize\' tab.', 'instagram-feed' ) . '</p>'; ?>
@@ -1172,14 +1176,14 @@ function sb_instagram_settings_page() {
1172
  <div class="sbi_row sbi-caching-cron-options" style="display: block;">
1173
 
1174
  <select name="sbi_cache_cron_interval" id="sbi_cache_cron_interval">
1175
- <option value="30mins" <?php if ( $sbi_cache_cron_interval === '30mins' ) echo 'selected'; ?>><?php _e( 'Every 30 minutes', 'instagram-feed' ); ?></option>
1176
- <option value="1hour" <?php if ( $sbi_cache_cron_interval === '1hour' ) echo 'selected'; ?>><?php _e( 'Every hour', 'instagram-feed' ); ?></option>
1177
- <option value="12hours" <?php if ( $sbi_cache_cron_interval === '12hours' ) echo 'selected'; ?>><?php _e( 'Every 12 hours', 'instagram-feed' ); ?></option>
1178
- <option value="24hours" <?php if ( $sbi_cache_cron_interval === '24hours' ) echo 'selected'; ?>><?php _e( 'Every 24 hours', 'instagram-feed' ); ?></option>
1179
  </select>
1180
 
1181
  <div id="sbi-caching-time-settings" style="display: none;">
1182
- <?php _e('at' ); ?>
1183
 
1184
  <select name="sbi_cache_cron_time" style="width: 80px">
1185
  <option value="1" <?php if ( $sbi_cache_cron_time === '1' ) echo 'selected'; ?>>1:00</option>
@@ -1222,17 +1226,17 @@ function sb_instagram_settings_page() {
1222
  </div>
1223
  <div class="sbi_row">
1224
  <input type="radio" name="sbi_caching_type" id="sbi_caching_type_page" value="page" <?php if ( $sbi_caching_type === 'page' ) echo 'checked'; ?>>
1225
- <label for="sbi_caching_type_page"><?php _e( 'When the page loads', 'instagram-feed' ); ?></label>
1226
  </div>
1227
  <div class="sbi_row sbi-caching-page-options" style="display: none;">
1228
- <?php _e( 'Every', 'instagram-feed' ); ?>:
1229
  <input name="sb_instagram_cache_time" type="number" value="<?php echo esc_attr( $sb_instagram_cache_time ); ?>" size="4" min="1" max="<?php if ( $sb_instagram_cache_time_unit == "minutes" ) { echo 1440; } else { echo 24; } ?>"/>
1230
  <select name="sb_instagram_cache_time_unit">
1231
- <option value="minutes" <?php if($sb_instagram_cache_time_unit == "minutes") echo 'selected="selected"' ?>><?php _e('Minutes', 'instagram-feed'); ?></option>
1232
- <option value="hours" <?php if($sb_instagram_cache_time_unit == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'instagram-feed'); ?></option>
1233
  </select>
1234
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1235
- <p class="sbi_tooltip"><?php _e('Your Instagram posts are temporarily cached by the plugin in your WordPress database. You can choose how long the posts should be cached for. If you set the time to 1 hour then the plugin will clear the cache after that length of time and check Instagram for posts again. The maximum caching time is 24 hours.', 'instagram-feed'); ?></p>
1236
  </div>
1237
 
1238
  </td>
@@ -1260,53 +1264,53 @@ function sb_instagram_settings_page() {
1260
  <?php if( $sbi_active_tab == 'customize' ) { //Start Configure tab ?>
1261
 
1262
  <p class="sb_instagram_contents_links" id="general">
1263
- <span><?php _e( 'Quick links:', 'instagram-feed' ); ?> </span>
1264
- <a href="#general"><?php _e( 'General', 'instagram-feed' ); ?></a>
1265
- <a href="#layout"><?php _e( 'Layout', 'instagram-feed' ); ?></a>
1266
- <a href="#photos"><?php _e( 'Photos', 'instagram-feed' ); ?></a>
1267
- <a href="#headeroptions"><?php _e( 'Header', 'instagram-feed' ); ?></a>
1268
- <a href="#loadmore"><?php _e( "'Load More' Button", 'instagram-feed' ); ?></a>
1269
- <a href="#follow"><?php _e( "'Follow' Button", 'instagram-feed' ); ?></a>
1270
- <a href="#gdpr"><?php _e( 'GDPR', 'instagram-feed' ); ?></a>
1271
- <a href="#customcss"><?php _e( 'Custom CSS', 'instagram-feed' ); ?></a>
1272
- <a href="#customjs"><?php _e( 'Custom JavaScript', 'instagram-feed' ); ?></a>
1273
  </p>
1274
 
1275
  <input type="hidden" name="<?php echo $sb_instagram_customize_hidden_field; ?>" value="Y">
1276
 
1277
- <h3><?php _e( 'General', 'instagram-feed' ); ?></h3>
1278
 
1279
  <table class="form-table">
1280
  <tbody>
1281
  <tr valign="top">
1282
- <th scope="row"><label><?php _e('Width of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> width widthunit
1283
  Eg: width=50 widthunit=%</code></th>
1284
  <td>
1285
  <input name="sb_instagram_width" type="text" value="<?php echo esc_attr( $sb_instagram_width ); ?>" id="sb_instagram_width" size="4" maxlength="4" />
1286
  <select name="sb_instagram_width_unit" id="sb_instagram_width_unit">
1287
- <option value="px" <?php if($sb_instagram_width_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1288
- <option value="%" <?php if($sb_instagram_width_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1289
  </select>
1290
  <div id="sb_instagram_width_options">
1291
- <input name="sb_instagram_feed_width_resp" type="checkbox" id="sb_instagram_feed_width_resp" <?php if($sb_instagram_feed_width_resp == true) echo "checked"; ?> /><label for="sb_instagram_feed_width_resp"><?php _e('Set to be 100% width on mobile?', 'instagram-feed'); ?></label>
1292
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does this mean?', 'instagram-feed' ); ?></a>
1293
- <p class="sbi_tooltip"><?php _e("If you set a width on the feed then this will be used on mobile as well as desktop. Check this setting to set the feed width to be 100% on mobile so that it is responsive.", 'instagram-feed'); ?></p>
1294
  </div>
1295
  </td>
1296
  </tr>
1297
  <tr valign="top">
1298
- <th scope="row"><label><?php _e('Height of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> height heightunit
1299
  Eg: height=500 heightunit=px</code></th>
1300
  <td>
1301
  <input name="sb_instagram_height" type="text" value="<?php echo esc_attr( $sb_instagram_height ); ?>" size="4" maxlength="4" />
1302
  <select name="sb_instagram_height_unit">
1303
- <option value="px" <?php if($sb_instagram_height_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1304
- <option value="%" <?php if($sb_instagram_height_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1305
  </select>
1306
  </td>
1307
  </tr>
1308
  <tr valign="top">
1309
- <th scope="row"><label><?php _e('Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> background
1310
  Eg: background=d89531</code></th>
1311
  <td>
1312
  <input name="sb_instagram_background" type="text" value="<?php echo esc_attr( $sb_instagram_background ); ?>" class="sbi_colorpick" />
@@ -1316,7 +1320,7 @@ function sb_instagram_settings_page() {
1316
  </table>
1317
 
1318
  <hr id="layout" />
1319
- <h3><?php _e('Layout', 'instagram-feed'); ?></h3>
1320
 
1321
  <table class="form-table">
1322
  <tbody>
@@ -1336,7 +1340,7 @@ function sb_instagram_settings_page() {
1336
  );
1337
  ?>
1338
  <tr valign="top">
1339
- <th scope="row" class="sbi_pro"><label title="<?php _e('Click for shortcode option', 'instagram-feed'); ?>"><?php _e('Layout Type', 'instagram-feed'); ?></label><br /><span class="sbi_note" style="margin: 5px 0 0 0; font-weight: normal;"><?php _e('Select a layout to see associated<br />options', 'instagram-feed'); ?></span></th>
1340
  <td>
1341
  <div class="sbi_layouts">
1342
  <?php foreach( $layout_types as $layout_type => $label ) : ?>
@@ -1345,28 +1349,28 @@ function sb_instagram_settings_page() {
1345
  </div>
1346
  <?php endforeach; ?>
1347
 
1348
- <p class="sbi_pro_tooltip"><?php _e('Upgrade to the Pro version to unlock these layouts', 'instagram-feed'); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1349
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=layouts" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php _e('Pro', 'instagram-feed'); ?></a>
1350
 
1351
  </div>
1352
  <div class="sb_layout_options_wrap sbi_pro">
1353
  <a href="JavaScript:void(0);" class="sbi_close_options"><i class="fa fa-close"></i></a>
1354
  <div class="sb_instagram_layout_settings sbi_layout_type_grid">
1355
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('A uniform grid of square-cropped images.', 'instagram-feed'); ?></span>
1356
  </div>
1357
  <div class="sb_instagram_layout_settings sbi_layout_type_masonry">
1358
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Images in their original aspect ratios with no vertical space between posts.', 'instagram-feed'); ?></span>
1359
  </div>
1360
  <div class="sb_instagram_layout_settings sbi_layout_type_carousel">
1361
  <div class="sb_instagram_layout_setting">
1362
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Posts are displayed in a slideshow carousel.', 'instagram-feed'); ?></span>
1363
  </div>
1364
  <div class="sb_instagram_layout_setting">
1365
 
1366
- <label><?php _e('Number of Rows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselrows
1367
  Eg: carouselrows=2</code>
1368
  <br>
1369
- <span class="sbi_note" style="margin: -5px 0 -10px 0; display: block;"><?php _e('Use the "Number of Columns" setting below this section to set how many posts are visible in the carousel at a given time.', 'instagram-feed'); ?></span>
1370
  <br>
1371
  <select name="sb_instagram_carousel_rows" id="sb_instagram_carousel_rows">
1372
  <option value="1">1</option>
@@ -1374,50 +1378,50 @@ function sb_instagram_settings_page() {
1374
  </select>
1375
  </div>
1376
  <div class="sb_instagram_layout_setting">
1377
- <label><?php _e('Loop Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselloop
1378
  Eg: carouselloop=rewind
1379
  carouselloop=infinity</code>
1380
  <br>
1381
  <select name="sb_instagram_carousel_loop" id="sb_instagram_carousel_loop">
1382
- <option value="rewind"><?php _e('Rewind', 'instagram-feed'); ?></option>
1383
- <option value="infinity" selected="selected"><?php _e('Infinity', 'instagram-feed'); ?></option>
1384
  </select>
1385
  </div>
1386
  <div class="sb_instagram_layout_setting">
1387
  <input type="checkbox" name="sb_instagram_carousel_arrows" id="sb_instagram_carousel_arrows" checked="checked">
1388
- <label><?php _e('Show Navigation Arrows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselarrows
1389
  Eg: carouselarrows=true</code>
1390
  </div>
1391
  <div class="sb_instagram_layout_setting">
1392
  <input type="checkbox" name="sb_instagram_carousel_pag" id="sb_instagram_carousel_pag">
1393
- <label><?php _e('Show Pagination', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselpag
1394
  Eg: carouselpag=true</code>
1395
  </div>
1396
  <div class="sb_instagram_layout_setting">
1397
  <input type="checkbox" name="sb_instagram_carousel_autoplay" id="sb_instagram_carousel_autoplay">
1398
- <label><?php _e('Enable Autoplay', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselautoplay
1399
  Eg: carouselautoplay=true</code>
1400
  </div>
1401
  <div class="sb_instagram_layout_setting">
1402
- <label><?php _e('Interval Time', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouseltime
1403
  Eg: carouseltime=8000</code>
1404
  <br>
1405
- <input name="sb_instagram_carousel_interval" type="text" value="5000" size="6"><?php _e("miliseconds", 'instagram-feed'); ?>
1406
  </div>
1407
  </div>
1408
 
1409
  <div class="sb_instagram_layout_settings sbi_layout_type_highlight">
1410
  <div class="sb_instagram_layout_setting">
1411
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Masonry style, square-cropped, image only (no captions or likes/comments below image). "Highlighted" posts are twice as large.', 'instagram-feed'); ?></span>
1412
  </div>
1413
  <div class="sb_instagram_layout_setting">
1414
- <label title="Click for shortcode option"><?php _e('Highlighting Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlighttype
1415
  Eg: highlighttype=pattern</code>
1416
  <br>
1417
  <select name="sb_instagram_highlight_type" id="sb_instagram_highlight_type">
1418
- <option value="pattern" selected="selected"><?php _e('Pattern', 'instagram-feed'); ?></option>
1419
- <option value="id"><?php _e('Post ID', 'instagram-feed'); ?></option>
1420
- <option value="hashtag"><?php _e('Hashtag', 'instagram-feed'); ?></option>
1421
  </select>
1422
  </div>
1423
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
@@ -1427,28 +1431,28 @@ function sb_instagram_settings_page() {
1427
  <input name="sb_instagram_highlight_offset" type="number" min="0" value="0" style="width: 50px;">
1428
  </div>
1429
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1430
- <label><?php _e('Pattern', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlightpattern
1431
  Eg: highlightpattern=3</code>
1432
  <br>
1433
- <span><?php _e('Highlight every', 'instagram-feed'); ?></span><input name="sb_instagram_highlight_factor" type="number" min="2" value="6" style="width: 50px;"><span><?php _e('posts', 'instagram-feed'); ?></span>
1434
  </div>
1435
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_hashtag sb_instagram_layout_setting" style="display: none;">
1436
- <label><?php _e('Highlight Posts with these Hashtags', 'instagram-feed'); ?></label>
1437
- <input name="sb_instagram_highlight_hashtag" id="sb_instagram_highlight_hashtag" type="text" size="40" value="#fishing">&nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is this?', 'instagram-feed'); ?></a>
1438
  <br>
1439
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate multiple hashtags using commas', 'instagram-feed'); ?></span>
1440
 
1441
 
1442
- <p class="sbi_tooltip"><?php _e('You can use this setting to highlight posts by a hashtag. Use a specified hashtag in your posts and they will be automatically highlighted in your feed.', 'instagram-feed'); ?></p>
1443
  </div>
1444
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_ids sb_instagram_layout_setting" style="display: none;">
1445
- <label><?php _e('Highlight Posts by ID', 'instagram-feed'); ?></label>
1446
  <textarea name="sb_instagram_highlight_ids" id="sb_instagram_highlight_ids" style="width: 100%;" rows="3">sbi_1852317219231323590_3269008872</textarea>
1447
  <br>
1448
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate IDs using commas', 'instagram-feed'); ?></span>
1449
 
1450
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is this?', 'instagram-feed'); ?></a>
1451
- <p class="sbi_tooltip"><?php _e('You can use this setting to highlight posts by their ID. Enable and use "moderation mode", check the box to show post IDs underneath posts, then copy and paste IDs into this text box.', 'instagram-feed'); ?></p>
1452
  </div>
1453
  </div>
1454
 
@@ -1456,48 +1460,48 @@ function sb_instagram_settings_page() {
1456
  </td>
1457
  </tr>
1458
  <tr valign="top">
1459
- <th scope="row"><label><?php _e('Number of Photos', 'instagram-feed'); ?></label><code class="sbi_shortcode"> num
1460
  Eg: num=6</code></th>
1461
  <td>
1462
  <input name="sb_instagram_num" type="text" value="<?php echo esc_attr( $sb_instagram_num ); ?>" size="4" maxlength="4" />
1463
- <span class="sbi_note"><?php _e('Number of photos to show initially.', 'instagram-feed'); ?></span>
1464
  </td>
1465
  </tr>
1466
  <tr valign="top">
1467
- <th scope="row"><label><?php _e('Number of Columns', 'instagram-feed'); ?></label><code class="sbi_shortcode"> cols
1468
  Eg: cols=3</code></th>
1469
  <td>
1470
  <select name="sb_instagram_cols">
1471
- <option value="1" <?php if($sb_instagram_cols == "1") echo 'selected="selected"' ?> ><?php _e('1', 'instagram-feed'); ?></option>
1472
- <option value="2" <?php if($sb_instagram_cols == "2") echo 'selected="selected"' ?> ><?php _e('2', 'instagram-feed'); ?></option>
1473
- <option value="3" <?php if($sb_instagram_cols == "3") echo 'selected="selected"' ?> ><?php _e('3', 'instagram-feed'); ?></option>
1474
- <option value="4" <?php if($sb_instagram_cols == "4") echo 'selected="selected"' ?> ><?php _e('4', 'instagram-feed'); ?></option>
1475
- <option value="5" <?php if($sb_instagram_cols == "5") echo 'selected="selected"' ?> ><?php _e('5', 'instagram-feed'); ?></option>
1476
- <option value="6" <?php if($sb_instagram_cols == "6") echo 'selected="selected"' ?> ><?php _e('6', 'instagram-feed'); ?></option>
1477
- <option value="7" <?php if($sb_instagram_cols == "7") echo 'selected="selected"' ?> ><?php _e('7', 'instagram-feed'); ?></option>
1478
- <option value="8" <?php if($sb_instagram_cols == "8") echo 'selected="selected"' ?> ><?php _e('8', 'instagram-feed'); ?></option>
1479
- <option value="9" <?php if($sb_instagram_cols == "9") echo 'selected="selected"' ?> ><?php _e('9', 'instagram-feed'); ?></option>
1480
- <option value="10" <?php if($sb_instagram_cols == "10") echo 'selected="selected"' ?> ><?php _e('10', 'instagram-feed'); ?></option>
1481
  </select>
1482
  </td>
1483
  </tr>
1484
  <tr valign="top">
1485
- <th scope="row"><label><?php _e('Padding around Images', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imagepadding imagepaddingunit</code></th>
1486
  <td>
1487
  <input name="sb_instagram_image_padding" type="text" value="<?php echo esc_attr( $sb_instagram_image_padding ); ?>" size="4" maxlength="4" />
1488
  <select name="sb_instagram_image_padding_unit">
1489
- <option value="px" <?php if($sb_instagram_image_padding_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1490
- <option value="%" <?php if($sb_instagram_image_padding_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1491
  </select>
1492
  </td>
1493
  </tr>
1494
  <tr valign="top">
1495
- <th scope="row"><label><?php _e("Disable mobile layout", 'instagram-feed'); ?></label><code class="sbi_shortcode"> disablemobile
1496
  Eg: disablemobile=true</code></th>
1497
  <td>
1498
  <input type="checkbox" name="sb_instagram_disable_mobile" id="sb_instagram_disable_mobile" <?php if($sb_instagram_disable_mobile == true) echo 'checked="checked"' ?> />
1499
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does this mean?', 'instagram-feed' ); ?></a>
1500
- <p class="sbi_tooltip"><?php _e("By default on mobile devices the layout automatically changes to use fewer columns. Checking this setting disables the mobile layout.", 'instagram-feed'); ?></p>
1501
  </td>
1502
  </tr>
1503
  </tbody>
@@ -1506,71 +1510,71 @@ function sb_instagram_settings_page() {
1506
  <?php submit_button(); ?>
1507
 
1508
  <hr id="photos" />
1509
- <h3><?php _e('Photos', 'instagram-feed'); ?></h3>
1510
 
1511
  <table class="form-table">
1512
  <tbody>
1513
  <tr valign="top">
1514
- <th scope="row"><label><?php _e('Sort Photos By', 'instagram-feed'); ?></label><code class="sbi_shortcode"> sortby
1515
  Eg: sortby=random</code></th>
1516
  <td>
1517
  <select name="sb_instagram_sort">
1518
- <option value="none" <?php if($sb_instagram_sort == "none") echo 'selected="selected"' ?> ><?php _e('Newest to oldest', 'instagram-feed'); ?></option>
1519
- <option value="random" <?php if($sb_instagram_sort == "random") echo 'selected="selected"' ?> ><?php _e('Random', 'instagram-feed'); ?></option>
1520
  </select>
1521
  </td>
1522
  </tr>
1523
  <tr valign="top">
1524
- <th scope="row"><label><?php _e('Image Resolution', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imageres
1525
  Eg: imageres=thumb</code></th>
1526
  <td>
1527
 
1528
  <select name="sb_instagram_image_res">
1529
- <option value="auto" <?php if($sb_instagram_image_res == "auto") echo 'selected="selected"' ?> ><?php _e('Auto-detect (recommended)', 'instagram-feed'); ?></option>
1530
- <option value="thumb" <?php if($sb_instagram_image_res == "thumb") echo 'selected="selected"' ?> ><?php _e('Thumbnail (150x150)', 'instagram-feed'); ?></option>
1531
- <option value="medium" <?php if($sb_instagram_image_res == "medium") echo 'selected="selected"' ?> ><?php _e('Medium (320x320)', 'instagram-feed'); ?></option>
1532
- <option value="full" <?php if($sb_instagram_image_res == "full") echo 'selected="selected"' ?> ><?php _e('Full size (640x640)', 'instagram-feed'); ?></option>
1533
  </select>
1534
 
1535
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does Auto-detect mean?', 'instagram-feed'); ?></a>
1536
- <p class="sbi_tooltip"><?php _e("Auto-detect means that the plugin automatically sets the image resolution based on the size of your feed.", 'instagram-feed'); ?></p>
1537
 
1538
  </td>
1539
  </tr>
1540
  </tbody>
1541
  </table>
1542
 
1543
- <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a></span>
1544
 
1545
  <div class="sbi-pro-options">
1546
  <p class="sbi-upgrade-link">
1547
- <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1548
  </p>
1549
  <table class="form-table">
1550
  <tbody>
1551
  <tr valign="top" class="sbi_pro">
1552
- <th scope="row"><label><?php _e('Media Type to Display','instagram-feed'); ?></label></th>
1553
  <td>
1554
  <select name="sb_instagram_media_type" disabled>
1555
- <option value="all"><?php _e('All','instagram-feed'); ?></option>
1556
- <option value="photos"><?php _e('Photos only','instagram-feed'); ?></option>
1557
- <option value="videos"><?php _e('Videos only','instagram-feed'); ?></option>
1558
  </select>
1559
  </td>
1560
  </tr>
1561
 
1562
  <tr valign="top" class="sbi_pro">
1563
- <th scope="row"><label><?php _e("Enable Pop-up Lightbox", 'instagram-feed'); ?></label></th>
1564
  <td>
1565
  <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1566
  </td>
1567
  </tr>
1568
 
1569
  <tr valign="top" class="sbi_pro">
1570
- <th scope="row"><label><?php _e("Link Posts to URL in Caption (Shoppable feed)",'instagram-feed'); ?></label></th>
1571
  <td>
1572
  <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1573
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e("What will this do?",'instagram-feed'); ?></a>
1574
  <p class="sbi_tooltip"><?php _e("Checking this box will change the link for each post to any url included in the caption for that Instagram post. The lightbox will be disabled. Visit <a href='https://smashballoon.com/make-a-shoppable-feed?utm_campaign=instagram-free&utm_source=settings&utm_medium=shoppable'>this link</a> to learn how this works.",'instagram-feed'); ?></p>
1575
  </td>
1576
  </tr>
@@ -1580,58 +1584,58 @@ function sb_instagram_settings_page() {
1580
 
1581
 
1582
  <hr />
1583
- <h3><?php _e('Photo Hover Style','instagram-feed'); ?></h3>
1584
 
1585
  <p style="padding-bottom: 18px;">
1586
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=photohover" target="_blank"><?php _e('Upgrade to Pro to enable Photo Hover styles','instagram-feed'); ?></a><br />
1587
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options','instagram-feed'); ?></a>
1588
  </p>
1589
 
1590
  <div class="sbi-pro-options" style="margin-top: -15px;">
1591
  <table class="form-table">
1592
  <tbody>
1593
  <tr valign="top" class="sbi_pro">
1594
- <th scope="row"><label><?php _e('Hover Background Color', 'instagram-feed'); ?></label></th>
1595
  <td>
1596
  <input name="sb_hover_background" type="text" disabled class="sbi_colorpick" />
1597
  </td>
1598
  </tr>
1599
  <tr valign="top" class="sbi_pro">
1600
- <th scope="row"><label><?php _e('Hover Text Color', 'instagram-feed'); ?></label></th>
1601
  <td>
1602
  <input name="sb_hover_text" type="text" disabled class="sbi_colorpick" />
1603
  </td>
1604
  </tr>
1605
  <tr valign="top" class="sbi_pro">
1606
- <th scope="row"><label><?php _e('Information to display', 'instagram-feed'); ?></label></th>
1607
  <td>
1608
  <div>
1609
  <input name="sbi_hover_inc_username" type="checkbox" disabled />
1610
- <label for="sbi_hover_inc_username"><?php _e('Username', 'instagram-feed'); ?></label>
1611
  </div>
1612
  <div>
1613
  <input name="sbi_hover_inc_icon" type="checkbox" disabled />
1614
- <label for="sbi_hover_inc_icon"><?php _e('Expand Icon', 'instagram-feed'); ?></label>
1615
  </div>
1616
  <div>
1617
  <input name="sbi_hover_inc_date" type="checkbox" disabled />
1618
- <label for="sbi_hover_inc_date"><?php _e('Date', 'instagram-feed'); ?></label>
1619
  </div>
1620
  <div>
1621
  <input name="sbi_hover_inc_instagram" type="checkbox" disabled />
1622
- <label for="sbi_hover_inc_instagram"><?php _e('Instagram Icon/Link', 'instagram-feed'); ?></label>
1623
  </div>
1624
  <div>
1625
  <input name="sbi_hover_inc_location" type="checkbox" disabled />
1626
- <label for="sbi_hover_inc_location"><?php _e('Location', 'instagram-feed'); ?></label>
1627
  </div>
1628
  <div>
1629
  <input name="sbi_hover_inc_caption" type="checkbox" disabled />
1630
- <label for="sbi_hover_inc_caption"><?php _e('Caption', 'instagram-feed'); ?></label>
1631
  </div>
1632
  <div>
1633
  <input name="sbi_hover_inc_likes" type="checkbox" disabled />
1634
- <label for="sbi_hover_inc_likes"><?php _e('Like/Comment Icons', 'instagram-feed'); ?></label>
1635
  </div>
1636
  </td>
1637
  </tr>
@@ -1642,45 +1646,45 @@ function sb_instagram_settings_page() {
1642
 
1643
 
1644
  <hr />
1645
- <h3><?php _e( 'Carousel', 'instagram-feed' ); ?></h3>
1646
  <p style="padding-bottom: 18px;">
1647
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=carousel" target="_blank"><?php _e('Upgrade to Pro to enable Carousels', 'instagram-feed'); ?></a><br />
1648
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1649
  </p>
1650
 
1651
  <div class="sbi-pro-options" style="margin-top: -15px;">
1652
  <table class="form-table">
1653
  <tbody>
1654
  <tr valign="top" class="sbi_pro">
1655
- <th scope="row"><label><?php _e("Enable Carousel", 'instagram-feed'); ?></label></th>
1656
  <td>
1657
  <input type="checkbox" disabled />
1658
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1659
- <p class="sbi_tooltip"><?php _e("Enable this setting to create a carousel slider out of your photos.", 'instagram-feed'); ?></p>
1660
  </td>
1661
  </tr>
1662
  <tr valign="top" class="sbi_pro">
1663
- <th scope="row"><label><?php _e("Show Navigation Arrows", 'instagram-feed'); ?></label></th>
1664
  <td>
1665
  <input type="checkbox" disabled />
1666
  </td>
1667
  </tr>
1668
  <tr valign="top" class="sbi_pro">
1669
- <th scope="row"><label><?php _e("Show Pagination", 'instagram-feed'); ?></label></th>
1670
  <td>
1671
  <input type="checkbox" disabled />
1672
  </td>
1673
  </tr>
1674
  <tr valign="top" class="sbi_pro">
1675
- <th scope="row"><label><?php _e("Enable Autoplay", 'instagram-feed'); ?></label></th>
1676
  <td>
1677
  <input type="checkbox" disabled />
1678
  </td>
1679
  </tr>
1680
  <tr valign="top" class="sbi_pro">
1681
- <th scope="row"><label><?php _e("Interval Time", 'instagram-feed'); ?></label></th>
1682
  <td>
1683
- <input name="sb_instagram_carousel_interval" type="text" disabled size="6" /><?php _e("milliseconds", 'instagram-feed'); ?>
1684
  </td>
1685
  </tr>
1686
  </tbody>
@@ -1690,43 +1694,43 @@ function sb_instagram_settings_page() {
1690
 
1691
 
1692
  <hr id="headeroptions" />
1693
- <h3><?php _e("Header", 'instagram-feed'); ?></h3>
1694
  <table class="form-table">
1695
  <tbody>
1696
  <tr valign="top">
1697
- <th scope="row"><label><?php _e("Show Feed Header", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showheader
1698
  Eg: showheader=false</code></th>
1699
  <td>
1700
  <input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header" <?php if($sb_instagram_show_header == true) echo 'checked="checked"' ?> />
1701
  </td>
1702
  </tr>
1703
  <tr valign="top">
1704
- <th scope="row"><label><?php _e('Header Size', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headersize
1705
  Eg: headersize=medium</code></th>
1706
  <td>
1707
  <select name="sb_instagram_header_size" id="sb_instagram_header_size" style="float: left;">
1708
- <option value="small" <?php if($sb_instagram_header_size == "small") echo 'selected="selected"' ?> ><?php _e('Small', 'instagram-feed'); ?></option>
1709
- <option value="medium" <?php if($sb_instagram_header_size == "medium") echo 'selected="selected"' ?> ><?php _e('Medium', 'instagram-feed'); ?></option>
1710
- <option value="large" <?php if($sb_instagram_header_size == "large") echo 'selected="selected"' ?> ><?php _e('Large', 'instagram-feed'); ?></option>
1711
  </select>
1712
  </td>
1713
  </tr>
1714
  <tr valign="top">
1715
- <th scope="row"><label><?php _e("Show Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbio
1716
  Eg: showbio=false</code></th>
1717
  <td>
1718
  <?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
1719
  <input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio" <?php if($sb_instagram_show_bio == true) echo 'checked="checked"' ?> />
1720
- <span class="sbi_note"><?php _e("Only applies for Instagram accounts with bios", 'instagram-feed'); ?></span>
1721
  <div class="sb_instagram_box" style="display: block;">
1722
  <div class="sb_instagram_box_setting" style="display: block;">
1723
- <label style="padding-bottom: 0;"><?php _e("Add Custom Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode" style="margin-top: 5px;"> custombio
1724
  Eg: custombio="My custom bio."</code>
1725
  <br>
1726
- <span class="sbi_aside" style="padding-bottom: 5px; display: block;"><?php _e("Use your own custom bio text in the feed header. Bio text is automatically retrieved from Instagram for Business accounts.", 'instagram-feed'); ?></span>
1727
 
1728
- <textarea type="text" name="sb_instagram_custom_bio" id="sb_instagram_custom_bio" ><?php echo esc_textarea( stripslashes( $sb_instagram_custom_bio ) ); ?></textarea>
1729
- &nbsp;<a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php _e("Why is my bio not displaying automatically?", 'instagram-feed'); ?></a>
1730
  <p class="sbi_tooltip" style="padding: 10px 0 0 0; width: 99%;"><?php echo sprintf( __("Instagram is deprecating their old API for Personal accounts on June 1, 2020. The plugin supports their new API, however, their new API does not yet include the bio text for Personal accounts. If you require this feature then it is available if you convert your Instagram account from a Personal to a Business account by following %s. Note: If you previously had a Personal account connected then the plugin has saved the avatar for that feed and will continue to use it automatically.", 'instagram-feed'), '<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">these directions</a>' ); ?></p>
1731
  </div>
1732
  </div>
@@ -1735,20 +1739,20 @@ function sb_instagram_settings_page() {
1735
  </tr>
1736
 
1737
  <tr valign="top">
1738
- <th scope="row"><label><?php _e("Use Custom Avatar", 'instagram-feed'); ?></label><code class="sbi_shortcode"> customavatar
1739
  Eg: customavatar="https://my-website.com/avatar.jpg"</code></th>
1740
  <td>
1741
- <input type="text" name="sb_instagram_custom_avatar" class="large-text" id="sb_instagram_custom_avatar" value="<?php echo esc_attr( stripslashes( $sb_instagram_custom_avatar ) ); ?>" placeholder="https://example.com/avatar.jpg" />
1742
- <span class="sbi_aside"><?php _e("Avatar is automatically retrieved from Instagram for Business accounts", 'instagram-feed'); ?></span>
1743
  <br>
1744
- <a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php _e("Why is my avatar not displaying automatically?", 'instagram-feed'); ?></a>
1745
 
1746
  <p class="sbi_tooltip sbi_tooltip_under_text" style="padding: 10px 0 0 0;"><?php echo sprintf( __("Instagram is deprecating their old API for Personal accounts on June 1, 2020. The plugin supports their new API, however, their new API does not yet include the avatar image for Personal accounts. If you require this feature then it is available if you convert your Instagram account from a Personal to a Business account by following %s. Note: If you previously had a Personal account connected then the plugin has saved the bio text for that feed and will continue to use it automatically.", 'instagram-feed'), '<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">these directions</a>' ); ?></p>
1747
 
1748
  </td>
1749
  </tr>
1750
  <tr valign="top">
1751
- <th scope="row"><label><?php _e('Header Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headercolor
1752
  Eg: headercolor=fff</code></th>
1753
  <td>
1754
  <input name="sb_instagram_header_color" type="text" value="<?php echo esc_attr( $sb_instagram_header_color ); ?>" class="sbi_colorpick" />
@@ -1757,29 +1761,29 @@ function sb_instagram_settings_page() {
1757
  </tbody>
1758
  </table>
1759
 
1760
- <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a></span>
1761
 
1762
  <div class="sbi-pro-options">
1763
  <p class="sbi-upgrade-link">
1764
- <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=header" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1765
  </p>
1766
  <table class="form-table">
1767
  <tbody>
1768
  <tr valign="top" class="sbi_pro">
1769
- <th scope="row"><label><?php _e('Header Style','instagram-feed'); ?></label></th>
1770
  <td>
1771
  <select name="sb_instagram_header_style" style="float: left;">
1772
- <option value="circle"><?php _e('Standard','instagram-feed'); ?></option>
1773
- <option value="boxed"><?php _e('Boxed','instagram-feed'); ?></option>
1774
- <option value="centered"><?php _e('Centered','instagram-feed'); ?></option>
1775
  </select>
1776
  </td>
1777
  </tr>
1778
  <tr valign="top" class="sbi_pro">
1779
- <th scope="row"><label><?php _e("Show Number of Followers",'instagram-feed'); ?></label></th>
1780
  <td>
1781
  <input type="checkbox" disabled />
1782
- <span class="sbi_note"><?php _e("This only applies when displaying photos from a User ID",'instagram-feed'); ?></span>
1783
  </td>
1784
  </tr>
1785
  </tbody>
@@ -1790,40 +1794,40 @@ function sb_instagram_settings_page() {
1790
 
1791
 
1792
  <hr />
1793
- <h3><?php _e("Caption", 'instagram-feed'); ?></h3>
1794
  <p style="padding-bottom: 18px;">
1795
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=caption" target="_blank"><?php _e("Upgrade to Pro to enable Photo Captions", 'instagram-feed'); ?></a><br />
1796
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e("Show Pro Options", 'instagram-feed'); ?></a>
1797
  </p>
1798
 
1799
  <div class="sbi-pro-options" style="margin-top: -15px;">
1800
  <table class="form-table">
1801
  <tbody>
1802
  <tr valign="top" class="sbi_pro">
1803
- <th scope="row"><label><?php _e("Show Caption", 'instagram-feed'); ?></label></th>
1804
  <td>
1805
  <input type="checkbox" disabled />
1806
  </td>
1807
  </tr>
1808
  <tr valign="top" class="sbi_pro">
1809
- <th scope="row"><label><?php _e("Maximum Text Length", 'instagram-feed'); ?></label></th>
1810
  <td>
1811
  <input disabled size="4" />Characters
1812
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1813
- <p class="sbi_tooltip"><?php _e("The number of characters of text to display in the caption. An elipsis link will be added to allow the user to reveal more text if desired.", 'instagram-feed'); ?></p>
1814
  </td>
1815
  </tr>
1816
  <tr valign="top" class="sbi_pro">
1817
- <th scope="row"><label><?php _e('Text Color', 'instagram-feed'); ?></label></th>
1818
  <td>
1819
  <input type="text" disabled class="sbi_colorpick" />
1820
  </td>
1821
  </tr>
1822
  <tr valign="top" class="sbi_pro">
1823
- <th scope="row"><label><?php _e('Text Size', 'instagram-feed'); ?></label></th>
1824
  <td>
1825
  <select name="sb_instagram_caption_size" style="width: 180px;" disabled>
1826
- <option value="inherit" ><?php _e('Inherit from theme', 'instagram-feed'); ?></option>
1827
  <option value="10" >10px</option>
1828
  <option value="11" >11px</option>
1829
  <option value="12" >12px</option>
@@ -1846,32 +1850,32 @@ function sb_instagram_settings_page() {
1846
 
1847
 
1848
  <hr />
1849
- <h3><?php _e("Likes &amp; Comments", 'instagram-feed'); ?></h3>
1850
  <p style="padding-bottom: 18px;">
1851
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=stats" target="_blank"><?php _e("Upgrade to Pro to enable Likes &amp; Comments", 'instagram-feed'); ?></a><br />
1852
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e("Show Pro Options", 'instagram-feed'); ?></a>
1853
  </p>
1854
 
1855
  <div class="sbi-pro-options" style="margin-top: -15px;">
1856
  <table class="form-table">
1857
  <tbody>
1858
  <tr valign="top" class="sbi_pro">
1859
- <th scope="row"><label><?php _e("Show Icons", 'instagram-feed'); ?></label></th>
1860
  <td>
1861
  <input type="checkbox" disabled />
1862
  </td>
1863
  </tr>
1864
  <tr valign="top" class="sbi_pro">
1865
- <th scope="row"><label><?php _e('Icon Color', 'instagram-feed'); ?></label></th>
1866
  <td>
1867
  <input type="text" disabled class="sbi_colorpick" />
1868
  </td>
1869
  </tr>
1870
  <tr valign="top" class="sbi_pro">
1871
- <th scope="row"><label><?php _e('Icon Size', 'instagram-feed'); ?></label></th>
1872
  <td>
1873
  <select disabled name="sb_instagram_meta_size" style="width: 180px;">
1874
- <option value="inherit"><?php _e('Inherit from theme', 'instagram-feed'); ?></option>
1875
  <option value="10" >10px</option>
1876
  <option value="11" >11px</option>
1877
  <option value="12" >12px</option>
@@ -1894,11 +1898,11 @@ function sb_instagram_settings_page() {
1894
 
1895
 
1896
  <hr />
1897
- <h3><?php _e('Lightbox Comments', 'instagram-feed'); ?></h3>
1898
 
1899
  <p style="padding-bottom: 18px;">
1900
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=comments" target="_blank"><?php _e('Upgrade to Pro to enable Comments', 'instagram-feed'); ?></a><br />
1901
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1902
  </p>
1903
 
1904
  <div class="sbi-pro-options" style="margin-top: -15px;">
@@ -1906,21 +1910,21 @@ function sb_instagram_settings_page() {
1906
  <tbody>
1907
 
1908
  <tr valign="top" class="sbi_pro">
1909
- <th scope="row"><label><?php _e('Show Comments in Lightbox', 'instagram-feed'); ?></label></th>
1910
  <td style="padding: 5px 10px 0 10px;">
1911
  <input type="checkbox" disabled style="margin-right: 15px;" />
1912
- <input class="button-secondary" style="margin-top: -5px;" disabled value="<?php echo esc_attr( 'Clear Comment Cache', 'instagram-feed' ); ?>" />
1913
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1914
- <p class="sbi_tooltip"><?php _e("This will remove the cached comments saved in the database", 'instagram-feed'); ?></p>
1915
  </td>
1916
  </tr>
1917
  <tr valign="top" class="sbi_pro">
1918
- <th scope="row"><label><?php _e('Number of Comments', 'instagram-feed'); ?></label></th>
1919
  <td>
1920
  <input name="sb_instagram_num_comments" type="text" disabled size="4" />
1921
- <span class="sbi_note"><?php _e('Max number of latest comments.', 'instagram-feed'); ?></span>
1922
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1923
- <p class="sbi_tooltip"><?php _e("This is the maximum number of comments that will be shown in the lightbox. If there are more comments available than the number set, only the latest comments will be shown", 'instagram-feed'); ?></p>
1924
  </td>
1925
  </tr>
1926
 
@@ -1930,35 +1934,35 @@ function sb_instagram_settings_page() {
1930
 
1931
 
1932
  <hr id="loadmore" />
1933
- <h3><?php _e("'Load More' Button", 'instagram-feed'); ?></h3>
1934
  <table class="form-table">
1935
  <tbody>
1936
  <tr valign="top">
1937
- <th scope="row"><label><?php _e("Show the 'Load More' button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbutton
1938
  Eg: showbutton=false</code></th>
1939
  <td>
1940
  <input type="checkbox" name="sb_instagram_show_btn" id="sb_instagram_show_btn" <?php if($sb_instagram_show_btn == true) echo 'checked="checked"' ?> />
1941
  </td>
1942
  </tr>
1943
  <tr valign="top">
1944
- <th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttoncolor
1945
  Eg: buttoncolor=8224e3</code></th>
1946
  <td>
1947
  <input name="sb_instagram_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_btn_background ); ?>" class="sbi_colorpick" />
1948
  </td>
1949
  </tr>
1950
  <tr valign="top">
1951
- <th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontextcolor
1952
  Eg: buttontextcolor=eeee22</code></th>
1953
  <td>
1954
  <input name="sb_instagram_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_btn_text_color ); ?>" class="sbi_colorpick" />
1955
  </td>
1956
  </tr>
1957
  <tr valign="top">
1958
- <th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontext
1959
  Eg: buttontext="Show more.."</code></th>
1960
  <td>
1961
- <input name="sb_instagram_btn_text" type="text" value="<?php echo esc_attr( stripslashes( $sb_instagram_btn_text ) ); ?>" size="20" />
1962
  </td>
1963
  </tr>
1964
  </tbody>
@@ -1967,11 +1971,11 @@ function sb_instagram_settings_page() {
1967
  <?php submit_button(); ?>
1968
 
1969
  <hr id="follow" />
1970
- <h3><?php _e("'Follow' Button", 'instagram-feed'); ?></h3>
1971
  <table class="form-table">
1972
  <tbody>
1973
  <tr valign="top">
1974
- <th scope="row"><label><?php _e("Show the Follow button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showfollow
1975
  Eg: showfollow=true</code></th>
1976
  <td>
1977
  <input type="checkbox" name="sb_instagram_show_follow_btn" id="sb_instagram_show_follow_btn" <?php if($sb_instagram_show_follow_btn == true) echo 'checked="checked"' ?> />
@@ -1979,35 +1983,35 @@ function sb_instagram_settings_page() {
1979
  </tr>
1980
 
1981
  <tr valign="top">
1982
- <th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followcolor
1983
  Eg: followcolor=28a1bf</code></th>
1984
  <td>
1985
  <input name="sb_instagram_folow_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_folow_btn_background ); ?>" class="sbi_colorpick" />
1986
  </td>
1987
  </tr>
1988
  <tr valign="top">
1989
- <th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtextcolor
1990
  Eg: followtextcolor=000</code></th>
1991
  <td>
1992
  <input name="sb_instagram_follow_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_follow_btn_text_color ); ?>" class="sbi_colorpick" />
1993
  </td>
1994
  </tr>
1995
  <tr valign="top">
1996
- <th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtext
1997
  Eg: followtext="Follow me"</code></th>
1998
  <td>
1999
- <input name="sb_instagram_follow_btn_text" type="text" value="<?php echo esc_attr( stripslashes( $sb_instagram_follow_btn_text ) ); ?>" size="30" />
2000
  </td>
2001
  </tr>
2002
  </tbody>
2003
  </table>
2004
 
2005
  <hr id="filtering" />
2006
- <h3><?php _e('Post Filtering', 'instagram-feed'); ?></h3>
2007
 
2008
  <p style="padding-bottom: 18px;">
2009
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=filtering" target="_blank"><?php _e('Upgrade to Pro to enable Post Filtering options', 'instagram-feed'); ?></a><br />
2010
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
2011
  </p>
2012
 
2013
  <div class="sbi-pro-options" style="margin-top: -15px;">
@@ -2015,35 +2019,35 @@ function sb_instagram_settings_page() {
2015
  <table class="form-table">
2016
  <tbody>
2017
  <tr valign="top" class="sbi_pro">
2018
- <th scope="row"><label><?php _e('Remove photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
2019
  <td>
2020
  <div class="sb_instagram_apply_labels">
2021
- <p><?php _e('Apply to:', 'instagram-feed'); ?></p>
2022
- <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php _e('All feeds', 'instagram-feed'); ?></label>
2023
- <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php _e('One feed', 'instagram-feed'); ?></label>
2024
  </div>
2025
 
2026
  <input disabled name="sb_instagram_exclude_words" id="sb_instagram_exclude_words" type="text" style="width: 70%;" value="" />
2027
  <br />
2028
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate words/hashtags using commas', 'instagram-feed'); ?></span>
2029
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed'); ?></a>
2030
- <p class="sbi_tooltip"><?php _e("You can use this setting to remove photos which contain certain words or hashtags in the caption. Separate multiple words or hashtags using commas.", 'instagram-feed'); ?></p>
2031
  </td>
2032
  </tr>
2033
 
2034
  <tr valign="top" class="sbi_pro">
2035
- <th scope="row"><label><?php _e('Show photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
2036
  <td>
2037
  <div class="sb_instagram_apply_labels">
2038
- <p><?php _e('Apply to:', 'instagram-feed'); ?></p>
2039
- <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php _e('All feeds', 'instagram-feed'); ?></label>
2040
- <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php _e('One feed', 'instagram-feed'); ?></label>
2041
  </div>
2042
 
2043
  <input disabled name="sb_instagram_include_words" id="sb_instagram_include_words" type="text" style="width: 70%;" value="" />
2044
  <br />
2045
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate words/hashtags using commas', 'instagram-feed'); ?></span>
2046
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed'); ?></a>
2047
  <p class="sbi_tooltip"><?php _e("You can use this setting to only show photos which contain certain words or hashtags in the caption. For example, adding <code>sheep, cow, dog</code> will show any photos which contain either the word sheep, cow, or dog. Separate multiple words or hashtags using commas.", 'instagram-feed'); ?></p>
2048
  </td>
2049
  </tr>
@@ -2053,21 +2057,21 @@ function sb_instagram_settings_page() {
2053
 
2054
 
2055
  <hr id="moderation" />
2056
- <h3><?php _e('Moderation', 'instagram-feed'); ?></h3>
2057
 
2058
  <p style="padding-bottom: 18px;">
2059
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=moderation" target="_blank"><?php _e('Upgrade to Pro to enable Moderation options', 'instagram-feed'); ?></a><br />
2060
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
2061
  </p>
2062
 
2063
  <div class="sbi-pro-options" style="margin-top: -15px;">
2064
  <table class="form-table">
2065
  <tbody>
2066
  <tr valign="top" class="sbi_pro">
2067
- <th scope="row"><label><?php _e('Moderation Type', 'instagram-feed'); ?></label></th>
2068
  <td>
2069
- <input class="sb_instagram_moderation_mode" checked="checked" disabled type="radio" value="visual" style="margin-top: 0;" /><label><?php _e('Visual', 'instagram-feed'); ?></label>
2070
- <input class="sb_instagram_moderation_mode" disabled type="radio" value="manual" style="margin-top: 0; margin-left: 10px;"/><label><?php _e('Manual', 'instagram-feed'); ?></label>
2071
 
2072
  <p class="sbi_tooltip" style="display: block;"><?php _e("<b>Visual Moderation Mode</b><br />This adds a button to each feed that will allow you to hide posts, block users, and create white lists from the front end using a visual interface. Visit <a href='https://smashballoon.com/guide-to-moderation-mode/?utm_campaign=instagram-free&utm_source=settings&utm_medium=moderationmode' target='_blank'>this page</a> for details", 'instagram-feed'); ?></p>
2073
 
@@ -2075,25 +2079,25 @@ function sb_instagram_settings_page() {
2075
  </tr>
2076
 
2077
  <tr valign="top" class="sbi_pro">
2078
- <th scope="row"><label><?php _e('Only show posts by these users', 'instagram-feed'); ?></label></th>
2079
  <td>
2080
  <input type="text" style="width: 70%;" disabled /><br />
2081
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate usernames using commas', 'instagram-feed'); ?></span>
2082
 
2083
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
2084
- <p class="sbi_tooltip"><?php _e("You can use this setting to show photos only from certain users in your feed. Just enter the usernames here which you want to show. Separate multiple usernames using commas.", 'instagram-feed'); ?></p>
2085
  </td>
2086
  </tr>
2087
  <tr valign="top" class="sbi_pro">
2088
- <th scope="row"><label><?php _e('White lists', 'instagram-feed'); ?></label></th>
2089
  <td>
2090
  <div class="sbi_white_list_names_wrapper">
2091
- <?php _e("No white lists currently created", 'instagram-feed'); ?>
2092
  </div>
2093
 
2094
  <input disabled class="button-secondary" type="submit" value="<?php esc_attr_e( 'Clear White Lists', 'instagram-feed' ); ?>" />
2095
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);" style="display: inline-block; margin-top: 5px;"><?php _e("What is this?", 'instagram-feed'); ?></a>
2096
- <p class="sbi_tooltip"><?php _e("This will remove all of the white lists from the database", 'instagram-feed'); ?></p>
2097
  </td>
2098
  </tr>
2099
 
@@ -2102,12 +2106,12 @@ function sb_instagram_settings_page() {
2102
  </div>
2103
 
2104
  <hr id="gdpr" />
2105
- <h3><?php _e('GDPR', 'instagram-feed'); ?></h3>
2106
 
2107
  <table class="form-table">
2108
  <tbody>
2109
  <tr>
2110
- <th class="bump-left"><label class="bump-left"><?php _e("Enable GDPR settings", 'instagram-feed'); ?></label><code class="sbi_shortcode"> gdpr
2111
  Eg: gdpr=yes</code></th>
2112
  <td>
2113
 
@@ -2141,18 +2145,18 @@ function sb_instagram_settings_page() {
2141
  <option value="<?php echo esc_attr( $select_option['value'] ); ?>"<?php echo $selected; ?> ><?php echo esc_html( $select_option['label'] ); ?></option>
2142
  <?php endforeach; ?>
2143
  </select>
2144
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2145
  <div class="sbi_tooltip gdpr_tooltip">
2146
 
2147
- <p><span><?php _e("Yes", "instagram-feed" ); ?>:</span> <?php _e("Enabling this setting prevents all images and videos from being loaded directly from Instagram's servers (CDN) to prevent any requests to external websites in your browser. To accommodate this, some features of the plugin will be disabled or limited.", "instagram-feed" ); ?> <a href="JavaScript:void(0);" class="sbi_show_gdpr_list"><?php _e( 'What will be limited?', 'instagram-feed' ); ?></a></p>
2148
 
2149
  <?php echo "<div class='sbi_gdpr_list'>" . $gdpr_list . '</div>'; ?>
2150
 
2151
 
2152
- <p><span><?php _e("No", "instagram-feed" ); ?>:</span> <?php _e("The plugin will still make some requests to load and display images and videos directly from Instagram.", "instagram-feed" ); ?></p>
2153
 
2154
 
2155
- <p><span><?php _e("Automatic", "instagram-feed" ); ?>:</span> <?php echo sprintf( __( 'The plugin will only load images and videos directly from Instagram if consent has been given by one of these integrated %s', 'instagram-feed' ), '<a href="https://smashballoon.com/doc/gdpr-plugin-list/?instagram" target="_blank" rel="noopener">' . __( 'GDPR cookie plugins', 'instagram-feed' ) . '</a>' ); ?></p>
2156
 
2157
  <p><?php echo sprintf( __( '%s to learn more about GDPR compliance in the Instagram Feed plugin.', 'instagram-feed' ), '<a href="https://smashballoon.com/doc/instagram-feed-gdpr-compliance/?instagram" target="_blank" rel="noopener">'. __( 'Click here', 'instagram-feed' ).'</a>' ); ?></p>
2158
  </div>
@@ -2164,7 +2168,7 @@ function sb_instagram_settings_page() {
2164
  <div class="sb_instagram_box sbi_gdpr_error">
2165
  <div class="sb_instagram_box_setting">
2166
  <p>
2167
- <strong><?php _e( 'Error:', 'instagram-feed' ); ?></strong> <?php _e("Due to a configuration issue on your web server, the GDPR setting is unable to be enabled.", "instagram-feed" ); ?></p>
2168
  <p>
2169
  <?php echo $errors; ?>
2170
  </p>
@@ -2182,8 +2186,8 @@ function sb_instagram_settings_page() {
2182
  <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-check-circle fa-w-16 fa-2x"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z" class=""></path></svg>
2183
  <b><?php echo sprintf( __( '%s detected', 'instagram-feed' ), $active_plugin ); ?></b>
2184
  <br />
2185
- <?php _e( 'Some Instagram Feed features will be limited for visitors to ensure GDPR compliance until they give consent.', 'instagram-feed' ); ?>
2186
- <a href="JavaScript:void(0);" class="sbi_show_gdpr_list"><?php _e( 'What will be limited?', 'instagram-feed' ); ?></a>
2187
  </p>
2188
  <?php echo "<div class='sbi_gdpr_list'>" . $gdpr_list . '</div>'; ?>
2189
  </div>
@@ -2200,14 +2204,14 @@ function sb_instagram_settings_page() {
2200
 
2201
  <div class="sb_instagram_box sbi_gdpr_yes">
2202
  <div class="sb_instagram_box_setting">
2203
- <p><?php _e( "No requests will be made to third-party websites. To accommodate this, some features of the plugin will be limited:", 'instagram-feed' ); ?></p>
2204
  <?php echo $gdpr_list; ?>
2205
  </div>
2206
  </div>
2207
 
2208
  <div class="sb_instagram_box sbi_gdpr_no">
2209
  <div class="sb_instagram_box_setting">
2210
- <p><?php _e( "The plugin will function as normal and load images directly from Instagram.", 'instagram-feed' ); ?></p>
2211
  </div>
2212
  </div>
2213
 
@@ -2219,7 +2223,7 @@ function sb_instagram_settings_page() {
2219
  </table>
2220
 
2221
  <hr id="customcss" />
2222
- <h3><?php _e('Misc', 'instagram-feed'); ?></h3>
2223
 
2224
  <table class="form-table">
2225
  <tbody>
@@ -2230,7 +2234,7 @@ function sb_instagram_settings_page() {
2230
  </tr>
2231
  <tr valign="top">
2232
  <td>
2233
- <textarea name="sb_instagram_custom_css" id="sb_instagram_custom_css" style="width: 70%;" rows="7"><?php echo esc_textarea( stripslashes($sb_instagram_custom_css), 'instagram-feed' ); ?></textarea>
2234
  </td>
2235
  </tr>
2236
  <tr valign="top" id="customjs">
@@ -2240,7 +2244,7 @@ function sb_instagram_settings_page() {
2240
  </tr>
2241
  <tr valign="top">
2242
  <td>
2243
- <textarea name="sb_instagram_custom_js" id="sb_instagram_custom_js" style="width: 70%;" rows="7"><?php echo esc_textarea( stripslashes($sb_instagram_custom_js), 'instagram-feed' ); ?></textarea>
2244
  </td>
2245
  </tr>
2246
  </tbody>
@@ -2249,101 +2253,101 @@ function sb_instagram_settings_page() {
2249
  <tbody>
2250
 
2251
  <tr valign="top">
2252
- <th scope="row"><label for="sb_instagram_ajax_theme" class="bump-left"><?php _e("Are you using an Ajax powered theme?", 'instagram-feed'); ?></label></th>
2253
  <td>
2254
  <input name="sb_instagram_ajax_theme" type="checkbox" id="sb_instagram_ajax_theme" <?php if($sb_instagram_ajax_theme == true) echo "checked"; ?> />
2255
- <label for="sb_instagram_ajax_theme"><?php _e('Yes', 'instagram-feed'); ?></label>
2256
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2257
- <p class="sbi_tooltip"><?php _e("When navigating your site, if your theme uses Ajax to load content into your pages (meaning your page doesn't refresh) then check this setting. If you're not sure then please check with the theme author.", 'instagram-feed'); ?></p>
2258
  </td>
2259
  </tr>
2260
 
2261
  <tr>
2262
- <th class="bump-left"><label class="bump-left"><?php _e("Image Resizing", 'instagram-feed'); ?></label></th>
2263
  <td>
2264
  <input name="sb_instagram_disable_resize" type="checkbox" id="sb_instagram_disable_resize" <?php if($sb_instagram_disable_resize == true) echo "checked"; ?> />
2265
- <label for="sb_instagram_disable_resize"><?php _e('Disable Local Image Storing and Resizing', 'instagram-feed'); ?></label><br><br>
2266
  <input name="sb_instagram_favor_local" type="checkbox" id="sb_instagram_favor_local" <?php if($sb_instagram_favor_local == true) echo "checked"; ?> />
2267
- <label for="sb_instagram_favor_local"><?php _e('Favor Local Images', 'instagram-feed'); ?></label><br><br>
2268
 
2269
  <input id="sbi_reset_resized" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Reset Resized Images' ); ?>" style="vertical-align: middle;"/>
2270
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2271
- <p class="sbi_tooltip"><?php _e("The plugin creates and stores resized versions of images in order to serve a more optimized resolution size in the feed. Click this button to clear all data related to resized images. Enable the setting to favor local images to always use a local, resized image if one is available.", 'instagram-feed'); ?></p>
2272
  </td>
2273
  </tr>
2274
 
2275
  <tr valign="top">
2276
- <th scope="row"><label><?php _e('API request size', 'instagram-feed'); ?></label><code class="sbi_shortcode"> minnum
2277
  Eg: minnum=25</code></th>
2278
  <td>
2279
  <input name="sb_instagram_minnum" type="number" min="0" max="100" value="<?php echo esc_attr( $sb_instagram_minnum ); ?>" />
2280
- <span class="sbi_note"><?php _e('Leave at "0" for default', 'instagram-feed'); ?></span>
2281
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2282
- <p class="sbi_tooltip"><?php _e("If your feed contains a lot of IG TV posts or your feed is not displaying any posts despite there being posts available on Instagram.com, try increasing this number to 25 or more.", 'instagram-feed'); ?></p>
2283
  </td>
2284
  </tr>
2285
 
2286
  <tr valign="top">
2287
- <th scope="row"><label><?php _e('Enqueue JS file in head', 'instagram-feed'); ?></label></th>
2288
  <td>
2289
  <input type="checkbox" name="enqueue_js_in_head" id="sb_instagram_enqueue_js_in_head" <?php if($enqueue_js_in_head == true) echo 'checked="checked"' ?> />
2290
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2291
- <p class="sbi_tooltip"><?php _e("Check this box if you'd like to enqueue the JavaScript file for the plugin in the head instead of the footer.", 'instagram-feed'); ?></p>
2292
  </td>
2293
  </tr>
2294
 
2295
  <tr valign="top">
2296
- <th scope="row"><label><?php _e('Enqueue CSS file with shortcode', 'instagram-feed'); ?></label></th>
2297
  <td>
2298
  <input type="checkbox" name="enqueue_css_in_shortcode" id="sb_instagram_enqueue_css_in_shortcode" <?php if($enqueue_css_in_shortcode == true) echo 'checked="checked"' ?> />
2299
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2300
- <p class="sbi_tooltip"><?php _e("Check this box if you'd like to only include the CSS file for the plugin when the feed is on the page.", 'instagram-feed'); ?></p>
2301
  </td>
2302
  </tr>
2303
 
2304
  <tr valign="top">
2305
- <th scope="row"><label><?php _e('Disable JS Image Loading', 'instagram-feed'); ?></label></th>
2306
  <td>
2307
  <input type="checkbox" name="disable_js_image_loading" id="sb_instagram_disable_js_image_loading" <?php if($disable_js_image_loading == true) echo 'checked="checked"' ?> />
2308
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2309
- <p class="sbi_tooltip"><?php _e("Check this box to have images loaded server side instead of with JS.", 'instagram-feed'); ?></p>
2310
  </td>
2311
  </tr>
2312
 
2313
  <tr valign="top">
2314
- <th><label><?php _e("Enable Backup Caching", 'instagram-feed'); ?></label></th>
2315
  <td class="sbi-customize-tab-opt">
2316
  <input name="sb_instagram_backup" type="checkbox" id="sb_instagram_backup" <?php if($sb_instagram_backup == true) echo "checked"; ?> />
2317
  <input id="sbi_clear_backups" class="button-secondary" type="submit" style="position: relative; top: -4px;" value="<?php esc_attr_e( 'Clear Backup Cache', 'instagram-feed' ); ?>" />
2318
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2319
- <p class="sbi_tooltip"><?php _e('Every feed will save a duplicate version of itself in the database to be used if the normal cache is not available.', 'instagram-feed'); ?></p>
2320
  </td>
2321
  </tr>
2322
 
2323
  <tr>
2324
  <th class="bump-left">
2325
- <label class="bump-left"><?php _e("Load initial posts with AJAX", 'instagram-feed'); ?></label>
2326
  </th>
2327
  <td>
2328
  <input name="sb_ajax_initial" type="checkbox" id="sb_ajax_initial" <?php if($sb_ajax_initial == true) echo "checked"; ?> />
2329
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2330
- <p class="sbi_tooltip"><?php _e("Initial posts will be loaded using AJAX instead of added to the page directly. If you use page caching, this will allow the feed to update according to the \"Check for new posts every\" setting on the \"Configure\" tab.", 'instagram-feed'); ?></p>
2331
  </td>
2332
  </tr>
2333
 
2334
  <tr>
2335
  <th class="bump-left">
2336
- <label for="sb_instagram_cron" class="bump-left"><?php _e("Force cache to clear on interval", 'instagram-feed'); ?></label>
2337
  </th>
2338
  <td>
2339
  <select name="sb_instagram_cron">
2340
  <option value="unset" <?php if($sb_instagram_cron == "unset") echo 'selected="selected"' ?> > - </option>
2341
- <option value="yes" <?php if($sb_instagram_cron == "yes") echo 'selected="selected"' ?> ><?php _e('Yes', 'instagram-feed'); ?></option>
2342
- <option value="no" <?php if($sb_instagram_cron == "no") echo 'selected="selected"' ?> ><?php _e('No', 'instagram-feed'); ?></option>
2343
  </select>
2344
 
2345
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2346
- <p class="sbi_tooltip"><?php _e("If you're experiencing an issue with the plugin not auto-updating then you can set this to 'Yes' to run a scheduled event behind the scenes which forces the plugin cache to clear on a regular basis and retrieve new data from Instagram.", 'instagram-feed'); ?></p>
2347
  </td>
2348
  </tr>
2349
  </tbody>
@@ -2351,34 +2355,34 @@ function sb_instagram_settings_page() {
2351
  <table class="form-table">
2352
  <tbody>
2353
  <tr>
2354
- <th class="bump-left"><label class="bump-left"><?php _e("Enable Custom Templates", 'instagram-feed'); ?></label></th>
2355
  <td>
2356
  <input name="sb_instagram_custom_template" type="checkbox" id="sb_instagram_custom_template" <?php if($sb_instagram_custom_template == true) echo "checked"; ?> />
2357
- <label for="sb_instagram_custom_template"><?php _e('Yes', 'instagram-feed'); ?></label>
2358
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2359
  <p class="sbi_tooltip"><?php _e("The default HTML for the feed can be replaced with custom templates added to your theme's folder. Enable this setting to use these templates. See <a href=\"https://smashballoon.com/guide-to-creating-custom-templates/\" target=\"_blank\">this guide</a>", 'instagram-feed'); ?></p>
2360
  </td>
2361
  </tr>
2362
  <tr>
2363
- <th class="bump-left"><label class="bump-left"><?php _e("Disable Admin Error Notice", 'instagram-feed'); ?></label></th>
2364
  <td>
2365
  <input name="sb_instagram_disable_admin_notice" type="checkbox" id="sb_instagram_disable_admin_notice" <?php if($sb_instagram_disable_admin_notice == true) echo "checked"; ?> />
2366
- <label for="sb_instagram_disable_admin_notice"><?php _e('Yes', 'instagram-feed'); ?></label>
2367
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2368
- <p class="sbi_tooltip"><?php _e("This will permanently disable the feed error notice that displays in the bottom right corner for admins on the front end of your site.", 'instagram-feed'); ?></p>
2369
  </td>
2370
  </tr>
2371
  <tr>
2372
- <th class="bump-left"><label class="bump-left"><?php _e("Feed Issue Email Report", 'instagram-feed'); ?></label></th>
2373
  <td>
2374
  <input name="sb_instagram_enable_email_report" type="checkbox" id="sb_instagram_enable_email_report" <?php if($sb_instagram_enable_email_report == 'on') echo "checked"; ?> />
2375
- <label for="sb_instagram_enable_email_report"><?php _e('Yes', 'instagram-feed'); ?></label>
2376
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2377
- <p class="sbi_tooltip"><?php _e("Instagram Feed will send a weekly notification email using your site's wp_mail() function if one or more of your feeds is not updating or is not displaying. If you're not receiving the emails in your inbox, you may need to configure an SMTP service using another plugin like WP Mail SMTP.", 'instagram-feed'); ?></p>
2378
 
2379
  <div class="sb_instagram_box" style="display: block;">
2380
  <div class="sb_instagram_box_setting">
2381
- <label><?php _e('Schedule Weekly on', 'instagram-feed'); ?></label><br>
2382
  <?php
2383
  $schedule_options = array(
2384
  array(
@@ -2422,8 +2426,8 @@ function sb_instagram_settings_page() {
2422
  </select>
2423
  </div>
2424
  <div class="sb_instagram_box_setting">
2425
- <label><?php _e('Email Recipients', 'instagram-feed'); ?></label><br><input class="regular-text" type="text" name="sb_instagram_email_notification_addresses" value="<?php echo esc_attr( $sb_instagram_email_notification_addresses ); ?>"><span class="sbi_note"><?php _e('separate multiple emails with commas', 'instagram-feed'); ?></span>
2426
- <br><br><?php _e( 'Emails not working?', 'instagram-feed' ) ?> <a href="https://smashballoon.com/email-report-is-not-in-my-inbox/" target="_blank"><?php _e( 'See our related FAQ', 'instagram-feed' ) ?></a>
2427
  </div>
2428
  </div>
2429
 
@@ -2446,22 +2450,22 @@ function sb_instagram_settings_page() {
2446
  ?>
2447
  <tr>
2448
 
2449
- <th class="bump-left"><label class="bump-left"><?php _e("Enable Usage Tracking", 'instagram-feed'); ?></label></th>
2450
  <td>
2451
  <input name="sbi_usage_tracking_enable" type="checkbox" id="sbi_usage_tracking_enable" <?php if( $sbi_usage_tracking_enable ) echo "checked"; ?> />
2452
- <label for="sbi_usage_tracking_enable"><?php _e('Yes', 'instagram-feed'); ?></label>
2453
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is usage tracking?', 'instagram-feed'); ?></a>
2454
- <p class="sbi_tooltip"><?php _e("Instagram Feed will record information and statistics about your site in order for the team at Smash Balloon to learn more about how our plugins are used. The plugin will never collect any sensitive information like access tokens, email addresses, or user information.", 'instagram-feed'); ?></p>
2455
  </td>
2456
  </tr>
2457
  <?php endif; ?>
2458
 
2459
  <tr valign="top">
2460
- <th><label><?php _e("Manage Data", 'instagram-feed'); ?></label></th>
2461
  <td class="sbi-customize-tab-opt">
2462
  <input id="sbi_clear_platform_data" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Delete all Platform Data' ); ?>" />
2463
- <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 5px;"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2464
- <p class="sbi_tooltip"><?php _e('Warning: Clicking this button will permanently delete all Instagram data, including all connected accounts, cached posts, and stored images.', 'instagram-feed'); ?></p>
2465
  </td>
2466
  </tr>
2467
 
@@ -2483,30 +2487,30 @@ function sb_instagram_settings_page() {
2483
 
2484
  <?php if( $sbi_active_tab == 'display' ) { //Start Display tab ?>
2485
 
2486
- <h3><?php _e('Display your Feed', 'instagram-feed'); ?></h3>
2487
- <p><?php _e("Copy and paste the following shortcode directly into the page, post or widget where you'd like the feed to show up:", 'instagram-feed'); ?></p>
2488
- <input type="text" value="[instagram-feed]" size="16" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed'); ?>" />
2489
 
2490
- <h3 style="padding-top: 10px;"><?php _e( 'Multiple Feeds', 'instagram-feed' ); ?></h3>
2491
- <p><?php _e("If you'd like to display multiple feeds then you can set different settings directly in the shortcode like so:", 'instagram-feed'); ?>
2492
  <code>[instagram-feed num=9 cols=3]</code></p>
2493
- <p><?php _e( 'You can display as many different feeds as you like, on either the same page or on different pages, by just using the shortcode options below. For example:', 'instagram-feed' ); ?><br />
2494
  <code>[instagram-feed]</code><br />
2495
  <code>[instagram-feed num=4 cols=4 showfollow=false]</code><br />
2496
  </p>
2497
- <p><?php _e("See the table below for a full list of available shortcode options:", 'instagram-feed'); ?></p>
2498
 
2499
- <p><span class="sbi_table_key"></span><?php _e('Pro version only', 'instagram-feed'); ?></p>
2500
 
2501
  <table class="sbi_shortcode_table">
2502
  <tbody>
2503
  <tr valign="top">
2504
- <th scope="row"><?php _e('Shortcode option', 'instagram-feed'); ?></th>
2505
- <th scope="row"><?php _e('Description', 'instagram-feed'); ?></th>
2506
- <th scope="row"><?php _e('Example', 'instagram-feed'); ?></th>
2507
  </tr>
2508
 
2509
- <tr class="sbi_table_header"><td colspan=3><?php _e("Configure Options", 'instagram-feed'); ?></td></tr>
2510
  <tr class="sbi_pro">
2511
  <td>type</td>
2512
  <td><?php _e("Display photos from a User ID (user)<br />Display posts from a Hashtag (hashtag)", 'instagram-feed'); ?><br /><?php _e("Display photos that the account was tagged in (tagged)", 'instagram-feed'); ?></td>
@@ -2514,140 +2518,140 @@ function sb_instagram_settings_page() {
2514
  </tr>
2515
  <tr>
2516
  <td>user</td>
2517
- <td><?php _e('Your Instagram User Name. This must be from a connected account on the "Configure" tab.', 'instagram-feed'); ?></td>
2518
  <td><code>[instagram-feed user="smashballoon"]</code></td>
2519
  </tr>
2520
  <tr class="sbi_pro">
2521
  <td>hashtag</td>
2522
- <td><?php _e('Any hashtag. Separate multiple hashtags by commas.', 'instagram-feed'); ?></td>
2523
  <td><code>[instagram-feed hashtag="#awesome"]</code></td>
2524
  </tr>
2525
  <tr class="sbi_pro">
2526
  <td>tagged</td>
2527
- <td><?php _e('Your Instagram User Name. Separate multiple users by commas.', 'instagram-feed'); ?></td>
2528
  <td><code>[instagram-feed tagged="smashballoon"]</code></td>
2529
  </tr>
2530
 
2531
- <tr class="sbi_table_header"><td colspan=3><?php _e("Customize Options", 'instagram-feed'); ?></td></tr>
2532
  <tr>
2533
  <td>width</td>
2534
- <td><?php _e("The width of your feed. Any number.", 'instagram-feed'); ?></td>
2535
  <td><code>[instagram-feed width=50]</code></td>
2536
  </tr>
2537
  <tr>
2538
  <td>widthunit</td>
2539
- <td><?php _e("The unit of the width. 'px' or '%'", 'instagram-feed'); ?></td>
2540
  <td><code>[instagram-feed widthunit=%]</code></td>
2541
  </tr>
2542
  <tr>
2543
  <td>height</td>
2544
- <td><?php _e("The height of your feed. Any number.", 'instagram-feed'); ?></td>
2545
  <td><code>[instagram-feed height=250]</code></td>
2546
  </tr>
2547
  <tr>
2548
  <td>heightunit</td>
2549
- <td><?php _e("The unit of the height. 'px' or '%'", 'instagram-feed'); ?></td>
2550
  <td><code>[instagram-feed heightunit=px]</code></td>
2551
  </tr>
2552
  <tr>
2553
  <td>background</td>
2554
- <td><?php _e("The background color of the feed. Any hex color code.", 'instagram-feed'); ?></td>
2555
  <td><code>[instagram-feed background=#ffff00]</code></td>
2556
  </tr>
2557
  <tr>
2558
  <td>class</td>
2559
- <td><?php _e("Add a CSS class to the feed container", 'instagram-feed'); ?></td>
2560
  <td><code>[instagram-feed class=feedOne]</code></td>
2561
  </tr>
2562
 
2563
- <tr class="sbi_table_header"><td colspan=3><?php _e("Layout Options", 'instagram-feed'); ?></td></tr>
2564
  <tr class="sbi_pro">
2565
  <td>layout</td>
2566
- <td><?php _e("How posts are arranged visually in the feed. There are four layouts: Grid, Carousel Slider, Masonry Grid, or Highlight Grid. Options:", 'instagram-feed' ); ?> 'grid', 'carousel', 'masonry', or 'highlight'</td>
2567
  <td><code>[instagram-feed layout=grid]</code></td>
2568
  </tr>
2569
  <tr>
2570
  <td>num</td>
2571
- <td><?php _e("The number of photos to display initially. Maximum is 33.", 'instagram-feed'); ?></td>
2572
  <td><code>[instagram-feed num=10]</code></td>
2573
  </tr>
2574
  <tr class="sbi_pro">
2575
  <td>nummobile</td>
2576
- <td><?php _e("The number of photos to display initially for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
2577
  <td><code>[instagram-feed nummobile=6]</code></td>
2578
  </tr>
2579
  <tr>
2580
  <td>cols</td>
2581
- <td><?php _e("The number of columns in your feed. 1 - 10.", 'instagram-feed'); ?></td>
2582
  <td><code>[instagram-feed cols=5]</code></td>
2583
  </tr>
2584
  <tr class="sbi_pro">
2585
  <td>colsmobile</td>
2586
- <td><?php _e("The number of columns in your feed for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
2587
  <td><code>[instagram-feed colsmobile=2]</code></td>
2588
  </tr>
2589
  <tr>
2590
  <td>imagepadding</td>
2591
- <td><?php _e("The spacing around your photos", 'instagram-feed'); ?></td>
2592
  <td><code>[instagram-feed imagepadding=10]</code></td>
2593
  </tr>
2594
  <tr>
2595
  <td>imagepaddingunit</td>
2596
- <td><?php _e("The unit of the padding. 'px' or '%'", 'instagram-feed'); ?></td>
2597
  <td><code>[instagram-feed imagepaddingunit=px]</code></td>
2598
  </tr>
2599
 
2600
- <tr class="sbi_table_header"><td colspan=3><?php _e("Carousel Options", 'instagram-feed'); ?></td></tr>
2601
  <tr class="sbi_pro">
2602
  <td>carouselrows</td>
2603
- <td><?php _e("Choose 1 or 2 rows of posts in the carousel", 'instagram-feed'); ?></td>
2604
  <td><code>[instagram-feed carouselrows=1]</code></td>
2605
  </tr>
2606
  <tr class="sbi_pro">
2607
  <td>carouselloop</td>
2608
- <td><?php _e("Infinitely loop through posts or rewind", 'instagram-feed'); ?></td>
2609
  <td><code>[instagram-feed carouselloop=rewind]</code></td>
2610
  </tr>
2611
  <tr class="sbi_pro">
2612
  <td>carouselarrows</td>
2613
- <td><?php _e("Display directional arrows on the carousel", 'instagram-feed'); ?></td>
2614
  <td><code>[instagram-feed carouselarrows=true]</code></td>
2615
  </tr>
2616
  <tr class="sbi_pro">
2617
  <td>carouselpag</td>
2618
- <td><?php _e("Display pagination links below the carousel", 'instagram-feed'); ?></td>
2619
  <td><code>[instagram-feed carouselpag=true]</code></td>
2620
  </tr>
2621
  <tr class="sbi_pro">
2622
  <td>carouselautoplay</td>
2623
- <td><?php _e("Make the carousel autoplay", 'instagram-feed'); ?></td>
2624
  <td><code>[instagram-feed carouselautoplay=true]</code></td>
2625
  </tr>
2626
  <tr class="sbi_pro">
2627
  <td>carouseltime</td>
2628
- <td><?php _e("The interval time between slides for autoplay. Time in miliseconds.", 'instagram-feed'); ?></td>
2629
  <td><code>[instagram-feed carouseltime=8000]</code></td>
2630
  </tr>
2631
 
2632
- <tr class="sbi_table_header"><td colspan=3><?php _e("Highlight Options", 'instagram-feed'); ?></td></tr>
2633
  <tr class="sbi_pro">
2634
  <td>highlighttype</td>
2635
- <td><?php _e("Choose from 3 different ways of highlighting posts including by pattern, hashtag, post id or. Options:", 'instagram-feed'); ?> 'pattern', 'hashtag', 'id'.</td>
2636
  <td><code>[instagram-feed highlighttype=hashtag]</code></td>
2637
  </tr>
2638
  <tr class="sbi_pro">
2639
  <td>highlightpattern</td>
2640
- <td><?php _e("How often a post is highlighted.", 'instagram-feed'); ?></td>
2641
  <td><code>[instagram-feed highlightpattern=7]</code></td>
2642
  </tr>
2643
  <tr class="sbi_pro">
2644
  <td>highlightoffset</td>
2645
- <td><?php _e("When to start the highlight pattern.", 'instagram-feed'); ?></td>
2646
  <td><code>[instagram-feed highlightoffset=3]</code></td>
2647
  </tr>
2648
  <tr class="sbi_pro">
2649
  <td>highlighthashtag</td>
2650
- <td><?php _e("Highlight posts with these hashtags.", 'instagram-feed'); ?></td>
2651
  <td><code>[instagram-feed highlighthashtag=best]</code></td>
2652
  </tr>
2653
 
@@ -2655,203 +2659,203 @@ function sb_instagram_settings_page() {
2655
 
2656
 
2657
 
2658
- <tr class="sbi_table_header"><td colspan=3><?php _e("Photos Options", 'instagram-feed'); ?></td></tr>
2659
  <tr>
2660
  <td>sortby</td>
2661
- <td><?php _e("Sort the posts by Newest to Oldest (none) or Random (random)", 'instagram-feed'); ?></td>
2662
  <td><code>[instagram-feed sortby=random]</code></td>
2663
  </tr>
2664
  <tr>
2665
  <td>imageres</td>
2666
- <td><?php _e("The resolution/size of the photos including full, medium, thumbnail, and auto (based on size of image on page). Options:", 'instagram-feed'); ?> 'auto', full', 'medium' or 'thumb'.</td>
2667
  <td><code>[instagram-feed imageres=full]</code></td>
2668
  </tr>
2669
  <tr class="sbi_pro">
2670
  <td>media</td>
2671
- <td><?php _e("Display all media, only photos, or only videos", 'instagram-feed'); ?></td>
2672
  <td><code>[instagram-feed media=photos]</code></td>
2673
  </tr>
2674
  <tr class="sbi_pro">
2675
  <td>disablelightbox</td>
2676
- <td><?php _e("Whether to disable the photo Lightbox. It is enabled by default.", 'instagram-feed'); ?></td>
2677
  <td><code>[instagram-feed disablelightbox=true]</code></td>
2678
  </tr>
2679
  <tr>
2680
  <td>disablemobile</td>
2681
- <td><?php _e("Disable the mobile layout. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2682
  <td><code>[instagram-feed disablemobile=true]</code></td>
2683
  </tr>
2684
  <tr class="sbi_pro">
2685
  <td>captionlinks</td>
2686
- <td><?php _e("Whether to use urls in captions for the photo's link instead of linking to instagram.com.", 'instagram-feed'); ?></td>
2687
  <td><code>[instagram-feed captionlinks=true]</code></td>
2688
  </tr>
2689
 
2690
- <tr class="sbi_table_header"><td colspan=3><?php _e("Lightbox Comments Options", 'instagram-feed'); ?></td></tr>
2691
  <tr class="sbi_pro">
2692
  <td>lightboxcomments</td>
2693
- <td><?php _e("Whether to show comments in the lightbox for this feed.", 'instagram-feed'); ?></td>
2694
  <td><code>[instagram-feed lightboxcomments=true]</code></td>
2695
  </tr>
2696
  <tr class="sbi_pro">
2697
  <td>numcomments</td>
2698
- <td><?php _e("Number of comments to show starting from the most recent.", 'instagram-feed'); ?></td>
2699
  <td><code>[instagram-feed numcomments=10]</code></td>
2700
  </tr>
2701
 
2702
- <tr class="sbi_table_header"><td colspan=3><?php _e("Photos Hover Style Options", 'instagram-feed'); ?></td></tr>
2703
  <tr class="sbi_pro">
2704
  <td>hovercolor</td>
2705
- <td><?php _e("The background color when hovering over a photo. Any hex color code.", 'instagram-feed'); ?></td>
2706
  <td><code>[instagram-feed hovercolor=#ff0000]</code></td>
2707
  </tr>
2708
  <tr class="sbi_pro">
2709
  <td>hovertextcolor</td>
2710
- <td><?php _e("The text/icon color when hovering over a photo. Any hex color code.", 'instagram-feed'); ?></td>
2711
  <td><code>[instagram-feed hovertextcolor=#fff]</code></td>
2712
  </tr>
2713
  <tr class="sbi_pro">
2714
  <td>hoverdisplay</td>
2715
- <td><?php _e("The info to display when hovering over the photo such as the user name, post date, Instagram icon, location, caption, and like counts. Options:", 'instagram-feed'); ?><br />username, date, instagram, location, caption, likes</td>
2716
  <td><code>[instagram-feed hoverdisplay="date, location, likes"]</code></td>
2717
  </tr>
2718
 
2719
- <tr class="sbi_table_header"><td colspan=3><?php _e("Header Options", 'instagram-feed'); ?></td></tr>
2720
  <tr>
2721
  <td>showheader</td>
2722
- <td><?php _e("Whether to show the feed Header. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2723
  <td><code>[instagram-feed showheader=false]</code></td>
2724
  </tr>
2725
  <tr>
2726
  <td>showbio</td>
2727
- <td><?php _e("Display the bio in the header. Options:", 'instagram-feed'); ?> 'true' or 'false'</td>
2728
  <td><code>[instagram-feed showbio=true]</code></td>
2729
  </tr>
2730
  <tr>
2731
  <td>custombio</td>
2732
- <td><?php _e("Display a custom bio in the header", 'instagram-feed'); ?></td>
2733
  <td><code>[instagram-feed custombio="My custom bio."]</code></td>
2734
  </tr>
2735
  <tr>
2736
  <td>customavatar</td>
2737
- <td><?php _e("Display a custom avatar in the header. Enter the full URL of an image file.", 'instagram-feed'); ?></td>
2738
  <td><code>[instagram-feed customavatar="https://example.com/avatar.jpg"]</code></td>
2739
  </tr>
2740
  <tr>
2741
  <td>headersize</td>
2742
- <td><?php _e("Size of the header including small, medium and large. Options:", 'instagram-feed'); ?> small, medium, or large.</td>
2743
  <td><code>[instagram-feed headersize=medium]</code></td>
2744
  </tr>
2745
  <tr>
2746
  <td>headercolor</td>
2747
- <td><?php _e("The color of the Header text. Any hex color code.", 'instagram-feed'); ?></td>
2748
  <td><code>[instagram-feed headercolor=#333]</code></td>
2749
  </tr>
2750
 
2751
- <tr class="sbi_table_header"><td colspan=3><?php _e("'Load More' Button Options", 'instagram-feed'); ?></td></tr>
2752
  <tr>
2753
  <td>showbutton</td>
2754
- <td><?php _e("Whether to show the 'Load More' button. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2755
  <td><code>[instagram-feed showbutton=false]</code></td>
2756
  </tr>
2757
  <tr>
2758
  <td>buttoncolor</td>
2759
- <td><?php _e("The background color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2760
  <td><code>[instagram-feed buttoncolor=#000]</code></td>
2761
  </tr>
2762
  <tr>
2763
  <td>buttontextcolor</td>
2764
- <td><?php _e("The text color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2765
  <td><code>[instagram-feed buttontextcolor=#fff]</code></td>
2766
  </tr>
2767
  <tr>
2768
  <td>buttontext</td>
2769
- <td><?php _e("The text used for the button.", 'instagram-feed'); ?></td>
2770
  <td><code>[instagram-feed buttontext="Load More Photos"]</code></td>
2771
  </tr>
2772
 
2773
- <tr class="sbi_table_header"><td colspan=3><?php _e("'Follow on Instagram' Button Options", 'instagram-feed'); ?></td></tr>
2774
  <tr>
2775
  <td>showfollow</td>
2776
- <td><?php _e("Whether to show the 'Follow on Instagram' button. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2777
  <td><code>[instagram-feed showfollow=false]</code></td>
2778
  </tr>
2779
  <tr>
2780
  <td>followcolor</td>
2781
- <td><?php _e("The background color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2782
  <td><code>[instagram-feed followcolor=#ff0000]</code></td>
2783
  </tr>
2784
  <tr>
2785
  <td>followtextcolor</td>
2786
- <td><?php _e("The text color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2787
  <td><code>[instagram-feed followtextcolor=#fff]</code></td>
2788
  </tr>
2789
  <tr>
2790
  <td>followtext</td>
2791
- <td><?php _e("The text used for the button.", 'instagram-feed'); ?></td>
2792
  <td><code>[instagram-feed followtext="Follow me"]</code></td>
2793
  </tr>
2794
 
2795
- <tr class="sbi_table_header"><td colspan=3><?php _e("Caption Options", 'instagram-feed'); ?></td></tr>
2796
  <tr class="sbi_pro">
2797
  <td>showcaption</td>
2798
- <td><?php _e("Whether to show the photo caption. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2799
  <td><code>[instagram-feed showcaption=false]</code></td>
2800
  </tr>
2801
  <tr class="sbi_pro">
2802
  <td>captionlength</td>
2803
- <td><?php _e("The number of characters of the caption to display", 'instagram-feed'); ?></td>
2804
  <td><code>[instagram-feed captionlength=50]</code></td>
2805
  </tr>
2806
  <tr class="sbi_pro">
2807
  <td>captioncolor</td>
2808
- <td><?php _e("The text color of the caption. Any hex color code.", 'instagram-feed'); ?></td>
2809
  <td><code>[instagram-feed captioncolor=#000]</code></td>
2810
  </tr>
2811
  <tr class="sbi_pro">
2812
  <td>captionsize</td>
2813
- <td><?php _e("The size of the caption text. Any number.", 'instagram-feed'); ?></td>
2814
  <td><code>[instagram-feed captionsize=24]</code></td>
2815
  </tr>
2816
 
2817
- <tr class="sbi_table_header"><td colspan=3><?php _e("Likes &amp; Comments Options", 'instagram-feed'); ?></td></tr>
2818
  <tr class="sbi_pro">
2819
  <td>showlikes</td>
2820
- <td><?php _e("Whether to show the Likes &amp; Comments. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2821
  <td><code>[instagram-feed showlikes=false]</code></td>
2822
  </tr>
2823
  <tr class="sbi_pro">
2824
  <td>likescolor</td>
2825
- <td><?php _e("The color of the Likes &amp; Comments. Any hex color code.", 'instagram-feed'); ?></td>
2826
  <td><code>[instagram-feed likescolor=#FF0000]</code></td>
2827
  </tr>
2828
  <tr class="sbi_pro">
2829
  <td>likessize</td>
2830
- <td><?php _e("The size of the Likes &amp; Comments. Any number.", 'instagram-feed'); ?></td>
2831
  <td><code>[instagram-feed likessize=14]</code></td>
2832
  </tr>
2833
 
2834
- <tr class="sbi_table_header"><td colspan=3><?php _e("Post Filtering Options", 'instagram-feed'); ?></td></tr>
2835
  <tr class="sbi_pro">
2836
  <td>excludewords</td>
2837
- <td><?php _e("Remove posts which contain certain words or hashtags in the caption.", 'instagram-feed'); ?></td>
2838
  <td><code>[instagram-feed excludewords="bad, words"]</code></td>
2839
  </tr>
2840
  <tr class="sbi_pro">
2841
  <td>includewords</td>
2842
- <td><?php _e("Only display posts which contain certain words or hashtags in the caption.", 'instagram-feed'); ?></td>
2843
  <td><code>[instagram-feed includewords="sunshine"]</code></td>
2844
  </tr>
2845
 
2846
- <tr class="sbi_table_header"><td colspan=3><?php _e("Auto Load More on Scroll", 'instagram-feed'); ?></td></tr>
2847
  <tr class="sbi_pro">
2848
  <td>autoscroll</td>
2849
- <td><?php _e("Load more posts automatically as the user scrolls down the page.", 'instagram-feed'); ?></td>
2850
  <td><code>[instagram-feed autoscroll=true]</code></td>
2851
  </tr>
2852
  <tr class="sbi_pro">
2853
  <td>autoscrolldistance</td>
2854
- <td><?php _e("Distance before the end of feed or page that triggers the loading of more posts.", 'instagram-feed'); ?></td>
2855
  <td><code>[instagram-feed autoscrolldistance=200]</code></td>
2856
  </tr>
2857
 
@@ -2867,19 +2871,19 @@ function sb_instagram_settings_page() {
2867
 
2868
  <div class="sbi_support">
2869
 
2870
- <h3 style="padding-bottom: 10px;"><?php _e("Need help?", 'instagram-feed'); ?></h3>
2871
 
2872
  <p>
2873
  <span class="sbi-support-title"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <a
2874
  href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general"
2875
- target="_blank"><?php _e( 'Setup Directions', 'instagram-feed' ); ?></a></span>
2876
- <?php _e( 'A step-by-step guide on how to setup and use the plugin.', 'instagram-feed' ); ?>
2877
  </p>
2878
 
2879
  <p>
2880
  <span class="sbi-support-title"><i class="fa fa-youtube-play" aria-hidden="true"></i>&nbsp; <a
2881
  href="https://www.youtube.com/embed/q6ZXVU4g970" target="_blank"
2882
- id="sbi-play-support-video"><?php _e( 'Watch a Video', 'instagram-feed' ); ?></a></span>
2883
  <?php _e( "Watch a short video demonstrating how to set up, customize and use the plugin.<br /><b>Please note</b> that the video shows the set up and use of the <b><a href='https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general' target='_blank'>Pro version</a></b> of the plugin, but the process is the same for this free version. The only difference is some of the features available.", 'instagram-feed' ); ?>
2884
 
2885
  <iframe id="sbi-support-video"
@@ -2890,21 +2894,21 @@ function sb_instagram_settings_page() {
2890
  <p>
2891
  <span class="sbi-support-title"><i class="fa fa-question-circle" aria-hidden="true"></i>&nbsp; <a
2892
  href="https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqs"
2893
- target="_blank"><?php _e( 'FAQs and Docs', 'instagram-feed' ); ?></a></span>
2894
- <?php _e( 'View our expansive library of FAQs and documentation to help solve your problem as quickly as possible.', 'instagram-feed' ); ?>
2895
  </p>
2896
 
2897
  <div class="sbi-support-faqs">
2898
 
2899
  <ul>
2900
- <li><b><?php _e( 'FAQs', 'instagram-feed' ); ?></b></li>
2901
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-photos-wont-load/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqsnophotos" target="_blank">My Instagram Feed Won\'t Load</a>', 'instagram-feed' ); ?></li>
2902
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-instagram-access-token-keep-expiring/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqsexpiring" target="_blank">My Access Token Keeps Expiring</a>', 'instagram-feed' ); ?></li>
2903
- <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqs" target="_blank"><?php _e( 'See All', 'instagram-feed' ); ?><i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
2904
  </ul>
2905
 
2906
  <ul>
2907
- <li><b><?php _e("Documentation", 'instagram-feed'); ?></b></li>
2908
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed/free?utm_campaign=instagram-free&utm_source=support&utm_medium=installation" target="_blank">Installation and Configuration</a>', 'instagram-feed' ); ?></li>
2909
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/display-multiple-instagram-feeds/?utm_campaign=instagram-free&utm_source=support&utm_medium=multiple" target="_blank">Displaying multiple feeds</a>', 'instagram-feed' ); ?></li>
2910
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed-faq/customization/?utm_campaign=instagram-free&utm_source=support&utm_medium=customizing" target="_blank">Customizing your Feed</a>', 'instagram-feed' ); ?></li>
@@ -2914,7 +2918,7 @@ function sb_instagram_settings_page() {
2914
  <p>
2915
  <span class="sbi-support-title"><i class="fa fa-envelope" aria-hidden="true"></i>&nbsp; <a
2916
  href="https://smashballoon.com/instagram-feed/support/?utm_campaign=instagram-free&utm_source=support&utm_medium=contact"
2917
- target="_blank"><?php _e( 'Request Support', 'instagram-feed' ); ?></a></span>
2918
  <?php _e( 'Still need help? Submit a ticket and one of our support experts will get back to you as soon as possible.<br /><b>Important:</b> Please include your <b>System Info</b> below with all support requests.', 'instagram-feed' ); ?>
2919
  </p>
2920
  </div>
@@ -3292,7 +3296,7 @@ echo 'oEmbed request test: ' . esc_attr( $message );
3292
 
3293
  <div class="sbi-more-plugins-intro">
3294
  <h3><?php _e( "Here's some more <span>free</span> plugins you might like!", 'instagram-feed' ); ?></h3>
3295
- <p><?php _e( "As you're already using one of our free plugins we thought we'd suggest some others you might like to. Check out our other free plugins below:", 'instagram-feed' ); ?></p>
3296
  </div>
3297
 
3298
  <?php function get_am_plugins() {
@@ -3402,7 +3406,7 @@ echo 'oEmbed request test: ' . esc_attr( $message );
3402
  <div class="actions sbi-clear">
3403
  <div class="status">
3404
  <strong>
3405
- <?php _e( 'Price:', 'instagram-feed' );
3406
  echo ' <span style="color: green;">';
3407
  _e( 'Free', 'instagram-feed' );
3408
  echo '</span>'; ?>
@@ -3424,10 +3428,10 @@ echo 'oEmbed request test: ' . esc_attr( $message );
3424
  if( $has_all_plugins == true ){ ?>
3425
 
3426
  <style type="text/css">.sbi-more-plugins-intro{display:none;}</style>
3427
- <h2><?php _e( 'You already have all of our free plugins. Awesome!', 'instagram-feed' ); ?></h2>
3428
 
3429
- <p><?php _e( 'Thank you so much for using our plugins. We appreciate you trusting us to power your social media feeds.', 'instagram-feed' ); ?></p>
3430
- <p><?php _e( 'If you want to support us in our mission to make bringing social media content to your website both easy and reliable, then consider upgrading to one of our Pro plugins.', 'instagram-feed' ); ?></p>
3431
 
3432
  <div class="sbi-cols-4">
3433
  <?php //Show a list of Pro plugins which aren't currently active ?>
@@ -3454,7 +3458,7 @@ echo 'oEmbed request test: ' . esc_attr( $message );
3454
  <div class="actions sbi-clear">
3455
  <div class="action-button">
3456
  <a href="<?php echo esc_attr( $details['pro']['url'] ); ?>" target="_blank" class="status-go-to-url button button-primary">
3457
- <?php _e( 'Upgrade to Pro', 'instagram-feed' ); ?>
3458
  </a>
3459
  </div>
3460
  </div>
@@ -3550,8 +3554,8 @@ echo 'oEmbed request test: ' . esc_attr( $message );
3550
 
3551
 
3552
  <div class="sbi_quickstart">
3553
- <h3><i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <?php _e('Display your feed', 'instagram-feed'); ?></h3>
3554
- <p><?php _e('Copy and paste this shortcode directly into the page, post or widget where you\'d like to display the feed:', 'instagram-feed'); ?> <input type="text" value="[instagram-feed]" size="15" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p>
3555
  <p><?php _e('Find out how to display <a href="?page=sb-instagram-feed&amp;tab=display">multiple feeds</a>.', 'instagram-feed'); ?></p>
3556
  </div>
3557
 
@@ -3562,7 +3566,7 @@ echo 'oEmbed request test: ' . esc_attr( $message );
3562
  <p class="sbi_plugins_promo dashicons-before dashicons-admin-plugins"> <?php _e('Check out our other free plugins: <a href="https://wordpress.org/plugins/custom-facebook-feed/" target="_blank">Facebook</a>, <a href="https://wordpress.org/plugins/custom-twitter-feeds/" target="_blank">Twitter</a>, and <a href="https://wordpress.org/plugins/feeds-for-youtube/" target="_blank">YouTube</a>.', 'instagram-feed' ); ?></p>
3563
 
3564
  <div class="sbi_share_plugin">
3565
- <h3><?php _e('Like the plugin? Help spread the word!', 'instagram-feed'); ?></h3>
3566
 
3567
  <button id="sbi_admin_show_share_links" class="button secondary" style="margin-bottom: 1px;"><i class="fa fa-share-alt" aria-hidden="true"></i>&nbsp;&nbsp;Share the plugin</button> <div id="sbi_admin_share_links"></div>
3568
  </div>
123
  ?>
124
  <div id="sbi-notice-bar" style="display:none">
125
  <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
126
+ <button type="button" class="dismiss" title="<?php esc_html_e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
127
  </button>
128
  </div>
129
  <?php endif; ?>
130
  <div id="header">
131
+ <h1><?php esc_html_e('Instagram oEmbeds', 'instagram-feed'); ?></h1>
132
  </div>
133
 
134
  <p>
135
  <?php
136
+ esc_html_e( "You can use the Instagram Feed plugin to power your Instagram oEmbeds, both old and new.", 'instagram-feed' );
137
  if ( ! SB_Instagram_Oembed::can_do_oembed() ) {
138
  echo ' ';
139
+ esc_html_e( "Just click the button below and we'll do the rest.", 'instagram-feed' );
140
  }
141
  ?>
142
  </p>
209
  }
210
 
211
  ?>
212
+ <a href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn<?php echo $need_to_connect_class; ?>"><i class="fa fa-instagram"></i> <?php esc_html_e( 'Enable Instagram oEmbeds', 'instagram-feed' ); ?></a>
213
  <div id="sbi_config_info" class="sb_get_token" style="display: none;">
214
  <div class="sbi_config_modal">
215
+ <?php esc_html_e( 'As Instagram is part of Facebook, in order to display Instagram oEmbeds, you must connect to Facebook. Click on the button below to connect', 'instagram-feed' ); ?>
216
 
217
  <p>
218
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn"><?php esc_html_e( 'Connect to Facebook', 'instagram-feed' ); ?></a>
219
  </p>
220
 
221
  <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
223
  </div>
224
  <div class="sbi-oembed-promo sbi-oembed-desc">
225
  <div class="sbi-col">
226
+ <h2><?php esc_html_e("What are oEmbeds?", "instagram-feed"); ?></h2>
227
  <p><?php _e("Anytime you share a link to an Instagram post in WordPress, it is automatically converted into an embedded version of that Instagram post (an \"oEmbed\").</p><p>However, WordPress is discontinuing support for Instagram oEmbeds due to them now requiring an Access Token to work. Don't worry though, we have your back. Just use the button above to connect to Facebook and we'll make sure your Instagram oEmbeds keep working.", "instagram-feed"); ?></p>
228
  </div>
229
 
245
  <?php if ( $show_token_expiration_modal ) : ?>
246
  <div id="sbi_config_info" class="sb_get_token">
247
  <div class="sbi_config_modal">
248
+ <p><strong><?php esc_html_e( 'Heads up!', 'instagram-feed' ); ?></strong><br></p>
249
 
250
  <p>
251
+ <?php esc_html_e( 'Your access token will expire in 60 days. Facebook requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Click the button below for instructions on creating a Facebook page and extending your access token to never expire.', 'instagram-feed' ); ?>
252
  </p>
253
  <p>
254
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" class="sbi-oembed-connect-btn" target="_blank" rel="noopener"><?php esc_html_e( 'How to Create a Facebook Page', 'instagram-feed' ); ?></a>
255
+ &nbsp;&nbsp;<a href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="button button-secondary" style="height: 47px;line-height: 47px;font-size: 14px;padding: 0 21px;"><?php esc_html_e( 'Try Again', 'instagram-feed' ); ?></a>
256
  </p>
257
 
258
  <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
262
  <?php } else {
263
  if ( ! isset( $oembed_token_settings['expiration_date'] ) || (int)$oembed_token_settings['expiration_date'] === 0 || $oembed_token_settings['expiration_date'] > time() ) :
264
  ?>
265
+ <div><p class="sbi-success-message"><?php esc_html_e("The Instagram Feed plugin is now powering your Instagram oEmbeds.", 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php esc_html_e("Disable", 'instagram-feed' ); ?></a></p></div>
266
  <?php
267
  endif;
268
  if ( ! empty( $oembed_token_settings['expiration_date'] )
286
  <?php echo sprintf( __( 'Instagram requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Visit %1sthis link%2s for instructions on extending your access token to never expire.', 'instagram-feed' ), $link_1, $link_2 ); ?>
287
  </p>
288
  <p>
289
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="sbi-oembed-connect-btn"><?php esc_html_e( 'Connect to Facebook and Recheck Access Token', 'instagram-feed' ); ?></a>
290
  </p>
291
  </div>
292
 
294
 
295
  <?php } ?>
296
  <div class="sbi-oembed-promo">
297
+ <h2><?php esc_html_e("Did you know, you can also use this Instagram Feed plugin to easily add Instagram content on your website?", 'instagram-feed'); ?></h2>
298
  <div class="sbi-reasons">
299
+ <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="clock" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-clock fa-w-16 fa-2x"><path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z" class=""></path></svg><span><?php esc_html_e("Save time", 'instagram-feed'); ?></span></div>
300
+ <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-line" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-line fa-w-16 fa-2x"><path fill="currentColor" d="M117.65 277.65c6.25 6.25 16.38 6.25 22.63 0L192 225.94l84.69 84.69c6.25 6.25 16.38 6.25 22.63 0L409.54 200.4l29.49 29.5c15.12 15.12 40.97 4.41 40.97-16.97V112c0-8.84-7.16-16-16-16H363.07c-21.38 0-32.09 25.85-16.97 40.97l29.5 29.49-87.6 87.6-84.69-84.69c-6.25-6.25-16.38-6.25-22.63 0l-74.34 74.34c-6.25 6.25-6.25 16.38 0 22.63l11.31 11.31zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z" class=""></path></svg><span><?php esc_html_e("Increase social engagement", 'instagram-feed'); ?></span></div>
301
+ <div><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-heart fa-w-16 fa-2x"><path fill="currentColor" d="M462.3 62.7c-54.5-46.4-136-38.7-186.6 13.5L256 96.6l-19.7-20.3C195.5 34.1 113.2 8.7 49.7 62.7c-62.8 53.6-66.1 149.8-9.9 207.8l193.5 199.8c6.2 6.4 14.4 9.7 22.6 9.7 8.2 0 16.4-3.2 22.6-9.7L472 270.5c56.4-58 53.1-154.2-9.7-207.8zm-13.1 185.6L256.4 448.1 62.8 248.3c-38.4-39.6-46.4-115.1 7.7-161.2 54.8-46.8 119.2-12.9 142.8 11.5l42.7 44.1 42.7-44.1c23.2-24 88.2-58 142.8-11.5 54 46 46.1 121.5 7.7 161.2z" class=""></path></svg><span><?php esc_html_e("Keep Your Site Looking Fresh.", 'instagram-feed'); ?></span></div>
302
  </div>
303
  <p>
304
  <?php $check_svg = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-check fa-w-16 fa-2x"><path fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg>'; ?>
305
+ <?php echo $check_svg; ?><span><?php esc_html_e("Super simple to set up", 'instagram-feed'); ?></span>
306
+ <?php echo $check_svg; ?><span><?php esc_html_e("Optimized for speed", 'instagram-feed'); ?></span>
307
+ <?php echo $check_svg; ?><span><?php esc_html_e("Completely customizable", 'instagram-feed'); ?></span>
308
+ <?php echo $check_svg; ?><span><?php esc_html_e("SEO friendly", 'instagram-feed'); ?></span>
309
  </p>
310
+ <a href="?page=sb-instagram-feed" class="button button-primary"><?php esc_html_e("Add an Instagram feed now", 'instagram-feed'); ?></a>
311
  </div>
312
 
313
  <?php } ?>
542
  $sb_instagram_user_id[] = sanitize_text_field( $_POST[ 'sb_instagram_user_id' ] );
543
  }
544
  }
545
+ isset($_POST[ 'sb_instagram_preserve_settings' ]) ? $sb_instagram_preserve_settings = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_preserve_settings' ] ) ) : $sb_instagram_preserve_settings = '';
546
+ isset($_POST[ 'sb_instagram_cache_time' ]) ? $sb_instagram_cache_time = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_cache_time' ] ) ) : $sb_instagram_cache_time = '';
547
+ isset($_POST[ 'sb_instagram_cache_time_unit' ]) ? $sb_instagram_cache_time_unit = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_cache_time_unit' ] ) ) : $sb_instagram_cache_time_unit = '';
548
 
549
+ isset($_POST[ 'sbi_caching_type' ]) ? $sbi_caching_type = sanitize_text_field( wp_unslash( $_POST[ 'sbi_caching_type' ] ) ) : $sbi_caching_type = '';
550
+ isset($_POST[ 'sbi_cache_cron_interval' ]) ? $sbi_cache_cron_interval = sanitize_text_field( wp_unslash( $_POST[ 'sbi_cache_cron_interval' ] ) ) : $sbi_cache_cron_interval = '';
551
+ isset($_POST[ 'sbi_cache_cron_time' ]) ? $sbi_cache_cron_time = sanitize_text_field( wp_unslash( $_POST[ 'sbi_cache_cron_time' ] ) ) : $sbi_cache_cron_time = '';
552
+ isset($_POST[ 'sbi_cache_cron_am_pm' ]) ? $sbi_cache_cron_am_pm = sanitize_text_field( wp_unslash( $_POST[ 'sbi_cache_cron_am_pm' ] ) ) : $sbi_cache_cron_am_pm = '';
553
 
554
  $options[ 'sb_instagram_at' ] = $sb_instagram_at;
555
  $options[ 'sb_instagram_user_id' ] = $sb_instagram_user_id;
612
  $sb_instagram_width = $safe_width;
613
 
614
  $sb_instagram_width_unit = sanitize_text_field( $_POST[ 'sb_instagram_width_unit' ] );
615
+ isset($_POST[ 'sb_instagram_feed_width_resp' ]) ? $sb_instagram_feed_width_resp = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_feed_width_resp' ] ) ) : $sb_instagram_feed_width_resp = '';
616
 
617
  //Validate and sanitize height field
618
  $safe_height = intval( sanitize_text_field( $_POST['sb_instagram_height'] ) );
620
  if ( strlen( $safe_height ) > 4 ) $safe_height = substr( $safe_height, 0, 4 );
621
  $sb_instagram_height = $safe_height;
622
 
623
+ $sb_instagram_height_unit = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_height_unit' ] ) );
624
 
625
  //Validate and sanitize number of photos field
626
  $safe_num = intval( sanitize_text_field( $_POST['sb_instagram_num'] ) );
629
  $sb_instagram_num = $safe_num;
630
 
631
  $sb_instagram_cols = sanitize_text_field( $_POST[ 'sb_instagram_cols' ] );
632
+ isset($_POST[ 'sb_instagram_disable_mobile' ]) ? $sb_instagram_disable_mobile = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_disable_mobile' ] ) ) : $sb_instagram_disable_mobile = '';
633
 
634
  //Validate and sanitize padding field
635
  $safe_padding = intval( sanitize_text_field( $_POST['sb_instagram_image_padding'] ) );
637
  if ( strlen( $safe_padding ) > 4 ) $safe_padding = substr( $safe_padding, 0, 4 );
638
  $sb_instagram_image_padding = $safe_padding;
639
 
640
+ $sb_instagram_image_padding_unit = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_image_padding_unit' ] ) );
641
+ $sb_instagram_sort = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_sort' ] ) );
642
+ $sb_instagram_background = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_background' ] ) );
643
+ isset($_POST[ 'sb_instagram_show_btn' ]) ? $sb_instagram_show_btn = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_show_btn' ] ) ) : $sb_instagram_show_btn = '';
644
+ $sb_instagram_btn_background = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_btn_background' ] ) );
645
+ $sb_instagram_btn_text_color = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_btn_text_color' ] ) );
646
+ $sb_instagram_btn_text = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_btn_text' ] ) );
647
+ $sb_instagram_image_res = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_image_res' ] ) );
648
  //Header
649
+ isset($_POST[ 'sb_instagram_show_header' ]) ? $sb_instagram_show_header = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_show_header' ] ) ) : $sb_instagram_show_header = '';
650
+ isset($_POST[ 'sb_instagram_show_bio' ]) ? $sb_instagram_show_bio = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_show_bio' ] ) ) : $sb_instagram_show_bio = '';
651
  if ( function_exists( 'sanitize_textarea_field' ) ) {
652
+ isset($_POST[ 'sb_instagram_custom_bio' ]) ? $sb_instagram_custom_bio = sanitize_textarea_field( wp_unslash( $_POST[ 'sb_instagram_custom_bio' ] ) ) : $sb_instagram_custom_bio = '';
653
  } else {
654
+ isset($_POST[ 'sb_instagram_custom_bio' ]) ? $sb_instagram_custom_bio = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_custom_bio' ] ) ) : $sb_instagram_custom_bio = '';
655
  }
656
+ isset($_POST[ 'sb_instagram_custom_avatar' ]) ? $sb_instagram_custom_avatar = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_custom_avatar' ] ) ) : $sb_instagram_custom_avatar = '';
657
+ if (isset($_POST[ 'sb_instagram_header_size' ]) ) $sb_instagram_header_size = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_header_size' ] ) );
658
 
659
+ $sb_instagram_header_color = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_header_color' ] ) );
660
  //Follow button
661
+ isset($_POST[ 'sb_instagram_show_follow_btn' ]) ? $sb_instagram_show_follow_btn = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_show_follow_btn' ] ) ) : $sb_instagram_show_follow_btn = '';
662
+ $sb_instagram_folow_btn_background = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_folow_btn_background' ] ) );
663
+ $sb_instagram_follow_btn_text_color = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_follow_btn_text_color' ] ) );
664
+ $sb_instagram_follow_btn_text = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_follow_btn_text' ] ) );
665
  //Misc
666
+ if ( preg_match( '#</?\w+#', $_POST[ 'sb_instagram_custom_css' ] ) ) {
667
+ $sb_instagram_custom_css = '';
668
+ } else {
669
+ $sb_instagram_custom_css = $_POST[ 'sb_instagram_custom_css' ];
670
+ }
671
  $sb_instagram_custom_js = $_POST[ 'sb_instagram_custom_js' ];
672
+ isset($_POST[ 'sb_instagram_ajax_theme' ]) ? $sb_instagram_ajax_theme = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_ajax_theme' ] ) ) : $sb_instagram_ajax_theme = '';
673
+ isset($_POST[ 'gdpr' ]) ? $gdpr = sanitize_text_field( wp_unslash( $_POST[ 'gdpr' ] ) ) : $gdpr = '';
674
+ isset($_POST[ 'enqueue_js_in_head' ]) ? $enqueue_js_in_head = sanitize_text_field( wp_unslash( $_POST[ 'enqueue_js_in_head' ] ) ) : $enqueue_js_in_head = '';
675
+ isset($_POST[ 'disable_js_image_loading' ]) ? $disable_js_image_loading = sanitize_text_field( wp_unslash( $_POST[ 'disable_js_image_loading' ] ) ) : $disable_js_image_loading = '';
676
+ isset($_POST[ 'sb_instagram_disable_resize' ]) ? $sb_instagram_disable_resize= sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_disable_resize' ] ) ) : $sb_instagram_disable_resize = '';
677
+ isset($_POST[ 'sb_instagram_favor_local' ]) ? $sb_instagram_favor_local = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_favor_local' ] ) ) : $sb_instagram_favor_local = '';
678
+ isset($_POST[ 'sb_instagram_minnum' ]) ? $sb_instagram_minnum = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_minnum' ] ) ) : $sb_instagram_minnum = '';
679
+
680
+ if (isset($_POST[ 'sb_instagram_cron' ]) ) $sb_instagram_cron = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_cron' ] ) );
681
+ isset($_POST[ 'sb_instagram_backup' ]) ? $sb_instagram_backup = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_backup' ] ) ) : $sb_instagram_backup = '';
682
+ isset($_POST[ 'sb_ajax_initial' ]) ? $sb_ajax_initial = sanitize_text_field( wp_unslash( $_POST[ 'sb_ajax_initial' ] ) ) : $sb_ajax_initial = '';
683
+ isset($_POST[ 'enqueue_css_in_shortcode' ]) ? $enqueue_css_in_shortcode = sanitize_text_field( wp_unslash( $_POST[ 'enqueue_css_in_shortcode' ] ) ) : $enqueue_css_in_shortcode = '';
684
 
685
  $options[ 'sb_instagram_width' ] = $sb_instagram_width;
686
  $options[ 'sb_instagram_width_unit' ] = $sb_instagram_width_unit;
729
  $options['sb_instagram_backup'] = $sb_instagram_backup;
730
  $options['enqueue_css_in_shortcode'] = $enqueue_css_in_shortcode;
731
 
732
+ isset($_POST[ 'sb_instagram_custom_template' ]) ? $sb_instagram_custom_template = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_custom_template' ] ) ) : $sb_instagram_custom_template = '';
733
  $options['custom_template'] = $sb_instagram_custom_template;
734
+ isset($_POST[ 'sb_instagram_disable_admin_notice' ]) ? $sb_instagram_disable_admin_notice = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_disable_admin_notice' ] ) ) : $sb_instagram_disable_admin_notice = '';
735
  $options['disable_admin_notice'] = $sb_instagram_disable_admin_notice;
736
+ isset($_POST[ 'sb_instagram_enable_email_report' ]) ? $sb_instagram_enable_email_report = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_enable_email_report' ] ) ) : $sb_instagram_enable_email_report = '';
737
  $options['enable_email_report'] = $sb_instagram_enable_email_report;
738
+ isset($_POST[ 'sb_instagram_email_notification' ]) ? $sb_instagram_email_notification = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_email_notification' ] ) ) : $sb_instagram_email_notification = '';
739
  $original = $options['email_notification'];
740
  $options['email_notification'] = $sb_instagram_email_notification;
741
+ isset($_POST[ 'sb_instagram_email_notification_addresses' ]) ? $sb_instagram_email_notification_addresses = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_email_notification_addresses' ] ) ) : $sb_instagram_email_notification_addresses = get_option( 'admin_email' );
742
  $options['email_notification_addresses'] = $sb_instagram_email_notification_addresses;
743
 
744
  if ( $original !== $sb_instagram_email_notification && $sb_instagram_enable_email_report === 'on' ){
745
  //Clear the existing cron event
746
  wp_clear_scheduled_hook('sb_instagram_feed_issue_email');
747
 
748
+ $input = sanitize_text_field( wp_unslash( $_POST[ 'sb_instagram_email_notification' ] ) );
749
  $timestamp = strtotime( 'next ' . $input );
750
 
751
  if ( $timestamp - (3600 * 1) < time() ) {
807
  update_option( 'sb_instagram_settings', $options );
808
 
809
  ?>
810
+ <div class="updated"><p><strong><?php esc_html_e( 'Settings saved.', 'instagram-feed' ); ?></strong></p></div>
811
  <?php } ?>
812
 
813
  <?php } //End nonce check ?>
821
  ?>
822
  <div id="sbi-notice-bar" style="display:none">
823
  <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
824
+ <button type="button" class="dismiss" title="<?php esc_html_e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
825
  </button>
826
  </div>
827
  <?php endif; ?>
830
 
831
 
832
  <div id="header">
833
+ <h1><?php esc_html_e( 'Instagram Feed', 'instagram-feed' ); ?></h1>
834
  </div>
835
  <?php
836
  $sb_instagram_type = 'user';
849
 
850
  SBI_Account_Connector::maybe_launch_modals( $sb_instagram_user_id );
851
  if ( isset( $_POST['sbi_connect_username'] ) ) {
852
+ $new_user_name = sanitize_text_field( wp_unslash( $_POST['sbi_connect_username'] ) );
853
+ $new_account_details = json_decode( wp_unslash( $_POST['sbi_account_json'] ), true );
854
  array_map( 'sanitize_text_field', $new_account_details );
855
 
856
  $updated_options = sbi_connect_basic_account( $new_account_details );
881
 
882
  <?php $sbi_active_tab = isset( $_GET[ 'tab' ] ) ? sanitize_text_field( $_GET['tab'] ) : 'configure'; ?>
883
  <h2 class="nav-tab-wrapper">
884
+ <a href="?page=sb-instagram-feed&amp;tab=configure" class="nav-tab <?php echo $sbi_active_tab == 'configure' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( '1. Configure', 'instagram-feed' ); ?></a>
885
+ <a href="?page=sb-instagram-feed&amp;tab=customize" class="nav-tab <?php echo $sbi_active_tab == 'customize' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( '2. Customize', 'instagram-feed' ); ?></a>
886
+ <a href="?page=sb-instagram-feed&amp;tab=display" class="nav-tab <?php echo $sbi_active_tab == 'display' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( '3. Display Your Feed', 'instagram-feed' ); ?></a>
887
+ <a href="?page=sb-instagram-feed&amp;tab=support" class="nav-tab <?php echo $sbi_active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Support', 'instagram-feed' ); ?></a>
888
+ <a href="?page=sb-instagram-feed&amp;tab=more" class="nav-tab <?php echo $sbi_active_tab == 'more' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'More Social Feeds', 'instagram-feed' ); ?>
889
  <?php
890
  $seen_more_plugins_page = get_user_meta(get_current_user_id(), 'seen_more_plugins_page_1', true);
891
  if( !$seen_more_plugins_page ) echo '<span class="sbi-alert-bubble">1</span>';
898
 
899
  <table class="form-table">
900
  <tbody>
901
+ <h3><?php esc_html_e( 'Configure', 'instagram-feed' ); ?></h3>
902
  <?php $sb_admin_email = get_option('admin_email');
903
  $connect_url = 'https://connect.smashballoon.com/auth/ig/?wordpress_user=' . $sb_admin_email . '&state=' . admin_url('admin.php?page=sb-instagram-feed');
904
  ?>
905
  <div id="sbi_config">
906
  <a data-personal-basic-api="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>"
907
  data-new-api="<?php echo esc_attr( $connect_url ); ?>"
908
+ href="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>" class="sbi_admin_btn"><i class="fa fa-user-plus" aria-hidden="true" style="font-size: 20px;"></i>&nbsp; <?php esc_html_e('Connect an Instagram Account', 'instagram-feed' ); ?></a>
909
+ <a href="https://smashballoon.com/instagram-feed/token/" target="_blank" style="position: relative; top: 14px; left: 15px;"><?php esc_html_e('Button not working?', 'instagram-feed'); ?></a>
910
  </div>
911
 
912
  <!-- Old Access Token -->
913
  <input name="sb_instagram_at" id="sb_instagram_at" type="hidden" value="<?php echo esc_attr( $sb_instagram_at ); ?>" size="80" maxlength="100" placeholder="Click button above to get your Access Token" />
914
 
915
  <tr valign="top">
916
+ <th scope="row"><label><?php esc_html_e( 'Instagram Accounts', 'instagram-feed' ); ?></label><span style="font-weight:normal; font-style:italic; font-size: 12px; display: block;"><?php esc_html_e('Use the button above to connect an Instagram account', 'instagram-feed'); ?></span></th>
917
  <td class="sbi_connected_accounts_wrap">
918
  <?php if ( empty( $connected_accounts ) ) : ?>
919
+ <p class="sbi_no_accounts"><?php esc_html_e( 'No Instagram accounts connected. Click the button above to connect an account.', 'instagram-feed' ); ?></p><br />
920
  <?php else:
921
  $doing_account_error_messages = count( $connected_accounts ) > 1;
922
  global $sb_instagram_posts_manager;
963
  <div class="sbi_connected_account<?php echo $is_invalid_class . $updated_or_new_account_class; ?><?php if ( $in_user_feed ) echo ' sbi_account_active' ?> sbi_account_type_<?php echo $account_type; ?>" id="sbi_connected_account_<?php esc_attr_e( $account['user_id'] ); ?>" data-accesstoken="" data-userid="<?php esc_attr_e( $account['user_id'] ); ?>" data-username="<?php esc_attr_e( $account['username'] ); ?>" data-type="<?php esc_attr_e( $account_type ); ?>" data-permissions="<?php if ( $use_tagged ) echo 'tagged'; ?>">
964
  <?php if ( $doing_account_error_messages && $sb_instagram_posts_manager->connected_account_has_error( $account ) ) : ?>
965
  <div class="sbi_deprecated">
966
+ <span><i class="fa fa-exclamation-circle" aria-hidden="true"></i><?php esc_html_e( 'Feeds using this account might not be updating due to an error. Try viewing these feeds after reconnecting the account and saving your settings below.', 'instagram-feed' ); ?></span>
967
  </div>
968
  <?php endif; ?>
969
  <div class="sbi_ca_alert">
970
+ <span><?php esc_html_e( 'The Access Token for this account is expired or invalid. Click the button above to attempt to renew it.', 'instagram-feed' ); ?></span>
971
  </div>
972
  <div class="sbi_ca_info">
973
 
974
  <div class="sbi_ca_delete">
975
+ <a href="<?php echo add_query_arg( 'disconnect', $account['user_id'], get_admin_url( null, 'admin.php?page=sb-instagram-feed' ) ); ?>" class="sbi_delete_account"><i class="fa fa-times"></i><span class="sbi_remove_text"><?php esc_html_e( 'Remove', 'instagram-feed' ); ?></span></a>
976
  </div>
977
 
978
  <div class="sbi_ca_username">
982
 
983
  <div class="sbi_ca_actions">
984
  <?php if ( ! $in_user_feed ) : ?>
985
+ <a href="JavaScript:void(0);" class="sbi_use_in_user_feed button-primary"><i class="fa fa-plus-circle" aria-hidden="true"></i><?php esc_html_e( 'Add to Primary Feed', 'instagram-feed' ); ?></a>
986
  <?php else : ?>
987
+ <a href="JavaScript:void(0);" class="sbi_remove_from_user_feed button-primary"><i class="fa fa-minus-circle" aria-hidden="true"></i><?php esc_html_e( 'Remove from Primary Feed', 'instagram-feed' ); ?></a>
988
  <?php endif; ?>
989
+ <a class="sbi_ca_token_shortcode button-secondary" href="JavaScript:void(0);"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i><?php esc_html_e( 'Add to another Feed', 'instagram-feed' ); ?></a>
990
+ <a class="sbi_ca_show_token button-secondary" href="JavaScript:void(0);" title="<?php esc_html_e('Show access token and account info', 'instagram-feed'); ?>"><i class="fa fa-cog"></i></a>
991
  <?php if ( $is_private ) :
992
  $expires_in = max( 0, floor( ($account['expires_timestamp'] - time()) / DAY_IN_SECONDS ) );
993
  $message = $expires_in > 0 ? sprintf( __( 'Expires in %s days', 'instagram-feed' ), $expires_in ) : __( 'Access Token Expired', 'instagram-feed' );
997
  <span><?php echo esc_html( $message ); ?></span>
998
  <a class="sbi_tooltip_link sbi_tooltip_outside" href="JavaScript:void(0);" style="position: relative; top: 2px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
999
 
1000
+ <a href="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url( 'admin.php?page=sb-instagram-feed' ); ?>" class="button button-secondary"><?php esc_html_e( 'Refresh now', 'instagram-feed' ); ?></a>
1001
  </div>
1002
  <p class="sbi_tooltip sbi-more-info" style="display: none; width: 100%; box-sizing: border-box;"><?php echo sprintf( __( 'This account is a "private" account on Instagram. It needs to be manually reconnected every 60 days. %sChange this account to be "public"%s to have access tokens that are automatically refreshed.', 'instagram-feed' ), '<a href="https://help.instagram.com/116024195217477/In" target="_blank">', '</a>' ); ?></p>
1003
  <?php endif; ?>
1006
 
1007
  <div class="sbi_ca_shortcode">
1008
 
1009
+ <p><?php esc_html_e('Copy and paste this shortcode into your page or widget area', 'instagram-feed'); ?>:<br>
1010
  <?php if ( !empty( $account['username'] ) ) : ?>
1011
  <code>[instagram-feed user="<?php echo $account['username']; ?>"]</code>
1012
  <?php endif; ?>
1013
  </p>
1014
 
1015
+ <p><?php esc_html_e('To add multiple users in the same feed, simply separate them using commas', 'instagram-feed'); ?>:<br>
1016
  <?php if ( !empty( $account['username'] ) ) : ?>
1017
  <code>[instagram-feed user="<?php echo $account['username']; ?>, a_second_user, a_third_user"]</code>
1018
  <?php endif; ?>
1021
  </div>
1022
 
1023
  <div class="sbi_ca_accesstoken">
1024
+ <span class="sbi_ca_token_label"><?php esc_html_e('User ID', 'instagram-feed');?>:</span><input type="text" class="sbi_ca_user_id" value="<?php echo $account['user_id']; ?>" readonly="readonly" onclick="this.focus();this.select()" title="<?php esc_html_e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed');?>"><br>
1025
  </div>
1026
 
1027
  </div>
1030
 
1031
  <?php endforeach; ?>
1032
  <?php endif; ?>
1033
+ <a href="JavaScript:void(0);" class="sbi_manually_connect button-secondary"><?php esc_html_e( 'Manually Connect an Account', 'instagram-feed' ); ?></a>
1034
  <div class="sbi_manually_connect_wrap">
1035
+ <input name="sb_manual_at" id="sb_manual_at" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="64" minlength="15" maxlength="400" placeholder="<?php esc_attr_e( 'Enter a valid Instagram Access Token', 'instagram-feed' ); ?>" /><span class='sbi_business_profile_tag'><?php esc_html_e('Business or Basic Display', 'instagram-feed');?></span>
1036
  <div class="sbi_manual_account_id_toggle">
1037
+ <label><?php esc_html_e('Please enter the User ID for this Profile:', 'instagram-feed');?></label>
1038
  <input name="sb_manual_account_id" id="sb_manual_account_id" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="40" minlength="5" maxlength="100" placeholder="Eg: 15641403491391489" />
1039
  </div>
1040
  <p id="sbi_no_js_warning" class="sbi_nojs_notice"><?php echo sprintf( __('It looks like JavaScript is not working on this page. Some features may not work fully. Visit %sthis page%s for help resolving this issue.', 'instagram-feed'), '<a href="https://smashballoon.com/i-cant-connect-or-manage-accounts-on-the-instagram-feed-settings-page/" target="_blank" rel="noopener">', '</a>' ); ?></p>
1041
+ <p class="sbi_submit" style="display: inline-block;"><input type="submit" name="sbi_submit" id="sbi_manual_submit" class="button button-primary" value="<?php esc_html_e('Connect This Account', 'instagram-feed' );?>"></p>
1042
  </div>
1043
  </td>
1044
  </tr>
1045
 
1046
  <tr valign="top" class="sbi_feed_type">
1047
+ <th scope="row"><label><?php esc_html_e('Select a Feed Type', 'instagram-feed'); ?>:</label><code class="sbi_shortcode"> type
1048
  Eg: type=user user=smashballoon
1049
  </code>
1050
  <?php if ( SB_Instagram_Feed_Locator::count_unique() > 1 ) : ?>
1051
  <div class="sbi_locations_link">
1052
+ <a href="?page=sb-instagram-feed&amp;tab=allfeeds"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="search" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-search fa-w-16 fa-2x"><path fill="currentColor" d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z" class=""></path></svg> <?php esc_html_e('Feed Finder', 'instagram-feed'); ?></a>
1053
  </div>
1054
  <?php endif; ?>
1055
 
1058
  <div class="sbi_row">
1059
  <div class="sbi_col sbi_one">
1060
  <input type="radio" name="sb_instagram_type" id="sb_instagram_type_user" value="user" <?php if($sb_instagram_type == "user") echo "checked"; ?> />
1061
+ <label class="sbi_radio_label" for="sb_instagram_type_user"><?php esc_html_e( 'User Account:', 'instagram-feed' ); ?></label>
1062
  </div>
1063
  <div class="sbi_col sbi_two">
1064
  <div class="sbi_user_feed_ids_wrap">
1078
  </div>
1079
 
1080
  <?php if ( empty( $user_feed_ids ) ) : ?>
1081
+ <p class="sbi_no_accounts" style="margin-top: -3px; margin-right: 10px;"><?php esc_html_e( 'Connect a user account above', 'instagram-feed' ); ?></p>
1082
  <?php endif; ?>
1083
 
1084
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="margin: 5px 0 10px 0; display: inline-block; height: 19px;"><?php esc_html_e("How to display User feeds", 'instagram-feed' ); ?></a>
1085
  <div class="sbi_tooltip"><?php _e("<p><b>Displaying Posts from Your User Account</b><br />Simply connect an account using the button above.</p><p style='padding-top:8px;'><b>Displaying Posts from Other Instagram Accounts</b><br />Due to recent changes in the Instagram API it is no longer possible to display photos from other Instagram accounts which you do not have access to. You can only display the user feed of an account which you connect above. You can connect as many account as you like by logging in using the button above, or manually copy/pasting an Access Token by selecting the 'Manually Connect an Account' option.</p><p style='padding-top:10px;'><b>Multiple Acounts</b><br />It is only possible to display feeds from Instagram accounts which you own. In order to display feeds from multiple accounts, first connect them above and then use the buttons to add the account either to your primary feed or to another feed on your site.</p>", 'instagram-feed'); ?></div><br />
1086
  </div>
1087
 
1090
  <div class="sbi_pro sbi_row">
1091
  <div class="sbi_col sbi_one">
1092
  <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_hashtag" value="hashtag" <?php if($sb_instagram_type == "hashtag") echo "checked"; ?> />
1093
+ <label class="sbi_radio_label" for="sb_instagram_type_hashtag"><?php esc_html_e( 'Hashtag:', 'instagram-feed' ); ?></label>
1094
  </div>
1095
  <div class="sbi_col sbi_two">
1096
 
1097
+ <p class="sbi_pro_tooltip"><?php esc_html_e( 'Upgrade to the Pro version to display Hashtag and Tagged feeds', 'instagram-feed' ); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1098
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=hashtags" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php esc_html_e('Pro', 'instagram-feed'); ?></a>
1099
 
1100
  <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1101
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
1102
 
1103
+ <p class="sbi_tooltip"><?php esc_html_e( 'Display posts from a specific hashtag instead of from a user', 'instagram-feed' ); ?></p>
1104
  </div>
1105
  </div>
1106
 
1107
  <div class="sbi_pro sbi_row">
1108
  <div class="sbi_col sbi_one">
1109
  <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_tagged" value="tagged" <?php if($sb_instagram_type == "tagged") echo "checked"; ?> />
1110
+ <label class="sbi_radio_label" for="sb_instagram_type_tagged"><?php esc_html_e( 'Tagged:', 'instagram-feed' ); ?></label>
1111
  </div>
1112
  <div class="sbi_col sbi_two">
1113
  <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1114
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
1115
 
1116
+ <p class="sbi_tooltip"><?php esc_html_e( 'Display posts that your account has been tagged in.', 'instagram-feed' ); ?></p>
1117
  </div>
1118
  </div>
1119
 
1124
  </div>
1125
  <div class="sbi_col sbi_two">
1126
  <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1127
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
1128
 
1129
  <div class="sbi_tooltip sbi_type_tooltip">
1130
  <p>
1139
 
1140
  <div class="sbi_row sbi_pro">
1141
  <br>
1142
+ <a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);" style="margin-left: 0;"><i class="fa fa-question-circle" aria-hidden="true" style="margin-right: 6px;"></i><?php esc_html_e('Combine multiple feed types into a single feed', 'instagram-feed'); ?></a>
1143
  <p class="sbi_tooltip">
1144
  <b><?php _e( 'Please note: this is only available in the <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=multipletypes" target="_blank">Pro version</a>', 'instagram-feed' ); ?>.</b><br />
1145
  <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add each user name or hashtag of each feed into the shortcode, like so: %s. This will combine a user feed and a hashtag feed into the same feed.', 'instagram-feed'), 'type="mixed"', '<code>[instagram-feed type="mixed" user="smashballoon" hashtag="#awesomeplugins"]</code>' ); ?>
1150
  </tr>
1151
 
1152
  <tr>
1153
+ <th class="bump-left"><label for="sb_instagram_preserve_settings" class="bump-left"><?php esc_html_e("Preserve settings when plugin is removed", 'instagram-feed'); ?></label></th>
1154
  <td>
1155
  <input name="sb_instagram_preserve_settings" type="checkbox" id="sb_instagram_preserve_settings" <?php if($sb_instagram_preserve_settings == true) echo "checked"; ?> />
1156
+ <label for="sb_instagram_preserve_settings"><?php esc_html_e('Yes', 'instagram-feed'); ?></label>
1157
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
1158
+ <p class="sbi_tooltip"><?php esc_html_e('When removing the plugin your settings are automatically erased. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.', 'instagram-feed'); ?></p>
1159
  </td>
1160
  </tr>
1161
 
1162
 
1163
  <tr valign="top" class="sbi_cron_cache_opts">
1164
+ <th scope="row"><?php esc_html_e( 'Check for new posts', 'instagram-feed' ); ?></th>
1165
  <td>
1166
  <div class="sbi_row">
1167
  <input type="radio" name="sbi_caching_type" id="sbi_caching_type_cron" value="background" <?php if ( $sbi_caching_type === 'background' ) echo 'checked'; ?>>
1168
+ <label for="sbi_caching_type_cron"><?php esc_html_e( 'In the background', 'instagram-feed' ); ?></label>
1169
  <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 2px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
1170
+ <p class="sbi_tooltip sbi-more-info"><?php esc_html_e( 'Your Instagram post data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data', 'instagram-feed' ); ?>:<br><br>
1171
  <?php _e( '<b>1. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from Instagram when the page first loads, but then after that will check in the background on the schedule selected - unless the cache is cleared.', 'instagram-feed' ); ?>
1172
  <br><br>
1173
  <?php _e( '<b>2. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check Instagram for new posts the next time that the feed is loaded. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you\'re experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>\'Force cache to clear on interval\'</b> which is located on the \'Customize\' tab.', 'instagram-feed' ) . '</p>'; ?>
1176
  <div class="sbi_row sbi-caching-cron-options" style="display: block;">
1177
 
1178
  <select name="sbi_cache_cron_interval" id="sbi_cache_cron_interval">
1179
+ <option value="30mins" <?php if ( $sbi_cache_cron_interval === '30mins' ) echo 'selected'; ?>><?php esc_html_e( 'Every 30 minutes', 'instagram-feed' ); ?></option>
1180
+ <option value="1hour" <?php if ( $sbi_cache_cron_interval === '1hour' ) echo 'selected'; ?>><?php esc_html_e( 'Every hour', 'instagram-feed' ); ?></option>
1181
+ <option value="12hours" <?php if ( $sbi_cache_cron_interval === '12hours' ) echo 'selected'; ?>><?php esc_html_e( 'Every 12 hours', 'instagram-feed' ); ?></option>
1182
+ <option value="24hours" <?php if ( $sbi_cache_cron_interval === '24hours' ) echo 'selected'; ?>><?php esc_html_e( 'Every 24 hours', 'instagram-feed' ); ?></option>
1183
  </select>
1184
 
1185
  <div id="sbi-caching-time-settings" style="display: none;">
1186
+ <?php esc_html_e('at' ); ?>
1187
 
1188
  <select name="sbi_cache_cron_time" style="width: 80px">
1189
  <option value="1" <?php if ( $sbi_cache_cron_time === '1' ) echo 'selected'; ?>>1:00</option>
1226
  </div>
1227
  <div class="sbi_row">
1228
  <input type="radio" name="sbi_caching_type" id="sbi_caching_type_page" value="page" <?php if ( $sbi_caching_type === 'page' ) echo 'checked'; ?>>
1229
+ <label for="sbi_caching_type_page"><?php esc_html_e( 'When the page loads', 'instagram-feed' ); ?></label>
1230
  </div>
1231
  <div class="sbi_row sbi-caching-page-options" style="display: none;">
1232
+ <?php esc_html_e( 'Every', 'instagram-feed' ); ?>:
1233
  <input name="sb_instagram_cache_time" type="number" value="<?php echo esc_attr( $sb_instagram_cache_time ); ?>" size="4" min="1" max="<?php if ( $sb_instagram_cache_time_unit == "minutes" ) { echo 1440; } else { echo 24; } ?>"/>
1234
  <select name="sb_instagram_cache_time_unit">
1235
+ <option value="minutes" <?php if($sb_instagram_cache_time_unit == "minutes") echo 'selected="selected"' ?>><?php esc_html_e('Minutes', 'instagram-feed'); ?></option>
1236
+ <option value="hours" <?php if($sb_instagram_cache_time_unit == "hours") echo 'selected="selected"' ?> ><?php esc_html_e('Hours', 'instagram-feed'); ?></option>
1237
  </select>
1238
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
1239
+ <p class="sbi_tooltip"><?php esc_html_e('Your Instagram posts are temporarily cached by the plugin in your WordPress database. You can choose how long the posts should be cached for. If you set the time to 1 hour then the plugin will clear the cache after that length of time and check Instagram for posts again. The maximum caching time is 24 hours.', 'instagram-feed'); ?></p>
1240
  </div>
1241
 
1242
  </td>
1264
  <?php if( $sbi_active_tab == 'customize' ) { //Start Configure tab ?>
1265
 
1266
  <p class="sb_instagram_contents_links" id="general">
1267
+ <span><?php esc_html_e( 'Quick links:', 'instagram-feed' ); ?> </span>
1268
+ <a href="#general"><?php esc_html_e( 'General', 'instagram-feed' ); ?></a>
1269
+ <a href="#layout"><?php esc_html_e( 'Layout', 'instagram-feed' ); ?></a>
1270
+ <a href="#photos"><?php esc_html_e( 'Photos', 'instagram-feed' ); ?></a>
1271
+ <a href="#headeroptions"><?php esc_html_e( 'Header', 'instagram-feed' ); ?></a>
1272
+ <a href="#loadmore"><?php esc_html_e( "'Load More' Button", 'instagram-feed' ); ?></a>
1273
+ <a href="#follow"><?php esc_html_e( "'Follow' Button", 'instagram-feed' ); ?></a>
1274
+ <a href="#gdpr"><?php esc_html_e( 'GDPR', 'instagram-feed' ); ?></a>
1275
+ <a href="#customcss"><?php esc_html_e( 'Custom CSS', 'instagram-feed' ); ?></a>
1276
+ <a href="#customjs"><?php esc_html_e( 'Custom JavaScript', 'instagram-feed' ); ?></a>
1277
  </p>
1278
 
1279
  <input type="hidden" name="<?php echo $sb_instagram_customize_hidden_field; ?>" value="Y">
1280
 
1281
+ <h3><?php esc_html_e( 'General', 'instagram-feed' ); ?></h3>
1282
 
1283
  <table class="form-table">
1284
  <tbody>
1285
  <tr valign="top">
1286
+ <th scope="row"><label><?php esc_html_e('Width of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> width widthunit
1287
  Eg: width=50 widthunit=%</code></th>
1288
  <td>
1289
  <input name="sb_instagram_width" type="text" value="<?php echo esc_attr( $sb_instagram_width ); ?>" id="sb_instagram_width" size="4" maxlength="4" />
1290
  <select name="sb_instagram_width_unit" id="sb_instagram_width_unit">
1291
+ <option value="px" <?php if($sb_instagram_width_unit == "px") echo 'selected="selected"' ?> ><?php esc_html_e('px', 'instagram-feed'); ?></option>
1292
+ <option value="%" <?php if($sb_instagram_width_unit == "%") echo 'selected="selected"' ?> ><?php esc_html_e('%', 'instagram-feed'); ?></option>
1293
  </select>
1294
  <div id="sb_instagram_width_options">
1295
+ <input name="sb_instagram_feed_width_resp" type="checkbox" id="sb_instagram_feed_width_resp" <?php if($sb_instagram_feed_width_resp == true) echo "checked"; ?> /><label for="sb_instagram_feed_width_resp"><?php esc_html_e('Set to be 100% width on mobile?', 'instagram-feed'); ?></label>
1296
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
1297
+ <p class="sbi_tooltip"><?php esc_html_e("If you set a width on the feed then this will be used on mobile as well as desktop. Check this setting to set the feed width to be 100% on mobile so that it is responsive.", 'instagram-feed'); ?></p>
1298
  </div>
1299
  </td>
1300
  </tr>
1301
  <tr valign="top">
1302
+ <th scope="row"><label><?php esc_html_e('Height of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> height heightunit
1303
  Eg: height=500 heightunit=px</code></th>
1304
  <td>
1305
  <input name="sb_instagram_height" type="text" value="<?php echo esc_attr( $sb_instagram_height ); ?>" size="4" maxlength="4" />
1306
  <select name="sb_instagram_height_unit">
1307
+ <option value="px" <?php if($sb_instagram_height_unit == "px") echo 'selected="selected"' ?> ><?php esc_html_e('px', 'instagram-feed'); ?></option>
1308
+ <option value="%" <?php if($sb_instagram_height_unit == "%") echo 'selected="selected"' ?> ><?php esc_html_e('%', 'instagram-feed'); ?></option>
1309
  </select>
1310
  </td>
1311
  </tr>
1312
  <tr valign="top">
1313
+ <th scope="row"><label><?php esc_html_e('Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> background
1314
  Eg: background=d89531</code></th>
1315
  <td>
1316
  <input name="sb_instagram_background" type="text" value="<?php echo esc_attr( $sb_instagram_background ); ?>" class="sbi_colorpick" />
1320
  </table>
1321
 
1322
  <hr id="layout" />
1323
+ <h3><?php esc_html_e('Layout', 'instagram-feed'); ?></h3>
1324
 
1325
  <table class="form-table">
1326
  <tbody>
1340
  );
1341
  ?>
1342
  <tr valign="top">
1343
+ <th scope="row" class="sbi_pro"><label title="<?php esc_html_e('Click for shortcode option', 'instagram-feed'); ?>"><?php esc_html_e('Layout Type', 'instagram-feed'); ?></label><br /><span class="sbi_note" style="margin: 5px 0 0 0; font-weight: normal;"><?php esc_html_e('Select a layout to see associated<br />options', 'instagram-feed'); ?></span></th>
1344
  <td>
1345
  <div class="sbi_layouts">
1346
  <?php foreach( $layout_types as $layout_type => $label ) : ?>
1349
  </div>
1350
  <?php endforeach; ?>
1351
 
1352
+ <p class="sbi_pro_tooltip"><?php esc_html_e('Upgrade to the Pro version to unlock these layouts', 'instagram-feed'); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1353
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=layouts" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php esc_html_e('Pro', 'instagram-feed'); ?></a>
1354
 
1355
  </div>
1356
  <div class="sb_layout_options_wrap sbi_pro">
1357
  <a href="JavaScript:void(0);" class="sbi_close_options"><i class="fa fa-close"></i></a>
1358
  <div class="sb_instagram_layout_settings sbi_layout_type_grid">
1359
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('A uniform grid of square-cropped images.', 'instagram-feed'); ?></span>
1360
  </div>
1361
  <div class="sb_instagram_layout_settings sbi_layout_type_masonry">
1362
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('Images in their original aspect ratios with no vertical space between posts.', 'instagram-feed'); ?></span>
1363
  </div>
1364
  <div class="sb_instagram_layout_settings sbi_layout_type_carousel">
1365
  <div class="sb_instagram_layout_setting">
1366
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('Posts are displayed in a slideshow carousel.', 'instagram-feed'); ?></span>
1367
  </div>
1368
  <div class="sb_instagram_layout_setting">
1369
 
1370
+ <label><?php esc_html_e('Number of Rows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselrows
1371
  Eg: carouselrows=2</code>
1372
  <br>
1373
+ <span class="sbi_note" style="margin: -5px 0 -10px 0; display: block;"><?php esc_html_e('Use the "Number of Columns" setting below this section to set how many posts are visible in the carousel at a given time.', 'instagram-feed'); ?></span>
1374
  <br>
1375
  <select name="sb_instagram_carousel_rows" id="sb_instagram_carousel_rows">
1376
  <option value="1">1</option>
1378
  </select>
1379
  </div>
1380
  <div class="sb_instagram_layout_setting">
1381
+ <label><?php esc_html_e('Loop Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselloop
1382
  Eg: carouselloop=rewind
1383
  carouselloop=infinity</code>
1384
  <br>
1385
  <select name="sb_instagram_carousel_loop" id="sb_instagram_carousel_loop">
1386
+ <option value="rewind"><?php esc_html_e('Rewind', 'instagram-feed'); ?></option>
1387
+ <option value="infinity" selected="selected"><?php esc_html_e('Infinity', 'instagram-feed'); ?></option>
1388
  </select>
1389
  </div>
1390
  <div class="sb_instagram_layout_setting">
1391
  <input type="checkbox" name="sb_instagram_carousel_arrows" id="sb_instagram_carousel_arrows" checked="checked">
1392
+ <label><?php esc_html_e('Show Navigation Arrows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselarrows
1393
  Eg: carouselarrows=true</code>
1394
  </div>
1395
  <div class="sb_instagram_layout_setting">
1396
  <input type="checkbox" name="sb_instagram_carousel_pag" id="sb_instagram_carousel_pag">
1397
+ <label><?php esc_html_e('Show Pagination', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselpag
1398
  Eg: carouselpag=true</code>
1399
  </div>
1400
  <div class="sb_instagram_layout_setting">
1401
  <input type="checkbox" name="sb_instagram_carousel_autoplay" id="sb_instagram_carousel_autoplay">
1402
+ <label><?php esc_html_e('Enable Autoplay', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselautoplay
1403
  Eg: carouselautoplay=true</code>
1404
  </div>
1405
  <div class="sb_instagram_layout_setting">
1406
+ <label><?php esc_html_e('Interval Time', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouseltime
1407
  Eg: carouseltime=8000</code>
1408
  <br>
1409
+ <input name="sb_instagram_carousel_interval" type="text" value="5000" size="6"><?php esc_html_e("miliseconds", 'instagram-feed'); ?>
1410
  </div>
1411
  </div>
1412
 
1413
  <div class="sb_instagram_layout_settings sbi_layout_type_highlight">
1414
  <div class="sb_instagram_layout_setting">
1415
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('Masonry style, square-cropped, image only (no captions or likes/comments below image). "Highlighted" posts are twice as large.', 'instagram-feed'); ?></span>
1416
  </div>
1417
  <div class="sb_instagram_layout_setting">
1418
+ <label title="Click for shortcode option"><?php esc_html_e('Highlighting Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlighttype
1419
  Eg: highlighttype=pattern</code>
1420
  <br>
1421
  <select name="sb_instagram_highlight_type" id="sb_instagram_highlight_type">
1422
+ <option value="pattern" selected="selected"><?php esc_html_e('Pattern', 'instagram-feed'); ?></option>
1423
+ <option value="id"><?php esc_html_e('Post ID', 'instagram-feed'); ?></option>
1424
+ <option value="hashtag"><?php esc_html_e('Hashtag', 'instagram-feed'); ?></option>
1425
  </select>
1426
  </div>
1427
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1431
  <input name="sb_instagram_highlight_offset" type="number" min="0" value="0" style="width: 50px;">
1432
  </div>
1433
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1434
+ <label><?php esc_html_e('Pattern', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlightpattern
1435
  Eg: highlightpattern=3</code>
1436
  <br>
1437
+ <span><?php esc_html_e('Highlight every', 'instagram-feed'); ?></span><input name="sb_instagram_highlight_factor" type="number" min="2" value="6" style="width: 50px;"><span><?php esc_html_e('posts', 'instagram-feed'); ?></span>
1438
  </div>
1439
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_hashtag sb_instagram_layout_setting" style="display: none;">
1440
+ <label><?php esc_html_e('Highlight Posts with these Hashtags', 'instagram-feed'); ?></label>
1441
+ <input name="sb_instagram_highlight_hashtag" id="sb_instagram_highlight_hashtag" type="text" size="40" value="#fishing">&nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What is this?', 'instagram-feed'); ?></a>
1442
  <br>
1443
+ <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('Separate multiple hashtags using commas', 'instagram-feed'); ?></span>
1444
 
1445
 
1446
+ <p class="sbi_tooltip"><?php esc_html_e('You can use this setting to highlight posts by a hashtag. Use a specified hashtag in your posts and they will be automatically highlighted in your feed.', 'instagram-feed'); ?></p>
1447
  </div>
1448
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_ids sb_instagram_layout_setting" style="display: none;">
1449
+ <label><?php esc_html_e('Highlight Posts by ID', 'instagram-feed'); ?></label>
1450
  <textarea name="sb_instagram_highlight_ids" id="sb_instagram_highlight_ids" style="width: 100%;" rows="3">sbi_1852317219231323590_3269008872</textarea>
1451
  <br>
1452
+ <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('Separate IDs using commas', 'instagram-feed'); ?></span>
1453
 
1454
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What is this?', 'instagram-feed'); ?></a>
1455
+ <p class="sbi_tooltip"><?php esc_html_e('You can use this setting to highlight posts by their ID. Enable and use "moderation mode", check the box to show post IDs underneath posts, then copy and paste IDs into this text box.', 'instagram-feed'); ?></p>
1456
  </div>
1457
  </div>
1458
 
1460
  </td>
1461
  </tr>
1462
  <tr valign="top">
1463
+ <th scope="row"><label><?php esc_html_e('Number of Photos', 'instagram-feed'); ?></label><code class="sbi_shortcode"> num
1464
  Eg: num=6</code></th>
1465
  <td>
1466
  <input name="sb_instagram_num" type="text" value="<?php echo esc_attr( $sb_instagram_num ); ?>" size="4" maxlength="4" />
1467
+ <span class="sbi_note"><?php esc_html_e('Number of photos to show initially.', 'instagram-feed'); ?></span>
1468
  </td>
1469
  </tr>
1470
  <tr valign="top">
1471
+ <th scope="row"><label><?php esc_html_e('Number of Columns', 'instagram-feed'); ?></label><code class="sbi_shortcode"> cols
1472
  Eg: cols=3</code></th>
1473
  <td>
1474
  <select name="sb_instagram_cols">
1475
+ <option value="1" <?php if($sb_instagram_cols == "1") echo 'selected="selected"' ?> ><?php esc_html_e('1', 'instagram-feed'); ?></option>
1476
+ <option value="2" <?php if($sb_instagram_cols == "2") echo 'selected="selected"' ?> ><?php esc_html_e('2', 'instagram-feed'); ?></option>
1477
+ <option value="3" <?php if($sb_instagram_cols == "3") echo 'selected="selected"' ?> ><?php esc_html_e('3', 'instagram-feed'); ?></option>
1478
+ <option value="4" <?php if($sb_instagram_cols == "4") echo 'selected="selected"' ?> ><?php esc_html_e('4', 'instagram-feed'); ?></option>
1479
+ <option value="5" <?php if($sb_instagram_cols == "5") echo 'selected="selected"' ?> ><?php esc_html_e('5', 'instagram-feed'); ?></option>
1480
+ <option value="6" <?php if($sb_instagram_cols == "6") echo 'selected="selected"' ?> ><?php esc_html_e('6', 'instagram-feed'); ?></option>
1481
+ <option value="7" <?php if($sb_instagram_cols == "7") echo 'selected="selected"' ?> ><?php esc_html_e('7', 'instagram-feed'); ?></option>
1482
+ <option value="8" <?php if($sb_instagram_cols == "8") echo 'selected="selected"' ?> ><?php esc_html_e('8', 'instagram-feed'); ?></option>
1483
+ <option value="9" <?php if($sb_instagram_cols == "9") echo 'selected="selected"' ?> ><?php esc_html_e('9', 'instagram-feed'); ?></option>
1484
+ <option value="10" <?php if($sb_instagram_cols == "10") echo 'selected="selected"' ?> ><?php esc_html_e('10', 'instagram-feed'); ?></option>
1485
  </select>
1486
  </td>
1487
  </tr>
1488
  <tr valign="top">
1489
+ <th scope="row"><label><?php esc_html_e('Padding around Images', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imagepadding imagepaddingunit</code></th>
1490
  <td>
1491
  <input name="sb_instagram_image_padding" type="text" value="<?php echo esc_attr( $sb_instagram_image_padding ); ?>" size="4" maxlength="4" />
1492
  <select name="sb_instagram_image_padding_unit">
1493
+ <option value="px" <?php if($sb_instagram_image_padding_unit == "px") echo 'selected="selected"' ?> ><?php esc_html_e('px', 'instagram-feed'); ?></option>
1494
+ <option value="%" <?php if($sb_instagram_image_padding_unit == "%") echo 'selected="selected"' ?> ><?php esc_html_e('%', 'instagram-feed'); ?></option>
1495
  </select>
1496
  </td>
1497
  </tr>
1498
  <tr valign="top">
1499
+ <th scope="row"><label><?php esc_html_e("Disable mobile layout", 'instagram-feed'); ?></label><code class="sbi_shortcode"> disablemobile
1500
  Eg: disablemobile=true</code></th>
1501
  <td>
1502
  <input type="checkbox" name="sb_instagram_disable_mobile" id="sb_instagram_disable_mobile" <?php if($sb_instagram_disable_mobile == true) echo 'checked="checked"' ?> />
1503
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
1504
+ <p class="sbi_tooltip"><?php esc_html_e("By default on mobile devices the layout automatically changes to use fewer columns. Checking this setting disables the mobile layout.", 'instagram-feed'); ?></p>
1505
  </td>
1506
  </tr>
1507
  </tbody>
1510
  <?php submit_button(); ?>
1511
 
1512
  <hr id="photos" />
1513
+ <h3><?php esc_html_e('Photos', 'instagram-feed'); ?></h3>
1514
 
1515
  <table class="form-table">
1516
  <tbody>
1517
  <tr valign="top">
1518
+ <th scope="row"><label><?php esc_html_e('Sort Photos By', 'instagram-feed'); ?></label><code class="sbi_shortcode"> sortby
1519
  Eg: sortby=random</code></th>
1520
  <td>
1521
  <select name="sb_instagram_sort">
1522
+ <option value="none" <?php if($sb_instagram_sort == "none") echo 'selected="selected"' ?> ><?php esc_html_e('Newest to oldest', 'instagram-feed'); ?></option>
1523
+ <option value="random" <?php if($sb_instagram_sort == "random") echo 'selected="selected"' ?> ><?php esc_html_e('Random', 'instagram-feed'); ?></option>
1524
  </select>
1525
  </td>
1526
  </tr>
1527
  <tr valign="top">
1528
+ <th scope="row"><label><?php esc_html_e('Image Resolution', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imageres
1529
  Eg: imageres=thumb</code></th>
1530
  <td>
1531
 
1532
  <select name="sb_instagram_image_res">
1533
+ <option value="auto" <?php if($sb_instagram_image_res == "auto") echo 'selected="selected"' ?> ><?php esc_html_e('Auto-detect (recommended)', 'instagram-feed'); ?></option>
1534
+ <option value="thumb" <?php if($sb_instagram_image_res == "thumb") echo 'selected="selected"' ?> ><?php esc_html_e('Thumbnail (150x150)', 'instagram-feed'); ?></option>
1535
+ <option value="medium" <?php if($sb_instagram_image_res == "medium") echo 'selected="selected"' ?> ><?php esc_html_e('Medium (320x320)', 'instagram-feed'); ?></option>
1536
+ <option value="full" <?php if($sb_instagram_image_res == "full") echo 'selected="selected"' ?> ><?php esc_html_e('Full size (640x640)', 'instagram-feed'); ?></option>
1537
  </select>
1538
 
1539
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does Auto-detect mean?', 'instagram-feed'); ?></a>
1540
+ <p class="sbi_tooltip"><?php esc_html_e("Auto-detect means that the plugin automatically sets the image resolution based on the size of your feed.", 'instagram-feed'); ?></p>
1541
 
1542
  </td>
1543
  </tr>
1544
  </tbody>
1545
  </table>
1546
 
1547
+ <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e('Show Pro Options', 'instagram-feed'); ?></a></span>
1548
 
1549
  <div class="sbi-pro-options">
1550
  <p class="sbi-upgrade-link">
1551
+ <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general" target="_blank"><?php esc_html_e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1552
  </p>
1553
  <table class="form-table">
1554
  <tbody>
1555
  <tr valign="top" class="sbi_pro">
1556
+ <th scope="row"><label><?php esc_html_e('Media Type to Display','instagram-feed'); ?></label></th>
1557
  <td>
1558
  <select name="sb_instagram_media_type" disabled>
1559
+ <option value="all"><?php esc_html_e('All','instagram-feed'); ?></option>
1560
+ <option value="photos"><?php esc_html_e('Photos only','instagram-feed'); ?></option>
1561
+ <option value="videos"><?php esc_html_e('Videos only','instagram-feed'); ?></option>
1562
  </select>
1563
  </td>
1564
  </tr>
1565
 
1566
  <tr valign="top" class="sbi_pro">
1567
+ <th scope="row"><label><?php esc_html_e("Enable Pop-up Lightbox", 'instagram-feed'); ?></label></th>
1568
  <td>
1569
  <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1570
  </td>
1571
  </tr>
1572
 
1573
  <tr valign="top" class="sbi_pro">
1574
+ <th scope="row"><label><?php esc_html_e("Link Posts to URL in Caption (Shoppable feed)",'instagram-feed'); ?></label></th>
1575
  <td>
1576
  <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1577
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e("What will this do?",'instagram-feed'); ?></a>
1578
  <p class="sbi_tooltip"><?php _e("Checking this box will change the link for each post to any url included in the caption for that Instagram post. The lightbox will be disabled. Visit <a href='https://smashballoon.com/make-a-shoppable-feed?utm_campaign=instagram-free&utm_source=settings&utm_medium=shoppable'>this link</a> to learn how this works.",'instagram-feed'); ?></p>
1579
  </td>
1580
  </tr>
1584
 
1585
 
1586
  <hr />
1587
+ <h3><?php esc_html_e('Photo Hover Style','instagram-feed'); ?></h3>
1588
 
1589
  <p style="padding-bottom: 18px;">
1590
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=photohover" target="_blank"><?php esc_html_e('Upgrade to Pro to enable Photo Hover styles','instagram-feed'); ?></a><br />
1591
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e('Show Pro Options','instagram-feed'); ?></a>
1592
  </p>
1593
 
1594
  <div class="sbi-pro-options" style="margin-top: -15px;">
1595
  <table class="form-table">
1596
  <tbody>
1597
  <tr valign="top" class="sbi_pro">
1598
+ <th scope="row"><label><?php esc_html_e('Hover Background Color', 'instagram-feed'); ?></label></th>
1599
  <td>
1600
  <input name="sb_hover_background" type="text" disabled class="sbi_colorpick" />
1601
  </td>
1602
  </tr>
1603
  <tr valign="top" class="sbi_pro">
1604
+ <th scope="row"><label><?php esc_html_e('Hover Text Color', 'instagram-feed'); ?></label></th>
1605
  <td>
1606
  <input name="sb_hover_text" type="text" disabled class="sbi_colorpick" />
1607
  </td>
1608
  </tr>
1609
  <tr valign="top" class="sbi_pro">
1610
+ <th scope="row"><label><?php esc_html_e('Information to display', 'instagram-feed'); ?></label></th>
1611
  <td>
1612
  <div>
1613
  <input name="sbi_hover_inc_username" type="checkbox" disabled />
1614
+ <label for="sbi_hover_inc_username"><?php esc_html_e('Username', 'instagram-feed'); ?></label>
1615
  </div>
1616
  <div>
1617
  <input name="sbi_hover_inc_icon" type="checkbox" disabled />
1618
+ <label for="sbi_hover_inc_icon"><?php esc_html_e('Expand Icon', 'instagram-feed'); ?></label>
1619
  </div>
1620
  <div>
1621
  <input name="sbi_hover_inc_date" type="checkbox" disabled />
1622
+ <label for="sbi_hover_inc_date"><?php esc_html_e('Date', 'instagram-feed'); ?></label>
1623
  </div>
1624
  <div>
1625
  <input name="sbi_hover_inc_instagram" type="checkbox" disabled />
1626
+ <label for="sbi_hover_inc_instagram"><?php esc_html_e('Instagram Icon/Link', 'instagram-feed'); ?></label>
1627
  </div>
1628
  <div>
1629
  <input name="sbi_hover_inc_location" type="checkbox" disabled />
1630
+ <label for="sbi_hover_inc_location"><?php esc_html_e('Location', 'instagram-feed'); ?></label>
1631
  </div>
1632
  <div>
1633
  <input name="sbi_hover_inc_caption" type="checkbox" disabled />
1634
+ <label for="sbi_hover_inc_caption"><?php esc_html_e('Caption', 'instagram-feed'); ?></label>
1635
  </div>
1636
  <div>
1637
  <input name="sbi_hover_inc_likes" type="checkbox" disabled />
1638
+ <label for="sbi_hover_inc_likes"><?php esc_html_e('Like/Comment Icons', 'instagram-feed'); ?></label>
1639
  </div>
1640
  </td>
1641
  </tr>
1646
 
1647
 
1648
  <hr />
1649
+ <h3><?php esc_html_e( 'Carousel', 'instagram-feed' ); ?></h3>
1650
  <p style="padding-bottom: 18px;">
1651
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=carousel" target="_blank"><?php esc_html_e('Upgrade to Pro to enable Carousels', 'instagram-feed'); ?></a><br />
1652
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e('Show Pro Options', 'instagram-feed'); ?></a>
1653
  </p>
1654
 
1655
  <div class="sbi-pro-options" style="margin-top: -15px;">
1656
  <table class="form-table">
1657
  <tbody>
1658
  <tr valign="top" class="sbi_pro">
1659
+ <th scope="row"><label><?php esc_html_e("Enable Carousel", 'instagram-feed'); ?></label></th>
1660
  <td>
1661
  <input type="checkbox" disabled />
1662
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e("What is this?", 'instagram-feed'); ?></a>
1663
+ <p class="sbi_tooltip"><?php esc_html_e("Enable this setting to create a carousel slider out of your photos.", 'instagram-feed'); ?></p>
1664
  </td>
1665
  </tr>
1666
  <tr valign="top" class="sbi_pro">
1667
+ <th scope="row"><label><?php esc_html_e("Show Navigation Arrows", 'instagram-feed'); ?></label></th>
1668
  <td>
1669
  <input type="checkbox" disabled />
1670
  </td>
1671
  </tr>
1672
  <tr valign="top" class="sbi_pro">
1673
+ <th scope="row"><label><?php esc_html_e("Show Pagination", 'instagram-feed'); ?></label></th>
1674
  <td>
1675
  <input type="checkbox" disabled />
1676
  </td>
1677
  </tr>
1678
  <tr valign="top" class="sbi_pro">
1679
+ <th scope="row"><label><?php esc_html_e("Enable Autoplay", 'instagram-feed'); ?></label></th>
1680
  <td>
1681
  <input type="checkbox" disabled />
1682
  </td>
1683
  </tr>
1684
  <tr valign="top" class="sbi_pro">
1685
+ <th scope="row"><label><?php esc_html_e("Interval Time", 'instagram-feed'); ?></label></th>
1686
  <td>
1687
+ <input name="sb_instagram_carousel_interval" type="text" disabled size="6" /><?php esc_html_e("milliseconds", 'instagram-feed'); ?>
1688
  </td>
1689
  </tr>
1690
  </tbody>
1694
 
1695
 
1696
  <hr id="headeroptions" />
1697
+ <h3><?php esc_html_e("Header", 'instagram-feed'); ?></h3>
1698
  <table class="form-table">
1699
  <tbody>
1700
  <tr valign="top">
1701
+ <th scope="row"><label><?php esc_html_e("Show Feed Header", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showheader
1702
  Eg: showheader=false</code></th>
1703
  <td>
1704
  <input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header" <?php if($sb_instagram_show_header == true) echo 'checked="checked"' ?> />
1705
  </td>
1706
  </tr>
1707
  <tr valign="top">
1708
+ <th scope="row"><label><?php esc_html_e('Header Size', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headersize
1709
  Eg: headersize=medium</code></th>
1710
  <td>
1711
  <select name="sb_instagram_header_size" id="sb_instagram_header_size" style="float: left;">
1712
+ <option value="small" <?php if($sb_instagram_header_size == "small") echo 'selected="selected"' ?> ><?php esc_html_e('Small', 'instagram-feed'); ?></option>
1713
+ <option value="medium" <?php if($sb_instagram_header_size == "medium") echo 'selected="selected"' ?> ><?php esc_html_e('Medium', 'instagram-feed'); ?></option>
1714
+ <option value="large" <?php if($sb_instagram_header_size == "large") echo 'selected="selected"' ?> ><?php esc_html_e('Large', 'instagram-feed'); ?></option>
1715
  </select>
1716
  </td>
1717
  </tr>
1718
  <tr valign="top">
1719
+ <th scope="row"><label><?php esc_html_e("Show Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbio
1720
  Eg: showbio=false</code></th>
1721
  <td>
1722
  <?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
1723
  <input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio" <?php if($sb_instagram_show_bio == true) echo 'checked="checked"' ?> />
1724
+ <span class="sbi_note"><?php esc_html_e("Only applies for Instagram accounts with bios", 'instagram-feed'); ?></span>
1725
  <div class="sb_instagram_box" style="display: block;">
1726
  <div class="sb_instagram_box_setting" style="display: block;">
1727
+ <label style="padding-bottom: 0;"><?php esc_html_e("Add Custom Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode" style="margin-top: 5px;"> custombio
1728
  Eg: custombio="My custom bio."</code>
1729
  <br>
1730
+ <span class="sbi_aside" style="padding-bottom: 5px; display: block;"><?php esc_html_e("Use your own custom bio text in the feed header. Bio text is automatically retrieved from Instagram for Business accounts.", 'instagram-feed'); ?></span>
1731
 
1732
+ <textarea type="text" name="sb_instagram_custom_bio" id="sb_instagram_custom_bio" ><?php echo esc_textarea( wp_unslash( $sb_instagram_custom_bio ) ); ?></textarea>
1733
+ &nbsp;<a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php esc_html_e("Why is my bio not displaying automatically?", 'instagram-feed'); ?></a>
1734
  <p class="sbi_tooltip" style="padding: 10px 0 0 0; width: 99%;"><?php echo sprintf( __("Instagram is deprecating their old API for Personal accounts on June 1, 2020. The plugin supports their new API, however, their new API does not yet include the bio text for Personal accounts. If you require this feature then it is available if you convert your Instagram account from a Personal to a Business account by following %s. Note: If you previously had a Personal account connected then the plugin has saved the avatar for that feed and will continue to use it automatically.", 'instagram-feed'), '<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">these directions</a>' ); ?></p>
1735
  </div>
1736
  </div>
1739
  </tr>
1740
 
1741
  <tr valign="top">
1742
+ <th scope="row"><label><?php esc_html_e("Use Custom Avatar", 'instagram-feed'); ?></label><code class="sbi_shortcode"> customavatar
1743
  Eg: customavatar="https://my-website.com/avatar.jpg"</code></th>
1744
  <td>
1745
+ <input type="text" name="sb_instagram_custom_avatar" class="large-text" id="sb_instagram_custom_avatar" value="<?php echo esc_attr( wp_unslash( $sb_instagram_custom_avatar ) ); ?>" placeholder="https://example.com/avatar.jpg" />
1746
+ <span class="sbi_aside"><?php esc_html_e("Avatar is automatically retrieved from Instagram for Business accounts", 'instagram-feed'); ?></span>
1747
  <br>
1748
+ <a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php esc_html_e("Why is my avatar not displaying automatically?", 'instagram-feed'); ?></a>
1749
 
1750
  <p class="sbi_tooltip sbi_tooltip_under_text" style="padding: 10px 0 0 0;"><?php echo sprintf( __("Instagram is deprecating their old API for Personal accounts on June 1, 2020. The plugin supports their new API, however, their new API does not yet include the avatar image for Personal accounts. If you require this feature then it is available if you convert your Instagram account from a Personal to a Business account by following %s. Note: If you previously had a Personal account connected then the plugin has saved the bio text for that feed and will continue to use it automatically.", 'instagram-feed'), '<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">these directions</a>' ); ?></p>
1751
 
1752
  </td>
1753
  </tr>
1754
  <tr valign="top">
1755
+ <th scope="row"><label><?php esc_html_e('Header Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headercolor
1756
  Eg: headercolor=fff</code></th>
1757
  <td>
1758
  <input name="sb_instagram_header_color" type="text" value="<?php echo esc_attr( $sb_instagram_header_color ); ?>" class="sbi_colorpick" />
1761
  </tbody>
1762
  </table>
1763
 
1764
+ <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e('Show Pro Options', 'instagram-feed'); ?></a></span>
1765
 
1766
  <div class="sbi-pro-options">
1767
  <p class="sbi-upgrade-link">
1768
+ <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=header" target="_blank"><?php esc_html_e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1769
  </p>
1770
  <table class="form-table">
1771
  <tbody>
1772
  <tr valign="top" class="sbi_pro">
1773
+ <th scope="row"><label><?php esc_html_e('Header Style','instagram-feed'); ?></label></th>
1774
  <td>
1775
  <select name="sb_instagram_header_style" style="float: left;">
1776
+ <option value="circle"><?php esc_html_e('Standard','instagram-feed'); ?></option>
1777
+ <option value="boxed"><?php esc_html_e('Boxed','instagram-feed'); ?></option>
1778
+ <option value="centered"><?php esc_html_e('Centered','instagram-feed'); ?></option>
1779
  </select>
1780
  </td>
1781
  </tr>
1782
  <tr valign="top" class="sbi_pro">
1783
+ <th scope="row"><label><?php esc_html_e("Show Number of Followers",'instagram-feed'); ?></label></th>
1784
  <td>
1785
  <input type="checkbox" disabled />
1786
+ <span class="sbi_note"><?php esc_html_e("This only applies when displaying photos from a User ID",'instagram-feed'); ?></span>
1787
  </td>
1788
  </tr>
1789
  </tbody>
1794
 
1795
 
1796
  <hr />
1797
+ <h3><?php esc_html_e("Caption", 'instagram-feed'); ?></h3>
1798
  <p style="padding-bottom: 18px;">
1799
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=caption" target="_blank"><?php esc_html_e("Upgrade to Pro to enable Photo Captions", 'instagram-feed'); ?></a><br />
1800
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e("Show Pro Options", 'instagram-feed'); ?></a>
1801
  </p>
1802
 
1803
  <div class="sbi-pro-options" style="margin-top: -15px;">
1804
  <table class="form-table">
1805
  <tbody>
1806
  <tr valign="top" class="sbi_pro">
1807
+ <th scope="row"><label><?php esc_html_e("Show Caption", 'instagram-feed'); ?></label></th>
1808
  <td>
1809
  <input type="checkbox" disabled />
1810
  </td>
1811
  </tr>
1812
  <tr valign="top" class="sbi_pro">
1813
+ <th scope="row"><label><?php esc_html_e("Maximum Text Length", 'instagram-feed'); ?></label></th>
1814
  <td>
1815
  <input disabled size="4" />Characters
1816
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e("What is this?", 'instagram-feed'); ?></a>
1817
+ <p class="sbi_tooltip"><?php esc_html_e("The number of characters of text to display in the caption. An elipsis link will be added to allow the user to reveal more text if desired.", 'instagram-feed'); ?></p>
1818
  </td>
1819
  </tr>
1820
  <tr valign="top" class="sbi_pro">
1821
+ <th scope="row"><label><?php esc_html_e('Text Color', 'instagram-feed'); ?></label></th>
1822
  <td>
1823
  <input type="text" disabled class="sbi_colorpick" />
1824
  </td>
1825
  </tr>
1826
  <tr valign="top" class="sbi_pro">
1827
+ <th scope="row"><label><?php esc_html_e('Text Size', 'instagram-feed'); ?></label></th>
1828
  <td>
1829
  <select name="sb_instagram_caption_size" style="width: 180px;" disabled>
1830
+ <option value="inherit" ><?php esc_html_e('Inherit from theme', 'instagram-feed'); ?></option>
1831
  <option value="10" >10px</option>
1832
  <option value="11" >11px</option>
1833
  <option value="12" >12px</option>
1850
 
1851
 
1852
  <hr />
1853
+ <h3><?php esc_html_e("Likes &amp; Comments", 'instagram-feed'); ?></h3>
1854
  <p style="padding-bottom: 18px;">
1855
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=stats" target="_blank"><?php esc_html_e("Upgrade to Pro to enable Likes &amp; Comments", 'instagram-feed'); ?></a><br />
1856
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e("Show Pro Options", 'instagram-feed'); ?></a>
1857
  </p>
1858
 
1859
  <div class="sbi-pro-options" style="margin-top: -15px;">
1860
  <table class="form-table">
1861
  <tbody>
1862
  <tr valign="top" class="sbi_pro">
1863
+ <th scope="row"><label><?php esc_html_e("Show Icons", 'instagram-feed'); ?></label></th>
1864
  <td>
1865
  <input type="checkbox" disabled />
1866
  </td>
1867
  </tr>
1868
  <tr valign="top" class="sbi_pro">
1869
+ <th scope="row"><label><?php esc_html_e('Icon Color', 'instagram-feed'); ?></label></th>
1870
  <td>
1871
  <input type="text" disabled class="sbi_colorpick" />
1872
  </td>
1873
  </tr>
1874
  <tr valign="top" class="sbi_pro">
1875
+ <th scope="row"><label><?php esc_html_e('Icon Size', 'instagram-feed'); ?></label></th>
1876
  <td>
1877
  <select disabled name="sb_instagram_meta_size" style="width: 180px;">
1878
+ <option value="inherit"><?php esc_html_e('Inherit from theme', 'instagram-feed'); ?></option>
1879
  <option value="10" >10px</option>
1880
  <option value="11" >11px</option>
1881
  <option value="12" >12px</option>
1898
 
1899
 
1900
  <hr />
1901
+ <h3><?php esc_html_e('Lightbox Comments', 'instagram-feed'); ?></h3>
1902
 
1903
  <p style="padding-bottom: 18px;">
1904
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=comments" target="_blank"><?php esc_html_e('Upgrade to Pro to enable Comments', 'instagram-feed'); ?></a><br />
1905
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e('Show Pro Options', 'instagram-feed'); ?></a>
1906
  </p>
1907
 
1908
  <div class="sbi-pro-options" style="margin-top: -15px;">
1910
  <tbody>
1911
 
1912
  <tr valign="top" class="sbi_pro">
1913
+ <th scope="row"><label><?php esc_html_e('Show Comments in Lightbox', 'instagram-feed'); ?></label></th>
1914
  <td style="padding: 5px 10px 0 10px;">
1915
  <input type="checkbox" disabled style="margin-right: 15px;" />
1916
+ <input class="button-secondary" style="margin-top: -5px;" disabled value="<?php esc_attr_e( 'Clear Comment Cache', 'instagram-feed' ); ?>" />
1917
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e("What is this?", 'instagram-feed'); ?></a>
1918
+ <p class="sbi_tooltip"><?php esc_html_e("This will remove the cached comments saved in the database", 'instagram-feed'); ?></p>
1919
  </td>
1920
  </tr>
1921
  <tr valign="top" class="sbi_pro">
1922
+ <th scope="row"><label><?php esc_html_e('Number of Comments', 'instagram-feed'); ?></label></th>
1923
  <td>
1924
  <input name="sb_instagram_num_comments" type="text" disabled size="4" />
1925
+ <span class="sbi_note"><?php esc_html_e('Max number of latest comments.', 'instagram-feed'); ?></span>
1926
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e("What is this?", 'instagram-feed'); ?></a>
1927
+ <p class="sbi_tooltip"><?php esc_html_e("This is the maximum number of comments that will be shown in the lightbox. If there are more comments available than the number set, only the latest comments will be shown", 'instagram-feed'); ?></p>
1928
  </td>
1929
  </tr>
1930
 
1934
 
1935
 
1936
  <hr id="loadmore" />
1937
+ <h3><?php esc_html_e("'Load More' Button", 'instagram-feed'); ?></h3>
1938
  <table class="form-table">
1939
  <tbody>
1940
  <tr valign="top">
1941
+ <th scope="row"><label><?php esc_html_e("Show the 'Load More' button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbutton
1942
  Eg: showbutton=false</code></th>
1943
  <td>
1944
  <input type="checkbox" name="sb_instagram_show_btn" id="sb_instagram_show_btn" <?php if($sb_instagram_show_btn == true) echo 'checked="checked"' ?> />
1945
  </td>
1946
  </tr>
1947
  <tr valign="top">
1948
+ <th scope="row"><label><?php esc_html_e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttoncolor
1949
  Eg: buttoncolor=8224e3</code></th>
1950
  <td>
1951
  <input name="sb_instagram_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_btn_background ); ?>" class="sbi_colorpick" />
1952
  </td>
1953
  </tr>
1954
  <tr valign="top">
1955
+ <th scope="row"><label><?php esc_html_e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontextcolor
1956
  Eg: buttontextcolor=eeee22</code></th>
1957
  <td>
1958
  <input name="sb_instagram_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_btn_text_color ); ?>" class="sbi_colorpick" />
1959
  </td>
1960
  </tr>
1961
  <tr valign="top">
1962
+ <th scope="row"><label><?php esc_html_e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontext
1963
  Eg: buttontext="Show more.."</code></th>
1964
  <td>
1965
+ <input name="sb_instagram_btn_text" type="text" value="<?php echo esc_attr( wp_unslash( $sb_instagram_btn_text ) ); ?>" size="20" />
1966
  </td>
1967
  </tr>
1968
  </tbody>
1971
  <?php submit_button(); ?>
1972
 
1973
  <hr id="follow" />
1974
+ <h3><?php esc_html_e("'Follow' Button", 'instagram-feed'); ?></h3>
1975
  <table class="form-table">
1976
  <tbody>
1977
  <tr valign="top">
1978
+ <th scope="row"><label><?php esc_html_e("Show the Follow button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showfollow
1979
  Eg: showfollow=true</code></th>
1980
  <td>
1981
  <input type="checkbox" name="sb_instagram_show_follow_btn" id="sb_instagram_show_follow_btn" <?php if($sb_instagram_show_follow_btn == true) echo 'checked="checked"' ?> />
1983
  </tr>
1984
 
1985
  <tr valign="top">
1986
+ <th scope="row"><label><?php esc_html_e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followcolor
1987
  Eg: followcolor=28a1bf</code></th>
1988
  <td>
1989
  <input name="sb_instagram_folow_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_folow_btn_background ); ?>" class="sbi_colorpick" />
1990
  </td>
1991
  </tr>
1992
  <tr valign="top">
1993
+ <th scope="row"><label><?php esc_html_e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtextcolor
1994
  Eg: followtextcolor=000</code></th>
1995
  <td>
1996
  <input name="sb_instagram_follow_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_follow_btn_text_color ); ?>" class="sbi_colorpick" />
1997
  </td>
1998
  </tr>
1999
  <tr valign="top">
2000
+ <th scope="row"><label><?php esc_html_e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtext
2001
  Eg: followtext="Follow me"</code></th>
2002
  <td>
2003
+ <input name="sb_instagram_follow_btn_text" type="text" value="<?php echo esc_attr( wp_unslash( $sb_instagram_follow_btn_text ) ); ?>" size="30" />
2004
  </td>
2005
  </tr>
2006
  </tbody>
2007
  </table>
2008
 
2009
  <hr id="filtering" />
2010
+ <h3><?php esc_html_e('Post Filtering', 'instagram-feed'); ?></h3>
2011
 
2012
  <p style="padding-bottom: 18px;">
2013
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=filtering" target="_blank"><?php esc_html_e('Upgrade to Pro to enable Post Filtering options', 'instagram-feed'); ?></a><br />
2014
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e('Show Pro Options', 'instagram-feed'); ?></a>
2015
  </p>
2016
 
2017
  <div class="sbi-pro-options" style="margin-top: -15px;">
2019
  <table class="form-table">
2020
  <tbody>
2021
  <tr valign="top" class="sbi_pro">
2022
+ <th scope="row"><label><?php esc_html_e('Remove photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
2023
  <td>
2024
  <div class="sb_instagram_apply_labels">
2025
+ <p><?php esc_html_e('Apply to:', 'instagram-feed'); ?></p>
2026
+ <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php esc_html_e('All feeds', 'instagram-feed'); ?></label>
2027
+ <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php esc_html_e('One feed', 'instagram-feed'); ?></label>
2028
  </div>
2029
 
2030
  <input disabled name="sb_instagram_exclude_words" id="sb_instagram_exclude_words" type="text" style="width: 70%;" value="" />
2031
  <br />
2032
+ <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('Separate words/hashtags using commas', 'instagram-feed'); ?></span>
2033
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed'); ?></a>
2034
+ <p class="sbi_tooltip"><?php esc_html_e("You can use this setting to remove photos which contain certain words or hashtags in the caption. Separate multiple words or hashtags using commas.", 'instagram-feed'); ?></p>
2035
  </td>
2036
  </tr>
2037
 
2038
  <tr valign="top" class="sbi_pro">
2039
+ <th scope="row"><label><?php esc_html_e('Show photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
2040
  <td>
2041
  <div class="sb_instagram_apply_labels">
2042
+ <p><?php esc_html_e('Apply to:', 'instagram-feed'); ?></p>
2043
+ <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php esc_html_e('All feeds', 'instagram-feed'); ?></label>
2044
+ <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php esc_html_e('One feed', 'instagram-feed'); ?></label>
2045
  </div>
2046
 
2047
  <input disabled name="sb_instagram_include_words" id="sb_instagram_include_words" type="text" style="width: 70%;" value="" />
2048
  <br />
2049
+ <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('Separate words/hashtags using commas', 'instagram-feed'); ?></span>
2050
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed'); ?></a>
2051
  <p class="sbi_tooltip"><?php _e("You can use this setting to only show photos which contain certain words or hashtags in the caption. For example, adding <code>sheep, cow, dog</code> will show any photos which contain either the word sheep, cow, or dog. Separate multiple words or hashtags using commas.", 'instagram-feed'); ?></p>
2052
  </td>
2053
  </tr>
2057
 
2058
 
2059
  <hr id="moderation" />
2060
+ <h3><?php esc_html_e('Moderation', 'instagram-feed'); ?></h3>
2061
 
2062
  <p style="padding-bottom: 18px;">
2063
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=moderation" target="_blank"><?php esc_html_e('Upgrade to Pro to enable Moderation options', 'instagram-feed'); ?></a><br />
2064
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php esc_html_e('Show Pro Options', 'instagram-feed'); ?></a>
2065
  </p>
2066
 
2067
  <div class="sbi-pro-options" style="margin-top: -15px;">
2068
  <table class="form-table">
2069
  <tbody>
2070
  <tr valign="top" class="sbi_pro">
2071
+ <th scope="row"><label><?php esc_html_e('Moderation Type', 'instagram-feed'); ?></label></th>
2072
  <td>
2073
+ <input class="sb_instagram_moderation_mode" checked="checked" disabled type="radio" value="visual" style="margin-top: 0;" /><label><?php esc_html_e('Visual', 'instagram-feed'); ?></label>
2074
+ <input class="sb_instagram_moderation_mode" disabled type="radio" value="manual" style="margin-top: 0; margin-left: 10px;"/><label><?php esc_html_e('Manual', 'instagram-feed'); ?></label>
2075
 
2076
  <p class="sbi_tooltip" style="display: block;"><?php _e("<b>Visual Moderation Mode</b><br />This adds a button to each feed that will allow you to hide posts, block users, and create white lists from the front end using a visual interface. Visit <a href='https://smashballoon.com/guide-to-moderation-mode/?utm_campaign=instagram-free&utm_source=settings&utm_medium=moderationmode' target='_blank'>this page</a> for details", 'instagram-feed'); ?></p>
2077
 
2079
  </tr>
2080
 
2081
  <tr valign="top" class="sbi_pro">
2082
+ <th scope="row"><label><?php esc_html_e('Only show posts by these users', 'instagram-feed'); ?></label></th>
2083
  <td>
2084
  <input type="text" style="width: 70%;" disabled /><br />
2085
+ <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e('Separate usernames using commas', 'instagram-feed'); ?></span>
2086
 
2087
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e("What is this?", 'instagram-feed'); ?></a>
2088
+ <p class="sbi_tooltip"><?php esc_html_e("You can use this setting to show photos only from certain users in your feed. Just enter the usernames here which you want to show. Separate multiple usernames using commas.", 'instagram-feed'); ?></p>
2089
  </td>
2090
  </tr>
2091
  <tr valign="top" class="sbi_pro">
2092
+ <th scope="row"><label><?php esc_html_e('White lists', 'instagram-feed'); ?></label></th>
2093
  <td>
2094
  <div class="sbi_white_list_names_wrapper">
2095
+ <?php esc_html_e("No white lists currently created", 'instagram-feed'); ?>
2096
  </div>
2097
 
2098
  <input disabled class="button-secondary" type="submit" value="<?php esc_attr_e( 'Clear White Lists', 'instagram-feed' ); ?>" />
2099
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);" style="display: inline-block; margin-top: 5px;"><?php esc_html_e("What is this?", 'instagram-feed'); ?></a>
2100
+ <p class="sbi_tooltip"><?php esc_html_e("This will remove all of the white lists from the database", 'instagram-feed'); ?></p>
2101
  </td>
2102
  </tr>
2103
 
2106
  </div>
2107
 
2108
  <hr id="gdpr" />
2109
+ <h3><?php esc_html_e('GDPR', 'instagram-feed'); ?></h3>
2110
 
2111
  <table class="form-table">
2112
  <tbody>
2113
  <tr>
2114
+ <th class="bump-left"><label class="bump-left"><?php esc_html_e("Enable GDPR settings", 'instagram-feed'); ?></label><code class="sbi_shortcode"> gdpr
2115
  Eg: gdpr=yes</code></th>
2116
  <td>
2117
 
2145
  <option value="<?php echo esc_attr( $select_option['value'] ); ?>"<?php echo $selected; ?> ><?php echo esc_html( $select_option['label'] ); ?></option>
2146
  <?php endforeach; ?>
2147
  </select>
2148
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2149
  <div class="sbi_tooltip gdpr_tooltip">
2150
 
2151
+ <p><span><?php esc_html_e("Yes", "instagram-feed" ); ?>:</span> <?php esc_html_e("Enabling this setting prevents all images and videos from being loaded directly from Instagram's servers (CDN) to prevent any requests to external websites in your browser. To accommodate this, some features of the plugin will be disabled or limited.", "instagram-feed" ); ?> <a href="JavaScript:void(0);" class="sbi_show_gdpr_list"><?php esc_html_e( 'What will be limited?', 'instagram-feed' ); ?></a></p>
2152
 
2153
  <?php echo "<div class='sbi_gdpr_list'>" . $gdpr_list . '</div>'; ?>
2154
 
2155
 
2156
+ <p><span><?php esc_html_e("No", "instagram-feed" ); ?>:</span> <?php esc_html_e("The plugin will still make some requests to load and display images and videos directly from Instagram.", "instagram-feed" ); ?></p>
2157
 
2158
 
2159
+ <p><span><?php esc_html_e("Automatic", "instagram-feed" ); ?>:</span> <?php echo sprintf( __( 'The plugin will only load images and videos directly from Instagram if consent has been given by one of these integrated %s', 'instagram-feed' ), '<a href="https://smashballoon.com/doc/gdpr-plugin-list/?instagram" target="_blank" rel="noopener">' . __( 'GDPR cookie plugins', 'instagram-feed' ) . '</a>' ); ?></p>
2160
 
2161
  <p><?php echo sprintf( __( '%s to learn more about GDPR compliance in the Instagram Feed plugin.', 'instagram-feed' ), '<a href="https://smashballoon.com/doc/instagram-feed-gdpr-compliance/?instagram" target="_blank" rel="noopener">'. __( 'Click here', 'instagram-feed' ).'</a>' ); ?></p>
2162
  </div>
2168
  <div class="sb_instagram_box sbi_gdpr_error">
2169
  <div class="sb_instagram_box_setting">
2170
  <p>
2171
+ <strong><?php esc_html_e( 'Error:', 'instagram-feed' ); ?></strong> <?php esc_html_e("Due to a configuration issue on your web server, the GDPR setting is unable to be enabled.", "instagram-feed" ); ?></p>
2172
  <p>
2173
  <?php echo $errors; ?>
2174
  </p>
2186
  <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-check-circle fa-w-16 fa-2x"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z" class=""></path></svg>
2187
  <b><?php echo sprintf( __( '%s detected', 'instagram-feed' ), $active_plugin ); ?></b>
2188
  <br />
2189
+ <?php esc_html_e( 'Some Instagram Feed features will be limited for visitors to ensure GDPR compliance until they give consent.', 'instagram-feed' ); ?>
2190
+ <a href="JavaScript:void(0);" class="sbi_show_gdpr_list"><?php esc_html_e( 'What will be limited?', 'instagram-feed' ); ?></a>
2191
  </p>
2192
  <?php echo "<div class='sbi_gdpr_list'>" . $gdpr_list . '</div>'; ?>
2193
  </div>
2204
 
2205
  <div class="sb_instagram_box sbi_gdpr_yes">
2206
  <div class="sb_instagram_box_setting">
2207
+ <p><?php esc_html_e( "No requests will be made to third-party websites. To accommodate this, some features of the plugin will be limited:", 'instagram-feed' ); ?></p>
2208
  <?php echo $gdpr_list; ?>
2209
  </div>
2210
  </div>
2211
 
2212
  <div class="sb_instagram_box sbi_gdpr_no">
2213
  <div class="sb_instagram_box_setting">
2214
+ <p><?php esc_html_e( "The plugin will function as normal and load images directly from Instagram.", 'instagram-feed' ); ?></p>
2215
  </div>
2216
  </div>
2217
 
2223
  </table>
2224
 
2225
  <hr id="customcss" />
2226
+ <h3><?php esc_html_e('Misc', 'instagram-feed'); ?></h3>
2227
 
2228
  <table class="form-table">
2229
  <tbody>
2234
  </tr>
2235
  <tr valign="top">
2236
  <td>
2237
+ <textarea name="sb_instagram_custom_css" id="sb_instagram_custom_css" style="width: 70%;" rows="7"><?php echo esc_textarea( wp_unslash($sb_instagram_custom_css) ); ?></textarea>
2238
  </td>
2239
  </tr>
2240
  <tr valign="top" id="customjs">
2244
  </tr>
2245
  <tr valign="top">
2246
  <td>
2247
+ <textarea name="sb_instagram_custom_js" id="sb_instagram_custom_js" style="width: 70%;" rows="7"><?php echo esc_textarea( wp_unslash($sb_instagram_custom_js) ); ?></textarea>
2248
  </td>
2249
  </tr>
2250
  </tbody>
2253
  <tbody>
2254
 
2255
  <tr valign="top">
2256
+ <th scope="row"><label for="sb_instagram_ajax_theme" class="bump-left"><?php esc_html_e("Are you using an Ajax powered theme?", 'instagram-feed'); ?></label></th>
2257
  <td>
2258
  <input name="sb_instagram_ajax_theme" type="checkbox" id="sb_instagram_ajax_theme" <?php if($sb_instagram_ajax_theme == true) echo "checked"; ?> />
2259
+ <label for="sb_instagram_ajax_theme"><?php esc_html_e('Yes', 'instagram-feed'); ?></label>
2260
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2261
+ <p class="sbi_tooltip"><?php esc_html_e("When navigating your site, if your theme uses Ajax to load content into your pages (meaning your page doesn't refresh) then check this setting. If you're not sure then please check with the theme author.", 'instagram-feed'); ?></p>
2262
  </td>
2263
  </tr>
2264
 
2265
  <tr>
2266
+ <th class="bump-left"><label class="bump-left"><?php esc_html_e("Image Resizing", 'instagram-feed'); ?></label></th>
2267
  <td>
2268
  <input name="sb_instagram_disable_resize" type="checkbox" id="sb_instagram_disable_resize" <?php if($sb_instagram_disable_resize == true) echo "checked"; ?> />
2269
+ <label for="sb_instagram_disable_resize"><?php esc_html_e('Disable Local Image Storing and Resizing', 'instagram-feed'); ?></label><br><br>
2270
  <input name="sb_instagram_favor_local" type="checkbox" id="sb_instagram_favor_local" <?php if($sb_instagram_favor_local == true) echo "checked"; ?> />
2271
+ <label for="sb_instagram_favor_local"><?php esc_html_e('Favor Local Images', 'instagram-feed'); ?></label><br><br>
2272
 
2273
  <input id="sbi_reset_resized" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Reset Resized Images' ); ?>" style="vertical-align: middle;"/>
2274
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2275
+ <p class="sbi_tooltip"><?php esc_html_e("The plugin creates and stores resized versions of images in order to serve a more optimized resolution size in the feed. Click this button to clear all data related to resized images. Enable the setting to favor local images to always use a local, resized image if one is available.", 'instagram-feed'); ?></p>
2276
  </td>
2277
  </tr>
2278
 
2279
  <tr valign="top">
2280
+ <th scope="row"><label><?php esc_html_e('API request size', 'instagram-feed'); ?></label><code class="sbi_shortcode"> minnum
2281
  Eg: minnum=25</code></th>
2282
  <td>
2283
  <input name="sb_instagram_minnum" type="number" min="0" max="100" value="<?php echo esc_attr( $sb_instagram_minnum ); ?>" />
2284
+ <span class="sbi_note"><?php esc_html_e('Leave at "0" for default', 'instagram-feed'); ?></span>
2285
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2286
+ <p class="sbi_tooltip"><?php esc_html_e("If your feed contains a lot of IG TV posts or your feed is not displaying any posts despite there being posts available on Instagram.com, try increasing this number to 25 or more.", 'instagram-feed'); ?></p>
2287
  </td>
2288
  </tr>
2289
 
2290
  <tr valign="top">
2291
+ <th scope="row"><label><?php esc_html_e('Enqueue JS file in head', 'instagram-feed'); ?></label></th>
2292
  <td>
2293
  <input type="checkbox" name="enqueue_js_in_head" id="sb_instagram_enqueue_js_in_head" <?php if($enqueue_js_in_head == true) echo 'checked="checked"' ?> />
2294
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2295
+ <p class="sbi_tooltip"><?php esc_html_e("Check this box if you'd like to enqueue the JavaScript file for the plugin in the head instead of the footer.", 'instagram-feed'); ?></p>
2296
  </td>
2297
  </tr>
2298
 
2299
  <tr valign="top">
2300
+ <th scope="row"><label><?php esc_html_e('Enqueue CSS file with shortcode', 'instagram-feed'); ?></label></th>
2301
  <td>
2302
  <input type="checkbox" name="enqueue_css_in_shortcode" id="sb_instagram_enqueue_css_in_shortcode" <?php if($enqueue_css_in_shortcode == true) echo 'checked="checked"' ?> />
2303
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2304
+ <p class="sbi_tooltip"><?php esc_html_e("Check this box if you'd like to only include the CSS file for the plugin when the feed is on the page.", 'instagram-feed'); ?></p>
2305
  </td>
2306
  </tr>
2307
 
2308
  <tr valign="top">
2309
+ <th scope="row"><label><?php esc_html_e('Disable JS Image Loading', 'instagram-feed'); ?></label></th>
2310
  <td>
2311
  <input type="checkbox" name="disable_js_image_loading" id="sb_instagram_disable_js_image_loading" <?php if($disable_js_image_loading == true) echo 'checked="checked"' ?> />
2312
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2313
+ <p class="sbi_tooltip"><?php esc_html_e("Check this box to have images loaded server side instead of with JS.", 'instagram-feed'); ?></p>
2314
  </td>
2315
  </tr>
2316
 
2317
  <tr valign="top">
2318
+ <th><label><?php esc_html_e("Enable Backup Caching", 'instagram-feed'); ?></label></th>
2319
  <td class="sbi-customize-tab-opt">
2320
  <input name="sb_instagram_backup" type="checkbox" id="sb_instagram_backup" <?php if($sb_instagram_backup == true) echo "checked"; ?> />
2321
  <input id="sbi_clear_backups" class="button-secondary" type="submit" style="position: relative; top: -4px;" value="<?php esc_attr_e( 'Clear Backup Cache', 'instagram-feed' ); ?>" />
2322
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2323
+ <p class="sbi_tooltip"><?php esc_html_e('Every feed will save a duplicate version of itself in the database to be used if the normal cache is not available.', 'instagram-feed'); ?></p>
2324
  </td>
2325
  </tr>
2326
 
2327
  <tr>
2328
  <th class="bump-left">
2329
+ <label class="bump-left"><?php esc_html_e("Load initial posts with AJAX", 'instagram-feed'); ?></label>
2330
  </th>
2331
  <td>
2332
  <input name="sb_ajax_initial" type="checkbox" id="sb_ajax_initial" <?php if($sb_ajax_initial == true) echo "checked"; ?> />
2333
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2334
+ <p class="sbi_tooltip"><?php esc_html_e("Initial posts will be loaded using AJAX instead of added to the page directly. If you use page caching, this will allow the feed to update according to the \"Check for new posts every\" setting on the \"Configure\" tab.", 'instagram-feed'); ?></p>
2335
  </td>
2336
  </tr>
2337
 
2338
  <tr>
2339
  <th class="bump-left">
2340
+ <label for="sb_instagram_cron" class="bump-left"><?php esc_html_e("Force cache to clear on interval", 'instagram-feed'); ?></label>
2341
  </th>
2342
  <td>
2343
  <select name="sb_instagram_cron">
2344
  <option value="unset" <?php if($sb_instagram_cron == "unset") echo 'selected="selected"' ?> > - </option>
2345
+ <option value="yes" <?php if($sb_instagram_cron == "yes") echo 'selected="selected"' ?> ><?php esc_html_e('Yes', 'instagram-feed'); ?></option>
2346
+ <option value="no" <?php if($sb_instagram_cron == "no") echo 'selected="selected"' ?> ><?php esc_html_e('No', 'instagram-feed'); ?></option>
2347
  </select>
2348
 
2349
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2350
+ <p class="sbi_tooltip"><?php esc_html_e("If you're experiencing an issue with the plugin not auto-updating then you can set this to 'Yes' to run a scheduled event behind the scenes which forces the plugin cache to clear on a regular basis and retrieve new data from Instagram.", 'instagram-feed'); ?></p>
2351
  </td>
2352
  </tr>
2353
  </tbody>
2355
  <table class="form-table">
2356
  <tbody>
2357
  <tr>
2358
+ <th class="bump-left"><label class="bump-left"><?php esc_html_e("Enable Custom Templates", 'instagram-feed'); ?></label></th>
2359
  <td>
2360
  <input name="sb_instagram_custom_template" type="checkbox" id="sb_instagram_custom_template" <?php if($sb_instagram_custom_template == true) echo "checked"; ?> />
2361
+ <label for="sb_instagram_custom_template"><?php esc_html_e('Yes', 'instagram-feed'); ?></label>
2362
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2363
  <p class="sbi_tooltip"><?php _e("The default HTML for the feed can be replaced with custom templates added to your theme's folder. Enable this setting to use these templates. See <a href=\"https://smashballoon.com/guide-to-creating-custom-templates/\" target=\"_blank\">this guide</a>", 'instagram-feed'); ?></p>
2364
  </td>
2365
  </tr>
2366
  <tr>
2367
+ <th class="bump-left"><label class="bump-left"><?php esc_html_e("Disable Admin Error Notice", 'instagram-feed'); ?></label></th>
2368
  <td>
2369
  <input name="sb_instagram_disable_admin_notice" type="checkbox" id="sb_instagram_disable_admin_notice" <?php if($sb_instagram_disable_admin_notice == true) echo "checked"; ?> />
2370
+ <label for="sb_instagram_disable_admin_notice"><?php esc_html_e('Yes', 'instagram-feed'); ?></label>
2371
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2372
+ <p class="sbi_tooltip"><?php esc_html_e("This will permanently disable the feed error notice that displays in the bottom right corner for admins on the front end of your site.", 'instagram-feed'); ?></p>
2373
  </td>
2374
  </tr>
2375
  <tr>
2376
+ <th class="bump-left"><label class="bump-left"><?php esc_html_e("Feed Issue Email Report", 'instagram-feed'); ?></label></th>
2377
  <td>
2378
  <input name="sb_instagram_enable_email_report" type="checkbox" id="sb_instagram_enable_email_report" <?php if($sb_instagram_enable_email_report == 'on') echo "checked"; ?> />
2379
+ <label for="sb_instagram_enable_email_report"><?php esc_html_e('Yes', 'instagram-feed'); ?></label>
2380
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2381
+ <p class="sbi_tooltip"><?php esc_html_e("Instagram Feed will send a weekly notification email using your site's wp_mail() function if one or more of your feeds is not updating or is not displaying. If you're not receiving the emails in your inbox, you may need to configure an SMTP service using another plugin like WP Mail SMTP.", 'instagram-feed'); ?></p>
2382
 
2383
  <div class="sb_instagram_box" style="display: block;">
2384
  <div class="sb_instagram_box_setting">
2385
+ <label><?php esc_html_e('Schedule Weekly on', 'instagram-feed'); ?></label><br>
2386
  <?php
2387
  $schedule_options = array(
2388
  array(
2426
  </select>
2427
  </div>
2428
  <div class="sb_instagram_box_setting">
2429
+ <label><?php esc_html_e('Email Recipients', 'instagram-feed'); ?></label><br><input class="regular-text" type="text" name="sb_instagram_email_notification_addresses" value="<?php echo esc_attr( $sb_instagram_email_notification_addresses ); ?>"><span class="sbi_note"><?php esc_html_e('separate multiple emails with commas', 'instagram-feed'); ?></span>
2430
+ <br><br><?php esc_html_e( 'Emails not working?', 'instagram-feed' ) ?> <a href="https://smashballoon.com/email-report-is-not-in-my-inbox/" target="_blank"><?php esc_html_e( 'See our related FAQ', 'instagram-feed' ) ?></a>
2431
  </div>
2432
  </div>
2433
 
2450
  ?>
2451
  <tr>
2452
 
2453
+ <th class="bump-left"><label class="bump-left"><?php esc_html_e("Enable Usage Tracking", 'instagram-feed'); ?></label></th>
2454
  <td>
2455
  <input name="sbi_usage_tracking_enable" type="checkbox" id="sbi_usage_tracking_enable" <?php if( $sbi_usage_tracking_enable ) echo "checked"; ?> />
2456
+ <label for="sbi_usage_tracking_enable"><?php esc_html_e('Yes', 'instagram-feed'); ?></label>
2457
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e('What is usage tracking?', 'instagram-feed'); ?></a>
2458
+ <p class="sbi_tooltip"><?php esc_html_e("Instagram Feed will record information and statistics about your site in order for the team at Smash Balloon to learn more about how our plugins are used. The plugin will never collect any sensitive information like access tokens, email addresses, or user information.", 'instagram-feed'); ?></p>
2459
  </td>
2460
  </tr>
2461
  <?php endif; ?>
2462
 
2463
  <tr valign="top">
2464
+ <th><label><?php esc_html_e("Manage Data", 'instagram-feed'); ?></label></th>
2465
  <td class="sbi-customize-tab-opt">
2466
  <input id="sbi_clear_platform_data" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Delete all Platform Data' ); ?>" />
2467
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 5px;"><?php esc_html_e('What does this mean?', 'instagram-feed'); ?></a>
2468
+ <p class="sbi_tooltip"><?php esc_html_e('Warning: Clicking this button will permanently delete all Instagram data, including all connected accounts, cached posts, and stored images.', 'instagram-feed'); ?></p>
2469
  </td>
2470
  </tr>
2471
 
2487
 
2488
  <?php if( $sbi_active_tab == 'display' ) { //Start Display tab ?>
2489
 
2490
+ <h3><?php esc_html_e('Display your Feed', 'instagram-feed'); ?></h3>
2491
+ <p><?php esc_html_e("Copy and paste the following shortcode directly into the page, post or widget where you'd like the feed to show up:", 'instagram-feed'); ?></p>
2492
+ <input type="text" value="[instagram-feed]" size="16" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="<?php esc_html_e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed'); ?>" />
2493
 
2494
+ <h3 style="padding-top: 10px;"><?php esc_html_e( 'Multiple Feeds', 'instagram-feed' ); ?></h3>
2495
+ <p><?php esc_html_e("If you'd like to display multiple feeds then you can set different settings directly in the shortcode like so:", 'instagram-feed'); ?>
2496
  <code>[instagram-feed num=9 cols=3]</code></p>
2497
+ <p><?php esc_html_e( 'You can display as many different feeds as you like, on either the same page or on different pages, by just using the shortcode options below. For example:', 'instagram-feed' ); ?><br />
2498
  <code>[instagram-feed]</code><br />
2499
  <code>[instagram-feed num=4 cols=4 showfollow=false]</code><br />
2500
  </p>
2501
+ <p><?php esc_html_e("See the table below for a full list of available shortcode options:", 'instagram-feed'); ?></p>
2502
 
2503
+ <p><span class="sbi_table_key"></span><?php esc_html_e('Pro version only', 'instagram-feed'); ?></p>
2504
 
2505
  <table class="sbi_shortcode_table">
2506
  <tbody>
2507
  <tr valign="top">
2508
+ <th scope="row"><?php esc_html_e('Shortcode option', 'instagram-feed'); ?></th>
2509
+ <th scope="row"><?php esc_html_e('Description', 'instagram-feed'); ?></th>
2510
+ <th scope="row"><?php esc_html_e('Example', 'instagram-feed'); ?></th>
2511
  </tr>
2512
 
2513
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Configure Options", 'instagram-feed'); ?></td></tr>
2514
  <tr class="sbi_pro">
2515
  <td>type</td>
2516
  <td><?php _e("Display photos from a User ID (user)<br />Display posts from a Hashtag (hashtag)", 'instagram-feed'); ?><br /><?php _e("Display photos that the account was tagged in (tagged)", 'instagram-feed'); ?></td>
2518
  </tr>
2519
  <tr>
2520
  <td>user</td>
2521
+ <td><?php esc_html_e('Your Instagram User Name. This must be from a connected account on the "Configure" tab.', 'instagram-feed'); ?></td>
2522
  <td><code>[instagram-feed user="smashballoon"]</code></td>
2523
  </tr>
2524
  <tr class="sbi_pro">
2525
  <td>hashtag</td>
2526
+ <td><?php esc_html_e('Any hashtag. Separate multiple hashtags by commas.', 'instagram-feed'); ?></td>
2527
  <td><code>[instagram-feed hashtag="#awesome"]</code></td>
2528
  </tr>
2529
  <tr class="sbi_pro">
2530
  <td>tagged</td>
2531
+ <td><?php esc_html_e('Your Instagram User Name. Separate multiple users by commas.', 'instagram-feed'); ?></td>
2532
  <td><code>[instagram-feed tagged="smashballoon"]</code></td>
2533
  </tr>
2534
 
2535
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Customize Options", 'instagram-feed'); ?></td></tr>
2536
  <tr>
2537
  <td>width</td>
2538
+ <td><?php esc_html_e("The width of your feed. Any number.", 'instagram-feed'); ?></td>
2539
  <td><code>[instagram-feed width=50]</code></td>
2540
  </tr>
2541
  <tr>
2542
  <td>widthunit</td>
2543
+ <td><?php esc_html_e("The unit of the width. 'px' or '%'", 'instagram-feed'); ?></td>
2544
  <td><code>[instagram-feed widthunit=%]</code></td>
2545
  </tr>
2546
  <tr>
2547
  <td>height</td>
2548
+ <td><?php esc_html_e("The height of your feed. Any number.", 'instagram-feed'); ?></td>
2549
  <td><code>[instagram-feed height=250]</code></td>
2550
  </tr>
2551
  <tr>
2552
  <td>heightunit</td>
2553
+ <td><?php esc_html_e("The unit of the height. 'px' or '%'", 'instagram-feed'); ?></td>
2554
  <td><code>[instagram-feed heightunit=px]</code></td>
2555
  </tr>
2556
  <tr>
2557
  <td>background</td>
2558
+ <td><?php esc_html_e("The background color of the feed. Any hex color code.", 'instagram-feed'); ?></td>
2559
  <td><code>[instagram-feed background=#ffff00]</code></td>
2560
  </tr>
2561
  <tr>
2562
  <td>class</td>
2563
+ <td><?php esc_html_e("Add a CSS class to the feed container", 'instagram-feed'); ?></td>
2564
  <td><code>[instagram-feed class=feedOne]</code></td>
2565
  </tr>
2566
 
2567
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Layout Options", 'instagram-feed'); ?></td></tr>
2568
  <tr class="sbi_pro">
2569
  <td>layout</td>
2570
+ <td><?php esc_html_e("How posts are arranged visually in the feed. There are four layouts: Grid, Carousel Slider, Masonry Grid, or Highlight Grid. Options:", 'instagram-feed' ); ?> 'grid', 'carousel', 'masonry', or 'highlight'</td>
2571
  <td><code>[instagram-feed layout=grid]</code></td>
2572
  </tr>
2573
  <tr>
2574
  <td>num</td>
2575
+ <td><?php esc_html_e("The number of photos to display initially. Maximum is 33.", 'instagram-feed'); ?></td>
2576
  <td><code>[instagram-feed num=10]</code></td>
2577
  </tr>
2578
  <tr class="sbi_pro">
2579
  <td>nummobile</td>
2580
+ <td><?php esc_html_e("The number of photos to display initially for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
2581
  <td><code>[instagram-feed nummobile=6]</code></td>
2582
  </tr>
2583
  <tr>
2584
  <td>cols</td>
2585
+ <td><?php esc_html_e("The number of columns in your feed. 1 - 10.", 'instagram-feed'); ?></td>
2586
  <td><code>[instagram-feed cols=5]</code></td>
2587
  </tr>
2588
  <tr class="sbi_pro">
2589
  <td>colsmobile</td>
2590
+ <td><?php esc_html_e("The number of columns in your feed for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
2591
  <td><code>[instagram-feed colsmobile=2]</code></td>
2592
  </tr>
2593
  <tr>
2594
  <td>imagepadding</td>
2595
+ <td><?php esc_html_e("The spacing around your photos", 'instagram-feed'); ?></td>
2596
  <td><code>[instagram-feed imagepadding=10]</code></td>
2597
  </tr>
2598
  <tr>
2599
  <td>imagepaddingunit</td>
2600
+ <td><?php esc_html_e("The unit of the padding. 'px' or '%'", 'instagram-feed'); ?></td>
2601
  <td><code>[instagram-feed imagepaddingunit=px]</code></td>
2602
  </tr>
2603
 
2604
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Carousel Options", 'instagram-feed'); ?></td></tr>
2605
  <tr class="sbi_pro">
2606
  <td>carouselrows</td>
2607
+ <td><?php esc_html_e("Choose 1 or 2 rows of posts in the carousel", 'instagram-feed'); ?></td>
2608
  <td><code>[instagram-feed carouselrows=1]</code></td>
2609
  </tr>
2610
  <tr class="sbi_pro">
2611
  <td>carouselloop</td>
2612
+ <td><?php esc_html_e("Infinitely loop through posts or rewind", 'instagram-feed'); ?></td>
2613
  <td><code>[instagram-feed carouselloop=rewind]</code></td>
2614
  </tr>
2615
  <tr class="sbi_pro">
2616
  <td>carouselarrows</td>
2617
+ <td><?php esc_html_e("Display directional arrows on the carousel", 'instagram-feed'); ?></td>
2618
  <td><code>[instagram-feed carouselarrows=true]</code></td>
2619
  </tr>
2620
  <tr class="sbi_pro">
2621
  <td>carouselpag</td>
2622
+ <td><?php esc_html_e("Display pagination links below the carousel", 'instagram-feed'); ?></td>
2623
  <td><code>[instagram-feed carouselpag=true]</code></td>
2624
  </tr>
2625
  <tr class="sbi_pro">
2626
  <td>carouselautoplay</td>
2627
+ <td><?php esc_html_e("Make the carousel autoplay", 'instagram-feed'); ?></td>
2628
  <td><code>[instagram-feed carouselautoplay=true]</code></td>
2629
  </tr>
2630
  <tr class="sbi_pro">
2631
  <td>carouseltime</td>
2632
+ <td><?php esc_html_e("The interval time between slides for autoplay. Time in miliseconds.", 'instagram-feed'); ?></td>
2633
  <td><code>[instagram-feed carouseltime=8000]</code></td>
2634
  </tr>
2635
 
2636
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Highlight Options", 'instagram-feed'); ?></td></tr>
2637
  <tr class="sbi_pro">
2638
  <td>highlighttype</td>
2639
+ <td><?php esc_html_e("Choose from 3 different ways of highlighting posts including by pattern, hashtag, post id or. Options:", 'instagram-feed'); ?> 'pattern', 'hashtag', 'id'.</td>
2640
  <td><code>[instagram-feed highlighttype=hashtag]</code></td>
2641
  </tr>
2642
  <tr class="sbi_pro">
2643
  <td>highlightpattern</td>
2644
+ <td><?php esc_html_e("How often a post is highlighted.", 'instagram-feed'); ?></td>
2645
  <td><code>[instagram-feed highlightpattern=7]</code></td>
2646
  </tr>
2647
  <tr class="sbi_pro">
2648
  <td>highlightoffset</td>
2649
+ <td><?php esc_html_e("When to start the highlight pattern.", 'instagram-feed'); ?></td>
2650
  <td><code>[instagram-feed highlightoffset=3]</code></td>
2651
  </tr>
2652
  <tr class="sbi_pro">
2653
  <td>highlighthashtag</td>
2654
+ <td><?php esc_html_e("Highlight posts with these hashtags.", 'instagram-feed'); ?></td>
2655
  <td><code>[instagram-feed highlighthashtag=best]</code></td>
2656
  </tr>
2657
 
2659
 
2660
 
2661
 
2662
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Photos Options", 'instagram-feed'); ?></td></tr>
2663
  <tr>
2664
  <td>sortby</td>
2665
+ <td><?php esc_html_e("Sort the posts by Newest to Oldest (none) or Random (random)", 'instagram-feed'); ?></td>
2666
  <td><code>[instagram-feed sortby=random]</code></td>
2667
  </tr>
2668
  <tr>
2669
  <td>imageres</td>
2670
+ <td><?php esc_html_e("The resolution/size of the photos including full, medium, thumbnail, and auto (based on size of image on page). Options:", 'instagram-feed'); ?> 'auto', full', 'medium' or 'thumb'.</td>
2671
  <td><code>[instagram-feed imageres=full]</code></td>
2672
  </tr>
2673
  <tr class="sbi_pro">
2674
  <td>media</td>
2675
+ <td><?php esc_html_e("Display all media, only photos, or only videos", 'instagram-feed'); ?></td>
2676
  <td><code>[instagram-feed media=photos]</code></td>
2677
  </tr>
2678
  <tr class="sbi_pro">
2679
  <td>disablelightbox</td>
2680
+ <td><?php esc_html_e("Whether to disable the photo Lightbox. It is enabled by default.", 'instagram-feed'); ?></td>
2681
  <td><code>[instagram-feed disablelightbox=true]</code></td>
2682
  </tr>
2683
  <tr>
2684
  <td>disablemobile</td>
2685
+ <td><?php esc_html_e("Disable the mobile layout. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2686
  <td><code>[instagram-feed disablemobile=true]</code></td>
2687
  </tr>
2688
  <tr class="sbi_pro">
2689
  <td>captionlinks</td>
2690
+ <td><?php esc_html_e("Whether to use urls in captions for the photo's link instead of linking to instagram.com.", 'instagram-feed'); ?></td>
2691
  <td><code>[instagram-feed captionlinks=true]</code></td>
2692
  </tr>
2693
 
2694
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Lightbox Comments Options", 'instagram-feed'); ?></td></tr>
2695
  <tr class="sbi_pro">
2696
  <td>lightboxcomments</td>
2697
+ <td><?php esc_html_e("Whether to show comments in the lightbox for this feed.", 'instagram-feed'); ?></td>
2698
  <td><code>[instagram-feed lightboxcomments=true]</code></td>
2699
  </tr>
2700
  <tr class="sbi_pro">
2701
  <td>numcomments</td>
2702
+ <td><?php esc_html_e("Number of comments to show starting from the most recent.", 'instagram-feed'); ?></td>
2703
  <td><code>[instagram-feed numcomments=10]</code></td>
2704
  </tr>
2705
 
2706
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Photos Hover Style Options", 'instagram-feed'); ?></td></tr>
2707
  <tr class="sbi_pro">
2708
  <td>hovercolor</td>
2709
+ <td><?php esc_html_e("The background color when hovering over a photo. Any hex color code.", 'instagram-feed'); ?></td>
2710
  <td><code>[instagram-feed hovercolor=#ff0000]</code></td>
2711
  </tr>
2712
  <tr class="sbi_pro">
2713
  <td>hovertextcolor</td>
2714
+ <td><?php esc_html_e("The text/icon color when hovering over a photo. Any hex color code.", 'instagram-feed'); ?></td>
2715
  <td><code>[instagram-feed hovertextcolor=#fff]</code></td>
2716
  </tr>
2717
  <tr class="sbi_pro">
2718
  <td>hoverdisplay</td>
2719
+ <td><?php esc_html_e("The info to display when hovering over the photo such as the user name, post date, Instagram icon, location, caption, and like counts. Options:", 'instagram-feed'); ?><br />username, date, instagram, location, caption, likes</td>
2720
  <td><code>[instagram-feed hoverdisplay="date, location, likes"]</code></td>
2721
  </tr>
2722
 
2723
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Header Options", 'instagram-feed'); ?></td></tr>
2724
  <tr>
2725
  <td>showheader</td>
2726
+ <td><?php esc_html_e("Whether to show the feed Header. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2727
  <td><code>[instagram-feed showheader=false]</code></td>
2728
  </tr>
2729
  <tr>
2730
  <td>showbio</td>
2731
+ <td><?php esc_html_e("Display the bio in the header. Options:", 'instagram-feed'); ?> 'true' or 'false'</td>
2732
  <td><code>[instagram-feed showbio=true]</code></td>
2733
  </tr>
2734
  <tr>
2735
  <td>custombio</td>
2736
+ <td><?php esc_html_e("Display a custom bio in the header", 'instagram-feed'); ?></td>
2737
  <td><code>[instagram-feed custombio="My custom bio."]</code></td>
2738
  </tr>
2739
  <tr>
2740
  <td>customavatar</td>
2741
+ <td><?php esc_html_e("Display a custom avatar in the header. Enter the full URL of an image file.", 'instagram-feed'); ?></td>
2742
  <td><code>[instagram-feed customavatar="https://example.com/avatar.jpg"]</code></td>
2743
  </tr>
2744
  <tr>
2745
  <td>headersize</td>
2746
+ <td><?php esc_html_e("Size of the header including small, medium and large. Options:", 'instagram-feed'); ?> small, medium, or large.</td>
2747
  <td><code>[instagram-feed headersize=medium]</code></td>
2748
  </tr>
2749
  <tr>
2750
  <td>headercolor</td>
2751
+ <td><?php esc_html_e("The color of the Header text. Any hex color code.", 'instagram-feed'); ?></td>
2752
  <td><code>[instagram-feed headercolor=#333]</code></td>
2753
  </tr>
2754
 
2755
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("'Load More' Button Options", 'instagram-feed'); ?></td></tr>
2756
  <tr>
2757
  <td>showbutton</td>
2758
+ <td><?php esc_html_e("Whether to show the 'Load More' button. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2759
  <td><code>[instagram-feed showbutton=false]</code></td>
2760
  </tr>
2761
  <tr>
2762
  <td>buttoncolor</td>
2763
+ <td><?php esc_html_e("The background color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2764
  <td><code>[instagram-feed buttoncolor=#000]</code></td>
2765
  </tr>
2766
  <tr>
2767
  <td>buttontextcolor</td>
2768
+ <td><?php esc_html_e("The text color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2769
  <td><code>[instagram-feed buttontextcolor=#fff]</code></td>
2770
  </tr>
2771
  <tr>
2772
  <td>buttontext</td>
2773
+ <td><?php esc_html_e("The text used for the button.", 'instagram-feed'); ?></td>
2774
  <td><code>[instagram-feed buttontext="Load More Photos"]</code></td>
2775
  </tr>
2776
 
2777
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("'Follow on Instagram' Button Options", 'instagram-feed'); ?></td></tr>
2778
  <tr>
2779
  <td>showfollow</td>
2780
+ <td><?php esc_html_e("Whether to show the 'Follow on Instagram' button. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2781
  <td><code>[instagram-feed showfollow=false]</code></td>
2782
  </tr>
2783
  <tr>
2784
  <td>followcolor</td>
2785
+ <td><?php esc_html_e("The background color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2786
  <td><code>[instagram-feed followcolor=#ff0000]</code></td>
2787
  </tr>
2788
  <tr>
2789
  <td>followtextcolor</td>
2790
+ <td><?php esc_html_e("The text color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2791
  <td><code>[instagram-feed followtextcolor=#fff]</code></td>
2792
  </tr>
2793
  <tr>
2794
  <td>followtext</td>
2795
+ <td><?php esc_html_e("The text used for the button.", 'instagram-feed'); ?></td>
2796
  <td><code>[instagram-feed followtext="Follow me"]</code></td>
2797
  </tr>
2798
 
2799
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Caption Options", 'instagram-feed'); ?></td></tr>
2800
  <tr class="sbi_pro">
2801
  <td>showcaption</td>
2802
+ <td><?php esc_html_e("Whether to show the photo caption. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2803
  <td><code>[instagram-feed showcaption=false]</code></td>
2804
  </tr>
2805
  <tr class="sbi_pro">
2806
  <td>captionlength</td>
2807
+ <td><?php esc_html_e("The number of characters of the caption to display", 'instagram-feed'); ?></td>
2808
  <td><code>[instagram-feed captionlength=50]</code></td>
2809
  </tr>
2810
  <tr class="sbi_pro">
2811
  <td>captioncolor</td>
2812
+ <td><?php esc_html_e("The text color of the caption. Any hex color code.", 'instagram-feed'); ?></td>
2813
  <td><code>[instagram-feed captioncolor=#000]</code></td>
2814
  </tr>
2815
  <tr class="sbi_pro">
2816
  <td>captionsize</td>
2817
+ <td><?php esc_html_e("The size of the caption text. Any number.", 'instagram-feed'); ?></td>
2818
  <td><code>[instagram-feed captionsize=24]</code></td>
2819
  </tr>
2820
 
2821
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Likes &amp; Comments Options", 'instagram-feed'); ?></td></tr>
2822
  <tr class="sbi_pro">
2823
  <td>showlikes</td>
2824
+ <td><?php esc_html_e("Whether to show the Likes &amp; Comments. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2825
  <td><code>[instagram-feed showlikes=false]</code></td>
2826
  </tr>
2827
  <tr class="sbi_pro">
2828
  <td>likescolor</td>
2829
+ <td><?php esc_html_e("The color of the Likes &amp; Comments. Any hex color code.", 'instagram-feed'); ?></td>
2830
  <td><code>[instagram-feed likescolor=#FF0000]</code></td>
2831
  </tr>
2832
  <tr class="sbi_pro">
2833
  <td>likessize</td>
2834
+ <td><?php esc_html_e("The size of the Likes &amp; Comments. Any number.", 'instagram-feed'); ?></td>
2835
  <td><code>[instagram-feed likessize=14]</code></td>
2836
  </tr>
2837
 
2838
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Post Filtering Options", 'instagram-feed'); ?></td></tr>
2839
  <tr class="sbi_pro">
2840
  <td>excludewords</td>
2841
+ <td><?php esc_html_e("Remove posts which contain certain words or hashtags in the caption.", 'instagram-feed'); ?></td>
2842
  <td><code>[instagram-feed excludewords="bad, words"]</code></td>
2843
  </tr>
2844
  <tr class="sbi_pro">
2845
  <td>includewords</td>
2846
+ <td><?php esc_html_e("Only display posts which contain certain words or hashtags in the caption.", 'instagram-feed'); ?></td>
2847
  <td><code>[instagram-feed includewords="sunshine"]</code></td>
2848
  </tr>
2849
 
2850
+ <tr class="sbi_table_header"><td colspan=3><?php esc_html_e("Auto Load More on Scroll", 'instagram-feed'); ?></td></tr>
2851
  <tr class="sbi_pro">
2852
  <td>autoscroll</td>
2853
+ <td><?php esc_html_e("Load more posts automatically as the user scrolls down the page.", 'instagram-feed'); ?></td>
2854
  <td><code>[instagram-feed autoscroll=true]</code></td>
2855
  </tr>
2856
  <tr class="sbi_pro">
2857
  <td>autoscrolldistance</td>
2858
+ <td><?php esc_html_e("Distance before the end of feed or page that triggers the loading of more posts.", 'instagram-feed'); ?></td>
2859
  <td><code>[instagram-feed autoscrolldistance=200]</code></td>
2860
  </tr>
2861
 
2871
 
2872
  <div class="sbi_support">
2873
 
2874
+ <h3 style="padding-bottom: 10px;"><?php esc_html_e("Need help?", 'instagram-feed'); ?></h3>
2875
 
2876
  <p>
2877
  <span class="sbi-support-title"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <a
2878
  href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general"
2879
+ target="_blank"><?php esc_html_e( 'Setup Directions', 'instagram-feed' ); ?></a></span>
2880
+ <?php esc_html_e( 'A step-by-step guide on how to setup and use the plugin.', 'instagram-feed' ); ?>
2881
  </p>
2882
 
2883
  <p>
2884
  <span class="sbi-support-title"><i class="fa fa-youtube-play" aria-hidden="true"></i>&nbsp; <a
2885
  href="https://www.youtube.com/embed/q6ZXVU4g970" target="_blank"
2886
+ id="sbi-play-support-video"><?php esc_html_e( 'Watch a Video', 'instagram-feed' ); ?></a></span>
2887
  <?php _e( "Watch a short video demonstrating how to set up, customize and use the plugin.<br /><b>Please note</b> that the video shows the set up and use of the <b><a href='https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general' target='_blank'>Pro version</a></b> of the plugin, but the process is the same for this free version. The only difference is some of the features available.", 'instagram-feed' ); ?>
2888
 
2889
  <iframe id="sbi-support-video"
2894
  <p>
2895
  <span class="sbi-support-title"><i class="fa fa-question-circle" aria-hidden="true"></i>&nbsp; <a
2896
  href="https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqs"
2897
+ target="_blank"><?php esc_html_e( 'FAQs and Docs', 'instagram-feed' ); ?></a></span>
2898
+ <?php esc_html_e( 'View our expansive library of FAQs and documentation to help solve your problem as quickly as possible.', 'instagram-feed' ); ?>
2899
  </p>
2900
 
2901
  <div class="sbi-support-faqs">
2902
 
2903
  <ul>
2904
+ <li><b><?php esc_html_e( 'FAQs', 'instagram-feed' ); ?></b></li>
2905
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-photos-wont-load/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqsnophotos" target="_blank">My Instagram Feed Won\'t Load</a>', 'instagram-feed' ); ?></li>
2906
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-instagram-access-token-keep-expiring/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqsexpiring" target="_blank">My Access Token Keeps Expiring</a>', 'instagram-feed' ); ?></li>
2907
+ <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqs" target="_blank"><?php esc_html_e( 'See All', 'instagram-feed' ); ?><i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
2908
  </ul>
2909
 
2910
  <ul>
2911
+ <li><b><?php esc_html_e("Documentation", 'instagram-feed'); ?></b></li>
2912
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed/free?utm_campaign=instagram-free&utm_source=support&utm_medium=installation" target="_blank">Installation and Configuration</a>', 'instagram-feed' ); ?></li>
2913
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/display-multiple-instagram-feeds/?utm_campaign=instagram-free&utm_source=support&utm_medium=multiple" target="_blank">Displaying multiple feeds</a>', 'instagram-feed' ); ?></li>
2914
  <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed-faq/customization/?utm_campaign=instagram-free&utm_source=support&utm_medium=customizing" target="_blank">Customizing your Feed</a>', 'instagram-feed' ); ?></li>
2918
  <p>
2919
  <span class="sbi-support-title"><i class="fa fa-envelope" aria-hidden="true"></i>&nbsp; <a
2920
  href="https://smashballoon.com/instagram-feed/support/?utm_campaign=instagram-free&utm_source=support&utm_medium=contact"
2921
+ target="_blank"><?php esc_html_e( 'Request Support', 'instagram-feed' ); ?></a></span>
2922
  <?php _e( 'Still need help? Submit a ticket and one of our support experts will get back to you as soon as possible.<br /><b>Important:</b> Please include your <b>System Info</b> below with all support requests.', 'instagram-feed' ); ?>
2923
  </p>
2924
  </div>
3296
 
3297
  <div class="sbi-more-plugins-intro">
3298
  <h3><?php _e( "Here's some more <span>free</span> plugins you might like!", 'instagram-feed' ); ?></h3>
3299
+ <p><?php esc_html_e( "As you're already using one of our free plugins we thought we'd suggest some others you might like to. Check out our other free plugins below:", 'instagram-feed' ); ?></p>
3300
  </div>
3301
 
3302
  <?php function get_am_plugins() {
3406
  <div class="actions sbi-clear">
3407
  <div class="status">
3408
  <strong>
3409
+ <?php esc_html_e( 'Price:', 'instagram-feed' );
3410
  echo ' <span style="color: green;">';
3411
  _e( 'Free', 'instagram-feed' );
3412
  echo '</span>'; ?>
3428
  if( $has_all_plugins == true ){ ?>
3429
 
3430
  <style type="text/css">.sbi-more-plugins-intro{display:none;}</style>
3431
+ <h2><?php esc_html_e( 'You already have all of our free plugins. Awesome!', 'instagram-feed' ); ?></h2>
3432
 
3433
+ <p><?php esc_html_e( 'Thank you so much for using our plugins. We appreciate you trusting us to power your social media feeds.', 'instagram-feed' ); ?></p>
3434
+ <p><?php esc_html_e( 'If you want to support us in our mission to make bringing social media content to your website both easy and reliable, then consider upgrading to one of our Pro plugins.', 'instagram-feed' ); ?></p>
3435
 
3436
  <div class="sbi-cols-4">
3437
  <?php //Show a list of Pro plugins which aren't currently active ?>
3458
  <div class="actions sbi-clear">
3459
  <div class="action-button">
3460
  <a href="<?php echo esc_attr( $details['pro']['url'] ); ?>" target="_blank" class="status-go-to-url button button-primary">
3461
+ <?php esc_html_e( 'Upgrade to Pro', 'instagram-feed' ); ?>
3462
  </a>
3463
  </div>
3464
  </div>
3554
 
3555
 
3556
  <div class="sbi_quickstart">
3557
+ <h3><i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <?php esc_html_e('Display your feed', 'instagram-feed'); ?></h3>
3558
+ <p><?php esc_html_e('Copy and paste this shortcode directly into the page, post or widget where you\'d like to display the feed:', 'instagram-feed'); ?> <input type="text" value="[instagram-feed]" size="15" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p>
3559
  <p><?php _e('Find out how to display <a href="?page=sb-instagram-feed&amp;tab=display">multiple feeds</a>.', 'instagram-feed'); ?></p>
3560
  </div>
3561
 
3566
  <p class="sbi_plugins_promo dashicons-before dashicons-admin-plugins"> <?php _e('Check out our other free plugins: <a href="https://wordpress.org/plugins/custom-facebook-feed/" target="_blank">Facebook</a>, <a href="https://wordpress.org/plugins/custom-twitter-feeds/" target="_blank">Twitter</a>, and <a href="https://wordpress.org/plugins/feeds-for-youtube/" target="_blank">YouTube</a>.', 'instagram-feed' ); ?></p>
3567
 
3568
  <div class="sbi_share_plugin">
3569
+ <h3><?php esc_html_e('Like the plugin? Help spread the word!', 'instagram-feed'); ?></h3>
3570
 
3571
  <button id="sbi_admin_show_share_links" class="button secondary" style="margin-bottom: 1px;"><i class="fa fa-share-alt" aria-hidden="true"></i>&nbsp;&nbsp;Share the plugin</button> <div id="sbi_admin_share_links"></div>
3572
  </div>
inc/admin/templates/locator-summary.php CHANGED
@@ -79,7 +79,7 @@ $database_settings = sbi_get_database_settings();
79
  <td><?php echo $display . $comma_separated; ?></td>
80
  <td>
81
  <span class="sbi-condensed-wrap"><a class="sbi-locator-more" href="JavaScript:void(0);"><?php esc_html_e( 'Show', 'instagram-feed' ); ?></a></span>
82
- <span class="sbi-full-wrap"><?php echo $full_shortcode_string; ?></span>
83
  </td>
84
  <td><a href="<?php echo esc_url( get_the_permalink( $result['post_id'] ) ); ?>" target="_blank" rel="noopener"><?php echo esc_html( get_the_title( $result['post_id'] ) ); ?></a></td>
85
  </tr>
79
  <td><?php echo $display . $comma_separated; ?></td>
80
  <td>
81
  <span class="sbi-condensed-wrap"><a class="sbi-locator-more" href="JavaScript:void(0);"><?php esc_html_e( 'Show', 'instagram-feed' ); ?></a></span>
82
+ <span class="sbi-full-wrap"><?php echo esc_html( $full_shortcode_string ); ?></span>
83
  </td>
84
  <td><a href="<?php echo esc_url( get_the_permalink( $result['post_id'] ) ); ?>" target="_blank" rel="noopener"><?php echo esc_html( get_the_title( $result['post_id'] ) ); ?></a></td>
85
  </tr>
inc/class-sb-instagram-feed-locator.php CHANGED
@@ -69,6 +69,26 @@ class SB_Instagram_Feed_Locator
69
  global $wpdb;
70
 
71
  $feed_locator_table_name = esc_sql( $wpdb->prefix . SBI_INSTAGRAM_FEED_LOCATOR );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  $affected = $wpdb->query( $wpdb->prepare( "INSERT INTO $feed_locator_table_name
74
  (feed_id,
@@ -89,6 +109,18 @@ class SB_Instagram_Feed_Locator
89
  date( 'Y-m-d H:i:s' ) ) );
90
  }
91
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  /**
93
  * Update a record based on the existing "id" column. Location can change
94
  * from "unknown" to one of footer, content, header, or sidebar.
@@ -348,8 +380,6 @@ class SB_Instagram_Feed_Locator
348
  FROM $feed_locator_table_name
349
  WHERE html_location = 'content'
350
  ", ARRAY_A );
351
- //echo '<pre>';
352
- //var_dump( $results_content );
353
 
354
  $results_other = $wpdb->get_results( "
355
  SELECT COUNT(*) AS num_entries
@@ -358,7 +388,6 @@ class SB_Instagram_Feed_Locator
358
  AND html_location != 'unknown'
359
  GROUP BY feed_id
360
  ", ARRAY_A );
361
- //var_dump( $results_other );
362
 
363
  $total = 0;
364
  if ( isset( $results_content[0]['num_entries'] ) ) {
69
  global $wpdb;
70
 
71
  $feed_locator_table_name = esc_sql( $wpdb->prefix . SBI_INSTAGRAM_FEED_LOCATOR );
72
+ $two_minutes_ago = date( 'Y-m-d H:i:s', time() - 120 );
73
+
74
+ $results_recent_entries = $wpdb->get_results( $wpdb->prepare("
75
+ SELECT COUNT(*) AS num_entries
76
+ FROM $feed_locator_table_name
77
+ WHERE last_update > %s;
78
+ ", $two_minutes_ago ), ARRAY_A );
79
+
80
+ // Only allow 5 new entries within 5 minutes
81
+ if ( isset( $results_recent_entries[0]['num_entries'] ) && (int)$results_recent_entries[0]['num_entries'] > 5 ) {
82
+ return;
83
+ }
84
+
85
+ // Only allow 1000 total entries
86
+ $results_total_entries = $wpdb->get_results( "
87
+ SELECT COUNT(*) AS num_entries
88
+ FROM $feed_locator_table_name", ARRAY_A );
89
+ if ( isset( $results_total_entries[0]['num_entries'] ) && (int)$results_total_entries[0]['num_entries'] > 1000 ) {
90
+ $this->delete_oldest_entry();
91
+ }
92
 
93
  $affected = $wpdb->query( $wpdb->prepare( "INSERT INTO $feed_locator_table_name
94
  (feed_id,
109
  date( 'Y-m-d H:i:s' ) ) );
110
  }
111
 
112
+ public function delete_oldest_entry() {
113
+ global $wpdb;
114
+
115
+ $feed_locator_table_name = esc_sql( $wpdb->prefix . SBI_INSTAGRAM_FEED_LOCATOR );
116
+
117
+ $affected = $wpdb->query(
118
+ "DELETE FROM $feed_locator_table_name
119
+ ORDER BY last_update ASC
120
+ LIMIT 1;" );
121
+
122
+ }
123
+
124
  /**
125
  * Update a record based on the existing "id" column. Location can change
126
  * from "unknown" to one of footer, content, header, or sidebar.
380
  FROM $feed_locator_table_name
381
  WHERE html_location = 'content'
382
  ", ARRAY_A );
 
 
383
 
384
  $results_other = $wpdb->get_results( "
385
  SELECT COUNT(*) AS num_entries
388
  AND html_location != 'unknown'
389
  GROUP BY feed_id
390
  ", ARRAY_A );
 
391
 
392
  $total = 0;
393
  if ( isset( $results_content[0]['num_entries'] ) ) {
inc/class-sb-instagram-feed.php CHANGED
@@ -1208,6 +1208,7 @@ class SB_Instagram_Feed
1208
  }
1209
 
1210
  $other_atts .= ' data-postid="' . esc_attr( get_the_ID() ) . '"';
 
1211
 
1212
  $other_atts = $this->add_other_atts( $other_atts, $settings );
1213
 
@@ -1277,7 +1278,7 @@ class SB_Instagram_Feed
1277
  ob_start();
1278
  $html = ob_get_contents();
1279
  ob_get_clean(); ?>
1280
- <p><?php _e( 'No posts found.', 'instagram-feed' ); ?></p>
1281
  <?php
1282
  $html = ob_get_contents();
1283
  ob_get_clean();
1208
  }
1209
 
1210
  $other_atts .= ' data-postid="' . esc_attr( get_the_ID() ) . '"';
1211
+ $other_atts .= ' data-locatornonce="' . esc_attr( wp_create_nonce( 'sbi-locator-nonce-' . get_the_ID() . '-' . $this->regular_feed_transient_name ) ) . '"';
1212
 
1213
  $other_atts = $this->add_other_atts( $other_atts, $settings );
1214
 
1278
  ob_start();
1279
  $html = ob_get_contents();
1280
  ob_get_clean(); ?>
1281
+ <p><?php esc_html_e( 'No posts found.', 'instagram-feed' ); ?></p>
1282
  <?php
1283
  $html = ob_get_contents();
1284
  ob_get_clean();
inc/class-sb-instagram-settings.php CHANGED
@@ -125,6 +125,8 @@ class SB_Instagram_Settings {
125
  }
126
  if ( isset( $atts['showheader'] ) && $atts['showheader'] === 'false' ) {
127
  $this->settings['showheader'] = false;
 
 
128
  }
129
  $this->settings['disable_resize'] = isset( $db['sb_instagram_disable_resize'] ) && ($db['sb_instagram_disable_resize'] === 'on');
130
  $this->settings['favor_local'] = ! isset( $db['sb_instagram_favor_local'] ) || ($db['sb_instagram_favor_local'] === 'on') || ($db['sb_instagram_favor_local'] === true);
@@ -693,4 +695,208 @@ class SB_Instagram_Settings {
693
 
694
  return $defaults;
695
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
696
  }
125
  }
126
  if ( isset( $atts['showheader'] ) && $atts['showheader'] === 'false' ) {
127
  $this->settings['showheader'] = false;
128
+ } elseif ( isset( $atts['showheader'] ) && $atts['showheader'] === 'true' ) {
129
+ $this->settings['showheader'] = true;
130
  }
131
  $this->settings['disable_resize'] = isset( $db['sb_instagram_disable_resize'] ) && ($db['sb_instagram_disable_resize'] === 'on');
132
  $this->settings['favor_local'] = ! isset( $db['sb_instagram_favor_local'] ) || ($db['sb_instagram_favor_local'] === 'on') || ($db['sb_instagram_favor_local'] === true);
695
 
696
  return $defaults;
697
  }
698
+
699
+ /**
700
+ * Compares given array with an allow list of
701
+ * setting keys and how they should be sanitized
702
+ *
703
+ * @param array $atts
704
+ *
705
+ * @return array
706
+ */
707
+ public static function sanitize_raw_atts( $atts ) {
708
+
709
+ $sanitized_atts = array();
710
+
711
+ $allowed_atts = array(
712
+ 'id' => array(
713
+ 'method' => 'alpha_numeric_and_comma',
714
+ 'allowed_vals' => 'any'
715
+ ),
716
+ 'width' => array(
717
+ 'method' => 'page_load_only',
718
+ ),
719
+ 'widthunit'=> array(
720
+ 'method' => 'page_load_only',
721
+ ),
722
+ 'widthresp' => array(
723
+ 'method' => 'page_load_only',
724
+ ),
725
+ 'height' => array(
726
+ 'method' => 'page_load_only',
727
+ ),
728
+ 'heightunit' => array(
729
+ 'method' => 'page_load_only',
730
+ ),
731
+ 'sortby' => array(
732
+ 'method' => 'enum',
733
+ 'allowed_vals' => array( 'none', 'random', 'likes' )
734
+ ),
735
+ 'num' => array(
736
+ 'method' => 'intval',
737
+ 'allowed_vals' => 500
738
+ ),
739
+ 'nummobile' => array(
740
+ 'method' => 'intval',
741
+ 'allowed_vals' => 500
742
+ ),
743
+ 'apinum' => array(
744
+ 'method' => 'intval',
745
+ 'allowed_vals' => 100
746
+ ),
747
+ 'cols' => array(
748
+ 'method' => 'intval',
749
+ 'allowed_vals' => 15
750
+ ),
751
+ 'disablemobile' => array(
752
+ 'method' => 'page_load_only',
753
+ ),
754
+ 'imagepadding' => array(
755
+ 'method' => 'page_load_only',
756
+ ),
757
+ 'imagepaddingunit' => array(
758
+ 'method' => 'page_load_only',
759
+ ),
760
+ 'background' => array(
761
+ 'method' => 'page_load_only',
762
+ ),
763
+ 'showbutton' => array(
764
+ 'method' => 'page_load_only',
765
+ ),
766
+ 'buttoncolor' => array(
767
+ 'method' => 'page_load_only',
768
+ ),
769
+ 'buttontextcolor' => array(
770
+ 'method' => 'page_load_only',
771
+ ),
772
+ 'buttontext' => array(
773
+ 'method' => 'page_load_only',
774
+ ),
775
+ 'imageres' => array(
776
+ 'method' => 'enum',
777
+ 'allowed_vals' => array( 'auto', 'thumb', 'low', 'full' )
778
+ ),
779
+ 'showfollow' => array(
780
+ 'method' => 'page_load_only',
781
+ ),
782
+ 'followcolor' => array(
783
+ 'method' => 'page_load_only',
784
+ ),
785
+ 'followtextcolor' => array(
786
+ 'method' => 'page_load_only',
787
+ ),
788
+ 'followtext' => array(
789
+ 'method' => 'page_load_only',
790
+ ),
791
+ 'showheader' => array(
792
+ 'method' => 'page_load_only',
793
+ ),
794
+ 'headersize' => array(
795
+ 'method' => 'page_load_only',
796
+ ),
797
+ 'showbio' => array(
798
+ 'method' => 'page_load_only',
799
+ ),
800
+ 'custombio' => array(
801
+ 'method' => 'page_load_only',
802
+ ),
803
+ 'customavatar' => array(
804
+ 'method' => 'page_load_only',
805
+ ),
806
+ 'headercolor' => array(
807
+ 'method' => 'page_load_only',
808
+ ),
809
+ 'class' => array(
810
+ 'method' => 'page_load_only',
811
+ ),
812
+ 'ajaxtheme' => array(
813
+ 'method' => 'page_load_only',
814
+ ),
815
+ 'cachetime' => array(
816
+ 'method' => 'page_load_only',
817
+ ),
818
+ 'media' => array(
819
+ 'method' => 'page_load_only',
820
+ ),
821
+ 'headeroutside' => array(
822
+ 'method' => 'page_load_only',
823
+ ),
824
+ 'user' => array(
825
+ 'method' => 'alpha_numeric_and_comma',
826
+ 'allowed_vals' => 'any'
827
+ ),
828
+ 'feedid' => array(
829
+ 'method' => 'feedid_chars',
830
+ 'allowed_vals' => 'any'
831
+ ),
832
+ 'resizeprocess' => array(
833
+ 'method' => 'enum',
834
+ 'allowed_vals' => array( 'page', 'background' )
835
+ ),
836
+ 'customtemplates' => array(
837
+ 'method' => 'string_true',
838
+ 'allowed_vals' => 'any'
839
+ ),
840
+ 'gdpr' => array(
841
+ 'method' => 'enum',
842
+ 'allowed_vals' => array( 'auto', 'yes', 'no' )
843
+ )
844
+ );
845
+
846
+ foreach ( $atts as $key => $value ) {
847
+ $value = (string)$value;
848
+
849
+ if ( isset( $allowed_atts[ $key ] ) && strlen( $value ) < 500 ) {
850
+ $sanitization_method = $allowed_atts[ $key ]['method'];
851
+
852
+ switch ( $sanitization_method ) {
853
+ case 'enum' :
854
+ if ( in_array( $value, $allowed_atts[ $key ]['allowed_vals'] ) ) {
855
+ $sanitized_atts[ $key ] = sanitize_text_field( $value );
856
+ }
857
+ break;
858
+ case 'alpha_numeric_and_comma' :
859
+ $sanitized_atts[ $key ] = preg_replace( "/[^A-Za-z0-9,]/", '', $value );
860
+ break;
861
+ case 'feedid_chars' :
862
+ $sanitized_atts[ $key ] = preg_replace( "/[^A-Za-z0-9#_%-\/?]/", '', urlencode( $value ) );
863
+ break;
864
+ case 'intval' :
865
+ $value = intval( $value );
866
+
867
+ if ( $value < (int)$allowed_atts[ $key ]['allowed_vals'] ) {
868
+ $sanitized_atts[ $key ] = $value;
869
+ }
870
+
871
+ break;
872
+ case 'floatval' :
873
+ $value = floatval( $value );
874
+
875
+ if ( $allowed_atts[ $key ]['allowed_vals'] === 'any' ) {
876
+ $sanitized_atts[ $key ] = $value;
877
+ } elseif ( $value < (float)$allowed_atts[ $key ]['allowed_vals'] ) {
878
+ $sanitized_atts[ $key ] = $value;
879
+ }
880
+
881
+ if ( floor( $value ) === $value ) {
882
+ $sanitized_atts[ $key ] = (int)$value;
883
+ }
884
+
885
+ break;
886
+ case 'string_true' :
887
+ $value = floatval( $value );
888
+
889
+ if ( $value === 'true' || $value === 'on' || $value === true ) {
890
+ $sanitized_atts[ $key ] = 'true';
891
+ } else {
892
+ $sanitized_atts[ $key ] = 'false';
893
+ }
894
+
895
+ break;
896
+ }
897
+ }
898
+ }
899
+
900
+ return $sanitized_atts;
901
+ }
902
  }
inc/if-functions.php CHANGED
@@ -40,9 +40,9 @@ function display_instagram( $atts = array() ) {
40
  $style = current_user_can( 'manage_instagram_feed_options' ) ? ' style="display: block;"' : '';
41
  ob_start(); ?>
42
  <div id="sbi_mod_error" <?php echo $style; ?>>
43
- <span><?php _e('This error message is only visible to WordPress admins', 'instagram-feed' ); ?></span><br />
44
- <p><b><?php _e( 'Error: No connected account.', 'instagram-feed' ); ?></b>
45
- <p><?php _e( 'Please go to the Instagram Feed settings page to connect an account.', 'instagram-feed' ); ?></p>
46
  </div>
47
  <?php
48
  $html = ob_get_contents();
@@ -198,10 +198,11 @@ function sbi_get_next_post_set() {
198
  die( 'invalid feed ID');
199
  }
200
 
201
- $feed_id = sanitize_text_field( $_POST['feed_id'] );
 
202
  $atts_raw = isset( $_POST['atts'] ) ? json_decode( stripslashes( $_POST['atts'] ), true ) : array();
203
  if ( is_array( $atts_raw ) ) {
204
- array_map( 'sanitize_text_field', $atts_raw );
205
  } else {
206
  $atts_raw = array();
207
  }
@@ -227,7 +228,7 @@ function sbi_get_next_post_set() {
227
 
228
  $settings = $instagram_feed_settings->get_settings();
229
 
230
- $location = isset( $_POST['location'] ) && in_array( $_POST['location'], array( 'header', 'footer', 'sidebar', 'content' ), true ) ? sanitize_text_field( $_POST['location'] ) : 'unknown';
231
  $post_id = isset( $_POST['post_id'] ) && $_POST['post_id'] !== 'unknown' ? (int)$_POST['post_id'] : 'unknown';
232
  $feed_details = array(
233
  'feed_id' => $transient_name,
@@ -238,7 +239,19 @@ function sbi_get_next_post_set() {
238
  )
239
  );
240
 
241
- sbi_do_background_tasks( $feed_details );
 
 
 
 
 
 
 
 
 
 
 
 
242
 
243
  $feed_type_and_terms = $instagram_feed_settings->get_feed_type_and_terms();
244
 
@@ -351,8 +364,8 @@ function sbi_process_submitted_resize_ids() {
351
  die( 'invalid feed ID');
352
  }
353
 
354
- $feed_id = sanitize_text_field( $_POST['feed_id'] );
355
- $images_need_resizing_raw = isset( $_POST['needs_resizing'] ) ? $_POST['needs_resizing'] : array();
356
  if ( is_array( $images_need_resizing_raw ) ) {
357
  array_map( 'sanitize_text_field', $images_need_resizing_raw );
358
  } else {
@@ -360,9 +373,9 @@ function sbi_process_submitted_resize_ids() {
360
  }
361
  $images_need_resizing = $images_need_resizing_raw;
362
 
363
- $atts_raw = isset( $_POST['atts'] ) ? json_decode( stripslashes( $_POST['atts'] ), true ) : array();
364
  if ( is_array( $atts_raw ) ) {
365
- array_map( 'sanitize_text_field', $atts_raw );
366
  } else {
367
  $atts_raw = array();
368
  }
@@ -381,9 +394,14 @@ function sbi_process_submitted_resize_ids() {
381
  $instagram_feed_settings->set_feed_type_and_terms();
382
  $instagram_feed_settings->set_transient_name();
383
  $transient_name = $instagram_feed_settings->get_transient_name();
 
 
 
 
 
384
  $settings = $instagram_feed_settings->get_settings();
385
 
386
- $location = isset( $_POST['location'] ) && in_array( $_POST['location'], array( 'header', 'footer', 'sidebar', 'content' ), true ) ? sanitize_text_field( $_POST['location'] ) : 'unknown';
387
  $post_id = isset( $_POST['post_id'] ) && $_POST['post_id'] !== 'unknown' ? (int)$_POST['post_id'] : 'unknown';
388
  $feed_details = array(
389
  'feed_id' => $transient_name,
@@ -394,14 +412,22 @@ function sbi_process_submitted_resize_ids() {
394
  )
395
  );
396
 
397
- sbi_do_background_tasks( $feed_details );
 
 
 
 
 
 
 
 
398
 
399
- if ( $cache_all ) {
400
- $settings['cache_all'] = true;
401
  }
402
 
403
- if ( $transient_name !== $feed_id ) {
404
- die( 'id does not match' );
405
  }
406
 
407
  sbi_resize_posts_by_id( $images_need_resizing, $transient_name, $settings );
@@ -425,17 +451,23 @@ function sbi_do_locator() {
425
  die( 'invalid feed ID');
426
  }
427
 
428
- $feed_id = sanitize_text_field( $_POST['feed_id'] );
429
-
430
 
431
- $atts_raw = isset( $_POST['atts'] ) ? json_decode( stripslashes( $_POST['atts'] ), true ) : array();
432
  if ( is_array( $atts_raw ) ) {
433
- array_map( 'sanitize_text_field', $atts_raw );
434
  } else {
435
  $atts_raw = array();
436
  }
437
  $atts = $atts_raw; // now sanitized
438
 
 
 
 
 
 
 
 
439
  $location = isset( $_POST['location'] ) && in_array( $_POST['location'], array( 'header', 'footer', 'sidebar', 'content' ), true ) ? sanitize_text_field( $_POST['location'] ) : 'unknown';
440
  $post_id = isset( $_POST['post_id'] ) && $_POST['post_id'] !== 'unknown' ? (int)$_POST['post_id'] : 'unknown';
441
  $feed_details = array(
@@ -447,9 +479,23 @@ function sbi_do_locator() {
447
  )
448
  );
449
 
450
- sbi_do_background_tasks( $feed_details );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
451
 
452
- wp_die( 'locating success' );
453
  }
454
  add_action( 'wp_ajax_sbi_do_locator', 'sbi_do_locator' );
455
  add_action( 'wp_ajax_nopriv_sbi_do_locator', 'sbi_do_locator' );
@@ -478,7 +524,7 @@ function sbi_error_report( $instagram_feed, $feed_id ) {
478
 
479
  if ( ! empty( $error_messages ) ) {?>
480
  <div id="sbi_mod_error"<?php echo $style; ?>>
481
- <span><?php _e('This error message is only visible to WordPress admins', 'instagram-feed' ); ?></span><br />
482
  <?php foreach ( $error_messages as $error_message ) {
483
 
484
  echo '<div><strong>' . esc_html( $error_message['error_message'] ) . '</strong>';
@@ -1130,7 +1176,7 @@ function sb_instagram_scripts_enqueue() {
1130
  $data = array(
1131
  'font_method' => 'svg',
1132
  'resized_url' => sbi_get_resized_uploads_url(),
1133
- 'placeholder' => trailingslashit( SBI_PLUGIN_URL ) . 'img/placeholder.png'
1134
  );
1135
  //Pass option to JS file
1136
  wp_localize_script('sb_instagram_scripts', 'sb_instagram_js_options', $data );
40
  $style = current_user_can( 'manage_instagram_feed_options' ) ? ' style="display: block;"' : '';
41
  ob_start(); ?>
42
  <div id="sbi_mod_error" <?php echo $style; ?>>
43
+ <span><?php esc_html_e('This error message is only visible to WordPress admins', 'instagram-feed' ); ?></span><br />
44
+ <p><b><?php esc_html_e( 'Error: No connected account.', 'instagram-feed' ); ?></b>
45
+ <p><?php esc_html_e( 'Please go to the Instagram Feed settings page to connect an account.', 'instagram-feed' ); ?></p>
46
  </div>
47
  <?php
48
  $html = ob_get_contents();
198
  die( 'invalid feed ID');
199
  }
200
 
201
+ $feed_id = sanitize_text_field( wp_unslash( $_POST['feed_id'] ) );
202
+
203
  $atts_raw = isset( $_POST['atts'] ) ? json_decode( stripslashes( $_POST['atts'] ), true ) : array();
204
  if ( is_array( $atts_raw ) ) {
205
+ $atts_raw = SB_Instagram_Settings::sanitize_raw_atts( $atts_raw );
206
  } else {
207
  $atts_raw = array();
208
  }
228
 
229
  $settings = $instagram_feed_settings->get_settings();
230
 
231
+ $location = isset( $_POST['location'] ) && in_array( $_POST['location'], array( 'header', 'footer', 'sidebar', 'content' ), true ) ? sanitize_text_field( wp_unslash( $_POST['location'] ) ) : 'unknown';
232
  $post_id = isset( $_POST['post_id'] ) && $_POST['post_id'] !== 'unknown' ? (int)$_POST['post_id'] : 'unknown';
233
  $feed_details = array(
234
  'feed_id' => $transient_name,
239
  )
240
  );
241
 
242
+ $can_do_background_tasks = false;
243
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
244
+ $nonce = isset( $_POST['locator_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['locator_nonce'] ) ) : '';
245
+ if ( wp_verify_nonce( $nonce, esc_attr( 'sbi-locator-nonce-' . $post_id . '-' . $transient_name ) ) ) {
246
+ $can_do_background_tasks = true;
247
+ }
248
+ } else {
249
+ $can_do_background_tasks = true;
250
+ }
251
+
252
+ if ( $can_do_background_tasks ) {
253
+ sbi_do_background_tasks( $feed_details );
254
+ }
255
 
256
  $feed_type_and_terms = $instagram_feed_settings->get_feed_type_and_terms();
257
 
364
  die( 'invalid feed ID');
365
  }
366
 
367
+ $feed_id = sanitize_text_field( wp_unslash( $_POST['feed_id'] ) );
368
+ $images_need_resizing_raw = isset( $_POST['needs_resizing'] ) ? wp_unslash( $_POST['needs_resizing'] ) : array();
369
  if ( is_array( $images_need_resizing_raw ) ) {
370
  array_map( 'sanitize_text_field', $images_need_resizing_raw );
371
  } else {
373
  }
374
  $images_need_resizing = $images_need_resizing_raw;
375
 
376
+ $atts_raw = isset( $_POST['atts'] ) ? json_decode( wp_unslash( $_POST['atts'] ), true ) : array();
377
  if ( is_array( $atts_raw ) ) {
378
+ $atts_raw = SB_Instagram_Settings::sanitize_raw_atts( $atts_raw );
379
  } else {
380
  $atts_raw = array();
381
  }
394
  $instagram_feed_settings->set_feed_type_and_terms();
395
  $instagram_feed_settings->set_transient_name();
396
  $transient_name = $instagram_feed_settings->get_transient_name();
397
+
398
+ if ( $transient_name !== $feed_id ) {
399
+ die( 'id does not match' );
400
+ }
401
+
402
  $settings = $instagram_feed_settings->get_settings();
403
 
404
+ $location = isset( $_POST['location'] ) && in_array( $_POST['location'], array( 'header', 'footer', 'sidebar', 'content' ), true ) ? sanitize_text_field( wp_unslash( $_POST['location'] ) ) : 'unknown';
405
  $post_id = isset( $_POST['post_id'] ) && $_POST['post_id'] !== 'unknown' ? (int)$_POST['post_id'] : 'unknown';
406
  $feed_details = array(
407
  'feed_id' => $transient_name,
412
  )
413
  );
414
 
415
+ $can_do_background_tasks = false;
416
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
417
+ $nonce = isset( $_POST['locator_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['locator_nonce'] ) ) : '';
418
+ if ( wp_verify_nonce( $nonce, esc_attr( 'sbi-locator-nonce-' . $post_id . '-' . $transient_name ) ) ) {
419
+ $can_do_background_tasks = true;
420
+ }
421
+ } else {
422
+ $can_do_background_tasks = true;
423
+ }
424
 
425
+ if ( $can_do_background_tasks ) {
426
+ sbi_do_background_tasks( $feed_details );
427
  }
428
 
429
+ if ( $cache_all ) {
430
+ $settings['cache_all'] = true;
431
  }
432
 
433
  sbi_resize_posts_by_id( $images_need_resizing, $transient_name, $settings );
451
  die( 'invalid feed ID');
452
  }
453
 
454
+ $feed_id = sanitize_text_field( wp_unslash( $_POST['feed_id'] ) );
 
455
 
456
+ $atts_raw = isset( $_POST['atts'] ) ? json_decode( wp_unslash( $_POST['atts'] ), true ) : array();
457
  if ( is_array( $atts_raw ) ) {
458
+ $atts_raw = SB_Instagram_Settings::sanitize_raw_atts( $atts_raw );
459
  } else {
460
  $atts_raw = array();
461
  }
462
  $atts = $atts_raw; // now sanitized
463
 
464
+ $database_settings = sbi_get_database_settings();
465
+ $instagram_feed_settings = new SB_Instagram_Settings( $atts, $database_settings );
466
+
467
+ $instagram_feed_settings->set_feed_type_and_terms();
468
+ $instagram_feed_settings->set_transient_name();
469
+ $transient_name = $instagram_feed_settings->get_transient_name();
470
+
471
  $location = isset( $_POST['location'] ) && in_array( $_POST['location'], array( 'header', 'footer', 'sidebar', 'content' ), true ) ? sanitize_text_field( $_POST['location'] ) : 'unknown';
472
  $post_id = isset( $_POST['post_id'] ) && $_POST['post_id'] !== 'unknown' ? (int)$_POST['post_id'] : 'unknown';
473
  $feed_details = array(
479
  )
480
  );
481
 
482
+ $can_do_background_tasks = false;
483
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
484
+ $nonce = isset( $_POST['locator_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['locator_nonce'] ) ) : '';
485
+ if ( wp_verify_nonce( $nonce, esc_attr( 'sbi-locator-nonce-' . $post_id . '-' . $transient_name ) ) ) {
486
+ $can_do_background_tasks = true;
487
+ }
488
+ } else {
489
+ $can_do_background_tasks = true;
490
+ }
491
+
492
+ if ( $can_do_background_tasks ) {
493
+ sbi_do_background_tasks( $feed_details );
494
+
495
+ wp_die( 'locating success' );
496
+ }
497
 
498
+ wp_die( 'skipped locating' );
499
  }
500
  add_action( 'wp_ajax_sbi_do_locator', 'sbi_do_locator' );
501
  add_action( 'wp_ajax_nopriv_sbi_do_locator', 'sbi_do_locator' );
524
 
525
  if ( ! empty( $error_messages ) ) {?>
526
  <div id="sbi_mod_error"<?php echo $style; ?>>
527
+ <span><?php esc_html_e('This error message is only visible to WordPress admins', 'instagram-feed' ); ?></span><br />
528
  <?php foreach ( $error_messages as $error_message ) {
529
 
530
  echo '<div><strong>' . esc_html( $error_message['error_message'] ) . '</strong>';
1176
  $data = array(
1177
  'font_method' => 'svg',
1178
  'resized_url' => sbi_get_resized_uploads_url(),
1179
+ 'placeholder' => trailingslashit( SBI_PLUGIN_URL ) . 'img/placeholder.png',
1180
  );
1181
  //Pass option to JS file
1182
  wp_localize_script('sb_instagram_scripts', 'sb_instagram_js_options', $data );
instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Smash Balloon Instagram Feed
4
  Plugin URI: https://smashballoon.com/instagram-feed
5
  Description: Display beautifully clean, customizable, and responsive Instagram feeds.
6
- Version: 2.9.4
7
  Author: Smash Balloon
8
  Author URI: https://smashballoon.com/
9
  License: GPLv2 or later
@@ -23,7 +23,7 @@ along with this program; if not, write to the Free Software
23
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
  if ( ! defined( 'SBIVER' ) ) {
26
- define( 'SBIVER', '2.9.4' );
27
  }
28
  // Db version.
29
  if ( ! defined( 'SBI_DBVERSION' ) ) {
3
  Plugin Name: Smash Balloon Instagram Feed
4
  Plugin URI: https://smashballoon.com/instagram-feed
5
  Description: Display beautifully clean, customizable, and responsive Instagram feeds.
6
+ Version: 2.9.5
7
  Author: Smash Balloon
8
  Author URI: https://smashballoon.com/
9
  License: GPLv2 or later
23
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
  if ( ! defined( 'SBIVER' ) ) {
26
+ define( 'SBIVER', '2.9.5' );
27
  }
28
  // Db version.
29
  if ( ! defined( 'SBI_DBVERSION' ) ) {
js/sb-instagram-2-2.js CHANGED
@@ -435,11 +435,15 @@ if(!sbi_js_exists) {
435
  }
436
  },
437
  sendNeedsResizingToServer: function() {
438
- var feed = this;
 
439
  if (feed.needsResizing.length > 0 && feed.settings.resizingEnabled) {
440
  var itemOffset = $(this.el).find('.sbi_item').length,
441
  cacheAll = typeof feed.settings.general.cache_all !== 'undefined' ? feed.settings.general.cache_all : false;
442
-
 
 
 
443
  var submitData = {
444
  action: 'sbi_resized_images_submit',
445
  needs_resizing: feed.needsResizing,
@@ -448,7 +452,8 @@ if(!sbi_js_exists) {
448
  atts: feed.settings.shortCodeAtts,
449
  location: feed.locationGuess(),
450
  post_id: feed.settings.postID,
451
- cache_all: cacheAll
 
452
  };
453
  var onSuccess = function(data) {
454
  if (data.trim().indexOf('{') === 0) {
@@ -470,12 +475,17 @@ if(!sbi_js_exists) {
470
  };
471
  sbiAjax(submitData,onSuccess);
472
  } else if (feed.settings.locator) {
 
 
 
 
473
  var submitData = {
474
  action: 'sbi_do_locator',
475
  feed_id: feed.settings.feedID,
476
  atts: feed.settings.shortCodeAtts,
477
  location: feed.locationGuess(),
478
- post_id: feed.settings.postID
 
479
  };
480
  var onSuccess = function(data) {
481
 
@@ -498,6 +508,11 @@ if(!sbi_js_exists) {
498
  feed = this;
499
  feed.page ++;
500
 
 
 
 
 
 
501
  var itemOffset = $self.find('.sbi_item').length,
502
  submitData = {
503
  action: 'sbi_load_more_clicked',
@@ -507,7 +522,8 @@ if(!sbi_js_exists) {
507
  atts: feed.settings.shortCodeAtts,
508
  location: feed.locationGuess(),
509
  post_id: feed.settings.postID,
510
- current_resolution: feed.imageResolution
 
511
  };
512
  var onSuccess = function (data) {
513
  if (data.trim().indexOf('{') === 0) {
@@ -963,7 +979,7 @@ if(!sbi_js_exists) {
963
  if (CLI_Cookie.read('cookielawinfo-checkbox-non-necessary') !== null) {
964
  this.settings.consentGiven = CLI_Cookie.read('cookielawinfo-checkbox-non-necessary') === 'yes';
965
  }
966
-
967
  if (CLI_Cookie.read('cookielawinfo-checkbox-necessary') !== null) {
968
  this.settings.consentGiven = CLI_Cookie.read('cookielawinfo-checkbox-necessary') === 'yes';
969
  }
435
  }
436
  },
437
  sendNeedsResizingToServer: function() {
438
+ var feed = this,
439
+ $self = $(this.el);
440
  if (feed.needsResizing.length > 0 && feed.settings.resizingEnabled) {
441
  var itemOffset = $(this.el).find('.sbi_item').length,
442
  cacheAll = typeof feed.settings.general.cache_all !== 'undefined' ? feed.settings.general.cache_all : false;
443
+ var locatorNonce = '';
444
+ if ( typeof $self.attr( 'data-locatornonce' ) !== 'undefined' ) {
445
+ locatorNonce = $self.attr( 'data-locatornonce' );
446
+ }
447
  var submitData = {
448
  action: 'sbi_resized_images_submit',
449
  needs_resizing: feed.needsResizing,
452
  atts: feed.settings.shortCodeAtts,
453
  location: feed.locationGuess(),
454
  post_id: feed.settings.postID,
455
+ cache_all: cacheAll,
456
+ locator_nonce: locatorNonce
457
  };
458
  var onSuccess = function(data) {
459
  if (data.trim().indexOf('{') === 0) {
475
  };
476
  sbiAjax(submitData,onSuccess);
477
  } else if (feed.settings.locator) {
478
+ var locatorNonce = '';
479
+ if ( typeof $self.attr( 'data-locatornonce' ) !== 'undefined' ) {
480
+ locatorNonce = $self.attr( 'data-locatornonce' );
481
+ }
482
  var submitData = {
483
  action: 'sbi_do_locator',
484
  feed_id: feed.settings.feedID,
485
  atts: feed.settings.shortCodeAtts,
486
  location: feed.locationGuess(),
487
+ post_id: feed.settings.postID,
488
+ locator_nonce: locatorNonce
489
  };
490
  var onSuccess = function(data) {
491
 
508
  feed = this;
509
  feed.page ++;
510
 
511
+ var locatorNonce = '';
512
+ if ( typeof $self.attr( 'data-locatornonce' ) !== 'undefined' ) {
513
+ locatorNonce = $self.attr( 'data-locatornonce' );
514
+ }
515
+
516
  var itemOffset = $self.find('.sbi_item').length,
517
  submitData = {
518
  action: 'sbi_load_more_clicked',
522
  atts: feed.settings.shortCodeAtts,
523
  location: feed.locationGuess(),
524
  post_id: feed.settings.postID,
525
+ current_resolution: feed.imageResolution,
526
+ locator_nonce: locatorNonce
527
  };
528
  var onSuccess = function (data) {
529
  if (data.trim().indexOf('{') === 0) {
979
  if (CLI_Cookie.read('cookielawinfo-checkbox-non-necessary') !== null) {
980
  this.settings.consentGiven = CLI_Cookie.read('cookielawinfo-checkbox-non-necessary') === 'yes';
981
  }
982
+
983
  if (CLI_Cookie.read('cookielawinfo-checkbox-necessary') !== null) {
984
  this.settings.consentGiven = CLI_Cookie.read('cookielawinfo-checkbox-necessary') === 'yes';
985
  }
js/sb-instagram-2-2.min.js CHANGED
@@ -1 +1 @@
1
- var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function(i){function e(){var i,e,s,t=t||{VER:"0.9.944"};t.bgs_Available=!1,t.bgs_CheckRunned=!1,function(i){i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!t.bgs_CheckRunned){t.bgs_CheckRunned=!0;var e=i('<span style="background-size:cover" />');i("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var s=window.getComputedStyle(i,null);s&&s.backgroundSize&&(t.bgs_Available="cover"===s.backgroundSize)}}(),e.remove()}}();var s=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function n(){(r.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(r=c.data("sbi_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&a(),l.sizeOld=l.actualSize,setTimeout(n,r.responsiveCheckTime))}function o(){c.data("sbi_imgLiquid_error",!0),l.addClass("sbi_imgLiquid_error"),r.onItemError&&r.onItemError(e,l,c),d()}function a(){var i,s,t,n,o,a,h,g,f=0,u=0,b=l.width(),_=l.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),r.fill===b/_>=c.data("owidth")/c.data("oheight")?(i="100%",s="auto",t=Math.floor(b),n=Math.floor(b*(c.data("oheight")/c.data("owidth")))):(i="auto",s="100%",t=Math.floor(_*(c.data("owidth")/c.data("oheight"))),n=Math.floor(_)),h=b-t,"left"===(o=r.horizontalAlign.toLowerCase())&&(u=0),"center"===o&&(u=.5*h),"right"===o&&(u=h),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(u=h*o*.01)),g=_-n,"left"===(a=r.verticalAlign.toLowerCase())&&(f=0),"center"===a&&(f=.5*g),"bottom"===a&&(f=g),-1!==a.indexOf("%")&&((a=parseInt(a.replace("%",""),10))>0&&(f=g*a*.01)),r.hardPixels&&(i=t,s=n),c.css({width:i,height:s,"margin-left":Math.floor(u),"margin-top":Math.floor(f)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(r.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sbi_imgLiquid_nobgSize"),l.addClass("sbi_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(e,l,c),d()}function d(){e===s.length-1&&s.settings.onFinish&&s.settings.onFinish()}var r=s.settings,l=i(this),c=i("img:first",l);return c.length?(c.data("sbi_imgLiquid_settings")?(l.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),r=i.extend({},c.data("sbi_imgLiquid_settings"),s.options)):r=i.extend({},s.settings,function(){var i={};if(s.settings.useDataHtmlAttr){var e=l.attr("data-sbi_imgLiquid-fill"),n=l.attr("data-sbi_imgLiquid-horizontalAlign"),o=l.attr("data-sbi_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(i.fill=Boolean("true"===e)),void 0===n||"left"!==n&&"center"!==n&&"right"!==n&&-1===n.indexOf("%")||(i.horizontalAlign=n),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(i.verticalAlign=o)}return t.isIE&&s.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}()),c.data("sbi_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(e,l,c),void(t.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(c.attr("src")))&&l.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",l).css({display:"block",width:"100%",height:"100%"}),i("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(e,l,c),l.addClass("sbi_imgLiquid_bgSize"),l.addClass("sbi_imgLiquid_ready"),d()):function s(){if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var t=c.clone().removeAttr("style");return t.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(t),c.remove(),(c=t)[0].width=0,void setTimeout(s,10)}return c.data("sbi_imgLiquid_oldProcessed")?void a():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),i("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",o),c[0].onerror=o,function i(){c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(l.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(a,e*r.delay)):setTimeout(i,r.timecheckvisibility))}(),void n())}())):void o()})}})}(jQuery),i=t.injectCss,e=document.getElementsByTagName("head")[0],(s=document.createElement("style")).type="text/css",s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i)),e.appendChild(s)}function s(){this.feeds={},this.options=sb_instagram_js_options}function t(i,e,s){this.el=i,this.index=e,this.settings=s,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.page=1,this.isInitialized=!1}function n(e,s){i.ajax({url:sbiajaxurl,type:"post",data:e,success:s})}s.prototype={createPage:function(e,s){void 0!==window.sbiajaxurl&&-1!==window.sbiajaxurl.indexOf(window.location.hostname)||(window.sbiajaxurl=location.protocol+"//"+window.location.hostname+"/wp-admin/admin-ajax.php"),i(".sbi_no_js_error_message").remove(),i(".sbi_no_js").removeClass("sbi_no_js"),e(s)},createFeeds:function(e){e.whenFeedsCreated(i(".sbi").each(function(e){i(this).attr("data-sbi-index",e+1);var s=i(this),o=void 0!==s.attr("data-sbi-flags")?s.attr("data-sbi-flags").split(","):[],a=void 0!==s.attr("data-options")?JSON.parse(s.attr("data-options")):{};if(o.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;n({action:"sbi_on_ajax_test_trigger"},function(i){console.log("did test")})}var d={cols:s.attr("data-cols"),colsmobile:void 0!==s.attr("data-colsmobile")&&"same"!==s.attr("data-colsmobile")?s.attr("data-colsmobile"):s.attr("data-cols"),num:s.attr("data-num"),imgRes:s.attr("data-res"),feedID:s.attr("data-feedid"),postID:"undefind"!=typeof s.attr("data-postid")?s.attr("data-postid"):"unknown",shortCodeAtts:s.attr("data-shortcode-atts"),resizingEnabled:-1===o.indexOf("resizeDisable"),imageLoadEnabled:-1===o.indexOf("imageLoadDisable"),debugEnabled:o.indexOf("debug")>-1,favorLocal:o.indexOf("favorLocal")>-1,ajaxPostLoad:o.indexOf("ajaxPostLoad")>-1,gdpr:o.indexOf("gdpr")>-1,overrideBlockCDN:o.indexOf("overrideBlockCDN")>-1,consentGiven:!1,locator:o.indexOf("locator")>-1,autoMinRes:1,general:a};window.sbi.feeds[e]=function(i,e,s){return new t(i,e,s)}(this,e,d),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var r=jQuery.Event("sbiafterfeedcreate");r.feed=window.sbi.feeds[e],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){i(".sb_instagram_header").each(function(){var e=i(this);e.find(".sbi_header_link").on("mouseenter mouseleave",function(i){switch(i.type){case"mouseenter":e.find(".sbi_header_img_hover").addClass("sbi_fade_in");break;case"mouseleave":e.find(".sbi_header_img_hover").removeClass("sbi_fade_in")}})})},encodeHTML:function(i){return void 0===i?"":i.replace(/(>)/g,"&gt;").replace(/(<)/g,"&lt;").replace(/(&lt;br\/&gt;)/g,"<br>").replace(/(&lt;br&gt;)/g,"<br>")},urlDetect:function(i){return i.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}},t.prototype={init:function(){var e=this;e.settings.consentGiven=e.checkConsent(),i(this.el).find(".sbi_photo").parent("p").length&&i(this.el).addClass("sbi_no_autop"),i(this.el).find("#sbi_mod_error").length&&i(this.el).prepend(i(this.el).find("#sbi_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var s,t=(s=0,function(i,e){clearTimeout(s),s=setTimeout(i,e)});jQuery(window).on("resize",function(){t(function(){e.afterResize()},500)}),i(this.el).find(".sbi_item").each(function(){e.lazyLoadCheck(i(this))})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(i){i.find(".sbi_loader").removeClass("sbi_hidden"),i.find(".sbi_btn_text").addClass("sbi_hidden"),i.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var e=i(this.el),s=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){e.find(".sbi_loader").addClass("sbi_hidden"),e.find(".sbi_btn_text").removeClass("sbi_hidden"),s.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var e=i(this.el);e.find(".sbi-screenreader").each(function(){i(this).find("img").remove()}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),e.find(".sbi_item").each(function(i){jQuery(this).find(".sbi_photo").on("mouseenter mouseleave",function(i){switch(i.type){case"mouseenter":jQuery(this).fadeTo(200,.85);break;case"mouseleave":jQuery(this).stop().fadeTo(500,1)}})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var i=10;e.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},i),i+=10})},500)},lazyLoadCheck:function(e){if(e.find(".sbi_photo").length&&!e.closest(".sbi").hasClass("sbi-no-ll-check")){var s=this.getImageUrls(e),t=void 0!==s[640]?s[640]:e.find(".sbi_photo").attr("data-full-res");if(!this.settings.consentGiven&&t.indexOf("scontent")>-1)return;e.find(".sbi_photo img").each(function(){t&&void 0!==i(this).attr("data-src")&&i(this).attr("data-src",t),t&&void 0!==i(this).attr("data-orig-src")&&i(this).attr("data-orig-src",t),i(this).on("load",function(){!i(this).hasClass("sbi-replaced")&&i(this).attr("src").indexOf("placeholder")>-1&&(i(this).addClass("sbi-replaced"),t&&(i(this).attr("src",t),i(this).closest(".sbi_imgLiquid_bgSize").length&&i(this).closest(".sbi_imgLiquid_bgSize").css("background-image","url("+t+")")))})})}},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.settings.imageLoadEnabled||i(".sbi_no_resraise").removeClass("sbi_no_resraise");var e=i.Event("sbiafterimagesloaded");e.el=i(this.el),i(window).trigger(e)},setResizedImages:function(){i(this.el).find(".sbi_resized_image_data").length&&void 0!==i(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===i(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(i(this.el).find(".sbi_resized_image_data").attr("data-resized")),i(this.el).find(".sbi_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this;if(e.needsResizing.length>0&&e.settings.resizingEnabled){var s=i(this.el).find(".sbi_item").length,t=void 0!==e.settings.general.cache_all&&e.settings.general.cache_all;n({action:"sbi_resized_images_submit",needs_resizing:e.needsResizing,offset:s,feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID,cache_all:t},function(i){if(0===i.trim().indexOf("{")){var s=JSON.parse(i);for(var t in e.settings.debugEnabled&&console.log(s),s)s.hasOwnProperty(t)&&(e.resizedImages[t]=s[t]);e.maybeRaiseImageResolution(),setTimeout(function(){e.afterResize()},500)}})}else if(e.settings.locator){n({action:"sbi_do_locator",feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID},function(i){})}},loadMoreButtonInit:function(){var e=i(this.el),s=this;e.find("#sbi_load .sbi_load_btn").off().on("click",function(){s.afterLoadMoreClicked(jQuery(this)),s.getNewPostSet()})},getNewPostSet:function(){var e=i(this.el),s=this;s.page++;n({action:"sbi_load_more_clicked",offset:e.find(".sbi_item").length,page:s.page,feed_id:s.settings.feedID,atts:s.settings.shortCodeAtts,location:s.locationGuess(),post_id:s.settings.postID,current_resolution:s.imageResolution},function(t){if(0===t.trim().indexOf("{")){var n=JSON.parse(t);s.settings.debugEnabled&&console.log(n),s.appendNewPosts(n.html),s.addResizedImages(n.resizedImages),s.settings.ajaxPostLoad?(s.settings.ajaxPostLoad=!1,s.afterInitialImagesLoaded()):s.afterNewImagesLoaded(),n.feedStatus.shouldPaginate?s.outOfPages=!1:(s.outOfPages=!0,e.find(".sbi_load_btn").hide()),i(".sbi_no_js").removeClass("sbi_no_js")}})},appendNewPosts:function(e){var s=i(this.el);s.find("#sbi_images .sbi_item").length?s.find("#sbi_images .sbi_item").last().after(e):s.find("#sbi_images").append(e)},addResizedImages:function(i){for(var e in i)this.resizedImages[e]=i[e]},setImageHeight:function(){var e=i(this.el),s=e.find(".sbi_photo").eq(0).innerWidth(),t=this.getColumnCount(),n=e.find("#sbi_images").innerWidth()-e.find("#sbi_images").width(),o=n/2;sbi_photo_width_manual=e.find("#sbi_images").width()/t-n,e.find(".sbi_photo").css("height",s),e.find(".sbi-owl-nav").length&&setTimeout(function(){var i=2;e.find(".sbi_owl2row-item").length&&(i=1);var s=e.find(".sbi_photo").eq(0).innerWidth()/i;s+=parseInt(o)*(2-i+2),e.find(".sbi-owl-nav div").css("top",s)},100)},maybeRaiseSingleImageResolution:function(e,s,t){var n=this,o=n.getImageUrls(e),a=e.find(".sbi_photo img").attr("src"),d=150,r=e.find("img").get(0),l=a===window.sbi.options.placeholder?1:r.naturalWidth/r.naturalHeight;t=void 0!==t&&t;if(!(e.hasClass("sbi_no_resraise")||e.hasClass("sbi_had_error")||e.find(".sbi_link_area").length&&e.find(".sbi_link_area").hasClass("sbi_had_error")))if(o.length<1)e.find(".sbi_link_area").length&&e.find(".sbi_link_area").attr("href",window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png"));else{(e.find(".sbi_link_area").length&&e.find(".sbi_link_area").attr("href")===window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png")||!n.settings.consentGiven)&&e.find(".sbi_link_area").attr("href",o[o.length-1]),void 0!==o[640]&&e.find(".sbi_photo").attr("data-full-res",o[640]),i.each(o,function(i,e){e===a&&(d=parseInt(i),t=!1)});var c=640;switch(n.settings.imgRes){case"thumb":c=150;break;case"medium":c=320;break;case"full":c=640;break;default:var h=Math.max(n.settings.autoMinRes,e.find(".sbi_photo").innerWidth()),g=n.getBestResolutionForAuto(h,l,e);switch(g){case 320:c=320;break;case 150:c=150}}if(c>d||a===window.sbi.options.placeholder||t){if(n.settings.debugEnabled){var f=a===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+a,f)}var u=o[c].split("?ig_cache_key")[0];if(a!==u&&(e.find(".sbi_photo img").attr("src",u),e.find(".sbi_photo").css("background-image",'url("'+u+'")')),d=c,"auto"===n.settings.imgRes){var b=!1;e.find(".sbi_photo img").on("load",function(){var s=i(this),t=s.get(0).naturalWidth/s.get(0).naturalHeight;if(1e3!==s.get(0).naturalWidth&&t>l&&!b){switch(n.settings.debugEnabled&&console.log("rais res again for aspect ratio change "+a),b=!0,h=e.find(".sbi_photo").innerWidth(),g=n.getBestResolutionForAuto(h,t,e),c=640,g){case 320:c=320;break;case 150:c=150}c>d&&(u=o[c].split("?ig_cache_key")[0],s.attr("src",u),s.closest(".sbi_photo").css("background-image",'url("'+u+'")')),"masonry"!==n.layout&&"highlight"!==n.layout||(i(n.el).find("#sbi_images").smashotope(n.isotopeArgs),setTimeout(function(){i(n.el).find("#sbi_images").smashotope(n.isotopeArgs)},500))}else if(n.settings.debugEnabled){var r=b?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+a,r)}})}}e.find("img").on("error",function(){if(i(this).hasClass("sbi_img_error"))console.log("unfixed error "+i(this).attr("src"));else{var e;if(i(this).addClass("sbi_img_error"),!(i(this).attr("src").indexOf("media/?size=")>-1||i(this).attr("src").indexOf("cdninstagram")>-1||i(this).attr("src").indexOf("fbcdn")>-1)&&n.settings.consentGiven){if("undefined"!==i(this).closest(".sbi_photo").attr("data-img-src-set"))void 0!==(e=JSON.parse(i(this).closest(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/"))).d&&(i(this).attr("src",e.d),i(this).closest(".sbi_photo").css("background-image","url("+e.d+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"))}else n.settings.favorLocal=!0,void 0!==(e=n.getImageUrls(i(this).closest(".sbi_item")))[640]&&(i(this).attr("src",e[640]),i(this).closest(".sbi_photo").css("background-image","url("+e[640]+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"));setTimeout(function(){n.afterResize()},1500)}})}},maybeRaiseImageResolution:function(e){var s=this,t=void 0!==e&&!0===e?".sbi_item.sbi_new":".sbi_item",n=!s.isInitialized;i(s.el).find(t).each(function(e){!i(this).hasClass("sbi_num_diff_hide")&&i(this).find(".sbi_photo").length&&void 0!==i(this).find(".sbi_photo").attr("data-img-src-set")&&s.maybeRaiseSingleImageResolution(i(this),e,n)}),s.isInitialized=!0},getBestResolutionForAuto:function(e,s,t){(isNaN(s)||s<1)&&(s=1);var n=e*s,o=10*Math.ceil(n/10),a=[150,320,640];if(t.hasClass("sbi_highlighted")&&(o*=2),-1===a.indexOf(parseInt(o))){var d=!1;i.each(a,function(i,e){e>parseInt(o)&&!d&&(o=e,d=!0)})}return o},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var e=i(this.el),s=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,t=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):s;i(window).width()<480?t<e.find(".sbi_item").length&&e.find(".sbi_item").slice(t-e.find(".sbi_item").length).addClass("sbi_num_diff_hide"):s<e.find(".sbi_item").length&&e.find(".sbi_item").slice(s-e.find(".sbi_item").length).addClass("sbi_num_diff_hide")}},setImageSizeClass:function(){var e=i(this.el);e.removeClass("sbi_small sbi_medium");var s=e.innerWidth(),t=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,n=this.getColumnCount(),o=(s-t*(n+2))/n;o>120&&o<240?e.addClass("sbi_medium"):o<=120&&e.addClass("sbi_small")},setMinImageWidth:function(){i(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=i(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(i){var e=JSON.parse(i.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),s=i.attr("id").replace("sbi_","");if(this.settings.consentGiven||this.settings.overrideBlockCDN||(e=[]),void 0!==this.resizedImages[s]&&"video"!==this.resizedImages[s]&&"pending"!==this.resizedImages[s]&&"error"!==this.resizedImages[s].id&&"video"!==this.resizedImages[s].id&&"pending"!==this.resizedImages[s].id){if(void 0!==this.resizedImages[s].sizes){var t=[];void 0!==this.resizedImages[s].sizes.full&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg",t.push(640)),void 0!==this.resizedImages[s].sizes.low&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg",t.push(320)),void 0!==this.resizedImages[s].sizes.thumb&&(t.push(150),e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg"),this.settings.favorLocal&&(-1===t.indexOf(640)&&t.indexOf(320)>-1&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"),-1===t.indexOf(320)&&(t.indexOf(640)>-1?e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg":t.indexOf(150)>-1&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg")),-1===t.indexOf(150)&&(t.indexOf(320)>-1?e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg":t.indexOf(640)>-1&&(e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg")))}}else(void 0===this.resizedImages[s]||void 0!==this.resizedImages[s].id&&"pending"!==this.resizedImages[s].id&&"error"!==this.resizedImages[s].id)&&this.addToNeedsResizing(s);return e},getAvatarUrl:function(i,e){if(""===i)return"";var s=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":void 0!==s[i]?s[i]:"":void 0!==s[i]?s[i]:void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":""},addToNeedsResizing:function(i){-1===this.needsResizing.indexOf(i)&&this.needsResizing.push(i)},applyImageLiquid:function(){var s=i(this.el);e(),"function"==typeof s.find(".sbi_photo").sbi_imgLiquid&&s.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var e,s,t,n=this;e=jQuery,s={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},t={sbiCheckVisibility:function(i,e){if(jQuery.contains(document,i[0])){var s=e.sbiPreviousVisibility,n=i.is(":visible");e.sbiPreviousVisibility=n,null==s?e.runOnLoad&&e.callback(i,n):s!==n&&e.callback(i,n),setTimeout(function(){t.sbiCheckVisibility(i,e)},e.frequency)}}},e.fn.sbiVisibilityChanged=function(i){var n=e.extend({},s,i);return this.each(function(){t.sbiCheckVisibility(e(this),n)})},"function"==typeof i(this.el).filter(":hidden").sbiVisibilityChanged&&i(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(i,e){n.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=i(this.el),s=this.settings.cols,t=this.settings.colsmobile,n=s;return sbiWindowWidth=window.innerWidth,e.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(s)>2&&parseInt(s)<7&&(n=2),sbiWindowWidth<640&&parseInt(s)>6&&parseInt(s)<11&&(n=4),sbiWindowWidth<=480&&parseInt(s)>2&&(n=1)):sbiWindowWidth<=480&&(n=t),parseInt(n)},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var i=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===i.length){var e=i.pop().split(";").shift();this.settings.consentGiven="true"===e}}else void 0!==window.cookieconsent?this.settings.consentGiven="allow"===function(i){for(var e=i+"=",s=window.document.cookie.split(";"),t=0;t<s.length;t++){var n=s[t].trim();if(0==n.indexOf(e))return n.substring(e.length,n.length)}return""}("complianz_consent_status"):void 0!==window.Cookiebot?this.settings.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(this.settings.consentGiven=window.BorlabsCookie.checkCookieConsent("instagram"));var s=jQuery.Event("sbicheckconsent");return s.feed=this,jQuery(window).trigger(s),this.settings.consentGiven},afterConsentToggled:function(){if(this.checkConsent()){var i=this;i.maybeRaiseImageResolution(),setTimeout(function(){i.afterResize()},500)}},locationGuess:function(){var e=i(this.el),s="content";return e.closest("footer").length?s="footer":e.closest(".header").length||e.closest("header").length?s="header":(e.closest(".sidebar").length||e.closest("aside").length)&&(s="sidebar"),s}},window.sbi_init=function(){window.sbi=new s,window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})}}(jQuery),jQuery(document).ready(function(i){void 0===window.sb_instagram_js_options&&(window.sb_instagram_js_options={font_method:"svg",resized_url:location.protocol+"//"+window.location.hostname+"/wp-content/uploads/sb-instagram-feed-images/",placeholder:location.protocol+"//"+window.location.hostname+"/wp-content/plugins/instagram-feed/img/placeholder.png"}),void 0!==window.sb_instagram_js_options.resized_url&&-1===window.sb_instagram_js_options.resized_url.indexOf(location.protocol)&&("http:"===location.protocol?window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("https:","http:"):window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("http:","https:")),sbi_init(),i("#cookie-notice a").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i(window).on("CookiebotOnAccept",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!0,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("cmplzAcceptAll",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!0,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("cmplzRevoke",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("borlabs-cookie-consent-saved",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})})}));
1
+ var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function(i){function e(){var i,e,t,s=s||{VER:"0.9.944"};s.bgs_Available=!1,s.bgs_CheckRunned=!1,function(i){i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!s.bgs_CheckRunned){s.bgs_CheckRunned=!0;var e=i('<span style="background-size:cover" />');i("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var t=window.getComputedStyle(i,null);t&&t.backgroundSize&&(s.bgs_Available="cover"===t.backgroundSize)}}(),e.remove()}}();var t=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function n(){(r.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(r=c.data("sbi_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&a(),l.sizeOld=l.actualSize,setTimeout(n,r.responsiveCheckTime))}function o(){c.data("sbi_imgLiquid_error",!0),l.addClass("sbi_imgLiquid_error"),r.onItemError&&r.onItemError(e,l,c),d()}function a(){var i,t,s,n,o,a,h,g,f=0,u=0,b=l.width(),_=l.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),r.fill===b/_>=c.data("owidth")/c.data("oheight")?(i="100%",t="auto",s=Math.floor(b),n=Math.floor(b*(c.data("oheight")/c.data("owidth")))):(i="auto",t="100%",s=Math.floor(_*(c.data("owidth")/c.data("oheight"))),n=Math.floor(_)),h=b-s,"left"===(o=r.horizontalAlign.toLowerCase())&&(u=0),"center"===o&&(u=.5*h),"right"===o&&(u=h),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(u=h*o*.01)),g=_-n,"left"===(a=r.verticalAlign.toLowerCase())&&(f=0),"center"===a&&(f=.5*g),"bottom"===a&&(f=g),-1!==a.indexOf("%")&&((a=parseInt(a.replace("%",""),10))>0&&(f=g*a*.01)),r.hardPixels&&(i=s,t=n),c.css({width:i,height:t,"margin-left":Math.floor(u),"margin-top":Math.floor(f)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(r.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sbi_imgLiquid_nobgSize"),l.addClass("sbi_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(e,l,c),d()}function d(){e===t.length-1&&t.settings.onFinish&&t.settings.onFinish()}var r=t.settings,l=i(this),c=i("img:first",l);return c.length?(c.data("sbi_imgLiquid_settings")?(l.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),r=i.extend({},c.data("sbi_imgLiquid_settings"),t.options)):r=i.extend({},t.settings,function(){var i={};if(t.settings.useDataHtmlAttr){var e=l.attr("data-sbi_imgLiquid-fill"),n=l.attr("data-sbi_imgLiquid-horizontalAlign"),o=l.attr("data-sbi_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(i.fill=Boolean("true"===e)),void 0===n||"left"!==n&&"center"!==n&&"right"!==n&&-1===n.indexOf("%")||(i.horizontalAlign=n),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(i.verticalAlign=o)}return s.isIE&&t.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}()),c.data("sbi_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(e,l,c),void(s.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(c.attr("src")))&&l.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",l).css({display:"block",width:"100%",height:"100%"}),i("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(e,l,c),l.addClass("sbi_imgLiquid_bgSize"),l.addClass("sbi_imgLiquid_ready"),d()):function t(){if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var s=c.clone().removeAttr("style");return s.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(s),c.remove(),(c=s)[0].width=0,void setTimeout(t,10)}return c.data("sbi_imgLiquid_oldProcessed")?void a():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),i("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",o),c[0].onerror=o,function i(){c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(l.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(a,e*r.delay)):setTimeout(i,r.timecheckvisibility))}(),void n())}())):void o()})}})}(jQuery),i=s.injectCss,e=document.getElementsByTagName("head")[0],(t=document.createElement("style")).type="text/css",t.styleSheet?t.styleSheet.cssText=i:t.appendChild(document.createTextNode(i)),e.appendChild(t)}function t(){this.feeds={},this.options=sb_instagram_js_options}function s(i,e,t){this.el=i,this.index=e,this.settings=t,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.page=1,this.isInitialized=!1}function n(e,t){i.ajax({url:sbiajaxurl,type:"post",data:e,success:t})}t.prototype={createPage:function(e,t){void 0!==window.sbiajaxurl&&-1!==window.sbiajaxurl.indexOf(window.location.hostname)||(window.sbiajaxurl=location.protocol+"//"+window.location.hostname+"/wp-admin/admin-ajax.php"),i(".sbi_no_js_error_message").remove(),i(".sbi_no_js").removeClass("sbi_no_js"),e(t)},createFeeds:function(e){e.whenFeedsCreated(i(".sbi").each(function(e){i(this).attr("data-sbi-index",e+1);var t=i(this),o=void 0!==t.attr("data-sbi-flags")?t.attr("data-sbi-flags").split(","):[],a=void 0!==t.attr("data-options")?JSON.parse(t.attr("data-options")):{};if(o.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;n({action:"sbi_on_ajax_test_trigger"},function(i){console.log("did test")})}var d={cols:t.attr("data-cols"),colsmobile:void 0!==t.attr("data-colsmobile")&&"same"!==t.attr("data-colsmobile")?t.attr("data-colsmobile"):t.attr("data-cols"),num:t.attr("data-num"),imgRes:t.attr("data-res"),feedID:t.attr("data-feedid"),postID:"undefind"!=typeof t.attr("data-postid")?t.attr("data-postid"):"unknown",shortCodeAtts:t.attr("data-shortcode-atts"),resizingEnabled:-1===o.indexOf("resizeDisable"),imageLoadEnabled:-1===o.indexOf("imageLoadDisable"),debugEnabled:o.indexOf("debug")>-1,favorLocal:o.indexOf("favorLocal")>-1,ajaxPostLoad:o.indexOf("ajaxPostLoad")>-1,gdpr:o.indexOf("gdpr")>-1,overrideBlockCDN:o.indexOf("overrideBlockCDN")>-1,consentGiven:!1,locator:o.indexOf("locator")>-1,autoMinRes:1,general:a};window.sbi.feeds[e]=function(i,e,t){return new s(i,e,t)}(this,e,d),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var r=jQuery.Event("sbiafterfeedcreate");r.feed=window.sbi.feeds[e],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){i(".sb_instagram_header").each(function(){var e=i(this);e.find(".sbi_header_link").on("mouseenter mouseleave",function(i){switch(i.type){case"mouseenter":e.find(".sbi_header_img_hover").addClass("sbi_fade_in");break;case"mouseleave":e.find(".sbi_header_img_hover").removeClass("sbi_fade_in")}})})},encodeHTML:function(i){return void 0===i?"":i.replace(/(>)/g,"&gt;").replace(/(<)/g,"&lt;").replace(/(&lt;br\/&gt;)/g,"<br>").replace(/(&lt;br&gt;)/g,"<br>")},urlDetect:function(i){return i.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)}},s.prototype={init:function(){var e=this;e.settings.consentGiven=e.checkConsent(),i(this.el).find(".sbi_photo").parent("p").length&&i(this.el).addClass("sbi_no_autop"),i(this.el).find("#sbi_mod_error").length&&i(this.el).prepend(i(this.el).find("#sbi_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var t,s=(t=0,function(i,e){clearTimeout(t),t=setTimeout(i,e)});jQuery(window).on("resize",function(){s(function(){e.afterResize()},500)}),i(this.el).find(".sbi_item").each(function(){e.lazyLoadCheck(i(this))})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(i){i.find(".sbi_loader").removeClass("sbi_hidden"),i.find(".sbi_btn_text").addClass("sbi_hidden"),i.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var e=i(this.el),t=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){e.find(".sbi_loader").addClass("sbi_hidden"),e.find(".sbi_btn_text").removeClass("sbi_hidden"),t.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var e=i(this.el);e.find(".sbi-screenreader").each(function(){i(this).find("img").remove()}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),e.find(".sbi_item").each(function(i){jQuery(this).find(".sbi_photo").on("mouseenter mouseleave",function(i){switch(i.type){case"mouseenter":jQuery(this).fadeTo(200,.85);break;case"mouseleave":jQuery(this).stop().fadeTo(500,1)}})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var i=10;e.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},i),i+=10})},500)},lazyLoadCheck:function(e){if(e.find(".sbi_photo").length&&!e.closest(".sbi").hasClass("sbi-no-ll-check")){var t=this.getImageUrls(e),s=void 0!==t[640]?t[640]:e.find(".sbi_photo").attr("data-full-res");if(!this.settings.consentGiven&&s.indexOf("scontent")>-1)return;e.find(".sbi_photo img").each(function(){s&&void 0!==i(this).attr("data-src")&&i(this).attr("data-src",s),s&&void 0!==i(this).attr("data-orig-src")&&i(this).attr("data-orig-src",s),i(this).on("load",function(){!i(this).hasClass("sbi-replaced")&&i(this).attr("src").indexOf("placeholder")>-1&&(i(this).addClass("sbi-replaced"),s&&(i(this).attr("src",s),i(this).closest(".sbi_imgLiquid_bgSize").length&&i(this).closest(".sbi_imgLiquid_bgSize").css("background-image","url("+s+")")))})})}},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.settings.imageLoadEnabled||i(".sbi_no_resraise").removeClass("sbi_no_resraise");var e=i.Event("sbiafterimagesloaded");e.el=i(this.el),i(window).trigger(e)},setResizedImages:function(){i(this.el).find(".sbi_resized_image_data").length&&void 0!==i(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===i(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(i(this.el).find(".sbi_resized_image_data").attr("data-resized")),i(this.el).find(".sbi_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this,t=i(this.el);if(e.needsResizing.length>0&&e.settings.resizingEnabled){var s=i(this.el).find(".sbi_item").length,o=void 0!==e.settings.general.cache_all&&e.settings.general.cache_all,a="";void 0!==t.attr("data-locatornonce")&&(a=t.attr("data-locatornonce")),n({action:"sbi_resized_images_submit",needs_resizing:e.needsResizing,offset:s,feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID,cache_all:o,locator_nonce:a},function(i){if(0===i.trim().indexOf("{")){var t=JSON.parse(i);for(var s in e.settings.debugEnabled&&console.log(t),t)t.hasOwnProperty(s)&&(e.resizedImages[s]=t[s]);e.maybeRaiseImageResolution(),setTimeout(function(){e.afterResize()},500)}})}else if(e.settings.locator){a="";void 0!==t.attr("data-locatornonce")&&(a=t.attr("data-locatornonce")),n({action:"sbi_do_locator",feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID,locator_nonce:a},function(i){})}},loadMoreButtonInit:function(){var e=i(this.el),t=this;e.find("#sbi_load .sbi_load_btn").off().on("click",function(){t.afterLoadMoreClicked(jQuery(this)),t.getNewPostSet()})},getNewPostSet:function(){var e=i(this.el),t=this;t.page++;var s="";void 0!==e.attr("data-locatornonce")&&(s=e.attr("data-locatornonce"));n({action:"sbi_load_more_clicked",offset:e.find(".sbi_item").length,page:t.page,feed_id:t.settings.feedID,atts:t.settings.shortCodeAtts,location:t.locationGuess(),post_id:t.settings.postID,current_resolution:t.imageResolution,locator_nonce:s},function(s){if(0===s.trim().indexOf("{")){var n=JSON.parse(s);t.settings.debugEnabled&&console.log(n),t.appendNewPosts(n.html),t.addResizedImages(n.resizedImages),t.settings.ajaxPostLoad?(t.settings.ajaxPostLoad=!1,t.afterInitialImagesLoaded()):t.afterNewImagesLoaded(),n.feedStatus.shouldPaginate?t.outOfPages=!1:(t.outOfPages=!0,e.find(".sbi_load_btn").hide()),i(".sbi_no_js").removeClass("sbi_no_js")}})},appendNewPosts:function(e){var t=i(this.el);t.find("#sbi_images .sbi_item").length?t.find("#sbi_images .sbi_item").last().after(e):t.find("#sbi_images").append(e)},addResizedImages:function(i){for(var e in i)this.resizedImages[e]=i[e]},setImageHeight:function(){var e=i(this.el),t=e.find(".sbi_photo").eq(0).innerWidth(),s=this.getColumnCount(),n=e.find("#sbi_images").innerWidth()-e.find("#sbi_images").width(),o=n/2;sbi_photo_width_manual=e.find("#sbi_images").width()/s-n,e.find(".sbi_photo").css("height",t),e.find(".sbi-owl-nav").length&&setTimeout(function(){var i=2;e.find(".sbi_owl2row-item").length&&(i=1);var t=e.find(".sbi_photo").eq(0).innerWidth()/i;t+=parseInt(o)*(2-i+2),e.find(".sbi-owl-nav div").css("top",t)},100)},maybeRaiseSingleImageResolution:function(e,t,s){var n=this,o=n.getImageUrls(e),a=e.find(".sbi_photo img").attr("src"),d=150,r=e.find("img").get(0),l=a===window.sbi.options.placeholder?1:r.naturalWidth/r.naturalHeight;s=void 0!==s&&s;if(!(e.hasClass("sbi_no_resraise")||e.hasClass("sbi_had_error")||e.find(".sbi_link_area").length&&e.find(".sbi_link_area").hasClass("sbi_had_error")))if(o.length<1)e.find(".sbi_link_area").length&&e.find(".sbi_link_area").attr("href",window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png"));else{(e.find(".sbi_link_area").length&&e.find(".sbi_link_area").attr("href")===window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png")||!n.settings.consentGiven)&&e.find(".sbi_link_area").attr("href",o[o.length-1]),void 0!==o[640]&&e.find(".sbi_photo").attr("data-full-res",o[640]),i.each(o,function(i,e){e===a&&(d=parseInt(i),s=!1)});var c=640;switch(n.settings.imgRes){case"thumb":c=150;break;case"medium":c=320;break;case"full":c=640;break;default:var h=Math.max(n.settings.autoMinRes,e.find(".sbi_photo").innerWidth()),g=n.getBestResolutionForAuto(h,l,e);switch(g){case 320:c=320;break;case 150:c=150}}if(c>d||a===window.sbi.options.placeholder||s){if(n.settings.debugEnabled){var f=a===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+a,f)}var u=o[c].split("?ig_cache_key")[0];if(a!==u&&(e.find(".sbi_photo img").attr("src",u),e.find(".sbi_photo").css("background-image",'url("'+u+'")')),d=c,"auto"===n.settings.imgRes){var b=!1;e.find(".sbi_photo img").on("load",function(){var t=i(this),s=t.get(0).naturalWidth/t.get(0).naturalHeight;if(1e3!==t.get(0).naturalWidth&&s>l&&!b){switch(n.settings.debugEnabled&&console.log("rais res again for aspect ratio change "+a),b=!0,h=e.find(".sbi_photo").innerWidth(),g=n.getBestResolutionForAuto(h,s,e),c=640,g){case 320:c=320;break;case 150:c=150}c>d&&(u=o[c].split("?ig_cache_key")[0],t.attr("src",u),t.closest(".sbi_photo").css("background-image",'url("'+u+'")')),"masonry"!==n.layout&&"highlight"!==n.layout||(i(n.el).find("#sbi_images").smashotope(n.isotopeArgs),setTimeout(function(){i(n.el).find("#sbi_images").smashotope(n.isotopeArgs)},500))}else if(n.settings.debugEnabled){var r=b?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+a,r)}})}}e.find("img").on("error",function(){if(i(this).hasClass("sbi_img_error"))console.log("unfixed error "+i(this).attr("src"));else{var e;if(i(this).addClass("sbi_img_error"),!(i(this).attr("src").indexOf("media/?size=")>-1||i(this).attr("src").indexOf("cdninstagram")>-1||i(this).attr("src").indexOf("fbcdn")>-1)&&n.settings.consentGiven){if("undefined"!==i(this).closest(".sbi_photo").attr("data-img-src-set"))void 0!==(e=JSON.parse(i(this).closest(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/"))).d&&(i(this).attr("src",e.d),i(this).closest(".sbi_photo").css("background-image","url("+e.d+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"))}else n.settings.favorLocal=!0,void 0!==(e=n.getImageUrls(i(this).closest(".sbi_item")))[640]&&(i(this).attr("src",e[640]),i(this).closest(".sbi_photo").css("background-image","url("+e[640]+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"));setTimeout(function(){n.afterResize()},1500)}})}},maybeRaiseImageResolution:function(e){var t=this,s=void 0!==e&&!0===e?".sbi_item.sbi_new":".sbi_item",n=!t.isInitialized;i(t.el).find(s).each(function(e){!i(this).hasClass("sbi_num_diff_hide")&&i(this).find(".sbi_photo").length&&void 0!==i(this).find(".sbi_photo").attr("data-img-src-set")&&t.maybeRaiseSingleImageResolution(i(this),e,n)}),t.isInitialized=!0},getBestResolutionForAuto:function(e,t,s){(isNaN(t)||t<1)&&(t=1);var n=e*t,o=10*Math.ceil(n/10),a=[150,320,640];if(s.hasClass("sbi_highlighted")&&(o*=2),-1===a.indexOf(parseInt(o))){var d=!1;i.each(a,function(i,e){e>parseInt(o)&&!d&&(o=e,d=!0)})}return o},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var e=i(this.el),t=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,s=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):t;i(window).width()<480?s<e.find(".sbi_item").length&&e.find(".sbi_item").slice(s-e.find(".sbi_item").length).addClass("sbi_num_diff_hide"):t<e.find(".sbi_item").length&&e.find(".sbi_item").slice(t-e.find(".sbi_item").length).addClass("sbi_num_diff_hide")}},setImageSizeClass:function(){var e=i(this.el);e.removeClass("sbi_small sbi_medium");var t=e.innerWidth(),s=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,n=this.getColumnCount(),o=(t-s*(n+2))/n;o>120&&o<240?e.addClass("sbi_medium"):o<=120&&e.addClass("sbi_small")},setMinImageWidth:function(){i(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=i(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(i){var e=JSON.parse(i.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),t=i.attr("id").replace("sbi_","");if(this.settings.consentGiven||this.settings.overrideBlockCDN||(e=[]),void 0!==this.resizedImages[t]&&"video"!==this.resizedImages[t]&&"pending"!==this.resizedImages[t]&&"error"!==this.resizedImages[t].id&&"video"!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id){if(void 0!==this.resizedImages[t].sizes){var s=[];void 0!==this.resizedImages[t].sizes.full&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg",s.push(640)),void 0!==this.resizedImages[t].sizes.low&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg",s.push(320)),void 0!==this.resizedImages[t].sizes.thumb&&(s.push(150),e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"thumb.jpg"),this.settings.favorLocal&&(-1===s.indexOf(640)&&s.indexOf(320)>-1&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg"),-1===s.indexOf(320)&&(s.indexOf(640)>-1?e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg":s.indexOf(150)>-1&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"thumb.jpg")),-1===s.indexOf(150)&&(s.indexOf(320)>-1?e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg":s.indexOf(640)>-1&&(e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg")))}}else(void 0===this.resizedImages[t]||void 0!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id&&"error"!==this.resizedImages[t].id)&&this.addToNeedsResizing(t);return e},getAvatarUrl:function(i,e){if(""===i)return"";var t=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==t["LCL"+i]&&1===parseInt(t["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":void 0!==t[i]?t[i]:"":void 0!==t[i]?t[i]:void 0!==t["LCL"+i]&&1===parseInt(t["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":""},addToNeedsResizing:function(i){-1===this.needsResizing.indexOf(i)&&this.needsResizing.push(i)},applyImageLiquid:function(){var t=i(this.el);e(),"function"==typeof t.find(".sbi_photo").sbi_imgLiquid&&t.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var e,t,s,n=this;e=jQuery,t={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},s={sbiCheckVisibility:function(i,e){if(jQuery.contains(document,i[0])){var t=e.sbiPreviousVisibility,n=i.is(":visible");e.sbiPreviousVisibility=n,null==t?e.runOnLoad&&e.callback(i,n):t!==n&&e.callback(i,n),setTimeout(function(){s.sbiCheckVisibility(i,e)},e.frequency)}}},e.fn.sbiVisibilityChanged=function(i){var n=e.extend({},t,i);return this.each(function(){s.sbiCheckVisibility(e(this),n)})},"function"==typeof i(this.el).filter(":hidden").sbiVisibilityChanged&&i(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(i,e){n.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=i(this.el),t=this.settings.cols,s=this.settings.colsmobile,n=t;return sbiWindowWidth=window.innerWidth,e.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(t)>2&&parseInt(t)<7&&(n=2),sbiWindowWidth<640&&parseInt(t)>6&&parseInt(t)<11&&(n=4),sbiWindowWidth<=480&&parseInt(t)>2&&(n=1)):sbiWindowWidth<=480&&(n=s),parseInt(n)},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var i=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===i.length){var e=i.pop().split(";").shift();this.settings.consentGiven="true"===e}}else void 0!==window.cookieconsent?this.settings.consentGiven="allow"===function(i){for(var e=i+"=",t=window.document.cookie.split(";"),s=0;s<t.length;s++){var n=t[s].trim();if(0==n.indexOf(e))return n.substring(e.length,n.length)}return""}("complianz_consent_status"):void 0!==window.Cookiebot?this.settings.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(this.settings.consentGiven=window.BorlabsCookie.checkCookieConsent("instagram"));var t=jQuery.Event("sbicheckconsent");return t.feed=this,jQuery(window).trigger(t),this.settings.consentGiven},afterConsentToggled:function(){if(this.checkConsent()){var i=this;i.maybeRaiseImageResolution(),setTimeout(function(){i.afterResize()},500)}},locationGuess:function(){var e=i(this.el),t="content";return e.closest("footer").length?t="footer":e.closest(".header").length||e.closest("header").length?t="header":(e.closest(".sidebar").length||e.closest("aside").length)&&(t="sidebar"),t}},window.sbi_init=function(){window.sbi=new t,window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})}}(jQuery),jQuery(document).ready(function(i){void 0===window.sb_instagram_js_options&&(window.sb_instagram_js_options={font_method:"svg",resized_url:location.protocol+"//"+window.location.hostname+"/wp-content/uploads/sb-instagram-feed-images/",placeholder:location.protocol+"//"+window.location.hostname+"/wp-content/plugins/instagram-feed/img/placeholder.png"}),void 0!==window.sb_instagram_js_options.resized_url&&-1===window.sb_instagram_js_options.resized_url.indexOf(location.protocol)&&("http:"===location.protocol?window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("https:","http:"):window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("http:","https:")),sbi_init(),i("#cookie-notice a").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i(window).on("CookiebotOnAccept",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!0,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("cmplzAcceptAll",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!0,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("cmplzRevoke",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("borlabs-cookie-consent-saved",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})})}));
js/sb-instagram-admin-2-2.js CHANGED
@@ -646,7 +646,8 @@ jQuery(document).ready(function($) {
646
  url : sbiA.ajax_url,
647
  type : 'post',
648
  data : {
649
- action : 'sbi_reset_resized'
 
650
  },
651
  success : function(data) {
652
  $sbiClearResizedButton.prop('disabled',false);
@@ -736,7 +737,8 @@ jQuery(document).ready(function($) {
736
  url : sbiA.ajax_url,
737
  type : 'post',
738
  data : {
739
- action : 'sbi_reset_log'
 
740
  },
741
  success : function(data) {
742
  $sbiClearLog.prop('disabled',false);
646
  url : sbiA.ajax_url,
647
  type : 'post',
648
  data : {
649
+ action : 'sbi_reset_resized',
650
+ sbi_nonce: sbiA.sbi_nonce
651
  },
652
  success : function(data) {
653
  $sbiClearResizedButton.prop('disabled',false);
737
  url : sbiA.ajax_url,
738
  type : 'post',
739
  data : {
740
+ action : 'sbi_reset_log',
741
+ sbi_nonce : sbiA.sbi_nonce,
742
  },
743
  success : function(data) {
744
  $sbiClearLog.prop('disabled',false);
js/sbi-scripts.js CHANGED
@@ -435,11 +435,15 @@ if(!sbi_js_exists) {
435
  }
436
  },
437
  sendNeedsResizingToServer: function() {
438
- var feed = this;
 
439
  if (feed.needsResizing.length > 0 && feed.settings.resizingEnabled) {
440
  var itemOffset = $(this.el).find('.sbi_item').length,
441
  cacheAll = typeof feed.settings.general.cache_all !== 'undefined' ? feed.settings.general.cache_all : false;
442
-
 
 
 
443
  var submitData = {
444
  action: 'sbi_resized_images_submit',
445
  needs_resizing: feed.needsResizing,
@@ -448,7 +452,8 @@ if(!sbi_js_exists) {
448
  atts: feed.settings.shortCodeAtts,
449
  location: feed.locationGuess(),
450
  post_id: feed.settings.postID,
451
- cache_all: cacheAll
 
452
  };
453
  var onSuccess = function(data) {
454
  if (data.trim().indexOf('{') === 0) {
@@ -470,12 +475,17 @@ if(!sbi_js_exists) {
470
  };
471
  sbiAjax(submitData,onSuccess);
472
  } else if (feed.settings.locator) {
 
 
 
 
473
  var submitData = {
474
  action: 'sbi_do_locator',
475
  feed_id: feed.settings.feedID,
476
  atts: feed.settings.shortCodeAtts,
477
  location: feed.locationGuess(),
478
- post_id: feed.settings.postID
 
479
  };
480
  var onSuccess = function(data) {
481
 
@@ -498,6 +508,11 @@ if(!sbi_js_exists) {
498
  feed = this;
499
  feed.page ++;
500
 
 
 
 
 
 
501
  var itemOffset = $self.find('.sbi_item').length,
502
  submitData = {
503
  action: 'sbi_load_more_clicked',
@@ -507,7 +522,8 @@ if(!sbi_js_exists) {
507
  atts: feed.settings.shortCodeAtts,
508
  location: feed.locationGuess(),
509
  post_id: feed.settings.postID,
510
- current_resolution: feed.imageResolution
 
511
  };
512
  var onSuccess = function (data) {
513
  if (data.trim().indexOf('{') === 0) {
@@ -963,7 +979,7 @@ if(!sbi_js_exists) {
963
  if (CLI_Cookie.read('cookielawinfo-checkbox-non-necessary') !== null) {
964
  this.settings.consentGiven = CLI_Cookie.read('cookielawinfo-checkbox-non-necessary') === 'yes';
965
  }
966
-
967
  if (CLI_Cookie.read('cookielawinfo-checkbox-necessary') !== null) {
968
  this.settings.consentGiven = CLI_Cookie.read('cookielawinfo-checkbox-necessary') === 'yes';
969
  }
435
  }
436
  },
437
  sendNeedsResizingToServer: function() {
438
+ var feed = this,
439
+ $self = $(this.el);
440
  if (feed.needsResizing.length > 0 && feed.settings.resizingEnabled) {
441
  var itemOffset = $(this.el).find('.sbi_item').length,
442
  cacheAll = typeof feed.settings.general.cache_all !== 'undefined' ? feed.settings.general.cache_all : false;
443
+ var locatorNonce = '';
444
+ if ( typeof $self.attr( 'data-locatornonce' ) !== 'undefined' ) {
445
+ locatorNonce = $self.attr( 'data-locatornonce' );
446
+ }
447
  var submitData = {
448
  action: 'sbi_resized_images_submit',
449
  needs_resizing: feed.needsResizing,
452
  atts: feed.settings.shortCodeAtts,
453
  location: feed.locationGuess(),
454
  post_id: feed.settings.postID,
455
+ cache_all: cacheAll,
456
+ locator_nonce: locatorNonce
457
  };
458
  var onSuccess = function(data) {
459
  if (data.trim().indexOf('{') === 0) {
475
  };
476
  sbiAjax(submitData,onSuccess);
477
  } else if (feed.settings.locator) {
478
+ var locatorNonce = '';
479
+ if ( typeof $self.attr( 'data-locatornonce' ) !== 'undefined' ) {
480
+ locatorNonce = $self.attr( 'data-locatornonce' );
481
+ }
482
  var submitData = {
483
  action: 'sbi_do_locator',
484
  feed_id: feed.settings.feedID,
485
  atts: feed.settings.shortCodeAtts,
486
  location: feed.locationGuess(),
487
+ post_id: feed.settings.postID,
488
+ locator_nonce: locatorNonce
489
  };
490
  var onSuccess = function(data) {
491
 
508
  feed = this;
509
  feed.page ++;
510
 
511
+ var locatorNonce = '';
512
+ if ( typeof $self.attr( 'data-locatornonce' ) !== 'undefined' ) {
513
+ locatorNonce = $self.attr( 'data-locatornonce' );
514
+ }
515
+
516
  var itemOffset = $self.find('.sbi_item').length,
517
  submitData = {
518
  action: 'sbi_load_more_clicked',
522
  atts: feed.settings.shortCodeAtts,
523
  location: feed.locationGuess(),
524
  post_id: feed.settings.postID,
525
+ current_resolution: feed.imageResolution,
526
+ locator_nonce: locatorNonce
527
  };
528
  var onSuccess = function (data) {
529
  if (data.trim().indexOf('{') === 0) {
979
  if (CLI_Cookie.read('cookielawinfo-checkbox-non-necessary') !== null) {
980
  this.settings.consentGiven = CLI_Cookie.read('cookielawinfo-checkbox-non-necessary') === 'yes';
981
  }
982
+
983
  if (CLI_Cookie.read('cookielawinfo-checkbox-necessary') !== null) {
984
  this.settings.consentGiven = CLI_Cookie.read('cookielawinfo-checkbox-necessary') === 'yes';
985
  }
js/sbi-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function(i){function e(){var i,e,s,t=t||{VER:"0.9.944"};t.bgs_Available=!1,t.bgs_CheckRunned=!1,function(i){i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!t.bgs_CheckRunned){t.bgs_CheckRunned=!0;var e=i('<span style="background-size:cover" />');i("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var s=window.getComputedStyle(i,null);s&&s.backgroundSize&&(t.bgs_Available="cover"===s.backgroundSize)}}(),e.remove()}}();var s=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function n(){(r.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(r=c.data("sbi_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&a(),l.sizeOld=l.actualSize,setTimeout(n,r.responsiveCheckTime))}function o(){c.data("sbi_imgLiquid_error",!0),l.addClass("sbi_imgLiquid_error"),r.onItemError&&r.onItemError(e,l,c),d()}function a(){var i,s,t,n,o,a,h,g,f=0,u=0,b=l.width(),_=l.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),r.fill===b/_>=c.data("owidth")/c.data("oheight")?(i="100%",s="auto",t=Math.floor(b),n=Math.floor(b*(c.data("oheight")/c.data("owidth")))):(i="auto",s="100%",t=Math.floor(_*(c.data("owidth")/c.data("oheight"))),n=Math.floor(_)),h=b-t,"left"===(o=r.horizontalAlign.toLowerCase())&&(u=0),"center"===o&&(u=.5*h),"right"===o&&(u=h),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(u=h*o*.01)),g=_-n,"left"===(a=r.verticalAlign.toLowerCase())&&(f=0),"center"===a&&(f=.5*g),"bottom"===a&&(f=g),-1!==a.indexOf("%")&&((a=parseInt(a.replace("%",""),10))>0&&(f=g*a*.01)),r.hardPixels&&(i=t,s=n),c.css({width:i,height:s,"margin-left":Math.floor(u),"margin-top":Math.floor(f)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(r.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sbi_imgLiquid_nobgSize"),l.addClass("sbi_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(e,l,c),d()}function d(){e===s.length-1&&s.settings.onFinish&&s.settings.onFinish()}var r=s.settings,l=i(this),c=i("img:first",l);return c.length?(c.data("sbi_imgLiquid_settings")?(l.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),r=i.extend({},c.data("sbi_imgLiquid_settings"),s.options)):r=i.extend({},s.settings,function(){var i={};if(s.settings.useDataHtmlAttr){var e=l.attr("data-sbi_imgLiquid-fill"),n=l.attr("data-sbi_imgLiquid-horizontalAlign"),o=l.attr("data-sbi_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(i.fill=Boolean("true"===e)),void 0===n||"left"!==n&&"center"!==n&&"right"!==n&&-1===n.indexOf("%")||(i.horizontalAlign=n),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(i.verticalAlign=o)}return t.isIE&&s.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}()),c.data("sbi_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(e,l,c),void(t.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(c.attr("src")))&&l.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",l).css({display:"block",width:"100%",height:"100%"}),i("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(e,l,c),l.addClass("sbi_imgLiquid_bgSize"),l.addClass("sbi_imgLiquid_ready"),d()):function s(){if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var t=c.clone().removeAttr("style");return t.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(t),c.remove(),(c=t)[0].width=0,void setTimeout(s,10)}return c.data("sbi_imgLiquid_oldProcessed")?void a():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),i("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",o),c[0].onerror=o,function i(){c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(l.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(a,e*r.delay)):setTimeout(i,r.timecheckvisibility))}(),void n())}())):void o()})}})}(jQuery),i=t.injectCss,e=document.getElementsByTagName("head")[0],(s=document.createElement("style")).type="text/css",s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i)),e.appendChild(s)}function s(){this.feeds={},this.options=sb_instagram_js_options}function t(i,e,s){this.el=i,this.index=e,this.settings=s,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.page=1,this.isInitialized=!1}function n(e,s){i.ajax({url:sbiajaxurl,type:"post",data:e,success:s})}s.prototype={createPage:function(e,s){void 0!==window.sbiajaxurl&&-1!==window.sbiajaxurl.indexOf(window.location.hostname)||(window.sbiajaxurl=location.protocol+"//"+window.location.hostname+"/wp-admin/admin-ajax.php"),i(".sbi_no_js_error_message").remove(),i(".sbi_no_js").removeClass("sbi_no_js"),e(s)},createFeeds:function(e){e.whenFeedsCreated(i(".sbi").each(function(e){i(this).attr("data-sbi-index",e+1);var s=i(this),o=void 0!==s.attr("data-sbi-flags")?s.attr("data-sbi-flags").split(","):[],a=void 0!==s.attr("data-options")?JSON.parse(s.attr("data-options")):{};if(o.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;n({action:"sbi_on_ajax_test_trigger"},function(i){console.log("did test")})}var d={cols:s.attr("data-cols"),colsmobile:void 0!==s.attr("data-colsmobile")&&"same"!==s.attr("data-colsmobile")?s.attr("data-colsmobile"):s.attr("data-cols"),num:s.attr("data-num"),imgRes:s.attr("data-res"),feedID:s.attr("data-feedid"),postID:"undefind"!=typeof s.attr("data-postid")?s.attr("data-postid"):"unknown",shortCodeAtts:s.attr("data-shortcode-atts"),resizingEnabled:-1===o.indexOf("resizeDisable"),imageLoadEnabled:-1===o.indexOf("imageLoadDisable"),debugEnabled:o.indexOf("debug")>-1,favorLocal:o.indexOf("favorLocal")>-1,ajaxPostLoad:o.indexOf("ajaxPostLoad")>-1,gdpr:o.indexOf("gdpr")>-1,overrideBlockCDN:o.indexOf("overrideBlockCDN")>-1,consentGiven:!1,locator:o.indexOf("locator")>-1,autoMinRes:1,general:a};window.sbi.feeds[e]=function(i,e,s){return new t(i,e,s)}(this,e,d),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var r=jQuery.Event("sbiafterfeedcreate");r.feed=window.sbi.feeds[e],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){i(".sb_instagram_header").each(function(){var e=i(this);e.find(".sbi_header_link").on("mouseenter mouseleave",function(i){switch(i.type){case"mouseenter":e.find(".sbi_header_img_hover").addClass("sbi_fade_in");break;case"mouseleave":e.find(".sbi_header_img_hover").removeClass("sbi_fade_in")}})})},encodeHTML:function(i){return void 0===i?"":i.replace(/(>)/g,"&gt;").replace(/(<)/g,"&lt;").replace(/(&lt;br\/&gt;)/g,"<br>").replace(/(&lt;br&gt;)/g,"<br>")},urlDetect:function(i){return i.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}},t.prototype={init:function(){var e=this;e.settings.consentGiven=e.checkConsent(),i(this.el).find(".sbi_photo").parent("p").length&&i(this.el).addClass("sbi_no_autop"),i(this.el).find("#sbi_mod_error").length&&i(this.el).prepend(i(this.el).find("#sbi_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var s,t=(s=0,function(i,e){clearTimeout(s),s=setTimeout(i,e)});jQuery(window).on("resize",function(){t(function(){e.afterResize()},500)}),i(this.el).find(".sbi_item").each(function(){e.lazyLoadCheck(i(this))})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(i){i.find(".sbi_loader").removeClass("sbi_hidden"),i.find(".sbi_btn_text").addClass("sbi_hidden"),i.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var e=i(this.el),s=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){e.find(".sbi_loader").addClass("sbi_hidden"),e.find(".sbi_btn_text").removeClass("sbi_hidden"),s.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var e=i(this.el);e.find(".sbi-screenreader").each(function(){i(this).find("img").remove()}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),e.find(".sbi_item").each(function(i){jQuery(this).find(".sbi_photo").on("mouseenter mouseleave",function(i){switch(i.type){case"mouseenter":jQuery(this).fadeTo(200,.85);break;case"mouseleave":jQuery(this).stop().fadeTo(500,1)}})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var i=10;e.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},i),i+=10})},500)},lazyLoadCheck:function(e){if(e.find(".sbi_photo").length&&!e.closest(".sbi").hasClass("sbi-no-ll-check")){var s=this.getImageUrls(e),t=void 0!==s[640]?s[640]:e.find(".sbi_photo").attr("data-full-res");if(!this.settings.consentGiven&&t.indexOf("scontent")>-1)return;e.find(".sbi_photo img").each(function(){t&&void 0!==i(this).attr("data-src")&&i(this).attr("data-src",t),t&&void 0!==i(this).attr("data-orig-src")&&i(this).attr("data-orig-src",t),i(this).on("load",function(){!i(this).hasClass("sbi-replaced")&&i(this).attr("src").indexOf("placeholder")>-1&&(i(this).addClass("sbi-replaced"),t&&(i(this).attr("src",t),i(this).closest(".sbi_imgLiquid_bgSize").length&&i(this).closest(".sbi_imgLiquid_bgSize").css("background-image","url("+t+")")))})})}},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.settings.imageLoadEnabled||i(".sbi_no_resraise").removeClass("sbi_no_resraise");var e=i.Event("sbiafterimagesloaded");e.el=i(this.el),i(window).trigger(e)},setResizedImages:function(){i(this.el).find(".sbi_resized_image_data").length&&void 0!==i(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===i(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(i(this.el).find(".sbi_resized_image_data").attr("data-resized")),i(this.el).find(".sbi_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this;if(e.needsResizing.length>0&&e.settings.resizingEnabled){var s=i(this.el).find(".sbi_item").length,t=void 0!==e.settings.general.cache_all&&e.settings.general.cache_all;n({action:"sbi_resized_images_submit",needs_resizing:e.needsResizing,offset:s,feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID,cache_all:t},function(i){if(0===i.trim().indexOf("{")){var s=JSON.parse(i);for(var t in e.settings.debugEnabled&&console.log(s),s)s.hasOwnProperty(t)&&(e.resizedImages[t]=s[t]);e.maybeRaiseImageResolution(),setTimeout(function(){e.afterResize()},500)}})}else if(e.settings.locator){n({action:"sbi_do_locator",feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID},function(i){})}},loadMoreButtonInit:function(){var e=i(this.el),s=this;e.find("#sbi_load .sbi_load_btn").off().on("click",function(){s.afterLoadMoreClicked(jQuery(this)),s.getNewPostSet()})},getNewPostSet:function(){var e=i(this.el),s=this;s.page++;n({action:"sbi_load_more_clicked",offset:e.find(".sbi_item").length,page:s.page,feed_id:s.settings.feedID,atts:s.settings.shortCodeAtts,location:s.locationGuess(),post_id:s.settings.postID,current_resolution:s.imageResolution},function(t){if(0===t.trim().indexOf("{")){var n=JSON.parse(t);s.settings.debugEnabled&&console.log(n),s.appendNewPosts(n.html),s.addResizedImages(n.resizedImages),s.settings.ajaxPostLoad?(s.settings.ajaxPostLoad=!1,s.afterInitialImagesLoaded()):s.afterNewImagesLoaded(),n.feedStatus.shouldPaginate?s.outOfPages=!1:(s.outOfPages=!0,e.find(".sbi_load_btn").hide()),i(".sbi_no_js").removeClass("sbi_no_js")}})},appendNewPosts:function(e){var s=i(this.el);s.find("#sbi_images .sbi_item").length?s.find("#sbi_images .sbi_item").last().after(e):s.find("#sbi_images").append(e)},addResizedImages:function(i){for(var e in i)this.resizedImages[e]=i[e]},setImageHeight:function(){var e=i(this.el),s=e.find(".sbi_photo").eq(0).innerWidth(),t=this.getColumnCount(),n=e.find("#sbi_images").innerWidth()-e.find("#sbi_images").width(),o=n/2;sbi_photo_width_manual=e.find("#sbi_images").width()/t-n,e.find(".sbi_photo").css("height",s),e.find(".sbi-owl-nav").length&&setTimeout(function(){var i=2;e.find(".sbi_owl2row-item").length&&(i=1);var s=e.find(".sbi_photo").eq(0).innerWidth()/i;s+=parseInt(o)*(2-i+2),e.find(".sbi-owl-nav div").css("top",s)},100)},maybeRaiseSingleImageResolution:function(e,s,t){var n=this,o=n.getImageUrls(e),a=e.find(".sbi_photo img").attr("src"),d=150,r=e.find("img").get(0),l=a===window.sbi.options.placeholder?1:r.naturalWidth/r.naturalHeight;t=void 0!==t&&t;if(!(e.hasClass("sbi_no_resraise")||e.hasClass("sbi_had_error")||e.find(".sbi_link_area").length&&e.find(".sbi_link_area").hasClass("sbi_had_error")))if(o.length<1)e.find(".sbi_link_area").length&&e.find(".sbi_link_area").attr("href",window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png"));else{(e.find(".sbi_link_area").length&&e.find(".sbi_link_area").attr("href")===window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png")||!n.settings.consentGiven)&&e.find(".sbi_link_area").attr("href",o[o.length-1]),void 0!==o[640]&&e.find(".sbi_photo").attr("data-full-res",o[640]),i.each(o,function(i,e){e===a&&(d=parseInt(i),t=!1)});var c=640;switch(n.settings.imgRes){case"thumb":c=150;break;case"medium":c=320;break;case"full":c=640;break;default:var h=Math.max(n.settings.autoMinRes,e.find(".sbi_photo").innerWidth()),g=n.getBestResolutionForAuto(h,l,e);switch(g){case 320:c=320;break;case 150:c=150}}if(c>d||a===window.sbi.options.placeholder||t){if(n.settings.debugEnabled){var f=a===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+a,f)}var u=o[c].split("?ig_cache_key")[0];if(a!==u&&(e.find(".sbi_photo img").attr("src",u),e.find(".sbi_photo").css("background-image",'url("'+u+'")')),d=c,"auto"===n.settings.imgRes){var b=!1;e.find(".sbi_photo img").on("load",function(){var s=i(this),t=s.get(0).naturalWidth/s.get(0).naturalHeight;if(1e3!==s.get(0).naturalWidth&&t>l&&!b){switch(n.settings.debugEnabled&&console.log("rais res again for aspect ratio change "+a),b=!0,h=e.find(".sbi_photo").innerWidth(),g=n.getBestResolutionForAuto(h,t,e),c=640,g){case 320:c=320;break;case 150:c=150}c>d&&(u=o[c].split("?ig_cache_key")[0],s.attr("src",u),s.closest(".sbi_photo").css("background-image",'url("'+u+'")')),"masonry"!==n.layout&&"highlight"!==n.layout||(i(n.el).find("#sbi_images").smashotope(n.isotopeArgs),setTimeout(function(){i(n.el).find("#sbi_images").smashotope(n.isotopeArgs)},500))}else if(n.settings.debugEnabled){var r=b?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+a,r)}})}}e.find("img").on("error",function(){if(i(this).hasClass("sbi_img_error"))console.log("unfixed error "+i(this).attr("src"));else{var e;if(i(this).addClass("sbi_img_error"),!(i(this).attr("src").indexOf("media/?size=")>-1||i(this).attr("src").indexOf("cdninstagram")>-1||i(this).attr("src").indexOf("fbcdn")>-1)&&n.settings.consentGiven){if("undefined"!==i(this).closest(".sbi_photo").attr("data-img-src-set"))void 0!==(e=JSON.parse(i(this).closest(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/"))).d&&(i(this).attr("src",e.d),i(this).closest(".sbi_photo").css("background-image","url("+e.d+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"))}else n.settings.favorLocal=!0,void 0!==(e=n.getImageUrls(i(this).closest(".sbi_item")))[640]&&(i(this).attr("src",e[640]),i(this).closest(".sbi_photo").css("background-image","url("+e[640]+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"));setTimeout(function(){n.afterResize()},1500)}})}},maybeRaiseImageResolution:function(e){var s=this,t=void 0!==e&&!0===e?".sbi_item.sbi_new":".sbi_item",n=!s.isInitialized;i(s.el).find(t).each(function(e){!i(this).hasClass("sbi_num_diff_hide")&&i(this).find(".sbi_photo").length&&void 0!==i(this).find(".sbi_photo").attr("data-img-src-set")&&s.maybeRaiseSingleImageResolution(i(this),e,n)}),s.isInitialized=!0},getBestResolutionForAuto:function(e,s,t){(isNaN(s)||s<1)&&(s=1);var n=e*s,o=10*Math.ceil(n/10),a=[150,320,640];if(t.hasClass("sbi_highlighted")&&(o*=2),-1===a.indexOf(parseInt(o))){var d=!1;i.each(a,function(i,e){e>parseInt(o)&&!d&&(o=e,d=!0)})}return o},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var e=i(this.el),s=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,t=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):s;i(window).width()<480?t<e.find(".sbi_item").length&&e.find(".sbi_item").slice(t-e.find(".sbi_item").length).addClass("sbi_num_diff_hide"):s<e.find(".sbi_item").length&&e.find(".sbi_item").slice(s-e.find(".sbi_item").length).addClass("sbi_num_diff_hide")}},setImageSizeClass:function(){var e=i(this.el);e.removeClass("sbi_small sbi_medium");var s=e.innerWidth(),t=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,n=this.getColumnCount(),o=(s-t*(n+2))/n;o>120&&o<240?e.addClass("sbi_medium"):o<=120&&e.addClass("sbi_small")},setMinImageWidth:function(){i(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=i(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(i){var e=JSON.parse(i.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),s=i.attr("id").replace("sbi_","");if(this.settings.consentGiven||this.settings.overrideBlockCDN||(e=[]),void 0!==this.resizedImages[s]&&"video"!==this.resizedImages[s]&&"pending"!==this.resizedImages[s]&&"error"!==this.resizedImages[s].id&&"video"!==this.resizedImages[s].id&&"pending"!==this.resizedImages[s].id){if(void 0!==this.resizedImages[s].sizes){var t=[];void 0!==this.resizedImages[s].sizes.full&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg",t.push(640)),void 0!==this.resizedImages[s].sizes.low&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg",t.push(320)),void 0!==this.resizedImages[s].sizes.thumb&&(t.push(150),e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg"),this.settings.favorLocal&&(-1===t.indexOf(640)&&t.indexOf(320)>-1&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"),-1===t.indexOf(320)&&(t.indexOf(640)>-1?e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg":t.indexOf(150)>-1&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg")),-1===t.indexOf(150)&&(t.indexOf(320)>-1?e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg":t.indexOf(640)>-1&&(e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg")))}}else(void 0===this.resizedImages[s]||void 0!==this.resizedImages[s].id&&"pending"!==this.resizedImages[s].id&&"error"!==this.resizedImages[s].id)&&this.addToNeedsResizing(s);return e},getAvatarUrl:function(i,e){if(""===i)return"";var s=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":void 0!==s[i]?s[i]:"":void 0!==s[i]?s[i]:void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":""},addToNeedsResizing:function(i){-1===this.needsResizing.indexOf(i)&&this.needsResizing.push(i)},applyImageLiquid:function(){var s=i(this.el);e(),"function"==typeof s.find(".sbi_photo").sbi_imgLiquid&&s.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var e,s,t,n=this;e=jQuery,s={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},t={sbiCheckVisibility:function(i,e){if(jQuery.contains(document,i[0])){var s=e.sbiPreviousVisibility,n=i.is(":visible");e.sbiPreviousVisibility=n,null==s?e.runOnLoad&&e.callback(i,n):s!==n&&e.callback(i,n),setTimeout(function(){t.sbiCheckVisibility(i,e)},e.frequency)}}},e.fn.sbiVisibilityChanged=function(i){var n=e.extend({},s,i);return this.each(function(){t.sbiCheckVisibility(e(this),n)})},"function"==typeof i(this.el).filter(":hidden").sbiVisibilityChanged&&i(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(i,e){n.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=i(this.el),s=this.settings.cols,t=this.settings.colsmobile,n=s;return sbiWindowWidth=window.innerWidth,e.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(s)>2&&parseInt(s)<7&&(n=2),sbiWindowWidth<640&&parseInt(s)>6&&parseInt(s)<11&&(n=4),sbiWindowWidth<=480&&parseInt(s)>2&&(n=1)):sbiWindowWidth<=480&&(n=t),parseInt(n)},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var i=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===i.length){var e=i.pop().split(";").shift();this.settings.consentGiven="true"===e}}else void 0!==window.cookieconsent?this.settings.consentGiven="allow"===function(i){for(var e=i+"=",s=window.document.cookie.split(";"),t=0;t<s.length;t++){var n=s[t].trim();if(0==n.indexOf(e))return n.substring(e.length,n.length)}return""}("complianz_consent_status"):void 0!==window.Cookiebot?this.settings.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(this.settings.consentGiven=window.BorlabsCookie.checkCookieConsent("instagram"));var s=jQuery.Event("sbicheckconsent");return s.feed=this,jQuery(window).trigger(s),this.settings.consentGiven},afterConsentToggled:function(){if(this.checkConsent()){var i=this;i.maybeRaiseImageResolution(),setTimeout(function(){i.afterResize()},500)}},locationGuess:function(){var e=i(this.el),s="content";return e.closest("footer").length?s="footer":e.closest(".header").length||e.closest("header").length?s="header":(e.closest(".sidebar").length||e.closest("aside").length)&&(s="sidebar"),s}},window.sbi_init=function(){window.sbi=new s,window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})}}(jQuery),jQuery(document).ready(function(i){void 0===window.sb_instagram_js_options&&(window.sb_instagram_js_options={font_method:"svg",resized_url:location.protocol+"//"+window.location.hostname+"/wp-content/uploads/sb-instagram-feed-images/",placeholder:location.protocol+"//"+window.location.hostname+"/wp-content/plugins/instagram-feed/img/placeholder.png"}),void 0!==window.sb_instagram_js_options.resized_url&&-1===window.sb_instagram_js_options.resized_url.indexOf(location.protocol)&&("http:"===location.protocol?window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("https:","http:"):window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("http:","https:")),sbi_init(),i("#cookie-notice a").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i(window).on("CookiebotOnAccept",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!0,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("cmplzAcceptAll",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!0,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("cmplzRevoke",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("borlabs-cookie-consent-saved",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})})}));
1
+ var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function(i){function e(){var i,e,t,s=s||{VER:"0.9.944"};s.bgs_Available=!1,s.bgs_CheckRunned=!1,function(i){i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!s.bgs_CheckRunned){s.bgs_CheckRunned=!0;var e=i('<span style="background-size:cover" />');i("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var t=window.getComputedStyle(i,null);t&&t.backgroundSize&&(s.bgs_Available="cover"===t.backgroundSize)}}(),e.remove()}}();var t=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function n(){(r.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(r=c.data("sbi_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&a(),l.sizeOld=l.actualSize,setTimeout(n,r.responsiveCheckTime))}function o(){c.data("sbi_imgLiquid_error",!0),l.addClass("sbi_imgLiquid_error"),r.onItemError&&r.onItemError(e,l,c),d()}function a(){var i,t,s,n,o,a,h,g,f=0,u=0,b=l.width(),_=l.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),r.fill===b/_>=c.data("owidth")/c.data("oheight")?(i="100%",t="auto",s=Math.floor(b),n=Math.floor(b*(c.data("oheight")/c.data("owidth")))):(i="auto",t="100%",s=Math.floor(_*(c.data("owidth")/c.data("oheight"))),n=Math.floor(_)),h=b-s,"left"===(o=r.horizontalAlign.toLowerCase())&&(u=0),"center"===o&&(u=.5*h),"right"===o&&(u=h),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(u=h*o*.01)),g=_-n,"left"===(a=r.verticalAlign.toLowerCase())&&(f=0),"center"===a&&(f=.5*g),"bottom"===a&&(f=g),-1!==a.indexOf("%")&&((a=parseInt(a.replace("%",""),10))>0&&(f=g*a*.01)),r.hardPixels&&(i=s,t=n),c.css({width:i,height:t,"margin-left":Math.floor(u),"margin-top":Math.floor(f)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(r.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sbi_imgLiquid_nobgSize"),l.addClass("sbi_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(e,l,c),d()}function d(){e===t.length-1&&t.settings.onFinish&&t.settings.onFinish()}var r=t.settings,l=i(this),c=i("img:first",l);return c.length?(c.data("sbi_imgLiquid_settings")?(l.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),r=i.extend({},c.data("sbi_imgLiquid_settings"),t.options)):r=i.extend({},t.settings,function(){var i={};if(t.settings.useDataHtmlAttr){var e=l.attr("data-sbi_imgLiquid-fill"),n=l.attr("data-sbi_imgLiquid-horizontalAlign"),o=l.attr("data-sbi_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(i.fill=Boolean("true"===e)),void 0===n||"left"!==n&&"center"!==n&&"right"!==n&&-1===n.indexOf("%")||(i.horizontalAlign=n),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(i.verticalAlign=o)}return s.isIE&&t.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}()),c.data("sbi_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(e,l,c),void(s.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(c.attr("src")))&&l.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",l).css({display:"block",width:"100%",height:"100%"}),i("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(e,l,c),l.addClass("sbi_imgLiquid_bgSize"),l.addClass("sbi_imgLiquid_ready"),d()):function t(){if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var s=c.clone().removeAttr("style");return s.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(s),c.remove(),(c=s)[0].width=0,void setTimeout(t,10)}return c.data("sbi_imgLiquid_oldProcessed")?void a():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),i("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",o),c[0].onerror=o,function i(){c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(l.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(a,e*r.delay)):setTimeout(i,r.timecheckvisibility))}(),void n())}())):void o()})}})}(jQuery),i=s.injectCss,e=document.getElementsByTagName("head")[0],(t=document.createElement("style")).type="text/css",t.styleSheet?t.styleSheet.cssText=i:t.appendChild(document.createTextNode(i)),e.appendChild(t)}function t(){this.feeds={},this.options=sb_instagram_js_options}function s(i,e,t){this.el=i,this.index=e,this.settings=t,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.page=1,this.isInitialized=!1}function n(e,t){i.ajax({url:sbiajaxurl,type:"post",data:e,success:t})}t.prototype={createPage:function(e,t){void 0!==window.sbiajaxurl&&-1!==window.sbiajaxurl.indexOf(window.location.hostname)||(window.sbiajaxurl=location.protocol+"//"+window.location.hostname+"/wp-admin/admin-ajax.php"),i(".sbi_no_js_error_message").remove(),i(".sbi_no_js").removeClass("sbi_no_js"),e(t)},createFeeds:function(e){e.whenFeedsCreated(i(".sbi").each(function(e){i(this).attr("data-sbi-index",e+1);var t=i(this),o=void 0!==t.attr("data-sbi-flags")?t.attr("data-sbi-flags").split(","):[],a=void 0!==t.attr("data-options")?JSON.parse(t.attr("data-options")):{};if(o.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;n({action:"sbi_on_ajax_test_trigger"},function(i){console.log("did test")})}var d={cols:t.attr("data-cols"),colsmobile:void 0!==t.attr("data-colsmobile")&&"same"!==t.attr("data-colsmobile")?t.attr("data-colsmobile"):t.attr("data-cols"),num:t.attr("data-num"),imgRes:t.attr("data-res"),feedID:t.attr("data-feedid"),postID:"undefind"!=typeof t.attr("data-postid")?t.attr("data-postid"):"unknown",shortCodeAtts:t.attr("data-shortcode-atts"),resizingEnabled:-1===o.indexOf("resizeDisable"),imageLoadEnabled:-1===o.indexOf("imageLoadDisable"),debugEnabled:o.indexOf("debug")>-1,favorLocal:o.indexOf("favorLocal")>-1,ajaxPostLoad:o.indexOf("ajaxPostLoad")>-1,gdpr:o.indexOf("gdpr")>-1,overrideBlockCDN:o.indexOf("overrideBlockCDN")>-1,consentGiven:!1,locator:o.indexOf("locator")>-1,autoMinRes:1,general:a};window.sbi.feeds[e]=function(i,e,t){return new s(i,e,t)}(this,e,d),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var r=jQuery.Event("sbiafterfeedcreate");r.feed=window.sbi.feeds[e],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){i(".sb_instagram_header").each(function(){var e=i(this);e.find(".sbi_header_link").on("mouseenter mouseleave",function(i){switch(i.type){case"mouseenter":e.find(".sbi_header_img_hover").addClass("sbi_fade_in");break;case"mouseleave":e.find(".sbi_header_img_hover").removeClass("sbi_fade_in")}})})},encodeHTML:function(i){return void 0===i?"":i.replace(/(>)/g,"&gt;").replace(/(<)/g,"&lt;").replace(/(&lt;br\/&gt;)/g,"<br>").replace(/(&lt;br&gt;)/g,"<br>")},urlDetect:function(i){return i.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)}},s.prototype={init:function(){var e=this;e.settings.consentGiven=e.checkConsent(),i(this.el).find(".sbi_photo").parent("p").length&&i(this.el).addClass("sbi_no_autop"),i(this.el).find("#sbi_mod_error").length&&i(this.el).prepend(i(this.el).find("#sbi_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var t,s=(t=0,function(i,e){clearTimeout(t),t=setTimeout(i,e)});jQuery(window).on("resize",function(){s(function(){e.afterResize()},500)}),i(this.el).find(".sbi_item").each(function(){e.lazyLoadCheck(i(this))})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(i){i.find(".sbi_loader").removeClass("sbi_hidden"),i.find(".sbi_btn_text").addClass("sbi_hidden"),i.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var e=i(this.el),t=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){e.find(".sbi_loader").addClass("sbi_hidden"),e.find(".sbi_btn_text").removeClass("sbi_hidden"),t.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var e=i(this.el);e.find(".sbi-screenreader").each(function(){i(this).find("img").remove()}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),e.find(".sbi_item").each(function(i){jQuery(this).find(".sbi_photo").on("mouseenter mouseleave",function(i){switch(i.type){case"mouseenter":jQuery(this).fadeTo(200,.85);break;case"mouseleave":jQuery(this).stop().fadeTo(500,1)}})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var i=10;e.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},i),i+=10})},500)},lazyLoadCheck:function(e){if(e.find(".sbi_photo").length&&!e.closest(".sbi").hasClass("sbi-no-ll-check")){var t=this.getImageUrls(e),s=void 0!==t[640]?t[640]:e.find(".sbi_photo").attr("data-full-res");if(!this.settings.consentGiven&&s.indexOf("scontent")>-1)return;e.find(".sbi_photo img").each(function(){s&&void 0!==i(this).attr("data-src")&&i(this).attr("data-src",s),s&&void 0!==i(this).attr("data-orig-src")&&i(this).attr("data-orig-src",s),i(this).on("load",function(){!i(this).hasClass("sbi-replaced")&&i(this).attr("src").indexOf("placeholder")>-1&&(i(this).addClass("sbi-replaced"),s&&(i(this).attr("src",s),i(this).closest(".sbi_imgLiquid_bgSize").length&&i(this).closest(".sbi_imgLiquid_bgSize").css("background-image","url("+s+")")))})})}},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.settings.imageLoadEnabled||i(".sbi_no_resraise").removeClass("sbi_no_resraise");var e=i.Event("sbiafterimagesloaded");e.el=i(this.el),i(window).trigger(e)},setResizedImages:function(){i(this.el).find(".sbi_resized_image_data").length&&void 0!==i(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===i(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(i(this.el).find(".sbi_resized_image_data").attr("data-resized")),i(this.el).find(".sbi_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this,t=i(this.el);if(e.needsResizing.length>0&&e.settings.resizingEnabled){var s=i(this.el).find(".sbi_item").length,o=void 0!==e.settings.general.cache_all&&e.settings.general.cache_all,a="";void 0!==t.attr("data-locatornonce")&&(a=t.attr("data-locatornonce")),n({action:"sbi_resized_images_submit",needs_resizing:e.needsResizing,offset:s,feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID,cache_all:o,locator_nonce:a},function(i){if(0===i.trim().indexOf("{")){var t=JSON.parse(i);for(var s in e.settings.debugEnabled&&console.log(t),t)t.hasOwnProperty(s)&&(e.resizedImages[s]=t[s]);e.maybeRaiseImageResolution(),setTimeout(function(){e.afterResize()},500)}})}else if(e.settings.locator){a="";void 0!==t.attr("data-locatornonce")&&(a=t.attr("data-locatornonce")),n({action:"sbi_do_locator",feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID,locator_nonce:a},function(i){})}},loadMoreButtonInit:function(){var e=i(this.el),t=this;e.find("#sbi_load .sbi_load_btn").off().on("click",function(){t.afterLoadMoreClicked(jQuery(this)),t.getNewPostSet()})},getNewPostSet:function(){var e=i(this.el),t=this;t.page++;var s="";void 0!==e.attr("data-locatornonce")&&(s=e.attr("data-locatornonce"));n({action:"sbi_load_more_clicked",offset:e.find(".sbi_item").length,page:t.page,feed_id:t.settings.feedID,atts:t.settings.shortCodeAtts,location:t.locationGuess(),post_id:t.settings.postID,current_resolution:t.imageResolution,locator_nonce:s},function(s){if(0===s.trim().indexOf("{")){var n=JSON.parse(s);t.settings.debugEnabled&&console.log(n),t.appendNewPosts(n.html),t.addResizedImages(n.resizedImages),t.settings.ajaxPostLoad?(t.settings.ajaxPostLoad=!1,t.afterInitialImagesLoaded()):t.afterNewImagesLoaded(),n.feedStatus.shouldPaginate?t.outOfPages=!1:(t.outOfPages=!0,e.find(".sbi_load_btn").hide()),i(".sbi_no_js").removeClass("sbi_no_js")}})},appendNewPosts:function(e){var t=i(this.el);t.find("#sbi_images .sbi_item").length?t.find("#sbi_images .sbi_item").last().after(e):t.find("#sbi_images").append(e)},addResizedImages:function(i){for(var e in i)this.resizedImages[e]=i[e]},setImageHeight:function(){var e=i(this.el),t=e.find(".sbi_photo").eq(0).innerWidth(),s=this.getColumnCount(),n=e.find("#sbi_images").innerWidth()-e.find("#sbi_images").width(),o=n/2;sbi_photo_width_manual=e.find("#sbi_images").width()/s-n,e.find(".sbi_photo").css("height",t),e.find(".sbi-owl-nav").length&&setTimeout(function(){var i=2;e.find(".sbi_owl2row-item").length&&(i=1);var t=e.find(".sbi_photo").eq(0).innerWidth()/i;t+=parseInt(o)*(2-i+2),e.find(".sbi-owl-nav div").css("top",t)},100)},maybeRaiseSingleImageResolution:function(e,t,s){var n=this,o=n.getImageUrls(e),a=e.find(".sbi_photo img").attr("src"),d=150,r=e.find("img").get(0),l=a===window.sbi.options.placeholder?1:r.naturalWidth/r.naturalHeight;s=void 0!==s&&s;if(!(e.hasClass("sbi_no_resraise")||e.hasClass("sbi_had_error")||e.find(".sbi_link_area").length&&e.find(".sbi_link_area").hasClass("sbi_had_error")))if(o.length<1)e.find(".sbi_link_area").length&&e.find(".sbi_link_area").attr("href",window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png"));else{(e.find(".sbi_link_area").length&&e.find(".sbi_link_area").attr("href")===window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png")||!n.settings.consentGiven)&&e.find(".sbi_link_area").attr("href",o[o.length-1]),void 0!==o[640]&&e.find(".sbi_photo").attr("data-full-res",o[640]),i.each(o,function(i,e){e===a&&(d=parseInt(i),s=!1)});var c=640;switch(n.settings.imgRes){case"thumb":c=150;break;case"medium":c=320;break;case"full":c=640;break;default:var h=Math.max(n.settings.autoMinRes,e.find(".sbi_photo").innerWidth()),g=n.getBestResolutionForAuto(h,l,e);switch(g){case 320:c=320;break;case 150:c=150}}if(c>d||a===window.sbi.options.placeholder||s){if(n.settings.debugEnabled){var f=a===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+a,f)}var u=o[c].split("?ig_cache_key")[0];if(a!==u&&(e.find(".sbi_photo img").attr("src",u),e.find(".sbi_photo").css("background-image",'url("'+u+'")')),d=c,"auto"===n.settings.imgRes){var b=!1;e.find(".sbi_photo img").on("load",function(){var t=i(this),s=t.get(0).naturalWidth/t.get(0).naturalHeight;if(1e3!==t.get(0).naturalWidth&&s>l&&!b){switch(n.settings.debugEnabled&&console.log("rais res again for aspect ratio change "+a),b=!0,h=e.find(".sbi_photo").innerWidth(),g=n.getBestResolutionForAuto(h,s,e),c=640,g){case 320:c=320;break;case 150:c=150}c>d&&(u=o[c].split("?ig_cache_key")[0],t.attr("src",u),t.closest(".sbi_photo").css("background-image",'url("'+u+'")')),"masonry"!==n.layout&&"highlight"!==n.layout||(i(n.el).find("#sbi_images").smashotope(n.isotopeArgs),setTimeout(function(){i(n.el).find("#sbi_images").smashotope(n.isotopeArgs)},500))}else if(n.settings.debugEnabled){var r=b?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+a,r)}})}}e.find("img").on("error",function(){if(i(this).hasClass("sbi_img_error"))console.log("unfixed error "+i(this).attr("src"));else{var e;if(i(this).addClass("sbi_img_error"),!(i(this).attr("src").indexOf("media/?size=")>-1||i(this).attr("src").indexOf("cdninstagram")>-1||i(this).attr("src").indexOf("fbcdn")>-1)&&n.settings.consentGiven){if("undefined"!==i(this).closest(".sbi_photo").attr("data-img-src-set"))void 0!==(e=JSON.parse(i(this).closest(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/"))).d&&(i(this).attr("src",e.d),i(this).closest(".sbi_photo").css("background-image","url("+e.d+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"))}else n.settings.favorLocal=!0,void 0!==(e=n.getImageUrls(i(this).closest(".sbi_item")))[640]&&(i(this).attr("src",e[640]),i(this).closest(".sbi_photo").css("background-image","url("+e[640]+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"));setTimeout(function(){n.afterResize()},1500)}})}},maybeRaiseImageResolution:function(e){var t=this,s=void 0!==e&&!0===e?".sbi_item.sbi_new":".sbi_item",n=!t.isInitialized;i(t.el).find(s).each(function(e){!i(this).hasClass("sbi_num_diff_hide")&&i(this).find(".sbi_photo").length&&void 0!==i(this).find(".sbi_photo").attr("data-img-src-set")&&t.maybeRaiseSingleImageResolution(i(this),e,n)}),t.isInitialized=!0},getBestResolutionForAuto:function(e,t,s){(isNaN(t)||t<1)&&(t=1);var n=e*t,o=10*Math.ceil(n/10),a=[150,320,640];if(s.hasClass("sbi_highlighted")&&(o*=2),-1===a.indexOf(parseInt(o))){var d=!1;i.each(a,function(i,e){e>parseInt(o)&&!d&&(o=e,d=!0)})}return o},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var e=i(this.el),t=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,s=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):t;i(window).width()<480?s<e.find(".sbi_item").length&&e.find(".sbi_item").slice(s-e.find(".sbi_item").length).addClass("sbi_num_diff_hide"):t<e.find(".sbi_item").length&&e.find(".sbi_item").slice(t-e.find(".sbi_item").length).addClass("sbi_num_diff_hide")}},setImageSizeClass:function(){var e=i(this.el);e.removeClass("sbi_small sbi_medium");var t=e.innerWidth(),s=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,n=this.getColumnCount(),o=(t-s*(n+2))/n;o>120&&o<240?e.addClass("sbi_medium"):o<=120&&e.addClass("sbi_small")},setMinImageWidth:function(){i(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=i(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(i){var e=JSON.parse(i.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),t=i.attr("id").replace("sbi_","");if(this.settings.consentGiven||this.settings.overrideBlockCDN||(e=[]),void 0!==this.resizedImages[t]&&"video"!==this.resizedImages[t]&&"pending"!==this.resizedImages[t]&&"error"!==this.resizedImages[t].id&&"video"!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id){if(void 0!==this.resizedImages[t].sizes){var s=[];void 0!==this.resizedImages[t].sizes.full&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg",s.push(640)),void 0!==this.resizedImages[t].sizes.low&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg",s.push(320)),void 0!==this.resizedImages[t].sizes.thumb&&(s.push(150),e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"thumb.jpg"),this.settings.favorLocal&&(-1===s.indexOf(640)&&s.indexOf(320)>-1&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg"),-1===s.indexOf(320)&&(s.indexOf(640)>-1?e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg":s.indexOf(150)>-1&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"thumb.jpg")),-1===s.indexOf(150)&&(s.indexOf(320)>-1?e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg":s.indexOf(640)>-1&&(e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg")))}}else(void 0===this.resizedImages[t]||void 0!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id&&"error"!==this.resizedImages[t].id)&&this.addToNeedsResizing(t);return e},getAvatarUrl:function(i,e){if(""===i)return"";var t=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==t["LCL"+i]&&1===parseInt(t["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":void 0!==t[i]?t[i]:"":void 0!==t[i]?t[i]:void 0!==t["LCL"+i]&&1===parseInt(t["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":""},addToNeedsResizing:function(i){-1===this.needsResizing.indexOf(i)&&this.needsResizing.push(i)},applyImageLiquid:function(){var t=i(this.el);e(),"function"==typeof t.find(".sbi_photo").sbi_imgLiquid&&t.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var e,t,s,n=this;e=jQuery,t={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},s={sbiCheckVisibility:function(i,e){if(jQuery.contains(document,i[0])){var t=e.sbiPreviousVisibility,n=i.is(":visible");e.sbiPreviousVisibility=n,null==t?e.runOnLoad&&e.callback(i,n):t!==n&&e.callback(i,n),setTimeout(function(){s.sbiCheckVisibility(i,e)},e.frequency)}}},e.fn.sbiVisibilityChanged=function(i){var n=e.extend({},t,i);return this.each(function(){s.sbiCheckVisibility(e(this),n)})},"function"==typeof i(this.el).filter(":hidden").sbiVisibilityChanged&&i(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(i,e){n.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=i(this.el),t=this.settings.cols,s=this.settings.colsmobile,n=t;return sbiWindowWidth=window.innerWidth,e.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(t)>2&&parseInt(t)<7&&(n=2),sbiWindowWidth<640&&parseInt(t)>6&&parseInt(t)<11&&(n=4),sbiWindowWidth<=480&&parseInt(t)>2&&(n=1)):sbiWindowWidth<=480&&(n=s),parseInt(n)},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var i=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===i.length){var e=i.pop().split(";").shift();this.settings.consentGiven="true"===e}}else void 0!==window.cookieconsent?this.settings.consentGiven="allow"===function(i){for(var e=i+"=",t=window.document.cookie.split(";"),s=0;s<t.length;s++){var n=t[s].trim();if(0==n.indexOf(e))return n.substring(e.length,n.length)}return""}("complianz_consent_status"):void 0!==window.Cookiebot?this.settings.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(this.settings.consentGiven=window.BorlabsCookie.checkCookieConsent("instagram"));var t=jQuery.Event("sbicheckconsent");return t.feed=this,jQuery(window).trigger(t),this.settings.consentGiven},afterConsentToggled:function(){if(this.checkConsent()){var i=this;i.maybeRaiseImageResolution(),setTimeout(function(){i.afterResize()},500)}},locationGuess:function(){var e=i(this.el),t="content";return e.closest("footer").length?t="footer":e.closest(".header").length||e.closest("header").length?t="header":(e.closest(".sidebar").length||e.closest("aside").length)&&(t="sidebar"),t}},window.sbi_init=function(){window.sbi=new t,window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})}}(jQuery),jQuery(document).ready(function(i){void 0===window.sb_instagram_js_options&&(window.sb_instagram_js_options={font_method:"svg",resized_url:location.protocol+"//"+window.location.hostname+"/wp-content/uploads/sb-instagram-feed-images/",placeholder:location.protocol+"//"+window.location.hostname+"/wp-content/plugins/instagram-feed/img/placeholder.png"}),void 0!==window.sb_instagram_js_options.resized_url&&-1===window.sb_instagram_js_options.resized_url.indexOf(location.protocol)&&("http:"===location.protocol?window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("https:","http:"):window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("http:","https:")),sbi_init(),i("#cookie-notice a").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})},1e3)}),i(window).on("CookiebotOnAccept",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!0,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("cmplzAcceptAll",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!0,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("cmplzRevoke",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})}),i(document).on("borlabs-cookie-consent-saved",function(e){i.each(window.sbi.feeds,function(i){window.sbi.feeds[i].settings.consentGiven=!1,window.sbi.feeds[i].afterConsentToggled()})})}));
widget.php CHANGED
@@ -39,10 +39,10 @@ class SbiWidget extends WP_Widget
39
  $content = isset ( $instance['content'] ) ? strip_tags( $instance['content'] ) : '[instagram-feed]';
40
  ?>
41
  <p>
42
- <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:' ); ?></label>
43
  <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
44
  </p>
45
- <textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>" rows="16"><?php echo strip_tags( $content ); ?></textarea>
46
  <?php
47
  }
48
 
39
  $content = isset ( $instance['content'] ) ? strip_tags( $instance['content'] ) : '[instagram-feed]';
40
  ?>
41
  <p>
42
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title:' ); ?></label>
43
  <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
44
  </p>
45
+ <textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>" rows="16"><?php echo esc_textarea( $content ); ?></textarea>
46
  <?php
47
  }
48