Version Description
New: Caching of Instagram data. API rate limits do not constrain feed loading anymore.
New: Compatibility with Gutenberg editor.
Improved: It is possible now to manually edit access token.
Changed: Plugin will output a warning when an incompatible version of Font-Awesome is loaded (SVG generated by JS)
Fixed: Error when PHP filter extension is not enabled.
Fixed: PHP warning in feed editor page appearing sometimes.
Download this release
Release Info
Developer | webdorado |
Plugin | WD Instagram Feed – Instagram Gallery |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.19 to 1.3.0
- admin-functions.php +6 -2
- admin/controllers/WDIControllerFeeds_wdi.php +1 -1
- admin/controllers/WDIControllerThemes_wdi.php +1 -1
- admin/views/WDIViewFeeds_wdi.php +14 -16
- admin/views/WDIViewSettings_wdi.php +31 -1
- changelog.txt +14 -3
- css/wdi_backend.css +54 -1
- css/wdi_backend.min.css +1 -1
- css/wdi_block.css +29 -0
- css/wdi_frontend.css +8 -4
- css/wdi_frontend.min.css +1 -1
- framework/WDILibrary.php +25 -3
- framework/WDI_admin_view.php +1 -1
- frontend/shortcode.php +5 -1
- images/insta.svg +14 -0
- images/insta_2.svg +30 -0
- js/gallerybox/wdi_gallery_box.js +2 -0
- js/wdi_admin.js +21 -2
- js/wdi_admin.min.js +1 -1
- js/wdi_block.js +189 -0
- js/wdi_frontend.js +12 -3
- js/wdi_frontend.min.js +1 -1
- js/wdi_instagram.js +533 -358
- js/wdi_instagram.min.js +1 -1
- readme.txt +9 -1
- wd-instagram-feed.php +110 -4
admin-functions.php
CHANGED
@@ -612,10 +612,14 @@ function wdi_sanitize_options($input)
|
|
612 |
function wdi_get_settings()
|
613 |
{
|
614 |
$settings = array(
|
615 |
-
'wdi_access_token' => array('name' => 'wdi_access_token', 'sanitize_type' => 'text', '
|
616 |
-
'wdi_user_name' => array('name' => 'wdi_user_name', 'sanitize_type' => 'text', '
|
617 |
'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'),
|
618 |
'wdi_feeds_min_capability' => array('name' => 'wdi_feeds_min_capability', "sanitize_type" => "text", 'title' => __('Minimal role to add and manage Feeds or Themes', "wd-instagram-feed"), 'type' => 'select', 'field_or_not' => 'field', "default" => "manage_options", 'section' => 'wdi_customize_section', 'valid_options' => array('manage_options' => __('Administrator', 'wd-instagram-feed'), 'publish_posts' => __('Author', 'wd-instagram-feed'))),
|
|
|
|
|
|
|
|
|
619 |
'wdi_custom_css' => array('name' => 'wdi_custom_css', 'sanitize_type' => 'css', 'type' => 'textarea', 'section' => 'wdi_customize_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Custom CSS', "wd-instagram-feed")),
|
620 |
'wdi_custom_js' => array('name' => 'wdi_custom_js', 'sanitize_type' => 'css', 'type' => 'textarea', 'section' => 'wdi_customize_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Custom JavaScript', "wd-instagram-feed")),
|
621 |
//'wdi_preserve_settings_when_remove'=>array('name'=>'wdi_preserve_settings_when_remove','field_or_not'=>'field','type'=>'checkbox','default'=>'1', 'section'=>'wdi_configure_section','title'=>__('Preserve Settings When Remove',"wd-instagram-feed")),
|
612 |
function wdi_get_settings()
|
613 |
{
|
614 |
$settings = array(
|
615 |
+
'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' => __('Access Token', "wd-instagram-feed")),
|
616 |
+
'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' => __('Username', "wd-instagram-feed")),
|
617 |
'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'),
|
618 |
'wdi_feeds_min_capability' => array('name' => 'wdi_feeds_min_capability', "sanitize_type" => "text", 'title' => __('Minimal role to add and manage Feeds or Themes', "wd-instagram-feed"), 'type' => 'select', 'field_or_not' => 'field', "default" => "manage_options", 'section' => 'wdi_customize_section', 'valid_options' => array('manage_options' => __('Administrator', 'wd-instagram-feed'), 'publish_posts' => __('Author', 'wd-instagram-feed'))),
|
619 |
+
|
620 |
+
'wdi_transient_time' => array('name'=>'wdi_transient_time','sanitize_type'=>'number','field_or_not'=>'','type'=>'input', 'input_type'=>'number', 'section'=>'wdi_configure_section', 'title'=>__('Check for new posts every (min)',"wd-instagram-feed"),'default'=>'' ,'value'=>60),
|
621 |
+
'wdi_reset_cache' => array('name'=>'wdi_reset_cache','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_configure_section', 'href'=>admin_url( 'admin.php?page=wdi_settings' ), 'title'=>__('Reset cache with Instagram data',"wd-instagram-feed"),'default'=>'', 'value'=>'Reset cache'),
|
622 |
+
|
623 |
'wdi_custom_css' => array('name' => 'wdi_custom_css', 'sanitize_type' => 'css', 'type' => 'textarea', 'section' => 'wdi_customize_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Custom CSS', "wd-instagram-feed")),
|
624 |
'wdi_custom_js' => array('name' => 'wdi_custom_js', 'sanitize_type' => 'css', 'type' => 'textarea', 'section' => 'wdi_customize_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Custom JavaScript', "wd-instagram-feed")),
|
625 |
//'wdi_preserve_settings_when_remove'=>array('name'=>'wdi_preserve_settings_when_remove','field_or_not'=>'field','type'=>'checkbox','default'=>'1', 'section'=>'wdi_configure_section','title'=>__('Preserve Settings When Remove',"wd-instagram-feed")),
|
admin/controllers/WDIControllerFeeds_wdi.php
CHANGED
@@ -625,7 +625,7 @@ private function sanitize_number($value,$default){
|
|
625 |
}
|
626 |
}
|
627 |
private function sanitize_url($value,$default){
|
628 |
-
if (!filter_var($value, FILTER_VALIDATE_URL) === false) {
|
629 |
return $value;
|
630 |
} else {
|
631 |
return $default;
|
625 |
}
|
626 |
}
|
627 |
private function sanitize_url($value,$default){
|
628 |
+
if (function_exists('filter_var') && !filter_var($value, FILTER_VALIDATE_URL) === false) {
|
629 |
return $value;
|
630 |
} else {
|
631 |
return $default;
|
admin/controllers/WDIControllerThemes_wdi.php
CHANGED
@@ -596,7 +596,7 @@ private function sanitize_css_box_shadow($value,$default){
|
|
596 |
|
597 |
}
|
598 |
private function sanitize_url($value,$default){
|
599 |
-
if (!filter_var($value, FILTER_VALIDATE_URL) === false) {
|
600 |
return $value;
|
601 |
} else {
|
602 |
return $default;
|
596 |
|
597 |
}
|
598 |
private function sanitize_url($value,$default){
|
599 |
+
if (function_exists('filter_var') && !filter_var($value, FILTER_VALIDATE_URL) === false) {
|
600 |
return $value;
|
601 |
} else {
|
602 |
return $default;
|
admin/views/WDIViewFeeds_wdi.php
CHANGED
@@ -70,24 +70,22 @@ class WDIViewFeeds_wdi
|
|
70 |
</a>
|
71 |
</div>
|
72 |
</div>
|
73 |
-
<form class="
|
74 |
-
style="float: left; width: 99%;">
|
75 |
<?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
|
76 |
<input type="hidden" id="wdi_access_token" name="access_token"
|
77 |
value="<?php echo isset($wdi_options['wdi_access_token']) ? $wdi_options['wdi_access_token'] : ''; ?>">
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
<?php
|
81 |
-
|
82 |
-
'task' => 'add'
|
83 |
-
);
|
84 |
-
?>
|
85 |
-
<a href="<?php echo WDILibrary::get_page_link($add_page_data);?>" class="add-new-h2"><?php _e('Add new', "wd-instagram-feed"); ?></a>
|
86 |
-
<div class="tablenav top">
|
87 |
-
<?php
|
88 |
-
WDILibrary::search(__('Name', "wd-instagram-feed"), $search_value, 'sliders_form');
|
89 |
?>
|
90 |
-
</div>
|
91 |
|
92 |
<div class="tablenav top">
|
93 |
<div class="alignleft actions bulkactions">
|
@@ -104,7 +102,7 @@ class WDIViewFeeds_wdi
|
|
104 |
<input class="button action" type="button" title="<?php _e('Apply', 'wds'); ?>" onclick="if (!wdi_bulk_actions('.bulk_action')) {return false}" value="<?php _e('Apply', 'wds'); ?>" />
|
105 |
</div>
|
106 |
<?php
|
107 |
-
WDILibrary::html_page_nav($page_nav['total'], $page_nav['limit'], '
|
108 |
?>
|
109 |
</div>
|
110 |
|
@@ -299,7 +297,7 @@ class WDIViewFeeds_wdi
|
|
299 |
'pagination_preload_number' => array('name' => 'pagination_preload_number', 'title' => __('Pages To Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Preload all the media of several first pages', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
|
300 |
'image_browser_preload_number' => array('name' => 'image_browser_preload_number', 'title' => __('Number of Media for Initial Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('A number of first images/videos are preloaded', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
|
301 |
'image_browser_load_number' => array('name' => 'image_browser_load_number', 'title' => __('Number of Media for Pagination Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => "", 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
|
302 |
-
'resort_after_load_more' => array('name' => 'resort_after_load_more', 'title' => __('
|
303 |
'disable_mobile_layout' => array('name' => 'disable_mobile_layout', 'title' => __('Make Layout Not Responsive', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('When checked, layout does not become single-column on mobile. Columns number stays the same', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
|
304 |
)
|
305 |
)
|
@@ -518,7 +516,7 @@ public function genarateFeedViews()
|
|
518 |
$feed_row_id = $feed_row["id"];
|
519 |
}
|
520 |
|
521 |
-
if($feed_row['liked_feed']
|
522 |
$feed_row['liked_feed'] = 'userhash';
|
523 |
}
|
524 |
|
70 |
</a>
|
71 |
</div>
|
72 |
</div>
|
73 |
+
<form class="" id="wdi_feed_form" method="post" action="admin.php?page=wdi_feeds" >
|
|
|
74 |
<?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
|
75 |
<input type="hidden" id="wdi_access_token" name="access_token"
|
76 |
value="<?php echo isset($wdi_options['wdi_access_token']) ? $wdi_options['wdi_access_token'] : ''; ?>">
|
77 |
+
<div class="wd-page-title wd-header">
|
78 |
+
<h1 class="wp-heading-inline"><?php _e('Feeds', "wd-instagram-feed"); ?></h1>
|
79 |
+
<?php
|
80 |
+
$add_page_data = array(
|
81 |
+
'task' => 'add'
|
82 |
+
);
|
83 |
+
?>
|
84 |
+
<a href="<?php echo WDILibrary::get_page_link($add_page_data);?>" class="add-new-h2"><?php _e('Add new', "wd-instagram-feed"); ?></a>
|
85 |
+
</div>
|
86 |
<?php
|
87 |
+
WDILibrary::search(__('Name', "wd-instagram-feed"), $search_value, 'wdi_feed_form');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
?>
|
|
|
89 |
|
90 |
<div class="tablenav top">
|
91 |
<div class="alignleft actions bulkactions">
|
102 |
<input class="button action" type="button" title="<?php _e('Apply', 'wds'); ?>" onclick="if (!wdi_bulk_actions('.bulk_action')) {return false}" value="<?php _e('Apply', 'wds'); ?>" />
|
103 |
</div>
|
104 |
<?php
|
105 |
+
WDILibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'wdi_feed_form');
|
106 |
?>
|
107 |
</div>
|
108 |
|
297 |
'pagination_preload_number' => array('name' => 'pagination_preload_number', 'title' => __('Pages To Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Preload all the media of several first pages', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
|
298 |
'image_browser_preload_number' => array('name' => 'image_browser_preload_number', 'title' => __('Number of Media for Initial Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('A number of first images/videos are preloaded', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
|
299 |
'image_browser_load_number' => array('name' => 'image_browser_load_number', 'title' => __('Number of Media for Pagination Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => "", 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
|
300 |
+
'resort_after_load_more' => array('name' => 'resort_after_load_more', 'title' => __('Combine and Sort Again After Loading More', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('If this option is enabled, both newly loaded and existing media are mixed then resorted together', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
|
301 |
'disable_mobile_layout' => array('name' => 'disable_mobile_layout', 'title' => __('Make Layout Not Responsive', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('When checked, layout does not become single-column on mobile. Columns number stays the same', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
|
302 |
)
|
303 |
)
|
516 |
$feed_row_id = $feed_row["id"];
|
517 |
}
|
518 |
|
519 |
+
if(isset($feed_row['liked_feed'])) {
|
520 |
$feed_row['liked_feed'] = 'userhash';
|
521 |
}
|
522 |
|
admin/views/WDIViewSettings_wdi.php
CHANGED
@@ -63,7 +63,7 @@ private $model;
|
|
63 |
|
64 |
|
65 |
<h1 id="settings_wdi_title"><?php _e('Instagram WD Settings', "wd-instagram-feed"); ?></h1>
|
66 |
-
<form method="post" action="options.php">
|
67 |
<input type="hidden"id="wdi_user_id" name="<?php echo WDI_OPT.'[wdi_user_id]' ?>">
|
68 |
<?php settings_fields('wdi_all_settings'); ?>
|
69 |
<?php do_settings_sections('settings_wdi'); ?>
|
@@ -85,8 +85,38 @@ private $model;
|
|
85 |
</style>
|
86 |
<script>
|
87 |
jQuery(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
jQuery('#wdi_reset_access_token').on('click',function(){
|
89 |
if(confirm("<?php _e('Are you sure that you want to reset access token and username, after resetting it you will need to log in with Instagram again for using plugin','wd-instagram-feed')?>")){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
jQuery('#wdi_access_token').attr('value','');
|
91 |
jQuery('#wdi_user_name').attr('value','');
|
92 |
document.cookie = "wdi_autofill=false";
|
63 |
|
64 |
|
65 |
<h1 id="settings_wdi_title"><?php _e('Instagram WD Settings', "wd-instagram-feed"); ?></h1>
|
66 |
+
<form method="post" action="options.php" class="wdi_settings_form">
|
67 |
<input type="hidden"id="wdi_user_id" name="<?php echo WDI_OPT.'[wdi_user_id]' ?>">
|
68 |
<?php settings_fields('wdi_all_settings'); ?>
|
69 |
<?php do_settings_sections('settings_wdi'); ?>
|
85 |
</style>
|
86 |
<script>
|
87 |
jQuery(document).ready(function(){
|
88 |
+
|
89 |
+
jQuery(".wdi_settings_form").submit(function () {
|
90 |
+
jQuery.ajax({
|
91 |
+
type: "POST",
|
92 |
+
url: wdi_ajax.ajax_url,
|
93 |
+
dataType:"json",
|
94 |
+
data: {
|
95 |
+
wdi_nonce:wdi_ajax.wdi_nonce,
|
96 |
+
action:"wdi_set_reset_cache"
|
97 |
+
},
|
98 |
+
success: function(data){
|
99 |
+
|
100 |
+
}
|
101 |
+
});
|
102 |
+
});
|
103 |
+
|
104 |
jQuery('#wdi_reset_access_token').on('click',function(){
|
105 |
if(confirm("<?php _e('Are you sure that you want to reset access token and username, after resetting it you will need to log in with Instagram again for using plugin','wd-instagram-feed')?>")){
|
106 |
+
jQuery.ajax({
|
107 |
+
type: "POST",
|
108 |
+
url: wdi_ajax.ajax_url,
|
109 |
+
dataType:"json",
|
110 |
+
data: {
|
111 |
+
wdi_nonce:wdi_ajax.wdi_nonce,
|
112 |
+
action:"wdi_set_reset_cache"
|
113 |
+
},
|
114 |
+
success: function(data){
|
115 |
+
|
116 |
+
}
|
117 |
+
});
|
118 |
+
|
119 |
+
|
120 |
jQuery('#wdi_access_token').attr('value','');
|
121 |
jQuery('#wdi_user_name').attr('value','');
|
122 |
document.cookie = "wdi_autofill=false";
|
changelog.txt
CHANGED
@@ -1,14 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 1.2.19 =
|
2 |
-
Fixed: Loading more images
|
3 |
|
4 |
= 1.2.18 =
|
5 |
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.
|
6 |
Sorry.
|
7 |
|
8 |
= 1.2.17 =
|
9 |
-
|
10 |
Changed: Uninstall moved to settings page
|
11 |
|
|
|
12 |
= 1.2.16 =
|
13 |
New: Instagram slideshow is supported in popup
|
14 |
New: UX of feeds and themes admin screen, it is now similar to posts list screen
|
@@ -44,7 +55,7 @@ Fixed: Minor: do not include custom scroll bar JS if feed does not have popup
|
|
44 |
Changed: Scripts and styles are minified by default
|
45 |
Changed: Font-Awesome has been updated to version 4.7.0 and loaded from CDN
|
46 |
Changed: Pagination buttons are smaller now in default theme
|
47 |
-
Changed: Deactivation popup
|
48 |
|
49 |
= 1.2.10 =
|
50 |
Fixed: CSS XSS vulnerability in lightbox
|
1 |
+
= 1.3.0 =
|
2 |
+
New: Caching of Instagram data. API rate limits do not constrain feed loading anymore.
|
3 |
+
New: Compatibility with Gutenberg editor.
|
4 |
+
Improved: It is possible now to manually edit access token.
|
5 |
+
Changed: Plugin will output a warning when an incompatible version of Font-Awesome is loaded (SVG generated by JS)
|
6 |
+
Fixed: Cannot correctly include generated styles if site has HTTPS (premium version)
|
7 |
+
Fixed: Conditional filters set up with user's own feed (premium version)
|
8 |
+
Fixed: Error when PHP filter extension is not enabled.
|
9 |
+
Fixed: PHP warning in feed editor page appearing sometimes.
|
10 |
+
|
11 |
= 1.2.19 =
|
12 |
+
Fixed: Loading more images (free version)
|
13 |
|
14 |
= 1.2.18 =
|
15 |
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.
|
16 |
Sorry.
|
17 |
|
18 |
= 1.2.17 =
|
19 |
+
Changed: Video play issue on mac safari
|
20 |
Changed: Uninstall moved to settings page
|
21 |
|
22 |
+
|
23 |
= 1.2.16 =
|
24 |
New: Instagram slideshow is supported in popup
|
25 |
New: UX of feeds and themes admin screen, it is now similar to posts list screen
|
55 |
Changed: Scripts and styles are minified by default
|
56 |
Changed: Font-Awesome has been updated to version 4.7.0 and loaded from CDN
|
57 |
Changed: Pagination buttons are smaller now in default theme
|
58 |
+
Changed: Deactivation popup
|
59 |
|
60 |
= 1.2.10 =
|
61 |
Fixed: CSS XSS vulnerability in lightbox
|
css/wdi_backend.css
CHANGED
@@ -520,7 +520,9 @@ border: 1px solid rgb(185, 185, 185);
|
|
520 |
line-height: 30px;
|
521 |
padding: 15px;
|
522 |
vertical-align: middle;
|
523 |
-
|
|
|
|
|
524 |
}
|
525 |
.wdi_help_bar_text{
|
526 |
float:left;
|
@@ -1660,7 +1662,58 @@ border: 1px solid rgb(185, 185, 185);
|
|
1660 |
background-color: #fff;
|
1661 |
}
|
1662 |
|
|
|
1663 |
.wdi_demo_img{
|
1664 |
margin-top: 20px;
|
1665 |
}
|
1666 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
line-height: 30px;
|
521 |
padding: 15px;
|
522 |
vertical-align: middle;
|
523 |
+
width: 100%;
|
524 |
+
margin: 20px 0 0 0;
|
525 |
+
|
526 |
}
|
527 |
.wdi_help_bar_text{
|
528 |
float:left;
|
1662 |
background-color: #fff;
|
1663 |
}
|
1664 |
|
1665 |
+
|
1666 |
.wdi_demo_img{
|
1667 |
margin-top: 20px;
|
1668 |
}
|
1669 |
|
1670 |
+
|
1671 |
+
|
1672 |
+
|
1673 |
+
#wdi_feed_form .wd-page-title.wd-header {
|
1674 |
+
width: 100%;
|
1675 |
+
padding: 10px 0;
|
1676 |
+
}
|
1677 |
+
@media screen and (max-width: 782px){
|
1678 |
+
#wdi_feed_form p.search-box {
|
1679 |
+
margin-bottom: 0;
|
1680 |
+
}
|
1681 |
+
#wdi_feed_form p.search-box input[type="search"]{
|
1682 |
+
width:100%;
|
1683 |
+
height: auto !important;
|
1684 |
+
}
|
1685 |
+
#wdi_feed_form p.search-box input[type="button"]{
|
1686 |
+
margin-bottom: 10px;
|
1687 |
+
padding: 6px 14px;
|
1688 |
+
line-height: normal;
|
1689 |
+
font-size: 14px;
|
1690 |
+
height: auto;
|
1691 |
+
}
|
1692 |
+
.wdi-page-header .WDI_title_input {
|
1693 |
+
width: 60%;
|
1694 |
+
}
|
1695 |
+
.wdi-page-header .wdi_buttons {
|
1696 |
+
float: none;
|
1697 |
+
text-align: center;
|
1698 |
+
}
|
1699 |
+
}
|
1700 |
+
.wdi_reset_cache_success{
|
1701 |
+
float: right;
|
1702 |
+
}
|
1703 |
+
#wdi_reset_cache{
|
1704 |
+
float: right;
|
1705 |
+
}
|
1706 |
+
body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3){
|
1707 |
+
display: none;
|
1708 |
+
}
|
1709 |
+
body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){
|
1710 |
+
display: none;
|
1711 |
+
}
|
1712 |
+
|
1713 |
+
body.instagram-feed-wd_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3){
|
1714 |
+
display: table-row !important;
|
1715 |
+
}
|
1716 |
+
body.instagram-feed-wd_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){
|
1717 |
+
display: table-row !important;
|
1718 |
+
}
|
1719 |
+
|
css/wdi_backend.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wdi_clear{clear:both}.wdi_clear_tag:after{content:"";display:table;clear:both}#wdi_unistall{background-color:#d82121;border-color:#d31818;box-shadow:inset 0 1px 0 rgba(230,120,120,0.5),0 1px 0 rgba(0,0,0,.15)}#wdi_unistall:hover{background-color:#da1313}#wdi_unistall_table th{width:45%}.display_type_content{background:#fff;border:1px solid #dedede;margin-bottom:15px}.wdi_tooltip,.wdi_settings_link{display:block;font-size:14px !important;font-weight:bold;line-height:20px;margin-bottom:5px;color:#444;text-decoration:none}p.wdi_about_filed{font-size:13px;font-style:italic}.wdi_tooltip:hover,.wdi_settings_link:hover{color:#23282d;position:relative}.wdi_tooltip:hover:after{content:attr(wdi-tooltip);padding:4px 8px;color:#dbdbe0;position:absolute;left:0;top:100%;white-space:nowrap;z-index:20;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:2px;-moz-box-shadow:0 0 4px #222;-webkit-box-shadow:0 0 4px #222;box-shadow:0 0 4px rgba(0,0,0,0.5);background-color:rgba(0,0,0,0.75);font-size:12px}.wdi_pro_only{font-style:italic;color:#4e4e4e !important;background-color:#ccc !important;text-decoration:none}.wdi_pro_only_op{opacity:.6}.wdi_pro_notice{text-align:right;color:#15699f;font-size:20px !important;padding:10px}.wdi_pro_only_btn{background-color:#c5c0c0 !important;border-top-color:#c5c0c0 !important}.wdi-pro-overlay img{opacity:.7}#wdi_feed_users{width:100%;margin-top:2px}#wdi_feed_tabs .wdi_feed_tabs{border:1px solid #f1f1f1;color:#444;cursor:pointer;font-size:13px;font-weight:bold;padding:12px;background:#fff;text-decoration:none;display:inline-block}#wdi_feed_tabs{margin:16px 0}#wdi_feed_tabs .wdi_feed_tab_active,#wdi_feed_tabs .wdi_feed_tabs:hover{background:none repeat scroll 0 0 #fff;color:#9a2465}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{max-width:270px;margin:0 auto}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{max-width:100%}#wdi_feed_tabs .wdi_feed_tab_title{margin-top:1px;display:inline-block}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:8px}.display_type_container.wdi_clear_tag{display:table;margin:10px auto}.display_type_container>div{float:left;margin-right:15px}.wdi_user{border:1px solid #b9b9b9;background-color:rgba(0,0,0,.05);margin:0 4px 0 0;border-radius:5px;height:28px;position:relative;display:inline-block}.wdi_user:hover{background-color:rgba(0,0,0,.08)}.wdi_user a{text-decoration:none;color:black;line-height:28px;width:70%;margin-left:12%;margin-right:18%;height:100%;display:table-row;padding-right:3px}.wdi_user .wdi_profile_pic{width:20px;height:20px;top:4px;left:30px;padding:5px;vertical-align:middle;display:table-cell}.wdi_user span{display:table-cell;vertical-align:middle;left:55px;font-weight:bold;font-size:14px}.wdi_user .wdi_remove_user,.wdi_user .wdi_check_thumb_user{position:absolute;right:4px;width:15px;height:15px;top:6.5px;transition:all .1s ease}.wdi_user .wdi_remove_user:hover{cursor:pointer;transform:rotate(180deg)}.wdi_user .wdi_check_thumb_user:hover{cursor:pointer}.wdi_user .wdi_check_thumb_user{left:4px}.wdi_border_wrapper [scope='row']{padding:2px;font-size:13px;min-width:250px}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:2px}.small_input{width:60px;text-align:center}.display_type{text-align:center}.wdi_access_token_missing{font-size:14px;color:#000;clear:both;max-width:720px}.instagram-feed-wd_page_wdi_settings form{width:65%}.instagram-feed-wd_page_wdi_settings table td{padding-left:0;padding-right:0}.instagram-feed-wd_page_wdi_settings table th{padding-left:4px}.instagram-feed-wd_page_wdi_settings table input{float:right}#login_with_instagram{height:43px}#login_with_instagram .wdi_sign_in_button{background-image:url('../images/sign_in_with_instagram.png');background-repeat:no-repeat;background-position:left top;width:234px;height:43px;display:inline-block;float:left}#login_with_instagram .wdi_default_feed_button,#login_with_instagram .wdi_edit_default_feed_button{width:234px;height:43px;background-repeat:no-repeat;background-position:center top;display:inline-block}#login_with_instagram .wdi_default_feed_button{background-image:url('../images/default_feed_button.png');float:left;margin-right:10px}#login_with_instagram .wdi_edit_default_feed_button{background-image:url('../images/edit_feed_button.png');float:left}#wdi_options_page_buttons_wrapper .submit{display:inline;margin-left:15px}#wdi_reset_access_token{margin-top:0;float:left;width:232px;text-align:center}.wdi_advanced_option{width:100%;position:relative;font-weight:600}.wdi_advanced_option{background-color:#fff;cursor:pointer;border:1px solid #e3e3e3;border-radius:10px;border-collapse:separate;border-spacing:0}.wdi_advanced_option .wdi_advanced_option_head{border-bottom:1px solid #e3e3e3}.wdi_advanced_option .wdi_advanced_option_head th{padding-top:10px;padding-bottom:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th{border-bottom:1px solid #e3e3e3;border-bottom-left-radius:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td{border-bottom:1px solid #e3e3e3;border-bottom-right-radius:10px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option th{padding-left:12px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option td .wdwt_param{margin-left:15px}.wdi_advanced_option .wdi_advanced_option_icon{background-repeat:no-repeat;background-position:left top;width:20px;height:20px;display:inline-block;position:absolute;top:16px;right:10px}.wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon{background-image:url('../images/arrow_1.png')}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon{background-image:url('../images/arrow_2.png')}.wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head){display:none}.instagram-feed-wd_page_wdi_settings form h2{display:none}#wdi_options_page_buttons_wrapper{margin-top:10px;width:700px}.wdi_hide{display:none}.wdi_hidden{display:none !important}.selectoff{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_filter_radio{margin:5px;display:inline-block}.wdi_filter_radio label{vertical-align:text-bottom}.wdi_filter_input{margin-top:10px}.wdi_filter_input input{height:28px;width:250px;margin-right:0;padding-right:0;line-height:28px}#wdi_filter_type{line-height:28px;margin:0;padding:0;position:relative;right:2px;top:-1px;font-weight:400}.wdi_filter_item{display:inline-block;padding:6px;margin-top:5px;border-radius:5px}.wdi_filter_by_username{background-color:#00a0d2;color:white}.wdi_filter_by_hashtag{background-color:#e08d11;color:white}.wdi_logic{display:inline-block;padding:5px;font-weight:bold}.wdi_filter_by_location{background-color:#509833;color:white}.wdi_filter_by_mention{background-color:#833888;color:white}.wdi_filter_by_description{background-color:#bd242b;color:white}.wdi_filter_by_url{background-color:#004eff;color:white}.wdi_remove_filter{padding-left:5px;color:white;font-size:13px}.wdi_remove_filter:hover{cursor:pointer}.wdi_source_user{display:inline-block;padding:5px}.wdi_source_img{display:inline-block}.wdi_source_img img{width:30px;height:30px;border-radius:15px;display:block}.wdi_source_username{display:inline-block;line-height:25px;font-size:15px !important;height:30px;vertical-align:bottom;padding:0 5px;font-weight:bold}#login_with_instagram>a:focus{-webkit-box-shadow:none;box-shadow:none}.wdi_help_bar_wrap{background-color:#fff;border:0;box-sizing:border-box;clear:both;color:#6e7990;font-size:14px;font-weight:bold;line-height:30px;padding:15px;vertical-align:middle;width:calc(100% - 22px)}.wdi_help_bar_text{float:left}.wdi_help_bar_text>a{color:#0073aa;text-decoration:none}.wdi_hb_buy_pro{float:right;padding:0}.wdi_hb_buy_pro a,.wdi_hb_buy_pro a:active,.wdi_hb_buy_pro a:visited,.wdi_hb_buy_pro a:hover{display:inline-block;font-weight:bold;font-size:14px;vertical-align:middle;border:0;box-shadow:none !important;text-decoration:none}.wdi_hb_buy_pro .wdi_support_link{color:#72777c !important;padding:0 10px}.wdi_hb_buy_pro .wdi_update_pro_link{background:#45a6b7;font-weight:bold;line-height:30px;padding:0 18px 0 18px;color:#fff !important}.wdi_hb_buy_pro img{border:0;display:inline-block;vertical-align:middle}#bullets_images_type,#bullets_images_color,#bull_style,#rl_butt_type,#rl_butt_color,#rl_butt_style{margin:0 10px 0 0;width:100px}.wds_ctrl_btn_upload{display:block !important;margin:5px 0 !important;text-align:center;vertical-align:middle;width:95%}.wds_reverse{margin:0 5px !important}.wds_free_button,.wds_free_button:hover{background:linear-gradient(to bottom,#e5e5e5,#e5e5e5) repeat scroll 0 0 #f3f3f3 !important;border-color:#bbb !important;color:#888 !important}.wdi_spider_free_version_label,.wdi_spider_free_version_label *{color:#808080 !important}.wdi_spider_free_version{background-color:#dfdfdf;border:1px solid #797979;border-radius:2px;padding:2px;width:210px}.wds_more{font-size:12px}.wrap .button{border-radius:3px !important;text-shadow:none !important}.wdi_spider_message_cont{display:none;width:99%}.wdi_spider_load{display:none}.wdi_spider_load_cont{background-color:rgba(0,0,0,0.2);left:0;height:100%;position:fixed;top:0;width:100%;z-index:99998}.wdi_spider_load_icon{left:0;height:100%;position:fixed;text-align:center;top:0;width:100%;z-index:99999}.wdi_spider_ajax_loading{border:none !important;margin-top:200px;width:50px;-webkit-animation:spin 2.5s infinite linear;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}@-moz-keyframes spin{0{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0{transform:rotate(0)}100%{transform:rotate(359deg)}}#TB_window,#TB_iframeContent{width:800px !important;height:500px !important}#TB_window{margin-left:-400px !important}.input_th{margin-left:0 !important;width:160px !important;font-family:sans-serif}.input_th2{margin-left:0 !important;width:160px !important;margin-top:5px;height:19px}.edit_input{height:28px !important;padding-bottom:7px !important}.add_tag_th{padding-left:21px;font-size:12px;font-family:sans-serif}.pointer{cursor:pointer}.non_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wds_position_table td,.wds_position_table input{border:1px solid #ccc;margin:2px}.wds_position_table .wds_position_td{background-color:#f4f4f4;display:inline-block;line-height:1;padding:0 !important}.wdi_spider_div_options{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;margin:2px 0 0 190px;padding:13px;min-height:300px;min-width:600px;vertical-align:top}.table_medium_col{text-align:center !important;width:70px}.table_medium_col_uncenter{width:80px}.table_extra_large_col{padding:4px !important;width:150px !important}.first-page,.prev-page,.next-page,.last-page,.table_extra_large_col a,.table_medium_col a,.table_big_col a,.table_small_col a{cursor:pointer}.wdi_spider_word_wrap{word-wrap:normal}.wdi_spider_description{color:#666;font-size:.923em;line-height:1.231em}.handle{background:url("../images/draggable.png") no-repeat transparent;border:0;cursor:move;display:inline-block;height:15px;margin:0 auto;vertical-align:middle;width:15px}.slider-icon{background-image:url("../images/slider-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.uninstall-icon{background-image:url("../images/uninstall-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.wdi_spider_label{font-weight:bold;width:100px}.wdi_spider_label_top{font-weight:bold;padding-top:3px;vertical-align:top;width:100px}.wdi_spider_fieldset .wdi_spider_label{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_label_options{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_choose_option{display:table;box-shadow:0 0 1px 1px #d2d2d2;margin-bottom:5px;border-radius:2px;padding:2px;box-sizing:border-box;cursor:pointer;width:100%}.wdi_spider_options_cont,.wdi_spider_bull_options_cont,.wdi_spider_pp_options_cont,.wdi_spider_options_color_cont,.wdi_spider_bull_options_color_cont,.wdi_spider_pp_options_color_cont{display:none;width:180px;height:150px;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.wdi_spider_option_cont{display:block;border-bottom:1px solid #d3d3d3;padding:3px 0 3px 0;box-sizing:content-box;width:98%;border-radius:0;cursor:pointer}.wdi_spider_option_cont_title{display:table-cell;vertical-align:middle;padding:0 0 0 4px}.wdi_spider_option_cont_img{display:table-cell;width:23%;height:15px;text-align:right;padding:5px 4px 0 0;box-sizing:border-box;background-color:#eee}.wdi_spider_option_main_title{display:table-cell;width:65%;vertical-align:middle;padding:0 0 0 4px;color:#555}.wdi_spider_sel_option_ic{display:table-cell;width:20%;height:15px;text-align:right;padding:0 6px 0 0;box-sizing:border-box}.wdi_spider_int_input{width:45px}.wdi_spider_char_input{width:115px}.wdi_spider_text_input{width:190px}.wdi_spider_slider_div{display:inline-block;vertical-align:middle;width:140px}.wdi_spider_slider_percentage,.wdi_spider_slider_percentage input,.wdi_spider_slider_percentage input :focus{background:transparent;border:0;color:#00aeef;display:inline;font-weight:bold;text-align:right;vertical-align:middle;width:30px}.updated,.error{margin:5px 0 2px !important}.buttons_div{clear:both;float:right;margin:5px 0}.buttons_div_left{float:left;margin:5px 0}.buttons_div_right{float:right;margin:5px 0}.wdi_spider_delete_img{background-image:url("../images/delete.png");border:0;cursor:pointer;display:inline-block;vertical-align:middle;height:14px;width:14px}.wdi_spider_delete_img_small{background-image:url("../images/delete.png");background-size:10px auto;border:medium none;cursor:pointer;display:inline-block;height:10px;margin-top:2px;vertical-align:middle;width:10px}.wdi_spider_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;float:left;margin:4px;padding:13px;width:97%}.wdi_spider_type_fieldset{background:none repeat scroll 0 0 #f4f4f4;border-radius:8px 8px 8px 8px;display:none;float:left;width:100%}.wdi_spider_child_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;float:left;margin:4px;width:30%;padding:13px;display:block}.wdi_spider_table td{padding:0;vertical-align:middle}.wdi_spider_ctrls{padding:4px;text-align:center;width:40px}.theme_type{background-color:#f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;cursor:pointer;display:inline-block;font-size:16px;height:24px;padding-top:5px;text-align:center;vertical-align:middle;width:123px;margin:2px 0 2px 0}.ui-slider-handle{cursor:pointer !important}.thumb{border:1px solid #ccc;max-height:120px;max-width:120px}.fileDescription{color:#666;cursor:pointer;font-family:sans-serif;font-size:12px}.filename{font-size:13px}.tag_div{background-clip:padding-box;background-color:#f3f3f3;border:1px solid #aaa;border-radius:3px 3px 3px 3px;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);color:#666;line-height:13px;margin:2px 0;padding:2px 5px 2px 5px;width:132px}.tags_div{overflow-y:auto;height:65px}.tag_name{width:118px}.edit_thumb{cursor:pointer}.wdi_spider_rotate{border-radius:2px;border:1px solid #fff;height:30px}.wdi_spider_search_value{height:2em;margin:0 0 4px}#th_order,.wdi_spider_order{display:none}.wds_add_video,.wds_resize_image,.wds_import,.wds_exports{display:none;padding:10px;height:60px;background-color:#fff;border:1px solid #999;top:50%;position:fixed;left:50%;text-align:left;z-index:100000;border-radius:3px;margin-top:-45px}.wds_add_video,.wds_resize_image{margin-left:-340px}.wds_exports{margin-left:-240px}.wds_import{margin-left:-185px}.wds_add_video input[type="text"],.wds_resize_image input[type="text"]{width:500px}.wds_opacity_video,.wds_opacity_import,.wds_opacity_export{background-color:#000;display:none;opacity:.75;filter:Alpha(opacity=75);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998}.wds_tabs{clear:both;display:none;position:relative;z-index:1}.wds_tabs a.wds_sub_active,.wds_tabs a.wds_active{background-color:#f5f5f5;border-bottom:1px solid #f5f5f5;color:#333}.wds_tabs a{background-color:#f9f9f9;border:1px solid #dfdfdf;border-top-left-radius:3px;border-top-right-radius:3px;color:#c7c7c7;display:block !important;float:left;font:bold 17px/32px Arial,serif;height:30px;margin:3px 3px 0 0;padding:0 10px;position:relative;text-decoration:none;width:130px}.wbs_subtab a{font:bold 14px/26px Arial,serif;height:26px;padding:0 5px;width:105px}.wds_add_layer{font:normal 20px/28px Arial,serif !important;width:initial !important;padding:0 9px !important}.wds_tab_title{background:none repeat scroll 0 0 transparent !important;border:none !important;cursor:pointer;opacity:.5;filter:Alpha(opacity=50);padding:1px;vertical-align:middle;width:50px}.wds_sub_active .wds_tab_title,.wds_layer_title{background-color:#fff !important;border-color:#dfdfdf !important;border-radius:3px !important;border-style:solid !important;border-width:1px !important;cursor:pointer;opacity:1;filter:Alpha(opacity=100)}.wds_tab_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:9px;height:9px;opacity:.5;filter:Alpha(opacity=50);vertical-align:middle}.wds_layer_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_layer_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_slide_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:12px;height:12px;vertical-align:middle}.wds_layer_depth{float:right;font-size:13px;line-height:15px;margin:1px 5px;text-align:left;width:40px}.wds_layer_label{display:inline-block;font-size:13px;width:80%}.wds_sub_active .wds_tab_remove{cursor:pointer !important;opacity:1;filter:Alpha(opacity=100)}.wds_box.wds_sub_active,.wds_box.wds_active{display:block}.wds_tab_label{display:block;width:inherit}.wds_box{display:none;margin-top:0 !important;position:relative;top:-1px}.wds_box{border:1px solid #dfdfdf;border-radius:3px;box-shadow:0 0 10px #f2f2f2;margin-top:15px;position:relative}.wds_clear{clear:both;float:none !important}.wds_box thead td{border-bottom:0 none !important}.wds_box tbody{background-color:#fff;border-top:0 none;padding-left:10px}.wds_box thead{background:-webkit-linear-gradient(#f5f5f5,#fff);background:-o-linear-gradient(#f5f5f5,#fff);background:-moz-linear-gradient(#f5f5f5,#fff);background:linear-gradient(#f5f5f5,#fff);border-top:0 none;border-bottom:0 none;color:#333;font:bold 12px/29px Arial,serif;height:29px;margin:0;padding:0 10px;text-align:left;text-shadow:0 1px 0 #fff}.wds_box table{border-collapse:collapse;border-spacing:0;width:100%}.wds_nav_tabs{background-color:#f5f5f5;border-right:1px solid #dfdfdf;float:left;height:640px;margin:0;width:150px}.wds_nav_tabs ul{list-style:none outside none;margin:10px 0;padding:0}.wds_nav_tabs .wds_sub_active,.wds_nav_tabs .wds_sub_active a,.wds_nav_tabs .wds_sub_active a:hover,.wds_nav_tabs .wds_active,.wds_nav_tabs .wds_active a,.wds_nav_tabs .wds_active a:hover{background:none repeat scroll 0 0 #fff;color:#333}.wds_nav_tabs .wds_active{border-color:#dfdfdf;border-width:1px 0 1px 1px;border-style:solid;margin:0 -1px 0 -4px;padding:0}.wds_nav_tabs li{border-color:transparent;border-style:solid;border-width:1px 0;list-style-type:none;margin-bottom:0}.wds_nav_tabs a{display:block;line-height:18px;padding:5px 5px 5px 12px;text-decoration:none}.wds_nav_box{background:none repeat scroll 0 0 #fff;display:none;height:610px;overflow:auto;padding:15px}.wds_nav_box.wds_active{display:block}.wds_layer_head{background-color:#f5f5f5;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;cursor:pointer;padding:5px}.wds_layer_head .handle{cursor:move;display:inline-block;margin:5px}.wds_box td{padding:10px !important}.wds_draggable{box-sizing:border-box;cursor:move}.wds_box .color{width:60px}.wds_active_layer{box-shadow:#2c2424 0 0 5px;border-radius:3px}.wds_draggable a,.wds_draggable a:hover{color:inherit !important;font-size:inherit !important;font-style:inherit !important;font-weight:inherit !important;text-decoration:none}#add_embed_help{height:200px;width:672px;top:40%}#add_embed input[type="text"]{width:500px}.wds_buttons{float:right;font-weight:normal;position:relative}.wds_reset_button{display:none;font-weight:normal;margin:10px 0;position:absolute;right:40px;z-index:1}#wdi_save_feed .two .section_col{width:47%;float:left;margin:0 1.5% 18px}#wdi_save_feed .wdi_element{margin:0 0 18px}#wdi_save_feed .half .wdi_element,#wdi_save_feed .one .wdi_element{width:96%;float:none;margin:0 2% 20px}.wdi_element_name_liked_feed{display:none !important}#wdi_save_feed .wdi_element p{margin:2px 0 0}.wdi_section_name{font-size:19px;margin:0 auto 15px;width:100%;box-sizing:border-box;padding:15px;border-bottom:1px solid #f1f1f1;color:#444;cursor:pointer}.wdi_section{border:1px solid #dedede;margin-bottom:20px;background:#fff}.wdi_section .optioninput *{text-align:left}.wdi_section.half{width:49%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wdi_buttons{text-align:right;margin-top:7px}.wdi_tab .wdi_section.half:last-child{margin-left:2%}#how_to_publish_tab .wdi_howto_container{display:flex;flex-wrap:wrap}#how_to_publish_tab .wdi_howto_content{border:1px #ddd solid;display:flex;flex:1;flex-direction:column;margin:5px;min-width:250px;max-width:calc(25% - 20px);padding:20px 10px;text-align:center}#how_to_publish_tab .wdi_howto_container h2{font-size:23px;font-weight:normal;line-height:29px;margin:0;padding:11px 15px 4px 0}#how_to_publish_tab .wdi_howto_container .wdi_howto_content input{margin:0 auto;text-align:center;width:100%}.wdi_buttons button.button.preview-button{height:28px}@media(max-width:782px){.wdi_buttons button.button.preview-button{height:auto}}@media(min-width:768px){.wdi_border_wrapper .wdi_element_content{width:100%;display:block}.wdi_border_wrapper .wdi_element_title{display:block}.wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){width:calc(100% - 30px);height:28px}.wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{width:calc(100% - 78px)}.wdi_border_wrapper .wdi_element_content input[type=number]{width:calc(100% - 30px)}.wdi_border_wrapper .wdi_element_content select{width:calc(100% - 30px)}}@media(max-width:768px){#wdi_save_feed .two .section_col{width:96%;float:none;margin:0 2% 18px}.wdi_section.half{width:100%;float:none;margin:0 0 20px 0 !important}}.wdi_section_close::before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi_section_open::before{content:"\f140";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi-page-header{width:98%;padding:10px}.wdi-page-header .wdi_buttons{float:right}.wdi-page-header .WDI_title_input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.5em;width:30%;outline:0;margin:0 0 3px;background-color:#fff}.wdi_demo_img{margin-top:20px}
|
1 |
+
.wdi_clear{clear:both}.wdi_clear_tag:after{content:"";display:table;clear:both}#wdi_unistall{background-color:#d82121;border-color:#d31818;box-shadow:inset 0 1px 0 rgba(230,120,120,0.5),0 1px 0 rgba(0,0,0,.15)}#wdi_unistall:hover{background-color:#da1313}#wdi_unistall_table th{width:45%}.display_type_content{background:#fff;border:1px solid #dedede;margin-bottom:15px}.wdi_tooltip,.wdi_settings_link{display:block;font-size:14px !important;font-weight:bold;line-height:20px;margin-bottom:5px;color:#444;text-decoration:none}p.wdi_about_filed{font-size:13px;font-style:italic}.wdi_tooltip:hover,.wdi_settings_link:hover{color:#23282d;position:relative}.wdi_tooltip:hover:after{content:attr(wdi-tooltip);padding:4px 8px;color:#dbdbe0;position:absolute;left:0;top:100%;white-space:nowrap;z-index:20;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:2px;-moz-box-shadow:0 0 4px #222;-webkit-box-shadow:0 0 4px #222;box-shadow:0 0 4px rgba(0,0,0,0.5);background-color:rgba(0,0,0,0.75);font-size:12px}.wdi_pro_only{font-style:italic;color:#4e4e4e !important;background-color:#ccc !important;text-decoration:none}.wdi_pro_only_op{opacity:.6}.wdi_pro_notice{text-align:right;color:#15699f;font-size:20px !important;padding:10px}.wdi_pro_only_btn{background-color:#c5c0c0 !important;border-top-color:#c5c0c0 !important}.wdi-pro-overlay img{opacity:.7}#wdi_feed_users{width:100%;margin-top:2px}#wdi_feed_tabs .wdi_feed_tabs{border:1px solid #f1f1f1;color:#444;cursor:pointer;font-size:13px;font-weight:bold;padding:12px;background:#fff;text-decoration:none;display:inline-block}#wdi_feed_tabs{margin:16px 0}#wdi_feed_tabs .wdi_feed_tab_active,#wdi_feed_tabs .wdi_feed_tabs:hover{background:none repeat scroll 0 0 #fff;color:#9a2465}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{max-width:270px;margin:0 auto}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{max-width:100%}#wdi_feed_tabs .wdi_feed_tab_title{margin-top:1px;display:inline-block}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:8px}.display_type_container.wdi_clear_tag{display:table;margin:10px auto}.display_type_container>div{float:left;margin-right:15px}.wdi_user{border:1px solid #b9b9b9;background-color:rgba(0,0,0,.05);margin:0 4px 0 0;border-radius:5px;height:28px;position:relative;display:inline-block}.wdi_user:hover{background-color:rgba(0,0,0,.08)}.wdi_user a{text-decoration:none;color:black;line-height:28px;width:70%;margin-left:12%;margin-right:18%;height:100%;display:table-row;padding-right:3px}.wdi_user .wdi_profile_pic{width:20px;height:20px;top:4px;left:30px;padding:5px;vertical-align:middle;display:table-cell}.wdi_user span{display:table-cell;vertical-align:middle;left:55px;font-weight:bold;font-size:14px}.wdi_user .wdi_remove_user,.wdi_user .wdi_check_thumb_user{position:absolute;right:4px;width:15px;height:15px;top:6.5px;transition:all .1s ease}.wdi_user .wdi_remove_user:hover{cursor:pointer;transform:rotate(180deg)}.wdi_user .wdi_check_thumb_user:hover{cursor:pointer}.wdi_user .wdi_check_thumb_user{left:4px}.wdi_border_wrapper [scope='row']{padding:2px;font-size:13px;min-width:250px}.wdi_border_wrapper [scope='row']+td,.wdi_border_wrapper [scope='row']{padding:2px}.small_input{width:60px;text-align:center}.display_type{text-align:center}.wdi_access_token_missing{font-size:14px;color:#000;clear:both;max-width:720px}.instagram-feed-wd_page_wdi_settings form{width:65%}.instagram-feed-wd_page_wdi_settings table td{padding-left:0;padding-right:0}.instagram-feed-wd_page_wdi_settings table th{padding-left:4px}.instagram-feed-wd_page_wdi_settings table input{float:right}#login_with_instagram{height:43px}#login_with_instagram .wdi_sign_in_button{background-image:url('../images/sign_in_with_instagram.png');background-repeat:no-repeat;background-position:left top;width:234px;height:43px;display:inline-block;float:left}#login_with_instagram .wdi_default_feed_button,#login_with_instagram .wdi_edit_default_feed_button{width:234px;height:43px;background-repeat:no-repeat;background-position:center top;display:inline-block}#login_with_instagram .wdi_default_feed_button{background-image:url('../images/default_feed_button.png');float:left;margin-right:10px}#login_with_instagram .wdi_edit_default_feed_button{background-image:url('../images/edit_feed_button.png');float:left}#wdi_options_page_buttons_wrapper .submit{display:inline;margin-left:15px}#wdi_reset_access_token{margin-top:0;float:left;width:232px;text-align:center}.wdi_advanced_option{width:100%;position:relative;font-weight:600}.wdi_advanced_option{background-color:#fff;cursor:pointer;border:1px solid #e3e3e3;border-radius:10px;border-collapse:separate;border-spacing:0}.wdi_advanced_option .wdi_advanced_option_head{border-bottom:1px solid #e3e3e3}.wdi_advanced_option .wdi_advanced_option_head th{padding-top:10px;padding-bottom:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th{border-bottom:1px solid #e3e3e3;border-bottom-left-radius:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td{border-bottom:1px solid #e3e3e3;border-bottom-right-radius:10px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option th{padding-left:12px}.instagram-feed-wd_page_wdi_settings table.wdi_advanced_option td .wdwt_param{margin-left:15px}.wdi_advanced_option .wdi_advanced_option_icon{background-repeat:no-repeat;background-position:left top;width:20px;height:20px;display:inline-block;position:absolute;top:16px;right:10px}.wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon{background-image:url('../images/arrow_1.png')}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon{background-image:url('../images/arrow_2.png')}.wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head){display:none}.instagram-feed-wd_page_wdi_settings form h2{display:none}#wdi_options_page_buttons_wrapper{margin-top:10px;width:700px}.wdi_hide{display:none}.wdi_hidden{display:none !important}.selectoff{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_filter_radio{margin:5px;display:inline-block}.wdi_filter_radio label{vertical-align:text-bottom}.wdi_filter_input{margin-top:10px}.wdi_filter_input input{height:28px;width:250px;margin-right:0;padding-right:0;line-height:28px}#wdi_filter_type{line-height:28px;margin:0;padding:0;position:relative;right:2px;top:-1px;font-weight:400}.wdi_filter_item{display:inline-block;padding:6px;margin-top:5px;border-radius:5px}.wdi_filter_by_username{background-color:#00a0d2;color:white}.wdi_filter_by_hashtag{background-color:#e08d11;color:white}.wdi_logic{display:inline-block;padding:5px;font-weight:bold}.wdi_filter_by_location{background-color:#509833;color:white}.wdi_filter_by_mention{background-color:#833888;color:white}.wdi_filter_by_description{background-color:#bd242b;color:white}.wdi_filter_by_url{background-color:#004eff;color:white}.wdi_remove_filter{padding-left:5px;color:white;font-size:13px}.wdi_remove_filter:hover{cursor:pointer}.wdi_source_user{display:inline-block;padding:5px}.wdi_source_img{display:inline-block}.wdi_source_img img{width:30px;height:30px;border-radius:15px;display:block}.wdi_source_username{display:inline-block;line-height:25px;font-size:15px !important;height:30px;vertical-align:bottom;padding:0 5px;font-weight:bold}#login_with_instagram>a:focus{-webkit-box-shadow:none;box-shadow:none}.wdi_help_bar_wrap{background-color:#fff;border:0;box-sizing:border-box;clear:both;color:#6e7990;font-size:14px;font-weight:bold;line-height:30px;padding:15px;vertical-align:middle;width:100%;margin:20px 0 0 0}.wdi_help_bar_text{float:left}.wdi_help_bar_text>a{color:#0073aa;text-decoration:none}.wdi_hb_buy_pro{float:right;padding:0}.wdi_hb_buy_pro a,.wdi_hb_buy_pro a:active,.wdi_hb_buy_pro a:visited,.wdi_hb_buy_pro a:hover{display:inline-block;font-weight:bold;font-size:14px;vertical-align:middle;border:0;box-shadow:none !important;text-decoration:none}.wdi_hb_buy_pro .wdi_support_link{color:#72777c !important;padding:0 10px}.wdi_hb_buy_pro .wdi_update_pro_link{background:#45a6b7;font-weight:bold;line-height:30px;padding:0 18px 0 18px;color:#fff !important}.wdi_hb_buy_pro img{border:0;display:inline-block;vertical-align:middle}#bullets_images_type,#bullets_images_color,#bull_style,#rl_butt_type,#rl_butt_color,#rl_butt_style{margin:0 10px 0 0;width:100px}.wds_ctrl_btn_upload{display:block !important;margin:5px 0 !important;text-align:center;vertical-align:middle;width:95%}.wds_reverse{margin:0 5px !important}.wds_free_button,.wds_free_button:hover{background:linear-gradient(to bottom,#e5e5e5,#e5e5e5) repeat scroll 0 0 #f3f3f3 !important;border-color:#bbb !important;color:#888 !important}.wdi_spider_free_version_label,.wdi_spider_free_version_label *{color:#808080 !important}.wdi_spider_free_version{background-color:#dfdfdf;border:1px solid #797979;border-radius:2px;padding:2px;width:210px}.wds_more{font-size:12px}.wrap .button{border-radius:3px !important;text-shadow:none !important}.wdi_spider_message_cont{display:none;width:99%}.wdi_spider_load{display:none}.wdi_spider_load_cont{background-color:rgba(0,0,0,0.2);left:0;height:100%;position:fixed;top:0;width:100%;z-index:99998}.wdi_spider_load_icon{left:0;height:100%;position:fixed;text-align:center;top:0;width:100%;z-index:99999}.wdi_spider_ajax_loading{border:none !important;margin-top:200px;width:50px;-webkit-animation:spin 2.5s infinite linear;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}@-moz-keyframes spin{0{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0{transform:rotate(0)}100%{transform:rotate(359deg)}}#TB_window,#TB_iframeContent{width:800px !important;height:500px !important}#TB_window{margin-left:-400px !important}.input_th{margin-left:0 !important;width:160px !important;font-family:sans-serif}.input_th2{margin-left:0 !important;width:160px !important;margin-top:5px;height:19px}.edit_input{height:28px !important;padding-bottom:7px !important}.add_tag_th{padding-left:21px;font-size:12px;font-family:sans-serif}.pointer{cursor:pointer}.non_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wds_position_table td,.wds_position_table input{border:1px solid #ccc;margin:2px}.wds_position_table .wds_position_td{background-color:#f4f4f4;display:inline-block;line-height:1;padding:0 !important}.wdi_spider_div_options{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;margin:2px 0 0 190px;padding:13px;min-height:300px;min-width:600px;vertical-align:top}.table_medium_col{text-align:center !important;width:70px}.table_medium_col_uncenter{width:80px}.table_extra_large_col{padding:4px !important;width:150px !important}.first-page,.prev-page,.next-page,.last-page,.table_extra_large_col a,.table_medium_col a,.table_big_col a,.table_small_col a{cursor:pointer}.wdi_spider_word_wrap{word-wrap:normal}.wdi_spider_description{color:#666;font-size:.923em;line-height:1.231em}.handle{background:url("../images/draggable.png") no-repeat transparent;border:0;cursor:move;display:inline-block;height:15px;margin:0 auto;vertical-align:middle;width:15px}.slider-icon{background-image:url("../images/slider-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.uninstall-icon{background-image:url("../images/uninstall-icon.png");background-repeat:no-repeat;border:0;float:left;height:32px;margin:7px 8px 0 0;width:32px}.wdi_spider_label{font-weight:bold;width:100px}.wdi_spider_label_top{font-weight:bold;padding-top:3px;vertical-align:top;width:100px}.wdi_spider_fieldset .wdi_spider_label{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_label_options{font-weight:bold;vertical-align:top;width:150px}.wdi_spider_choose_option{display:table;box-shadow:0 0 1px 1px #d2d2d2;margin-bottom:5px;border-radius:2px;padding:2px;box-sizing:border-box;cursor:pointer;width:100%}.wdi_spider_options_cont,.wdi_spider_bull_options_cont,.wdi_spider_pp_options_cont,.wdi_spider_options_color_cont,.wdi_spider_bull_options_color_cont,.wdi_spider_pp_options_color_cont{display:none;width:180px;height:150px;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.wdi_spider_option_cont{display:block;border-bottom:1px solid #d3d3d3;padding:3px 0 3px 0;box-sizing:content-box;width:98%;border-radius:0;cursor:pointer}.wdi_spider_option_cont_title{display:table-cell;vertical-align:middle;padding:0 0 0 4px}.wdi_spider_option_cont_img{display:table-cell;width:23%;height:15px;text-align:right;padding:5px 4px 0 0;box-sizing:border-box;background-color:#eee}.wdi_spider_option_main_title{display:table-cell;width:65%;vertical-align:middle;padding:0 0 0 4px;color:#555}.wdi_spider_sel_option_ic{display:table-cell;width:20%;height:15px;text-align:right;padding:0 6px 0 0;box-sizing:border-box}.wdi_spider_int_input{width:45px}.wdi_spider_char_input{width:115px}.wdi_spider_text_input{width:190px}.wdi_spider_slider_div{display:inline-block;vertical-align:middle;width:140px}.wdi_spider_slider_percentage,.wdi_spider_slider_percentage input,.wdi_spider_slider_percentage input :focus{background:transparent;border:0;color:#00aeef;display:inline;font-weight:bold;text-align:right;vertical-align:middle;width:30px}.updated,.error{margin:5px 0 2px !important}.buttons_div{clear:both;float:right;margin:5px 0}.buttons_div_left{float:left;margin:5px 0}.buttons_div_right{float:right;margin:5px 0}.wdi_spider_delete_img{background-image:url("../images/delete.png");border:0;cursor:pointer;display:inline-block;vertical-align:middle;height:14px;width:14px}.wdi_spider_delete_img_small{background-image:url("../images/delete.png");background-size:10px auto;border:medium none;cursor:pointer;display:inline-block;height:10px;margin-top:2px;vertical-align:middle;width:10px}.wdi_spider_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;float:left;margin:4px;padding:13px;width:97%}.wdi_spider_type_fieldset{background:none repeat scroll 0 0 #f4f4f4;border-radius:8px 8px 8px 8px;display:none;float:left;width:100%}.wdi_spider_child_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;float:left;margin:4px;width:30%;padding:13px;display:block}.wdi_spider_table td{padding:0;vertical-align:middle}.wdi_spider_ctrls{padding:4px;text-align:center;width:40px}.theme_type{background-color:#f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;cursor:pointer;display:inline-block;font-size:16px;height:24px;padding-top:5px;text-align:center;vertical-align:middle;width:123px;margin:2px 0 2px 0}.ui-slider-handle{cursor:pointer !important}.thumb{border:1px solid #ccc;max-height:120px;max-width:120px}.fileDescription{color:#666;cursor:pointer;font-family:sans-serif;font-size:12px}.filename{font-size:13px}.tag_div{background-clip:padding-box;background-color:#f3f3f3;border:1px solid #aaa;border-radius:3px 3px 3px 3px;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);color:#666;line-height:13px;margin:2px 0;padding:2px 5px 2px 5px;width:132px}.tags_div{overflow-y:auto;height:65px}.tag_name{width:118px}.edit_thumb{cursor:pointer}.wdi_spider_rotate{border-radius:2px;border:1px solid #fff;height:30px}.wdi_spider_search_value{height:2em;margin:0 0 4px}#th_order,.wdi_spider_order{display:none}.wds_add_video,.wds_resize_image,.wds_import,.wds_exports{display:none;padding:10px;height:60px;background-color:#fff;border:1px solid #999;top:50%;position:fixed;left:50%;text-align:left;z-index:100000;border-radius:3px;margin-top:-45px}.wds_add_video,.wds_resize_image{margin-left:-340px}.wds_exports{margin-left:-240px}.wds_import{margin-left:-185px}.wds_add_video input[type="text"],.wds_resize_image input[type="text"]{width:500px}.wds_opacity_video,.wds_opacity_import,.wds_opacity_export{background-color:#000;display:none;opacity:.75;filter:Alpha(opacity=75);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998}.wds_tabs{clear:both;display:none;position:relative;z-index:1}.wds_tabs a.wds_sub_active,.wds_tabs a.wds_active{background-color:#f5f5f5;border-bottom:1px solid #f5f5f5;color:#333}.wds_tabs a{background-color:#f9f9f9;border:1px solid #dfdfdf;border-top-left-radius:3px;border-top-right-radius:3px;color:#c7c7c7;display:block !important;float:left;font:bold 17px/32px Arial,serif;height:30px;margin:3px 3px 0 0;padding:0 10px;position:relative;text-decoration:none;width:130px}.wbs_subtab a{font:bold 14px/26px Arial,serif;height:26px;padding:0 5px;width:105px}.wds_add_layer{font:normal 20px/28px Arial,serif !important;width:initial !important;padding:0 9px !important}.wds_tab_title{background:none repeat scroll 0 0 transparent !important;border:none !important;cursor:pointer;opacity:.5;filter:Alpha(opacity=50);padding:1px;vertical-align:middle;width:50px}.wds_sub_active .wds_tab_title,.wds_layer_title{background-color:#fff !important;border-color:#dfdfdf !important;border-radius:3px !important;border-style:solid !important;border-width:1px !important;cursor:pointer;opacity:1;filter:Alpha(opacity=100)}.wds_tab_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:9px;height:9px;opacity:.5;filter:Alpha(opacity=50);vertical-align:middle}.wds_layer_remove{background-image:url("../images/close.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_layer_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_slide_dublicate{background-image:url("../images/duplicate.png");background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:12px;height:12px;vertical-align:middle}.wds_layer_depth{float:right;font-size:13px;line-height:15px;margin:1px 5px;text-align:left;width:40px}.wds_layer_label{display:inline-block;font-size:13px;width:80%}.wds_sub_active .wds_tab_remove{cursor:pointer !important;opacity:1;filter:Alpha(opacity=100)}.wds_box.wds_sub_active,.wds_box.wds_active{display:block}.wds_tab_label{display:block;width:inherit}.wds_box{display:none;margin-top:0 !important;position:relative;top:-1px}.wds_box{border:1px solid #dfdfdf;border-radius:3px;box-shadow:0 0 10px #f2f2f2;margin-top:15px;position:relative}.wds_clear{clear:both;float:none !important}.wds_box thead td{border-bottom:0 none !important}.wds_box tbody{background-color:#fff;border-top:0 none;padding-left:10px}.wds_box thead{background:-webkit-linear-gradient(#f5f5f5,#fff);background:-o-linear-gradient(#f5f5f5,#fff);background:-moz-linear-gradient(#f5f5f5,#fff);background:linear-gradient(#f5f5f5,#fff);border-top:0 none;border-bottom:0 none;color:#333;font:bold 12px/29px Arial,serif;height:29px;margin:0;padding:0 10px;text-align:left;text-shadow:0 1px 0 #fff}.wds_box table{border-collapse:collapse;border-spacing:0;width:100%}.wds_nav_tabs{background-color:#f5f5f5;border-right:1px solid #dfdfdf;float:left;height:640px;margin:0;width:150px}.wds_nav_tabs ul{list-style:none outside none;margin:10px 0;padding:0}.wds_nav_tabs .wds_sub_active,.wds_nav_tabs .wds_sub_active a,.wds_nav_tabs .wds_sub_active a:hover,.wds_nav_tabs .wds_active,.wds_nav_tabs .wds_active a,.wds_nav_tabs .wds_active a:hover{background:none repeat scroll 0 0 #fff;color:#333}.wds_nav_tabs .wds_active{border-color:#dfdfdf;border-width:1px 0 1px 1px;border-style:solid;margin:0 -1px 0 -4px;padding:0}.wds_nav_tabs li{border-color:transparent;border-style:solid;border-width:1px 0;list-style-type:none;margin-bottom:0}.wds_nav_tabs a{display:block;line-height:18px;padding:5px 5px 5px 12px;text-decoration:none}.wds_nav_box{background:none repeat scroll 0 0 #fff;display:none;height:610px;overflow:auto;padding:15px}.wds_nav_box.wds_active{display:block}.wds_layer_head{background-color:#f5f5f5;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;cursor:pointer;padding:5px}.wds_layer_head .handle{cursor:move;display:inline-block;margin:5px}.wds_box td{padding:10px !important}.wds_draggable{box-sizing:border-box;cursor:move}.wds_box .color{width:60px}.wds_active_layer{box-shadow:#2c2424 0 0 5px;border-radius:3px}.wds_draggable a,.wds_draggable a:hover{color:inherit !important;font-size:inherit !important;font-style:inherit !important;font-weight:inherit !important;text-decoration:none}#add_embed_help{height:200px;width:672px;top:40%}#add_embed input[type="text"]{width:500px}.wds_buttons{float:right;font-weight:normal;position:relative}.wds_reset_button{display:none;font-weight:normal;margin:10px 0;position:absolute;right:40px;z-index:1}#wdi_save_feed .two .section_col{width:47%;float:left;margin:0 1.5% 18px}#wdi_save_feed .wdi_element{margin:0 0 18px}#wdi_save_feed .half .wdi_element,#wdi_save_feed .one .wdi_element{width:96%;float:none;margin:0 2% 20px}.wdi_element_name_liked_feed{display:none !important}#wdi_save_feed .wdi_element p{margin:2px 0 0}.wdi_section_name{font-size:19px;margin:0 auto 15px;width:100%;box-sizing:border-box;padding:15px;border-bottom:1px solid #f1f1f1;color:#444;cursor:pointer}.wdi_section{border:1px solid #dedede;margin-bottom:20px;background:#fff}.wdi_section .optioninput *{text-align:left}.wdi_section.half{width:49%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wdi_buttons{text-align:right;margin-top:7px}.wdi_tab .wdi_section.half:last-child{margin-left:2%}#how_to_publish_tab .wdi_howto_container{display:flex;flex-wrap:wrap}#how_to_publish_tab .wdi_howto_content{border:1px #ddd solid;display:flex;flex:1;flex-direction:column;margin:5px;min-width:250px;max-width:calc(25% - 20px);padding:20px 10px;text-align:center}#how_to_publish_tab .wdi_howto_container h2{font-size:23px;font-weight:normal;line-height:29px;margin:0;padding:11px 15px 4px 0}#how_to_publish_tab .wdi_howto_container .wdi_howto_content input{margin:0 auto;text-align:center;width:100%}.wdi_buttons button.button.preview-button{height:28px}@media(max-width:782px){.wdi_buttons button.button.preview-button{height:auto}}@media(min-width:768px){.wdi_border_wrapper .wdi_element_content{width:100%;display:block}.wdi_border_wrapper .wdi_element_title{display:block}.wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){width:calc(100% - 30px);height:28px}.wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{width:calc(100% - 78px)}.wdi_border_wrapper .wdi_element_content input[type=number]{width:calc(100% - 30px)}.wdi_border_wrapper .wdi_element_content select{width:calc(100% - 30px)}}@media(max-width:768px){#wdi_save_feed .two .section_col{width:96%;float:none;margin:0 2% 18px}.wdi_section.half{width:100%;float:none;margin:0 0 20px 0 !important}}.wdi_section_close::before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi_section_open::before{content:"\f140";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi-page-header{width:98%;padding:10px}.wdi-page-header .wdi_buttons{float:right}.wdi-page-header .WDI_title_input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.5em;width:30%;outline:0;margin:0 0 3px;background-color:#fff}.wdi_demo_img{margin-top:20px}#wdi_feed_form .wd-page-title.wd-header{width:100%;padding:10px 0}@media screen and (max-width:782px){#wdi_feed_form p.search-box{margin-bottom:0}#wdi_feed_form p.search-box input[type="search"]{width:100%;height:auto !important}#wdi_feed_form p.search-box input[type="button"]{margin-bottom:10px;padding:6px 14px;line-height:normal;font-size:14px;height:auto}.wdi-page-header .WDI_title_input{width:60%}.wdi-page-header .wdi_buttons{float:none;text-align:center}}.wdi_reset_cache_success{float:right}#wdi_reset_cache{float:right}body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3){display:none}body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){display:none}body.instagram-feed-wd_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3){display:table-row !important}body.instagram-feed-wd_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){display:table-row !important}
|
css/wdi_block.css
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.tw-container {
|
2 |
+
position: fixed;
|
3 |
+
top: 0;
|
4 |
+
left: 0;
|
5 |
+
right: 0;
|
6 |
+
bottom: 0;
|
7 |
+
z-index: 9999999;
|
8 |
+
background: rgba(0,0,0,0.7);
|
9 |
+
}
|
10 |
+
|
11 |
+
.tw-container .tw-container-wrap {
|
12 |
+
height: 90%;
|
13 |
+
background: #fff;
|
14 |
+
width: 90%;
|
15 |
+
position: absolute;
|
16 |
+
top: 5%;
|
17 |
+
left: 5%;
|
18 |
+
}
|
19 |
+
|
20 |
+
.tw-container .tw-container-wrap .media-modal-close{
|
21 |
+
line-height: 34px;
|
22 |
+
text-align: center;
|
23 |
+
height: 40px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.tw-container .tw-container-wrap iframe {
|
27 |
+
height: 100%;
|
28 |
+
width: 100%;
|
29 |
+
}
|
css/wdi_frontend.css
CHANGED
@@ -2,15 +2,15 @@
|
|
2 |
clear: both;
|
3 |
}
|
4 |
|
5 |
-
.table {
|
6 |
display: table;
|
7 |
}
|
8 |
|
9 |
-
.table-cell {
|
10 |
display: table-cell;
|
11 |
}
|
12 |
|
13 |
-
.table-row {
|
14 |
display: table-row;
|
15 |
}
|
16 |
|
@@ -580,6 +580,7 @@ div[id^="wdi_container"] p {
|
|
580 |
.wdi_layout_th .wdi_photo_meta {
|
581 |
text-align: center;
|
582 |
padding-bottom: 10px;
|
|
|
583 |
}
|
584 |
|
585 |
.wdi_layout_th .wdi_thumb_comments i,
|
@@ -900,7 +901,7 @@ div[id^="wdi_container"] p {
|
|
900 |
height: 20px;
|
901 |
position: absolute;
|
902 |
width: 100%;
|
903 |
-
bottom:
|
904 |
z-index: 10150;
|
905 |
font-size: 0;
|
906 |
}
|
@@ -918,6 +919,9 @@ div[id^="wdi_container"] p {
|
|
918 |
-webkit-transition:left .3s;
|
919 |
-moz-transition:left .3s;
|
920 |
}
|
|
|
|
|
|
|
921 |
.wdi_carousel_btn_container span.active {
|
922 |
background: #ffffff;
|
923 |
}
|
2 |
clear: both;
|
3 |
}
|
4 |
|
5 |
+
.wdi_feed_main_container .table {
|
6 |
display: table;
|
7 |
}
|
8 |
|
9 |
+
.wdi_feed_main_container .table-cell {
|
10 |
display: table-cell;
|
11 |
}
|
12 |
|
13 |
+
.wdi_feed_main_container .table-row {
|
14 |
display: table-row;
|
15 |
}
|
16 |
|
580 |
.wdi_layout_th .wdi_photo_meta {
|
581 |
text-align: center;
|
582 |
padding-bottom: 10px;
|
583 |
+
line-height: 1.4;
|
584 |
}
|
585 |
|
586 |
.wdi_layout_th .wdi_thumb_comments i,
|
901 |
height: 20px;
|
902 |
position: absolute;
|
903 |
width: 100%;
|
904 |
+
bottom: 65px;
|
905 |
z-index: 10150;
|
906 |
font-size: 0;
|
907 |
}
|
919 |
-webkit-transition:left .3s;
|
920 |
-moz-transition:left .3s;
|
921 |
}
|
922 |
+
.wdi_carousel_btn_container span:last-child {
|
923 |
+
margin-right: 0;
|
924 |
+
}
|
925 |
.wdi_carousel_btn_container span.active {
|
926 |
background: #ffffff;
|
927 |
}
|
css/wdi_frontend.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wdi_clear{clear:both}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.wdi_feed_main_container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_follow_button:hover{cursor:pointer}.wdi_hidden{display:none !important}.wdi_hover_off:hover{background-color:transparent !important}.wdi_cursor_off:hover{cursor:auto !important}.wdi_filter_active span{color:white}.wdi_disabled{visibility:hidden}.wdi_ajax_loading{position:absolute;width:50px;height:50px;left:0;right:0;bottom:-50px;margin:auto;z-index:100}.wdi_feed_main_container{width:100%;position:relative}.wdi_feed_main_container .wdi_img{margin:0}.wdi_feed_main_container .wdi_follow_btn{display:inline-block;background:0;border-style:solid;border-width:1px;font-weight:500;outline:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-appearance:none;vertical-align:text-bottom}.wdi_feed_main_container .wdi_follow_btn:hover{cursor:pointer}.wdi_feed_main_container .wdi_pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_feed_main_container .wdi_pagination_ctrl{display:inline-block}.wdi_feed_main_container .wdi_pagination_ctrl:hover{cursor:pointer}.wdi_feed_main_container .wdi_filter_icon span{display:block;font-size:25px;color:white}.wdi_feed_main_container .wdi_filter_icon span::before{width:20px;height:20px;position:absolute;opacity:1;right:0;left:0;top:0;bottom:0;margin:auto}.wdi_photo_img{position:relative;overflow:hidden}.wdi_photo_overlay{width:100%;height:100%;position:absolute;top:0;left:0;background-color:transparent;transition:all .1s ease}.wdi_thumb_icon i{display:none;transition:all .1s ease}.wdi_photo_overlay:hover .wdi_thumb_icon i{display:block}.wdi_feed_main_container .fa{font-family:FontAwesome !important;font-style:normal;width:auto}.wdi_media_info .fa:before{margin-right:6px}.wdi_spider_popup_loading{background-image:url("../images/ajax_loader.png");background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:50px 50px;border:none !important;display:none;height:50px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:50px;z-index:10102;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_popup_overlay{cursor:pointer;background-color:rgba(0,0,0,0.5);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}div[id^="wdi_container"] p{padding:0 !important;margin:0 !important}.wdi_spider_popup_loading,.footer-list-block .bwp_gallery .wdi_spider_popup_loading,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_loading{background-image:url("../images/ajax_loader.png");background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:50px 50px;border:none !important;display:none;height:50px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:50px;z-index:10102;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_ajax_loading{border:none !important;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_popup_overlay,.footer-list-block .bwp_gallery .wdi_spider_popup_overlay,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.wdi_spider_popup_close,.wdi_spider_popup_close_fullscreen{-moz-box-sizing:content-box !important;box-sizing:content-box !important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}#wdi_spider_popup_left{left:0}#wdi_spider_popup_right{right:0}#wdi_spider_popup_left:hover,#wdi_spider_popup_right:hover{visibility:visible}#wdi_spider_popup_left:hover span{left:20px}#wdi_spider_popup_right:hover span{left:auto;right:20px}#wdi_spider_popup_left,#wdi_spider_popup_right{background:transparent url("../images/blank.gif") repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#wdi_spider_popup_left-ico,#wdi_spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;left:-9999px;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.wdi_image_info_container1{height:100%;margin:0 auto;position:absolute;width:100%}.wdi_image_info_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.wdi_image_info_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.wdi_image_info{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.wdi_photo_wrap_inner{text-align:center}.wdi_feed_item[wdi_type="slideshow"] .fa-clone{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.wdi_js_error_no_animate,.wdi_token_error{text-align:center;font-size:14px}.wdi_js_error{text-align:center;-webkit-animation-name:wdi_js_error;-moz-animation-name:wdi_js_error;-o-animation-name:wdi_js_error;animation-name:wdi_js_error;-webkit-animation-duration:.5s;-moz-animation-duration:.5s;-o-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:20s;-moz-animation-delay:20s;-o-animation-delay:20s;animation-delay:20s;-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;animation-fill-mode:forwards;color:#c00;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);font-size:12px}@keyframes wdi_js_error{from{visibility:hidden;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0)}to{visibility:visible;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.wdi_layout_th .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_th .wdi_feed_wrapper{margin:0 auto}.wdi_layout_th .wdi_header_wrapper{display:inline-table}.wdi_layout_th .wdi_header_img_wrap,.wdi_users_img_wrap{overflow:hidden}.wdi_layout_th .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_th .wdi_single_user{display:inline-block;float:left}.wdi_layout_th .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_th .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_th .wdi_followers,.wdi_layout_th .wdi_posts{display:inline-block}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_th .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_th .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0;padding:0}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_th .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_th .wdi_bio{float:left}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_th .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_th .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_th .wdi_photo_wrap{position:relative;display:inline-block;overflow:hidden;box-sizing:content-box}.wdi_layout_th .wdi_photo_wrap:after{padding-top:100%;display:block;content:""}.wdi_layout_th .wdi_photo_wrap_inner{position:absolute;top:0;bottom:0;left:0;right:0}.wdi_layout_th .wdi_photo_img{width:100%;height:100%}.wdi_layout_th .wdi_img{display:block;position:absolute;top:50%;left:50%;max-width:none;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.wdi_layout_th .wdi_shape_portrait .wdi_img,.wdi_layout_th .wdi_shape_square .wdi_img{width:100%;height:auto}.wdi_layout_th .wdi_shape_landscape .wdi_img{height:100% !important;width:auto}.wdi_layout_th .wdi_feed_item{display:inline-block;vertical-align:top;overflow:hidden}.wdi_layout_th .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_th .wdi_thumb_comments i,.wdi_layout_th .wdi_thumb_likes i{width:100%}.wdi_layout_th .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_th .wdi_photo_title:hover{cursor:pointer}@-moz-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-o-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-ms-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-webkit-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}.wdi_layout_th .wdi_load_more_spinner{display:table-cell;vertical-align:middle;-webkit-animation:wdi_rotate 1.5s infinite;-moz-animation:wdi_rotate 1.5s infinite;-o-animation:wdi_rotate 1.5s infinite;animation:wdi_rotate 1.5s infinite}.wdi_layout_th .wdi_load_more,.wdi_layout_th .wdi_spinner{padding:10px;transition:all .2s ease}.wdi_layout_th .wdi_load_more_wrap,.wdi_layout_th .wdi_spinner_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_th .wdi_load_more_wrap_inner,.wdi_layout_th .wdi_spinner_wrap_inner{display:table-row;text-align:center}.wdi_layout_th .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_th .wdi_load_more_text img{float:left}.wdi_layout_th .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay i{opacity:1}.wdi_layout_th .wdi_load_more_container{display:inline-block}.wdi_layout_ib .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_ib .wdi_feed_wrapper{margin:0 auto}.wdi_layout_ib .wdi_header_wrapper{display:inline-table}.wdi_layout_ib .wdi_header_img_wrap,.wdi_layout_ib .wdi_users_img_wrap{overflow:hidden}.wdi_layout_ib .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_ib .wdi_single_user{display:inline-block;float:left}.wdi_layout_ib .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_ib .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_ib .wdi_followers,.wdi_layout_ib .wdi_posts{display:inline-block}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_ib .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_ib .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0;padding:0}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_ib .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_ib .wdi_bio{float:left}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_ib .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_ib .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_ib .wdi_photo_wrap{overflow:hidden;box-sizing:content-box}.wdi_layout_ib .wdi_img{width:100%;display:block}.wdi_layout_ib .wdi_feed_item{display:inline-block;overflow:hidden}.wdi_layout_ib .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_ib .wdi_thumb_comments i,.wdi_layout_ib .wdi_thumb_likes i{width:100%}.wdi_layout_ib .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_ib .wdi_photo_title:hover{cursor:pointer}.wdi_layout_ib .wdi_load_more{padding:10px;transition:all .2s ease}.wdi_layout_ib .wdi_load_more_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_ib .wdi_load_more_wrap_inner{display:table-row;text-align:center}.wdi_layout_ib .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_ib .wdi_load_more_text img{float:left}.wdi_layout_ib .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_ib .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_ib .wdi_load_more_container{display:inline-block}.wdi_embed_frame video{display:inline-block}.wdi_image_container img{display:inline}.wdi_carousel_btn_container{height:20px;position:absolute;width:100%;bottom:40px;z-index:10150;font-size:0}.wdi_carousel_btn_container span{background:rgba(255,255,255,0.5);width:10px;height:10px;display:inline-block;border-radius:5px;cursor:pointer;margin-right:9px;position:relative;left:0;transition:left .3s;-webkit-transition:left .3s;-moz-transition:left .3s}.wdi_carousel_btn_container span.active{background:#fff}.wdi_carousel_btn_container span.small{width:7px;height:7px;margin-right:12px;top:-2px}.wdi_carousel_btn_content{display:inline-block;overflow:hidden;white-space:nowrap;position:relative;padding:8px 9px;background:rgba(0,0,0,0.17);border-radius:21px}.wdi_image_container .carousel_media:not(.active){display:none}
|
1 |
+
.wdi_clear{clear:both}.wdi_feed_main_container .table{display:table}.wdi_feed_main_container .table-cell{display:table-cell}.wdi_feed_main_container .table-row{display:table-row}.wdi_feed_main_container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_follow_button:hover{cursor:pointer}.wdi_hidden{display:none !important}.wdi_hover_off:hover{background-color:transparent !important}.wdi_cursor_off:hover{cursor:auto !important}.wdi_filter_active span{color:white}.wdi_disabled{visibility:hidden}.wdi_ajax_loading{position:absolute;width:50px;height:50px;left:0;right:0;bottom:-50px;margin:auto;z-index:100}.wdi_feed_main_container{width:100%;position:relative}.wdi_feed_main_container .wdi_img{margin:0}.wdi_feed_main_container .wdi_follow_btn{display:inline-block;background:0;border-style:solid;border-width:1px;font-weight:500;outline:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-appearance:none;vertical-align:text-bottom}.wdi_feed_main_container .wdi_follow_btn:hover{cursor:pointer}.wdi_feed_main_container .wdi_pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_feed_main_container .wdi_pagination_ctrl{display:inline-block}.wdi_feed_main_container .wdi_pagination_ctrl:hover{cursor:pointer}.wdi_feed_main_container .wdi_filter_icon span{display:block;font-size:25px;color:white}.wdi_feed_main_container .wdi_filter_icon span::before{width:20px;height:20px;position:absolute;opacity:1;right:0;left:0;top:0;bottom:0;margin:auto}.wdi_photo_img{position:relative;overflow:hidden}.wdi_photo_overlay{width:100%;height:100%;position:absolute;top:0;left:0;background-color:transparent;transition:all .1s ease}.wdi_thumb_icon i{display:none;transition:all .1s ease}.wdi_photo_overlay:hover .wdi_thumb_icon i{display:block}.wdi_feed_main_container .fa{font-family:FontAwesome !important;font-style:normal;width:auto}.wdi_media_info .fa:before{margin-right:6px}.wdi_spider_popup_loading{background-image:url("../images/ajax_loader.png");background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:50px 50px;border:none !important;display:none;height:50px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:50px;z-index:10102;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_popup_overlay{cursor:pointer;background-color:rgba(0,0,0,0.5);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}div[id^="wdi_container"] p{padding:0 !important;margin:0 !important}.wdi_spider_popup_loading,.footer-list-block .bwp_gallery .wdi_spider_popup_loading,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_loading{background-image:url("../images/ajax_loader.png");background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:50px 50px;border:none !important;display:none;height:50px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:50px;z-index:10102;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_ajax_loading{border:none !important;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;-webkit-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}.wdi_spider_popup_overlay,.footer-list-block .bwp_gallery .wdi_spider_popup_overlay,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.wdi_spider_popup_close,.wdi_spider_popup_close_fullscreen{-moz-box-sizing:content-box !important;box-sizing:content-box !important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}#wdi_spider_popup_left{left:0}#wdi_spider_popup_right{right:0}#wdi_spider_popup_left:hover,#wdi_spider_popup_right:hover{visibility:visible}#wdi_spider_popup_left:hover span{left:20px}#wdi_spider_popup_right:hover span{left:auto;right:20px}#wdi_spider_popup_left,#wdi_spider_popup_right{background:transparent url("../images/blank.gif") repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#wdi_spider_popup_left-ico,#wdi_spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;left:-9999px;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.wdi_image_info_container1{height:100%;margin:0 auto;position:absolute;width:100%}.wdi_image_info_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.wdi_image_info_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.wdi_image_info{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.wdi_photo_wrap_inner{text-align:center}.wdi_feed_item[wdi_type="slideshow"] .fa-clone{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.wdi_js_error_no_animate,.wdi_token_error{text-align:center;font-size:14px}.wdi_js_error{text-align:center;-webkit-animation-name:wdi_js_error;-moz-animation-name:wdi_js_error;-o-animation-name:wdi_js_error;animation-name:wdi_js_error;-webkit-animation-duration:.5s;-moz-animation-duration:.5s;-o-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:20s;-moz-animation-delay:20s;-o-animation-delay:20s;animation-delay:20s;-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;animation-fill-mode:forwards;color:#c00;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);font-size:12px}@keyframes wdi_js_error{from{visibility:hidden;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0)}to{visibility:visible;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.wdi_layout_th .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_th .wdi_feed_wrapper{margin:0 auto}.wdi_layout_th .wdi_header_wrapper{display:inline-table}.wdi_layout_th .wdi_header_img_wrap,.wdi_users_img_wrap{overflow:hidden}.wdi_layout_th .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_th .wdi_single_user{display:inline-block;float:left}.wdi_layout_th .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_th .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_th .wdi_followers,.wdi_layout_th .wdi_posts{display:inline-block}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_th .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_th .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0;padding:0}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_th .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_th .wdi_bio{float:left}.wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_th .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_th .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_th .wdi_photo_wrap{position:relative;display:inline-block;overflow:hidden;box-sizing:content-box}.wdi_layout_th .wdi_photo_wrap:after{padding-top:100%;display:block;content:""}.wdi_layout_th .wdi_photo_wrap_inner{position:absolute;top:0;bottom:0;left:0;right:0}.wdi_layout_th .wdi_photo_img{width:100%;height:100%}.wdi_layout_th .wdi_img{display:block;position:absolute;top:50%;left:50%;max-width:none;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.wdi_layout_th .wdi_shape_portrait .wdi_img,.wdi_layout_th .wdi_shape_square .wdi_img{width:100%;height:auto}.wdi_layout_th .wdi_shape_landscape .wdi_img{height:100% !important;width:auto}.wdi_layout_th .wdi_feed_item{display:inline-block;vertical-align:top;overflow:hidden}.wdi_layout_th .wdi_photo_meta{text-align:center;padding-bottom:10px;line-height:1.4}.wdi_layout_th .wdi_thumb_comments i,.wdi_layout_th .wdi_thumb_likes i{width:100%}.wdi_layout_th .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_th .wdi_photo_title:hover{cursor:pointer}@-moz-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-o-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-ms-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@-webkit-keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes wdi_rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}.wdi_layout_th .wdi_load_more_spinner{display:table-cell;vertical-align:middle;-webkit-animation:wdi_rotate 1.5s infinite;-moz-animation:wdi_rotate 1.5s infinite;-o-animation:wdi_rotate 1.5s infinite;animation:wdi_rotate 1.5s infinite}.wdi_layout_th .wdi_load_more,.wdi_layout_th .wdi_spinner{padding:10px;transition:all .2s ease}.wdi_layout_th .wdi_load_more_wrap,.wdi_layout_th .wdi_spinner_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_th .wdi_load_more_wrap_inner,.wdi_layout_th .wdi_spinner_wrap_inner{display:table-row;text-align:center}.wdi_layout_th .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_th .wdi_load_more_text img{float:left}.wdi_layout_th .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay i{opacity:1}.wdi_layout_th .wdi_load_more_container{display:inline-block}.wdi_layout_ib .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_ib .wdi_feed_wrapper{margin:0 auto}.wdi_layout_ib .wdi_header_wrapper{display:inline-table}.wdi_layout_ib .wdi_header_img_wrap,.wdi_layout_ib .wdi_users_img_wrap{overflow:hidden}.wdi_layout_ib .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_ib .wdi_single_user{display:inline-block;float:left}.wdi_layout_ib .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_ib .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_ib .wdi_followers,.wdi_layout_ib .wdi_posts{display:inline-block}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_ib .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_ib .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0;padding:0}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_ib .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_ib .wdi_bio{float:left}.wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_ib .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_ib .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_ib .wdi_photo_wrap{overflow:hidden;box-sizing:content-box}.wdi_layout_ib .wdi_img{width:100%;display:block}.wdi_layout_ib .wdi_feed_item{display:inline-block;overflow:hidden}.wdi_layout_ib .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_ib .wdi_thumb_comments i,.wdi_layout_ib .wdi_thumb_likes i{width:100%}.wdi_layout_ib .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_ib .wdi_photo_title:hover{cursor:pointer}.wdi_layout_ib .wdi_load_more{padding:10px;transition:all .2s ease}.wdi_layout_ib .wdi_load_more_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_ib .wdi_load_more_wrap_inner{display:table-row;text-align:center}.wdi_layout_ib .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_ib .wdi_load_more_text img{float:left}.wdi_layout_ib .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_ib .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_ib .wdi_load_more_container{display:inline-block}.wdi_embed_frame video{display:inline-block}.wdi_image_container img{display:inline}.wdi_carousel_btn_container{height:20px;position:absolute;width:100%;bottom:65px;z-index:10150;font-size:0}.wdi_carousel_btn_container span{background:rgba(255,255,255,0.5);width:10px;height:10px;display:inline-block;border-radius:5px;cursor:pointer;margin-right:9px;position:relative;left:0;transition:left .3s;-webkit-transition:left .3s;-moz-transition:left .3s}.wdi_carousel_btn_container span:last-child{margin-right:0}.wdi_carousel_btn_container span.active{background:#fff}.wdi_carousel_btn_container span.small{width:7px;height:7px;margin-right:12px;top:-2px}.wdi_carousel_btn_content{display:inline-block;overflow:hidden;white-space:nowrap;position:relative;padding:8px 9px;background:rgba(0,0,0,0.17);border-radius:21px}.wdi_image_container .carousel_media:not(.active){display:none}
|
framework/WDILibrary.php
CHANGED
@@ -193,7 +193,6 @@ class WDILibrary {
|
|
193 |
|
194 |
public static function search($search_by, $search_value, $form_id) {
|
195 |
?>
|
196 |
-
<div class="alignright" style="clear:both;">
|
197 |
<script>
|
198 |
function wdi_spider_search() {
|
199 |
var wdi_form = jQuery('#<?php echo $form_id; ?>');
|
@@ -221,10 +220,9 @@ class WDILibrary {
|
|
221 |
}
|
222 |
</script>
|
223 |
<p class="search-box">
|
224 |
-
<input type="
|
225 |
<input type="button" value="<?php _e('Search',"wd-instagram-feed");?>" onclick="wdi_spider_search()" class="button-secondary action">
|
226 |
</p>
|
227 |
-
</div>
|
228 |
<?php
|
229 |
}
|
230 |
|
@@ -1091,6 +1089,30 @@ class WDILibrary {
|
|
1091 |
$url = add_query_arg(array( 'page' => $page, $data ), admin_url('admin.php'));
|
1092 |
return $url;
|
1093 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1094 |
|
1095 |
////////////////////////////////////////////////////////////////////////////////////////
|
1096 |
// Private Methods //
|
193 |
|
194 |
public static function search($search_by, $search_value, $form_id) {
|
195 |
?>
|
|
|
196 |
<script>
|
197 |
function wdi_spider_search() {
|
198 |
var wdi_form = jQuery('#<?php echo $form_id; ?>');
|
220 |
}
|
221 |
</script>
|
222 |
<p class="search-box">
|
223 |
+
<input type="search" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
|
224 |
<input type="button" value="<?php _e('Search',"wd-instagram-feed");?>" onclick="wdi_spider_search()" class="button-secondary action">
|
225 |
</p>
|
|
|
226 |
<?php
|
227 |
}
|
228 |
|
1089 |
$url = add_query_arg(array( 'page' => $page, $data ), admin_url('admin.php'));
|
1090 |
return $url;
|
1091 |
}
|
1092 |
+
public static function get_shortcode_data() {
|
1093 |
+
global $wpdb;
|
1094 |
+
require_once WDI_DIR . "/admin/models/WDIModelEditorShortcode.php";
|
1095 |
+
$model = new WDIModelEditorShortcode();
|
1096 |
+
|
1097 |
+
$rows = $model->get_row_data();
|
1098 |
+
$gb_row = array();
|
1099 |
+
foreach ($rows as $row){
|
1100 |
+
$obj = new stdClass();
|
1101 |
+
$obj->id = $row->id;
|
1102 |
+
$obj->name = $row->feed_name;
|
1103 |
+
$gb_row[] = $obj;
|
1104 |
+
}
|
1105 |
+
$data = array();
|
1106 |
+
$data['shortcode_prefix'] = "wdi_feed";
|
1107 |
+
$data['inputs'][] = array(
|
1108 |
+
'type' => 'select',
|
1109 |
+
'id' => 'wdi_id',
|
1110 |
+
'name' => 'wdi_id',
|
1111 |
+
'shortcode_attibute_name' => 'id',
|
1112 |
+
'options' => $gb_row,
|
1113 |
+
);
|
1114 |
+
return json_encode($data);
|
1115 |
+
}
|
1116 |
|
1117 |
////////////////////////////////////////////////////////////////////////////////////////
|
1118 |
// Private Methods //
|
framework/WDI_admin_view.php
CHANGED
@@ -27,7 +27,7 @@ class WDI_admin_view{
|
|
27 |
?>
|
28 |
<div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
|
29 |
<div class="block margin">
|
30 |
-
<a href="<?php echo $element['href']; ?>" id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo esc_html($element['title']); ?></a>
|
31 |
</div>
|
32 |
</div>
|
33 |
<?php
|
27 |
?>
|
28 |
<div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
|
29 |
<div class="block margin">
|
30 |
+
<a href="<?php echo $element['href']; ?>" id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo (isset($element['value']))?esc_html($element['value']):esc_html($element['title']); ?></a>
|
31 |
</div>
|
32 |
</div>
|
33 |
<?php
|
frontend/shortcode.php
CHANGED
@@ -178,7 +178,10 @@ function wdi_load_frontend_scripts()
|
|
178 |
|
179 |
$wdi_token_error_flag = get_option("wdi_token_error_flag");
|
180 |
|
181 |
-
wp_localize_script("wdi_frontend", 'wdi_ajax', array(
|
|
|
|
|
|
|
182 |
wp_localize_script("wdi_frontend", 'wdi_url', array('plugin_url' => WDI_URL . '/',
|
183 |
'ajax_url' => admin_url('admin-ajax.php')), WDI_VERSION);
|
184 |
|
@@ -367,4 +370,5 @@ function wdi_feed_frontend_messages(){
|
|
367 |
$js_error_message ."<br/>". $ajax_error_message .'</div>';
|
368 |
echo '<div '.$error_style.' class="wdi_token_error wdi_hidden">'. $token_error_message .'</div>';
|
369 |
echo '<div '.$error_style.' class="wdi_private_feed_error wdi_hidden"><span>'. $private_feed_error_1 . $private_feed_error_3 .$private_feed_error_2.'</span></div>';
|
|
|
370 |
}
|
178 |
|
179 |
$wdi_token_error_flag = get_option("wdi_token_error_flag");
|
180 |
|
181 |
+
wp_localize_script("wdi_frontend", 'wdi_ajax', array(
|
182 |
+
'ajax_url' => admin_url('admin-ajax.php'),
|
183 |
+
'wdi_nonce' => wp_create_nonce("wdi_cache")
|
184 |
+
), WDI_VERSION);
|
185 |
wp_localize_script("wdi_frontend", 'wdi_url', array('plugin_url' => WDI_URL . '/',
|
186 |
'ajax_url' => admin_url('admin-ajax.php')), WDI_VERSION);
|
187 |
|
370 |
$js_error_message ."<br/>". $ajax_error_message .'</div>';
|
371 |
echo '<div '.$error_style.' class="wdi_token_error wdi_hidden">'. $token_error_message .'</div>';
|
372 |
echo '<div '.$error_style.' class="wdi_private_feed_error wdi_hidden"><span>'. $private_feed_error_1 . $private_feed_error_3 .$private_feed_error_2.'</span></div>';
|
373 |
+
echo '<div class="wdi_check_fontawesome wdi_hidden"><i class="fa fa-instagram""></i></div>';
|
374 |
}
|
images/insta.svg
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#575E67;}
|
7 |
+
</style>
|
8 |
+
<path class="st0" d="M20.8,0.1H9.2c-5,0-9.1,4.1-9.1,9.1v11.7c0,5,4.1,9.1,9.1,9.1h11.6c5,0,9.1-4.1,9.1-9.1V9.1
|
9 |
+
C29.9,4.1,25.8,0.1,20.8,0.1z M27,20.8c0,3.4-2.8,6.2-6.2,6.2H9.2C5.8,27,3,24.3,3,20.8V9.1C3,5.7,5.8,3,9.2,3h11.6
|
10 |
+
C24.2,3,27,5.7,27,9.1V20.8z"/>
|
11 |
+
<path class="st0" d="M15,7.5c-4.2,0-7.6,3.4-7.6,7.5c0,4.2,3.4,7.6,7.6,7.6c4.2,0,7.5-3.4,7.5-7.6S19.2,7.5,15,7.5z M15,19.9
|
12 |
+
c-2.7,0-4.9-2.2-4.9-4.9c0-2.7,2.2-4.9,4.9-4.9c2.7,0,4.9,2.2,4.9,4.9C20,17.7,17.8,19.9,15,19.9z"/>
|
13 |
+
<circle class="st0" cx="23" cy="7.1" r="1.8"/>
|
14 |
+
</svg>
|
images/insta_2.svg
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#E83B5E;}
|
7 |
+
</style>
|
8 |
+
<g>
|
9 |
+
<g>
|
10 |
+
<g>
|
11 |
+
<g id="XMLID_77_">
|
12 |
+
<g>
|
13 |
+
<path id="XMLID_78_" class="st0" d="M20.8,29.9H9.2c-5,0-9.1-4.1-9.1-9.1V9.1c0-5,4.1-9.1,9.1-9.1h11.6c5,0,9.1,4.1,9.1,9.1
|
14 |
+
v11.7C29.9,25.9,25.8,29.9,20.8,29.9z M9.2,3C5.8,3,3,5.7,3,9.1v11.7C3,24.3,5.8,27,9.2,27h11.6c3.4,0,6.2-2.8,6.2-6.2V9.1
|
15 |
+
C27,5.7,24.2,3,20.8,3L9.2,3z"/>
|
16 |
+
</g>
|
17 |
+
</g>
|
18 |
+
<g id="XMLID_73_">
|
19 |
+
<g>
|
20 |
+
<path id="XMLID_74_" class="st0" d="M15,22.6c-4.2,0-7.6-3.4-7.6-7.6s3.4-7.5,7.6-7.5s7.5,3.4,7.5,7.5S19.2,22.6,15,22.6z
|
21 |
+
M15,10.1c-2.7,0-4.9,2.2-4.9,4.9s2.2,4.9,4.9,4.9S20,17.7,20,15S17.8,10.1,15,10.1z"/>
|
22 |
+
</g>
|
23 |
+
</g>
|
24 |
+
<g id="XMLID_72_">
|
25 |
+
<circle class="st0" cx="23" cy="7.1" r="1.8"/>
|
26 |
+
</g>
|
27 |
+
</g>
|
28 |
+
</g>
|
29 |
+
</g>
|
30 |
+
</svg>
|
js/gallerybox/wdi_gallery_box.js
CHANGED
@@ -634,11 +634,13 @@ function wdi_play_pause($this)
|
|
634 |
firefox = true;
|
635 |
}
|
636 |
if (!firefox) {
|
|
|
637 |
if (!video.paused) {
|
638 |
video.pause();
|
639 |
} else {
|
640 |
video.play();
|
641 |
}
|
|
|
642 |
}
|
643 |
|
644 |
|
634 |
firefox = true;
|
635 |
}
|
636 |
if (!firefox) {
|
637 |
+
|
638 |
if (!video.paused) {
|
639 |
video.pause();
|
640 |
} else {
|
641 |
video.play();
|
642 |
}
|
643 |
+
|
644 |
}
|
645 |
|
646 |
|
js/wdi_admin.js
CHANGED
@@ -1,5 +1,24 @@
|
|
1 |
jQuery(document).ready(function() {
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
/*Feeds page*/
|
5 |
wdi_controller.bindSaveFeedEvent();
|
@@ -1454,7 +1473,7 @@ function wdi_bulk_actions(that) {
|
|
1454 |
}
|
1455 |
}
|
1456 |
wdi_spider_set_input_value('task', action);
|
1457 |
-
jQuery('#
|
1458 |
}
|
1459 |
else {
|
1460 |
return false;
|
1 |
jQuery(document).ready(function() {
|
2 |
+
jQuery("#wdi_reset_cache").click(function (e) {
|
3 |
+
jQuery(".wdi_reset_cache_success").remove();
|
4 |
+
e.preventDefault();
|
5 |
+
jQuery.ajax({
|
6 |
+
type: "POST",
|
7 |
+
url: wdi_ajax.ajax_url,
|
8 |
+
dataType:"json",
|
9 |
+
data: {
|
10 |
+
wdi_nonce:wdi_ajax.wdi_nonce,
|
11 |
+
action:"wdi_set_reset_cache"
|
12 |
+
},
|
13 |
+
success: function(data){
|
14 |
+
if(data.success === false){
|
15 |
+
jQuery("#wdi_reset_cache").before("<span class='wdi_reset_cache_success' style='color: #fc0000; margin-left: 15px; line-height: 2;'>Failed</span>");
|
16 |
+
}else{
|
17 |
+
jQuery("#wdi_reset_cache").before("<span class='wdi_reset_cache_success' style='color: #029117; margin-left: 15px; line-height: 2;'>Success</span>");
|
18 |
+
}
|
19 |
+
}
|
20 |
+
});
|
21 |
+
})
|
22 |
|
23 |
/*Feeds page*/
|
24 |
wdi_controller.bindSaveFeedEvent();
|
1473 |
}
|
1474 |
}
|
1475 |
wdi_spider_set_input_value('task', action);
|
1476 |
+
jQuery('#wdi_feed_form').submit();
|
1477 |
}
|
1478 |
else {
|
1479 |
return false;
|
js/wdi_admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){wdi_controller.bindSaveFeedEvent();wdi_controller.bindAddNewUserOrHashtagEvent();jQuery(".display_type input").on("click",function(){wdi_controller.displaySettingsSection(jQuery(this))});wdi_controller.conditionalFiltersTabInit();wdi_controller.bindSaveThemeEvent();jQuery("#wdi_add_user_ajax").after(jQuery("<br><label class='wdi_pro_only' for='wdi_add_user_ajax_input'>"+wdi_messages.username_hashtag_multiple+"</label>"));if(jQuery("body").hasClass("instagram-feed-wd_page_wdi_settings")){wdi_advanced_option_controller()}jQuery(".wdi_section_name").click(function(){b(jQuery(this))});b(false);function b(f){if(f===false){var d={wdi_layout_section:"show",wdi_media:"show",wdi_layout:"hide",wdi_advanced:"hide",wdi_lightbox_general:"show",wdi_lightbox_advanced:"hide",wdi_conditional_filters:"show",wdi_how_to_publish:"show"};var g=JSON.parse(localStorage.getItem("wdi_sections"));if(g===null||g===false){g=d;localStorage.setItem("wdi_sections",JSON.stringify(g))}for(i in g){var j=jQuery("#wdi_save_feed").find("[data-section_name='"+i+"']");a(g[i],j)}}else{var c=jQuery(f).data("section_name");var h=null;if(f.hasClass("wdi_section_open")){a("show",f);h="show"}else{if(f.hasClass("wdi_section_close")){a("hide",f);h="hide"}}if(h!=null){var e=JSON.parse(localStorage.getItem("wdi_sections"))||{};e[c]=h;localStorage.setItem("wdi_sections",JSON.stringify(e))}}}function a(e,d){if(e==="show"){var c=d.closest(".wdi_section").find(".wdi_elements");if(c.data("display")==="table"){c.css({display:"table"})}else{c.css({display:"block"})}d.css({"border-bottom":"1px solid #f1f1f1",margin:"0 auto 15px"});d.removeClass("wdi_section_open");d.addClass("wdi_section_close")}else{d.closest(".wdi_section").find(".wdi_elements").css({display:"none"});d.css({"border-bottom":"0px",margin:"0 auto 0px"});d.removeClass("wdi_section_close");d.addClass("wdi_section_open")}}});function wdi_advanced_option_controller(){var a=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));a.addClass("wdi_advanced_option wdi_advanced_option_close");var b="<tr class='wdi_advanced_option_head'><th>ADVANCED OPTIONS</th><td><div class='wdi_advanced_option_icon'></div></td></tr>";$tr=jQuery(b);a.prepend($tr);$tr.on("click",function(){if(a.hasClass("wdi_advanced_option_open")){a.removeClass("wdi_advanced_option_open");a.addClass("wdi_advanced_option_close")}else{a.removeClass("wdi_advanced_option_close");a.addClass("wdi_advanced_option_open")}})}function wdi_controller(){}wdi_controller.getParameterByName=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=new RegExp("[\\?&]"+a+"=([^&#]*)"),b=c.exec(location.search);return b===null?"":decodeURIComponent(b[1].replace(/\+/g," "))};wdi_controller.apiRedirected=function(){var d=this.getParameterByName("access_token");var a=d.split(".");var b=/^[^\\\/&?><"']*$/;for(i=0;i<a.length;i++){if(a[i].match(b)===null){return}}var c=a.join(".");jQuery(document).ready(function(){jQuery("#wdi_access_token").attr("value",c)});wdi_controller.instagram.addToken(c);wdi_controller.getUserInfo(c)};wdi_controller.getUserInfo=function(a){this.instagram.getSelfInfo({success:function(b){jQuery("#wdi_user_name").attr("value",b.data["username"]);jQuery("#wdi_user_id").attr("value",b.data["id"]);jQuery(document).trigger("wdi_settings_filled")}})};wdi_controller.oldDisplayType={};wdi_controller.displayTypeMemory={};wdi_controller.switchFeedTabs=function(d,b){jQuery("#wdi_refresh_tab").attr("value",d);jQuery(".wdi_tab").hide();jQuery("#"+d+"_tab").show();jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+d+'"]').css("display","block");if(!jQuery('.display_type[tab="'+d+'"]').length){jQuery(".display_type_content").hide()}else{jQuery(".display_type_content").show()}jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+d).addClass("wdi_feed_tab_active");var a=jQuery();var c=false;if(b!=undefined&&b!=""){a=jQuery(".display_type #"+b).prop("checked",true);jQuery("#wdi_feed_type").attr("value",b)}if(!c){a=jQuery('.display_type[tab="'+d+'"] input[name="feed_type"]:checked');if(a.length!=0){c=true}}if(!c){a=jQuery('.display_type[tab="'+d+'"] #thumbnails');if(a.length!=0){c=true;a.prop("checked",true);jQuery("#wdi_feed_type").attr("value","thumbnails")}}if(c){wdi_controller.displaySettingsSection(a)}if(d!="conditional_filters"){jQuery("#wdi-conditional-filters-ui").addClass("wdi_hidden")}else{jQuery("#wdi-conditional-filters-ui").removeClass("wdi_hidden")}};wdi_controller.displaySettingsSection=function(h){var d=h.attr("id").toLowerCase().trim();var g=h.parent().parent().attr("tab");var a=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:d,tab:g};wdi_controller.displayTypeMemory[g]=wdi_controller.oldDisplayType;if(a!=undefined){a.attr("value",d)}var f=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",d);var e=0,c=0;var b=false;f.find(".wdi_element").each(function(){e++;var j=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(j!==undefined){b=false;var k=j.toLowerCase().trim().split(",");for(c=0;c<k.length;c++){if(k[c]===d){jQuery(this).css("display","block");b=true}}if(b===false){jQuery(this).css("display","none")}}})};wdi_controller.switchThemeTabs=function(b,a){jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+b).addClass("wdi_feed_tab_active");jQuery("[tab]").each(function(){if(jQuery(this).attr("tab")!=b){jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","none")}else{jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","block")}});jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+b+'"]').css("display","block");jQuery("#wdi_refresh_tab").attr("value",b);if(a!=undefined&&a!=""){jQuery("#wdi_refresh_section").attr("value",a)}if(a==undefined&&a!=""){if(wdi_controller.displayTypeMemory[b]!=undefined){jQuery(".display_type #"+wdi_controller.displayTypeMemory[b]["section"]).trigger("click")}else{jQuery('.display_type[tab="'+b+'"]').first().find("input").trigger("click")}}else{jQuery(".display_type #"+a).trigger("click")}};wdi_controller.bindSaveFeedEvent=function(){var a=this;jQuery("#wdi_save_feed_submit").on("click",function(){a.save_feed("save_feed")});jQuery("#wdi_save_feed_apply").on("click",function(){a.save_feed("apply_changes")});jQuery("#wdi_cancel_changes").on("click",function(){a.save_feed("cancel")})};wdi_controller.save_feed=function(d){if("cancel"==d){window.location=window.location.href}wdi_controller.checkIfUserNotSaved(d);if(wdi_controller.waitingAjaxRequestEnd.button!=0){return}jQuery("#task").attr("value",d);var a=this.feed_users,b,c,f,j,h,e={username:jQuery("#wdi_default_user").val(),id:jQuery("#wdi_default_user_id").val()};if(a.length==0){a.push(e);this.updateFeaturedImageSelect(e.username,"add","selected")}b=this.stringifyUserData(a);jQuery("#WDI_feed_users").val(b);if(d=="apply_changes"||d=="save_feed"){c=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",c)}f=jQuery("#WDI_thumb_user").val();h=this.getUserProfilePic(f);if("false"==h||typeof h=="undefined"){var g=this;this.instagram.getSelfInfo({success:function(m){var l=g.isValidResponse(m),k=m.data,n;if(l.valid&&g.hasData(m)&&k){n=k.profile_picture}else{n=""}}});jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}else{jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}};wdi_controller.makeInstagramUserRequest=function(b,f){var a,c,g=this,d;c=this.getInputType(b);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){alert(wdi_messages.only_one_user_or_hashtag);return}}switch(c){case"user":if(b!==wdi_options.wdi_user_name){alert("You can add only your username ( "+wdi_options.wdi_user_name+" )");return}this.instagram.getSelfInfo({success:function(k){var j=g.isValidResponse(k);if(j.valid==false){alert(j.msg);return}var h=k.data;if(j.valid&&g.hasData(k)){g.addUser(h)}else{if(!h){alert(wdi_messages.user_not_exist.replace("%s",'"'+b+'"'))}else{alert(j.msg)}}}});break;case"hashtag":var e=b.substr(1,b.length);e=e.replace(" ","");this.instagram.getTagRecentMedia(e,{success:function(j){var h=g.isValidResponse(j);if(h.valid&&g.hasData(j)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!g.hasData(j)&&h.msg=="success"){if(f!=true){if(confirm(wdi_messages.hashtag_no_data)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{jQuery("#wdi_add_user_ajax_input").val("")}}else{g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}}else{alert(h.msg)}}}});break}};wdi_controller.checkForDuplicateUser=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return true}}return false};wdi_controller.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_controller.stringifyUserData=function(a){var c=[];for(var b=0;b<a.length;b++){c.push({username:a[b]["username"],id:a[b]["id"]})}return JSON.stringify(c)};wdi_controller.bindAddNewUserOrHashtagEvent=function(){jQuery("#wdi_add_user_ajax").on("click",function(){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a)});jQuery("#wdi_add_user_ajax_input").on("keypress",function(b){if(b.keyCode==13){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a);return false}})};wdi_controller.removeFeedUser=function(b){var c=b.parent().find("a span").text();if(b.parent().find("a span").hasClass("wdi_hashtag")){c="#"+c}for(var a=0;a<this.feed_users.length;a++){if(this.feed_users[a]["username"]==c){this.feed_users.splice(a,1);break}}b.parent().remove();if(c!==jQuery("#wdi_default_user").val()){wdi_controller.updateFeaturedImageSelect(c,"remove")}if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==0){jQuery("#wdi_add_user_ajax_input").removeAttr("disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder","")}}};wdi_controller.updateFeaturedImageSelect=function(f,e,d){var a=jQuery("#WDI_thumb_user");if(d!="selected"){d=""}switch(e){case"add":var b=a.find('option[value="'+f+'"]').length;if(!b){var c=jQuery("<option "+d+' value="'+f+'">'+f+"</option>");a.append(c)}break;case"remove":a.find('option[value="'+f+'"]').remove();if(this.feed_users.length>0){a.val(this.feed_users[0].username)}break}};wdi_controller.bindSaveThemeEvent=function(){jQuery("#wdi_save_theme_submit").on("click",function(){jQuery("#task").attr("value","save_feed");jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_apply").on("click",function(){jQuery("#task").attr("value","apply_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_reset").on("click",function(){jQuery("#task").attr("value","reset_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()})};wdi_controller.checkIfUserNotSaved=function(b){switch(b){case"save_feed":b="submit";break;case"apply_changes":b="apply";break;case"reset_changes":b="reset";break}if(jQuery("#wdi_add_user_ajax_input").val().trim()!=""){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.waitingAjaxRequestEnd={button:b};wdi_controller.makeInstagramUserRequest(a);return 1}else{wdi_controller.waitingAjaxRequestEnd={button:0};return 0}};wdi_controller.saveFeedAfterAjaxWait=function(b){if(wdi_controller.waitingAjaxRequestEnd!=undefined){var a=wdi_controller.waitingAjaxRequestEnd.button;if(b&&a!=0){jQuery("#wdi_save_feed_"+a).trigger("click")}wdi_controller.waitingAjaxRequestEnd=undefined}};wdi_controller.getCookie=function(a){var b="; "+document.cookie;var c=b.split("; "+a+"=");if(c.length==2){return c.pop().split(";").shift()}};wdi_controller.isValidResponse=function(a){var b={};if(typeof a=="undefined"||typeof a.meta["code"]=="undefined"||a.meta["code"]!=200){b.valid=false;if(typeof a=="undefined"){b.msg=wdi_messages.instagram_server_error}else{if(a.meta["code"]!==200){b.msg=a.meta["error_message"]}else{b.msg=""}}}else{b.valid=true;b.msg="success"}return b};wdi_controller.hasData=function(a){if(typeof a!="undefined"&&typeof a.data!="undefined"&&a.data.length!=0){return true}else{return false}};wdi_controller.thumbUser=function(a){return(this.feed_users.length>0&&this.feed_users[0].username===a)};wdi_controller.findUser=function(d,a){var c=[];if(typeof a!="undefined"&&typeof a.data!="undefined"){c=a.data}for(var b=0;b<c.length;b++){if(c[b]["username"]==d){return c[b]}}return false};wdi_controller.addHashtag=function(e,c){if(e.match(/[~!@$%&*#^()<>?]/)==null){if(this.checkForDuplicateUser("#"+e)==false){var b=jQuery('<div class="wdi_user"><a target="_blank" href="https://instagram.com/explore/tags/'+e+'"><img class="wdi_profile_pic" src="'+wdi_url.plugin_url+'/images/hashtag.png"><span class="wdi_hashtag">'+e+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(b);jQuery("#wdi_add_user_ajax_input").attr("value","");var d;if(typeof c!="undefined"){d=(c.data.length!=0)?c.data[0]["images"]["thumbnail"]["url"]:""}else{d=""}this.feed_users.push({username:"#"+e,id:"#"+e,profile_picture:d});var a="#"+e;selected=this.thumbUser(a)?"selected":"";wdi_controller.updateFeaturedImageSelect(a,"add",selected)}else{alert("#"+e+" "+wdi_messages.already_added)}}else{alert(wdi_messages.invalid_hashtag)}this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.addUser=function(a){if(this.checkForDuplicateUser(a.username)==false){newUser=jQuery('<div class="wdi_user"><a target="_blank" href="http://www.instagram.com/'+a.username+'"><img class="wdi_profile_pic" src="'+a.profile_picture+'"><span class="wdi_username">'+a.username+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(newUser);jQuery("#wdi_add_user_ajax_input").attr("value","");this.feed_users.push({username:a.username,id:a.id,profile_picture:a.profile_picture})}else{alert(a.username+" "+wdi_messages.already_added)}selected=this.thumbUser(a.username)?"selected":"";this.updateFeaturedImageSelect(a.username,"add",selected);this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.getUserProfilePic=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return this.feed_users[a]["profile_picture"]}}return"false"};wdi_controller.conditionalFiltersTabInit=function(){this.setInitialFilters();this.updateFiltersUi();var b=this;jQuery("#wdi_add_filter").on("click",function(){b.addConditionalFilter();jQuery("#wdi_filter_input").val("")});jQuery(".wdi_filter_radio").on("click",function(){jQuery("#wdi_filter_input").trigger("focus")});jQuery("#wdi_filter_input").on("keypress",function(c){if(c.keyCode==13){b.addConditionalFilter();jQuery(this).val("");return false}});a();jQuery("#WDI_wrap_conditional_filter_enable input").on("change",function(){a()});function a(){switch(jQuery("#WDI_wrap_conditional_filter_enable input:checked").val()){case"0":jQuery("#WDI_conditional_filters").parent().parent().addClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().addClass("wdi_hidden");jQuery("#wdi_final_condition").addClass("wdi_hidden");jQuery("#WDI_filter_source").addClass("wdi_hidden");break;case"1":jQuery("#WDI_conditional_filters").parent().parent().removeClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().removeClass("wdi_hidden");jQuery("#wdi_final_condition").removeClass("wdi_hidden");jQuery("#WDI_filter_source").removeClass("wdi_hidden");break}}jQuery("#WDI_conditional_filter_type").on("change",function(){if(jQuery(this).val()=="none"){}else{jQuery("#WDI_conditional_filters").css("display","block")}jQuery(this).parent().find("label").css({"line-height":"24px",height:"24px",padding:"2px 5px",display:"inline-block","font-size":"15px",color:"black","font-weight":"500","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"});switch(jQuery(this).val()){case"AND":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.and_descr);break;case"OR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.or_descr);break;case"NOR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.nor_descr);break}wdi_controller.updateFiltersUi()});jQuery("#WDI_conditional_filter_type").trigger("change")};wdi_controller.addConditionalFilter=function(){var b=jQuery("#wdi_filter_input").val(),a=jQuery("#wdi_filter_type").val(),c={};if(b==""){return}b=b.trim();switch(a){case"username":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"mention":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"hashtag":if(b[0]=="#"){b=b.substr(1,b.length)}break;case"url":var d=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(!d.test(b)){alert(wdi_messages.invalid_url);return}break}c={filter_type:a,filter_by:b,id:this.randomId()};if(a!=null){if(!this.filterExists(c)){this.conditionalFilters.push(c);this.updateFiltersUi()}else{alert(b+" "+wdi_messages.already_added)}}else{alert(wdi_messages.selectConditionType)}};wdi_controller.filterExists=function(b){for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a].filter_type==b.filter_type&&this.conditionalFilters[a].filter_by==b.filter_by){return true}}return false};wdi_controller.updateFiltersUi=function(){var a=jQuery("#wdi_filters_ui").html("");for(var b=0;b<this.conditionalFilters.length;b++){if(b==0){if(this.conditionalFilters.length!=1){switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.either+"</span>"));break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.neither+"</span>"));break}}else{switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.not+"</span>"));break}}}var c;switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":c=wdi_messages.and;break;case"OR":c=wdi_messages.or;break;case"NOR":c=wdi_messages.nor;break}if(b>=1){a.append(jQuery('<span class="wdi_logic">'+c+"</span>"))}a.append(this.createUiElement(this.conditionalFilters[b]))}this.updateFilterTextarea()};wdi_controller.createUiElement=function(b){var c;switch(b.filter_type){case"mention":c="@";break;case"hashtag":c="#";break;case"location":c="%";break;default:c="";break}var a=jQuery('<span data-id="'+b.id+'" class="wdi_filter_item wdi_filter_by_'+b.filter_type+'"></span>').html(c+b.filter_by+'<span onclick="wdi_controller.removeConditionalFilter(jQuery(this));" class="wdi_remove_filter">X</span>');return a};wdi_controller.randomId=function(){var c="";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var b=0;b<5;b++){c+=a.charAt(Math.floor(Math.random()*a.length))}return c};wdi_controller.removeConditionalFilter=function(b){var c=b.parent().attr("data-id");for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a]["id"]==c){this.conditionalFilters.splice(a,1)}}this.updateFiltersUi()};wdi_controller.updateFilterTextarea=function(){var a,b=this.conditionalFilters;a=JSON.stringify(b);jQuery("#wdi_conditional_filters_textarea").val(a)};wdi_controller.setInitialFilters=function(){var b=[],a=jQuery("#wdi_conditional_filters_textarea").val();if(this.isJsonString(a)){b=JSON.parse(a)}this.conditionalFilters=b};wdi_controller.updateConditionalFiltersUi=function(){wdi_controller.updateFilterSource()};wdi_controller.updateFilterSource=function(){if(jQuery('input[name="wdi_feed_settings[liked_feed]"]:checked').val()=="liked"){var a=jQuery("#wdi_filter_source").html("");var d="<div class='wdi_source_user'><span class='wdi_source_username'>Media I liked</span></div>";a.html(a.html()+d);return}var f=[],e,c;jQuery(".wdi_user").each(function(){if(jQuery(this).find(".wdi_username").length!=0){e=jQuery(this).find(".wdi_username").text()}else{e=jQuery(this).find(".wdi_hashtag").text()}c=jQuery(this).find("img").attr("src");f.push({username:e,image:c})});var a=jQuery("#wdi_filter_source").html("");for(var b=0;b<f.length;b++){var d="<div class='wdi_source_user'><span class='wdi_source_img'><img src='"+f[b].image+"'></span><span class='wdi_source_username'>"+f[b].username+"</span></div>";a.html(a.html()+d)}};wdi_controller.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};function wdi_spider_select_value(a){a.focus();a.select()}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_bulk_actions(a){var b=jQuery(a).val();if(b!=""){if(b=="delete_all"){if(!confirm(wdi_messages.do_you_want_to_delete_selected_items)){return false}}wdi_spider_set_input_value("task",b);jQuery("#sliders_form").submit()}else{return false}return true}function wdi_spider_check_all_items(){wdi_spider_check_all_items_checkbox();jQuery("#check_all").trigger("click")}function wdi_spider_check_all_items_checkbox(){if(jQuery("#check_all_items").attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}else{var b=(parseInt(jQuery(".displaying-num").html())?parseInt(jQuery(".displaying-num").html()):0);var a=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0);var c=a+b;jQuery("#check_all_items").attr("checked",true);if(c){jQuery("#draganddrop").html("<strong><p>Selected "+c+" item"+(c>1?"s":"")+".</p></strong>");jQuery("#draganddrop").show()}}}function wdi_spider_check_all(a){if(!jQuery(a).attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}};
|
1 |
+
jQuery(document).ready(function(){jQuery("#wdi_reset_cache").click(function(c){jQuery(".wdi_reset_cache_success").remove();c.preventDefault();jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_nonce:wdi_ajax.wdi_nonce,action:"wdi_set_reset_cache"},success:function(d){if(d.success===false){jQuery("#wdi_reset_cache").before("<span class='wdi_reset_cache_success' style='color: #fc0000; margin-left: 15px; line-height: 2;'>Failed</span>")}else{jQuery("#wdi_reset_cache").before("<span class='wdi_reset_cache_success' style='color: #029117; margin-left: 15px; line-height: 2;'>Success</span>")}}})});wdi_controller.bindSaveFeedEvent();wdi_controller.bindAddNewUserOrHashtagEvent();jQuery(".display_type input").on("click",function(){wdi_controller.displaySettingsSection(jQuery(this))});wdi_controller.conditionalFiltersTabInit();wdi_controller.bindSaveThemeEvent();jQuery("#wdi_add_user_ajax").after(jQuery("<br><label class='wdi_pro_only' for='wdi_add_user_ajax_input'>"+wdi_messages.username_hashtag_multiple+"</label>"));if(jQuery("body").hasClass("instagram-feed-wd_page_wdi_settings")){wdi_advanced_option_controller()}jQuery(".wdi_section_name").click(function(){b(jQuery(this))});b(false);function b(f){if(f===false){var d={wdi_layout_section:"show",wdi_media:"show",wdi_layout:"hide",wdi_advanced:"hide",wdi_lightbox_general:"show",wdi_lightbox_advanced:"hide",wdi_conditional_filters:"show",wdi_how_to_publish:"show"};var g=JSON.parse(localStorage.getItem("wdi_sections"));if(g===null||g===false){g=d;localStorage.setItem("wdi_sections",JSON.stringify(g))}for(i in g){var j=jQuery("#wdi_save_feed").find("[data-section_name='"+i+"']");a(g[i],j)}}else{var c=jQuery(f).data("section_name");var h=null;if(f.hasClass("wdi_section_open")){a("show",f);h="show"}else{if(f.hasClass("wdi_section_close")){a("hide",f);h="hide"}}if(h!=null){var e=JSON.parse(localStorage.getItem("wdi_sections"))||{};e[c]=h;localStorage.setItem("wdi_sections",JSON.stringify(e))}}}function a(e,d){if(e==="show"){var c=d.closest(".wdi_section").find(".wdi_elements");if(c.data("display")==="table"){c.css({display:"table"})}else{c.css({display:"block"})}d.css({"border-bottom":"1px solid #f1f1f1",margin:"0 auto 15px"});d.removeClass("wdi_section_open");d.addClass("wdi_section_close")}else{d.closest(".wdi_section").find(".wdi_elements").css({display:"none"});d.css({"border-bottom":"0px",margin:"0 auto 0px"});d.removeClass("wdi_section_close");d.addClass("wdi_section_open")}}});function wdi_advanced_option_controller(){var a=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));a.addClass("wdi_advanced_option wdi_advanced_option_close");var b="<tr class='wdi_advanced_option_head'><th>ADVANCED OPTIONS</th><td><div class='wdi_advanced_option_icon'></div></td></tr>";$tr=jQuery(b);a.prepend($tr);$tr.on("click",function(){if(a.hasClass("wdi_advanced_option_open")){a.removeClass("wdi_advanced_option_open");a.addClass("wdi_advanced_option_close")}else{a.removeClass("wdi_advanced_option_close");a.addClass("wdi_advanced_option_open")}})}function wdi_controller(){}wdi_controller.getParameterByName=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=new RegExp("[\\?&]"+a+"=([^&#]*)"),b=c.exec(location.search);return b===null?"":decodeURIComponent(b[1].replace(/\+/g," "))};wdi_controller.apiRedirected=function(){var d=this.getParameterByName("access_token");var a=d.split(".");var b=/^[^\\\/&?><"']*$/;for(i=0;i<a.length;i++){if(a[i].match(b)===null){return}}var c=a.join(".");jQuery(document).ready(function(){jQuery("#wdi_access_token").attr("value",c)});wdi_controller.instagram.addToken(c);wdi_controller.getUserInfo(c)};wdi_controller.getUserInfo=function(a){this.instagram.getSelfInfo({success:function(b){jQuery("#wdi_user_name").attr("value",b.data["username"]);jQuery("#wdi_user_id").attr("value",b.data["id"]);jQuery(document).trigger("wdi_settings_filled")}})};wdi_controller.oldDisplayType={};wdi_controller.displayTypeMemory={};wdi_controller.switchFeedTabs=function(d,b){jQuery("#wdi_refresh_tab").attr("value",d);jQuery(".wdi_tab").hide();jQuery("#"+d+"_tab").show();jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+d+'"]').css("display","block");if(!jQuery('.display_type[tab="'+d+'"]').length){jQuery(".display_type_content").hide()}else{jQuery(".display_type_content").show()}jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+d).addClass("wdi_feed_tab_active");var a=jQuery();var c=false;if(b!=undefined&&b!=""){a=jQuery(".display_type #"+b).prop("checked",true);jQuery("#wdi_feed_type").attr("value",b)}if(!c){a=jQuery('.display_type[tab="'+d+'"] input[name="feed_type"]:checked');if(a.length!=0){c=true}}if(!c){a=jQuery('.display_type[tab="'+d+'"] #thumbnails');if(a.length!=0){c=true;a.prop("checked",true);jQuery("#wdi_feed_type").attr("value","thumbnails")}}if(c){wdi_controller.displaySettingsSection(a)}if(d!="conditional_filters"){jQuery("#wdi-conditional-filters-ui").addClass("wdi_hidden")}else{jQuery("#wdi-conditional-filters-ui").removeClass("wdi_hidden")}};wdi_controller.displaySettingsSection=function(h){var d=h.attr("id").toLowerCase().trim();var g=h.parent().parent().attr("tab");var a=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:d,tab:g};wdi_controller.displayTypeMemory[g]=wdi_controller.oldDisplayType;if(a!=undefined){a.attr("value",d)}var f=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",d);var e=0,c=0;var b=false;f.find(".wdi_element").each(function(){e++;var j=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(j!==undefined){b=false;var k=j.toLowerCase().trim().split(",");for(c=0;c<k.length;c++){if(k[c]===d){jQuery(this).css("display","block");b=true}}if(b===false){jQuery(this).css("display","none")}}})};wdi_controller.switchThemeTabs=function(b,a){jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")});jQuery("#wdi_"+b).addClass("wdi_feed_tab_active");jQuery("[tab]").each(function(){if(jQuery(this).attr("tab")!=b){jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","none")}else{jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","block")}});jQuery(".display_type").css("display","none");jQuery('.display_type[tab="'+b+'"]').css("display","block");jQuery("#wdi_refresh_tab").attr("value",b);if(a!=undefined&&a!=""){jQuery("#wdi_refresh_section").attr("value",a)}if(a==undefined&&a!=""){if(wdi_controller.displayTypeMemory[b]!=undefined){jQuery(".display_type #"+wdi_controller.displayTypeMemory[b]["section"]).trigger("click")}else{jQuery('.display_type[tab="'+b+'"]').first().find("input").trigger("click")}}else{jQuery(".display_type #"+a).trigger("click")}};wdi_controller.bindSaveFeedEvent=function(){var a=this;jQuery("#wdi_save_feed_submit").on("click",function(){a.save_feed("save_feed")});jQuery("#wdi_save_feed_apply").on("click",function(){a.save_feed("apply_changes")});jQuery("#wdi_cancel_changes").on("click",function(){a.save_feed("cancel")})};wdi_controller.save_feed=function(d){if("cancel"==d){window.location=window.location.href}wdi_controller.checkIfUserNotSaved(d);if(wdi_controller.waitingAjaxRequestEnd.button!=0){return}jQuery("#task").attr("value",d);var a=this.feed_users,b,c,f,j,h,e={username:jQuery("#wdi_default_user").val(),id:jQuery("#wdi_default_user_id").val()};if(a.length==0){a.push(e);this.updateFeaturedImageSelect(e.username,"add","selected")}b=this.stringifyUserData(a);jQuery("#WDI_feed_users").val(b);if(d=="apply_changes"||d=="save_feed"){c=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",c)}f=jQuery("#WDI_thumb_user").val();h=this.getUserProfilePic(f);if("false"==h||typeof h=="undefined"){var g=this;this.instagram.getSelfInfo({success:function(m){var l=g.isValidResponse(m),k=m.data,n;if(l.valid&&g.hasData(m)&&k){n=k.profile_picture}else{n=""}}});jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}else{jQuery("#wdi_feed_thumb").attr("value",h);jQuery("#wdi_save_feed").submit()}};wdi_controller.makeInstagramUserRequest=function(b,f){var a,c,g=this,d;c=this.getInputType(b);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){alert(wdi_messages.only_one_user_or_hashtag);return}}switch(c){case"user":if(b!==wdi_options.wdi_user_name){alert("You can add only your username ( "+wdi_options.wdi_user_name+" )");return}this.instagram.getSelfInfo({success:function(k){var j=g.isValidResponse(k);if(j.valid==false){alert(j.msg);return}var h=k.data;if(j.valid&&g.hasData(k)){g.addUser(h)}else{if(!h){alert(wdi_messages.user_not_exist.replace("%s",'"'+b+'"'))}else{alert(j.msg)}}}});break;case"hashtag":var e=b.substr(1,b.length);e=e.replace(" ","");this.instagram.getTagRecentMedia(e,{success:function(j){var h=g.isValidResponse(j);if(h.valid&&g.hasData(j)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{if(!g.hasData(j)&&h.msg=="success"){if(f!=true){if(confirm(wdi_messages.hashtag_no_data)){g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}else{jQuery("#wdi_add_user_ajax_input").val("")}}else{g.addHashtag(e,j);if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==1){jQuery("#wdi_add_user_ajax_input").attr("disabled","disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder",wdi_messages.available_in_pro)}}}}else{alert(h.msg)}}}});break}};wdi_controller.checkForDuplicateUser=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return true}}return false};wdi_controller.getInputType=function(a){switch(a[0]){case"#":return"hashtag";break;case"%":return"location";break;default:return"user";break}};wdi_controller.stringifyUserData=function(a){var c=[];for(var b=0;b<a.length;b++){c.push({username:a[b]["username"],id:a[b]["id"]})}return JSON.stringify(c)};wdi_controller.bindAddNewUserOrHashtagEvent=function(){jQuery("#wdi_add_user_ajax").on("click",function(){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a)});jQuery("#wdi_add_user_ajax_input").on("keypress",function(b){if(b.keyCode==13){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.makeInstagramUserRequest(a);return false}})};wdi_controller.removeFeedUser=function(b){var c=b.parent().find("a span").text();if(b.parent().find("a span").hasClass("wdi_hashtag")){c="#"+c}for(var a=0;a<this.feed_users.length;a++){if(this.feed_users[a]["username"]==c){this.feed_users.splice(a,1);break}}b.parent().remove();if(c!==jQuery("#wdi_default_user").val()){wdi_controller.updateFeaturedImageSelect(c,"remove")}if(wdi_version.is_pro=="false"){if(jQuery(".wdi_user").length==0){jQuery("#wdi_add_user_ajax_input").removeAttr("disabled");jQuery("#wdi_add_user_ajax_input").attr("placeholder","")}}};wdi_controller.updateFeaturedImageSelect=function(f,e,d){var a=jQuery("#WDI_thumb_user");if(d!="selected"){d=""}switch(e){case"add":var b=a.find('option[value="'+f+'"]').length;if(!b){var c=jQuery("<option "+d+' value="'+f+'">'+f+"</option>");a.append(c)}break;case"remove":a.find('option[value="'+f+'"]').remove();if(this.feed_users.length>0){a.val(this.feed_users[0].username)}break}};wdi_controller.bindSaveThemeEvent=function(){jQuery("#wdi_save_theme_submit").on("click",function(){jQuery("#task").attr("value","save_feed");jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_apply").on("click",function(){jQuery("#task").attr("value","apply_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()});jQuery("#wdi_save_theme_reset").on("click",function(){jQuery("#task").attr("value","reset_changes");var a=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",a);jQuery("#wdi_save_feed").submit()})};wdi_controller.checkIfUserNotSaved=function(b){switch(b){case"save_feed":b="submit";break;case"apply_changes":b="apply";break;case"reset_changes":b="reset";break}if(jQuery("#wdi_add_user_ajax_input").val().trim()!=""){var a=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();wdi_controller.waitingAjaxRequestEnd={button:b};wdi_controller.makeInstagramUserRequest(a);return 1}else{wdi_controller.waitingAjaxRequestEnd={button:0};return 0}};wdi_controller.saveFeedAfterAjaxWait=function(b){if(wdi_controller.waitingAjaxRequestEnd!=undefined){var a=wdi_controller.waitingAjaxRequestEnd.button;if(b&&a!=0){jQuery("#wdi_save_feed_"+a).trigger("click")}wdi_controller.waitingAjaxRequestEnd=undefined}};wdi_controller.getCookie=function(a){var b="; "+document.cookie;var c=b.split("; "+a+"=");if(c.length==2){return c.pop().split(";").shift()}};wdi_controller.isValidResponse=function(a){var b={};if(typeof a=="undefined"||typeof a.meta["code"]=="undefined"||a.meta["code"]!=200){b.valid=false;if(typeof a=="undefined"){b.msg=wdi_messages.instagram_server_error}else{if(a.meta["code"]!==200){b.msg=a.meta["error_message"]}else{b.msg=""}}}else{b.valid=true;b.msg="success"}return b};wdi_controller.hasData=function(a){if(typeof a!="undefined"&&typeof a.data!="undefined"&&a.data.length!=0){return true}else{return false}};wdi_controller.thumbUser=function(a){return(this.feed_users.length>0&&this.feed_users[0].username===a)};wdi_controller.findUser=function(d,a){var c=[];if(typeof a!="undefined"&&typeof a.data!="undefined"){c=a.data}for(var b=0;b<c.length;b++){if(c[b]["username"]==d){return c[b]}}return false};wdi_controller.addHashtag=function(e,c){if(e.match(/[~!@$%&*#^()<>?]/)==null){if(this.checkForDuplicateUser("#"+e)==false){var b=jQuery('<div class="wdi_user"><a target="_blank" href="https://instagram.com/explore/tags/'+e+'"><img class="wdi_profile_pic" src="'+wdi_url.plugin_url+'/images/hashtag.png"><span class="wdi_hashtag">'+e+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(b);jQuery("#wdi_add_user_ajax_input").attr("value","");var d;if(typeof c!="undefined"){d=(c.data.length!=0)?c.data[0]["images"]["thumbnail"]["url"]:""}else{d=""}this.feed_users.push({username:"#"+e,id:"#"+e,profile_picture:d});var a="#"+e;selected=this.thumbUser(a)?"selected":"";wdi_controller.updateFeaturedImageSelect(a,"add",selected)}else{alert("#"+e+" "+wdi_messages.already_added)}}else{alert(wdi_messages.invalid_hashtag)}this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.addUser=function(a){if(this.checkForDuplicateUser(a.username)==false){newUser=jQuery('<div class="wdi_user"><a target="_blank" href="http://www.instagram.com/'+a.username+'"><img class="wdi_profile_pic" src="'+a.profile_picture+'"><span class="wdi_username">'+a.username+'</span><i style="display:table-cell;width:25px;"></i></a><img class="wdi_remove_user" onclick="wdi_controller.removeFeedUser(jQuery(this))" src="'+wdi_url.plugin_url+'/images/delete_user.png"></div>');jQuery("#wdi_feed_users").append(newUser);jQuery("#wdi_add_user_ajax_input").attr("value","");this.feed_users.push({username:a.username,id:a.id,profile_picture:a.profile_picture})}else{alert(a.username+" "+wdi_messages.already_added)}selected=this.thumbUser(a.username)?"selected":"";this.updateFeaturedImageSelect(a.username,"add",selected);this.updateConditionalFiltersUi();wdi_controller.saveFeedAfterAjaxWait(true)};wdi_controller.getUserProfilePic=function(b){for(var a=0;a<this.feed_users.length;a++){if(b==this.feed_users[a]["username"]){return this.feed_users[a]["profile_picture"]}}return"false"};wdi_controller.conditionalFiltersTabInit=function(){this.setInitialFilters();this.updateFiltersUi();var b=this;jQuery("#wdi_add_filter").on("click",function(){b.addConditionalFilter();jQuery("#wdi_filter_input").val("")});jQuery(".wdi_filter_radio").on("click",function(){jQuery("#wdi_filter_input").trigger("focus")});jQuery("#wdi_filter_input").on("keypress",function(c){if(c.keyCode==13){b.addConditionalFilter();jQuery(this).val("");return false}});a();jQuery("#WDI_wrap_conditional_filter_enable input").on("change",function(){a()});function a(){switch(jQuery("#WDI_wrap_conditional_filter_enable input:checked").val()){case"0":jQuery("#WDI_conditional_filters").parent().parent().addClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().addClass("wdi_hidden");jQuery("#wdi_final_condition").addClass("wdi_hidden");jQuery("#WDI_filter_source").addClass("wdi_hidden");break;case"1":jQuery("#WDI_conditional_filters").parent().parent().removeClass("wdi_hidden");jQuery("#WDI_conditional_filter_type").parent().parent().parent().parent().parent().removeClass("wdi_hidden");jQuery("#wdi_final_condition").removeClass("wdi_hidden");jQuery("#WDI_filter_source").removeClass("wdi_hidden");break}}jQuery("#WDI_conditional_filter_type").on("change",function(){if(jQuery(this).val()=="none"){}else{jQuery("#WDI_conditional_filters").css("display","block")}jQuery(this).parent().find("label").css({"line-height":"24px",height:"24px",padding:"2px 5px",display:"inline-block","font-size":"15px",color:"black","font-weight":"500","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"});switch(jQuery(this).val()){case"AND":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.and_descr);break;case"OR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.or_descr);break;case"NOR":jQuery("#WDI_conditional_filters").css("display","block");jQuery(this).parent().find("label").html(wdi_messages.nor_descr);break}wdi_controller.updateFiltersUi()});jQuery("#WDI_conditional_filter_type").trigger("change")};wdi_controller.addConditionalFilter=function(){var b=jQuery("#wdi_filter_input").val(),a=jQuery("#wdi_filter_type").val(),c={};if(b==""){return}b=b.trim();switch(a){case"username":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"mention":if(b[0]=="@"){b=b.substr(1,b.length)}break;case"hashtag":if(b[0]=="#"){b=b.substr(1,b.length)}break;case"url":var d=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(!d.test(b)){alert(wdi_messages.invalid_url);return}break}c={filter_type:a,filter_by:b,id:this.randomId()};if(a!=null){if(!this.filterExists(c)){this.conditionalFilters.push(c);this.updateFiltersUi()}else{alert(b+" "+wdi_messages.already_added)}}else{alert(wdi_messages.selectConditionType)}};wdi_controller.filterExists=function(b){for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a].filter_type==b.filter_type&&this.conditionalFilters[a].filter_by==b.filter_by){return true}}return false};wdi_controller.updateFiltersUi=function(){var a=jQuery("#wdi_filters_ui").html("");for(var b=0;b<this.conditionalFilters.length;b++){if(b==0){if(this.conditionalFilters.length!=1){switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.either+"</span>"));break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.neither+"</span>"));break}}else{switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":break;case"NOR":a.append(jQuery('<span class="wdi_logic">'+wdi_messages.not+"</span>"));break}}}var c;switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":c=wdi_messages.and;break;case"OR":c=wdi_messages.or;break;case"NOR":c=wdi_messages.nor;break}if(b>=1){a.append(jQuery('<span class="wdi_logic">'+c+"</span>"))}a.append(this.createUiElement(this.conditionalFilters[b]))}this.updateFilterTextarea()};wdi_controller.createUiElement=function(b){var c;switch(b.filter_type){case"mention":c="@";break;case"hashtag":c="#";break;case"location":c="%";break;default:c="";break}var a=jQuery('<span data-id="'+b.id+'" class="wdi_filter_item wdi_filter_by_'+b.filter_type+'"></span>').html(c+b.filter_by+'<span onclick="wdi_controller.removeConditionalFilter(jQuery(this));" class="wdi_remove_filter">X</span>');return a};wdi_controller.randomId=function(){var c="";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var b=0;b<5;b++){c+=a.charAt(Math.floor(Math.random()*a.length))}return c};wdi_controller.removeConditionalFilter=function(b){var c=b.parent().attr("data-id");for(var a=0;a<this.conditionalFilters.length;a++){if(this.conditionalFilters[a]["id"]==c){this.conditionalFilters.splice(a,1)}}this.updateFiltersUi()};wdi_controller.updateFilterTextarea=function(){var a,b=this.conditionalFilters;a=JSON.stringify(b);jQuery("#wdi_conditional_filters_textarea").val(a)};wdi_controller.setInitialFilters=function(){var b=[],a=jQuery("#wdi_conditional_filters_textarea").val();if(this.isJsonString(a)){b=JSON.parse(a)}this.conditionalFilters=b};wdi_controller.updateConditionalFiltersUi=function(){wdi_controller.updateFilterSource()};wdi_controller.updateFilterSource=function(){if(jQuery('input[name="wdi_feed_settings[liked_feed]"]:checked').val()=="liked"){var a=jQuery("#wdi_filter_source").html("");var d="<div class='wdi_source_user'><span class='wdi_source_username'>Media I liked</span></div>";a.html(a.html()+d);return}var f=[],e,c;jQuery(".wdi_user").each(function(){if(jQuery(this).find(".wdi_username").length!=0){e=jQuery(this).find(".wdi_username").text()}else{e=jQuery(this).find(".wdi_hashtag").text()}c=jQuery(this).find("img").attr("src");f.push({username:e,image:c})});var a=jQuery("#wdi_filter_source").html("");for(var b=0;b<f.length;b++){var d="<div class='wdi_source_user'><span class='wdi_source_img'><img src='"+f[b].image+"'></span><span class='wdi_source_username'>"+f[b].username+"</span></div>";a.html(a.html()+d)}};wdi_controller.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};function wdi_spider_select_value(a){a.focus();a.select()}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}}function wdi_spider_form_submit(b,a){if(document.getElementById(a)){document.getElementById(a).submit()}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}}function wdi_bulk_actions(a){var b=jQuery(a).val();if(b!=""){if(b=="delete_all"){if(!confirm(wdi_messages.do_you_want_to_delete_selected_items)){return false}}wdi_spider_set_input_value("task",b);jQuery("#wdi_feed_form").submit()}else{return false}return true}function wdi_spider_check_all_items(){wdi_spider_check_all_items_checkbox();jQuery("#check_all").trigger("click")}function wdi_spider_check_all_items_checkbox(){if(jQuery("#check_all_items").attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}else{var b=(parseInt(jQuery(".displaying-num").html())?parseInt(jQuery(".displaying-num").html()):0);var a=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0);var c=a+b;jQuery("#check_all_items").attr("checked",true);if(c){jQuery("#draganddrop").html("<strong><p>Selected "+c+" item"+(c>1?"s":"")+".</p></strong>");jQuery("#draganddrop").show()}}}function wdi_spider_check_all(a){if(!jQuery(a).attr("checked")){jQuery("#check_all_items").attr("checked",false);jQuery("#draganddrop").hide()}}function wdi_spider_set_input_value(b,a){if(a==="add"){if(jQuery("#wdi_access_token").attr("value")==""){alert("Please get your access token")}}if(document.getElementById(b)){document.getElementById(b).value=a}};
|
js/wdi_block.js
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function( blocks, element ) {
|
2 |
+
var wdi_gutenberg_block = function () {
|
3 |
+
registerAllPluginBlocks();
|
4 |
+
|
5 |
+
function registerAllPluginBlocks() {
|
6 |
+
var twPluginsData = window['tw_gb_wdi'];
|
7 |
+
if (!twPluginsData) {
|
8 |
+
return;
|
9 |
+
}
|
10 |
+
|
11 |
+
for (var pluginId in twPluginsData) {
|
12 |
+
if (!twPluginsData.hasOwnProperty(pluginId)) {
|
13 |
+
continue;
|
14 |
+
}
|
15 |
+
|
16 |
+
if (!twPluginsData[pluginId].inited) {
|
17 |
+
twPluginsData[pluginId].inited = true;
|
18 |
+
registerPluginBlock(blocks, element, pluginId, twPluginsData[pluginId]);
|
19 |
+
}
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
function registerPluginBlock(blocks, element, pluginId, pluginData) {
|
24 |
+
var el = element.createElement;
|
25 |
+
|
26 |
+
var isPopup = pluginData.isPopup;
|
27 |
+
|
28 |
+
var iconEl = el('img', {
|
29 |
+
width: pluginData.iconSvg.width,
|
30 |
+
height: pluginData.iconSvg.height,
|
31 |
+
src: pluginData.iconSvg.src
|
32 |
+
});
|
33 |
+
|
34 |
+
blocks.registerBlockType(pluginId, {
|
35 |
+
title: pluginData.title,
|
36 |
+
icon: iconEl,
|
37 |
+
category: 'common',
|
38 |
+
attributes: {
|
39 |
+
shortcode: {
|
40 |
+
type: 'string'
|
41 |
+
},
|
42 |
+
popupOpened: {
|
43 |
+
type: 'boolean',
|
44 |
+
value: true
|
45 |
+
},
|
46 |
+
notInitial: {
|
47 |
+
type: 'boolean'
|
48 |
+
},
|
49 |
+
shortcode_id: {
|
50 |
+
type: 'string'
|
51 |
+
}
|
52 |
+
},
|
53 |
+
|
54 |
+
edit: function (props) {
|
55 |
+
if (!props.attributes.notInitial) {
|
56 |
+
props.setAttributes({
|
57 |
+
notInitial: true,
|
58 |
+
popupOpened: true
|
59 |
+
});
|
60 |
+
|
61 |
+
return el('p');
|
62 |
+
}
|
63 |
+
|
64 |
+
if (props.attributes.popupOpened) {
|
65 |
+
if (isPopup) {
|
66 |
+
return showPopup(props.attributes.shortcode_id);
|
67 |
+
}
|
68 |
+
else {
|
69 |
+
return showShortcodeList(props.attributes.shortcode);
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
if (props.attributes.shortcode) {
|
74 |
+
return showShortcode();
|
75 |
+
}
|
76 |
+
else {
|
77 |
+
return showShortcodePlaceholder();
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
function showPopup(shortcode_id) {
|
82 |
+
var shortcodeCbName = generateUniqueCbName(pluginId);
|
83 |
+
window[shortcodeCbName] = function (shortcode, shortcode_id) {
|
84 |
+
delete window[shortcodeCbName];
|
85 |
+
|
86 |
+
if (props) {
|
87 |
+
if (!shortcode_id) {
|
88 |
+
props.setAttributes({shortcode: shortcode, shortcode_id: shortcode, popupOpened: false});
|
89 |
+
}
|
90 |
+
else {
|
91 |
+
props.setAttributes({shortcode: shortcode, shortcode_id: shortcode_id, popupOpened: false});
|
92 |
+
}
|
93 |
+
}
|
94 |
+
};
|
95 |
+
props.setAttributes({popupOpened: true});
|
96 |
+
var elem = el('form', {className: 'tw-container'}, el('div', {className: "tw-container-wrap"}, el('span', {
|
97 |
+
className: "media-modal-close",
|
98 |
+
onClick: close
|
99 |
+
}, el("span", {className: "media-modal-icon"})), el('iframe', {src: pluginData.data.shortcodeUrl + '&callback=' + shortcodeCbName + '&edit=' + shortcode_id})));
|
100 |
+
return elem;
|
101 |
+
}
|
102 |
+
|
103 |
+
function showShortcodeList(shortcode) {
|
104 |
+
props.setAttributes({popupOpened: true});
|
105 |
+
var children = [];
|
106 |
+
var shortcodeList = JSON.parse(pluginData.data);
|
107 |
+
shortcodeList.inputs.forEach(function (inputItem) {
|
108 |
+
if (inputItem.type === 'select') {
|
109 |
+
children.push(el('option', null, '- Select -'));
|
110 |
+
if (inputItem.options.length) {
|
111 |
+
inputItem.options.forEach(function (optionItem) {
|
112 |
+
var shortcode = '[' + shortcodeList.shortcode_prefix + ' ' + inputItem.shortcode_attibute_name + '="' + optionItem.id + '"]';
|
113 |
+
children.push(
|
114 |
+
el('option', {value: shortcode, dataId: optionItem.id}, optionItem.name)
|
115 |
+
);
|
116 |
+
})
|
117 |
+
}
|
118 |
+
}
|
119 |
+
});
|
120 |
+
|
121 |
+
if (shortcodeList.shortcodes) {
|
122 |
+
shortcodeList.shortcodes.forEach(function (shortcodeItem) {
|
123 |
+
children.push(
|
124 |
+
el('option', {value: shortcodeItem.shortcode, dataId: shortcodeItem.id}, shortcodeItem.name)
|
125 |
+
);
|
126 |
+
});
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
return el('form', {onSubmit: chooseFromList}, el('div', {}, `Select ${pluginData.title}`), el('select', {
|
131 |
+
value: shortcode,
|
132 |
+
onChange: chooseFromList
|
133 |
+
}, children));
|
134 |
+
}
|
135 |
+
|
136 |
+
function showShortcodePlaceholder() {
|
137 |
+
props.setAttributes({popupOpened: false});
|
138 |
+
return el('p', {
|
139 |
+
style: {
|
140 |
+
'cursor': "pointer"
|
141 |
+
},
|
142 |
+
|
143 |
+
onClick: function () {
|
144 |
+
props.setAttributes({popupOpened: true});
|
145 |
+
}.bind(this)
|
146 |
+
}, "You're not select any instagram. Click to choose instagram");
|
147 |
+
}
|
148 |
+
|
149 |
+
function showShortcode() {
|
150 |
+
return el('img', {
|
151 |
+
src: pluginData.iconUrl,
|
152 |
+
alt: pluginData.title,
|
153 |
+
style: {
|
154 |
+
'height': "36px",
|
155 |
+
'width': "36px"
|
156 |
+
},
|
157 |
+
onClick: function () {
|
158 |
+
props.setAttributes({popupOpened: true});
|
159 |
+
}.bind(this)
|
160 |
+
});
|
161 |
+
}
|
162 |
+
|
163 |
+
function close() {
|
164 |
+
props.setAttributes({popupOpened: false});
|
165 |
+
}
|
166 |
+
|
167 |
+
function chooseFromList(shortcode_id) {
|
168 |
+
|
169 |
+
var selected = event.target.querySelector('option:checked');
|
170 |
+
props.setAttributes({shortcode: selected.value, shortcode_id: selected.dataId, popupOpened: false});
|
171 |
+
event.preventDefault();
|
172 |
+
}
|
173 |
+
},
|
174 |
+
|
175 |
+
save: function (props) {
|
176 |
+
return props.attributes.shortcode;
|
177 |
+
}
|
178 |
+
});
|
179 |
+
}
|
180 |
+
|
181 |
+
function generateUniqueCbName(pluginId) {
|
182 |
+
return 'wdg_cb_' + pluginId;
|
183 |
+
}
|
184 |
+
}
|
185 |
+
new wdi_gutenberg_block();
|
186 |
+
} )(
|
187 |
+
window.wp.blocks,
|
188 |
+
window.wp.element
|
189 |
+
);
|
js/wdi_frontend.js
CHANGED
@@ -2658,14 +2658,14 @@ wdi_front.getUserTemplate = function (currentFeed, username)
|
|
2658 |
'</div>';
|
2659 |
}
|
2660 |
source += '<div class="wdi_media_info">' +
|
2661 |
-
'<p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></
|
2662 |
-
'<p class="wdi_followers"><span class="fa fa-user"><%= counts.followed_by%></
|
2663 |
'</div>';
|
2664 |
} else {
|
2665 |
source += '<div class="wdi_user_controls">' +
|
2666 |
'</div>' +
|
2667 |
'<div class="wdi_media_info">' +
|
2668 |
-
'<p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></
|
2669 |
'<p class="wdi_followers"><span></span></p>' +
|
2670 |
'</div>';
|
2671 |
}
|
@@ -3772,3 +3772,12 @@ else {
|
|
3772 |
}
|
3773 |
|
3774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2658 |
'</div>';
|
2659 |
}
|
2660 |
source += '<div class="wdi_media_info">' +
|
2661 |
+
'<p class="wdi_posts"><span class="fa fa-camera-retro"></span><%= counts.media%></p>' +
|
2662 |
+
'<p class="wdi_followers"><span class="fa fa-user"></span><%= counts.followed_by%></p>' +
|
2663 |
'</div>';
|
2664 |
} else {
|
2665 |
source += '<div class="wdi_user_controls">' +
|
2666 |
'</div>' +
|
2667 |
'<div class="wdi_media_info">' +
|
2668 |
+
'<p class="wdi_posts"><span class="fa fa-camera-retro"></span><%= counts.media%></p>' +
|
2669 |
'<p class="wdi_followers"><span></span></p>' +
|
2670 |
'</div>';
|
2671 |
}
|
3772 |
}
|
3773 |
|
3774 |
|
3775 |
+
jQuery(document).ready(function () {
|
3776 |
+
|
3777 |
+
setTimeout(function(){
|
3778 |
+
if(wdi_front_messages.show_alerts === '1' && jQuery('.wdi_check_fontawesome .fa-instagram').prop("tagName") !== 'I'){
|
3779 |
+
console.log('Font Awesome is not loaded properly. Please ask for support https://wordpress.org/support/plugin/wd-instagram-feed/');
|
3780 |
+
}
|
3781 |
+
}, 2000);
|
3782 |
+
|
3783 |
+
});
|
js/wdi_frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
if(typeof wdi_front=="undefined"){wdi_front={type:"not_declared"}}wdi_front.detectEvent=function(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));if(a){return"touchend"}else{return"click"}};var wdi_error_show=false;wdi_front.show_alert=function(e,b,f){f=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter);if(b.meta["code"]===400&&b.meta["error_type"]==="APINotAllowedError"){if(typeof b.wdi_current_feed_name!="undefined"){var a=b.wdi_current_feed_name;var d=f.find(".wdi_private_feed_names");d.html(a);f.find(".wdi_private_feed_error").removeClass("wdi_hidden")}f.find(".wdi_spinner").remove()}if(typeof f!="undefined"&&b.meta["error_type"]!="APINotAllowedError"){f.find(".wdi_spinner").remove();wdi_error_show=true;var c=f.find(".wdi_js_error");var g=f.find(".wdi_token_error");if(b!=false&&typeof b.meta!=undefined&&b.meta.error_type==="OAuthAccessTokenException"){g.removeClass("wdi_hidden");if(wdi_front_messages.wdi_token_error_flag!="1"){jQuery.ajax({type:"POST",url:wdi_url.ajax_url,dataType:"json",data:{action:"wdi_token_flag",wdi_token_flag_nonce:wdi_front_messages.wdi_token_flag_nonce},success:function(h){}})}}else{c.removeClass("wdi_js_error");c.addClass("wdi_js_error_no_animate");jQuery(".wdi_js_error_no_animate").show()}if(wdi_front_messages.show_alerts){}else{console.log("%c"+e,"color:#cc0000;")}}wdi_error_show=true};wdi_front.globalInit=function(){var a=wdi_front.feed_counter;if(typeof wdi_ajax.ajax_response!="undefined"){var c=wdi_feed_counter_init.wdi_feed_counter_init}else{var c=0}for(var b=c;b<=a;b++){if(jQuery("#wdi_feed_"+b).length===0){continue}var d=new WDIFeed(window["wdi_feed_"+b]);d.instagram=new WDIInstagram();d.instagram.filterArguments={feed:d};d.instagram.filters=[{where:"getUserRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getTagRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getRecentLikedMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"requestByUrl",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}}];d.instagram.addToken(d.feed_row["access_token"]);wdi_front.access_token=d.feed_row["access_token"];d.dataStorageRaw=[];d.dataStorage=[];d.dataStorageList=[];d.allResponseLength=0;d.currentResponseLength=0;d.temproraryUsersData=[];d.removedUsers=0;d.nowLoadingImages=true;d.imageIndex=0;d.resIndex=0;d.currentPage=1;d.userSortFlags=[];d.customFilterChanged=false;d.maxConditionalFiltersRequestCount=10;d.instagramRequestCounter=0;d.mediaRequestsDone=false;d.conditionalFilterBuffer=[];d.stopInfiniteScrollFlag=false;if(d.feed_row.feed_type=="masonry"){d.displayedData=[]}if(d.feed_row.feed_display_view=="pagination"){d.feed_row.resort_after_load_more=0;if(d.feed_row.feed_type!="image_browser"){d.feed_row.load_more_number=parseInt(d.feed_row.pagination_per_page_number);d.feed_row.number_of_photos=(1+parseInt(d.feed_row.pagination_preload_number))*d.feed_row.load_more_number}else{d.feed_row.number_of_photos=1+parseInt(d.feed_row.image_browser_preload_number);d.feed_row.load_more_number=parseInt(d.feed_row.image_browser_load_number)}d.freeSpaces=(Math.floor(d.feed_row.pagination_per_page_number/d.feed_row.number_of_columns)+1)*d.feed_row.number_of_columns-d.feed_row.pagination_per_page_number}else{d.freeSpaces=0}d.galleryBox=function(e){wdi_spider_createpopup(wdi_url.ajax_url+"?gallery_id="+this.feed_row.id+"&image_id="+e,this.feed_row.wdi_feed_counter,this.feed_row.lightbox_width,this.feed_row.lightbox_height,1,"testpopup",5,this,e)};wdi_responsive.columnControl(d);if(d.feed_row.feed_type=="masonry"){jQuery(window).trigger("resize")}wdi_front.bindEvents(d);window["wdi_feed_"+b]=d;wdi_front.init(d)}};wdi_front.init=function(c){jQuery(".wdi_js_error").hide();c.photoCounter=c.feed_row.number_of_photos;if(c.feed_row.liked_feed=="liked"){c.feed_users=["self"]}else{if(wdi_front.isJsonString(c.feed_row.feed_users)){c.feed_users=JSON.parse(c.feed_row.feed_users)}else{wdi_front.show_alert(wdi_front_messages.invalid_users_format,false,c);return}}c.dataCount=c.feed_users.length;var a=wdi_front.getFeedItemResolution(c);c.feedImageResolution=a.image;c.feedVideoResolution=a.video;for(var b=0;b<c.dataCount;b++){wdi_front.instagramRequest(b,c)}if(c.feed_row.number_of_photos>0){wdi_front.ajaxLoader(c)}if(c.feed_row["display_header"]==="1"){wdi_front.show("header",c)}if(c.feed_row["show_usernames"]==="1"){wdi_front.show("users",c)}};wdi_front.getFeedItemResolution=function(g){var d={image:"standard_resolution",video:"standard_resolution"};if(g.feed_row.feed_resolution==="thumbnail"){return{image:"thumbnail",video:"low_bandwidth"}}else{if(g.feed_row.feed_resolution==="low"){return{image:"low_resolution",video:"low_resolution"}}else{if(g.feed_row.feed_resolution==="standard"){return{image:"standard_resolution",video:"standard_resolution"}}}}var c=jQuery("#wdi_feed_"+g.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");c.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>');wdi_responsive.columnControl(g,1);var b=c.attr("wdi-res").split("wdi_col_");c.find("#wdi_feed_item_example").remove();if(b.length!==2){return d}var a=parseInt(b[1]);if(a<=0){return d}var f=(c.width()/a)-10;var e=d;if(f<=150){e.image="thumbnail";e.video="low_bandwidth"}else{if(f>150&&f<=320){e.image="low_resolution";e.video="low_resolution"}else{e.image="standard_resolution";e.video="standard_resolution"}}return e};wdi_front.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};wdi_front.instagramRequest=function(d,b){var a=b.feed_users,c=this;if(typeof a[d]==="string"&&a[d]==="self"){b.instagram.getRecentLikedMedia({success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveSelfUserData(e,b)}}})}else{if(this.getInputType(a[d]["username"])=="hashtag"){b.instagram.getTagRecentMedia(this.stripHashtag(a[d]["username"]),{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}else{if(this.getInputType(a[d]["username"])=="user"){b.instagram.getSelfRecentMedia({success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){e.wdi_current_feed_name=a[d].username;wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}}}};wdi_front.isHashtag=function(a){return(a[0]==="#")};wdi_front.saveUserData=function(d,a,b){d.username=a.username;d.user_id=a.id;if(d.user_id[0]==="#"){d.data=wdi_front.appendRequestHashtag(d.data,d.user_id)}b.usersData.push(d);b.currentResponseLength=wdi_front.getArrayContentLength(b.usersData,"data");b.allResponseLength+=b.currentResponseLength;if(b.dataCount==b.usersData.length){if(b.currentResponseLength<b.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(b)){wdi_front.loadMore("initial-keep",b)}else{wdi_front.displayFeed(b);wdi_front.applyFilters(b);if(!wdi_front.activeUsersCount(b)){if(b.feed_row.feed_display_view=="load_more_btn"){var c=jQuery("#wdi_feed_"+b.feed_row.wdi_feed_counter);c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.saveSelfUserData=function(c,a){c.username="";c.user_id="";a.usersData.push(c);a.currentResponseLength=wdi_front.getArrayContentLength(a.usersData,"data");a.allResponseLength+=a.currentResponseLength;if(a.dataCount==a.usersData.length){if(a.currentResponseLength<a.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(a)){wdi_front.loadMore("initial-keep",a)}else{wdi_front.displayFeed(a);wdi_front.applyFilters(a);if(!wdi_front.activeUsersCount(a)){if(a.feed_row.feed_display_view=="load_more_btn"){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter);b.find(".wdi_load_more").addClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.userHasNoPhoto=function(c,e){var a=0;var d=c.usersData;if(typeof e!="undefined"){d=e}for(var b=0;b<d.length;b++){if(typeof d[b]["pagination"]=="undefined"){d[b]["pagination"]=[]}if(c.feed_row.liked_feed==="liked"){if(typeof d[b]["pagination"]["next_max_like_id"]=="undefined"){a++}}else{if(typeof d[b]["pagination"]["next_max_id"]=="undefined"){a++}}}if(a==d.length){return 1}else{return 0}};wdi_front.appendRequestHashtag=function(c,b){for(var a=0;a<c.length;a++){c[a]["wdi_hashtag"]=b}return c};wdi_front.displayFeed=function(c,b){if(c.customFilterChanged==false){var d=wdi_front.feedSort(c,b)}var a=c.customFilterChanged;if(c.customFilterChanged==true){var d=c.customFilteredData;c.parsedData=wdi_front.parseLighboxData(c,true)}if(c.feed_row.resort_after_load_more!="1"){if(c.customFilterChanged==false){c.dataStorageList=c.dataStorageList.concat(d)}}else{if(c.customFilterChanged==false){c.dataStorageList=d}}if(c.feed_row.feed_type=="masonry"){wdi_front.masonryDisplayFeedItems(d,c)}if(c.feed_row.feed_type=="thumbnails"||c.feed_row.feed_type=="blog_style"||c.feed_row.feed_type=="image_browser"){wdi_front.displayFeedItems(d,c)}var e=wdi_front.getDataLength(c);if(e<c.photoCounter&&!a&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount&&!wdi_front.allDataHasFinished(c)){wdi_front.loadMore("",c)}else{wdi_front.allImagesLoaded(c)}if(c.instagramRequestCounter>c.maxConditionalFiltersRequestCount){wdi_front.allImagesLoaded(c);if(d.length==0){c.stopInfiniteScrollFlag=true}}if(c.feed_row.feed_display_view=="pagination"&&c.currentPage<c.paginator){jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter).find("#wdi_last_page").removeClass("wdi_disabled")}c.instagramRequestCounter=0;c.conditionalFilterBuffer=[];wdi_front.updateUsersImages(c)};wdi_front.updateUsersImages=function(a){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter).find(".wdi_single_user .wdi_user_img_wrap img");b.each(function(){if(jQuery(this).attr("src")==wdi_url.plugin_url+"images/missing.png"||jQuery(this).attr("src")==""){if(a.feed_row.liked_feed=="liked"){return}for(var c=0;c<a.usersData.length;c++){if(a.usersData[c]["username"]==jQuery(this).parent().parent().find("h3").text()){if(a.usersData[c]["data"].length!=0){jQuery(this).attr("src",a.usersData[c]["data"][0]["images"]["thumbnail"]["url"])}}}}})};wdi_front.masonryDisplayFeedItems=function(d,h){var b=[];var p=[];if(jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_masonry_column").each(function(){if(h.feed_row.resort_after_load_more==1){jQuery(this).html("");h.imageIndex=0}if(h.customFilterChanged==true){jQuery(this).html("");h.imageIndex=0}if(h.feed_row.feed_display_view=="pagination"){b.push(0)}else{b.push(jQuery(this).height())}p.push(jQuery(this))});if(h.customFilterChanged==true){h.customFilterChanged=false}for(var e=0;e<d.length;e++){h.displayedData.push(d[e]);if(d[e]["type"]=="image"){var n=wdi_front.getPhotoTemplate(h)}else{if(d[e].hasOwnProperty("videos")){var n=wdi_front.getVideoTemplate(h)}else{var n=wdi_front.getSliderTemplate(h)}}var g=d[e];var o=wdi_front.createObject(g,h);var f=n(o);var m=wdi_front.array_min(b);var l=wdi_front.getImageResolution(d[e]);p[m.index].html(p[m.index].html()+f);b[m.index]+=p[m.index].width()*l;h.imageIndex++;if(h.feed_row.feed_display_view=="pagination"){if((e+1)%h.feed_row.pagination_per_page_number===0){h.resIndex+=h.freeSpaces+1}else{h.resIndex++}}}h.wdi_loadedImages=0;var j=false;h.wdi_load_count=e;var a=h.feed_row.wdi_feed_counter;var k=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){h.wdi_loadedImages++;c();if(j===false){wdi_responsive.columnControl(h,1);j=true}});c();function c(){if(h.wdi_load_count===h.wdi_loadedImages&&h.wdi_loadedImages!=0){h.loadedImages=0;h.wdi_load_count=0;wdi_front.allImagesLoaded(h)}}if(h.paginatorNextFlag==true){wdi_front.updatePagination(h,"next")}h.infiniteScrollFlag=false};wdi_front.getImageResolution=function(c){var d=c.images["standard_resolution"]["width"];var b=c.images["standard_resolution"]["height"];var a=b/d;return a};wdi_front.getDataLength=function(b,d){var c=0;if(typeof d==="undefined"){for(var a=0;a<b.dataStorage.length;a++){c+=b.dataStorage[a].length}}else{for(var a=0;a<d.length;a++){c+=d[a].length}}return c};wdi_front.getArrayContentLength=function(d,c){var b=0;for(var a=0;a<d.length;a++){if(d[a]["finished"]=="finished"){continue}b+=d[a][c].length}return b};wdi_front.displayFeedItems=function(d,j){if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" .wdi_feed_wrapper");if(j.feed_row.resort_after_load_more==="1"){l.html("");j.imageIndex=0}if(j.customFilterChanged==true){l.html("");j.imageIndex=0;j.customFilterChanged=false}var g=wdi_front.getImgCount(j)-d.length-1;if(j.feed_row.feed_display_view=="pagination"){var b=j.feed_row.load_more_number;if(j.feed_row.feed_type=="image_browser"){b=1}if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+' [wdi_page="'+(j.currentPage-1)+'"]').length<b||d.length==0){j.currentPage=(--j.currentPage<=1)?1:j.currentPage}}for(var e=0;e<d.length;e++){if(d[e]["type"]=="image"){var m=wdi_front.getPhotoTemplate(j)}else{if(d[e].hasOwnProperty("videos")){var m=wdi_front.getVideoTemplate(j)}else{var m=wdi_front.getSliderTemplate(j)}}var h=d[e];var n=wdi_front.createObject(h,j);var f=m(n);l.html(l.html()+f);j.imageIndex++;if(j.feed_row.feed_display_view=="pagination"){if((e+1)%j.feed_row.pagination_per_page_number===0){j.resIndex+=j.freeSpaces+1}else{j.resIndex++}}}j.wdi_loadedImages=0;var k=false;j.wdi_load_count=e;var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){j.wdi_loadedImages++;c();if(k===false){wdi_responsive.columnControl(j,1);k=true}});function c(){if(j.wdi_load_count===j.wdi_loadedImages&&j.wdi_loadedImages!=0){j.loadedImages=0;j.wdi_load_count=0;wdi_front.allImagesLoaded(j)}}if(j.paginatorNextFlag==true){wdi_front.updatePagination(j,"next")}j.infiniteScrollFlag=false};wdi_front.checkFeedFinished=function(b){for(var a=0;a<b.usersData.length;a++){if(typeof b.usersData[a]["finished"]=="undefined"){return false}}return true};wdi_front.sortingOperator=function(c,b){var a;switch(c){case"date":switch(b){case"asc":a=function(e,d){return(e.created_time>d.created_time)?1:-1};break;case"desc":a=function(e,d){return(e.created_time>d.created_time)?-1:1};break}break;case"likes":switch(b){case"asc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?-1:1};break;case"desc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?1:-1};break}break;case"comments":switch(b){case"asc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?-1:1};break;case"desc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?1:-1};break}break;case"random":a=function(e,d){var f=Math.random();return(f>0.5)?1:-1};break}return a};wdi_front.feedSort=function(e,b){var d=e.feed_row.sort_images_by;var c=e.feed_row.display_order;if(e.feed_row.resort_after_load_more==="1"){e.data=e.data.concat(wdi_front.smartPicker(e,b))}else{e.data=wdi_front.smartPicker(e,b)}var a=wdi_front.sortingOperator(d,c);e.data.sort(a);return e.data};wdi_front.smartPicker=function(l,c){var g=[];var a=0;var k=[];var f=Math.ceil(l.feed_row["number_of_photos"]/l.usersData.length);var b=parseInt(l.feed_row["number_of_photos"]);var n=0;if(c!=""&&typeof c!="undefined"&&c!=null){b=parseInt(c);f=Math.ceil(b/wdi_front.activeUsersCount(l))}var j=function(p,i){return(p.data.length>i.data.length)?1:-1};var e=function(p,i){return(p.length()>i.length())?1:-1};l.storeRawData(l.usersData,"dataStorageRaw");var o=l.dataStorageRaw.sort(e);var h=l.usersData.sort(j);for(var d=0;d<h.length;d++){n+=f;if(o[d].length()<=n){n-=o[d].length();g.push(o[d].getData(o[d].length()));a+=g[g.length-1].length}else{if(a+n>b){n=b-a}var m=[];if(l.auto_trigger===false){m=m.concat(o[d].getData(n))}else{if(m.length+wdi_front.getDataLength(l)+wdi_front.getDataLength(l,g)<l.feed_row["number_of_photos"]){m=m.concat(o[d].getData(n))}}n=0;a+=m.length;g.push(m)}}for(d=0;d<g.length;d++){if(typeof l.dataStorage[d]==="undefined"){l.dataStorage.push(g[d])}else{l.dataStorage[d]=l.dataStorage[d].concat(g[d])}}l.parsedData=wdi_front.parseLighboxData(l);for(d=0;d<g.length;d++){k=k.concat(g[d])}return k};wdi_front.createObject=function(e,h){var j=(e.caption!=null)?e.caption["text"]:" ";var i="";if(e.type=="video"){i=e.hasOwnProperty("videos")?e.videos[h.feedVideoResolution]["url"]:""}var f=e.images[h.feedImageResolution].url;var a=h.imageIndex;var b="square";var d=e.images["standard_resolution"]["height"];var g=e.images["standard_resolution"]["width"];if(d>g){b="portrait"}else{if(d<g){b="landscape"}}var c={id:e.id,caption:j,image_url:f,likes:e.likes["count"],comments:e.comments["count"],wdi_index:a,wdi_res_index:h.resIndex,wdi_media_user:e.user["username"],link:e.link,video_url:i,wdi_username:e.user["username"],wdi_shape:b};return c};wdi_front.setPage=function(c){var b=c.feed_row.feed_display_view;var e=c.feed_row.feed_type;if(b!="pagination"){return""}var a=c.imageIndex;if(e=="image_browser"){var d=1}else{var d=Math.abs(c.feed_row.pagination_per_page_number)}c.paginator=Math.ceil((a+1)/d);return c.paginator};wdi_front.getPhotoTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-arrows-alt";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o"> <%= 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="";e.instagram.requestByUrl(a,{success:function(g){if(typeof g.meta!="undefined"&&typeof g.meta.error_type!="undefined"){wdi_front.show_alert(false,g,e)}if(g===""||typeof g=="undefined"||g==null){c=wdi_front_messages.network_error;e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}if(g.meta["code"]!=200){c=g.meta["error_message"];e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}g.user_id=b.user_id;g.username=b.username;for(var h=0;h<e.usersData.length;h++){if(g.user_id===e.usersData[h]["user_id"]){if(g.user_id[0]==="#"){g.data=wdi_front.appendRequestHashtag(g.data,g.user_id)}if(d=="initial-keep"){e.temproraryUsersData[h]=e.usersData[h]}e.usersData[h]=g;e.loadMoreDataCount--}}wdi_front.checkForLoadMoreDone(e,d)}})};wdi_front.checkForLoadMoreDone=function(c,b){var a=c.feed_row.load_more_number;var e=c.feed_row.number_of_photos;if(c.loadMoreDataCount==0){c.temproraryUsersData=wdi_front.mergeData(c.temproraryUsersData,c.usersData);var d=wdi_front.getArrayContentLength(c.temproraryUsersData,"data");if(b=="initial-keep"){b="initial"}if(b=="initial"){if(d<e&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore("initial",c)}else{c.usersData=c.temproraryUsersData;wdi_front.displayFeed(c);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}else{if(d<a&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore(undefined,c)}else{c.usersData=c.temproraryUsersData;if(!wdi_front.activeUsersCount(c)){return}wdi_front.displayFeed(c,a);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}}};wdi_front.allDataHasFinished=function(b){var d=0;for(var a=0;a<b.dataStorageRaw.length;a++){if(b.dataStorageRaw[a].length()==0&&b.dataStorageRaw[a].locked==true){d++}}return(d==b.dataStorageRaw.length)};wdi_front.mergeData=function(c,b){for(var a=0;a<b.length;a++){if(typeof c[a]!="undefined"){if(b[a]["finished"]=="finished"){continue}if(typeof c[a]["pagination"]["next_max_id"]=="undefined"&&typeof c[a]["pagination"]["next_max_like_id"]=="undefined"){continue}c[a]["data"]=c[a]["data"].concat(b[a]["data"]);c[a]["pagination"]=b[a]["pagination"];c[a]["user_id"]=b[a]["user_id"];c[a]["username"]=b[a]["username"];c[a]["meta"]=b[a]["meta"]}else{c.push(b[a])}}return c};wdi_front.brokenImageHandler=function(a){a.src=wdi_url.plugin_url+"images/missing.png";a.onerror="";return true};wdi_front.ajaxLoader=function(a){var d=a.feed_row.wdi_feed_counter;var c=jQuery("#wdi_feed_"+d);if(a.feed_row.feed_display_view=="load_more_btn"){c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").removeClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){var b;if(c.find(".wdi_ajax_loading").length==0){b=jQuery('<div class="wdi_ajax_loading"><div><div><img class="wdi_load_more_spinner" src="'+wdi_url.plugin_url+'images/ajax_loader.png"></div></div></div>');c.append(b)}else{b=c.find(".wdi_ajax_loading")}b.removeClass("wdi_hidden")}};wdi_front.allImagesLoaded=function(a){var d=wdi_front.getDataLength(a);if(!a.mediaRequestsDone){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia")}if(d==0&&a.mediaRequestsDone&&(a.feed_row.conditional_filters.length==0||a.feed_row.conditional_filter_enable==0)){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>")}var c=a.feed_row.wdi_feed_counter;var b=jQuery("#wdi_feed_"+c);if(a.feed_row.feed_display_view=="load_more_btn"){b.find(".wdi_load_more").removeClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_ajax_loading").addClass("wdi_hidden")}b.trigger("wdi_feed_loaded")};wdi_front.show=function(b,c){var e=c.feed_row.wdi_feed_counter;var d=jQuery("#wdi_feed_"+e+" .wdi_feed_container");var g=this;switch(b){case"header":f();break;case"users":a(c);break}function f(){var i={feed_thumb:c.feed_row["feed_thumb"],feed_name:c.feed_row["feed_name"]};var k=wdi_front.getHeaderTemplate(),h=k(i),j=d.find(".wdi_feed_header").html();d.find(".wdi_feed_header").html(j+h)}function a(j){d.find(".wdi_feed_users").html("");var n=j.feed_users;var m=j.feed_row["access_token"];var h=0;j.headerUserinfo=[];k();function k(){if(j.headerUserinfo.length==n.length){l(j.headerUserinfo,j);return}var i=n[j.headerUserinfo.length];if(typeof i==="string"&&i==="self"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="hashtag"){j.instagram.searchForTagsByName(g.stripHashtag(i.username),{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false){if(o.data.length==0){var p="";var q={media:""}}else{var p="";var q={media:o.data[0]["media_count"]}}var r={name:n[h]["username"],url:p,counts:q};h++;j.headerUserinfo.push(r);k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="user"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}}}}function l(i,t){d.find(".wdi_feed_users").html("");for(var q=0;q<i.length;q++){if(i[q]===null){continue}var u={flag:false,id:i[q]["id"],name:i[q]["name"]};var p=(i[q]["name"][0]=="#")?"wdi_header_hashtag":"";var o={user_index:q,user_img_url:i[q]["url"],counts:i[q]["counts"],feed_counter:t.feed_row.wdi_feed_counter,user_name:i[q]["name"],bio:i[q]["bio"],usersCount:t.feed_row.feed_users.length,hashtagClass:p};var w=wdi_front.getUserTemplate(t,i[q]["name"]),r=w(o),s=d.find(".wdi_feed_users").html();d.find(".wdi_feed_users").html(s+r);t.userSortFlags.push(u);var v=jQuery('<div class="wdi_clear"></div>')}d.find(".wdi_feed_users").append(v);wdi_front.updateUsersImages(t)}}};wdi_front.getUserTemplate=function(c,h){var a=c.dataCount,d,f,g;switch(h[0]){case"#":d="//instagram.com/explore/tags/"+h.substr(1,h.length);break;default:d="//instagram.com/"+h;break}g='window.open("'+d+'","_blank")';f="onclick='"+g+"'";var e='<div class="wdi_single_user" user_index="<%=user_index%>"><div class="wdi_header_user_text <%=hashtagClass%>"><div class="wdi_user_img_wrap"><img onerror="wdi_front.brokenImageHandler(this);" src="<%= user_img_url%>">';if(a>1){e+='<div title="'+wdi_front_messages.filter_title+'" class="wdi_filter_overlay"><div class="wdi_filter_icon"><span onclick="wdi_front.addFilter(<%=user_index%>,<%=feed_counter%>);" class="fa fa-filter"></span></div></div>'}e+="</div>";e+="<h3 "+f+"><%= user_name%></h3>";if(h[0]!=="#"){if(c.feed_row.follow_on_instagram_btn=="1"){e+='<div class="wdi_user_controls"><div class="wdi_follow_btn" onclick="window.open(\'//instagram.com/<%= user_name%>\',\'_blank\')"><span> '+wdi_front_messages.follow+"</span></div></div>"}e+='<div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span class="fa fa-user"><%= counts.followed_by%></span></p></div>'}else{e+='<div class="wdi_user_controls"></div><div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"><%= counts.media%></span></p><p class="wdi_followers"><span></span></p></div>'}e+='<div class="wdi_clear"></div>';if(a==1&&h[0]!=="#"&&c.feed_row.display_user_info=="1"){e+='<div class="wdi_bio"><%= bio%></div>'}e+="</div></div>";var b=_.template(e);return b};wdi_front.getHeaderTemplate=function(){var b='<div class="wdi_header_wrapper"><div class="wdi_header_img_wrap"><img src="<%=feed_thumb%>"></div><div class="wdi_header_text"><%=feed_name%></div><div class="wdi_clear"></div>';var a=_.template(b);return a};wdi_front.addFilter=function(e,g){var f=window["wdi_feed_"+g];var d=f.dataCount;if(d<2){return}if(f.nowLoadingImages!=false){return}else{var c=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');c.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg");c.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col");c.find(".wdi_media_info").toggleClass("wdi_filter_active_col");c.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col");f.customFilterChanged=true;if(f.userSortFlags[e]["flag"]==false){f.userSortFlags[e]["flag"]=true}else{f.userSortFlags[e]["flag"]=false}var a=0;for(var b=0;b<f.userSortFlags.length;b++){if(f.userSortFlags[b]["flag"]==true){a++}}if(f.feed_row.feed_display_view=="pagination"){f.resIndex=0}if(a!=0){wdi_front.filterData(f);wdi_front.displayFeed(f)}else{f.customFilteredData=f.dataStorageList;wdi_front.displayFeed(f)}if(f.feed_row.feed_display_view=="pagination"){f.paginator=Math.ceil((f.imageIndex)/parseInt(f.feed_row.pagination_per_page_number));f.currentPage=f.paginator;wdi_front.updatePagination(f,"custom",1);jQuery("#wdi_first_page").removeClass("wdi_disabled");jQuery("#wdi_last_page").addClass("wdi_disabled")}}};wdi_front.filterData=function(c){var d=c.userSortFlags;c.customFilteredData=[];for(var b=0;b<c.dataStorageList.length;b++){for(var a=0;a<d.length;a++){if((c.dataStorageList[b]["user"]["id"]==d[a]["id"]||c.dataStorageList[b]["wdi_hashtag"]==d[a]["name"])&&d[a]["flag"]==true){c.customFilteredData.push(c.dataStorageList[b])}}}};wdi_front.applyFilters=function(c){for(var b=0;b<c.userSortFlags.length;b++){if(c.userSortFlags[b]["flag"]==true){var a=jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter+'[user_index="'+b+'"]');wdi_front.addFilter(b,c.feed_row.wdi_feed_counter);wdi_front.addFilter(b,c.feed_row.wdi_feed_counter)}}};wdi_front.getImgCount=function(b){var d=b.dataStorage;var c=0;for(var a=0;a<d.length;a++){c+=d[a].length}return c};wdi_front.parseLighboxData=function(k,m){var g=k.dataStorage;var l=k.feed_row.sort_images_by;var a=k.feed_row.display_order;var h=wdi_front.sortingOperator(l,a);var f=[];var b=[];var e={};if(m==true){f=k.customFilteredData}else{for(var d=0;d<g.length;d++){for(var c=0;c<g[d].length;c++){f.push(g[d][c])}}f.sort(h)}for(d=0;d<f.length;d++){e={alt:"",avg_rating:"",comment_count:f[d]["comments"]["count"],date:wdi_front.convertUnixDate(f[d]["created_time"]),description:wdi_front.getDescription((f[d]["caption"]!==null)?f[d]["caption"]["text"]:""),filename:wdi_front.getFileName(f[d]),filetype:wdi_front.getFileType(f[d]),hit_count:"0",id:f[d]["id"],image_url:f[d]["link"],number:0,rate:"",rate_count:"0",username:f[d]["user"]["username"],profile_picture:f[d]["user"]["profile_picture"],thumb_url:f[d]["link"]+"media/?size=t",comments_data:f[d]["comments"]["data"],images:f[d]["images"],carousel_media:(typeof f[d]["carousel_media"]!=="undefined")?f[d]["carousel_media"]:null};b.push(e)}return b};wdi_front.convertUnixDate=function(b){var c=parseInt(b);var a=new Date(0);a.setUTCSeconds(c);var d=a.getFullYear()+"-"+a.getMonth()+"-"+a.getDate();d+=" "+a.getHours()+":"+a.getMinutes();return d};wdi_front.getDescription=function(a){a=a.replace(/\r?\n|\r/g," ");return a};wdi_front.getFileName=function(d){var c=d.link;var b=d.type;if(b==="video"&&d.hasOwnProperty("videos")){return d.videos["standard_resolution"]["url"]}else{var a=c.split("/");return a[a.length-2]}};wdi_front.getFileType=function(a){if(a.type=="video"&&a.hasOwnProperty("videos")){return"EMBED_OEMBED_INSTAGRAM_VIDEO"}else{return"EMBED_OEMBED_INSTAGRAM_IMAGE"}};wdi_front.array_max=function(d){var a=d[0];var b=0;for(var c=1;c<d.length;c++){if(a<d[c]){a=d[c];b=c}}return{value:a,index:b}};wdi_front.array_min=function(d){var c=d[0];var a=0;for(var b=1;b<d.length;b++){if(c>d[b]){c=d[b];a=b}}return{value:c,index:a}};wdi_front.activeUsersCount=function(c){var a=0;for(var b=0;b<c.usersData.length;b++){if(c.usersData[b].finished!="finished"){a++}}return a};wdi_front.checkMediaResponse=function(a,b){if(a!=""&&typeof a!="undefined"&&a!=null&&a.meta["code"]===400&&a.meta["error_type"]==="APINotAllowedError"){return a}if(a==""||typeof a=="undefined"||a==null){errorMessage=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)){d=c[b].pagination.next_max_tag_id}else{if(e.feed_row.liked_feed=="liked"){d=c[b].pagination.next_max_like_id;if(typeof d=="undefined"){d=""}}else{if(c[b].pagination==null){c[b].pagination=[]}d=c[b].pagination.next_max_id;if(typeof d=="undefined"){d=""}}}if(typeof this[a][b]=="undefined"){this[a].push({data:c[b].data,index:0,locked:false,hash_id:d,usersDataFinished:false,userId:c[b].user_id,length:function(){return this.data.length-this.index},getData:function(g){var h=this.data.slice(this.index,this.index+g);this.index+=Math.min(g,this.length());if(this.index==this.data.length&&this.locked==true&&this.usersDataFinished==false){for(var f=0;f<e.usersData.length;f++){if(e.usersData[f]["user_id"]==this.userId){e.usersData[f].finished="finished";this.usersDataFinished=true;break}}}return h}})}else{if(this[a][b].locked==false){if(d!=this[a][b].hash_id){this[a][b].data=this[a][b].data.concat(c[b].data);this[a][b].hash_id=d}else{this[a][b].locked=true}}}}}};wdi_front.updateUsersIfNecessary=function(c){var d=c.feed_users;var a=false;for(var b=0;b<d.length;b++){if("#"==d[b].username.substr(0,1)){d[b].id=d[b].username;continue}if(""==d[b].id||"username"==d[b].id){a=true;c.instagram.searchForUsersByName(d[b].username,{success:function(i){if(typeof i.meta!="undefined"&&typeof i.meta.error_type!="undefined"){wdi_front.show_alert(false,i,c)}if(i.meta.code==200&&i.data.length>0){var l=false;for(var g=0;g<i.data.length;g++){if(i.data[g].username==i.args.username){l=true;break}}if(l){for(var h=0;h<d.length;h++){if(i.data[g].username==d[h].username){d[h].id=i.data[g].id}}}}var f=false;for(var e=0;e<d.length;e++){if(d[e].id==""||d[e].id=="username"){f=true;break}}if(!f){c.feed_row.feed_users=JSON.stringify(d);wdi_front.init(c)}},username:d[b].username})}}return a};if(typeof wdi_ajax.ajax_response!="undefined"){jQuery(document).one("ajaxStop",function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})}else{jQuery(document).ready(function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})};
|
1 |
+
if(typeof wdi_front=="undefined"){wdi_front={type:"not_declared"}}wdi_front.detectEvent=function(){var a=(/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));if(a){return"touchend"}else{return"click"}};var wdi_error_show=false;wdi_front.show_alert=function(e,b,f){f=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter);if(b.meta["code"]===400&&b.meta["error_type"]==="APINotAllowedError"){if(typeof b.wdi_current_feed_name!="undefined"){var a=b.wdi_current_feed_name;var d=f.find(".wdi_private_feed_names");d.html(a);f.find(".wdi_private_feed_error").removeClass("wdi_hidden")}f.find(".wdi_spinner").remove()}if(typeof f!="undefined"&&b.meta["error_type"]!="APINotAllowedError"){f.find(".wdi_spinner").remove();wdi_error_show=true;var c=f.find(".wdi_js_error");var g=f.find(".wdi_token_error");if(b!=false&&typeof b.meta!=undefined&&b.meta.error_type==="OAuthAccessTokenException"){g.removeClass("wdi_hidden");if(wdi_front_messages.wdi_token_error_flag!="1"){jQuery.ajax({type:"POST",url:wdi_url.ajax_url,dataType:"json",data:{action:"wdi_token_flag",wdi_token_flag_nonce:wdi_front_messages.wdi_token_flag_nonce},success:function(h){}})}}else{c.removeClass("wdi_js_error");c.addClass("wdi_js_error_no_animate");jQuery(".wdi_js_error_no_animate").show()}if(wdi_front_messages.show_alerts){}else{console.log("%c"+e,"color:#cc0000;")}}wdi_error_show=true};wdi_front.globalInit=function(){var a=wdi_front.feed_counter;if(typeof wdi_ajax.ajax_response!="undefined"){var c=wdi_feed_counter_init.wdi_feed_counter_init}else{var c=0}for(var b=c;b<=a;b++){if(jQuery("#wdi_feed_"+b).length===0){continue}var d=new WDIFeed(window["wdi_feed_"+b]);d.instagram=new WDIInstagram();d.instagram.filterArguments={feed:d};d.instagram.filters=[{where:"getUserRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getTagRecentMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"getRecentLikedMedia",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}},{where:"requestByUrl",what:function(f,g,e){return g.feed.conditionalFilter(f,e)}}];d.instagram.addToken(d.feed_row["access_token"]);wdi_front.access_token=d.feed_row["access_token"];d.dataStorageRaw=[];d.dataStorage=[];d.dataStorageList=[];d.allResponseLength=0;d.currentResponseLength=0;d.temproraryUsersData=[];d.removedUsers=0;d.nowLoadingImages=true;d.imageIndex=0;d.resIndex=0;d.currentPage=1;d.userSortFlags=[];d.customFilterChanged=false;d.maxConditionalFiltersRequestCount=10;d.instagramRequestCounter=0;d.mediaRequestsDone=false;d.conditionalFilterBuffer=[];d.stopInfiniteScrollFlag=false;if(d.feed_row.feed_type=="masonry"){d.displayedData=[]}if(d.feed_row.feed_display_view=="pagination"){d.feed_row.resort_after_load_more=0;if(d.feed_row.feed_type!="image_browser"){d.feed_row.load_more_number=parseInt(d.feed_row.pagination_per_page_number);d.feed_row.number_of_photos=(1+parseInt(d.feed_row.pagination_preload_number))*d.feed_row.load_more_number}else{d.feed_row.number_of_photos=1+parseInt(d.feed_row.image_browser_preload_number);d.feed_row.load_more_number=parseInt(d.feed_row.image_browser_load_number)}d.freeSpaces=(Math.floor(d.feed_row.pagination_per_page_number/d.feed_row.number_of_columns)+1)*d.feed_row.number_of_columns-d.feed_row.pagination_per_page_number}else{d.freeSpaces=0}d.galleryBox=function(e){wdi_spider_createpopup(wdi_url.ajax_url+"?gallery_id="+this.feed_row.id+"&image_id="+e,this.feed_row.wdi_feed_counter,this.feed_row.lightbox_width,this.feed_row.lightbox_height,1,"testpopup",5,this,e)};wdi_responsive.columnControl(d);if(d.feed_row.feed_type=="masonry"){jQuery(window).trigger("resize")}wdi_front.bindEvents(d);window["wdi_feed_"+b]=d;wdi_front.init(d)}};wdi_front.init=function(c){jQuery(".wdi_js_error").hide();c.photoCounter=c.feed_row.number_of_photos;if(c.feed_row.liked_feed=="liked"){c.feed_users=["self"]}else{if(wdi_front.isJsonString(c.feed_row.feed_users)){c.feed_users=JSON.parse(c.feed_row.feed_users)}else{wdi_front.show_alert(wdi_front_messages.invalid_users_format,false,c);return}}c.dataCount=c.feed_users.length;var a=wdi_front.getFeedItemResolution(c);c.feedImageResolution=a.image;c.feedVideoResolution=a.video;for(var b=0;b<c.dataCount;b++){wdi_front.instagramRequest(b,c)}if(c.feed_row.number_of_photos>0){wdi_front.ajaxLoader(c)}if(c.feed_row["display_header"]==="1"){wdi_front.show("header",c)}if(c.feed_row["show_usernames"]==="1"){wdi_front.show("users",c)}};wdi_front.getFeedItemResolution=function(g){var d={image:"standard_resolution",video:"standard_resolution"};if(g.feed_row.feed_resolution==="thumbnail"){return{image:"thumbnail",video:"low_bandwidth"}}else{if(g.feed_row.feed_resolution==="low"){return{image:"low_resolution",video:"low_resolution"}}else{if(g.feed_row.feed_resolution==="standard"){return{image:"standard_resolution",video:"standard_resolution"}}}}var c=jQuery("#wdi_feed_"+g.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");c.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>');wdi_responsive.columnControl(g,1);var b=c.attr("wdi-res").split("wdi_col_");c.find("#wdi_feed_item_example").remove();if(b.length!==2){return d}var a=parseInt(b[1]);if(a<=0){return d}var f=(c.width()/a)-10;var e=d;if(f<=150){e.image="thumbnail";e.video="low_bandwidth"}else{if(f>150&&f<=320){e.image="low_resolution";e.video="low_resolution"}else{e.image="standard_resolution";e.video="standard_resolution"}}return e};wdi_front.isJsonString=function(b){try{JSON.parse(b)}catch(a){return false}return true};wdi_front.instagramRequest=function(d,b){var a=b.feed_users,c=this;if(typeof a[d]==="string"&&a[d]==="self"){b.instagram.getRecentLikedMedia({success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveSelfUserData(e,b)}}})}else{if(this.getInputType(a[d]["username"])=="hashtag"){b.instagram.getTagRecentMedia(this.stripHashtag(a[d]["username"]),{success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}else{if(this.getInputType(a[d]["username"])=="user"){b.instagram.getSelfRecentMedia({success:function(e){if(typeof e.meta!="undefined"&&typeof e.meta.error_type!="undefined"){e.wdi_current_feed_name=a[d].username;wdi_front.show_alert(false,e,b)}b.mediaRequestsDone=true;e=c.checkMediaResponse(e,b);if(e!=false){c.saveUserData(e,b.feed_users[d],b)}}})}}}};wdi_front.isHashtag=function(a){return(a[0]==="#")};wdi_front.saveUserData=function(d,a,b){d.username=a.username;d.user_id=a.id;if(d.user_id[0]==="#"){d.data=wdi_front.appendRequestHashtag(d.data,d.user_id)}b.usersData.push(d);b.currentResponseLength=wdi_front.getArrayContentLength(b.usersData,"data");b.allResponseLength+=b.currentResponseLength;if(b.dataCount==b.usersData.length){if(b.currentResponseLength<b.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(b)){wdi_front.loadMore("initial-keep",b)}else{wdi_front.displayFeed(b);wdi_front.applyFilters(b);if(!wdi_front.activeUsersCount(b)){if(b.feed_row.feed_display_view=="load_more_btn"){var c=jQuery("#wdi_feed_"+b.feed_row.wdi_feed_counter);c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.saveSelfUserData=function(c,a){c.username="";c.user_id="";a.usersData.push(c);a.currentResponseLength=wdi_front.getArrayContentLength(a.usersData,"data");a.allResponseLength+=a.currentResponseLength;if(a.dataCount==a.usersData.length){if(a.currentResponseLength<a.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(a)){wdi_front.loadMore("initial-keep",a)}else{wdi_front.displayFeed(a);wdi_front.applyFilters(a);if(!wdi_front.activeUsersCount(a)){if(a.feed_row.feed_display_view=="load_more_btn"){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter);b.find(".wdi_load_more").addClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}}}}};wdi_front.userHasNoPhoto=function(c,e){var a=0;var d=c.usersData;if(typeof e!="undefined"){d=e}for(var b=0;b<d.length;b++){if(typeof d[b]["pagination"]=="undefined"){d[b]["pagination"]=[]}if(c.feed_row.liked_feed==="liked"){if(typeof d[b]["pagination"]["next_max_like_id"]=="undefined"){a++}}else{if(typeof d[b]["pagination"]["next_max_id"]=="undefined"){a++}}}if(a==d.length){return 1}else{return 0}};wdi_front.appendRequestHashtag=function(c,b){for(var a=0;a<c.length;a++){c[a]["wdi_hashtag"]=b}return c};wdi_front.displayFeed=function(c,b){if(c.customFilterChanged==false){var d=wdi_front.feedSort(c,b)}var a=c.customFilterChanged;if(c.customFilterChanged==true){var d=c.customFilteredData;c.parsedData=wdi_front.parseLighboxData(c,true)}if(c.feed_row.resort_after_load_more!="1"){if(c.customFilterChanged==false){c.dataStorageList=c.dataStorageList.concat(d)}}else{if(c.customFilterChanged==false){c.dataStorageList=d}}if(c.feed_row.feed_type=="masonry"){wdi_front.masonryDisplayFeedItems(d,c)}if(c.feed_row.feed_type=="thumbnails"||c.feed_row.feed_type=="blog_style"||c.feed_row.feed_type=="image_browser"){wdi_front.displayFeedItems(d,c)}var e=wdi_front.getDataLength(c);if(e<c.photoCounter&&!a&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount&&!wdi_front.allDataHasFinished(c)){wdi_front.loadMore("",c)}else{wdi_front.allImagesLoaded(c)}if(c.instagramRequestCounter>c.maxConditionalFiltersRequestCount){wdi_front.allImagesLoaded(c);if(d.length==0){c.stopInfiniteScrollFlag=true}}if(c.feed_row.feed_display_view=="pagination"&&c.currentPage<c.paginator){jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter).find("#wdi_last_page").removeClass("wdi_disabled")}c.instagramRequestCounter=0;c.conditionalFilterBuffer=[];wdi_front.updateUsersImages(c)};wdi_front.updateUsersImages=function(a){var b=jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter).find(".wdi_single_user .wdi_user_img_wrap img");b.each(function(){if(jQuery(this).attr("src")==wdi_url.plugin_url+"images/missing.png"||jQuery(this).attr("src")==""){if(a.feed_row.liked_feed=="liked"){return}for(var c=0;c<a.usersData.length;c++){if(a.usersData[c]["username"]==jQuery(this).parent().parent().find("h3").text()){if(a.usersData[c]["data"].length!=0){jQuery(this).attr("src",a.usersData[c]["data"][0]["images"]["thumbnail"]["url"])}}}}})};wdi_front.masonryDisplayFeedItems=function(d,h){var b=[];var p=[];if(jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}jQuery("#wdi_feed_"+h.feed_row.wdi_feed_counter+" .wdi_masonry_column").each(function(){if(h.feed_row.resort_after_load_more==1){jQuery(this).html("");h.imageIndex=0}if(h.customFilterChanged==true){jQuery(this).html("");h.imageIndex=0}if(h.feed_row.feed_display_view=="pagination"){b.push(0)}else{b.push(jQuery(this).height())}p.push(jQuery(this))});if(h.customFilterChanged==true){h.customFilterChanged=false}for(var e=0;e<d.length;e++){h.displayedData.push(d[e]);if(d[e]["type"]=="image"){var n=wdi_front.getPhotoTemplate(h)}else{if(d[e].hasOwnProperty("videos")){var n=wdi_front.getVideoTemplate(h)}else{var n=wdi_front.getSliderTemplate(h)}}var g=d[e];var o=wdi_front.createObject(g,h);var f=n(o);var m=wdi_front.array_min(b);var l=wdi_front.getImageResolution(d[e]);p[m.index].html(p[m.index].html()+f);b[m.index]+=p[m.index].width()*l;h.imageIndex++;if(h.feed_row.feed_display_view=="pagination"){if((e+1)%h.feed_row.pagination_per_page_number===0){h.resIndex+=h.freeSpaces+1}else{h.resIndex++}}}h.wdi_loadedImages=0;var j=false;h.wdi_load_count=e;var a=h.feed_row.wdi_feed_counter;var k=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){h.wdi_loadedImages++;c();if(j===false){wdi_responsive.columnControl(h,1);j=true}});c();function c(){if(h.wdi_load_count===h.wdi_loadedImages&&h.wdi_loadedImages!=0){h.loadedImages=0;h.wdi_load_count=0;wdi_front.allImagesLoaded(h)}}if(h.paginatorNextFlag==true){wdi_front.updatePagination(h,"next")}h.infiniteScrollFlag=false};wdi_front.getImageResolution=function(c){var d=c.images["standard_resolution"]["width"];var b=c.images["standard_resolution"]["height"];var a=b/d;return a};wdi_front.getDataLength=function(b,d){var c=0;if(typeof d==="undefined"){for(var a=0;a<b.dataStorage.length;a++){c+=b.dataStorage[a].length}}else{for(var a=0;a<d.length;a++){c+=d[a].length}}return c};wdi_front.getArrayContentLength=function(d,c){var b=0;for(var a=0;a<d.length;a++){if(d[a]["finished"]=="finished"){continue}b+=d[a][c].length}return b};wdi_front.displayFeedItems=function(d,j){if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length==0){return}var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" .wdi_feed_wrapper");if(j.feed_row.resort_after_load_more==="1"){l.html("");j.imageIndex=0}if(j.customFilterChanged==true){l.html("");j.imageIndex=0;j.customFilterChanged=false}var g=wdi_front.getImgCount(j)-d.length-1;if(j.feed_row.feed_display_view=="pagination"){var b=j.feed_row.load_more_number;if(j.feed_row.feed_type=="image_browser"){b=1}if(jQuery("#wdi_feed_"+j.feed_row.wdi_feed_counter+' [wdi_page="'+(j.currentPage-1)+'"]').length<b||d.length==0){j.currentPage=(--j.currentPage<=1)?1:j.currentPage}}for(var e=0;e<d.length;e++){if(d[e]["type"]=="image"){var m=wdi_front.getPhotoTemplate(j)}else{if(d[e].hasOwnProperty("videos")){var m=wdi_front.getVideoTemplate(j)}else{var m=wdi_front.getSliderTemplate(j)}}var h=d[e];var n=wdi_front.createObject(h,j);var f=m(n);l.html(l.html()+f);j.imageIndex++;if(j.feed_row.feed_display_view=="pagination"){if((e+1)%j.feed_row.pagination_per_page_number===0){j.resIndex+=j.freeSpaces+1}else{j.resIndex++}}}j.wdi_loadedImages=0;var k=false;j.wdi_load_count=e;var a=j.feed_row.wdi_feed_counter;var l=jQuery("#wdi_feed_"+a+" img.wdi_img").on("load",function(){j.wdi_loadedImages++;c();if(k===false){wdi_responsive.columnControl(j,1);k=true}});function c(){if(j.wdi_load_count===j.wdi_loadedImages&&j.wdi_loadedImages!=0){j.loadedImages=0;j.wdi_load_count=0;wdi_front.allImagesLoaded(j)}}if(j.paginatorNextFlag==true){wdi_front.updatePagination(j,"next")}j.infiniteScrollFlag=false};wdi_front.checkFeedFinished=function(b){for(var a=0;a<b.usersData.length;a++){if(typeof b.usersData[a]["finished"]=="undefined"){return false}}return true};wdi_front.sortingOperator=function(c,b){var a;switch(c){case"date":switch(b){case"asc":a=function(e,d){return(e.created_time>d.created_time)?1:-1};break;case"desc":a=function(e,d){return(e.created_time>d.created_time)?-1:1};break}break;case"likes":switch(b){case"asc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?-1:1};break;case"desc":a=function(e,d){return(e.likes["count"]<d.likes["count"])?1:-1};break}break;case"comments":switch(b){case"asc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?-1:1};break;case"desc":a=function(e,d){return(e.comments["count"]<d.comments["count"])?1:-1};break}break;case"random":a=function(e,d){var f=Math.random();return(f>0.5)?1:-1};break}return a};wdi_front.feedSort=function(e,b){var d=e.feed_row.sort_images_by;var c=e.feed_row.display_order;if(e.feed_row.resort_after_load_more==="1"){e.data=e.data.concat(wdi_front.smartPicker(e,b))}else{e.data=wdi_front.smartPicker(e,b)}var a=wdi_front.sortingOperator(d,c);e.data.sort(a);return e.data};wdi_front.smartPicker=function(l,c){var g=[];var a=0;var k=[];var f=Math.ceil(l.feed_row["number_of_photos"]/l.usersData.length);var b=parseInt(l.feed_row["number_of_photos"]);var n=0;if(c!=""&&typeof c!="undefined"&&c!=null){b=parseInt(c);f=Math.ceil(b/wdi_front.activeUsersCount(l))}var j=function(p,i){return(p.data.length>i.data.length)?1:-1};var e=function(p,i){return(p.length()>i.length())?1:-1};l.storeRawData(l.usersData,"dataStorageRaw");var o=l.dataStorageRaw.sort(e);var h=l.usersData.sort(j);for(var d=0;d<h.length;d++){n+=f;if(o[d].length()<=n){n-=o[d].length();g.push(o[d].getData(o[d].length()));a+=g[g.length-1].length}else{if(a+n>b){n=b-a}var m=[];if(l.auto_trigger===false){m=m.concat(o[d].getData(n))}else{if(m.length+wdi_front.getDataLength(l)+wdi_front.getDataLength(l,g)<l.feed_row["number_of_photos"]){m=m.concat(o[d].getData(n))}}n=0;a+=m.length;g.push(m)}}for(d=0;d<g.length;d++){if(typeof l.dataStorage[d]==="undefined"){l.dataStorage.push(g[d])}else{l.dataStorage[d]=l.dataStorage[d].concat(g[d])}}l.parsedData=wdi_front.parseLighboxData(l);for(d=0;d<g.length;d++){k=k.concat(g[d])}return k};wdi_front.createObject=function(e,h){var j=(e.caption!=null)?e.caption["text"]:" ";var i="";if(e.type=="video"){i=e.hasOwnProperty("videos")?e.videos[h.feedVideoResolution]["url"]:""}var f=e.images[h.feedImageResolution].url;var a=h.imageIndex;var b="square";var d=e.images["standard_resolution"]["height"];var g=e.images["standard_resolution"]["width"];if(d>g){b="portrait"}else{if(d<g){b="landscape"}}var c={id:e.id,caption:j,image_url:f,likes:e.likes["count"],comments:e.comments["count"],wdi_index:a,wdi_res_index:h.resIndex,wdi_media_user:e.user["username"],link:e.link,video_url:i,wdi_username:e.user["username"],wdi_shape:b};return c};wdi_front.setPage=function(c){var b=c.feed_row.feed_display_view;var e=c.feed_row.feed_type;if(b!="pagination"){return""}var a=c.imageIndex;if(e=="image_browser"){var d=1}else{var d=Math.abs(c.feed_row.pagination_per_page_number)}c.paginator=Math.ceil((a+1)/d);return c.paginator};wdi_front.getPhotoTemplate=function(g){var e=wdi_front.setPage(g);var j="";var k="";var l="";var d="";var m="fa-arrows-alt";var c="";if(g.feed_row.feed_type=="blog_style"||g.feed_row.feed_type=="image_browser"){m=""}if(e!=""){k='wdi_page="'+e+'"';sourceAttr="src"}else{sourceAttr="src"}if(e!=""&&e!=1){j="wdi_hidden"}if(g.feed_row.show_username_on_thumb=="1"){c='<span class="wdi_media_user">@<%= wdi_username%></span>'}if(g.feed_row.show_full_description==1&&g.feed_row.feed_type=="masonry"){j+=" wdi_full_caption"}var f="";if(g.feed_row.feed_type!=="blog_style"){if(g.feed_row.feed_type=="masonry"){f="wdi_responsive.showMasonryCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}else{f="wdi_responsive.showCaption(jQuery(this),"+g.feed_row.wdi_feed_counter+");"}}switch(g.feed_row.feed_item_onclick){case"lightbox":l="onclick=wdi_feed_"+g.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":l="onclick=\"window.open ('<%= link%>','_blank')\"";d="wdi_hover_off";m="";break;case"custom_redirect":l="onclick=\"window.open ('"+g.feed_row.redirect_url+"','_self')\"";d="wdi_hover_off";m="";break;case"none":l="";d="wdi_cursor_off wdi_hover_off";m=""}var h="<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";var b=g.feed_row.wdi_feed_counter;var a='<div class="wdi_feed_item '+j+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+k+' wdi_type="image" id="wdi_'+b+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img '+h+'"><img class="wdi_img" '+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+d+'" >'+c+'<div class="wdi_thumb_icon" '+l+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="fa '+m+'"></i></div></div></div></div></div></div>';if(g.feed_row["show_likes"]==="1"||g.feed_row["show_comments"]==="1"||g.feed_row["show_description"]==="1"){a+='<div class="wdi_photo_meta">';if(g.feed_row["show_likes"]==="1"){a+='<div class="wdi_thumb_likes"><i class="fa fa-heart-o"> <%= 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="";e.instagram.requestByUrl(a,{success:function(g){if(typeof g.meta!="undefined"&&typeof g.meta.error_type!="undefined"){wdi_front.show_alert(false,g,e)}if(g===""||typeof g=="undefined"||g==null){c=wdi_front_messages.network_error;e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}if(g.meta["code"]!=200){c=g.meta["error_message"];e.loadMoreDataCount--;wdi_front.show_alert(c,g,e);return}g.user_id=b.user_id;g.username=b.username;for(var h=0;h<e.usersData.length;h++){if(g.user_id===e.usersData[h]["user_id"]){if(g.user_id[0]==="#"){g.data=wdi_front.appendRequestHashtag(g.data,g.user_id)}if(d=="initial-keep"){e.temproraryUsersData[h]=e.usersData[h]}e.usersData[h]=g;e.loadMoreDataCount--}}wdi_front.checkForLoadMoreDone(e,d)}})};wdi_front.checkForLoadMoreDone=function(c,b){var a=c.feed_row.load_more_number;var e=c.feed_row.number_of_photos;if(c.loadMoreDataCount==0){c.temproraryUsersData=wdi_front.mergeData(c.temproraryUsersData,c.usersData);var d=wdi_front.getArrayContentLength(c.temproraryUsersData,"data");if(b=="initial-keep"){b="initial"}if(b=="initial"){if(d<e&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore("initial",c)}else{c.usersData=c.temproraryUsersData;wdi_front.displayFeed(c);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}else{if(d<a&&!wdi_front.userHasNoPhoto(c,c.temproraryUsersData)&&c.instagramRequestCounter<=c.maxConditionalFiltersRequestCount){wdi_front.loadMore(undefined,c)}else{c.usersData=c.temproraryUsersData;if(!wdi_front.activeUsersCount(c)){return}wdi_front.displayFeed(c,a);wdi_front.applyFilters(c);c.temproraryUsersData=[]}}}};wdi_front.allDataHasFinished=function(b){var d=0;for(var a=0;a<b.dataStorageRaw.length;a++){if(b.dataStorageRaw[a].length()==0&&b.dataStorageRaw[a].locked==true){d++}}return(d==b.dataStorageRaw.length)};wdi_front.mergeData=function(c,b){for(var a=0;a<b.length;a++){if(typeof c[a]!="undefined"){if(b[a]["finished"]=="finished"){continue}if(typeof c[a]["pagination"]["next_max_id"]=="undefined"&&typeof c[a]["pagination"]["next_max_like_id"]=="undefined"){continue}c[a]["data"]=c[a]["data"].concat(b[a]["data"]);c[a]["pagination"]=b[a]["pagination"];c[a]["user_id"]=b[a]["user_id"];c[a]["username"]=b[a]["username"];c[a]["meta"]=b[a]["meta"]}else{c.push(b[a])}}return c};wdi_front.brokenImageHandler=function(a){a.src=wdi_url.plugin_url+"images/missing.png";a.onerror="";return true};wdi_front.ajaxLoader=function(a){var d=a.feed_row.wdi_feed_counter;var c=jQuery("#wdi_feed_"+d);if(a.feed_row.feed_display_view=="load_more_btn"){c.find(".wdi_load_more").addClass("wdi_hidden");c.find(".wdi_spinner").removeClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){var b;if(c.find(".wdi_ajax_loading").length==0){b=jQuery('<div class="wdi_ajax_loading"><div><div><img class="wdi_load_more_spinner" src="'+wdi_url.plugin_url+'images/ajax_loader.png"></div></div></div>');c.append(b)}else{b=c.find(".wdi_ajax_loading")}b.removeClass("wdi_hidden")}};wdi_front.allImagesLoaded=function(a){var d=wdi_front.getDataLength(a);if(!a.mediaRequestsDone){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia")}if(d==0&&a.mediaRequestsDone&&(a.feed_row.conditional_filters.length==0||a.feed_row.conditional_filter_enable==0)){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>")}var c=a.feed_row.wdi_feed_counter;var b=jQuery("#wdi_feed_"+c);if(a.feed_row.feed_display_view=="load_more_btn"){b.find(".wdi_load_more").removeClass("wdi_hidden");b.find(".wdi_spinner").addClass("wdi_hidden")}if(a.feed_row.feed_display_view=="infinite_scroll"){jQuery("#wdi_feed_"+a.feed_row.wdi_feed_counter+" .wdi_ajax_loading").addClass("wdi_hidden")}b.trigger("wdi_feed_loaded")};wdi_front.show=function(b,c){var e=c.feed_row.wdi_feed_counter;var d=jQuery("#wdi_feed_"+e+" .wdi_feed_container");var g=this;switch(b){case"header":f();break;case"users":a(c);break}function f(){var i={feed_thumb:c.feed_row["feed_thumb"],feed_name:c.feed_row["feed_name"]};var k=wdi_front.getHeaderTemplate(),h=k(i),j=d.find(".wdi_feed_header").html();d.find(".wdi_feed_header").html(j+h)}function a(j){d.find(".wdi_feed_users").html("");var n=j.feed_users;var m=j.feed_row["access_token"];var h=0;j.headerUserinfo=[];k();function k(){if(j.headerUserinfo.length==n.length){l(j.headerUserinfo,j);return}var i=n[j.headerUserinfo.length];if(typeof i==="string"&&i==="self"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="hashtag"){j.instagram.searchForTagsByName(g.stripHashtag(i.username),{success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false){if(o.data.length==0){var p="";var q={media:""}}else{var p="";var q={media:o.data[0]["media_count"]}}var r={name:n[h]["username"],url:p,counts:q};h++;j.headerUserinfo.push(r);k()}},args:{ignoreFiltering:true}})}else{if(g.getInputType(i.username)=="user"){j.instagram.getSelfInfo({success:function(o){if(typeof o.meta!="undefined"&&typeof o.meta.error_type!="undefined"){wdi_front.show_alert(false,o,j)}o=g.checkMediaResponse(o,j);if(o!=false&&o.meta["code"]===400&&o.meta["error_type"]==="APINotAllowedError"){var p=null;j.headerUserinfo.push(p);h++;k()}if(o!=false&&o.meta["code"]===200){var p={id:o.data["id"],name:o.data["username"],url:o.data["profile_picture"],bio:o.data["bio"],counts:o.data["counts"],website:o.data["website"],full_name:o.data["full_name"]};j.headerUserinfo.push(p);h++;k()}},args:{ignoreFiltering:true}})}}}}function l(i,t){d.find(".wdi_feed_users").html("");for(var q=0;q<i.length;q++){if(i[q]===null){continue}var u={flag:false,id:i[q]["id"],name:i[q]["name"]};var p=(i[q]["name"][0]=="#")?"wdi_header_hashtag":"";var o={user_index:q,user_img_url:i[q]["url"],counts:i[q]["counts"],feed_counter:t.feed_row.wdi_feed_counter,user_name:i[q]["name"],bio:i[q]["bio"],usersCount:t.feed_row.feed_users.length,hashtagClass:p};var w=wdi_front.getUserTemplate(t,i[q]["name"]),r=w(o),s=d.find(".wdi_feed_users").html();d.find(".wdi_feed_users").html(s+r);t.userSortFlags.push(u);var v=jQuery('<div class="wdi_clear"></div>')}d.find(".wdi_feed_users").append(v);wdi_front.updateUsersImages(t)}}};wdi_front.getUserTemplate=function(c,h){var a=c.dataCount,d,f,g;switch(h[0]){case"#":d="//instagram.com/explore/tags/"+h.substr(1,h.length);break;default:d="//instagram.com/"+h;break}g='window.open("'+d+'","_blank")';f="onclick='"+g+"'";var e='<div class="wdi_single_user" user_index="<%=user_index%>"><div class="wdi_header_user_text <%=hashtagClass%>"><div class="wdi_user_img_wrap"><img onerror="wdi_front.brokenImageHandler(this);" src="<%= user_img_url%>">';if(a>1){e+='<div title="'+wdi_front_messages.filter_title+'" class="wdi_filter_overlay"><div class="wdi_filter_icon"><span onclick="wdi_front.addFilter(<%=user_index%>,<%=feed_counter%>);" class="fa fa-filter"></span></div></div>'}e+="</div>";e+="<h3 "+f+"><%= user_name%></h3>";if(h[0]!=="#"){if(c.feed_row.follow_on_instagram_btn=="1"){e+='<div class="wdi_user_controls"><div class="wdi_follow_btn" onclick="window.open(\'//instagram.com/<%= user_name%>\',\'_blank\')"><span> '+wdi_front_messages.follow+"</span></div></div>"}e+='<div class="wdi_media_info"><p class="wdi_posts"><span class="fa fa-camera-retro"></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></div>";var b=_.template(e);return b};wdi_front.getHeaderTemplate=function(){var b='<div class="wdi_header_wrapper"><div class="wdi_header_img_wrap"><img src="<%=feed_thumb%>"></div><div class="wdi_header_text"><%=feed_name%></div><div class="wdi_clear"></div>';var a=_.template(b);return a};wdi_front.addFilter=function(e,g){var f=window["wdi_feed_"+g];var d=f.dataCount;if(d<2){return}if(f.nowLoadingImages!=false){return}else{var c=jQuery("#wdi_feed_"+f.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');c.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg");c.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col");c.find(".wdi_media_info").toggleClass("wdi_filter_active_col");c.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col");f.customFilterChanged=true;if(f.userSortFlags[e]["flag"]==false){f.userSortFlags[e]["flag"]=true}else{f.userSortFlags[e]["flag"]=false}var a=0;for(var b=0;b<f.userSortFlags.length;b++){if(f.userSortFlags[b]["flag"]==true){a++}}if(f.feed_row.feed_display_view=="pagination"){f.resIndex=0}if(a!=0){wdi_front.filterData(f);wdi_front.displayFeed(f)}else{f.customFilteredData=f.dataStorageList;wdi_front.displayFeed(f)}if(f.feed_row.feed_display_view=="pagination"){f.paginator=Math.ceil((f.imageIndex)/parseInt(f.feed_row.pagination_per_page_number));f.currentPage=f.paginator;wdi_front.updatePagination(f,"custom",1);jQuery("#wdi_first_page").removeClass("wdi_disabled");jQuery("#wdi_last_page").addClass("wdi_disabled")}}};wdi_front.filterData=function(c){var d=c.userSortFlags;c.customFilteredData=[];for(var b=0;b<c.dataStorageList.length;b++){for(var a=0;a<d.length;a++){if((c.dataStorageList[b]["user"]["id"]==d[a]["id"]||c.dataStorageList[b]["wdi_hashtag"]==d[a]["name"])&&d[a]["flag"]==true){c.customFilteredData.push(c.dataStorageList[b])}}}};wdi_front.applyFilters=function(c){for(var b=0;b<c.userSortFlags.length;b++){if(c.userSortFlags[b]["flag"]==true){var a=jQuery("#wdi_feed_"+c.feed_row.wdi_feed_counter+'[user_index="'+b+'"]');wdi_front.addFilter(b,c.feed_row.wdi_feed_counter);wdi_front.addFilter(b,c.feed_row.wdi_feed_counter)}}};wdi_front.getImgCount=function(b){var d=b.dataStorage;var c=0;for(var a=0;a<d.length;a++){c+=d[a].length}return c};wdi_front.parseLighboxData=function(k,m){var g=k.dataStorage;var l=k.feed_row.sort_images_by;var a=k.feed_row.display_order;var h=wdi_front.sortingOperator(l,a);var f=[];var b=[];var e={};if(m==true){f=k.customFilteredData}else{for(var d=0;d<g.length;d++){for(var c=0;c<g[d].length;c++){f.push(g[d][c])}}f.sort(h)}for(d=0;d<f.length;d++){e={alt:"",avg_rating:"",comment_count:f[d]["comments"]["count"],date:wdi_front.convertUnixDate(f[d]["created_time"]),description:wdi_front.getDescription((f[d]["caption"]!==null)?f[d]["caption"]["text"]:""),filename:wdi_front.getFileName(f[d]),filetype:wdi_front.getFileType(f[d]),hit_count:"0",id:f[d]["id"],image_url:f[d]["link"],number:0,rate:"",rate_count:"0",username:f[d]["user"]["username"],profile_picture:f[d]["user"]["profile_picture"],thumb_url:f[d]["link"]+"media/?size=t",comments_data:f[d]["comments"]["data"],images:f[d]["images"],carousel_media:(typeof f[d]["carousel_media"]!=="undefined")?f[d]["carousel_media"]:null};b.push(e)}return b};wdi_front.convertUnixDate=function(b){var c=parseInt(b);var a=new Date(0);a.setUTCSeconds(c);var d=a.getFullYear()+"-"+a.getMonth()+"-"+a.getDate();d+=" "+a.getHours()+":"+a.getMinutes();return d};wdi_front.getDescription=function(a){a=a.replace(/\r?\n|\r/g," ");return a};wdi_front.getFileName=function(d){var c=d.link;var b=d.type;if(b==="video"&&d.hasOwnProperty("videos")){return d.videos["standard_resolution"]["url"]}else{var a=c.split("/");return a[a.length-2]}};wdi_front.getFileType=function(a){if(a.type=="video"&&a.hasOwnProperty("videos")){return"EMBED_OEMBED_INSTAGRAM_VIDEO"}else{return"EMBED_OEMBED_INSTAGRAM_IMAGE"}};wdi_front.array_max=function(d){var a=d[0];var b=0;for(var c=1;c<d.length;c++){if(a<d[c]){a=d[c];b=c}}return{value:a,index:b}};wdi_front.array_min=function(d){var c=d[0];var a=0;for(var b=1;b<d.length;b++){if(c>d[b]){c=d[b];a=b}}return{value:c,index:a}};wdi_front.activeUsersCount=function(c){var a=0;for(var b=0;b<c.usersData.length;b++){if(c.usersData[b].finished!="finished"){a++}}return a};wdi_front.checkMediaResponse=function(a,b){if(a!=""&&typeof a!="undefined"&&a!=null&&a.meta["code"]===400&&a.meta["error_type"]==="APINotAllowedError"){return a}if(a==""||typeof a=="undefined"||a==null){errorMessage=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)){d=c[b].pagination.next_max_tag_id}else{if(e.feed_row.liked_feed=="liked"){d=c[b].pagination.next_max_like_id;if(typeof d=="undefined"){d=""}}else{if(c[b].pagination==null){c[b].pagination=[]}d=c[b].pagination.next_max_id;if(typeof d=="undefined"){d=""}}}if(typeof this[a][b]=="undefined"){this[a].push({data:c[b].data,index:0,locked:false,hash_id:d,usersDataFinished:false,userId:c[b].user_id,length:function(){return this.data.length-this.index},getData:function(g){var h=this.data.slice(this.index,this.index+g);this.index+=Math.min(g,this.length());if(this.index==this.data.length&&this.locked==true&&this.usersDataFinished==false){for(var f=0;f<e.usersData.length;f++){if(e.usersData[f]["user_id"]==this.userId){e.usersData[f].finished="finished";this.usersDataFinished=true;break}}}return h}})}else{if(this[a][b].locked==false){if(d!=this[a][b].hash_id){this[a][b].data=this[a][b].data.concat(c[b].data);this[a][b].hash_id=d}else{this[a][b].locked=true}}}}}};wdi_front.updateUsersIfNecessary=function(c){var d=c.feed_users;var a=false;for(var b=0;b<d.length;b++){if("#"==d[b].username.substr(0,1)){d[b].id=d[b].username;continue}if(""==d[b].id||"username"==d[b].id){a=true;c.instagram.searchForUsersByName(d[b].username,{success:function(i){if(typeof i.meta!="undefined"&&typeof i.meta.error_type!="undefined"){wdi_front.show_alert(false,i,c)}if(i.meta.code==200&&i.data.length>0){var l=false;for(var g=0;g<i.data.length;g++){if(i.data[g].username==i.args.username){l=true;break}}if(l){for(var h=0;h<d.length;h++){if(i.data[g].username==d[h].username){d[h].id=i.data[g].id}}}}var f=false;for(var e=0;e<d.length;e++){if(d[e].id==""||d[e].id=="username"){f=true;break}}if(!f){c.feed_row.feed_users=JSON.stringify(d);wdi_front.init(c)}},username:d[b].username})}}return a};if(typeof wdi_ajax.ajax_response!="undefined"){jQuery(document).one("ajaxStop",function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})}else{jQuery(document).ready(function(){if(wdi_front.type!="not_declared"){wdi_front.clickOrTouch=wdi_front.detectEvent();wdi_front.globalInit()}else{return}})}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)});
|
js/wdi_instagram.js
CHANGED
@@ -103,16 +103,16 @@ function WDIInstagram(args)
|
|
103 |
}
|
104 |
}
|
105 |
} else
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
}
|
117 |
}
|
118 |
return false;
|
@@ -218,15 +218,40 @@ function WDIInstagram(args)
|
|
218 |
baseUrl += '&max_tag_id=' + args.max_tag_id;
|
219 |
}
|
220 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
-
|
223 |
-
type: 'POST',
|
224 |
-
url: baseUrl,
|
225 |
-
dataType: 'jsonp',
|
226 |
-
success: function (response)
|
227 |
-
{
|
228 |
if (typeof response["data"] === "undefined") response["data"] = [];
|
229 |
-
|
230 |
if (successFlag) {
|
231 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
232 |
if (typeof window[args.success[0]] != 'undefined') {
|
@@ -238,43 +263,25 @@ function WDIInstagram(args)
|
|
238 |
}
|
239 |
}
|
240 |
|
241 |
-
} else
|
242 |
-
if (typeof args.success == '
|
243 |
-
if (
|
244 |
-
|
245 |
-
response = filter(response, instagram.filterArguments, args.args);
|
246 |
-
}
|
247 |
-
window[args.success](response);
|
248 |
-
}
|
249 |
-
} else
|
250 |
-
if (typeof args.success == 'function') {
|
251 |
-
if (filter) {
|
252 |
-
response = filter(response, instagram.filterArguments, args.args);
|
253 |
-
}
|
254 |
-
args.success(response);
|
255 |
}
|
256 |
-
|
257 |
-
},
|
258 |
-
error: function (response)
|
259 |
-
{
|
260 |
-
if (errorFlag) {
|
261 |
-
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
262 |
-
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
263 |
-
window[args['error'][0]][args['error'][1]](response);
|
264 |
}
|
265 |
-
} else
|
266 |
-
if (
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
if (typeof args['error'] == 'function') {
|
272 |
-
args['error'](response);
|
273 |
-
}
|
274 |
}
|
275 |
-
}
|
276 |
-
|
277 |
-
|
|
|
|
|
278 |
|
279 |
}
|
280 |
|
@@ -307,8 +314,8 @@ function WDIInstagram(args)
|
|
307 |
var instagram = this,
|
308 |
noArgument = false,
|
309 |
successFlag = false,
|
310 |
-
statusCode = this.statusCode
|
311 |
-
|
312 |
filter = this.getFilter('searchForTagsByName');
|
313 |
|
314 |
if (typeof args == 'undefined' || args.length === 0) {
|
@@ -326,12 +333,44 @@ function WDIInstagram(args)
|
|
326 |
}
|
327 |
|
328 |
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
if (successFlag) {
|
336 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
337 |
if (typeof window[args.success[0]] != 'undefined') {
|
@@ -343,42 +382,26 @@ function WDIInstagram(args)
|
|
343 |
}
|
344 |
}
|
345 |
} else
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
}
|
351 |
-
window[args.success](response);
|
352 |
}
|
353 |
-
|
354 |
-
if (typeof args.success == 'function') {
|
355 |
-
if (filter) {
|
356 |
-
response = filter(response, instagram.filterArguments);
|
357 |
-
}
|
358 |
-
args.success(response);
|
359 |
-
}
|
360 |
-
}
|
361 |
-
},
|
362 |
-
error: function (response)
|
363 |
-
{
|
364 |
-
if (errorFlag) {
|
365 |
-
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
366 |
-
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
367 |
-
window[args['error'][0]][args['error'][1]](response);
|
368 |
}
|
369 |
} else
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
args['error'](response);
|
377 |
-
}
|
378 |
}
|
379 |
-
}
|
380 |
-
|
381 |
-
|
|
|
|
|
382 |
}
|
383 |
|
384 |
/*deprecated API*/
|
@@ -446,22 +469,22 @@ function WDIInstagram(args)
|
|
446 |
}
|
447 |
}
|
448 |
} else
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
}
|
454 |
-
response.args = args;
|
455 |
-
window[args.success](response);
|
456 |
-
}
|
457 |
-
} else
|
458 |
-
if (typeof args.success == 'function') {
|
459 |
-
if (filter) {
|
460 |
-
response = filter(response, instagram.filterArguments);
|
461 |
-
}
|
462 |
-
response.args = args;
|
463 |
-
args.success(response);
|
464 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
}
|
466 |
},
|
467 |
error: function (response)
|
@@ -472,14 +495,14 @@ function WDIInstagram(args)
|
|
472 |
window[args['error'][0]][args['error'][1]](response);
|
473 |
}
|
474 |
} else
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
}
|
484 |
},
|
485 |
statusCode: this.statusCode
|
@@ -572,20 +595,20 @@ function WDIInstagram(args)
|
|
572 |
}
|
573 |
}
|
574 |
} else
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
}
|
580 |
-
window[args.success](response);
|
581 |
-
}
|
582 |
-
} else
|
583 |
-
if (typeof args.success == 'function') {
|
584 |
-
if (filter) {
|
585 |
-
response = filter(response, instagram.filterArguments, args.args);
|
586 |
-
}
|
587 |
-
args.success(response);
|
588 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
}
|
590 |
},
|
591 |
error: function (response)
|
@@ -596,14 +619,14 @@ function WDIInstagram(args)
|
|
596 |
window[args['error'][0]][args['error'][1]](response);
|
597 |
}
|
598 |
} else
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
}
|
608 |
},
|
609 |
statusCode: statusCode
|
@@ -647,7 +670,7 @@ function WDIInstagram(args)
|
|
647 |
noArgument = false,
|
648 |
successFlag = false,
|
649 |
argFlag = false,
|
650 |
-
|
651 |
statusCode = this.statusCode,
|
652 |
errorFlag = false,
|
653 |
filter = this.getFilter('getUserRecentMedia'),
|
@@ -715,20 +738,20 @@ function WDIInstagram(args)
|
|
715 |
}
|
716 |
}
|
717 |
} else
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
}
|
723 |
-
window[args.success](response);
|
724 |
-
}
|
725 |
-
} else
|
726 |
-
if (typeof args.success == 'function') {
|
727 |
-
if (filter) {
|
728 |
-
response = filter(response, instagram.filterArguments, args.args);
|
729 |
-
}
|
730 |
-
args.success(response);
|
731 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
732 |
}
|
733 |
},
|
734 |
error: function (response)
|
@@ -739,14 +762,14 @@ function WDIInstagram(args)
|
|
739 |
window[args['error'][0]][args['error'][1]](response);
|
740 |
}
|
741 |
} else
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
}
|
751 |
},
|
752 |
statusCode: statusCode
|
@@ -789,8 +812,9 @@ function WDIInstagram(args)
|
|
789 |
var instagram = this,
|
790 |
noArgument = false,
|
791 |
successFlag = false,
|
792 |
-
statusCode = this.statusCode
|
793 |
-
|
|
|
794 |
filter = this.getFilter('getSelfRecentMedia'),
|
795 |
baseUrl = 'https://api.instagram.com/v1/users/self/media/recent/?access_token=' + getAccessToken();
|
796 |
|
@@ -808,14 +832,19 @@ function WDIInstagram(args)
|
|
808 |
if ('statusCode' in args) {
|
809 |
statusCode = args['statusCode'];
|
810 |
}
|
|
|
|
|
|
|
|
|
|
|
811 |
|
812 |
if ('count' in args) {
|
813 |
args['count'] = parseInt(args['count']);
|
814 |
if (!Number.isInteger(args['count']) || args['count'] <= 0) {
|
815 |
-
args.count =
|
816 |
}
|
817 |
} else {
|
818 |
-
args.count =
|
819 |
}
|
820 |
|
821 |
baseUrl += '&count=' + args.count;
|
@@ -829,60 +858,72 @@ function WDIInstagram(args)
|
|
829 |
}
|
830 |
}
|
831 |
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
838 |
if (successFlag) {
|
839 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
840 |
if (typeof window[args.success[0]] != 'undefined') {
|
841 |
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
842 |
if (filter) {
|
843 |
-
response = filter(response, instagram.filterArguments);
|
844 |
}
|
845 |
window[args.success[0]][args.success[1]](response);
|
846 |
}
|
847 |
}
|
848 |
} else
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
}
|
854 |
-
window[args.success](response);
|
855 |
}
|
856 |
-
|
857 |
-
if (typeof args.success == 'function') {
|
858 |
-
if (filter) {
|
859 |
-
response = filter(response, instagram.filterArguments);
|
860 |
-
}
|
861 |
-
args.success(response);
|
862 |
-
}
|
863 |
-
}
|
864 |
-
},
|
865 |
-
error: function (response)
|
866 |
-
{
|
867 |
-
if (errorFlag) {
|
868 |
-
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
869 |
-
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
870 |
-
window[args['error'][0]][args['error'][1]](response);
|
871 |
}
|
872 |
} else
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
args['error'](response);
|
880 |
-
}
|
881 |
}
|
882 |
-
}
|
883 |
-
|
|
|
884 |
|
885 |
-
});
|
886 |
}
|
887 |
|
888 |
/* deprecated API */
|
@@ -949,20 +990,20 @@ function WDIInstagram(args)
|
|
949 |
}
|
950 |
}
|
951 |
} else
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
}
|
957 |
-
window[args.success](response);
|
958 |
-
}
|
959 |
-
} else
|
960 |
-
if (typeof args.success == 'function') {
|
961 |
-
if (filter) {
|
962 |
-
response = filter(response, instagram.filterArguments);
|
963 |
-
}
|
964 |
-
args.success(response);
|
965 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
}
|
967 |
},
|
968 |
error: function (response)
|
@@ -973,14 +1014,14 @@ function WDIInstagram(args)
|
|
973 |
window[args['error'][0]][args['error'][1]](response);
|
974 |
}
|
975 |
} else
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
}
|
985 |
},
|
986 |
statusCode: statusCode
|
@@ -1033,60 +1074,102 @@ function WDIInstagram(args)
|
|
1033 |
statusCode = args['statusCode'];
|
1034 |
}
|
1035 |
}
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1046 |
if (filter) {
|
1047 |
response = filter(response, instagram.filterArguments);
|
1048 |
}
|
1049 |
-
|
1050 |
}
|
1051 |
}
|
1052 |
-
}
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
|
|
|
|
|
|
1057 |
}
|
1058 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1059 |
}
|
1060 |
-
}
|
1061 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1062 |
if (filter) {
|
1063 |
response = filter(response, instagram.filterArguments);
|
1064 |
}
|
1065 |
-
args.success(response);
|
1066 |
}
|
1067 |
-
}
|
1068 |
-
},
|
1069 |
-
error: function (response)
|
1070 |
-
{
|
1071 |
-
if (errorFlag) {
|
1072 |
-
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1073 |
-
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1074 |
-
window[args['error'][0]][args['error'][1]](response);
|
1075 |
}
|
1076 |
} else
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
} else
|
1082 |
-
if (typeof args['error'] == 'function') {
|
1083 |
-
args['error'](response);
|
1084 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1085 |
}
|
1086 |
-
}
|
1087 |
-
|
|
|
1088 |
|
1089 |
-
});
|
1090 |
}
|
1091 |
|
1092 |
|
@@ -1136,12 +1219,44 @@ function WDIInstagram(args)
|
|
1136 |
statusCode = args['statusCode'];
|
1137 |
}
|
1138 |
}
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1145 |
if (successFlag) {
|
1146 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
1147 |
if (typeof window[args.success[0]] != 'undefined') {
|
@@ -1153,43 +1268,24 @@ function WDIInstagram(args)
|
|
1153 |
}
|
1154 |
}
|
1155 |
} else
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
}
|
1161 |
-
window[args.success](response);
|
1162 |
}
|
1163 |
-
|
1164 |
-
if (typeof args.success == 'function') {
|
1165 |
-
if (filter) {
|
1166 |
-
response = filter(response, instagram.filterArguments);
|
1167 |
-
}
|
1168 |
-
args.success(response);
|
1169 |
-
}
|
1170 |
-
}
|
1171 |
-
},
|
1172 |
-
error: function (response)
|
1173 |
-
{
|
1174 |
-
if (errorFlag) {
|
1175 |
-
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1176 |
-
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1177 |
-
window[args['error'][0]][args['error'][1]](response);
|
1178 |
}
|
1179 |
} else
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
args['error'](response);
|
1187 |
-
}
|
1188 |
}
|
1189 |
-
}
|
1190 |
-
|
1191 |
-
|
1192 |
-
});
|
1193 |
}
|
1194 |
|
1195 |
|
@@ -1255,20 +1351,20 @@ function WDIInstagram(args)
|
|
1255 |
}
|
1256 |
}
|
1257 |
} else
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
}
|
1263 |
-
window[args.success](response);
|
1264 |
-
}
|
1265 |
-
} else
|
1266 |
-
if (typeof args.success == 'function') {
|
1267 |
-
if (filter) {
|
1268 |
-
response = filter(response, instagram.filterArguments);
|
1269 |
-
}
|
1270 |
-
args.success(response);
|
1271 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1272 |
}
|
1273 |
},
|
1274 |
error: function (response)
|
@@ -1279,14 +1375,14 @@ function WDIInstagram(args)
|
|
1279 |
window[args['error'][0]][args['error'][1]](response);
|
1280 |
}
|
1281 |
} else
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
}
|
1291 |
},
|
1292 |
statusCode: statusCode
|
@@ -1365,63 +1461,142 @@ function WDIInstagram(args)
|
|
1365 |
}
|
1366 |
}
|
1367 |
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
if (
|
1378 |
-
if (typeof
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1379 |
if (filter) {
|
1380 |
response = filter(response, instagram.filterArguments, args.args);
|
1381 |
}
|
1382 |
-
|
1383 |
}
|
1384 |
}
|
1385 |
-
}
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
|
|
|
|
1390 |
}
|
1391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1392 |
}
|
1393 |
-
}
|
1394 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1395 |
if (filter) {
|
1396 |
response = filter(response, instagram.filterArguments, args.args);
|
1397 |
}
|
1398 |
-
args.success(response);
|
1399 |
}
|
1400 |
-
}
|
1401 |
-
},
|
1402 |
-
error: function (response)
|
1403 |
-
{
|
1404 |
-
if (errorFlag) {
|
1405 |
-
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1406 |
-
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1407 |
-
window[args['error'][0]][args['error'][1]](response);
|
1408 |
}
|
1409 |
} else
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
} else
|
1415 |
-
if (typeof args['error'] == 'function') {
|
1416 |
-
args['error'](response);
|
1417 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1418 |
}
|
1419 |
-
}
|
1420 |
-
|
|
|
|
|
|
|
1421 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1422 |
});
|
|
|
|
|
1423 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1424 |
}
|
1425 |
-
}
|
1426 |
|
1427 |
|
|
|
|
103 |
}
|
104 |
}
|
105 |
} else
|
106 |
+
if (typeof filters[i].what == 'string') {
|
107 |
+
if (typeof window[filters[i].what] == 'function') {
|
108 |
+
return window[filters[i].what];
|
109 |
+
}
|
110 |
+
} else
|
111 |
+
if (typeof filters[i].what == 'function') {
|
112 |
+
return filters[i].what;
|
113 |
+
} else {
|
114 |
+
return false;
|
115 |
+
}
|
116 |
}
|
117 |
}
|
118 |
return false;
|
218 |
baseUrl += '&max_tag_id=' + args.max_tag_id;
|
219 |
}
|
220 |
}
|
221 |
+
var wdi_callback = function (cache_data) {
|
222 |
+
if(cache_data === false) {
|
223 |
+
jQuery.ajax({
|
224 |
+
type: 'POST',
|
225 |
+
url: baseUrl,
|
226 |
+
dataType: 'jsonp',
|
227 |
+
success: function (response) {
|
228 |
+
_this.setDataToCache(baseUrl,response);
|
229 |
+
success(response)
|
230 |
+
},
|
231 |
+
error: function (response) {
|
232 |
+
if (errorFlag) {
|
233 |
+
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
234 |
+
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
235 |
+
window[args['error'][0]][args['error'][1]](response);
|
236 |
+
}
|
237 |
+
} else if (typeof args['error'] == 'string') {
|
238 |
+
if (typeof window[args['error']] == 'function') {
|
239 |
+
window[args['error']](response);
|
240 |
+
}
|
241 |
+
} else if (typeof args['error'] == 'function') {
|
242 |
+
args['error'](response);
|
243 |
+
}
|
244 |
+
}
|
245 |
+
},
|
246 |
+
statusCode: statusCode
|
247 |
+
});
|
248 |
+
}
|
249 |
+
else{
|
250 |
+
success(cache_data)
|
251 |
+
}
|
252 |
|
253 |
+
function success(response) {
|
|
|
|
|
|
|
|
|
|
|
254 |
if (typeof response["data"] === "undefined") response["data"] = [];
|
|
|
255 |
if (successFlag) {
|
256 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
257 |
if (typeof window[args.success[0]] != 'undefined') {
|
263 |
}
|
264 |
}
|
265 |
|
266 |
+
} else if (typeof args.success == 'string') {
|
267 |
+
if (typeof window[args.success] == 'function') {
|
268 |
+
if (filter) {
|
269 |
+
response = filter(response, instagram.filterArguments, args.args);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
271 |
+
window[args.success](response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
}
|
273 |
+
} else if (typeof args.success == 'function') {
|
274 |
+
if (filter) {
|
275 |
+
response = filter(response, instagram.filterArguments, args.args);
|
276 |
+
}
|
277 |
+
args.success(response);
|
278 |
+
}
|
|
|
|
|
|
|
279 |
}
|
280 |
+
}
|
281 |
+
}
|
282 |
+
_this.getDataFromCache(wdi_callback, baseUrl);
|
283 |
+
|
284 |
+
|
285 |
|
286 |
}
|
287 |
|
314 |
var instagram = this,
|
315 |
noArgument = false,
|
316 |
successFlag = false,
|
317 |
+
statusCode = this.statusCode,
|
318 |
+
errorFlag = false;
|
319 |
filter = this.getFilter('searchForTagsByName');
|
320 |
|
321 |
if (typeof args == 'undefined' || args.length === 0) {
|
333 |
}
|
334 |
|
335 |
|
336 |
+
var req_url = 'https://api.instagram.com/v1/tags/search?q=' + tagname + '&access_token=' + getAccessToken();
|
337 |
+
|
338 |
+
var wdi_callback = function (cache_data) {
|
339 |
+
if(cache_data === false){
|
340 |
+
jQuery.ajax({
|
341 |
+
type: 'POST',
|
342 |
+
url: req_url,
|
343 |
+
dataType: 'jsonp',
|
344 |
+
success: function (response)
|
345 |
+
{
|
346 |
+
_this.setDataToCache(req_url,response);
|
347 |
+
success(response);
|
348 |
+
},
|
349 |
+
error: function (response)
|
350 |
+
{
|
351 |
+
if (errorFlag) {
|
352 |
+
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
353 |
+
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
354 |
+
window[args['error'][0]][args['error'][1]](response);
|
355 |
+
}
|
356 |
+
} else
|
357 |
+
if (typeof args['error'] == 'string') {
|
358 |
+
if (typeof window[args['error']] == 'function') {
|
359 |
+
window[args['error']](response);
|
360 |
+
}
|
361 |
+
} else
|
362 |
+
if (typeof args['error'] == 'function') {
|
363 |
+
args['error'](response);
|
364 |
+
}
|
365 |
+
}
|
366 |
+
},
|
367 |
+
statusCode: statusCode
|
368 |
+
});
|
369 |
+
}else{
|
370 |
+
success(cache_data);
|
371 |
+
}
|
372 |
+
|
373 |
+
function success(response) {
|
374 |
if (successFlag) {
|
375 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
376 |
if (typeof window[args.success[0]] != 'undefined') {
|
382 |
}
|
383 |
}
|
384 |
} else
|
385 |
+
if (typeof args.success == 'string') {
|
386 |
+
if (typeof window[args.success] == 'function') {
|
387 |
+
if (filter) {
|
388 |
+
response = filter(response, instagram.filterArguments);
|
|
|
|
|
389 |
}
|
390 |
+
window[args.success](response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
}
|
392 |
} else
|
393 |
+
if (typeof args.success == 'function') {
|
394 |
+
if (filter) {
|
395 |
+
response = filter(response, instagram.filterArguments);
|
396 |
+
}
|
397 |
+
args.success(response);
|
398 |
+
}
|
|
|
|
|
399 |
}
|
400 |
+
}
|
401 |
+
}
|
402 |
+
_this.getDataFromCache(wdi_callback, req_url);
|
403 |
+
|
404 |
+
|
405 |
}
|
406 |
|
407 |
/*deprecated API*/
|
469 |
}
|
470 |
}
|
471 |
} else
|
472 |
+
if (typeof args.success == 'string') {
|
473 |
+
if (typeof window[args.success] == 'function') {
|
474 |
+
if (filter) {
|
475 |
+
response = filter(response, instagram.filterArguments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
}
|
477 |
+
response.args = args;
|
478 |
+
window[args.success](response);
|
479 |
+
}
|
480 |
+
} else
|
481 |
+
if (typeof args.success == 'function') {
|
482 |
+
if (filter) {
|
483 |
+
response = filter(response, instagram.filterArguments);
|
484 |
+
}
|
485 |
+
response.args = args;
|
486 |
+
args.success(response);
|
487 |
+
}
|
488 |
}
|
489 |
},
|
490 |
error: function (response)
|
495 |
window[args['error'][0]][args['error'][1]](response);
|
496 |
}
|
497 |
} else
|
498 |
+
if (typeof args['error'] == 'string') {
|
499 |
+
if (typeof window[args['error']] == 'function') {
|
500 |
+
window[args['error']](response);
|
501 |
+
}
|
502 |
+
} else
|
503 |
+
if (typeof args['error'] == 'function') {
|
504 |
+
args['error'](response);
|
505 |
+
}
|
506 |
}
|
507 |
},
|
508 |
statusCode: this.statusCode
|
595 |
}
|
596 |
}
|
597 |
} else
|
598 |
+
if (typeof args.success == 'string') {
|
599 |
+
if (typeof window[args.success] == 'function') {
|
600 |
+
if (filter) {
|
601 |
+
response = filter(response, instagram.filterArguments, args.args);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
602 |
}
|
603 |
+
window[args.success](response);
|
604 |
+
}
|
605 |
+
} else
|
606 |
+
if (typeof args.success == 'function') {
|
607 |
+
if (filter) {
|
608 |
+
response = filter(response, instagram.filterArguments, args.args);
|
609 |
+
}
|
610 |
+
args.success(response);
|
611 |
+
}
|
612 |
}
|
613 |
},
|
614 |
error: function (response)
|
619 |
window[args['error'][0]][args['error'][1]](response);
|
620 |
}
|
621 |
} else
|
622 |
+
if (typeof args['error'] == 'string') {
|
623 |
+
if (typeof window[args['error']] == 'function') {
|
624 |
+
window[args['error']](response);
|
625 |
+
}
|
626 |
+
} else
|
627 |
+
if (typeof args['error'] == 'function') {
|
628 |
+
args['error'](response);
|
629 |
+
}
|
630 |
}
|
631 |
},
|
632 |
statusCode: statusCode
|
670 |
noArgument = false,
|
671 |
successFlag = false,
|
672 |
argFlag = false,
|
673 |
+
//internal default object for statusCode handling
|
674 |
statusCode = this.statusCode,
|
675 |
errorFlag = false,
|
676 |
filter = this.getFilter('getUserRecentMedia'),
|
738 |
}
|
739 |
}
|
740 |
} else
|
741 |
+
if (typeof args.success == 'string') {
|
742 |
+
if (typeof window[args.success] == 'function') {
|
743 |
+
if (filter) {
|
744 |
+
response = filter(response, instagram.filterArguments, args.args);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
}
|
746 |
+
window[args.success](response);
|
747 |
+
}
|
748 |
+
} else
|
749 |
+
if (typeof args.success == 'function') {
|
750 |
+
if (filter) {
|
751 |
+
response = filter(response, instagram.filterArguments, args.args);
|
752 |
+
}
|
753 |
+
args.success(response);
|
754 |
+
}
|
755 |
}
|
756 |
},
|
757 |
error: function (response)
|
762 |
window[args['error'][0]][args['error'][1]](response);
|
763 |
}
|
764 |
} else
|
765 |
+
if (typeof args['error'] == 'string') {
|
766 |
+
if (typeof window[args['error']] == 'function') {
|
767 |
+
window[args['error']](response);
|
768 |
+
}
|
769 |
+
} else
|
770 |
+
if (typeof args['error'] == 'function') {
|
771 |
+
args['error'](response);
|
772 |
+
}
|
773 |
}
|
774 |
},
|
775 |
statusCode: statusCode
|
812 |
var instagram = this,
|
813 |
noArgument = false,
|
814 |
successFlag = false,
|
815 |
+
statusCode = this.statusCode,
|
816 |
+
errorFlag = false,
|
817 |
+
argFlag = false,
|
818 |
filter = this.getFilter('getSelfRecentMedia'),
|
819 |
baseUrl = 'https://api.instagram.com/v1/users/self/media/recent/?access_token=' + getAccessToken();
|
820 |
|
832 |
if ('statusCode' in args) {
|
833 |
statusCode = args['statusCode'];
|
834 |
}
|
835 |
+
if ('args' in args) {
|
836 |
+
argFlag = true;
|
837 |
+
} else {
|
838 |
+
args.args = {};
|
839 |
+
}
|
840 |
|
841 |
if ('count' in args) {
|
842 |
args['count'] = parseInt(args['count']);
|
843 |
if (!Number.isInteger(args['count']) || args['count'] <= 0) {
|
844 |
+
args.count = 20;
|
845 |
}
|
846 |
} else {
|
847 |
+
args.count = 20;
|
848 |
}
|
849 |
|
850 |
baseUrl += '&count=' + args.count;
|
858 |
}
|
859 |
}
|
860 |
|
861 |
+
var wdi_callback = function (cache_data) {
|
862 |
+
if(cache_data === false){
|
863 |
+
jQuery.ajax({
|
864 |
+
type: 'POST',
|
865 |
+
dataType: 'jsonp',
|
866 |
+
url: baseUrl,
|
867 |
+
success: function (response)
|
868 |
+
{
|
869 |
+
_this.setDataToCache(baseUrl,response);
|
870 |
+
success(response);
|
871 |
+
},
|
872 |
+
error: function (response)
|
873 |
+
{
|
874 |
+
if (errorFlag) {
|
875 |
+
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
876 |
+
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
877 |
+
window[args['error'][0]][args['error'][1]](response);
|
878 |
+
}
|
879 |
+
} else
|
880 |
+
if (typeof args['error'] == 'string') {
|
881 |
+
if (typeof window[args['error']] == 'function') {
|
882 |
+
window[args['error']](response);
|
883 |
+
}
|
884 |
+
} else
|
885 |
+
if (typeof args['error'] == 'function') {
|
886 |
+
args['error'](response);
|
887 |
+
}
|
888 |
+
}
|
889 |
+
},
|
890 |
+
statusCode: statusCode
|
891 |
+
|
892 |
+
});
|
893 |
+
}else{
|
894 |
+
success(cache_data);
|
895 |
+
}
|
896 |
+
function success(response) {
|
897 |
if (successFlag) {
|
898 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
899 |
if (typeof window[args.success[0]] != 'undefined') {
|
900 |
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
901 |
if (filter) {
|
902 |
+
response = filter(response, instagram.filterArguments, args);
|
903 |
}
|
904 |
window[args.success[0]][args.success[1]](response);
|
905 |
}
|
906 |
}
|
907 |
} else
|
908 |
+
if (typeof args.success == 'string') {
|
909 |
+
if (typeof window[args.success] == 'function') {
|
910 |
+
if (filter) {
|
911 |
+
response = filter(response, instagram.filterArguments, args);
|
|
|
|
|
912 |
}
|
913 |
+
window[args.success](response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
914 |
}
|
915 |
} else
|
916 |
+
if (typeof args.success == 'function') {
|
917 |
+
if (filter) {
|
918 |
+
response = filter(response, instagram.filterArguments, args);
|
919 |
+
}
|
920 |
+
args.success(response);
|
921 |
+
}
|
|
|
|
|
922 |
}
|
923 |
+
}
|
924 |
+
}
|
925 |
+
_this.getDataFromCache(wdi_callback, baseUrl);
|
926 |
|
|
|
927 |
}
|
928 |
|
929 |
/* deprecated API */
|
990 |
}
|
991 |
}
|
992 |
} else
|
993 |
+
if (typeof args.success == 'string') {
|
994 |
+
if (typeof window[args.success] == 'function') {
|
995 |
+
if (filter) {
|
996 |
+
response = filter(response, instagram.filterArguments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
997 |
}
|
998 |
+
window[args.success](response);
|
999 |
+
}
|
1000 |
+
} else
|
1001 |
+
if (typeof args.success == 'function') {
|
1002 |
+
if (filter) {
|
1003 |
+
response = filter(response, instagram.filterArguments);
|
1004 |
+
}
|
1005 |
+
args.success(response);
|
1006 |
+
}
|
1007 |
}
|
1008 |
},
|
1009 |
error: function (response)
|
1014 |
window[args['error'][0]][args['error'][1]](response);
|
1015 |
}
|
1016 |
} else
|
1017 |
+
if (typeof args['error'] == 'string') {
|
1018 |
+
if (typeof window[args['error']] == 'function') {
|
1019 |
+
window[args['error']](response);
|
1020 |
+
}
|
1021 |
+
} else
|
1022 |
+
if (typeof args['error'] == 'function') {
|
1023 |
+
args['error'](response);
|
1024 |
+
}
|
1025 |
}
|
1026 |
},
|
1027 |
statusCode: statusCode
|
1074 |
statusCode = args['statusCode'];
|
1075 |
}
|
1076 |
}
|
1077 |
+
var req_url = 'https://api.instagram.com/v1/users/self/?access_token=' + getAccessToken();
|
1078 |
+
|
1079 |
+
var wdi_callback = function (cache_data) {
|
1080 |
+
if(cache_data === false){
|
1081 |
+
jQuery.ajax({
|
1082 |
+
type: 'POST',
|
1083 |
+
dataType: 'jsonp',
|
1084 |
+
url:req_url,
|
1085 |
+
success: function (response)
|
1086 |
+
{
|
1087 |
+
_this.setDataToCache(req_url,response);
|
1088 |
+
if (successFlag) {
|
1089 |
+
if (typeof args.success == 'object' && args.success.length == 2) {
|
1090 |
+
if (typeof window[args.success[0]] != 'undefined') {
|
1091 |
+
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
1092 |
+
if (filter) {
|
1093 |
+
response = filter(response, instagram.filterArguments);
|
1094 |
+
}
|
1095 |
+
window[args.success[0]][args.success[1]](response);
|
1096 |
+
}
|
1097 |
+
}
|
1098 |
+
} else
|
1099 |
+
if (typeof args.success == 'string') {
|
1100 |
+
if (typeof window[args.success] == 'function') {
|
1101 |
+
if (filter) {
|
1102 |
+
response = filter(response, instagram.filterArguments);
|
1103 |
+
}
|
1104 |
+
window[args.success](response);
|
1105 |
+
}
|
1106 |
+
} else
|
1107 |
+
if (typeof args.success == 'function') {
|
1108 |
if (filter) {
|
1109 |
response = filter(response, instagram.filterArguments);
|
1110 |
}
|
1111 |
+
args.success(response);
|
1112 |
}
|
1113 |
}
|
1114 |
+
},
|
1115 |
+
error: function (response)
|
1116 |
+
{
|
1117 |
+
|
1118 |
+
if (errorFlag) {
|
1119 |
+
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1120 |
+
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1121 |
+
window[args['error'][0]][args['error'][1]](response);
|
1122 |
}
|
1123 |
+
} else
|
1124 |
+
if (typeof args['error'] == 'string') {
|
1125 |
+
if (typeof window[args['error']] == 'function') {
|
1126 |
+
window[args['error']](response);
|
1127 |
+
}
|
1128 |
+
} else
|
1129 |
+
if (typeof args['error'] == 'function') {
|
1130 |
+
args['error'](response);
|
1131 |
}
|
1132 |
+
}
|
1133 |
+
},
|
1134 |
+
statusCode: statusCode
|
1135 |
+
|
1136 |
+
});
|
1137 |
+
}
|
1138 |
+
else{
|
1139 |
+
success(cache_data);
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
function success(response) {
|
1143 |
+
if (successFlag) {
|
1144 |
+
if (typeof args.success == 'object' && args.success.length == 2) {
|
1145 |
+
if (typeof window[args.success[0]] != 'undefined') {
|
1146 |
+
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
1147 |
if (filter) {
|
1148 |
response = filter(response, instagram.filterArguments);
|
1149 |
}
|
1150 |
+
window[args.success[0]][args.success[1]](response);
|
1151 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1152 |
}
|
1153 |
} else
|
1154 |
+
if (typeof args.success == 'string') {
|
1155 |
+
if (typeof window[args.success] == 'function') {
|
1156 |
+
if (filter) {
|
1157 |
+
response = filter(response, instagram.filterArguments);
|
|
|
|
|
|
|
1158 |
}
|
1159 |
+
window[args.success](response);
|
1160 |
+
}
|
1161 |
+
} else
|
1162 |
+
if (typeof args.success == 'function') {
|
1163 |
+
if (filter) {
|
1164 |
+
response = filter(response, instagram.filterArguments);
|
1165 |
+
}
|
1166 |
+
args.success(response);
|
1167 |
+
}
|
1168 |
}
|
1169 |
+
}
|
1170 |
+
}
|
1171 |
+
_this.getDataFromCache(wdi_callback, req_url);
|
1172 |
|
|
|
1173 |
}
|
1174 |
|
1175 |
|
1219 |
statusCode = args['statusCode'];
|
1220 |
}
|
1221 |
}
|
1222 |
+
var req_url = 'https://api.instagram.com/v1/media/' + media_id + '/comments?access_token=' + getAccessToken();
|
1223 |
+
|
1224 |
+
var wdi_callback = function (cache_data) {
|
1225 |
+
if(cache_data === false){
|
1226 |
+
jQuery.ajax({
|
1227 |
+
type: 'POST',
|
1228 |
+
dataType: 'jsonp',
|
1229 |
+
url: req_url,
|
1230 |
+
success: function (response)
|
1231 |
+
{
|
1232 |
+
_this.setDataToCache(req_url,response);
|
1233 |
+
success(response);
|
1234 |
+
},
|
1235 |
+
error: function (response)
|
1236 |
+
{
|
1237 |
+
if (errorFlag) {
|
1238 |
+
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1239 |
+
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1240 |
+
window[args['error'][0]][args['error'][1]](response);
|
1241 |
+
}
|
1242 |
+
} else
|
1243 |
+
if (typeof args['error'] == 'string') {
|
1244 |
+
if (typeof window[args['error']] == 'function') {
|
1245 |
+
window[args['error']](response);
|
1246 |
+
}
|
1247 |
+
} else
|
1248 |
+
if (typeof args['error'] == 'function') {
|
1249 |
+
args['error'](response);
|
1250 |
+
}
|
1251 |
+
}
|
1252 |
+
},
|
1253 |
+
statusCode: statusCode
|
1254 |
+
|
1255 |
+
});
|
1256 |
+
}else{
|
1257 |
+
success(cache_data);
|
1258 |
+
}
|
1259 |
+
function success(response) {
|
1260 |
if (successFlag) {
|
1261 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
1262 |
if (typeof window[args.success[0]] != 'undefined') {
|
1268 |
}
|
1269 |
}
|
1270 |
} else
|
1271 |
+
if (typeof args.success == 'string') {
|
1272 |
+
if (typeof window[args.success] == 'function') {
|
1273 |
+
if (filter) {
|
1274 |
+
response = filter(response, instagram.filterArguments);
|
|
|
|
|
1275 |
}
|
1276 |
+
window[args.success](response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1277 |
}
|
1278 |
} else
|
1279 |
+
if (typeof args.success == 'function') {
|
1280 |
+
if (filter) {
|
1281 |
+
response = filter(response, instagram.filterArguments);
|
1282 |
+
}
|
1283 |
+
args.success(response);
|
1284 |
+
}
|
|
|
|
|
1285 |
}
|
1286 |
+
}
|
1287 |
+
}
|
1288 |
+
_this.getDataFromCache(wdi_callback, req_url);
|
|
|
1289 |
}
|
1290 |
|
1291 |
|
1351 |
}
|
1352 |
}
|
1353 |
} else
|
1354 |
+
if (typeof args.success == 'string') {
|
1355 |
+
if (typeof window[args.success] == 'function') {
|
1356 |
+
if (filter) {
|
1357 |
+
response = filter(response, instagram.filterArguments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1358 |
}
|
1359 |
+
window[args.success](response);
|
1360 |
+
}
|
1361 |
+
} else
|
1362 |
+
if (typeof args.success == 'function') {
|
1363 |
+
if (filter) {
|
1364 |
+
response = filter(response, instagram.filterArguments);
|
1365 |
+
}
|
1366 |
+
args.success(response);
|
1367 |
+
}
|
1368 |
}
|
1369 |
},
|
1370 |
error: function (response)
|
1375 |
window[args['error'][0]][args['error'][1]](response);
|
1376 |
}
|
1377 |
} else
|
1378 |
+
if (typeof args['error'] == 'string') {
|
1379 |
+
if (typeof window[args['error']] == 'function') {
|
1380 |
+
window[args['error']](response);
|
1381 |
+
}
|
1382 |
+
} else
|
1383 |
+
if (typeof args['error'] == 'function') {
|
1384 |
+
args['error'](response);
|
1385 |
+
}
|
1386 |
}
|
1387 |
},
|
1388 |
statusCode: statusCode
|
1461 |
}
|
1462 |
}
|
1463 |
|
1464 |
+
var wdi_callback = function (cache_data) {
|
1465 |
+
if(cache_data === false){
|
1466 |
+
jQuery.ajax({
|
1467 |
+
type: 'POST',
|
1468 |
+
dataType: 'jsonp',
|
1469 |
+
url: requestUrl,
|
1470 |
+
success: function (response)
|
1471 |
+
{
|
1472 |
+
_this.setDataToCache(requestUrl,response);
|
1473 |
+
if (successFlag) {
|
1474 |
+
if (typeof args.success == 'object' && args.success.length == 2) {
|
1475 |
+
if (typeof window[args.success[0]] != 'undefined') {
|
1476 |
+
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
1477 |
+
if (filter) {
|
1478 |
+
response = filter(response, instagram.filterArguments, args.args);
|
1479 |
+
}
|
1480 |
+
window[args.success[0]][args.success[1]](response);
|
1481 |
+
}
|
1482 |
+
}
|
1483 |
+
} else
|
1484 |
+
if (typeof args.success == 'string') {
|
1485 |
+
if (typeof window[args.success] == 'function') {
|
1486 |
+
if (filter) {
|
1487 |
+
response = filter(response, instagram.filterArguments, args.args);
|
1488 |
+
}
|
1489 |
+
window[args.success](response);
|
1490 |
+
}
|
1491 |
+
} else
|
1492 |
+
if (typeof args.success == 'function') {
|
1493 |
if (filter) {
|
1494 |
response = filter(response, instagram.filterArguments, args.args);
|
1495 |
}
|
1496 |
+
args.success(response);
|
1497 |
}
|
1498 |
}
|
1499 |
+
},
|
1500 |
+
error: function (response)
|
1501 |
+
{
|
1502 |
+
if (errorFlag) {
|
1503 |
+
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1504 |
+
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1505 |
+
window[args['error'][0]][args['error'][1]](response);
|
1506 |
}
|
1507 |
+
} else
|
1508 |
+
if (typeof args['error'] == 'string') {
|
1509 |
+
if (typeof window[args['error']] == 'function') {
|
1510 |
+
window[args['error']](response);
|
1511 |
+
}
|
1512 |
+
} else
|
1513 |
+
if (typeof args['error'] == 'function') {
|
1514 |
+
args['error'](response);
|
1515 |
}
|
1516 |
+
}
|
1517 |
+
},
|
1518 |
+
statusCode: statusCode
|
1519 |
+
});
|
1520 |
+
}
|
1521 |
+
else{
|
1522 |
+
success(cache_data);
|
1523 |
+
}
|
1524 |
+
function success(response) {
|
1525 |
+
if (successFlag) {
|
1526 |
+
if (typeof args.success == 'object' && args.success.length == 2) {
|
1527 |
+
if (typeof window[args.success[0]] != 'undefined') {
|
1528 |
+
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
1529 |
if (filter) {
|
1530 |
response = filter(response, instagram.filterArguments, args.args);
|
1531 |
}
|
1532 |
+
window[args.success[0]][args.success[1]](response);
|
1533 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1534 |
}
|
1535 |
} else
|
1536 |
+
if (typeof args.success == 'string') {
|
1537 |
+
if (typeof window[args.success] == 'function') {
|
1538 |
+
if (filter) {
|
1539 |
+
response = filter(response, instagram.filterArguments, args.args);
|
|
|
|
|
|
|
1540 |
}
|
1541 |
+
window[args.success](response);
|
1542 |
+
}
|
1543 |
+
} else
|
1544 |
+
if (typeof args.success == 'function') {
|
1545 |
+
if (filter) {
|
1546 |
+
response = filter(response, instagram.filterArguments, args.args);
|
1547 |
+
}
|
1548 |
+
args.success(response);
|
1549 |
+
}
|
1550 |
}
|
1551 |
+
}
|
1552 |
+
}
|
1553 |
+
_this.getDataFromCache(wdi_callback, requestUrl);
|
1554 |
+
}
|
1555 |
+
|
1556 |
|
1557 |
+
|
1558 |
+
this.getDataFromCache = function (callback, cache_name) {
|
1559 |
+
jQuery.ajax({
|
1560 |
+
type: "POST",
|
1561 |
+
async: true,
|
1562 |
+
url: wdi_ajax.ajax_url,
|
1563 |
+
dataType:"json",
|
1564 |
+
data: {
|
1565 |
+
wdi_cache_name:cache_name,
|
1566 |
+
wdi_nonce:wdi_ajax.wdi_nonce,
|
1567 |
+
action:"wdi_get_cache_data",
|
1568 |
+
},
|
1569 |
+
success: function(data){
|
1570 |
+
if(data["success"] !== "false"){
|
1571 |
+
if(typeof data["cache_data"] !== "undefined"){
|
1572 |
+
var json_data = JSON.parse(data["cache_data"]);
|
1573 |
+
callback(json_data);
|
1574 |
+
}
|
1575 |
+
}else {
|
1576 |
+
callback(false);
|
1577 |
+
}
|
1578 |
+
}
|
1579 |
});
|
1580 |
+
}
|
1581 |
+
|
1582 |
|
1583 |
+
this.setDataToCache = function (cache_name, response) {
|
1584 |
+
jQuery.ajax({
|
1585 |
+
type: "POST",
|
1586 |
+
url: wdi_ajax.ajax_url,
|
1587 |
+
dataType:"json",
|
1588 |
+
data: {
|
1589 |
+
wdi_cache_name:cache_name,
|
1590 |
+
wdi_cache_response:JSON.stringify(response),
|
1591 |
+
wdi_nonce:wdi_ajax.wdi_nonce,
|
1592 |
+
action:"wdi_set_cache_data"
|
1593 |
+
},
|
1594 |
+
success: function(data){
|
1595 |
+
console.log(data);
|
1596 |
+
}
|
1597 |
+
});
|
1598 |
}
|
|
|
1599 |
|
1600 |
|
1601 |
+
}
|
1602 |
+
|
js/wdi_instagram.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function WDIInstagram(a){this.access_tokens=[];this.filters=[];if(typeof a!="undefined"){if(typeof a.access_tokens!="undefined"){this.access_tokens=a.access_tokens}if(typeof a.filters!="undefined"){this.filters=a.filters}}var c=this;this.statusCode={429:function(){console.log(" 429: Too many requests. Try after one hour")}};this.getFilter=function(d){var f=c.filters;if(typeof f=="undefined"){return false}for(var e=0;e<f.length;e++){if(f[e].where==d){if(typeof f[e].what=="object"&&f[e].what.length==2){if(typeof window[f[e].what[0]]!="undefined"){if(typeof window[f[e].what[0]][f[e].what[1]]=="function"){return window[f[e].what[0]][f[e].what[1]]}}}else{if(typeof f[e].what=="string"){if(typeof window[f[e].what]=="function"){return window[f[e].what]}}else{if(typeof f[e].what=="function"){return f[e].what}else{return false}}}}}return false};function b(){var d=c.access_tokens,e=parseInt(Math.random(0,1)*d.length);return d[e]}this.addToken=function(d){if(typeof d=="string"){c.access_tokens.push(d)}};this.getTagRecentMedia=function(l,j){var k=this,m=false,e=false,g=this.statusCode,f=false,i=false,d=this.getFilter("getTagRecentMedia"),h="https://api.instagram.com/v1/tags/"+l+"/media/recent?access_token="+b();if(typeof j=="undefined"||j.length===0){m=true}else{if("success" in j){e=true}if("statusCode" in j){g=j.statusCode}if("error" in j){f=true}if("args" in j){i=true}else{j.args={}}if("count" in j){j.count=parseInt(j.count);if(!Number.isInteger(j.count)||j.count<=0){j.count=33}}else{j.count=33}h+="&count="+j.count;if("min_tag_id" in j){h+="&min_tag_id="+j.min_tag_id}if("max_tag_id" in j){h+="&max_tag_id="+j.max_tag_id}}jQuery.ajax({type:"POST",url:h,dataType:"jsonp",success:function(n){if(typeof n.data==="undefined"){n.data=[]}if(e){if(typeof j.success=="object"&&j.success.length==2){if(typeof window[j.success[0]]!="undefined"){if(typeof window[j.success[0]][j.success[1]]=="function"){if(d){n=d(n,k.filterArguments,j.args)}window[j.success[0]][j.success[1]](n)}}}else{if(typeof j.success=="string"){if(typeof window[j.success]=="function"){if(d){n=d(n,k.filterArguments,j.args)}window[j.success](n)}}else{if(typeof j.success=="function"){if(d){n=d(n,k.filterArguments,j.args)}j.success(n)}}}}},error:function(n){if(f){if(typeof j.error=="object"&&j.error.length==2){if(typeof window[j.error[0]][j.error[1]]=="function"){window[j.error[0]][j.error[1]](n)}}else{if(typeof j.error=="string"){if(typeof window[j.error]=="function"){window[j.error](n)}}else{if(typeof j.error=="function"){j.error(n)}}}}},statusCode:g})};this.searchForTagsByName=function(h,f){var d=this,i=false,e=false,g=this.statusCode;errorFlag=false;filter=this.getFilter("searchForTagsByName");if(typeof f=="undefined"||f.length===0){i=true}else{if("success" in f){e=true}if("error" in f){errorFlag=true}if("statusCode" in f){g=f.statusCode}}jQuery.ajax({type:"POST",url:"https://api.instagram.com/v1/tags/search?q="+h+"&access_token="+b(),dataType:"jsonp",success:function(j){if(e){if(typeof f.success=="object"&&f.success.length==2){if(typeof window[f.success[0]]!="undefined"){if(typeof window[f.success[0]][f.success[1]]=="function"){if(filter){j=filter(j,d.filterArguments)}window[f.success[0]][f.success[1]](j)}}}else{if(typeof f.success=="string"){if(typeof window[f.success]=="function"){if(filter){j=filter(j,d.filterArguments)}window[f.success](j)}}else{if(typeof f.success=="function"){if(filter){j=filter(j,d.filterArguments)}f.success(j)}}}}},error:function(j){if(errorFlag){if(typeof f.error=="object"&&f.error.length==2){if(typeof window[f.error[0]][f.error[1]]=="function"){window[f.error[0]][f.error[1]](j)}}else{if(typeof f.error=="string"){if(typeof window[f.error]=="function"){window[f.error](j)}}else{if(typeof f.error=="function"){f.error(j)}}}}},statusCode:g})};this.searchForUsersByName=function(k,g){var d=this,j=false,e=false,i=this.statusCode,f=false,h=this.getFilter("searchForUsersByName");if(typeof g=="undefined"||g.length===0){j=true}else{if("success" in g){e=true}if("error" in g){f=true}if("statusCode" in g){i=g.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/search?q="+k+"&access_token="+b(),success:function(l){if(e){if(typeof g.success=="object"&&g.success.length==2){if(typeof window[g.success[0]]!="undefined"){if(typeof window[g.success[0]][g.success[1]]=="function"){if(h){l=h(l,d.filterArguments)}l.args=g;window[g.success[0]][g.success[1]](l)}}}else{if(typeof g.success=="string"){if(typeof window[g.success]=="function"){if(h){l=h(l,d.filterArguments)}l.args=g;window[g.success](l)}}else{if(typeof g.success=="function"){if(h){l=h(l,d.filterArguments)}l.args=g;g.success(l)}}}}},error:function(l){if(f){if(typeof g.error=="object"&&g.error.length==2){if(typeof window[g.error[0]][g.error[1]]=="function"){window[g.error[0]][g.error[1]](l)}}else{if(typeof g.error=="string"){if(typeof window[g.error]=="function"){window[g.error](l)}}else{if(typeof g.error=="function"){g.error(l)}}}}},statusCode:this.statusCode})};this.getRecentLikedMedia=function(g){var d=this,k=false,e=false,i=this.statusCode,f=false,h=this.getFilter("getRecentLikedMedia"),j="https://api.instagram.com/v1/users/self/media/liked?access_token="+b();if(typeof g=="undefined"||g.length===0){k=true}else{if("success" in g){e=true}if("error" in g){f=true}if("statusCode" in g){i=g.statusCode}if("args" in g){argFlag=true}else{g.args={}}if("count" in g){g.count=parseInt(g.count);if(!Number.isInteger(g.count)||g.count<=0){g.count=20}}else{g.count=20}j+="&count="+g.count;if("next_max_like_id" in g){j+="&next_max_like_id="+g.next_max_like_id}}jQuery.ajax({type:"POST",dataType:"jsonp",url:j,success:function(l){if(e){if(typeof g.success=="object"&&g.success.length==2){if(typeof window[g.success[0]]!="undefined"){if(typeof window[g.success[0]][g.success[1]]=="function"){if(h){l=h(l,d.filterArguments,g.args)}window[g.success[0]][g.success[1]](l)}}}else{if(typeof g.success=="string"){if(typeof window[g.success]=="function"){if(h){l=h(l,d.filterArguments,g.args)}window[g.success](l)}}else{if(typeof g.success=="function"){if(h){l=h(l,d.filterArguments,g.args)}g.success(l)}}}}},error:function(l){if(f){if(typeof g.error=="object"&&g.error.length==2){if(typeof window[g.error[0]][g.error[1]]=="function"){window[g.error[0]][g.error[1]](l)}}else{if(typeof g.error=="string"){if(typeof window[g.error]=="function"){window[g.error](l)}}else{if(typeof g.error=="function"){g.error(l)}}}}},statusCode:i})};this.getUserRecentMedia=function(l,j){var k=this,m=false,e=false,i=false,g=this.statusCode,f=false,d=this.getFilter("getUserRecentMedia"),h="https://api.instagram.com/v1/users/"+l+"/media/recent/?access_token="+b();if(typeof j=="undefined"||j.length===0){m=true}else{if("success" in j){e=true}if("statusCode" in j){g=j.statusCode}if("args" in j){i=true}else{j.args={}}if("error" in j){f=true}if("count" in j){j.count=parseInt(j.count);if(!Number.isInteger(j.count)||j.count<=0){j.count=33}}else{j.count=33}h+="&count="+j.count;if("min_id" in j){h+="&min_id="+j.min_id}if("max_id" in j){h+="&max_id="+j.max_id}}jQuery.ajax({type:"POST",dataType:"jsonp",url:h,success:function(n){if(typeof n.data==="undefined"){n.data=[]}if(e){if(typeof j.success=="object"&&j.success.length==2){if(typeof window[j.success[0]]!="undefined"){if(typeof window[j.success[0]][j.success[1]]=="function"){if(d){n=d(n,k.filterArguments,j.args)}window[j.success[0]][j.success[1]](n)}}}else{if(typeof j.success=="string"){if(typeof window[j.success]=="function"){if(d){n=d(n,k.filterArguments,j.args)}window[j.success](n)}}else{if(typeof j.success=="function"){if(d){n=d(n,k.filterArguments,j.args)}j.success(n)}}}}},error:function(n){if(f){if(typeof j.error=="object"&&j.error.length==2){if(typeof window[j.error[0]][j.error[1]]=="function"){window[j.error[0]][j.error[1]](n)}}else{if(typeof j.error=="string"){if(typeof window[j.error]=="function"){window[j.error](n)}}else{if(typeof j.error=="function"){j.error(n)}}}}},statusCode:g})};this.getSelfRecentMedia=function(f){var d=this,h=false,e=false,g=this.statusCode;errorFlag=false,filter=this.getFilter("getSelfRecentMedia"),baseUrl="https://api.instagram.com/v1/users/self/media/recent/?access_token="+b();if(typeof f=="undefined"||f.length===0){h=true}else{if("success" in f){e=true}if("error" in f){errorFlag=true}if("statusCode" in f){g=f.statusCode}if("count" in f){f.count=parseInt(f.count);if(!Number.isInteger(f.count)||f.count<=0){f.count=33}}else{f.count=33}baseUrl+="&count="+f.count;if("min_id" in f){baseUrl+="&min_id="+f.min_id}if("max_id" in f){baseUrl+="&max_id="+f.max_id}}jQuery.ajax({type:"POST",dataType:"jsonp",url:baseUrl,success:function(i){if(e){if(typeof f.success=="object"&&f.success.length==2){if(typeof window[f.success[0]]!="undefined"){if(typeof window[f.success[0]][f.success[1]]=="function"){if(filter){i=filter(i,d.filterArguments)}window[f.success[0]][f.success[1]](i)}}}else{if(typeof f.success=="string"){if(typeof window[f.success]=="function"){if(filter){i=filter(i,d.filterArguments)}window[f.success](i)}}else{if(typeof f.success=="function"){if(filter){i=filter(i,d.filterArguments)}f.success(i)}}}}},error:function(i){if(errorFlag){if(typeof f.error=="object"&&f.error.length==2){if(typeof window[f.error[0]][f.error[1]]=="function"){window[f.error[0]][f.error[1]](i)}}else{if(typeof f.error=="string"){if(typeof window[f.error]=="function"){window[f.error](i)}}else{if(typeof f.error=="function"){f.error(i)}}}}},statusCode:g})};this.getUserInfo=function(e,h){var d=this,k=false,f=false,j=this.statusCode,g=false,i=this.getFilter("getUserInfo");if(typeof h=="undefined"||h.length===0){k=true}else{if("success" in h){f=true}if("error" in h){g=true}if("statusCode" in h){j=h.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/"+e+"/?access_token="+b(),success:function(l){if(f){if(typeof h.success=="object"&&h.success.length==2){if(typeof window[h.success[0]]!="undefined"){if(typeof window[h.success[0]][h.success[1]]=="function"){if(i){l=i(l,d.filterArguments)}window[h.success[0]][h.success[1]](l)}}}else{if(typeof h.success=="string"){if(typeof window[h.success]=="function"){if(i){l=i(l,d.filterArguments)}window[h.success](l)}}else{if(typeof h.success=="function"){if(i){l=i(l,d.filterArguments)}h.success(l)}}}}},error:function(l){if(g){if(typeof h.error=="object"&&h.error.length==2){if(typeof window[h.error[0]][h.error[1]]=="function"){window[h.error[0]][h.error[1]](l)}}else{if(typeof h.error=="string"){if(typeof window[h.error]=="function"){window[h.error](l)}}else{if(typeof h.error=="function"){h.error(l)}}}}},statusCode:j})};this.getSelfInfo=function(g){var d=this,j=false,e=false,i=this.statusCode,f=false,h=this.getFilter("getSelfInfo");if(typeof g=="undefined"||g.length===0){j=true}else{if("success" in g){e=true}if("error" in g){f=true}if("statusCode" in g){i=g.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/self/?access_token="+b(),success:function(k){if(e){if(typeof g.success=="object"&&g.success.length==2){if(typeof window[g.success[0]]!="undefined"){if(typeof window[g.success[0]][g.success[1]]=="function"){if(h){k=h(k,d.filterArguments)}window[g.success[0]][g.success[1]](k)}}}else{if(typeof g.success=="string"){if(typeof window[g.success]=="function"){if(h){k=h(k,d.filterArguments)}window[g.success](k)}}else{if(typeof g.success=="function"){if(h){k=h(k,d.filterArguments)}g.success(k)}}}}},error:function(k){if(f){if(typeof g.error=="object"&&g.error.length==2){if(typeof window[g.error[0]][g.error[1]]=="function"){window[g.error[0]][g.error[1]](k)}}else{if(typeof g.error=="string"){if(typeof window[g.error]=="function"){window[g.error](k)}}else{if(typeof g.error=="function"){g.error(k)}}}}},statusCode:i})};this.getRecentMediaComments=function(j,g){var d=this,k=false,e=false,i=this.statusCode,f=false,h=this.getFilter("getRecentMediaComments");if(typeof g=="undefined"||g.length===0){k=true}else{if("success" in g){e=true}if("error" in g){f=true}if("statusCode" in g){i=g.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/media/"+j+"/comments?access_token="+b(),success:function(l){if(e){if(typeof g.success=="object"&&g.success.length==2){if(typeof window[g.success[0]]!="undefined"){if(typeof window[g.success[0]][g.success[1]]=="function"){if(h){l=h(l,d.filterArguments)}window[g.success[0]][g.success[1]](l)}}}else{if(typeof g.success=="string"){if(typeof window[g.success]=="function"){if(h){l=h(l,d.filterArguments)}window[g.success](l)}}else{if(typeof g.success=="function"){if(h){l=h(l,d.filterArguments)}g.success(l)}}}}},error:function(l){if(f){if(typeof g.error=="object"&&g.error.length==2){if(typeof window[g.error[0]][g.error[1]]=="function"){window[g.error[0]][g.error[1]](l)}}else{if(typeof g.error=="string"){if(typeof window[g.error]=="function"){window[g.error](l)}}else{if(typeof g.error=="function"){g.error(l)}}}}},statusCode:i})};this.getRecentMediaLikes=function(j,g){var d=this,k=false,e=false,i=this.statusCode,f=false,h=this.getFilter("getRecentMediaLikes");if(typeof g=="undefined"||g.length===0){k=true}else{if("success" in g){e=true}if("error" in g){f=true}if("statusCode" in g){i=g.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/media/"+j+"/likes?access_token="+b(),success:function(l){if(e){if(typeof g.success=="object"&&g.success.length==2){if(typeof window[g.success[0]]!="undefined"){if(typeof window[g.success[0]][g.success[1]]=="function"){if(h){l=h(l,d.filterArguments)}window[g.success[0]][g.success[1]](l)}}}else{if(typeof g.success=="string"){if(typeof window[g.success]=="function"){if(h){l=h(l,d.filterArguments)}window[g.success](l)}}else{if(typeof g.success=="function"){if(h){l=h(l,d.filterArguments)}g.success(l)}}}}},error:function(l){if(f){if(typeof g.error=="object"&&g.error.length==2){if(typeof window[g.error[0]][g.error[1]]=="function"){window[g.error[0]][g.error[1]](l)}}else{if(typeof g.error=="string"){if(typeof window[g.error]=="function"){window[g.error](l)}}else{if(typeof g.error=="function"){g.error(l)}}}}},statusCode:i})};this.requestByUrl=function(n,m){var o=this,p=false,f=false,g=false,l=false,j=this.statusCode,e=this.getFilter("requestByUrl"),d,k;d=n.split("?")[1].split("&");for(var h=0;h<d.length;h++){d[h]=d[h].split("=");if(d[h][0]=="access_token"){d[h][1]=b()}d[h]=d[h].join("=")}d=d.join("&");n=n.split("?")[0]+"?"+d;if(typeof m=="undefined"||m.length===0){p=true}else{if("success" in m){f=true}if("args" in m){l=true}else{m.args={}}if("error" in m){g=true}if("statusCode" in m){j=m.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:n,success:function(i){if(f){if(typeof m.success=="object"&&m.success.length==2){if(typeof window[m.success[0]]!="undefined"){if(typeof window[m.success[0]][m.success[1]]=="function"){if(e){i=e(i,o.filterArguments,m.args)}window[m.success[0]][m.success[1]](i)}}}else{if(typeof m.success=="string"){if(typeof window[m.success]=="function"){if(e){i=e(i,o.filterArguments,m.args)}window[m.success](i)}}else{if(typeof m.success=="function"){if(e){i=e(i,o.filterArguments,m.args)}m.success(i)}}}}},error:function(i){if(g){if(typeof m.error=="object"&&m.error.length==2){if(typeof window[m.error[0]][m.error[1]]=="function"){window[m.error[0]][m.error[1]](i)}}else{if(typeof m.error=="string"){if(typeof window[m.error]=="function"){window[m.error](i)}}else{if(typeof m.error=="function"){m.error(i)}}}}},statusCode:j})}};
|
1 |
+
function WDIInstagram(a){this.access_tokens=[];this.filters=[];if(typeof a!="undefined"){if(typeof a.access_tokens!="undefined"){this.access_tokens=a.access_tokens}if(typeof a.filters!="undefined"){this.filters=a.filters}}var c=this;this.statusCode={429:function(){console.log(" 429: Too many requests. Try after one hour")}};this.getFilter=function(d){var f=c.filters;if(typeof f=="undefined"){return false}for(var e=0;e<f.length;e++){if(f[e].where==d){if(typeof f[e].what=="object"&&f[e].what.length==2){if(typeof window[f[e].what[0]]!="undefined"){if(typeof window[f[e].what[0]][f[e].what[1]]=="function"){return window[f[e].what[0]][f[e].what[1]]}}}else{if(typeof f[e].what=="string"){if(typeof window[f[e].what]=="function"){return window[f[e].what]}}else{if(typeof f[e].what=="function"){return f[e].what}else{return false}}}}}return false};function b(){var d=c.access_tokens,e=parseInt(Math.random(0,1)*d.length);return d[e]}this.addToken=function(d){if(typeof d=="string"){c.access_tokens.push(d)}};this.getTagRecentMedia=function(m,k){var l=this,n=false,e=false,h=this.statusCode,f=false,j=false,d=this.getFilter("getTagRecentMedia"),i="https://api.instagram.com/v1/tags/"+m+"/media/recent?access_token="+b();if(typeof k=="undefined"||k.length===0){n=true}else{if("success" in k){e=true}if("statusCode" in k){h=k.statusCode}if("error" in k){f=true}if("args" in k){j=true}else{k.args={}}if("count" in k){k.count=parseInt(k.count);if(!Number.isInteger(k.count)||k.count<=0){k.count=33}}else{k.count=33}i+="&count="+k.count;if("min_tag_id" in k){i+="&min_tag_id="+k.min_tag_id}if("max_tag_id" in k){i+="&max_tag_id="+k.max_tag_id}}var g=function(o){if(o===false){jQuery.ajax({type:"POST",url:i,dataType:"jsonp",success:function(q){c.setDataToCache(i,q);p(q)},error:function(q){if(f){if(typeof k.error=="object"&&k.error.length==2){if(typeof window[k.error[0]][k.error[1]]=="function"){window[k.error[0]][k.error[1]](q)}}else{if(typeof k.error=="string"){if(typeof window[k.error]=="function"){window[k.error](q)}}else{if(typeof k.error=="function"){k.error(q)}}}}},statusCode:h})}else{p(o)}function p(q){if(typeof q.data==="undefined"){q.data=[]}if(e){if(typeof k.success=="object"&&k.success.length==2){if(typeof window[k.success[0]]!="undefined"){if(typeof window[k.success[0]][k.success[1]]=="function"){if(d){q=d(q,l.filterArguments,k.args)}window[k.success[0]][k.success[1]](q)}}}else{if(typeof k.success=="string"){if(typeof window[k.success]=="function"){if(d){q=d(q,l.filterArguments,k.args)}window[k.success](q)}}else{if(typeof k.success=="function"){if(d){q=d(q,l.filterArguments,k.args)}k.success(q)}}}}}};c.getDataFromCache(g,i)};this.searchForTagsByName=function(k,i){var j=this,l=false,d=false,h=this.statusCode,e=false;filter=this.getFilter("searchForTagsByName");if(typeof i=="undefined"||i.length===0){l=true}else{if("success" in i){d=true}if("error" in i){e=true}if("statusCode" in i){h=i.statusCode}}var f="https://api.instagram.com/v1/tags/search?q="+k+"&access_token="+b();var g=function(m){if(m===false){jQuery.ajax({type:"POST",url:f,dataType:"jsonp",success:function(o){c.setDataToCache(f,o);n(o)},error:function(o){if(e){if(typeof i.error=="object"&&i.error.length==2){if(typeof window[i.error[0]][i.error[1]]=="function"){window[i.error[0]][i.error[1]](o)}}else{if(typeof i.error=="string"){if(typeof window[i.error]=="function"){window[i.error](o)}}else{if(typeof i.error=="function"){i.error(o)}}}}},statusCode:h})}else{n(m)}function n(o){if(d){if(typeof i.success=="object"&&i.success.length==2){if(typeof window[i.success[0]]!="undefined"){if(typeof window[i.success[0]][i.success[1]]=="function"){if(filter){o=filter(o,j.filterArguments)}window[i.success[0]][i.success[1]](o)}}}else{if(typeof i.success=="string"){if(typeof window[i.success]=="function"){if(filter){o=filter(o,j.filterArguments)}window[i.success](o)}}else{if(typeof i.success=="function"){if(filter){o=filter(o,j.filterArguments)}i.success(o)}}}}}};c.getDataFromCache(g,f)};this.searchForUsersByName=function(k,g){var d=this,j=false,e=false,i=this.statusCode,f=false,h=this.getFilter("searchForUsersByName");if(typeof g=="undefined"||g.length===0){j=true}else{if("success" in g){e=true}if("error" in g){f=true}if("statusCode" in g){i=g.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/search?q="+k+"&access_token="+b(),success:function(l){if(e){if(typeof g.success=="object"&&g.success.length==2){if(typeof window[g.success[0]]!="undefined"){if(typeof window[g.success[0]][g.success[1]]=="function"){if(h){l=h(l,d.filterArguments)}l.args=g;window[g.success[0]][g.success[1]](l)}}}else{if(typeof g.success=="string"){if(typeof window[g.success]=="function"){if(h){l=h(l,d.filterArguments)}l.args=g;window[g.success](l)}}else{if(typeof g.success=="function"){if(h){l=h(l,d.filterArguments)}l.args=g;g.success(l)}}}}},error:function(l){if(f){if(typeof g.error=="object"&&g.error.length==2){if(typeof window[g.error[0]][g.error[1]]=="function"){window[g.error[0]][g.error[1]](l)}}else{if(typeof g.error=="string"){if(typeof window[g.error]=="function"){window[g.error](l)}}else{if(typeof g.error=="function"){g.error(l)}}}}},statusCode:this.statusCode})};this.getRecentLikedMedia=function(g){var d=this,k=false,e=false,i=this.statusCode,f=false,h=this.getFilter("getRecentLikedMedia"),j="https://api.instagram.com/v1/users/self/media/liked?access_token="+b();if(typeof g=="undefined"||g.length===0){k=true}else{if("success" in g){e=true}if("error" in g){f=true}if("statusCode" in g){i=g.statusCode}if("args" in g){argFlag=true}else{g.args={}}if("count" in g){g.count=parseInt(g.count);if(!Number.isInteger(g.count)||g.count<=0){g.count=20}}else{g.count=20}j+="&count="+g.count;if("next_max_like_id" in g){j+="&next_max_like_id="+g.next_max_like_id}}jQuery.ajax({type:"POST",dataType:"jsonp",url:j,success:function(l){if(e){if(typeof g.success=="object"&&g.success.length==2){if(typeof window[g.success[0]]!="undefined"){if(typeof window[g.success[0]][g.success[1]]=="function"){if(h){l=h(l,d.filterArguments,g.args)}window[g.success[0]][g.success[1]](l)}}}else{if(typeof g.success=="string"){if(typeof window[g.success]=="function"){if(h){l=h(l,d.filterArguments,g.args)}window[g.success](l)}}else{if(typeof g.success=="function"){if(h){l=h(l,d.filterArguments,g.args)}g.success(l)}}}}},error:function(l){if(f){if(typeof g.error=="object"&&g.error.length==2){if(typeof window[g.error[0]][g.error[1]]=="function"){window[g.error[0]][g.error[1]](l)}}else{if(typeof g.error=="string"){if(typeof window[g.error]=="function"){window[g.error](l)}}else{if(typeof g.error=="function"){g.error(l)}}}}},statusCode:i})};this.getUserRecentMedia=function(l,j){var k=this,m=false,e=false,i=false,g=this.statusCode,f=false,d=this.getFilter("getUserRecentMedia"),h="https://api.instagram.com/v1/users/"+l+"/media/recent/?access_token="+b();if(typeof j=="undefined"||j.length===0){m=true}else{if("success" in j){e=true}if("statusCode" in j){g=j.statusCode}if("args" in j){i=true}else{j.args={}}if("error" in j){f=true}if("count" in j){j.count=parseInt(j.count);if(!Number.isInteger(j.count)||j.count<=0){j.count=33}}else{j.count=33}h+="&count="+j.count;if("min_id" in j){h+="&min_id="+j.min_id}if("max_id" in j){h+="&max_id="+j.max_id}}jQuery.ajax({type:"POST",dataType:"jsonp",url:h,success:function(n){if(typeof n.data==="undefined"){n.data=[]}if(e){if(typeof j.success=="object"&&j.success.length==2){if(typeof window[j.success[0]]!="undefined"){if(typeof window[j.success[0]][j.success[1]]=="function"){if(d){n=d(n,k.filterArguments,j.args)}window[j.success[0]][j.success[1]](n)}}}else{if(typeof j.success=="string"){if(typeof window[j.success]=="function"){if(d){n=d(n,k.filterArguments,j.args)}window[j.success](n)}}else{if(typeof j.success=="function"){if(d){n=d(n,k.filterArguments,j.args)}j.success(n)}}}}},error:function(n){if(f){if(typeof j.error=="object"&&j.error.length==2){if(typeof window[j.error[0]][j.error[1]]=="function"){window[j.error[0]][j.error[1]](n)}}else{if(typeof j.error=="string"){if(typeof window[j.error]=="function"){window[j.error](n)}}else{if(typeof j.error=="function"){j.error(n)}}}}},statusCode:g})};this.getSelfRecentMedia=function(k){var l=this,m=false,e=false,h=this.statusCode,f=false,j=false,d=this.getFilter("getSelfRecentMedia"),i="https://api.instagram.com/v1/users/self/media/recent/?access_token="+b();if(typeof k=="undefined"||k.length===0){m=true}else{if("success" in k){e=true}if("error" in k){f=true}if("statusCode" in k){h=k.statusCode}if("args" in k){j=true}else{k.args={}}if("count" in k){k.count=parseInt(k.count);if(!Number.isInteger(k.count)||k.count<=0){k.count=20}}else{k.count=20}i+="&count="+k.count;if("min_id" in k){i+="&min_id="+k.min_id}if("max_id" in k){i+="&max_id="+k.max_id}}var g=function(n){if(n===false){jQuery.ajax({type:"POST",dataType:"jsonp",url:i,success:function(p){c.setDataToCache(i,p);o(p)},error:function(p){if(f){if(typeof k.error=="object"&&k.error.length==2){if(typeof window[k.error[0]][k.error[1]]=="function"){window[k.error[0]][k.error[1]](p)}}else{if(typeof k.error=="string"){if(typeof window[k.error]=="function"){window[k.error](p)}}else{if(typeof k.error=="function"){k.error(p)}}}}},statusCode:h})}else{o(n)}function o(p){if(e){if(typeof k.success=="object"&&k.success.length==2){if(typeof window[k.success[0]]!="undefined"){if(typeof window[k.success[0]][k.success[1]]=="function"){if(d){p=d(p,l.filterArguments,k)}window[k.success[0]][k.success[1]](p)}}}else{if(typeof k.success=="string"){if(typeof window[k.success]=="function"){if(d){p=d(p,l.filterArguments,k)}window[k.success](p)}}else{if(typeof k.success=="function"){if(d){p=d(p,l.filterArguments,k)}k.success(p)}}}}}};c.getDataFromCache(g,i)};this.getUserInfo=function(e,h){var d=this,k=false,f=false,j=this.statusCode,g=false,i=this.getFilter("getUserInfo");if(typeof h=="undefined"||h.length===0){k=true}else{if("success" in h){f=true}if("error" in h){g=true}if("statusCode" in h){j=h.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/"+e+"/?access_token="+b(),success:function(l){if(f){if(typeof h.success=="object"&&h.success.length==2){if(typeof window[h.success[0]]!="undefined"){if(typeof window[h.success[0]][h.success[1]]=="function"){if(i){l=i(l,d.filterArguments)}window[h.success[0]][h.success[1]](l)}}}else{if(typeof h.success=="string"){if(typeof window[h.success]=="function"){if(i){l=i(l,d.filterArguments)}window[h.success](l)}}else{if(typeof h.success=="function"){if(i){l=i(l,d.filterArguments)}h.success(l)}}}}},error:function(l){if(g){if(typeof h.error=="object"&&h.error.length==2){if(typeof window[h.error[0]][h.error[1]]=="function"){window[h.error[0]][h.error[1]](l)}}else{if(typeof h.error=="string"){if(typeof window[h.error]=="function"){window[h.error](l)}}else{if(typeof h.error=="function"){h.error(l)}}}}},statusCode:j})};this.getSelfInfo=function(j){var k=this,l=false,e=false,i=this.statusCode,f=false,d=this.getFilter("getSelfInfo");if(typeof j=="undefined"||j.length===0){l=true}else{if("success" in j){e=true}if("error" in j){f=true}if("statusCode" in j){i=j.statusCode}}var g="https://api.instagram.com/v1/users/self/?access_token="+b();var h=function(m){if(m===false){jQuery.ajax({type:"POST",dataType:"jsonp",url:g,success:function(o){c.setDataToCache(g,o);if(e){if(typeof j.success=="object"&&j.success.length==2){if(typeof window[j.success[0]]!="undefined"){if(typeof window[j.success[0]][j.success[1]]=="function"){if(d){o=d(o,k.filterArguments)}window[j.success[0]][j.success[1]](o)}}}else{if(typeof j.success=="string"){if(typeof window[j.success]=="function"){if(d){o=d(o,k.filterArguments)}window[j.success](o)}}else{if(typeof j.success=="function"){if(d){o=d(o,k.filterArguments)}j.success(o)}}}}},error:function(o){if(f){if(typeof j.error=="object"&&j.error.length==2){if(typeof window[j.error[0]][j.error[1]]=="function"){window[j.error[0]][j.error[1]](o)}}else{if(typeof j.error=="string"){if(typeof window[j.error]=="function"){window[j.error](o)}}else{if(typeof j.error=="function"){j.error(o)}}}}},statusCode:i})}else{n(m)}function n(o){if(e){if(typeof j.success=="object"&&j.success.length==2){if(typeof window[j.success[0]]!="undefined"){if(typeof window[j.success[0]][j.success[1]]=="function"){if(d){o=d(o,k.filterArguments)}window[j.success[0]][j.success[1]](o)}}}else{if(typeof j.success=="string"){if(typeof window[j.success]=="function"){if(d){o=d(o,k.filterArguments)}window[j.success](o)}}else{if(typeof j.success=="function"){if(d){o=d(o,k.filterArguments)}j.success(o)}}}}}};c.getDataFromCache(h,g)};this.getRecentMediaComments=function(f,k){var l=this,m=false,e=false,j=this.statusCode,h=false,d=this.getFilter("getRecentMediaComments");if(typeof k=="undefined"||k.length===0){m=true}else{if("success" in k){e=true}if("error" in k){h=true}if("statusCode" in k){j=k.statusCode}}var g="https://api.instagram.com/v1/media/"+f+"/comments?access_token="+b();var i=function(n){if(n===false){jQuery.ajax({type:"POST",dataType:"jsonp",url:g,success:function(p){c.setDataToCache(g,p);o(p)},error:function(p){if(h){if(typeof k.error=="object"&&k.error.length==2){if(typeof window[k.error[0]][k.error[1]]=="function"){window[k.error[0]][k.error[1]](p)}}else{if(typeof k.error=="string"){if(typeof window[k.error]=="function"){window[k.error](p)}}else{if(typeof k.error=="function"){k.error(p)}}}}},statusCode:j})}else{o(n)}function o(p){if(e){if(typeof k.success=="object"&&k.success.length==2){if(typeof window[k.success[0]]!="undefined"){if(typeof window[k.success[0]][k.success[1]]=="function"){if(d){p=d(p,l.filterArguments)}window[k.success[0]][k.success[1]](p)}}}else{if(typeof k.success=="string"){if(typeof window[k.success]=="function"){if(d){p=d(p,l.filterArguments)}window[k.success](p)}}else{if(typeof k.success=="function"){if(d){p=d(p,l.filterArguments)}k.success(p)}}}}}};c.getDataFromCache(i,g)};this.getRecentMediaLikes=function(j,g){var d=this,k=false,e=false,i=this.statusCode,f=false,h=this.getFilter("getRecentMediaLikes");if(typeof g=="undefined"||g.length===0){k=true}else{if("success" in g){e=true}if("error" in g){f=true}if("statusCode" in g){i=g.statusCode}}jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/media/"+j+"/likes?access_token="+b(),success:function(l){if(e){if(typeof g.success=="object"&&g.success.length==2){if(typeof window[g.success[0]]!="undefined"){if(typeof window[g.success[0]][g.success[1]]=="function"){if(h){l=h(l,d.filterArguments)}window[g.success[0]][g.success[1]](l)}}}else{if(typeof g.success=="string"){if(typeof window[g.success]=="function"){if(h){l=h(l,d.filterArguments)}window[g.success](l)}}else{if(typeof g.success=="function"){if(h){l=h(l,d.filterArguments)}g.success(l)}}}}},error:function(l){if(f){if(typeof g.error=="object"&&g.error.length==2){if(typeof window[g.error[0]][g.error[1]]=="function"){window[g.error[0]][g.error[1]](l)}}else{if(typeof g.error=="string"){if(typeof window[g.error]=="function"){window[g.error](l)}}else{if(typeof g.error=="function"){g.error(l)}}}}},statusCode:i})};this.requestByUrl=function(o,n){var p=this,q=false,f=false,g=false,m=false,k=this.statusCode,e=this.getFilter("requestByUrl"),d,l;d=o.split("?")[1].split("&");for(var j=0;j<d.length;j++){d[j]=d[j].split("=");if(d[j][0]=="access_token"){d[j][1]=b()}d[j]=d[j].join("=")}d=d.join("&");o=o.split("?")[0]+"?"+d;if(typeof n=="undefined"||n.length===0){q=true}else{if("success" in n){f=true}if("args" in n){m=true}else{n.args={}}if("error" in n){g=true}if("statusCode" in n){k=n.statusCode}}var h=function(i){if(i===false){jQuery.ajax({type:"POST",dataType:"jsonp",url:o,success:function(s){c.setDataToCache(o,s);if(f){if(typeof n.success=="object"&&n.success.length==2){if(typeof window[n.success[0]]!="undefined"){if(typeof window[n.success[0]][n.success[1]]=="function"){if(e){s=e(s,p.filterArguments,n.args)}window[n.success[0]][n.success[1]](s)}}}else{if(typeof n.success=="string"){if(typeof window[n.success]=="function"){if(e){s=e(s,p.filterArguments,n.args)}window[n.success](s)}}else{if(typeof n.success=="function"){if(e){s=e(s,p.filterArguments,n.args)}n.success(s)}}}}},error:function(s){if(g){if(typeof n.error=="object"&&n.error.length==2){if(typeof window[n.error[0]][n.error[1]]=="function"){window[n.error[0]][n.error[1]](s)}}else{if(typeof n.error=="string"){if(typeof window[n.error]=="function"){window[n.error](s)}}else{if(typeof n.error=="function"){n.error(s)}}}}},statusCode:k})}else{r(i)}function r(s){if(f){if(typeof n.success=="object"&&n.success.length==2){if(typeof window[n.success[0]]!="undefined"){if(typeof window[n.success[0]][n.success[1]]=="function"){if(e){s=e(s,p.filterArguments,n.args)}window[n.success[0]][n.success[1]](s)}}}else{if(typeof n.success=="string"){if(typeof window[n.success]=="function"){if(e){s=e(s,p.filterArguments,n.args)}window[n.success](s)}}else{if(typeof n.success=="function"){if(e){s=e(s,p.filterArguments,n.args)}n.success(s)}}}}}};c.getDataFromCache(h,o)};this.getDataFromCache=function(e,d){jQuery.ajax({type:"POST",async:true,url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_cache_name:d,wdi_nonce:wdi_ajax.wdi_nonce,action:"wdi_get_cache_data"},success:function(g){if(g.success!=="false"){if(typeof g.cache_data!=="undefined"){var f=JSON.parse(g.cache_data);e(f)}}else{e(false)}}})};this.setDataToCache=function(e,d){jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_cache_name:e,wdi_cache_response:JSON.stringify(d),wdi_nonce:wdi_ajax.wdi_nonce,action:"wdi_set_cache_data"},success:function(f){console.log(f)}})}};
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram
|
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -498,6 +498,14 @@ Please make sure you don't have any important information before you proceed.
|
|
498 |
|
499 |
== Changelog ==
|
500 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
= 1.2.19 =
|
502 |
Fixed: Loading more images
|
503 |
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.3.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
498 |
|
499 |
== Changelog ==
|
500 |
|
501 |
+
= 1.3.0 =
|
502 |
+
New: Caching of Instagram data. API rate limits do not constrain feed loading anymore.
|
503 |
+
New: Compatibility with Gutenberg editor.
|
504 |
+
Improved: It is possible now to manually edit access token.
|
505 |
+
Changed: Plugin will output a warning when an incompatible version of Font-Awesome is loaded (SVG generated by JS)
|
506 |
+
Fixed: Error when PHP filter extension is not enabled.
|
507 |
+
Fixed: PHP warning in feed editor page appearing sometimes.
|
508 |
+
|
509 |
= 1.2.19 =
|
510 |
Fixed: Loading more images
|
511 |
|
wd-instagram-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WD Instagram Feed
|
4 |
Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
|
5 |
Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
|
6 |
-
Version: 1.
|
7 |
Author: WebDorado
|
8 |
Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
9 |
License: GPLv2 or later
|
@@ -21,7 +21,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
|
|
21 |
//define("wdi",'wdi');
|
22 |
define('WDI_FEED_TABLE','wdi_feeds');
|
23 |
define('WDI_THEME_TABLE','wdi_themes');
|
24 |
-
define('WDI_VERSION','1.
|
25 |
define('WDI_IS_PRO','false');
|
26 |
$wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
|
27 |
define('WDI_MINIFY', $wdi_minify);
|
@@ -51,6 +51,71 @@ else {
|
|
51 |
//////////////////////////////////////////////////////////////////
|
52 |
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
|
56 |
add_action('wp_ajax_WDIGalleryBox', 'wdi_ajax_frontend');
|
@@ -366,8 +431,10 @@ function wdi_load_scripts($hook){
|
|
366 |
}
|
367 |
|
368 |
$uninstall_url = wp_nonce_url( admin_url( 'admin-ajax.php' ), 'wdiUninstallPlugin', 'uninstall_nonce' );
|
369 |
-
wp_localize_script("wdi_admin", 'wdi_ajax',array(
|
|
|
370 |
'uninstall_url' => $uninstall_url,
|
|
|
371 |
'is_pro' => WDI_IS_PRO
|
372 |
));
|
373 |
wp_localize_script("wdi_admin", 'wdi_version',array('is_pro'=>WDI_IS_PRO));
|
@@ -446,7 +513,37 @@ function wdi_load_styles() {
|
|
446 |
|
447 |
}
|
448 |
|
449 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
|
451 |
// Instagram WDI Widget.
|
452 |
if (class_exists('WP_Widget')) {
|
@@ -841,3 +938,12 @@ function wdi_add_plugin_meta_links($meta_fields, $file){
|
|
841 |
return $meta_fields;
|
842 |
}
|
843 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Plugin Name: WD Instagram Feed
|
4 |
Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
|
5 |
Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
|
6 |
+
Version: 1.3.0
|
7 |
Author: WebDorado
|
8 |
Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
9 |
License: GPLv2 or later
|
21 |
//define("wdi",'wdi');
|
22 |
define('WDI_FEED_TABLE','wdi_feeds');
|
23 |
define('WDI_THEME_TABLE','wdi_themes');
|
24 |
+
define('WDI_VERSION','1.3.0');
|
25 |
define('WDI_IS_PRO','false');
|
26 |
$wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
|
27 |
define('WDI_MINIFY', $wdi_minify);
|
51 |
//////////////////////////////////////////////////////////////////
|
52 |
|
53 |
|
54 |
+
add_action('wp_ajax_wdi_get_cache_data', 'wdi_get_cache_data');
|
55 |
+
add_action('wp_ajax_nopriv_wdi_get_cache_data', 'wdi_get_cache_data');
|
56 |
+
|
57 |
+
add_action('wp_ajax_wdi_set_cache_data', 'wdi_set_cache_data');
|
58 |
+
add_action('wp_ajax_nopriv_wdi_set_cache_data', 'wdi_set_cache_data');
|
59 |
+
|
60 |
+
add_action('wp_ajax_wdi_set_reset_cache', 'wdi_set_reset_cache');
|
61 |
+
|
62 |
+
function wdi_set_reset_cache(){
|
63 |
+
if(wp_verify_nonce($_POST["wdi_nonce"] , 'wdi_cache')) {
|
64 |
+
global $wpdb;
|
65 |
+
$data = $wpdb->query("DELETE FROM {$wpdb->prefix}options WHERE option_name LIKE '%wdi_cache_data%'");
|
66 |
+
if($data === false){
|
67 |
+
echo json_encode(array("success"=>false));
|
68 |
+
}else{
|
69 |
+
echo json_encode(array("success"=>true));
|
70 |
+
}
|
71 |
+
die;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
function wdi_get_cache_data(){
|
77 |
+
if(wp_verify_nonce($_POST["wdi_nonce"] , 'wdi_cache')){
|
78 |
+
if(isset($_POST["wdi_cache_name"])){
|
79 |
+
$transient_key = "wdi_cache_data_".md5($_POST["wdi_cache_name"]);
|
80 |
+
$cache_data = get_transient($transient_key);
|
81 |
+
if(isset($cache_data) && $cache_data!=false){
|
82 |
+
echo json_encode(
|
83 |
+
array(
|
84 |
+
"success"=>"true",
|
85 |
+
"cache_data"=>stripslashes($cache_data)
|
86 |
+
)
|
87 |
+
);
|
88 |
+
die;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
echo json_encode(array("success"=>"false"));die;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
function wdi_set_cache_data(){
|
95 |
+
global $wdi_options;
|
96 |
+
if(wp_verify_nonce($_POST["wdi_nonce"] , 'wdi_cache')){
|
97 |
+
if(isset($_POST["wdi_cache_name"]) && isset($_POST["wdi_cache_response"])){
|
98 |
+
if(isset($wdi_options["wdi_transient_time"])){
|
99 |
+
$wdi_transient_time = intval($wdi_options["wdi_transient_time"]);
|
100 |
+
}else{
|
101 |
+
$wdi_transient_time = 60;
|
102 |
+
}
|
103 |
+
|
104 |
+
|
105 |
+
$wdi_cache_response = $_POST["wdi_cache_response"];
|
106 |
+
$transient_key = "wdi_cache_data_".md5($_POST["wdi_cache_name"]);
|
107 |
+
$expiration_time = $wdi_transient_time * 60;
|
108 |
+
|
109 |
+
|
110 |
+
if(!seems_utf8($wdi_cache_response)){
|
111 |
+
$wdi_cache_response = utf8_encode($wdi_cache_response);
|
112 |
+
}
|
113 |
+
|
114 |
+
set_transient($transient_key, $wdi_cache_response, $expiration_time);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
|
120 |
|
121 |
add_action('wp_ajax_WDIGalleryBox', 'wdi_ajax_frontend');
|
431 |
}
|
432 |
|
433 |
$uninstall_url = wp_nonce_url( admin_url( 'admin-ajax.php' ), 'wdiUninstallPlugin', 'uninstall_nonce' );
|
434 |
+
wp_localize_script("wdi_admin", 'wdi_ajax',array(
|
435 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
436 |
'uninstall_url' => $uninstall_url,
|
437 |
+
'wdi_nonce' => wp_create_nonce("wdi_cache"),
|
438 |
'is_pro' => WDI_IS_PRO
|
439 |
));
|
440 |
wp_localize_script("wdi_admin", 'wdi_version',array('is_pro'=>WDI_IS_PRO));
|
513 |
|
514 |
}
|
515 |
|
516 |
+
//add_action( 'enqueue_block_editor_assets', 'enqueue_block_editor_assets' );
|
517 |
+
|
518 |
+
function enqueue_block_editor_assets() {
|
519 |
+
$wd_bp_plugin_url = WDI_URL;
|
520 |
+
$key = 'tw/wdi';
|
521 |
+
$plugin_name = "Instagram WD";
|
522 |
+
$data = WDILibrary::get_shortcode_data();
|
523 |
+
$icon_url = $wd_bp_plugin_url . '/images/insta_2.svg';
|
524 |
+
$icon_svg = $wd_bp_plugin_url . '/images/insta.svg';
|
525 |
+
?>
|
526 |
+
<script>
|
527 |
+
if ( !window['tw_gb_wdi'] ) {
|
528 |
+
window['tw_gb_wdi'] = {};
|
529 |
+
}
|
530 |
+
if ( !window['tw_gb_wdi']['<?php echo $key; ?>'] ) {
|
531 |
+
window['tw_gb_wdi']['<?php echo $key; ?>'] = {
|
532 |
+
title: '<?php echo $plugin_name; ?>',
|
533 |
+
iconUrl: '<?php echo $icon_url; ?>',
|
534 |
+
iconSvg: {
|
535 |
+
width: '30',
|
536 |
+
height: '30',
|
537 |
+
src: '<?php echo $icon_svg; ?>'
|
538 |
+
},
|
539 |
+
data: '<?php echo $data; ?>',
|
540 |
+
};
|
541 |
+
}
|
542 |
+
</script>
|
543 |
+
<?php
|
544 |
+
//wp_enqueue_style('wditw-gb-wdi_block', $wd_bp_plugin_url . '/css/wdi_block.css', array( 'wp-edit-blocks' ), WDI_VERSION );
|
545 |
+
//wp_enqueue_script( 'wditw-gb-wdi_block', $wd_bp_plugin_url . '/js/wdi_block.js', array( 'wp-blocks', 'wp-element' ), WDI_VERSION );
|
546 |
+
}
|
547 |
|
548 |
// Instagram WDI Widget.
|
549 |
if (class_exists('WP_Widget')) {
|
938 |
return $meta_fields;
|
939 |
}
|
940 |
|
941 |
+
add_action('admin_notices', 'wdi_filter_var_notice');
|
942 |
+
function wdi_filter_var_notice(){
|
943 |
+
$screen = get_current_screen();
|
944 |
+
if(!function_exists('filter_var') && ($screen->base === 'toplevel_page_wdi_feeds' || $screen->base === 'instagram-feed-wd_page_wdi_themes')) {
|
945 |
+
echo "<div class='notice notice-error '>
|
946 |
+
<p>Some functionality may be broken. Please enable PHP Filters extension or make sure you have PHP version not older than 5.2.</p>
|
947 |
+
</div>";
|
948 |
+
}
|
949 |
+
}
|