Version Description
Improved: Load more functionality. Fixed: Show thumbnails for Video posts. Fixed: Adding shortcode with classic editor.
Download this release
Release Info
Developer | 10web |
Plugin | WD Instagram Feed – Instagram Gallery |
Version | 1.4.17 |
Comparing to | |
See all releases |
Code changes from version 1.4.16 to 1.4.17
- admin-functions.php +1 -1
- admin/views/WDIViewEditorShortcode.php +15 -0
- admin/views/feeds.php +2 -2
- admin/views/settings.php +2 -2
- config.php +1 -1
- css/wdi_frontend.css +8 -5
- css/wdi_frontend.min.css +1 -1
- framework/WDICache.php +6 -1
- framework/WDIInstagram.php +26 -2
- frontend/views/imagebrowser.php +2 -2
- frontend/views/thumbnails.php +2 -2
- js/gallerybox/wdi_gallery_box.js +5 -5
- js/gallerybox/wdi_gallery_box.min.js +1 -1
- js/wdi_admin.js +3 -3
- js/wdi_admin.min.js +1 -1
- js/wdi_frontend.js +47 -27
- js/wdi_frontend.min.js +1 -1
- readme.txt +6 -1
- wd-instagram-feed.php +2 -4
admin-functions.php
CHANGED
@@ -641,7 +641,7 @@ function wdi_get_settings() {
|
|
641 |
'input_type' => 'number',
|
642 |
'section' => 'wdi_customize_section',
|
643 |
'title' => __('Check for new posts every (min)', "wd-instagram-feed"),
|
644 |
-
'default' => '
|
645 |
'value' => '',
|
646 |
),
|
647 |
'wdi_authenticated_users_list' => array(
|
641 |
'input_type' => 'number',
|
642 |
'section' => 'wdi_customize_section',
|
643 |
'title' => __('Check for new posts every (min)', "wd-instagram-feed"),
|
644 |
+
'default' => '2880',
|
645 |
'value' => '',
|
646 |
),
|
647 |
'wdi_authenticated_users_list' => array(
|
admin/views/WDIViewEditorShortcode.php
CHANGED
@@ -92,8 +92,23 @@ class WDIViewEditorShortcode {
|
|
92 |
<script>
|
93 |
<?php echo 'var wdi_feed_rows =' . json_encode($rows);?>;
|
94 |
jQuery(document).ready(function(){
|
|
|
95 |
jQuery('#wdi_editor_insert_btn').on('click',wdi_insert_shortcode);
|
96 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
function wdi_insert_shortcode() {
|
98 |
if (document.getElementById("wdi_id").value) {
|
99 |
window.parent.send_to_editor('[wdi_feed id="' + document.getElementById('wdi_id').value + '"]');
|
92 |
<script>
|
93 |
<?php echo 'var wdi_feed_rows =' . json_encode($rows);?>;
|
94 |
jQuery(document).ready(function(){
|
95 |
+
wdi_selectChange(jQuery('#wdi_feed_select'));
|
96 |
jQuery('#wdi_editor_insert_btn').on('click',wdi_insert_shortcode);
|
97 |
});
|
98 |
+
function wdi_selectChange(){
|
99 |
+
var current = jQuery("#wdi_feed_select").val();
|
100 |
+
for(var i = 0; i < wdi_feed_rows.length; i++){
|
101 |
+
if(wdi_feed_rows[i]['id'] == current){
|
102 |
+
var currentRow = wdi_feed_rows[i];
|
103 |
+
break;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
var thumbHtml = '<img src="'+currentRow['feed_thumb']+'">';
|
107 |
+
var id_elem = jQuery('<input id="wdi_id" name="wdi_id" type="hidden"/>');
|
108 |
+
id_elem.val(currentRow['id']);
|
109 |
+
jQuery('.wdi_feed_thumb').html(thumbHtml);
|
110 |
+
jQuery('.wdi_feed_thumb').append(id_elem);
|
111 |
+
}
|
112 |
function wdi_insert_shortcode() {
|
113 |
if (document.getElementById("wdi_id").value) {
|
114 |
window.parent.send_to_editor('[wdi_feed id="' + document.getElementById('wdi_id').value + '"]');
|
admin/views/feeds.php
CHANGED
@@ -258,7 +258,7 @@ class Feeds_view_wdi {
|
|
258 |
}
|
259 |
require_once(WDI_DIR . '/admin/models/WDIModelThemes_wdi.php');
|
260 |
$themes = WDIModelThemes_wdi::get_themes();
|
261 |
-
|
262 |
$tabs = array(
|
263 |
"feed_settings" => array(
|
264 |
"media" => array(
|
@@ -276,7 +276,7 @@ class Feeds_view_wdi {
|
|
276 |
'type' => 'selectgroup',
|
277 |
'title' => __('Users', 'wd-instagram-feed'),
|
278 |
'valid_options' => $optgroups,
|
279 |
-
'tooltip' =>
|
280 |
'hide_ids' => array(
|
281 |
'feed_users',
|
282 |
'hashtag_top_recent',
|
258 |
}
|
259 |
require_once(WDI_DIR . '/admin/models/WDIModelThemes_wdi.php');
|
260 |
$themes = WDIModelThemes_wdi::get_themes();
|
261 |
+
$settings_link = '<a href="'.add_query_arg(array('page' => 'wdi_settings'), admin_url('admin.php')).'">'.__( 'Settings', 'wd-instagram-feed').'</a>';
|
262 |
$tabs = array(
|
263 |
"feed_settings" => array(
|
264 |
"media" => array(
|
276 |
'type' => 'selectgroup',
|
277 |
'title' => __('Users', 'wd-instagram-feed'),
|
278 |
'valid_options' => $optgroups,
|
279 |
+
'tooltip' => sprintf(__('If you have uploaded new media to your Instagram account, please visit the %s page and click Reset Cache to refresh your Instagram feed. The feed will be automatically refreshed after 48 hours.', 'wd-instagram-feed'), $settings_link),
|
280 |
'hide_ids' => array(
|
281 |
'feed_users',
|
282 |
'hashtag_top_recent',
|
admin/views/settings.php
CHANGED
@@ -108,9 +108,9 @@ class Settings_view_wdi {
|
|
108 |
<label><?php _e('Set Maximum Count of Cache Requests', 'wd-instagram-feed'); ?></label>
|
109 |
<input type="number" name="<?php echo WDI_OPT . '[wdi_cache_request_count]' ?>" value="<?php echo (isset($options['wdi_cache_request_count']) && $options['wdi_cache_request_count'] !== '') ? $options['wdi_cache_request_count'] : 10; ?>">
|
110 |
</p>
|
111 |
-
<p class="wdi-input-group"
|
112 |
<label><?php _e('Check for new posts every (min)', 'wd-instagram-feed'); ?></label>
|
113 |
-
<input type="
|
114 |
</p>
|
115 |
<?php /* @ToDo It must be separate for each user */ ?>
|
116 |
<p class="wdi-input-group">
|
108 |
<label><?php _e('Set Maximum Count of Cache Requests', 'wd-instagram-feed'); ?></label>
|
109 |
<input type="number" name="<?php echo WDI_OPT . '[wdi_cache_request_count]' ?>" value="<?php echo (isset($options['wdi_cache_request_count']) && $options['wdi_cache_request_count'] !== '') ? $options['wdi_cache_request_count'] : 10; ?>">
|
110 |
</p>
|
111 |
+
<p class="wdi-input-group">
|
112 |
<label><?php _e('Check for new posts every (min)', 'wd-instagram-feed'); ?></label>
|
113 |
+
<input type="number" name="<?php echo WDI_OPT . '[wdi_transient_time]' ?>" value="<?php echo $options['wdi_transient_time']; ?>">
|
114 |
</p>
|
115 |
<?php /* @ToDo It must be separate for each user */ ?>
|
116 |
<p class="wdi-input-group">
|
config.php
CHANGED
@@ -3,7 +3,7 @@ if ( !defined('ABSPATH') ) {
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
-
define('WDI_VERSION', '1.4.
|
7 |
define('WDI_IS_FREE', TRUE);
|
8 |
define('WDI_PREFIX', 'wdi');
|
9 |
define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
+
define('WDI_VERSION', '1.4.17');
|
7 |
define('WDI_IS_FREE', TRUE);
|
8 |
define('WDI_PREFIX', 'wdi');
|
9 |
define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
css/wdi_frontend.css
CHANGED
@@ -51,15 +51,18 @@
|
|
51 |
/*=========================================================*/
|
52 |
|
53 |
.wdi_ajax_loading {
|
54 |
-
position: absolute;
|
55 |
width: 50px;
|
56 |
height: 50px;
|
57 |
-
left: 0;
|
58 |
-
right: 0;
|
59 |
-
bottom: -60px;
|
60 |
margin: auto;
|
61 |
-
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
.wdi_feed_main_container {
|
51 |
/*=========================================================*/
|
52 |
|
53 |
.wdi_ajax_loading {
|
|
|
54 |
width: 50px;
|
55 |
height: 50px;
|
|
|
|
|
|
|
56 |
margin: auto;
|
57 |
+
}
|
58 |
|
59 |
+
.wdi_page_loading {
|
60 |
+
position: absolute;
|
61 |
+
top: calc(50% - 25px);
|
62 |
+
left: calc(50% - 25px);
|
63 |
+
width: 50px;
|
64 |
+
height: 50px;
|
65 |
+
margin: auto;
|
66 |
}
|
67 |
|
68 |
.wdi_feed_main_container {
|
css/wdi_frontend.min.css
CHANGED
@@ -1 +1 @@
|
|
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:#fff}.wdi_disabled{visibility:hidden}.wdi_ajax_loading{position:absolute;width:50px;height:50px;left:0;right:0;bottom:-60px;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 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:#fff}.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_photo_overlay:hover .wdi_thumb_icon i{display:block}.wdi_feed_main_container .tenweb{font-family:tenweb!important;font-style:normal;width:auto;speak:none;display:inline-block;line-height:1;font-weight:400;font-variant:normal;text-transform:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wdi_media_info .tenweb-i: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,.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}.footer-list-block .bwp_gallery .wdi_spider_popup_loading,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_loading,.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}.footer-list-block .bwp_gallery .wdi_spider_popup_overlay,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_overlay,.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] .tenweb-i-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{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{width:100%;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_bs .wdi_load_more_spinner,.wdi_layout_ms .wdi_load_more_spinner,.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{transition:all .5s ease}.wdi_layout_th .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay i{color:transparent;transition:all .5s ease}.wdi_layout_th .wdi_photo_img img{transition:all .5s ease}.wdi_layout_th .wdi_load_more_container{display:inline-block}.wdi_layout_th .wdi_media_user{position:absolute;bottom:0;right:0;font-size:16px;border-radius:100px 0 0 0;padding-left:10px;padding-right:5px;line-height:1.5}.wdi_layout_ms .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_ms .wdi_feed_wrapper{position:relative;margin:0 auto}.wdi_layout_ms .wdi_header_wrapper{display:inline-table}.wdi_layout_ms .wdi_header_img_wrap,.wdi_layout_ms .wdi_users_img_wrap{overflow:hidden}.wdi_layout_ms .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_ms .wdi_single_user{display:inline-block;float:left}.wdi_layout_ms .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_ms .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_ms .wdi_followers,.wdi_layout_ms .wdi_posts{display:inline-block}.wdi_layout_ms .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_ms .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_ms .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_ms .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0}.wdi_layout_ms .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_ms .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_ms .wdi_bio{float:left}.wdi_layout_ms .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_ms .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_ms .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_ms .wdi_photo_wrap{overflow:hidden;box-sizing:content-box}.wdi_layout_ms .wdi_img{width:100%;display:block}.wdi_layout_ms .wdi_masonry_column{display:block;overflow:hidden;float:left}.wdi_layout_ms .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_ms .wdi_likes i,.wdi_layout_ms .wdi_thumb_comments i{width:100%}.wdi_layout_ms .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_ms .wdi_photo_title:hover{cursor:pointer}.wdi_layout_ms .wdi_load_more,.wdi_layout_ms .wdi_spinner{padding:10px;transition:all .2s ease}.wdi_layout_ms .wdi_load_more_wrap,.wdi_layout_ms .wdi_spinner_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_ms .wdi_load_more_wrap_inner,.wdi_layout_ms .wdi_spinner_wrap_inner{display:table-row;text-align:center}.wdi_layout_ms .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_ms .wdi_load_more_text img{float:left}.wdi_layout_ms .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_ms .wdi_photo_overlay{transition:all .5s ease}.wdi_layout_ms .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_ms .wdi_photo_overlay i{color:transparent;transition:all .5s ease}.wdi_layout_ms .wdi_photo_img img{transition:all .5s ease}.wdi_layout_ms .wdi_load_more_container{display:inline-block}.wdi_layout_ms .wdi_media_user{position:absolute;bottom:0;right:0;font-size:16px;border-radius:100px 0 0 0;padding-left:10px;padding-right:5px}.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_layout_bs .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_bs .wdi_feed_wrapper{margin:0 auto}.wdi_layout_bs .wdi_header_wrapper{display:inline-table}.wdi_layout_bs .wdi_header_img_wrap,.wdi_layout_bs .wdi_users_img_wrap{overflow:hidden}.wdi_layout_bs .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_bs .wdi_single_user{display:inline-block;float:left}.wdi_layout_bs .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_bs .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_bs .wdi_followers,.wdi_layout_bs .wdi_posts{display:inline-block}.wdi_layout_bs .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_bs .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_bs .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_bs .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0}.wdi_feed_info .wdi_header_user_text h3{padding-top:0}.wdi_layout_bs .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_bs .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_bs .wdi_bio{float:left}.wdi_layout_bs .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_bs .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_bs .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_bs .wdi_photo_wrap{overflow:hidden;box-sizing:content-box}.wdi_layout_bs .wdi_img{width:100%;display:block}.wdi_layout_bs .wdi_feed_item{display:inline-block;overflow:hidden}.wdi_layout_bs .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_bs .wdi_thumb_comments i,.wdi_layout_bs .wdi_thumb_likes i{width:100%}.wdi_layout_bs .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:normal;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_bs .wdi_load_more,.wdi_layout_bs .wdi_spinner{padding:10px;transition:all .2s ease}.wdi_layout_bs .wdi_load_more_wrap,.wdi_layout_bs .wdi_spinner_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_bs .wdi_load_more_wrap_inner,.wdi_layout_bs .wdi_spinner_wrap_inner{display:table-row;text-align:center}.wdi_layout_bs .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_bs .wdi_load_more_text img{float:left}.wdi_layout_bs .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_bs .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_bs .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,.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,.17);border-radius:21px}.wdi_image_container .carousel_media:not(.active){display:none}.wdi_website{width:100%;display:block;float:left}.wdi_website a{box-shadow:none!important;color:#003569;text-decoration:none}.elementor-editor-active .wdi_front_overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.2)}#wdi_added_comments{padding-top:20px}.wdi_comment_container #ajax_loading{left:calc(50% - 25px);top:calc(50% - 25px)}
|
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:#fff}.wdi_disabled{visibility:hidden}.wdi_ajax_loading{width:50px;height:50px;margin:auto}.wdi_page_loading{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px);width:50px;height:50px;margin:auto}.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 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:#fff}.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_photo_overlay:hover .wdi_thumb_icon i{display:block}.wdi_feed_main_container .tenweb{font-family:tenweb!important;font-style:normal;width:auto;speak:none;display:inline-block;line-height:1;font-weight:400;font-variant:normal;text-transform:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wdi_media_info .tenweb-i: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,.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}.footer-list-block .bwp_gallery .wdi_spider_popup_loading,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_loading,.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}.footer-list-block .bwp_gallery .wdi_spider_popup_overlay,.footer-list-block .bwp_gallery_tags .wdi_spider_popup_overlay,.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] .tenweb-i-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{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{width:100%;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_bs .wdi_load_more_spinner,.wdi_layout_ms .wdi_load_more_spinner,.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{transition:all .5s ease}.wdi_layout_th .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_th .wdi_photo_overlay i{color:transparent;transition:all .5s ease}.wdi_layout_th .wdi_photo_img img{transition:all .5s ease}.wdi_layout_th .wdi_load_more_container{display:inline-block}.wdi_layout_th .wdi_media_user{position:absolute;bottom:0;right:0;font-size:16px;border-radius:100px 0 0 0;padding-left:10px;padding-right:5px;line-height:1.5}.wdi_layout_ms .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_ms .wdi_feed_wrapper{position:relative;margin:0 auto}.wdi_layout_ms .wdi_header_wrapper{display:inline-table}.wdi_layout_ms .wdi_header_img_wrap,.wdi_layout_ms .wdi_users_img_wrap{overflow:hidden}.wdi_layout_ms .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_ms .wdi_single_user{display:inline-block;float:left}.wdi_layout_ms .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_ms .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_ms .wdi_followers,.wdi_layout_ms .wdi_posts{display:inline-block}.wdi_layout_ms .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_ms .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_ms .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_ms .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0}.wdi_layout_ms .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_ms .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_ms .wdi_bio{float:left}.wdi_layout_ms .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_ms .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_ms .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_ms .wdi_photo_wrap{overflow:hidden;box-sizing:content-box}.wdi_layout_ms .wdi_img{width:100%;display:block}.wdi_layout_ms .wdi_masonry_column{display:block;overflow:hidden;float:left}.wdi_layout_ms .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_ms .wdi_likes i,.wdi_layout_ms .wdi_thumb_comments i{width:100%}.wdi_layout_ms .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_ms .wdi_photo_title:hover{cursor:pointer}.wdi_layout_ms .wdi_load_more,.wdi_layout_ms .wdi_spinner{padding:10px;transition:all .2s ease}.wdi_layout_ms .wdi_load_more_wrap,.wdi_layout_ms .wdi_spinner_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_ms .wdi_load_more_wrap_inner,.wdi_layout_ms .wdi_spinner_wrap_inner{display:table-row;text-align:center}.wdi_layout_ms .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_ms .wdi_load_more_text img{float:left}.wdi_layout_ms .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_ms .wdi_photo_overlay{transition:all .5s ease}.wdi_layout_ms .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_ms .wdi_photo_overlay i{color:transparent;transition:all .5s ease}.wdi_layout_ms .wdi_photo_img img{transition:all .5s ease}.wdi_layout_ms .wdi_load_more_container{display:inline-block}.wdi_layout_ms .wdi_media_user{position:absolute;bottom:0;right:0;font-size:16px;border-radius:100px 0 0 0;padding-left:10px;padding-right:5px}.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_layout_bs .wdi_feed_container{min-width:160px;margin:0 auto}.wdi_layout_bs .wdi_feed_wrapper{margin:0 auto}.wdi_layout_bs .wdi_header_wrapper{display:inline-table}.wdi_layout_bs .wdi_header_img_wrap,.wdi_layout_bs .wdi_users_img_wrap{overflow:hidden}.wdi_layout_bs .wdi_header_text{display:table-cell;vertical-align:middle}.wdi_layout_bs .wdi_single_user{display:inline-block;float:left}.wdi_layout_bs .wdi_user_img_wrap{display:inline-block;float:left;position:relative}.wdi_layout_bs .wdi_header_user_text{display:inline-block;float:left;width:100%}.wdi_layout_bs .wdi_followers,.wdi_layout_bs .wdi_posts{display:inline-block}.wdi_layout_bs .wdi_header_user_text h3{display:inline-block;text-transform:none}.wdi_layout_bs .wdi_header_user_text h3:hover{cursor:pointer}.wdi_layout_bs .wdi_user_img_wrap img{overflow:hidden;display:block;margin:0}.wdi_layout_bs .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3{margin-left:10px;margin-bottom:0}.wdi_feed_info .wdi_header_user_text h3{padding-top:0}.wdi_layout_bs .wdi_feed_container .wdi_feed_info .wdi_media_info p{margin-top:0;margin-bottom:0}.wdi_layout_bs .wdi_user_controls{margin-left:0;display:inline-block;vertical-align:middle}.wdi_layout_bs .wdi_bio{float:left}.wdi_layout_bs .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers{margin-left:10px}.wdi_layout_bs .wdi_filter_overlay{position:absolute;z-index:2;top:0;left:0;opacity:0;transition:opacity .1s ease}.wdi_layout_bs .wdi_filter_overlay:hover{opacity:.9;cursor:pointer}.wdi_layout_bs .wdi_photo_wrap{overflow:hidden;box-sizing:content-box}.wdi_layout_bs .wdi_img{width:100%;display:block}.wdi_layout_bs .wdi_feed_item{display:inline-block;overflow:hidden}.wdi_layout_bs .wdi_photo_meta{text-align:center;padding-bottom:10px}.wdi_layout_bs .wdi_thumb_comments i,.wdi_layout_bs .wdi_thumb_likes i{width:100%}.wdi_layout_bs .wdi_photo_title{text-overflow:ellipsis;overflow:hidden;white-space:normal;width:90%;margin-left:5%;margin-right:5%;text-align:center}.wdi_layout_bs .wdi_load_more,.wdi_layout_bs .wdi_spinner{padding:10px;transition:all .2s ease}.wdi_layout_bs .wdi_load_more_wrap,.wdi_layout_bs .wdi_spinner_wrap{display:inline-table;box-sizing:border-box}.wdi_layout_bs .wdi_load_more_wrap_inner,.wdi_layout_bs .wdi_spinner_wrap_inner{display:table-row;text-align:center}.wdi_layout_bs .wdi_load_more_text{display:table-cell;vertical-align:middle}.wdi_layout_bs .wdi_load_more_text img{float:left}.wdi_layout_bs .wdi_load_more_wrap:hover{cursor:pointer}.wdi_layout_bs .wdi_photo_overlay:hover{cursor:pointer}.wdi_layout_bs .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,.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,.17);border-radius:21px}.wdi_image_container .carousel_media:not(.active){display:none}.wdi_website{width:100%;display:block;float:left}.wdi_website a{box-shadow:none!important;color:#003569;text-decoration:none}.elementor-editor-active .wdi_front_overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.2)}#wdi_added_comments{padding-top:20px}.wdi_comment_container #ajax_loading{left:calc(50% - 25px);top:calc(50% - 25px)}
|
framework/WDICache.php
CHANGED
@@ -72,7 +72,12 @@ class WDICache {
|
|
72 |
* @return array|bool
|
73 |
*/
|
74 |
public function set_cache_data($name, $response){
|
75 |
-
$wdi_transient_time
|
|
|
|
|
|
|
|
|
|
|
76 |
$cache_date = (date('Y-m-d H:i:s'));
|
77 |
$wdi_cache_response = $response;
|
78 |
$transient_key = "wdi_cache_" . md5($name);
|
72 |
* @return array|bool
|
73 |
*/
|
74 |
public function set_cache_data($name, $response){
|
75 |
+
if ( isset($this->wdi_options["wdi_transient_time"]) ) {
|
76 |
+
$wdi_transient_time = intval($this->wdi_options["wdi_transient_time"]);
|
77 |
+
}
|
78 |
+
else {
|
79 |
+
$wdi_transient_time = WDI_TRANSIENT_DEFAULT_TIME;
|
80 |
+
}
|
81 |
$cache_date = (date('Y-m-d H:i:s'));
|
82 |
$wdi_cache_response = $response;
|
83 |
$transient_key = "wdi_cache_" . md5($name);
|
framework/WDIInstagram.php
CHANGED
@@ -257,7 +257,27 @@ class WDIInstagram {
|
|
257 |
"attribution" => NULL,
|
258 |
"users_in_photo" => array(),
|
259 |
);
|
260 |
-
if ( $media["media_type"] === "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
$converted["videos"] = array(
|
262 |
"standard_resolution" => array(
|
263 |
"width" => 640,
|
@@ -275,6 +295,7 @@ class WDIInstagram {
|
|
275 |
"url" => (isset($media["media_url"]) ? $media["media_url"] : ""),
|
276 |
),
|
277 |
);
|
|
|
278 |
}
|
279 |
|
280 |
/**
|
@@ -288,6 +309,7 @@ class WDIInstagram {
|
|
288 |
if ( $media["media_type"] === "CAROUSEL_ALBUM" ) {
|
289 |
$carousel_media = $this->getMediaChildren($media["id"]);
|
290 |
$converted["carousel_media"] = $carousel_media;
|
|
|
291 |
array_push($carousel_media_ids, array( 'index' => $key, "media_id" => $media["id"] ));
|
292 |
}
|
293 |
array_push($converted_data["data"], $converted);
|
@@ -335,7 +357,7 @@ class WDIInstagram {
|
|
335 |
$medias = json_decode($response["body"], TRUE);
|
336 |
if ( is_array($medias) && isset($medias["data"]) ) {
|
337 |
foreach ( $medias["data"] as $media_data ) {
|
338 |
-
if ( isset($media_data["media_type"]) && $media_data["media_type"]
|
339 |
$child_media = array(
|
340 |
"images" => array(
|
341 |
"thumbnail" => array(
|
@@ -356,6 +378,7 @@ class WDIInstagram {
|
|
356 |
),
|
357 |
"users_in_photo" => array(),
|
358 |
"type" => "image",
|
|
|
359 |
);
|
360 |
}
|
361 |
else {
|
@@ -382,6 +405,7 @@ class WDIInstagram {
|
|
382 |
),
|
383 |
"users_in_photo" => array(),
|
384 |
"type" => "video",
|
|
|
385 |
);
|
386 |
}
|
387 |
array_push($carousel_media, $child_media);
|
257 |
"attribution" => NULL,
|
258 |
"users_in_photo" => array(),
|
259 |
);
|
260 |
+
if ( $media["media_type"] === "IMAGE" ) {
|
261 |
+
$converted["images"] = array(
|
262 |
+
"thumbnail" => array(
|
263 |
+
"width" => 150,
|
264 |
+
"height" => 150,
|
265 |
+
"url" => (isset($media["media_url"]) ? $media["media_url"] : ""),
|
266 |
+
),
|
267 |
+
"low_resolution" => array(
|
268 |
+
"width" => 320,
|
269 |
+
"height" => 320,
|
270 |
+
"url" => (isset($media["media_url"]) ? $media["media_url"] : ""),
|
271 |
+
),
|
272 |
+
"standard_resolution" => array(
|
273 |
+
"width" => 1080,
|
274 |
+
"height" => 1080,
|
275 |
+
"url" => (isset($media["media_url"]) ? $media["media_url"] : ""),
|
276 |
+
),
|
277 |
+
);
|
278 |
+
$converted['thumbnail'] = isset($media["media_url"]) ? $media["media_url"] : '';
|
279 |
+
}
|
280 |
+
else if ( $media["media_type"] === "VIDEO" ) {
|
281 |
$converted["videos"] = array(
|
282 |
"standard_resolution" => array(
|
283 |
"width" => 640,
|
295 |
"url" => (isset($media["media_url"]) ? $media["media_url"] : ""),
|
296 |
),
|
297 |
);
|
298 |
+
$converted['thumbnail'] = isset($media["thumbnail_url"]) ? $media["thumbnail_url"] : '';
|
299 |
}
|
300 |
|
301 |
/**
|
309 |
if ( $media["media_type"] === "CAROUSEL_ALBUM" ) {
|
310 |
$carousel_media = $this->getMediaChildren($media["id"]);
|
311 |
$converted["carousel_media"] = $carousel_media;
|
312 |
+
$converted["thumbnail"] = $carousel_media[0]["thumbnail"];
|
313 |
array_push($carousel_media_ids, array( 'index' => $key, "media_id" => $media["id"] ));
|
314 |
}
|
315 |
array_push($converted_data["data"], $converted);
|
357 |
$medias = json_decode($response["body"], TRUE);
|
358 |
if ( is_array($medias) && isset($medias["data"]) ) {
|
359 |
foreach ( $medias["data"] as $media_data ) {
|
360 |
+
if ( isset($media_data["media_type"]) && $media_data["media_type"] === "IMAGE" ) {
|
361 |
$child_media = array(
|
362 |
"images" => array(
|
363 |
"thumbnail" => array(
|
378 |
),
|
379 |
"users_in_photo" => array(),
|
380 |
"type" => "image",
|
381 |
+
"thumbnail" => $media_data["media_url"],
|
382 |
);
|
383 |
}
|
384 |
else {
|
405 |
),
|
406 |
"users_in_photo" => array(),
|
407 |
"type" => "video",
|
408 |
+
"thumbnail" => $media_data["thumbnail_url"],
|
409 |
);
|
410 |
}
|
411 |
array_push($carousel_media, $child_media);
|
frontend/views/imagebrowser.php
CHANGED
@@ -37,7 +37,7 @@ class WDI_ImageBrowser_view {
|
|
37 |
<?php
|
38 |
if ($feed_row['feed_display_view'] === 'pagination' && $style['pagination_position_vert'] === 'top') {
|
39 |
?>
|
40 |
-
<div id="wdi_pagination" class="wdi_pagination">
|
41 |
<div class="wdi_pagination_container"><i id="wdi_first_page"
|
42 |
title="<?php echo __('First Page', "wd-instagram-feed") ?>"
|
43 |
class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i
|
@@ -69,7 +69,7 @@ class WDI_ImageBrowser_view {
|
|
69 |
case 'pagination': {
|
70 |
if ($style['pagination_position_vert'] === 'bottom') {
|
71 |
?>
|
72 |
-
<div id="wdi_pagination" class="wdi_pagination">
|
73 |
<div class="wdi_pagination_container"><i id="wdi_first_page"
|
74 |
title="<?php echo __('First Page', "wd-instagram-feed") ?>"
|
75 |
class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i
|
37 |
<?php
|
38 |
if ($feed_row['feed_display_view'] === 'pagination' && $style['pagination_position_vert'] === 'top') {
|
39 |
?>
|
40 |
+
<div id="wdi_pagination" class="wdi_pagination wdi_hidden">
|
41 |
<div class="wdi_pagination_container"><i id="wdi_first_page"
|
42 |
title="<?php echo __('First Page', "wd-instagram-feed") ?>"
|
43 |
class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i
|
69 |
case 'pagination': {
|
70 |
if ($style['pagination_position_vert'] === 'bottom') {
|
71 |
?>
|
72 |
+
<div id="wdi_pagination" class="wdi_pagination wdi_hidden">
|
73 |
<div class="wdi_pagination_container"><i id="wdi_first_page"
|
74 |
title="<?php echo __('First Page', "wd-instagram-feed") ?>"
|
75 |
class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i
|
frontend/views/thumbnails.php
CHANGED
@@ -36,7 +36,7 @@ class WDI_Thumbnails_view {
|
|
36 |
<?php
|
37 |
if ($feed_row['feed_display_view'] === 'pagination' && $style['pagination_position_vert'] === 'top') {
|
38 |
?>
|
39 |
-
<div id="wdi_pagination" class="wdi_pagination">
|
40 |
<div class="wdi_pagination_container"><i id="wdi_first_page"
|
41 |
title="<?php echo __('First Page', "wd-instagram-feed") ?>"
|
42 |
class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i
|
@@ -78,7 +78,7 @@ class WDI_Thumbnails_view {
|
|
78 |
case 'pagination': {
|
79 |
if ($style['pagination_position_vert'] === 'bottom') {
|
80 |
?>
|
81 |
-
<div id="wdi_pagination" class="wdi_pagination">
|
82 |
<div class="wdi_pagination_container"><i id="wdi_first_page"
|
83 |
title="<?php echo __('First Page', "wd-instagram-feed") ?>"
|
84 |
class="tenweb-i tenweb-i-step-backward wdi_disabled wdi_pagination_ctrl"></i><i
|
36 |
<?php
|
37 |
if ($feed_row['feed_display_view'] === 'pagination' && $style['pagination_position_vert'] === 'top') {
|
38 |
?>
|
39 |
+
<div id="wdi_pagination" class="wdi_pagination wdi_hidden">
|
40 |
<div class="wdi_pagination_container"><i id="wdi_first_page"
|
41 |
title="<?php echo __('First Page', "wd-instagram-feed") ?>"
|
42 |
class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i
|
78 |
case 'pagination': {
|
79 |
if ($style['pagination_position_vert'] === 'bottom') {
|
80 |
?>
|
81 |
+
<div id="wdi_pagination" class="wdi_pagination wdi_hidden">
|
82 |
<div class="wdi_pagination_container"><i id="wdi_first_page"
|
83 |
title="<?php echo __('First Page', "wd-instagram-feed") ?>"
|
84 |
class="tenweb-i tenweb-i-step-backward wdi_disabled wdi_pagination_ctrl"></i><i
|
js/gallerybox/wdi_gallery_box.js
CHANGED
@@ -145,8 +145,8 @@ var wdi_construct_popup = function (popup, currentFeed, image_rows, current_imag
|
|
145 |
var img_html = '<img style="' + img_style + '" class="wdi_filmstrip_thumbnail_img" src="' + src + '" onclick="' + onclick + '" ontouchend="' + ontouchend + '" image_id="' + image_row.id + '" image_key="' + i + '" alt="' + image_row.alt + '" />';
|
146 |
break;
|
147 |
case 'EMBED_OEMBED_INSTAGRAM_VIDEO':
|
148 |
-
var src = (typeof image_row.
|
149 |
-
var img_html = '<
|
150 |
break;
|
151 |
case 'EMBED_OEMBED_INSTAGRAM_CAROUSEL':
|
152 |
if( image_row.carousel_media.length === 0 ){
|
@@ -158,8 +158,8 @@ var wdi_construct_popup = function (popup, currentFeed, image_rows, current_imag
|
|
158 |
var img_html = '<img style="' + img_style + '" class="wdi_filmstrip_thumbnail_img" src="' + src + '" onclick="' + onclick + '" ontouchend="' + ontouchend + '" image_id="' + image_row.id + '" image_key="' + i + '" alt="' + image_row.alt + '" />';
|
159 |
break;
|
160 |
case 'video':
|
161 |
-
src = image_row.
|
162 |
-
var img_html = '<
|
163 |
break;
|
164 |
default:
|
165 |
src = wdi_url.plugin_url + "images/missing.png";
|
@@ -198,7 +198,7 @@ var wdi_construct_popup = function (popup, currentFeed, image_rows, current_imag
|
|
198 |
wdi_data[i]["profile_picture"] = image_rows[i].profile_picture;
|
199 |
wdi_data[i]["image_url"] = image_rows[i].image_url;
|
200 |
wdi_data[i]["thumb_url"] = image_rows[i].thumb_url;
|
201 |
-
wdi_data[i]["src"] = image_rows[i].images.standard_resolution
|
202 |
wdi_data[i]["date"] = image_rows[i].date;
|
203 |
wdi_data[i]["comment_count"] = image_rows[i].comment_count;
|
204 |
wdi_data[i]["filetype"] = image_rows[i].filetype;
|
145 |
var img_html = '<img style="' + img_style + '" class="wdi_filmstrip_thumbnail_img" src="' + src + '" onclick="' + onclick + '" ontouchend="' + ontouchend + '" image_id="' + image_row.id + '" image_key="' + i + '" alt="' + image_row.alt + '" />';
|
146 |
break;
|
147 |
case 'EMBED_OEMBED_INSTAGRAM_VIDEO':
|
148 |
+
var src = (typeof image_row.thumb_url !== 'undefined') ? image_row.thumb_url : 'thumburl';
|
149 |
+
var img_html = '<img style="' + img_style + '" class="wdi_filmstrip_thumbnail_img" src="' + src + '" onclick="' + onclick + '" ontouchend="' + ontouchend + '" image_id="' + image_row.id + '" image_key="' + i + '" alt="' + image_row.alt + '" />';
|
150 |
break;
|
151 |
case 'EMBED_OEMBED_INSTAGRAM_CAROUSEL':
|
152 |
if( image_row.carousel_media.length === 0 ){
|
158 |
var img_html = '<img style="' + img_style + '" class="wdi_filmstrip_thumbnail_img" src="' + src + '" onclick="' + onclick + '" ontouchend="' + ontouchend + '" image_id="' + image_row.id + '" image_key="' + i + '" alt="' + image_row.alt + '" />';
|
159 |
break;
|
160 |
case 'video':
|
161 |
+
var src = (typeof image_row.thumb_url !== 'undefined') ? image_row.thumb_url : 'thumburl';
|
162 |
+
var img_html = '<img style="' + img_style + '" class="wdi_filmstrip_thumbnail_img" src="' + src + '" onclick="' + onclick + '" ontouchend="' + ontouchend + '" image_id="' + image_row.id + '" image_key="' + i + '" alt="' + image_row.alt + '" />';
|
163 |
break;
|
164 |
default:
|
165 |
src = wdi_url.plugin_url + "images/missing.png";
|
198 |
wdi_data[i]["profile_picture"] = image_rows[i].profile_picture;
|
199 |
wdi_data[i]["image_url"] = image_rows[i].image_url;
|
200 |
wdi_data[i]["thumb_url"] = image_rows[i].thumb_url;
|
201 |
+
wdi_data[i]["src"] = typeof image_rows[i].images !== 'undefined' ? image_rows[i].images["standard_resolution"]["url"] : "";
|
202 |
wdi_data[i]["date"] = image_rows[i].date;
|
203 |
wdi_data[i]["comment_count"] = image_rows[i].comment_count;
|
204 |
wdi_data[i]["filetype"] = image_rows[i].filetype;
|
js/gallerybox/wdi_gallery_box.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var isPopUpOpened=!1,wdi_data=[];function wdi_spider_createpopup(e,t,i,a,r,n,d,o,s){if(e=e.replace(/&/g,"&"),!isPopUpOpened&&(isPopUpOpened=!0,!wdi_spider_hasalreadyreceivedpopup(n)&&!wdi_spider_isunsupporteduseragent())){jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#wdi_spider_popup_loading_"+t).css({display:"block"}),jQuery("#wdi_spider_popup_overlay_"+t).css({display:"block"});for(var _,m=0,c=0;c<o.parsedData.length;c++)if(o.parsedData[c].id===s){m=c,_=[o.parsedData[c]];break}jQuery.ajax({type:"POST",url:e,dataType:"text",data:{action:"WDIGalleryBox",image_rows:JSON.stringify(_),feed_id:o.feed_row.id,feed_counter:o.feed_row.wdi_feed_counter,current_image_index:m,image_rows_count:o.parsedData.length,carousel_media_row:JSON.stringify(_[0].carousel_media)},success:function(e){e=jQuery('<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap wdi_lightbox_theme_'+o.feed_row.theme_id+'" style="width:'+i+"px;height:"+a+"px;margin-top:-"+a/2+"px;margin-left: -"+i/2+'px; ">'+e+"</div>");new wdi_construct_popup(e,o,o.parsedData,s).construct(),e.hide().appendTo("body"),wdi_spider_showpopup(n,d,e,r),jQuery("#wdi_spider_popup_loading_"+t).css({display:"none !important;"})}})}}var wdi_construct_popup=function(y,f,v,b){this.theme_row={},this.construct=function(){this.theme_row=window["wdi_theme_"+f.feed_row.theme_id],f.feed_row.popup_enable_filmstrip&&"1"===f.feed_row.popup_enable_filmstrip&&this.add_filmstrip(),this.set_wdi_data()},this.add_filmstrip=function(){var e="horizontal";"right"!==this.theme_row.lightbox_filmstrip_pos&&"left"!==this.theme_row.lightbox_filmstrip_pos||(e="vertical");for(var t="horizontal"===e?"tenweb-i-angle-left":"tenweb-i-angle-up",i="horizontal"===e?"tenweb-i-angle-right":"tenweb-i-angle-down",a="",r=n="horizontal"===e?void 0!==f.feed_row.popup_filmstrip_height?f.feed_row.popup_filmstrip_height:"20":void 0!==f.feed_row.popup_filmstrip_height?f.feed_row.popup_filmstrip_height:"50",n=r=parseInt(r),d=0;d<v.length;d++){var o,s,_,m=v[d];_=m.resolution&&""!==m.resolution?(m.resolution.split(" "),u=intval($resolution_arr[0]),l=intval($resolution_arr[2]),0!==u&&0!==l?(o=u*(s=Math.max(r/u,n/l)),l*s):(o=r,n)):(o=r,n);var c=(r-(o*=s=Math.max(r/o,n/_)))/2,u=(n-(_*=s))/2,l="wdi_filmstrip_thumbnail "+(parseInt(m.id)===parseInt(b)?"wdi_thumb_active":"wdi_thumb_deactive"),w="width:"+o+"px;height:"+_+"px;margin-left:"+c+"px;margin-top:"+u+"px;",p="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+d+"', wdi_data)",h="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+d+"', wdi_data)";switch(m.filetype){case"EMBED_OEMBED_INSTAGRAM_IMAGE":var g='<img style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+(void 0!==m.images[f.feedImageResolution]&&void 0!==m.images[f.feedImageResolution].url?m.images[f.feedImageResolution].url:m.thumb_url)+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />';break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":g='<video style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+(void 0!==m.filename?m.filename:m.thumb_url)+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" /></video>';break;case"EMBED_OEMBED_INSTAGRAM_CAROUSEL":if(0===m.carousel_media.length)continue;switch(m.carousel_media[0].type){case"image":g='<img style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+m.carousel_media[0].images.thumbnail.url+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />';break;case"video":g='<video style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+m.carousel_media[0].videos.low_resolution.url+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" /></video>';break;default:g='<img style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+(wdi_url.plugin_url+"images/missing.png")+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />'}}a+='<div id="wdi_filmstrip_thumbnail_'+d+'" class="'+l+'">'+g+"</div>"}i='<div class="wdi_filmstrip_left"><i class="tenweb-i '+t+'"></i></div><div class="wdi_filmstrip"><div class="wdi_filmstrip_thumbnails">'+a+'</div></div><div class="wdi_filmstrip_right"><i class="tenweb-i '+i+'"></i></div>';y.find(".wdi_filmstrip_container").append(i)},this.set_wdi_data=function(){wdi_data=[];for(var e=0;e<v.length;e++)wdi_data[e]=[],wdi_data[e].number=e+1,wdi_data[e].id=v[e].id,wdi_data[e].alt=v[e].alt,wdi_data[e].description=wdi_front.escape_tags(v[e].description),wdi_data[e].username=v[e].username,wdi_data[e].profile_picture=v[e].profile_picture,wdi_data[e].image_url=v[e].image_url,wdi_data[e].thumb_url=v[e].thumb_url,wdi_data[e].src=v[e].images.standard_resolution.url,wdi_data[e].date=v[e].date,wdi_data[e].comment_count=v[e].comment_count,wdi_data[e].filetype=v[e].filetype,wdi_data[e].filename=v[e].filename,wdi_data[e].avg_rating=v[e].avg_rating,wdi_data[e].rate=v[e].rate,wdi_data[e].rate_count=v[e].rate_count,wdi_data[e].hit_count=v[e].hit_count,wdi_data[e].comments_data=void 0!==v[e].comments_data?v[e].comments_data:"null",wdi_data[e].carousel_media=void 0!==v[e].carousel_media?v[e].carousel_media:null}};function wdi_spider_showpopup(e,t,i,a){isPopUpOpened=!0,i.show(),wdi_spider_receivedpopup(e,t)}function wdi_spider_hasalreadyreceivedpopup(e){return-1<document.cookie.indexOf(e)&&delete document.cookie[document.cookie.indexOf(e)],!1}function wdi_spider_receivedpopup(e,t){var i=new Date;i.setDate(i.getDate()+t),document.cookie=e+"=true;expires="+i.toUTCString()+";path=/",jQuery(".wdi_image_info").mCustomScrollbar({autoHideScrollbar:!1,scrollInertia:150,advanced:{updateOnContentResize:!0}})}function wdi_spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function wdi_spider_destroypopup(e){null!=document.getElementById("wdi_spider_popup_wrap")&&(wdi_comments_manager.popup_destroyed(),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),setTimeout(function(){jQuery(".wdi_spider_popup_wrap").remove(),jQuery(".wdi_spider_popup_loading").css({display:"none"}),jQuery(".wdi_spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),jQuery("html").attr("style","")},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");i=jQuery(document).scrollTop();window.location.hash="",jQuery(document).scrollTop(i),"undefined"!=typeof wdi_playInterval&&clearInterval(wdi_playInterval)}function wdi_spider_ajax_save(e,t){return wdi_comments_manager.init(t),!1}function wdi_spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function wdi_spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function wdi_spider_check_required(e,t){return""==jQuery("#"+e).val()&&(wdi_front.show_alert(t+"* "+wdi_objectL10n.wdi_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function wdi_spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(wdi_front.show_alert(wdi_objectL10n.wdi_mail_validation),!0)}function wdi_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function wdi_play_pause(e){var t=-1<navigator.userAgent.indexOf("Chrome"),i=-1<navigator.userAgent.indexOf("Safari");t&&i&&(i=!1),i||(i=e.get(0),e=!1,navigator.userAgent.match(/firefox/i)&&(e=!0),e||(i.paused?i.play():i.pause()))}function wdi_spider_display_embed(e,t,i,a,r){var n="";switch(e){case"EMBED_OEMBED_INSTAGRAM_VIDEO":var d="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');d+=" >",""!=t&&(d+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+i+'" type="video/mp4"> Your browser does not support the video tag. </video>'),n+=d+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":d="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');d+=" >",""!=t&&(d+='<img src="'+i+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),n+=d+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_CAROUSEL":d="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');d+=" >";for(var o=0;o<r.length;o++)"image"==r[o].type?d+='<img src="'+r[o].images.standard_resolution.url+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;" data-id="'+o+'" class="carousel_media '+(0==o?"active":"")+'">':"video"==r[o].type&&(void 0!==r[o].videos&&void 0!==r[o].videos.standard_resolution&&void 0!==r[o].videos.standard_resolution.url&&(i=r[o].videos.standard_resolution.url),d+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="'+o+'" class="carousel_media '+(0==o?"active":"")+'"><source src="'+i+'" type="video/mp4"> Your browser does not support the video tag. </video>');n+=d+="</div>"}return n}function wdi_testBrowser_cssTransitions(){return wdi_testDom("Transition")}function wdi_testBrowser_cssTransforms3d(){return wdi_testDom("Perspective")}function wdi_testDom(e){for(var t=["","Webkit","Moz","ms","O","Khtml"],i=t.length;i--;)if(void 0!==document.body.style[t[i]+e])return!0;return!1}function wdi_cube(e,t,i,a,r,n,d,o,s,_){return wdi_testBrowser_cssTransitions()?wdi_testBrowser_cssTransforms3d()?(wdi_trans_in_progress=!0,jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active"),jQuery(".wdi_slide_bg").css("perspective",1e3),jQuery(o).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(s).css({opacity:1,filter:"Alpha(opacity=100)",backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".wdi_slider").css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".wdi_slider").css({transition:"all "+wdi_transition_duration+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+n+"deg) rotateY("+d+"deg)"})},20),void jQuery(".wdi_slider").one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(function(){jQuery(o).removeAttr("style"),jQuery(s).removeAttr("style"),jQuery(".wdi_slider").removeAttr("style"),jQuery(o).css({opacity:0,filter:"Alpha(opacity=0)","z-index":1}),jQuery(s).css({opacity:1,filter:"Alpha(opacity=100)","z-index":2}),wdi_trans_in_progress=!1,jQuery(o).html(""),"undefined"==typeof event_stack||0<event_stack.length&&(key=event_stack[0].split("-"),event_stack.shift(),wdi_change_image(key[0],key[1],wdi_data,!0));wdi_change_watermark_container()}))):wdi_fallback3d(o,s,_):wdi_fallback(o,s,_)}function wdi_cubeH(e,t,i){var a=jQuery(e).width()/2;"right"==i?wdi_cube(a,a,0,0,90,0,-90,e,t,i):"left"==i&&wdi_cube(a,-a,0,0,-90,0,90,e,t,i)}function wdi_cubeV(e,t,i){var a=jQuery(e).height()/2;"right"==i?wdi_cube(a,0,-a,90,0,-90,0,e,t,i):"left"==i&&wdi_cube(a,0,a,-90,0,90,0,e,t,i)}function wdi_fallback(e,t,i){wdi_fade(e,t,i)}function wdi_fallback3d(e,t,i){wdi_sliceV(e,t,i)}function wdi_none(e,t,i){jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active"),wdi_trans_in_progress=!1,jQuery(e).html(""),wdi_change_watermark_container()}function wdi_fade(e,t,i){jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active"),wdi_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+wdi_transition_duration+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),wdi_change_watermark_container()):(jQuery(e).animate({opacity:0,"z-index":1},wdi_transition_duration),jQuery(t).animate({opacity:1,"z-index":2},{duration:wdi_transition_duration,complete:function(){wdi_trans_in_progress=!1,jQuery(e).html(""),wdi_change_watermark_container()}}),jQuery(e).fadeTo(wdi_transition_duration,0),jQuery(t).fadeTo(wdi_transition_duration,1))}function wdi_grid(e,t,i,a,r,n,d,o,s,_){if(!wdi_testBrowser_cssTransitions())return wdi_fallback(o,s,_);wdi_trans_in_progress=!0,jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");var m=wdi_transition_duration/(e+t);var c=jQuery(o).find("img"),u=jQuery('<span style="display: block;" />').addClass("wdi_grid");jQuery(o).prepend(u);var l=jQuery(".wdi_slide_bg"),w=c.width(),p=c.height(),_=l.width(),l=l.height(),h=Math.floor(_/e),g=Math.floor(l/t),y=_-e*h,f=Math.ceil(y/e),v=l-t*g,b=Math.ceil(v/t),j=0,Q=Math.ceil((jQuery(".wdi_slide_bg").width()-c.width())/2),k=void 0===c.attr("src")?"":c.attr("src");a="min-auto"===(a="auto"===a?_:a)?-_:a,r="min-auto"===(r="auto"===r?l:r)?-l:r;for(var x,C,E,M,I,A,B,O,T,D,S=0;S<e;S++){var z,K=0,R=Math.floor((jQuery(".wdi_slide_bg").height()-c.height())/2),V=h;0<y&&(V+=z=f<=y?f:y,y-=z);for(var L=0;L<t;L++){var G=g,H=v;0<H&&(G+=z=b<=H?b:v,0),u.append((x=V,C=G,E=K,M=R,I=j,A=Q,B=k,O=w,T=p,D=(S+(D=L))*m,jQuery('<span class="wdi_gridlet" />').css({display:"block",width:x,height:C,top:E,left:I,backgroundImage:'url("'+B+'")',backgroundColor:jQuery(".wdi_spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:A+"px "+M+"px",backgroundSize:O+"px "+T+"px",transition:"all "+wdi_transition_duration+"ms ease-in-out "+D+"ms",transform:"none"}))),K+=G,R-=G}Q-=V,j+=V}l=u.children().last();u.show(),c.css("opacity",0),u.children().first().addClass("rs-top-left"),u.children().last().addClass("rs-bottom-right"),u.children().eq(t-1).addClass("rs-bottom-left"),u.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){u.children().css({opacity:d,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+n+")"})},1),jQuery(s).css("opacity",1),jQuery(l).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(function(){jQuery(o).css({opacity:0,"z-index":1}),jQuery(s).css({opacity:1,"z-index":2}),c.css("opacity",1),u.remove(),wdi_trans_in_progress=!1,jQuery(o).html(""),"undefined"==typeof event_stack||0<event_stack.length&&(key=event_stack[0].split("-"),event_stack.shift(),wdi_change_image(key[0],key[1],wdi_data,!0));wdi_change_watermark_container()}))}function wdi_sliceH(e,t,i){var a;"right"==i?a="min-auto":"left"==i&&(a="auto"),wdi_grid(1,8,0,a,0,1,0,e,t,i)}function wdi_sliceV(e,t,i){var a;"right"==i?a="min-auto":"left"==i&&(a="auto"),wdi_grid(10,1,0,0,a,1,0,e,t,i)}function wdi_slideV(e,t,i){var a;"right"==i?a="auto":"left"==i&&(a="min-auto"),wdi_grid(1,1,0,0,a,1,1,e,t,i)}function wdi_slideH(e,t,i){var a;"right"==i?a="min-auto":"left"==i&&(a="auto"),wdi_grid(1,1,0,a,0,1,1,e,t,i)}function wdi_scaleOut(e,t,i){wdi_grid(1,1,0,0,0,1.5,0,e,t,i)}function wdi_scaleIn(e,t,i){wdi_grid(1,1,0,0,0,.5,0,e,t,i)}function wdi_blockScale(e,t,i){wdi_grid(8,6,0,0,0,.6,0,e,t,i)}function wdi_kaleidoscope(e,t,i){wdi_grid(10,8,0,0,0,1,0,e,t,i)}function wdi_fan(e,t,i){var a,r;"right"==i?(a=45,r=100):"left"==i&&(a=-45,r=-100),wdi_grid(1,10,a,r,0,1,0,e,t,i)}function wdi_blindV(e,t,i){wdi_grid(1,8,0,0,0,.7,0,e,t)}function wdi_blindH(e,t,i){wdi_grid(10,1,0,0,0,.7,0,e,t)}function wdi_random(e,t,i){var a=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["wdi_"+a[Math.floor(Math.random()*a.length)]](e,t,i)}function wdi_pause_stream(e){jQuery(e).find("video").each(function(){jQuery(this).get(0).pause()})}function wdi_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}Object.size=function(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&i++;return i},wdi_comments_manager={media_id:"",mediaComments:[],load_more_count:10,commentCounter:0,currentKey:-1,init:function(e){this.instagram=new WDIInstagram,this.instagram.addToken(wdi_front.access_token),this.currentKey!=e&&(this.currentKey=e,this.reset_comments())},reset_comments:function(){jQuery("#wdi_load_more_comments").remove(),jQuery("#wdi_added_comments").html(""),this.commentCounter=0,this.media_id=wdi_data[this.currentKey].id,this.getAjaxComments(this.currentKey)},clear_comments:function(){jQuery("#wdi_load_more_comments").remove(),jQuery("#wdi_added_comments").html(""),this.commentCounter=0},popup_destroyed:function(){this.media_id="",this.mediaComments=[],this.commentCounter=0,this.currentKey=-1},showComments:function(e,t){(Object.size(e)-this.commentCounter-t<0||void 0===t)&&(t=Object.size(e)-this.commentCounter);var a=this.commentCounter;for(i=Object.size(e)-a-1;i>=Object.size(e)-a-t;i--){this.commentCounter++;var r=e[i].text,r=wdi_front.escape_tags(r);r=this.filterCommentText(r);var n=e[i].username,d=jQuery('<div class="wdi_single_comment"></div>');d.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/'+n+'">'+n+'</a></span><span class="wdi_comment_date">'+wdi_front.convertUnixDate(e[i].timestamp)+"</span></p>")),d.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>'+r+"</p></span></div>")),jQuery("#wdi_added_comments").prepend(d)}0==jQuery(".wdi_single_comment").length&&jQuery("#wdi_added_comments").html('<p class="wdi_no_comment">There are no comments to show</p>'),this.updateScrollbar()},updateScrollbar:function(){var e=jQuery("#wdi_comments"),t=jQuery("#wdi_added_comments");jQuery(".wdi_comments").attr("class","wdi_comments"),jQuery(".wdi_comments").html(""),jQuery(".wdi_comments").append(e),jQuery(".wdi_comments").append(t),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".wdi_comments").mCustomScrollbar({scrollInertia:250}),jQuery(".wdi_comments_close_btn").on("click",wdi_comment)},getAjaxComments:function(){var e="";void 0!==wdi_data[wdi_comments_manager.currentKey].comments_data.next&&(e=wdi_data[wdi_comments_manager.currentKey].comments_data.next),this.instagram.getRecentMediaComments(this.media_id,{success:function(e){if(""==e||null==e||null==e||void 0!==e.error)return errorMessage="Network Error, please try again later :(",console.log("%c"+errorMessage,"color:#cc0000;"),void jQuery("#wdi_added_comments").html('<p class="wdi_no_comment">Comments are currently unavailable</p>');if(200!=e.meta.code)return errorMessage=e.meta.error_message,console.log("%c"+errorMessage,"color:#cc0000;"),void jQuery("#wdi_added_comments").html('<p class="wdi_no_comment">Comments are currently unavailable</p>');void 0!==wdi_data[wdi_comments_manager.currentKey].comments_data.data?(wdi_data[wdi_comments_manager.currentKey].comments_data.data=e.data.concat(wdi_data[wdi_comments_manager.currentKey].comments_data.data),wdi_data[wdi_comments_manager.currentKey].comment_count+=wdi_data[wdi_comments_manager.currentKey].comments_data.data.length):(wdi_data[wdi_comments_manager.currentKey].comments_data=e,wdi_data[wdi_comments_manager.currentKey].comment_count=wdi_data[wdi_comments_manager.currentKey].comments_data.data.length),wdi_data[wdi_comments_manager.currentKey].comments_data.next=void 0!==e.paging?e.paging.next:"",wdi_comments_manager.mediaComments=e.data;var t=wdi_data[wdi_comments_manager.currentKey];wdi_comments_manager.showComments(t.comments_data.data,wdi_comments_manager.load_more_count),wdi_comments_manager.ajax_comments_ready(e.data)}},e)},ajax_comments_ready:function(e){this.createLoadMoreAndBindEvent(wdi_comments_manager.currentKey)},createLoadMoreAndBindEvent:function(e){""==e&&(e=wdi_comments_manager.currentKey),(""!==wdi_data[e].comments_data.next||wdi_data[e].comments_data.data.length>wdi_comments_manager.load_more_count&&jQuery(".wdi_single_comment").length<wdi_data[e].comments_data.data.length&&0==jQuery("#wdi_load_more_comments").length)&&jQuery("#wdi_added_comments").prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>')),jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){wdi_comments_manager.commentCounter+wdi_comments_manager.load_more_count>wdi_data[e].comments_data.data.length&&""!=wdi_data[e].comments_data.next&&wdi_comments_manager.getAjaxComments(this.currentKey),jQuery(this).remove(),wdi_comments_manager.showComments(wdi_data[e].comments_data.data,wdi_comments_manager.load_more_count),wdi_comments_manager.createLoadMoreAndBindEvent(wdi_comments_manager.currentKey)})},filterCommentText:function(e){for(var t=e.split(" "),i="",a=0;a<t.length;a++)switch(t[a][0]){case"@":i+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/'+t[a].substring(1,t[a].length)+'">'+t[a]+"</a> ";break;case"#":i+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/explore/tags/'+t[a].substring(1,t[a].length)+'">'+t[a]+"</a> ";break;default:i+=t[a]+" "}return i=i.substring(0,i.length-1)}};
|
1 |
+
var isPopUpOpened=!1,wdi_data=[];function wdi_spider_createpopup(e,t,i,a,r,n,d,o,s){if(e=e.replace(/&/g,"&"),!isPopUpOpened&&(isPopUpOpened=!0,!wdi_spider_hasalreadyreceivedpopup(n)&&!wdi_spider_isunsupporteduseragent())){jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#wdi_spider_popup_loading_"+t).css({display:"block"}),jQuery("#wdi_spider_popup_overlay_"+t).css({display:"block"});for(var _,m=0,c=0;c<o.parsedData.length;c++)if(o.parsedData[c].id===s){m=c,_=[o.parsedData[c]];break}jQuery.ajax({type:"POST",url:e,dataType:"text",data:{action:"WDIGalleryBox",image_rows:JSON.stringify(_),feed_id:o.feed_row.id,feed_counter:o.feed_row.wdi_feed_counter,current_image_index:m,image_rows_count:o.parsedData.length,carousel_media_row:JSON.stringify(_[0].carousel_media)},success:function(e){e=jQuery('<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap wdi_lightbox_theme_'+o.feed_row.theme_id+'" style="width:'+i+"px;height:"+a+"px;margin-top:-"+a/2+"px;margin-left: -"+i/2+'px; ">'+e+"</div>");new wdi_construct_popup(e,o,o.parsedData,s).construct(),e.hide().appendTo("body"),wdi_spider_showpopup(n,d,e,r),jQuery("#wdi_spider_popup_loading_"+t).css({display:"none !important;"})}})}}var wdi_construct_popup=function(y,f,v,b){this.theme_row={},this.construct=function(){this.theme_row=window["wdi_theme_"+f.feed_row.theme_id],f.feed_row.popup_enable_filmstrip&&"1"===f.feed_row.popup_enable_filmstrip&&this.add_filmstrip(),this.set_wdi_data()},this.add_filmstrip=function(){var e="horizontal";"right"!==this.theme_row.lightbox_filmstrip_pos&&"left"!==this.theme_row.lightbox_filmstrip_pos||(e="vertical");for(var t="horizontal"===e?"tenweb-i-angle-left":"tenweb-i-angle-up",i="horizontal"===e?"tenweb-i-angle-right":"tenweb-i-angle-down",a="",r=n="horizontal"===e?void 0!==f.feed_row.popup_filmstrip_height?f.feed_row.popup_filmstrip_height:"20":void 0!==f.feed_row.popup_filmstrip_height?f.feed_row.popup_filmstrip_height:"50",n=r=parseInt(r),d=0;d<v.length;d++){var o,s,_,m=v[d];_=m.resolution&&""!==m.resolution?(m.resolution.split(" "),u=intval($resolution_arr[0]),l=intval($resolution_arr[2]),0!==u&&0!==l?(o=u*(s=Math.max(r/u,n/l)),l*s):(o=r,n)):(o=r,n);var c=(r-(o*=s=Math.max(r/o,n/_)))/2,u=(n-(_*=s))/2,l="wdi_filmstrip_thumbnail "+(parseInt(m.id)===parseInt(b)?"wdi_thumb_active":"wdi_thumb_deactive"),w="width:"+o+"px;height:"+_+"px;margin-left:"+c+"px;margin-top:"+u+"px;",p="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+d+"', wdi_data)",h="wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+d+"', wdi_data)";switch(m.filetype){case"EMBED_OEMBED_INSTAGRAM_IMAGE":var g='<img style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+(void 0!==m.images[f.feedImageResolution]&&void 0!==m.images[f.feedImageResolution].url?m.images[f.feedImageResolution].url:m.thumb_url)+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />';break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":g='<img style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+(void 0!==m.thumb_url?m.thumb_url:"thumburl")+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />';break;case"EMBED_OEMBED_INSTAGRAM_CAROUSEL":if(0===m.carousel_media.length)continue;switch(m.carousel_media[0].type){case"image":g='<img style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+m.carousel_media[0].images.thumbnail.url+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />';break;case"video":g='<img style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+(void 0!==m.thumb_url?m.thumb_url:"thumburl")+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />';break;default:g='<img style="'+w+'" class="wdi_filmstrip_thumbnail_img" src="'+(wdi_url.plugin_url+"images/missing.png")+'" onclick="'+p+'" ontouchend="'+h+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />'}}a+='<div id="wdi_filmstrip_thumbnail_'+d+'" class="'+l+'">'+g+"</div>"}i='<div class="wdi_filmstrip_left"><i class="tenweb-i '+t+'"></i></div><div class="wdi_filmstrip"><div class="wdi_filmstrip_thumbnails">'+a+'</div></div><div class="wdi_filmstrip_right"><i class="tenweb-i '+i+'"></i></div>';y.find(".wdi_filmstrip_container").append(i)},this.set_wdi_data=function(){wdi_data=[];for(var e=0;e<v.length;e++)wdi_data[e]=[],wdi_data[e].number=e+1,wdi_data[e].id=v[e].id,wdi_data[e].alt=v[e].alt,wdi_data[e].description=wdi_front.escape_tags(v[e].description),wdi_data[e].username=v[e].username,wdi_data[e].profile_picture=v[e].profile_picture,wdi_data[e].image_url=v[e].image_url,wdi_data[e].thumb_url=v[e].thumb_url,wdi_data[e].src=void 0!==v[e].images?v[e].images.standard_resolution.url:"",wdi_data[e].date=v[e].date,wdi_data[e].comment_count=v[e].comment_count,wdi_data[e].filetype=v[e].filetype,wdi_data[e].filename=v[e].filename,wdi_data[e].avg_rating=v[e].avg_rating,wdi_data[e].rate=v[e].rate,wdi_data[e].rate_count=v[e].rate_count,wdi_data[e].hit_count=v[e].hit_count,wdi_data[e].comments_data=void 0!==v[e].comments_data?v[e].comments_data:"null",wdi_data[e].carousel_media=void 0!==v[e].carousel_media?v[e].carousel_media:null}};function wdi_spider_showpopup(e,t,i,a){isPopUpOpened=!0,i.show(),wdi_spider_receivedpopup(e,t)}function wdi_spider_hasalreadyreceivedpopup(e){return-1<document.cookie.indexOf(e)&&delete document.cookie[document.cookie.indexOf(e)],!1}function wdi_spider_receivedpopup(e,t){var i=new Date;i.setDate(i.getDate()+t),document.cookie=e+"=true;expires="+i.toUTCString()+";path=/",jQuery(".wdi_image_info").mCustomScrollbar({autoHideScrollbar:!1,scrollInertia:150,advanced:{updateOnContentResize:!0}})}function wdi_spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function wdi_spider_destroypopup(e){null!=document.getElementById("wdi_spider_popup_wrap")&&(wdi_comments_manager.popup_destroyed(),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),setTimeout(function(){jQuery(".wdi_spider_popup_wrap").remove(),jQuery(".wdi_spider_popup_loading").css({display:"none"}),jQuery(".wdi_spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),jQuery("html").attr("style","")},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");i=jQuery(document).scrollTop();window.location.hash="",jQuery(document).scrollTop(i),"undefined"!=typeof wdi_playInterval&&clearInterval(wdi_playInterval)}function wdi_spider_ajax_save(e,t){return wdi_comments_manager.init(t),!1}function wdi_spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function wdi_spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function wdi_spider_check_required(e,t){return""==jQuery("#"+e).val()&&(wdi_front.show_alert(t+"* "+wdi_objectL10n.wdi_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function wdi_spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(wdi_front.show_alert(wdi_objectL10n.wdi_mail_validation),!0)}function wdi_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function wdi_play_pause(e){var t=-1<navigator.userAgent.indexOf("Chrome"),i=-1<navigator.userAgent.indexOf("Safari");t&&i&&(i=!1),i||(i=e.get(0),e=!1,navigator.userAgent.match(/firefox/i)&&(e=!0),e||(i.paused?i.play():i.pause()))}function wdi_spider_display_embed(e,t,i,a,r){var n="";switch(e){case"EMBED_OEMBED_INSTAGRAM_VIDEO":var d="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');d+=" >",""!=t&&(d+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+i+'" type="video/mp4"> Your browser does not support the video tag. </video>'),n+=d+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":d="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');d+=" >",""!=t&&(d+='<img src="'+i+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),n+=d+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_CAROUSEL":d="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');d+=" >";for(var o=0;o<r.length;o++)"image"==r[o].type?d+='<img src="'+r[o].images.standard_resolution.url+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;" data-id="'+o+'" class="carousel_media '+(0==o?"active":"")+'">':"video"==r[o].type&&(void 0!==r[o].videos&&void 0!==r[o].videos.standard_resolution&&void 0!==r[o].videos.standard_resolution.url&&(i=r[o].videos.standard_resolution.url),d+='<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="'+o+'" class="carousel_media '+(0==o?"active":"")+'"><source src="'+i+'" type="video/mp4"> Your browser does not support the video tag. </video>');n+=d+="</div>"}return n}function wdi_testBrowser_cssTransitions(){return wdi_testDom("Transition")}function wdi_testBrowser_cssTransforms3d(){return wdi_testDom("Perspective")}function wdi_testDom(e){for(var t=["","Webkit","Moz","ms","O","Khtml"],i=t.length;i--;)if(void 0!==document.body.style[t[i]+e])return!0;return!1}function wdi_cube(e,t,i,a,r,n,d,o,s,_){return wdi_testBrowser_cssTransitions()?wdi_testBrowser_cssTransforms3d()?(wdi_trans_in_progress=!0,jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active"),jQuery(".wdi_slide_bg").css("perspective",1e3),jQuery(o).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(s).css({opacity:1,filter:"Alpha(opacity=100)",backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".wdi_slider").css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".wdi_slider").css({transition:"all "+wdi_transition_duration+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+n+"deg) rotateY("+d+"deg)"})},20),void jQuery(".wdi_slider").one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(function(){jQuery(o).removeAttr("style"),jQuery(s).removeAttr("style"),jQuery(".wdi_slider").removeAttr("style"),jQuery(o).css({opacity:0,filter:"Alpha(opacity=0)","z-index":1}),jQuery(s).css({opacity:1,filter:"Alpha(opacity=100)","z-index":2}),wdi_trans_in_progress=!1,jQuery(o).html(""),"undefined"==typeof event_stack||0<event_stack.length&&(key=event_stack[0].split("-"),event_stack.shift(),wdi_change_image(key[0],key[1],wdi_data,!0));wdi_change_watermark_container()}))):wdi_fallback3d(o,s,_):wdi_fallback(o,s,_)}function wdi_cubeH(e,t,i){var a=jQuery(e).width()/2;"right"==i?wdi_cube(a,a,0,0,90,0,-90,e,t,i):"left"==i&&wdi_cube(a,-a,0,0,-90,0,90,e,t,i)}function wdi_cubeV(e,t,i){var a=jQuery(e).height()/2;"right"==i?wdi_cube(a,0,-a,90,0,-90,0,e,t,i):"left"==i&&wdi_cube(a,0,a,-90,0,90,0,e,t,i)}function wdi_fallback(e,t,i){wdi_fade(e,t,i)}function wdi_fallback3d(e,t,i){wdi_sliceV(e,t,i)}function wdi_none(e,t,i){jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active"),wdi_trans_in_progress=!1,jQuery(e).html(""),wdi_change_watermark_container()}function wdi_fade(e,t,i){jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active"),wdi_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+wdi_transition_duration+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),wdi_change_watermark_container()):(jQuery(e).animate({opacity:0,"z-index":1},wdi_transition_duration),jQuery(t).animate({opacity:1,"z-index":2},{duration:wdi_transition_duration,complete:function(){wdi_trans_in_progress=!1,jQuery(e).html(""),wdi_change_watermark_container()}}),jQuery(e).fadeTo(wdi_transition_duration,0),jQuery(t).fadeTo(wdi_transition_duration,1))}function wdi_grid(e,t,i,a,r,n,d,o,s,_){if(!wdi_testBrowser_cssTransitions())return wdi_fallback(o,s,_);wdi_trans_in_progress=!0,jQuery(".wdi_filmstrip_thumbnail").removeClass("wdi_thumb_active").addClass("wdi_thumb_deactive"),jQuery("#wdi_filmstrip_thumbnail_"+wdi_current_key).removeClass("wdi_thumb_deactive").addClass("wdi_thumb_active");var m=wdi_transition_duration/(e+t);var c=jQuery(o).find("img"),u=jQuery('<span style="display: block;" />').addClass("wdi_grid");jQuery(o).prepend(u);var l=jQuery(".wdi_slide_bg"),w=c.width(),p=c.height(),_=l.width(),l=l.height(),h=Math.floor(_/e),g=Math.floor(l/t),y=_-e*h,f=Math.ceil(y/e),v=l-t*g,b=Math.ceil(v/t),j=0,Q=Math.ceil((jQuery(".wdi_slide_bg").width()-c.width())/2),k=void 0===c.attr("src")?"":c.attr("src");a="min-auto"===(a="auto"===a?_:a)?-_:a,r="min-auto"===(r="auto"===r?l:r)?-l:r;for(var x,C,E,M,I,A,B,O,T,D,S=0;S<e;S++){var z,K=0,R=Math.floor((jQuery(".wdi_slide_bg").height()-c.height())/2),V=h;0<y&&(V+=z=f<=y?f:y,y-=z);for(var L=0;L<t;L++){var G=g,H=v;0<H&&(G+=z=b<=H?b:v,0),u.append((x=V,C=G,E=K,M=R,I=j,A=Q,B=k,O=w,T=p,D=(S+(D=L))*m,jQuery('<span class="wdi_gridlet" />').css({display:"block",width:x,height:C,top:E,left:I,backgroundImage:'url("'+B+'")',backgroundColor:jQuery(".wdi_spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:A+"px "+M+"px",backgroundSize:O+"px "+T+"px",transition:"all "+wdi_transition_duration+"ms ease-in-out "+D+"ms",transform:"none"}))),K+=G,R-=G}Q-=V,j+=V}l=u.children().last();u.show(),c.css("opacity",0),u.children().first().addClass("rs-top-left"),u.children().last().addClass("rs-bottom-right"),u.children().eq(t-1).addClass("rs-bottom-left"),u.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){u.children().css({opacity:d,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+n+")"})},1),jQuery(s).css("opacity",1),jQuery(l).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(function(){jQuery(o).css({opacity:0,"z-index":1}),jQuery(s).css({opacity:1,"z-index":2}),c.css("opacity",1),u.remove(),wdi_trans_in_progress=!1,jQuery(o).html(""),"undefined"==typeof event_stack||0<event_stack.length&&(key=event_stack[0].split("-"),event_stack.shift(),wdi_change_image(key[0],key[1],wdi_data,!0));wdi_change_watermark_container()}))}function wdi_sliceH(e,t,i){var a;"right"==i?a="min-auto":"left"==i&&(a="auto"),wdi_grid(1,8,0,a,0,1,0,e,t,i)}function wdi_sliceV(e,t,i){var a;"right"==i?a="min-auto":"left"==i&&(a="auto"),wdi_grid(10,1,0,0,a,1,0,e,t,i)}function wdi_slideV(e,t,i){var a;"right"==i?a="auto":"left"==i&&(a="min-auto"),wdi_grid(1,1,0,0,a,1,1,e,t,i)}function wdi_slideH(e,t,i){var a;"right"==i?a="min-auto":"left"==i&&(a="auto"),wdi_grid(1,1,0,a,0,1,1,e,t,i)}function wdi_scaleOut(e,t,i){wdi_grid(1,1,0,0,0,1.5,0,e,t,i)}function wdi_scaleIn(e,t,i){wdi_grid(1,1,0,0,0,.5,0,e,t,i)}function wdi_blockScale(e,t,i){wdi_grid(8,6,0,0,0,.6,0,e,t,i)}function wdi_kaleidoscope(e,t,i){wdi_grid(10,8,0,0,0,1,0,e,t,i)}function wdi_fan(e,t,i){var a,r;"right"==i?(a=45,r=100):"left"==i&&(a=-45,r=-100),wdi_grid(1,10,a,r,0,1,0,e,t,i)}function wdi_blindV(e,t,i){wdi_grid(1,8,0,0,0,.7,0,e,t)}function wdi_blindH(e,t,i){wdi_grid(10,1,0,0,0,.7,0,e,t)}function wdi_random(e,t,i){var a=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["wdi_"+a[Math.floor(Math.random()*a.length)]](e,t,i)}function wdi_pause_stream(e){jQuery(e).find("video").each(function(){jQuery(this).get(0).pause()})}function wdi_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}Object.size=function(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&i++;return i},wdi_comments_manager={media_id:"",mediaComments:[],load_more_count:10,commentCounter:0,currentKey:-1,init:function(e){this.instagram=new WDIInstagram,this.instagram.addToken(wdi_front.access_token),this.currentKey!=e&&(this.currentKey=e,this.reset_comments())},reset_comments:function(){jQuery("#wdi_load_more_comments").remove(),jQuery("#wdi_added_comments").html(""),this.commentCounter=0,this.media_id=wdi_data[this.currentKey].id,this.getAjaxComments(this.currentKey)},clear_comments:function(){jQuery("#wdi_load_more_comments").remove(),jQuery("#wdi_added_comments").html(""),this.commentCounter=0},popup_destroyed:function(){this.media_id="",this.mediaComments=[],this.commentCounter=0,this.currentKey=-1},showComments:function(e,t){(Object.size(e)-this.commentCounter-t<0||void 0===t)&&(t=Object.size(e)-this.commentCounter);var a=this.commentCounter;for(i=Object.size(e)-a-1;i>=Object.size(e)-a-t;i--){this.commentCounter++;var r=e[i].text,r=wdi_front.escape_tags(r);r=this.filterCommentText(r);var n=e[i].username,d=jQuery('<div class="wdi_single_comment"></div>');d.append(jQuery('<p class="wdi_comment_header_p"><span class="wdi_comment_header"><a target="_blank" href="//instagram.com/'+n+'">'+n+'</a></span><span class="wdi_comment_date">'+wdi_front.convertUnixDate(e[i].timestamp)+"</span></p>")),d.append(jQuery('<div class="wdi_comment_body_p"><span class="wdi_comment_body"><p>'+r+"</p></span></div>")),jQuery("#wdi_added_comments").prepend(d)}0==jQuery(".wdi_single_comment").length&&jQuery("#wdi_added_comments").html('<p class="wdi_no_comment">There are no comments to show</p>'),this.updateScrollbar()},updateScrollbar:function(){var e=jQuery("#wdi_comments"),t=jQuery("#wdi_added_comments");jQuery(".wdi_comments").attr("class","wdi_comments"),jQuery(".wdi_comments").html(""),jQuery(".wdi_comments").append(e),jQuery(".wdi_comments").append(t),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".wdi_comments").mCustomScrollbar({scrollInertia:250}),jQuery(".wdi_comments_close_btn").on("click",wdi_comment)},getAjaxComments:function(){var e="";void 0!==wdi_data[wdi_comments_manager.currentKey].comments_data.next&&(e=wdi_data[wdi_comments_manager.currentKey].comments_data.next),this.instagram.getRecentMediaComments(this.media_id,{success:function(e){if(""==e||null==e||null==e||void 0!==e.error)return errorMessage="Network Error, please try again later :(",console.log("%c"+errorMessage,"color:#cc0000;"),void jQuery("#wdi_added_comments").html('<p class="wdi_no_comment">Comments are currently unavailable</p>');if(200!=e.meta.code)return errorMessage=e.meta.error_message,console.log("%c"+errorMessage,"color:#cc0000;"),void jQuery("#wdi_added_comments").html('<p class="wdi_no_comment">Comments are currently unavailable</p>');void 0!==wdi_data[wdi_comments_manager.currentKey].comments_data.data?(wdi_data[wdi_comments_manager.currentKey].comments_data.data=e.data.concat(wdi_data[wdi_comments_manager.currentKey].comments_data.data),wdi_data[wdi_comments_manager.currentKey].comment_count+=wdi_data[wdi_comments_manager.currentKey].comments_data.data.length):(wdi_data[wdi_comments_manager.currentKey].comments_data=e,wdi_data[wdi_comments_manager.currentKey].comment_count=wdi_data[wdi_comments_manager.currentKey].comments_data.data.length),wdi_data[wdi_comments_manager.currentKey].comments_data.next=void 0!==e.paging?e.paging.next:"",wdi_comments_manager.mediaComments=e.data;var t=wdi_data[wdi_comments_manager.currentKey];wdi_comments_manager.showComments(t.comments_data.data,wdi_comments_manager.load_more_count),wdi_comments_manager.ajax_comments_ready(e.data)}},e)},ajax_comments_ready:function(e){this.createLoadMoreAndBindEvent(wdi_comments_manager.currentKey)},createLoadMoreAndBindEvent:function(e){""==e&&(e=wdi_comments_manager.currentKey),(""!==wdi_data[e].comments_data.next||wdi_data[e].comments_data.data.length>wdi_comments_manager.load_more_count&&jQuery(".wdi_single_comment").length<wdi_data[e].comments_data.data.length&&0==jQuery("#wdi_load_more_comments").length)&&jQuery("#wdi_added_comments").prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>')),jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){wdi_comments_manager.commentCounter+wdi_comments_manager.load_more_count>wdi_data[e].comments_data.data.length&&""!=wdi_data[e].comments_data.next&&wdi_comments_manager.getAjaxComments(this.currentKey),jQuery(this).remove(),wdi_comments_manager.showComments(wdi_data[e].comments_data.data,wdi_comments_manager.load_more_count),wdi_comments_manager.createLoadMoreAndBindEvent(wdi_comments_manager.currentKey)})},filterCommentText:function(e){for(var t=e.split(" "),i="",a=0;a<t.length;a++)switch(t[a][0]){case"@":i+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/'+t[a].substring(1,t[a].length)+'">'+t[a]+"</a> ";break;case"#":i+='<a target="blank" class="wdi_comm_text_link" href="//instagram.com/explore/tags/'+t[a].substring(1,t[a].length)+'">'+t[a]+"</a> ";break;default:i+=t[a]+" "}return i=i.substring(0,i.length-1)}};
|
js/wdi_admin.js
CHANGED
@@ -966,13 +966,13 @@ wdi_controller.addHashtag = function(tagname, response) {
|
|
966 |
var newHashtag = jQuery('<div class="wdi_user"><a target="_blank" href="https://instagram.com/explore/tags/' + tagname + '">' + '<img class="wdi_profile_pic" src="' + wdi_url.plugin_url + 'images/hashtag.png"><span class="wdi_hashtag">' + tagname + '</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>');
|
967 |
jQuery('#wdi_feed_users_ajax').append(newHashtag);
|
968 |
jQuery('#wdi_add_user_ajax_input').val('');
|
969 |
-
var profile_picture;
|
|
|
970 |
if (typeof response != 'undefined') {
|
971 |
// ToDo. check all type
|
972 |
profile_picture = (response['data'].length != 0 && typeof response['data'][0]['images']['thumbnail'] !== "undefined") ? response['data'][0]['images']['thumbnail']['url'] : '';
|
973 |
-
} else {
|
974 |
-
profile_picture = '';
|
975 |
}
|
|
|
976 |
var feed_users = jQuery('#WDI_feed_users').val();
|
977 |
if ( this.isJsonString(feed_users) ) {
|
978 |
feed_users = JSON.parse(feed_users);
|
966 |
var newHashtag = jQuery('<div class="wdi_user"><a target="_blank" href="https://instagram.com/explore/tags/' + tagname + '">' + '<img class="wdi_profile_pic" src="' + wdi_url.plugin_url + 'images/hashtag.png"><span class="wdi_hashtag">' + tagname + '</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>');
|
967 |
jQuery('#wdi_feed_users_ajax').append(newHashtag);
|
968 |
jQuery('#wdi_add_user_ajax_input').val('');
|
969 |
+
var profile_picture = '';
|
970 |
+
/*
|
971 |
if (typeof response != 'undefined') {
|
972 |
// ToDo. check all type
|
973 |
profile_picture = (response['data'].length != 0 && typeof response['data'][0]['images']['thumbnail'] !== "undefined") ? response['data'][0]['images']['thumbnail']['url'] : '';
|
|
|
|
|
974 |
}
|
975 |
+
*/
|
976 |
var feed_users = jQuery('#WDI_feed_users').val();
|
977 |
if ( this.isJsonString(feed_users) ) {
|
978 |
feed_users = JSON.parse(feed_users);
|
js/wdi_admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wdi_multiple_accounts_option_controller(){var e=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));e.addClass("wdi_multiple_accounts_section");var t="";if(wdi_options.wdi_authenticated_users_list){var i,r=JSON.parse(wdi_options.wdi_authenticated_users_list),a=0;for(i in r)t+="<tr data-multiple-account='"+a+"'>",t+="<th>Access Token</th>",t+='<td><input type="text" name="wdi_instagram_options[wdi_authenticated_users_list][access_token][]" size="53" required="" value="'+r[i].access_token+'"></td>',t+="</tr>",t+="<tr data-multiple-account='"+a+"' class='wdi_username_tr'>",t+="<th>Username</th>",t+='<td><div class="wdi_input_wrapper"><input type="text" name="wdi_instagram_options[wdi_authenticated_users_list][user_name][]" size="53" required="" value="'+r[i].user_name+'"></div><div class="wdi_remove_auth_user">Delete</div></td>',t+='<input type="hidden" name="wdi_instagram_options[wdi_authenticated_users_list][user_id][]" size="53" required="" value="'+r[i].user_id+'">',t+="</tr>",a++;e.append(t)}jQuery(".wdi_remove_auth_user").on("click",function(e){e.preventDefault();e=jQuery(this).closest(".wdi_username_tr").data("multiple-account");return jQuery(this).closest(".wdi_multiple_accounts_section").find('tr[data-multiple-account="'+e+'"]').remove(),!1})}function wdi_advanced_option_controller(){var e=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));e.addClass("wdi_advanced_option wdi_advanced_option_close");$tr=jQuery("<tr class='wdi_advanced_option_head'><th style='width: 100%;'>ADVANCED OPTIONS AND MULTIPLE INSTAGRAM ACCOUNTS</th><td><div class='wdi_advanced_option_icon'></div></td></tr>"),e.prepend($tr),$tr.on("click",function(){e.hasClass("wdi_advanced_option_open")?(e.removeClass("wdi_advanced_option_open"),e.addClass("wdi_advanced_option_close")):(e.removeClass("wdi_advanced_option_close"),e.addClass("wdi_advanced_option_open"))})}function wdi_controller(){}jQuery(document).ready(function(){function e(e){if(!1===e){var t=JSON.parse(localStorage.getItem("wdi_sections"));for(i in null!==t&&!1!==t||(t={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"},localStorage.setItem("wdi_sections",JSON.stringify(t))),t){var r=jQuery("#wdi_save_feed").find("[data-section_name='"+i+"']");n(t[i],r)}}else{var a=jQuery(e).data("section_name"),s=null;e.hasClass("wdi_section_open")?(n("show",e),s="show"):e.hasClass("wdi_section_close")&&(n("hide",e),s="hide"),null!=s&&((e=JSON.parse(localStorage.getItem("wdi_sections"))||{})[a]=s,localStorage.setItem("wdi_sections",JSON.stringify(e)))}}function n(e,t){"show"===e?("table"===(e=t.closest(".wdi_section").find(".wdi_elements")).data("display")?e.css({display:"table"}):e.css({display:"block"}),t.css({"border-bottom":"1px solid #f1f1f1",margin:"0 auto 15px"}),t.removeClass("wdi_section_open"),t.addClass("wdi_section_close")):(t.closest(".wdi_section").find(".wdi_elements").css({display:"none"}),t.css({"border-bottom":"0px",margin:"0 auto 0px"}),t.removeClass("wdi_section_close"),t.addClass("wdi_section_open"))}jQuery("#wdi_reset_cache").click(function(e){jQuery(".wdi_reset_cache_success").remove(),jQuery("#wdi_save_loading").removeClass("wdi_hidden"),e.preventDefault(),jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_nonce:wdi_ajax.wdi_nonce,task:"reset",action:"wdi_cache"},success:function(e){!1===e.success?jQuery("#wdi_reset_cache").after("<span class='wdi_reset_cache_success' style='color: #fc0000; margin-left: 15px; line-height: 2;'>Failed</span>"):(wdi_controller.instagram=new WDIInstagram,jQuery.each(e.data,function(e,t){var i=JSON.parse(t.users),r="",a="",s="",n=t.endpoint;jQuery.each(i,function(e,t){""!==t.tag_id?(a=(a=(a=t.username).substr(1,a.length)).replace(" ",""),s=t.tag_id):r=(r=wdi_controller.getUserObj(t.username))&&r.user_name});t=t.feed_id;wdi_controller.instagram.set_cache_data("",r,t,"",0,0,a,s,n,"")}),jQuery("#wdi_reset_cache").after("<span class='wdi_reset_cache_success' style='color: #029117; margin-left: 15px; line-height: 2;'>Success</span>"))}})}),jQuery(".wdi_account_refresh").click(function(){var t=jQuery(this),e=t.data("wdi_account");jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{page:"wdi_settings",action:"wdi_account_refresh",nonce:wdi_ajax.wdi_nonce,user_name:e},success:function(e){t.closest("div").find(".wdi_reset_cache_success").remove(),!0===e.success?(t.after("<span class='wdi_reset_cache_success' style='color: #029117; margin-left: 15px; line-height: 2;'>Success</span>"),t.closest("div").find(".wdi_user_token").val(e.token)):t.after("<span class='wdi_reset_cache_success' style='color: #fc0000; margin-left: 15px; line-height: 2;'>Failed</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("body").hasClass("instagram-feed_page_wdi_settings")&&wdi_advanced_option_controller(),jQuery(".wdi_section_name").click(function(){e(jQuery(this))}),e(!1),jQuery(document).on("click",".wdi-account-show-token",function(){jQuery(this).find("i").toggleClass("dashicons-arrow-up-alt2 dashicons-arrow-down-alt2"),jQuery(this).parents("li").find(".wdi-account-accesstoken").slideToggle(300)}),jQuery(document).on("click",".wdi-advanced-options .wdi-advanced-headline",function(){jQuery(this).find("i").toggleClass("dashicons-arrow-up-alt2 dashicons-arrow-down-alt2"),jQuery(this).parents(".wdi-advanced-options").find(".wdi-advanced-body").slideToggle(500)}),jQuery(document).on("click","#wdi_verify",function(){jQuery("#wdi_submit").prop("disabled",!0),jQuery(this).is(":checked")&&jQuery("#wdi_submit").prop("disabled",!1)}),jQuery(document).on("click","#wdi_submit",function(){return confirm(wdi_messages.uninstall_plugin)&&jQuery("#wdi_uninstall_form").submit(),!1}),jQuery("#WDI_feed_name").on("keypress",function(){jQuery(this).removeAttr("style")})}),wdi_controller.getParameterByName=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");e=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))},wdi_controller.apiRedirected=function(){var e=this.getParameterByName("access_token").split("."),t=/^[^\\\/&?><"']*$/;for(i=0;i<e.length;i++)if(null===e[i].match(t))return;var r=e.join(".");jQuery(document).ready(function(){""===wdi_options.wdi_access_token?jQuery("#wdi_access_token").attr("value",r):(jQuery(".wdi_more_token_template .wdi_more_access_token").prop("disabled",!1),jQuery(".wdi_more_token_template .wdi_more_access_token").attr("value",r))}),wdi_controller.instagram.addToken(r),wdi_controller.getUserInfo(r)},wdi_controller.getUserInfo=function(e){this.instagram.getSelfInfo({success:function(e){""===wdi_options.wdi_access_token?(jQuery("#wdi_user_name").attr("value",e.data.username),jQuery("#wdi_user_id").attr("value",e.data.id)):(jQuery(".wdi_more_token_template .wdi_more_user_name").prop("disabled",!1),jQuery(".wdi_more_token_template .wdi_more_user_id").prop("disabled",!1),jQuery(".wdi_more_token_template .wdi_more_user_name").attr("value",e.data.username),jQuery(".wdi_more_token_template .wdi_more_user_id").attr("value",e.data.id)),jQuery(document).trigger("wdi_settings_filled")}})},wdi_controller.oldDisplayType={},wdi_controller.displayTypeMemory={},wdi_controller.switchFeedTabs=function(e,t){jQuery("#wdi_refresh_tab").attr("value",e),jQuery(".wdi_tab").hide(),jQuery("#"+e+"_tab").show(),jQuery(".display_type").css("display","none"),jQuery('.display_type[tab="'+e+'"]').css("display","block"),jQuery('.display_type[tab="'+e+'"]').length?jQuery(".display_type_content").show():jQuery(".display_type_content").hide(),jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")}),jQuery("#wdi_"+e).addClass("wdi_feed_tab_active");var i=jQuery(),r=!1;null!=t&&""!=t&&(i=jQuery(".display_type #"+t).prop("checked",!0),jQuery("#wdi_feed_type").attr("value",t)),r||0!=(i=jQuery('.display_type[tab="'+e+'"] input[name="feed_type"]:checked')).length&&(r=!0),r||0!=(i=jQuery('.display_type[tab="'+e+'"] #thumbnails')).length&&(r=!0,i.prop("checked",!0),jQuery("#wdi_feed_type").attr("value","thumbnails")),r&&wdi_controller.displaySettingsSection(i),"conditional_filters"==e&&wdi_controller.updateConditionalFiltersUi()},wdi_controller.displaySettingsSection=function(e){var i=e.attr("id").toLowerCase().trim(),t=e.parent().parent().attr("tab"),e=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:i,tab:t},wdi_controller.displayTypeMemory[t]=wdi_controller.oldDisplayType,null!=e&&e.attr("value",i);e=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",i);var r=0,a=!1;e.find(".wdi_element").each(function(){0;var e=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(void 0!==e){a=!1;var t=e.toLowerCase().trim().split(",");for(r=0;r<t.length;r++)t[r]===i&&(jQuery(this).css("display","block"),a=!0);!1===a&&jQuery(this).css("display","none")}})},wdi_controller.switchThemeTabs=function(e,t){jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")}),jQuery("#wdi_"+e).addClass("wdi_feed_tab_active"),jQuery("[tab]").each(function(){jQuery(this).attr("tab")!=e?jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","none"):jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","block")}),jQuery(".display_type").css("display","none"),jQuery('.display_type[tab="'+e+'"]').css("display","block"),jQuery("#wdi_refresh_tab").attr("value",e),null!=t&&""!=t&&jQuery("#wdi_refresh_section").attr("value",t),(null==t&&""!=t?null!=wdi_controller.displayTypeMemory[e]?jQuery(".display_type #"+wdi_controller.displayTypeMemory[e].section):jQuery('.display_type[tab="'+e+'"]').first().find("input"):jQuery(".display_type #"+t)).trigger("click")},wdi_controller.bindSaveFeedEvent=function(){var e=this;jQuery("#wdi_save_feed_submit").on("click",function(){e.save_feed("save_feed")}),jQuery("#wdi_save_feed_apply").on("click",function(){e.save_feed("apply_changes")}),jQuery("#wdi_cancel_changes").on("click",function(){e.save_feed("cancel")})},wdi_controller.save_feed=function(e){var t,i,r,a=[],s={};"cancel"==e&&(window.location=window.location.href),t=jQuery("#WDI_user_name option:selected").data("type"),n=jQuery("#WDI_user_name option:selected").val(),i=jQuery("#WDI_feed_name");var n=wdi_controller.getUserObj(n);if(""==i.val())return alert(wdi_messages.feed_title_field_required),i.focus().attr("style","border-color: #FF0000;"),!1;if(!n)return alert(wdi_messages.user_field_required),!1;if(r={id:n.user_id,username:n.user_name},wdi_controller.checkIfUserNotSaved(e),0==wdi_controller.waitingAjaxRequestEnd.button){if(s=jQuery("#WDI_feed_users").val(),this.isJsonString(s)){for(var d in s=JSON.parse(s))"#"===s[d].username.charAt(0)&&a.push(s[d]);a.push(r)}else a.push(r);users=this.stringifyUserData(a),jQuery("#WDI_feed_users").val(users),jQuery("#wdi_feed_thumb").val(""),"business"==t&&jQuery("#wdi_feed_thumb").val(n.profile_picture_url),"apply_changes"!=e&&"save_feed"!=e||(n=jQuery("#wdi_add_or_edit").val(),jQuery("#wdi_current_id").val(n)),jQuery("#task").attr("value",e),submit_ajax()}};var comlete_redirect_url="";function submit_ajax(){var e=jQuery("#wdi_save_feed").serialize();e+="&action=wdi_apply_changes&page=wdi_feeds",jQuery("#wdi_save_loading").removeClass("wdi_hidden"),jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:e,success:function(e){comlete_redirect_url=e.url;var t=e.feed_id;1==e.need_cache?(jQuery(".caching-process-message").removeClass("wdi_hidden"),setTimeout(function(){wdi_controller.instagram.set_cache_data(comlete_redirect_url,"",t,"",0,0,"","","","")},1e3)):(jQuery("#wdi_save_loading").addClass("wdi_hidden"),window.location=comlete_redirect_url)},error:function(e,t,i){window.location=comlete_redirect_url}})}function wdi_spider_select_value(e){e.focus(),e.select()}function wdi_spider_set_input_value(e,t){"add"===t&&""==jQuery("#wdi_access_token").attr("value")&&alert("Please get your access token"),document.getElementById(e)&&(document.getElementById(e).value=t)}function wdi_spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function wdi_bulk_actions(e){e=jQuery(e).val();return""!=e&&(!("delete_all"==e&&!confirm(wdi_messages.do_you_want_to_delete_selected_items))&&(wdi_spider_set_input_value("task",e),jQuery("#wdi_feed_form").submit(),!0))}function wdi_spider_check_all_items(){wdi_spider_check_all_items_checkbox(),jQuery("#check_all").trigger("click")}function wdi_spider_check_all_items_checkbox(){var e;jQuery("#check_all_items").prop("checked")?(jQuery("#check_all_items").prop("checked",!1),jQuery("#draganddrop").hide()):(e=parseInt(jQuery(".displaying-num").html())?parseInt(jQuery(".displaying-num").html()):0,e=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0)+e,jQuery("#check_all_items").prop("checked",!0),e&&(jQuery("#draganddrop").html("<strong><p>Selected "+e+" item"+(1<e?"s":"")+".</p></strong>"),jQuery("#draganddrop").show()))}function wdi_spider_check_all(e){jQuery(e).prop("checked")||(jQuery("#check_all_items").prop("checked",!1),jQuery("#draganddrop").hide())}function wdi_spider_set_input_value(e,t){"add"===t&&""==jQuery("#wdi_access_token").attr("value")&&alert("Please get your access token"),document.getElementById(e)&&(document.getElementById(e).value=t)}function wdi_account_remove(e,t){jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{page:"wdi_settings",action:"wdi_account_disconnect",nonce:wdi_ajax.wdi_nonce,user_name:e,user_id:t},success:function(e){e.success&&(1==jQuery('[class*="wdi-account-list"]').length?((e=jQuery(".wdi-account-list-"+t).parent()).prev().remove(),e.remove(),jQuery("#toplevel_page_wdi_feeds ul").remove(),jQuery("#toplevel_page_wdi_feeds a").attr("href","admin.php?page=wdi_settings")):jQuery(".wdi-account-list-"+t).remove())}})}function wdi_popup_open(){jQuery(".wdi-popup").show()}function wdi_popup_close(){jQuery(".wdi-popup").hide()}wdi_controller.makeInstagramUserRequest=function(e,t){var i,r=this,a=this.getInputType(e),s="hashtag"===a;if(""==e)return alert(wdi_messages.please_write_hashtag),!1;if(""!=e&&!s)return alert(wdi_messages.invalid_hashtag),!1;if(r.checkForDuplicateUser(e))return alert(e+" "+wdi_messages.already_added),!1;switch(i=jQuery("#WDI_user_name option:selected").val(),(s=wdi_controller.getUserObj(i))&&(this.instagram.user=s),a){case"user":break;case"hashtag":var n=(n=e.substr(1,e.length)).replace(" ",""),d=(jQuery("input[name='wdi_feed_settings[hashtag_top_recent]']:checked").val(),{tagname:n,action:"wdi_getHashtagId",wdi_nonce:wdi_ajax.wdi_nonce,user_name:i});jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:d,success:function(e){jQuery("#wdi_add_user_ajax").removeAttr("disabled"),r.isValidResponse(e).valid&&r.addHashtag(n,e)},error:function(e,t,i){}})}},wdi_controller.checkForDuplicateUser=function(e){var t=jQuery("#WDI_feed_users").val();if(this.isJsonString(t)){t=JSON.parse(t);for(var i=0;i<t.length;i++)if(e==t[i].username)return!0}return!1},wdi_controller.getInputType=function(e){switch(e[0]){case"#":return"hashtag";case"%":return"location";default:return"user"}},wdi_controller.stringifyUserData=function(e){for(var t=[],i=0;i<e.length;i++)t.push({id:e[i].id,username:e[i].username,tag_id:void 0!==e[i].tag_id?e[i].tag_id:""});return JSON.stringify(t)},wdi_controller.bindAddNewUserOrHashtagEvent=function(){jQuery("#wdi_add_user_ajax").on("click",function(){void 0!==jQuery(this).prop("disabled")||jQuery(this).prop("disabled",!0);var e=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();!1===wdi_controller.makeInstagramUserRequest(e)&&jQuery(this).removeAttr("disabled","disabled")}),jQuery("#wdi_add_user_ajax_input").on("keypress",function(e){if(13==e.keyCode){void 0!==jQuery("#wdi_add_user_ajax").prop("disabled")||jQuery("#wdi_add_user_ajax").prop("disabled",!0);e=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();return!1===wdi_controller.makeInstagramUserRequest(e)&&jQuery("#wdi_add_user_ajax").removeAttr("disabled","disabled"),!1}})},wdi_controller.removeFeedUser=function(e){var t,i=e.parent().find("a span").text();e.parent().find("a span").hasClass("wdi_hashtag")&&(i="#"+i),0!=this.feed_users.length||void 0!==(t=jQuery("#WDI_feed_users").val())&&this.isJsonString(t)&&(this.feed_users=JSON.parse(t));for(var r=0;r<this.feed_users.length;r++)if(this.feed_users[r].username==i){this.feed_users.splice(r,1);break}for(r=0;r<this.feed_users.length;r++)"#"!==this.feed_users[r].username.charAt(0)&&this.feed_users.splice(r,1);jQuery("#WDI_feed_users").val(this.stringifyUserData(this.feed_users)),e.parent().remove(),wdi_controller.changed_users()},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 e=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",e),jQuery("#wdi_save_feed").submit()}),jQuery("#wdi_save_theme_reset").on("click",function(){jQuery("#task").attr("value","reset_changes");var e=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",e),jQuery("#wdi_save_feed").submit()})},wdi_controller.checkIfUserNotSaved=function(e){switch(e){case"save_feed":e="submit";break;case"apply_changes":e="apply";break;case"reset_changes":e="reset"}if(""==jQuery("#wdi_add_user_ajax_input").val().trim())return wdi_controller.waitingAjaxRequestEnd={button:0},0;var t=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();return wdi_controller.waitingAjaxRequestEnd={button:e},wdi_controller.makeInstagramUserRequest(t),1},wdi_controller.saveFeedAfterAjaxWait=function(e){var t;null!=wdi_controller.waitingAjaxRequestEnd&&(t=wdi_controller.waitingAjaxRequestEnd.button,e&&0!=t&&jQuery("#wdi_save_feed_"+t).trigger("click"),wdi_controller.waitingAjaxRequestEnd=void 0)},wdi_controller.getCookie=function(e){e=("; "+document.cookie).split("; "+e+"=");if(2==e.length)return e.pop().split(";").shift()},wdi_controller.isValidResponse=function(e){var t={};return void 0===e||void 0===e.meta.code||200!=e.meta.code?(t.valid=!1,void 0===e?t.msg=wdi_messages.instagram_server_error:200!==e.meta.code?t.msg=e.meta.error_message:t.msg=""):(t.valid=!0,t.msg="success"),t},wdi_controller.hasData=function(e){return void 0!==e&&void 0!==e.data&&0!=e.data.length},wdi_controller.thumbUser=function(e){return 0<this.feed_users.length&&this.feed_users[0].username===e},wdi_controller.findUser=function(e,t){var i=[];void 0!==t&&void 0!==t.data&&(i=t.data);for(var r=0;r<i.length;r++)if(i[r].username==e)return i[r];return!1},wdi_controller.addHashtag=function(e,t){if(null==e.match(/[~!@$%&*#^()<>?]/)){var i=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_ajax").append(i),jQuery("#wdi_add_user_ajax_input").val(""),i=void 0!==t&&0!=t.data.length&&void 0!==t.data[0].images.thumbnail?t.data[0].images.thumbnail.url:"";var r=jQuery("#WDI_feed_users").val();if(this.isJsonString(r)){r=JSON.parse(r);for(var a=0;a<r.length;a++)"#"!==r[a].username.charAt(0)&&r.splice(a,1)}else r=[];t={id:"#"+e,username:"#"+e,profile_picture:i,tag_id:t.tag_id};r.push(t),this.feed_users=r,jQuery("#WDI_feed_users").val(this.stringifyUserData(this.feed_users))}else alert(wdi_messages.invalid_hashtag);this.updateConditionalFiltersUi(),wdi_controller.saveFeedAfterAjaxWait(!0),wdi_controller.changed_users()},wdi_controller.changed_users=function(){for(var e=!1,t=0;t<this.feed_users.length;t++)if("#"===this.feed_users[t].username[0]){e=!0;break}e?(jQuery(".wdi_element_name_hashtag_top_recent").show(),jQuery(".wdi_element_name_show_username_on_thumb").hide()):(jQuery(".wdi_element_name_hashtag_top_recent").hide(),jQuery(".wdi_element_name_show_username_on_thumb").show())},wdi_controller.addUser=function(e){e.username=e.user_name,0==this.checkForDuplicateUser(e.username)?(newUser=jQuery('<div class="wdi_user"><a target="_blank" href="http://www.instagram.com/'+e.username+'"><span class="wdi_username">'+e.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_ajax").append(newUser),jQuery("#wdi_add_user_ajax_input").val(""),this.feed_users.push({id:e.id,username:e.username,profile_picture:""})):alert(e.username+" "+wdi_messages.already_added),this.updateConditionalFiltersUi(),wdi_controller.saveFeedAfterAjaxWait(!0)},wdi_controller.getUserProfilePic=function(e){for(var t=0;t<this.feed_users.length;t++)if(e==this.feed_users[t].username)return this.feed_users[t].profile_picture;return"false"},wdi_controller.conditionalFiltersTabInit=function(){this.setInitialFilters(),this.updateFiltersUi();var t=this;function e(){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")}}jQuery("#wdi_add_filter").on("click",function(){t.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(e){if(13==e.keyCode)return t.addConditionalFilter()&&jQuery(this).val(""),!1}),e(),jQuery("#WDI_wrap_conditional_filter_enable input").on("change",function(){e()}),jQuery("#WDI_conditional_filter_type").on("change",function(){switch("none"==jQuery(this).val()||jQuery("#WDI_conditional_filters").css("display","block"),jQuery(this).parent().find("label").css({display:"inline-block"}),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)}wdi_controller.updateFiltersUi()}),jQuery("#WDI_conditional_filter_type").trigger("change")},wdi_controller.addConditionalFilter=function(){var e=jQuery("#wdi_filter_input").val(),t=jQuery("#wdi_filter_type").val();if(filter={},""==e)return!1;switch(e=e.trim(),null==t&&("@"==e[0]?t="mention":"#"==e[0]?t="hashtag":"http"!=e.split("://")[0]&&"https"!=e.split("://")[0]||(t="url")),t){case"username":case"mention":"@"==e[0]&&(e=e.substr(1,e.length));break;case"hashtag":"#"==e[0]&&(e=e.substr(1,e.length));break;case"url":if(!/^(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.test(e))return alert(wdi_messages.invalid_url),!1}return filter={filter_type:t,filter_by:e,id:this.randomId()},null!=t?this.filterExists(filter)?(alert(e+" "+wdi_messages.already_added),!1):(this.conditionalFilters.push(filter),this.updateFiltersUi(),!0):(alert(wdi_messages.selectConditionType),!1)},wdi_controller.filterExists=function(e){for(var t=0;t<this.conditionalFilters.length;t++)if(this.conditionalFilters[t].filter_type==e.filter_type&&this.conditionalFilters[t].filter_by==e.filter_by)return!0;return!1},wdi_controller.updateFiltersUi=function(){for(var e,t=jQuery("#wdi_filters_ui").html(""),i=0;i<this.conditionalFilters.length;i++){if(0==i)if(1!=this.conditionalFilters.length)switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":t.append(jQuery('<span class="wdi_logic">'+wdi_messages.either+"</span>"));break;case"NOR":t.append(jQuery('<span class="wdi_logic">'+wdi_messages.neither+"</span>"))}else switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":case"OR":break;case"NOR":t.append(jQuery('<span class="wdi_logic">'+wdi_messages.not+"</span>"))}switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":e=wdi_messages.and;break;case"OR":e=wdi_messages.or;break;case"NOR":e=wdi_messages.nor}1<=i&&t.append(jQuery('<span class="wdi_logic">'+e+"</span>")),t.append(this.createUiElement(this.conditionalFilters[i]))}this.updateFilterTextarea()},wdi_controller.createUiElement=function(e){var t;switch(e.filter_type){case"mention":t="@";break;case"hashtag":t="#";break;case"location":t="%";break;default:t=""}return jQuery('<span data-id="'+e.id+'" class="wdi_filter_item wdi_filter_by_'+e.filter_type+'"></span>').html(t+e.filter_by+'<span onclick="wdi_controller.removeConditionalFilter(jQuery(this));" class="wdi_remove_filter">X</span>')},wdi_controller.randomId=function(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},wdi_controller.removeConditionalFilter=function(e){for(var t=e.parent().attr("data-id"),i=0;i<this.conditionalFilters.length;i++)this.conditionalFilters[i].id==t&&this.conditionalFilters.splice(i,1);this.updateFiltersUi()},wdi_controller.updateFilterTextarea=function(){var e=this.conditionalFilters,e=JSON.stringify(e);jQuery("#wdi_conditional_filters_textarea").val(e)},wdi_controller.setInitialFilters=function(){var e=[],t=jQuery("#wdi_conditional_filters_textarea").val();this.isJsonString(t)&&(e=JSON.parse(t)),this.conditionalFilters=e},wdi_controller.updateConditionalFiltersUi=function(){wdi_controller.updateFilterSource()},wdi_controller.updateFilterSource=function(){if("liked"!=jQuery('input[name="wdi_feed_settings[liked_feed]"]:checked').val()){var e,t,i=[];jQuery(".wdi_user").each(function(){e=(0!=jQuery(this).find(".wdi_username").length?jQuery(this).find(".wdi_username"):jQuery(this).find(".wdi_hashtag")).text(),t=jQuery(this).find("img").attr("src"),i.push({username:e,image:t})});for(var r=jQuery("#wdi_filter_source").html(""),a=0;a<i.length;a++){s="<div class='wdi_source_user'><span class='wdi_source_img'><img src='"+i[a].image+"'></span><span class='wdi_source_username'>"+i[a].username+"</span></div>";r.html(r.html()+s)}}else{var r,s="<div class='wdi_source_user'><span class='wdi_source_username'>Media I liked</span></div>";(r=jQuery("#wdi_filter_source").html("")).html(r.html()+s)}},wdi_controller.isJsonString=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},wdi_controller.getUserObj=function(e){var t=JSON.parse(wdi_options.wdi_authenticated_users_list);if("object"==typeof t){if("object"==typeof t[e]&&""!=t[e])return t[e];console.log("Error: User not exist on Users object")}else console.log("Error: Wrong response when parsed on users (JSON.parse)");return!1};
|
1 |
+
function wdi_multiple_accounts_option_controller(){var e=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));e.addClass("wdi_multiple_accounts_section");var t="";if(wdi_options.wdi_authenticated_users_list){var i,r=JSON.parse(wdi_options.wdi_authenticated_users_list),a=0;for(i in r)t+="<tr data-multiple-account='"+a+"'>",t+="<th>Access Token</th>",t+='<td><input type="text" name="wdi_instagram_options[wdi_authenticated_users_list][access_token][]" size="53" required="" value="'+r[i].access_token+'"></td>',t+="</tr>",t+="<tr data-multiple-account='"+a+"' class='wdi_username_tr'>",t+="<th>Username</th>",t+='<td><div class="wdi_input_wrapper"><input type="text" name="wdi_instagram_options[wdi_authenticated_users_list][user_name][]" size="53" required="" value="'+r[i].user_name+'"></div><div class="wdi_remove_auth_user">Delete</div></td>',t+='<input type="hidden" name="wdi_instagram_options[wdi_authenticated_users_list][user_id][]" size="53" required="" value="'+r[i].user_id+'">',t+="</tr>",a++;e.append(t)}jQuery(".wdi_remove_auth_user").on("click",function(e){e.preventDefault();e=jQuery(this).closest(".wdi_username_tr").data("multiple-account");return jQuery(this).closest(".wdi_multiple_accounts_section").find('tr[data-multiple-account="'+e+'"]').remove(),!1})}function wdi_advanced_option_controller(){var e=jQuery(jQuery("#wdi_user_id").closest("form").find(".form-table").get(1));e.addClass("wdi_advanced_option wdi_advanced_option_close");$tr=jQuery("<tr class='wdi_advanced_option_head'><th style='width: 100%;'>ADVANCED OPTIONS AND MULTIPLE INSTAGRAM ACCOUNTS</th><td><div class='wdi_advanced_option_icon'></div></td></tr>"),e.prepend($tr),$tr.on("click",function(){e.hasClass("wdi_advanced_option_open")?(e.removeClass("wdi_advanced_option_open"),e.addClass("wdi_advanced_option_close")):(e.removeClass("wdi_advanced_option_close"),e.addClass("wdi_advanced_option_open"))})}function wdi_controller(){}jQuery(document).ready(function(){function e(e){if(!1===e){var t=JSON.parse(localStorage.getItem("wdi_sections"));for(i in null!==t&&!1!==t||(t={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"},localStorage.setItem("wdi_sections",JSON.stringify(t))),t){var r=jQuery("#wdi_save_feed").find("[data-section_name='"+i+"']");n(t[i],r)}}else{var a=jQuery(e).data("section_name"),s=null;e.hasClass("wdi_section_open")?(n("show",e),s="show"):e.hasClass("wdi_section_close")&&(n("hide",e),s="hide"),null!=s&&((e=JSON.parse(localStorage.getItem("wdi_sections"))||{})[a]=s,localStorage.setItem("wdi_sections",JSON.stringify(e)))}}function n(e,t){"show"===e?("table"===(e=t.closest(".wdi_section").find(".wdi_elements")).data("display")?e.css({display:"table"}):e.css({display:"block"}),t.css({"border-bottom":"1px solid #f1f1f1",margin:"0 auto 15px"}),t.removeClass("wdi_section_open"),t.addClass("wdi_section_close")):(t.closest(".wdi_section").find(".wdi_elements").css({display:"none"}),t.css({"border-bottom":"0px",margin:"0 auto 0px"}),t.removeClass("wdi_section_close"),t.addClass("wdi_section_open"))}jQuery("#wdi_reset_cache").click(function(e){jQuery(".wdi_reset_cache_success").remove(),jQuery("#wdi_save_loading").removeClass("wdi_hidden"),e.preventDefault(),jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_nonce:wdi_ajax.wdi_nonce,task:"reset",action:"wdi_cache"},success:function(e){!1===e.success?jQuery("#wdi_reset_cache").after("<span class='wdi_reset_cache_success' style='color: #fc0000; margin-left: 15px; line-height: 2;'>Failed</span>"):(wdi_controller.instagram=new WDIInstagram,jQuery.each(e.data,function(e,t){var i=JSON.parse(t.users),r="",a="",s="",n=t.endpoint;jQuery.each(i,function(e,t){""!==t.tag_id?(a=(a=(a=t.username).substr(1,a.length)).replace(" ",""),s=t.tag_id):r=(r=wdi_controller.getUserObj(t.username))&&r.user_name});t=t.feed_id;wdi_controller.instagram.set_cache_data("",r,t,"",0,0,a,s,n,"")}),jQuery("#wdi_reset_cache").after("<span class='wdi_reset_cache_success' style='color: #029117; margin-left: 15px; line-height: 2;'>Success</span>"))}})}),jQuery(".wdi_account_refresh").click(function(){var t=jQuery(this),e=t.data("wdi_account");jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{page:"wdi_settings",action:"wdi_account_refresh",nonce:wdi_ajax.wdi_nonce,user_name:e},success:function(e){t.closest("div").find(".wdi_reset_cache_success").remove(),!0===e.success?(t.after("<span class='wdi_reset_cache_success' style='color: #029117; margin-left: 15px; line-height: 2;'>Success</span>"),t.closest("div").find(".wdi_user_token").val(e.token)):t.after("<span class='wdi_reset_cache_success' style='color: #fc0000; margin-left: 15px; line-height: 2;'>Failed</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("body").hasClass("instagram-feed_page_wdi_settings")&&wdi_advanced_option_controller(),jQuery(".wdi_section_name").click(function(){e(jQuery(this))}),e(!1),jQuery(document).on("click",".wdi-account-show-token",function(){jQuery(this).find("i").toggleClass("dashicons-arrow-up-alt2 dashicons-arrow-down-alt2"),jQuery(this).parents("li").find(".wdi-account-accesstoken").slideToggle(300)}),jQuery(document).on("click",".wdi-advanced-options .wdi-advanced-headline",function(){jQuery(this).find("i").toggleClass("dashicons-arrow-up-alt2 dashicons-arrow-down-alt2"),jQuery(this).parents(".wdi-advanced-options").find(".wdi-advanced-body").slideToggle(500)}),jQuery(document).on("click","#wdi_verify",function(){jQuery("#wdi_submit").prop("disabled",!0),jQuery(this).is(":checked")&&jQuery("#wdi_submit").prop("disabled",!1)}),jQuery(document).on("click","#wdi_submit",function(){return confirm(wdi_messages.uninstall_plugin)&&jQuery("#wdi_uninstall_form").submit(),!1}),jQuery("#WDI_feed_name").on("keypress",function(){jQuery(this).removeAttr("style")})}),wdi_controller.getParameterByName=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");e=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))},wdi_controller.apiRedirected=function(){var e=this.getParameterByName("access_token").split("."),t=/^[^\\\/&?><"']*$/;for(i=0;i<e.length;i++)if(null===e[i].match(t))return;var r=e.join(".");jQuery(document).ready(function(){""===wdi_options.wdi_access_token?jQuery("#wdi_access_token").attr("value",r):(jQuery(".wdi_more_token_template .wdi_more_access_token").prop("disabled",!1),jQuery(".wdi_more_token_template .wdi_more_access_token").attr("value",r))}),wdi_controller.instagram.addToken(r),wdi_controller.getUserInfo(r)},wdi_controller.getUserInfo=function(e){this.instagram.getSelfInfo({success:function(e){""===wdi_options.wdi_access_token?(jQuery("#wdi_user_name").attr("value",e.data.username),jQuery("#wdi_user_id").attr("value",e.data.id)):(jQuery(".wdi_more_token_template .wdi_more_user_name").prop("disabled",!1),jQuery(".wdi_more_token_template .wdi_more_user_id").prop("disabled",!1),jQuery(".wdi_more_token_template .wdi_more_user_name").attr("value",e.data.username),jQuery(".wdi_more_token_template .wdi_more_user_id").attr("value",e.data.id)),jQuery(document).trigger("wdi_settings_filled")}})},wdi_controller.oldDisplayType={},wdi_controller.displayTypeMemory={},wdi_controller.switchFeedTabs=function(e,t){jQuery("#wdi_refresh_tab").attr("value",e),jQuery(".wdi_tab").hide(),jQuery("#"+e+"_tab").show(),jQuery(".display_type").css("display","none"),jQuery('.display_type[tab="'+e+'"]').css("display","block"),jQuery('.display_type[tab="'+e+'"]').length?jQuery(".display_type_content").show():jQuery(".display_type_content").hide(),jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")}),jQuery("#wdi_"+e).addClass("wdi_feed_tab_active");var i=jQuery(),r=!1;null!=t&&""!=t&&(i=jQuery(".display_type #"+t).prop("checked",!0),jQuery("#wdi_feed_type").attr("value",t)),r||0!=(i=jQuery('.display_type[tab="'+e+'"] input[name="feed_type"]:checked')).length&&(r=!0),r||0!=(i=jQuery('.display_type[tab="'+e+'"] #thumbnails')).length&&(r=!0,i.prop("checked",!0),jQuery("#wdi_feed_type").attr("value","thumbnails")),r&&wdi_controller.displaySettingsSection(i),"conditional_filters"==e&&wdi_controller.updateConditionalFiltersUi()},wdi_controller.displaySettingsSection=function(e){var i=e.attr("id").toLowerCase().trim(),t=e.parent().parent().attr("tab"),e=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:i,tab:t},wdi_controller.displayTypeMemory[t]=wdi_controller.oldDisplayType,null!=e&&e.attr("value",i);e=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",i);var r=0,a=!1;e.find(".wdi_element").each(function(){0;var e=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(void 0!==e){a=!1;var t=e.toLowerCase().trim().split(",");for(r=0;r<t.length;r++)t[r]===i&&(jQuery(this).css("display","block"),a=!0);!1===a&&jQuery(this).css("display","none")}})},wdi_controller.switchThemeTabs=function(e,t){jQuery(".wdi_feed_tabs").filter(".wdi_feed_tab_active").each(function(){jQuery(this).removeClass("wdi_feed_tab_active")}),jQuery("#wdi_"+e).addClass("wdi_feed_tab_active"),jQuery("[tab]").each(function(){jQuery(this).attr("tab")!=e?jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","none"):jQuery(this).parent().parent().parent().parent().parent().filter("tr").css("display","block")}),jQuery(".display_type").css("display","none"),jQuery('.display_type[tab="'+e+'"]').css("display","block"),jQuery("#wdi_refresh_tab").attr("value",e),null!=t&&""!=t&&jQuery("#wdi_refresh_section").attr("value",t),(null==t&&""!=t?null!=wdi_controller.displayTypeMemory[e]?jQuery(".display_type #"+wdi_controller.displayTypeMemory[e].section):jQuery('.display_type[tab="'+e+'"]').first().find("input"):jQuery(".display_type #"+t)).trigger("click")},wdi_controller.bindSaveFeedEvent=function(){var e=this;jQuery("#wdi_save_feed_submit").on("click",function(){e.save_feed("save_feed")}),jQuery("#wdi_save_feed_apply").on("click",function(){e.save_feed("apply_changes")}),jQuery("#wdi_cancel_changes").on("click",function(){e.save_feed("cancel")})},wdi_controller.save_feed=function(e){var t,i,r,a=[],s={};"cancel"==e&&(window.location=window.location.href),t=jQuery("#WDI_user_name option:selected").data("type"),n=jQuery("#WDI_user_name option:selected").val(),i=jQuery("#WDI_feed_name");var n=wdi_controller.getUserObj(n);if(""==i.val())return alert(wdi_messages.feed_title_field_required),i.focus().attr("style","border-color: #FF0000;"),!1;if(!n)return alert(wdi_messages.user_field_required),!1;if(r={id:n.user_id,username:n.user_name},wdi_controller.checkIfUserNotSaved(e),0==wdi_controller.waitingAjaxRequestEnd.button){if(s=jQuery("#WDI_feed_users").val(),this.isJsonString(s)){for(var d in s=JSON.parse(s))"#"===s[d].username.charAt(0)&&a.push(s[d]);a.push(r)}else a.push(r);users=this.stringifyUserData(a),jQuery("#WDI_feed_users").val(users),jQuery("#wdi_feed_thumb").val(""),"business"==t&&jQuery("#wdi_feed_thumb").val(n.profile_picture_url),"apply_changes"!=e&&"save_feed"!=e||(n=jQuery("#wdi_add_or_edit").val(),jQuery("#wdi_current_id").val(n)),jQuery("#task").attr("value",e),submit_ajax()}};var comlete_redirect_url="";function submit_ajax(){var e=jQuery("#wdi_save_feed").serialize();e+="&action=wdi_apply_changes&page=wdi_feeds",jQuery("#wdi_save_loading").removeClass("wdi_hidden"),jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:e,success:function(e){comlete_redirect_url=e.url;var t=e.feed_id;1==e.need_cache?(jQuery(".caching-process-message").removeClass("wdi_hidden"),setTimeout(function(){wdi_controller.instagram.set_cache_data(comlete_redirect_url,"",t,"",0,0,"","","","")},1e3)):(jQuery("#wdi_save_loading").addClass("wdi_hidden"),window.location=comlete_redirect_url)},error:function(e,t,i){window.location=comlete_redirect_url}})}function wdi_spider_select_value(e){e.focus(),e.select()}function wdi_spider_set_input_value(e,t){"add"===t&&""==jQuery("#wdi_access_token").attr("value")&&alert("Please get your access token"),document.getElementById(e)&&(document.getElementById(e).value=t)}function wdi_spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function wdi_bulk_actions(e){e=jQuery(e).val();return""!=e&&(!("delete_all"==e&&!confirm(wdi_messages.do_you_want_to_delete_selected_items))&&(wdi_spider_set_input_value("task",e),jQuery("#wdi_feed_form").submit(),!0))}function wdi_spider_check_all_items(){wdi_spider_check_all_items_checkbox(),jQuery("#check_all").trigger("click")}function wdi_spider_check_all_items_checkbox(){var e;jQuery("#check_all_items").prop("checked")?(jQuery("#check_all_items").prop("checked",!1),jQuery("#draganddrop").hide()):(e=parseInt(jQuery(".displaying-num").html())?parseInt(jQuery(".displaying-num").html()):0,e=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0)+e,jQuery("#check_all_items").prop("checked",!0),e&&(jQuery("#draganddrop").html("<strong><p>Selected "+e+" item"+(1<e?"s":"")+".</p></strong>"),jQuery("#draganddrop").show()))}function wdi_spider_check_all(e){jQuery(e).prop("checked")||(jQuery("#check_all_items").prop("checked",!1),jQuery("#draganddrop").hide())}function wdi_spider_set_input_value(e,t){"add"===t&&""==jQuery("#wdi_access_token").attr("value")&&alert("Please get your access token"),document.getElementById(e)&&(document.getElementById(e).value=t)}function wdi_account_remove(e,t){jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{page:"wdi_settings",action:"wdi_account_disconnect",nonce:wdi_ajax.wdi_nonce,user_name:e,user_id:t},success:function(e){e.success&&(1==jQuery('[class*="wdi-account-list"]').length?((e=jQuery(".wdi-account-list-"+t).parent()).prev().remove(),e.remove(),jQuery("#toplevel_page_wdi_feeds ul").remove(),jQuery("#toplevel_page_wdi_feeds a").attr("href","admin.php?page=wdi_settings")):jQuery(".wdi-account-list-"+t).remove())}})}function wdi_popup_open(){jQuery(".wdi-popup").show()}function wdi_popup_close(){jQuery(".wdi-popup").hide()}wdi_controller.makeInstagramUserRequest=function(e,t){var i,r=this,a=this.getInputType(e),s="hashtag"===a;if(""==e)return alert(wdi_messages.please_write_hashtag),!1;if(""!=e&&!s)return alert(wdi_messages.invalid_hashtag),!1;if(r.checkForDuplicateUser(e))return alert(e+" "+wdi_messages.already_added),!1;switch(i=jQuery("#WDI_user_name option:selected").val(),(s=wdi_controller.getUserObj(i))&&(this.instagram.user=s),a){case"user":break;case"hashtag":var n=(n=e.substr(1,e.length)).replace(" ",""),d=(jQuery("input[name='wdi_feed_settings[hashtag_top_recent]']:checked").val(),{tagname:n,action:"wdi_getHashtagId",wdi_nonce:wdi_ajax.wdi_nonce,user_name:i});jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:d,success:function(e){jQuery("#wdi_add_user_ajax").removeAttr("disabled"),r.isValidResponse(e).valid&&r.addHashtag(n,e)},error:function(e,t,i){}})}},wdi_controller.checkForDuplicateUser=function(e){var t=jQuery("#WDI_feed_users").val();if(this.isJsonString(t)){t=JSON.parse(t);for(var i=0;i<t.length;i++)if(e==t[i].username)return!0}return!1},wdi_controller.getInputType=function(e){switch(e[0]){case"#":return"hashtag";case"%":return"location";default:return"user"}},wdi_controller.stringifyUserData=function(e){for(var t=[],i=0;i<e.length;i++)t.push({id:e[i].id,username:e[i].username,tag_id:void 0!==e[i].tag_id?e[i].tag_id:""});return JSON.stringify(t)},wdi_controller.bindAddNewUserOrHashtagEvent=function(){jQuery("#wdi_add_user_ajax").on("click",function(){void 0!==jQuery(this).prop("disabled")||jQuery(this).prop("disabled",!0);var e=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();!1===wdi_controller.makeInstagramUserRequest(e)&&jQuery(this).removeAttr("disabled","disabled")}),jQuery("#wdi_add_user_ajax_input").on("keypress",function(e){if(13==e.keyCode){void 0!==jQuery("#wdi_add_user_ajax").prop("disabled")||jQuery("#wdi_add_user_ajax").prop("disabled",!0);e=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();return!1===wdi_controller.makeInstagramUserRequest(e)&&jQuery("#wdi_add_user_ajax").removeAttr("disabled","disabled"),!1}})},wdi_controller.removeFeedUser=function(e){var t,i=e.parent().find("a span").text();e.parent().find("a span").hasClass("wdi_hashtag")&&(i="#"+i),0!=this.feed_users.length||void 0!==(t=jQuery("#WDI_feed_users").val())&&this.isJsonString(t)&&(this.feed_users=JSON.parse(t));for(var r=0;r<this.feed_users.length;r++)if(this.feed_users[r].username==i){this.feed_users.splice(r,1);break}for(r=0;r<this.feed_users.length;r++)"#"!==this.feed_users[r].username.charAt(0)&&this.feed_users.splice(r,1);jQuery("#WDI_feed_users").val(this.stringifyUserData(this.feed_users)),e.parent().remove(),wdi_controller.changed_users()},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 e=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",e),jQuery("#wdi_save_feed").submit()}),jQuery("#wdi_save_theme_reset").on("click",function(){jQuery("#task").attr("value","reset_changes");var e=jQuery("#wdi_add_or_edit").attr("value");jQuery("#wdi_current_id").attr("value",e),jQuery("#wdi_save_feed").submit()})},wdi_controller.checkIfUserNotSaved=function(e){switch(e){case"save_feed":e="submit";break;case"apply_changes":e="apply";break;case"reset_changes":e="reset"}if(""==jQuery("#wdi_add_user_ajax_input").val().trim())return wdi_controller.waitingAjaxRequestEnd={button:0},0;var t=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();return wdi_controller.waitingAjaxRequestEnd={button:e},wdi_controller.makeInstagramUserRequest(t),1},wdi_controller.saveFeedAfterAjaxWait=function(e){var t;null!=wdi_controller.waitingAjaxRequestEnd&&(t=wdi_controller.waitingAjaxRequestEnd.button,e&&0!=t&&jQuery("#wdi_save_feed_"+t).trigger("click"),wdi_controller.waitingAjaxRequestEnd=void 0)},wdi_controller.getCookie=function(e){e=("; "+document.cookie).split("; "+e+"=");if(2==e.length)return e.pop().split(";").shift()},wdi_controller.isValidResponse=function(e){var t={};return void 0===e||void 0===e.meta.code||200!=e.meta.code?(t.valid=!1,void 0===e?t.msg=wdi_messages.instagram_server_error:200!==e.meta.code?t.msg=e.meta.error_message:t.msg=""):(t.valid=!0,t.msg="success"),t},wdi_controller.hasData=function(e){return void 0!==e&&void 0!==e.data&&0!=e.data.length},wdi_controller.thumbUser=function(e){return 0<this.feed_users.length&&this.feed_users[0].username===e},wdi_controller.findUser=function(e,t){var i=[];void 0!==t&&void 0!==t.data&&(i=t.data);for(var r=0;r<i.length;r++)if(i[r].username==e)return i[r];return!1},wdi_controller.addHashtag=function(e,t){if(null==e.match(/[~!@$%&*#^()<>?]/)){var i=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_ajax").append(i),jQuery("#wdi_add_user_ajax_input").val("");var r=jQuery("#WDI_feed_users").val();if(this.isJsonString(r)){r=JSON.parse(r);for(var a=0;a<r.length;a++)"#"!==r[a].username.charAt(0)&&r.splice(a,1)}else r=[];t={id:"#"+e,username:"#"+e,profile_picture:"",tag_id:t.tag_id};r.push(t),this.feed_users=r,jQuery("#WDI_feed_users").val(this.stringifyUserData(this.feed_users))}else alert(wdi_messages.invalid_hashtag);this.updateConditionalFiltersUi(),wdi_controller.saveFeedAfterAjaxWait(!0),wdi_controller.changed_users()},wdi_controller.changed_users=function(){for(var e=!1,t=0;t<this.feed_users.length;t++)if("#"===this.feed_users[t].username[0]){e=!0;break}e?(jQuery(".wdi_element_name_hashtag_top_recent").show(),jQuery(".wdi_element_name_show_username_on_thumb").hide()):(jQuery(".wdi_element_name_hashtag_top_recent").hide(),jQuery(".wdi_element_name_show_username_on_thumb").show())},wdi_controller.addUser=function(e){e.username=e.user_name,0==this.checkForDuplicateUser(e.username)?(newUser=jQuery('<div class="wdi_user"><a target="_blank" href="http://www.instagram.com/'+e.username+'"><span class="wdi_username">'+e.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_ajax").append(newUser),jQuery("#wdi_add_user_ajax_input").val(""),this.feed_users.push({id:e.id,username:e.username,profile_picture:""})):alert(e.username+" "+wdi_messages.already_added),this.updateConditionalFiltersUi(),wdi_controller.saveFeedAfterAjaxWait(!0)},wdi_controller.getUserProfilePic=function(e){for(var t=0;t<this.feed_users.length;t++)if(e==this.feed_users[t].username)return this.feed_users[t].profile_picture;return"false"},wdi_controller.conditionalFiltersTabInit=function(){this.setInitialFilters(),this.updateFiltersUi();var t=this;function e(){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")}}jQuery("#wdi_add_filter").on("click",function(){t.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(e){if(13==e.keyCode)return t.addConditionalFilter()&&jQuery(this).val(""),!1}),e(),jQuery("#WDI_wrap_conditional_filter_enable input").on("change",function(){e()}),jQuery("#WDI_conditional_filter_type").on("change",function(){switch("none"==jQuery(this).val()||jQuery("#WDI_conditional_filters").css("display","block"),jQuery(this).parent().find("label").css({display:"inline-block"}),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)}wdi_controller.updateFiltersUi()}),jQuery("#WDI_conditional_filter_type").trigger("change")},wdi_controller.addConditionalFilter=function(){var e=jQuery("#wdi_filter_input").val(),t=jQuery("#wdi_filter_type").val();if(filter={},""==e)return!1;switch(e=e.trim(),null==t&&("@"==e[0]?t="mention":"#"==e[0]?t="hashtag":"http"!=e.split("://")[0]&&"https"!=e.split("://")[0]||(t="url")),t){case"username":case"mention":"@"==e[0]&&(e=e.substr(1,e.length));break;case"hashtag":"#"==e[0]&&(e=e.substr(1,e.length));break;case"url":if(!/^(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.test(e))return alert(wdi_messages.invalid_url),!1}return filter={filter_type:t,filter_by:e,id:this.randomId()},null!=t?this.filterExists(filter)?(alert(e+" "+wdi_messages.already_added),!1):(this.conditionalFilters.push(filter),this.updateFiltersUi(),!0):(alert(wdi_messages.selectConditionType),!1)},wdi_controller.filterExists=function(e){for(var t=0;t<this.conditionalFilters.length;t++)if(this.conditionalFilters[t].filter_type==e.filter_type&&this.conditionalFilters[t].filter_by==e.filter_by)return!0;return!1},wdi_controller.updateFiltersUi=function(){for(var e,t=jQuery("#wdi_filters_ui").html(""),i=0;i<this.conditionalFilters.length;i++){if(0==i)if(1!=this.conditionalFilters.length)switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":break;case"OR":t.append(jQuery('<span class="wdi_logic">'+wdi_messages.either+"</span>"));break;case"NOR":t.append(jQuery('<span class="wdi_logic">'+wdi_messages.neither+"</span>"))}else switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":case"OR":break;case"NOR":t.append(jQuery('<span class="wdi_logic">'+wdi_messages.not+"</span>"))}switch(jQuery("#WDI_conditional_filter_type").val()){case"AND":e=wdi_messages.and;break;case"OR":e=wdi_messages.or;break;case"NOR":e=wdi_messages.nor}1<=i&&t.append(jQuery('<span class="wdi_logic">'+e+"</span>")),t.append(this.createUiElement(this.conditionalFilters[i]))}this.updateFilterTextarea()},wdi_controller.createUiElement=function(e){var t;switch(e.filter_type){case"mention":t="@";break;case"hashtag":t="#";break;case"location":t="%";break;default:t=""}return jQuery('<span data-id="'+e.id+'" class="wdi_filter_item wdi_filter_by_'+e.filter_type+'"></span>').html(t+e.filter_by+'<span onclick="wdi_controller.removeConditionalFilter(jQuery(this));" class="wdi_remove_filter">X</span>')},wdi_controller.randomId=function(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},wdi_controller.removeConditionalFilter=function(e){for(var t=e.parent().attr("data-id"),i=0;i<this.conditionalFilters.length;i++)this.conditionalFilters[i].id==t&&this.conditionalFilters.splice(i,1);this.updateFiltersUi()},wdi_controller.updateFilterTextarea=function(){var e=this.conditionalFilters,e=JSON.stringify(e);jQuery("#wdi_conditional_filters_textarea").val(e)},wdi_controller.setInitialFilters=function(){var e=[],t=jQuery("#wdi_conditional_filters_textarea").val();this.isJsonString(t)&&(e=JSON.parse(t)),this.conditionalFilters=e},wdi_controller.updateConditionalFiltersUi=function(){wdi_controller.updateFilterSource()},wdi_controller.updateFilterSource=function(){if("liked"!=jQuery('input[name="wdi_feed_settings[liked_feed]"]:checked').val()){var e,t,i=[];jQuery(".wdi_user").each(function(){e=(0!=jQuery(this).find(".wdi_username").length?jQuery(this).find(".wdi_username"):jQuery(this).find(".wdi_hashtag")).text(),t=jQuery(this).find("img").attr("src"),i.push({username:e,image:t})});for(var r=jQuery("#wdi_filter_source").html(""),a=0;a<i.length;a++){s="<div class='wdi_source_user'><span class='wdi_source_img'><img src='"+i[a].image+"'></span><span class='wdi_source_username'>"+i[a].username+"</span></div>";r.html(r.html()+s)}}else{var r,s="<div class='wdi_source_user'><span class='wdi_source_username'>Media I liked</span></div>";(r=jQuery("#wdi_filter_source").html("")).html(r.html()+s)}},wdi_controller.isJsonString=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},wdi_controller.getUserObj=function(e){var t=JSON.parse(wdi_options.wdi_authenticated_users_list);if("object"==typeof t){if("object"==typeof t[e]&&""!=t[e])return t[e];console.log("Error: User not exist on Users object")}else console.log("Error: Wrong response when parsed on users (JSON.parse)");return!1};
|
js/wdi_frontend.js
CHANGED
@@ -567,6 +567,9 @@ wdi_front.displayFeed = function (currentFeed, page_number) {
|
|
567 |
|
568 |
/* Type of simple pagination */
|
569 |
if (currentFeed.feed_row.feed_display_view == 'pagination') {
|
|
|
|
|
|
|
570 |
currentFeed.feed_row.number_of_photos = currentFeed.allResponseLength;
|
571 |
if(currentFeed.feed_row.feed_type == 'image_browser') {
|
572 |
currentFeed.paginator = parseInt(currentFeed.feed_row.number_of_photos);
|
@@ -795,8 +798,19 @@ wdi_front.masonryDisplayFeedItems = function (data, currentFeed) {
|
|
795 |
*/
|
796 |
wdi_front.getImageResolution = function (data) {
|
797 |
|
798 |
-
|
799 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
800 |
var resolution = originalHeight / originalWidth;
|
801 |
return resolution;
|
802 |
}
|
@@ -941,48 +955,56 @@ wdi_front.createObject = function (obj, currentFeed) {
|
|
941 |
case 'image':
|
942 |
var image_url = obj.images[currentFeed.feedImageResolution].url;
|
943 |
var videoUrl = undefined;
|
944 |
-
var
|
945 |
break;
|
946 |
case 'video':
|
947 |
var image_url = undefined;
|
948 |
var videoUrl = obj.hasOwnProperty('videos') ? obj['videos'][currentFeed.feedVideoResolution]['url'] : wdi_url.plugin_url + "images/video_missing.png";
|
949 |
-
var
|
950 |
break;
|
951 |
case 'carousel':
|
952 |
if( obj.carousel_media.length === 0 ){
|
953 |
var image_url = wdi_url.plugin_url + "images/missing.png";
|
954 |
var videoUrl = undefined;
|
955 |
-
var
|
956 |
} else {
|
957 |
switch (obj.carousel_media[0].type) {
|
958 |
case 'image':
|
959 |
-
var image_url = obj.carousel_media[0].images[currentFeed.feedImageResolution].url
|
960 |
var videoUrl = undefined;
|
961 |
-
var
|
962 |
break;
|
963 |
case 'video':
|
964 |
var image_url = undefined;
|
965 |
var videoUrl = obj.carousel_media[0].videos[currentFeed.feedVideoResolution].url;
|
966 |
-
var
|
967 |
break;
|
968 |
default:
|
969 |
var image_url = wdi_url.plugin_url + "images/missing.png";
|
970 |
-
var videoUrl =
|
971 |
-
var
|
972 |
}
|
973 |
}
|
974 |
break;
|
975 |
default:
|
976 |
var image_url = wdi_url.plugin_url + "images/missing.png";
|
977 |
-
var videoUrl =
|
978 |
-
var
|
979 |
}
|
980 |
|
981 |
var imageIndex = currentFeed.imageIndex;
|
982 |
|
983 |
var wdi_shape = 'square';
|
984 |
-
|
985 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
986 |
if(media_standard_h > media_standard_w){
|
987 |
wdi_shape = 'portrait';
|
988 |
}
|
@@ -993,9 +1015,9 @@ wdi_front.createObject = function (obj, currentFeed) {
|
|
993 |
if(obj_user_name === ""){
|
994 |
obj_user_name = "no_user";
|
995 |
}
|
996 |
-
var
|
997 |
'id': obj['id'],
|
998 |
-
'
|
999 |
'caption': wdi_front.escape_tags(caption),
|
1000 |
'image_url': image_url,
|
1001 |
'likes': ( typeof obj['likes']['count'] !== 'undefined' ) ? obj['likes']['count'] : obj['likes'],
|
@@ -1008,7 +1030,7 @@ wdi_front.createObject = function (obj, currentFeed) {
|
|
1008 |
'wdi_username': obj_user_name,
|
1009 |
'wdi_shape': wdi_shape
|
1010 |
};
|
1011 |
-
return
|
1012 |
}
|
1013 |
|
1014 |
|
@@ -1082,7 +1104,7 @@ wdi_front.getPhotoTemplate = function (currentFeed , type) {
|
|
1082 |
'<div class="wdi_photo_wrap">' +
|
1083 |
'<div class="wdi_photo_wrap_inner">' +
|
1084 |
'<div class="wdi_photo_img ' + wdi_shape_class + '">' +
|
1085 |
-
'<img class="wdi_img" ' + sourceAttr + '="<%=
|
1086 |
'<div class="wdi_photo_overlay ' + overlayCustomClass + '" >' + showUsernameOnThumb +
|
1087 |
'<div class="wdi_thumb_icon" ' + onclick + ' style="display:table;width:100%;height:100%;">' +
|
1088 |
'<div style="display:table-cell;vertical-align:middle;text-align:center;color:white;">' +
|
@@ -1189,11 +1211,7 @@ wdi_front.getSliderTemplate = function (currentFeed, type) {
|
|
1189 |
'<div class="wdi_photo_wrap">' +
|
1190 |
'<div class="wdi_photo_wrap_inner">' +
|
1191 |
'<div class="wdi_photo_img ' + wdi_shape_class + '">' +
|
1192 |
-
"
|
1193 |
-
'<video class="wdi_img" ' + sourceAttr + '="<%=video_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"></video>'+
|
1194 |
-
"<% } else {%>"+
|
1195 |
-
'<img class="wdi_img" ' + sourceAttr + '="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
|
1196 |
-
"<% }%>"+
|
1197 |
'<div class="wdi_photo_overlay ' + overlayCustomClass + '" >' + showUsernameOnThumb +
|
1198 |
'<div class="wdi_thumb_icon" ' + onclick + ' style="display:table;width:100%;height:100%;">' +
|
1199 |
'<div style="display:table-cell;vertical-align:middle;text-align:center;color:white;">' +
|
@@ -1309,7 +1327,7 @@ wdi_front.getVideoTemplate = function (currentFeed, type) {
|
|
1309 |
'<div class="wdi_photo_wrap">' +
|
1310 |
'<div class="wdi_photo_wrap_inner">' +
|
1311 |
'<div class="wdi_photo_img ' +wdi_shape_class + '">' +
|
1312 |
-
'<
|
1313 |
'<div class="wdi_photo_overlay ' + overlayCustomClass + '" ' + onclick + '>' + showUsernameOnThumb +
|
1314 |
'<div class="wdi_thumb_icon" style="display:table;width:100%;height:100%;">' +
|
1315 |
'<div style="display:table-cell;vertical-align:middle;text-align:center;color:white;">' +
|
@@ -1985,14 +2003,16 @@ wdi_front.parseLighboxData = function (currentFeed, filterFlag) {
|
|
1985 |
continue;
|
1986 |
}
|
1987 |
var thumb_url = (typeof data[i] !== 'undefined' && typeof data[i]['media_url'] !== 'undefined') ? data[i]['media_url'] : wdi_url.plugin_url + 'images/video_missing.png';
|
|
|
|
|
1988 |
if ( typeof data[i] !== 'undefined' && typeof data[i]['media_url'] === 'undefined' ) {
|
1989 |
if ( data[i]['type'] === 'carousel' ) {
|
1990 |
var carousel_media = data[i]['carousel_media'][0];
|
1991 |
if ( typeof carousel_media !== 'undefined' && typeof carousel_media['images'] !== 'undefined' ) {
|
1992 |
-
thumb_url = carousel_media['
|
1993 |
}
|
1994 |
else if ( typeof carousel_media !== 'undefined' && typeof carousel_media['videos'] !== 'undefined' ) {
|
1995 |
-
thumb_url = carousel_media['
|
1996 |
}
|
1997 |
}
|
1998 |
}
|
@@ -2019,7 +2039,7 @@ wdi_front.parseLighboxData = function (currentFeed, filterFlag) {
|
|
2019 |
'profile_picture': (typeof data[i]['user'] !== 'undefined') ? data[i]['user']['profile_picture'] : '',
|
2020 |
'thumb_url': thumb_url,
|
2021 |
'comments_data': (typeof data[i]['comments'] !== 'undefined') ? data[i]['comments']['data'] : '',
|
2022 |
-
'images': data[i]['images'],
|
2023 |
'carousel_media': (typeof data[i]['carousel_media'] !== "undefined") ? data[i]['carousel_media'] : null
|
2024 |
}
|
2025 |
popupData.push(obj);
|
567 |
|
568 |
/* Type of simple pagination */
|
569 |
if (currentFeed.feed_row.feed_display_view == 'pagination') {
|
570 |
+
if( currentFeed.allResponseLength > 1 ) {
|
571 |
+
jQuery("#wdi_pagination").removeClass("wdi_hidden");
|
572 |
+
}
|
573 |
currentFeed.feed_row.number_of_photos = currentFeed.allResponseLength;
|
574 |
if(currentFeed.feed_row.feed_type == 'image_browser') {
|
575 |
currentFeed.paginator = parseInt(currentFeed.feed_row.number_of_photos);
|
798 |
*/
|
799 |
wdi_front.getImageResolution = function (data) {
|
800 |
|
801 |
+
if ( data.type === 'image' ) {
|
802 |
+
var originalHeight = data['images']['standard_resolution']['height'];
|
803 |
+
var originalWidth = data['images']['standard_resolution']['width'];
|
804 |
+
}
|
805 |
+
else if ( data.type === 'video' ) {
|
806 |
+
var originalHeight = data['videos']['standard_resolution']['height'];
|
807 |
+
var originalWidth = data['videos']['standard_resolution']['width'];
|
808 |
+
}
|
809 |
+
else {
|
810 |
+
var originalHeight = data['carousel_media'][0]['images'] ? data['carousel_media'][0]['images']['standard_resolution']['height'] : data['carousel_media'][0]['videos']['standard_resolution']['height'];
|
811 |
+
var originalWidth = data['carousel_media'][0]['images'] ? data['carousel_media'][0]['images']['standard_resolution']['width'] : data['carousel_media'][0]['videos']['standard_resolution']['width'];
|
812 |
+
}
|
813 |
+
|
814 |
var resolution = originalHeight / originalWidth;
|
815 |
return resolution;
|
816 |
}
|
955 |
case 'image':
|
956 |
var image_url = obj.images[currentFeed.feedImageResolution].url;
|
957 |
var videoUrl = undefined;
|
958 |
+
var thumb_url = obj.hasOwnProperty('thumbnail') ? obj['thumbnail'] : wdi_url.plugin_url + "images/missing.png";
|
959 |
break;
|
960 |
case 'video':
|
961 |
var image_url = undefined;
|
962 |
var videoUrl = obj.hasOwnProperty('videos') ? obj['videos'][currentFeed.feedVideoResolution]['url'] : wdi_url.plugin_url + "images/video_missing.png";
|
963 |
+
var thumb_url = obj.hasOwnProperty('thumbnail') ? obj['thumbnail'] : wdi_url.plugin_url + "images/video_missing.png";
|
964 |
break;
|
965 |
case 'carousel':
|
966 |
if( obj.carousel_media.length === 0 ){
|
967 |
var image_url = wdi_url.plugin_url + "images/missing.png";
|
968 |
var videoUrl = undefined;
|
969 |
+
var thumb_url = wdi_url.plugin_url + "images/missing.png";
|
970 |
} else {
|
971 |
switch (obj.carousel_media[0].type) {
|
972 |
case 'image':
|
973 |
+
var image_url = obj.carousel_media[0].images[currentFeed.feedImageResolution].url;
|
974 |
var videoUrl = undefined;
|
975 |
+
var thumb_url = obj.hasOwnProperty('thumbnail') ? obj['thumbnail'] : wdi_url.plugin_url + "images/missing.png";
|
976 |
break;
|
977 |
case 'video':
|
978 |
var image_url = undefined;
|
979 |
var videoUrl = obj.carousel_media[0].videos[currentFeed.feedVideoResolution].url;
|
980 |
+
var thumb_url = obj.hasOwnProperty('thumbnail') ? obj['thumbnail'] : wdi_url.plugin_url + "images/video_missing.png";
|
981 |
break;
|
982 |
default:
|
983 |
var image_url = wdi_url.plugin_url + "images/missing.png";
|
984 |
+
var videoUrl = undefined;
|
985 |
+
var thumb_url = wdi_url.plugin_url + "images/missing.png";
|
986 |
}
|
987 |
}
|
988 |
break;
|
989 |
default:
|
990 |
var image_url = wdi_url.plugin_url + "images/missing.png";
|
991 |
+
var videoUrl = undefined;
|
992 |
+
var thumb_url = wdi_url.plugin_url + "images/missing.png";
|
993 |
}
|
994 |
|
995 |
var imageIndex = currentFeed.imageIndex;
|
996 |
|
997 |
var wdi_shape = 'square';
|
998 |
+
if ( obj.type === 'image' ) {
|
999 |
+
var media_standard_h = obj['images']['standard_resolution']['height'];
|
1000 |
+
var media_standard_w = obj['images']['standard_resolution']['width'];
|
1001 |
+
} else if ( obj.type === 'video' ) {
|
1002 |
+
var media_standard_h = obj['videos']['standard_resolution']['height'] ;
|
1003 |
+
var media_standard_w = obj['videos']['standard_resolution']['width'] ;
|
1004 |
+
} else {
|
1005 |
+
var media_standard_h = obj['carousel_media'][0]['images'] ? obj['carousel_media'][0]['images']['standard_resolution']['height'] : obj['carousel_media'][0]['videos']['standard_resolution']['height'] ;
|
1006 |
+
var media_standard_w = obj['carousel_media'][0]['images'] ? obj['carousel_media'][0]['images']['standard_resolution']['width'] : obj['carousel_media'][0]['videos']['standard_resolution']['width'] ;
|
1007 |
+
}
|
1008 |
if(media_standard_h > media_standard_w){
|
1009 |
wdi_shape = 'portrait';
|
1010 |
}
|
1015 |
if(obj_user_name === ""){
|
1016 |
obj_user_name = "no_user";
|
1017 |
}
|
1018 |
+
var igMediaObject = {
|
1019 |
'id': obj['id'],
|
1020 |
+
'thumb_url': thumb_url,
|
1021 |
'caption': wdi_front.escape_tags(caption),
|
1022 |
'image_url': image_url,
|
1023 |
'likes': ( typeof obj['likes']['count'] !== 'undefined' ) ? obj['likes']['count'] : obj['likes'],
|
1030 |
'wdi_username': obj_user_name,
|
1031 |
'wdi_shape': wdi_shape
|
1032 |
};
|
1033 |
+
return igMediaObject;
|
1034 |
}
|
1035 |
|
1036 |
|
1104 |
'<div class="wdi_photo_wrap">' +
|
1105 |
'<div class="wdi_photo_wrap_inner">' +
|
1106 |
'<div class="wdi_photo_img ' + wdi_shape_class + '">' +
|
1107 |
+
'<img class="wdi_img" ' + sourceAttr + '="<%=thumb_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
|
1108 |
'<div class="wdi_photo_overlay ' + overlayCustomClass + '" >' + showUsernameOnThumb +
|
1109 |
'<div class="wdi_thumb_icon" ' + onclick + ' style="display:table;width:100%;height:100%;">' +
|
1110 |
'<div style="display:table-cell;vertical-align:middle;text-align:center;color:white;">' +
|
1211 |
'<div class="wdi_photo_wrap">' +
|
1212 |
'<div class="wdi_photo_wrap_inner">' +
|
1213 |
'<div class="wdi_photo_img ' + wdi_shape_class + '">' +
|
1214 |
+
'<img class="wdi_img" ' + sourceAttr + '="<%=thumb_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
|
|
|
|
|
|
|
|
|
1215 |
'<div class="wdi_photo_overlay ' + overlayCustomClass + '" >' + showUsernameOnThumb +
|
1216 |
'<div class="wdi_thumb_icon" ' + onclick + ' style="display:table;width:100%;height:100%;">' +
|
1217 |
'<div style="display:table-cell;vertical-align:middle;text-align:center;color:white;">' +
|
1327 |
'<div class="wdi_photo_wrap">' +
|
1328 |
'<div class="wdi_photo_wrap_inner">' +
|
1329 |
'<div class="wdi_photo_img ' +wdi_shape_class + '">' +
|
1330 |
+
'<img class="wdi_img" ' + sourceAttr + '="<%=thumb_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
|
1331 |
'<div class="wdi_photo_overlay ' + overlayCustomClass + '" ' + onclick + '>' + showUsernameOnThumb +
|
1332 |
'<div class="wdi_thumb_icon" style="display:table;width:100%;height:100%;">' +
|
1333 |
'<div style="display:table-cell;vertical-align:middle;text-align:center;color:white;">' +
|
2003 |
continue;
|
2004 |
}
|
2005 |
var thumb_url = (typeof data[i] !== 'undefined' && typeof data[i]['media_url'] !== 'undefined') ? data[i]['media_url'] : wdi_url.plugin_url + 'images/video_missing.png';
|
2006 |
+
var thumb_url = data[i]['thumbnail'];
|
2007 |
+
//todo what is this??????
|
2008 |
if ( typeof data[i] !== 'undefined' && typeof data[i]['media_url'] === 'undefined' ) {
|
2009 |
if ( data[i]['type'] === 'carousel' ) {
|
2010 |
var carousel_media = data[i]['carousel_media'][0];
|
2011 |
if ( typeof carousel_media !== 'undefined' && typeof carousel_media['images'] !== 'undefined' ) {
|
2012 |
+
thumb_url = carousel_media['thumbnail'];
|
2013 |
}
|
2014 |
else if ( typeof carousel_media !== 'undefined' && typeof carousel_media['videos'] !== 'undefined' ) {
|
2015 |
+
thumb_url = carousel_media['thumbnail'];
|
2016 |
}
|
2017 |
}
|
2018 |
}
|
2039 |
'profile_picture': (typeof data[i]['user'] !== 'undefined') ? data[i]['user']['profile_picture'] : '',
|
2040 |
'thumb_url': thumb_url,
|
2041 |
'comments_data': (typeof data[i]['comments'] !== 'undefined') ? data[i]['comments']['data'] : '',
|
2042 |
+
'images': data[i]['images'] ? data[i]['images'] : data[i]['videos'],
|
2043 |
'carousel_media': (typeof data[i]['carousel_media'] !== "undefined") ? data[i]['carousel_media'] : null
|
2044 |
}
|
2045 |
popupData.push(obj);
|
js/wdi_frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"undefined"==typeof wdi_front&&(wdi_front={type:"not_declared"});var wdi_error_show=!(wdi_front.detectEvent=function(){var e="click";return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())&&(e="touchend"),e}),wdi_error_init=!1;function wdi_baseName(e){var i=e.substr(e.lastIndexOf("/"));return e.replace(i,"")}wdi_front.escape_tags=function(e){return void 0===e&&(e=""),e=e.toString().replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")},wdi_front.show_alert=function(e,i,d){var r,t;void 0!==(d=jQuery("#wdi_feed_"+d.feed_row.wdi_feed_counter))&&(wdi_error_show=!0,d.find(".wdi_spinner").remove(),r=d.find(".wdi_js_error"),t=d.find(".wdi_token_error"),0!=i&&(void 0!==i.meta&&1==i.meta.error&&"OAuthException"===i.meta.error_type||void 0!==i.error&&"OAuthException"===i.error.type)?(d.find(".wdi_single_user").remove(),t.removeClass("wdi_hidden"),"1"!=wdi_front_messages.wdi_token_error_flag&&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(e){}})):void 0!==i.error&&void 0!==i.error.message&&(r.html(i.error.message),d.find(".wdi_single_user").remove(),r.removeClass("wdi_js_error"),r.addClass("wdi_js_error_no_animate"),jQuery(".wdi_js_error_no_animate").show()),wdi_front_messages.show_alerts||console.log("%c"+e,"color:#cc0000;")),wdi_error_show=!0},wdi_front.globalInit=function(){var e=wdi_front.feed_counter,i=0;void 0!==wdi_ajax.ajax_response&&(i=wdi_feed_counter_init.wdi_feed_counter_init);for(var d,r=i;r<=e;r++)0!==jQuery("#wdi_feed_"+r).length&&((d=new WDIFeed(window["wdi_feed_"+r])).instagram=new WDIInstagram,d.instagram.filterArguments={feed:d},d.instagram.addToken(d.feed_row.access_token),wdi_front.access_token=d.feed_row.access_token,d.dataLoaded=0,d.dataStorageRaw=[],d.dataStorage=[],d.dataStorageList=[],d.allResponseLength=0,d.currentResponseLength=0,d.temproraryUsersData=[],d.removedUsers=0,d.nowLoadingImages=!0,d.imageIndex=0,d.resIndex=0,d.currentPage=1,d.currentPageLoadMore=0,d.userSortFlags=[],d.customFilterChanged=!1,d.maxConditionalFiltersRequestCount=10,d.instagramRequestCounter=0,d.mediaRequestsDone=!1,d.conditionalFilterBuffer=[],d.stopInfiniteScrollFlag=!1,"masonry"==d.feed_row.feed_type&&(d.displayedData=[]),"pagination"==d.feed_row.feed_display_view?(d.feed_row.resort_after_load_more=0,"image_browser"!=d.feed_row.feed_type?(d.feed_row.load_more_number=parseInt(d.feed_row.pagination_per_page_number),d.feed_row.number_of_photos=d.allResponseLength):(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):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),"masonry"==d.feed_row.feed_type&&jQuery(window).trigger("resize"),wdi_front.bindEvents(d),window["wdi_feed_"+r]=d,wdi_front.init(d))},wdi_front.init=function(e){if(jQuery(".wdi_js_error").hide(),e.photoCounter=e.feed_row.number_of_photos,"liked"==e.feed_row.liked_feed)e.feed_users=["self"];else{if(!wdi_front.isJsonString(e.feed_row.feed_users))return void wdi_front.show_alert(wdi_front_messages.invalid_users_format,!1,e);e.feed_users=JSON.parse(e.feed_row.feed_users)}var i=[],d=[],r=[];void 0!==window.wdi_all_tags&&(i=window.wdi_all_tags);for(var t=0;t<e.feed_users.length;t++)"#"===e.feed_users[t].username[0]&&void 0!==e.feed_users[t].tag_id?(i[e.feed_users[t].tag_id]=e.feed_users[t],r[t]=e.feed_users[t]):d[0]=e.feed_users[t];window.wdi_all_tags=i,e.feed_users=void 0===r||wdi_front.isEmpty(r)?d:r;var a=wdi_front.getFeedItemResolution(e);e.feedImageResolution=a.image,e.feedVideoResolution=a.video,e.dataCount=e.feed_users.length;for(var o=0;o<e.dataCount;o++)wdi_front.instagramRequest(o,e);0<e.feed_row.number_of_photos&&wdi_front.ajaxLoader(e),"1"===e.feed_row.display_header&&wdi_front.show("header",e),"1"===e.feed_row.show_usernames&&wdi_front.show("users",e)},wdi_front.getFeedItemResolution=function(e){var i={image:"standard_resolution",video:"standard_resolution"};if("thumbnail"===e.feed_row.feed_resolution)return{image:"thumbnail",video:"low_bandwidth"};if("low"===e.feed_row.feed_resolution)return{image:"low_resolution",video:"low_resolution"};if("standard"===e.feed_row.feed_resolution)return{image:"standard_resolution",video:"standard_resolution"};var d=jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");d.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>'),wdi_responsive.columnControl(e,1);e=d.attr("wdi-res").split("wdi_col_");if(d.find("#wdi_feed_item_example").remove(),2!==e.length)return i;e=parseInt(e[1]);if(e<=0)return i;e=d.width()/e-10;return e<=150?(i.image="thumbnail",i.video="low_bandwidth"):150<e&&e<=320?(i.image="low_resolution",i.video="low_resolution"):(i.image="standard_resolution",i.video="standard_resolution"),i},wdi_front.isJsonString=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},wdi_front.instagramRequest=function(i,d){var r=this,e=d.feed_users;if("string"==typeof e[i]&&"self"===e[i])d.instagram.getRecentLikedMedia({success:function(e){void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,d),d.mediaRequestsDone=!0,0!=(e=r.checkMediaResponse(e,d))&&r.saveSelfUserData(e,d)}});else if("hashtag"==this.getInputType(e[i].username)){if(this.isJsonString(d.feed_row.feed_users))for(var t in json_feed_users=JSON.parse(d.feed_row.feed_users),json_feed_users)"#"!==json_feed_users[t].username.charAt(0)&&(user=json_feed_users[t]);d.instagram.getTagRecentMedia(this.stripHashtag(e[i].username),{feed_id:d.feed_row.id,user_id:user.id,user_name:user.username,success:function(e){if(void 0!==e.error&&"undefined"!=e.error.type||void 0!==e.meta&&1==e.meta.error)return d.dataLoaded=1,wdi_front.show_alert(!1,e,d),!1;d.mediaRequestsDone=!0,e=r.checkMediaResponse(e,d),d.dataLoaded=1,0!=e&&r.saveUserData(e,d.feed_users[i],d)}},null,d.feed_row.hashtag_top_recent,0)}else"user"==this.getInputType(e[i].username)&&d.instagram.getUserMedia({feed_id:d.feed_row.id,user_id:e[i].id,user_name:e[i].username,success:function(e){if(void 0!==e.meta&&1==typeof e.meta.error)return d.dataLoaded=1,wdi_front.show_alert(!1,e,d),!1;d.mediaRequestsDone=!0,d.dataLoaded=1,0!=(e=r.checkMediaResponse(e,d))?r.saveUserData(e,d.feed_users[i],d):wdi_front.allImagesLoaded(d)}},"",0)},wdi_front.isHashtag=function(e){return"#"===e[0]},wdi_front.saveUserData=function(e,i,d){e.user_id=i.id,e.username=i.username,"#"===e.user_id[0]&&(e.data=wdi_front.appendRequestHashtag(e.data,e.user_id)),d.usersData.push(e),d.currentResponseLength=wdi_front.getArrayContentLength(d.usersData,"data"),d.allResponseLength+=d.currentResponseLength,d.dataCount==d.usersData.length&&(d.currentResponseLength<d.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(d)?wdi_front.loadMore("initial-keep",d):(wdi_front.displayFeed(d),wdi_front.applyFilters(d),wdi_front.activeUsersCount(d)||"load_more_btn"==d.feed_row.feed_display_view&&((d=jQuery("#wdi_feed_"+d.feed_row.wdi_feed_counter)).find(".wdi_load_more").addClass("wdi_hidden"),d.find(".wdi_spinner").addClass("wdi_hidden"))))},wdi_front.saveSelfUserData=function(e,i){e.user_id="",e.username="",i.usersData.push(e),i.currentResponseLength=wdi_front.getArrayContentLength(i.usersData,"data"),i.allResponseLength+=i.currentResponseLength,i.dataCount==i.usersData.length&&(i.currentResponseLength<i.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(i)?wdi_front.loadMore("initial-keep",i):(wdi_front.displayFeed(i),wdi_front.applyFilters(i),wdi_front.activeUsersCount(i)||"load_more_btn"==i.feed_row.feed_display_view&&((i=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter)).find(".wdi_load_more").addClass("wdi_hidden"),i.find(".wdi_spinner").addClass("wdi_hidden"))))},wdi_front.userHasNoPhoto=function(e,i){var d=0,r=e.usersData;void 0!==i&&(r=i);for(var t=0;t<r.length;t++)void 0===r[t].pagination&&(r[t].pagination=[]),"liked"===e.feed_row.liked_feed?void 0===r[t].pagination.next_max_like_id&&d++:void 0===r[t].pagination.next_max_id&&d++;return d==r.length?1:0},wdi_front.appendRequestHashtag=function(e,i){for(var d=0;d<e.length;d++)e[d].wdi_hashtag=i;return e},wdi_front.displayFeed=function(e,i){void 0===i&&(i=1);for(var d=0;d<e.usersData.length;d++)e.dataStorageList=e.usersData[d].data,e.dataStorage[d]=e.usersData[d].data;var r=e.feed_row.number_of_photos,t=e.feed_row.load_more_number,a=0,o=r,r="";"pagination"==e.feed_row.feed_display_view?(e.feed_row.number_of_photos=e.allResponseLength,"image_browser"==e.feed_row.feed_type?e.paginator=parseInt(e.feed_row.number_of_photos):e.paginator=Math.ceil(parseInt(e.feed_row.number_of_photos)/parseInt(t)),r=(o=1===i?(a=0,"image_browser"==e.feed_row.feed_type?1:t):"image_browser"==e.feed_row.feed_type?(a=i-1)+1:(a=(i-1)*t)+t,e.dataStorageList.slice(a,o))):void 0!==e.already_loaded_count?(a=parseInt(e.already_loaded_count),o=e.already_loaded_count+parseInt(t),r=e.dataStorageList.slice(a,o),e.already_loaded_count+=r.length):(r=e.dataStorageList.slice(a,o),e.already_loaded_count=r.length),e.parsedData=wdi_front.parseLighboxData(e,!0),"masonry"==e.feed_row.feed_type&&wdi_front.masonryDisplayFeedItems(r,e),"thumbnails"!=e.feed_row.feed_type&&"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||wdi_front.displayFeedItems(r,e),"pagination"==e.feed_row.feed_display_view&&e.currentPage<e.paginator&&jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter).find("#wdi_last_page").removeClass("wdi_disabled"),wdi_front.updateUsersImages(e)},wdi_front.updateUsersImages=function(i){jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter).find(".wdi_single_user .wdi_user_img_wrap img").each(function(){if((jQuery(this).attr("src")==wdi_url.plugin_url+"images/missing.png"||""==jQuery(this).attr("src"))&&"liked"!=i.feed_row.liked_feed)for(var e=0;e<i.usersData.length;e++)i.usersData[e].username==jQuery(this).parent().parent().find("h3").text()&&0!=i.usersData[e].data.length&&jQuery(this).attr("src",i.usersData[e].data[0].images.thumbnail.url)})},wdi_front.checkLoaded=function(e){var i=e.feed_row.wdi_feed_counter,d=jQuery("#wdi_feed_"+i);e.dataStorageList.length>e.already_loaded_count?d.find(".wdi_load_more").removeClass("wdi_hidden"):d.find(".wdi_load_more").addClass("wdi_hidden"),d.find(".wdi_spinner").addClass("wdi_hidden"),setTimeout(function(){d.find(".wdi_ajax_loading").addClass("wdi_hidden")},500)},wdi_front.masonryDisplayFeedItems=function(e,i){var d=[],r=[];if(0!=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length){jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_masonry_column").each(function(){1==i.feed_row.resort_after_load_more&&(jQuery(this).html(""),i.imageIndex=0),1==i.customFilterChanged&&(jQuery(this).html(""),i.imageIndex=0),"pagination"==i.feed_row.feed_display_view?d.push(0):d.push(jQuery(this).height()),r.push(jQuery(this))}),1==i.customFilterChanged&&(i.customFilterChanged=!1);for(var t,a,o,n=0;n<e.length;n++)"object"==typeof e[n].videos&&null==e[n].videos.standard_resolution||(i.displayedData.push(e[n]),t="",void 0!==e[n].wdi_hashtag&&(t=e[n].wdi_hashtag),a="image"==e[n].type?wdi_front.getPhotoTemplate(i,t):e[n].hasOwnProperty("videos")||"video"==e[n].type?wdi_front.getVideoTemplate(i,t):wdi_front.getSliderTemplate(i,t),o=e[n],t=a(wdi_front.createObject(o,i)),a=wdi_front.array_min(d),o=wdi_front.getImageResolution(e[n]),r[a.index].html(r[a.index].html()+t),d[a.index]+=r[a.index].width()*o,i.imageIndex++,"pagination"==i.feed_row.feed_display_view&&((n+1)%i.feed_row.pagination_per_page_number==0?i.resIndex+=i.freeSpaces+1:i.resIndex++));i.wdi_loadedImages=0;var s=!1;i.wdi_load_count=n;var _=i.feed_row.wdi_feed_counter;jQuery("#wdi_feed_"+_+" .wdi_img").on("load",function(){i.wdi_loadedImages++,!1===s&&(wdi_responsive.columnControl(i,1),s=!0)});wdi_front.checkLoaded(i),1==i.paginatorNextFlag&&wdi_front.updatePagination(i,"next"),i.infiniteScrollFlag=!1}},wdi_front.getImageResolution=function(e){var i=e.images.standard_resolution.width;return e.images.standard_resolution.height/i},wdi_front.getDataLength=function(e,i){var d=0;if(void 0===i)for(var r=0;r<e.dataStorage.length;r++)d+=e.dataStorage[r].length;else for(r=0;r<i.length;r++)d+=i[r].length;return d},wdi_front.getArrayContentLength=function(e,i){for(var d=0,r=0;r<e.length;r++)"finished"!=e[r].finished&&void 0===e[r].error&&(d+=e[r][i].length);return d},wdi_front.displayFeedItems=function(e,d){if(0!=jQuery("#wdi_feed_"+d.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length){for(var i,r,t,a=d.feed_row.wdi_feed_counter,o=jQuery("#wdi_feed_"+a+" .wdi_feed_wrapper"),n=0;n<e.length;n++){if(void 0===e[n])return;"object"==typeof e[n].videos&&null==e[n].videos.standard_resolution||(t="",void 0!==e[d.imageIndex=n].wdi_hashtag&&(t=e[n].wdi_hashtag),i="image"==e[n].type?wdi_front.getPhotoTemplate(d,t):e[n].hasOwnProperty("videos")?wdi_front.getVideoTemplate(d,t):wdi_front.getSliderTemplate(d,t),r=e[n],t="",void 0!==(r=wdi_front.createObject(r,d))&&(t=i(r)),o.html(o.html()+t),d.imageIndex++,"pagination"==d.feed_row.feed_display_view&&((n+1)%d.feed_row.pagination_per_page_number==0?d.resIndex+=d.freeSpaces+1:d.resIndex++))}!function(){var e=d.feed_row.wdi_feed_counter,i=jQuery("#wdi_feed_"+e);d.dataStorageList.length>d.already_loaded_count?i.find(".wdi_load_more").removeClass("wdi_hidden"):i.find(".wdi_load_more").addClass("wdi_hidden"),i.find(".wdi_spinner").addClass("wdi_hidden");setTimeout(function(){i.find(".wdi_ajax_loading").addClass("wdi_hidden")},500)}()}},wdi_front.checkFeedFinished=function(e){for(var i=0;i<e.usersData.length;i++)if(void 0===e.usersData[i].finished)return!1;return!0},wdi_front.createObject=function(e,i){var d=null!=e.caption?e.caption.text:" ";switch(e.type){case"image":var r=e.images[i.feedImageResolution].url,t=void 0,a="image";break;case"video":r=void 0,t=e.hasOwnProperty("videos")?e.videos[i.feedVideoResolution].url:wdi_url.plugin_url+"images/video_missing.png",a="video";break;case"carousel":if(0===e.carousel_media.length)r=wdi_url.plugin_url+"images/missing.png",t=void 0,a="image";else switch(e.carousel_media[0].type){case"image":r=e.carousel_media[0].images[i.feedImageResolution].url,t=void 0,a="image";break;case"video":r=void 0,t=e.carousel_media[0].videos[i.feedVideoResolution].url,a="video";break;default:r=wdi_url.plugin_url+"images/missing.png",t=wdi_url.plugin_url+"images/video_missing.png",a="image"}break;default:r=wdi_url.plugin_url+"images/missing.png",t=wdi_url.plugin_url+"images/video_missing.png",a="image"}var o=i.imageIndex,n="square",s=e.images.standard_resolution.height,_=e.images.standard_resolution.width;_<s?n="portrait":s<_&&(n="landscape");_=e.user.username;return""===_&&(_="no_user"),{id:e.id,thumbType:a,caption:wdi_front.escape_tags(d),image_url:r,likes:void 0!==e.likes.count?e.likes.count:e.likes,comments:void 0!==e.comments.count?e.comments.count:e.comments,wdi_index:o,wdi_res_index:i.resIndex,wdi_media_user:_,link:e.link,video_url:t,wdi_username:_,wdi_shape:n}},wdi_front.getPhotoTemplate=function(e,i){var d="",r="",t="",a="tenweb-i-arrows-out",o="";"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(a=""),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(o='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(d+=" wdi_full_caption");var n="";switch("blog_style"!==e.feed_row.feed_type&&(n="masonry"==e.feed_row.feed_type?"wdi_responsive.showMasonryCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");":"wdi_responsive.showCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");"),e.feed_row.feed_item_onclick){case"lightbox":r="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":r="onclick=\"window.open ('<%= link%>','_blank')\"",t="wdi_hover_off",a="";break;case"custom_redirect":r="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",t="wdi_hover_off",a="";break;case"none":t="wdi_cursor_off wdi_hover_off",a=r=""}var s='<div class="wdi_feed_item '+d+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> wdi_type="image" id="wdi_'+e.feed_row.wdi_feed_counter+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img <%= wdi_shape == \'square\' ? \'wdi_shape_square\' : (wdi_shape == \'portrait\' ? \'wdi_shape_portrait\' : (wdi_shape == \'landscape\' ? \'wdi_shape_landscape\' : \'wdi_shape_square\') ) %>"><img class="wdi_img" src="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+t+'" >'+o+'<div class="wdi_thumb_icon" '+r+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="tenweb-i '+a+'"></i></div></div></div></div></div></div>',d=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(s+='<div class="wdi_photo_meta">',o=void 0!==e.dataStorageList[d].likes.count?e.dataStorageList[d].likes.count:e.dataStorageList[d].likes,"1"===e.feed_row.show_likes&&0!==o&&(s+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),d=void 0!==e.dataStorageList[d].comments.count?e.dataStorageList[d].comments.count:e.dataStorageList[d].comments,"1"===e.feed_row.show_comments&&0!==d&&(s+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),s+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(s+='<div class="wdi_photo_title" onclick='+n+" ><%=caption%></div>"),s+="</div>"),s+="</div>",_.template(s)},wdi_front.getSliderTemplate=function(e,i){var d="",r="",t="",a="tenweb-i-clone",o="";"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(a=""),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(o='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(d+=" wdi_full_caption");var n="";switch("blog_style"!==e.feed_row.feed_type&&(n="masonry"==e.feed_row.feed_type?"wdi_responsive.showMasonryCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");":"wdi_responsive.showCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");"),e.feed_row.feed_item_onclick){case"lightbox":r="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":r="onclick=\"window.open ('<%= link%>','_blank')\"",t="wdi_hover_off",a="tenweb-i-clone";break;case"custom_redirect":r="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",t="wdi_hover_off",a="";break;case"none":t="wdi_cursor_off wdi_hover_off",a=r=""}var s='<div class="wdi_feed_item '+d+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> wdi_type="slideshow" id="wdi_'+e.feed_row.wdi_feed_counter+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img <%= wdi_shape == \'square\' ? \'wdi_shape_square\' : (wdi_shape == \'portrait\' ? \'wdi_shape_portrait\' : (wdi_shape == \'landscape\' ? \'wdi_shape_landscape\' : \'wdi_shape_square\') ) %>"><% if (thumbType === \'video\') { %><video class="wdi_img" src="<%=video_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"></video><% } else {%><img class="wdi_img" src="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><% }%><div class="wdi_photo_overlay '+t+'" >'+o+'<div class="wdi_thumb_icon" '+r+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="tenweb-i '+a+'"></i></div></div></div></div></div></div>',d=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(s+='<div class="wdi_photo_meta">',o=void 0!==e.dataStorageList[d].likes.count?e.dataStorageList[d].likes.count:e.dataStorageList[d].likes,"1"===e.feed_row.show_likes&&0!==o&&(s+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),d=void 0!==e.dataStorageList[d].comments.count?e.dataStorageList[d].comments.count:e.dataStorageList[d].comments,"1"===e.feed_row.show_comments&&0!==d&&(s+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),s+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(s+='<div class="wdi_photo_title" onclick='+n+" ><%=caption%></div>"),s+="</div>"),s+="</div>",_.template(s)},wdi_front.replaceToVideo=function(e,i,d){overlayHtml="<video style='width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;' controls=''><source src='"+e+"' type='video/mp4'>Your browser does not support the video tag. </video>",jQuery("#wdi_feed_"+d+' [wdi_index="'+i+'"] .wdi_photo_wrap_inner').html(overlayHtml),jQuery("#wdi_feed_"+d+' [wdi_index="'+i+'"] .wdi_photo_wrap_inner video').get(0).play()},wdi_front.getVideoTemplate=function(e,i){var d="",r="tenweb-i-play",t="",a="",o="";"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(o='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(d+=" wdi_full_caption");var n="";switch("blog_style"!==e.feed_row.feed_type&&(n="masonry"==e.feed_row.feed_type?"wdi_responsive.showMasonryCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");":"wdi_responsive.showCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");"),e.feed_row.feed_item_onclick){case"lightbox":t="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":t="onclick=\"window.open ('<%= link%>','_blank')\"",a="wdi_hover_off",r="tenweb-i-play";break;case"custom_redirect":t="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",a="wdi_hover_off",r="";break;case"none":a="wdi_cursor_off wdi_hover_off",r="","blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(t="onclick=wdi_front.replaceToVideo('<%= video_url%>','<%= wdi_index%>',"+e.feed_row.wdi_feed_counter+")",a="",r="tenweb-i-play")}var s='<div class="wdi_feed_item '+d+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> wdi_type="image" id="wdi_'+e.feed_row.wdi_feed_counter+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img <%= wdi_shape == \'square\' ? \'wdi_shape_square\' : (wdi_shape == \'portrait\' ? \'wdi_shape_portrait\' : (wdi_shape == \'landscape\' ? \'wdi_shape_landscape\' : \'wdi_shape_square\') ) %>"><video class="wdi_img" src="<%=video_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"></video><div class="wdi_photo_overlay '+a+'" '+t+">"+o+'<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="tenweb-i '+r+'"></i></div></div></div></div></div></div>',d=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(s+='<div class="wdi_photo_meta">',o=void 0!==e.dataStorageList[d].likes.count?e.dataStorageList[d].likes.count:e.dataStorageList[d].likes,"1"===e.feed_row.show_likes&&0!==o&&(s+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),d=void 0!==e.dataStorageList[d].comments.count?e.dataStorageList[d].comments.count:e.dataStorageList[d].comments,"1"===e.feed_row.show_comments&&0!==d&&(s+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),s+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(s+='<div class="wdi_photo_title" onclick='+n+" ><%=caption%></div>"),s+="</div>"),s+="</div>",_.template(s)},wdi_front.bindEvents=function(e){0!=jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length&&("load_more_btn"==e.feed_row.feed_display_view&&jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_load_more_container").on(wdi_front.clickOrTouch,function(){jQuery(document).find("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_load_more").addClass("wdi_hidden"),jQuery(document).find("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_spinner").removeClass("wdi_hidden"),setTimeout(function(){wdi_front.loadMore(jQuery(this).find(".wdi_load_more_wrap"),e)},1e3)}),"pagination"==e.feed_row.feed_display_view&&(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_next").on(wdi_front.clickOrTouch,function(){parseInt(jQuery("#wdi_current_page").text())+1>e.paginator||(e.currentPage=parseInt(jQuery("#wdi_current_page").text())+1,wdi_front.changePage(jQuery(this),e))}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_prev").on(wdi_front.clickOrTouch,function(){parseInt(jQuery("#wdi_current_page").text())-1<=0||(e.currentPage=parseInt(jQuery("#wdi_current_page").text())-1,wdi_front.changePage(jQuery(this),e))}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_last_page").on(wdi_front.clickOrTouch,function(){e.currentPage=e.paginator,wdi_front.changePage(jQuery(this),e)}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_first_page").on(wdi_front.clickOrTouch,function(){e.currentPage=1,wdi_front.changePage(jQuery(this),e)}),e.paginatorNextFlag=!1),"infinite_scroll"==e.feed_row.feed_display_view&&(jQuery(window).on("scroll",function(){wdi_front.infiniteScroll(e)}),e.infiniteScrollFlag=!1))},wdi_front.infiniteScroll=function(e){jQuery(window).scrollTop()+jQuery(window).height()-100>=jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_infinite_scroll").offset().top&&(e.dataStorageList.length>e.already_loaded_count||void 0===e.already_loaded_count?(e.infiniteScrollFlag=!0,wdi_front.loadMore(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_infinite_scroll"),e)):wdi_front.allImagesLoaded(e))},wdi_front.changePage=function(e,i){var d=e.closest(".wdi_feed_container");d.find(".wdi_page_loading").removeClass("wdi_hidden"),new_page_number=i.currentPage,1<new_page_number?jQuery("#wdi_first_page").removeClass("wdi_disabled"):1===new_page_number&&jQuery("#wdi_first_page").addClass("wdi_disabled"),new_page_number==parseInt(i.paginator)?jQuery("#wdi_last_page").addClass("wdi_disabled"):new_page_number<parseInt(i.paginator)&&jQuery("#wdi_last_page").removeClass("wdi_disabled"),("masonry"==i.feed_row.feed_type?e.parent().parent().parent().find(".wdi_feed_wrapper .wdi_masonry_column"):e.parent().parent().parent().find(".wdi_feed_wrapper")).empty(),e.parent().find("#wdi_current_page").empty().text(new_page_number),wdi_front.displayFeed(i,new_page_number),d.find(".wdi_page_loading").addClass("wdi_hidden")},wdi_front.updatePagination=function(e,i,d){var r="#wdi_feed_"+e.feed_row.wdi_feed_counter;switch(jQuery(r+' [wdi_page="'+e.currentPage+'"]').each(function(){jQuery(this).removeClass("wdi_hidden")}),i){case"next":var d=e.currentPage-1;jQuery(r+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(r+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"prev":d=e.currentPage+1;jQuery(r+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(r+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"custom":(d=d)!=e.currentPage&&(jQuery(r+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(r+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")}))}e.paginatorNextFlag=!1,jQuery(r+" .wdi_feed_wrapper").css("height","auto"),jQuery(r+" #wdi_current_page").text(e.currentPage)},wdi_front.loadMore=function(e,i){var d;if(""!=e&&void 0!==e&&"initial"!=e&&"initial-keep"!=e&&(d=window[e.parent().parent().parent().parent().attr("id")]),void 0!==i&&(d=i),wdi_front.ajaxLoader(d),this.isJsonString(d.feed_row.feed_users))for(var r in json_feed_users=JSON.parse(d.feed_row.feed_users),json_feed_users)iuser=json_feed_users[r],"#"!==json_feed_users[r].username.charAt(0)&&(iuser=json_feed_users[r]);"masonry"===d.feed_row.feed_type&&"pagination"==d.feed_row.feed_display_view&&jQuery("#wdi_feed_"+wdi_front.feed_counter+" .wdi_full_caption").each(function(){jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch)}),d.loadMoreDataCount=d.feed_users.length,wdi_front.displayFeed(d)},wdi_front.loadMoreRequest=function(e,i,d,r){d.mediaRequestsDone&&""!=i&&d.usersData},wdi_front.checkForLoadMoreDone=function(e,i){var d,r=e.feed_row.load_more_number,t=e.feed_row.number_of_photos;0==e.loadMoreDataCount&&(e.temproraryUsersData=wdi_front.mergeData(e.temproraryUsersData,e.usersData),d=wdi_front.getArrayContentLength(e.temproraryUsersData,"data"),"initial-keep"==i&&(i="initial"),"initial"==i?d<t&&!wdi_front.userHasNoPhoto(e,e.temproraryUsersData)&&e.instagramRequestCounter<=e.maxConditionalFiltersRequestCount?wdi_front.loadMore("initial",e):(e.usersData=e.temproraryUsersData,wdi_front.displayFeed(e),wdi_front.applyFilters(e),e.temproraryUsersData=[]):d<r&&!wdi_front.userHasNoPhoto(e,e.temproraryUsersData)&&e.instagramRequestCounter<=e.maxConditionalFiltersRequestCount?wdi_front.loadMore(void 0,e):(e.usersData=e.temproraryUsersData,wdi_front.activeUsersCount(e)&&(wdi_front.displayFeed(e,r),wdi_front.applyFilters(e),e.temproraryUsersData=[])))},wdi_front.allDataHasFinished=function(e){for(var i=0,d=0;d<e.dataStorageRaw.length;d++)""==e.usersData[d].pagination.next_url&&(i++,e.usersData[d].finished="finished");return i==e.dataStorageRaw.length&&(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_load_more").remove(),!0)},wdi_front.mergeData=function(e,i){for(var d=0;d<i.length;d++)void 0!==e[d]?"finished"!=i[d].finished&&(void 0===e[d].pagination.next_max_id&&void 0===e[d].pagination.next_max_like_id||(e[d].data=e[d].data.concat(i[d].data),e[d].pagination=i[d].pagination,e[d].user_id=i[d].user_id,e[d].username=i[d].username,e[d].meta=i[d].meta)):e.push(i[d]);return e},wdi_front.brokenImageHandler=function(e){return!0},wdi_front.ajaxLoader=function(e){var i,d=e.feed_row.wdi_feed_counter,d=jQuery(document).find("#wdi_feed_"+d);return"load_more_btn"==e.feed_row.feed_display_view&&(d.find(".wdi_load_more").addClass("wdi_hidden"),d.find(".wdi_spinner").removeClass("wdi_hidden")),"infinite_scroll"==e.feed_row.feed_display_view&&(0==d.find(".wdi_ajax_loading").length?(i=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>'),d.find(".wdi_feed_container").append(i)):i=d.find(".wdi_ajax_loading"),i.removeClass("wdi_hidden")),1},wdi_front.allImagesLoaded=function(e){wdi_front.getDataLength(e);e.mediaRequestsDone||jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia"),0==e.allResponseLength&&1===e.dataLoaded&&jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>");var i=e.feed_row.wdi_feed_counter,i=jQuery("#wdi_feed_"+i);"load_more_btn"==e.feed_row.feed_display_view&&(parseInt(e.allResponseLength)>parseInt(e.feed_row.number_of_photos)&&i.find(".wdi_load_more").removeClass("wdi_hidden"),i.find(".wdi_spinner").addClass("wdi_hidden")),"infinite_scroll"==e.feed_row.feed_display_view&&jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_ajax_loading").addClass("wdi_hidden")},wdi_front.show=function(e,i){var d,r,t=i.feed_row.wdi_feed_counter,a=jQuery("#wdi_feed_"+t+" .wdi_feed_container");"header"===e&&(d={feed_thumb:i.feed_row.feed_thumb,feed_name:i.feed_row.feed_name},r=wdi_front.getHeaderTemplate()(d),d=a.find(".wdi_feed_header").html(),a.find(".wdi_feed_header").html(d+r))},wdi_front.getUserTemplate=function(e,i){var d=e.dataCount,r="#"===i[0]?"//instagram.com/explore/tags/"+i.substr(1,i.length):"//instagram.com/"+i,t="onclick='"+('window.open("'+r+'","_blank")')+"'",r='<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%>">';return 1<d&&(r+='<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="tenweb-i tenweb-i-filter"></span></div></div>'),r+="</div>",r+="<h3 "+t+"><%= user_name%></h3>","#"!==i[0]?("1"==e.feed_row.follow_on_instagram_btn&&(r+='<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>"),r+='<div class="wdi_media_info"><p class="wdi_posts"><span class="tenweb-i tenweb-i-camera-retro"></span><%= counts.media%></p><p class="wdi_followers"><span class="tenweb-i tenweb-i-user"></span><%= counts.followed_by%></p></div>'):r+='<div class="wdi_user_controls"></div><div class="wdi_media_info"><p class="wdi_posts"><span class="tenweb-i tenweb-i-camera-retro"></span><%= counts.media%></p><p class="wdi_followers"><span></span></p></div>',r+='<div class="wdi_clear"></div>',1==d&&"#"!==i[0]&&"1"==e.feed_row.display_user_info&&(r+='<div class="wdi_bio"><%= bio%></div>',r+='<div class="wdi_website"><a target="_blank" href="<%= website_url%>" ><%= website%></a></div>'),r+="</div></div>",_.template(r)},wdi_front.getHeaderTemplate=function(){return _.template('<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>')},wdi_front.addFilter=function(e,i){var d=window["wdi_feed_"+i],i=d.dataCount;if(!(i<2)&&0==d.nowLoadingImages){i=jQuery("#wdi_feed_"+d.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');i.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg"),i.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col"),i.find(".wdi_media_info").toggleClass("wdi_filter_active_col"),i.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col"),d.customFilterChanged=!0,0==d.userSortFlags[e].flag?d.userSortFlags[e].flag=!0:d.userSortFlags[e].flag=!1;for(var r=0,t=0;t<d.userSortFlags.length;t++)1==d.userSortFlags[t].flag&&r++;"pagination"==d.feed_row.feed_display_view&&(d.resIndex=0),0!=r?wdi_front.filterData(d):d.customFilteredData=d.dataStorageList,wdi_front.displayFeed(d),"pagination"==d.feed_row.feed_display_view&&(d.paginator=Math.ceil(d.imageIndex/parseInt(d.feed_row.pagination_per_page_number)),d.currentPage=d.paginator,wdi_front.updatePagination(d,"custom",1),jQuery("#wdi_first_page").removeClass("wdi_disabled"),jQuery("#wdi_last_page").addClass("wdi_disabled"))}},wdi_front.filterData=function(e){var i=e.userSortFlags;e.customFilteredData=[];for(var d=0;d<e.dataStorageList.length;d++)for(var r=0;r<i.length;r++)(void 0!==e.dataStorageList[d].user.id&&e.dataStorageList[d].user.id==i[r].id||e.dataStorageList[d].wdi_hashtag==i[r].name)&&1==i[r].flag&&e.customFilteredData.push(e.dataStorageList[d])},wdi_front.applyFilters=function(e){for(var i=0;i<e.userSortFlags.length;i++)1==e.userSortFlags[i].flag&&(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+'[user_index="'+i+'"]'),wdi_front.addFilter(i,e.feed_row.wdi_feed_counter),wdi_front.addFilter(i,e.feed_row.wdi_feed_counter))},wdi_front.getImgCount=function(e){for(var i=e.dataStorage,d=0,r=0;r<i.length;r++)d+=i[r].length;return d},wdi_front.parseLighboxData=function(e,i){for(var d,r,t,a,o=e.dataStorage,n=[],s=[],_=0;_<o.length;_++)for(var w=0;w<o[_].length;w++)n.push(o[_][w]);for(_=0;_<n.length;_++)void 0!==n[_]&&(r=void 0!==n[_]&&void 0!==n[_].media_url?n[_].media_url:wdi_url.plugin_url+"images/video_missing.png",void 0!==n[_]&&void 0===n[_].media_url&&"carousel"===n[_].type&&(void 0!==(a=n[_].carousel_media[0])&&void 0!==a.images?r=a.images.standard_resolution.url:void 0!==a&&void 0!==a.videos&&(r=a.videos.standard_resolution.url)),a=void(t=0)!==n[_].comments.count?n[_].comments.count:n[_].comments,void 0!==n[_]&&void 0!==a&&(t=a),d={alt:"",avg_rating:"",comment_count:t,date:wdi_front.convertUnixDate(n[_].created_time),description:wdi_front.getDescription(void 0!==n[_].caption&&null!==n[_].caption?wdi_front.escape_tags(n[_].caption.text):""),filename:wdi_front.getFileName(n[_]),filetype:wdi_front.getFileType(n[_]),hit_count:"0",id:n[_].id,image_url:n[_].link,number:0,rate:"",rate_count:"0",username:void 0!==n[_].user?n[_].user.username:"",profile_picture:void 0!==n[_].user?n[_].user.profile_picture:"",thumb_url:r,comments_data:void 0!==n[_].comments?n[_].comments.data:"",images:n[_].images,carousel_media:void 0!==n[_].carousel_media?n[_].carousel_media:null},s.push(d));return s},wdi_front.convertUnixDate=function(e){var i=new Date(e).getTime()/1e3,e=new Date(0);e.setUTCSeconds(i);i=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate();return i+=" "+e.getHours()+":"+e.getMinutes()},wdi_front.getDescription=function(e){return e=e.replace(/\r?\n|\r/g," ")},wdi_front.getFileName=function(e){if(void 0!==e){var i=e.link;if("video"===e.type&&e.hasOwnProperty("videos")&&null!=e.videos.standard_resolution)return e.videos.standard_resolution.url;if(void 0===i)return"";i=i.split("/");return i[i.length-2]}},wdi_front.getFileType=function(e){return"video"==e.type&&e.hasOwnProperty("videos")?"EMBED_OEMBED_INSTAGRAM_VIDEO":"carousel"==e.type&&e.hasOwnProperty("carousel_media")?"EMBED_OEMBED_INSTAGRAM_CAROUSEL":"EMBED_OEMBED_INSTAGRAM_IMAGE"},wdi_front.array_max=function(e){for(var i=e[0],d=0,r=1;r<e.length;r++)i<e[r]&&(i=e[r],d=r);return{value:i,index:d}},wdi_front.array_min=function(e){for(var i=e[0],d=0,r=1;r<e.length;r++)i>e[r]&&(i=e[r],d=r);return{value:i,index:d}},wdi_front.activeUsersCount=function(e){for(var i=0,d=0;d<e.usersData.length;d++)"finished"!=e.usersData[d].finished&&i++;return i},wdi_front.checkMediaResponse=function(e,i){return""==e||void 0===e||null==e||void 0!==e.error?(errorMessage=wdi_front_messages.connection_error,wdi_front.show_alert(errorMessage,e,i),!1):""!=e&&void 0!==e&&null!=e&&void 0!==e.meta&&200!=e.meta.code?(errorMessage=e.meta.error_message,wdi_front.show_alert(errorMessage,e,i),!1):e},wdi_front.stripHashtag=function(e){return"#"!==e[0]?e:e.substr(1,e.length)},wdi_front.getInputType=function(e){switch(e[0]){case"#":return"hashtag";case"%":return"location";default:return"user"}},wdi_front.regexpTestCaption=function(e,i){var d=!1,r=!1,t=i.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&"),i=new RegExp("(?:^|\\s)"+t+"(?:^|\\s)"),a=new RegExp("(?:^|\\s)"+t,"g");for(null!=i.exec(e)&&(d=!0);null!=(match=a.exec(e));)r=!0;return 1==d||1==r},wdi_front.replaceNewLines=function(e){var i,d="vUkCJvN2ps3t",r=[];for(e=e.replace(/\r?\n|\r/g,d),i=new RegExp(d,"g");null!=(match=i.exec(e));)r.push(match.index);for(var t=e.split(d),a=0,o=0;o<t.length;o++)""==t[o]?a++:a=0,0<a&&(t.splice(o,1),a--,o--);return e=t.join(" ")},wdi_front.isEmptyObject=function(e){for(var i in e)if(e.hasOwnProperty(i))return!1;return!0},wdi_front.isEmpty=function(e){return!e||0===e.length};var WDIFeed=function(e){this.data=e.data,this.dataCount=e.dataCount,this.feed_row=e.feed_row,this.usersData=e.usersData,(_this=this).set_images_loading_flag=function(e){window.addEventListener("load",function(){e.nowLoadingImages=!1})},this.set_images_loading_flag(_this)};function wdi_extractHostname(e){return void 0===e||""===e?"":e.replace(/(^\w+:|^)\/\//,"")}WDIFeed.prototype.mediaExists=function(e,i){for(var d=0;d<i.length;d++)if(e.id==i[d].id)return!0;return!1},WDIFeed.prototype.getIdFromUrl=function(e){for(var i=e.split("/"),d=!1,r=0;r<i.length;r++)if("p"==i[r]&&void 0!==i[r+1]){d=i[r+1];break}return d},WDIFeed.prototype.avoidDuplicateMedia=function(e){var i=e.data,d=[];void 0===i&&(i=[]);for(var r=0;r<i.length;r++)this.mediaExists(i[r],this.dataStorageList)||this.mediaExists(i[r],d)||this.mediaExists(i[r],this.conditionalFilterBuffer)||d.push(i[r]);return this.conditionalFilterBuffer=this.conditionalFilterBuffer.concat(d),{data:d,meta:e.meta,pagination:e.pagination}},WDIFeed.prototype.storeRawData=function(e,i){var r=this;if("object"==typeof this[i]&&"number"==typeof this[i].length)for(var d=0;d<e.length;d++){var t="";wdi_front.isHashtag(e[d].user_id)?void 0!==e[d].pagination.cursors&&(t=e[d].pagination.cursors.after):"liked"==r.feed_row.liked_feed?void 0===(t=e[d].pagination.next_max_like_id)&&(t=""):(null==e[d].pagination&&(e[d].pagination=[]),void 0===(t=e[d].pagination.next_max_id)&&(t="")),void 0===this[i][d]?this[i].push({data:e[d].data,index:0,locked:!1,hash_id:t,usersDataFinished:!1,userId:e[d].user_id,length:function(){return this.data.length-this.index},getData:function(e){var i=this.data.slice(this.index,this.index+e);if(this.index+=Math.min(e,this.length()),this.index==this.data.length&&1==this.locked&&0==this.usersDataFinished)for(var d=0;d<r.usersData.length;d++)if(r.usersData[d].user_id==this.userId){this.usersDataFinished=!0;break}return i}}):0==this[i][d].locked&&(t!=this[i][d].hash_id?(this[i][d].data=this[i][d].data.concat(e[d].data),this[i][d].hash_id=t):this[i][d].locked=!0)}},wdi_front.updateUsersIfNecessary=function(o){for(var n=o.feed_users,e=!1,i=0;i<n.length;i++)"#"!=n[i].username.substr(0,1)?""!=n[i].id&&"username"!=n[i].id||(e=!0,o.instagram.searchForUsersByName(n[i].username,{success:function(e){if(void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,o),200==e.meta.code&&0<e.data.length){for(var i=!1,d=0;d<e.data.length;d++)if(e.data[d].username==e.args.username){i=!0;break}if(i)for(var r=0;r<n.length;r++)e.data[d].username==n[r].username&&(n[r].id=e.data[d].id)}for(var t=!1,a=0;a<n.length;a++)if(""==n[a].id||"username"==n[a].id){t=!0;break}t||(o.feed_row.feed_users=JSON.stringify(n),wdi_front.init(o))},username:n[i].username})):n[i].id=n[i].username;return e},void 0!==wdi_ajax.ajax_response?jQuery(document).one("ajaxStop",function(){"not_declared"!=wdi_front.type&&(wdi_front.clickOrTouch=wdi_front.detectEvent(),wdi_front.globalInit())}):jQuery(document).ready(function(){"not_declared"!=wdi_front.type&&(wdi_front.clickOrTouch=wdi_front.detectEvent(),wdi_front.globalInit())}),jQuery(document).ready(function(){setTimeout(function(){"1"===wdi_front_messages.show_alerts&&"I"!==jQuery(".wdi_check_fontawesome .tenweb-i-instagram").prop("tagName")&&console.log("Font Awesome is not loaded properly. Please ask for support https://wordpress.org/support/plugin/wd-instagram-feed/")},2e3)});
|
1 |
+
"undefined"==typeof wdi_front&&(wdi_front={type:"not_declared"});var wdi_error_show=!(wdi_front.detectEvent=function(){var e="click";return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())&&(e="touchend"),e}),wdi_error_init=!1;function wdi_baseName(e){var i=e.substr(e.lastIndexOf("/"));return e.replace(i,"")}wdi_front.escape_tags=function(e){return void 0===e&&(e=""),e=e.toString().replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")},wdi_front.show_alert=function(e,i,d){var r,t;void 0!==(d=jQuery("#wdi_feed_"+d.feed_row.wdi_feed_counter))&&(wdi_error_show=!0,d.find(".wdi_spinner").remove(),r=d.find(".wdi_js_error"),t=d.find(".wdi_token_error"),0!=i&&(void 0!==i.meta&&1==i.meta.error&&"OAuthException"===i.meta.error_type||void 0!==i.error&&"OAuthException"===i.error.type)?(d.find(".wdi_single_user").remove(),t.removeClass("wdi_hidden"),"1"!=wdi_front_messages.wdi_token_error_flag&&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(e){}})):void 0!==i.error&&void 0!==i.error.message&&(r.html(i.error.message),d.find(".wdi_single_user").remove(),r.removeClass("wdi_js_error"),r.addClass("wdi_js_error_no_animate"),jQuery(".wdi_js_error_no_animate").show()),wdi_front_messages.show_alerts||console.log("%c"+e,"color:#cc0000;")),wdi_error_show=!0},wdi_front.globalInit=function(){var e=wdi_front.feed_counter,i=0;void 0!==wdi_ajax.ajax_response&&(i=wdi_feed_counter_init.wdi_feed_counter_init);for(var d,r=i;r<=e;r++)0!==jQuery("#wdi_feed_"+r).length&&((d=new WDIFeed(window["wdi_feed_"+r])).instagram=new WDIInstagram,d.instagram.filterArguments={feed:d},d.instagram.addToken(d.feed_row.access_token),wdi_front.access_token=d.feed_row.access_token,d.dataLoaded=0,d.dataStorageRaw=[],d.dataStorage=[],d.dataStorageList=[],d.allResponseLength=0,d.currentResponseLength=0,d.temproraryUsersData=[],d.removedUsers=0,d.nowLoadingImages=!0,d.imageIndex=0,d.resIndex=0,d.currentPage=1,d.currentPageLoadMore=0,d.userSortFlags=[],d.customFilterChanged=!1,d.maxConditionalFiltersRequestCount=10,d.instagramRequestCounter=0,d.mediaRequestsDone=!1,d.conditionalFilterBuffer=[],d.stopInfiniteScrollFlag=!1,"masonry"==d.feed_row.feed_type&&(d.displayedData=[]),"pagination"==d.feed_row.feed_display_view?(d.feed_row.resort_after_load_more=0,"image_browser"!=d.feed_row.feed_type?(d.feed_row.load_more_number=parseInt(d.feed_row.pagination_per_page_number),d.feed_row.number_of_photos=d.allResponseLength):(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):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),"masonry"==d.feed_row.feed_type&&jQuery(window).trigger("resize"),wdi_front.bindEvents(d),window["wdi_feed_"+r]=d,wdi_front.init(d))},wdi_front.init=function(e){if(jQuery(".wdi_js_error").hide(),e.photoCounter=e.feed_row.number_of_photos,"liked"==e.feed_row.liked_feed)e.feed_users=["self"];else{if(!wdi_front.isJsonString(e.feed_row.feed_users))return void wdi_front.show_alert(wdi_front_messages.invalid_users_format,!1,e);e.feed_users=JSON.parse(e.feed_row.feed_users)}var i=[],d=[],r=[];void 0!==window.wdi_all_tags&&(i=window.wdi_all_tags);for(var t=0;t<e.feed_users.length;t++)"#"===e.feed_users[t].username[0]&&void 0!==e.feed_users[t].tag_id?(i[e.feed_users[t].tag_id]=e.feed_users[t],r[t]=e.feed_users[t]):d[0]=e.feed_users[t];window.wdi_all_tags=i,e.feed_users=void 0===r||wdi_front.isEmpty(r)?d:r;var a=wdi_front.getFeedItemResolution(e);e.feedImageResolution=a.image,e.feedVideoResolution=a.video,e.dataCount=e.feed_users.length;for(var o=0;o<e.dataCount;o++)wdi_front.instagramRequest(o,e);0<e.feed_row.number_of_photos&&wdi_front.ajaxLoader(e),"1"===e.feed_row.display_header&&wdi_front.show("header",e),"1"===e.feed_row.show_usernames&&wdi_front.show("users",e)},wdi_front.getFeedItemResolution=function(e){var i={image:"standard_resolution",video:"standard_resolution"};if("thumbnail"===e.feed_row.feed_resolution)return{image:"thumbnail",video:"low_bandwidth"};if("low"===e.feed_row.feed_resolution)return{image:"low_resolution",video:"low_resolution"};if("standard"===e.feed_row.feed_resolution)return{image:"standard_resolution",video:"standard_resolution"};var d=jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");d.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>'),wdi_responsive.columnControl(e,1);e=d.attr("wdi-res").split("wdi_col_");if(d.find("#wdi_feed_item_example").remove(),2!==e.length)return i;e=parseInt(e[1]);if(e<=0)return i;e=d.width()/e-10;return e<=150?(i.image="thumbnail",i.video="low_bandwidth"):150<e&&e<=320?(i.image="low_resolution",i.video="low_resolution"):(i.image="standard_resolution",i.video="standard_resolution"),i},wdi_front.isJsonString=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},wdi_front.instagramRequest=function(i,d){var r=this,e=d.feed_users;if("string"==typeof e[i]&&"self"===e[i])d.instagram.getRecentLikedMedia({success:function(e){void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,d),d.mediaRequestsDone=!0,0!=(e=r.checkMediaResponse(e,d))&&r.saveSelfUserData(e,d)}});else if("hashtag"==this.getInputType(e[i].username)){if(this.isJsonString(d.feed_row.feed_users))for(var t in json_feed_users=JSON.parse(d.feed_row.feed_users),json_feed_users)"#"!==json_feed_users[t].username.charAt(0)&&(user=json_feed_users[t]);d.instagram.getTagRecentMedia(this.stripHashtag(e[i].username),{feed_id:d.feed_row.id,user_id:user.id,user_name:user.username,success:function(e){if(void 0!==e.error&&"undefined"!=e.error.type||void 0!==e.meta&&1==e.meta.error)return d.dataLoaded=1,wdi_front.show_alert(!1,e,d),!1;d.mediaRequestsDone=!0,e=r.checkMediaResponse(e,d),d.dataLoaded=1,0!=e&&r.saveUserData(e,d.feed_users[i],d)}},null,d.feed_row.hashtag_top_recent,0)}else"user"==this.getInputType(e[i].username)&&d.instagram.getUserMedia({feed_id:d.feed_row.id,user_id:e[i].id,user_name:e[i].username,success:function(e){if(void 0!==e.meta&&1==typeof e.meta.error)return d.dataLoaded=1,wdi_front.show_alert(!1,e,d),!1;d.mediaRequestsDone=!0,d.dataLoaded=1,0!=(e=r.checkMediaResponse(e,d))?r.saveUserData(e,d.feed_users[i],d):wdi_front.allImagesLoaded(d)}},"",0)},wdi_front.isHashtag=function(e){return"#"===e[0]},wdi_front.saveUserData=function(e,i,d){e.user_id=i.id,e.username=i.username,"#"===e.user_id[0]&&(e.data=wdi_front.appendRequestHashtag(e.data,e.user_id)),d.usersData.push(e),d.currentResponseLength=wdi_front.getArrayContentLength(d.usersData,"data"),d.allResponseLength+=d.currentResponseLength,d.dataCount==d.usersData.length&&(d.currentResponseLength<d.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(d)?wdi_front.loadMore("initial-keep",d):(wdi_front.displayFeed(d),wdi_front.applyFilters(d),wdi_front.activeUsersCount(d)||"load_more_btn"==d.feed_row.feed_display_view&&((d=jQuery("#wdi_feed_"+d.feed_row.wdi_feed_counter)).find(".wdi_load_more").addClass("wdi_hidden"),d.find(".wdi_spinner").addClass("wdi_hidden"))))},wdi_front.saveSelfUserData=function(e,i){e.user_id="",e.username="",i.usersData.push(e),i.currentResponseLength=wdi_front.getArrayContentLength(i.usersData,"data"),i.allResponseLength+=i.currentResponseLength,i.dataCount==i.usersData.length&&(i.currentResponseLength<i.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(i)?wdi_front.loadMore("initial-keep",i):(wdi_front.displayFeed(i),wdi_front.applyFilters(i),wdi_front.activeUsersCount(i)||"load_more_btn"==i.feed_row.feed_display_view&&((i=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter)).find(".wdi_load_more").addClass("wdi_hidden"),i.find(".wdi_spinner").addClass("wdi_hidden"))))},wdi_front.userHasNoPhoto=function(e,i){var d=0,r=e.usersData;void 0!==i&&(r=i);for(var t=0;t<r.length;t++)void 0===r[t].pagination&&(r[t].pagination=[]),"liked"===e.feed_row.liked_feed?void 0===r[t].pagination.next_max_like_id&&d++:void 0===r[t].pagination.next_max_id&&d++;return d==r.length?1:0},wdi_front.appendRequestHashtag=function(e,i){for(var d=0;d<e.length;d++)e[d].wdi_hashtag=i;return e},wdi_front.displayFeed=function(e,i){void 0===i&&(i=1);for(var d=0;d<e.usersData.length;d++)e.dataStorageList=e.usersData[d].data,e.dataStorage[d]=e.usersData[d].data;var r=e.feed_row.number_of_photos,t=e.feed_row.load_more_number,a=0,o=r,r="";"pagination"==e.feed_row.feed_display_view?(1<e.allResponseLength&&jQuery("#wdi_pagination").removeClass("wdi_hidden"),e.feed_row.number_of_photos=e.allResponseLength,"image_browser"==e.feed_row.feed_type?e.paginator=parseInt(e.feed_row.number_of_photos):e.paginator=Math.ceil(parseInt(e.feed_row.number_of_photos)/parseInt(t)),r=(o=1===i?(a=0,"image_browser"==e.feed_row.feed_type?1:t):"image_browser"==e.feed_row.feed_type?(a=i-1)+1:(a=(i-1)*t)+t,e.dataStorageList.slice(a,o))):void 0!==e.already_loaded_count?(a=parseInt(e.already_loaded_count),o=e.already_loaded_count+parseInt(t),r=e.dataStorageList.slice(a,o),e.already_loaded_count+=r.length):(r=e.dataStorageList.slice(a,o),e.already_loaded_count=r.length),e.parsedData=wdi_front.parseLighboxData(e,!0),"masonry"==e.feed_row.feed_type&&wdi_front.masonryDisplayFeedItems(r,e),"thumbnails"!=e.feed_row.feed_type&&"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||wdi_front.displayFeedItems(r,e),"pagination"==e.feed_row.feed_display_view&&e.currentPage<e.paginator&&jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter).find("#wdi_last_page").removeClass("wdi_disabled"),wdi_front.updateUsersImages(e)},wdi_front.updateUsersImages=function(i){jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter).find(".wdi_single_user .wdi_user_img_wrap img").each(function(){if((jQuery(this).attr("src")==wdi_url.plugin_url+"images/missing.png"||""==jQuery(this).attr("src"))&&"liked"!=i.feed_row.liked_feed)for(var e=0;e<i.usersData.length;e++)i.usersData[e].username==jQuery(this).parent().parent().find("h3").text()&&0!=i.usersData[e].data.length&&jQuery(this).attr("src",i.usersData[e].data[0].images.thumbnail.url)})},wdi_front.checkLoaded=function(e){var i=e.feed_row.wdi_feed_counter,d=jQuery("#wdi_feed_"+i);e.dataStorageList.length>e.already_loaded_count?d.find(".wdi_load_more").removeClass("wdi_hidden"):d.find(".wdi_load_more").addClass("wdi_hidden"),d.find(".wdi_spinner").addClass("wdi_hidden"),setTimeout(function(){d.find(".wdi_ajax_loading").addClass("wdi_hidden")},500)},wdi_front.masonryDisplayFeedItems=function(e,i){var d=[],r=[];if(0!=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length){jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_masonry_column").each(function(){1==i.feed_row.resort_after_load_more&&(jQuery(this).html(""),i.imageIndex=0),1==i.customFilterChanged&&(jQuery(this).html(""),i.imageIndex=0),"pagination"==i.feed_row.feed_display_view?d.push(0):d.push(jQuery(this).height()),r.push(jQuery(this))}),1==i.customFilterChanged&&(i.customFilterChanged=!1);for(var t,a,o,n=0;n<e.length;n++)"object"==typeof e[n].videos&&null==e[n].videos.standard_resolution||(i.displayedData.push(e[n]),t="",void 0!==e[n].wdi_hashtag&&(t=e[n].wdi_hashtag),a="image"==e[n].type?wdi_front.getPhotoTemplate(i,t):e[n].hasOwnProperty("videos")||"video"==e[n].type?wdi_front.getVideoTemplate(i,t):wdi_front.getSliderTemplate(i,t),o=e[n],t=a(wdi_front.createObject(o,i)),a=wdi_front.array_min(d),o=wdi_front.getImageResolution(e[n]),r[a.index].html(r[a.index].html()+t),d[a.index]+=r[a.index].width()*o,i.imageIndex++,"pagination"==i.feed_row.feed_display_view&&((n+1)%i.feed_row.pagination_per_page_number==0?i.resIndex+=i.freeSpaces+1:i.resIndex++));i.wdi_loadedImages=0;var s=!1;i.wdi_load_count=n;var _=i.feed_row.wdi_feed_counter;jQuery("#wdi_feed_"+_+" .wdi_img").on("load",function(){i.wdi_loadedImages++,!1===s&&(wdi_responsive.columnControl(i,1),s=!0)});wdi_front.checkLoaded(i),1==i.paginatorNextFlag&&wdi_front.updatePagination(i,"next"),i.infiniteScrollFlag=!1}},wdi_front.getImageResolution=function(e){var i;return e="image"===e.type?(i=e.images.standard_resolution.height,e.images.standard_resolution.width):"video"===e.type?(i=e.videos.standard_resolution.height,e.videos.standard_resolution.width):(i=(e.carousel_media[0].images||e.carousel_media[0].videos).standard_resolution.height,(e.carousel_media[0].images||e.carousel_media[0].videos).standard_resolution.width),i/e},wdi_front.getDataLength=function(e,i){var d=0;if(void 0===i)for(var r=0;r<e.dataStorage.length;r++)d+=e.dataStorage[r].length;else for(r=0;r<i.length;r++)d+=i[r].length;return d},wdi_front.getArrayContentLength=function(e,i){for(var d=0,r=0;r<e.length;r++)"finished"!=e[r].finished&&void 0===e[r].error&&(d+=e[r][i].length);return d},wdi_front.displayFeedItems=function(e,d){if(0!=jQuery("#wdi_feed_"+d.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length){for(var i,r,t,a=d.feed_row.wdi_feed_counter,o=jQuery("#wdi_feed_"+a+" .wdi_feed_wrapper"),n=0;n<e.length;n++){if(void 0===e[n])return;"object"==typeof e[n].videos&&null==e[n].videos.standard_resolution||(t="",void 0!==e[d.imageIndex=n].wdi_hashtag&&(t=e[n].wdi_hashtag),i="image"==e[n].type?wdi_front.getPhotoTemplate(d,t):e[n].hasOwnProperty("videos")?wdi_front.getVideoTemplate(d,t):wdi_front.getSliderTemplate(d,t),r=e[n],t="",void 0!==(r=wdi_front.createObject(r,d))&&(t=i(r)),o.html(o.html()+t),d.imageIndex++,"pagination"==d.feed_row.feed_display_view&&((n+1)%d.feed_row.pagination_per_page_number==0?d.resIndex+=d.freeSpaces+1:d.resIndex++))}!function(){var e=d.feed_row.wdi_feed_counter,i=jQuery("#wdi_feed_"+e);d.dataStorageList.length>d.already_loaded_count?i.find(".wdi_load_more").removeClass("wdi_hidden"):i.find(".wdi_load_more").addClass("wdi_hidden"),i.find(".wdi_spinner").addClass("wdi_hidden");setTimeout(function(){i.find(".wdi_ajax_loading").addClass("wdi_hidden")},500)}()}},wdi_front.checkFeedFinished=function(e){for(var i=0;i<e.usersData.length;i++)if(void 0===e.usersData[i].finished)return!1;return!0},wdi_front.createObject=function(e,i){var d=null!=e.caption?e.caption.text:" ";switch(e.type){case"image":var r=e.images[i.feedImageResolution].url,t=void 0,a=e.hasOwnProperty("thumbnail")?e.thumbnail:wdi_url.plugin_url+"images/missing.png";break;case"video":r=void 0,t=e.hasOwnProperty("videos")?e.videos[i.feedVideoResolution].url:wdi_url.plugin_url+"images/video_missing.png",a=e.hasOwnProperty("thumbnail")?e.thumbnail:wdi_url.plugin_url+"images/video_missing.png";break;case"carousel":if(0===e.carousel_media.length)r=wdi_url.plugin_url+"images/missing.png",t=void 0,a=wdi_url.plugin_url+"images/missing.png";else switch(e.carousel_media[0].type){case"image":r=e.carousel_media[0].images[i.feedImageResolution].url,t=void 0,a=e.hasOwnProperty("thumbnail")?e.thumbnail:wdi_url.plugin_url+"images/missing.png";break;case"video":r=void 0,t=e.carousel_media[0].videos[i.feedVideoResolution].url,a=e.hasOwnProperty("thumbnail")?e.thumbnail:wdi_url.plugin_url+"images/video_missing.png";break;default:r=wdi_url.plugin_url+"images/missing.png",t=void 0,a=wdi_url.plugin_url+"images/missing.png"}break;default:r=wdi_url.plugin_url+"images/missing.png",t=void 0,a=wdi_url.plugin_url+"images/missing.png"}var o,n=i.imageIndex,s="square";(_="image"===e.type?(o=e.images.standard_resolution.height,e.images.standard_resolution.width):"video"===e.type?(o=e.videos.standard_resolution.height,e.videos.standard_resolution.width):(o=(e.carousel_media[0].images||e.carousel_media[0].videos).standard_resolution.height,(e.carousel_media[0].images||e.carousel_media[0].videos).standard_resolution.width))<o?s="portrait":o<_&&(s="landscape");var _=e.user.username;return""===_&&(_="no_user"),{id:e.id,thumb_url:a,caption:wdi_front.escape_tags(d),image_url:r,likes:void 0!==e.likes.count?e.likes.count:e.likes,comments:void 0!==e.comments.count?e.comments.count:e.comments,wdi_index:n,wdi_res_index:i.resIndex,wdi_media_user:_,link:e.link,video_url:t,wdi_username:_,wdi_shape:s}},wdi_front.getPhotoTemplate=function(e,i){var d="",r="",t="",a="tenweb-i-arrows-out",o="";"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(a=""),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(o='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(d+=" wdi_full_caption");var n="";switch("blog_style"!==e.feed_row.feed_type&&(n="masonry"==e.feed_row.feed_type?"wdi_responsive.showMasonryCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");":"wdi_responsive.showCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");"),e.feed_row.feed_item_onclick){case"lightbox":r="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":r="onclick=\"window.open ('<%= link%>','_blank')\"",t="wdi_hover_off",a="";break;case"custom_redirect":r="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",t="wdi_hover_off",a="";break;case"none":t="wdi_cursor_off wdi_hover_off",a=r=""}var s='<div class="wdi_feed_item '+d+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> wdi_type="image" id="wdi_'+e.feed_row.wdi_feed_counter+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img <%= wdi_shape == \'square\' ? \'wdi_shape_square\' : (wdi_shape == \'portrait\' ? \'wdi_shape_portrait\' : (wdi_shape == \'landscape\' ? \'wdi_shape_landscape\' : \'wdi_shape_square\') ) %>"><img class="wdi_img" src="<%=thumb_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+t+'" >'+o+'<div class="wdi_thumb_icon" '+r+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="tenweb-i '+a+'"></i></div></div></div></div></div></div>',d=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(s+='<div class="wdi_photo_meta">',o=void 0!==e.dataStorageList[d].likes.count?e.dataStorageList[d].likes.count:e.dataStorageList[d].likes,"1"===e.feed_row.show_likes&&0!==o&&(s+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),d=void 0!==e.dataStorageList[d].comments.count?e.dataStorageList[d].comments.count:e.dataStorageList[d].comments,"1"===e.feed_row.show_comments&&0!==d&&(s+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),s+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(s+='<div class="wdi_photo_title" onclick='+n+" ><%=caption%></div>"),s+="</div>"),s+="</div>",_.template(s)},wdi_front.getSliderTemplate=function(e,i){var d="",r="",t="",a="tenweb-i-clone",o="";"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(a=""),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(o='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(d+=" wdi_full_caption");var n="";switch("blog_style"!==e.feed_row.feed_type&&(n="masonry"==e.feed_row.feed_type?"wdi_responsive.showMasonryCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");":"wdi_responsive.showCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");"),e.feed_row.feed_item_onclick){case"lightbox":r="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":r="onclick=\"window.open ('<%= link%>','_blank')\"",t="wdi_hover_off",a="tenweb-i-clone";break;case"custom_redirect":r="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",t="wdi_hover_off",a="";break;case"none":t="wdi_cursor_off wdi_hover_off",a=r=""}var s='<div class="wdi_feed_item '+d+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> wdi_type="slideshow" id="wdi_'+e.feed_row.wdi_feed_counter+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img <%= wdi_shape == \'square\' ? \'wdi_shape_square\' : (wdi_shape == \'portrait\' ? \'wdi_shape_portrait\' : (wdi_shape == \'landscape\' ? \'wdi_shape_landscape\' : \'wdi_shape_square\') ) %>"><img class="wdi_img" src="<%=thumb_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+t+'" >'+o+'<div class="wdi_thumb_icon" '+r+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="tenweb-i '+a+'"></i></div></div></div></div></div></div>',d=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(s+='<div class="wdi_photo_meta">',o=void 0!==e.dataStorageList[d].likes.count?e.dataStorageList[d].likes.count:e.dataStorageList[d].likes,"1"===e.feed_row.show_likes&&0!==o&&(s+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),d=void 0!==e.dataStorageList[d].comments.count?e.dataStorageList[d].comments.count:e.dataStorageList[d].comments,"1"===e.feed_row.show_comments&&0!==d&&(s+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),s+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(s+='<div class="wdi_photo_title" onclick='+n+" ><%=caption%></div>"),s+="</div>"),s+="</div>",_.template(s)},wdi_front.replaceToVideo=function(e,i,d){overlayHtml="<video style='width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;' controls=''><source src='"+e+"' type='video/mp4'>Your browser does not support the video tag. </video>",jQuery("#wdi_feed_"+d+' [wdi_index="'+i+'"] .wdi_photo_wrap_inner').html(overlayHtml),jQuery("#wdi_feed_"+d+' [wdi_index="'+i+'"] .wdi_photo_wrap_inner video').get(0).play()},wdi_front.getVideoTemplate=function(e,i){var d="",r="tenweb-i-play",t="",a="",o="";"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(o='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(d+=" wdi_full_caption");var n="";switch("blog_style"!==e.feed_row.feed_type&&(n="masonry"==e.feed_row.feed_type?"wdi_responsive.showMasonryCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");":"wdi_responsive.showCaption(jQuery(this),"+e.feed_row.wdi_feed_counter+");"),e.feed_row.feed_item_onclick){case"lightbox":t="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":t="onclick=\"window.open ('<%= link%>','_blank')\"",a="wdi_hover_off",r="tenweb-i-play";break;case"custom_redirect":t="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",a="wdi_hover_off",r="";break;case"none":a="wdi_cursor_off wdi_hover_off",r="","blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(t="onclick=wdi_front.replaceToVideo('<%= video_url%>','<%= wdi_index%>',"+e.feed_row.wdi_feed_counter+")",a="",r="tenweb-i-play")}var s='<div class="wdi_feed_item '+d+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> wdi_type="image" id="wdi_'+e.feed_row.wdi_feed_counter+'_<%=id%>"><div class="wdi_photo_wrap"><div class="wdi_photo_wrap_inner"><div class="wdi_photo_img <%= wdi_shape == \'square\' ? \'wdi_shape_square\' : (wdi_shape == \'portrait\' ? \'wdi_shape_portrait\' : (wdi_shape == \'landscape\' ? \'wdi_shape_landscape\' : \'wdi_shape_square\') ) %>"><img class="wdi_img" src="<%=thumb_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+a+'" '+t+">"+o+'<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="tenweb-i '+r+'"></i></div></div></div></div></div></div>',d=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(s+='<div class="wdi_photo_meta">',o=void 0!==e.dataStorageList[d].likes.count?e.dataStorageList[d].likes.count:e.dataStorageList[d].likes,"1"===e.feed_row.show_likes&&0!==o&&(s+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),d=void 0!==e.dataStorageList[d].comments.count?e.dataStorageList[d].comments.count:e.dataStorageList[d].comments,"1"===e.feed_row.show_comments&&0!==d&&(s+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),s+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(s+='<div class="wdi_photo_title" onclick='+n+" ><%=caption%></div>"),s+="</div>"),s+="</div>",_.template(s)},wdi_front.bindEvents=function(e){0!=jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length&&("load_more_btn"==e.feed_row.feed_display_view&&jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_load_more_container").on(wdi_front.clickOrTouch,function(){jQuery(document).find("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_load_more").addClass("wdi_hidden"),jQuery(document).find("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_spinner").removeClass("wdi_hidden"),setTimeout(function(){wdi_front.loadMore(jQuery(this).find(".wdi_load_more_wrap"),e)},1e3)}),"pagination"==e.feed_row.feed_display_view&&(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_next").on(wdi_front.clickOrTouch,function(){parseInt(jQuery("#wdi_current_page").text())+1>e.paginator||(e.currentPage=parseInt(jQuery("#wdi_current_page").text())+1,wdi_front.changePage(jQuery(this),e))}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_prev").on(wdi_front.clickOrTouch,function(){parseInt(jQuery("#wdi_current_page").text())-1<=0||(e.currentPage=parseInt(jQuery("#wdi_current_page").text())-1,wdi_front.changePage(jQuery(this),e))}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_last_page").on(wdi_front.clickOrTouch,function(){e.currentPage=e.paginator,wdi_front.changePage(jQuery(this),e)}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_first_page").on(wdi_front.clickOrTouch,function(){e.currentPage=1,wdi_front.changePage(jQuery(this),e)}),e.paginatorNextFlag=!1),"infinite_scroll"==e.feed_row.feed_display_view&&(jQuery(window).on("scroll",function(){wdi_front.infiniteScroll(e)}),e.infiniteScrollFlag=!1))},wdi_front.infiniteScroll=function(e){jQuery(window).scrollTop()+jQuery(window).height()-100>=jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_infinite_scroll").offset().top&&(e.dataStorageList.length>e.already_loaded_count||void 0===e.already_loaded_count?(e.infiniteScrollFlag=!0,wdi_front.loadMore(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_infinite_scroll"),e)):wdi_front.allImagesLoaded(e))},wdi_front.changePage=function(e,i){var d=e.closest(".wdi_feed_container");d.find(".wdi_page_loading").removeClass("wdi_hidden"),new_page_number=i.currentPage,1<new_page_number?jQuery("#wdi_first_page").removeClass("wdi_disabled"):1===new_page_number&&jQuery("#wdi_first_page").addClass("wdi_disabled"),new_page_number==parseInt(i.paginator)?jQuery("#wdi_last_page").addClass("wdi_disabled"):new_page_number<parseInt(i.paginator)&&jQuery("#wdi_last_page").removeClass("wdi_disabled"),("masonry"==i.feed_row.feed_type?e.parent().parent().parent().find(".wdi_feed_wrapper .wdi_masonry_column"):e.parent().parent().parent().find(".wdi_feed_wrapper")).empty(),e.parent().find("#wdi_current_page").empty().text(new_page_number),wdi_front.displayFeed(i,new_page_number),d.find(".wdi_page_loading").addClass("wdi_hidden")},wdi_front.updatePagination=function(e,i,d){var r="#wdi_feed_"+e.feed_row.wdi_feed_counter;switch(jQuery(r+' [wdi_page="'+e.currentPage+'"]').each(function(){jQuery(this).removeClass("wdi_hidden")}),i){case"next":var d=e.currentPage-1;jQuery(r+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(r+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"prev":d=e.currentPage+1;jQuery(r+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(r+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"custom":(d=d)!=e.currentPage&&(jQuery(r+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(r+' [wdi_page="'+d+'"]').each(function(){jQuery(this).addClass("wdi_hidden")}))}e.paginatorNextFlag=!1,jQuery(r+" .wdi_feed_wrapper").css("height","auto"),jQuery(r+" #wdi_current_page").text(e.currentPage)},wdi_front.loadMore=function(e,i){var d;if(""!=e&&void 0!==e&&"initial"!=e&&"initial-keep"!=e&&(d=window[e.parent().parent().parent().parent().attr("id")]),void 0!==i&&(d=i),wdi_front.ajaxLoader(d),this.isJsonString(d.feed_row.feed_users))for(var r in json_feed_users=JSON.parse(d.feed_row.feed_users),json_feed_users)iuser=json_feed_users[r],"#"!==json_feed_users[r].username.charAt(0)&&(iuser=json_feed_users[r]);"masonry"===d.feed_row.feed_type&&"pagination"==d.feed_row.feed_display_view&&jQuery("#wdi_feed_"+wdi_front.feed_counter+" .wdi_full_caption").each(function(){jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch)}),d.loadMoreDataCount=d.feed_users.length,wdi_front.displayFeed(d)},wdi_front.loadMoreRequest=function(e,i,d,r){d.mediaRequestsDone&&""!=i&&d.usersData},wdi_front.checkForLoadMoreDone=function(e,i){var d,r=e.feed_row.load_more_number,t=e.feed_row.number_of_photos;0==e.loadMoreDataCount&&(e.temproraryUsersData=wdi_front.mergeData(e.temproraryUsersData,e.usersData),d=wdi_front.getArrayContentLength(e.temproraryUsersData,"data"),"initial-keep"==i&&(i="initial"),"initial"==i?d<t&&!wdi_front.userHasNoPhoto(e,e.temproraryUsersData)&&e.instagramRequestCounter<=e.maxConditionalFiltersRequestCount?wdi_front.loadMore("initial",e):(e.usersData=e.temproraryUsersData,wdi_front.displayFeed(e),wdi_front.applyFilters(e),e.temproraryUsersData=[]):d<r&&!wdi_front.userHasNoPhoto(e,e.temproraryUsersData)&&e.instagramRequestCounter<=e.maxConditionalFiltersRequestCount?wdi_front.loadMore(void 0,e):(e.usersData=e.temproraryUsersData,wdi_front.activeUsersCount(e)&&(wdi_front.displayFeed(e,r),wdi_front.applyFilters(e),e.temproraryUsersData=[])))},wdi_front.allDataHasFinished=function(e){for(var i=0,d=0;d<e.dataStorageRaw.length;d++)""==e.usersData[d].pagination.next_url&&(i++,e.usersData[d].finished="finished");return i==e.dataStorageRaw.length&&(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_load_more").remove(),!0)},wdi_front.mergeData=function(e,i){for(var d=0;d<i.length;d++)void 0!==e[d]?"finished"!=i[d].finished&&(void 0===e[d].pagination.next_max_id&&void 0===e[d].pagination.next_max_like_id||(e[d].data=e[d].data.concat(i[d].data),e[d].pagination=i[d].pagination,e[d].user_id=i[d].user_id,e[d].username=i[d].username,e[d].meta=i[d].meta)):e.push(i[d]);return e},wdi_front.brokenImageHandler=function(e){return!0},wdi_front.ajaxLoader=function(e){var i,d=e.feed_row.wdi_feed_counter,d=jQuery(document).find("#wdi_feed_"+d);return"load_more_btn"==e.feed_row.feed_display_view&&(d.find(".wdi_load_more").addClass("wdi_hidden"),d.find(".wdi_spinner").removeClass("wdi_hidden")),"infinite_scroll"==e.feed_row.feed_display_view&&(0==d.find(".wdi_ajax_loading").length?(i=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>'),d.find(".wdi_feed_container").append(i)):i=d.find(".wdi_ajax_loading"),i.removeClass("wdi_hidden")),1},wdi_front.allImagesLoaded=function(e){wdi_front.getDataLength(e);e.mediaRequestsDone||jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia"),0==e.allResponseLength&&1===e.dataLoaded&&jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>");var i=e.feed_row.wdi_feed_counter,i=jQuery("#wdi_feed_"+i);"load_more_btn"==e.feed_row.feed_display_view&&(parseInt(e.allResponseLength)>parseInt(e.feed_row.number_of_photos)&&i.find(".wdi_load_more").removeClass("wdi_hidden"),i.find(".wdi_spinner").addClass("wdi_hidden")),"infinite_scroll"==e.feed_row.feed_display_view&&jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_ajax_loading").addClass("wdi_hidden")},wdi_front.show=function(e,i){var d,r,t=i.feed_row.wdi_feed_counter,a=jQuery("#wdi_feed_"+t+" .wdi_feed_container");"header"===e&&(d={feed_thumb:i.feed_row.feed_thumb,feed_name:i.feed_row.feed_name},r=wdi_front.getHeaderTemplate()(d),d=a.find(".wdi_feed_header").html(),a.find(".wdi_feed_header").html(d+r))},wdi_front.getUserTemplate=function(e,i){var d=e.dataCount,r="#"===i[0]?"//instagram.com/explore/tags/"+i.substr(1,i.length):"//instagram.com/"+i,t="onclick='"+('window.open("'+r+'","_blank")')+"'",r='<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%>">';return 1<d&&(r+='<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="tenweb-i tenweb-i-filter"></span></div></div>'),r+="</div>",r+="<h3 "+t+"><%= user_name%></h3>","#"!==i[0]?("1"==e.feed_row.follow_on_instagram_btn&&(r+='<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>"),r+='<div class="wdi_media_info"><p class="wdi_posts"><span class="tenweb-i tenweb-i-camera-retro"></span><%= counts.media%></p><p class="wdi_followers"><span class="tenweb-i tenweb-i-user"></span><%= counts.followed_by%></p></div>'):r+='<div class="wdi_user_controls"></div><div class="wdi_media_info"><p class="wdi_posts"><span class="tenweb-i tenweb-i-camera-retro"></span><%= counts.media%></p><p class="wdi_followers"><span></span></p></div>',r+='<div class="wdi_clear"></div>',1==d&&"#"!==i[0]&&"1"==e.feed_row.display_user_info&&(r+='<div class="wdi_bio"><%= bio%></div>',r+='<div class="wdi_website"><a target="_blank" href="<%= website_url%>" ><%= website%></a></div>'),r+="</div></div>",_.template(r)},wdi_front.getHeaderTemplate=function(){return _.template('<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>')},wdi_front.addFilter=function(e,i){var d=window["wdi_feed_"+i],i=d.dataCount;if(!(i<2)&&0==d.nowLoadingImages){i=jQuery("#wdi_feed_"+d.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');i.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg"),i.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col"),i.find(".wdi_media_info").toggleClass("wdi_filter_active_col"),i.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col"),d.customFilterChanged=!0,0==d.userSortFlags[e].flag?d.userSortFlags[e].flag=!0:d.userSortFlags[e].flag=!1;for(var r=0,t=0;t<d.userSortFlags.length;t++)1==d.userSortFlags[t].flag&&r++;"pagination"==d.feed_row.feed_display_view&&(d.resIndex=0),0!=r?wdi_front.filterData(d):d.customFilteredData=d.dataStorageList,wdi_front.displayFeed(d),"pagination"==d.feed_row.feed_display_view&&(d.paginator=Math.ceil(d.imageIndex/parseInt(d.feed_row.pagination_per_page_number)),d.currentPage=d.paginator,wdi_front.updatePagination(d,"custom",1),jQuery("#wdi_first_page").removeClass("wdi_disabled"),jQuery("#wdi_last_page").addClass("wdi_disabled"))}},wdi_front.filterData=function(e){var i=e.userSortFlags;e.customFilteredData=[];for(var d=0;d<e.dataStorageList.length;d++)for(var r=0;r<i.length;r++)(void 0!==e.dataStorageList[d].user.id&&e.dataStorageList[d].user.id==i[r].id||e.dataStorageList[d].wdi_hashtag==i[r].name)&&1==i[r].flag&&e.customFilteredData.push(e.dataStorageList[d])},wdi_front.applyFilters=function(e){for(var i=0;i<e.userSortFlags.length;i++)1==e.userSortFlags[i].flag&&(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+'[user_index="'+i+'"]'),wdi_front.addFilter(i,e.feed_row.wdi_feed_counter),wdi_front.addFilter(i,e.feed_row.wdi_feed_counter))},wdi_front.getImgCount=function(e){for(var i=e.dataStorage,d=0,r=0;r<i.length;r++)d+=i[r].length;return d},wdi_front.parseLighboxData=function(e,i){for(var d,r,t,a,o=e.dataStorage,n=[],s=[],_=0;_<o.length;_++)for(var w=0;w<o[_].length;w++)n.push(o[_][w]);for(_=0;_<n.length;_++)void 0!==n[_]&&(r=void 0!==n[_]&&void 0!==n[_].media_url?n[_].media_url:wdi_url.plugin_url+"images/video_missing.png",r=n[_].thumbnail,void 0!==n[_]&&void 0===n[_].media_url&&("carousel"!==n[_].type||(void 0!==(a=n[_].carousel_media[0])&&void 0!==a.images||void 0!==a&&void 0!==a.videos)&&(r=a.thumbnail)),a=void(t=0)!==n[_].comments.count?n[_].comments.count:n[_].comments,void 0!==n[_]&&void 0!==a&&(t=a),d={alt:"",avg_rating:"",comment_count:t,date:wdi_front.convertUnixDate(n[_].created_time),description:wdi_front.getDescription(void 0!==n[_].caption&&null!==n[_].caption?wdi_front.escape_tags(n[_].caption.text):""),filename:wdi_front.getFileName(n[_]),filetype:wdi_front.getFileType(n[_]),hit_count:"0",id:n[_].id,image_url:n[_].link,number:0,rate:"",rate_count:"0",username:void 0!==n[_].user?n[_].user.username:"",profile_picture:void 0!==n[_].user?n[_].user.profile_picture:"",thumb_url:r,comments_data:void 0!==n[_].comments?n[_].comments.data:"",images:n[_].images||n[_].videos,carousel_media:void 0!==n[_].carousel_media?n[_].carousel_media:null},s.push(d));return s},wdi_front.convertUnixDate=function(e){var i=new Date(e).getTime()/1e3,e=new Date(0);e.setUTCSeconds(i);i=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate();return i+=" "+e.getHours()+":"+e.getMinutes()},wdi_front.getDescription=function(e){return e=e.replace(/\r?\n|\r/g," ")},wdi_front.getFileName=function(e){if(void 0!==e){var i=e.link;if("video"===e.type&&e.hasOwnProperty("videos")&&null!=e.videos.standard_resolution)return e.videos.standard_resolution.url;if(void 0===i)return"";i=i.split("/");return i[i.length-2]}},wdi_front.getFileType=function(e){return"video"==e.type&&e.hasOwnProperty("videos")?"EMBED_OEMBED_INSTAGRAM_VIDEO":"carousel"==e.type&&e.hasOwnProperty("carousel_media")?"EMBED_OEMBED_INSTAGRAM_CAROUSEL":"EMBED_OEMBED_INSTAGRAM_IMAGE"},wdi_front.array_max=function(e){for(var i=e[0],d=0,r=1;r<e.length;r++)i<e[r]&&(i=e[r],d=r);return{value:i,index:d}},wdi_front.array_min=function(e){for(var i=e[0],d=0,r=1;r<e.length;r++)i>e[r]&&(i=e[r],d=r);return{value:i,index:d}},wdi_front.activeUsersCount=function(e){for(var i=0,d=0;d<e.usersData.length;d++)"finished"!=e.usersData[d].finished&&i++;return i},wdi_front.checkMediaResponse=function(e,i){return""==e||void 0===e||null==e||void 0!==e.error?(errorMessage=wdi_front_messages.connection_error,wdi_front.show_alert(errorMessage,e,i),!1):""!=e&&void 0!==e&&null!=e&&void 0!==e.meta&&200!=e.meta.code?(errorMessage=e.meta.error_message,wdi_front.show_alert(errorMessage,e,i),!1):e},wdi_front.stripHashtag=function(e){return"#"!==e[0]?e:e.substr(1,e.length)},wdi_front.getInputType=function(e){switch(e[0]){case"#":return"hashtag";case"%":return"location";default:return"user"}},wdi_front.regexpTestCaption=function(e,i){var d=!1,r=!1,t=i.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&"),i=new RegExp("(?:^|\\s)"+t+"(?:^|\\s)"),a=new RegExp("(?:^|\\s)"+t,"g");for(null!=i.exec(e)&&(d=!0);null!=(match=a.exec(e));)r=!0;return 1==d||1==r},wdi_front.replaceNewLines=function(e){var i,d="vUkCJvN2ps3t",r=[];for(e=e.replace(/\r?\n|\r/g,d),i=new RegExp(d,"g");null!=(match=i.exec(e));)r.push(match.index);for(var t=e.split(d),a=0,o=0;o<t.length;o++)""==t[o]?a++:a=0,0<a&&(t.splice(o,1),a--,o--);return e=t.join(" ")},wdi_front.isEmptyObject=function(e){for(var i in e)if(e.hasOwnProperty(i))return!1;return!0},wdi_front.isEmpty=function(e){return!e||0===e.length};var WDIFeed=function(e){this.data=e.data,this.dataCount=e.dataCount,this.feed_row=e.feed_row,this.usersData=e.usersData,(_this=this).set_images_loading_flag=function(e){window.addEventListener("load",function(){e.nowLoadingImages=!1})},this.set_images_loading_flag(_this)};function wdi_extractHostname(e){return void 0===e||""===e?"":e.replace(/(^\w+:|^)\/\//,"")}WDIFeed.prototype.mediaExists=function(e,i){for(var d=0;d<i.length;d++)if(e.id==i[d].id)return!0;return!1},WDIFeed.prototype.getIdFromUrl=function(e){for(var i=e.split("/"),d=!1,r=0;r<i.length;r++)if("p"==i[r]&&void 0!==i[r+1]){d=i[r+1];break}return d},WDIFeed.prototype.avoidDuplicateMedia=function(e){var i=e.data,d=[];void 0===i&&(i=[]);for(var r=0;r<i.length;r++)this.mediaExists(i[r],this.dataStorageList)||this.mediaExists(i[r],d)||this.mediaExists(i[r],this.conditionalFilterBuffer)||d.push(i[r]);return this.conditionalFilterBuffer=this.conditionalFilterBuffer.concat(d),{data:d,meta:e.meta,pagination:e.pagination}},WDIFeed.prototype.storeRawData=function(e,i){var r=this;if("object"==typeof this[i]&&"number"==typeof this[i].length)for(var d=0;d<e.length;d++){var t="";wdi_front.isHashtag(e[d].user_id)?void 0!==e[d].pagination.cursors&&(t=e[d].pagination.cursors.after):"liked"==r.feed_row.liked_feed?void 0===(t=e[d].pagination.next_max_like_id)&&(t=""):(null==e[d].pagination&&(e[d].pagination=[]),void 0===(t=e[d].pagination.next_max_id)&&(t="")),void 0===this[i][d]?this[i].push({data:e[d].data,index:0,locked:!1,hash_id:t,usersDataFinished:!1,userId:e[d].user_id,length:function(){return this.data.length-this.index},getData:function(e){var i=this.data.slice(this.index,this.index+e);if(this.index+=Math.min(e,this.length()),this.index==this.data.length&&1==this.locked&&0==this.usersDataFinished)for(var d=0;d<r.usersData.length;d++)if(r.usersData[d].user_id==this.userId){this.usersDataFinished=!0;break}return i}}):0==this[i][d].locked&&(t!=this[i][d].hash_id?(this[i][d].data=this[i][d].data.concat(e[d].data),this[i][d].hash_id=t):this[i][d].locked=!0)}},wdi_front.updateUsersIfNecessary=function(o){for(var n=o.feed_users,e=!1,i=0;i<n.length;i++)"#"!=n[i].username.substr(0,1)?""!=n[i].id&&"username"!=n[i].id||(e=!0,o.instagram.searchForUsersByName(n[i].username,{success:function(e){if(void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,o),200==e.meta.code&&0<e.data.length){for(var i=!1,d=0;d<e.data.length;d++)if(e.data[d].username==e.args.username){i=!0;break}if(i)for(var r=0;r<n.length;r++)e.data[d].username==n[r].username&&(n[r].id=e.data[d].id)}for(var t=!1,a=0;a<n.length;a++)if(""==n[a].id||"username"==n[a].id){t=!0;break}t||(o.feed_row.feed_users=JSON.stringify(n),wdi_front.init(o))},username:n[i].username})):n[i].id=n[i].username;return e},void 0!==wdi_ajax.ajax_response?jQuery(document).one("ajaxStop",function(){"not_declared"!=wdi_front.type&&(wdi_front.clickOrTouch=wdi_front.detectEvent(),wdi_front.globalInit())}):jQuery(document).ready(function(){"not_declared"!=wdi_front.type&&(wdi_front.clickOrTouch=wdi_front.detectEvent(),wdi_front.globalInit())}),jQuery(document).ready(function(){setTimeout(function(){"1"===wdi_front_messages.show_alerts&&"I"!==jQuery(".wdi_check_fontawesome .tenweb-i-instagram").prop("tagName")&&console.log("Font Awesome is not loaded properly. Please ask for support https://wordpress.org/support/plugin/wd-instagram-feed/")},2e3)});
|
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: 5.7
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -505,6 +505,11 @@ Please make sure you don't have any important information before you proceed.
|
|
505 |
10Web Social Photo Feed for Instagram plugin uses Instagram API on website front end. You have to authorize the plugin via sign in to get data from Instagram on your behalf. The plugin does not send any user’s data to Instagram. All the data received from Instagram via API is cached in WordPress database for some short customizable period to provide front end optimization. You can delete or update cached data. Instagram saves some cookies in browsers of website visitors via API data. These cookies are mostly used for security purposes. They are regulated under terms of Instagram’s privacy policy https://instagram.com/legal/privacy. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
|
506 |
|
507 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
508 |
= 1.4.16 =
|
509 |
Improved: Pagination logic.
|
510 |
Fixed: Compatibility with PHP8.
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.7
|
7 |
+
Stable tag: 1.4.17
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
505 |
10Web Social Photo Feed for Instagram plugin uses Instagram API on website front end. You have to authorize the plugin via sign in to get data from Instagram on your behalf. The plugin does not send any user’s data to Instagram. All the data received from Instagram via API is cached in WordPress database for some short customizable period to provide front end optimization. You can delete or update cached data. Instagram saves some cookies in browsers of website visitors via API data. These cookies are mostly used for security purposes. They are regulated under terms of Instagram’s privacy policy https://instagram.com/legal/privacy. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
|
506 |
|
507 |
== Changelog ==
|
508 |
+
= 1.4.17 =
|
509 |
+
Improved: Load more functionality.
|
510 |
+
Fixed: Show thumbnails for Video posts.
|
511 |
+
Fixed: Adding shortcode with classic editor.
|
512 |
+
|
513 |
= 1.4.16 =
|
514 |
Improved: Pagination logic.
|
515 |
Fixed: Compatibility with PHP8.
|
wd-instagram-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: 10Web Social Photo Feed
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin
|
5 |
* Description: 10Web Social Photo 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.4.
|
7 |
* Author: 10Web
|
8 |
* Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
|
9 |
* License: GPLv2 or later
|
@@ -312,9 +312,7 @@ function wdi_privacy_policy() {
|
|
312 |
}
|
313 |
|
314 |
$wdi_options = wdi_get_options();
|
315 |
-
|
316 |
-
wp_schedule_single_event( time() + (intval(WDI_TRANSIENT_DEFAULT_TIME)*60), 'wdi_cache_cron' );
|
317 |
-
}
|
318 |
|
319 |
add_action( 'wdi_cache_cron', 'wdi_run_cache_cron' );
|
320 |
function wdi_run_cache_cron() {
|
3 |
* Plugin Name: 10Web Social Photo Feed
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin
|
5 |
* Description: 10Web Social Photo 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.4.17
|
7 |
* Author: 10Web
|
8 |
* Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
|
9 |
* License: GPLv2 or later
|
312 |
}
|
313 |
|
314 |
$wdi_options = wdi_get_options();
|
315 |
+
wp_schedule_single_event( time() + (intval($wdi_options["wdi_transient_time"])*60), 'wdi_cache_cron' );
|
|
|
|
|
316 |
|
317 |
add_action( 'wdi_cache_cron', 'wdi_run_cache_cron' );
|
318 |
function wdi_run_cache_cron() {
|