WD Instagram Feed – Instagram Gallery - Version 1.2.18

Version Description

Important: Instagram shut down its API partially without any warning. See changelog. It is not allowed anymore to display photos from other Instagram accounts which are not your own. Sorry.

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Instagram Feed – Instagram Gallery
Version 1.2.18
Comparing to
See all releases

Code changes from version 1.2.16 to 1.2.18

admin-functions.php CHANGED
@@ -561,6 +561,10 @@ function wdi_field_callback($element)
561
  $wdi_formBuilder->select($setting);
562
  break;
563
  }
 
 
 
 
564
  }
565
  }
566
 
@@ -616,6 +620,7 @@ function wdi_get_settings()
616
  'wdi_custom_js' => array('name' => 'wdi_custom_js', 'sanitize_type' => 'css', 'type' => 'textarea', 'section' => 'wdi_customize_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Custom JavaScript', "wd-instagram-feed")),
617
  //'wdi_preserve_settings_when_remove'=>array('name'=>'wdi_preserve_settings_when_remove','field_or_not'=>'field','type'=>'checkbox','default'=>'1', 'section'=>'wdi_configure_section','title'=>__('Preserve Settings When Remove',"wd-instagram-feed")),
618
  'wdi_plugin_uninstalled' => array('name' => 'wdi_plugin_uninstalled', 'sanitize_type' => 'bool', 'field_or_not' => 'field', 'type' => 'input', 'input_type' => 'hidden', 'section' => 'wdi_customize_section', 'title' => '', 'default' => 'false', 'value' => 'false'),
 
619
  //'wdi_version' => array('name'=>'wdi_version','field_or_not'=>'no_field','default'=>WDI_VERSION),
620
  //'wdi_first_time'=>array('name'=>'wdi_first_time','field_or_not'=>'no_field','default'=>'1')
621
 
561
  $wdi_formBuilder->select($setting);
562
  break;
563
  }
564
+ case 'link_button':{
565
+ $wdi_formBuilder->link_button($setting);
566
+ break;
567
+ }
568
  }
569
  }
570
 
620
  'wdi_custom_js' => array('name' => 'wdi_custom_js', 'sanitize_type' => 'css', 'type' => 'textarea', 'section' => 'wdi_customize_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Custom JavaScript', "wd-instagram-feed")),
621
  //'wdi_preserve_settings_when_remove'=>array('name'=>'wdi_preserve_settings_when_remove','field_or_not'=>'field','type'=>'checkbox','default'=>'1', 'section'=>'wdi_configure_section','title'=>__('Preserve Settings When Remove',"wd-instagram-feed")),
622
  'wdi_plugin_uninstalled' => array('name' => 'wdi_plugin_uninstalled', 'sanitize_type' => 'bool', 'field_or_not' => 'field', 'type' => 'input', 'input_type' => 'hidden', 'section' => 'wdi_customize_section', 'title' => '', 'default' => 'false', 'value' => 'false'),
623
+ 'wdi_uninstall' => array('name'=>'wdi_uninstall','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_customize_section', 'href'=>admin_url( 'admin.php?page=wdi_uninstall' ), 'title'=>__('Uninstall',"wd-instagram-feed"),'default'=>''),
624
  //'wdi_version' => array('name'=>'wdi_version','field_or_not'=>'no_field','default'=>WDI_VERSION),
625
  //'wdi_first_time'=>array('name'=>'wdi_first_time','field_or_not'=>'no_field','default'=>'1')
626
 
admin/views/WDIViewFeeds_wdi.php CHANGED
@@ -273,7 +273,7 @@ class WDIViewFeeds_wdi
273
  "elements" => array(
274
  array(
275
  //'feed_name' => array('name' => 'feed_name', 'title' => __('Feed Title', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
276
- 'liked_feed' => array('disabled_options' => array('liked'), 'disabled' => array('text' => __("Feed of liked media is available only in premium version", "wd-instagram-feed")), 'name' => 'liked_feed', 'title' => __('Feed Media', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('userhash' => __('Username/Hashtag', "wd-instagram-feed"), 'liked' => __('Media I liked', "wd-instagram-feed")), 'break' => 'false', 'hide_ids' => array('liked' => 'feed_users,thumb_user'), 'tooltip' => __('Display media of User/Hashtag or the media I liked', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
277
  'feed_users' => array('name' => 'feed_users', 'title' => __('Feed Usernames and Hashtags', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'hidden', 'tooltip' => sprintf('%s', __('Add usernames or hashtags to your feed. Hashtags must start with #, usernames shouldn\'t start with @.', "wd-instagram-feed")), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
278
  ),
279
  array(
@@ -518,6 +518,10 @@ public function genarateFeedViews()
518
  $feed_row_id = $feed_row["id"];
519
  }
520
 
 
 
 
 
521
  ?>
522
  <div class="update-nag wdi_help_bar_wrap">
523
  <span class="wdi_help_bar_text">
@@ -596,7 +600,7 @@ public function genarateFeedViews()
596
  }
597
  } ?>
598
 
599
- <div class="wdi_element">
600
  <div class="wdi_element_title">
601
  <span class="wdi_settings_link" ><?php echo $element['title']; ?></span>
602
  </div>
273
  "elements" => array(
274
  array(
275
  //'feed_name' => array('name' => 'feed_name', 'title' => __('Feed Title', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
276
+ 'liked_feed' => array('disabled_options' => array('liked'), 'disabled' => array('text' => __("Feed of liked media is available only in premium version", "wd-instagram-feed")), 'name' => 'liked_feed', 'title' => __('Feed Media', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('userhash' => __('Username/Hashtag', "wd-instagram-feed"), 'liked' => __('Media I liked', "wd-instagram-feed")), 'break' => 'false', 'hide_ids' => array(), 'tooltip' => __('Display media of User/Hashtag or the media I liked', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
277
  'feed_users' => array('name' => 'feed_users', 'title' => __('Feed Usernames and Hashtags', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'hidden', 'tooltip' => sprintf('%s', __('Add usernames or hashtags to your feed. Hashtags must start with #, usernames shouldn\'t start with @.', "wd-instagram-feed")), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
278
  ),
279
  array(
518
  $feed_row_id = $feed_row["id"];
519
  }
520
 
521
+ if($feed_row['liked_feed'] !== 'userhash'){
522
+ $feed_row['liked_feed'] = 'userhash';
523
+ }
524
+
525
  ?>
526
  <div class="update-nag wdi_help_bar_wrap">
527
  <span class="wdi_help_bar_text">
600
  }
601
  } ?>
602
 
603
+ <div class="wdi_element wdi_element_name_<?php echo $element['name'] ; ?>">
604
  <div class="wdi_element_title">
605
  <span class="wdi_settings_link" ><?php echo $element['title']; ?></span>
606
  </div>
changelog.txt CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  = 1.2.16 =
2
  New: Instagram slideshow is supported in popup
3
  New: UX of feeds and themes admin screen, it is now similar to posts list screen
1
+ = 1.2.18 =
2
+ Important: Instagram shut down its API partially without any warning. See [changelog](https://www.instagram.com/developer/endpoints/media/). It is not allowed anymore to display photos from other Instagram accounts which are not your own.
3
+ Sorry.
4
+
5
+
6
+ = 1.2.17 =
7
+ Fixed: Video play issue on mac safari
8
+ Changed: Uninstall moved to settings page
9
+
10
  = 1.2.16 =
11
  New: Instagram slideshow is supported in popup
12
  New: UX of feeds and themes admin screen, it is now similar to posts list screen
css/wdi_backend.css CHANGED
@@ -1509,6 +1509,12 @@ border: 1px solid rgb(185, 185, 185);
1509
  float: none;
1510
  margin: 0 2% 20px;
1511
  }
 
 
 
 
 
 
1512
  #wdi_save_feed .wdi_element p {
1513
  margin: 2px 0 0;
1514
  }
1509
  float: none;
1510
  margin: 0 2% 20px;
1511
  }
1512
+
1513
+ .wdi_element_name_liked_feed{
1514
+ display: none !important;
1515
+ }
1516
+
1517
+
1518
  #wdi_save_feed .wdi_element p {
1519
  margin: 2px 0 0;
1520
  }
css/wdi_backend.min.css CHANGED
@@ -1 +1 @@
1
- .wdi_clear{clear:both}.wdi_clear_tag:after{content:"";display:table;clear:both}#wdi_unistall{background-color:#d82121;border-color:#d31818;box-shadow:inset 0 1px 0 rgba(230,120,120,0.5),0 1px 0 rgba(0,0,0,.15)}#wdi_unistall:hover{background-color:#da1313}#wdi_unistall_table th{width:45%}.display_type_content{background:#fff;border:1px solid #dedede;margin-bottom:15px}.wdi_tooltip,.wdi_settings_link{display:block;font-size:14px !important;font-weight:bold;line-height:20px;margin-bottom:5px;color:#444;text-decoration:none}p.wdi_about_filed{font-size:13px;font-style:italic}.wdi_tooltip:hover,.wdi_settings_link:hover{color:#23282d;position:relative}.wdi_tooltip:hover:after{content:attr(wdi-tooltip);padding:4px 8px;color:#dbdbe0;position:absolute;left:0;top:100%;white-space:nowrap;z-index:20;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:2px;-moz-box-shadow:0 0 4px #222;-webkit-box-shadow:0 0 4px #222;box-shadow:0 0 4px rgba(0,0,0,0.5);background-color:rgba(0,0,0,0.75);font-size:12px}.wdi_pro_only{font-style:italic;color:#4e4e4e !important;background-color:#ccc !important;text-decoration:none}.wdi_pro_only_op{opacity:.6}.wdi_pro_notice{text-align:right;color:#15699f;font-size:20px !important;padding:10px}.wdi_pro_only_btn{background-color:#c5c0c0 !important;border-top-color:#c5c0c0 !important}.wdi-pro-overlay img{opacity:.7}#wdi_feed_users{width:100%;margin-top:2px}#wdi_feed_tabs .wdi_feed_tabs{border:1px solid #f1f1f1;color:#444;cursor:pointer;font-size:13px;font-weight:bold;padding:12px;background:#fff;text-decoration:none;display:inline-block}#wdi_feed_tabs{margin:16px 0}#wdi_feed_tabs .wdi_feed_tab_active,#wdi_feed_tabs .wdi_feed_tabs:hover{background:none repeat scroll 0 0 #fff;color:#9a2465}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{max-width:270px;margin:0 auto}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{max-width:100%}#wdi_feed_tabs .wdi_feed_tab_title{margin-top:1px;display:inline-block}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:8px}.display_type_container.wdi_clear_tag{display:table;margin:10px auto}.display_type_container>div{float:left;margin-right:15px}.wdi_user{border:1px solid #b9b9b9;background-color:rgba(0,0,0,.05);margin:0 4px 0 0;border-radius:5px;height:28px;position:relative;display:inline-block}.wdi_user:hover{background-color:rgba(0,0,0,.08)}.wdi_user a{text-decoration:none;color:black;line-height:28px;width:70%;margin-left:12%;margin-right:18%;height:100%;display:table-row;padding-right:3px}.wdi_user .wdi_profile_pic{width:20px;height:20px;top:4px;left:30px;padding:5px;vertical-align:middle;display:table-cell}.wdi_user span{display:table-cell;vertical-align:middle;left:55px;font-weight:bold;font-size:14px}.wdi_user .wdi_remove_user,.wdi_user .wdi_check_thumb_user{position:absolute;right:4px;width:15px;height:15px;top:6.5px;transition:all .1s ease}.wdi_user .wdi_remove_user:hover{cursor:pointer;transform:rotate(180deg)}.wdi_user .wdi_check_thumb_user:hover{cursor:pointer}.wdi_user .wdi_check_thumb_user{left:4px}.wdi_border_wrapper [scope='row']{padding:2px;font-size:13px;min-width:250px}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:2px}.small_input{width:60px;text-align:center}.display_type{text-align:center}.wdi_access_token_missing{font-size:14px;color:#000;clear:both;max-width:720px}.instagram-feed-wd_page_wdi_settings form{width:65%}.instagram-feed-wd_page_wdi_settings table td{padding-left:0;padding-right:0}.instagram-feed-wd_page_wdi_settings table th{padding-left:4px}.instagram-feed-wd_page_wdi_settings table input{float:right}#login_with_instagram{height:43px}#login_with_instagram .wdi_sign_in_button{background-image:url('../images/sign_in_with_instagram.png');background-repeat:no-repeat;background-position:left top;width:234px;height:43px;display:inline-block;float:left}#login_with_instagram .wdi_default_feed_button,#login_with_instagram .wdi_edit_default_feed_button{width:234px;height:43px;background-repeat:no-repeat;background-position:center top;display:inline-block}#login_with_instagram .wdi_default_feed_button{background-image:url('../images/default_feed_button.png');float:left;margin-right:10px}#login_with_instagram .wdi_edit_default_feed_button{background-image:url('../images/edit_feed_button.png');float:left}#wdi_options_page_buttons_wrapper .submit{display:inline;margin-left:15px}#wdi_reset_access_token{margin-top:0;float:left;width:232px;text-align:center}.wdi_advanced_option{width:100%;position:relative;font-weight:600}.wdi_advanced_option{background-color:#fff;cursor:pointer;border:1px solid #e3e3e3;border-radius:10px;border-collapse:separate;border-spacing:0}.wdi_advanced_option .wdi_advanced_option_head{border-bottom:1px solid #e3e3e3}.wdi_advanced_option .wdi_advanced_option_head th{padding-top:10px;padding-bottom:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th{border-bottom:1px solid #e3e3e3;border-bottom-left-radius:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td{border-bottom:1px solid #e3e3e3;border-bottom-right-radius:10px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option th{padding-left:12px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option td .wdwt_param{margin-left:15px}.wdi_advanced_option .wdi_advanced_option_icon{background-repeat:no-repeat;background-position:left top;width:20px;height:20px;display:inline-block;position:absolute;top:16px;right:10px}.wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon{background-image:url('../images/arrow_1.png')}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon{background-image:url('../images/arrow_2.png')}.wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head){display:none}.instagram-feed-wd_page_wdi_settings form h2{display:none}#wdi_options_page_buttons_wrapper{margin-top:10px;width:700px}.wdi_hide{display:none}.wdi_hidden{display:none !important}.selectoff{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_filter_radio{margin:5px;display:inline-block}.wdi_filter_radio label{vertical-align:text-bottom}.wdi_filter_input{margin-top:10px}.wdi_filter_input input{height:28px;width:250px;margin-right:0;padding-right:0;line-height:28px}#wdi_filter_type{line-height:28px;margin:0;padding:0;position:relative;right:2px;top:-1px;font-weight:400}.wdi_filter_item{display:inline-block;padding:6px;margin-top:5px;border-radius:5px}.wdi_filter_by_username{background-color:#00a0d2;color:white}.wdi_filter_by_hashtag{background-color:#e08d11;color:white}.wdi_logic{display:inline-block;padding:5px;font-weight:bold}.wdi_filter_by_location{background-color:#509833;color:white}.wdi_filter_by_mention{background-color:#833888;color:white}.wdi_filter_by_description{background-color:#bd242b;color:white}.wdi_filter_by_url{background-color:#004eff;color:white}.wdi_remove_filter{padding-left:5px;color:white;font-size:13px}.wdi_remove_filter:hover{cursor:pointer}.wdi_source_user{display:inline-block;padding:5px}.wdi_source_img{display:inline-block}.wdi_source_img img{width:30px;height:30px;border-radius:15px;display:block}.wdi_source_username{display:inline-block;line-height:25px;font-size:15px !important;height:30px;vertical-align:bottom;padding:0 5px;font-weight:bold}#login_with_instagram>a:focus{-webkit-box-shadow:none;box-shadow:none}.wdi_help_bar_wrap{background-color:#fff;border:0;box-sizing:border-box;clear:both;color:#6e7990;font-size:14px;font-weight:bold;line-height:30px;padding:15px;vertical-align:middle;width:calc(100% - 22px)}.wdi_help_bar_text{float:left}.wdi_help_bar_text>a{color:#0073aa;text-decoration:none}.wdi_hb_buy_pro{float:right;padding:0}.wdi_hb_buy_pro a,.wdi_hb_buy_pro a:active,.wdi_hb_buy_pro a:visited,.wdi_hb_buy_pro a:hover{display:inline-block;font-weight:bold;font-size:14px;vertical-align:middle;border:0;box-shadow:none !important;text-decoration:none}.wdi_hb_buy_pro .wdi_support_link{color:#72777c !important;padding:0 10px}.wdi_hb_buy_pro .wdi_update_pro_link{background:#45a6b7;font-weight:bold;line-height:30px;padding:0 18px 0 18px;color:#fff !important}.wdi_hb_buy_pro img{border:0;display:inline-block;vertical-align:middle}#bullets_images_type,#bullets_images_color,#bull_style,#rl_butt_type,#rl_butt_color,#rl_butt_style{margin:0 10px 0 0;width:100px}.wds_ctrl_btn_upload{display:block !important;margin:5px 0 !important;text-align:center;vertical-align:middle;width:95%}.wds_reverse{margin:0 5px !important}.wds_free_button,.wds_free_button:hover{background:linear-gradient(to bottom,#e5e5e5,#e5e5e5) repeat scroll 0 0 #f3f3f3 !important;border-color:#bbb !important;color:#888 !important}.wdi_spider_free_version_label,.wdi_spider_free_version_label *{color:#808080 !important}.wdi_spider_free_version{background-color:#dfdfdf;border:1px solid #797979;border-radius:2px;padding:2px;width:210px}.wds_more{font-size:12px}.wrap .button{border-radius:3px !important;text-shadow:none !important}.wdi_spider_message_cont{display:none;width:99%}.wdi_spider_load{display:none}.wdi_spider_load_cont{background-color:rgba(0,0,0,0.2);left:0;height:100%;position:fixed;top:0;width:100%;z-index:99998}.wdi_spider_load_icon{left:0;height:100%;position:fixed;text-align:center;top:0;width:100%;z-index:99999}.wdi_spider_ajax_loading{border:none !important;margin-top:200px;width:50px;-webkit-animation:spin 2.5s infinite linear;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}@-moz-keyframes spin{0{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0{transform:rotate(0)}100%{transform:rotate(359deg)}}#TB_window,#TB_iframeContent{width:800px !important;height:500px !important}#TB_window{margin-left:-400px !important}.input_th{margin-left:0 !important;width:160px !important;font-family:sans-serif}.input_th2{margin-left:0 !important;width:160px !important;margin-top:5px;height:19px}.edit_input{height:28px !important;padding-bottom:7px !important}.add_tag_th{padding-left:21px;font-size:12px;font-family:sans-serif}.pointer{cursor:pointer}.non_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wds_position_table td,.wds_position_table input{border:1px solid #ccc;margin:2px}.wds_position_table .wds_position_td{background-color:#f4f4f4;display:inline-block;line-height:1;padding:0 !important}.wdi_spider_div_options{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;margin:2px 0 0 190px;padding:13px;min-height:300px;min-width:600px;vertical-align:top}.table_medium_col{text-align:center !important;width:70px}.table_medium_col_uncenter{width:80px}.table_extra_large_col{padding:4px !important;width:150px !important}.first-page,.prev-page,.next-page,.last-page,.table_extra_large_col a,.table_medium_col a,.table_big_col a,.table_small_col a{cursor:pointer}.wdi_spider_word_wrap{word-wrap:normal}.wdi_spider_description{color:#666;font-size:.923em;line-height:1.231em}.handle{background:url("../images/draggable.png") no-repeat transparent;border:0;cursor:move;display:inline-block;height:15px;margin:0 auto;vertical-align:middle;width:15px}.slider-icon{background-image:url("../images/slider-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.uninstall-icon{background-image:url("../images/uninstall-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.wdi_spider_label{font-weight:bold;width:100px}.wdi_spider_label_top{font-weight:bold;padding-top:3px;vertical-align:top;width:100px}.wdi_spider_fieldset .wdi_spider_label{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_label_options{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_choose_option{display:table;box-shadow:0 0 1px 1px #d2d2d2;margin-bottom:5px;border-radius:2px;padding:2px;box-sizing:border-box;cursor:pointer;width:100%}.wdi_spider_options_cont,.wdi_spider_bull_options_cont,.wdi_spider_pp_options_cont,.wdi_spider_options_color_cont,.wdi_spider_bull_options_color_cont,.wdi_spider_pp_options_color_cont{display:none;width:180px;height:150px;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.wdi_spider_option_cont{display:block;border-bottom:1px solid #d3d3d3;padding:3px 0 3px 0;box-sizing:content-box;width:98%;border-radius:0;cursor:pointer}.wdi_spider_option_cont_title{display:table-cell;vertical-align:middle;padding:0 0 0 4px}.wdi_spider_option_cont_img{display:table-cell;width:23%;height:15px;text-align:right;padding:5px 4px 0 0;box-sizing:border-box;background-color:#eee}.wdi_spider_option_main_title{display:table-cell;width:65%;vertical-align:middle;padding:0 0 0 4px;color:#555}.wdi_spider_sel_option_ic{display:table-cell;width:20%;height:15px;text-align:right;padding:0 6px 0 0;box-sizing:border-box}.wdi_spider_int_input{width:45px}.wdi_spider_char_input{width:115px}.wdi_spider_text_input{width:190px}.wdi_spider_slider_div{display:inline-block;vertical-align:middle;width:140px}.wdi_spider_slider_percentage,.wdi_spider_slider_percentage input,.wdi_spider_slider_percentage input :focus{background:transparent;border:0;color:#00aeef;display:inline;font-weight:bold;text-align:right;vertical-align:middle;width:30px}.updated,.error{margin:5px 0 2px !important}.buttons_div{clear:both;float:right;margin:5px 0}.buttons_div_left{float:left;margin:5px 0}.buttons_div_right{float:right;margin:5px 0}.wdi_spider_delete_img{background-image:url("../images/delete.png");border:0;cursor:pointer;display:inline-block;vertical-align:middle;height:14px;width:14px}.wdi_spider_delete_img_small{background-image:url("../images/delete.png");background-size:10px auto;border:medium none;cursor:pointer;display:inline-block;height:10px;margin-top:2px;vertical-align:middle;width:10px}.wdi_spider_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;float:left;margin:4px;padding:13px;width:97%}.wdi_spider_type_fieldset{background:none repeat scroll 0 0 #f4f4f4;border-radius:8px 8px 8px 8px;display:none;float:left;width:100%}.wdi_spider_child_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;float:left;margin:4px;width:30%;padding:13px;display:block}.wdi_spider_table td{padding:0;vertical-align:middle}.wdi_spider_ctrls{padding:4px;text-align:center;width:40px}.theme_type{background-color:#f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;cursor:pointer;display:inline-block;font-size:16px;height:24px;padding-top:5px;text-align:center;vertical-align:middle;width:123px;margin:2px 0 2px 0}.ui-slider-handle{cursor:pointer !important}.thumb{border:1px solid #ccc;max-height:120px;max-width:120px}.fileDescription{color:#666;cursor:pointer;font-family:sans-serif;font-size:12px}.filename{font-size:13px}.tag_div{background-clip:padding-box;background-color:#f3f3f3;border:1px solid #aaa;border-radius:3px 3px 3px 3px;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);color:#666;line-height:13px;margin:2px 0;padding:2px 5px 2px 5px;width:132px}.tags_div{overflow-y:auto;height:65px}.tag_name{width:118px}.edit_thumb{cursor:pointer}.wdi_spider_rotate{border-radius:2px;border:1px solid #fff;height:30px}.wdi_spider_search_value{height:2em;margin:0 0 4px}#th_order,.wdi_spider_order{display:none}.wds_add_video,.wds_resize_image,.wds_import,.wds_exports{display:none;padding:10px;height:60px;background-color:#fff;border:1px solid #999;top:50%;position:fixed;left:50%;text-align:left;z-index:100000;border-radius:3px;margin-top:-45px}.wds_add_video,.wds_resize_image{margin-left:-340px}.wds_exports{margin-left:-240px}.wds_import{margin-left:-185px}.wds_add_video input[type="text"],.wds_resize_image input[type="text"]{width:500px}.wds_opacity_video,.wds_opacity_import,.wds_opacity_export{background-color:#000;display:none;opacity:.75;filter:Alpha(opacity=75);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998}.wds_tabs{clear:both;display:none;position:relative;z-index:1}.wds_tabs a.wds_sub_active,.wds_tabs a.wds_active{background-color:#f5f5f5;border-bottom:1px solid #f5f5f5;color:#333}.wds_tabs a{background-color:#f9f9f9;border:1px solid #dfdfdf;border-top-left-radius:3px;border-top-right-radius:3px;color:#c7c7c7;display:block !important;float:left;font:bold 17px/32px Arial,serif;height:30px;margin:3px 3px 0 0;padding:0 10px;position:relative;text-decoration:none;width:130px}.wbs_subtab a{font:bold 14px/26px Arial,serif;height:26px;padding:0 5px;width:105px}.wds_add_layer{font:normal 20px/28px Arial,serif !important;width:initial !important;padding:0 9px !important}.wds_tab_title{background:none repeat scroll 0 0 transparent !important;border:none !important;cursor:pointer;opacity:.5;filter:Alpha(opacity=50);padding:1px;vertical-align:middle;width:50px}.wds_sub_active .wds_tab_title,.wds_layer_title{background-color:#fff !important;border-color:#dfdfdf !important;border-radius:3px !important;border-style:solid !important;border-width:1px !important;cursor:pointer;opacity:1;filter:Alpha(opacity=100)}.wds_tab_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:9px;height:9px;opacity:.5;filter:Alpha(opacity=50);vertical-align:middle}.wds_layer_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_layer_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_slide_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:12px;height:12px;vertical-align:middle}.wds_layer_depth{float:right;font-size:13px;line-height:15px;margin:1px 5px;text-align:left;width:40px}.wds_layer_label{display:inline-block;font-size:13px;width:80%}.wds_sub_active .wds_tab_remove{cursor:pointer !important;opacity:1;filter:Alpha(opacity=100)}.wds_box.wds_sub_active,.wds_box.wds_active{display:block}.wds_tab_label{display:block;width:inherit}.wds_box{display:none;margin-top:0 !important;position:relative;top:-1px}.wds_box{border:1px solid #dfdfdf;border-radius:3px;box-shadow:0 0 10px #f2f2f2;margin-top:15px;position:relative}.wds_clear{clear:both;float:none !important}.wds_box thead td{border-bottom:0 none !important}.wds_box tbody{background-color:#fff;border-top:0 none;padding-left:10px}.wds_box thead{background:-webkit-linear-gradient(#f5f5f5,#fff);background:-o-linear-gradient(#f5f5f5,#fff);background:-moz-linear-gradient(#f5f5f5,#fff);background:linear-gradient(#f5f5f5,#fff);border-top:0 none;border-bottom:0 none;color:#333;font:bold 12px/29px Arial,serif;height:29px;margin:0;padding:0 10px;text-align:left;text-shadow:0 1px 0 #fff}.wds_box table{border-collapse:collapse;border-spacing:0;width:100%}.wds_nav_tabs{background-color:#f5f5f5;border-right:1px solid #dfdfdf;float:left;height:640px;margin:0;width:150px}.wds_nav_tabs ul{list-style:none outside none;margin:10px 0;padding:0}.wds_nav_tabs .wds_sub_active,.wds_nav_tabs .wds_sub_active a,.wds_nav_tabs .wds_sub_active a:hover,.wds_nav_tabs .wds_active,.wds_nav_tabs .wds_active a,.wds_nav_tabs .wds_active a:hover{background:none repeat scroll 0 0 #fff;color:#333}.wds_nav_tabs .wds_active{border-color:#dfdfdf;border-width:1px 0 1px 1px;border-style:solid;margin:0 -1px 0 -4px;padding:0}.wds_nav_tabs li{border-color:transparent;border-style:solid;border-width:1px 0;list-style-type:none;margin-bottom:0}.wds_nav_tabs a{display:block;line-height:18px;padding:5px 5px 5px 12px;text-decoration:none}.wds_nav_box{background:none repeat scroll 0 0 #fff;display:none;height:610px;overflow:auto;padding:15px}.wds_nav_box.wds_active{display:block}.wds_layer_head{background-color:#f5f5f5;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;cursor:pointer;padding:5px}.wds_layer_head .handle{cursor:move;display:inline-block;margin:5px}.wds_box td{padding:10px !important}.wds_draggable{box-sizing:border-box;cursor:move}.wds_box .color{width:60px}.wds_active_layer{box-shadow:#2c2424 0 0 5px;border-radius:3px}.wds_draggable a,.wds_draggable a:hover{color:inherit !important;font-size:inherit !important;font-style:inherit !important;font-weight:inherit !important;text-decoration:none}#add_embed_help{height:200px;width:672px;top:40%}#add_embed input[type="text"]{width:500px}.wds_buttons{float:right;font-weight:normal;position:relative}.wds_reset_button{display:none;font-weight:normal;margin:10px 0;position:absolute;right:40px;z-index:1}#wdi_save_feed .two .section_col{width:47%;float:left;margin:0 1.5% 18px}#wdi_save_feed .wdi_element{margin:0 0 18px}#wdi_save_feed .half .wdi_element,#wdi_save_feed .one .wdi_element{width:96%;float:none;margin:0 2% 20px}#wdi_save_feed .wdi_element p{margin:2px 0 0}.wdi_section_name{font-size:19px;margin:0 auto 15px;width:100%;box-sizing:border-box;padding:15px;border-bottom:1px solid #f1f1f1;color:#444;cursor:pointer}.wdi_section{border:1px solid #dedede;margin-bottom:20px;background:#fff}.wdi_section .optioninput *{text-align:left}.wdi_section.half{width:49%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wdi_buttons{text-align:right;margin-top:7px}.wdi_tab .wdi_section.half:last-child{margin-left:2%}#how_to_publish_tab .wdi_howto_container{display:flex;flex-wrap:wrap}#how_to_publish_tab .wdi_howto_content{border:1px #ddd solid;display:flex;flex:1;flex-direction:column;margin:5px;min-width:250px;max-width:calc(25% - 20px);padding:20px 10px;text-align:center}#how_to_publish_tab .wdi_howto_container h2{font-size:23px;font-weight:normal;line-height:29px;margin:0;padding:11px 15px 4px 0}#how_to_publish_tab .wdi_howto_container .wdi_howto_content input{margin:0 auto;text-align:center;width:100%}.wdi_buttons button.button.preview-button{height:28px}@media(max-width:782px){.wdi_buttons button.button.preview-button{height:auto}}@media(min-width:768px){.wdi_border_wrapper .wdi_element_content{width:100%;display:block}.wdi_border_wrapper .wdi_element_title{display:block}.wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){width:calc(100% - 30px);height:28px}.wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{width:calc(100% - 78px)}.wdi_border_wrapper .wdi_element_content input[type=number]{width:calc(100% - 30px)}.wdi_border_wrapper .wdi_element_content select{width:calc(100% - 30px)}}@media(max-width:768px){#wdi_save_feed .two .section_col{width:96%;float:none;margin:0 2% 18px}.wdi_section.half{width:100%;float:none;margin:0 0 20px 0 !important}}.wdi_section_close::before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi_section_open::before{content:"\f140";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi-page-header{width:98%;padding:10px}.wdi-page-header .wdi_buttons{float:right}.wdi-page-header .WDI_title_input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.5em;width:30%;outline:0;margin:0 0 3px;background-color:#fff}.wdi_demo_img{margin-top:20px}
1
+ .wdi_clear{clear:both}.wdi_clear_tag:after{content:"";display:table;clear:both}#wdi_unistall{background-color:#d82121;border-color:#d31818;box-shadow:inset 0 1px 0 rgba(230,120,120,0.5),0 1px 0 rgba(0,0,0,.15)}#wdi_unistall:hover{background-color:#da1313}#wdi_unistall_table th{width:45%}.display_type_content{background:#fff;border:1px solid #dedede;margin-bottom:15px}.wdi_tooltip,.wdi_settings_link{display:block;font-size:14px !important;font-weight:bold;line-height:20px;margin-bottom:5px;color:#444;text-decoration:none}p.wdi_about_filed{font-size:13px;font-style:italic}.wdi_tooltip:hover,.wdi_settings_link:hover{color:#23282d;position:relative}.wdi_tooltip:hover:after{content:attr(wdi-tooltip);padding:4px 8px;color:#dbdbe0;position:absolute;left:0;top:100%;white-space:nowrap;z-index:20;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:2px;-moz-box-shadow:0 0 4px #222;-webkit-box-shadow:0 0 4px #222;box-shadow:0 0 4px rgba(0,0,0,0.5);background-color:rgba(0,0,0,0.75);font-size:12px}.wdi_pro_only{font-style:italic;color:#4e4e4e !important;background-color:#ccc !important;text-decoration:none}.wdi_pro_only_op{opacity:.6}.wdi_pro_notice{text-align:right;color:#15699f;font-size:20px !important;padding:10px}.wdi_pro_only_btn{background-color:#c5c0c0 !important;border-top-color:#c5c0c0 !important}.wdi-pro-overlay img{opacity:.7}#wdi_feed_users{width:100%;margin-top:2px}#wdi_feed_tabs .wdi_feed_tabs{border:1px solid #f1f1f1;color:#444;cursor:pointer;font-size:13px;font-weight:bold;padding:12px;background:#fff;text-decoration:none;display:inline-block}#wdi_feed_tabs{margin:16px 0}#wdi_feed_tabs .wdi_feed_tab_active,#wdi_feed_tabs .wdi_feed_tabs:hover{background:none repeat scroll 0 0 #fff;color:#9a2465}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{max-width:270px;margin:0 auto}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{max-width:100%}#wdi_feed_tabs .wdi_feed_tab_title{margin-top:1px;display:inline-block}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:8px}.display_type_container.wdi_clear_tag{display:table;margin:10px auto}.display_type_container>div{float:left;margin-right:15px}.wdi_user{border:1px solid #b9b9b9;background-color:rgba(0,0,0,.05);margin:0 4px 0 0;border-radius:5px;height:28px;position:relative;display:inline-block}.wdi_user:hover{background-color:rgba(0,0,0,.08)}.wdi_user a{text-decoration:none;color:black;line-height:28px;width:70%;margin-left:12%;margin-right:18%;height:100%;display:table-row;padding-right:3px}.wdi_user .wdi_profile_pic{width:20px;height:20px;top:4px;left:30px;padding:5px;vertical-align:middle;display:table-cell}.wdi_user span{display:table-cell;vertical-align:middle;left:55px;font-weight:bold;font-size:14px}.wdi_user .wdi_remove_user,.wdi_user .wdi_check_thumb_user{position:absolute;right:4px;width:15px;height:15px;top:6.5px;transition:all .1s ease}.wdi_user .wdi_remove_user:hover{cursor:pointer;transform:rotate(180deg)}.wdi_user .wdi_check_thumb_user:hover{cursor:pointer}.wdi_user .wdi_check_thumb_user{left:4px}.wdi_border_wrapper [scope='row']{padding:2px;font-size:13px;min-width:250px}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:2px}.small_input{width:60px;text-align:center}.display_type{text-align:center}.wdi_access_token_missing{font-size:14px;color:#000;clear:both;max-width:720px}.instagram-feed-wd_page_wdi_settings form{width:65%}.instagram-feed-wd_page_wdi_settings table td{padding-left:0;padding-right:0}.instagram-feed-wd_page_wdi_settings table th{padding-left:4px}.instagram-feed-wd_page_wdi_settings table input{float:right}#login_with_instagram{height:43px}#login_with_instagram .wdi_sign_in_button{background-image:url('../images/sign_in_with_instagram.png');background-repeat:no-repeat;background-position:left top;width:234px;height:43px;display:inline-block;float:left}#login_with_instagram .wdi_default_feed_button,#login_with_instagram .wdi_edit_default_feed_button{width:234px;height:43px;background-repeat:no-repeat;background-position:center top;display:inline-block}#login_with_instagram .wdi_default_feed_button{background-image:url('../images/default_feed_button.png');float:left;margin-right:10px}#login_with_instagram .wdi_edit_default_feed_button{background-image:url('../images/edit_feed_button.png');float:left}#wdi_options_page_buttons_wrapper .submit{display:inline;margin-left:15px}#wdi_reset_access_token{margin-top:0;float:left;width:232px;text-align:center}.wdi_advanced_option{width:100%;position:relative;font-weight:600}.wdi_advanced_option{background-color:#fff;cursor:pointer;border:1px solid #e3e3e3;border-radius:10px;border-collapse:separate;border-spacing:0}.wdi_advanced_option .wdi_advanced_option_head{border-bottom:1px solid #e3e3e3}.wdi_advanced_option .wdi_advanced_option_head th{padding-top:10px;padding-bottom:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th{border-bottom:1px solid #e3e3e3;border-bottom-left-radius:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td{border-bottom:1px solid #e3e3e3;border-bottom-right-radius:10px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option th{padding-left:12px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option td .wdwt_param{margin-left:15px}.wdi_advanced_option .wdi_advanced_option_icon{background-repeat:no-repeat;background-position:left top;width:20px;height:20px;display:inline-block;position:absolute;top:16px;right:10px}.wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon{background-image:url('../images/arrow_1.png')}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon{background-image:url('../images/arrow_2.png')}.wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head){display:none}.instagram-feed-wd_page_wdi_settings form h2{display:none}#wdi_options_page_buttons_wrapper{margin-top:10px;width:700px}.wdi_hide{display:none}.wdi_hidden{display:none !important}.selectoff{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_filter_radio{margin:5px;display:inline-block}.wdi_filter_radio label{vertical-align:text-bottom}.wdi_filter_input{margin-top:10px}.wdi_filter_input input{height:28px;width:250px;margin-right:0;padding-right:0;line-height:28px}#wdi_filter_type{line-height:28px;margin:0;padding:0;position:relative;right:2px;top:-1px;font-weight:400}.wdi_filter_item{display:inline-block;padding:6px;margin-top:5px;border-radius:5px}.wdi_filter_by_username{background-color:#00a0d2;color:white}.wdi_filter_by_hashtag{background-color:#e08d11;color:white}.wdi_logic{display:inline-block;padding:5px;font-weight:bold}.wdi_filter_by_location{background-color:#509833;color:white}.wdi_filter_by_mention{background-color:#833888;color:white}.wdi_filter_by_description{background-color:#bd242b;color:white}.wdi_filter_by_url{background-color:#004eff;color:white}.wdi_remove_filter{padding-left:5px;color:white;font-size:13px}.wdi_remove_filter:hover{cursor:pointer}.wdi_source_user{display:inline-block;padding:5px}.wdi_source_img{display:inline-block}.wdi_source_img img{width:30px;height:30px;border-radius:15px;display:block}.wdi_source_username{display:inline-block;line-height:25px;font-size:15px !important;height:30px;vertical-align:bottom;padding:0 5px;font-weight:bold}#login_with_instagram>a:focus{-webkit-box-shadow:none;box-shadow:none}.wdi_help_bar_wrap{background-color:#fff;border:0;box-sizing:border-box;clear:both;color:#6e7990;font-size:14px;font-weight:bold;line-height:30px;padding:15px;vertical-align:middle;width:calc(100% - 22px)}.wdi_help_bar_text{float:left}.wdi_help_bar_text>a{color:#0073aa;text-decoration:none}.wdi_hb_buy_pro{float:right;padding:0}.wdi_hb_buy_pro a,.wdi_hb_buy_pro a:active,.wdi_hb_buy_pro a:visited,.wdi_hb_buy_pro a:hover{display:inline-block;font-weight:bold;font-size:14px;vertical-align:middle;border:0;box-shadow:none !important;text-decoration:none}.wdi_hb_buy_pro .wdi_support_link{color:#72777c !important;padding:0 10px}.wdi_hb_buy_pro .wdi_update_pro_link{background:#45a6b7;font-weight:bold;line-height:30px;padding:0 18px 0 18px;color:#fff !important}.wdi_hb_buy_pro img{border:0;display:inline-block;vertical-align:middle}#bullets_images_type,#bullets_images_color,#bull_style,#rl_butt_type,#rl_butt_color,#rl_butt_style{margin:0 10px 0 0;width:100px}.wds_ctrl_btn_upload{display:block !important;margin:5px 0 !important;text-align:center;vertical-align:middle;width:95%}.wds_reverse{margin:0 5px !important}.wds_free_button,.wds_free_button:hover{background:linear-gradient(to bottom,#e5e5e5,#e5e5e5) repeat scroll 0 0 #f3f3f3 !important;border-color:#bbb !important;color:#888 !important}.wdi_spider_free_version_label,.wdi_spider_free_version_label *{color:#808080 !important}.wdi_spider_free_version{background-color:#dfdfdf;border:1px solid #797979;border-radius:2px;padding:2px;width:210px}.wds_more{font-size:12px}.wrap .button{border-radius:3px !important;text-shadow:none !important}.wdi_spider_message_cont{display:none;width:99%}.wdi_spider_load{display:none}.wdi_spider_load_cont{background-color:rgba(0,0,0,0.2);left:0;height:100%;position:fixed;top:0;width:100%;z-index:99998}.wdi_spider_load_icon{left:0;height:100%;position:fixed;text-align:center;top:0;width:100%;z-index:99999}.wdi_spider_ajax_loading{border:none !important;margin-top:200px;width:50px;-webkit-animation:spin 2.5s infinite linear;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}@-moz-keyframes spin{0{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0{transform:rotate(0)}100%{transform:rotate(359deg)}}#TB_window,#TB_iframeContent{width:800px !important;height:500px !important}#TB_window{margin-left:-400px !important}.input_th{margin-left:0 !important;width:160px !important;font-family:sans-serif}.input_th2{margin-left:0 !important;width:160px !important;margin-top:5px;height:19px}.edit_input{height:28px !important;padding-bottom:7px !important}.add_tag_th{padding-left:21px;font-size:12px;font-family:sans-serif}.pointer{cursor:pointer}.non_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wds_position_table td,.wds_position_table input{border:1px solid #ccc;margin:2px}.wds_position_table .wds_position_td{background-color:#f4f4f4;display:inline-block;line-height:1;padding:0 !important}.wdi_spider_div_options{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;margin:2px 0 0 190px;padding:13px;min-height:300px;min-width:600px;vertical-align:top}.table_medium_col{text-align:center !important;width:70px}.table_medium_col_uncenter{width:80px}.table_extra_large_col{padding:4px !important;width:150px !important}.first-page,.prev-page,.next-page,.last-page,.table_extra_large_col a,.table_medium_col a,.table_big_col a,.table_small_col a{cursor:pointer}.wdi_spider_word_wrap{word-wrap:normal}.wdi_spider_description{color:#666;font-size:.923em;line-height:1.231em}.handle{background:url("../images/draggable.png") no-repeat transparent;border:0;cursor:move;display:inline-block;height:15px;margin:0 auto;vertical-align:middle;width:15px}.slider-icon{background-image:url("../images/slider-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.uninstall-icon{background-image:url("../images/uninstall-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.wdi_spider_label{font-weight:bold;width:100px}.wdi_spider_label_top{font-weight:bold;padding-top:3px;vertical-align:top;width:100px}.wdi_spider_fieldset .wdi_spider_label{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_label_options{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_choose_option{display:table;box-shadow:0 0 1px 1px #d2d2d2;margin-bottom:5px;border-radius:2px;padding:2px;box-sizing:border-box;cursor:pointer;width:100%}.wdi_spider_options_cont,.wdi_spider_bull_options_cont,.wdi_spider_pp_options_cont,.wdi_spider_options_color_cont,.wdi_spider_bull_options_color_cont,.wdi_spider_pp_options_color_cont{display:none;width:180px;height:150px;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.wdi_spider_option_cont{display:block;border-bottom:1px solid #d3d3d3;padding:3px 0 3px 0;box-sizing:content-box;width:98%;border-radius:0;cursor:pointer}.wdi_spider_option_cont_title{display:table-cell;vertical-align:middle;padding:0 0 0 4px}.wdi_spider_option_cont_img{display:table-cell;width:23%;height:15px;text-align:right;padding:5px 4px 0 0;box-sizing:border-box;background-color:#eee}.wdi_spider_option_main_title{display:table-cell;width:65%;vertical-align:middle;padding:0 0 0 4px;color:#555}.wdi_spider_sel_option_ic{display:table-cell;width:20%;height:15px;text-align:right;padding:0 6px 0 0;box-sizing:border-box}.wdi_spider_int_input{width:45px}.wdi_spider_char_input{width:115px}.wdi_spider_text_input{width:190px}.wdi_spider_slider_div{display:inline-block;vertical-align:middle;width:140px}.wdi_spider_slider_percentage,.wdi_spider_slider_percentage input,.wdi_spider_slider_percentage input :focus{background:transparent;border:0;color:#00aeef;display:inline;font-weight:bold;text-align:right;vertical-align:middle;width:30px}.updated,.error{margin:5px 0 2px !important}.buttons_div{clear:both;float:right;margin:5px 0}.buttons_div_left{float:left;margin:5px 0}.buttons_div_right{float:right;margin:5px 0}.wdi_spider_delete_img{background-image:url("../images/delete.png");border:0;cursor:pointer;display:inline-block;vertical-align:middle;height:14px;width:14px}.wdi_spider_delete_img_small{background-image:url("../images/delete.png");background-size:10px auto;border:medium none;cursor:pointer;display:inline-block;height:10px;margin-top:2px;vertical-align:middle;width:10px}.wdi_spider_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;float:left;margin:4px;padding:13px;width:97%}.wdi_spider_type_fieldset{background:none repeat scroll 0 0 #f4f4f4;border-radius:8px 8px 8px 8px;display:none;float:left;width:100%}.wdi_spider_child_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;float:left;margin:4px;width:30%;padding:13px;display:block}.wdi_spider_table td{padding:0;vertical-align:middle}.wdi_spider_ctrls{padding:4px;text-align:center;width:40px}.theme_type{background-color:#f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;cursor:pointer;display:inline-block;font-size:16px;height:24px;padding-top:5px;text-align:center;vertical-align:middle;width:123px;margin:2px 0 2px 0}.ui-slider-handle{cursor:pointer !important}.thumb{border:1px solid #ccc;max-height:120px;max-width:120px}.fileDescription{color:#666;cursor:pointer;font-family:sans-serif;font-size:12px}.filename{font-size:13px}.tag_div{background-clip:padding-box;background-color:#f3f3f3;border:1px solid #aaa;border-radius:3px 3px 3px 3px;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);color:#666;line-height:13px;margin:2px 0;padding:2px 5px 2px 5px;width:132px}.tags_div{overflow-y:auto;height:65px}.tag_name{width:118px}.edit_thumb{cursor:pointer}.wdi_spider_rotate{border-radius:2px;border:1px solid #fff;height:30px}.wdi_spider_search_value{height:2em;margin:0 0 4px}#th_order,.wdi_spider_order{display:none}.wds_add_video,.wds_resize_image,.wds_import,.wds_exports{display:none;padding:10px;height:60px;background-color:#fff;border:1px solid #999;top:50%;position:fixed;left:50%;text-align:left;z-index:100000;border-radius:3px;margin-top:-45px}.wds_add_video,.wds_resize_image{margin-left:-340px}.wds_exports{margin-left:-240px}.wds_import{margin-left:-185px}.wds_add_video input[type="text"],.wds_resize_image input[type="text"]{width:500px}.wds_opacity_video,.wds_opacity_import,.wds_opacity_export{background-color:#000;display:none;opacity:.75;filter:Alpha(opacity=75);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998}.wds_tabs{clear:both;display:none;position:relative;z-index:1}.wds_tabs a.wds_sub_active,.wds_tabs a.wds_active{background-color:#f5f5f5;border-bottom:1px solid #f5f5f5;color:#333}.wds_tabs a{background-color:#f9f9f9;border:1px solid #dfdfdf;border-top-left-radius:3px;border-top-right-radius:3px;color:#c7c7c7;display:block !important;float:left;font:bold 17px/32px Arial,serif;height:30px;margin:3px 3px 0 0;padding:0 10px;position:relative;text-decoration:none;width:130px}.wbs_subtab a{font:bold 14px/26px Arial,serif;height:26px;padding:0 5px;width:105px}.wds_add_layer{font:normal 20px/28px Arial,serif !important;width:initial !important;padding:0 9px !important}.wds_tab_title{background:none repeat scroll 0 0 transparent !important;border:none !important;cursor:pointer;opacity:.5;filter:Alpha(opacity=50);padding:1px;vertical-align:middle;width:50px}.wds_sub_active .wds_tab_title,.wds_layer_title{background-color:#fff !important;border-color:#dfdfdf !important;border-radius:3px !important;border-style:solid !important;border-width:1px !important;cursor:pointer;opacity:1;filter:Alpha(opacity=100)}.wds_tab_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:9px;height:9px;opacity:.5;filter:Alpha(opacity=50);vertical-align:middle}.wds_layer_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_layer_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_slide_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:12px;height:12px;vertical-align:middle}.wds_layer_depth{float:right;font-size:13px;line-height:15px;margin:1px 5px;text-align:left;width:40px}.wds_layer_label{display:inline-block;font-size:13px;width:80%}.wds_sub_active .wds_tab_remove{cursor:pointer !important;opacity:1;filter:Alpha(opacity=100)}.wds_box.wds_sub_active,.wds_box.wds_active{display:block}.wds_tab_label{display:block;width:inherit}.wds_box{display:none;margin-top:0 !important;position:relative;top:-1px}.wds_box{border:1px solid #dfdfdf;border-radius:3px;box-shadow:0 0 10px #f2f2f2;margin-top:15px;position:relative}.wds_clear{clear:both;float:none !important}.wds_box thead td{border-bottom:0 none !important}.wds_box tbody{background-color:#fff;border-top:0 none;padding-left:10px}.wds_box thead{background:-webkit-linear-gradient(#f5f5f5,#fff);background:-o-linear-gradient(#f5f5f5,#fff);background:-moz-linear-gradient(#f5f5f5,#fff);background:linear-gradient(#f5f5f5,#fff);border-top:0 none;border-bottom:0 none;color:#333;font:bold 12px/29px Arial,serif;height:29px;margin:0;padding:0 10px;text-align:left;text-shadow:0 1px 0 #fff}.wds_box table{border-collapse:collapse;border-spacing:0;width:100%}.wds_nav_tabs{background-color:#f5f5f5;border-right:1px solid #dfdfdf;float:left;height:640px;margin:0;width:150px}.wds_nav_tabs ul{list-style:none outside none;margin:10px 0;padding:0}.wds_nav_tabs .wds_sub_active,.wds_nav_tabs .wds_sub_active a,.wds_nav_tabs .wds_sub_active a:hover,.wds_nav_tabs .wds_active,.wds_nav_tabs .wds_active a,.wds_nav_tabs .wds_active a:hover{background:none repeat scroll 0 0 #fff;color:#333}.wds_nav_tabs .wds_active{border-color:#dfdfdf;border-width:1px 0 1px 1px;border-style:solid;margin:0 -1px 0 -4px;padding:0}.wds_nav_tabs li{border-color:transparent;border-style:solid;border-width:1px 0;list-style-type:none;margin-bottom:0}.wds_nav_tabs a{display:block;line-height:18px;padding:5px 5px 5px 12px;text-decoration:none}.wds_nav_box{background:none repeat scroll 0 0 #fff;display:none;height:610px;overflow:auto;padding:15px}.wds_nav_box.wds_active{display:block}.wds_layer_head{background-color:#f5f5f5;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;cursor:pointer;padding:5px}.wds_layer_head .handle{cursor:move;display:inline-block;margin:5px}.wds_box td{padding:10px !important}.wds_draggable{box-sizing:border-box;cursor:move}.wds_box .color{width:60px}.wds_active_layer{box-shadow:#2c2424 0 0 5px;border-radius:3px}.wds_draggable a,.wds_draggable a:hover{color:inherit !important;font-size:inherit !important;font-style:inherit !important;font-weight:inherit !important;text-decoration:none}#add_embed_help{height:200px;width:672px;top:40%}#add_embed input[type="text"]{width:500px}.wds_buttons{float:right;font-weight:normal;position:relative}.wds_reset_button{display:none;font-weight:normal;margin:10px 0;position:absolute;right:40px;z-index:1}#wdi_save_feed .two .section_col{width:47%;float:left;margin:0 1.5% 18px}#wdi_save_feed .wdi_element{margin:0 0 18px}#wdi_save_feed .half .wdi_element,#wdi_save_feed .one .wdi_element{width:96%;float:none;margin:0 2% 20px}.wdi_element_name_liked_feed{display:none !important}#wdi_save_feed .wdi_element p{margin:2px 0 0}.wdi_section_name{font-size:19px;margin:0 auto 15px;width:100%;box-sizing:border-box;padding:15px;border-bottom:1px solid #f1f1f1;color:#444;cursor:pointer}.wdi_section{border:1px solid #dedede;margin-bottom:20px;background:#fff}.wdi_section .optioninput *{text-align:left}.wdi_section.half{width:49%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wdi_buttons{text-align:right;margin-top:7px}.wdi_tab .wdi_section.half:last-child{margin-left:2%}#how_to_publish_tab .wdi_howto_container{display:flex;flex-wrap:wrap}#how_to_publish_tab .wdi_howto_content{border:1px #ddd solid;display:flex;flex:1;flex-direction:column;margin:5px;min-width:250px;max-width:calc(25% - 20px);padding:20px 10px;text-align:center}#how_to_publish_tab .wdi_howto_container h2{font-size:23px;font-weight:normal;line-height:29px;margin:0;padding:11px 15px 4px 0}#how_to_publish_tab .wdi_howto_container .wdi_howto_content input{margin:0 auto;text-align:center;width:100%}.wdi_buttons button.button.preview-button{height:28px}@media(max-width:782px){.wdi_buttons button.button.preview-button{height:auto}}@media(min-width:768px){.wdi_border_wrapper .wdi_element_content{width:100%;display:block}.wdi_border_wrapper .wdi_element_title{display:block}.wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){width:calc(100% - 30px);height:28px}.wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{width:calc(100% - 78px)}.wdi_border_wrapper .wdi_element_content input[type=number]{width:calc(100% - 30px)}.wdi_border_wrapper .wdi_element_content select{width:calc(100% - 30px)}}@media(max-width:768px){#wdi_save_feed .two .section_col{width:96%;float:none;margin:0 2% 18px}.wdi_section.half{width:100%;float:none;margin:0 0 20px 0 !important}}.wdi_section_close::before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi_section_open::before{content:"\f140";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi-page-header{width:98%;padding:10px}.wdi-page-header .wdi_buttons{float:right}.wdi-page-header .WDI_title_input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.5em;width:30%;outline:0;margin:0 0 3px;background-color:#fff}.wdi_demo_img{margin-top:20px}
framework/WDILibrary.php CHANGED
@@ -978,6 +978,31 @@ class WDILibrary {
978
  }
979
  }
980
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
981
 
982
  /*
983
  * @return color if valid color, otherwise return false
978
  }
979
  }
980
 
981
+ public static function keep_only_self_user($feed_row){
982
+ global $wdi_options;
983
+
984
+ if($feed_row['liked_feed'] == 'liked'){
985
+ $feed_row['nothing_to_display'] = '1';
986
+ return $feed_row;
987
+ }
988
+
989
+ $users = json_decode($feed_row['feed_users']);
990
+ $new_users_list = array();
991
+
992
+ foreach($users as $i=>$user) {
993
+
994
+ if(substr($user->username,0,1) === '#' || $user->username === $wdi_options['wdi_user_name']){
995
+ $new_users_list[] = $user;
996
+ }
997
+ }
998
+
999
+ $feed_row['nothing_to_display'] = (empty($new_users_list)) ? '1' : '0';
1000
+ $feed_row['feed_users'] = json_encode($new_users_list);
1001
+
1002
+
1003
+ return $feed_row;
1004
+ }
1005
+
1006
 
1007
  /*
1008
  * @return color if valid color, otherwise return false
framework/WDI_admin_view.php CHANGED
@@ -18,7 +18,20 @@ class WDI_admin_view{
18
  $this->params=$this->merge_params($defaults,$initial_params);
19
  }
20
 
21
-
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  /**
24
  * Displays a single button for toggling some other elements onclick
18
  $this->params=$this->merge_params($defaults,$initial_params);
19
  }
20
 
21
+ /**
22
+ * Displays a link like button
23
+ *
24
+ */
25
+ public function link_button($element, $context = 'option', $opt_val = '', $meta=array()){
26
+ global $wdi_options;
27
+ ?>
28
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
29
+ <div class="block margin">
30
+ <a href="<?php echo $element['href']; ?>" id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo esc_html($element['title']); ?></a>
31
+ </div>
32
+ </div>
33
+ <?php
34
+ }
35
 
36
  /**
37
  * Displays a single button for toggling some other elements onclick
frontend/shortcode.php CHANGED
@@ -67,6 +67,12 @@ function wdi_feed($atts, $widget_params = '')
67
  $feed_model = new WDIModelFeeds_wdi();
68
  //getting all feed information from db
69
  $feed_row = WDILibrary::objectToArray($feed_model->get_feed_row($attributes['id']));
 
 
 
 
 
 
70
 
71
 
72
  //checking if access token is not set or removed display proper error message
67
  $feed_model = new WDIModelFeeds_wdi();
68
  //getting all feed information from db
69
  $feed_row = WDILibrary::objectToArray($feed_model->get_feed_row($attributes['id']));
70
+ $feed_row = WDILibrary::keep_only_self_user($feed_row);
71
+
72
+ if($feed_row['nothing_to_display'] === '1'){
73
+ ob_get_clean();
74
+ return __('Cannot get other user media. API shut down by Instagram. Sorry. Display only your media.', "wd-instagram-feed");
75
+ }
76
 
77
 
78
  //checking if access token is not set or removed display proper error message
js/gallerybox/wdi_gallery_box.js CHANGED
@@ -411,7 +411,7 @@ wdi_comments_manager = {
411
  var username = (comments[i]['from']['username']);
412
  var profile_picture = (comments[i]['from']['profile_picture']);
413
  var singleComment = jQuery('<div class="wdi_single_comment"></div>');
414
- singleComment.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/' + username + '"><img style="height:25px;width:25px;border-radius:25px" src="' + profile_picture + '"> ' + username + '</a></span><span class="wdi_comment_date">' + wdi_front.convertUnixDate(comments[i]['created_time']) + '</span></p>'));
415
  singleComment.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>' + commentText + '</p></span></div>'));
416
  jQuery('#wdi_added_comments').prepend(singleComment);
417
  }
@@ -466,12 +466,12 @@ wdi_comments_manager = {
466
  {
467
  if (response == '' || response == undefined || response == null) {
468
  errorMessage = 'Network Error, please try again later :(';
469
- wdi_front.show_alert(errorMessage);
470
  return;
471
  }
472
  if (response['meta']['code'] != 200) {
473
  errorMessage = response['meta']['error_message'];
474
- wdi_front.show_alert(errorMessage);
475
  return;
476
  }
477
 
@@ -621,19 +621,25 @@ function wdi_captcha_refresh(id)
621
 
622
  function wdi_play_pause($this)
623
  {
624
- var video = $this.get(0);
625
- var regex = /firefox/i;
626
- var firefox = false;
627
- if (navigator.userAgent.match(regex)) {
628
- firefox = true;
629
- }
630
- if (!firefox) {
631
- if (!video.paused) {
632
- video.pause();
633
- } else {
634
- video.play();
635
- }
 
 
 
 
 
636
  }
 
637
 
638
 
639
  }
411
  var username = (comments[i]['from']['username']);
412
  var profile_picture = (comments[i]['from']['profile_picture']);
413
  var singleComment = jQuery('<div class="wdi_single_comment"></div>');
414
+ singleComment.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/' + username + '">' + username + '</a></span><span class="wdi_comment_date">' + wdi_front.convertUnixDate(comments[i]['created_time']) + '</span></p>'));
415
  singleComment.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>' + commentText + '</p></span></div>'));
416
  jQuery('#wdi_added_comments').prepend(singleComment);
417
  }
466
  {
467
  if (response == '' || response == undefined || response == null) {
468
  errorMessage = 'Network Error, please try again later :(';
469
+ console.log('%c' + errorMessage, "color:#cc0000;");
470
  return;
471
  }
472
  if (response['meta']['code'] != 200) {
473
  errorMessage = response['meta']['error_message'];
474
+ console.log('%c' + errorMessage, "color:#cc0000;");
475
  return;
476
  }
477
 
621
 
622
  function wdi_play_pause($this)
623
  {
624
+ var is_chrome = navigator.userAgent.indexOf('Chrome') > -1;
625
+ var is_safari = navigator.userAgent.indexOf("Safari") > -1;
626
+ if ((is_chrome)&&(is_safari)) {is_safari=false;}
627
+ if(is_safari){
628
+ return;
629
+ }
630
+ var video = $this.get(0);
631
+ var regex = /firefox/i;
632
+ var firefox = false;
633
+ if (navigator.userAgent.match(regex)) {
634
+ firefox = true;
635
+ }
636
+ if (!firefox) {
637
+ if (!video.paused) {
638
+ video.pause();
639
+ } else {
640
+ video.play();
641
  }
642
+ }
643
 
644
 
645
  }
js/gallerybox/wdi_gallery_box.min.js CHANGED
@@ -1 +1 @@
1
- var isPopUpOpened=false;var wdi_data=[];function wdi_spider_createpopup(a,k,b,m,e,l,f,j,h){a=a.replace(/&#038;/g,"&");if(isPopUpOpened){return}isPopUpOpened=true;if(wdi_spider_hasalreadyreceivedpopup(l)||wdi_spider_isunsupporteduseragent()){return}jQuery("html").attr("style","overflow:hidden !important;");jQuery("#wdi_spider_popup_loading_"+k).css({display:"block"});jQuery("#wdi_spider_popup_overlay_"+k).css({display:"block"});var d=0;var c;for(var g=0;g<j.parsedData.length;g++){if(j.parsedData[g].id===h){d=g;c=[j.parsedData[g]];break}}jQuery.ajax({type:"POST",url:a,dataType:"text",data:{action:"WDIGalleryBox",image_rows:JSON.stringify(c),feed_id:j.feed_row.id,feed_counter:j.feed_row.wdi_feed_counter,current_image_index:d,image_rows_count:j.parsedData.length,carousel_media_row:JSON.stringify(c[0].carousel_media)},success:function(o){var n=jQuery('<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap wdi_lightbox_theme_'+j.feed_row.theme_id+'" style="width:'+b+"px;height:"+m+"px;margin-top:-"+(m/2)+"px;margin-left: -"+(b/2)+'px; ">'+o+"</div>");var p=new wdi_construct_popup(n,j,j.parsedData,h);p.construct();n.hide().appendTo("body");wdi_spider_showpopup(l,f,n,e);jQuery("#wdi_spider_popup_loading_"+k).css({display:"none !important;"})}})}var wdi_construct_popup=function(a,b,c,d){this.theme_row={};this.construct=function(){this.theme_row=window["wdi_theme_"+b.feed_row.theme_id];if(b.feed_row.popup_enable_filmstrip&&b.feed_row.popup_enable_filmstrip==="1"){this.add_filmstrip()}this.set_wdi_data()};this.add_filmstrip=function(){var l="horizontal";if(this.theme_row.lightbox_filmstrip_pos==="right"||this.theme_row.lightbox_filmstrip_pos==="left"){l="vertical"}var y=(l==="horizontal")?"fa-angle-left":"fa-angle-up";var x=(l==="horizontal")?"fa-angle-right":"fa-angle-down";var h="";var q,f;if(l==="horizontal"){f=q=(typeof b.feed_row.popup_filmstrip_height!=="undefined")?(b.feed_row.popup_filmstrip_height):"20"}else{f=q=(typeof b.feed_row.popup_filmstrip_height!=="undefined")?(b.feed_row.popup_filmstrip_height):"50"}q=f=parseInt(f);for(var w=0;w<c.length;w++){var e=c[w];var s,k,A;if(e.resolution&&e.resolution!==""){var n=e.resolution.split(" ");var p=intval($resolution_arr[0]);var z=intval($resolution_arr[2]);if(p!==0&&z!==0){A=Math.max(f/p,q/z);s=p*A;k=z*A}else{s=f;k=q}}else{s=f;k=q}A=Math.max(f/s,q/k);s*=A;k*=A;var g=(f-s)/2;var j=(q-k)/2;var u="wdi_filmstrip_thumbnail "+((parseInt(e.id)===parseInt(d))?"wdi_thumb_active":"wdi_thumb_deactive");var t="width:"+s+"px;height:"+k+"px;margin-left:"+g+"px;margin-top:"+j+"px;";var m=(typeof e.images[b.feedImageResolution]["url"]!=="undefined")?e.images[b.feedImageResolution]["url"]:e.thumb_url;var B="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+w+"', wdi_data)";var v="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+w+"', wdi_data)";var r='<img style="'+t+'" class="wdi_filmstrip_thumbnail_img" src="'+m+'" onclick="'+B+'" ontouchend="'+v+'" image_id="'+e.id+'" image_key="'+w+'" alt="'+e.alt+'" />';h+='<div id="wdi_filmstrip_thumbnail_'+w+'" class="'+u+'">'+r+"</div>"}var o='<div class="wdi_filmstrip_left"><i class="fa '+y+'"></i></div><div class="wdi_filmstrip"><div class="wdi_filmstrip_thumbnails">'+h+'</div></div><div class="wdi_filmstrip_right"><i class="fa '+x+'"></i></div>';a.find(".wdi_filmstrip_container").append(o)};this.set_wdi_data=function(){wdi_data=[];for(var e=0;e<c.length;e++){wdi_data[e]=[];wdi_data[e]["number"]=e+1;wdi_data[e]["id"]=c[e].id;wdi_data[e]["alt"]=c[e].alt;wdi_data[e]["description"]=c[e].description;wdi_data[e]["username"]=c[e].username;wdi_data[e]["profile_picture"]=c[e].profile_picture;wdi_data[e]["image_url"]=c[e].image_url;wdi_data[e]["thumb_url"]=c[e].thumb_url;wdi_data[e]["date"]=c[e].date;wdi_data[e]["comment_count"]=c[e].comment_count;wdi_data[e]["filetype"]=c[e].filetype;wdi_data[e]["filename"]=c[e].filename;wdi_data[e]["avg_rating"]=c[e].avg_rating;wdi_data[e]["rate"]=c[e].rate;wdi_data[e]["rate_count"]=c[e].rate_count;wdi_data[e]["hit_count"]=c[e].hit_count;wdi_data[e]["comments_data"]=(typeof c[e].comments_data!=="undefined")?c[e].comments_data:"null";wdi_data[e]["carousel_media"]=(typeof c[e]["carousel_media"]!=="undefined")?c[e]["carousel_media"]:null}}};function wdi_spider_showpopup(c,a,b,d){isPopUpOpened=true;b.show();wdi_spider_receivedpopup(c,a)}function wdi_spider_hasalreadyreceivedpopup(a){if(document.cookie.indexOf(a)>-1){delete document.cookie[document.cookie.indexOf(a)]}return false}function wdi_spider_receivedpopup(c,a){var b=new Date();b.setDate(b.getDate()+a);document.cookie=c+"=true;expires="+b.toUTCString()+";path=/"}function wdi_spider_isunsupporteduseragent(){return(!window.XMLHttpRequest)}function wdi_spider_destroypopup(d){if(document.getElementById("wdi_spider_popup_wrap")!=null){wdi_comments_manager.popup_destroyed();if(typeof jQuery().fullscreen!=="undefined"&&jQuery.isFunction(jQuery().fullscreen)){if(jQuery.fullscreen.isFullScreen()){jQuery.fullscreen.exit()}}if(typeof enable_addthis!="undefined"&&enable_addthis){jQuery(".at4-share-outer").hide()}setTimeout(function(){jQuery(".wdi_spider_popup_wrap").remove();jQuery(".wdi_spider_popup_loading").css({display:"none"});jQuery(".wdi_spider_popup_overlay").css({display:"none"});jQuery(document).off("keydown");jQuery("html").attr("style","")},20)}isPopUpOpened=false;var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));var c=document.querySelector('meta[name="viewport"]');if(a&&c){c.content="width=device-width, initial-scale=1"}var b=jQuery(document).scrollTop();window.location.hash="";jQuery(document).scrollTop(b);if(typeof wdi_playInterval!="undefined"){clearInterval(wdi_playInterval)}}Object.size=function(c){var b=0,a;for(a in c){if(c.hasOwnProperty(a)){b++}}return b};function wdi_spider_ajax_save(a,b){wdi_comments_manager.init(b);return false}wdi_comments_manager={media_id:"",mediaComments:[],load_more_count:10,commentCounter:0,currentKey:-1,init:function(a){this.instagram=new WDIInstagram();this.instagram.addToken(wdi_front.access_token);if(this.currentKey!=a){this.currentKey=a;this.reset_comments()}else{}},reset_comments:function(){jQuery("#wdi_load_more_comments").remove();jQuery("#wdi_added_comments").html("");this.commentCounter=0;this.media_id=wdi_data[this.currentKey]["id"];this.getAjaxComments(this.currentKey)},popup_destroyed:function(){this.media_id="";this.mediaComments=[];this.commentCounter=0;this.currentKey=-1},showComments:function(f,e){if(Object.size(f)-this.commentCounter-e<0||e===undefined){e=Object.size(f)-this.commentCounter}var b=this.commentCounter;for(i=Object.size(f)-b-1;i>=Object.size(f)-b-e;i--){this.commentCounter++;var d=(f[i]["text"]);d=this.filterCommentText(d);var g=(f[i]["from"]["username"]);var c=(f[i]["from"]["profile_picture"]);var a=jQuery('<div class="wdi_single_comment"></div>');a.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/'+g+'"><img style="height:25px;width:25px;border-radius:25px" src="'+c+'"> '+g+'</a></span><span class="wdi_comment_date">'+wdi_front.convertUnixDate(f[i]["created_time"])+"</span></p>"));a.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>'+d+"</p></span></div>"));jQuery("#wdi_added_comments").prepend(a)}this.updateScrollbar()},updateScrollbar:function(){var b=jQuery("#wdi_comments");var a=jQuery("#wdi_added_comments");jQuery(".wdi_comments").attr("class","wdi_comments");jQuery(".wdi_comments").html("");jQuery(".wdi_comments").append(b);jQuery(".wdi_comments").append(a);jQuery(".wdi_comments_close_btn").on("click",wdi_comment)},getAjaxComments:function(){this.instagram.getRecentMediaComments(this.media_id,{success:function(a){if(a==""||a==undefined||a==null){errorMessage="Network Error, please try again later :(";wdi_front.show_alert(errorMessage);return}if(a.meta["code"]!=200){errorMessage=a.meta["error_message"];wdi_front.show_alert(errorMessage);return}wdi_comments_manager.mediaComments=a.data;var b=wdi_data[wdi_comments_manager.currentKey];b.comments_data=a.data;wdi_comments_manager.showComments(b.comments_data,wdi_comments_manager.load_more_count);wdi_comments_manager.ajax_comments_ready(a.data)}})},ajax_comments_ready:function(a){this.createLoadMoreAndBindEvent()},createLoadMoreAndBindEvent:function(){jQuery("#wdi_added_comments").prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>'));jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){jQuery(this).remove();wdi_comments_manager.showComments(wdi_comments_manager.mediaComments,wdi_comments_manager.load_more_count);wdi_comments_manager.createLoadMoreAndBindEvent()})},filterCommentText:function(d){var c=d.split(" ");var b="";for(var a=0;a<c.length;a++){switch(c[a][0]){case"@":b+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/'+c[a].substring(1,c[a].length)+'">'+c[a]+"</a> ";break;case"#":b+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/explore/tags/'+c[a].substring(1,c[a].length)+'">'+c[a]+"</a> ";break;default:b+=c[a]+" "}}b=b.substring(0,b.length-1);return b}};function wdi_spider_set_input_value(b,a){if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_spider_check_required(b,a){if(jQuery("#"+b).val()==""){wdi_front.show_alert(a+"* "+wdi_objectL10n.wdi_field_required);jQuery("#"+b).attr("style","border-color: #FF0000;");jQuery("#"+b).focus();return true}else{return false}}function wdi_spider_check_email(b){if(jQuery("#"+b).val()!=""){var a=jQuery("#"+b).val().replace(/^\s+|\s+$/g,"");if(a.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)==-1){wdi_front.show_alert(wdi_objectL10n.wdi_mail_validation);return true}return false}}function wdi_captcha_refresh(a){if(document.getElementById(a+"_img")&&document.getElementById(a+"_input")){srcArr=document.getElementById(a+"_img").src.split("&r=");document.getElementById(a+"_img").src=srcArr[0]+"&r="+Math.floor(Math.random()*100);document.getElementById(a+"_img").style.display="inline-block";document.getElementById(a+"_input").value=""}}function wdi_play_pause(d){var c=d.get(0);var b=/firefox/i;var a=false;if(navigator.userAgent.match(b)){a=true}if(!a){if(!c.paused){c.pause()}else{c.play()}}}function wdi_spider_display_embed(m,n,j,g){var b="";switch(m){case"EMBED_OEMBED_YOUTUBE_VIDEO":var k="<iframe ";if(n!=""){k+=' src="//www.youtube.com/embed/'+n+'?enablejsapi=1&wmode=transparent"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){k+=" "+attr+'="'+j[attr]+'"'}}}k+=" ></iframe>";b+=k;break;case"EMBED_OEMBED_VIMEO_VIDEO":var f="<iframe ";if(n!=""){f+=' src="//player.vimeo.com/video/'+n+'?enablejsapi=1"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){f+=" "+attr+'="'+j[attr]+'"'}}}f+=" ></iframe>";b+=f;break;case"EMBED_OEMBED_FLICKR_IMAGE":var d="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){d+=" "+attr+'="'+j[attr]+'"'}}}d+=" >";if(n!=""){d+='<img src="'+n+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'}d+="</div>";b+=d;break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var e="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}e+=" >";if(n!=""){e+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+n+'" type="video/mp4"> Your browser does not support the video tag. </video>'}e+="</div>";b+=e;break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":var e="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}e+=" >";if(g!=null&&g.length){for(var c=0;c<g.length;c++){if(g[c]["type"]=="image"){e+='<img src="'+g[c]["images"]["standard_resolution"]["url"]+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;" data-id="'+c+'" class="carousel_media '+(c==0?"active":"")+'">'}else{if(g[c]["type"]=="video"){e+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="'+c+'" class="carousel_media '+(c==0?"active":"")+'"><source src="'+g[c]["videos"]["standard_resolution"]["url"]+'" type="video/mp4"> Your browser does not support the video tag. </video>'}}}}else{if(n!=""){e+='<img src="//instagram.com/p/'+n+'/media/?size=l" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'}}e+="</div>";b+=e;break;case"EMBED_OEMBED_INSTAGRAM_POST":var e="<div ";var a="";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"';if(attr=="CLASS"||attr=="class"||attr=="Class"){obj_class=j[attr]}}}}e+=" >";if(n!=""){e+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+n+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'}e+="</div>";b+=e;break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var l="<iframe ";if(n!=""){l+=' src="//www.dailymotion.com/embed/video/'+n+'?api=postMessage"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){l+=" "+attr+'="'+j[attr]+'"'}}}l+=" ></iframe>";b+=l;break;case"EMBED_OEMBED_IMGUR":var h="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}h+=" >";if(n!=""){h+='<img src="'+n+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'}h+="</div>";b+=h;break;default:}return b}function wdi_testBrowser_cssTransitions(){return wdi_testDom("Transition")}function wdi_testBrowser_cssTransforms3d(){return wdi_testDom("Perspective")}function wdi_testDom(d){var a=["","-webkit-","-moz-","-ms-","-o-","-khtml-"];var c=["","Webkit","Moz","ms","O","Khtml"];var b=c.length;while(b--){if(typeof document.body.style[c[b]+d]!=="undefined"){return true}}return false}function wdi_cube(c,d,b,a,k,l,h,j,e,g){if(!wdi_testBrowser_cssTransitions()){return wdi_fallback(j,e,g)}if(!wdi_testBrowser_cssTransforms3d()){return wdi_fallback3d(j,e,g)}wdi_trans_in_progress=true;jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");jQuery(".wdi_slide_bg").css("perspective",1000);jQuery(j).css({transform:"translateZ("+c+"px)",backfaceVisibility:"hidden"});jQuery(e).css({opacity:1,filter:"Alpha(opacity=100)",backfaceVisibility:"hidden",transform:"translateY("+b+"px) translateX("+d+"px) rotateY("+k+"deg) rotateX("+a+"deg)"});jQuery(".wdi_slider").css({transform:"translateZ(-"+c+"px)",transformStyle:"preserve-3d"});setTimeout(function(){jQuery(".wdi_slider").css({transition:"all "+wdi_transition_duration+"ms ease-in-out",transform:"translateZ(-"+c+"px) rotateX("+l+"deg) rotateY("+h+"deg)"})},20);jQuery(".wdi_slider").one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(f));function f(){jQuery(j).removeAttr("style");jQuery(e).removeAttr("style");jQuery(".wdi_slider").removeAttr("style");jQuery(j).css({opacity:0,filter:"Alpha(opacity=0)","z-index":1});jQuery(e).css({opacity:1,filter:"Alpha(opacity=100)","z-index":2});wdi_trans_in_progress=false;jQuery(j).html("");if(typeof event_stack!=="undefined"){if(event_stack.length>0){key=event_stack[0].split("-");event_stack.shift();wdi_change_image(key[0],key[1],wdi_data,true)}}wdi_change_watermark_container()}}function wdi_cubeH(b,a,d){var c=jQuery(b).width()/2;if(d=="right"){wdi_cube(c,c,0,0,90,0,-90,b,a,d)}else{if(d=="left"){wdi_cube(c,-c,0,0,-90,0,90,b,a,d)}}}function wdi_cubeV(b,a,d){var c=jQuery(b).height()/2;if(d=="right"){wdi_cube(c,0,-c,90,0,-90,0,b,a,d)}else{if(d=="left"){wdi_cube(c,0,c,-90,0,90,0,b,a,d)}}}function wdi_fallback(b,a,c){wdi_fade(b,a,c)}function wdi_fallback3d(b,a,c){wdi_sliceV(b,a,c)}function wdi_none(b,a,c){jQuery(b).css({opacity:0,"z-index":1});jQuery(a).css({opacity:1,"z-index":2});jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");wdi_trans_in_progress=false;jQuery(b).html("");wdi_change_watermark_container()}function wdi_fade(b,a,c){jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");if(wdi_testBrowser_cssTransitions()){jQuery(a).css("transition","opacity "+wdi_transition_duration+"ms linear");jQuery(b).css({opacity:0,"z-index":1});jQuery(a).css({opacity:1,"z-index":2});wdi_change_watermark_container()}else{jQuery(b).animate({opacity:0,"z-index":1},wdi_transition_duration);jQuery(a).animate({opacity:1,"z-index":2},{duration:wdi_transition_duration,complete:function(){wdi_trans_in_progress=false;jQuery(b).html("");wdi_change_watermark_container()}});jQuery(b).fadeTo(wdi_transition_duration,0);jQuery(a).fadeTo(wdi_transition_duration,1)}}function wdi_grid(k,L,w,I,H,o,u,A,M,g){if(!wdi_testBrowser_cssTransitions()){return wdi_fallback(A,M,g)}wdi_trans_in_progress=true;jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");var F=(wdi_transition_duration)/(k+L);function x(P,Y,V,R,Q,X,O,W,U,T,j){var S=(T+j)*F;return jQuery('<span class="wdi_gridlet" />').css({display:"block",width:P,height:Y,top:V,left:Q,backgroundImage:'url("'+O+'")',backgroundColor:jQuery(".wdi_spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:X+"px "+R+"px",backgroundSize:W+"px "+U+"px",transition:"all "+wdi_transition_duration+"ms ease-in-out "+S+"ms",transform:"none"})}var v=jQuery(A).find("img");var D=jQuery('<span style="display: block;" />').addClass("wdi_grid");jQuery(A).prepend(D);var z=jQuery(".wdi_slide_bg");var n=v.width();var b=v.height();var C=z.width(),h=z.height(),q=Math.floor(C/k),e=Math.floor(h/L),d=C-(k*q),G=Math.ceil(d/k),p=h-(L*e),f=Math.ceil(p/L),t=0,y=Math.ceil((jQuery(".wdi_slide_bg").width()-v.width())/2);var E=typeof v.attr("src")=="undefined"?"":v.attr("src");I=I==="auto"?C:I;I=I==="min-auto"?-C:I;H=H==="auto"?h:H;H=H==="min-auto"?-h:H;for(var K=0;K<k;K++){var N=0,m=Math.floor((jQuery(".wdi_slide_bg").height()-v.height())/2),B=q;if(d>0){var c=d>=G?G:d;B+=c;d-=c}for(var J=0;J<L;J++){var r=e,s=p;if(s>0){c=s>=f?f:p;r+=c;s-=c}D.append(x(B,r,N,m,t,y,E,n,b,K,J));N+=r;m-=r}y-=B;t+=B}var a=D.children().last();D.show();v.css("opacity",0);D.children().first().addClass("rs-top-left");D.children().last().addClass("rs-bottom-right");D.children().eq(L-1).addClass("rs-bottom-left");D.children().eq(-L).addClass("rs-top-right");setTimeout(function(){D.children().css({opacity:u,transform:"rotate("+w+"deg) translateX("+I+"px) translateY("+H+"px) scale("+o+")"})},1);jQuery(M).css("opacity",1);jQuery(a).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(l));function l(){jQuery(A).css({opacity:0,"z-index":1});jQuery(M).css({opacity:1,"z-index":2});v.css("opacity",1);D.remove();wdi_trans_in_progress=false;jQuery(A).html("");if(typeof event_stack!=="undefined"){if(event_stack.length>0){key=event_stack[0].split("-");event_stack.shift();wdi_change_image(key[0],key[1],wdi_data,true)}}wdi_change_watermark_container()}}function wdi_sliceH(b,a,c){if(c=="right"){var d="min-auto"}else{if(c=="left"){var d="auto"}}wdi_grid(1,8,0,d,0,1,0,b,a,c)}function wdi_sliceV(b,a,d){if(d=="right"){var c="min-auto"}else{if(d=="left"){var c="auto"}}wdi_grid(10,1,0,0,c,1,0,b,a,d)}function wdi_slideV(b,a,d){if(d=="right"){var c="auto"}else{if(d=="left"){var c="min-auto"}}wdi_grid(1,1,0,0,c,1,1,b,a,d)}function wdi_slideH(b,a,c){if(c=="right"){var d="min-auto"}else{if(c=="left"){var d="auto"}}wdi_grid(1,1,0,d,0,1,1,b,a,c)}function wdi_scaleOut(b,a,c){wdi_grid(1,1,0,0,0,1.5,0,b,a,c)}function wdi_scaleIn(b,a,c){wdi_grid(1,1,0,0,0,0.5,0,b,a,c)}function wdi_blockScale(b,a,c){wdi_grid(8,6,0,0,0,0.6,0,b,a,c)}function wdi_kaleidoscope(b,a,c){wdi_grid(10,8,0,0,0,1,0,b,a,c)}function wdi_fan(b,a,d){if(d=="right"){var c=45;var e=100}else{if(d=="left"){var c=-45;var e=-100}}wdi_grid(1,10,c,e,0,1,0,b,a,d)}function wdi_blindV(b,a,c){wdi_grid(1,8,0,0,0,0.7,0,b,a)}function wdi_blindH(b,a,c){wdi_grid(10,1,0,0,0,0.7,0,b,a)}function wdi_random(c,b,d){var a=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["wdi_"+a[Math.floor(Math.random()*a.length)]](c,b,d)}function wdi_pause_stream(a){jQuery(a).find("video").each(function(){jQuery(this).get(0).pause()})}function wdi_reset_zoom(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));var b=document.querySelector('meta[name="viewport"]');if(a){if(b){b.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0"}}};
1
+ var isPopUpOpened=false;var wdi_data=[];function wdi_spider_createpopup(a,k,b,m,e,l,f,j,h){a=a.replace(/&#038;/g,"&");if(isPopUpOpened){return}isPopUpOpened=true;if(wdi_spider_hasalreadyreceivedpopup(l)||wdi_spider_isunsupporteduseragent()){return}jQuery("html").attr("style","overflow:hidden !important;");jQuery("#wdi_spider_popup_loading_"+k).css({display:"block"});jQuery("#wdi_spider_popup_overlay_"+k).css({display:"block"});var d=0;var c;for(var g=0;g<j.parsedData.length;g++){if(j.parsedData[g].id===h){d=g;c=[j.parsedData[g]];break}}jQuery.ajax({type:"POST",url:a,dataType:"text",data:{action:"WDIGalleryBox",image_rows:JSON.stringify(c),feed_id:j.feed_row.id,feed_counter:j.feed_row.wdi_feed_counter,current_image_index:d,image_rows_count:j.parsedData.length,carousel_media_row:JSON.stringify(c[0].carousel_media)},success:function(o){var n=jQuery('<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap wdi_lightbox_theme_'+j.feed_row.theme_id+'" style="width:'+b+"px;height:"+m+"px;margin-top:-"+(m/2)+"px;margin-left: -"+(b/2)+'px; ">'+o+"</div>");var p=new wdi_construct_popup(n,j,j.parsedData,h);p.construct();n.hide().appendTo("body");wdi_spider_showpopup(l,f,n,e);jQuery("#wdi_spider_popup_loading_"+k).css({display:"none !important;"})}})}var wdi_construct_popup=function(a,b,c,d){this.theme_row={};this.construct=function(){this.theme_row=window["wdi_theme_"+b.feed_row.theme_id];if(b.feed_row.popup_enable_filmstrip&&b.feed_row.popup_enable_filmstrip==="1"){this.add_filmstrip()}this.set_wdi_data()};this.add_filmstrip=function(){var l="horizontal";if(this.theme_row.lightbox_filmstrip_pos==="right"||this.theme_row.lightbox_filmstrip_pos==="left"){l="vertical"}var y=(l==="horizontal")?"fa-angle-left":"fa-angle-up";var x=(l==="horizontal")?"fa-angle-right":"fa-angle-down";var h="";var q,f;if(l==="horizontal"){f=q=(typeof b.feed_row.popup_filmstrip_height!=="undefined")?(b.feed_row.popup_filmstrip_height):"20"}else{f=q=(typeof b.feed_row.popup_filmstrip_height!=="undefined")?(b.feed_row.popup_filmstrip_height):"50"}q=f=parseInt(f);for(var w=0;w<c.length;w++){var e=c[w];var s,k,A;if(e.resolution&&e.resolution!==""){var n=e.resolution.split(" ");var p=intval($resolution_arr[0]);var z=intval($resolution_arr[2]);if(p!==0&&z!==0){A=Math.max(f/p,q/z);s=p*A;k=z*A}else{s=f;k=q}}else{s=f;k=q}A=Math.max(f/s,q/k);s*=A;k*=A;var g=(f-s)/2;var j=(q-k)/2;var u="wdi_filmstrip_thumbnail "+((parseInt(e.id)===parseInt(d))?"wdi_thumb_active":"wdi_thumb_deactive");var t="width:"+s+"px;height:"+k+"px;margin-left:"+g+"px;margin-top:"+j+"px;";var m=(typeof e.images[b.feedImageResolution]["url"]!=="undefined")?e.images[b.feedImageResolution]["url"]:e.thumb_url;var B="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+w+"', wdi_data)";var v="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+w+"', wdi_data)";var r='<img style="'+t+'" class="wdi_filmstrip_thumbnail_img" src="'+m+'" onclick="'+B+'" ontouchend="'+v+'" image_id="'+e.id+'" image_key="'+w+'" alt="'+e.alt+'" />';h+='<div id="wdi_filmstrip_thumbnail_'+w+'" class="'+u+'">'+r+"</div>"}var o='<div class="wdi_filmstrip_left"><i class="fa '+y+'"></i></div><div class="wdi_filmstrip"><div class="wdi_filmstrip_thumbnails">'+h+'</div></div><div class="wdi_filmstrip_right"><i class="fa '+x+'"></i></div>';a.find(".wdi_filmstrip_container").append(o)};this.set_wdi_data=function(){wdi_data=[];for(var e=0;e<c.length;e++){wdi_data[e]=[];wdi_data[e]["number"]=e+1;wdi_data[e]["id"]=c[e].id;wdi_data[e]["alt"]=c[e].alt;wdi_data[e]["description"]=c[e].description;wdi_data[e]["username"]=c[e].username;wdi_data[e]["profile_picture"]=c[e].profile_picture;wdi_data[e]["image_url"]=c[e].image_url;wdi_data[e]["thumb_url"]=c[e].thumb_url;wdi_data[e]["date"]=c[e].date;wdi_data[e]["comment_count"]=c[e].comment_count;wdi_data[e]["filetype"]=c[e].filetype;wdi_data[e]["filename"]=c[e].filename;wdi_data[e]["avg_rating"]=c[e].avg_rating;wdi_data[e]["rate"]=c[e].rate;wdi_data[e]["rate_count"]=c[e].rate_count;wdi_data[e]["hit_count"]=c[e].hit_count;wdi_data[e]["comments_data"]=(typeof c[e].comments_data!=="undefined")?c[e].comments_data:"null";wdi_data[e]["carousel_media"]=(typeof c[e]["carousel_media"]!=="undefined")?c[e]["carousel_media"]:null}}};function wdi_spider_showpopup(c,a,b,d){isPopUpOpened=true;b.show();wdi_spider_receivedpopup(c,a)}function wdi_spider_hasalreadyreceivedpopup(a){if(document.cookie.indexOf(a)>-1){delete document.cookie[document.cookie.indexOf(a)]}return false}function wdi_spider_receivedpopup(c,a){var b=new Date();b.setDate(b.getDate()+a);document.cookie=c+"=true;expires="+b.toUTCString()+";path=/"}function wdi_spider_isunsupporteduseragent(){return(!window.XMLHttpRequest)}function wdi_spider_destroypopup(d){if(document.getElementById("wdi_spider_popup_wrap")!=null){wdi_comments_manager.popup_destroyed();if(typeof jQuery().fullscreen!=="undefined"&&jQuery.isFunction(jQuery().fullscreen)){if(jQuery.fullscreen.isFullScreen()){jQuery.fullscreen.exit()}}if(typeof enable_addthis!="undefined"&&enable_addthis){jQuery(".at4-share-outer").hide()}setTimeout(function(){jQuery(".wdi_spider_popup_wrap").remove();jQuery(".wdi_spider_popup_loading").css({display:"none"});jQuery(".wdi_spider_popup_overlay").css({display:"none"});jQuery(document).off("keydown");jQuery("html").attr("style","")},20)}isPopUpOpened=false;var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));var c=document.querySelector('meta[name="viewport"]');if(a&&c){c.content="width=device-width, initial-scale=1"}var b=jQuery(document).scrollTop();window.location.hash="";jQuery(document).scrollTop(b);if(typeof wdi_playInterval!="undefined"){clearInterval(wdi_playInterval)}}Object.size=function(c){var b=0,a;for(a in c){if(c.hasOwnProperty(a)){b++}}return b};function wdi_spider_ajax_save(a,b){wdi_comments_manager.init(b);return false}wdi_comments_manager={media_id:"",mediaComments:[],load_more_count:10,commentCounter:0,currentKey:-1,init:function(a){this.instagram=new WDIInstagram();this.instagram.addToken(wdi_front.access_token);if(this.currentKey!=a){this.currentKey=a;this.reset_comments()}else{}},reset_comments:function(){jQuery("#wdi_load_more_comments").remove();jQuery("#wdi_added_comments").html("");this.commentCounter=0;this.media_id=wdi_data[this.currentKey]["id"];this.getAjaxComments(this.currentKey)},popup_destroyed:function(){this.media_id="";this.mediaComments=[];this.commentCounter=0;this.currentKey=-1},showComments:function(f,e){if(Object.size(f)-this.commentCounter-e<0||e===undefined){e=Object.size(f)-this.commentCounter}var b=this.commentCounter;for(i=Object.size(f)-b-1;i>=Object.size(f)-b-e;i--){this.commentCounter++;var d=(f[i]["text"]);d=this.filterCommentText(d);var g=(f[i]["from"]["username"]);var c=(f[i]["from"]["profile_picture"]);var a=jQuery('<div class="wdi_single_comment"></div>');a.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/'+g+'">'+g+'</a></span><span class="wdi_comment_date">'+wdi_front.convertUnixDate(f[i]["created_time"])+"</span></p>"));a.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>'+d+"</p></span></div>"));jQuery("#wdi_added_comments").prepend(a)}this.updateScrollbar()},updateScrollbar:function(){var b=jQuery("#wdi_comments");var a=jQuery("#wdi_added_comments");jQuery(".wdi_comments").attr("class","wdi_comments");jQuery(".wdi_comments").html("");jQuery(".wdi_comments").append(b);jQuery(".wdi_comments").append(a);jQuery(".wdi_comments_close_btn").on("click",wdi_comment)},getAjaxComments:function(){this.instagram.getRecentMediaComments(this.media_id,{success:function(a){if(a==""||a==undefined||a==null){errorMessage="Network Error, please try again later :(";console.log("%c"+errorMessage,"color:#cc0000;");return}if(a.meta["code"]!=200){errorMessage=a.meta["error_message"];console.log("%c"+errorMessage,"color:#cc0000;");return}wdi_comments_manager.mediaComments=a.data;var b=wdi_data[wdi_comments_manager.currentKey];b.comments_data=a.data;wdi_comments_manager.showComments(b.comments_data,wdi_comments_manager.load_more_count);wdi_comments_manager.ajax_comments_ready(a.data)}})},ajax_comments_ready:function(a){this.createLoadMoreAndBindEvent()},createLoadMoreAndBindEvent:function(){jQuery("#wdi_added_comments").prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>'));jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){jQuery(this).remove();wdi_comments_manager.showComments(wdi_comments_manager.mediaComments,wdi_comments_manager.load_more_count);wdi_comments_manager.createLoadMoreAndBindEvent()})},filterCommentText:function(d){var c=d.split(" ");var b="";for(var a=0;a<c.length;a++){switch(c[a][0]){case"@":b+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/'+c[a].substring(1,c[a].length)+'">'+c[a]+"</a> ";break;case"#":b+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/explore/tags/'+c[a].substring(1,c[a].length)+'">'+c[a]+"</a> ";break;default:b+=c[a]+" "}}b=b.substring(0,b.length-1);return b}};function wdi_spider_set_input_value(b,a){if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_spider_check_required(b,a){if(jQuery("#"+b).val()==""){wdi_front.show_alert(a+"* "+wdi_objectL10n.wdi_field_required);jQuery("#"+b).attr("style","border-color: #FF0000;");jQuery("#"+b).focus();return true}else{return false}}function wdi_spider_check_email(b){if(jQuery("#"+b).val()!=""){var a=jQuery("#"+b).val().replace(/^\s+|\s+$/g,"");if(a.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)==-1){wdi_front.show_alert(wdi_objectL10n.wdi_mail_validation);return true}return false}}function wdi_captcha_refresh(a){if(document.getElementById(a+"_img")&&document.getElementById(a+"_input")){srcArr=document.getElementById(a+"_img").src.split("&r=");document.getElementById(a+"_img").src=srcArr[0]+"&r="+Math.floor(Math.random()*100);document.getElementById(a+"_img").style.display="inline-block";document.getElementById(a+"_input").value=""}}function wdi_play_pause(e){var f=navigator.userAgent.indexOf("Chrome")>-1;var d=navigator.userAgent.indexOf("Safari")>-1;if((f)&&(d)){d=false}if(d){return}var c=e.get(0);var b=/firefox/i;var a=false;if(navigator.userAgent.match(b)){a=true}if(!a){if(!c.paused){c.pause()}else{c.play()}}}function wdi_spider_display_embed(m,n,j,g){var b="";switch(m){case"EMBED_OEMBED_YOUTUBE_VIDEO":var k="<iframe ";if(n!=""){k+=' src="//www.youtube.com/embed/'+n+'?enablejsapi=1&wmode=transparent"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){k+=" "+attr+'="'+j[attr]+'"'}}}k+=" ></iframe>";b+=k;break;case"EMBED_OEMBED_VIMEO_VIDEO":var f="<iframe ";if(n!=""){f+=' src="//player.vimeo.com/video/'+n+'?enablejsapi=1"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){f+=" "+attr+'="'+j[attr]+'"'}}}f+=" ></iframe>";b+=f;break;case"EMBED_OEMBED_FLICKR_IMAGE":var d="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){d+=" "+attr+'="'+j[attr]+'"'}}}d+=" >";if(n!=""){d+='<img src="'+n+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'}d+="</div>";b+=d;break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var e="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}e+=" >";if(n!=""){e+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+n+'" type="video/mp4"> Your browser does not support the video tag. </video>'}e+="</div>";b+=e;break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":var e="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}e+=" >";if(g!=null&&g.length){for(var c=0;c<g.length;c++){if(g[c]["type"]=="image"){e+='<img src="'+g[c]["images"]["standard_resolution"]["url"]+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;" data-id="'+c+'" class="carousel_media '+(c==0?"active":"")+'">'}else{if(g[c]["type"]=="video"){e+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="'+c+'" class="carousel_media '+(c==0?"active":"")+'"><source src="'+g[c]["videos"]["standard_resolution"]["url"]+'" type="video/mp4"> Your browser does not support the video tag. </video>'}}}}else{if(n!=""){e+='<img src="//instagram.com/p/'+n+'/media/?size=l" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'}}e+="</div>";b+=e;break;case"EMBED_OEMBED_INSTAGRAM_POST":var e="<div ";var a="";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"';if(attr=="CLASS"||attr=="class"||attr=="Class"){obj_class=j[attr]}}}}e+=" >";if(n!=""){e+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+n+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'}e+="</div>";b+=e;break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var l="<iframe ";if(n!=""){l+=' src="//www.dailymotion.com/embed/video/'+n+'?api=postMessage"'}for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){l+=" "+attr+'="'+j[attr]+'"'}}}l+=" ></iframe>";b+=l;break;case"EMBED_OEMBED_IMGUR":var h="<div ";for(attr in j){if(!(/src/i).test(attr)){if(attr!=""&&j[attr]!=""){e+=" "+attr+'="'+j[attr]+'"'}}}h+=" >";if(n!=""){h+='<img src="'+n+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'}h+="</div>";b+=h;break;default:}return b}function wdi_testBrowser_cssTransitions(){return wdi_testDom("Transition")}function wdi_testBrowser_cssTransforms3d(){return wdi_testDom("Perspective")}function wdi_testDom(d){var a=["","-webkit-","-moz-","-ms-","-o-","-khtml-"];var c=["","Webkit","Moz","ms","O","Khtml"];var b=c.length;while(b--){if(typeof document.body.style[c[b]+d]!=="undefined"){return true}}return false}function wdi_cube(c,d,b,a,k,l,h,j,e,g){if(!wdi_testBrowser_cssTransitions()){return wdi_fallback(j,e,g)}if(!wdi_testBrowser_cssTransforms3d()){return wdi_fallback3d(j,e,g)}wdi_trans_in_progress=true;jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");jQuery(".wdi_slide_bg").css("perspective",1000);jQuery(j).css({transform:"translateZ("+c+"px)",backfaceVisibility:"hidden"});jQuery(e).css({opacity:1,filter:"Alpha(opacity=100)",backfaceVisibility:"hidden",transform:"translateY("+b+"px) translateX("+d+"px) rotateY("+k+"deg) rotateX("+a+"deg)"});jQuery(".wdi_slider").css({transform:"translateZ(-"+c+"px)",transformStyle:"preserve-3d"});setTimeout(function(){jQuery(".wdi_slider").css({transition:"all "+wdi_transition_duration+"ms ease-in-out",transform:"translateZ(-"+c+"px) rotateX("+l+"deg) rotateY("+h+"deg)"})},20);jQuery(".wdi_slider").one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(f));function f(){jQuery(j).removeAttr("style");jQuery(e).removeAttr("style");jQuery(".wdi_slider").removeAttr("style");jQuery(j).css({opacity:0,filter:"Alpha(opacity=0)","z-index":1});jQuery(e).css({opacity:1,filter:"Alpha(opacity=100)","z-index":2});wdi_trans_in_progress=false;jQuery(j).html("");if(typeof event_stack!=="undefined"){if(event_stack.length>0){key=event_stack[0].split("-");event_stack.shift();wdi_change_image(key[0],key[1],wdi_data,true)}}wdi_change_watermark_container()}}function wdi_cubeH(b,a,d){var c=jQuery(b).width()/2;if(d=="right"){wdi_cube(c,c,0,0,90,0,-90,b,a,d)}else{if(d=="left"){wdi_cube(c,-c,0,0,-90,0,90,b,a,d)}}}function wdi_cubeV(b,a,d){var c=jQuery(b).height()/2;if(d=="right"){wdi_cube(c,0,-c,90,0,-90,0,b,a,d)}else{if(d=="left"){wdi_cube(c,0,c,-90,0,90,0,b,a,d)}}}function wdi_fallback(b,a,c){wdi_fade(b,a,c)}function wdi_fallback3d(b,a,c){wdi_sliceV(b,a,c)}function wdi_none(b,a,c){jQuery(b).css({opacity:0,"z-index":1});jQuery(a).css({opacity:1,"z-index":2});jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");wdi_trans_in_progress=false;jQuery(b).html("");wdi_change_watermark_container()}function wdi_fade(b,a,c){jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");if(wdi_testBrowser_cssTransitions()){jQuery(a).css("transition","opacity "+wdi_transition_duration+"ms linear");jQuery(b).css({opacity:0,"z-index":1});jQuery(a).css({opacity:1,"z-index":2});wdi_change_watermark_container()}else{jQuery(b).animate({opacity:0,"z-index":1},wdi_transition_duration);jQuery(a).animate({opacity:1,"z-index":2},{duration:wdi_transition_duration,complete:function(){wdi_trans_in_progress=false;jQuery(b).html("");wdi_change_watermark_container()}});jQuery(b).fadeTo(wdi_transition_duration,0);jQuery(a).fadeTo(wdi_transition_duration,1)}}function wdi_grid(k,L,w,I,H,o,u,A,M,g){if(!wdi_testBrowser_cssTransitions()){return wdi_fallback(A,M,g)}wdi_trans_in_progress=true;jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive");jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");var F=(wdi_transition_duration)/(k+L);function x(P,Y,V,R,Q,X,O,W,U,T,j){var S=(T+j)*F;return jQuery('<span class="wdi_gridlet" />').css({display:"block",width:P,height:Y,top:V,left:Q,backgroundImage:'url("'+O+'")',backgroundColor:jQuery(".wdi_spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:X+"px "+R+"px",backgroundSize:W+"px "+U+"px",transition:"all "+wdi_transition_duration+"ms ease-in-out "+S+"ms",transform:"none"})}var v=jQuery(A).find("img");var D=jQuery('<span style="display: block;" />').addClass("wdi_grid");jQuery(A).prepend(D);var z=jQuery(".wdi_slide_bg");var n=v.width();var b=v.height();var C=z.width(),h=z.height(),q=Math.floor(C/k),e=Math.floor(h/L),d=C-(k*q),G=Math.ceil(d/k),p=h-(L*e),f=Math.ceil(p/L),t=0,y=Math.ceil((jQuery(".wdi_slide_bg").width()-v.width())/2);var E=typeof v.attr("src")=="undefined"?"":v.attr("src");I=I==="auto"?C:I;I=I==="min-auto"?-C:I;H=H==="auto"?h:H;H=H==="min-auto"?-h:H;for(var K=0;K<k;K++){var N=0,m=Math.floor((jQuery(".wdi_slide_bg").height()-v.height())/2),B=q;if(d>0){var c=d>=G?G:d;B+=c;d-=c}for(var J=0;J<L;J++){var r=e,s=p;if(s>0){c=s>=f?f:p;r+=c;s-=c}D.append(x(B,r,N,m,t,y,E,n,b,K,J));N+=r;m-=r}y-=B;t+=B}var a=D.children().last();D.show();v.css("opacity",0);D.children().first().addClass("rs-top-left");D.children().last().addClass("rs-bottom-right");D.children().eq(L-1).addClass("rs-bottom-left");D.children().eq(-L).addClass("rs-top-right");setTimeout(function(){D.children().css({opacity:u,transform:"rotate("+w+"deg) translateX("+I+"px) translateY("+H+"px) scale("+o+")"})},1);jQuery(M).css("opacity",1);jQuery(a).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(l));function l(){jQuery(A).css({opacity:0,"z-index":1});jQuery(M).css({opacity:1,"z-index":2});v.css("opacity",1);D.remove();wdi_trans_in_progress=false;jQuery(A).html("");if(typeof event_stack!=="undefined"){if(event_stack.length>0){key=event_stack[0].split("-");event_stack.shift();wdi_change_image(key[0],key[1],wdi_data,true)}}wdi_change_watermark_container()}}function wdi_sliceH(b,a,c){if(c=="right"){var d="min-auto"}else{if(c=="left"){var d="auto"}}wdi_grid(1,8,0,d,0,1,0,b,a,c)}function wdi_sliceV(b,a,d){if(d=="right"){var c="min-auto"}else{if(d=="left"){var c="auto"}}wdi_grid(10,1,0,0,c,1,0,b,a,d)}function wdi_slideV(b,a,d){if(d=="right"){var c="auto"}else{if(d=="left"){var c="min-auto"}}wdi_grid(1,1,0,0,c,1,1,b,a,d)}function wdi_slideH(b,a,c){if(c=="right"){var d="min-auto"}else{if(c=="left"){var d="auto"}}wdi_grid(1,1,0,d,0,1,1,b,a,c)}function wdi_scaleOut(b,a,c){wdi_grid(1,1,0,0,0,1.5,0,b,a,c)}function wdi_scaleIn(b,a,c){wdi_grid(1,1,0,0,0,0.5,0,b,a,c)}function wdi_blockScale(b,a,c){wdi_grid(8,6,0,0,0,0.6,0,b,a,c)}function wdi_kaleidoscope(b,a,c){wdi_grid(10,8,0,0,0,1,0,b,a,c)}function wdi_fan(b,a,d){if(d=="right"){var c=45;var e=100}else{if(d=="left"){var c=-45;var e=-100}}wdi_grid(1,10,c,e,0,1,0,b,a,d)}function wdi_blindV(b,a,c){wdi_grid(1,8,0,0,0,0.7,0,b,a)}function wdi_blindH(b,a,c){wdi_grid(10,1,0,0,0,0.7,0,b,a)}function wdi_random(c,b,d){var a=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["wdi_"+a[Math.floor(Math.random()*a.length)]](c,b,d)}function wdi_pause_stream(a){jQuery(a).find("video").each(function(){jQuery(this).get(0).pause()})}function wdi_reset_zoom(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));var b=document.querySelector('meta[name="viewport"]');if(a){if(b){b.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0"}}};
js/wdi_admin.js CHANGED
@@ -416,23 +416,29 @@ wdi_controller.save_feed = function(task) {
416
 
417
  //if username is selected default user and we don't have default users image then request it
418
  //typeof profile_picture will be undefined when user without adding any user submits form
419
- if ('false' == profile_picture || typeof profile_picture == 'undefined') {
420
- var _this = this;
421
- this.instagram.searchForUsersByName(username, {
422
- success: function(response) {
423
- var vObj = _this.isValidResponse(response),
424
- user = _this.findUser(username, response),
425
- profile_picture;
426
- if (vObj.valid && _this.hasData(response) && user) {
427
- profile_picture = user['profile_picture'];
428
- } else {
429
- profile_picture = '';
430
- }
431
- jQuery('#wdi_feed_thumb').attr('value', profile_picture);
432
- jQuery('#wdi_save_feed').submit();
433
- }
434
- });
435
- } else {
 
 
 
 
 
 
436
  jQuery('#wdi_feed_thumb').attr('value', profile_picture);
437
  jQuery('#wdi_save_feed').submit();
438
  }
@@ -469,41 +475,67 @@ wdi_controller.makeInstagramUserRequest = function(user_input, ignoreConfirm) {
469
  switch (input_type) {
470
  case 'user':
471
  {
472
- this.instagram.searchForUsersByName(user_input, {
473
- success: function(response) {
474
-
475
- //contains information about response such as error messages and if
476
- //response is valid or not
477
- var vObj = _this.isValidResponse(response);
478
- if(vObj.valid == false){
479
- alert(vObj.msg);
480
- return;
481
- }
482
- //this is the user object we are searching for, of user does not exists then it is false
483
- var user = _this.findUser(user_input, response);
484
- if (vObj.valid && _this.hasData(response) && user) {
485
- _this.addUser(user);
486
-
487
- if (wdi_version.is_pro == 'false') {
488
- if (jQuery('.wdi_user').length == 1) {
489
- jQuery('#wdi_add_user_ajax_input').attr('disabled', 'disabled');
490
- jQuery('#wdi_add_user_ajax_input').attr('placeholder', wdi_messages.available_in_pro);
491
- }
492
- }
493
-
494
- } else {
495
- if (!user) {
496
- alert( wdi_messages.user_not_exist.replace("%s",'"'+ user_input + '"'))
497
- } else {
498
- alert(vObj.msg);
499
- }
500
-
501
- }
502
-
503
 
504
- }
505
- });
506
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  }
508
  case 'hashtag':
509
  {
416
 
417
  //if username is selected default user and we don't have default users image then request it
418
  //typeof profile_picture will be undefined when user without adding any user submits form
419
+ if ('false' == profile_picture || typeof profile_picture == 'undefined') {
420
+ var _this = this;
421
+
422
+ //deprecated API
423
+
424
+ //this.instagram.searchForUsersByName(username, {
425
+ this.instagram.getSelfInfo({
426
+ success: function (response) {
427
+ var vObj = _this.isValidResponse(response),
428
+ user = response.data,
429
+ profile_picture;
430
+ if (vObj.valid && _this.hasData(response) && user) {
431
+ profile_picture = user['profile_picture'];
432
+ } else {
433
+ profile_picture = '';
434
+ }
435
+
436
+ }
437
+ });
438
+
439
+ jQuery('#wdi_feed_thumb').attr('value', profile_picture);
440
+ jQuery('#wdi_save_feed').submit();
441
+ }else {
442
  jQuery('#wdi_feed_thumb').attr('value', profile_picture);
443
  jQuery('#wdi_save_feed').submit();
444
  }
475
  switch (input_type) {
476
  case 'user':
477
  {
478
+ if (user_input !== wdi_options.wdi_user_name) {
479
+ alert("You can add only your username ( " + wdi_options.wdi_user_name + " )");
480
+ return;
481
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
 
483
+ this.instagram.getSelfInfo({
484
+ success: function(response) {
485
+
486
+ //contains information about response such as error messages and if
487
+ //response is valid or not
488
+ var vObj = _this.isValidResponse(response);
489
+ if(vObj.valid == false){
490
+ alert(vObj.msg);
491
+ return;
492
+ }
493
+ //this is the user object we are searching for, of user does not exists then it is false
494
+ var user = response.data;
495
+ if (vObj.valid && _this.hasData(response)) {
496
+ _this.addUser(user);
497
+
498
+ } else {
499
+ if (!user) {
500
+ alert( wdi_messages.user_not_exist.replace("%s",'"'+ user_input + '"'))
501
+ } else {
502
+ alert(vObj.msg);
503
+ }
504
+
505
+ }
506
+
507
+ }
508
+ });
509
+ //Depricated API
510
+ // this.instagram.searchForUsersByName(user_input, {
511
+ // success: function(response) {
512
+ //
513
+ // //contains information about response such as error messages and if
514
+ // //response is valid or not
515
+ // var vObj = _this.isValidResponse(response);
516
+ // if(vObj.valid == false){
517
+ // alert(vObj.msg);
518
+ // return;
519
+ // }
520
+ // //this is the user object we are searching for, of user does not exists then it is false
521
+ // var user = _this.findUser(user_input, response);
522
+ // if (vObj.valid && _this.hasData(response) && user) {
523
+ // _this.addUser(user);
524
+ //
525
+ // } else {
526
+ // if (!user) {
527
+ // alert( wdi_messages.user_not_exist.replace("%s",'"'+ user_input + '"'))
528
+ // } else {
529
+ // alert(vObj.msg);
530
+ // }
531
+ //
532
+ // }
533
+ //
534
+ // }
535
+ // });
536
+
537
+
538
+ break;
539
  }
540
  case 'hashtag':
541
  {
js/wdi_admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(){wdi_controller.bindSaveFeedEvent();wdi_controller.bindAddNewUserOrHashtagEvent();jQuery(".display_type input").on("click",function(){wdi_controller.displaySettingsSection(jQuery(this))});wdi_controller.conditionalFiltersTabInit();wdi_controller.bindSaveThemeEvent();jQuery("#wdi_add_user_ajax").after(jQuery("<br><label class='wdi_pro_only' for='wdi_add_user_ajax_input'>"+wdi_messages.username_hashtag_multiple+"</label>"));if(jQuery("body").hasClass("instagram-feed-wd_page_wdi_settings")){wdi_advanced_option_controller()}jQuery(".wdi_section_name").click(function(){b(jQuery(this))});b(false);function b(f){if(f===false){var d={wdi_layout_section:"show",wdi_media:"show",wdi_layout:"hide",wdi_advanced:"hide",wdi_lightbox_general:"show",wdi_lightbox_advanced:"hide",wdi_conditional_filters:"show",wdi_how_to_publish:"show"};var g=JSON.parse(localStorage.getItem("wdi_sections"));if(g===null||g===false){g=d;localStorage.setItem("wdi_sections",JSON.stringify(g))}for(i in g){var j=jQuery("#wdi_save_feed").find("[data-section_name='"+i+"']");a(g[i],j)}}else{var c=jQuery(f).data("section_name");var h=null;if(f.hasClass("wdi_section_open")){a("show",f);h="show"}else{if(f.hasClass("wdi_section_close")){a("hide",f);h="hide"}}if(h!=null){var e=JSON.parse(localStorage.getItem("wdi_sections"))||{};e[c]=h;localStorage.setItem("wdi_sections",JSON.stringify(e))}}}function a(e,d){if(e==="show"){var c=d.closest(".wdi_section").find(".wdi_elements");if(c.data("display")==="table"){c.css({display:"table"})}else{c.css({display:"block"})}d.css({"border-bottom":"1px solid #f1f1f1",margin:"0 auto 15px"});d.removeClass("wdi_section_open");d.addClass("wdi_section_close")}else{d.closest(".wdi_section").find(".wdi_elements").css({display:"none"});d.css({"border-bottom":"0px",margin:"0 auto 0px"});d.removeClass("wdi_section_close");d.addClass("wdi_section_open")}}});function wdi_advanced_option_controller(){var a=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));a.addClass("wdi_advanced_option wdi_advanced_option_close");var b="<tr class='wdi_advanced_option_head'><th>ADVANCED OPTIONS</th><td><div class='wdi_advanced_option_icon'></div></td></tr>";$tr=jQuery(b);a.prepend($tr);$tr.on("click",function(){if(a.hasClass("wdi_advanced_option_open")){a.removeClass("wdi_advanced_option_open");a.addClass("wdi_advanced_option_close")}else{a.removeClass("wdi_advanced_option_close");a.addClass("wdi_advanced_option_open")}})}function wdi_controller(){}wdi_controller.getParameterByName=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=new RegExp("[\\?&]"+a+"=([^&#]*)"),b=c.exec(location.search);return b===null?"":decodeURIComponent(b[1].replace(/\+/g," "))};wdi_controller.apiRedirected=function(){var d=this.getParameterByName("access_token");var a=d.split(".");var b=/^[^\\\/&?><"']*$/;for(i=0;i<a.length;i++){if(a[i].match(b)===null){return}}var c=a.join(".");jQuery(document).ready(function(){jQuery("#wdi_access_token").attr("value",c)});wdi_controller.instagram.addToken(c);wdi_controller.getUserInfo(c)};wdi_controller.getUserInfo=function(a){this.instagram.getSelfInfo({success:function(b){jQuery("#wdi_user_name").attr("value",b.data["username"]);jQuery("#wdi_user_id").attr("value",b.data["id"]);jQuery(document).trigger("wdi_settings_filled")}})};wdi_controller.oldDisplayType={};wdi_controller.displayTypeMemory={};wdi_controller.switchFeedTabs=function(d,b){jQuery("#wdi_refresh_tab").attr("value",d);jQuery(".wdi_tab").hide();jQuery("#"+d+"_tab").show();jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+d+'"]').css("display","block");if(!jQuery('.display_type[tab="'+d+'"]').length){jQuery(".display_type_content").hide()}else{jQuery(".display_type_content").show()}jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+d).addClass("wdi_feed_tab_active");var a=jQuery();var c=false;if(b!=undefined&&b!=""){a=jQuery(".display_type #"+b).prop("checked",true);jQuery("#wdi_feed_type").attr("value",b)}if(!c){a=jQuery('.display_type[tab="'+d+'"] input[name="feed_type"]:checked');if(a.length!=0){c=true}}if(!c){a=jQuery('.display_type[tab="'+d+'"] #thumbnails');if(a.length!=0){c=true;a.prop("checked",true);jQuery("#wdi_feed_type").attr("value","thumbnails")}}if(c){wdi_controller.displaySettingsSection(a)}if(d!="conditional_filters"){jQuery("#wdi-conditional-filters-ui").addClass("wdi_hidden")}else{jQuery("#wdi-conditional-filters-ui").removeClass("wdi_hidden")}};wdi_controller.displaySettingsSection=function(h){var d=h.attr("id").toLowerCase().trim();var g=h.parent().parent().attr("tab");var a=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:d,tab:g};wdi_controller.displayTypeMemory[g]=wdi_controller.oldDisplayType;if(a!=undefined){a.attr("value",d)}var f=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",d);var e=0,c=0;var b=false;f.find(".wdi_element").each(function(){e++;var j=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(j!==undefined){b=false;var k=j.toLowerCase().trim().split(",");for(c=0;c<k.length;c++){if(k[c]===d){jQuery(this).css("display","block");b=true}}if(b===false){jQuery(this).css("display","none")}}})};wdi_controller.switchThemeTabs=function(b,a){jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+b).addClass("wdi_feed_tab_active");jQuery("[tab]").each(function(){if(jQuery(this).attr("tab")!=b){jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","none")}else{jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","block")}});jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+b+'"]').css("display","block");jQuery("#wdi_refresh_tab").attr("value",b);if(a!=undefined&&a!=""){jQuery("#wdi_refresh_section").attr("value",a)}if(a==undefined&&a!=""){if(wdi_controller.displayTypeMemory[b]!=undefined){jQuery(".display_type #"+wdi_controller.displayTypeMemory[b]["section"]).trigger("click")}else{jQuery('.display_type[tab="'+b+'"]').first().find("input").trigger("click")}}else{jQuery(".display_type #"+a).trigger("click")}};wdi_controller.bindSaveFeedEvent=function(){var a=this;jQuery("#wdi_save_feed_submit").on("click",function(){a.save_feed("save_feed")});jQuery("#wdi_save_feed_apply").on("click",function(){a.save_feed("apply_changes")});jQuery("#wdi_cancel_changes").on("click",function(){a.save_feed("cancel")})};wdi_controller.save_feed=function(d){if("cancel"==d){window.location=window.location.href}wdi_controller.checkIfUserNotSaved(d);if(wdi_controller.waitingAjaxRequestEnd.button!=0){return}jQuery("#task").attr("value",d);var a=this.feed_users,b,c,f,j,h,e={username:jQuery("#wdi_default_user").val(),id:jQuery("#wdi_default_user_id").val()};if(a.length==0){a.push(e);this.updateFeaturedImageSelect(e.username,"add","selected")}b=this.stringifyUserData(a);jQuery("#WDI_feed_users").val(b);if(d=="apply_changes"||d=="save_feed"){c=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",c)}f=jQuery("#WDI_thumb_user").val();h=this.getUserProfilePic(f);if("false"==h||typeof h=="undefined"){var g=this;this.instagram.searchForUsersByName(f,{success:function(m){var l=g.isValidResponse(m),k=g.findUser(f,m),n;if(l.valid&&g.hasData(m)&&k){n=k.profile_picture}else{n=""}jQuery("#wdi_feed_thumb").attr("value",n);jQuery("#wdi_save_feed").submit()}})}else{jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}};wdi_controller.makeInstagramUserRequest=function(b,f){var a,c,g=this,d;c=this.getInputType(b);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){alert(wdi_messages.only_one_user_or_hashtag);return}}switch(c){case"user":this.instagram.searchForUsersByName(b,{success:function(k){var j=g.isValidResponse(k);if(j.valid==false){alert(j.msg);return}var h=g.findUser(b,k);if(j.valid&&g.hasData(k)&&h){g.addUser(h);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!h){alert(wdi_messages.user_not_exist.replace("%s",'"'+b+'"'))}else{alert(j.msg)}}}});break;case"hashtag":var e=b.substr(1,b.length);e=e.replace(" ","");this.instagram.getTagRecentMedia(e,{success:function(j){var h=g.isValidResponse(j);if(h.valid&&g.hasData(j)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!g.hasData(j)&&h.msg=="success"){if(f!=true){if(confirm(wdi_messages.hashtag_no_data)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{jQuery("#wdi_add_user_ajax_input").val("")}}else{g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}}else{alert(h.msg)}}}});break}};wdi_controller.checkForDuplicateUser=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return true}}return false};wdi_controller.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_controller.stringifyUserData=function(a){var c=[];for(var b=0;b<a.length;b++){c.push({username:a[b]["username"],id:a[b]["id"]})}return JSON.stringify(c)};wdi_controller.bindAddNewUserOrHashtagEvent=function(){jQuery("#wdi_add_user_ajax").on("click",function(){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a)});jQuery("#wdi_add_user_ajax_input").on("keypress",function(b){if(b.keyCode==13){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a);return false}})};wdi_controller.removeFeedUser=function(b){var c=b.parent().find("a span").text();if(b.parent().find("a span").hasClass("wdi_hashtag")){c="#"+c}for(var a=0;a<this.feed_users.length;a++){if(this.feed_users[a]["username"]==c){this.feed_users.splice(a,1);break}}b.parent().remove();if(c!==jQuery("#wdi_default_user").val()){wdi_controller.updateFeaturedImageSelect(c,"remove")}if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==0){jQuery("#wdi_add_user_ajax_input").removeAttr("disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder","")}}};wdi_controller.updateFeaturedImageSelect=function(f,e,d){var a=jQuery("#WDI_thumb_user");if(d!="selected"){d=""}switch(e){case"add":var b=a.find('option[value="'+f+'"]').length;if(!b){var c=jQuery("<option "+d+' value="'+f+'">'+f+"</option>");a.append(c)}break;case"remove":a.find('option[value="'+f+'"]').remove();if(this.feed_users.length>0){a.val(this.feed_users[0].username)}break}};wdi_controller.bindSaveThemeEvent=function(){jQuery("#wdi_save_theme_submit").on("click",function(){jQuery("#task").attr("value","save_feed");jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_apply").on("click",function(){jQuery("#task").attr("value","apply_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_reset").on("click",function(){jQuery("#task").attr("value","reset_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()})};wdi_controller.checkIfUserNotSaved=function(b){switch(b){case"save_feed":b="submit";break;case"apply_changes":b="apply";break;case"reset_changes":b="reset";break}if(jQuery("#wdi_add_user_ajax_input").val().trim()!=""){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.waitingAjaxRequestEnd={button:b};wdi_controller.makeInstagramUserRequest(a);return 1}else{wdi_controller.waitingAjaxRequestEnd={button:0};return 0}};wdi_controller.saveFeedAfterAjaxWait=function(b){if(wdi_controller.waitingAjaxRequestEnd!=undefined){var a=wdi_controller.waitingAjaxRequestEnd.button;if(b&&a!=0){jQuery("#wdi_save_feed_"+a).trigger("click")}wdi_controller.waitingAjaxRequestEnd=undefined}};wdi_controller.getCookie=function(a){var b="; "+document.cookie;var c=b.split("; "+a+"=");if(c.length==2){return c.pop().split(";").shift()}};wdi_controller.isValidResponse=function(a){var b={};if(typeof a=="undefined"||typeof a.meta["code"]=="undefined"||a.meta["code"]!=200){b.valid=false;if(typeof a=="undefined"){b.msg=wdi_messages.instagram_server_error}else{if(a.meta["code"]!==200){b.msg=a.meta["error_message"]}else{b.msg=""}}}else{b.valid=true;b.msg="success"}return b};wdi_controller.hasData=function(a){if(typeof a!="undefined"&&typeof a.data!="undefined"&&a.data.length!=0){return true}else{return false}};wdi_controller.thumbUser=function(a){return(this.feed_users.length>0&&this.feed_users[0].username===a)};wdi_controller.findUser=function(d,a){var c=[];if(typeof a!="undefined"&&typeof a.data!="undefined"){c=a.data}for(var b=0;b<c.length;b++){if(c[b]["username"]==d){return c[b]}}return false};wdi_controller.addHashtag=function(e,c){if(e.match(/[~!@$%&*#^()<>?]/)==null){if(this.checkForDuplicateUser("#"+e)==false){var b=jQuery('<div class="wdi_user"><a target="_blank" href="https://instagram.com/explore/tags/'+e+'"><img class="wdi_profile_pic" src="'+wdi_url.plugin_url+'/images/hashtag.png"><span class="wdi_hashtag">'+e+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(b);jQuery("#wdi_add_user_ajax_input").attr("value","");var d;if(typeof c!="undefined"){d=(c.data.length!=0)?c.data[0]["images"]["thumbnail"]["url"]:""}else{d=""}this.feed_users.push({username:"#"+e,id:"#"+e,profile_picture:d});var a="#"+e;selected=this.thumbUser(a)?"selected":"";wdi_controller.updateFeaturedImageSelect(a,"add",selected)}else{alert("#"+e+" "+wdi_messages.already_added)}}else{alert(wdi_messages.invalid_hashtag)}this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.addUser=function(a){if(this.checkForDuplicateUser(a.username)==false){newUser=jQuery('<div class="wdi_user"><a target="_blank" href="http://www.instagram.com/'+a.username+'"><img class="wdi_profile_pic" src="'+a.profile_picture+'"><span class="wdi_username">'+a.username+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(newUser);jQuery("#wdi_add_user_ajax_input").attr("value","");this.feed_users.push({username:a.username,id:a.id,profile_picture:a.profile_picture})}else{alert(a.username+" "+wdi_messages.already_added)}selected=this.thumbUser(a.username)?"selected":"";this.updateFeaturedImageSelect(a.username,"add",selected);this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.getUserProfilePic=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return this.feed_users[a]["profile_picture"]}}return"false"};wdi_controller.conditionalFiltersTabInit=function(){this.setInitialFilters();this.updateFiltersUi();var b=this;jQuery("#wdi_add_filter").on("click",function(){b.addConditionalFilter();jQuery("#wdi_filter_input").val("")});jQuery(".wdi_filter_radio").on("click",function(){jQuery("#wdi_filter_input").trigger("focus")});jQuery("#wdi_filter_input").on("keypress",function(c){if(c.keyCode==13){b.addConditionalFilter();jQuery(this).val("");return false}});a();jQuery("#WDI_wrap_conditional_filter_enable input").on("change",function(){a()});function a(){switch(jQuery("#WDI_wrap_conditional_filter_enable input:checked").val()){case"0":jQuery("#WDI_conditional_filters").parent().parent().addClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().addClass("wdi_hidden");jQuery("#wdi_final_condition").addClass("wdi_hidden");jQuery("#WDI_filter_source").addClass("wdi_hidden");break;case"1":jQuery("#WDI_conditional_filters").parent().parent().removeClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().removeClass("wdi_hidden");jQuery("#wdi_final_condition").removeClass("wdi_hidden");jQuery("#WDI_filter_source").removeClass("wdi_hidden");break}}jQuery("#WDI_conditional_filter_type").on("change",function(){if(jQuery(this).val()=="none"){}else{jQuery("#WDI_conditional_filters").css("display","block")}jQuery(this).parent().find("label").css({"line-height":"24px",height:"24px",padding:"2px 5px",display:"inline-block","font-size":"15px",color:"black","font-weight":"500","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"});switch(jQuery(this).val()){case"AND":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.and_descr);break;case"OR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.or_descr);break;case"NOR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.nor_descr);break}wdi_controller.updateFiltersUi()});jQuery("#WDI_conditional_filter_type").trigger("change")};wdi_controller.addConditionalFilter=function(){var b=jQuery("#wdi_filter_input").val(),a=jQuery("#wdi_filter_type").val(),c={};if(b==""){return}b=b.trim();switch(a){case"username":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"mention":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"hashtag":if(b[0]=="#"){b=b.substr(1,b.length)}break;case"url":var d=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(!d.test(b)){alert(wdi_messages.invalid_url);return}break}c={filter_type:a,filter_by:b,id:this.randomId()};if(a!=null){if(!this.filterExists(c)){this.conditionalFilters.push(c);this.updateFiltersUi()}else{alert(b+" "+wdi_messages.already_added)}}else{alert(wdi_messages.selectConditionType)}};wdi_controller.filterExists=function(b){for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a].filter_type==b.filter_type&&this.conditionalFilters[a].filter_by==b.filter_by){return true}}return false};wdi_controller.updateFiltersUi=function(){var a=jQuery("#wdi_filters_ui").html("");for(var b=0;b<this.conditionalFilters.length;b++){if(b==0){if(this.conditionalFilters.length!=1){switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.either+"</span>"));break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.neither+"</span>"));break}}else{switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.not+"</span>"));break}}}var c;switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":c=wdi_messages.and;break;case"OR":c=wdi_messages.or;break;case"NOR":c=wdi_messages.nor;break}if(b>=1){a.append(jQuery('<span class="wdi_logic">'+c+"</span>"))}a.append(this.createUiElement(this.conditionalFilters[b]))}this.updateFilterTextarea()};wdi_controller.createUiElement=function(b){var c;switch(b.filter_type){case"mention":c="@";break;case"hashtag":c="#";break;case"location":c="%";break;default:c="";break}var a=jQuery('<span data-id="'+b.id+'" class="wdi_filter_item wdi_filter_by_'+b.filter_type+'"></span>').html(c+b.filter_by+'<span onclick="wdi_controller.removeConditionalFilter(jQuery(this));" class="wdi_remove_filter">X</span>');return a};wdi_controller.randomId=function(){var c="";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var b=0;b<5;b++){c+=a.charAt(Math.floor(Math.random()*a.length))}return c};wdi_controller.removeConditionalFilter=function(b){var c=b.parent().attr("data-id");for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a]["id"]==c){this.conditionalFilters.splice(a,1)}}this.updateFiltersUi()};wdi_controller.updateFilterTextarea=function(){var a,b=this.conditionalFilters;a=JSON.stringify(b);jQuery("#wdi_conditional_filters_textarea").val(a)};wdi_controller.setInitialFilters=function(){var b=[],a=jQuery("#wdi_conditional_filters_textarea").val();if(this.isJsonString(a)){b=JSON.parse(a)}this.conditionalFilters=b};wdi_controller.updateConditionalFiltersUi=function(){wdi_controller.updateFilterSource()};wdi_controller.updateFilterSource=function(){if(jQuery('input[name="wdi_feed_settings[liked_feed]"]:checked').val()=="liked"){var a=jQuery("#wdi_filter_source").html("");var d="<div class='wdi_source_user'><span class='wdi_source_username'>Media I liked</span></div>";a.html(a.html()+d);return}var f=[],e,c;jQuery(".wdi_user").each(function(){if(jQuery(this).find(".wdi_username").length!=0){e=jQuery(this).find(".wdi_username").text()}else{e=jQuery(this).find(".wdi_hashtag").text()}c=jQuery(this).find("img").attr("src");f.push({username:e,image:c})});var a=jQuery("#wdi_filter_source").html("");for(var b=0;b<f.length;b++){var d="<div class='wdi_source_user'><span class='wdi_source_img'><img src='"+f[b].image+"'></span><span class='wdi_source_username'>"+f[b].username+"</span></div>";a.html(a.html()+d)}};wdi_controller.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};function wdi_spider_select_value(a){a.focus();a.select()}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_bulk_actions(a){var b=jQuery(a).val();if(b!=""){if(b=="delete_all"){if(!confirm(wdi_messages.do_you_want_to_delete_selected_items)){return false}}wdi_spider_set_input_value("task",b);jQuery("#sliders_form").submit()}else{return false}return true}function wdi_spider_check_all_items(){wdi_spider_check_all_items_checkbox();jQuery("#check_all").trigger("click")}function wdi_spider_check_all_items_checkbox(){if(jQuery("#check_all_items").attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}else{var b=(parseInt(jQuery(".displaying-num").html())?parseInt(jQuery(".displaying-num").html()):0);var a=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0);var c=a+b;jQuery("#check_all_items").attr("checked",true);if(c){jQuery("#draganddrop").html("<strong><p>Selected "+c+" item"+(c>1?"s":"")+".</p></strong>");jQuery("#draganddrop").show()}}}function wdi_spider_check_all(a){if(!jQuery(a).attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}};
1
+ jQuery(document).ready(function(){wdi_controller.bindSaveFeedEvent();wdi_controller.bindAddNewUserOrHashtagEvent();jQuery(".display_type input").on("click",function(){wdi_controller.displaySettingsSection(jQuery(this))});wdi_controller.conditionalFiltersTabInit();wdi_controller.bindSaveThemeEvent();jQuery("#wdi_add_user_ajax").after(jQuery("<br><label class='wdi_pro_only' for='wdi_add_user_ajax_input'>"+wdi_messages.username_hashtag_multiple+"</label>"));if(jQuery("body").hasClass("instagram-feed-wd_page_wdi_settings")){wdi_advanced_option_controller()}jQuery(".wdi_section_name").click(function(){b(jQuery(this))});b(false);function b(f){if(f===false){var d={wdi_layout_section:"show",wdi_media:"show",wdi_layout:"hide",wdi_advanced:"hide",wdi_lightbox_general:"show",wdi_lightbox_advanced:"hide",wdi_conditional_filters:"show",wdi_how_to_publish:"show"};var g=JSON.parse(localStorage.getItem("wdi_sections"));if(g===null||g===false){g=d;localStorage.setItem("wdi_sections",JSON.stringify(g))}for(i in g){var j=jQuery("#wdi_save_feed").find("[data-section_name='"+i+"']");a(g[i],j)}}else{var c=jQuery(f).data("section_name");var h=null;if(f.hasClass("wdi_section_open")){a("show",f);h="show"}else{if(f.hasClass("wdi_section_close")){a("hide",f);h="hide"}}if(h!=null){var e=JSON.parse(localStorage.getItem("wdi_sections"))||{};e[c]=h;localStorage.setItem("wdi_sections",JSON.stringify(e))}}}function a(e,d){if(e==="show"){var c=d.closest(".wdi_section").find(".wdi_elements");if(c.data("display")==="table"){c.css({display:"table"})}else{c.css({display:"block"})}d.css({"border-bottom":"1px solid #f1f1f1",margin:"0 auto 15px"});d.removeClass("wdi_section_open");d.addClass("wdi_section_close")}else{d.closest(".wdi_section").find(".wdi_elements").css({display:"none"});d.css({"border-bottom":"0px",margin:"0 auto 0px"});d.removeClass("wdi_section_close");d.addClass("wdi_section_open")}}});function wdi_advanced_option_controller(){var a=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));a.addClass("wdi_advanced_option wdi_advanced_option_close");var b="<tr class='wdi_advanced_option_head'><th>ADVANCED OPTIONS</th><td><div class='wdi_advanced_option_icon'></div></td></tr>";$tr=jQuery(b);a.prepend($tr);$tr.on("click",function(){if(a.hasClass("wdi_advanced_option_open")){a.removeClass("wdi_advanced_option_open");a.addClass("wdi_advanced_option_close")}else{a.removeClass("wdi_advanced_option_close");a.addClass("wdi_advanced_option_open")}})}function wdi_controller(){}wdi_controller.getParameterByName=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=new RegExp("[\\?&]"+a+"=([^&#]*)"),b=c.exec(location.search);return b===null?"":decodeURIComponent(b[1].replace(/\+/g," "))};wdi_controller.apiRedirected=function(){var d=this.getParameterByName("access_token");var a=d.split(".");var b=/^[^\\\/&?><"']*$/;for(i=0;i<a.length;i++){if(a[i].match(b)===null){return}}var c=a.join(".");jQuery(document).ready(function(){jQuery("#wdi_access_token").attr("value",c)});wdi_controller.instagram.addToken(c);wdi_controller.getUserInfo(c)};wdi_controller.getUserInfo=function(a){this.instagram.getSelfInfo({success:function(b){jQuery("#wdi_user_name").attr("value",b.data["username"]);jQuery("#wdi_user_id").attr("value",b.data["id"]);jQuery(document).trigger("wdi_settings_filled")}})};wdi_controller.oldDisplayType={};wdi_controller.displayTypeMemory={};wdi_controller.switchFeedTabs=function(d,b){jQuery("#wdi_refresh_tab").attr("value",d);jQuery(".wdi_tab").hide();jQuery("#"+d+"_tab").show();jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+d+'"]').css("display","block");if(!jQuery('.display_type[tab="'+d+'"]').length){jQuery(".display_type_content").hide()}else{jQuery(".display_type_content").show()}jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+d).addClass("wdi_feed_tab_active");var a=jQuery();var c=false;if(b!=undefined&&b!=""){a=jQuery(".display_type #"+b).prop("checked",true);jQuery("#wdi_feed_type").attr("value",b)}if(!c){a=jQuery('.display_type[tab="'+d+'"] input[name="feed_type"]:checked');if(a.length!=0){c=true}}if(!c){a=jQuery('.display_type[tab="'+d+'"] #thumbnails');if(a.length!=0){c=true;a.prop("checked",true);jQuery("#wdi_feed_type").attr("value","thumbnails")}}if(c){wdi_controller.displaySettingsSection(a)}if(d!="conditional_filters"){jQuery("#wdi-conditional-filters-ui").addClass("wdi_hidden")}else{jQuery("#wdi-conditional-filters-ui").removeClass("wdi_hidden")}};wdi_controller.displaySettingsSection=function(h){var d=h.attr("id").toLowerCase().trim();var g=h.parent().parent().attr("tab");var a=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:d,tab:g};wdi_controller.displayTypeMemory[g]=wdi_controller.oldDisplayType;if(a!=undefined){a.attr("value",d)}var f=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",d);var e=0,c=0;var b=false;f.find(".wdi_element").each(function(){e++;var j=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(j!==undefined){b=false;var k=j.toLowerCase().trim().split(",");for(c=0;c<k.length;c++){if(k[c]===d){jQuery(this).css("display","block");b=true}}if(b===false){jQuery(this).css("display","none")}}})};wdi_controller.switchThemeTabs=function(b,a){jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+b).addClass("wdi_feed_tab_active");jQuery("[tab]").each(function(){if(jQuery(this).attr("tab")!=b){jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","none")}else{jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","block")}});jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+b+'"]').css("display","block");jQuery("#wdi_refresh_tab").attr("value",b);if(a!=undefined&&a!=""){jQuery("#wdi_refresh_section").attr("value",a)}if(a==undefined&&a!=""){if(wdi_controller.displayTypeMemory[b]!=undefined){jQuery(".display_type #"+wdi_controller.displayTypeMemory[b]["section"]).trigger("click")}else{jQuery('.display_type[tab="'+b+'"]').first().find("input").trigger("click")}}else{jQuery(".display_type #"+a).trigger("click")}};wdi_controller.bindSaveFeedEvent=function(){var a=this;jQuery("#wdi_save_feed_submit").on("click",function(){a.save_feed("save_feed")});jQuery("#wdi_save_feed_apply").on("click",function(){a.save_feed("apply_changes")});jQuery("#wdi_cancel_changes").on("click",function(){a.save_feed("cancel")})};wdi_controller.save_feed=function(d){if("cancel"==d){window.location=window.location.href}wdi_controller.checkIfUserNotSaved(d);if(wdi_controller.waitingAjaxRequestEnd.button!=0){return}jQuery("#task").attr("value",d);var a=this.feed_users,b,c,f,j,h,e={username:jQuery("#wdi_default_user").val(),id:jQuery("#wdi_default_user_id").val()};if(a.length==0){a.push(e);this.updateFeaturedImageSelect(e.username,"add","selected")}b=this.stringifyUserData(a);jQuery("#WDI_feed_users").val(b);if(d=="apply_changes"||d=="save_feed"){c=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",c)}f=jQuery("#WDI_thumb_user").val();h=this.getUserProfilePic(f);if("false"==h||typeof h=="undefined"){var g=this;this.instagram.getSelfInfo({success:function(m){var l=g.isValidResponse(m),k=m.data,n;if(l.valid&&g.hasData(m)&&k){n=k.profile_picture}else{n=""}}});jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}else{jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}};wdi_controller.makeInstagramUserRequest=function(b,f){var a,c,g=this,d;c=this.getInputType(b);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){alert(wdi_messages.only_one_user_or_hashtag);return}}switch(c){case"user":if(b!==wdi_options.wdi_user_name){alert("You can add only your username ( "+wdi_options.wdi_user_name+" )");return}this.instagram.getSelfInfo({success:function(k){var j=g.isValidResponse(k);if(j.valid==false){alert(j.msg);return}var h=k.data;if(j.valid&&g.hasData(k)){g.addUser(h)}else{if(!h){alert(wdi_messages.user_not_exist.replace("%s",'"'+b+'"'))}else{alert(j.msg)}}}});break;case"hashtag":var e=b.substr(1,b.length);e=e.replace(" ","");this.instagram.getTagRecentMedia(e,{success:function(j){var h=g.isValidResponse(j);if(h.valid&&g.hasData(j)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!g.hasData(j)&&h.msg=="success"){if(f!=true){if(confirm(wdi_messages.hashtag_no_data)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{jQuery("#wdi_add_user_ajax_input").val("")}}else{g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}}else{alert(h.msg)}}}});break}};wdi_controller.checkForDuplicateUser=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return true}}return false};wdi_controller.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_controller.stringifyUserData=function(a){var c=[];for(var b=0;b<a.length;b++){c.push({username:a[b]["username"],id:a[b]["id"]})}return JSON.stringify(c)};wdi_controller.bindAddNewUserOrHashtagEvent=function(){jQuery("#wdi_add_user_ajax").on("click",function(){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a)});jQuery("#wdi_add_user_ajax_input").on("keypress",function(b){if(b.keyCode==13){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a);return false}})};wdi_controller.removeFeedUser=function(b){var c=b.parent().find("a span").text();if(b.parent().find("a span").hasClass("wdi_hashtag")){c="#"+c}for(var a=0;a<this.feed_users.length;a++){if(this.feed_users[a]["username"]==c){this.feed_users.splice(a,1);break}}b.parent().remove();if(c!==jQuery("#wdi_default_user").val()){wdi_controller.updateFeaturedImageSelect(c,"remove")}if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==0){jQuery("#wdi_add_user_ajax_input").removeAttr("disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder","")}}};wdi_controller.updateFeaturedImageSelect=function(f,e,d){var a=jQuery("#WDI_thumb_user");if(d!="selected"){d=""}switch(e){case"add":var b=a.find('option[value="'+f+'"]').length;if(!b){var c=jQuery("<option "+d+' value="'+f+'">'+f+"</option>");a.append(c)}break;case"remove":a.find('option[value="'+f+'"]').remove();if(this.feed_users.length>0){a.val(this.feed_users[0].username)}break}};wdi_controller.bindSaveThemeEvent=function(){jQuery("#wdi_save_theme_submit").on("click",function(){jQuery("#task").attr("value","save_feed");jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_apply").on("click",function(){jQuery("#task").attr("value","apply_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_reset").on("click",function(){jQuery("#task").attr("value","reset_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()})};wdi_controller.checkIfUserNotSaved=function(b){switch(b){case"save_feed":b="submit";break;case"apply_changes":b="apply";break;case"reset_changes":b="reset";break}if(jQuery("#wdi_add_user_ajax_input").val().trim()!=""){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.waitingAjaxRequestEnd={button:b};wdi_controller.makeInstagramUserRequest(a);return 1}else{wdi_controller.waitingAjaxRequestEnd={button:0};return 0}};wdi_controller.saveFeedAfterAjaxWait=function(b){if(wdi_controller.waitingAjaxRequestEnd!=undefined){var a=wdi_controller.waitingAjaxRequestEnd.button;if(b&&a!=0){jQuery("#wdi_save_feed_"+a).trigger("click")}wdi_controller.waitingAjaxRequestEnd=undefined}};wdi_controller.getCookie=function(a){var b="; "+document.cookie;var c=b.split("; "+a+"=");if(c.length==2){return c.pop().split(";").shift()}};wdi_controller.isValidResponse=function(a){var b={};if(typeof a=="undefined"||typeof a.meta["code"]=="undefined"||a.meta["code"]!=200){b.valid=false;if(typeof a=="undefined"){b.msg=wdi_messages.instagram_server_error}else{if(a.meta["code"]!==200){b.msg=a.meta["error_message"]}else{b.msg=""}}}else{b.valid=true;b.msg="success"}return b};wdi_controller.hasData=function(a){if(typeof a!="undefined"&&typeof a.data!="undefined"&&a.data.length!=0){return true}else{return false}};wdi_controller.thumbUser=function(a){return(this.feed_users.length>0&&this.feed_users[0].username===a)};wdi_controller.findUser=function(d,a){var c=[];if(typeof a!="undefined"&&typeof a.data!="undefined"){c=a.data}for(var b=0;b<c.length;b++){if(c[b]["username"]==d){return c[b]}}return false};wdi_controller.addHashtag=function(e,c){if(e.match(/[~!@$%&*#^()<>?]/)==null){if(this.checkForDuplicateUser("#"+e)==false){var b=jQuery('<div class="wdi_user"><a target="_blank" href="https://instagram.com/explore/tags/'+e+'"><img class="wdi_profile_pic" src="'+wdi_url.plugin_url+'/images/hashtag.png"><span class="wdi_hashtag">'+e+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(b);jQuery("#wdi_add_user_ajax_input").attr("value","");var d;if(typeof c!="undefined"){d=(c.data.length!=0)?c.data[0]["images"]["thumbnail"]["url"]:""}else{d=""}this.feed_users.push({username:"#"+e,id:"#"+e,profile_picture:d});var a="#"+e;selected=this.thumbUser(a)?"selected":"";wdi_controller.updateFeaturedImageSelect(a,"add",selected)}else{alert("#"+e+" "+wdi_messages.already_added)}}else{alert(wdi_messages.invalid_hashtag)}this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.addUser=function(a){if(this.checkForDuplicateUser(a.username)==false){newUser=jQuery('<div class="wdi_user"><a target="_blank" href="http://www.instagram.com/'+a.username+'"><img class="wdi_profile_pic" src="'+a.profile_picture+'"><span class="wdi_username">'+a.username+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(newUser);jQuery("#wdi_add_user_ajax_input").attr("value","");this.feed_users.push({username:a.username,id:a.id,profile_picture:a.profile_picture})}else{alert(a.username+" "+wdi_messages.already_added)}selected=this.thumbUser(a.username)?"selected":"";this.updateFeaturedImageSelect(a.username,"add",selected);this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.getUserProfilePic=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return this.feed_users[a]["profile_picture"]}}return"false"};wdi_controller.conditionalFiltersTabInit=function(){this.setInitialFilters();this.updateFiltersUi();var b=this;jQuery("#wdi_add_filter").on("click",function(){b.addConditionalFilter();jQuery("#wdi_filter_input").val("")});jQuery(".wdi_filter_radio").on("click",function(){jQuery("#wdi_filter_input").trigger("focus")});jQuery("#wdi_filter_input").on("keypress",function(c){if(c.keyCode==13){b.addConditionalFilter();jQuery(this).val("");return false}});a();jQuery("#WDI_wrap_conditional_filter_enable input").on("change",function(){a()});function a(){switch(jQuery("#WDI_wrap_conditional_filter_enable input:checked").val()){case"0":jQuery("#WDI_conditional_filters").parent().parent().addClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().addClass("wdi_hidden");jQuery("#wdi_final_condition").addClass("wdi_hidden");jQuery("#WDI_filter_source").addClass("wdi_hidden");break;case"1":jQuery("#WDI_conditional_filters").parent().parent().removeClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().removeClass("wdi_hidden");jQuery("#wdi_final_condition").removeClass("wdi_hidden");jQuery("#WDI_filter_source").removeClass("wdi_hidden");break}}jQuery("#WDI_conditional_filter_type").on("change",function(){if(jQuery(this).val()=="none"){}else{jQuery("#WDI_conditional_filters").css("display","block")}jQuery(this).parent().find("label").css({"line-height":"24px",height:"24px",padding:"2px 5px",display:"inline-block","font-size":"15px",color:"black","font-weight":"500","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"});switch(jQuery(this).val()){case"AND":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.and_descr);break;case"OR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.or_descr);break;case"NOR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.nor_descr);break}wdi_controller.updateFiltersUi()});jQuery("#WDI_conditional_filter_type").trigger("change")};wdi_controller.addConditionalFilter=function(){var b=jQuery("#wdi_filter_input").val(),a=jQuery("#wdi_filter_type").val(),c={};if(b==""){return}b=b.trim();switch(a){case"username":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"mention":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"hashtag":if(b[0]=="#"){b=b.substr(1,b.length)}break;case"url":var d=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(!d.test(b)){alert(wdi_messages.invalid_url);return}break}c={filter_type:a,filter_by:b,id:this.randomId()};if(a!=null){if(!this.filterExists(c)){this.conditionalFilters.push(c);this.updateFiltersUi()}else{alert(b+" "+wdi_messages.already_added)}}else{alert(wdi_messages.selectConditionType)}};wdi_controller.filterExists=function(b){for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a].filter_type==b.filter_type&&this.conditionalFilters[a].filter_by==b.filter_by){return true}}return false};wdi_controller.updateFiltersUi=function(){var a=jQuery("#wdi_filters_ui").html("");for(var b=0;b<this.conditionalFilters.length;b++){if(b==0){if(this.conditionalFilters.length!=1){switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.either+"</span>"));break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.neither+"</span>"));break}}else{switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.not+"</span>"));break}}}var c;switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":c=wdi_messages.and;break;case"OR":c=wdi_messages.or;break;case"NOR":c=wdi_messages.nor;break}if(b>=1){a.append(jQuery('<span class="wdi_logic">'+c+"</span>"))}a.append(this.createUiElement(this.conditionalFilters[b]))}this.updateFilterTextarea()};wdi_controller.createUiElement=function(b){var c;switch(b.filter_type){case"mention":c="@";break;case"hashtag":c="#";break;case"location":c="%";break;default:c="";break}var a=jQuery('<span data-id="'+b.id+'" class="wdi_filter_item wdi_filter_by_'+b.filter_type+'"></span>').html(c+b.filter_by+'<span onclick="wdi_controller.removeConditionalFilter(jQuery(this));" class="wdi_remove_filter">X</span>');return a};wdi_controller.randomId=function(){var c="";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var b=0;b<5;b++){c+=a.charAt(Math.floor(Math.random()*a.length))}return c};wdi_controller.removeConditionalFilter=function(b){var c=b.parent().attr("data-id");for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a]["id"]==c){this.conditionalFilters.splice(a,1)}}this.updateFiltersUi()};wdi_controller.updateFilterTextarea=function(){var a,b=this.conditionalFilters;a=JSON.stringify(b);jQuery("#wdi_conditional_filters_textarea").val(a)};wdi_controller.setInitialFilters=function(){var b=[],a=jQuery("#wdi_conditional_filters_textarea").val();if(this.isJsonString(a)){b=JSON.parse(a)}this.conditionalFilters=b};wdi_controller.updateConditionalFiltersUi=function(){wdi_controller.updateFilterSource()};wdi_controller.updateFilterSource=function(){if(jQuery('input[name="wdi_feed_settings[liked_feed]"]:checked').val()=="liked"){var a=jQuery("#wdi_filter_source").html("");var d="<div class='wdi_source_user'><span class='wdi_source_username'>Media I liked</span></div>";a.html(a.html()+d);return}var f=[],e,c;jQuery(".wdi_user").each(function(){if(jQuery(this).find(".wdi_username").length!=0){e=jQuery(this).find(".wdi_username").text()}else{e=jQuery(this).find(".wdi_hashtag").text()}c=jQuery(this).find("img").attr("src");f.push({username:e,image:c})});var a=jQuery("#wdi_filter_source").html("");for(var b=0;b<f.length;b++){var d="<div class='wdi_source_user'><span class='wdi_source_img'><img src='"+f[b].image+"'></span><span class='wdi_source_username'>"+f[b].username+"</span></div>";a.html(a.html()+d)}};wdi_controller.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};function wdi_spider_select_value(a){a.focus();a.select()}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_bulk_actions(a){var b=jQuery(a).val();if(b!=""){if(b=="delete_all"){if(!confirm(wdi_messages.do_you_want_to_delete_selected_items)){return false}}wdi_spider_set_input_value("task",b);jQuery("#sliders_form").submit()}else{return false}return true}function wdi_spider_check_all_items(){wdi_spider_check_all_items_checkbox();jQuery("#check_all").trigger("click")}function wdi_spider_check_all_items_checkbox(){if(jQuery("#check_all_items").attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}else{var b=(parseInt(jQuery(".displaying-num").html())?parseInt(jQuery(".displaying-num").html()):0);var a=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0);var c=a+b;jQuery("#check_all_items").attr("checked",true);if(c){jQuery("#draganddrop").html("<strong><p>Selected "+c+" item"+(c>1?"s":"")+".</p></strong>");jQuery("#draganddrop").show()}}}function wdi_spider_check_all(a){if(!jQuery(a).attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}};
js/wdi_frontend.js CHANGED
@@ -275,10 +275,11 @@ wdi_front.init = function (currentFeed)
275
  * Check if feed user has no id for some reason then update user
276
  * and after updating them initialize feed
277
  */
278
- if (wdi_front.updateUsersIfNecessary(currentFeed)) {
279
- return;
280
- }
281
- ;
 
282
 
283
 
284
  } else {
@@ -429,22 +430,57 @@ wdi_front.instagramRequest = function (id, currentFeed)
429
  }
430
  else
431
  if (this.getInputType(feed_users[id]['username']) == 'user') {
432
- currentFeed.instagram.getUserRecentMedia(feed_users[id]['id'], {
433
- success: function (response)
434
- {
435
 
436
- if(typeof response.meta!= "undefined" && typeof response.meta.error_type != "undefined"){
437
- response.wdi_current_feed_name = feed_users[id].username;
438
- wdi_front.show_alert(false, response, currentFeed);
439
- }
440
- currentFeed.mediaRequestsDone = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
 
442
- response = _this.checkMediaResponse(response, currentFeed);
443
- if (response != false) {
444
- _this.saveUserData(response, currentFeed.feed_users[id], currentFeed);
445
- }
446
- }
447
- });
448
  }
449
 
450
 
@@ -2502,8 +2538,10 @@ wdi_front.show = function (name, currentFeed)
2502
  }
2503
  else
2504
  if (_this.getInputType(_user.username) == 'user') {
2505
- currentFeed.instagram.getUserInfo(_user.id, {
2506
- success: function (response)
 
 
2507
  {
2508
 
2509
 
275
  * Check if feed user has no id for some reason then update user
276
  * and after updating them initialize feed
277
  */
278
+ ///deprecated API
279
+ // if (wdi_front.updateUsersIfNecessary(currentFeed)) {
280
+ // return;
281
+ // }
282
+ // ;
283
 
284
 
285
  } else {
430
  }
431
  else
432
  if (this.getInputType(feed_users[id]['username']) == 'user') {
433
+ currentFeed.instagram.getUserRecentMedia(feed_users[id]['id'], {
434
+ success: function (response)
435
+ {
436
 
437
+ if(typeof response.meta!= "undefined" && typeof response.meta.error_type != "undefined"){
438
+ response.wdi_current_feed_name = feed_users[id].username;
439
+ wdi_front.show_alert(false, response, currentFeed);
440
+ }
441
+ currentFeed.mediaRequestsDone = true;
442
+
443
+ response = _this.checkMediaResponse(response, currentFeed);
444
+ if (response != false) {
445
+ _this.saveUserData(response, currentFeed.feed_users[id], currentFeed);
446
+ }
447
+ }
448
+ });
449
+ // currentFeed.instagram.getUserRecentMedia(feed_users[id]['id'], {
450
+ // success: function (response)
451
+ // {
452
+ //
453
+ // if(typeof response.meta!= "undefined" && typeof response.meta.error_type != "undefined"){
454
+ // response.wdi_current_feed_name = feed_users[id].username;
455
+ // wdi_front.show_alert(false, response, currentFeed);
456
+ // }
457
+ // currentFeed.mediaRequestsDone = true;
458
+ //
459
+ // response = _this.checkMediaResponse(response, currentFeed);
460
+ // if (response != false) {
461
+ // _this.saveUserData(response, currentFeed.feed_users[id], currentFeed);
462
+ // }
463
+ // }
464
+ // });
465
+
466
+ currentFeed.instagram.getSelfRecentMedia({
467
+ success: function (response)
468
+ {
469
+ debugger;
470
+
471
+ if(typeof response.meta!= "undefined" && typeof response.meta.error_type != "undefined"){
472
+ response.wdi_current_feed_name = feed_users[id].username;
473
+ wdi_front.show_alert(false, response, currentFeed);
474
+ }
475
+ currentFeed.mediaRequestsDone = true;
476
+
477
+ response = _this.checkMediaResponse(response, currentFeed);
478
+ if (response != false) {
479
+ _this.saveUserData(response, currentFeed.feed_users[id], currentFeed);
480
+ }
481
+ }
482
+ });
483
 
 
 
 
 
 
 
484
  }
485
 
486
 
2538
  }
2539
  else
2540
  if (_this.getInputType(_user.username) == 'user') {
2541
+ currentFeed.instagram.getSelfInfo({
2542
+ ///deprecated API
2543
+ ///currentFeed.instagram.getUserInfo(_user.id, {
2544
+ success: function (response)
2545
  {
2546
 
2547
 
js/wdi_frontend.min.js CHANGED
@@ -1 +1 @@
1
- if(typeof wdi_front=="undefined"){wdi_front={type:"not_declared"}}wdi_front.detectEvent=function(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));if(a){return"touchend"}else{return"click"}};var wdi_error_show=false;wdi_front.show_alert=function(e,b,f){f=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter);if(b.meta["code"]===400&&b.meta["error_type"]==="APINotAllowedError"){if(typeof b.wdi_current_feed_name!="undefined"){var a=b.wdi_current_feed_name;var d=f.find(".wdi_private_feed_names");d.html(a);f.find(".wdi_private_feed_error").removeClass("wdi_hidden")}f.find(".wdi_spinner").remove()}if(typeof f!="undefined"&&b.meta["error_type"]!="APINotAllowedError"){f.find(".wdi_spinner").remove();wdi_error_show=true;var c=f.find(".wdi_js_error");var g=f.find(".wdi_token_error");if(b!=false&&typeof b.meta!=undefined&&b.meta.error_type==="OAuthAccessTokenException"){g.removeClass("wdi_hidden");if(wdi_front_messages.wdi_token_error_flag!="1"){jQuery.ajax({type:"POST",url:wdi_url.ajax_url,dataType:"json",data:{action:"wdi_token_flag",wdi_token_flag_nonce:wdi_front_messages.wdi_token_flag_nonce},success:function(h){}})}}else{c.removeClass("wdi_js_error");c.addClass("wdi_js_error_no_animate");jQuery(".wdi_js_error_no_animate").show()}if(wdi_front_messages.show_alerts){}else{console.log("%c"+e,"color:#cc0000;")}}wdi_error_show=true};wdi_front.globalInit=function(){var a=wdi_front.feed_counter;if(typeof wdi_ajax.ajax_response!="undefined"){var c=wdi_feed_counter_init.wdi_feed_counter_init}else{var c=0}for(var b=c;b<=a;b++){if(jQuery("#wdi_feed_"+b).length===0){continue}var d=new WDIFeed(window["wdi_feed_"+b]);d.instagram=new WDIInstagram();d.instagram.filterArguments={feed:d};d.instagram.filters=[{where:"getUserRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getTagRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getRecentLikedMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"requestByUrl",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}}];d.instagram.addToken(d.feed_row["access_token"]);wdi_front.access_token=d.feed_row["access_token"];d.dataStorageRaw=[];d.dataStorage=[];d.dataStorageList=[];d.allResponseLength=0;d.currentResponseLength=0;d.temproraryUsersData=[];d.removedUsers=0;d.nowLoadingImages=true;d.imageIndex=0;d.resIndex=0;d.currentPage=1;d.userSortFlags=[];d.customFilterChanged=false;d.maxConditionalFiltersRequestCount=10;d.instagramRequestCounter=0;d.mediaRequestsDone=false;d.conditionalFilterBuffer=[];d.stopInfiniteScrollFlag=false;if(d.feed_row.feed_type=="masonry"){d.displayedData=[]}if(d.feed_row.feed_display_view=="pagination"){d.feed_row.resort_after_load_more=0;if(d.feed_row.feed_type!="image_browser"){d.feed_row.load_more_number=parseInt(d.feed_row.pagination_per_page_number);d.feed_row.number_of_photos=(1+parseInt(d.feed_row.pagination_preload_number))*d.feed_row.load_more_number}else{d.feed_row.number_of_photos=1+parseInt(d.feed_row.image_browser_preload_number);d.feed_row.load_more_number=parseInt(d.feed_row.image_browser_load_number)}d.freeSpaces=(Math.floor(d.feed_row.pagination_per_page_number/d.feed_row.number_of_columns)+1)*d.feed_row.number_of_columns-d.feed_row.pagination_per_page_number}else{d.freeSpaces=0}d.galleryBox=function(e){wdi_spider_createpopup(wdi_url.ajax_url+"?gallery_id="+this.feed_row.id+"&image_id="+e,this.feed_row.wdi_feed_counter,this.feed_row.lightbox_width,this.feed_row.lightbox_height,1,"testpopup",5,this,e)};wdi_responsive.columnControl(d);if(d.feed_row.feed_type=="masonry"){jQuery(window).trigger("resize")}wdi_front.bindEvents(d);window["wdi_feed_"+b]=d;wdi_front.init(d)}};wdi_front.init=function(c){jQuery(".wdi_js_error").hide();c.photoCounter=c.feed_row.number_of_photos;if(c.feed_row.liked_feed=="liked"){c.feed_users=["self"]}else{if(wdi_front.isJsonString(c.feed_row.feed_users)){c.feed_users=JSON.parse(c.feed_row.feed_users);if(wdi_front.updateUsersIfNecessary(c)){return}}else{wdi_front.show_alert(wdi_front_messages.invalid_users_format,false,c);return}}c.dataCount=c.feed_users.length;var a=wdi_front.getFeedItemResolution(c);c.feedImageResolution=a.image;c.feedVideoResolution=a.video;for(var b=0;b<c.dataCount;b++){wdi_front.instagramRequest(b,c)}if(c.feed_row.number_of_photos>0){wdi_front.ajaxLoader(c)}if(c.feed_row["display_header"]==="1"){wdi_front.show("header",c)}if(c.feed_row["show_usernames"]==="1"){wdi_front.show("users",c)}};wdi_front.getFeedItemResolution=function(g){var d={image:"standard_resolution",video:"standard_resolution"};if(g.feed_row.feed_resolution==="thumbnail"){return{image:"thumbnail",video:"low_bandwidth"}}else{if(g.feed_row.feed_resolution==="low"){return{image:"low_resolution",video:"low_resolution"}}else{if(g.feed_row.feed_resolution==="standard"){return{image:"standard_resolution",video:"standard_resolution"}}}}var c=jQuery("#wdi_feed_"+g.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");c.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>');wdi_responsive.columnControl(g,1);var b=c.attr("wdi-res").split("wdi_col_");c.find("#wdi_feed_item_example").remove();if(b.length!==2){return d}var a=parseInt(b[1]);if(a<=0){return d}var f=(c.width()/a)-10;var e=d;if(f<=150){e.image="thumbnail";e.video="low_bandwidth"}else{if(f>150&&f<=320){e.image="low_resolution";e.video="low_resolution"}else{e.image="standard_resolution";e.video="standard_resolution"}}return e};wdi_front.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};wdi_front.instagramRequest=function(d,b){var a=b.feed_users,c=this;if(typeof a[d]==="string"&&a[d]==="self"){b.instagram.getRecentLikedMedia({success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveSelfUserData(e,b)}}})}else{if(this.getInputType(a[d]["username"])=="hashtag"){b.instagram.getTagRecentMedia(this.stripHashtag(a[d]["username"]),{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}else{if(this.getInputType(a[d]["username"])=="user"){b.instagram.getUserRecentMedia(a[d]["id"],{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){e.wdi_current_feed_name=a[d].username;wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}}}};wdi_front.isHashtag=function(a){return(a[0]==="#")};wdi_front.saveUserData=function(d,a,b){d.username=a.username;d.user_id=a.id;if(d.user_id[0]==="#"){d.data=wdi_front.appendRequestHashtag(d.data,d.user_id)}b.usersData.push(d);b.currentResponseLength=wdi_front.getArrayContentLength(b.usersData,"data");b.allResponseLength+=b.currentResponseLength;if(b.dataCount==b.usersData.length){if(b.currentResponseLength<b.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(b)){wdi_front.loadMore("initial-keep",b)}else{wdi_front.displayFeed(b);wdi_front.applyFilters(b);if(!wdi_front.activeUsersCount(b)){if(b.feed_row.feed_display_view=="load_more_btn"){var c=jQuery("#wdi_feed_"+b.feed_row.wdi_feed_counter);c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.saveSelfUserData=function(c,a){c.username="";c.user_id="";a.usersData.push(c);a.currentResponseLength=wdi_front.getArrayContentLength(a.usersData,"data");a.allResponseLength+=a.currentResponseLength;if(a.dataCount==a.usersData.length){if(a.currentResponseLength<a.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(a)){wdi_front.loadMore("initial-keep",a)}else{wdi_front.displayFeed(a);wdi_front.applyFilters(a);if(!wdi_front.activeUsersCount(a)){if(a.feed_row.feed_display_view=="load_more_btn"){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter);b.find(".wdi_load_more").addClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.userHasNoPhoto=function(c,e){var a=0;var d=c.usersData;if(typeof e!="undefined"){d=e}for(var b=0;b<d.length;b++){if(typeof d[b]["pagination"]=="undefined"){d[b]["pagination"]=[]}if(c.feed_row.liked_feed==="liked"){if(typeof d[b]["pagination"]["next_max_like_id"]=="undefined"){a++}}else{if(typeof d[b]["pagination"]["next_max_id"]=="undefined"){a++}}}if(a==d.length){return 1}else{return 0}};wdi_front.appendRequestHashtag=function(c,b){for(var a=0;a<c.length;a++){c[a]["wdi_hashtag"]=b}return c};wdi_front.displayFeed=function(c,b){if(c.customFilterChanged==false){var d=wdi_front.feedSort(c,b)}var a=c.customFilterChanged;if(c.customFilterChanged==true){var d=c.customFilteredData;c.parsedData=wdi_front.parseLighboxData(c,true)}if(c.feed_row.resort_after_load_more!="1"){if(c.customFilterChanged==false){c.dataStorageList=c.dataStorageList.concat(d)}}else{if(c.customFilterChanged==false){c.dataStorageList=d}}if(c.feed_row.feed_type=="masonry"){wdi_front.masonryDisplayFeedItems(d,c)}if(c.feed_row.feed_type=="thumbnails"||c.feed_row.feed_type=="blog_style"||c.feed_row.feed_type=="image_browser"){wdi_front.displayFeedItems(d,c)}var e=wdi_front.getDataLength(c);if(e<c.photoCounter&&!a&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount&&!wdi_front.allDataHasFinished(c)){wdi_front.loadMore("",c)}else{wdi_front.allImagesLoaded(c)}if(c.instagramRequestCounter>c.maxConditionalFiltersRequestCount){wdi_front.allImagesLoaded(c);if(d.length==0){c.stopInfiniteScrollFlag=true}}if(c.feed_row.feed_display_view=="pagination"&&c.currentPage<c.paginator){jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter).find("#wdi_last_page").removeClass("wdi_disabled")}c.instagramRequestCounter=0;c.conditionalFilterBuffer=[];wdi_front.updateUsersImages(c)};wdi_front.updateUsersImages=function(a){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter).find(".wdi_single_user .wdi_user_img_wrap img");b.each(function(){if(jQuery(this).attr("src")==wdi_url.plugin_url+"images/missing.png"||jQuery(this).attr("src")==""){if(a.feed_row.liked_feed=="liked"){return}for(var c=0;c<a.usersData.length;c++){if(a.usersData[c]["username"]==jQuery(this).parent().parent().find("h3").text()){if(a.usersData[c]["data"].length!=0){jQuery(this).attr("src",a.usersData[c]["data"][0]["images"]["thumbnail"]["url"])}}}}})};wdi_front.masonryDisplayFeedItems=function(d,h){var b=[];var p=[];if(jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_masonry_column").each(function(){if(h.feed_row.resort_after_load_more==1){jQuery(this).html("");h.imageIndex=0}if(h.customFilterChanged==true){jQuery(this).html("");h.imageIndex=0}if(h.feed_row.feed_display_view=="pagination"){b.push(0)}else{b.push(jQuery(this).height())}p.push(jQuery(this))});if(h.customFilterChanged==true){h.customFilterChanged=false}for(var e=0;e<d.length;e++){h.displayedData.push(d[e]);if(d[e]["type"]=="image"){var n=wdi_front.getPhotoTemplate(h)}else{if(d[e].hasOwnProperty("videos")){var n=wdi_front.getVideoTemplate(h)}else{var n=wdi_front.getSliderTemplate(h)}}var g=d[e];var o=wdi_front.createObject(g,h);var f=n(o);var m=wdi_front.array_min(b);var l=wdi_front.getImageResolution(d[e]);p[m.index].html(p[m.index].html()+f);b[m.index]+=p[m.index].width()*l;h.imageIndex++;if(h.feed_row.feed_display_view=="pagination"){if((e+1)%h.feed_row.pagination_per_page_number===0){h.resIndex+=h.freeSpaces+1}else{h.resIndex++}}}h.wdi_loadedImages=0;var j=false;h.wdi_load_count=e;var a=h.feed_row.wdi_feed_counter;var k=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){h.wdi_loadedImages++;c();if(j===false){wdi_responsive.columnControl(h,1);j=true}});c();function c(){if(h.wdi_load_count===h.wdi_loadedImages&&h.wdi_loadedImages!=0){h.loadedImages=0;h.wdi_load_count=0;wdi_front.allImagesLoaded(h)}}if(h.paginatorNextFlag==true){wdi_front.updatePagination(h,"next")}h.infiniteScrollFlag=false};wdi_front.getImageResolution=function(c){var d=c.images["standard_resolution"]["width"];var b=c.images["standard_resolution"]["height"];var a=b/d;return a};wdi_front.getDataLength=function(b,d){var c=0;if(typeof d==="undefined"){for(var a=0;a<b.dataStorage.length;a++){c+=b.dataStorage[a].length}}else{for(var a=0;a<d.length;a++){c+=d[a].length}}return c};wdi_front.getArrayContentLength=function(d,c){var b=0;for(var a=0;a<d.length;a++){if(d[a]["finished"]=="finished"){continue}b+=d[a][c].length}return b};wdi_front.displayFeedItems=function(d,j){if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" .wdi_feed_wrapper");if(j.feed_row.resort_after_load_more==="1"){l.html("");j.imageIndex=0}if(j.customFilterChanged==true){l.html("");j.imageIndex=0;j.customFilterChanged=false}var g=wdi_front.getImgCount(j)-d.length-1;if(j.feed_row.feed_display_view=="pagination"){var b=j.feed_row.load_more_number;if(j.feed_row.feed_type=="image_browser"){b=1}if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+' [wdi_page="'+(j.currentPage-1)+'"]').length<b||d.length==0){j.currentPage=(--j.currentPage<=1)?1:j.currentPage}}for(var e=0;e<d.length;e++){if(d[e]["type"]=="image"){var m=wdi_front.getPhotoTemplate(j)}else{if(d[e].hasOwnProperty("videos")){var m=wdi_front.getVideoTemplate(j)}else{var m=wdi_front.getSliderTemplate(j)}}var h=d[e];var n=wdi_front.createObject(h,j);var f=m(n);l.html(l.html()+f);j.imageIndex++;if(j.feed_row.feed_display_view=="pagination"){if((e+1)%j.feed_row.pagination_per_page_number===0){j.resIndex+=j.freeSpaces+1}else{j.resIndex++}}}j.wdi_loadedImages=0;var k=false;j.wdi_load_count=e;var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){j.wdi_loadedImages++;c();if(k===false){wdi_responsive.columnControl(j,1);k=true}});function c(){if(j.wdi_load_count===j.wdi_loadedImages&&j.wdi_loadedImages!=0){j.loadedImages=0;j.wdi_load_count=0;wdi_front.allImagesLoaded(j)}}if(j.paginatorNextFlag==true){wdi_front.updatePagination(j,"next")}j.infiniteScrollFlag=false};wdi_front.checkFeedFinished=function(b){for(var a=0;a<b.usersData.length;a++){if(typeof b.usersData[a]["finished"]=="undefined"){return false}}return true};wdi_front.sortingOperator=function(c,b){var a;switch(c){case"date":switch(b){case"asc":a=function(e,d){return(e.created_time>d.created_time)?1:-1};break;case"desc":a=function(e,d){return(e.created_time>d.created_time)?-1:1};break}break;case"likes":switch(b){case"asc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?-1:1};break;case"desc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?1:-1};break}break;case"comments":switch(b){case"asc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?-1:1};break;case"desc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?1:-1};break}break;case"random":a=function(e,d){var f=Math.random();return(f>0.5)?1:-1};break}return a};wdi_front.feedSort=function(e,b){var d=e.feed_row.sort_images_by;var c=e.feed_row.display_order;if(e.feed_row.resort_after_load_more==="1"){e.data=e.data.concat(wdi_front.smartPicker(e,b))}else{e.data=wdi_front.smartPicker(e,b)}var a=wdi_front.sortingOperator(d,c);e.data.sort(a);return e.data};wdi_front.smartPicker=function(l,c){var g=[];var a=0;var k=[];var f=Math.ceil(l.feed_row["number_of_photos"]/l.usersData.length);var b=parseInt(l.feed_row["number_of_photos"]);var n=0;if(c!=""&&typeof c!="undefined"&&c!=null){b=parseInt(c);f=Math.ceil(b/wdi_front.activeUsersCount(l))}var j=function(p,i){return(p.data.length>i.data.length)?1:-1};var e=function(p,i){return(p.length()>i.length())?1:-1};l.storeRawData(l.usersData,"dataStorageRaw");var o=l.dataStorageRaw.sort(e);var h=l.usersData.sort(j);for(var d=0;d<h.length;d++){n+=f;if(o[d].length()<=n){n-=o[d].length();g.push(o[d].getData(o[d].length()));a+=g[g.length-1].length}else{if(a+n>b){n=b-a}var m=[];if(l.auto_trigger===false){m=m.concat(o[d].getData(n))}else{if(m.length+wdi_front.getDataLength(l)+wdi_front.getDataLength(l,g)<l.feed_row["number_of_photos"]){m=m.concat(o[d].getData(n))}}n=0;a+=m.length;g.push(m)}}for(d=0;d<g.length;d++){if(typeof l.dataStorage[d]==="undefined"){l.dataStorage.push(g[d])}else{l.dataStorage[d]=l.dataStorage[d].concat(g[d])}}l.parsedData=wdi_front.parseLighboxData(l);for(d=0;d<g.length;d++){k=k.concat(g[d])}return k};wdi_front.createObject=function(e,h){var j=(e.caption!=null)?e.caption["text"]:"&nbsp";var i="";if(e.type=="video"){i=e.hasOwnProperty("videos")?e.videos[h.feedVideoResolution]["url"]:""}var f=e.images[h.feedImageResolution].url;var a=h.imageIndex;var b="square";var d=e.images["standard_resolution"]["height"];var g=e.images["standard_resolution"]["width"];if(d>g){b="portrait"}else{if(d<g){b="landscape"}}var c={id:e.id,caption:j,image_url:f,likes:e.likes["count"],comments:e.comments["count"],wdi_index:a,wdi_res_index:h.resIndex,wdi_media_user:e.user["username"],link:e.link,video_url:i,wdi_username:e.user["username"],wdi_shape:b};return c};wdi_front.setPage=function(c){var b=c.feed_row.feed_display_view;var e=c.feed_row.feed_type;if(b!="pagination"){return""}var a=c.imageIndex;if(e=="image_browser"){var d=1}else{var d=Math.abs(c.feed_row.pagination_per_page_number)}c.paginator=Math.ceil((a+1)/d);return c.paginator};wdi_front.getPhotoTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-arrows-alt";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o">&nbsp;<%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o">&nbsp;<%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+f+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var i=_.template(a);return i};wdi_front.getSliderTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-clone";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="fa-clone";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="slideshow" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o">&nbsp;<%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o">&nbsp;<%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+f+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var i=_.template(a);return i};wdi_front.replaceToVideo=function(b,a,c){overlayHtml="<video style='width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;' controls=''><source src='"+b+"' type='video/mp4'>Your browser does not support the video tag. </video>";jQuery("#wdi_feed_"+c+' [wdi_index="'+a+'"] .wdi_photo_wrap_inner').html(overlayHtml);jQuery("#wdi_feed_"+c+' [wdi_index="'+a+'"] .wdi_photo_wrap_inner video').get(0).play()};wdi_front.getVideoTemplate=function(h){var f=wdi_front.setPage(h);var k="";var l="";var n="fa-play";var m="";var d="";var e;var c="";if(f!=""){l='wdi_page="'+f+'"';e="src"}else{e="src"}if(f!=""&&f!=1){k="wdi_hidden"}if(h.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(h.feed_row.show_full_description==1&&h.feed_row.feed_type=="masonry"){k+=" wdi_full_caption"}var g="";if(h.feed_row.feed_type!=="blog_style"){if(h.feed_row.feed_type=="masonry"){g="wdi_responsive.showMasonryCaption(jQuery(this),"+h.feed_row.wdi_feed_counter+");"}else{g="wdi_responsive.showCaption(jQuery(this),"+h.feed_row.wdi_feed_counter+");"}}switch(h.feed_row.feed_item_onclick){case"lightbox":m="onclick=wdi_feed_"+h.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":m="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";n="fa-play";break;case"custom_redirect":m="onclick=\"window.open ('"+h.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";n="";break;case"none":d="wdi_cursor_off wdi_hover_off";n="";if(h.feed_row.feed_type=="blog_style"||h.feed_row.feed_type=="image_browser"){m="onclick=wdi_front.replaceToVideo('<%= video_url%>','<%= wdi_index%>',"+h.feed_row.wdi_feed_counter+")";d="";n="fa-play"}}var i="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=h.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+k+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+l+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+i+'"><img class="wdi_img" '+e+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" '+m+">"+c+'<div class="wdi_thumb_icon" style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+n+'"></i></div></div></div></div></div></div>';if(h.feed_row["show_likes"]==="1"||h.feed_row["show_comments"]==="1"||h.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(h.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o">&nbsp;<%= likes%></i></div>'}if(h.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o">&nbsp;<%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(h.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+g+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var j=_.template(a);return j};wdi_front.bindEvents=function(a){if(jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}if(a.feed_row.feed_display_view=="load_more_btn"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_load_more_container").on(wdi_front.clickOrTouch,function(){wdi_front.loadMore(jQuery(this).find(".wdi_load_more_wrap"))})}if(a.feed_row.feed_display_view=="pagination"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_next").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorNext(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_prev").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorPrev(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_last_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationLastPage(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_first_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationFirstPage(jQuery(this),a)});a.paginatorNextFlag=false}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery(window).on("scroll",function(){wdi_front.infiniteScroll(a)});a.infiniteScrollFlag=false}};wdi_front.infiniteScroll=function(a){if((jQuery(window).scrollTop()+jQuery(window).height()-100)>=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_infinite_scroll").offset().top){if(a.infiniteScrollFlag===false&&a.stopInfiniteScrollFlag==false){a.infiniteScrollFlag=true;wdi_front.loadMore(jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_infinite_scroll"),a)}else{if(a.stopInfiniteScrollFlag){wdi_front.allImagesLoaded(a)}}}};wdi_front.paginationFirstPage=function(b,c){if(c.paginator==1||c.currentPage==1){b.addClass("wdi_disabled");return}var d=c.currentPage;c.currentPage=1;wdi_front.updatePagination(c,"custom",d);var a=b.parent().find("#wdi_last_page");a.removeClass("wdi_disabled");b.addClass("wdi_disabled")};wdi_front.paginationLastPage=function(a,b){if(b.paginator==1||b.currentPage==b.paginator){return}var d=b.currentPage;b.currentPage=b.paginator;wdi_front.updatePagination(b,"custom",d);a.addClass("wdi_disabled");var c=a.parent().find("#wdi_first_page");c.removeClass("wdi_disabled")};wdi_front.paginatorNext=function(b,c){var a=b.parent().find("#wdi_last_page");var d=b.parent().find("#wdi_first_page");c.paginatorNextFlag=true;if(c.paginator==c.currentPage&&!wdi_front.checkFeedFinished(c)){c.currentPage++;var e=c.feed_row.number_of_photos;wdi_front.loadMore(b,c,e);a.addClass("wdi_disabled")}else{if(c.paginator>c.currentPage){c.currentPage++;wdi_front.updatePagination(c,"next");if(c.paginator>c.currentPage){a.removeClass("wdi_disabled")}else{a.addClass("wdi_disabled")}}}d.removeClass("wdi_disabled")};wdi_front.paginatorPrev=function(b,c){var a=b.parent().find("#wdi_last_page");var d=b.parent().find("#wdi_first_page");if(c.currentPage==1){d.addClass("wdi_disabled");return}c.currentPage--;wdi_front.updatePagination(c,"prev");a.removeClass("wdi_disabled");if(c.currentPage==1){d.addClass("wdi_disabled")}};wdi_front.updatePagination=function(b,a,d){var c="#wdi_feed_"+b.feed_row.wdi_feed_counter;jQuery(c+' [wdi_page="'+b.currentPage+'"]').each(function(){jQuery(this).removeClass("wdi_hidden")});switch(a){case"next":var d=b.currentPage-1;jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"prev":var d=b.currentPage+1;jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"custom":var d=d;if(d!=b.currentPage){jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")})}break}b.paginatorNextFlag=false;jQuery(c+" .wdi_feed_wrapper").css("height","auto");jQuery(c+" #wdi_current_page").text(b.currentPage)};wdi_front.loadMore=function(f,k){var b=0;if(f!=""&&typeof f!="undefined"&&f!="initial"&&f!="initial-keep"){var l=window[f.parent().parent().parent().parent().attr("id")]}if(typeof k!="undefined"){var l=k}var n=0,g=0;for(var e=0;e<l.userSortFlags.length;e++){if(l.userSortFlags[e].flag===true){n++;for(var d=0;d<l.usersData.length;d++){if(l.userSortFlags[e]["id"]===l.usersData[d]["user_id"]){if(l.usersData[d]["finished"]==="finished"){g++}}}}}if(n===g&&n!=0){return}if(f===""){l.auto_trigger=true}else{l.auto_trigger=false}wdi_front.ajaxLoader(l);if(l.feed_row.feed_type==="masonry"&&l.feed_row.feed_display_view=="pagination"){jQuery("#wdi_feed_"+wdi_front.feed_counter+" .wdi_full_caption").each(function(){jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch)})}for(var e=0;e<l.usersData.length;e++){if(l.usersData[e]["finished"]==="finished"){b++}}if(b===l.usersData.length){wdi_front.allImagesLoaded(l);jQuery("#wdi_feed_"+l.feed_row["wdi_feed_counter"]+" .wdi_load_more").remove()}var h=l.usersData;l.loadMoreDataCount=l.feed_users.length;for(var e=0;e<h.length;e++){var m=h[e]["pagination"];var c={user_id:h[e]["user_id"],username:h[e]["username"]};if(m.next_url!=""&&m.next_url!=null&&typeof m.next_url!="undefined"){var a=m.next_url;wdi_front.loadMoreRequest(c,a,l,f)}else{if(f=="initial-keep"){l.temproraryUsersData[e]=l.usersData[e]}l.loadMoreDataCount--;wdi_front.checkForLoadMoreDone(l,f);continue}}};wdi_front.loadMoreRequest=function(b,a,e,d){if(!e.mediaRequestsDone){return}var f=e.usersData;var c="";e.instagram.requestByUrl(a,{success:function(g){if(typeof g.meta!="undefined"&&typeof g.meta.error_type!="undefined"){wdi_front.show_alert(false,g,e)}if(g===""||typeof g=="undefined"||g==null){c=wdi_front_messages.network_error;e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}if(g.meta["code"]!=200){c=g.meta["error_message"];e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}g.user_id=b.user_id;g.username=b.username;for(var h=0;h<e.usersData.length;h++){if(g.user_id===e.usersData[h]["user_id"]){if(g.user_id[0]==="#"){g.data=wdi_front.appendRequestHashtag(g.data,g.user_id)}if(d=="initial-keep"){e.temproraryUsersData[h]=e.usersData[h]}e.usersData[h]=g;e.loadMoreDataCount--}}wdi_front.checkForLoadMoreDone(e,d)}})};wdi_front.checkForLoadMoreDone=function(c,b){var a=c.feed_row.load_more_number;var e=c.feed_row.number_of_photos;if(c.loadMoreDataCount==0){c.temproraryUsersData=wdi_front.mergeData(c.temproraryUsersData,c.usersData);var d=wdi_front.getArrayContentLength(c.temproraryUsersData,"data");if(b=="initial-keep"){b="initial"}if(b=="initial"){if(d<e&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore("initial",c)}else{c.usersData=c.temproraryUsersData;wdi_front.displayFeed(c);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}else{if(d<a&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore(undefined,c)}else{c.usersData=c.temproraryUsersData;if(!wdi_front.activeUsersCount(c)){return}wdi_front.displayFeed(c,a);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}}};wdi_front.allDataHasFinished=function(b){var d=0;for(var a=0;a<b.dataStorageRaw.length;a++){if(b.dataStorageRaw[a].length()==0&&b.dataStorageRaw[a].locked==true){d++}}return(d==b.dataStorageRaw.length)};wdi_front.mergeData=function(c,b){for(var a=0;a<b.length;a++){if(typeof c[a]!="undefined"){if(b[a]["finished"]=="finished"){continue}if(typeof c[a]["pagination"]["next_max_id"]=="undefined"&&typeof c[a]["pagination"]["next_max_like_id"]=="undefined"){continue}c[a]["data"]=c[a]["data"].concat(b[a]["data"]);c[a]["pagination"]=b[a]["pagination"];c[a]["user_id"]=b[a]["user_id"];c[a]["username"]=b[a]["username"];c[a]["meta"]=b[a]["meta"]}else{c.push(b[a])}}return c};wdi_front.brokenImageHandler=function(a){a.src=wdi_url.plugin_url+"images/missing.png";a.onerror="";return true};wdi_front.ajaxLoader=function(a){var d=a.feed_row.wdi_feed_counter;var c=jQuery("#wdi_feed_"+d);if(a.feed_row.feed_display_view=="load_more_btn"){c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").removeClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){var b;if(c.find(".wdi_ajax_loading").length==0){b=jQuery('<div class="wdi_ajax_loading"><div><div><img class="wdi_load_more_spinner" src="'+wdi_url.plugin_url+'images/ajax_loader.png"></div></div></div>');c.append(b)}else{b=c.find(".wdi_ajax_loading")}b.removeClass("wdi_hidden")}};wdi_front.allImagesLoaded=function(a){var d=wdi_front.getDataLength(a);if(!a.mediaRequestsDone){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia")}if(d==0&&a.mediaRequestsDone&&(a.feed_row.conditional_filters.length==0||a.feed_row.conditional_filter_enable==0)){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>")}var c=a.feed_row.wdi_feed_counter;var b=jQuery("#wdi_feed_"+c);if(a.feed_row.feed_display_view=="load_more_btn"){b.find(".wdi_load_more").removeClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_ajax_loading").addClass("wdi_hidden")}b.trigger("wdi_feed_loaded")};wdi_front.show=function(b,c){var e=c.feed_row.wdi_feed_counter;var d=jQuery("#wdi_feed_"+e+" .wdi_feed_container");var g=this;switch(b){case"header":f();break;case"users":a(c);break}function f(){var i={feed_thumb:c.feed_row["feed_thumb"],feed_name:c.feed_row["feed_name"]};var k=wdi_front.getHeaderTemplate(),h=k(i),j=d.find(".wdi_feed_header").html();d.find(".wdi_feed_header").html(j+h)}function a(j){d.find(".wdi_feed_users").html("");var n=j.feed_users;var m=j.feed_row["access_token"];var h=0;j.headerUserinfo=[];k();function k(){if(j.headerUserinfo.length==n.length){l(j.headerUserinfo,j);return}var i=n[j.headerUserinfo.length];if(typeof i==="string"&&i==="self"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="hashtag"){j.instagram.searchForTagsByName(g.stripHashtag(i.username),{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false){if(o.data.length==0){var p="";var q={media:""}}else{var p="";var q={media:o.data[0]["media_count"]}}var r={name:n[h]["username"],url:p,counts:q};h++;j.headerUserinfo.push(r);k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="user"){j.instagram.getUserInfo(i.id,{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}}}}function l(i,t){d.find(".wdi_feed_users").html("");for(var q=0;q<i.length;q++){if(i[q]===null){continue}var u={flag:false,id:i[q]["id"],name:i[q]["name"]};var p=(i[q]["name"][0]=="#")?"wdi_header_hashtag":"";var o={user_index:q,user_img_url:i[q]["url"],counts:i[q]["counts"],feed_counter:t.feed_row.wdi_feed_counter,user_name:i[q]["name"],bio:i[q]["bio"],usersCount:t.feed_row.feed_users.length,hashtagClass:p};var w=wdi_front.getUserTemplate(t,i[q]["name"]),r=w(o),s=d.find(".wdi_feed_users").html();d.find(".wdi_feed_users").html(s+r);t.userSortFlags.push(u);var v=jQuery('<div class="wdi_clear"></div>')}d.find(".wdi_feed_users").append(v);wdi_front.updateUsersImages(t)}}};wdi_front.getUserTemplate=function(c,h){var a=c.dataCount,d,f,g;switch(h[0]){case"#":d="//instagram.com/explore/tags/"+h.substr(1,h.length);break;default:d="//instagram.com/"+h;break}g='window.open("'+d+'","_blank")';f="onclick='"+g+"'";var e='<div class="wdi_single_user" user_index="<%=user_index%>"><div class="wdi_header_user_text <%=hashtagClass%>"><div class="wdi_user_img_wrap"><img onerror="wdi_front.brokenImageHandler(this);" src="<%= user_img_url%>">';if(a>1){e+='<div title="'+wdi_front_messages.filter_title+'" class="wdi_filter_overlay"><div class="wdi_filter_icon"><span onclick="wdi_front.addFilter(<%=user_index%>,<%=feed_counter%>);" class="fa fa-filter"></span></div></div>'}e+="</div>";e+="<h3 "+f+"><%= user_name%></h3>";if(h[0]!=="#"){if(c.feed_row.follow_on_instagram_btn=="1"){e+='<div class="wdi_user_controls"><div class="wdi_follow_btn" onclick="window.open(\'//instagram.com/<%= user_name%>\',\'_blank\')"><span> '+wdi_front_messages.follow+"</span></div></div>"}e+='<div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span class="fa fa-user"><%= counts.followed_by%></span></p></div>'}else{e+='<div class="wdi_user_controls"></div><div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span></span></p></div>'}e+='<div class="wdi_clear"></div>';if(a==1&&h[0]!=="#"&&c.feed_row.display_user_info=="1"){e+='<div class="wdi_bio"><%= bio%></div>'}e+="</div></div>";var b=_.template(e);return b};wdi_front.getHeaderTemplate=function(){var b='<div class="wdi_header_wrapper"><div class="wdi_header_img_wrap"><img src="<%=feed_thumb%>"></div><div class="wdi_header_text"><%=feed_name%></div><div class="wdi_clear"></div>';var a=_.template(b);return a};wdi_front.addFilter=function(e,g){var f=window["wdi_feed_"+g];var d=f.dataCount;if(d<2){return}if(f.nowLoadingImages!=false){return}else{var c=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');c.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg");c.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col");c.find(".wdi_media_info").toggleClass("wdi_filter_active_col");c.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col");f.customFilterChanged=true;if(f.userSortFlags[e]["flag"]==false){f.userSortFlags[e]["flag"]=true}else{f.userSortFlags[e]["flag"]=false}var a=0;for(var b=0;b<f.userSortFlags.length;b++){if(f.userSortFlags[b]["flag"]==true){a++}}if(f.feed_row.feed_display_view=="pagination"){f.resIndex=0}if(a!=0){wdi_front.filterData(f);wdi_front.displayFeed(f)}else{f.customFilteredData=f.dataStorageList;wdi_front.displayFeed(f)}if(f.feed_row.feed_display_view=="pagination"){f.paginator=Math.ceil((f.imageIndex)/parseInt(f.feed_row.pagination_per_page_number));f.currentPage=f.paginator;wdi_front.updatePagination(f,"custom",1);jQuery("#wdi_first_page").removeClass("wdi_disabled");jQuery("#wdi_last_page").addClass("wdi_disabled")}}};wdi_front.filterData=function(c){var d=c.userSortFlags;c.customFilteredData=[];for(var b=0;b<c.dataStorageList.length;b++){for(var a=0;a<d.length;a++){if((c.dataStorageList[b]["user"]["id"]==d[a]["id"]||c.dataStorageList[b]["wdi_hashtag"]==d[a]["name"])&&d[a]["flag"]==true){c.customFilteredData.push(c.dataStorageList[b])}}}};wdi_front.applyFilters=function(c){for(var b=0;b<c.userSortFlags.length;b++){if(c.userSortFlags[b]["flag"]==true){var a=jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter+'[user_index="'+b+'"]');wdi_front.addFilter(b,c.feed_row.wdi_feed_counter);wdi_front.addFilter(b,c.feed_row.wdi_feed_counter)}}};wdi_front.getImgCount=function(b){var d=b.dataStorage;var c=0;for(var a=0;a<d.length;a++){c+=d[a].length}return c};wdi_front.parseLighboxData=function(k,m){var g=k.dataStorage;var l=k.feed_row.sort_images_by;var a=k.feed_row.display_order;var h=wdi_front.sortingOperator(l,a);var f=[];var b=[];var e={};if(m==true){f=k.customFilteredData}else{for(var d=0;d<g.length;d++){for(var c=0;c<g[d].length;c++){f.push(g[d][c])}}f.sort(h)}for(d=0;d<f.length;d++){e={alt:"",avg_rating:"",comment_count:f[d]["comments"]["count"],date:wdi_front.convertUnixDate(f[d]["created_time"]),description:wdi_front.getDescription((f[d]["caption"]!==null)?f[d]["caption"]["text"]:""),filename:wdi_front.getFileName(f[d]),filetype:wdi_front.getFileType(f[d]),hit_count:"0",id:f[d]["id"],image_url:f[d]["link"],number:0,rate:"",rate_count:"0",username:f[d]["user"]["username"],profile_picture:f[d]["user"]["profile_picture"],thumb_url:f[d]["link"]+"media/?size=t",comments_data:f[d]["comments"]["data"],images:f[d]["images"],carousel_media:(typeof f[d]["carousel_media"]!=="undefined")?f[d]["carousel_media"]:null};b.push(e)}return b};wdi_front.convertUnixDate=function(b){var c=parseInt(b);var a=new Date(0);a.setUTCSeconds(c);var d=a.getFullYear()+"-"+a.getMonth()+"-"+a.getDate();d+=" "+a.getHours()+":"+a.getMinutes();return d};wdi_front.getDescription=function(a){a=a.replace(/\r?\n|\r/g," ");return a};wdi_front.getFileName=function(d){var c=d.link;var b=d.type;if(b==="video"&&d.hasOwnProperty("videos")){return d.videos["standard_resolution"]["url"]}else{var a=c.split("/");return a[a.length-2]}};wdi_front.getFileType=function(a){if(a.type=="video"&&a.hasOwnProperty("videos")){return"EMBED_OEMBED_INSTAGRAM_VIDEO"}else{return"EMBED_OEMBED_INSTAGRAM_IMAGE"}};wdi_front.array_max=function(d){var a=d[0];var b=0;for(var c=1;c<d.length;c++){if(a<d[c]){a=d[c];b=c}}return{value:a,index:b}};wdi_front.array_min=function(d){var c=d[0];var a=0;for(var b=1;b<d.length;b++){if(c>d[b]){c=d[b];a=b}}return{value:c,index:a}};wdi_front.activeUsersCount=function(c){var a=0;for(var b=0;b<c.usersData.length;b++){if(c.usersData[b].finished!="finished"){a++}}return a};wdi_front.checkMediaResponse=function(a,b){if(a!=""&&typeof a!="undefined"&&a!=null&&a.meta["code"]===400&&a.meta["error_type"]==="APINotAllowedError"){return a}if(a==""||typeof a=="undefined"||a==null){errorMessage=a.meta["error_message"];wdi_front.show_alert(errorMessage,a,b);return false}return a};wdi_front.stripHashtag=function(a){switch(a[0]){case"#":return a.substr(1,a.length);break;default:return a;break}};wdi_front.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_front.regexpTestCaption=function(h,e){var d=false,b=false,f=[],g=e.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&"),c=new RegExp("(?:^|\\s)"+g+"(?:^|\\s)"),a=new RegExp("(?:^|\\s)"+g,"g");if(c.exec(h)!=null){d=true}while((match=a.exec(h))!=null){if(match.index==h.length-e.length-1){b=true}}if(d==true||b==true){return true}else{return false}};wdi_front.replaceNewLines=function(c){var b="vUkCJvN2ps3t",a=[],g;c=c.replace(/\r?\n|\r/g,b);g=new RegExp(b,"g");while((match=g.exec(c))!=null){a.push(match.index)}var f=c.split(b);var e=0;for(var d=0;d<f.length;d++){if(f[d]==""){e++}else{e=0}if(e>0){f.splice(d,1);e--;d--}}c=f.join(" ");return c};wdi_front.isEmptyObject=function(a){for(var b in a){if(a.hasOwnProperty(b)){return false}}return true};var WDIFeed=function(a){this["data"]=a.data;this["dataCount"]=a.dataCount;this["feed_row"]=a.feed_row;this["usersData"]=a.usersData;_this=this;this.set_images_loading_flag=function(b){window.addEventListener("load",function(){b.nowLoadingImages=false})};this.set_images_loading_flag(_this)};WDIFeed.prototype.conditionalFilter=function(a,c){var d=this,b=d.feed_row.conditional_filter_type,e=d.feed_row.conditional_filters;if(c.ignoreFiltering==true){}else{a=this.avoidDuplicateMedia(a)}if(!wdi_front.isJsonString(e)){return a}else{e=JSON.parse(e);if(e.length==0){return a}}if(d.feed_row.conditional_filter_enable=="0"){return a}d.instagramRequestCounter++;switch(b){case"AND":a=this.applyANDLogic(a,e,d);break;case"OR":a=this.applyORLogic(a,e,d);break;case"NOR":a=this.applyNORLogic(a,e,d);break;default:break}return a};WDIFeed.prototype.applyANDLogic=function(a,d){var c=this;for(var b=0;b<d.length;b++){a=this.filterResponse(a,d[b])}return a};WDIFeed.prototype.applyORLogic=function(d,c){var h=this;var a=[],g,j=[],f,b;for(var e=0;e<c.length;e++){g=this.filterResponse(d,c[e]);a=a.concat(g.data);g={}}for(e=0;e<a.length;e++){b=a[e];if(!this.mediaExists(b,j)&&!this.mediaExists(b,h.dataStorageList)){j.push(b)}}f={data:j,meta:d.meta,pagination:d.pagination};return f};WDIFeed.prototype.applyNORLogic=function(c,h){var f=c,g=this,b=this.applyORLogic(c,h,g),d=[],a;for(var e=0;e<f.data.length;e++){if(!this.mediaExists(f.data[e],b.data)){d.push(f.data[e])}}a={data:d,meta:f.meta,pagination:f.pagination};return a};WDIFeed.prototype.mediaExists=function(b,c){for(var a=0;a<c.length;a++){if(b.id==c[a]["id"]){return true}}return false};WDIFeed.prototype.filterResponse=function(a,b){switch(b.filter_type){case"hashtag":return this.filterByHashtag(a,b);break;case"username":return this.filterByUsername(a,b);break;case"mention":return this.filterByMention(a,b);break;case"description":return this.filterByDescription(a,b);break;case"location":return this.filterByLocation(a,b);break;case"url":return this.filterByUrl(a,b);break}};WDIFeed.prototype.filterByHashtag=function(b,g){var d=[],f,h,a;for(var e=0;e<b.data.length;e++){h=b.data[e];for(var c=0;c<h.tags.length;c++){tag=h.tags[c];if(tag.toLowerCase()==g.filter_by.toLowerCase()){d.push(h)}}}a={data:d,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByUsername=function(b,e){var c=[],f,a;for(var d=0;d<b.data.length;d++){f=b.data[d];if(f.user.username.toLowerCase()==e.filter_by.toLowerCase()){c.push(f)}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByMention=function(b,e){var c=[],f,g,a;for(var d=0;d<b.data.length;d++){f=b.data[d];if(f.caption!==null){g=f.caption["text"].toLowerCase();if(g.indexOf("@"+e.filter_by.toLowerCase())!=-1){c.push(f)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByDescription=function(c,f){var d=[],g,h,b;for(var e=0;e<c.data.length;e++){g=c.data[e];if(g.caption!==null){h=g.caption["text"].toLowerCase();h=wdi_front.replaceNewLines(h);var a=f.filter_by.toLowerCase();if(wdi_front.regexpTestCaption(h,a)){d.push(g)}}}b={data:d,meta:c.meta,pagination:c.pagination};return b};WDIFeed.prototype.filterByLocation=function(b,f){var c=[],g,e,a;for(var d=0;d<b.data.length;d++){g=b.data[d];if(g.location!==null){e=g.location["id"];if(e==f.filter_by){c.push(g)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByUrl=function(b,e){var c=[],g,h,a,f;e.filter_by=this.getIdFromUrl(e.filter_by);for(var d=0;d<b.data.length;d++){g=b.data[d];if(g.link!==null){h=this.getIdFromUrl(g.link);if(h==e.filter_by){c.push(g)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.getIdFromUrl=function(a){var c=a.split("/"),d=false;for(var b=0;b<c.length;b++){if(c[b]=="p"){if(typeof c[b+1]!="undefined"){d=c[b+1];break}}}return d};WDIFeed.prototype.avoidDuplicateMedia=function(b){var e=b.data,d=[],a={};if(typeof e=="undefined"){e=[]}for(var c=0;c<e.length;c++){if(!this.mediaExists(e[c],this.dataStorageList)&&!this.mediaExists(e[c],d)&&!this.mediaExists(e[c],this.conditionalFilterBuffer)){d.push(e[c])}}this.conditionalFilterBuffer=this.conditionalFilterBuffer.concat(d);a={data:d,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.storeRawData=function(c,a){var e=this;if(typeof this[a]=="object"&&typeof this[a].length=="number"){for(var b=0;b<c.length;b++){var d="";if(wdi_front.isHashtag(c[b].user_id)){d=c[b].pagination.next_max_tag_id}else{if(e.feed_row.liked_feed=="liked"){d=c[b].pagination.next_max_like_id;if(typeof d=="undefined"){d=""}}else{if(c[b].pagination==null){c[b].pagination=[]}d=c[b].pagination.next_max_id;if(typeof d=="undefined"){d=""}}}if(typeof this[a][b]=="undefined"){this[a].push({data:c[b].data,index:0,locked:false,hash_id:d,usersDataFinished:false,userId:c[b].user_id,length:function(){return this.data.length-this.index},getData:function(g){var h=this.data.slice(this.index,this.index+g);this.index+=Math.min(g,this.length());if(this.index==this.data.length&&this.locked==true&&this.usersDataFinished==false){for(var f=0;f<e.usersData.length;f++){if(e.usersData[f]["user_id"]==this.userId){e.usersData[f].finished="finished";this.usersDataFinished=true;break}}}return h}})}else{if(this[a][b].locked==false){if(d!=this[a][b].hash_id){this[a][b].data=this[a][b].data.concat(c[b].data);this[a][b].hash_id=d}else{this[a][b].locked=true}}}}}};wdi_front.updateUsersIfNecessary=function(c){var d=c.feed_users;var a=false;for(var b=0;b<d.length;b++){if("#"==d[b].username.substr(0,1)){d[b].id=d[b].username;continue}if(""==d[b].id||"username"==d[b].id){a=true;c.instagram.searchForUsersByName(d[b].username,{success:function(i){if(typeof i.meta!="undefined"&&typeof i.meta.error_type!="undefined"){wdi_front.show_alert(false,i,c)}if(i.meta.code==200&&i.data.length>0){var l=false;for(var g=0;g<i.data.length;g++){if(i.data[g].username==i.args.username){l=true;break}}if(l){for(var h=0;h<d.length;h++){if(i.data[g].username==d[h].username){d[h].id=i.data[g].id}}}}var f=false;for(var e=0;e<d.length;e++){if(d[e].id==""||d[e].id=="username"){f=true;break}}if(!f){c.feed_row.feed_users=JSON.stringify(d);wdi_front.init(c)}},username:d[b].username})}}return a};if(typeof wdi_ajax.ajax_response!="undefined"){jQuery(document).one("ajaxStop",function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})}else{jQuery(document).ready(function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})};
1
+ if(typeof wdi_front=="undefined"){wdi_front={type:"not_declared"}}wdi_front.detectEvent=function(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));if(a){return"touchend"}else{return"click"}};var wdi_error_show=false;wdi_front.show_alert=function(e,b,f){f=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter);if(b.meta["code"]===400&&b.meta["error_type"]==="APINotAllowedError"){if(typeof b.wdi_current_feed_name!="undefined"){var a=b.wdi_current_feed_name;var d=f.find(".wdi_private_feed_names");d.html(a);f.find(".wdi_private_feed_error").removeClass("wdi_hidden")}f.find(".wdi_spinner").remove()}if(typeof f!="undefined"&&b.meta["error_type"]!="APINotAllowedError"){f.find(".wdi_spinner").remove();wdi_error_show=true;var c=f.find(".wdi_js_error");var g=f.find(".wdi_token_error");if(b!=false&&typeof b.meta!=undefined&&b.meta.error_type==="OAuthAccessTokenException"){g.removeClass("wdi_hidden");if(wdi_front_messages.wdi_token_error_flag!="1"){jQuery.ajax({type:"POST",url:wdi_url.ajax_url,dataType:"json",data:{action:"wdi_token_flag",wdi_token_flag_nonce:wdi_front_messages.wdi_token_flag_nonce},success:function(h){}})}}else{c.removeClass("wdi_js_error");c.addClass("wdi_js_error_no_animate");jQuery(".wdi_js_error_no_animate").show()}if(wdi_front_messages.show_alerts){}else{console.log("%c"+e,"color:#cc0000;")}}wdi_error_show=true};wdi_front.globalInit=function(){var a=wdi_front.feed_counter;if(typeof wdi_ajax.ajax_response!="undefined"){var c=wdi_feed_counter_init.wdi_feed_counter_init}else{var c=0}for(var b=c;b<=a;b++){if(jQuery("#wdi_feed_"+b).length===0){continue}var d=new WDIFeed(window["wdi_feed_"+b]);d.instagram=new WDIInstagram();d.instagram.filterArguments={feed:d};d.instagram.filters=[{where:"getUserRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getTagRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getRecentLikedMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"requestByUrl",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}}];d.instagram.addToken(d.feed_row["access_token"]);wdi_front.access_token=d.feed_row["access_token"];d.dataStorageRaw=[];d.dataStorage=[];d.dataStorageList=[];d.allResponseLength=0;d.currentResponseLength=0;d.temproraryUsersData=[];d.removedUsers=0;d.nowLoadingImages=true;d.imageIndex=0;d.resIndex=0;d.currentPage=1;d.userSortFlags=[];d.customFilterChanged=false;d.maxConditionalFiltersRequestCount=10;d.instagramRequestCounter=0;d.mediaRequestsDone=false;d.conditionalFilterBuffer=[];d.stopInfiniteScrollFlag=false;if(d.feed_row.feed_type=="masonry"){d.displayedData=[]}if(d.feed_row.feed_display_view=="pagination"){d.feed_row.resort_after_load_more=0;if(d.feed_row.feed_type!="image_browser"){d.feed_row.load_more_number=parseInt(d.feed_row.pagination_per_page_number);d.feed_row.number_of_photos=(1+parseInt(d.feed_row.pagination_preload_number))*d.feed_row.load_more_number}else{d.feed_row.number_of_photos=1+parseInt(d.feed_row.image_browser_preload_number);d.feed_row.load_more_number=parseInt(d.feed_row.image_browser_load_number)}d.freeSpaces=(Math.floor(d.feed_row.pagination_per_page_number/d.feed_row.number_of_columns)+1)*d.feed_row.number_of_columns-d.feed_row.pagination_per_page_number}else{d.freeSpaces=0}d.galleryBox=function(e){wdi_spider_createpopup(wdi_url.ajax_url+"?gallery_id="+this.feed_row.id+"&image_id="+e,this.feed_row.wdi_feed_counter,this.feed_row.lightbox_width,this.feed_row.lightbox_height,1,"testpopup",5,this,e)};wdi_responsive.columnControl(d);if(d.feed_row.feed_type=="masonry"){jQuery(window).trigger("resize")}wdi_front.bindEvents(d);window["wdi_feed_"+b]=d;wdi_front.init(d)}};wdi_front.init=function(c){jQuery(".wdi_js_error").hide();c.photoCounter=c.feed_row.number_of_photos;if(c.feed_row.liked_feed=="liked"){c.feed_users=["self"]}else{if(wdi_front.isJsonString(c.feed_row.feed_users)){c.feed_users=JSON.parse(c.feed_row.feed_users)}else{wdi_front.show_alert(wdi_front_messages.invalid_users_format,false,c);return}}c.dataCount=c.feed_users.length;var a=wdi_front.getFeedItemResolution(c);c.feedImageResolution=a.image;c.feedVideoResolution=a.video;for(var b=0;b<c.dataCount;b++){wdi_front.instagramRequest(b,c)}if(c.feed_row.number_of_photos>0){wdi_front.ajaxLoader(c)}if(c.feed_row["display_header"]==="1"){wdi_front.show("header",c)}if(c.feed_row["show_usernames"]==="1"){wdi_front.show("users",c)}};wdi_front.getFeedItemResolution=function(g){var d={image:"standard_resolution",video:"standard_resolution"};if(g.feed_row.feed_resolution==="thumbnail"){return{image:"thumbnail",video:"low_bandwidth"}}else{if(g.feed_row.feed_resolution==="low"){return{image:"low_resolution",video:"low_resolution"}}else{if(g.feed_row.feed_resolution==="standard"){return{image:"standard_resolution",video:"standard_resolution"}}}}var c=jQuery("#wdi_feed_"+g.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");c.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>');wdi_responsive.columnControl(g,1);var b=c.attr("wdi-res").split("wdi_col_");c.find("#wdi_feed_item_example").remove();if(b.length!==2){return d}var a=parseInt(b[1]);if(a<=0){return d}var f=(c.width()/a)-10;var e=d;if(f<=150){e.image="thumbnail";e.video="low_bandwidth"}else{if(f>150&&f<=320){e.image="low_resolution";e.video="low_resolution"}else{e.image="standard_resolution";e.video="standard_resolution"}}return e};wdi_front.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};wdi_front.instagramRequest=function(d,b){var a=b.feed_users,c=this;if(typeof a[d]==="string"&&a[d]==="self"){b.instagram.getRecentLikedMedia({success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveSelfUserData(e,b)}}})}else{if(this.getInputType(a[d]["username"])=="hashtag"){b.instagram.getTagRecentMedia(this.stripHashtag(a[d]["username"]),{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}else{if(this.getInputType(a[d]["username"])=="user"){b.instagram.getUserRecentMedia(a[d]["id"],{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){e.wdi_current_feed_name=a[d].username;wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}});b.instagram.getSelfRecentMedia({success:function(e){;if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){e.wdi_current_feed_name=a[d].username;wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}}}};wdi_front.isHashtag=function(a){return(a[0]==="#")};wdi_front.saveUserData=function(d,a,b){d.username=a.username;d.user_id=a.id;if(d.user_id[0]==="#"){d.data=wdi_front.appendRequestHashtag(d.data,d.user_id)}b.usersData.push(d);b.currentResponseLength=wdi_front.getArrayContentLength(b.usersData,"data");b.allResponseLength+=b.currentResponseLength;if(b.dataCount==b.usersData.length){if(b.currentResponseLength<b.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(b)){wdi_front.loadMore("initial-keep",b)}else{wdi_front.displayFeed(b);wdi_front.applyFilters(b);if(!wdi_front.activeUsersCount(b)){if(b.feed_row.feed_display_view=="load_more_btn"){var c=jQuery("#wdi_feed_"+b.feed_row.wdi_feed_counter);c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.saveSelfUserData=function(c,a){c.username="";c.user_id="";a.usersData.push(c);a.currentResponseLength=wdi_front.getArrayContentLength(a.usersData,"data");a.allResponseLength+=a.currentResponseLength;if(a.dataCount==a.usersData.length){if(a.currentResponseLength<a.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(a)){wdi_front.loadMore("initial-keep",a)}else{wdi_front.displayFeed(a);wdi_front.applyFilters(a);if(!wdi_front.activeUsersCount(a)){if(a.feed_row.feed_display_view=="load_more_btn"){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter);b.find(".wdi_load_more").addClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.userHasNoPhoto=function(c,e){var a=0;var d=c.usersData;if(typeof e!="undefined"){d=e}for(var b=0;b<d.length;b++){if(typeof d[b]["pagination"]=="undefined"){d[b]["pagination"]=[]}if(c.feed_row.liked_feed==="liked"){if(typeof d[b]["pagination"]["next_max_like_id"]=="undefined"){a++}}else{if(typeof d[b]["pagination"]["next_max_id"]=="undefined"){a++}}}if(a==d.length){return 1}else{return 0}};wdi_front.appendRequestHashtag=function(c,b){for(var a=0;a<c.length;a++){c[a]["wdi_hashtag"]=b}return c};wdi_front.displayFeed=function(c,b){if(c.customFilterChanged==false){var d=wdi_front.feedSort(c,b)}var a=c.customFilterChanged;if(c.customFilterChanged==true){var d=c.customFilteredData;c.parsedData=wdi_front.parseLighboxData(c,true)}if(c.feed_row.resort_after_load_more!="1"){if(c.customFilterChanged==false){c.dataStorageList=c.dataStorageList.concat(d)}}else{if(c.customFilterChanged==false){c.dataStorageList=d}}if(c.feed_row.feed_type=="masonry"){wdi_front.masonryDisplayFeedItems(d,c)}if(c.feed_row.feed_type=="thumbnails"||c.feed_row.feed_type=="blog_style"||c.feed_row.feed_type=="image_browser"){wdi_front.displayFeedItems(d,c)}var e=wdi_front.getDataLength(c);if(e<c.photoCounter&&!a&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount&&!wdi_front.allDataHasFinished(c)){wdi_front.loadMore("",c)}else{wdi_front.allImagesLoaded(c)}if(c.instagramRequestCounter>c.maxConditionalFiltersRequestCount){wdi_front.allImagesLoaded(c);if(d.length==0){c.stopInfiniteScrollFlag=true}}if(c.feed_row.feed_display_view=="pagination"&&c.currentPage<c.paginator){jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter).find("#wdi_last_page").removeClass("wdi_disabled")}c.instagramRequestCounter=0;c.conditionalFilterBuffer=[];wdi_front.updateUsersImages(c)};wdi_front.updateUsersImages=function(a){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter).find(".wdi_single_user .wdi_user_img_wrap img");b.each(function(){if(jQuery(this).attr("src")==wdi_url.plugin_url+"images/missing.png"||jQuery(this).attr("src")==""){if(a.feed_row.liked_feed=="liked"){return}for(var c=0;c<a.usersData.length;c++){if(a.usersData[c]["username"]==jQuery(this).parent().parent().find("h3").text()){if(a.usersData[c]["data"].length!=0){jQuery(this).attr("src",a.usersData[c]["data"][0]["images"]["thumbnail"]["url"])}}}}})};wdi_front.masonryDisplayFeedItems=function(d,h){var b=[];var p=[];if(jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_masonry_column").each(function(){if(h.feed_row.resort_after_load_more==1){jQuery(this).html("");h.imageIndex=0}if(h.customFilterChanged==true){jQuery(this).html("");h.imageIndex=0}if(h.feed_row.feed_display_view=="pagination"){b.push(0)}else{b.push(jQuery(this).height())}p.push(jQuery(this))});if(h.customFilterChanged==true){h.customFilterChanged=false}for(var e=0;e<d.length;e++){h.displayedData.push(d[e]);if(d[e]["type"]=="image"){var n=wdi_front.getPhotoTemplate(h)}else{if(d[e].hasOwnProperty("videos")){var n=wdi_front.getVideoTemplate(h)}else{var n=wdi_front.getSliderTemplate(h)}}var g=d[e];var o=wdi_front.createObject(g,h);var f=n(o);var m=wdi_front.array_min(b);var l=wdi_front.getImageResolution(d[e]);p[m.index].html(p[m.index].html()+f);b[m.index]+=p[m.index].width()*l;h.imageIndex++;if(h.feed_row.feed_display_view=="pagination"){if((e+1)%h.feed_row.pagination_per_page_number===0){h.resIndex+=h.freeSpaces+1}else{h.resIndex++}}}h.wdi_loadedImages=0;var j=false;h.wdi_load_count=e;var a=h.feed_row.wdi_feed_counter;var k=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){h.wdi_loadedImages++;c();if(j===false){wdi_responsive.columnControl(h,1);j=true}});c();function c(){if(h.wdi_load_count===h.wdi_loadedImages&&h.wdi_loadedImages!=0){h.loadedImages=0;h.wdi_load_count=0;wdi_front.allImagesLoaded(h)}}if(h.paginatorNextFlag==true){wdi_front.updatePagination(h,"next")}h.infiniteScrollFlag=false};wdi_front.getImageResolution=function(c){var d=c.images["standard_resolution"]["width"];var b=c.images["standard_resolution"]["height"];var a=b/d;return a};wdi_front.getDataLength=function(b,d){var c=0;if(typeof d==="undefined"){for(var a=0;a<b.dataStorage.length;a++){c+=b.dataStorage[a].length}}else{for(var a=0;a<d.length;a++){c+=d[a].length}}return c};wdi_front.getArrayContentLength=function(d,c){var b=0;for(var a=0;a<d.length;a++){if(d[a]["finished"]=="finished"){continue}b+=d[a][c].length}return b};wdi_front.displayFeedItems=function(d,j){if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" .wdi_feed_wrapper");if(j.feed_row.resort_after_load_more==="1"){l.html("");j.imageIndex=0}if(j.customFilterChanged==true){l.html("");j.imageIndex=0;j.customFilterChanged=false}var g=wdi_front.getImgCount(j)-d.length-1;if(j.feed_row.feed_display_view=="pagination"){var b=j.feed_row.load_more_number;if(j.feed_row.feed_type=="image_browser"){b=1}if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+' [wdi_page="'+(j.currentPage-1)+'"]').length<b||d.length==0){j.currentPage=(--j.currentPage<=1)?1:j.currentPage}}for(var e=0;e<d.length;e++){if(d[e]["type"]=="image"){var m=wdi_front.getPhotoTemplate(j)}else{if(d[e].hasOwnProperty("videos")){var m=wdi_front.getVideoTemplate(j)}else{var m=wdi_front.getSliderTemplate(j)}}var h=d[e];var n=wdi_front.createObject(h,j);var f=m(n);l.html(l.html()+f);j.imageIndex++;if(j.feed_row.feed_display_view=="pagination"){if((e+1)%j.feed_row.pagination_per_page_number===0){j.resIndex+=j.freeSpaces+1}else{j.resIndex++}}}j.wdi_loadedImages=0;var k=false;j.wdi_load_count=e;var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){j.wdi_loadedImages++;c();if(k===false){wdi_responsive.columnControl(j,1);k=true}});function c(){if(j.wdi_load_count===j.wdi_loadedImages&&j.wdi_loadedImages!=0){j.loadedImages=0;j.wdi_load_count=0;wdi_front.allImagesLoaded(j)}}if(j.paginatorNextFlag==true){wdi_front.updatePagination(j,"next")}j.infiniteScrollFlag=false};wdi_front.checkFeedFinished=function(b){for(var a=0;a<b.usersData.length;a++){if(typeof b.usersData[a]["finished"]=="undefined"){return false}}return true};wdi_front.sortingOperator=function(c,b){var a;switch(c){case"date":switch(b){case"asc":a=function(e,d){return(e.created_time>d.created_time)?1:-1};break;case"desc":a=function(e,d){return(e.created_time>d.created_time)?-1:1};break}break;case"likes":switch(b){case"asc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?-1:1};break;case"desc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?1:-1};break}break;case"comments":switch(b){case"asc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?-1:1};break;case"desc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?1:-1};break}break;case"random":a=function(e,d){var f=Math.random();return(f>0.5)?1:-1};break}return a};wdi_front.feedSort=function(e,b){var d=e.feed_row.sort_images_by;var c=e.feed_row.display_order;if(e.feed_row.resort_after_load_more==="1"){e.data=e.data.concat(wdi_front.smartPicker(e,b))}else{e.data=wdi_front.smartPicker(e,b)}var a=wdi_front.sortingOperator(d,c);e.data.sort(a);return e.data};wdi_front.smartPicker=function(l,c){var g=[];var a=0;var k=[];var f=Math.ceil(l.feed_row["number_of_photos"]/l.usersData.length);var b=parseInt(l.feed_row["number_of_photos"]);var n=0;if(c!=""&&typeof c!="undefined"&&c!=null){b=parseInt(c);f=Math.ceil(b/wdi_front.activeUsersCount(l))}var j=function(p,i){return(p.data.length>i.data.length)?1:-1};var e=function(p,i){return(p.length()>i.length())?1:-1};l.storeRawData(l.usersData,"dataStorageRaw");var o=l.dataStorageRaw.sort(e);var h=l.usersData.sort(j);for(var d=0;d<h.length;d++){n+=f;if(o[d].length()<=n){n-=o[d].length();g.push(o[d].getData(o[d].length()));a+=g[g.length-1].length}else{if(a+n>b){n=b-a}var m=[];if(l.auto_trigger===false){m=m.concat(o[d].getData(n))}else{if(m.length+wdi_front.getDataLength(l)+wdi_front.getDataLength(l,g)<l.feed_row["number_of_photos"]){m=m.concat(o[d].getData(n))}}n=0;a+=m.length;g.push(m)}}for(d=0;d<g.length;d++){if(typeof l.dataStorage[d]==="undefined"){l.dataStorage.push(g[d])}else{l.dataStorage[d]=l.dataStorage[d].concat(g[d])}}l.parsedData=wdi_front.parseLighboxData(l);for(d=0;d<g.length;d++){k=k.concat(g[d])}return k};wdi_front.createObject=function(e,h){var j=(e.caption!=null)?e.caption["text"]:"&nbsp";var i="";if(e.type=="video"){i=e.hasOwnProperty("videos")?e.videos[h.feedVideoResolution]["url"]:""}var f=e.images[h.feedImageResolution].url;var a=h.imageIndex;var b="square";var d=e.images["standard_resolution"]["height"];var g=e.images["standard_resolution"]["width"];if(d>g){b="portrait"}else{if(d<g){b="landscape"}}var c={id:e.id,caption:j,image_url:f,likes:e.likes["count"],comments:e.comments["count"],wdi_index:a,wdi_res_index:h.resIndex,wdi_media_user:e.user["username"],link:e.link,video_url:i,wdi_username:e.user["username"],wdi_shape:b};return c};wdi_front.setPage=function(c){var b=c.feed_row.feed_display_view;var e=c.feed_row.feed_type;if(b!="pagination"){return""}var a=c.imageIndex;if(e=="image_browser"){var d=1}else{var d=Math.abs(c.feed_row.pagination_per_page_number)}c.paginator=Math.ceil((a+1)/d);return c.paginator};wdi_front.getPhotoTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-arrows-alt";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o">&nbsp;<%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o">&nbsp;<%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+f+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var i=_.template(a);return i};wdi_front.getSliderTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-clone";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="fa-clone";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="slideshow" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o">&nbsp;<%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o">&nbsp;<%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+f+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var i=_.template(a);return i};wdi_front.replaceToVideo=function(b,a,c){overlayHtml="<video style='width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;' controls=''><source src='"+b+"' type='video/mp4'>Your browser does not support the video tag. </video>";jQuery("#wdi_feed_"+c+' [wdi_index="'+a+'"] .wdi_photo_wrap_inner').html(overlayHtml);jQuery("#wdi_feed_"+c+' [wdi_index="'+a+'"] .wdi_photo_wrap_inner video').get(0).play()};wdi_front.getVideoTemplate=function(h){var f=wdi_front.setPage(h);var k="";var l="";var n="fa-play";var m="";var d="";var e;var c="";if(f!=""){l='wdi_page="'+f+'"';e="src"}else{e="src"}if(f!=""&&f!=1){k="wdi_hidden"}if(h.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(h.feed_row.show_full_description==1&&h.feed_row.feed_type=="masonry"){k+=" wdi_full_caption"}var g="";if(h.feed_row.feed_type!=="blog_style"){if(h.feed_row.feed_type=="masonry"){g="wdi_responsive.showMasonryCaption(jQuery(this),"+h.feed_row.wdi_feed_counter+");"}else{g="wdi_responsive.showCaption(jQuery(this),"+h.feed_row.wdi_feed_counter+");"}}switch(h.feed_row.feed_item_onclick){case"lightbox":m="onclick=wdi_feed_"+h.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":m="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";n="fa-play";break;case"custom_redirect":m="onclick=\"window.open ('"+h.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";n="";break;case"none":d="wdi_cursor_off wdi_hover_off";n="";if(h.feed_row.feed_type=="blog_style"||h.feed_row.feed_type=="image_browser"){m="onclick=wdi_front.replaceToVideo('<%= video_url%>','<%= wdi_index%>',"+h.feed_row.wdi_feed_counter+")";d="";n="fa-play"}}var i="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=h.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+k+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+l+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+i+'"><img class="wdi_img" '+e+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" '+m+">"+c+'<div class="wdi_thumb_icon" style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+n+'"></i></div></div></div></div></div></div>';if(h.feed_row["show_likes"]==="1"||h.feed_row["show_comments"]==="1"||h.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(h.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o">&nbsp;<%= likes%></i></div>'}if(h.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o">&nbsp;<%= comments%></i></div>'}a+='<div class="wdi_clear"></div>';if(h.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_title" onclick='+g+" ><%=caption%></div>"}a+="</div>"}a+="</div>";var j=_.template(a);return j};wdi_front.bindEvents=function(a){if(jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}if(a.feed_row.feed_display_view=="load_more_btn"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_load_more_container").on(wdi_front.clickOrTouch,function(){wdi_front.loadMore(jQuery(this).find(".wdi_load_more_wrap"))})}if(a.feed_row.feed_display_view=="pagination"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_next").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorNext(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_prev").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorPrev(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_last_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationLastPage(jQuery(this),a)});jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_first_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationFirstPage(jQuery(this),a)});a.paginatorNextFlag=false}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery(window).on("scroll",function(){wdi_front.infiniteScroll(a)});a.infiniteScrollFlag=false}};wdi_front.infiniteScroll=function(a){if((jQuery(window).scrollTop()+jQuery(window).height()-100)>=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_infinite_scroll").offset().top){if(a.infiniteScrollFlag===false&&a.stopInfiniteScrollFlag==false){a.infiniteScrollFlag=true;wdi_front.loadMore(jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" #wdi_infinite_scroll"),a)}else{if(a.stopInfiniteScrollFlag){wdi_front.allImagesLoaded(a)}}}};wdi_front.paginationFirstPage=function(b,c){if(c.paginator==1||c.currentPage==1){b.addClass("wdi_disabled");return}var d=c.currentPage;c.currentPage=1;wdi_front.updatePagination(c,"custom",d);var a=b.parent().find("#wdi_last_page");a.removeClass("wdi_disabled");b.addClass("wdi_disabled")};wdi_front.paginationLastPage=function(a,b){if(b.paginator==1||b.currentPage==b.paginator){return}var d=b.currentPage;b.currentPage=b.paginator;wdi_front.updatePagination(b,"custom",d);a.addClass("wdi_disabled");var c=a.parent().find("#wdi_first_page");c.removeClass("wdi_disabled")};wdi_front.paginatorNext=function(b,c){var a=b.parent().find("#wdi_last_page");var d=b.parent().find("#wdi_first_page");c.paginatorNextFlag=true;if(c.paginator==c.currentPage&&!wdi_front.checkFeedFinished(c)){c.currentPage++;var e=c.feed_row.number_of_photos;wdi_front.loadMore(b,c,e);a.addClass("wdi_disabled")}else{if(c.paginator>c.currentPage){c.currentPage++;wdi_front.updatePagination(c,"next");if(c.paginator>c.currentPage){a.removeClass("wdi_disabled")}else{a.addClass("wdi_disabled")}}}d.removeClass("wdi_disabled")};wdi_front.paginatorPrev=function(b,c){var a=b.parent().find("#wdi_last_page");var d=b.parent().find("#wdi_first_page");if(c.currentPage==1){d.addClass("wdi_disabled");return}c.currentPage--;wdi_front.updatePagination(c,"prev");a.removeClass("wdi_disabled");if(c.currentPage==1){d.addClass("wdi_disabled")}};wdi_front.updatePagination=function(b,a,d){var c="#wdi_feed_"+b.feed_row.wdi_feed_counter;jQuery(c+' [wdi_page="'+b.currentPage+'"]').each(function(){jQuery(this).removeClass("wdi_hidden")});switch(a){case"next":var d=b.currentPage-1;jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"prev":var d=b.currentPage+1;jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"custom":var d=d;if(d!=b.currentPage){jQuery(c+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height());jQuery(c+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")})}break}b.paginatorNextFlag=false;jQuery(c+" .wdi_feed_wrapper").css("height","auto");jQuery(c+" #wdi_current_page").text(b.currentPage)};wdi_front.loadMore=function(f,k){var b=0;if(f!=""&&typeof f!="undefined"&&f!="initial"&&f!="initial-keep"){var l=window[f.parent().parent().parent().parent().attr("id")]}if(typeof k!="undefined"){var l=k}var n=0,g=0;for(var e=0;e<l.userSortFlags.length;e++){if(l.userSortFlags[e].flag===true){n++;for(var d=0;d<l.usersData.length;d++){if(l.userSortFlags[e]["id"]===l.usersData[d]["user_id"]){if(l.usersData[d]["finished"]==="finished"){g++}}}}}if(n===g&&n!=0){return}if(f===""){l.auto_trigger=true}else{l.auto_trigger=false}wdi_front.ajaxLoader(l);if(l.feed_row.feed_type==="masonry"&&l.feed_row.feed_display_view=="pagination"){jQuery("#wdi_feed_"+wdi_front.feed_counter+" .wdi_full_caption").each(function(){jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch)})}for(var e=0;e<l.usersData.length;e++){if(l.usersData[e]["finished"]==="finished"){b++}}if(b===l.usersData.length){wdi_front.allImagesLoaded(l);jQuery("#wdi_feed_"+l.feed_row["wdi_feed_counter"]+" .wdi_load_more").remove()}var h=l.usersData;l.loadMoreDataCount=l.feed_users.length;for(var e=0;e<h.length;e++){var m=h[e]["pagination"];var c={user_id:h[e]["user_id"],username:h[e]["username"]};if(m.next_url!=""&&m.next_url!=null&&typeof m.next_url!="undefined"){var a=m.next_url;wdi_front.loadMoreRequest(c,a,l,f)}else{if(f=="initial-keep"){l.temproraryUsersData[e]=l.usersData[e]}l.loadMoreDataCount--;wdi_front.checkForLoadMoreDone(l,f);continue}}};wdi_front.loadMoreRequest=function(b,a,e,d){if(!e.mediaRequestsDone){return}var f=e.usersData;var c="";e.instagram.requestByUrl(a,{success:function(g){if(typeof g.meta!="undefined"&&typeof g.meta.error_type!="undefined"){wdi_front.show_alert(false,g,e)}if(g===""||typeof g=="undefined"||g==null){c=wdi_front_messages.network_error;e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}if(g.meta["code"]!=200){c=g.meta["error_message"];e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}g.user_id=b.user_id;g.username=b.username;for(var h=0;h<e.usersData.length;h++){if(g.user_id===e.usersData[h]["user_id"]){if(g.user_id[0]==="#"){g.data=wdi_front.appendRequestHashtag(g.data,g.user_id)}if(d=="initial-keep"){e.temproraryUsersData[h]=e.usersData[h]}e.usersData[h]=g;e.loadMoreDataCount--}}wdi_front.checkForLoadMoreDone(e,d)}})};wdi_front.checkForLoadMoreDone=function(c,b){var a=c.feed_row.load_more_number;var e=c.feed_row.number_of_photos;if(c.loadMoreDataCount==0){c.temproraryUsersData=wdi_front.mergeData(c.temproraryUsersData,c.usersData);var d=wdi_front.getArrayContentLength(c.temproraryUsersData,"data");if(b=="initial-keep"){b="initial"}if(b=="initial"){if(d<e&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore("initial",c)}else{c.usersData=c.temproraryUsersData;wdi_front.displayFeed(c);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}else{if(d<a&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore(undefined,c)}else{c.usersData=c.temproraryUsersData;if(!wdi_front.activeUsersCount(c)){return}wdi_front.displayFeed(c,a);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}}};wdi_front.allDataHasFinished=function(b){var d=0;for(var a=0;a<b.dataStorageRaw.length;a++){if(b.dataStorageRaw[a].length()==0&&b.dataStorageRaw[a].locked==true){d++}}return(d==b.dataStorageRaw.length)};wdi_front.mergeData=function(c,b){for(var a=0;a<b.length;a++){if(typeof c[a]!="undefined"){if(b[a]["finished"]=="finished"){continue}if(typeof c[a]["pagination"]["next_max_id"]=="undefined"&&typeof c[a]["pagination"]["next_max_like_id"]=="undefined"){continue}c[a]["data"]=c[a]["data"].concat(b[a]["data"]);c[a]["pagination"]=b[a]["pagination"];c[a]["user_id"]=b[a]["user_id"];c[a]["username"]=b[a]["username"];c[a]["meta"]=b[a]["meta"]}else{c.push(b[a])}}return c};wdi_front.brokenImageHandler=function(a){a.src=wdi_url.plugin_url+"images/missing.png";a.onerror="";return true};wdi_front.ajaxLoader=function(a){var d=a.feed_row.wdi_feed_counter;var c=jQuery("#wdi_feed_"+d);if(a.feed_row.feed_display_view=="load_more_btn"){c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").removeClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){var b;if(c.find(".wdi_ajax_loading").length==0){b=jQuery('<div class="wdi_ajax_loading"><div><div><img class="wdi_load_more_spinner" src="'+wdi_url.plugin_url+'images/ajax_loader.png"></div></div></div>');c.append(b)}else{b=c.find(".wdi_ajax_loading")}b.removeClass("wdi_hidden")}};wdi_front.allImagesLoaded=function(a){var d=wdi_front.getDataLength(a);if(!a.mediaRequestsDone){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia")}if(d==0&&a.mediaRequestsDone&&(a.feed_row.conditional_filters.length==0||a.feed_row.conditional_filter_enable==0)){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>")}var c=a.feed_row.wdi_feed_counter;var b=jQuery("#wdi_feed_"+c);if(a.feed_row.feed_display_view=="load_more_btn"){b.find(".wdi_load_more").removeClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_ajax_loading").addClass("wdi_hidden")}b.trigger("wdi_feed_loaded")};wdi_front.show=function(b,c){var e=c.feed_row.wdi_feed_counter;var d=jQuery("#wdi_feed_"+e+" .wdi_feed_container");var g=this;switch(b){case"header":f();break;case"users":a(c);break}function f(){var i={feed_thumb:c.feed_row["feed_thumb"],feed_name:c.feed_row["feed_name"]};var k=wdi_front.getHeaderTemplate(),h=k(i),j=d.find(".wdi_feed_header").html();d.find(".wdi_feed_header").html(j+h)}function a(j){d.find(".wdi_feed_users").html("");var n=j.feed_users;var m=j.feed_row["access_token"];var h=0;j.headerUserinfo=[];k();function k(){if(j.headerUserinfo.length==n.length){l(j.headerUserinfo,j);return}var i=n[j.headerUserinfo.length];if(typeof i==="string"&&i==="self"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="hashtag"){j.instagram.searchForTagsByName(g.stripHashtag(i.username),{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false){if(o.data.length==0){var p="";var q={media:""}}else{var p="";var q={media:o.data[0]["media_count"]}}var r={name:n[h]["username"],url:p,counts:q};h++;j.headerUserinfo.push(r);k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="user"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}}}}function l(i,t){d.find(".wdi_feed_users").html("");for(var q=0;q<i.length;q++){if(i[q]===null){continue}var u={flag:false,id:i[q]["id"],name:i[q]["name"]};var p=(i[q]["name"][0]=="#")?"wdi_header_hashtag":"";var o={user_index:q,user_img_url:i[q]["url"],counts:i[q]["counts"],feed_counter:t.feed_row.wdi_feed_counter,user_name:i[q]["name"],bio:i[q]["bio"],usersCount:t.feed_row.feed_users.length,hashtagClass:p};var w=wdi_front.getUserTemplate(t,i[q]["name"]),r=w(o),s=d.find(".wdi_feed_users").html();d.find(".wdi_feed_users").html(s+r);t.userSortFlags.push(u);var v=jQuery('<div class="wdi_clear"></div>')}d.find(".wdi_feed_users").append(v);wdi_front.updateUsersImages(t)}}};wdi_front.getUserTemplate=function(c,h){var a=c.dataCount,d,f,g;switch(h[0]){case"#":d="//instagram.com/explore/tags/"+h.substr(1,h.length);break;default:d="//instagram.com/"+h;break}g='window.open("'+d+'","_blank")';f="onclick='"+g+"'";var e='<div class="wdi_single_user" user_index="<%=user_index%>"><div class="wdi_header_user_text <%=hashtagClass%>"><div class="wdi_user_img_wrap"><img onerror="wdi_front.brokenImageHandler(this);" src="<%= user_img_url%>">';if(a>1){e+='<div title="'+wdi_front_messages.filter_title+'" class="wdi_filter_overlay"><div class="wdi_filter_icon"><span onclick="wdi_front.addFilter(<%=user_index%>,<%=feed_counter%>);" class="fa fa-filter"></span></div></div>'}e+="</div>";e+="<h3 "+f+"><%= user_name%></h3>";if(h[0]!=="#"){if(c.feed_row.follow_on_instagram_btn=="1"){e+='<div class="wdi_user_controls"><div class="wdi_follow_btn" onclick="window.open(\'//instagram.com/<%= user_name%>\',\'_blank\')"><span> '+wdi_front_messages.follow+"</span></div></div>"}e+='<div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span class="fa fa-user"><%= counts.followed_by%></span></p></div>'}else{e+='<div class="wdi_user_controls"></div><div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span></span></p></div>'}e+='<div class="wdi_clear"></div>';if(a==1&&h[0]!=="#"&&c.feed_row.display_user_info=="1"){e+='<div class="wdi_bio"><%= bio%></div>'}e+="</div></div>";var b=_.template(e);return b};wdi_front.getHeaderTemplate=function(){var b='<div class="wdi_header_wrapper"><div class="wdi_header_img_wrap"><img src="<%=feed_thumb%>"></div><div class="wdi_header_text"><%=feed_name%></div><div class="wdi_clear"></div>';var a=_.template(b);return a};wdi_front.addFilter=function(e,g){var f=window["wdi_feed_"+g];var d=f.dataCount;if(d<2){return}if(f.nowLoadingImages!=false){return}else{var c=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');c.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg");c.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col");c.find(".wdi_media_info").toggleClass("wdi_filter_active_col");c.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col");f.customFilterChanged=true;if(f.userSortFlags[e]["flag"]==false){f.userSortFlags[e]["flag"]=true}else{f.userSortFlags[e]["flag"]=false}var a=0;for(var b=0;b<f.userSortFlags.length;b++){if(f.userSortFlags[b]["flag"]==true){a++}}if(f.feed_row.feed_display_view=="pagination"){f.resIndex=0}if(a!=0){wdi_front.filterData(f);wdi_front.displayFeed(f)}else{f.customFilteredData=f.dataStorageList;wdi_front.displayFeed(f)}if(f.feed_row.feed_display_view=="pagination"){f.paginator=Math.ceil((f.imageIndex)/parseInt(f.feed_row.pagination_per_page_number));f.currentPage=f.paginator;wdi_front.updatePagination(f,"custom",1);jQuery("#wdi_first_page").removeClass("wdi_disabled");jQuery("#wdi_last_page").addClass("wdi_disabled")}}};wdi_front.filterData=function(c){var d=c.userSortFlags;c.customFilteredData=[];for(var b=0;b<c.dataStorageList.length;b++){for(var a=0;a<d.length;a++){if((c.dataStorageList[b]["user"]["id"]==d[a]["id"]||c.dataStorageList[b]["wdi_hashtag"]==d[a]["name"])&&d[a]["flag"]==true){c.customFilteredData.push(c.dataStorageList[b])}}}};wdi_front.applyFilters=function(c){for(var b=0;b<c.userSortFlags.length;b++){if(c.userSortFlags[b]["flag"]==true){var a=jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter+'[user_index="'+b+'"]');wdi_front.addFilter(b,c.feed_row.wdi_feed_counter);wdi_front.addFilter(b,c.feed_row.wdi_feed_counter)}}};wdi_front.getImgCount=function(b){var d=b.dataStorage;var c=0;for(var a=0;a<d.length;a++){c+=d[a].length}return c};wdi_front.parseLighboxData=function(k,m){var g=k.dataStorage;var l=k.feed_row.sort_images_by;var a=k.feed_row.display_order;var h=wdi_front.sortingOperator(l,a);var f=[];var b=[];var e={};if(m==true){f=k.customFilteredData}else{for(var d=0;d<g.length;d++){for(var c=0;c<g[d].length;c++){f.push(g[d][c])}}f.sort(h)}for(d=0;d<f.length;d++){e={alt:"",avg_rating:"",comment_count:f[d]["comments"]["count"],date:wdi_front.convertUnixDate(f[d]["created_time"]),description:wdi_front.getDescription((f[d]["caption"]!==null)?f[d]["caption"]["text"]:""),filename:wdi_front.getFileName(f[d]),filetype:wdi_front.getFileType(f[d]),hit_count:"0",id:f[d]["id"],image_url:f[d]["link"],number:0,rate:"",rate_count:"0",username:f[d]["user"]["username"],profile_picture:f[d]["user"]["profile_picture"],thumb_url:f[d]["link"]+"media/?size=t",comments_data:f[d]["comments"]["data"],images:f[d]["images"],carousel_media:(typeof f[d]["carousel_media"]!=="undefined")?f[d]["carousel_media"]:null};b.push(e)}return b};wdi_front.convertUnixDate=function(b){var c=parseInt(b);var a=new Date(0);a.setUTCSeconds(c);var d=a.getFullYear()+"-"+a.getMonth()+"-"+a.getDate();d+=" "+a.getHours()+":"+a.getMinutes();return d};wdi_front.getDescription=function(a){a=a.replace(/\r?\n|\r/g," ");return a};wdi_front.getFileName=function(d){var c=d.link;var b=d.type;if(b==="video"&&d.hasOwnProperty("videos")){return d.videos["standard_resolution"]["url"]}else{var a=c.split("/");return a[a.length-2]}};wdi_front.getFileType=function(a){if(a.type=="video"&&a.hasOwnProperty("videos")){return"EMBED_OEMBED_INSTAGRAM_VIDEO"}else{return"EMBED_OEMBED_INSTAGRAM_IMAGE"}};wdi_front.array_max=function(d){var a=d[0];var b=0;for(var c=1;c<d.length;c++){if(a<d[c]){a=d[c];b=c}}return{value:a,index:b}};wdi_front.array_min=function(d){var c=d[0];var a=0;for(var b=1;b<d.length;b++){if(c>d[b]){c=d[b];a=b}}return{value:c,index:a}};wdi_front.activeUsersCount=function(c){var a=0;for(var b=0;b<c.usersData.length;b++){if(c.usersData[b].finished!="finished"){a++}}return a};wdi_front.checkMediaResponse=function(a,b){if(a!=""&&typeof a!="undefined"&&a!=null&&a.meta["code"]===400&&a.meta["error_type"]==="APINotAllowedError"){return a}if(a==""||typeof a=="undefined"||a==null){errorMessage=a.meta["error_message"];wdi_front.show_alert(errorMessage,a,b);return false}return a};wdi_front.stripHashtag=function(a){switch(a[0]){case"#":return a.substr(1,a.length);break;default:return a;break}};wdi_front.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_front.regexpTestCaption=function(h,e){var d=false,b=false,f=[],g=e.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&"),c=new RegExp("(?:^|\\s)"+g+"(?:^|\\s)"),a=new RegExp("(?:^|\\s)"+g,"g");if(c.exec(h)!=null){d=true}while((match=a.exec(h))!=null){if(match.index==h.length-e.length-1){b=true}}if(d==true||b==true){return true}else{return false}};wdi_front.replaceNewLines=function(c){var b="vUkCJvN2ps3t",a=[],g;c=c.replace(/\r?\n|\r/g,b);g=new RegExp(b,"g");while((match=g.exec(c))!=null){a.push(match.index)}var f=c.split(b);var e=0;for(var d=0;d<f.length;d++){if(f[d]==""){e++}else{e=0}if(e>0){f.splice(d,1);e--;d--}}c=f.join(" ");return c};wdi_front.isEmptyObject=function(a){for(var b in a){if(a.hasOwnProperty(b)){return false}}return true};var WDIFeed=function(a){this["data"]=a.data;this["dataCount"]=a.dataCount;this["feed_row"]=a.feed_row;this["usersData"]=a.usersData;_this=this;this.set_images_loading_flag=function(b){window.addEventListener("load",function(){b.nowLoadingImages=false})};this.set_images_loading_flag(_this)};WDIFeed.prototype.conditionalFilter=function(a,c){var d=this,b=d.feed_row.conditional_filter_type,e=d.feed_row.conditional_filters;if(c.ignoreFiltering==true){}else{a=this.avoidDuplicateMedia(a)}if(!wdi_front.isJsonString(e)){return a}else{e=JSON.parse(e);if(e.length==0){return a}}if(d.feed_row.conditional_filter_enable=="0"){return a}d.instagramRequestCounter++;switch(b){case"AND":a=this.applyANDLogic(a,e,d);break;case"OR":a=this.applyORLogic(a,e,d);break;case"NOR":a=this.applyNORLogic(a,e,d);break;default:break}return a};WDIFeed.prototype.applyANDLogic=function(a,d){var c=this;for(var b=0;b<d.length;b++){a=this.filterResponse(a,d[b])}return a};WDIFeed.prototype.applyORLogic=function(d,c){var h=this;var a=[],g,j=[],f,b;for(var e=0;e<c.length;e++){g=this.filterResponse(d,c[e]);a=a.concat(g.data);g={}}for(e=0;e<a.length;e++){b=a[e];if(!this.mediaExists(b,j)&&!this.mediaExists(b,h.dataStorageList)){j.push(b)}}f={data:j,meta:d.meta,pagination:d.pagination};return f};WDIFeed.prototype.applyNORLogic=function(c,h){var f=c,g=this,b=this.applyORLogic(c,h,g),d=[],a;for(var e=0;e<f.data.length;e++){if(!this.mediaExists(f.data[e],b.data)){d.push(f.data[e])}}a={data:d,meta:f.meta,pagination:f.pagination};return a};WDIFeed.prototype.mediaExists=function(b,c){for(var a=0;a<c.length;a++){if(b.id==c[a]["id"]){return true}}return false};WDIFeed.prototype.filterResponse=function(a,b){switch(b.filter_type){case"hashtag":return this.filterByHashtag(a,b);break;case"username":return this.filterByUsername(a,b);break;case"mention":return this.filterByMention(a,b);break;case"description":return this.filterByDescription(a,b);break;case"location":return this.filterByLocation(a,b);break;case"url":return this.filterByUrl(a,b);break}};WDIFeed.prototype.filterByHashtag=function(b,g){var d=[],f,h,a;for(var e=0;e<b.data.length;e++){h=b.data[e];for(var c=0;c<h.tags.length;c++){tag=h.tags[c];if(tag.toLowerCase()==g.filter_by.toLowerCase()){d.push(h)}}}a={data:d,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByUsername=function(b,e){var c=[],f,a;for(var d=0;d<b.data.length;d++){f=b.data[d];if(f.user.username.toLowerCase()==e.filter_by.toLowerCase()){c.push(f)}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByMention=function(b,e){var c=[],f,g,a;for(var d=0;d<b.data.length;d++){f=b.data[d];if(f.caption!==null){g=f.caption["text"].toLowerCase();if(g.indexOf("@"+e.filter_by.toLowerCase())!=-1){c.push(f)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByDescription=function(c,f){var d=[],g,h,b;for(var e=0;e<c.data.length;e++){g=c.data[e];if(g.caption!==null){h=g.caption["text"].toLowerCase();h=wdi_front.replaceNewLines(h);var a=f.filter_by.toLowerCase();if(wdi_front.regexpTestCaption(h,a)){d.push(g)}}}b={data:d,meta:c.meta,pagination:c.pagination};return b};WDIFeed.prototype.filterByLocation=function(b,f){var c=[],g,e,a;for(var d=0;d<b.data.length;d++){g=b.data[d];if(g.location!==null){e=g.location["id"];if(e==f.filter_by){c.push(g)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.filterByUrl=function(b,e){var c=[],g,h,a,f;e.filter_by=this.getIdFromUrl(e.filter_by);for(var d=0;d<b.data.length;d++){g=b.data[d];if(g.link!==null){h=this.getIdFromUrl(g.link);if(h==e.filter_by){c.push(g)}}}a={data:c,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.getIdFromUrl=function(a){var c=a.split("/"),d=false;for(var b=0;b<c.length;b++){if(c[b]=="p"){if(typeof c[b+1]!="undefined"){d=c[b+1];break}}}return d};WDIFeed.prototype.avoidDuplicateMedia=function(b){var e=b.data,d=[],a={};if(typeof e=="undefined"){e=[]}for(var c=0;c<e.length;c++){if(!this.mediaExists(e[c],this.dataStorageList)&&!this.mediaExists(e[c],d)&&!this.mediaExists(e[c],this.conditionalFilterBuffer)){d.push(e[c])}}this.conditionalFilterBuffer=this.conditionalFilterBuffer.concat(d);a={data:d,meta:b.meta,pagination:b.pagination};return a};WDIFeed.prototype.storeRawData=function(c,a){var e=this;if(typeof this[a]=="object"&&typeof this[a].length=="number"){for(var b=0;b<c.length;b++){var d="";if(wdi_front.isHashtag(c[b].user_id)){d=c[b].pagination.next_max_tag_id}else{if(e.feed_row.liked_feed=="liked"){d=c[b].pagination.next_max_like_id;if(typeof d=="undefined"){d=""}}else{if(c[b].pagination==null){c[b].pagination=[]}d=c[b].pagination.next_max_id;if(typeof d=="undefined"){d=""}}}if(typeof this[a][b]=="undefined"){this[a].push({data:c[b].data,index:0,locked:false,hash_id:d,usersDataFinished:false,userId:c[b].user_id,length:function(){return this.data.length-this.index},getData:function(g){var h=this.data.slice(this.index,this.index+g);this.index+=Math.min(g,this.length());if(this.index==this.data.length&&this.locked==true&&this.usersDataFinished==false){for(var f=0;f<e.usersData.length;f++){if(e.usersData[f]["user_id"]==this.userId){e.usersData[f].finished="finished";this.usersDataFinished=true;break}}}return h}})}else{if(this[a][b].locked==false){if(d!=this[a][b].hash_id){this[a][b].data=this[a][b].data.concat(c[b].data);this[a][b].hash_id=d}else{this[a][b].locked=true}}}}}};wdi_front.updateUsersIfNecessary=function(c){var d=c.feed_users;var a=false;for(var b=0;b<d.length;b++){if("#"==d[b].username.substr(0,1)){d[b].id=d[b].username;continue}if(""==d[b].id||"username"==d[b].id){a=true;c.instagram.searchForUsersByName(d[b].username,{success:function(i){if(typeof i.meta!="undefined"&&typeof i.meta.error_type!="undefined"){wdi_front.show_alert(false,i,c)}if(i.meta.code==200&&i.data.length>0){var l=false;for(var g=0;g<i.data.length;g++){if(i.data[g].username==i.args.username){l=true;break}}if(l){for(var h=0;h<d.length;h++){if(i.data[g].username==d[h].username){d[h].id=i.data[g].id}}}}var f=false;for(var e=0;e<d.length;e++){if(d[e].id==""||d[e].id=="username"){f=true;break}}if(!f){c.feed_row.feed_users=JSON.stringify(d);wdi_front.init(c)}},username:d[b].username})}}return a};if(typeof wdi_ajax.ajax_response!="undefined"){jQuery(document).one("ajaxStop",function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})}else{jQuery(document).ready(function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})};
js/wdi_instagram.js CHANGED
@@ -381,7 +381,7 @@ function WDIInstagram(args)
381
  });
382
  }
383
 
384
-
385
  /**
386
  * Get a list of users matching the query.
387
  *
@@ -611,7 +611,7 @@ function WDIInstagram(args)
611
  });
612
  }
613
 
614
-
615
  /**
616
  * Get the most recent media published by a user.
617
  * This endpoint requires the public_content scope if the user-id is not the owner of the access_token.
@@ -885,7 +885,7 @@ function WDIInstagram(args)
885
  });
886
  }
887
 
888
-
889
  /**
890
  * Get information about a user.
891
  * This endpoint requires the public_content scope if the user-id is not the owner of the access_token.
381
  });
382
  }
383
 
384
+ /*deprecated API*/
385
  /**
386
  * Get a list of users matching the query.
387
  *
611
  });
612
  }
613
 
614
+ /* deprecated API */
615
  /**
616
  * Get the most recent media published by a user.
617
  * This endpoint requires the public_content scope if the user-id is not the owner of the access_token.
885
  });
886
  }
887
 
888
+ /* deprecated API */
889
  /**
890
  * Get information about a user.
891
  * This endpoint requires the public_content scope if the user-id is not the owner of the access_token.
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 4.9
7
- Stable tag: 1.2.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -21,60 +21,62 @@ https://www.youtube.com/watch?v=KU4LJFxw0BY
21
  [User Guide](https://web-dorado.com/wordpress-instagram-feed-wd/installation-and-configuration/installation.html)
22
 
23
 
24
- WD Instagram Feed is a user-friendly WordPress plugin that can help you bring Instagram feeds with all the media to any of your posts and pages. It will take couple of minutes to set up and customize to your needs. WD Instagram Feeds settings and features will allow you to take full control over how to display the feeds and the content on your website.
25
- WD Instagram Feed is a perfect fit for bloggers, photography websites, travel and food blogs and for WordPress users that want to spice up their posts with the latest images and videos from Instagram. The plugin is responsive and scales perfectly to screens of all sizes, providing better user experience across the board.
 
26
 
27
 
28
  == Benefits ==
29
- * **Increase user engagement** - Engagement on Instagram is higher than on any other social platform. Keep your visitors engaged and significantly increase surfing time and visitor retention on your website.
30
- * **Increase brand/blog awareness** - Let your site visitors get into conversation and connect with your blog or brand. Keep your visitors tuned and increase your blogs/brands awareness.
31
- * **Save your time** – Keep your posts authentic with content from Instagram without any manual work involved. Your feeds will be fresh and up to date and synced automatically.
32
- * **Add appeal to your website** - Stunning display views, custom styling features and image lightbox effects will bring vibrancy to your posts and pages, and add to your websites overall look and feel.
33
- * **Control** - Take pure charge of what content to display and how to display it with an extensive list of content and display settings. Specify the number of photos you display on the page and choose what happens when a visitor clicks on an image from the feed.Custom styled display views and filtered Instagram content will be a great addition to any post you publish.
34
- * **Minimal effort** – Set the plugin up and have it up and running in no time and with minimal efforts. Out of box solution thats user-friendly and simple in use.
35
  * **Support** - The team behind WD Instagram Feed provides timely and effective support to all its users. We keep standards high and response time low.
36
  * **Resource efficient** - WordPress WD Instagram Feed plugin loads the images pretty fast as no feed data is stored in the database. All the images, videos, captions and comments are retrieved directly from the Instagram in the front-end.
37
 
38
 
39
 
40
- == Whats in it ==
41
 
42
  = CUSTOMIZABLE LAYOUTS =
43
- Display the feeds in one of the available layouts Thumbnail, Image Browser, Masonry (Premium version), Blog Style(Premium version). Whether you want to have small sized image thumbnails or larger images displayed youll find the right layout for that. Customize layouts to get exactly what you need and display the metadata thats most relevant for your niche.
44
 
45
  = INSTAGRAM GALLERY =
46
- Create Instagram galleries on your website by embedding entire timelines to your posts using a shortcode or the plugins Instagram widget on your sidebar.
47
 
48
  = INDIVIDUAL AND MIXED FEEDS =
49
- You can choose to show a single feed on your pages and posts, but you can make things more interesting and create mixed feeds (Premium version). With single feeds you can show posts from public Instagram accounts and single hashtag. Mixed feeds, on the other hand can contain multiple public Instagram accounts and multiple hashtags. A front end filter is available for mixed feeds (Premium version).
50
 
51
  = FILTERED FEEDS =
52
  Use Conditional Filters of the WD Instagram Feed plugin to display or skip certain content from the feeds by setting up a filter logic and condition types. Add custom condition types if necessary and fine-tune your feeds. Conditional Filters option is available for Premium version only.
53
 
54
  = INSTAGRAM WIDGET =
55
- Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
56
 
57
  = LIGHTBOX =
58
- WD Instagram Feed features a powerful lightbox. It provides support for HTML5 video,15 transition effects (Premium version), filmstrip (Premium version) and carousel features. The lightbox works great with Instagram touch as well.
59
 
60
  = SCROLL AND PAGINATION =
61
- The plugin comes with a classic pagination with next and previous buttons. You can also choose the infinite scroll option (Premium version) to bring better user experience. This allows to view more images when scrolling the page down. You can set the the number of images you want to show per page.
62
 
63
  = THEMES =
64
  Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. WD Instagram Feed allows you to have separate layout settings for each theme with custom settings for header, user data and pagination.
65
 
66
  = SETTINGS/CUSTOMIZATION =
67
 
68
- *Some customizations described here are available in Premium version. Please refer to feature summary for additional info.
69
- WD Instagram Feed comes with extensive customization options for the feeds, layouts, themes and content display. Every new feed you add to your website has its own settings for the feed and for the lightbox that pops up when people click on an image or video. Upon clicking on the image you can choose to redirect people to Instagram, open the image in the lightbox, or chose the custom redirect option. There are various image sorting options available based on the date, likes,comments, and on random basis. Media loading options include load more button, infinite Instagram scrolling, or classic pagination with next and previous buttons. You can enable “Follow on Instagram” button from the feed settings and let your visitors to follow the displayed Instagram accounts directly from your site. The number of photos you display on the page or post can be specified from the feed settings,as well as the number of the loading images.
 
70
 
71
 
72
  [Premium version adds](https://web-dorado.com/products/wordpress-instagram-feed-wd.html)
73
 
74
- * Masonry Layout feeds
75
  * Blog Style Layout feeds
76
  * Image metadata (Instagram tag,image caption, comments, like) display
77
- * Mixed and multiple feeds (several hashtags and Instagram public accounts)
78
  * Fully Customizable Themes
79
  * Vertical/horizontal filmstrip in lightbox
80
  * HTML5 Video Support in Lightbox
@@ -83,22 +85,22 @@ WD Instagram Feed comes with extensive customization options for the feeds, layo
83
  * Social sharing buttons (Facebook, Twitter, Google+, LinkedIn and Pinterest)
84
  * Infinite scroll for the feed (Similar to Instagram standard)
85
  * Instagram Comments display in Lightbox
86
- * Instagram Hashtag/ User account filtering options
87
  * Conditional Filters
88
 
89
  ###IMPORTANT:
90
- If you think you found a bug in WD Instagram Feed or wonder how to add Instagram to your website, or how to get Instagram plugin up and running, please check out [Support Forum](https://wordpress.org/support/plugin/wd-instagram-feed) . Additional information on how to download Instagram plugin to your website you can find in our user manual If you do not find a solution in the forum, do not hesitate to [click here to contact us](https://web-dorado.com/support/contact-us.html).
91
 
92
  == Installation ==
93
 
94
  #### Thank you for your interest in WD Instagram Feed.
95
 
96
- Here are two ways of installing WD Instagram Feed: via WordPress backend and via FTP. Lets discuss each case individually:
97
 
98
  **Installing via WordPress**
99
 
100
  Login to the WordPress Administrator Panel.
101
- Go to Plugins> Add New>Upload.
102
  Click Choose file button and select the zip folder of WD Instagram Feed plugin and press Install now button.
103
  Click Activate button.
104
 
@@ -112,215 +114,380 @@ Activate WD Instagram Feed by going to Plugins and pressing Activate button.
112
 
113
  **Creating an Instagram Feed**
114
 
115
- Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin.Go to WD Instagram Feed > Feed and press Add New. Here you can choose Instagram feed layout and manage lightbox options.From the lightbox options you can enable filmstrip, slideshow, and take full control how custom feed images, image galleries,pictures,Instagram gallery, and videos of this social network are displayed within the lightbox. You can enable autoplay to play photos and Instagram group images similar to an image slider. To get an Instagram slider appearance in the lightbox you’ll need to adjust the lightbox and image display settings.Lightbox works great with Instagram touch.The feed will be automatically updated once users share Instagram new images.The feeds support new Instagram carousel feature, and display the images of the responsive carousel.
116
- Create an Instagram feed based on one of the available layouts- Thumbnail, Masonry, Blog Style, Image Browser.
 
 
 
117
 
118
 
119
 
120
  == Frequently Asked Questions ==
121
 
122
- = 1. How can i get my Instagram Access Token? =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
- To start using Instagram Feed you will be required to first fill in Settings section. Go to Instagram Feed>Settings tab. Press Sign in with Instagram. Pressing the button Access Token and Username will be automatically generated for the current logged-in Instagram account (if user is not logged-in, a popup offering to sign in to Instagram will appear).
125
- Reset access token and username button resets default user data in plugin. Use that button to get access token for other Instagram user.
126
 
127
- = 2. Can I display more than one Instagram feeds on my website? =
128
 
129
- Yes, you can add as many Instagram feeds as you want to your website and show them on posts and pages. Add the Instagram feeds to posts and pages by using the shortcode provided or choosing from the list by clicking on the WD Instagram Feed button.
130
 
131
- = 3. Can I create mixed Instagram feeds with multiple Instagram accounts or hashtags? =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
- This option is available in Premium version. There, you can create mixed Instagram feeds with several Instagram hashtags and Instagram public accounts. You can even create the combination of both.
134
-
135
- = 4. I see an invalid access Token error. What should I do? =
136
-
137
- If you are seeing this alert message on your WD Instagram Feed plugin, please note, that Instagram access tokens expire from time to time. Therefore you need to get new from your Instagram account again.
138
- Please sign in to your Instagram account and get a new token. Add it to WD Instagram Feed > Settings page, and if the token will still cause "Invalid access token" error, revoke access for the plugin here: www.instagram.com/accounts/manage_access/
139
- and sign in again from Settings page.
140
-
141
- = 5. I would like to display only the Instagram posts which have a certain hashtags. How can this be done? =
142
-
143
- You can definitely do this with premium version! Please, go to the WD Instagram Feed > Feeds > Conditional Filters configure the settings by changing the “Filter Logic” and “Add Condition” options
144
- Conditional filters are used in cases if you want to insert filtered Instagram feeds of certain user(s) or hashtag(s). Conditional filters can be used for both displaying or skipping certain images. Filters are also applicable to mixed Instagram feeds. This is a a good way to display Instagram stream content that your users are most interested in to scroll through.
145
- Enabling the option you will be able to add condition to the Instagram feed.
146
- **Source of filtering.** When creating an Instagram feed you provide username(s) and/or hashtag(s). All provided usernames and/or hashtags will be used as initial source. Filters will be applied to Instagram feed generated on this selection.
147
- Filter logic allows displaying one of the options:
148
- **And** – Displays Instagram posts which correspond to all filters.
149
- **Or** Displays Instagram posts which correspond to at least one of the filters.
150
- **Nor** – Hides Instagram posts which correspond to at least one of the filters.
151
- Write your condition, select condition type and click on Add New Condition. You can add as many conditions as you want repeating the process. You can add different condition types mixed together as well. Condition might be username (use @ before the username), hashtag (use # before the keyword), text or link (provide full URL) depending on condition type. Let’s discuss each condition type separately:
152
- **Username.** Useful when you have a Instagram feed based on hashtags. It will allow displaying Instagram feeds of only certain Instagram accounts using that hashtag. Let’s consider you have #panda and #animal hashtags, you can set @natgeo and @instapandacool to display images from these two Instagram accounts.
153
- **Hashtag.** Useful when you have a Instagram feed based on usernames. It will allow displaying Instagram feeds using only certain hashtag, e.g. if you have @bmw and @instacars as users and want to display only posts containing #bmw hashtag.
154
- **Mention.** This can be used both in cases of hashtag and usernames, e.g. displaying posts where @moby is mentioned.
155
- **Description.** This can be used both with hashtags and usernames. This can be a single keyword or word combination which should be used within the Instagram post description.
156
- **Instagram Media Link.** This is the shareable link of the Instagram post. The entire URL should be used for serving as a filter.
157
- **Result.** Here you will see all of the added filters which will be applied to your Instagram feed.This feature is widely used on Instagram for eCommerce websites, as it serves like an Instagram feed with analytics.
158
-
159
- = 6. How can I publish the Instagram Feed on my website? =
160
-
161
- You can publish Instagram Feed in a post/page, as a widget or using php function.
162
-
163
- **Publishing Instagram Feed in a Page/Post**
164
- To use the created Instagram feeds within a page or post you should use shortcode. Open the page/post from the back end. Press on the Add Instagram Feed button within the editor. Then select the Instagram feed and press Insert button.
165
-
166
- An alternative will be copying the shortcode from WD Instagram Feed> Feeds toolbar and pasting it within post/page.
167
-
168
- **Publishing Instagram Feed as a Widget**
169
- Go to Appearance > Widgets toolbar.
170
- Find WD Instagram Feed widget and assign it to a custom widget position on your site’s sidebar. Fill in the details below:
171
- Title. Provide a title for your Instagram Feed.
172
- Feed. Select the Instagram social feed which will be displayed as a widget.
173
- Number of Columns. Set the number of Instagram image columns (for thumbnail and masonry view).
174
- Number of images to display. Set a constant number of Instagram images which will be displayed with widget.
175
- Show Likes and Comments. Check the box to display Instagram likes and comments below view thumbnails.You can display Instagram widgets to as many widget areas as your theme supports.
176
-
177
- **Publishing Instagram Feed by PHP function**
178
- It is also possible to insert the created Instagram feeds into the theme by calling it with PHP function. This feature is commonly used for adding the code to header.php for displaying Instagram feeds within header or footer position of the website. You can find the function located in Instagram Feed>Feeds section under PHP function column.
179
-
180
- = 7. Is it possible to change the Instagram Feed themes to match my website? =
181
- This is possible in Premium version. You can customize the Instagram plugin to better fit your website design. By default WD Instagram Feed comes with two default themes- Instagram and Elegant. You can use one of them or create your own theme. Newly created theme will be based on Default theme.
182
- **General.** Here you can add a theme title, change feed container and feed wrapper colors and styles.
183
- **Feed Header.** Edit styling of Instagram feed header(title and feed thumb)
184
- **User data.** Edit colors and styles of elements in users/hashtags section: usernames, profile images, bio text, number of posts and followers, follow button.
185
- **Pagination.** Change Load More button and Next/Previous button colors and styles.
186
- **Thumbnails.** Edit standard thumbnail styles, image wrapper styles, image metadata styles, comments and likes styles.
187
- **Masonry.** Edit masonry view thumbnail styles, image wrapper styles, image metadata styles, comments and likes styles.
188
- **Blog Style.** Change blog view thumbnail and wrapper styles, image caption colors, comments and likes styles.
189
- **Image Browser.** Change Image Browser image and wrapper styles, image caption colors, comments and likes styles.
190
-
191
- = 8. How do I change the layout of my Instagram Feed? =
192
- Go to WD Instagram Feed > Feed and press Add New. Here you can choose the feed layout and manage lightbox options.
193
- Create a Instagram feed based on one of the available layouts- Thumbnail, Masonry, Blog Style, Image Browser.
194
-
195
- **Thumbnails and Masonry Layouts**
196
- While Thumbnails layout is available in free version of Instagram Feed plugin and Masonry Layout in Premium version, both use basically similar set of properties, so we will discuss them jointly. When using thumbnail view images get identical dimensions, whereas with Masonry view images and their properties (description, caption, hashtags) get displayed as a masonry style Instagram feed.
197
-
198
- **Feed Name.** Provide a title for the Instagram feed. It will be useful to provide unique title since you will need it when inserting the Instagram feed into a page or post.
199
- **Theme**. Select one of the existing themes for the Instagram feed. All theme styling parameters will be applied.
200
- **Feed Usernames and Hashtags.** Provide all usernames and hashtags you want to use within the Instagram feed. All all them using add button. Usernames should be provided within the following format: “webdorado”, whereas for hashtags you need to use the following format: #webdorado.
201
- **Featured Image.** One of the user avatars can be used as a featured image, select the relevant user in case you have more than one image. If you use hashtag feeds, you can set hashtag image as featured image.
202
- **Feed Display Type.** Select the pagination style.
203
- * Pagination. Uses standard pagination with “next” and “previous” buttons with the styles set in corresponding theme.
204
- * Load More. Loads specified number of images with Load More button. You can specify the number of image for further loads.
205
- * Infinite Scroll. Uses Instagram standard. Images are being loaded as you scroll.
206
- **Sort Images By.** Choosing sorting option for the Instagram feed.
207
- * Date- based on the date when images are uploaded to Instagram
208
- * Likes- number of likes
209
- * Comments- number of comments
210
- * Random- randomizes displayed images.
211
- **Order By.** Choose between ascending and descending options.
212
- **Follow on Instagram Button.** Choose whether to display follow button next to usernames or not.
213
- **Display Header.** Displays featured image and Instagram feed title.
214
- **Number of Photos to Display.** Define the number of images which will be displayed before using loading/pagination options.
215
- **Number of Photos to Load.** Define the number of images which will be displayed with each load/page.
216
- **Number of Columns.** Set a default number of image columns.
217
- **Resort After Loading New Images(Load More and Infinite Scroll only).** If this option is disabled, only newly loaded images will be sorted according to the value of Sort Images By field. If enabled, both newly loaded and already shown images will be resorted together.
218
- **Show Likes.** Choose whether to display the number of likes or not.
219
- **Show Description.** Check to display image descriptions.
220
- **Show Comments.** Check to display image comments.
221
- **Show User info.** Check to display a block with user information (username, profile image, etc.).
222
- **Display User Bio.** Check to display Instagram account-related bio.
223
- **Display User Posts and Followers count.** Check to display the number of posts and follower for each used Instagram account.
224
- **Disable Mobile Layout.** If you disable mobile layout the images will be displayed with defined number of columns regardless of the device in use. Otherwise the feed column number will be decreased for the smaller screen devices.
225
- **Image Onclick.** Select the action type when hitting the image. It can be redirected to Instagram or opened with a lightbox.
226
-
227
-
228
- **Blog Style Layout**
229
- The Blog style layout, available in Premium version, is a perfect option if you want to post in instagram and repost the content to WordPress website as a photo blog. The images get displayed with larger dimension with their captions, descriptions and hashtags below.
230
- **Feed Name.** Provide a title for the Instagram feed. It will be useful to provide unique title since you will need it when inserting the Instagram feed within a page or post.
231
- **Theme.** Select one of the existing themes for the Instagram feed. All theme styling parameters will be applied.
232
- **Feed Usernames and Hashtags.** Provide all usernames and hashtags you want to use within the Instagram feed. All all them using add button. Usernames should be provided within the following format: “webdorado”, whereas for hashtags you need to use the following format: #webdorado.
233
- **Featured Image.** One of the user avatars can be used as a featured image, select the relevant user in case you have more than one image. If you use hashtag Instagram feeds, you can set hashtag image as featured image.
234
- **Feed Display Type.** Select the pagination style.
235
- * Pagination. Uses standard pagination with the styles set in corresponding theme.
236
- * Load More. Loads specified number of images with Load More button. You can specify the number of images for further loads.
237
- * Infinite Scroll. Uses Instagram standard. Images gets loaded as you scroll.
238
- **Sort Images By.** Choosing sorting option for the Instagram feed.
239
- * Date- based on the date when images are uploaded to Instagram
240
- * Likes- number of likes
241
- * Comments- number of comments
242
- * Random- randomizes displayed images.
243
- **Order By.** Choose between ascending and descending options.
244
- **Follow on Instagram Button.** Choose whether to display follow button next to usernames or not.
245
- **Display Header.** Displays featured image and Instagram feed title.
246
- **Number of Photos to Display. Define the number of images which will be displayed before using loading/pagination options.
247
- **Number of Photos to Load. Define the number of images which will be displayed with each load/page.
248
- **Resort After Loading New Images (Load More and Infinite Scroll only).** If this option is disabled, only newly loaded images will be sorted according to the value of Sort Images By field. If enabled, both newly loaded and already shown images will be resorted together.
249
- **Show Likes.** Choose whether to display the number of likes or not.
250
- **Show Description.** Check to display image descriptions.
251
- **Show Comments.** Check to display image comments.
252
- **Show User info.** Check to display a block with user information (username, profile image, etc.).
253
- **Display User Bio.** Check to display Instagram account-related bio.
254
- **Display User Posts and Followers count.** Check to display the number of posts and follower for each used Instagram account.
255
- **Image Onclick.** Select the action type when hitting the image. It can be redirected to Instagram or opened with a lightbox.
256
-
257
-
258
-
259
- **Image Browser**
260
- Image Browser of free version displays a single large image with navigation buttons. You can display image properties below or above the image.
261
-
262
- **Feed Name.** Provide a title for the Instagram feed. It will be useful to provide unique title since you will need it when inserting the Instagram feed within a page or post.
263
- **Theme.** Select one of the existing themes for the Instagram feed. All theme styling parameters will be applied.
264
- **Feed Usernames and Hashtags.** Provide all usernames and hashtags you want to use within the Instagram feed. All all them using add button. Usernames should be provided within the following format: “webdorado”, whereas for hashtags you need to use the following format: #webdorado.
265
- **Featured Image.** One of the user avatars can be used as a featured image, select the relevant user in case you have more than one image.If you use hashtag Instagram feeds, you can set hashtag image as featured image.
266
- **Sort Images By.** Choosing sorting option for the Instagram feed.
267
- * Date- based on the date when images are uploaded to Instagram
268
- * Likes- number of likes
269
- * Comments- number of comments
270
- * Random- randomizes displayed images.
271
- **Order By.** Choose between ascending and descending options.
272
- **Follow on Instagram Button.** Choose whether to display follow button next to usernames or not.
273
- **Display Header.** Displays featured image and Instagram feed title.
274
- **Number of Images To Preload.** Define the number of images which will be preloaded for this view.
275
- **Number of Images To Load Each Time.** Define the number of images to be loaded after the first load.
276
- **Show Likes.** Choose whether to display the number of likes or not.
277
- **Show Description.** Check to display image descriptions.
278
- **Show Comments.** Check to display image comments.
279
- **Show User info.** Check to display a block with user information (username, profile image, etc.).
280
- **Display User Bio.** Check to display Instagram account-related bio.
281
- **Display User Posts and Followers count. **Check to display the number of posts and follower for each used Instagram account.
282
- **Image Onclick.** Select the action type when hitting the image. It can be redirected to Instagram or opened with a lightbox.
283
-
284
- **Instagram Feed Lightbox Settings**
285
- Note: Instagram lightbox shows only already loaded images.
286
-
287
- **Full width lightbox.** Check to enable full width button.
288
- **Lightbox Width.** Set the lightbox width. Note that it will be used for the entire display, thus when you press to view the comment image will be resized to fit this width.
289
- **Lightbox Height.** Set the lightbox height.
290
- **Lightbox Effect.** Select a lightbox slide transition effect. Each lightbox can use only one effect. Or choose random to display random effect for every transition.
291
- **Lightbox autoplay.** Choose whether use slideshow autoplay or not. If you decide not to use, you can instead set up control buttons.
292
- **Time Interval. Define the time interval between each slide when autoplay is turned on.
293
- **Enable filmstrip in lightbox. Choose whether to enable filmstrip within the lightbox or not. Filmstrip alignment and styling can be edited in Themes section.
294
- **Filmstrip size. Define the filmstrip height/width (depending whether you have horizontal or vertical view, the stated dimension will be applied to one property only).
295
- **Show Next / Previous Buttons. Choose whether to display Next/Previous buttons for the slideshow or not.
296
- **Display info by default.** Choose whether to display image/video caption and author profile by default or not.
297
- **Full width info.** Enable the option to display image/video information within entire width of the lightbox otherwise it will be displayed based on the image container width.
298
- **Enable Loop.** When loop is enabled the user the slideshow will continue to the first image/video when pressing Next button.
299
- **Enable Right Click Protection.** When enabled user will not be able to Save images or videos using Right-click and pressing Save as button.
300
- **Enable control buttons.** Enable to display Play,Full Width, Comments and other buttons within lightbox.
301
- **Enable info button.** Enable to allow the user to read image metadata (caption and hashtags) when clicking on the button.
302
- **Enable fullscreen.** Enable button to display images in fullscreen mode.
303
- **Enable comments.** Enable a button to show or hide comments. Load more
304
- **Enable Original Image Display Button.** Shows a link to the original instagram post opened in the new window.
305
- **Enable Download Button.** Enable direct image/video download from lightbox.
306
- **Enable Share Buttons.** Enable social sharing buttons (Google+, Twitter, Facebook, Pinterest).
307
-
308
- = 9. I want to filter the Instagram feed to show certain images/posts. How do I do that? =
309
- Conditional filters are available in Premium version of Instagram Feed plugin. These are used in cases if you want to insert filtered Instagram feeds of certain user(s) or hashtag(s). Conditional filters can be used for both displaying or skipping certain images. Filters are also applicable to mixed Instagram feeds.
310
-
311
- **Enable Conditional Filters.** Enabling the option you will be able to add condition to the Instagram feed.
312
- **Source of filtering.** When creating a Instagram feed you provide username(s) and/or hashtag(s). All provided usernames and/or hashtags will be used as initial source. Filters will be applied to Instagram feed generated on this selection.
313
- **Filter Logic.** Filter logic allows displaying one of the options:
314
- **And** - Displays Instagram posts which correspond to all filters.
315
- **Or** - Displays Instagram posts which correspond to at least one of the filters.
316
- **Nor** - Hides Instagram posts which correspond to at least one of the filters.
317
- **Add Condition.** Write your condition, select condition type and click on Add New Condition. You can add as many conditions as you want repeating the process. You can add different condition types mixed together as well. Condition might be username (use @ before the username), hashtag (use # before the keyword), text or link (provide full URL) depending on condition type. Let’s discuss each condition type separately:
318
- **Username.** Useful when you have an Instagram feed based on hashtags. It will allow displaying Instagram feeds of only certain Instagram accounts using that hashtag. Let’s consider you have #panda and #animal hashtags, you can set @natgeo and @instapandacool to display images from these two Instagram accounts.
319
- Hashtag. Useful when you have an Instagram feed based on usernames. It will allow displaying Instagram feeds using only certain hashtag, e.g. if you have @bmw and @instacars as users and want to display only posts containing #bmw hashtag.
320
- **Mention.** This can be used both in cases of hashtag and usernames, e.g. displaying posts where @moby is mentioned.
321
- **Description.** This can be used both with hashtags and usernames. This can be a single keyword or word combination which should be used within the Instagram post description.
322
- **Instagram Media Link.** This is the shareable link of the Instagram post. The entire URL should be used for serving as a filter.
323
- **Result.** Here you will see all of the added filters which will be applied to your Instagram feed.
324
  == Screenshots ==
325
 
326
  1. WordPress WD Instagram Feed - Thumbnail layout
@@ -331,6 +498,14 @@ Hashtag. Useful when you have an Instagram feed based on usernames. It will allo
331
 
332
  == Changelog ==
333
 
 
 
 
 
 
 
 
 
334
  = 1.2.16 =
335
  New: Instagram slideshow is supported in popup
336
  New: UX of feeds and themes admin screen, it is now similar to posts list screen
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 4.9
7
+ Stable tag: 1.2.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
21
  [User Guide](https://web-dorado.com/wordpress-instagram-feed-wd/installation-and-configuration/installation.html)
22
 
23
 
24
+ WD Instagram Feed is a user-friendly WordPress plugin that can help you bring Instagram feeds with the media of your Instagram account to any of your posts and pages. It will take couple of minutes to set up and customize to your needs. WD Instagram Feed's settings and features will allow you to take full control over how to display the feeds and the content on your website.
25
+
26
+ WD Instagram Feed is a perfect fit for bloggers, photography websites, travel and food blogs and for WordPress users that want to spice up their posts with the latest images and videos from their Instagram profiles. The plugin is responsive and scales perfectly to screens of all sizes, providing better user experience across the board.
27
 
28
 
29
  == Benefits ==
30
+ * **Increase user engagement** - Engagement on Instagram is higher than on any other social platform. Keep your visitors engaged and significantly increase surfing time and visitor retention on your website.
31
+ * **Increase brand/blog awareness** - Let your site visitors get into conversation and connect with your blog or brand. Keep your visitors tuned and increase your blog's/brand's awareness.
32
+ * **Save your time** – Keep your posts authentic with content from your Instagram account without any manual work involved. Your feeds will be fresh and up to date and synced automatically.
33
+ * **Add appeal to your website** - Stunning display views, custom styling features and image lightbox effects will bring vibrancy to your posts and pages, and add to your website's overall look and feel.
34
+ * **Control** - Take pure charge of what content to display and how to display it with an extensive list of content and display settings. Specify the number of photos you display on the page and choose what happens when a visitor clicks on an image from the feed. Custom styled display views and filtered Instagram content will be a great addition to any post you publish.
35
+ * **Minimal effort** – Set the plugin up and have it up and running in no time and with minimal efforts. Out of box solution that's user-friendly and simple in use.
36
  * **Support** - The team behind WD Instagram Feed provides timely and effective support to all its users. We keep standards high and response time low.
37
  * **Resource efficient** - WordPress WD Instagram Feed plugin loads the images pretty fast as no feed data is stored in the database. All the images, videos, captions and comments are retrieved directly from the Instagram in the front-end.
38
 
39
 
40
 
41
+ == What's in it ==
42
 
43
  = CUSTOMIZABLE LAYOUTS =
44
+ Display the feeds in one of the available layouts Thumbnail, Image Browser, Masonry (Premium version), Blog Style(Premium version). Whether you want to have small sized image thumbnails or larger images displayed you'll find the right layout for that. Customize layouts to get exactly what you need and display the metadata that's most relevant for your niche.
45
 
46
  = INSTAGRAM GALLERY =
47
+ Create Instagram galleries on your website by embedding entire timelines to your posts using a shortcode or the plugin's Instagram widget on your sidebar.
48
 
49
  = INDIVIDUAL AND MIXED FEEDS =
50
+ You can choose to show a single feed on your pages and posts, but you can make things more interesting and create mixed feeds (Premium version). With single feeds you can show posts from your Instagram account and single hashtag. Mixed feeds, on the other hand, can contain your Instagram account and multiple hashtags. A front end filter is available for mixed feeds (Premium version).
51
 
52
  = FILTERED FEEDS =
53
  Use Conditional Filters of the WD Instagram Feed plugin to display or skip certain content from the feeds by setting up a filter logic and condition types. Add custom condition types if necessary and fine-tune your feeds. Conditional Filters option is available for Premium version only.
54
 
55
  = INSTAGRAM WIDGET =
56
+ Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
57
 
58
  = LIGHTBOX =
59
+ WD Instagram Feed features a powerful lightbox. It provides support for HTML5 video, 15 transition effects (Premium version), filmstrip (Premium version) and carousel features. The lightbox works great with Instagram touch as well.
60
 
61
  = SCROLL AND PAGINATION =
62
+ The plugin comes with a classic pagination with next and previous buttons. You can also choose the infinite scroll option (Premium version) to bring better user experience. This allows to view more images when scrolling the page down. You can set the the number of images you want to show per page.
63
 
64
  = THEMES =
65
  Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. WD Instagram Feed allows you to have separate layout settings for each theme with custom settings for header, user data and pagination.
66
 
67
  = SETTINGS/CUSTOMIZATION =
68
 
69
+ *Some customizations described here are available in Premium version. Please refer to feature summary for additional info.*
70
+
71
+ WD Instagram Feed comes with extensive customization options for the feeds, layouts, themes and content display. Every new feed you add to your website has its own settings for the feed and for the lightbox that pops up when people click on an image or video. Upon clicking on the image you can choose to redirect people to Instagram, open the image in the lightbox, or chose the custom redirect option. There are various image sorting options available based on the date, likes, comments, and on random basis. Media loading options include load more button, infinite Instagram scrolling, or classic pagination with next and previous buttons. You can enable "Follow on Instagram" button from the feed settings and let your visitors follow the displayed Instagram accounts directly from your site. The number of photos you display on the page or post can be specified from the feed settings, as well as the number of the loading images.
72
 
73
 
74
  [Premium version adds](https://web-dorado.com/products/wordpress-instagram-feed-wd.html)
75
 
76
+ * Masonry Layout feeds
77
  * Blog Style Layout feeds
78
  * Image metadata (Instagram tag,image caption, comments, like) display
79
+ * Mixed and multiple feeds (Instagram account posts with multiple hashtags)
80
  * Fully Customizable Themes
81
  * Vertical/horizontal filmstrip in lightbox
82
  * HTML5 Video Support in Lightbox
85
  * Social sharing buttons (Facebook, Twitter, Google+, LinkedIn and Pinterest)
86
  * Infinite scroll for the feed (Similar to Instagram standard)
87
  * Instagram Comments display in Lightbox
88
+ * Instagram Hashtag filtering options
89
  * Conditional Filters
90
 
91
  ###IMPORTANT:
92
+ If you think you found a bug in WD Instagram Feed or wonder how to add Instagram to your website, or how to get Instagram plugin up and running, please check out [Support Forum](https://wordpress.org/support/plugin/wd-instagram-feed). Additional information on how to download Instagram plugin to your website you can find in our user manual If you do not find a solution in the forum, do not hesitate to [click here to contact us](https://web-dorado.com/support/contact-us.html).
93
 
94
  == Installation ==
95
 
96
  #### Thank you for your interest in WD Instagram Feed.
97
 
98
+ Here are two ways of installing WD Instagram Feed: via WordPress backend and via FTP. Let's discuss each case individually:
99
 
100
  **Installing via WordPress**
101
 
102
  Login to the WordPress Administrator Panel.
103
+ Go to Plugins > Add New > Upload.
104
  Click Choose file button and select the zip folder of WD Instagram Feed plugin and press Install now button.
105
  Click Activate button.
106
 
114
 
115
  **Creating an Instagram Feed**
116
 
117
+ Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin. Go to **WD Instagram Feed > Feeds** and press **Add New.** Here you can choose Instagram feed layout and manage lightbox options. From the lightbox options you can enable filmstrip, slideshow, and take full control how custom feed images, image galleries, pictures, Instagram gallery, and videos of this social network are displayed within the lightbox.
118
+
119
+ You can enable autoplay to play photos and Instagram group images similar to an image slider. To get an Instagram slider appearance in the lightbox you'll need to adjust the lightbox and image display settings. Lightbox works great with Instagram touch. The feed will be automatically updated once users share Instagram new images. The feeds support new Instagram carousel feature, and display the images of the responsive carousel.
120
+
121
+ Create an Instagram feed based on one of the available layouts - Thumbnail, Masonry, Blog Style, Image Browser.
122
 
123
 
124
 
125
  == Frequently Asked Questions ==
126
 
127
+ = What can I achieve using Instagram Feed plugin? =
128
+
129
+ WordPress Instagram Feed is a user-friendly plugin with enhanced functionality, which lets you create and showcase Instagram feeds on your WordPress website. You can build **multiple feeds** with the media of **your Instagram account** or **hashtag** by completing just a few simple steps.
130
+
131
+ You will need a couple of minutes to incorporate **Instagram API** to your website. The plugin will automatically create a feed from your Instagram profile. Additionally, you can build Instagram feeds and show posts of your username, as well as **hashtags.**
132
+
133
+ Customize the features of the feeds by configuring advanced settings of Instagram Feed WD plugin. Its user-friendly tools and features allow you fully personalize your feeds, set up conditional filters for feed username and hashtags, modify **image lightbox** settings and more.
134
+
135
+ Control the appearance and layout of your Instagram feed using 4 outstanding **layout types** and **theme options** of Instagram Feed WD plugin. You can publish the feeds with one of the following layouts:
136
+
137
+ * Thumbnails,
138
+ * Masonry,
139
+ * Blog Style,
140
+ * Image Browser.
141
+
142
+ Furthermore, its **lightbox** feature allows you to also display the images as a beautiful image slider in a popup. The themes of Instagram Feed WD plugin let you modify each and every attribute of the feeds.
143
+
144
+ With Instagram Feed WD plugin, you can showcase photos and videos, share wonderful food and travel blog pictures of Instagram with your website visitors. In case you use Instagram for e-commerce, this is the best Instagram plugin to engage your social network followers to your website.
145
+
146
+ The plugin is designed with mobile-friendly layout, letting you provide great user experience on any screen size or device.
147
+
148
+ = How can I get my Instagram Access Token? =
149
+
150
+ To begin creating feeds with WordPress Instagram Feed plugin, you need to configure Instagram app for website and get **Instagram Access Token** first. This is a very simple process. Visit **Instagram Feed > Settings** page from WordPress administrative dashboard to start the setup.
151
+
152
+ Press **Sign in with Instagram** button. In case you are logged in to [Instagram.com](https://www.instagram.com/) from your web browser, **Access Token** and **Username** fields will be automatically filled in. Otherwise, if there are no logged in users, a popup will appear letting you sign in.
153
+
154
+ To use a different Instagram account, simply press **Reset access token and username** button. Afterwards, you can sign out from Instagram.com, and get access token for another Instagram user by logging in again.
155
+
156
+ This is all you need to do, to be able to embed Instagram gallery to your WordPress website. You can then display your Instagram photos and videos as a responsive carousel, as widgets on the sidebar or footer of your site, and more.
157
+
158
+ As soon as you sign in to Instagram and get Access Token, a sample feed is created with your account and placed on a **private page** of your WordPress website. You can view your Instagram image gallery by clicking on **View your feed** button, or modify its settings and appearance by pressing **Edit your feed.** The feed will also appear on **Instagram Feed WD > Feeds** page.
159
+
160
+ Note, that this feed is not visible to website visitors, unless you edit its page and make it **public.**
161
+
162
+ = How to embed Instagram media to my WordPress site? =
163
+
164
+ To begin creating your first feed, navigate to **Feeds** page of Instagram Feed plugin. This page of our Instagram HTML plugin contains a list of all your feeds created with the plugin. You will see the feed of your Instagram timeline appearing on this list.
165
+
166
+ Press **Add New** button to start building your feed and import Instagram posts to your WordPress website.
167
+
168
+ Firstly, make sure to set a **Feed Title** for your feed. Then, let's configure the mandatory settings which are necessary for displaying the feed. Click on **Media** bar to expand these options.
169
+
170
+ Use **Feed Media** drop-down box to choose the content of your Instagram feed. **Feed Usernames and Hashtags** option lets you input your Instagram username and display feeds containing images and videos of your account. You can also add **hashtags** and showcase your posts with those hashtags.
171
+
172
+ Write the usernames without the **@** sign, however for hashtags, you do need to add **#** at the beginning.
173
+
174
+ While using this Instagram media importer tool, make sure to specify one username or hashtag at a time, and press **Add** button each time.
175
+
176
+ You can customize the **sorting** of the media on your feed using the following settings.
177
+
178
+ **Sort Media By** allows you to choose the **parameter,** based on which the photos and videos on your Instagram feed will be ordered. You can select one of the following:
179
+
180
+ * Date,
181
+ * Likes,
182
+ * Comments,
183
+ * Random.
184
+
185
+ **Sorting Order** option lets you specify the **direction** of ordering the Instagram media on your feed. It can have one of the following two values:
186
+
187
+ * Ascending,
188
+ * Descending.
189
+
190
+ **Media** section of feed settings also allows you to change the action which takes place after users click on an image. With **Action OnClick** option, Instagram Feed WD plugin provides 4 functions for this:
191
+
192
+ * **Open Lightbox.** Clicking on a post will open a popup box with the large version of the image or video, letting you navigate through the rest of your feed media just like a slider.
193
+ * **Redirect To Instagram.** This option will redirect users to the same post on Instagram when they click on an item in the feed.
194
+ * **Custom Redirect.** Select this option and specify a link in Redirect URL input box. Users will be taken to this page after clicking on a post in the feed.
195
+ * **Do Nothing.** Clicking on posts of the feed will not trigger any functions.
196
+
197
+ = Can I display more than one Instagram feeds on my website? =
198
+
199
+ Yes, you can add as many Instagram feeds as you want to your website and show them on posts and pages.
200
+
201
+ Add the Instagram feeds to posts and pages by using the **shortcode** provided or choosing from the list by clicking on the Instagram Feed WD button.
202
+
203
+ = What layouts can I use to showcase my Instagram feed? =
204
+
205
+ Instagram Feed plugin provides 4 beautiful layouts, which you can use to showcase the photos and videos on your Instagram feeds. Each of them can be fully personalized to fit the style of your website.
206
+
207
+ Use **Select Layout** option and choose the appearance:
208
+
209
+ * Thumbnails,
210
+ * Masonry,
211
+ * Blog Style,
212
+ * Image Browser.
213
+
214
+ Let's go through all 4 layouts and help you choose the one that suits your site the best.
215
+
216
+ **Thumbnails Layout**
217
+
218
+ **Thumbnails Layout** of Instagram Feed WD plugin provides an equally aligned beautiful Instagram grid, consisting of the thumbnail images of the media on your feed. All thumbnails on this layout are set to have the same dimensions, and you can assign the width and height you like.
219
+
220
+ **Masonry Layout**
221
+
222
+ Just like Thumbnails, **Masonry Layout** is also built with the thumbnail images of Instagram posts. However, its Instagram grid is not aligned equally. The thumbnail images are created as the exact miniatures of their large versions (i.e. the dimensions of thumbnails and large posts are proportional).
223
+
224
+ **Blog Style Layout**
225
+
226
+ **Blog Style Layout** is a perfect choice if you want to post a media file on Instagram and repost the content to WordPress website as a photo blog. The images are displayed with larger dimensions, than on Thumbnails and Masonry Layouts.
227
+
228
+ You can enable captions, descriptions, and hashtags of the media and show them below the posts on your feed.
229
+
230
+ **Image Browser Layout**
231
+
232
+ Just like Blog Style, **Image Browser Layout** of Instagram Feed WD plugin also displays the posts with larger dimensions. However, this layout shows a single large image with navigation buttons, similar to a slideshow. You can navigate through the posts by clicking on **Next** and **Previous** buttons.
233
+
234
+ = How can I personalize the features of my Instagram feed? =
235
+
236
+ Instagram Feed social plugin comes with a number of advanced customization options, which you can use to change the functionality and features of your feeds. You can modify the feed as far as:
237
+
238
+ * changing its **pagination** and **loading,**
239
+ * defining the number of displayed and newly loaded posts,
240
+ * personalizing the settings of all 4 layouts,
241
+ * controlling the **sort order** of the media on your Instagram feed,
242
+ * choosing the attributes to showcase with the feed,
243
+
244
+ and much more.
245
+
246
+ To begin configuring these options, edit your feed and open **Feed Settings** tab. Scroll down a bit to find the following two sections:
247
+
248
+ * Layout and Pagination,
249
+ * Advanced.
250
+
251
+ Let's go through each section and discuss every option individually.
252
+
253
+ **Layout and Pagination**
254
+
255
+ **New Media Loading.** Select the method to use while loading more images and videos on your Instagram feed. You can choose one of the following options:
256
+
257
+ * Pagination,
258
+ * Load More Button,
259
+ * Infinite Scroll,
260
+ * None.
261
+
262
+ **Number of Columns.** Set the number of columns which will be used to align Instagram media in **Thumbnails** and **Masonry** feeds.
263
+
264
+ **Number of Images/Videos.** Specify the number of Instagram media to display when the feed is loaded initially.
265
+
266
+ **Number of New Media.** Set the number of posts which will be added to the feed, after the user clicks on **Load More** button or triggers **Infinite Scroll.**
267
+
268
+ **Combine and Sort Again After Loading More.** If this option is enabled, both newly loaded and existing media are mixed then resorted together according to **Sort Media By** setting.
269
+
270
+ **Make Layout Not Responsive.** When this option is selected, the layout of the feed does not convert to single-column display on small screens. The feed width is shrunk, but the number of columns stays the same.
271
+
272
+ **Number of Media for Initial Preload.** Specify the number of posts to preload, when an Instagram feed is first loaded. This option helps to load a few posts at once, then navigate through the media smoothly. Note, that this setting applies to **Image Browser** feeds only.
273
+
274
+ **Number of Media for Pagination Preload.** Set the number of posts to preload, while the user navigates through the media by clicking on **Next** or **Previous** buttons. Note, that this option is applicable to **Image Browser** layout only.
275
+
276
+ **Advanced**
277
+
278
+ **Theme.** Select the theme which will be used to style the appearance of your Instagram feed. You can edit the theme or create a new one from **Instagram Feed WD > Themes** page.
279
+
280
+ **Feed Media Resolution.** Choose the resolution of the media on your Instagram feed. You can select one of the following options:
281
+
282
+ * Optimal,
283
+ * Standard (640 pixels),
284
+ * Low (320 pixels),
285
+ * Thumbnail (150 pixels).
286
+
287
+ In case **Optimal** is selected, the dimensions of the loaded media are calculated according to the width of feed container. This provides fast loading and no stretching images.
288
+
289
+ **Featured Image.** Set the featured image of the header section of your Instagram feed. The image is pulled from the **user profile** or **hashtag** you select.
290
+
291
+ **Show Feed Header.** Activate this option to display a header on your Instagram feed. It includes **Feed Title** and **Featured Image** you specified.
292
+
293
+ **Show User Data.** If this option is enabled, additional details from the selected accounts and hashtags will be displayed on your Instagram feed. You can activate:
294
+
295
+ * **Follow On Instagram** button,
296
+ * Number of **Posts** and **Followers** of Instagram account/hashtag,
297
+ * **User Bio** of your Instagram account.
298
+
299
+ **Show Media Caption.** Enable this setting to display descriptions of Instagram photos or videos below them, fully or partially.
300
 
301
+ **Show Full Description.** Activate this setting to show the full captions of Instagram media. Note that this option only applies to feeds with **Masonry** layout.
 
302
 
303
+ **Show Number of Likes.** Mark this option as checked to display the number of likes on each Instagram post.
304
 
305
+ **Show Number of Comments.** Display the number of comments on Instagram photos or videos with your feed.
306
 
307
+ **Show Username On Image Thumb.** Activating this setting will let you show your Instagram account username on the images or videos of your feed.
308
+
309
+ = Is it possible to modify the settings of Instagram lightbox? =
310
+
311
+ Instagram Feed plugin comes with a popup box, which appears when users click on a photo or a video in the feed. It lets them display the larger versions of Instagram media, as well as play videos and navigate through the posts.
312
+
313
+ To run the lightbox by clicking on the media, make sure **Action OnClick** option of **Feed Settings** tab is set to **Open Lightbox.**
314
+
315
+ Just like other attributes of Instagram feeds, **Lightbox Settings** can be personalized as well. Edit your feed, then navigate to **Lightbox Settings** tab. Here you will find all the tools which help you tweak the features of the lightbox.
316
+
317
+ The user-friendly lightbox options are divided into the following two main sections:
318
+
319
+ * General Settings,
320
+ * Advanced Settings.
321
+
322
+ Let's discuss these two sections and discover the benefits of the options they provide.
323
+
324
+ **General**
325
+
326
+ **General** section of Lightbox Settings mainly provides options to modify the dimensions and effects on the popup box. You are able to make the following changes:
327
+
328
+ * set the dimensions of the lightbox,
329
+ * configure autoplay and choose from 14 amazing animation effects,
330
+ * activate full-width lightbox,
331
+
332
+ and more.
333
+
334
+ **Advanced**
335
+
336
+ With **Advanced** section of Lightbox settings, you have full control of what's shown with the popup pox of Instagram feed images and videos. It takes just a few steps to get the appearance of the lightbox exactly as you wish to have it.
337
+
338
+ Lightbox Advanced options allow you to:
339
+
340
+ * add a filmstrip to the lightbox, containing the thumbnails of Instagram posts,
341
+ * customize the navigation on the lightbox, adding **Next** and **Previous** buttons,
342
+ * activate image **captions** and display them on the image,
343
+ * enable **right-click protection,** and thus disallow right-click on images and videos,
344
+ * place **share, fullscreen, download** and other control buttons,
345
+ * add **comments section** to the lightbox,
346
+
347
+ and much more.
348
+
349
+ = Can I create mixed Instagram feeds my Instagram account and multiple hashtags? =
350
 
351
+ This option is available in **Premium** version. There, you can create mixed Instagram feeds with your Instagram account and several hashtags. You can even create the combination of both.
352
+
353
+ = I see an invalid access Token error. What should I do? =
354
+
355
+ If you are seeing this alert message on your Instagram Feed WD plugin, please note, that Instagram access tokens expire from time to time. Therefore you need to get new from your Instagram account again.
356
+
357
+ Please sign in to your Instagram account and get a new token. Add it to **Instagram Feed WD > Settings** page.
358
+
359
+ If the token will still cause "Invalid access token" error, revoke access for the plugin [here](www.instagram.com/accounts/manage_access/) and sign in again from **Settings** page.
360
+
361
+ = I would like to display only the Instagram posts which have certain hashtags. How can this be done? =
362
+
363
+ *You can definitely do this with premium version!*
364
+
365
+ In case you wish to showcase Instagram feeds with additional, more definitive filters, **Conditional Filters** feature of Instagram Feed plugin will help you with it. This functionality allows you to show images of your Instagram account with a specific hashtag, skip images which belong to certain hashtags, and more.
366
+
367
+ To begin creating additional filters for your Instagram feed, edit it and navigate to **Conditional Filters** tab. Use **Enable Conditional Filters** to activate the necessary tools.
368
+
369
+ **Feeds to Filter** option shows the basis for conditional filters. These are the username and hashtags you have added to your Instagram feed. The filters will search among the posts of the username and hashtags, and pull those which fulfill the specified condition.
370
+
371
+ Now let's configure the condition itself. First, you need to choose the logical operator of the condition using **Filter Logic** setting. Select one of the following 3 operators:
372
+
373
+ * AND: Shows Instagram posts that belong to **all sources** of filtering.
374
+ * OR: Shows Instagram media which belong to **at least one of the sources** of filtering.
375
+ * NOR: Hides Instagram posts which belong to **at least one of the sources** of filtering.
376
+
377
+ Afterwards, use **Add Condition** option to specify the parameter for the condition, which can be one of the following.
378
+
379
+ * **Hashtag.** If you wish to filter your accout feed with a certain hashtag, you can use this option.
380
+ * **Mention.** This option can be used for feeds both with hashtags and username, i.e. you can display posts where another user is mentioned.
381
+ * **Description.** Just like Mentions, Description can be used both with hashtags and username. You can specify a single keyword or a phrase, which is used in descriptions of your Instagram posts.
382
+ * **Instagram Media Link.** You are able to filter using the shareable link of Instagram media. Simply provide the full URL of the post, as the following example: https://www.instagram.com/p/Be6H6G9lmCQ/
383
+
384
+ Afterwards, select the **Condition Type** for the filter, which corresponds to the parameter you are adding. For instance, in case you are adding #liveauthentic hashtag, the **Condition Type** needs to be set as **Hashtag** as well.
385
+
386
+ Lastly, click **Add Condition** button, and the parameters you have added will be visible below **Result** section. Make sure to press **Save** after you finish configuring the filters.
387
+
388
+ With **Result** option, you will see all of the added filters which will be applied to your Instagram feed.This feature is widely used on Instagram for eCommerce websites, as it serves like an Instagram feed with analytics.
389
+
390
+ = How can I publish the Instagram Feed on my website? =
391
+
392
+ Using WordPress Instagram feed plugin, you can publish your feeds with the following 3 different methods:
393
+
394
+ * on a WordPress **page** or **post,**
395
+ * as a **widget,**
396
+ * on a **custom template** with a **PHP function.**
397
+
398
+ A quick guide for this is provided with **How To Publish Feed** tab above your Instagram feed. Let's go through the necessary steps of each publishing method, and help you choose the one that fits your site the best.
399
+
400
+ **Publishing the Feed on Pages or Posts**
401
+
402
+ To publish Instagram feeds with this method, add or edit the page or post from WordPress administrative dashboard of your website. Click on **Add Instagram Feed** button from the top of the post editor. Afterwards, select the feed you wish to publish and press **Insert.**
403
+
404
+ The **shortcode** of Instagram Feed WD plugin will be added to the content of your page/post.
405
+
406
+ Alternatively, you can copy the shortcode from **Instagram Feed WD > Feeds** dashboard, under **Shortcode** column, and paste it into the content of your WordPress page/post.
407
+
408
+ **Publishing Instagram Feed as a Widget**
409
+
410
+ Navigate to **Appearance > Widgets** page from WordPress administrative dashboard to begin configuring your Instagram feed widget. Firstly, search for **Instagram Feed WD Widget** and drag it to the widget area, where you wish to display your feed.
411
+
412
+ Provide a **Title** for your Instagram Feed, then choose the feed to publish using **Feed** drop-down box. Make sure to specify **Number of Columns,** as well as **Number of images** to show on your Instagram feed.
413
+
414
+ Also, you can activate the following attributes and display them with your feed:
415
+
416
+ * post **descriptions,**
417
+ * **likes** and **comments,**
418
+ * **Load More** button.
419
+
420
+ **Publishing with PHP function**
421
+
422
+ It is also possible to publish Instagram feeds on **custom PHP templates** using their **PHP functions.** To do this, simply copy the PHP function of your feed from **Instagram Feed WD > Feeds** page, then paste it to the necessary section of your custom template.
423
+
424
+ = Is it possible to change the Instagram Feed themes to match my website? =
425
+
426
+ *This is possible in Premium version.*
427
+
428
+ Instagram Feed plugin provides a variety of user-friendly styling options, which let you customize the appearance and features of your Instagram feed even further. You can access these tools from **Instagram Feed WD > Themes** page.
429
+
430
+ By default, Instagram Feed WD plugin comes with 2 themes:
431
+
432
+ * Instagram,
433
+ * Elegant.
434
+
435
+ You can modify and use them on your feeds, or create a new theme with your own configurations. To select a default theme for your Instagram feeds, click on the star icon next to the corresponding entry.
436
+
437
+ Each theme is divided into 2 main sections.
438
+
439
+ **Customizing Feed**
440
+
441
+ These theme settings allow you to modify global styling of your feeds, such as their width, text font, pagination attributes and more. This toolbox consists of the following sub-sections:
442
+
443
+ * **General.** Configure the main parameters of the feed with these options, e.g. **feed container width** and **background color.**
444
+ * **Header.** Edit header parameters, its text **font styles, image size, padding** and other attributes.
445
+ * **User Data.** Set the appearance of user information section above the feeds, such as **text font size,** and the styling of **follow button** and **user bio.**
446
+ * **Pagination.** Modify the styles of **Load More** button, as well as the font size, margins, and alignment of **Pagination** buttons.
447
+ * **Thumbnails, Masonry, Blog Style** and **Image Browser.** Use the options on these tabs to modify default styles of layouts provided by Instagram Feed WD plugin. You can edit the border and padding of **photo wrapper,** text color and font of **post caption, comments** and **likes,** transparency of **image overlay,** and more.
448
+
449
+ **Customizing Lightbox**
450
+
451
+ You can customize each attribute of Instagram Feed WD lightbox using the tools in this section. They will help you change **lightbox background, control button** styles, **filmstrip** position and alignment, and more. Navigate through the following sub-sections to change the options:
452
+
453
+ * General,
454
+ * Control Buttons,
455
+ * Close Button,
456
+ * Navigation Buttons,
457
+ * Filmstrip,
458
+ * Info,
459
+ * Comments.
460
+
461
+ = Where can I change the settings of Instagram Feed plugin? =
462
+
463
+ **Advanced Options** of Instagram Feed WD plugin allow you to modify a few global parameters, that apply to all feeds. Go to **Instagram Feed WD > Settings** page and click on **Advanced Options** bar to expand this toolbox.
464
+
465
+ With **Minimal role to add and manage Feeds or Themes** option, you can select the WordPress user role which will have access to Instagram Feed WD plugin. The user roles of higher levels will also be able to modify and manage the feeds.
466
+
467
+ **Custom CSS** lets you write your own CSS code for your Instagram feeds. This is handy, in case you need to make specific changes regarding the styling of your feed. Whereas with **Custom Javascript** you are able to apply additional scripts.
468
+
469
+ For instance, let's consider you have a feed with **Thumbnails Layout,** and besides displaying the feed, you wish to expand captions for some posts. You can achieve this the following way.
470
+
471
+ Firstly, you need to assign custom **wdi_feed_loaded** event of the plugin to the container of the Instagram feed, then set callback function for this event.
472
+
473
+ Here is an example of a script, which expands captions of posts with 0, 1, 2, 3 indexes:
474
+
475
+ `jQuery('#wdi_feed_0').on('wdi_feed_loaded',function(){
476
+ jQuery('.wdi_photo_title').eq(0).trigger('click');
477
+ jQuery('.wdi_photo_title').eq(1).trigger('click');
478
+ jQuery('.wdi_photo_title').eq(2).trigger('click');
479
+ jQuery('.wdi_photo_title').eq(3).trigger('click');
480
+ });`
481
+
482
+ Make sure to **Save** Changes after you finish modifying Advanced Options.
483
+
484
+ **Uninstalling Instagram Feed WD Plugin**
485
+
486
+ In case you wish to completely remove Instagram Feed WD plugin, you can **Uninstall** it using **Instagram Feed WD > Uninstall** menu item. However, it is important to note, that uninstalling the plugin will delete all feeds, reset all options to their defaults, and remove other data on the plugin.
487
+
488
+ Please make sure you don't have any important information before you proceed.
489
+
490
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  == Screenshots ==
492
 
493
  1. WordPress WD Instagram Feed - Thumbnail layout
498
 
499
  == Changelog ==
500
 
501
+ = 1.2.18 =
502
+ Important: Instagram shut down its API partially without any warning. See [changelog](https://www.instagram.com/developer/endpoints/media/). It is not allowed anymore to display photos from other Instagram accounts which are not your own.
503
+ Sorry.
504
+
505
+ = 1.2.17 =
506
+ Fixed: Video play issue on mac safari
507
+ Changed: Uninstall moved to settings page
508
+
509
  = 1.2.16 =
510
  New: Instagram slideshow is supported in popup
511
  New: UX of feeds and themes admin screen, it is now similar to posts list screen
wd-instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WD Instagram Feed
4
  Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
5
  Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
- Version: 1.2.16
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  License: GPLv2 or later
@@ -21,7 +21,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
21
  //define("wdi",'wdi');
22
  define('WDI_FEED_TABLE','wdi_feeds');
23
  define('WDI_THEME_TABLE','wdi_themes');
24
- define('WDI_VERSION','1.2.16');
25
  define('WDI_IS_PRO','false');
26
  $wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
27
  define('WDI_MINIFY', $wdi_minify);
@@ -277,8 +277,9 @@ function WDI_instagram_menu() {
277
  add_submenu_page($parent_slug,__('Settings',"wd-instagram-feed"),__('Settings',"wd-instagram-feed"),'manage_options','wdi_settings','WDI_instagram_settings_page');
278
  //add_submenu_page('overview_wdi',__('Featured Themes',"wd-instagram-feed"),__('Featured Themes',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_themes','wdi_featured_themes');
279
  //add_submenu_page('overview_wdi',__('Featured Plugins',"wd-instagram-feed"),__('Featured Plugins',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_plugins','wdi_featured_plugins');
280
- add_submenu_page($parent_slug,__('Premium Version',"wd-instagram-feed"),__('Premium Version',"wd-instagram-feed"),$min_feeds_capability,'wdi_licensing','WDI_instagram_licensing_page');
281
- add_submenu_page($parent_slug,__('Uninstall',"wd-instagram-feed"),__('Uninstall',"wd-instagram-feed"),'manage_options','wdi_uninstall','WDI_instagram_uninstall_page');
 
282
  }
283
 
284
  }
@@ -399,6 +400,7 @@ function wdi_load_scripts($hook){
399
  ));
400
  wp_localize_script("wdi_admin", 'wdi_url',array('plugin_url'=> WDI_URL . '/'));
401
  wp_localize_script("wdi_admin", 'wdi_admin',array('admin_url' =>get_admin_url()));
 
402
  }
403
 
404
  if($page == "wdi_uninstall") {
3
  Plugin Name: WD Instagram Feed
4
  Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
5
  Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
+ Version: 1.2.18
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  License: GPLv2 or later
21
  //define("wdi",'wdi');
22
  define('WDI_FEED_TABLE','wdi_feeds');
23
  define('WDI_THEME_TABLE','wdi_themes');
24
+ define('WDI_VERSION','1.2.18');
25
  define('WDI_IS_PRO','false');
26
  $wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
27
  define('WDI_MINIFY', $wdi_minify);
277
  add_submenu_page($parent_slug,__('Settings',"wd-instagram-feed"),__('Settings',"wd-instagram-feed"),'manage_options','wdi_settings','WDI_instagram_settings_page');
278
  //add_submenu_page('overview_wdi',__('Featured Themes',"wd-instagram-feed"),__('Featured Themes',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_themes','wdi_featured_themes');
279
  //add_submenu_page('overview_wdi',__('Featured Plugins',"wd-instagram-feed"),__('Featured Plugins',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_plugins','wdi_featured_plugins');
280
+
281
+ add_submenu_page($parent_slug,__('Pro Version',"wd-instagram-feed"),__('Pro Version',"wd-instagram-feed"),$min_feeds_capability,'wdi_licensing','WDI_instagram_licensing_page');
282
+ add_submenu_page("",__('Uninstall',"wd-instagram-feed"),__('Uninstall',"wd-instagram-feed"),'manage_options','wdi_uninstall','WDI_instagram_uninstall_page');
283
  }
284
 
285
  }
400
  ));
401
  wp_localize_script("wdi_admin", 'wdi_url',array('plugin_url'=> WDI_URL . '/'));
402
  wp_localize_script("wdi_admin", 'wdi_admin',array('admin_url' =>get_admin_url()));
403
+ wp_localize_script("wdi_admin", 'wdi_options',$wdi_options);
404
  }
405
 
406
  if($page == "wdi_uninstall") {