Version Description
Fixed: Error from Instagram after connecting a Personal account. Fixed: Instagram Feed warning after deleting a feed. Fixed: Pagination problem on hashtag feeds..
Download this release
Release Info
Developer | 10web |
Plugin | WD Instagram Feed – Instagram Gallery |
Version | 1.3.18 |
Comparing to | |
See all releases |
Code changes from version 1.3.16 to 1.3.18
- admin-functions.php +1 -1
- admin/views/WDIViewFeeds_wdi.php +4 -4
- admin/views/WDIViewLicensing_wdi.php +1 -1
- admin/views/WDIViewSettings_wdi.php +2 -2
- admin/views/WDIViewThemes_wdi.php +2 -2
- changelog.txt +0 -316
- elementor/elementor.php +4 -0
- elementor/js/wdi_elementor_widget.js +22 -0
- elementor/widget.php +11 -1
- framework/WDILibrary.php +6 -6
- js/wdi_frontend.js +6 -2
- js/wdi_frontend.min.js +1 -1
- readme.txt +37 -29
- templates/plugin-uninstalled.php +1 -1
- wd-instagram-feed.php +23 -23
admin-functions.php
CHANGED
@@ -673,7 +673,7 @@ function wdi_get_settings(){
|
|
673 |
'wdi_access_token' => array('name' => 'wdi_access_token', 'sanitize_type' => 'text', 'input_size' => '53', 'type' => 'input', 'default' => '', 'field_or_not' => 'field', 'section' => 'wdi_configure_section', 'title' => __('Primary Access Token', "wd-instagram-feed")),
|
674 |
'wdi_user_name' => array('name' => 'wdi_user_name', 'sanitize_type' => 'text', 'type' => 'input', 'input_size' => '53', 'section' => 'wdi_configure_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Primary Username', "wd-instagram-feed")),
|
675 |
'wdi_user_id' => array('name' => 'wdi_user_id', 'sanitize_type' => 'text', 'type' => 'input', 'section' => 'wdi_configure_section', 'readonly' => 'readonly', 'default' => '', 'field_or_not' => 'no_field'),
|
676 |
-
'wdi_fb_auth' => array('name'=>'wdi_fb_auth','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_configure_section', 'href'=>wdi_get_graph_auth_url(), 'title'=>__('Log in for hashtag feed',"wd-instagram-feed"),'default'=>'', 'value'=>$fb_button_text, 'description' => 'Connect to Facebook Graph API to get hashtag feeds. See more in <a href="https://help.10web.io/hc/en-us/articles/360021344111" target="_blank">documentation</a>.'),
|
677 |
|
678 |
'wdi_transient_time' => array('name'=>'wdi_transient_time','sanitize_type'=>'number','field_or_not'=>'','type'=>'input', 'input_type'=>'number', 'section'=>'wdi_customize_section', 'title'=>__('Check for new posts every (min)',"wd-instagram-feed"),'default'=>'' ,'value'=>60),
|
679 |
'wdi_reset_cache' => array('name'=>'wdi_reset_cache','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_customize_section', 'href'=>admin_url( 'admin.php?page=wdi_settings' ), 'title'=>__('Reset cache with Instagram data',"wd-instagram-feed"),'default'=>'', 'value'=>'Reset cache'),
|
673 |
'wdi_access_token' => array('name' => 'wdi_access_token', 'sanitize_type' => 'text', 'input_size' => '53', 'type' => 'input', 'default' => '', 'field_or_not' => 'field', 'section' => 'wdi_configure_section', 'title' => __('Primary Access Token', "wd-instagram-feed")),
|
674 |
'wdi_user_name' => array('name' => 'wdi_user_name', 'sanitize_type' => 'text', 'type' => 'input', 'input_size' => '53', 'section' => 'wdi_configure_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Primary Username', "wd-instagram-feed")),
|
675 |
'wdi_user_id' => array('name' => 'wdi_user_id', 'sanitize_type' => 'text', 'type' => 'input', 'section' => 'wdi_configure_section', 'readonly' => 'readonly', 'default' => '', 'field_or_not' => 'no_field'),
|
676 |
+
'wdi_fb_auth' => array('name'=>'wdi_fb_auth','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_configure_section', 'href'=>wdi_get_graph_auth_url(), 'title'=>__('Log in for hashtag feed',"wd-instagram-feed"),'default'=>'', 'value'=>$fb_button_text, 'description' => 'Connect to Facebook Graph API to get hashtag feeds. See more in <a href="https://help.10web.io/hc/en-us/articles/360021344111?utm_source=instagram_feed&utm_medium=free_plugin" target="_blank">documentation</a>.'),
|
677 |
|
678 |
'wdi_transient_time' => array('name'=>'wdi_transient_time','sanitize_type'=>'number','field_or_not'=>'','type'=>'input', 'input_type'=>'number', 'section'=>'wdi_customize_section', 'title'=>__('Check for new posts every (min)',"wd-instagram-feed"),'default'=>'' ,'value'=>60),
|
679 |
'wdi_reset_cache' => array('name'=>'wdi_reset_cache','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_customize_section', 'href'=>admin_url( 'admin.php?page=wdi_settings' ), 'title'=>__('Reset cache with Instagram data',"wd-instagram-feed"),'default'=>'', 'value'=>'Reset cache'),
|
admin/views/WDIViewFeeds_wdi.php
CHANGED
@@ -58,14 +58,14 @@ class WDIViewFeeds_wdi
|
|
58 |
<span class="wdi_help_bar_text">
|
59 |
<?php _e('This section allows you to create, edit and delete Feeds.', "wd-instagram-feed"); ?>
|
60 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
61 |
-
href="https://help.10web.io/hc/en-us/articles/360016497251-Creating-Instagram-Feed"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
62 |
</span>
|
63 |
<div class="wdi_hb_buy_pro">
|
64 |
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
65 |
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
66 |
<?php _e("Support Forum", "gmwd"); ?>
|
67 |
</a>
|
68 |
-
<a class="wdi_update_pro_link" target="_blank" href="https://
|
69 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
70 |
</a>
|
71 |
</div>
|
@@ -526,14 +526,14 @@ public function genarateFeedViews()
|
|
526 |
<span class="wdi_help_bar_text">
|
527 |
<?php _e('Here You Can Change Feed Parameters.', "wd-instagram-feed"); ?>
|
528 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
529 |
-
href="https://help.10web.io/hc/en-us/articles/360016497251-Creating-Instagram-Feed"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
530 |
</span>
|
531 |
<div class="wdi_hb_buy_pro">
|
532 |
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
533 |
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
534 |
<?php _e("Support Forum", "gmwd"); ?>
|
535 |
</a>
|
536 |
-
<a class="wdi_update_pro_link" target="_blank" href="https://
|
537 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
538 |
</a>
|
539 |
</div>
|
58 |
<span class="wdi_help_bar_text">
|
59 |
<?php _e('This section allows you to create, edit and delete Feeds.', "wd-instagram-feed"); ?>
|
60 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
61 |
+
href="https://help.10web.io/hc/en-us/articles/360016497251-Creating-Instagram-Feed?utm_source=instagram_feed&utm_medium=free_plugin"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
62 |
</span>
|
63 |
<div class="wdi_hb_buy_pro">
|
64 |
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
65 |
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
66 |
<?php _e("Support Forum", "gmwd"); ?>
|
67 |
</a>
|
68 |
+
<a class="wdi_update_pro_link" target="_blank" href="https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin">
|
69 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
70 |
</a>
|
71 |
</div>
|
526 |
<span class="wdi_help_bar_text">
|
527 |
<?php _e('Here You Can Change Feed Parameters.', "wd-instagram-feed"); ?>
|
528 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
529 |
+
href="https://help.10web.io/hc/en-us/articles/360016497251-Creating-Instagram-Feed?utm_source=instagram_feed&utm_medium=free_plugin"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
530 |
</span>
|
531 |
<div class="wdi_hb_buy_pro">
|
532 |
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
533 |
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
534 |
<?php _e("Support Forum", "gmwd"); ?>
|
535 |
</a>
|
536 |
+
<a class="wdi_update_pro_link" target="_blank" href="https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin">
|
537 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
538 |
</a>
|
539 |
</div>
|
admin/views/WDIViewLicensing_wdi.php
CHANGED
@@ -27,7 +27,7 @@ class WDIViewLicensing_wdi {
|
|
27 |
<div class="wrap">
|
28 |
<div class="update-nag notice wd-notice wdi_help_bar_wrap">
|
29 |
<div class="wdi_hb_buy_pro">
|
30 |
-
<a class="wdi_update_pro_link" target="_blank" href="https://
|
31 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
32 |
</a>
|
33 |
</div>
|
27 |
<div class="wrap">
|
28 |
<div class="update-nag notice wd-notice wdi_help_bar_wrap">
|
29 |
<div class="wdi_hb_buy_pro">
|
30 |
+
<a class="wdi_update_pro_link" target="_blank" href="https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin">
|
31 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
32 |
</a>
|
33 |
</div>
|
admin/views/WDIViewSettings_wdi.php
CHANGED
@@ -49,14 +49,14 @@ private $model;
|
|
49 |
<span class="wdi_help_bar_text">
|
50 |
<?php _e('This section allows you to set API parameters.', "wd-instagram-feed"); ?>
|
51 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
52 |
-
href="https://help.10web.io/hc/en-us/articles/360016277532-Configuring-Instagram-Access-Token"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
53 |
</span>
|
54 |
<div class="wdi_hb_buy_pro">
|
55 |
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
56 |
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
57 |
<?php _e("Support Forum", "gmwd"); ?>
|
58 |
</a>
|
59 |
-
<a class="wdi_update_pro_link" target="_blank" href="https://
|
60 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
61 |
</a>
|
62 |
</div>
|
49 |
<span class="wdi_help_bar_text">
|
50 |
<?php _e('This section allows you to set API parameters.', "wd-instagram-feed"); ?>
|
51 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
52 |
+
href="https://help.10web.io/hc/en-us/articles/360016277532-Configuring-Instagram-Access-Token?utm_source=instagram_feed&utm_medium=free_plugin"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
53 |
</span>
|
54 |
<div class="wdi_hb_buy_pro">
|
55 |
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
56 |
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
57 |
<?php _e("Support Forum", "gmwd"); ?>
|
58 |
</a>
|
59 |
+
<a class="wdi_update_pro_link" target="_blank" href="https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin">
|
60 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
61 |
</a>
|
62 |
</div>
|
admin/views/WDIViewThemes_wdi.php
CHANGED
@@ -29,14 +29,14 @@ class WDIViewThemes_wdi {
|
|
29 |
<span class="wdi_help_bar_text">
|
30 |
<?php _e('This section allows you to create, edit and delete Themes.', "wd-instagram-feed"); ?>
|
31 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
32 |
-
href="https://help.10web.io/hc/en-us/articles/360016277832"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
33 |
</span>
|
34 |
<div class="wdi_hb_buy_pro">
|
35 |
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
36 |
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
37 |
<?php _e("Support Forum", "gmwd"); ?>
|
38 |
</a>
|
39 |
-
<a class="wdi_update_pro_link" target="_blank" href="https://
|
40 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
41 |
</a>
|
42 |
</div>
|
29 |
<span class="wdi_help_bar_text">
|
30 |
<?php _e('This section allows you to create, edit and delete Themes.', "wd-instagram-feed"); ?>
|
31 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" class="wdi_hb_t_link" target="_blank"
|
32 |
+
href="https://help.10web.io/hc/en-us/articles/360016277832?utm_source=instagram_feed&utm_medium=free_plugin"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
|
33 |
</span>
|
34 |
<div class="wdi_hb_buy_pro">
|
35 |
<a class="wdi_support_link" href="https://wordpress.org/support/plugin/wd-instagram-feed" target="_blank">
|
36 |
<img src="<?php echo WDI_URL; ?>/images/i_support.png" >
|
37 |
<?php _e("Support Forum", "gmwd"); ?>
|
38 |
</a>
|
39 |
+
<a class="wdi_update_pro_link" target="_blank" href="https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin">
|
40 |
<?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
|
41 |
</a>
|
42 |
</div>
|
changelog.txt
DELETED
@@ -1,316 +0,0 @@
|
|
1 |
-
= 1.3.16 =
|
2 |
-
Fixed: First time authorization.
|
3 |
-
|
4 |
-
= 1.3.15 =
|
5 |
-
Added: Banner to install 10Web manager.
|
6 |
-
|
7 |
-
= 1.3.14 =
|
8 |
-
New: Added contributor role in the option 'Minimal role to add and manage Feeds or Themes'.
|
9 |
-
Fixed: Conditional filters for hashtags.
|
10 |
-
|
11 |
-
= 1.3.13 =
|
12 |
-
New: Option to get hashtag top media
|
13 |
-
Improved: Notices during Facebook Log in
|
14 |
-
Fixed: Occasional JS error on front end
|
15 |
-
|
16 |
-
= 1.3.12 =
|
17 |
-
Fixed: Conflict with Gutenberg.
|
18 |
-
|
19 |
-
= 1.3.11 =
|
20 |
-
New: Create hashtag feeds for business profiles using Instagram Graph API
|
21 |
-
|
22 |
-
= 1.3.10 =
|
23 |
-
Fixed: Gutenberg compatibility
|
24 |
-
Fixed: Duplicate media when several filters are applied (Premium)
|
25 |
-
|
26 |
-
= 1.3.9 =
|
27 |
-
Fixed: Free user lib conflict with photo-gallery
|
28 |
-
|
29 |
-
= 1.3.8 =
|
30 |
-
Changed: Links to docs
|
31 |
-
Fixed: Compatibility with Elementor
|
32 |
-
Added: wdi_display_shortcode_button filter
|
33 |
-
|
34 |
-
= 1.3.7 =
|
35 |
-
New: Option to disable loading of Font-Awesome by the plugin
|
36 |
-
Fixed: PHP notice in feed preview
|
37 |
-
Fixed: Issue with admin styles for notices
|
38 |
-
|
39 |
-
= 1.3.6 =
|
40 |
-
Changed: Instagram Feed by 10Web
|
41 |
-
Fixed: Minor bugs when saving feed and opening lightbox
|
42 |
-
|
43 |
-
= 1.3.5 =
|
44 |
-
Changed: Deactivation popup
|
45 |
-
|
46 |
-
= 1.3.4 =
|
47 |
-
New: Display website link in header along with bio
|
48 |
-
|
49 |
-
= 1.3.3 =
|
50 |
-
New: Cache debugging tools
|
51 |
-
New: WD library updated
|
52 |
-
New: GDPR compliance help
|
53 |
-
|
54 |
-
= 1.3.2 =
|
55 |
-
New: Signing up with multiple accounts
|
56 |
-
Fixed: Settings page layout when language is not English
|
57 |
-
|
58 |
-
= 1.3.1 =
|
59 |
-
Fixed: Security issues. Reported by Karan Saini https://www.karansaini.com/
|
60 |
-
|
61 |
-
= 1.3.0 =
|
62 |
-
New: Caching of Instagram data. API rate limits do not constrain feed loading anymore.
|
63 |
-
New: Compatibility with Gutenberg editor.
|
64 |
-
Improved: It is possible now to manually edit access token.
|
65 |
-
Changed: Plugin will output a warning when an incompatible version of Font-Awesome is loaded (SVG generated by JS)
|
66 |
-
Fixed: Cannot correctly include generated styles if site has HTTPS (premium version)
|
67 |
-
Fixed: Conditional filters set up with user's own feed (premium version)
|
68 |
-
Fixed: Error when PHP filter extension is not enabled.
|
69 |
-
Fixed: PHP warning in feed editor page appearing sometimes.
|
70 |
-
|
71 |
-
= 1.2.19 =
|
72 |
-
Fixed: Loading more images (free version)
|
73 |
-
|
74 |
-
= 1.2.18 =
|
75 |
-
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.
|
76 |
-
Sorry.
|
77 |
-
|
78 |
-
= 1.2.17 =
|
79 |
-
Changed: Video play issue on mac safari
|
80 |
-
Changed: Uninstall moved to settings page
|
81 |
-
|
82 |
-
= 1.2.16 =
|
83 |
-
New: Instagram slideshow is supported in popup
|
84 |
-
New: UX of feeds and themes admin screen, it is now similar to posts list screen
|
85 |
-
New: Inline actions for feeds and themes in admin list view
|
86 |
-
Improved: Theme styles are generated as CSS files, not inline styles. Faster page loading and better styles caching.
|
87 |
-
Improved: Popup is faster now and less data is being sent via AJAX
|
88 |
-
|
89 |
-
= 1.2.15 =
|
90 |
-
Added: "How to publish feed" tab in feeds editor screen
|
91 |
-
Added: Closeable metaboxes in feeds editor screen
|
92 |
-
Added: Feed preview button in feeds editor screen
|
93 |
-
Changed: Save, apply and cancel buttons in feed and theme editor screens
|
94 |
-
Changed: Feed and theme title input design
|
95 |
-
Fixed: Minor bugs and conflicts with some themes
|
96 |
-
Improved: Shortcode popup design
|
97 |
-
Removed: Update submenu (Premium)
|
98 |
-
|
99 |
-
= 1.2.14 =
|
100 |
-
Fixed: Conflict with Page Builder by SiteOrigin
|
101 |
-
|
102 |
-
= 1.2.13 =
|
103 |
-
Fixed: Conflict with Divi
|
104 |
-
|
105 |
-
= 1.2.12 =
|
106 |
-
New: Customize feed media resolution. Choose between optimal or custom resolutions, fast loading and higher quality.
|
107 |
-
Improved: Redesigned feed and theme editor screens
|
108 |
-
Improved: More user-friendly names and descriptions of feed settings
|
109 |
-
Improved: UX when access token is expired or have not been obtained yet
|
110 |
-
Improved: UX when there are JS errors on front-end
|
111 |
-
Fixed: Minor: do not include custom scroll bar JS if feed does not have popup
|
112 |
-
|
113 |
-
= 1.2.11 =
|
114 |
-
Changed: Scripts and styles are minified by default
|
115 |
-
Changed: Font-Awesome has been updated to version 4.7.0 and loaded from CDN
|
116 |
-
Changed: Pagination buttons are smaller now in default theme
|
117 |
-
Changed: Deactivation popup
|
118 |
-
|
119 |
-
= 1.2.10 =
|
120 |
-
Fixed: CSS XSS vulnerability in lightbox
|
121 |
-
|
122 |
-
= 1.2.9 =
|
123 |
-
Changed: Web-Dorado links
|
124 |
-
|
125 |
-
= 1.2.8 =
|
126 |
-
Changed: Allow more users and hashtags in feed settings
|
127 |
-
|
128 |
-
= 1.2.7 =
|
129 |
-
Changed: Show notification to install Backup WD plugin only on plugin pages
|
130 |
-
|
131 |
-
= 1.2.6 =
|
132 |
-
Change: Introduction of Backup WD plugin
|
133 |
-
|
134 |
-
= 1.2.5 =
|
135 |
-
Change: "create_function" is not used anymore
|
136 |
-
|
137 |
-
= 1.2.4 =
|
138 |
-
Fixed: Compatibility issue with Better WordPress Minify plugin, thanks to @amityweb for bug report
|
139 |
-
|
140 |
-
= 1.2.3 =
|
141 |
-
Change: WD library updated to version 1.0.11
|
142 |
-
Fixed: Error message when editing feed and token is expired
|
143 |
-
|
144 |
-
= 1.2.2 =
|
145 |
-
New: Redirection to custom URL
|
146 |
-
|
147 |
-
= 1.2.1 =
|
148 |
-
New: Option to disable loading of new images in feed
|
149 |
-
|
150 |
-
= 1.2.0 =
|
151 |
-
New: Default feed
|
152 |
-
Fixed: Infinite scroll triggering (PRO)
|
153 |
-
Fixed: "No media in feed" message on mobile masonry feed
|
154 |
-
Fixed: Minor style conflicts with some themes
|
155 |
-
|
156 |
-
= 1.1.30 =
|
157 |
-
Changed: Frontend styles optimized, loads faster now
|
158 |
-
|
159 |
-
= 1.1.29 =
|
160 |
-
Fixed: Display only published feeds in feeds selector popup for shortcode
|
161 |
-
Changed: UX improvement - no error message when user first inserts a widget then creates feeds
|
162 |
-
|
163 |
-
= 1.1.28 =
|
164 |
-
Fixed: Conflict with some themes
|
165 |
-
|
166 |
-
= 1.1.27 =
|
167 |
-
Fixed: Overriding window.onload function
|
168 |
-
Changed: Some strings on frontend are translatable now
|
169 |
-
|
170 |
-
= 1.1.26 =
|
171 |
-
Fixed: Conflict with Beaver Builder
|
172 |
-
Fixed: Frontend error messages in old Chrome and Safari browsers
|
173 |
-
Changed: Translations hosted on WordPress.org
|
174 |
-
|
175 |
-
= 1.1.25 =
|
176 |
-
New: UX improvements: when authorizing and editing feeds
|
177 |
-
Changed: JavaScript error notices on frontend
|
178 |
-
Fixed: Updates page restored (PRO)
|
179 |
-
Fixed: Deactivation popup in uninstall page (PRO)
|
180 |
-
Fixed: Subscribe after uninstall
|
181 |
-
|
182 |
-
= 1.1.24 =
|
183 |
-
New: Overview page
|
184 |
-
Changed: Deactivation
|
185 |
-
|
186 |
-
= 1.1.23 =
|
187 |
-
Fixed: cropping of "landscape" images in thumbnails layout
|
188 |
-
|
189 |
-
= 1.1.22 =
|
190 |
-
New: message displayed on frontend if feed has no media
|
191 |
-
Fixed: JS errors for media with Instagram's new "Slideshow" feature. This feature is not supported by Instagram's API yet.
|
192 |
-
Changed: Errors by plugin and Instagram API are alerted in frontend only for admins, otherwise output the message to the Web Console
|
193 |
-
Changed: Custom attribute "wdi_media_user" added to media containers in frontend. Useful for adding different event listeners, e.g. custom redirects for every user's media.
|
194 |
-
Changed: Minor style conflicts fixed
|
195 |
-
|
196 |
-
= 1.1.21 =
|
197 |
-
New: Three new plugins added to featured plugins list: Ad Manager WD, Youtube WD and Staff Team WD
|
198 |
-
Fixed: Colors and opacities of share buttons in lightbox (PRO)
|
199 |
-
|
200 |
-
= 1.1.20 =
|
201 |
-
New: Instagram feed displayed in AJAX-loaded content. AJAX request callback needs to call wp_footer() in the end.
|
202 |
-
|
203 |
-
= 1.1.19 =
|
204 |
-
Fixed: Strange bug in Instagram API when user feed pagination is null, causing JS errors in frontend
|
205 |
-
|
206 |
-
= 1.1.18 =
|
207 |
-
Fixed: Frontend filter colors (PRO)
|
208 |
-
Changed: Featured plugins, brand new Mailchimp Forms WD plugin added
|
209 |
-
|
210 |
-
= 1.1.17 =
|
211 |
-
New: Option in feed settings to show small size images and low-bandwidth videos when viewed in mobile devices
|
212 |
-
Fixed: Escaping in custom JS
|
213 |
-
Change: WP 4.7 compatibility - language of frontend content in AJAX response
|
214 |
-
|
215 |
-
= 1.1.16 =
|
216 |
-
Fixed: Unicode "paragraph separator" symbol in media caption crashes lightbox
|
217 |
-
Fixed: Javascript error in admin feed page and styling issue in lightbox because of some non-standard themes
|
218 |
-
|
219 |
-
= 1.1.15 =
|
220 |
-
New: Show hashtag media number in header
|
221 |
-
Fixed: Scripts dependency on underscore.js
|
222 |
-
Fixed: Compatibility issues with Yoast SEO
|
223 |
-
|
224 |
-
= 1.1.14 =
|
225 |
-
Fixed: Single user bio not shown
|
226 |
-
Changed: Plugin logo
|
227 |
-
Changed: Featured plugins logos
|
228 |
-
|
229 |
-
= 1.1.13 =
|
230 |
-
Fixed: Changes in database after plugin version update via FTP or AJAX requests with silent activation
|
231 |
-
|
232 |
-
= 1.1.12 =
|
233 |
-
New: Feed based on liked media (Pro)
|
234 |
-
Fixed: Hidden media in last page
|
235 |
-
Fixed: Minor issues
|
236 |
-
|
237 |
-
= 1.1.11 =
|
238 |
-
Added: Setting to show media descriptions in widget mode (Pro)
|
239 |
-
Fixed: Untranslatable strings in widget editor
|
240 |
-
Change: Featured plugins list
|
241 |
-
|
242 |
-
= 1.1.10 =
|
243 |
-
Added: New text in uninstall page
|
244 |
-
Added: Featured plugins admin page
|
245 |
-
Fixed: Video not centering issue on blogstyle
|
246 |
-
Added: Swedish translations
|
247 |
-
|
248 |
-
= 1.1.9 =
|
249 |
-
New: Option to set minimal user role for adding and managing feeds and themes
|
250 |
-
Fixed: Masonry feed thumbnails overlay opacity (Pro)
|
251 |
-
|
252 |
-
= 1.1.8 =
|
253 |
-
Changed: Font-Awesome updated to version 4.6.3
|
254 |
-
|
255 |
-
= 1.1.7 =
|
256 |
-
New: Featured themes admin page
|
257 |
-
Fixed: Javascript error in hashtag feed
|
258 |
-
|
259 |
-
= 1.1.6 =
|
260 |
-
Change: Added compatibility with "All in one SEO pack" and other plugins running shortcodes in page head
|
261 |
-
|
262 |
-
= 1.1.5 =
|
263 |
-
Fixed: javascript error on firefox and safari
|
264 |
-
|
265 |
-
= 1.1.4 =
|
266 |
-
Fixed: Error handling in case of wrong access_token
|
267 |
-
Fixed: Image description not opening after pagination (Pro)
|
268 |
-
Fixed: Do not show load more button if feed media are finished
|
269 |
-
Fixed: Infinite scroll triggering bug (Pro)
|
270 |
-
|
271 |
-
= 1.1.3 =
|
272 |
-
New: French translation (Thanks to Guillaume Barjou)
|
273 |
-
New: English US and UK translation files. Edit them to change default strings
|
274 |
-
Fixed: Image sizes and overwflows in thumbnails layout
|
275 |
-
Fixed: Lightbox filmstrip thumb styles (Pro)
|
276 |
-
|
277 |
-
= 1.1.2 =
|
278 |
-
Fixed: Bug when saving theme data to some MySQL 5.6 databases
|
279 |
-
Changed: Pagination of hashtag feeds restored
|
280 |
-
Changed: Check and get user id on frontend if empty for some unknown reason
|
281 |
-
|
282 |
-
= 1.1.1 =
|
283 |
-
fix: bug when duplicating feeds
|
284 |
-
|
285 |
-
= 1.1.0 =
|
286 |
-
new: Instagram new API
|
287 |
-
new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
|
288 |
-
|
289 |
-
= 1.0.10 =
|
290 |
-
Temporarily disable pagination in hashtag based feeds
|
291 |
-
Updated Russian Translations ( Thanks to Alex Petrin )
|
292 |
-
|
293 |
-
= 1.0.9 =
|
294 |
-
Bug fixes
|
295 |
-
|
296 |
-
= 1.0.8 =
|
297 |
-
Show video play button when redirect is enabled
|
298 |
-
|
299 |
-
= 1.0.7 =
|
300 |
-
new: Image Hover Effects
|
301 |
-
|
302 |
-
= 1.0.6 =
|
303 |
-
new: Conditional Filters (Pro)
|
304 |
-
new: Option for displaying username in masonry/thumbnails view (Pro)
|
305 |
-
new: Russian translation (Thanks to Ruslan Tertyshny).
|
306 |
-
|
307 |
-
= 1.0.2 =
|
308 |
-
fix: PHP error after plugin update
|
309 |
-
|
310 |
-
= 1.0.1 =
|
311 |
-
fix: PHP 5.3 compatibility
|
312 |
-
fix: video redirect bug
|
313 |
-
change: user info styles
|
314 |
-
|
315 |
-
= 1.0.0 =
|
316 |
-
Initial version
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elementor/elementor.php
CHANGED
@@ -13,6 +13,7 @@ class WDIElementor {
|
|
13 |
private function __construct(){
|
14 |
// Register widget for Elementor builder.
|
15 |
add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widgets'));
|
|
|
16 |
|
17 |
if(!defined('TWBB_VERSION')) {
|
18 |
//fires after elementor editor styles and scripts are enqueued.
|
@@ -36,6 +37,9 @@ class WDIElementor {
|
|
36 |
public function enqueue_editor_styles(){
|
37 |
wp_enqueue_style('twbb-editor-styles', plugin_dir_url(__FILE__) . 'styles/editor.css', array(), '1.0.0');
|
38 |
}
|
|
|
|
|
|
|
39 |
|
40 |
public function register_widget_category($elements_manager){
|
41 |
$elements_manager->add_category('tenweb-plugins-widgets', array(
|
13 |
private function __construct(){
|
14 |
// Register widget for Elementor builder.
|
15 |
add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widgets'));
|
16 |
+
add_action('elementor/editor/after_enqueue_scripts', array($this, 'enqueue_elementor_widget_scripts'));
|
17 |
|
18 |
if(!defined('TWBB_VERSION')) {
|
19 |
//fires after elementor editor styles and scripts are enqueued.
|
37 |
public function enqueue_editor_styles(){
|
38 |
wp_enqueue_style('twbb-editor-styles', plugin_dir_url(__FILE__) . 'styles/editor.css', array(), '1.0.0');
|
39 |
}
|
40 |
+
public function enqueue_elementor_widget_scripts(){
|
41 |
+
wp_enqueue_script('twbb_editor_widget_js', plugin_dir_url(__FILE__) . 'js/wdi_elementor_widget.js', array('jquery'));
|
42 |
+
}
|
43 |
|
44 |
public function register_widget_category($elements_manager){
|
45 |
$elements_manager->add_category('tenweb-plugins-widgets', array(
|
elementor/js/wdi_elementor_widget.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery("document").ready(function () {
|
2 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wdi-elementor', function( panel, model, view ) {
|
3 |
+
var wdi_el = jQuery('select[data-setting="wdi_feeds"]',window.parent.document);
|
4 |
+
wdi_add_edit_link(wdi_el);
|
5 |
+
});
|
6 |
+
jQuery('body').on('change', 'select[data-setting="wdi_feeds"]',window.parent.document, function (){
|
7 |
+
wdi_add_edit_link(jQuery(this));
|
8 |
+
});
|
9 |
+
});
|
10 |
+
|
11 |
+
function wdi_add_edit_link(el) {
|
12 |
+
var wdi_el = el;
|
13 |
+
var wdi_id = wdi_el.val();
|
14 |
+
var a_link = wdi_el.closest('.elementor-control-content').find('.elementor-control-field-description').find('a');
|
15 |
+
var new_link = 'admin.php?page=wdi_feeds';
|
16 |
+
if(wdi_id !== '0'){
|
17 |
+
new_link = 'admin.php?page=wdi_feeds&task=edit¤t_id='+wdi_el.val();
|
18 |
+
}
|
19 |
+
a_link.attr( 'href', new_link);
|
20 |
+
}
|
21 |
+
|
22 |
+
|
elementor/widget.php
CHANGED
@@ -58,6 +58,15 @@ class WDIElementorWidget extends \Elementor\Widget_Base {
|
|
58 |
]
|
59 |
);
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
$this->add_control(
|
62 |
'wdi_feeds',
|
63 |
[
|
@@ -66,7 +75,8 @@ class WDIElementorWidget extends \Elementor\Widget_Base {
|
|
66 |
'description' => __('', 'wd-instagram-feed'),
|
67 |
'type' => \Elementor\Controls_Manager::SELECT,
|
68 |
'default' => $this->default_feed,
|
69 |
-
'options' => $this->feed_options
|
|
|
70 |
]
|
71 |
);
|
72 |
|
58 |
]
|
59 |
);
|
60 |
|
61 |
+
$wdi_feed_id = $this->default_feed;
|
62 |
+
if(isset($settings) && isset($settings["wdi_feeds"]) && intval($settings["wdi_feeds"])>0){
|
63 |
+
$wdi_feed_id = intval($settings["wdi_feeds"]);
|
64 |
+
}
|
65 |
+
if(intval($this->default_feed) !==0){
|
66 |
+
$wdi_edit_link = add_query_arg(array( 'page' => 'wdi_feeds&task=edit¤t_id='.$wdi_feed_id), admin_url('admin.php'));
|
67 |
+
}else{
|
68 |
+
$wdi_edit_link = add_query_arg(array( 'page' => 'wdi_feeds'), admin_url('admin.php'));
|
69 |
+
}
|
70 |
$this->add_control(
|
71 |
'wdi_feeds',
|
72 |
[
|
75 |
'description' => __('', 'wd-instagram-feed'),
|
76 |
'type' => \Elementor\Controls_Manager::SELECT,
|
77 |
'default' => $this->default_feed,
|
78 |
+
'options' => $this->feed_options,
|
79 |
+
'description' => __('Select the feed to display.', 'wd-instagram-feed') .' <a target="_balnk" " href="' . $wdi_edit_link . '">' . __('Edit feed', 'wd-instagram-feed') . '</a>',
|
80 |
]
|
81 |
);
|
82 |
|
framework/WDILibrary.php
CHANGED
@@ -970,13 +970,13 @@ class WDILibrary {
|
|
970 |
$users = json_decode($feed_row['feed_users']);
|
971 |
$new_users_list = array();
|
972 |
$users_list = self::get_users_list();
|
973 |
-
|
974 |
-
|
975 |
-
if(substr($user->username,0,1) === '#' || $user->username === $wdi_options['wdi_user_name'] || !empty($users_list[$user->username])){
|
976 |
-
|
|
|
977 |
}
|
978 |
}
|
979 |
-
|
980 |
$feed_row['nothing_to_display'] = (empty($new_users_list)) ? '1' : '0';
|
981 |
$feed_row['feed_users'] = json_encode($new_users_list);
|
982 |
|
@@ -1099,7 +1099,7 @@ class WDILibrary {
|
|
1099 |
$new_url = urlencode(admin_url('admin.php?page=wdi_settings')) . '&response_type=token&state='. admin_url('admin.php?wdi_settings');
|
1100 |
?>
|
1101 |
<a onclick="document.cookie = 'wdi_autofill=true'" class="wdi_sign_in_button"
|
1102 |
-
href="https://api.instagram.com/oauth/authorize/?client_id=54da896cf80343ecb0e356ac5479d9ec&scope=basic
|
1103 |
<?php echo $text; ?>
|
1104 |
</a>
|
1105 |
<?php
|
970 |
$users = json_decode($feed_row['feed_users']);
|
971 |
$new_users_list = array();
|
972 |
$users_list = self::get_users_list();
|
973 |
+
if(is_array($users)) {
|
974 |
+
foreach($users as $i => $user) {
|
975 |
+
if(substr($user->username, 0, 1) === '#' || $user->username === $wdi_options['wdi_user_name'] || !empty($users_list[$user->username])) {
|
976 |
+
$new_users_list[] = $user;
|
977 |
+
}
|
978 |
}
|
979 |
}
|
|
|
980 |
$feed_row['nothing_to_display'] = (empty($new_users_list)) ? '1' : '0';
|
981 |
$feed_row['feed_users'] = json_encode($new_users_list);
|
982 |
|
1099 |
$new_url = urlencode(admin_url('admin.php?page=wdi_settings')) . '&response_type=token&state='. admin_url('admin.php?wdi_settings');
|
1100 |
?>
|
1101 |
<a onclick="document.cookie = 'wdi_autofill=true'" class="wdi_sign_in_button"
|
1102 |
+
href="https://api.instagram.com/oauth/authorize/?client_id=54da896cf80343ecb0e356ac5479d9ec&scope=basic&redirect_uri=http://api.web-dorado.com/instagram/?return_url=<?php echo $new_url; ?>">
|
1103 |
<?php echo $text; ?>
|
1104 |
</a>
|
1105 |
<?php
|
js/wdi_frontend.js
CHANGED
@@ -1464,6 +1464,10 @@ wdi_front.createObject = function (obj, currentFeed)
|
|
1464 |
else if(media_standard_h < media_standard_w){
|
1465 |
wdi_shape = 'landscape';
|
1466 |
}
|
|
|
|
|
|
|
|
|
1467 |
var photoObject = {
|
1468 |
'id': obj['id'],
|
1469 |
'caption': wdi_front.escape_tags(caption),
|
@@ -1472,10 +1476,10 @@ wdi_front.createObject = function (obj, currentFeed)
|
|
1472 |
'comments': obj['comments']['count'],
|
1473 |
'wdi_index': imageIndex,
|
1474 |
'wdi_res_index': currentFeed.resIndex,
|
1475 |
-
'wdi_media_user':
|
1476 |
'link': obj['link'],
|
1477 |
'video_url': videoUrl,
|
1478 |
-
'wdi_username':
|
1479 |
'wdi_shape': wdi_shape
|
1480 |
};
|
1481 |
return photoObject;
|
1464 |
else if(media_standard_h < media_standard_w){
|
1465 |
wdi_shape = 'landscape';
|
1466 |
}
|
1467 |
+
var obj_user_name = obj['user']['username'];
|
1468 |
+
if(obj_user_name === ""){
|
1469 |
+
obj_user_name = "no_user";
|
1470 |
+
}
|
1471 |
var photoObject = {
|
1472 |
'id': obj['id'],
|
1473 |
'caption': wdi_front.escape_tags(caption),
|
1476 |
'comments': obj['comments']['count'],
|
1477 |
'wdi_index': imageIndex,
|
1478 |
'wdi_res_index': currentFeed.resIndex,
|
1479 |
+
'wdi_media_user': obj_user_name,
|
1480 |
'link': obj['link'],
|
1481 |
'video_url': videoUrl,
|
1482 |
+
'wdi_username': obj_user_name,
|
1483 |
'wdi_shape': wdi_shape
|
1484 |
};
|
1485 |
return photoObject;
|
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.escape_tags=function(e){var b=/</g,c=/>/g,d=/'/g,a=/"/g;if(typeof e=="undefined"){e=""}e=e.toString().replace(b,"<").replace(c,">").replace(d,"'").replace(a,""");return e};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(d){jQuery(".wdi_js_error").hide();d.photoCounter=d.feed_row.number_of_photos;if(d.feed_row.liked_feed=="liked"){d.feed_users=["self"]}else{if(wdi_front.isJsonString(d.feed_row.feed_users)){d.feed_users=JSON.parse(d.feed_row.feed_users)}else{wdi_front.show_alert(wdi_front_messages.invalid_users_format,false,d);return}}var e=[];if(typeof window.wdi_all_tags!=="undefined"){e=window.wdi_all_tags}for(var a=0;a<d.feed_users.length;a++){if(d.feed_users[a].username[0]==="#"&&typeof d.feed_users[a].tag_id!=="undefined"){e[d.feed_users[a].tag_id]=d.feed_users[a]}}window.wdi_all_tags=e;d.dataCount=d.feed_users.length;var b=wdi_front.getFeedItemResolution(d);d.feedImageResolution=b.image;d.feedVideoResolution=b.video;for(var c=0;c<d.dataCount;c++){wdi_front.instagramRequest(c,d)}if(d.feed_row.number_of_photos>0){wdi_front.ajaxLoader(d)}if(d.feed_row["display_header"]==="1"){wdi_front.show("header",d)}if(d.feed_row["show_usernames"]==="1"){wdi_front.show("users",d)}};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)}}},null,b.feed_row.hashtag_top_recent)}else{if(this.getInputType(a[d]["username"])=="user"){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")||d[e]["type"]=="video"){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"]:" ";var i="";if(e.type=="video"){i=e.hasOwnProperty("videos")?e.videos[h.feedVideoResolution]["url"]:""}if(typeof e.images[h.feedImageResolution]=="undefined"){var f=wdi_url.plugin_url+"images/missing.png"}else{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:wdi_front.escape_tags(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"> <%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= 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"> <%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= 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"> <%= likes%></i></div>'}if(h.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= 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="";var g=function(h){if(typeof h.meta!="undefined"&&typeof h.meta.error_type!="undefined"){wdi_front.show_alert(false,h,e)}if(h===""||typeof h=="undefined"||h==null){c=wdi_front_messages.network_error;e.loadMoreDataCount--;wdi_front.show_alert(c,h,e);return}if(h.meta["code"]!=200){c=h.meta["error_message"];e.loadMoreDataCount--;wdi_front.show_alert(c,h,e);return}h.user_id=b.user_id;h.username=b.username;for(var j=0;j<e.usersData.length;j++){if(h.user_id===e.usersData[j]["user_id"]){if(h.user_id[0]==="#"){h.data=wdi_front.appendRequestHashtag(h.data,h.user_id)}if(d=="initial-keep"){e.temproraryUsersData[j]=e.usersData[j]}e.usersData[j]=h;e.loadMoreDataCount--}}wdi_front.checkForLoadMoreDone(e,d)};if(b.username[0]!=="#"){e.instagram.requestByUrl(a,{success:g})}else{e.instagram.getTagRecentMedia(b.username,{success:g},a,e.feed_row.hashtag_top_recent)}};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(d){var b=d.src.split("/p/");if(typeof b[0]!=="undefined"&&typeof b[1]!=="undefined"&&b[0]!=="https://www.instagram.com"){var a=wdi_baseName(b[0]);var c=a+"/p/"+b[1];d.src=c}else{d.src=wdi_url.plugin_url+"images/missing.png"}d.onerror="";return true};function wdi_baseName(b){var a=b.substr(b.lastIndexOf("/"));return b.replace(a,"")}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:wdi_front.escape_tags(o.data["bio"]),counts:o.data["counts"],website:wdi_front.escape_tags(o.data["website"]),full_name:wdi_front.escape_tags(o.data["full_name"])};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}else{if(false&&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:wdi_front.escape_tags(o.data["bio"]),counts:o.data["counts"],website:wdi_front.escape_tags(o.data["website"]),full_name:wdi_front.escape_tags(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 v={flag:false,id:i[q]["id"],name:i[q]["name"]};var p=(i[q]["name"][0]=="#")?"wdi_header_hashtag":"";var u=wdi_extractHostname(i[q]["website"]);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:wdi_front.escape_tags(i[q]["bio"]),website:u,website_url:i[q]["website"],usersCount:t.feed_row.feed_users.length,hashtagClass:p};var x=wdi_front.getUserTemplate(t,i[q]["name"]),r=x(o),s=d.find(".wdi_feed_users").html();d.find(".wdi_feed_users").html(s+r);t.userSortFlags.push(v);var w=jQuery('<div class="wdi_clear"></div>')}d.find(".wdi_feed_users").append(w);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"></span><%= counts.media%></p><p class="wdi_followers"><span class="fa fa-user"></span><%= counts.followed_by%></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"></span><%= counts.media%></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 class="wdi_website"><a target="_blank" href="<%= website_url%>" ><%= website%></a></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(((typeof c.dataStorageList[b]["user"]["id"]!="undefined"&&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)?wdi_front.escape_tags(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=wdi_front_messages.connection_error;wdi_front.show_alert(errorMessage,a,b);return false}if(a.meta["code"]!=200){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)){if(typeof c[b].pagination.cursors!=="undefined"){d=c[b].pagination.cursors.after}}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}})}jQuery(document).ready(function(){setTimeout(function(){if(wdi_front_messages.show_alerts==="1"&&jQuery(".wdi_check_fontawesome .fa-instagram").prop("tagName")!=="I"){console.log("Font Awesome is not loaded properly. Please ask for support https://wordpress.org/support/plugin/wd-instagram-feed/")}},2000)});function wdi_extractHostname(b){if(typeof b==="undefined"||b===""){return""}var a=b.replace(/(^\w+:|^)\/\//,"");return a};
|
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.escape_tags=function(e){var b=/</g,c=/>/g,d=/'/g,a=/"/g;if(typeof e=="undefined"){e=""}e=e.toString().replace(b,"<").replace(c,">").replace(d,"'").replace(a,""");return e};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(d){jQuery(".wdi_js_error").hide();d.photoCounter=d.feed_row.number_of_photos;if(d.feed_row.liked_feed=="liked"){d.feed_users=["self"]}else{if(wdi_front.isJsonString(d.feed_row.feed_users)){d.feed_users=JSON.parse(d.feed_row.feed_users)}else{wdi_front.show_alert(wdi_front_messages.invalid_users_format,false,d);return}}var e=[];if(typeof window.wdi_all_tags!=="undefined"){e=window.wdi_all_tags}for(var a=0;a<d.feed_users.length;a++){if(d.feed_users[a].username[0]==="#"&&typeof d.feed_users[a].tag_id!=="undefined"){e[d.feed_users[a].tag_id]=d.feed_users[a]}}window.wdi_all_tags=e;d.dataCount=d.feed_users.length;var b=wdi_front.getFeedItemResolution(d);d.feedImageResolution=b.image;d.feedVideoResolution=b.video;for(var c=0;c<d.dataCount;c++){wdi_front.instagramRequest(c,d)}if(d.feed_row.number_of_photos>0){wdi_front.ajaxLoader(d)}if(d.feed_row["display_header"]==="1"){wdi_front.show("header",d)}if(d.feed_row["show_usernames"]==="1"){wdi_front.show("users",d)}};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)}}},null,b.feed_row.hashtag_top_recent)}else{if(this.getInputType(a[d]["username"])=="user"){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")||d[e]["type"]=="video"){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,i){var k=(e.caption!=null)?e.caption["text"]:" ";var j="";if(e.type=="video"){j=e.hasOwnProperty("videos")?e.videos[i.feedVideoResolution]["url"]:""}if(typeof e.images[i.feedImageResolution]=="undefined"){var f=wdi_url.plugin_url+"images/missing.png"}else{var f=e.images[i.feedImageResolution].url}var a=i.imageIndex;var b="square";var d=e.images["standard_resolution"]["height"];var h=e.images["standard_resolution"]["width"];if(d>h){b="portrait"}else{if(d<h){b="landscape"}}var g=e.user["username"];if(g===""){g="no_user"}var c={id:e.id,caption:wdi_front.escape_tags(k),image_url:f,likes:e.likes["count"],comments:e.comments["count"],wdi_index:a,wdi_res_index:i.resIndex,wdi_media_user:g,link:e.link,video_url:j,wdi_username:g,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"> <%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= 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"> <%= likes%></i></div>'}if(g.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= 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"> <%= likes%></i></div>'}if(h.feed_row["show_comments"]==="1"){a+='<div class="wdi_thumb_comments"><i class="fa fa-comment-o"> <%= 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="";var g=function(h){if(typeof h.meta!="undefined"&&typeof h.meta.error_type!="undefined"){wdi_front.show_alert(false,h,e)}if(h===""||typeof h=="undefined"||h==null){c=wdi_front_messages.network_error;e.loadMoreDataCount--;wdi_front.show_alert(c,h,e);return}if(h.meta["code"]!=200){c=h.meta["error_message"];e.loadMoreDataCount--;wdi_front.show_alert(c,h,e);return}h.user_id=b.user_id;h.username=b.username;for(var j=0;j<e.usersData.length;j++){if(h.user_id===e.usersData[j]["user_id"]){if(h.user_id[0]==="#"){h.data=wdi_front.appendRequestHashtag(h.data,h.user_id)}if(d=="initial-keep"){e.temproraryUsersData[j]=e.usersData[j]}e.usersData[j]=h;e.loadMoreDataCount--}}wdi_front.checkForLoadMoreDone(e,d)};if(b.username[0]!=="#"){e.instagram.requestByUrl(a,{success:g})}else{e.instagram.getTagRecentMedia(b.username,{success:g},a,e.feed_row.hashtag_top_recent)}};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(d){var b=d.src.split("/p/");if(typeof b[0]!=="undefined"&&typeof b[1]!=="undefined"&&b[0]!=="https://www.instagram.com"){var a=wdi_baseName(b[0]);var c=a+"/p/"+b[1];d.src=c}else{d.src=wdi_url.plugin_url+"images/missing.png"}d.onerror="";return true};function wdi_baseName(b){var a=b.substr(b.lastIndexOf("/"));return b.replace(a,"")}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:wdi_front.escape_tags(o.data["bio"]),counts:o.data["counts"],website:wdi_front.escape_tags(o.data["website"]),full_name:wdi_front.escape_tags(o.data["full_name"])};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}else{if(false&&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:wdi_front.escape_tags(o.data["bio"]),counts:o.data["counts"],website:wdi_front.escape_tags(o.data["website"]),full_name:wdi_front.escape_tags(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 v={flag:false,id:i[q]["id"],name:i[q]["name"]};var p=(i[q]["name"][0]=="#")?"wdi_header_hashtag":"";var u=wdi_extractHostname(i[q]["website"]);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:wdi_front.escape_tags(i[q]["bio"]),website:u,website_url:i[q]["website"],usersCount:t.feed_row.feed_users.length,hashtagClass:p};var x=wdi_front.getUserTemplate(t,i[q]["name"]),r=x(o),s=d.find(".wdi_feed_users").html();d.find(".wdi_feed_users").html(s+r);t.userSortFlags.push(v);var w=jQuery('<div class="wdi_clear"></div>')}d.find(".wdi_feed_users").append(w);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"></span><%= counts.media%></p><p class="wdi_followers"><span class="fa fa-user"></span><%= counts.followed_by%></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"></span><%= counts.media%></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 class="wdi_website"><a target="_blank" href="<%= website_url%>" ><%= website%></a></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(((typeof c.dataStorageList[b]["user"]["id"]!="undefined"&&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)?wdi_front.escape_tags(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=wdi_front_messages.connection_error;wdi_front.show_alert(errorMessage,a,b);return false}if(a.meta["code"]!=200){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)){if(typeof c[b].pagination.cursors!=="undefined"){d=c[b].pagination.cursors.after}}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}})}jQuery(document).ready(function(){setTimeout(function(){if(wdi_front_messages.show_alerts==="1"&&jQuery(".wdi_check_fontawesome .fa-instagram").prop("tagName")!=="I"){console.log("Font Awesome is not loaded properly. Please ask for support https://wordpress.org/support/plugin/wd-instagram-feed/")}},2000)});function wdi_extractHostname(b){if(typeof b==="undefined"||b===""){return""}var a=b.replace(/(^\w+:|^)\/\//,"");return a};
|
readme.txt
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
=== 10Web
|
2 |
Contributors: webdorado,10web,progmastery
|
3 |
Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.2
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
10Web
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
10Web
|
16 |
|
17 |
= Useful Links: =
|
18 |
|
19 |
[Live Demo](https://demo.10web.io/instagram-feed/)
|
20 |
|
21 |
-
[Premium
|
22 |
|
23 |
[Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
|
24 |
|
@@ -26,9 +26,9 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
26 |
https://www.youtube.com/watch?v=CgZNya0HZCQ
|
27 |
|
28 |
|
29 |
-
10Web
|
30 |
|
31 |
-
10Web
|
32 |
|
33 |
|
34 |
== Benefits ==
|
@@ -38,8 +38,8 @@ https://www.youtube.com/watch?v=CgZNya0HZCQ
|
|
38 |
* **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.
|
39 |
* **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.
|
40 |
* **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.
|
41 |
-
* **Support** - The team behind 10Web
|
42 |
-
* **Resource efficient** - WordPress 10Web
|
43 |
|
44 |
|
45 |
|
@@ -55,25 +55,25 @@ Create Instagram galleries on your website by embedding entire timelines to your
|
|
55 |
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).
|
56 |
|
57 |
= FILTERED FEEDS =
|
58 |
-
Use Conditional Filters of the 10Web
|
59 |
|
60 |
= INSTAGRAM WIDGET =
|
61 |
Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
|
62 |
|
63 |
= LIGHTBOX =
|
64 |
-
10Web
|
65 |
|
66 |
= SCROLL AND PAGINATION =
|
67 |
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.
|
68 |
|
69 |
= THEMES =
|
70 |
-
Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. 10Web
|
71 |
|
72 |
= SETTINGS/CUSTOMIZATION =
|
73 |
|
74 |
*Some customizations described here are available in Premium version. Please refer to feature summary for additional info.*
|
75 |
|
76 |
-
10Web
|
77 |
|
78 |
|
79 |
[Premium version adds](https://10web.io/plugins/wordpress-instagram-feed/)
|
@@ -94,32 +94,32 @@ Choose from the two default themes offered by the plugin or create multifarious
|
|
94 |
* Conditional Filters
|
95 |
|
96 |
###IMPORTANT:
|
97 |
-
If you think you found a bug in 10Web
|
98 |
|
99 |
== Installation ==
|
100 |
|
101 |
-
#### Thank you for your interest in 10Web
|
102 |
|
103 |
-
Here are two ways of installing 10Web
|
104 |
|
105 |
**Installing via WordPress**
|
106 |
|
107 |
Login to the WordPress Administrator Panel.
|
108 |
Go to Plugins > Add New > Upload.
|
109 |
-
Click Choose file button and select the zip folder of 10Web
|
110 |
Click Activate button.
|
111 |
|
112 |
**Installing via FTP**
|
113 |
|
114 |
Login to your hosting space via an FTP software, e.g. FileZilla.
|
115 |
-
Unzip the downloaded 10Web
|
116 |
Upload the Instagram plugin into the following location wp-content>wp-plugins.
|
117 |
Login to the WordPress Administrator Panel.
|
118 |
-
Activate 10Web
|
119 |
|
120 |
**Creating an Instagram Feed**
|
121 |
|
122 |
-
Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin. Go to **10Web
|
123 |
|
124 |
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.
|
125 |
|
@@ -495,19 +495,27 @@ Please make sure you don't have any important information before you proceed.
|
|
495 |
|
496 |
== Screenshots ==
|
497 |
|
498 |
-
1. WordPress 10Web
|
499 |
-
2. WordPress 10Web
|
500 |
-
3. WordPress 10Web
|
501 |
-
4. WordPress 10Web
|
502 |
-
5. WordPress 10Web
|
503 |
|
504 |
== Privacy Policy ==
|
505 |
-
10Web
|
506 |
|
507 |
== Changelog ==
|
508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
= 1.3.16 =
|
510 |
-
Fixed: First time authorization.
|
511 |
|
512 |
= 1.3.15 =
|
513 |
Added: Banner to install 10Web manager.
|
@@ -641,7 +649,7 @@ Change: Introduction of Backup WD plugin
|
|
641 |
Change: "create_function" is not used anymore
|
642 |
|
643 |
= 1.2.4 =
|
644 |
-
Fixed: 10Web
|
645 |
|
646 |
= 1.2.3 =
|
647 |
Change: WD library updated to version 1.0.11
|
@@ -789,7 +797,7 @@ Changed: Check and get user id on frontend if empty for some unknown reason
|
|
789 |
Fixed: Bug when duplicating feeds
|
790 |
|
791 |
= 1.1.0 =
|
792 |
-
**IMPORTANT: Instagram changed the API. You need to get a new access token by using "Sign in with Instagram" button on the Settings page in order to keep your 10Web
|
793 |
new: Instagram new API
|
794 |
new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
|
795 |
|
1 |
+
=== 10Web Social Feed ===
|
2 |
Contributors: webdorado,10web,progmastery
|
3 |
Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.2
|
7 |
+
Stable tag: 1.3.18
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Formerly "10Web Istagram Feed". 10Web Social Feed for Instagram is the leading plugin for easily presenting a customizable Instagram feed on your website.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
10Web Social Feed for Instagram is the leading plugin for easily presenting a customizable Instagram feed on your website.
|
16 |
|
17 |
= Useful Links: =
|
18 |
|
19 |
[Live Demo](https://demo.10web.io/instagram-feed/)
|
20 |
|
21 |
+
[Premium 10Web Social Feed for Instagram](https://10web.io/plugins/wordpress-instagram-feed/)
|
22 |
|
23 |
[Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
|
24 |
|
26 |
https://www.youtube.com/watch?v=CgZNya0HZCQ
|
27 |
|
28 |
|
29 |
+
10Web Social Feed for Instagram 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. 10Web Social Feed for Instagram's settings and features will allow you to take full control over how to display the feeds and the content on your website.
|
30 |
|
31 |
+
10Web Social Feed for Instagram 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.
|
32 |
|
33 |
|
34 |
== Benefits ==
|
38 |
* **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.
|
39 |
* **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.
|
40 |
* **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.
|
41 |
+
* **Support** - The team behind 10Web Social Feed for Instagram provides timely and effective support to all its users. We keep standards high and response time low.
|
42 |
+
* **Resource efficient** - WordPress 10Web Social Feed for Instagram 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.
|
43 |
|
44 |
|
45 |
|
55 |
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).
|
56 |
|
57 |
= FILTERED FEEDS =
|
58 |
+
Use Conditional Filters of the 10Web Social Feed for Instagram 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.
|
59 |
|
60 |
= INSTAGRAM WIDGET =
|
61 |
Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
|
62 |
|
63 |
= LIGHTBOX =
|
64 |
+
10Web Social Feed for Instagram 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.
|
65 |
|
66 |
= SCROLL AND PAGINATION =
|
67 |
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.
|
68 |
|
69 |
= THEMES =
|
70 |
+
Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. 10Web Social Feed for Instagram allows you to have separate layout settings for each theme with custom settings for header, user data and pagination.
|
71 |
|
72 |
= SETTINGS/CUSTOMIZATION =
|
73 |
|
74 |
*Some customizations described here are available in Premium version. Please refer to feature summary for additional info.*
|
75 |
|
76 |
+
10Web Social Feed for Instagram 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.
|
77 |
|
78 |
|
79 |
[Premium version adds](https://10web.io/plugins/wordpress-instagram-feed/)
|
94 |
* Conditional Filters
|
95 |
|
96 |
###IMPORTANT:
|
97 |
+
If you think you found a bug in 10Web Social Feed for Instagram 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://10web.io/contact-us/).
|
98 |
|
99 |
== Installation ==
|
100 |
|
101 |
+
#### Thank you for your interest in 10Web Social Feed for Instagram.
|
102 |
|
103 |
+
Here are two ways of installing 10Web Social Feed for Instagram: via WordPress backend and via FTP. Let's discuss each case individually:
|
104 |
|
105 |
**Installing via WordPress**
|
106 |
|
107 |
Login to the WordPress Administrator Panel.
|
108 |
Go to Plugins > Add New > Upload.
|
109 |
+
Click Choose file button and select the zip folder of 10Web Social Feed for Instagram plugin and press Install now button.
|
110 |
Click Activate button.
|
111 |
|
112 |
**Installing via FTP**
|
113 |
|
114 |
Login to your hosting space via an FTP software, e.g. FileZilla.
|
115 |
+
Unzip the downloaded 10Web Social Feed for Instagram plugin folder without making any changes to the folder.
|
116 |
Upload the Instagram plugin into the following location wp-content>wp-plugins.
|
117 |
Login to the WordPress Administrator Panel.
|
118 |
+
Activate 10Web Social Feed for Instagram by going to Plugins and pressing Activate button.
|
119 |
|
120 |
**Creating an Instagram Feed**
|
121 |
|
122 |
+
Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin. Go to **10Web Social Feed for Instagram > 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.
|
123 |
|
124 |
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.
|
125 |
|
495 |
|
496 |
== Screenshots ==
|
497 |
|
498 |
+
1. WordPress 10Web Social Feed for Instagram - Thumbnail layout
|
499 |
+
2. WordPress 10Web Social Feed for Instagram - Image browser layout
|
500 |
+
3. WordPress 10Web Social Feed for Instagram - Lightbox
|
501 |
+
4. WordPress 10Web Social Feed for Instagram - Edit Instagram Feed
|
502 |
+
5. WordPress 10Web Social Feed for Instagram - Theme Settings
|
503 |
|
504 |
== Privacy Policy ==
|
505 |
+
10Web Social Feed for Instagram plugin uses Instagram API on website front end. You have to authorize the plugin via sign in to get data from Instagram on your behalf. The plugin does not send any user’s data to Instagram. All the data received from Instagram via API is cached in WordPress database for some short customizable period to provide front end optimization. You can delete or update cached data. Instagram saves some cookies in browsers of website visitors via API data. These cookies are mostly used for security purposes. They are regulated under terms of Instagram’s privacy policy https://instagram.com/legal/privacy. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
|
506 |
|
507 |
== Changelog ==
|
508 |
|
509 |
+
= 1.3.18 =
|
510 |
+
Fixed: Error from Instagram after connecting a Personal account.
|
511 |
+
Fixed: Instagram Feed warning after deleting a feed.
|
512 |
+
Fixed: Pagination problem on hashtag feeds..
|
513 |
+
|
514 |
+
= 1.3.17 =
|
515 |
+
Added: Feed edit links for Elementor widget.
|
516 |
+
|
517 |
= 1.3.16 =
|
518 |
+
Fixed: First time authorization.
|
519 |
|
520 |
= 1.3.15 =
|
521 |
Added: Banner to install 10Web manager.
|
649 |
Change: "create_function" is not used anymore
|
650 |
|
651 |
= 1.2.4 =
|
652 |
+
Fixed: 10Web Social Feed for Instagram compatibility issue with Better WordPress Minify plugin, thanks to @amityweb for bug report
|
653 |
|
654 |
= 1.2.3 =
|
655 |
Change: WD library updated to version 1.0.11
|
797 |
Fixed: Bug when duplicating feeds
|
798 |
|
799 |
= 1.1.0 =
|
800 |
+
**IMPORTANT: Instagram changed the API. You need to get a new access token by using "Sign in with Instagram" button on the Settings page in order to keep your 10Web Social Feed for Instagram plugin functioning after June 1.**
|
801 |
new: Instagram new API
|
802 |
new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
|
803 |
|
templates/plugin-uninstalled.php
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
</style>
|
27 |
<div class="wdi_plugin_uninstalled">
|
28 |
<p>Dear <span><?php echo (wp_get_current_user()->user_firstname!='') ? wp_get_current_user()->user_firstname .' '. wp_get_current_user()->user_lastname : wp_get_current_user()->user_login?></span> <?php _e('you have uninstalled','wd-instagram-feed') ?> <span>Instagram Feed </span><?php _e('plugin,if you want to use it again simply deactivate and activate it again','wd-instagram-feed') ?>
|
29 |
-
<span class="wdi_regards">Best regards
|
30 |
<a href="<?php echo $deactivate_url?>">Deactivate Plugin</a>
|
31 |
<p id="wdi_redirect"></p>
|
32 |
</div>
|
26 |
</style>
|
27 |
<div class="wdi_plugin_uninstalled">
|
28 |
<p>Dear <span><?php echo (wp_get_current_user()->user_firstname!='') ? wp_get_current_user()->user_firstname .' '. wp_get_current_user()->user_lastname : wp_get_current_user()->user_login?></span> <?php _e('you have uninstalled','wd-instagram-feed') ?> <span>Instagram Feed </span><?php _e('plugin,if you want to use it again simply deactivate and activate it again','wd-instagram-feed') ?>
|
29 |
+
<span class="wdi_regards">Best regards 10Web Team.</span></p>
|
30 |
<a href="<?php echo $deactivate_url?>">Deactivate Plugin</a>
|
31 |
<p id="wdi_redirect"></p>
|
32 |
</div>
|
wd-instagram-feed.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Instagram Feed by 10Web
|
4 |
-
Plugin URI: https://10web.io/plugins/wordpress-instagram-feed
|
5 |
Description: Instagram Feed by 10Web 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.3.
|
7 |
Author: 10Web
|
8 |
-
Author URI: https://10Web.io
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
@@ -20,7 +20,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
|
|
20 |
//define("wdi",'wdi');
|
21 |
define('WDI_FEED_TABLE','wdi_feeds');
|
22 |
define('WDI_THEME_TABLE','wdi_themes');
|
23 |
-
define('WDI_VERSION','1.3.
|
24 |
define('WD_WDI_PREFIX', 'wdi' );
|
25 |
define('WDI_IS_PRO', false );
|
26 |
$wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
|
@@ -100,7 +100,7 @@ function wdi_save_user_access_token(){
|
|
100 |
}
|
101 |
|
102 |
function wdi_no_business_account_notice(){
|
103 |
-
echo "<div class='notice notice-error'><p>Cannot find connected Instagram business page. Either you do not have Instagram business account or it is not connected to current Facebook user's page. <a href='https://help.10web.io/hc/en-us/articles/360022629872' target='_blank'>See more in documentation.</a> </p></div>";
|
104 |
}
|
105 |
|
106 |
function wdi_invalid_fb_token_notice(){
|
@@ -628,7 +628,7 @@ function wdi_load_scripts($hook){
|
|
628 |
"prefix" => "wdi" ,
|
629 |
"deactivate_class" => 'wdi_deactivate_link',
|
630 |
"email" => $admin_data->data->user_email,
|
631 |
-
"plugin_wd_url" => "https://
|
632 |
));
|
633 |
}
|
634 |
|
@@ -880,68 +880,68 @@ function wdi_wd_lib_init(){
|
|
880 |
"user_guide" => array(
|
881 |
0 => array(
|
882 |
"main_title" => __("Installation and configuration", "wd-instagram-feed"),
|
883 |
-
"url" => "https://
|
884 |
"titles" => array(
|
885 |
array(
|
886 |
"title" => __("Getting Instagram Access Token", "wd-instagram-feed"),
|
887 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016277532-Configuring-Instagram-Access-Token"
|
888 |
)
|
889 |
)
|
890 |
),
|
891 |
1 => array(
|
892 |
"main_title" => __("Creating an Instagram Feed", "wd-instagram-feed"),
|
893 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016497251-Creating-Instagram-Feed",
|
894 |
"titles" => array(
|
895 |
array(
|
896 |
"title" => __("Thumbnails and Masonry Layouts", "wd-instagram-feed"),
|
897 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016277632",
|
898 |
),
|
899 |
array(
|
900 |
"title" => __("Blog Style Layout", "wd-instagram-feed"),
|
901 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016277632",
|
902 |
),
|
903 |
array(
|
904 |
"title" => __("Image Browser", "wd-instagram-feed"),
|
905 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016277632",
|
906 |
),
|
907 |
array(
|
908 |
"title" => __("Lightbox Settings", "wd-instagram-feed"),
|
909 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016277752",
|
910 |
),
|
911 |
array(
|
912 |
"title" => __("Conditional Filters", "wd-instagram-feed"),
|
913 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016497371",
|
914 |
),
|
915 |
)
|
916 |
),
|
917 |
2 => array(
|
918 |
"main_title" => __("Publishing Instagram Feed", "wd-instagram-feed"),
|
919 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016497391",
|
920 |
"titles" => array(
|
921 |
array(
|
922 |
"title" => __("Publishing in a Page/Post", "wd-instagram-feed"),
|
923 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016497391",
|
924 |
),
|
925 |
array(
|
926 |
"title" => __("Publishing as a Widget", "wd-instagram-feed"),
|
927 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016497391",
|
928 |
),
|
929 |
array(
|
930 |
"title" => __("Publishing by PHP function", "wd-instagram-feed"),
|
931 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016497391",
|
932 |
),
|
933 |
)
|
934 |
),
|
935 |
3 => array(
|
936 |
"main_title" => __("Styling with Themes", "wd-instagram-feed"),
|
937 |
-
"url" => "https://help.10web.io/hc/en-us/articles/360016277832",
|
938 |
"titles" => array()
|
939 |
)
|
940 |
),
|
941 |
"overview_welcome_image" => null,
|
942 |
-
"video_youtube_id" => "ijdrpkVAfEw",
|
943 |
-
"plugin_wd_url" => "https://
|
944 |
-
"plugin_wd_demo_link" => "
|
945 |
"plugin_wd_addons_link" => "",
|
946 |
"after_subscribe" => "admin.php?page=wdi_settings", // this can be plagin overview page or set up page
|
947 |
"plugin_wizard_link" => "",
|
@@ -1027,7 +1027,7 @@ function wdi_privacy_policy($content){
|
|
1027 |
$text .= "<br/>";
|
1028 |
$text .= sprintf(__('"Instagram Feed plugin uses Instagram API on website front end. All the data received from Instagram via API is cached in WordPress database for some short period to provide front end optimization. You may request us to delete your Instagram data if it is accidentally cached in our website database with hashtag feed data. Instagram saves some cookies in browsers of website visitors via API data. These cookies are mostly used for security purposes. They are regulated under terms of Instagram’s %s."', "wd-instagram-feed"), $pp_link);
|
1029 |
$text .= "<br/>";
|
1030 |
-
$text .= __('
|
1031 |
$pp_text = '<h3>' . $title . '</h3>' . '<p class="wp-policy-help">' . $text . '</p>';
|
1032 |
|
1033 |
$content .= $pp_text;
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Instagram Feed by 10Web
|
4 |
+
Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin
|
5 |
Description: Instagram Feed by 10Web 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.3.18
|
7 |
Author: 10Web
|
8 |
+
Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
20 |
//define("wdi",'wdi');
|
21 |
define('WDI_FEED_TABLE','wdi_feeds');
|
22 |
define('WDI_THEME_TABLE','wdi_themes');
|
23 |
+
define('WDI_VERSION','1.3.18');
|
24 |
define('WD_WDI_PREFIX', 'wdi' );
|
25 |
define('WDI_IS_PRO', false );
|
26 |
$wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
|
100 |
}
|
101 |
|
102 |
function wdi_no_business_account_notice(){
|
103 |
+
echo "<div class='notice notice-error'><p>Cannot find connected Instagram business page. Either you do not have Instagram business account or it is not connected to current Facebook user's page. <a href='https://help.10web.io/hc/en-us/articles/360022629872?utm_source=instagram_feed&utm_medium=free_plugin' target='_blank'>See more in documentation.</a> </p></div>";
|
104 |
}
|
105 |
|
106 |
function wdi_invalid_fb_token_notice(){
|
628 |
"prefix" => "wdi" ,
|
629 |
"deactivate_class" => 'wdi_deactivate_link',
|
630 |
"email" => $admin_data->data->user_email,
|
631 |
+
"plugin_wd_url" => "https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin",
|
632 |
));
|
633 |
}
|
634 |
|
880 |
"user_guide" => array(
|
881 |
0 => array(
|
882 |
"main_title" => __("Installation and configuration", "wd-instagram-feed"),
|
883 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016277532-Configuring-Instagram-Access-Token?utm_source=instagram_feed&utm_medium=free_plugin",
|
884 |
"titles" => array(
|
885 |
array(
|
886 |
"title" => __("Getting Instagram Access Token", "wd-instagram-feed"),
|
887 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016277532-Configuring-Instagram-Access-Token?utm_source=instagram_feed&utm_medium=free_plugin"
|
888 |
)
|
889 |
)
|
890 |
),
|
891 |
1 => array(
|
892 |
"main_title" => __("Creating an Instagram Feed", "wd-instagram-feed"),
|
893 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016497251-Creating-Instagram-Feed?utm_source=instagram_feed&utm_medium=free_plugin",
|
894 |
"titles" => array(
|
895 |
array(
|
896 |
"title" => __("Thumbnails and Masonry Layouts", "wd-instagram-feed"),
|
897 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016277632?utm_source=instagram_feed&utm_medium=free_plugin",
|
898 |
),
|
899 |
array(
|
900 |
"title" => __("Blog Style Layout", "wd-instagram-feed"),
|
901 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016277632?utm_source=instagram_feed&utm_medium=free_plugin",
|
902 |
),
|
903 |
array(
|
904 |
"title" => __("Image Browser", "wd-instagram-feed"),
|
905 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016277632?utm_source=instagram_feed&utm_medium=free_plugin",
|
906 |
),
|
907 |
array(
|
908 |
"title" => __("Lightbox Settings", "wd-instagram-feed"),
|
909 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016277752?utm_source=instagram_feed&utm_medium=free_plugin",
|
910 |
),
|
911 |
array(
|
912 |
"title" => __("Conditional Filters", "wd-instagram-feed"),
|
913 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016497371?utm_source=instagram_feed&utm_medium=free_plugin",
|
914 |
),
|
915 |
)
|
916 |
),
|
917 |
2 => array(
|
918 |
"main_title" => __("Publishing Instagram Feed", "wd-instagram-feed"),
|
919 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016497391?utm_source=instagram_feed&utm_medium=free_plugin",
|
920 |
"titles" => array(
|
921 |
array(
|
922 |
"title" => __("Publishing in a Page/Post", "wd-instagram-feed"),
|
923 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016497391?utm_source=instagram_feed&utm_medium=free_plugin",
|
924 |
),
|
925 |
array(
|
926 |
"title" => __("Publishing as a Widget", "wd-instagram-feed"),
|
927 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016497391?utm_source=instagram_feed&utm_medium=free_plugin",
|
928 |
),
|
929 |
array(
|
930 |
"title" => __("Publishing by PHP function", "wd-instagram-feed"),
|
931 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016497391?utm_source=instagram_feed&utm_medium=free_plugin",
|
932 |
),
|
933 |
)
|
934 |
),
|
935 |
3 => array(
|
936 |
"main_title" => __("Styling with Themes", "wd-instagram-feed"),
|
937 |
+
"url" => "https://help.10web.io/hc/en-us/articles/360016277832?utm_source=instagram_feed&utm_medium=free_plugin",
|
938 |
"titles" => array()
|
939 |
)
|
940 |
),
|
941 |
"overview_welcome_image" => null,
|
942 |
+
"video_youtube_id" => "ijdrpkVAfEw",
|
943 |
+
"plugin_wd_url" => "https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin",
|
944 |
+
"plugin_wd_demo_link" => "https://demo.10web.io/instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin",
|
945 |
"plugin_wd_addons_link" => "",
|
946 |
"after_subscribe" => "admin.php?page=wdi_settings", // this can be plagin overview page or set up page
|
947 |
"plugin_wizard_link" => "",
|
1027 |
$text .= "<br/>";
|
1028 |
$text .= sprintf(__('"Instagram Feed plugin uses Instagram API on website front end. All the data received from Instagram via API is cached in WordPress database for some short period to provide front end optimization. You may request us to delete your Instagram data if it is accidentally cached in our website database with hashtag feed data. Instagram saves some cookies in browsers of website visitors via API data. These cookies are mostly used for security purposes. They are regulated under terms of Instagram’s %s."', "wd-instagram-feed"), $pp_link);
|
1029 |
$text .= "<br/>";
|
1030 |
+
$text .= __('10Web Disclaimer: The above text is for informational purposes only and is not a legal advice. You must not rely on it as an alternative to legal advice. You should contact your legal counsel to obtain advice with respect to your particular case.', "wd-instagram-feed");
|
1031 |
$pp_text = '<h3>' . $title . '</h3>' . '<p class="wp-policy-help">' . $text . '</p>';
|
1032 |
|
1033 |
$content .= $pp_text;
|