Version Description
Fixed: Open settings page after activation. Fixed: Load more functionality. Fixed: Feed does not work with hashtag for some cases. Fixed: Error after re-connecting a Business account.
Download this release
Release Info
Developer | webdorado |
Plugin | WD Instagram Feed – Instagram Gallery |
Version | 1.4.10 |
Comparing to | |
See all releases |
Code changes from version 1.4.9 to 1.4.10
- admin/controllers/WDIControllerUninstall_wdi.php +0 -130
- admin/controllers/settings.php +0 -1
- admin/controllers/uninstall.php +8 -4
- admin/models/feeds.php +1 -1
- admin/views/feeds.php +3 -2
- admin/views/settings.php +3 -3
- admin/views/uninstall.php +8 -0
- css/gallerybox/jquery.mCustomScrollbar.min.css +1 -1
- css/wdi_backend.css +5 -0
- css/wdi_backend.min.css +1 -1
- framework/WDIInstagram.php +5 -5
- framework/WDILibrary.php +3 -2
- frontend/shortcode.php +6 -3
- js/block.min.css +0 -0
- js/block.min.js +1 -0
- js/gallerybox/{jquery.fullscreen-0.4.1.js → jquery.fullscreen-0.4.0.js} +0 -0
- js/gallerybox/jquery.fullscreen-0.4.0.min.js +1 -0
- js/gallerybox/{jquery.mobile.js → jquery.mobile.min.js} +0 -0
- js/gallerybox/wdi_gallery_box.min.js +1 -1
- js/shortcode.min.js +1 -0
- js/wdi_admin.js +48 -33
- js/wdi_admin.min.js +1 -1
- js/wdi_frontend.js +63 -48
- js/wdi_frontend.min.js +1 -1
- js/wdi_instagram.js +72 -239
- js/wdi_instagram.min.js +1 -1
- js/wdi_responsive.min.js +1 -1
- readme.txt +8 -2
- wd-instagram-feed.php +39 -23
- wd/.gitignore +0 -2
admin/controllers/WDIControllerUninstall_wdi.php
DELETED
@@ -1,130 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDIControllerUninstall_wdi {
|
4 |
-
|
5 |
-
function __construct(){
|
6 |
-
}
|
7 |
-
|
8 |
-
public function execute() {
|
9 |
-
$task = WDILibrary::get('task');
|
10 |
-
if (method_exists($this, $task)) {
|
11 |
-
check_admin_referer('nonce_wd', 'nonce_wd');
|
12 |
-
$this->$task();
|
13 |
-
}
|
14 |
-
else {
|
15 |
-
if($this->is_uninstalled()){
|
16 |
-
$this->already_uninstalled();
|
17 |
-
}else{
|
18 |
-
$this->display();
|
19 |
-
}
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
public function display(){
|
24 |
-
require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
|
25 |
-
$model = new WDIModelUninstall_wdi();
|
26 |
-
|
27 |
-
require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
|
28 |
-
$view = new WDIViewUninstall_wdi($model);
|
29 |
-
$view->display();
|
30 |
-
}
|
31 |
-
|
32 |
-
public function already_uninstalled(){
|
33 |
-
require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
|
34 |
-
$model = new WDIModelUninstall_wdi();
|
35 |
-
|
36 |
-
require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
|
37 |
-
$view = new WDIViewUninstall_wdi($model);
|
38 |
-
$view->already_uninstalled();
|
39 |
-
}
|
40 |
-
|
41 |
-
public function succesfully_uninstalled(){
|
42 |
-
require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
|
43 |
-
$model = new WDIModelUninstall_wdi();
|
44 |
-
|
45 |
-
require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
|
46 |
-
$view = new WDIViewUninstall_wdi($model);
|
47 |
-
$view->successfully_uninstalled();
|
48 |
-
}
|
49 |
-
|
50 |
-
private function uninstall(){
|
51 |
-
$verify = WDILibrary::get('wdi_verify', 0, 'intval');
|
52 |
-
if ( !$this->is_uninstalled() ) {
|
53 |
-
if( $verify == '1' ) {
|
54 |
-
global $wpdb;
|
55 |
-
$removed = false;
|
56 |
-
$table_name = $wpdb->prefix.WDI_FEED_TABLE;
|
57 |
-
$checktable = $wpdb->query("SHOW TABLES LIKE '$table_name'");
|
58 |
-
$table_exists = $checktable > 0;
|
59 |
-
if($table_exists){
|
60 |
-
$sql = "DROP TABLE ". $table_name;
|
61 |
-
$wpdb->query($sql);
|
62 |
-
$removed = true;
|
63 |
-
}
|
64 |
-
$table_name = $wpdb->prefix.WDI_THEME_TABLE;
|
65 |
-
$checktable = $wpdb->query("SHOW TABLES LIKE '$table_name'");
|
66 |
-
$table_exists = $checktable > 0;
|
67 |
-
if($table_exists){
|
68 |
-
$sql = "DROP TABLE ". $table_name;
|
69 |
-
$wpdb->query($sql);
|
70 |
-
$removed = true;
|
71 |
-
}
|
72 |
-
if($removed == true) {
|
73 |
-
$this->succesfully_uninstalled();
|
74 |
-
}
|
75 |
-
else{
|
76 |
-
$this->already_uninstalled();
|
77 |
-
};
|
78 |
-
|
79 |
-
delete_option(WDI_OPT);
|
80 |
-
|
81 |
-
$sample_post_id = get_option('wdi_sample_feed_post_id');
|
82 |
-
if($sample_post_id !== false){
|
83 |
-
wp_delete_post( $sample_post_id, true );
|
84 |
-
}
|
85 |
-
|
86 |
-
delete_option('wdi_sample_feed_id');
|
87 |
-
delete_option('wdi_sample_feed_post_id');
|
88 |
-
delete_option('wdi_sample_feed_post_url');
|
89 |
-
delete_option('wdi_first_user_username');
|
90 |
-
delete_option('wdi_theme_keys');
|
91 |
-
delete_option('wdi_admin_notice');
|
92 |
-
|
93 |
-
$default_option=array();
|
94 |
-
$default_option['wdi_plugin_uninstalled'] = 'true';
|
95 |
-
|
96 |
-
add_option(WDI_OPT,$default_option);
|
97 |
-
delete_option('wdi_version');
|
98 |
-
$row = get_posts(array( 'post_type' => "wdi_instagram" ));
|
99 |
-
if ( !empty($row[0]) ) {
|
100 |
-
wp_delete_post( $row[0]->ID, true );
|
101 |
-
}
|
102 |
-
|
103 |
-
$this->remove_theme_files();
|
104 |
-
}else{
|
105 |
-
$this->display();
|
106 |
-
}
|
107 |
-
}
|
108 |
-
else{
|
109 |
-
$this->already_uninstalled();
|
110 |
-
}
|
111 |
-
delete_option('wdi_subscribe_done');
|
112 |
-
delete_option('wdi_redirect_to_settings');
|
113 |
-
delete_option('wdi_do_activation_set_up_redirect');
|
114 |
-
}
|
115 |
-
|
116 |
-
private function is_uninstalled(){
|
117 |
-
global $wdi_options;
|
118 |
-
if(isset($wdi_options['wdi_plugin_uninstalled']) && $wdi_options['wdi_plugin_uninstalled']=='true') {
|
119 |
-
return true;
|
120 |
-
}else{
|
121 |
-
return false;
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
private function remove_theme_files(){
|
126 |
-
require_once WDI_DIR . '/admin/controllers/WDIControllerThemes_wdi.php';
|
127 |
-
WDIControllerThemes_wdi::remove_all_themes_files();
|
128 |
-
}
|
129 |
-
|
130 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/controllers/settings.php
CHANGED
@@ -114,7 +114,6 @@ class Settings_controller_wdi {
|
|
114 |
$wdi_options['wdi_access_token'] = $access_token;
|
115 |
}
|
116 |
update_option(WDI_OPT, $wdi_options);
|
117 |
-
|
118 |
WDILibrary::redirect(add_query_arg(array(
|
119 |
'page' => 'wdi_settings',
|
120 |
'message' => 29,
|
114 |
$wdi_options['wdi_access_token'] = $access_token;
|
115 |
}
|
116 |
update_option(WDI_OPT, $wdi_options);
|
|
|
117 |
WDILibrary::redirect(add_query_arg(array(
|
118 |
'page' => 'wdi_settings',
|
119 |
'message' => 29,
|
admin/controllers/uninstall.php
CHANGED
@@ -55,9 +55,14 @@ class Uninstall_controller_wdi {
|
|
55 |
if ( $sample_post_id !== FALSE ) {
|
56 |
wp_delete_post($sample_post_id, TRUE);
|
57 |
}
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
// remove all options.
|
63 |
delete_option(WDI_OPT);
|
@@ -70,7 +75,6 @@ class Uninstall_controller_wdi {
|
|
70 |
delete_option('wdi_admin_notice');
|
71 |
delete_option('wdi_subscribe_done');
|
72 |
delete_option('wdi_redirect_to_settings');
|
73 |
-
delete_option('wdi_do_activation_set_up_redirect');
|
74 |
delete_option('widget_wdi_instagram_widget');
|
75 |
$this->remove_theme_files();
|
76 |
|
55 |
if ( $sample_post_id !== FALSE ) {
|
56 |
wp_delete_post($sample_post_id, TRUE);
|
57 |
}
|
58 |
+
|
59 |
+
$rows = get_posts(array(
|
60 |
+
"post_type" => "wdi_instagram",
|
61 |
+
"numberposts" => -1 )
|
62 |
+
);
|
63 |
+
|
64 |
+
foreach ( $rows as $row ) {
|
65 |
+
wp_delete_post( $row->ID, true );
|
66 |
}
|
67 |
// remove all options.
|
68 |
delete_option(WDI_OPT);
|
75 |
delete_option('wdi_admin_notice');
|
76 |
delete_option('wdi_subscribe_done');
|
77 |
delete_option('wdi_redirect_to_settings');
|
|
|
78 |
delete_option('widget_wdi_instagram_widget');
|
79 |
$this->remove_theme_files();
|
80 |
|
admin/models/feeds.php
CHANGED
@@ -253,7 +253,7 @@ class Feeds_model_wdi {
|
|
253 |
else {
|
254 |
$post_params = array(
|
255 |
'post_author' => 1,
|
256 |
-
'post_status' => '
|
257 |
'post_content' => '[wdi_preview]',
|
258 |
'post_title' => 'Preview',
|
259 |
'post_type' => $post_type,
|
253 |
else {
|
254 |
$post_params = array(
|
255 |
'post_author' => 1,
|
256 |
+
'post_status' => 'publish',
|
257 |
'post_content' => '[wdi_preview]',
|
258 |
'post_title' => 'Preview',
|
259 |
'post_type' => $post_type,
|
admin/views/feeds.php
CHANGED
@@ -544,13 +544,13 @@ class Feeds_view_wdi {
|
|
544 |
'br' => 'true'
|
545 |
);
|
546 |
|
547 |
-
$tabs["feed_settings"]["advanced"]["elements"][0]["thumb_user"]["switched"]="off";
|
548 |
$tabs["feed_settings"]["advanced"]["elements"][0]["thumb_user"]["label"] = array(
|
549 |
'place' => 'after',
|
550 |
'class' => 'wdi_pro_only',
|
551 |
'text' => __("Featured Image is available only in premium version", "wd-instagram-feed"),
|
552 |
'br' => 'true'
|
553 |
-
)
|
554 |
|
555 |
$tabs["feed_settings"]["layout"]["elements"][0]["feed_display_view"]["disabled_options"]=array('infinite_scroll');
|
556 |
$tabs["feed_settings"]["layout"]["elements"][0]["feed_display_view"]["disabled"]=array(
|
@@ -761,6 +761,7 @@ class Feeds_view_wdi {
|
|
761 |
}
|
762 |
|
763 |
$formInfo = $this->getFormElements($current_id);
|
|
|
764 |
$tabs = $formInfo['tabs'];
|
765 |
$wdi_preview_link = $this->model->get_instagram_preview_post();
|
766 |
// for edit
|
544 |
'br' => 'true'
|
545 |
);
|
546 |
|
547 |
+
/* $tabs["feed_settings"]["advanced"]["elements"][0]["thumb_user"]["switched"]="off";
|
548 |
$tabs["feed_settings"]["advanced"]["elements"][0]["thumb_user"]["label"] = array(
|
549 |
'place' => 'after',
|
550 |
'class' => 'wdi_pro_only',
|
551 |
'text' => __("Featured Image is available only in premium version", "wd-instagram-feed"),
|
552 |
'br' => 'true'
|
553 |
+
);*/
|
554 |
|
555 |
$tabs["feed_settings"]["layout"]["elements"][0]["feed_display_view"]["disabled_options"]=array('infinite_scroll');
|
556 |
$tabs["feed_settings"]["layout"]["elements"][0]["feed_display_view"]["disabled"]=array(
|
761 |
}
|
762 |
|
763 |
$formInfo = $this->getFormElements($current_id);
|
764 |
+
|
765 |
$tabs = $formInfo['tabs'];
|
766 |
$wdi_preview_link = $this->model->get_instagram_preview_post();
|
767 |
// for edit
|
admin/views/settings.php
CHANGED
@@ -55,7 +55,7 @@ class Settings_view_wdi {
|
|
55 |
<h2 class="wdi-page-title"><?php _e('Accounts', 'wd-instagram-feed'); ?></h2>
|
56 |
<ul class="wdi-accounts-list">
|
57 |
<?php foreach ( $authenticated_users_list as $user_name => $user ) { ?>
|
58 |
-
<li class="wdi-account-list-<?php echo $
|
59 |
<div class="wdi-account-block">
|
60 |
<div>
|
61 |
<div class="wdi-account-user-info">
|
@@ -67,7 +67,7 @@ class Settings_view_wdi {
|
|
67 |
</div>
|
68 |
</div>
|
69 |
<div>
|
70 |
-
<span class="button wdi-account-remove" onclick="wdi_account_remove('<?php echo $user_name; ?>')"><?php _e('Remove', 'wd-instagram-feed'); ?></span>
|
71 |
</div>
|
72 |
</div>
|
73 |
<div class="wdi-account-accesstoken">
|
@@ -90,7 +90,7 @@ class Settings_view_wdi {
|
|
90 |
</p>
|
91 |
</div>
|
92 |
<span class="button wdi-account-remove"
|
93 |
-
onclick="wdi_account_remove('<?php echo $user_name; ?>')"><?php _e('Remove', 'wd-instagram-feed'); ?></span>
|
94 |
<div class="wdi_clear"></div>
|
95 |
</div>
|
96 |
</li>
|
55 |
<h2 class="wdi-page-title"><?php _e('Accounts', 'wd-instagram-feed'); ?></h2>
|
56 |
<ul class="wdi-accounts-list">
|
57 |
<?php foreach ( $authenticated_users_list as $user_name => $user ) { ?>
|
58 |
+
<li class="wdi-account-list-<?php echo $user['user_id'] ?>">
|
59 |
<div class="wdi-account-block">
|
60 |
<div>
|
61 |
<div class="wdi-account-user-info">
|
67 |
</div>
|
68 |
</div>
|
69 |
<div>
|
70 |
+
<span class="button wdi-account-remove" onclick="wdi_account_remove('<?php echo $user_name; ?>','<?php echo $user['user_id']; ?>')"><?php _e('Remove', 'wd-instagram-feed'); ?></span>
|
71 |
</div>
|
72 |
</div>
|
73 |
<div class="wdi-account-accesstoken">
|
90 |
</p>
|
91 |
</div>
|
92 |
<span class="button wdi-account-remove"
|
93 |
+
onclick="wdi_account_remove('<?php echo $user_name; ?>', '<?php echo $user['user_id']; ?>')"><?php _e('Remove', 'wd-instagram-feed'); ?></span>
|
94 |
<div class="wdi_clear"></div>
|
95 |
</div>
|
96 |
</li>
|
admin/views/uninstall.php
CHANGED
@@ -27,6 +27,14 @@ class Uninstall_view_wdi {
|
|
27 |
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">5) wdi_custom_css</li>
|
28 |
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">6) wdi_instagram_options</li>
|
29 |
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">7) wdi_feeds_min_capability</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
</ul>
|
31 |
</div>
|
32 |
<form action="admin.php?page=wdi_uninstall" id="wdi_uninstall_form" method="post">
|
27 |
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">5) wdi_custom_css</li>
|
28 |
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">6) wdi_instagram_options</li>
|
29 |
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">7) wdi_feeds_min_capability</li>
|
30 |
+
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">8) wdi_sample_feed_id</li>
|
31 |
+
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">9) wdi_sample_feed_post_id</li>
|
32 |
+
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">10) wdi_sample_feed_post_url</li>
|
33 |
+
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">11) wdi_first_user_username</li>
|
34 |
+
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">12) wdi_theme_keys</li>
|
35 |
+
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">13) wdi_admin_notice</li>
|
36 |
+
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">14) wdi_subscribe_done</li>
|
37 |
+
<li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">15) widget_wdi_instagram_widget</li>
|
38 |
</ul>
|
39 |
</div>
|
40 |
<form action="admin.php?page=wdi_uninstall" id="wdi_uninstall_form" method="post">
|
css/gallerybox/jquery.mCustomScrollbar.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mCSB_container{width:auto;margin-right:15px;overflow:hidden}.mCSB_container.mCS_no_scrollbar{margin-right:0}.mCS_disabled>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar,.mCS_destroyed>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar{margin-right:15px}.mCustomScrollBox>.mCSB_scrollTools{width:16px;height:100%;top:0;right:0}.mCSB_scrollTools .mCSB_draggerContainer{position:absolute;top:0;left:0;bottom:0;right:0;height:auto}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:20px 0}.mCSB_scrollTools .mCSB_draggerRail{width:2px;height:100%;margin:0 auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_scrollTools .mCSB_dragger{cursor:pointer;width:100%;height:30px}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;height:100%;margin:0 auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;text-align:center}.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown{display:block;position:relative;height:20px;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools .mCSB_buttonDown{top:100%;margin-top:-40px}.mCSB_horizontal>.mCSB_container{height:auto;margin-right:0;margin-bottom:30px;overflow:hidden}.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{margin-bottom:0}.mCS_disabled>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar,.mCS_destroyed>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{margin-right:0;margin-bottom:30px}.mCSB_horizontal.mCustomScrollBox>.mCSB_scrollTools{width:100%;height:16px;top:auto;right:auto;bottom:0;left:0;overflow:hidden}.mCSB_horizontal>.mCSB_scrollTools a+.mCSB_draggerContainer{margin:0 20px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:2px;margin:7px 0;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger{width:30px;height:100%}.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{display:block;position:relative;width:20px;height:100%;overflow:hidden;margin:0 auto;cursor:pointer;float:left}.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{margin-left:-40px;float:right}.mCustomScrollBox{-ms-touch-action:none}.mCustomScrollBox>.mCSB_scrollTools{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCustomScrollBox:hover>.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=100)";-ms-filter:"alpha(opacity=100)"}.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,0.4);filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background:#fff;background:rgba(255,255,255,0.75);filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,0.85);filter:"alpha(opacity=85)";-ms-filter:"alpha(opacity=85)"}.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background:rgba(255,255,255,0.9);filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight{background-image:url(mCSB_buttons.png);background-repeat:no-repeat;opacity:.4;filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_buttonUp{background-position:0 0}.mCSB_scrollTools .mCSB_buttonDown{background-position:0 -20px}.mCSB_scrollTools .mCSB_buttonLeft{background-position:0 -40px}.mCSB_scrollTools .mCSB_buttonRight{background-position:0 -56px}.mCSB_scrollTools .mCSB_buttonUp:hover,.mCSB_scrollTools .mCSB_buttonDown:hover,.mCSB_scrollTools .mCSB_buttonLeft:hover,.mCSB_scrollTools .mCSB_buttonRight:hover{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_buttonUp:active,.mCSB_scrollTools .mCSB_buttonDown:active,.mCSB_scrollTools .mCSB_buttonLeft:active,.mCSB_scrollTools .mCSB_buttonRight:active{opacity:.9;filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCS-dark>.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,0.15)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background:#000;background:rgba(0,0,0,0.75)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,0.85)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background:rgba(0,0,0,0.9)}.mCS-dark>.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark>.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark>.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}.mCS-light-2>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#fff;background:rgba(255,255,255,0.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background:#fff;background:rgba(255,255,255,0.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,0.85)}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-light-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background:rgba(255,255,255,0.9)}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px 0}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -20px}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -40px}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -56px}.mCS-dark-2>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#000;background:rgba(0,0,0,0.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background:#000;background:rgba(0,0,0,0.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,0.85)}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background:rgba(0,0,0,0.9)}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px 0}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -20px}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -40px}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -56px}.mCS-light-thick>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#fff;background:rgba(255,255,255,0.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background:#fff;background:rgba(255,255,255,0.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,0.85)}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background:rgba(255,255,255,0.9)}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonUp{background-position:-16px 0}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonDown{background-position:-16px -20px}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-20px -40px}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonRight{background-position:-20px -56px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#000;background:rgba(0,0,0,0.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background:#000;background:rgba(0,0,0,0.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,0.85)}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background:rgba(0,0,0,0.9)}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonUp{background-position:-96px 0}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonDown{background-position:-96px -20px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-100px -40px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonRight{background-position:-100px -56px}.mCS-light-thin>.mCSB_scrollTools .mCSB_draggerRail{background:#fff;background:rgba(255,255,255,0.1)}.mCS-light-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px}.mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%}.mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin>.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,0.15)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px;background:#000;background:rgba(0,0,0,0.75)}.mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%}.mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,0.85)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background:rgba(0,0,0,0.9)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}
|
1 |
+
.mCSB_container{width:auto;margin-right:15px;overflow:hidden}.mCSB_container.mCS_no_scrollbar{margin-right:0}.mCS_destroyed>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar,.mCS_disabled>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar{margin-right:15px}.mCustomScrollBox>.mCSB_scrollTools{width:16px;height:100%;top:0;right:0}.mCSB_scrollTools .mCSB_draggerContainer{position:absolute;top:0;left:0;bottom:0;right:0;height:auto}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:20px 0}.mCSB_scrollTools .mCSB_draggerRail{width:2px;height:100%;margin:0 auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_scrollTools .mCSB_dragger{cursor:pointer;width:100%;height:30px}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;height:100%;margin:0 auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;text-align:center}.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonUp{display:block;position:relative;height:20px;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools .mCSB_buttonDown{top:100%;margin-top:-40px}.mCSB_horizontal>.mCSB_container{height:auto;margin-right:0;margin-bottom:30px;overflow:hidden}.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{margin-bottom:0}.mCS_destroyed>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar,.mCS_disabled>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{margin-right:0;margin-bottom:30px}.mCSB_horizontal.mCustomScrollBox>.mCSB_scrollTools{width:100%;height:16px;top:auto;right:auto;bottom:0;left:0;overflow:hidden}.mCSB_horizontal>.mCSB_scrollTools a+.mCSB_draggerContainer{margin:0 20px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:2px;margin:7px 0;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger{width:30px;height:100%}.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{display:block;position:relative;width:20px;height:100%;overflow:hidden;margin:0 auto;cursor:pointer;float:left}.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{margin-left:-40px;float:right}.mCustomScrollBox{-ms-touch-action:none}.mCustomScrollBox>.mCSB_scrollTools{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCustomScrollBox:hover>.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=100)";-ms-filter:"alpha(opacity=100)"}.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,.4);filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background:#fff;background:rgba(255,255,255,.75);filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,.85);filter:"alpha(opacity=85)";-ms-filter:"alpha(opacity=85)"}.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(255,255,255,.9);filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight,.mCSB_scrollTools .mCSB_buttonUp{background-image:url(mCSB_buttons.png);background-repeat:no-repeat;opacity:.4;filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_buttonUp{background-position:0 0}.mCSB_scrollTools .mCSB_buttonDown{background-position:0 -20px}.mCSB_scrollTools .mCSB_buttonLeft{background-position:0 -40px}.mCSB_scrollTools .mCSB_buttonRight{background-position:0 -56px}.mCSB_scrollTools .mCSB_buttonDown:hover,.mCSB_scrollTools .mCSB_buttonLeft:hover,.mCSB_scrollTools .mCSB_buttonRight:hover,.mCSB_scrollTools .mCSB_buttonUp:hover{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_buttonDown:active,.mCSB_scrollTools .mCSB_buttonLeft:active,.mCSB_scrollTools .mCSB_buttonRight:active,.mCSB_scrollTools .mCSB_buttonUp:active{opacity:.9;filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCS-dark>.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,.15)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background:#000;background:rgba(0,0,0,.75)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,.85)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(0,0,0,.9)}.mCS-dark>.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark>.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark>.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}.mCS-light-2>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#fff;background:rgba(255,255,255,.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background:#fff;background:rgba(255,255,255,.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,.85)}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-light-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(255,255,255,.9)}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px 0}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -20px}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -40px}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -56px}.mCS-dark-2>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#000;background:rgba(0,0,0,.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background:#000;background:rgba(0,0,0,.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,.85)}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(0,0,0,.9)}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px 0}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -20px}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -40px}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -56px}.mCS-light-thick>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#fff;background:rgba(255,255,255,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background:#fff;background:rgba(255,255,255,.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,.85)}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(255,255,255,.9)}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonUp{background-position:-16px 0}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonDown{background-position:-16px -20px}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-20px -40px}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonRight{background-position:-20px -56px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#000;background:rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background:#000;background:rgba(0,0,0,.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,.85)}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(0,0,0,.9)}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonUp{background-position:-96px 0}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonDown{background-position:-96px -20px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-100px -40px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonRight{background-position:-100px -56px}.mCS-light-thin>.mCSB_scrollTools .mCSB_draggerRail{background:#fff;background:rgba(255,255,255,.1)}.mCS-light-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px}.mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%}.mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin>.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,.15)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px;background:#000;background:rgba(0,0,0,.75)}.mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%}.mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,.85)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(0,0,0,.9)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}
|
css/wdi_backend.css
CHANGED
@@ -22,6 +22,10 @@
|
|
22 |
width: 45%;
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
25 |
/*tooltip css*/
|
26 |
.wdi_tooltip,
|
27 |
.wdi_settings_link {
|
@@ -1998,6 +2002,7 @@ body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){
|
|
1998 |
margin-bottom: 25px;
|
1999 |
padding-bottom: 16px;
|
2000 |
border-bottom: 1px solid rgba(229, 229, 229, 1);
|
|
|
2001 |
}
|
2002 |
.wdi-advanced-options .wdi-advanced-headline .wdi-page-title {
|
2003 |
float: left;
|
22 |
width: 45%;
|
23 |
}
|
24 |
|
25 |
+
#toplevel_page_wdi_settings.current a div img { /*conflict with single item menu*/
|
26 |
+
opacity: 1;
|
27 |
+
}
|
28 |
+
|
29 |
/*tooltip css*/
|
30 |
.wdi_tooltip,
|
31 |
.wdi_settings_link {
|
2002 |
margin-bottom: 25px;
|
2003 |
padding-bottom: 16px;
|
2004 |
border-bottom: 1px solid rgba(229, 229, 229, 1);
|
2005 |
+
cursor: pointer;
|
2006 |
}
|
2007 |
.wdi-advanced-options .wdi-advanced-headline .wdi-page-title {
|
2008 |
float: left;
|
css/wdi_backend.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wdi_clear{display:block;height:0;clear:both}.wdi_clear_tag:after{content:"";display:table;clear:both}#wdi_unistall{background-color:#d82121;border-color:#d31818;box-shadow:inset 0 1px 0 rgba(230,120,120,.5),0 1px 0 rgba(0,0,0,.15)}#wdi_unistall:hover{background-color:#da1313}#wdi_unistall_table th{width:45%}.wdi_settings_link,.wdi_tooltip{display:block;font-size:14px!important;font-weight:700;line-height:20px;margin-bottom:5px;color:#444;text-decoration:none}.wdi_theme.wdi_border_wrapper{background:#fff;padding:5px 0}.wdi_settings_link:hover,.wdi_tooltip:hover{color:#23282d;position:relative}.wdi_tooltip:hover:after{content:attr(wdi-tooltip);padding:4px 8px;color:#dbdbe0;position:absolute;left:0;top:100%;white-space:nowrap;z-index:20;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:2px;-moz-box-shadow:0 0 4px #222;-webkit-box-shadow:0 0 4px #222;box-shadow:0 0 4px rgba(0,0,0,.5);background-color:rgba(0,0,0,.75);font-size:12px}.display_type_container>div{float:left;margin-right:15px}#wdi_feed_users_ajax{width:100%;margin-top:2px}#wdi_feed_tabs .wdi_feed_tabs{border:1px solid #f1f1f1;color:#444;cursor:pointer;font-size:13px;font-weight:700;padding:12px;background:#fff;text-decoration:none;display:inline-block}#wdi_feed_tabs{margin:16px 0}#wdi_feed_tabs .wdi_feed_tab_active,#wdi_feed_tabs .wdi_feed_tabs:hover{background:none repeat scroll 0 0 #fff;color:#9a2465}#wdi_feed_tabs .wdi_feed_tab_title{margin-top:1px;display:inline-block}.wdi_border_wrapper [scope=row],.wdi_border_wrapper [scope=row]+td{padding:8px}.wdi_user{border:1px solid #b9b9b9;background-color:rgba(0,0,0,.05);margin:0 4px 0 0;border-radius:5px;height:28px;position:relative;display:inline-block}.wdi_user:hover{background-color:rgba(0,0,0,.08)}.display_type_container.wdi_clear_tag{display:table;margin:10px auto}.wdi_user a{text-decoration:none;color:#000;line-height:28px;width:70%;margin-left:12%;margin-right:18%;height:100%;display:table-row;padding-right:3px}.wdi_user .wdi_profile_pic{width:20px;height:20px;top:4px;left:30px;padding:5px;vertical-align:middle;display:table-cell}.wdi_user span{display:table-cell;vertical-align:middle;left:55px;font-weight:700;font-size:14px}.wdi_user .wdi_check_thumb_user,.wdi_user .wdi_remove_user{position:absolute;right:4px;width:15px;height:15px;top:6.5px;transition:all .1s ease}.wdi_user .wdi_remove_user:hover{cursor:pointer;transform:rotate(180deg)}.wdi_user .wdi_check_thumb_user:hover{cursor:pointer}.wdi_user .wdi_check_thumb_user{left:4px}.wdi_border_wrapper [scope=row]{padding:2px;font-size:13px;min-width:250px}.wdi_border_wrapper [scope=row],.wdi_border_wrapper [scope=row]+td{padding:2px}.small_input{width:60px;text-align:center}.display_type{text-align:center}.instagram-feed_page_wdi_settings table td{padding-left:0;padding-right:0}.instagram-feed_page_wdi_settings table th{padding-left:4px}.instagram-feed_page_wdi_settings table input{float:right}.wdi-settings-page .wdi_help_bar_wrap{background-color:unset;padding:15px 15px 15px 0}.wdi-settings-page .wdi_settings_form{margin-right:20px;padding:30px 20px;background:#fff}.wdi_advanced_option_open tr:nth-child(10),.wdi_advanced_option_open tr:nth-child(11),.wdi_advanced_option_open tr:nth-child(9){display:none}.instagram-feed_page_wdi_settings table #wdwt_wrap_wdi_fb_auth{margin-left:115px}#wdwt_wrap_wdi_fb_auth .block a{background-color:#4267b2;color:#fff}#wdwt_wrap_wdi_authenticated_users_list .block,#wdwt_wrap_wdi_reset_cache .block,.wdi_advanced_option .optioninput{display:inline-block}#wdi_options_page_buttons_wrapper .submit{display:inline;margin-left:15px}.wdi_advanced_option{width:100%;position:relative;font-weight:600}.wdi_advanced_option{background-color:#fff;cursor:pointer;border:1px solid #e3e3e3;border-radius:10px;border-collapse:separate;border-spacing:0}.wdi_advanced_option .wdi_advanced_option_head{border-bottom:1px solid #e3e3e3}.wdi_advanced_option .wdi_advanced_option_head th{padding-top:10px;padding-bottom:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th{border-bottom:1px solid #e3e3e3;border-bottom-left-radius:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td{border-bottom:1px solid #e3e3e3;border-bottom-right-radius:10px}.instagram-feed_page_wdi_settings table.wdi_advanced_option th{padding-left:12px}.instagram-feed_page_wdi_settings table.wdi_advanced_option td .wdwt_param{margin-left:15px}.instagram-feed_page_wdi_settings #wdwt_wrap_wdi_disable_fa .optioninput{display:inline-block}.wdi_advanced_option .wdi_advanced_option_icon{background-repeat:no-repeat;background-position:left top;width:20px;height:20px;display:inline-block;position:absolute;top:16px;right:10px}.wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon{background-image:url(../images/arrow_1.png)}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon{background-image:url(../images/arrow_2.png)}.wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head){display:none}#wdi_options_page_buttons_wrapper{margin-top:10px;width:700px}.wdi_hidden{display:none!important}.selectoff{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_filter_radio{margin:5px;display:inline-block}.wdi_filter_radio label{vertical-align:text-bottom}.filters_description{font-size:13px;font-weight:700;margin-top:8px;display:inline-block}.wdi_filter_input input{width:250px;margin-right:0;padding-right:0}#wdi_filter_type{line-height:28px;margin:0;padding:0;position:relative;right:2px;top:-1px;font-weight:400}.wdi_filter_item{display:inline-block;padding:6px;margin-top:5px;border-radius:5px}.wdi_filter_by_username{background-color:#00a0d2;color:#fff}.wdi_filter_by_hashtag{background-color:#e08d11;color:#fff}.wdi_logic{display:inline-block;padding:5px;font-weight:700}.wdi_filter_by_location{background-color:#509833;color:#fff}.wdi_filter_by_mention{background-color:#833888;color:#fff}.wdi_filter_by_description{background-color:#bd242b;color:#fff}.wdi_filter_by_url{background-color:#004eff;color:#fff}.wdi_remove_filter{padding-left:5px;color:#fff;font-size:13px}.wdi_remove_filter:hover{cursor:pointer}.wdi_source_user{border:1px solid #d4d4d4;background-color:rgba(0,0,0,.03);margin:0 4px 0 0;border-radius:5px;height:29px;display:inline-block;padding:2px 0 0 4px}.wdi_source_img{display:inline-block}.wdi_source_img img{width:22px;height:22px;border-radius:15px;display:block;padding:0}.wdi_source_username{display:inline-block;line-height:25px;font-size:15px!important;height:30px;vertical-align:bottom;padding:0 5px;font-weight:700}#login_with_instagram>a:focus{-webkit-box-shadow:none;box-shadow:none}.wdi_help_bar_wrap{background-color:#fff;border:none;box-sizing:border-box;clear:both;color:#6e7990;font-size:14px;font-weight:700;line-height:30px;padding:15px;vertical-align:middle;width:100%;margin:20px 0 0 0}.wdi_help_bar_wrap a,.wdi_help_bar_wrap span{font-size:14px}.wdi_help_bar_text{float:left}.wdi_help_bar_text>a{color:#0073aa;text-decoration:none}.wdi_hb_buy_pro{float:right;padding:0}.wdi_hb_buy_pro a,.wdi_hb_buy_pro a:active,.wdi_hb_buy_pro a:hover,.wdi_hb_buy_pro a:visited{display:inline-block;font-weight:700;font-size:14px;vertical-align:middle;border:none;box-shadow:none!important;text-decoration:none}.wdi_hb_buy_pro .wdi_support_link{color:#72777c!important;padding:0 10px}.wdi_hb_buy_pro .wdi_update_pro_link{background:#45a6b7;font-weight:700;line-height:30px;padding:0 18px 0 18px;color:#fff!important}.wdi_hb_buy_pro img{border:none;display:inline-block;vertical-align:middle}#bull_style,#bullets_images_color,#bullets_images_type,#rl_butt_color,#rl_butt_style,#rl_butt_type{margin:0 10px 0 0;width:100px}.wds_ctrl_btn_upload{display:block!important;margin:5px 0!important;text-align:center;vertical-align:middle;width:95%}.wds_reverse{margin:0 5px!important}.wds_free_button,.wds_free_button:hover{background:linear-gradient(to bottom,#e5e5e5,#e5e5e5) repeat scroll 0 0 #f3f3f3!important;border-color:#bbb!important;color:#888!important}.wdi_spider_free_version_label,.wdi_spider_free_version_label *{color:grey!important}.wdi_spider_free_version{background-color:#dfdfdf;border:1px solid #797979;border-radius:2px;padding:2px;width:210px}.wds_more{font-size:12px}.wrap .button{border-radius:3px!important;text-shadow:none!important}.wdi_spider_message_cont{display:none;width:99%}.wdi_spider_load{display:none}.wdi_spider_load_cont{background-color:rgba(0,0,0,.2);left:0;height:100%;position:fixed;top:0;width:100%;z-index:99998}.wdi_spider_load_icon{left:0;height:100%;position:fixed;text-align:center;top:0;width:100%;z-index:99999}.wdi_spider_ajax_loading{border:none!important;margin-top:200px;width:50px;-webkit-animation:spin 2.5s infinite linear;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}#TB_iframeContent,#TB_window{width:800px!important;height:500px!important}#TB_window{margin-left:-400px!important}.input_th{margin-left:0!important;width:160px!important;font-family:sans-serif}.input_th2{margin-left:0!important;width:160px!important;margin-top:5px;height:19px}.edit_input{height:28px!important;padding-bottom:7px!important}.add_tag_th{padding-left:21px;font-size:12px;font-family:sans-serif}.pointer{cursor:pointer}.non_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wds_position_table input,.wds_position_table td{border:1px solid #ccc;margin:2px}.wds_position_table .wds_position_td{background-color:#f4f4f4;display:inline-block;line-height:1;padding:0!important}.wdi_spider_div_options{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;margin:2px 0 0 190px;padding:13px;min-height:300px;min-width:600px;vertical-align:top}.table_medium_col{text-align:center!important;width:70px}.table_medium_col_uncenter{width:80px}.table_extra_large_col{padding:4px!important;width:150px!important}.first-page,.last-page,.next-page,.prev-page,.table_big_col a,.table_extra_large_col a,.table_medium_col a,.table_small_col a{cursor:pointer}.wdi_spider_word_wrap{word-wrap:normal}.wdi_spider_description{color:#666;font-size:.923em;line-height:1.231em}.handle{background:url(../images/draggable.png) no-repeat transparent;border:none;cursor:move;display:inline-block;height:15px;margin:0 auto;vertical-align:middle;width:15px}.wdi_page_title{font-size:1.5em;font-weight:500}.slider-icon{background-image:url(../images/slider-icon.png);background-repeat:no-repeat;border:none;float:left;height:32px;margin:7px 8px 0 0;width:32px}.theme-icon{background-image:url(../images/theme-2.png);background-repeat:no-repeat;border:none;float:left;height:32px;margin:7px 8px 0 0;width:32px}.uninstall-icon{background-image:url(../images/uninstall-icon.png);background-repeat:no-repeat;border:none;float:left;height:32px;margin:7px 8px 0 0;width:32px}.wdi_spider_label{font-weight:700;width:100px}.wdi_spider_label_top{font-weight:700;padding-top:3px;vertical-align:top;width:100px}.wdi_spider_fieldset .wdi_spider_label{font-weight:700;vertical-align:top;width:150px}.wdi_spider_label_options{font-weight:700;vertical-align:top;width:150px}.wdi_spider_choose_option{display:table;box-shadow:0 0 1px 1px #d2d2d2;margin-bottom:5px;border-radius:2px;padding:2px;box-sizing:border-box;cursor:pointer;width:100%}.wdi_spider_bull_options_color_cont,.wdi_spider_bull_options_cont,.wdi_spider_options_color_cont,.wdi_spider_options_cont,.wdi_spider_pp_options_color_cont,.wdi_spider_pp_options_cont{display:none;width:180px;height:150px;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.wdi_spider_option_cont{display:block;border-bottom:1px solid #d3d3d3;padding:3px 0 3px 0;box-sizing:content-box;width:98%;border-radius:0;cursor:pointer}.wdi_spider_option_cont_title{display:table-cell;vertical-align:middle;padding:0 0 0 4px}.wdi_spider_option_cont_img{display:table-cell;width:23%;height:15px;text-align:right;padding:5px 4px 0 0;box-sizing:border-box;background-color:#eee}.wdi_spider_option_main_title{display:table-cell;width:65%;vertical-align:middle;padding:0 0 0 4px;color:#555}.wdi_spider_sel_option_ic{display:table-cell;width:20%;height:15px;text-align:right;padding:0 6px 0 0;box-sizing:border-box}.wdi_spider_int_input{width:45px}.wdi_spider_char_input{width:115px}.wdi_spider_text_input{width:190px}.wdi_spider_slider_div{display:inline-block;vertical-align:middle;width:140px}.wdi_spider_slider_percentage,.wdi_spider_slider_percentage input,.wdi_spider_slider_percentage input :focus{background:0 0;border:none;color:#00aeef;display:inline;font-weight:700;text-align:right;vertical-align:middle;width:30px}.error,.updated{margin:5px 0 2px!important}.buttons_div{clear:both;float:right;margin:5px 0}.buttons_div_left{float:left;margin:5px 0;width:100%}.buttons_div_right{float:right;margin:5px 0}.wdi_spider_delete_img{background-image:url(../images/delete.png);border:none;cursor:pointer;display:inline-block;vertical-align:middle;height:14px;width:14px}.wdi_spider_delete_img_small{background-image:url(../images/delete.png);background-size:10px auto;border:medium none;cursor:pointer;display:inline-block;height:10px;margin-top:2px;vertical-align:middle;width:10px}.wdi_spider_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;float:left;margin:4px;padding:13px;width:97%}.wdi_spider_type_fieldset{background:none repeat scroll 0 0 #f4f4f4;border-radius:8px 8px 8px 8px;display:none;float:left;width:100%}.wdi_spider_child_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;float:left;margin:4px;width:30%;padding:13px;display:block}.wdi_spider_table td{padding:0;vertical-align:middle}.wdi_spider_ctrls{padding:4px;text-align:center;width:40px}.theme_type{background-color:#f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;cursor:pointer;display:inline-block;font-size:16px;height:24px;padding-top:5px;text-align:center;vertical-align:middle;width:123px;margin:2px 0 2px 0}.ui-slider-handle{cursor:pointer!important}.thumb{border:1px solid #ccc;max-height:120px;max-width:120px}.fileDescription{color:#666;cursor:pointer;font-family:sans-serif;font-size:12px}.filename{font-size:13px}.tag_div{background-clip:padding-box;background-color:#f3f3f3;border:1px solid #aaa;border-radius:3px 3px 3px 3px;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#666;line-height:13px;margin:2px 0;padding:2px 5px 2px 5px;width:132px}.tags_div{overflow-y:auto;height:65px}.tag_name{width:118px}.edit_thumb{cursor:pointer}.wdi_spider_rotate{border-radius:2px;border:1px solid #fff;height:30px}.wdi_spider_search_value{height:2em;margin:0 0 4px}#th_order,.wdi_spider_order{display:none}.wds_add_video,.wds_exports,.wds_import,.wds_resize_image{display:none;padding:10px;height:60px;background-color:#fff;border:1px solid #999;top:50%;position:fixed;left:50%;text-align:left;z-index:100000;border-radius:3px;margin-top:-45px}.wds_add_video,.wds_resize_image{margin-left:-340px}.wds_exports{margin-left:-240px}.wds_import{margin-left:-185px}.wds_add_video input[type=text],.wds_resize_image input[type=text]{width:500px}.wds_opacity_export,.wds_opacity_import,.wds_opacity_video{background-color:#000;display:none;opacity:.75;filter:Alpha(opacity=75);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998}.wds_tabs{clear:both;display:none;position:relative;z-index:1}.wds_tabs a.wds_active,.wds_tabs a.wds_sub_active{background-color:#f5f5f5;border-bottom:1px solid #f5f5f5;color:#333}.wds_tabs a{background-color:#f9f9f9;border:1px solid #dfdfdf;border-top-left-radius:3px;border-top-right-radius:3px;color:#c7c7c7;display:block!important;float:left;font:bold 17px/32px Arial,serif;height:30px;margin:3px 3px 0 0;padding:0 10px;position:relative;text-decoration:none;width:130px}.wbs_subtab a{font:bold 14px/26px Arial,serif;height:26px;padding:0 5px;width:105px}.wds_add_layer{font:normal 20px/28px Arial,serif!important;width:initial!important;padding:0 9px!important}.wds_tab_title{background:none repeat scroll 0 0 transparent!important;border:none!important;cursor:pointer;opacity:.5;filter:Alpha(opacity=50);padding:1px;vertical-align:middle;width:50px}.wds_layer_title,.wds_sub_active .wds_tab_title{background-color:#fff!important;border-color:#dfdfdf!important;border-radius:3px!important;border-style:solid!important;border-width:1px!important;cursor:pointer;opacity:1;filter:Alpha(opacity=100)}.wds_tab_remove{background-image:url(../images/close.png);background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:9px;height:9px;opacity:.5;filter:Alpha(opacity=50);vertical-align:middle}.wds_layer_remove{background-image:url(../images/close.png);background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_layer_dublicate{background-image:url(../images/duplicate.png);background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_slide_dublicate{background-image:url(../images/duplicate.png);background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:12px;height:12px;vertical-align:middle}.wds_layer_depth{float:right;font-size:13px;line-height:15px;margin:1px 5px;text-align:left;width:40px}.wds_layer_label{display:inline-block;font-size:13px;width:80%}.wds_sub_active .wds_tab_remove{cursor:pointer!important;opacity:1;filter:Alpha(opacity=100)}.wds_box.wds_active,.wds_box.wds_sub_active{display:block}.wds_tab_label{display:block;width:inherit}.wds_box{display:none;margin-top:0!important;position:relative;top:-1px}.wds_box{border:1px solid #dfdfdf;border-radius:3px;box-shadow:0 0 10px #f2f2f2;margin-top:15px;position:relative}.wds_clear{clear:both;float:none!important}.wds_box thead td{border-bottom:0 none!important}.wds_box tbody{background-color:#fff;border-top:0 none;padding-left:10px}.wds_box thead{background:-webkit-linear-gradient(#f5f5f5,#fff);background:-o-linear-gradient(#f5f5f5,#fff);background:-moz-linear-gradient(#f5f5f5,#fff);background:linear-gradient(#f5f5f5,#fff);border-top:0 none;border-bottom:0 none;color:#333;font:bold 12px/29px Arial,serif;height:29px;margin:0;padding:0 10px;text-align:left;text-shadow:0 1px 0 #fff}.wds_box table{border-collapse:collapse;border-spacing:0;width:100%}.wds_nav_tabs{background-color:#f5f5f5;border-right:1px solid #dfdfdf;float:left;height:640px;margin:0;width:150px}.wds_nav_tabs ul{list-style:none outside none;margin:10px 0;padding:0}.wds_nav_tabs .wds_active,.wds_nav_tabs .wds_active a,.wds_nav_tabs .wds_active a:hover,.wds_nav_tabs .wds_sub_active,.wds_nav_tabs .wds_sub_active a,.wds_nav_tabs .wds_sub_active a:hover{background:none repeat scroll 0 0 #fff;color:#333}.wds_nav_tabs .wds_active{border-color:#dfdfdf;border-width:1px 0 1px 1px;border-style:solid;margin:0 -1px 0 -4px;padding:0}.wds_nav_tabs li{border-color:transparent;border-style:solid;border-width:1px 0;list-style-type:none;margin-bottom:0}.wds_nav_tabs a{display:block;line-height:18px;padding:5px 5px 5px 12px;text-decoration:none}.wds_nav_box{background:none repeat scroll 0 0 #fff;display:none;height:610px;overflow:auto;padding:15px}.wds_nav_box.wds_active{display:block}.wds_layer_head{background-color:#f5f5f5;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;cursor:pointer;padding:5px}.wds_layer_head .handle{cursor:move;display:inline-block;margin:5px}.wds_box td{padding:10px!important}.wds_draggable{box-sizing:border-box;cursor:move}.wds_box .color{width:60px}.wds_active_layer{box-shadow:#2c2424 0 0 5px;border-radius:3px}.wds_draggable a,.wds_draggable a:hover{color:inherit!important;font-size:inherit!important;font-style:inherit!important;font-weight:inherit!important;text-decoration:none}#add_embed_help{height:200px;width:672px;top:40%}#add_embed input[type=text]{width:500px}.wds_buttons{float:right;font-weight:400;position:relative}.wds_reset_button{display:none;font-weight:400;margin:10px 0;position:absolute;right:40px;z-index:1}.wdi_about_filed{font-size:13px;font-style:italic}#wdi_save_feed .two .section_col,.wdi_theme .section_col{width:47%;float:left;margin:0 1.5% 18px}.wdi_theme .section_col{margin-bottom:0}#wdi_save_feed .wdi_element{margin:0 0 18px}.display_type_content{background:#fff;border:1px solid #dedede;margin-bottom:15px}#wdi_save_feed .half .wdi_element,#wdi_save_feed .one .wdi_element{width:96%;float:none;margin:0 2% 20px}.wdi_element_name_liked_feed{display:none!important}#wdi_save_feed .wdi_element p{margin:2px 0 0}.wdi_section_name{font-size:19px;margin:0 auto 15px;width:100%;box-sizing:border-box;padding:15px;border-bottom:1px solid #f1f1f1;color:#444;cursor:pointer}.wdi_section{border:1px solid #dedede;margin-bottom:20px;background:#fff}.wdi_section .optioninput *,.wdwt_param .optioninput *{text-align:left}.wdi_section.half{width:49%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wdi_buttons{text-align:right;margin-top:7px}.wdi_tab .wdi_section.half:last-child{margin-left:2%}label[for=WDI_user_padding]{display:block}.wdi_settings_notification{font-size:13px;color:#8b0000}#how_to_publish_tab .wdi_howto_container{display:flex;flex-wrap:wrap}#how_to_publish_tab .wdi_howto_content{border:1px #ddd solid;display:flex;flex:1;flex-direction:column;margin:5px;min-width:250px;max-width:calc(25% - 20px);padding:20px 10px;text-align:center}#how_to_publish_tab .wdi_howto_container h2{font-size:23px;font-weight:400;line-height:29px;margin:0;padding:11px 15px 4px 0}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{max-width:270px;margin:0 auto}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{max-width:100%}#how_to_publish_tab .wdi_howto_container .wdi_howto_content input{margin:0 auto;text-align:center;width:100%}.wdi_buttons button.button.preview-button{height:28px}@media (max-width:782px){.wdi_buttons button.button.preview-button{height:auto}}@media (min-width:820px){#conditional_filters_tab .one .wdi_element{width:70%;float:none;margin:0 2% 20px}.wdi_border_wrapper .wdi_element_content{width:100%;display:block}.wdi_border_wrapper .wdi_element_title{display:block}.wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){width:calc(100% - 30px);height:28px}.wdi_element_content .wdi_filter_input input[type=text]:not(.wp-color-picker){width:270px}.wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{width:calc(100% - 78px)}.wdi_border_wrapper .wdi_element_content input[type=number]{width:calc(100% - 30px)}.wdi_border_wrapper .wdi_element_content select{width:calc(100% - 30px)}.wdi_element_content .wdi_filter_input select{width:calc(100% - 413px)}.wdi_filter_input input{height:28px;line-height:28px}}@media (max-width:768px){.wdi_element_content .wdi_filter_input input[type=text]{width:130px}.wdi_element_content .wdi_filter_input select{width:calc(100% - 144px)}#wdi_save_feed .two .section_col,.wdi_theme .section_col{width:96%;float:none;margin:0 2% 18px}.wdi_section.half{width:100%;float:none;margin:0 0 20px!important}.wdi_theme .section_col{margin-bottom:0}}.wdi_section_close::before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi_section_open::before{content:"\f140";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi-page-header{width:98%;padding:10px}.wdi-page-header .wdi_buttons{float:right}.wdi-page-header .WDI_title_input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.5em;width:30%;outline:0;margin:0 0 3px;background-color:#fff}.wdi_themes_list td{display:table-cell!important}#wdi_feed_form .wd-page-title.wd-header{width:100%;padding:10px 0}@media screen and (max-width:782px){#wdi_feed_form p.search-box{margin-bottom:0}#wdi_feed_form p.search-box input[type=search]{width:100%;height:auto!important}#wdi_feed_form p.search-box input[type=button]{margin-bottom:10px;padding:6px 14px;line-height:normal;font-size:14px;height:auto}.wdi-page-header .WDI_title_input{width:60%}.wdi-page-header .wdi_buttons{float:none;text-align:center}}.wdi_element_name_hashtag_top_recent{display:none}body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4),body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(5){display:none}body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3){display:table-row!important}body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){display:table-row!important}.wdi_settings_form .button{min-height:unset;padding:9px 20px;background:#fff 0 0 no-repeat;border:1px solid #dedede;border-radius:4px;line-height:19px;font-weight:600;font-size:14px;color:#32373c;height:auto!important}.wdi-page-title{margin-bottom:30px;text-align:left;letter-spacing:0;font-size:22px;color:#323a45}.wdi-input-group{margin:0 0 30px 0}.wdi-input-group:last-child{margin:0}.wdi-input-group label{display:block;margin-bottom:15px;font-weight:700;line-height:20px;font-size:15px;color:#323a45}.wdi-input-group .wdi-description{font-style:italic}.wdi-input-group input[readonly],.wdi-input-group input[type=text],.wdi-input-group textarea{width:100%;max-height:40px;margin:0;padding:10px 12px;background:#fff;border-radius:4px;border:1px solid #ddd;font-weight:400;font-size:15px;color:#323a45}.wdi-input-group textarea{max-height:100px;min-height:100px}.wdi-input-group select{max-width:unset;width:100%;margin:0;padding:10px 12px;border-radius:4px;border:1px solid #ddd;font-weight:400;font-size:15px;color:#323a45}.wdi-connect-instagram{background-image:url(../images/instagram-connect.png);background-size:cover;width:330px;height:50px;cursor:pointer}.wdi-access-token-missing{max-width:778px;margin:10px 0 50px 0;line-height:17px;font-size:13px;color:#323a45}.wdi-access-token-missing p{margin:0}.wdi-accounts-list li{margin-bottom:20px;padding:20px;background:#f9f9f9}.wdi-accounts-list .wdi-account-block{display:flex;flex-wrap:wrap;justify-content:space-between}.wdi-accounts-list .wdi-account-user-info{float:left;min-width:145px;margin-right:15px}.wdi-accounts-list .wdi-account-name{margin:0;font-weight:700;line-height:24px;font-size:18px;color:#323a45}.wdi-accounts-list .wdi-account-type{margin:0;line-height:16px;text-transform:capitalize;font-size:12px;color:rgba(50,58,69,.8)}.wdi-accounts-list .wdi-account-show-token{float:left;width:27px;height:27px;padding:8px 0 0 8px;background:#fff;border:1px solid #dedede;border-radius:4px;cursor:pointer}.wdi-accounts-list .wdi-account-remove{display:block;padding:9px 20px;background:#fff 0 0 no-repeat padding-box;border:1px solid #dedede;border-radius:4px;font-weight:500;font-size:14px;color:#32373c;cursor:pointer;height:auto!important}.wdi-accounts-list .wdi-account-accesstoken{margin-top:25px;display:none;clear:both}.wdi-account-accesstoken .wdi-account-remove{display:none}.wdi-advanced-options{max-width:752px;padding:20px;margin-top:30px;background:#f9f9f9}.wdi-advanced-options .wdi-advanced-headline{margin-bottom:25px;padding-bottom:16px;border-bottom:1px solid #e5e5e5}.wdi-advanced-options .wdi-advanced-headline .wdi-page-title{float:left;margin:0;font-size:16px}.wdi-advanced-options .wdi-advanced-headline i{float:right;cursor:pointer}.wdi-advanced-options .wdi-advanced-body{display:none}.wdi_settings_form .submit{margin:30px 0 0 0;padding:0}.wdi_settings_form .button-primary{background:#007cba;border-color:#007cba;color:#fff;height:auto!important}.wdi-popup{display:none;position:fixed;height:100%;width:100%;top:0;left:0;background:rgba(0,0,0,.3);z-index:1000000}.wdi-popup .wdi-popup-container{top:50%;transform:translate(0,-50%);width:800px;position:relative;margin:0 auto;padding:30px 30px 25px 30px;background:#fff;border-radius:4px}.wdi-popup .wdi-popup-container .wdi-popup-close{display:block;position:absolute;top:12px;right:11px;width:10px;height:10px;background-image:url(../images/close.svg);background-position:center;background-repeat:no-repeat;cursor:pointer}.wdi-popup .wdi-popup-container h3{margin:0 0 30px 0;line-height:30px;font-weight:700;font-size:20px}#wdi-personal-business-popup .wdi-popup-container{width:570px;height:auto;text-align:center}.wdi_paid{pointer-events:none!important;font-size:12px;text-decoration:none;color:#fff;background:transparent linear-gradient(262deg,#008a62 0,#23b536 100%) 0 0 no-repeat padding-box;border-radius:4px;padding:8px 12px;float:right;margin-top:20px}.wdi-label-business:after{clear:both;display:table;content:""}.wdi-popup-container:after{clear:both;display:table;content:""}#wdi-personal-business-popup .wdi-radio-button{margin:0;font-size:14px}#wdi-personal-business-popup .wdi-radio-button p{margin:0;display:block;width:100%;text-align:left;background:#fff 0 0 no-repeat padding-box;box-shadow:0 0 10px #00000026;margin-bottom:20px;padding:21px 20px 20px 42px;box-sizing:border-box;border-radius:4px}.wdi-radio-button .wdi-label-business label input,.wdi-radio-button .wdi-label-business label span,.wdi-radio-button .wdi-label-personal label input,.wdi-radio-button .wdi-label-personal label span{position:relative;left:-24px}#wdi-personal-business-popup .wdi-radio-button p:first-child{margin-right:50px}#wdi-personal-business-popup .wdi-radio-button p label{font-size:14px;display:block}.wdi_info_text{font-size:14px;line-height:20px;font-weight:400;color:rgba(50,58,69,.5);margin-top:4px;display:block}#wdi-personal-business-popup .dashicons-info{color:#ccc}.wdi-radio-button .wdi-radio-info-text{display:none;position:absolute;max-width:220px;margin:5px 0 0 78px;padding:14px;background:#fff;box-shadow:0 0 8px rgba(0,0,0,.14);border:1px solid #dadcdc;border-radius:4px;line-height:20px;font-size:14px}.wdi-radio-button .wdi-label-business .wdi-radio-info-text{margin:5px 0 0 -152px}.wdi-radio-button .wdi-radio-info-text.active{display:block}#wdi-personal-business-popup .wdi-connect{width:140px;height:37px;margin-top:10px;padding:0;line-height:37px;font-size:14px;background-color:#2160b5;float:right}@media screen and (max-width:1919px){.wdi-advanced-options{max-width:unset}}@media screen and (max-width:767px){br.wdi_desktop{display:none!important}#wdi-personal-business-popup .wdi-connect{margin-top:0}.wdi_paid{width:229px;box-sizing:border-box;padding:8px 7px;font-size:11px}.wdi-radio-button input[type=radio]:checked:before{width:6px;height:6px;margin:4px}input[type=checkbox],input[type=radio]{height:16px;width:12px}#wdi-personal-business-popup .wdi-radio-button p{padding:19px 18px 18px 38px}.wdi-radio-button .wdi-label-business label input,.wdi-radio-button .wdi-label-business label span,.wdi-radio-button .wdi-label-personal label input,.wdi-radio-button .wdi-label-personal label span{position:relative;left:-25px}.wdi-popup .wdi-popup-container{padding:30px 20px 20px 20px}.wdi-settings-page .wdi_settings_form{margin-right:10px;padding:20px 15px}.wdi-connect-instagram{background-image:url(../images/instagram-connect-320.png);width:272px;height:40px}.wdi-account-block>div{width:100%}.wdi-accounts-list li{margin-bottom:15px;padding:20px 15px}.wdi-accounts-list .wdi-account-show-token{float:right}.wdi-account-block .wdi-account-remove{display:none}.wdi-account-accesstoken .wdi-account-remove{display:block;float:right;margin-top:20px}#wdi-personal-business-popup .wdi-popup-container{width:300px;box-sizing:border-box}.wdi-popup .wdi-popup-container h3{max-width:260px;margin:0 auto 20px auto;font-size:16px;line-height:26px}.wdi-radio-button .wdi-label-personal .wdi-radio-info-text{margin:5px 0 0 12px}.wdi-radio-button .wdi-label-business .wdi-radio-info-text{margin:5px 0 0 -147px}.wdi_settings_form .submit{margin-top:25px}}.wdi_pro_only{font-style:italic;color:#4e4e4e!important;background-color:#ccc!important;text-decoration:none;font-weight:700}.wdi-pro-overlay img{opacity:.7}.wdi_pro_notice{text-align:right;color:#15699f;font-size:20px!important;padding:10px}.wdi-radio-button .wdi_account_type{font-weight:700;color:#323A4580}.wdi_input_group{border:1px solid transparent}.wdi_active{border:1px solid #2160b5}.wdi_active .wdi_account_type,.wdi_active .wdi_info_text{color:#323a45}.wdi_free .wdi_info_text span{text-decoration:underline}.wdi_pro .wdi_account_type,.wdi_pro .wdi_info_text{color:#323a45!important}
|
1 |
+
.wdi_clear{display:block;height:0;clear:both}.wdi_clear_tag:after{content:"";display:table;clear:both}#wdi_unistall{background-color:#d82121;border-color:#d31818;box-shadow:inset 0 1px 0 rgba(230,120,120,.5),0 1px 0 rgba(0,0,0,.15)}#wdi_unistall:hover{background-color:#da1313}#wdi_unistall_table th{width:45%}#toplevel_page_wdi_settings.current a div img{opacity:1}.wdi_settings_link,.wdi_tooltip{display:block;font-size:14px!important;font-weight:700;line-height:20px;margin-bottom:5px;color:#444;text-decoration:none}.wdi_theme.wdi_border_wrapper{background:#fff;padding:5px 0}.wdi_settings_link:hover,.wdi_tooltip:hover{color:#23282d;position:relative}.wdi_tooltip:hover:after{content:attr(wdi-tooltip);padding:4px 8px;color:#dbdbe0;position:absolute;left:0;top:100%;white-space:nowrap;z-index:20;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:2px;-moz-box-shadow:0 0 4px #222;-webkit-box-shadow:0 0 4px #222;box-shadow:0 0 4px rgba(0,0,0,.5);background-color:rgba(0,0,0,.75);font-size:12px}.display_type_container>div{float:left;margin-right:15px}#wdi_feed_users_ajax{width:100%;margin-top:2px}#wdi_feed_tabs .wdi_feed_tabs{border:1px solid #f1f1f1;color:#444;cursor:pointer;font-size:13px;font-weight:700;padding:12px;background:#fff;text-decoration:none;display:inline-block}#wdi_feed_tabs{margin:16px 0}#wdi_feed_tabs .wdi_feed_tab_active,#wdi_feed_tabs .wdi_feed_tabs:hover{background:none repeat scroll 0 0 #fff;color:#9a2465}#wdi_feed_tabs .wdi_feed_tab_title{margin-top:1px;display:inline-block}.wdi_border_wrapper [scope=row],.wdi_border_wrapper [scope=row]+td{padding:8px}.wdi_user{border:1px solid #b9b9b9;background-color:rgba(0,0,0,.05);margin:0 4px 0 0;border-radius:5px;height:28px;position:relative;display:inline-block}.wdi_user:hover{background-color:rgba(0,0,0,.08)}.display_type_container.wdi_clear_tag{display:table;margin:10px auto}.wdi_user a{text-decoration:none;color:#000;line-height:28px;width:70%;margin-left:12%;margin-right:18%;height:100%;display:table-row;padding-right:3px}.wdi_user .wdi_profile_pic{width:20px;height:20px;top:4px;left:30px;padding:5px;vertical-align:middle;display:table-cell}.wdi_user span{display:table-cell;vertical-align:middle;left:55px;font-weight:700;font-size:14px}.wdi_user .wdi_check_thumb_user,.wdi_user .wdi_remove_user{position:absolute;right:4px;width:15px;height:15px;top:6.5px;transition:all .1s ease}.wdi_user .wdi_remove_user:hover{cursor:pointer;transform:rotate(180deg)}.wdi_user .wdi_check_thumb_user:hover{cursor:pointer}.wdi_user .wdi_check_thumb_user{left:4px}.wdi_border_wrapper [scope=row]{padding:2px;font-size:13px;min-width:250px}.wdi_border_wrapper [scope=row],.wdi_border_wrapper [scope=row]+td{padding:2px}.small_input{width:60px;text-align:center}.display_type{text-align:center}.instagram-feed_page_wdi_settings table td{padding-left:0;padding-right:0}.instagram-feed_page_wdi_settings table th{padding-left:4px}.instagram-feed_page_wdi_settings table input{float:right}.wdi-settings-page .wdi_help_bar_wrap{background-color:unset;padding:15px 15px 15px 0}.wdi-settings-page .wdi_settings_form{margin-right:20px;padding:30px 20px;background:#fff}.wdi_advanced_option_open tr:nth-child(10),.wdi_advanced_option_open tr:nth-child(11),.wdi_advanced_option_open tr:nth-child(9){display:none}.instagram-feed_page_wdi_settings table #wdwt_wrap_wdi_fb_auth{margin-left:115px}#wdwt_wrap_wdi_fb_auth .block a{background-color:#4267b2;color:#fff}#wdwt_wrap_wdi_authenticated_users_list .block,#wdwt_wrap_wdi_reset_cache .block,.wdi_advanced_option .optioninput{display:inline-block}#wdi_options_page_buttons_wrapper .submit{display:inline;margin-left:15px}.wdi_advanced_option{width:100%;position:relative;font-weight:600}.wdi_advanced_option{background-color:#fff;cursor:pointer;border:1px solid #e3e3e3;border-radius:10px;border-collapse:separate;border-spacing:0}.wdi_advanced_option .wdi_advanced_option_head{border-bottom:1px solid #e3e3e3}.wdi_advanced_option .wdi_advanced_option_head th{padding-top:10px;padding-bottom:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th{border-bottom:1px solid #e3e3e3;border-bottom-left-radius:10px}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td{border-bottom:1px solid #e3e3e3;border-bottom-right-radius:10px}.instagram-feed_page_wdi_settings table.wdi_advanced_option th{padding-left:12px}.instagram-feed_page_wdi_settings table.wdi_advanced_option td .wdwt_param{margin-left:15px}.instagram-feed_page_wdi_settings #wdwt_wrap_wdi_disable_fa .optioninput{display:inline-block}.wdi_advanced_option .wdi_advanced_option_icon{background-repeat:no-repeat;background-position:left top;width:20px;height:20px;display:inline-block;position:absolute;top:16px;right:10px}.wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon{background-image:url(../images/arrow_1.png)}.wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon{background-image:url(../images/arrow_2.png)}.wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head){display:none}#wdi_options_page_buttons_wrapper{margin-top:10px;width:700px}.wdi_hidden{display:none!important}.selectoff{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.wdi_filter_radio{margin:5px;display:inline-block}.wdi_filter_radio label{vertical-align:text-bottom}.filters_description{font-size:13px;font-weight:700;margin-top:8px;display:inline-block}.wdi_filter_input input{width:250px;margin-right:0;padding-right:0}#wdi_filter_type{line-height:28px;margin:0;padding:0;position:relative;right:2px;top:-1px;font-weight:400}.wdi_filter_item{display:inline-block;padding:6px;margin-top:5px;border-radius:5px}.wdi_filter_by_username{background-color:#00a0d2;color:#fff}.wdi_filter_by_hashtag{background-color:#e08d11;color:#fff}.wdi_logic{display:inline-block;padding:5px;font-weight:700}.wdi_filter_by_location{background-color:#509833;color:#fff}.wdi_filter_by_mention{background-color:#833888;color:#fff}.wdi_filter_by_description{background-color:#bd242b;color:#fff}.wdi_filter_by_url{background-color:#004eff;color:#fff}.wdi_remove_filter{padding-left:5px;color:#fff;font-size:13px}.wdi_remove_filter:hover{cursor:pointer}.wdi_source_user{border:1px solid #d4d4d4;background-color:rgba(0,0,0,.03);margin:0 4px 0 0;border-radius:5px;height:29px;display:inline-block;padding:2px 0 0 4px}.wdi_source_img{display:inline-block}.wdi_source_img img{width:22px;height:22px;border-radius:15px;display:block;padding:0}.wdi_source_username{display:inline-block;line-height:25px;font-size:15px!important;height:30px;vertical-align:bottom;padding:0 5px;font-weight:700}#login_with_instagram>a:focus{-webkit-box-shadow:none;box-shadow:none}.wdi_help_bar_wrap{background-color:#fff;border:none;box-sizing:border-box;clear:both;color:#6e7990;font-size:14px;font-weight:700;line-height:30px;padding:15px;vertical-align:middle;width:100%;margin:20px 0 0 0}.wdi_help_bar_wrap a,.wdi_help_bar_wrap span{font-size:14px}.wdi_help_bar_text{float:left}.wdi_help_bar_text>a{color:#0073aa;text-decoration:none}.wdi_hb_buy_pro{float:right;padding:0}.wdi_hb_buy_pro a,.wdi_hb_buy_pro a:active,.wdi_hb_buy_pro a:hover,.wdi_hb_buy_pro a:visited{display:inline-block;font-weight:700;font-size:14px;vertical-align:middle;border:none;box-shadow:none!important;text-decoration:none}.wdi_hb_buy_pro .wdi_support_link{color:#72777c!important;padding:0 10px}.wdi_hb_buy_pro .wdi_update_pro_link{background:#45a6b7;font-weight:700;line-height:30px;padding:0 18px 0 18px;color:#fff!important}.wdi_hb_buy_pro img{border:none;display:inline-block;vertical-align:middle}#bull_style,#bullets_images_color,#bullets_images_type,#rl_butt_color,#rl_butt_style,#rl_butt_type{margin:0 10px 0 0;width:100px}.wds_ctrl_btn_upload{display:block!important;margin:5px 0!important;text-align:center;vertical-align:middle;width:95%}.wds_reverse{margin:0 5px!important}.wds_free_button,.wds_free_button:hover{background:linear-gradient(to bottom,#e5e5e5,#e5e5e5) repeat scroll 0 0 #f3f3f3!important;border-color:#bbb!important;color:#888!important}.wdi_spider_free_version_label,.wdi_spider_free_version_label *{color:grey!important}.wdi_spider_free_version{background-color:#dfdfdf;border:1px solid #797979;border-radius:2px;padding:2px;width:210px}.wds_more{font-size:12px}.wrap .button{border-radius:3px!important;text-shadow:none!important}.wdi_spider_message_cont{display:none;width:99%}.wdi_spider_load{display:none}.wdi_spider_load_cont{background-color:rgba(0,0,0,.2);left:0;height:100%;position:fixed;top:0;width:100%;z-index:99998}.wdi_spider_load_icon{left:0;height:100%;position:fixed;text-align:center;top:0;width:100%;z-index:99999}.wdi_spider_ajax_loading{border:none!important;margin-top:200px;width:50px;-webkit-animation:spin 2.5s infinite linear;-moz-animation:spin 2.5s infinite linear;-o-animation:spin 2.5s infinite linear;animation:spin 2.5s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}#TB_iframeContent,#TB_window{width:800px!important;height:500px!important}#TB_window{margin-left:-400px!important}.input_th{margin-left:0!important;width:160px!important;font-family:sans-serif}.input_th2{margin-left:0!important;width:160px!important;margin-top:5px;height:19px}.edit_input{height:28px!important;padding-bottom:7px!important}.add_tag_th{padding-left:21px;font-size:12px;font-family:sans-serif}.pointer{cursor:pointer}.non_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wds_position_table input,.wds_position_table td{border:1px solid #ccc;margin:2px}.wds_position_table .wds_position_td{background-color:#f4f4f4;display:inline-block;line-height:1;padding:0!important}.wdi_spider_div_options{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;margin:2px 0 0 190px;padding:13px;min-height:300px;min-width:600px;vertical-align:top}.table_medium_col{text-align:center!important;width:70px}.table_medium_col_uncenter{width:80px}.table_extra_large_col{padding:4px!important;width:150px!important}.first-page,.last-page,.next-page,.prev-page,.table_big_col a,.table_extra_large_col a,.table_medium_col a,.table_small_col a{cursor:pointer}.wdi_spider_word_wrap{word-wrap:normal}.wdi_spider_description{color:#666;font-size:.923em;line-height:1.231em}.handle{background:url(../images/draggable.png) no-repeat transparent;border:none;cursor:move;display:inline-block;height:15px;margin:0 auto;vertical-align:middle;width:15px}.wdi_page_title{font-size:1.5em;font-weight:500}.slider-icon{background-image:url(../images/slider-icon.png);background-repeat:no-repeat;border:none;float:left;height:32px;margin:7px 8px 0 0;width:32px}.theme-icon{background-image:url(../images/theme-2.png);background-repeat:no-repeat;border:none;float:left;height:32px;margin:7px 8px 0 0;width:32px}.uninstall-icon{background-image:url(../images/uninstall-icon.png);background-repeat:no-repeat;border:none;float:left;height:32px;margin:7px 8px 0 0;width:32px}.wdi_spider_label{font-weight:700;width:100px}.wdi_spider_label_top{font-weight:700;padding-top:3px;vertical-align:top;width:100px}.wdi_spider_fieldset .wdi_spider_label{font-weight:700;vertical-align:top;width:150px}.wdi_spider_label_options{font-weight:700;vertical-align:top;width:150px}.wdi_spider_choose_option{display:table;box-shadow:0 0 1px 1px #d2d2d2;margin-bottom:5px;border-radius:2px;padding:2px;box-sizing:border-box;cursor:pointer;width:100%}.wdi_spider_bull_options_color_cont,.wdi_spider_bull_options_cont,.wdi_spider_options_color_cont,.wdi_spider_options_cont,.wdi_spider_pp_options_color_cont,.wdi_spider_pp_options_cont{display:none;width:180px;height:150px;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.wdi_spider_option_cont{display:block;border-bottom:1px solid #d3d3d3;padding:3px 0 3px 0;box-sizing:content-box;width:98%;border-radius:0;cursor:pointer}.wdi_spider_option_cont_title{display:table-cell;vertical-align:middle;padding:0 0 0 4px}.wdi_spider_option_cont_img{display:table-cell;width:23%;height:15px;text-align:right;padding:5px 4px 0 0;box-sizing:border-box;background-color:#eee}.wdi_spider_option_main_title{display:table-cell;width:65%;vertical-align:middle;padding:0 0 0 4px;color:#555}.wdi_spider_sel_option_ic{display:table-cell;width:20%;height:15px;text-align:right;padding:0 6px 0 0;box-sizing:border-box}.wdi_spider_int_input{width:45px}.wdi_spider_char_input{width:115px}.wdi_spider_text_input{width:190px}.wdi_spider_slider_div{display:inline-block;vertical-align:middle;width:140px}.wdi_spider_slider_percentage,.wdi_spider_slider_percentage input,.wdi_spider_slider_percentage input :focus{background:0 0;border:none;color:#00aeef;display:inline;font-weight:700;text-align:right;vertical-align:middle;width:30px}.error,.updated{margin:5px 0 2px!important}.buttons_div{clear:both;float:right;margin:5px 0}.buttons_div_left{float:left;margin:5px 0;width:100%}.buttons_div_right{float:right;margin:5px 0}.wdi_spider_delete_img{background-image:url(../images/delete.png);border:none;cursor:pointer;display:inline-block;vertical-align:middle;height:14px;width:14px}.wdi_spider_delete_img_small{background-image:url(../images/delete.png);background-size:10px auto;border:medium none;cursor:pointer;display:inline-block;height:10px;margin-top:2px;vertical-align:middle;width:10px}.wdi_spider_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;display:none;float:left;margin:4px;padding:13px;width:97%}.wdi_spider_type_fieldset{background:none repeat scroll 0 0 #f4f4f4;border-radius:8px 8px 8px 8px;display:none;float:left;width:100%}.wdi_spider_child_fieldset{background:none repeat scroll 0 0 #f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;float:left;margin:4px;width:30%;padding:13px;display:block}.wdi_spider_table td{padding:0;vertical-align:middle}.wdi_spider_ctrls{padding:4px;text-align:center;width:40px}.theme_type{background-color:#f4f4f4;border:1px solid #8f8d8d;border-radius:8px 8px 8px 8px;cursor:pointer;display:inline-block;font-size:16px;height:24px;padding-top:5px;text-align:center;vertical-align:middle;width:123px;margin:2px 0 2px 0}.ui-slider-handle{cursor:pointer!important}.thumb{border:1px solid #ccc;max-height:120px;max-width:120px}.fileDescription{color:#666;cursor:pointer;font-family:sans-serif;font-size:12px}.filename{font-size:13px}.tag_div{background-clip:padding-box;background-color:#f3f3f3;border:1px solid #aaa;border-radius:3px 3px 3px 3px;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#666;line-height:13px;margin:2px 0;padding:2px 5px 2px 5px;width:132px}.tags_div{overflow-y:auto;height:65px}.tag_name{width:118px}.edit_thumb{cursor:pointer}.wdi_spider_rotate{border-radius:2px;border:1px solid #fff;height:30px}.wdi_spider_search_value{height:2em;margin:0 0 4px}#th_order,.wdi_spider_order{display:none}.wds_add_video,.wds_exports,.wds_import,.wds_resize_image{display:none;padding:10px;height:60px;background-color:#fff;border:1px solid #999;top:50%;position:fixed;left:50%;text-align:left;z-index:100000;border-radius:3px;margin-top:-45px}.wds_add_video,.wds_resize_image{margin-left:-340px}.wds_exports{margin-left:-240px}.wds_import{margin-left:-185px}.wds_add_video input[type=text],.wds_resize_image input[type=text]{width:500px}.wds_opacity_export,.wds_opacity_import,.wds_opacity_video{background-color:#000;display:none;opacity:.75;filter:Alpha(opacity=75);position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998}.wds_tabs{clear:both;display:none;position:relative;z-index:1}.wds_tabs a.wds_active,.wds_tabs a.wds_sub_active{background-color:#f5f5f5;border-bottom:1px solid #f5f5f5;color:#333}.wds_tabs a{background-color:#f9f9f9;border:1px solid #dfdfdf;border-top-left-radius:3px;border-top-right-radius:3px;color:#c7c7c7;display:block!important;float:left;font:bold 17px/32px Arial,serif;height:30px;margin:3px 3px 0 0;padding:0 10px;position:relative;text-decoration:none;width:130px}.wbs_subtab a{font:bold 14px/26px Arial,serif;height:26px;padding:0 5px;width:105px}.wds_add_layer{font:normal 20px/28px Arial,serif!important;width:initial!important;padding:0 9px!important}.wds_tab_title{background:none repeat scroll 0 0 transparent!important;border:none!important;cursor:pointer;opacity:.5;filter:Alpha(opacity=50);padding:1px;vertical-align:middle;width:50px}.wds_layer_title,.wds_sub_active .wds_tab_title{background-color:#fff!important;border-color:#dfdfdf!important;border-radius:3px!important;border-style:solid!important;border-width:1px!important;cursor:pointer;opacity:1;filter:Alpha(opacity=100)}.wds_tab_remove{background-image:url(../images/close.png);background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:9px;height:9px;opacity:.5;filter:Alpha(opacity=50);vertical-align:middle}.wds_layer_remove{background-image:url(../images/close.png);background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_layer_dublicate{background-image:url(../images/duplicate.png);background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:15px;height:15px;margin:5px;float:right}.wds_slide_dublicate{background-image:url(../images/duplicate.png);background-repeat:no-repeat;background-size:100% 100%;display:inline-block;width:12px;height:12px;vertical-align:middle}.wds_layer_depth{float:right;font-size:13px;line-height:15px;margin:1px 5px;text-align:left;width:40px}.wds_layer_label{display:inline-block;font-size:13px;width:80%}.wds_sub_active .wds_tab_remove{cursor:pointer!important;opacity:1;filter:Alpha(opacity=100)}.wds_box.wds_active,.wds_box.wds_sub_active{display:block}.wds_tab_label{display:block;width:inherit}.wds_box{display:none;margin-top:0!important;position:relative;top:-1px}.wds_box{border:1px solid #dfdfdf;border-radius:3px;box-shadow:0 0 10px #f2f2f2;margin-top:15px;position:relative}.wds_clear{clear:both;float:none!important}.wds_box thead td{border-bottom:0 none!important}.wds_box tbody{background-color:#fff;border-top:0 none;padding-left:10px}.wds_box thead{background:-webkit-linear-gradient(#f5f5f5,#fff);background:-o-linear-gradient(#f5f5f5,#fff);background:-moz-linear-gradient(#f5f5f5,#fff);background:linear-gradient(#f5f5f5,#fff);border-top:0 none;border-bottom:0 none;color:#333;font:bold 12px/29px Arial,serif;height:29px;margin:0;padding:0 10px;text-align:left;text-shadow:0 1px 0 #fff}.wds_box table{border-collapse:collapse;border-spacing:0;width:100%}.wds_nav_tabs{background-color:#f5f5f5;border-right:1px solid #dfdfdf;float:left;height:640px;margin:0;width:150px}.wds_nav_tabs ul{list-style:none outside none;margin:10px 0;padding:0}.wds_nav_tabs .wds_active,.wds_nav_tabs .wds_active a,.wds_nav_tabs .wds_active a:hover,.wds_nav_tabs .wds_sub_active,.wds_nav_tabs .wds_sub_active a,.wds_nav_tabs .wds_sub_active a:hover{background:none repeat scroll 0 0 #fff;color:#333}.wds_nav_tabs .wds_active{border-color:#dfdfdf;border-width:1px 0 1px 1px;border-style:solid;margin:0 -1px 0 -4px;padding:0}.wds_nav_tabs li{border-color:transparent;border-style:solid;border-width:1px 0;list-style-type:none;margin-bottom:0}.wds_nav_tabs a{display:block;line-height:18px;padding:5px 5px 5px 12px;text-decoration:none}.wds_nav_box{background:none repeat scroll 0 0 #fff;display:none;height:610px;overflow:auto;padding:15px}.wds_nav_box.wds_active{display:block}.wds_layer_head{background-color:#f5f5f5;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;cursor:pointer;padding:5px}.wds_layer_head .handle{cursor:move;display:inline-block;margin:5px}.wds_box td{padding:10px!important}.wds_draggable{box-sizing:border-box;cursor:move}.wds_box .color{width:60px}.wds_active_layer{box-shadow:#2c2424 0 0 5px;border-radius:3px}.wds_draggable a,.wds_draggable a:hover{color:inherit!important;font-size:inherit!important;font-style:inherit!important;font-weight:inherit!important;text-decoration:none}#add_embed_help{height:200px;width:672px;top:40%}#add_embed input[type=text]{width:500px}.wds_buttons{float:right;font-weight:400;position:relative}.wds_reset_button{display:none;font-weight:400;margin:10px 0;position:absolute;right:40px;z-index:1}.wdi_about_filed{font-size:13px;font-style:italic}#wdi_save_feed .two .section_col,.wdi_theme .section_col{width:47%;float:left;margin:0 1.5% 18px}.wdi_theme .section_col{margin-bottom:0}#wdi_save_feed .wdi_element{margin:0 0 18px}.display_type_content{background:#fff;border:1px solid #dedede;margin-bottom:15px}#wdi_save_feed .half .wdi_element,#wdi_save_feed .one .wdi_element{width:96%;float:none;margin:0 2% 20px}.wdi_element_name_liked_feed{display:none!important}#wdi_save_feed .wdi_element p{margin:2px 0 0}.wdi_section_name{font-size:19px;margin:0 auto 15px;width:100%;box-sizing:border-box;padding:15px;border-bottom:1px solid #f1f1f1;color:#444;cursor:pointer}.wdi_section{border:1px solid #dedede;margin-bottom:20px;background:#fff}.wdi_section .optioninput *,.wdwt_param .optioninput *{text-align:left}.wdi_section.half{width:49%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wdi_buttons{text-align:right;margin-top:7px}.wdi_tab .wdi_section.half:last-child{margin-left:2%}label[for=WDI_user_padding]{display:block}.wdi_settings_notification{font-size:13px;color:#8b0000}#how_to_publish_tab .wdi_howto_container{display:flex;flex-wrap:wrap}#how_to_publish_tab .wdi_howto_content{border:1px #ddd solid;display:flex;flex:1;flex-direction:column;margin:5px;min-width:250px;max-width:calc(25% - 20px);padding:20px 10px;text-align:center}#how_to_publish_tab .wdi_howto_container h2{font-size:23px;font-weight:400;line-height:29px;margin:0;padding:11px 15px 4px 0}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{max-width:270px;margin:0 auto}#how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{max-width:100%}#how_to_publish_tab .wdi_howto_container .wdi_howto_content input{margin:0 auto;text-align:center;width:100%}.wdi_buttons button.button.preview-button{height:28px}@media (max-width:782px){.wdi_buttons button.button.preview-button{height:auto}}@media (min-width:820px){#conditional_filters_tab .one .wdi_element{width:70%;float:none;margin:0 2% 20px}.wdi_border_wrapper .wdi_element_content{width:100%;display:block}.wdi_border_wrapper .wdi_element_title{display:block}.wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){width:calc(100% - 30px);height:28px}.wdi_element_content .wdi_filter_input input[type=text]:not(.wp-color-picker){width:270px}.wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{width:calc(100% - 78px)}.wdi_border_wrapper .wdi_element_content input[type=number]{width:calc(100% - 30px)}.wdi_border_wrapper .wdi_element_content select{width:calc(100% - 30px)}.wdi_element_content .wdi_filter_input select{width:calc(100% - 413px)}.wdi_filter_input input{height:28px;line-height:28px}}@media (max-width:768px){.wdi_element_content .wdi_filter_input input[type=text]{width:130px}.wdi_element_content .wdi_filter_input select{width:calc(100% - 144px)}#wdi_save_feed .two .section_col,.wdi_theme .section_col{width:96%;float:none;margin:0 2% 18px}.wdi_section.half{width:100%;float:none;margin:0 0 20px!important}.wdi_theme .section_col{margin-bottom:0}}.wdi_section_close::before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi_section_open::before{content:"\f140";display:inline-block;font:400 20px/1 dashicons;speak:none;float:right;cursor:pointer}.wdi-page-header{width:98%;padding:10px}.wdi-page-header .wdi_buttons{float:right}.wdi-page-header .WDI_title_input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.5em;width:30%;outline:0;margin:0 0 3px;background-color:#fff}.wdi_themes_list td{display:table-cell!important}#wdi_feed_form .wd-page-title.wd-header{width:100%;padding:10px 0}@media screen and (max-width:782px){#wdi_feed_form p.search-box{margin-bottom:0}#wdi_feed_form p.search-box input[type=search]{width:100%;height:auto!important}#wdi_feed_form p.search-box input[type=button]{margin-bottom:10px;padding:6px 14px;line-height:normal;font-size:14px;height:auto}.wdi-page-header .WDI_title_input{width:60%}.wdi-page-header .wdi_buttons{float:none;text-align:center}}.wdi_element_name_hashtag_top_recent{display:none}body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4),body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(5){display:none}body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3){display:table-row!important}body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){display:table-row!important}.wdi_settings_form .button{min-height:unset;padding:9px 20px;background:#fff 0 0 no-repeat;border:1px solid #dedede;border-radius:4px;line-height:19px;font-weight:600;font-size:14px;color:#32373c;height:auto!important}.wdi-page-title{margin-bottom:30px;text-align:left;letter-spacing:0;font-size:22px;color:#323a45}.wdi-input-group{margin:0 0 30px 0}.wdi-input-group:last-child{margin:0}.wdi-input-group label{display:block;margin-bottom:15px;font-weight:700;line-height:20px;font-size:15px;color:#323a45}.wdi-input-group .wdi-description{font-style:italic}.wdi-input-group input[readonly],.wdi-input-group input[type=text],.wdi-input-group textarea{width:100%;max-height:40px;margin:0;padding:10px 12px;background:#fff;border-radius:4px;border:1px solid #ddd;font-weight:400;font-size:15px;color:#323a45}.wdi-input-group textarea{max-height:100px;min-height:100px}.wdi-input-group select{max-width:unset;width:100%;margin:0;padding:10px 12px;border-radius:4px;border:1px solid #ddd;font-weight:400;font-size:15px;color:#323a45}.wdi-connect-instagram{background-image:url(../images/instagram-connect.png);background-size:cover;width:330px;height:50px;cursor:pointer}.wdi-access-token-missing{max-width:778px;margin:10px 0 50px 0;line-height:17px;font-size:13px;color:#323a45}.wdi-access-token-missing p{margin:0}.wdi-accounts-list li{margin-bottom:20px;padding:20px;background:#f9f9f9}.wdi-accounts-list .wdi-account-block{display:flex;flex-wrap:wrap;justify-content:space-between}.wdi-accounts-list .wdi-account-user-info{float:left;min-width:145px;margin-right:15px}.wdi-accounts-list .wdi-account-name{margin:0;font-weight:700;line-height:24px;font-size:18px;color:#323a45}.wdi-accounts-list .wdi-account-type{margin:0;line-height:16px;text-transform:capitalize;font-size:12px;color:rgba(50,58,69,.8)}.wdi-accounts-list .wdi-account-show-token{float:left;width:27px;height:27px;padding:8px 0 0 8px;background:#fff;border:1px solid #dedede;border-radius:4px;cursor:pointer}.wdi-accounts-list .wdi-account-remove{display:block;padding:9px 20px;background:#fff 0 0 no-repeat padding-box;border:1px solid #dedede;border-radius:4px;font-weight:500;font-size:14px;color:#32373c;cursor:pointer;height:auto!important}.wdi-accounts-list .wdi-account-accesstoken{margin-top:25px;display:none;clear:both}.wdi-account-accesstoken .wdi-account-remove{display:none}.wdi-advanced-options{max-width:752px;padding:20px;margin-top:30px;background:#f9f9f9}.wdi-advanced-options .wdi-advanced-headline{margin-bottom:25px;padding-bottom:16px;border-bottom:1px solid #e5e5e5;cursor:pointer}.wdi-advanced-options .wdi-advanced-headline .wdi-page-title{float:left;margin:0;font-size:16px}.wdi-advanced-options .wdi-advanced-headline i{float:right;cursor:pointer}.wdi-advanced-options .wdi-advanced-body{display:none}.wdi_settings_form .submit{margin:30px 0 0 0;padding:0}.wdi_settings_form .button-primary{background:#007cba;border-color:#007cba;color:#fff;height:auto!important}.wdi-popup{display:none;position:fixed;height:100%;width:100%;top:0;left:0;background:rgba(0,0,0,.3);z-index:1000000}.wdi-popup .wdi-popup-container{top:50%;transform:translate(0,-50%);width:800px;position:relative;margin:0 auto;padding:30px 30px 25px 30px;background:#fff;border-radius:4px}.wdi-popup .wdi-popup-container .wdi-popup-close{display:block;position:absolute;top:12px;right:11px;width:10px;height:10px;background-image:url(../images/close.svg);background-position:center;background-repeat:no-repeat;cursor:pointer}.wdi-popup .wdi-popup-container h3{margin:0 0 30px 0;line-height:30px;font-weight:700;font-size:20px}#wdi-personal-business-popup .wdi-popup-container{width:570px;height:auto;text-align:center}.wdi_paid{pointer-events:none!important;font-size:12px;text-decoration:none;color:#fff;background:transparent linear-gradient(262deg,#008a62 0,#23b536 100%) 0 0 no-repeat padding-box;border-radius:4px;padding:8px 12px;float:right;margin-top:20px}.wdi-label-business:after{clear:both;display:table;content:""}.wdi-popup-container:after{clear:both;display:table;content:""}#wdi-personal-business-popup .wdi-radio-button{margin:0;font-size:14px}#wdi-personal-business-popup .wdi-radio-button p{margin:0;display:block;width:100%;text-align:left;background:#fff 0 0 no-repeat padding-box;box-shadow:0 0 10px #00000026;margin-bottom:20px;padding:21px 20px 20px 42px;box-sizing:border-box;border-radius:4px}.wdi-radio-button .wdi-label-business label input,.wdi-radio-button .wdi-label-business label span,.wdi-radio-button .wdi-label-personal label input,.wdi-radio-button .wdi-label-personal label span{position:relative;left:-24px}#wdi-personal-business-popup .wdi-radio-button p:first-child{margin-right:50px}#wdi-personal-business-popup .wdi-radio-button p label{font-size:14px;display:block}.wdi_info_text{font-size:14px;line-height:20px;font-weight:400;color:rgba(50,58,69,.5);margin-top:4px;display:block}#wdi-personal-business-popup .dashicons-info{color:#ccc}.wdi-radio-button .wdi-radio-info-text{display:none;position:absolute;max-width:220px;margin:5px 0 0 78px;padding:14px;background:#fff;box-shadow:0 0 8px rgba(0,0,0,.14);border:1px solid #dadcdc;border-radius:4px;line-height:20px;font-size:14px}.wdi-radio-button .wdi-label-business .wdi-radio-info-text{margin:5px 0 0 -152px}.wdi-radio-button .wdi-radio-info-text.active{display:block}#wdi-personal-business-popup .wdi-connect{width:140px;height:37px;margin-top:10px;padding:0;line-height:37px;font-size:14px;background-color:#2160b5;float:right}@media screen and (max-width:1919px){.wdi-advanced-options{max-width:unset}}@media screen and (max-width:767px){br.wdi_desktop{display:none!important}#wdi-personal-business-popup .wdi-connect{margin-top:0}.wdi_paid{width:229px;box-sizing:border-box;padding:8px 7px;font-size:11px}.wdi-radio-button input[type=radio]:checked:before{width:6px;height:6px;margin:4px}input[type=checkbox],input[type=radio]{height:16px;width:12px}#wdi-personal-business-popup .wdi-radio-button p{padding:19px 18px 18px 38px}.wdi-radio-button .wdi-label-business label input,.wdi-radio-button .wdi-label-business label span,.wdi-radio-button .wdi-label-personal label input,.wdi-radio-button .wdi-label-personal label span{position:relative;left:-25px}.wdi-popup .wdi-popup-container{padding:30px 20px 20px 20px}.wdi-settings-page .wdi_settings_form{margin-right:10px;padding:20px 15px}.wdi-connect-instagram{background-image:url(../images/instagram-connect-320.png);width:272px;height:40px}.wdi-account-block>div{width:100%}.wdi-accounts-list li{margin-bottom:15px;padding:20px 15px}.wdi-accounts-list .wdi-account-show-token{float:right}.wdi-account-block .wdi-account-remove{display:none}.wdi-account-accesstoken .wdi-account-remove{display:block;float:right;margin-top:20px}#wdi-personal-business-popup .wdi-popup-container{width:300px;box-sizing:border-box}.wdi-popup .wdi-popup-container h3{max-width:260px;margin:0 auto 20px auto;font-size:16px;line-height:26px}.wdi-radio-button .wdi-label-personal .wdi-radio-info-text{margin:5px 0 0 12px}.wdi-radio-button .wdi-label-business .wdi-radio-info-text{margin:5px 0 0 -147px}.wdi_settings_form .submit{margin-top:25px}}.wdi_pro_only{font-style:italic;color:#4e4e4e!important;background-color:#ccc!important;text-decoration:none;font-weight:700}.wdi-pro-overlay img{opacity:.7}.wdi_pro_notice{text-align:right;color:#15699f;font-size:20px!important;padding:10px}.wdi-radio-button .wdi_account_type{font-weight:700;color:#323A4580}.wdi_input_group{border:1px solid transparent}.wdi_active{border:1px solid #2160b5}.wdi_active .wdi_account_type,.wdi_active .wdi_info_text{color:#323a45}.wdi_free .wdi_info_text span{text-decoration:underline}.wdi_pro .wdi_account_type,.wdi_pro .wdi_info_text{color:#323a45!important}
|
framework/WDIInstagram.php
CHANGED
@@ -138,18 +138,18 @@ class WDIInstagram {
|
|
138 |
}
|
139 |
|
140 |
private function getHastagDataUrl( $tagname, $baseUrl ) {
|
141 |
-
$url = 'https://graph.facebook.com/ig_hashtag_search/?user_id=' . $this->account_data["user_id"] . '&q=' . $tagname . '&access_token=' . $this->account_data["access_token"];
|
142 |
$return_data = array();
|
143 |
$args = array();
|
144 |
$cache_data = $this->cache->get_cache_data($url);
|
145 |
-
if (
|
146 |
return json_decode($cache_data["cache_data"], TRUE);
|
147 |
}
|
148 |
$response = wp_remote_get($url, $args);
|
149 |
if ( !isset($response->errors) && is_array($response) && isset($response["body"]) ) {
|
150 |
-
$response = json_decode($response["body"]);
|
151 |
-
if (
|
152 |
-
$hashtag_id = $response
|
153 |
$baseUrl = str_replace("{tagid}", $hashtag_id, $baseUrl);
|
154 |
$return_data["id"] = $hashtag_id;
|
155 |
$return_data["url"] = $baseUrl;
|
138 |
}
|
139 |
|
140 |
private function getHastagDataUrl( $tagname, $baseUrl ) {
|
141 |
+
$url = 'https://graph.facebook.com/v9.0/ig_hashtag_search/?user_id=' . $this->account_data["user_id"] . '&q=' . $tagname . '&access_token=' . $this->account_data["access_token"];
|
142 |
$return_data = array();
|
143 |
$args = array();
|
144 |
$cache_data = $this->cache->get_cache_data($url);
|
145 |
+
if ( !empty($cache_data) && $cache_data["success"] && !empty($cache_data["cache_data"]) ) {
|
146 |
return json_decode($cache_data["cache_data"], TRUE);
|
147 |
}
|
148 |
$response = wp_remote_get($url, $args);
|
149 |
if ( !isset($response->errors) && is_array($response) && isset($response["body"]) ) {
|
150 |
+
$response = json_decode($response["body"], true);
|
151 |
+
if ( !empty($response['data']) && !empty($response['data'][0]) && !empty($response['data'][0]['id']) ) {
|
152 |
+
$hashtag_id = $response['data'][0]['id'];
|
153 |
$baseUrl = str_replace("{tagid}", $hashtag_id, $baseUrl);
|
154 |
$return_data["id"] = $hashtag_id;
|
155 |
$return_data["url"] = $baseUrl;
|
framework/WDILibrary.php
CHANGED
@@ -1376,8 +1376,9 @@ class WDILibrary {
|
|
1376 |
$url = '';
|
1377 |
if($wdi_user_type === "personal"){
|
1378 |
$url = $instagram_app_config["basic_redirect_uri"];
|
1379 |
-
}
|
1380 |
-
|
|
|
1381 |
if(!is_wp_error( $wdi_user_data ) && isset($wdi_user_data["body"])){
|
1382 |
$wdi_user_data = json_decode($wdi_user_data["body"], TRUE);
|
1383 |
}
|
1376 |
$url = '';
|
1377 |
if($wdi_user_type === "personal"){
|
1378 |
$url = $instagram_app_config["basic_redirect_uri"];
|
1379 |
+
}
|
1380 |
+
elseif ($wdi_user_type === "business"){
|
1381 |
+
$wdi_user_data = wp_remote_get('https://graph.facebook.com/v9.0/' . $wdi_user_id . '?fields=id,ig_id,username,name,biography,profile_picture_url,followers_count,follows_count,media_count,website&access_token=' . $wdi_user_token);
|
1382 |
if(!is_wp_error( $wdi_user_data ) && isset($wdi_user_data["body"])){
|
1383 |
$wdi_user_data = json_decode($wdi_user_data["body"], TRUE);
|
1384 |
}
|
frontend/shortcode.php
CHANGED
@@ -134,7 +134,6 @@ function wdi_feed($atts, $widget_params = '') {
|
|
134 |
|
135 |
global $user_feed_header_args;
|
136 |
$user_feed_header_args = array();
|
137 |
-
|
138 |
if ( !empty($wdi_options['wdi_authenticated_users_list']) ) {
|
139 |
$authenticated_users = json_decode($wdi_options['wdi_authenticated_users_list'], true);
|
140 |
if ( !empty($authenticated_users[$feed_row['username']]) ) {
|
@@ -243,11 +242,15 @@ function wdi_register_frontend_scripts( $params = array() ){
|
|
243 |
}
|
244 |
|
245 |
// Styles/Scripts for popup.
|
246 |
-
wp_register_script('jquery-mobile', WDI_URL . '/js/gallerybox/jquery.mobile.js', array('jquery'), wdi_get_pro_version());
|
247 |
if($wdi_feed_item_onclick_type) {
|
248 |
wp_register_script('jquery-mCustomScrollbar', WDI_URL . '/js/gallerybox/jquery.mCustomScrollbar.concat.min.js', array('jquery'), wdi_get_pro_version());
|
249 |
}
|
250 |
-
|
|
|
|
|
|
|
|
|
251 |
|
252 |
//localize scrips
|
253 |
$user_is_admin = current_user_can('manage_options');
|
134 |
|
135 |
global $user_feed_header_args;
|
136 |
$user_feed_header_args = array();
|
|
|
137 |
if ( !empty($wdi_options['wdi_authenticated_users_list']) ) {
|
138 |
$authenticated_users = json_decode($wdi_options['wdi_authenticated_users_list'], true);
|
139 |
if ( !empty($authenticated_users[$feed_row['username']]) ) {
|
242 |
}
|
243 |
|
244 |
// Styles/Scripts for popup.
|
245 |
+
wp_register_script('jquery-mobile', WDI_URL . '/js/gallerybox/jquery.mobile.min.js', array('jquery'), wdi_get_pro_version());
|
246 |
if($wdi_feed_item_onclick_type) {
|
247 |
wp_register_script('jquery-mCustomScrollbar', WDI_URL . '/js/gallerybox/jquery.mCustomScrollbar.concat.min.js', array('jquery'), wdi_get_pro_version());
|
248 |
}
|
249 |
+
if (WDI_MINIFY === true) {
|
250 |
+
wp_register_script('jquery-fullscreen', WDI_URL . '/js/gallerybox/jquery.fullscreen-0.4.0.min.js', array('jquery'), wdi_get_pro_version());
|
251 |
+
} else {
|
252 |
+
wp_register_script('jquery-fullscreen', WDI_URL . '/js/gallerybox/jquery.fullscreen-0.4.0.js', array('jquery'), wdi_get_pro_version());
|
253 |
+
}
|
254 |
|
255 |
//localize scrips
|
256 |
$user_is_admin = current_user_can('manage_options');
|
js/block.min.css
ADDED
File without changes
|
js/block.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(o,n){!function(){var t,e=JSON.parse(tw_obj_translate.blocks);for(t in window.tw_gb)window.tw_gb.hasOwnProperty(t)&&(e[t]=window.tw_gb[t]);if(!e)return;for(t in e)e.hasOwnProperty(t)&&(e[t].inited||(e[t].inited=!0,function(t,e,p,c){var d=e.createElement,o=c.isPopup,e=d("img",{width:c.iconSvg.width,height:c.iconSvg.height,src:c.iconSvg.src});t.registerBlockType(p,{title:c.title,icon:e,category:"common",attributes:{shortcode:{type:"string"},popupOpened:{type:"boolean",value:!0},notInitial:{type:"boolean"},shortcode_id:{type:"string"}},edit:function(s){return s.attributes.notInitial?s.attributes.popupOpened?o?function(t,e){var o="wdg_cb_"+p;if(window[o+"_shortcode"]=t||"",window[o]=function(t,e){delete window[o],s&&s.setAttributes({shortcode:t,shortcode_id:e,popupOpened:!1})},s.setAttributes({popupOpened:!0}),!e&&null!=t){var n=t.split(" ");for(i=0;i<n.length;i++){var r=n[i].split("=");"id"==r[0]&&(e=r[1].replace(/"/g,""))}}return d("form",{className:"tw-container"},d("div",{className:"tw-container-wrap"+(c.containerClass?" "+c.containerClass:"")},d("span",{className:"media-modal-close",onClick:a},d("span",{className:"media-modal-icon"})),d("iframe",{src:c.data.shortcodeUrl+"&callback="+o+"&edit="+e})))}(s.attributes.shortcode,s.attributes.shortcode_id):function(t){s.setAttributes({popupOpened:!0});var i=[],n=JSON.parse(c.data);n.inputs.forEach(function(o){"select"===o.type&&(i.push(d("option",{value:"",dataId:0},tw_obj_translate.empty_item)),o.options.length&&o.options.forEach(function(t){var e="["+n.shortcode_prefix+" "+o.shortcode_attibute_name+'="'+t.id+'"]';i.push(d("option",{value:e,dataId:t.id},t.name))}))}),n.shortcodes&&n.shortcodes.forEach(function(t){i.push(d("option",{value:t.shortcode,dataId:t.id},t.name))});return d("form",{onSubmit:e},d("div",{},c.titleSelect),d("select",{value:t,onChange:e,class:"tw-gb-select"},i))}(s.attributes.shortcode):(s.attributes.shortcode?function(){return d("img",{src:c.iconUrl,alt:c.title,style:{height:"36px",width:"36px"},onClick:function(){s.setAttributes({popupOpened:!0})}.bind(this)})}:function(){return s.setAttributes({popupOpened:!1}),d("p",{style:{cursor:"pointer"},onClick:function(){s.setAttributes({popupOpened:!0})}.bind(this)},tw_obj_translate.nothing_selected)})():(s.setAttributes({notInitial:!0,popupOpened:!0}),d("p"));function a(){s.setAttributes({popupOpened:!1})}function e(t,e){var o=t.target.querySelector("option:checked");s.setAttributes({shortcode:o.value,shortcode_id:o.dataId,popupOpened:!1}),t.preventDefault()}},save:function(t){return t.attributes.shortcode}})}(o,n,t,e[t])))}()}(window.wp.blocks,window.wp.element);
|
js/gallerybox/{jquery.fullscreen-0.4.1.js → jquery.fullscreen-0.4.0.js}
RENAMED
File without changes
|
js/gallerybox/jquery.fullscreen-0.4.0.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){function t(e){return void 0!==e}function n(t,n,l){var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t,n.prototype.constructor=n,t._super=n.prototype,l&&e.extend(t.prototype,l)}var l=[["",""],["exit","cancel"],["screen","Screen"]],r=["","o","ms","moz","webkit","webkitCurrent"];function s(e,n){var s;"string"==typeof e&&(n=e,e=document);for(var i=0;i<l.length;++i){n=n.replace(l[i][0],l[i][1]);for(var o=0;o<r.length;++o)if(s=r[o],t(e[s+=0===o?n:n.charAt(0).toUpperCase()+n.substr(1)]))return e[s]}}var i=navigator.userAgent,o=s("fullscreenEnabled"),u=!(-1!==i.indexOf("Android")&&-1!==i.indexOf("Chrome"))&&t(s("fullscreenElement"))&&(!t(o)||!0===o),c=e.fn.jquery.split("."),_=parseInt(c[0])<2&&parseInt(c[1])<7,h=function(){this.__options=null,this._fullScreenElement=null,this.__savedStyles={}};h.prototype={_DEFAULT_OPTIONS:{styles:{boxSizing:"border-box",MozBoxSizing:"border-box",WebkitBoxSizing:"border-box"},toggleClass:null},__documentOverflow:"",__htmlOverflow:"",_preventDocumentScroll:function(){this.__documentOverflow=e("body")[0].style.overflow,this.__htmlOverflow=e("html")[0].style.overflow},_allowDocumentScroll:function(){},_fullScreenChange:function(){this.isFullScreen()?(this._preventDocumentScroll(),this._triggerEvents()):(this._allowDocumentScroll(),this._revertStyles(),this._triggerEvents(),this._fullScreenElement=null)},_fullScreenError:function(t){this._revertStyles(),this._fullScreenElement=null,t&&e(document).trigger("fscreenerror",[t])},_triggerEvents:function(){e(this._fullScreenElement).trigger(this.isFullScreen()?"fscreenopen":"fscreenclose"),e(document).trigger("fscreenchange",[this.isFullScreen(),this._fullScreenElement])},_saveAndApplyStyles:function(){var t=e(this._fullScreenElement);for(var n in this.__savedStyles={},this.__options.styles)this.__savedStyles[n]=this._fullScreenElement.style[n],this._fullScreenElement.style[n]=this.__options.styles[n];this.__options.toggleClass&&t.addClass(this.__options.toggleClass)},_revertStyles:function(){var t=e(this._fullScreenElement);for(var n in this.__options.styles)this._fullScreenElement.style[n]=this.__savedStyles[n];this.__options.toggleClass&&t.removeClass(this.__options.toggleClass)},open:function(t,n){t!==this._fullScreenElement&&(this.isFullScreen()&&this.exit(),this._fullScreenElement=t,this.__options=e.extend(!0,{},this._DEFAULT_OPTIONS,n),this._saveAndApplyStyles())},exit:null,isFullScreen:null,isNativelySupported:function(){return u}};var f=function(){f._super.constructor.apply(this,arguments),this.exit=e.proxy(s("exitFullscreen"),document),this._DEFAULT_OPTIONS=e.extend(!0,{},this._DEFAULT_OPTIONS,{styles:{width:"100%",height:"100%"}}),e(document).bind(this._prefixedString("fullscreenchange")+" MSFullscreenChange",e.proxy(this._fullScreenChange,this)).bind(this._prefixedString("fullscreenerror")+" MSFullscreenError",e.proxy(this._fullScreenError,this))};n(f,h,{VENDOR_PREFIXES:["","o","moz","webkit"],_prefixedString:function(t){return e.map(this.VENDOR_PREFIXES,function(e){return e+t}).join(" ")},open:function(e,t){f._super.open.apply(this,arguments),s(e,"requestFullscreen").call(e)},exit:e.noop,isFullScreen:function(){return null!==s("fullscreenElement")},element:function(){return s("fullscreenElement")}});var p=function(){p._super.constructor.apply(this,arguments),this._DEFAULT_OPTIONS=e.extend({},this._DEFAULT_OPTIONS,{styles:{position:"fixed",zIndex:"2147483647",left:0,top:0,bottom:0,right:0}}),this.__delegateKeydownHandler()};n(p,h,{__isFullScreen:!1,__delegateKeydownHandler:function(){var t=e(document);t.delegate("*","keydown.fullscreen",e.proxy(this.__keydownHandler,this));var n=_?t.data("events"):e._data(document).events,l=n.keydown;_?n.live.unshift(n.live.pop()):l.splice(0,0,l.splice(l.delegateCount-1,1)[0])},__keydownHandler:function(e){return!this.isFullScreen()||27!==e.which||(this.exit(),!1)},_revertStyles:function(){p._super._revertStyles.apply(this,arguments),this._fullScreenElement.offsetHeight},open:function(e){p._super.open.apply(this,arguments),this.__isFullScreen=!0,this._fullScreenChange()},exit:function(){this.__isFullScreen=!1,this._fullScreenChange()},isFullScreen:function(){return this.__isFullScreen},element:function(){return this.__isFullScreen?this._fullScreenElement:null}}),e.fullscreen=u?new f:new p,e.fn.fullscreen=function(t){var n=this[0];return(t=e.extend({toggleClass:null},t)).styles={},n&&e.fullscreen.open(n,t),this}}(jQuery);
|
js/gallerybox/{jquery.mobile.js → jquery.mobile.min.js}
RENAMED
File without changes
|
js/gallerybox/wdi_gallery_box.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var isPopUpOpened=!1,wdi_data=[];function wdi_spider_createpopup(e,i,a,r,n,d,o,s,_){if(e=e.replace(/&/g,"&"),!isPopUpOpened&&(isPopUpOpened=!0,!wdi_spider_hasalreadyreceivedpopup(d)&&!wdi_spider_isunsupporteduseragent())){jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#wdi_spider_popup_loading_"+i).css({display:"block"}),jQuery("#wdi_spider_popup_overlay_"+i).css({display:"block"});for(var t,c=0,u=0;u<s.parsedData.length;u++)if(s.parsedData[u].id===_){c=u,t=[s.parsedData[u]];break}jQuery.ajax({type:"POST",url:e,dataType:"text",data:{action:"WDIGalleryBox",image_rows:JSON.stringify(t),feed_id:s.feed_row.id,feed_counter:s.feed_row.wdi_feed_counter,current_image_index:c,image_rows_count:s.parsedData.length,carousel_media_row:JSON.stringify(t[0].carousel_media)},success:function(e){var t=jQuery('<div id="wdi_spider_popup_wrap" class="wdi_spider_popup_wrap wdi_lightbox_theme_'+s.feed_row.theme_id+'" style="width:'+a+"px;height:"+r+"px;margin-top:-"+r/2+"px;margin-left: -"+a/2+'px; ">'+e+"</div>");new wdi_construct_popup(t,s,s.parsedData,_).construct(),t.hide().appendTo("body"),wdi_spider_showpopup(d,o,t,n),jQuery("#wdi_spider_popup_loading_"+i).css({display:"none !important;"})}})}}var wdi_construct_popup=function(h,f,y,g){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<y.length;d++){var o,s,_,c,u,m=y[d];u=m.resolution&&""!==m.resolution?(m.resolution.split(" "),_=intval($resolution_arr[0]),c=intval($resolution_arr[2]),0!==_&&0!==c?(o=_*(s=Math.max(r/_,n/c)),c*s):(o=r,n)):(o=r,n);var l=(r-(o*=s=Math.max(r/o,n/u)))/2,p=(n-(u*=s))/2;a+='<div id="wdi_filmstrip_thumbnail_'+d+'" class="'+("wdi_filmstrip_thumbnail "+(parseInt(m.id)===parseInt(g)?"wdi_thumb_active":"wdi_thumb_deactive"))+'">'+('<img style="'+("width:"+o+"px;height:"+u+"px;margin-left:"+l+"px;margin-top:"+p+"px;")+'" class="wdi_filmstrip_thumbnail_img" src="'+("EMBED_OEMBED_INSTAGRAM_VIDEO"==m.filetype?void 0!==m.filename?m.filename:m.thumb_url:void 0!==m.images[f.feedImageResolution]&&void 0!==m.images[f.feedImageResolution].url?m.images[f.feedImageResolution].url:m.thumb_url)+'" onclick="'+("wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+d+"', wdi_data)")+'" ontouchend="'+("wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+d+"', wdi_data)")+'" image_id="'+m.id+'" image_key="'+d+'" alt="'+m.alt+'" />')+"</div>"}var w='<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>';h.find(".wdi_filmstrip_container").append(w)},this.set_wdi_data=function(){wdi_data=[];for(var e=0;e<y.length;e++)wdi_data[e]=[],wdi_data[e].number=e+1,wdi_data[e].id=y[e].id,wdi_data[e].alt=y[e].alt,wdi_data[e].description=wdi_front.escape_tags(y[e].description),wdi_data[e].username=y[e].username,wdi_data[e].profile_picture=y[e].profile_picture,wdi_data[e].image_url=y[e].image_url,wdi_data[e].thumb_url=y[e].thumb_url,wdi_data[e].src=y[e].images.standard_resolution.url,wdi_data[e].date=y[e].date,wdi_data[e].comment_count=y[e].comment_count,wdi_data[e].filetype=y[e].filetype,wdi_data[e].filename=y[e].filename,wdi_data[e].avg_rating=y[e].avg_rating,wdi_data[e].rate=y[e].rate,wdi_data[e].rate_count=y[e].rate_count,wdi_data[e].hit_count=y[e].hit_count,wdi_data[e].comments_data=void 0!==y[e].comments_data?y[e].comments_data:"null",wdi_data[e].carousel_media=void 0!==y[e].carousel_media?y[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");var a=jQuery(document).scrollTop();window.location.hash="",jQuery(document).scrollTop(a),"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,i,a=-1<navigator.userAgent.indexOf("Chrome"),r=-1<navigator.userAgent.indexOf("Safari");a&&r&&(r=!1),r||(t=e.get(0),i=!/firefox/i,navigator.userAgent.match(/firefox/i)&&(i=!0),i||(t.paused?t.play():t.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]+'"');if(d+=" >",null!=r&&r.length)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>');else""!=t&&(d+='<img src="'+i+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">');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,_){if(!wdi_testBrowser_cssTransitions())return wdi_fallback(o,s,_);if(!wdi_testBrowser_cssTransforms3d())return wdi_fallback3d(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"),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),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()}))}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 c=wdi_transition_duration/(e+t);var u=jQuery(o).find("img"),m=jQuery('<span style="display: block;" />').addClass("wdi_grid");jQuery(o).prepend(m);var l=jQuery(".wdi_slide_bg"),p=u.width(),w=u.height(),h=l.width(),f=l.height(),y=Math.floor(h/e),g=Math.floor(f/t),v=h-e*y,b=Math.ceil(v/e),j=f-t*g,Q=Math.ceil(j/t),k=0,x=Math.ceil((jQuery(".wdi_slide_bg").width()-u.width())/2),C=void 0===u.attr("src")?"":u.attr("src");a="min-auto"===(a="auto"===a?h:a)?-h:a,r="min-auto"===(r="auto"===r?f:r)?-f:r;for(var I,E,M,A,T,B,O,z,D,S,V=0;V<e;V++){var R,H=0,P=Math.floor((jQuery(".wdi_slide_bg").height()-u.height())/2),K=y;0<v&&(K+=R=b<=v?b:v,v-=R);for(var L=0;L<t;L++){var q=g,U=j;0<U&&(q+=R=Q<=U?Q:j,U-=R),m.append((I=K,E=q,M=H,A=P,T=k,B=x,O=C,z=p,D=w,S=(V+L)*c,jQuery('<span class="wdi_gridlet" />').css({display:"block",width:I,height:E,top:M,left:T,backgroundImage:'url("'+O+'")',backgroundColor:jQuery(".wdi_spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:B+"px "+A+"px",backgroundSize:z+"px "+D+"px",transition:"all "+wdi_transition_duration+"ms ease-in-out "+S+"ms",transform:"none"}))),H+=q,P-=q}x-=K,k+=K}var N=m.children().last();m.show(),u.css("opacity",0),m.children().first().addClass("rs-top-left"),m.children().last().addClass("rs-bottom-right"),m.children().eq(t-1).addClass("rs-bottom-left"),m.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){m.children().css({opacity:d,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+n+")"})},1),jQuery(s).css("opacity",1),jQuery(N).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}),u.css("opacity",1),m.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)},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].from.username,d=(e[i].from.profile_picture,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].created_time)+"</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)}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(){this.instagram.getRecentMediaComments(this.media_id,{success:function(e){if(""==e||null==e||null==e)return errorMessage="Network Error, please try again later :(",void console.log("%c"+errorMessage,"color:#cc0000;");if(200!=e.meta.code)return errorMessage=e.meta.error_message,void console.log("%c"+errorMessage,"color:#cc0000;");wdi_comments_manager.mediaComments=e.data;var t=wdi_data[wdi_comments_manager.currentKey];t.comments_data=e.data,wdi_comments_manager.showComments(t.comments_data,wdi_comments_manager.load_more_count),wdi_comments_manager.ajax_comments_ready(e.data)}})},ajax_comments_ready:function(e){this.createLoadMoreAndBindEvent()},createLoadMoreAndBindEvent:function(){jQuery("#wdi_added_comments").prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>')),jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){jQuery(this).remove(),wdi_comments_manager.showComments(wdi_comments_manager.mediaComments,wdi_comments_manager.load_more_count),wdi_comments_manager.createLoadMoreAndBindEvent()})},filterCommentText:function(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 _,c=0,u=0;u<o.parsedData.length;u++)if(o.parsedData[u].id===s){c=u,_=[o.parsedData[u]];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:c,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(p,w,h,f){this.theme_row={},this.construct=function(){this.theme_row=window["wdi_theme_"+w.feed_row.theme_id],w.feed_row.popup_enable_filmstrip&&"1"===w.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!==w.feed_row.popup_filmstrip_height?w.feed_row.popup_filmstrip_height:"20":void 0!==w.feed_row.popup_filmstrip_height?w.feed_row.popup_filmstrip_height:"50",n=r=parseInt(r),d=0;d<h.length;d++){var o,s,_,c=h[d];_=c.resolution&&""!==c.resolution?(c.resolution.split(" "),m=intval($resolution_arr[0]),l=intval($resolution_arr[2]),0!==m&&0!==l?(o=m*(s=Math.max(r/m,n/l)),l*s):(o=r,n)):(o=r,n);var u=(r-(o*=s=Math.max(r/o,n/_)))/2,m=(n-(_*=s))/2,l="wdi_filmstrip_thumbnail "+(parseInt(c.id)===parseInt(f)?"wdi_thumb_active":"wdi_thumb_deactive"),u="width:"+o+"px;height:"+_+"px;margin-left:"+u+"px;margin-top:"+m+"px;";0==(m="EMBED_OEMBED_INSTAGRAM_VIDEO"==c.filetype?void 0!==c.filename?c.filename:c.thumb_url:void 0!==c.images[w.feedImageResolution]&&void 0!==c.images[w.feedImageResolution].url?c.images[w.feedImageResolution].url:c.thumb_url).indexOf("https://video.cdninstagram.com/")&&(m=wdi_url.plugin_url+"images/video_missing.png"),a+='<div id="wdi_filmstrip_thumbnail_'+d+'" class="'+l+'">'+('<img style="'+u+'" class="wdi_filmstrip_thumbnail_img" src="'+m+'" onclick="'+("wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+d+"', wdi_data)")+'" ontouchend="'+("wdi_change_image(parseInt(jQuery('#wdi_current_image_key').val()), '"+d+"', wdi_data)")+'" image_id="'+c.id+'" image_key="'+d+'" alt="'+c.alt+'" />')+"</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>';p.find(".wdi_filmstrip_container").append(i)},this.set_wdi_data=function(){wdi_data=[];for(var e=0;e<h.length;e++)wdi_data[e]=[],wdi_data[e].number=e+1,wdi_data[e].id=h[e].id,wdi_data[e].alt=h[e].alt,wdi_data[e].description=wdi_front.escape_tags(h[e].description),wdi_data[e].username=h[e].username,wdi_data[e].profile_picture=h[e].profile_picture,wdi_data[e].image_url=h[e].image_url,wdi_data[e].thumb_url=h[e].thumb_url,wdi_data[e].src=h[e].images.standard_resolution.url,wdi_data[e].date=h[e].date,wdi_data[e].comment_count=h[e].comment_count,wdi_data[e].filetype=h[e].filetype,wdi_data[e].filename=h[e].filename,wdi_data[e].avg_rating=h[e].avg_rating,wdi_data[e].rate=h[e].rate,wdi_data[e].rate_count=h[e].rate_count,wdi_data[e].hit_count=h[e].hit_count,wdi_data[e].comments_data=void 0!==h[e].comments_data?h[e].comments_data:"null",wdi_data[e].carousel_media=void 0!==h[e].carousel_media?h[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]+'"');if(d+=" >",null!=r&&r.length)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>');else""!=t&&(d+='<img src="'+i+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">');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 c=wdi_transition_duration/(e+t);var u=jQuery(o).find("img"),m=jQuery('<span style="display: block;" />').addClass("wdi_grid");jQuery(o).prepend(m);var l=jQuery(".wdi_slide_bg"),p=u.width(),w=u.height(),_=l.width(),l=l.height(),h=Math.floor(_/e),f=Math.floor(l/t),g=_-e*h,y=Math.ceil(g/e),v=l-t*f,b=Math.ceil(v/t),j=0,Q=Math.ceil((jQuery(".wdi_slide_bg").width()-u.width())/2),k=void 0===u.attr("src")?"":u.attr("src");a="min-auto"===(a="auto"===a?_:a)?-_:a,r="min-auto"===(r="auto"===r?l:r)?-l:r;for(var x,C,I,E,M,A,O,T,B,z,D=0;D<e;D++){var S,V=0,R=Math.floor((jQuery(".wdi_slide_bg").height()-u.height())/2),H=h;0<g&&(H+=S=y<=g?y:g,g-=S);for(var P=0;P<t;P++){var K=f,L=v;0<L&&(K+=S=b<=L?b:v,0),m.append((x=H,C=K,I=V,E=R,M=j,A=Q,O=k,T=p,B=w,z=(D+(z=P))*c,jQuery('<span class="wdi_gridlet" />').css({display:"block",width:x,height:C,top:I,left:M,backgroundImage:'url("'+O+'")',backgroundColor:jQuery(".wdi_spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:A+"px "+E+"px",backgroundSize:T+"px "+B+"px",transition:"all "+wdi_transition_duration+"ms ease-in-out "+z+"ms",transform:"none"}))),V+=K,R-=K}Q-=H,j+=H}l=m.children().last();m.show(),u.css("opacity",0),m.children().first().addClass("rs-top-left"),m.children().last().addClass("rs-bottom-right"),m.children().eq(t-1).addClass("rs-bottom-left"),m.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){m.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}),u.css("opacity",1),m.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)},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].from.username,d=(e[i].from.profile_picture,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].created_time)+"</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)}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(){this.instagram.getRecentMediaComments(this.media_id,{success:function(e){if(""==e||null==e||null==e)return errorMessage="Network Error, please try again later :(",void console.log("%c"+errorMessage,"color:#cc0000;");if(200!=e.meta.code)return errorMessage=e.meta.error_message,void console.log("%c"+errorMessage,"color:#cc0000;");wdi_comments_manager.mediaComments=e.data;var t=wdi_data[wdi_comments_manager.currentKey];t.comments_data=e.data,wdi_comments_manager.showComments(t.comments_data,wdi_comments_manager.load_more_count),wdi_comments_manager.ajax_comments_ready(e.data)}})},ajax_comments_ready:function(e){this.createLoadMoreAndBindEvent()},createLoadMoreAndBindEvent:function(){jQuery("#wdi_added_comments").prepend(jQuery('<p id="wdi_load_more_comments" class="wdi_load_more_comments">load more comments</p>')),jQuery(".wdi_comment_container #wdi_load_more_comments").on("click",function(){jQuery(this).remove(),wdi_comments_manager.showComments(wdi_comments_manager.mediaComments,wdi_comments_manager.load_more_count),wdi_comments_manager.createLoadMoreAndBindEvent()})},filterCommentText:function(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/shortcode.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(window).resize(function(){jQuery("body").each(function(){window.parent.wdi_thickDims(jQuery(this).data("width"),jQuery(this).data("height"))})});
|
js/wdi_admin.js
CHANGED
@@ -21,33 +21,33 @@ jQuery(document).ready(function() {
|
|
21 |
}
|
22 |
});
|
23 |
});
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
|
52 |
/*Feeds page*/
|
53 |
wdi_controller.bindSaveFeedEvent();
|
@@ -498,8 +498,12 @@ wdi_controller.save_feed = function ( task ) {
|
|
498 |
feed_users.push(json_feed_users[i]);
|
499 |
}
|
500 |
}
|
|
|
501 |
}
|
502 |
-
|
|
|
|
|
|
|
503 |
jQuery('#WDI_feed_users').val(this.stringifyUserData(feed_users));
|
504 |
jQuery('#wdi_feed_thumb').val('');
|
505 |
if ( type == 'business' ) {
|
@@ -567,7 +571,9 @@ wdi_controller.makeInstagramUserRequest = function ( user_input, ignoreConfirm )
|
|
567 |
if ( !_this.hasData(response) && vObj.msg == 'success' ) {
|
568 |
if ( ignoreConfirm != true ) {
|
569 |
if ( confirm(wdi_messages.hashtag_no_data) ) {
|
570 |
-
|
|
|
|
|
571 |
}
|
572 |
else {
|
573 |
jQuery('#wdi_add_user_ajax_input').val('');
|
@@ -838,7 +844,7 @@ wdi_controller.isValidResponse = function (response) {
|
|
838 |
* @return {Boolean} [true or false]
|
839 |
*/
|
840 |
wdi_controller.hasData = function(response) {
|
841 |
-
if (typeof response != 'undefined' && typeof response['data'] != 'undefined' && response['data'].length != 0) {
|
842 |
return true;
|
843 |
} else {
|
844 |
return false;
|
@@ -1528,7 +1534,7 @@ function wdi_spider_set_input_value(input_id, input_value) {
|
|
1528 |
}
|
1529 |
|
1530 |
|
1531 |
-
function wdi_account_remove(user_name) {
|
1532 |
jQuery.ajax({
|
1533 |
type: 'POST',
|
1534 |
url: wdi_ajax.ajax_url,
|
@@ -1537,11 +1543,20 @@ function wdi_account_remove(user_name) {
|
|
1537 |
page: 'wdi_settings',
|
1538 |
action: 'wdi_account_disconnect',
|
1539 |
nonce: wdi_ajax.wdi_nonce,
|
1540 |
-
user_name: user_name
|
|
|
1541 |
},
|
1542 |
success: function (response) {
|
1543 |
if ( response.success ) {
|
1544 |
-
jQuery('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1545 |
}
|
1546 |
}
|
1547 |
});
|
21 |
}
|
22 |
});
|
23 |
});
|
24 |
+
jQuery(".wdi_account_refresh").click(function () {
|
25 |
+
var __this = jQuery(this);
|
26 |
+
var wdi_user_name = __this.data("wdi_account");
|
27 |
+
jQuery.ajax({
|
28 |
+
type: 'POST',
|
29 |
+
url: wdi_ajax.ajax_url,
|
30 |
+
dataType: 'json',
|
31 |
+
data: {
|
32 |
+
page: 'wdi_settings',
|
33 |
+
action: 'wdi_account_refresh',
|
34 |
+
nonce: wdi_ajax.wdi_nonce,
|
35 |
+
user_name: wdi_user_name
|
36 |
+
},
|
37 |
+
success: function ( data ) {
|
38 |
+
var wdi_reset_cache_success = __this.closest("div").find(".wdi_reset_cache_success");
|
39 |
+
wdi_reset_cache_success.remove();
|
40 |
+
if ( data.success === true ) {
|
41 |
+
__this.after("<span class='wdi_reset_cache_success' style='color: #029117; margin-left: 15px; line-height: 2;'>Success</span>");
|
42 |
+
var wdi_token_filed = __this.closest("div").find(".wdi_user_token");
|
43 |
+
wdi_token_filed.val(data.token);
|
44 |
+
}
|
45 |
+
else {
|
46 |
+
__this.after("<span class='wdi_reset_cache_success' style='color: #fc0000; margin-left: 15px; line-height: 2;'>Failed</span>");
|
47 |
+
}
|
48 |
+
}
|
49 |
+
});
|
50 |
+
});
|
51 |
|
52 |
/*Feeds page*/
|
53 |
wdi_controller.bindSaveFeedEvent();
|
498 |
feed_users.push(json_feed_users[i]);
|
499 |
}
|
500 |
}
|
501 |
+
feed_users.push(default_user);
|
502 |
}
|
503 |
+
else {
|
504 |
+
feed_users.push(default_user);
|
505 |
+
}
|
506 |
+
|
507 |
jQuery('#WDI_feed_users').val(this.stringifyUserData(feed_users));
|
508 |
jQuery('#wdi_feed_thumb').val('');
|
509 |
if ( type == 'business' ) {
|
571 |
if ( !_this.hasData(response) && vObj.msg == 'success' ) {
|
572 |
if ( ignoreConfirm != true ) {
|
573 |
if ( confirm(wdi_messages.hashtag_no_data) ) {
|
574 |
+
jQuery('#wdi_add_user_ajax_input').val('');
|
575 |
+
// @ToDo. If we get the wrong answer, why add Hashtag?
|
576 |
+
// _this.addHashtag(tagname, response);
|
577 |
}
|
578 |
else {
|
579 |
jQuery('#wdi_add_user_ajax_input').val('');
|
844 |
* @return {Boolean} [true or false]
|
845 |
*/
|
846 |
wdi_controller.hasData = function(response) {
|
847 |
+
if (typeof response != 'undefined' && typeof response['data'] != 'undefined' && response['data'].length != 0 ) {
|
848 |
return true;
|
849 |
} else {
|
850 |
return false;
|
1534 |
}
|
1535 |
|
1536 |
|
1537 |
+
function wdi_account_remove(user_name,user_id) {
|
1538 |
jQuery.ajax({
|
1539 |
type: 'POST',
|
1540 |
url: wdi_ajax.ajax_url,
|
1543 |
page: 'wdi_settings',
|
1544 |
action: 'wdi_account_disconnect',
|
1545 |
nonce: wdi_ajax.wdi_nonce,
|
1546 |
+
user_name: user_name,
|
1547 |
+
user_id: user_id,
|
1548 |
},
|
1549 |
success: function (response) {
|
1550 |
if ( response.success ) {
|
1551 |
+
if (jQuery('[class*="wdi-account-list"]').length == 1) {
|
1552 |
+
var account = jQuery('.wdi-account-list-' + user_id).parent()
|
1553 |
+
account.prev().remove()
|
1554 |
+
account.remove();
|
1555 |
+
jQuery("#toplevel_page_wdi_feeds ul").remove()
|
1556 |
+
jQuery("#toplevel_page_wdi_feeds a").attr("href", "admin.php?page=wdi_settings")
|
1557 |
+
} else {
|
1558 |
+
jQuery('.wdi-account-list-' + user_id).remove();
|
1559 |
+
}
|
1560 |
}
|
1561 |
}
|
1562 |
});
|
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=JSON.parse(wdi_options.wdi_authenticated_users_list),r=0;for(var a in i)t+="<tr data-multiple-account='"+r+"'>",t+="<th>Access Token</th>",t+='<td><input type="text" name="wdi_instagram_options[wdi_authenticated_users_list][access_token][]" size="53" required="" value="'+i[a].access_token+'"></td>',t+="</tr>",t+="<tr data-multiple-account='"+r+"' 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="'+i[a].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="'+i[a].user_id+'">',t+="</tr>",r++;e.append(t)}jQuery(".wdi_remove_auth_user").on("click",function(e){e.preventDefault();var t=jQuery(this).closest(".wdi_username_tr").data("multiple-account");return jQuery(this).closest(".wdi_multiple_accounts_section").find('tr[data-multiple-account="'+t+'"]').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(){}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){var t=jQuery(e).val();return""!=t&&(!("delete_all"==t&&!confirm(wdi_messages.do_you_want_to_delete_selected_items))&&(wdi_spider_set_input_value("task",t),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,t;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,t=(jQuery('input[id^="check_pr_"]').length?parseInt(jQuery('input[id^="check_pr_"]').length):0)+e,jQuery("#check_all_items").prop("checked",!0),t&&(jQuery("#draganddrop").html("<strong><p>Selected "+t+" item"+(1<t?"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(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:t},success:function(e){e.success&&jQuery(".wdi-account-list-"+t).remove()}})}function wdi_popup_open(){jQuery(".wdi-popup").show()}function wdi_popup_close(){jQuery(".wdi-popup").hide()}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+"']");d(t[i],r)}}else{var a,s=jQuery(e).data("section_name"),n=null;e.hasClass("wdi_section_open")?(d("show",e),n="show"):e.hasClass("wdi_section_close")&&(d("hide",e),n="hide"),null!=n&&((a=JSON.parse(localStorage.getItem("wdi_sections"))||{})[s]=n,localStorage.setItem("wdi_sections",JSON.stringify(a)))}}function d(e,t){var i;"show"===e?("table"===(i=t.closest(".wdi_section").find(".wdi_elements")).data("display")?i.css({display:"table"}):i.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(),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>"):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})}),wdi_controller.getParameterByName=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[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"),r=jQuery("#wdi_refresh_section");wdi_controller.oldDisplayType={section:i,tab:t},wdi_controller.displayTypeMemory[t]=wdi_controller.oldDisplayType,null!=r&&r.attr("value",i);var a=jQuery(".wdi_border_wrapper .form-table");jQuery("#wdi_feed_type").attr("value",i);var s=0,n=!1;a.find(".wdi_element").each(function(){0;var e=jQuery(this).find(".wdwt_param").children().children().children().attr("section");if(void 0!==e){n=!1;var t=e.toLowerCase().trim().split(",");for(s=0;s<t.length;s++)t[s]===i&&(jQuery(this).css("display","block"),n=!0);!1===n&&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).trigger("click"):jQuery('.display_type[tab="'+e+'"]').first().find("input").trigger("click"):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=[],n={};"cancel"==e&&(window.location=window.location.href),i=jQuery("#WDI_user_name option:selected").data("type"),r=jQuery("#WDI_user_name option:selected").val();var d=wdi_controller.getUserObj(r);if(!d)return alert(wdi_messages.user_field_required),!1;if(a={id:d.user_id,username:d.user_name},wdi_controller.checkIfUserNotSaved(e),0==wdi_controller.waitingAjaxRequestEnd.button){if(n=jQuery("#WDI_feed_users").val(),this.isJsonString(n))for(var l in n=JSON.parse(n))"#"===n[l].username.charAt(0)&&s.push(n[l]);s.push(a),jQuery("#WDI_feed_users").val(this.stringifyUserData(s)),jQuery("#wdi_feed_thumb").val(""),"business"==i&&jQuery("#wdi_feed_thumb").val(d.profile_picture_url),"apply_changes"!=e&&"save_feed"!=e||(t=jQuery("#wdi_add_or_edit").val(),jQuery("#wdi_current_id").val(t)),jQuery("#task").attr("value",e),jQuery("#wdi_save_feed").submit()}},wdi_controller.makeInstagramUserRequest=function(e,i){var t,r,a=this,s=this.getInputType(e),n="hashtag"===s;if(""==e)return alert(wdi_messages.please_write_hashtag),!1;if(""!=e&&!n)return alert(wdi_messages.invalid_hashtag),!1;if(a.checkForDuplicateUser(e))return alert(e+" "+wdi_messages.already_added),!1;switch(t=jQuery("#WDI_user_name option:selected").val(),(r=wdi_controller.getUserObj(t))&&(this.instagram.user=r),s){case"user":break;case"hashtag":var d=(d=e.substr(1,e.length)).replace(" ",""),l=jQuery("input[name='wdi_feed_settings[hashtag_top_recent]']:checked").val();this.instagram.getTagRecentMedia(d,{success:function(e){jQuery("#wdi_add_user_ajax").removeAttr("disabled");var t=a.isValidResponse(e);t.valid&&a.hasData(e)?a.addHashtag(d,e):a.hasData(e)||"success"!=t.msg?alert(t.msg):1==i||confirm(wdi_messages.hashtag_no_data)?a.addHashtag(d,e):jQuery("#wdi_add_user_ajax_input").val("")}},null,l)}},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);var t=jQuery("#wdi_add_user_ajax_input").val().trim().toLowerCase();return!1===wdi_controller.makeInstagramUserRequest(t)&&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){var t=("; "+document.cookie).split("; "+e+"=");if(2==t.length)return t.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,r=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(r),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 a=jQuery("#WDI_feed_users").val();if(this.isJsonString(a)){a=JSON.parse(a);for(var s=0;s<a.length;s++){"#"!==a[s].username.charAt(0)&&a.splice(s,1)}}else a=[];var n={id:"#"+e,username:"#"+e,profile_picture:i,tag_id:t.tag_id};a.push(n),this.feed_users=a,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,t=JSON.stringify(e);jQuery("#wdi_conditional_filters_textarea").val(t)},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").text():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(){}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()}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(),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>"):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})}),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={};"cancel"==e&&(window.location=window.location.href),t=jQuery("#WDI_user_name option:selected").data("type"),s=jQuery("#WDI_user_name option:selected").val();var s=wdi_controller.getUserObj(s);if(!s)return alert(wdi_messages.user_field_required),!1;if(i={id:s.user_id,username:s.user_name},wdi_controller.checkIfUserNotSaved(e),0==wdi_controller.waitingAjaxRequestEnd.button){if(a=jQuery("#WDI_feed_users").val(),this.isJsonString(a)){for(var n in a=JSON.parse(a))"#"===a[n].username.charAt(0)&&r.push(a[n]);r.push(i)}else r.push(i);jQuery("#WDI_feed_users").val(this.stringifyUserData(r)),jQuery("#wdi_feed_thumb").val(""),"business"==t&&jQuery("#wdi_feed_thumb").val(s.profile_picture_url),"apply_changes"!=e&&"save_feed"!=e||(s=jQuery("#wdi_add_or_edit").val(),jQuery("#wdi_current_id").val(s)),jQuery("#task").attr("value",e),jQuery("#wdi_save_feed").submit()}},wdi_controller.makeInstagramUserRequest=function(e,i){var r=this,t=this.getInputType(e),a="hashtag"===t;if(""==e)return alert(wdi_messages.please_write_hashtag),!1;if(""!=e&&!a)return alert(wdi_messages.invalid_hashtag),!1;if(r.checkForDuplicateUser(e))return alert(e+" "+wdi_messages.already_added),!1;switch(a=jQuery("#WDI_user_name option:selected").val(),(a=wdi_controller.getUserObj(a))&&(this.instagram.user=a),t){case"user":break;case"hashtag":var s=(s=e.substr(1,e.length)).replace(" ",""),n=jQuery("input[name='wdi_feed_settings[hashtag_top_recent]']:checked").val();this.instagram.getTagRecentMedia(s,{success:function(e){jQuery("#wdi_add_user_ajax").removeAttr("disabled");var t=r.isValidResponse(e);t.valid&&r.hasData(e)?r.addHashtag(s,e):r.hasData(e)||"success"!=t.msg?alert(t.msg):1!=i?(confirm(wdi_messages.hashtag_no_data),jQuery("#wdi_add_user_ajax_input").val("")):r.addHashtag(s,e)}},null,n)}},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};
|
js/wdi_frontend.js
CHANGED
@@ -105,6 +105,7 @@ wdi_front.globalInit = function () {
|
|
105 |
if (typeof wdi_ajax.ajax_response != "undefined") {
|
106 |
var init_feed_counter = wdi_feed_counter_init.wdi_feed_counter_init;
|
107 |
}
|
|
|
108 |
for (var i = init_feed_counter; i <= num; i++) {
|
109 |
|
110 |
if(jQuery('#wdi_feed_' + i).length === 0) { //conflict with Yoast SEO, Page Builder by SiteOrigin
|
@@ -141,6 +142,7 @@ wdi_front.globalInit = function () {
|
|
141 |
currentFeed.imageIndex = 0; //index for image indexes
|
142 |
currentFeed.resIndex = 0; //responsive indexes used for pagination
|
143 |
currentFeed.currentPage = 1; //pagination page number
|
|
|
144 |
currentFeed.userSortFlags = []; //array for descripbing user based filter options
|
145 |
currentFeed.customFilterChanged = false; //flag to notice filter change, onclick on username
|
146 |
|
@@ -606,11 +608,12 @@ wdi_front.displayFeed = function (currentFeed, load_more_number) {
|
|
606 |
//recursively calling load more to get photos
|
607 |
var dataLength = wdi_front.getDataLength(currentFeed);
|
608 |
|
609 |
-
|
610 |
-
|
|
|
611 |
wdi_front.loadMore('', currentFeed);
|
612 |
-
|
613 |
} else {
|
|
|
614 |
wdi_front.allImagesLoaded(currentFeed);
|
615 |
}
|
616 |
|
@@ -748,13 +751,17 @@ wdi_front.masonryDisplayFeedItems = function (data, currentFeed)
|
|
748 |
|
749 |
currentFeed.displayedData.push(data[i]);
|
750 |
/*carousel feature*/
|
|
|
|
|
|
|
|
|
751 |
if (data[i]['type'] == 'image') {
|
752 |
-
var photoTemplate = wdi_front.getPhotoTemplate(currentFeed);
|
753 |
} else if(data[i].hasOwnProperty('videos') || data[i]['type'] == 'video') {
|
754 |
-
var photoTemplate = wdi_front.getVideoTemplate(currentFeed);
|
755 |
}
|
756 |
else{
|
757 |
-
var photoTemplate = wdi_front.getSliderTemplate(currentFeed);
|
758 |
}
|
759 |
|
760 |
var rawItem = data[i];
|
@@ -944,14 +951,17 @@ wdi_front.displayFeedItems = function (data, currentFeed) {
|
|
944 |
continue;
|
945 |
}
|
946 |
}
|
947 |
-
|
|
|
|
|
|
|
948 |
if (data[i]['type'] == 'image') {
|
949 |
-
var photoTemplate = wdi_front.getPhotoTemplate(currentFeed);
|
950 |
} else if(data[i].hasOwnProperty('videos')) {
|
951 |
-
var photoTemplate = wdi_front.getVideoTemplate(currentFeed);
|
952 |
}
|
953 |
else{
|
954 |
-
var photoTemplate = wdi_front.getSliderTemplate(currentFeed);
|
955 |
}
|
956 |
|
957 |
var rawItem = data[i];
|
@@ -1397,7 +1407,7 @@ wdi_front.setPage = function (currentFeed)
|
|
1397 |
/*
|
1398 |
* Template for all feed items which have type=image
|
1399 |
*/
|
1400 |
-
wdi_front.getPhotoTemplate = function (currentFeed)
|
1401 |
{
|
1402 |
var page = wdi_front.setPage(currentFeed);
|
1403 |
var customClass = '';
|
@@ -1486,12 +1496,13 @@ wdi_front.getPhotoTemplate = function (currentFeed)
|
|
1486 |
'</div>' +
|
1487 |
'</div>' +
|
1488 |
'</div>';
|
|
|
1489 |
if (currentFeed['feed_row']['show_likes'] === '1' || currentFeed['feed_row']['show_comments'] === '1' || currentFeed['feed_row']['show_description'] === '1') {
|
1490 |
source += '<div class="wdi_photo_meta">';
|
1491 |
-
if (currentFeed['feed_row'][
|
1492 |
source += '<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>';
|
1493 |
}
|
1494 |
-
if (currentFeed['feed_row'][
|
1495 |
source += '<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>';
|
1496 |
}
|
1497 |
source += '<div class="wdi_clear"></div>';
|
@@ -1512,7 +1523,7 @@ wdi_front.getPhotoTemplate = function (currentFeed)
|
|
1512 |
/*
|
1513 |
* Template for all feed items which have type=image
|
1514 |
*/
|
1515 |
-
wdi_front.getSliderTemplate = function (currentFeed)
|
1516 |
{
|
1517 |
var page = wdi_front.setPage(currentFeed);
|
1518 |
var customClass = '';
|
@@ -1603,12 +1614,13 @@ wdi_front.getSliderTemplate = function (currentFeed)
|
|
1603 |
'</div>' +
|
1604 |
'</div>' +
|
1605 |
'</div>';
|
|
|
1606 |
if (currentFeed['feed_row']['show_likes'] === '1' || currentFeed['feed_row']['show_comments'] === '1' || currentFeed['feed_row']['show_description'] === '1') {
|
1607 |
source += '<div class="wdi_photo_meta">';
|
1608 |
-
if (currentFeed['feed_row'][
|
1609 |
source += '<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>';
|
1610 |
}
|
1611 |
-
if (currentFeed['feed_row'][
|
1612 |
source += '<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>';
|
1613 |
}
|
1614 |
source += '<div class="wdi_clear"></div>';
|
@@ -1639,7 +1651,7 @@ wdi_front.replaceToVideo = function (url, index, feed_counter)
|
|
1639 |
/*
|
1640 |
* Template for all feed items which have type=video
|
1641 |
*/
|
1642 |
-
wdi_front.getVideoTemplate = function (currentFeed)
|
1643 |
{
|
1644 |
var page = wdi_front.setPage(currentFeed);
|
1645 |
var customClass = '';
|
@@ -1730,12 +1742,13 @@ wdi_front.getVideoTemplate = function (currentFeed)
|
|
1730 |
'</div>' +
|
1731 |
'</div>' +
|
1732 |
'</div>';
|
|
|
1733 |
if (currentFeed['feed_row']['show_likes'] === '1' || currentFeed['feed_row']['show_comments'] === '1' || currentFeed['feed_row']['show_description'] === '1') {
|
1734 |
source += '<div class="wdi_photo_meta">';
|
1735 |
-
if (currentFeed['feed_row'][
|
1736 |
source += '<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>';
|
1737 |
}
|
1738 |
-
if (currentFeed['feed_row'][
|
1739 |
source += '<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>';
|
1740 |
}
|
1741 |
source += '<div class="wdi_clear"></div>';
|
@@ -1799,8 +1812,7 @@ wdi_front.bindEvents = function (currentFeed)
|
|
1799 |
}
|
1800 |
}
|
1801 |
|
1802 |
-
wdi_front.infiniteScroll = function (currentFeed)
|
1803 |
-
{
|
1804 |
if ((jQuery(window).scrollTop() + jQuery(window).height() - 100) >= jQuery('#wdi_feed_' + currentFeed.feed_row['wdi_feed_counter'] + ' #wdi_infinite_scroll').offset().top) {
|
1805 |
if (currentFeed.infiniteScrollFlag === false && currentFeed.stopInfiniteScrollFlag == false) {
|
1806 |
currentFeed.infiniteScrollFlag = true;
|
@@ -2081,23 +2093,28 @@ wdi_front.loadMoreRequest = function (user, next_url, currentFeed, button) {
|
|
2081 |
currentFeed.temproraryUsersData[i] = currentFeed.usersData[i];
|
2082 |
}
|
2083 |
currentFeed['usersData'][i] = response;
|
2084 |
-
currentFeed['dataStorageRaw'][i]
|
|
|
|
|
|
|
|
|
2085 |
currentFeed.loadMoreDataCount--;
|
2086 |
}
|
2087 |
}
|
2088 |
wdi_front.checkForLoadMoreDone(currentFeed, button);
|
2089 |
};
|
2090 |
if (user.username[0] !== "#") {
|
2091 |
-
currentFeed.instagram.
|
|
|
2092 |
success: success_function
|
2093 |
-
});
|
2094 |
}
|
2095 |
else {
|
2096 |
currentFeed.instagram.getTagRecentMedia(user.username, {
|
2097 |
-
|
2098 |
},
|
2099 |
-
|
2100 |
-
|
2101 |
)
|
2102 |
}
|
2103 |
}
|
@@ -2167,23 +2184,22 @@ wdi_front.checkForLoadMoreDone = function (currentFeed, button)
|
|
2167 |
|
2168 |
wdi_front.allDataHasFinished = function (currentFeed)
|
2169 |
{
|
2170 |
-
|
2171 |
-
|
2172 |
var c = 0;
|
2173 |
for (var j = 0; j < currentFeed.dataStorageRaw.length; j++) {
|
2174 |
-
if (currentFeed.
|
2175 |
c++;
|
|
|
2176 |
}
|
2177 |
}
|
2178 |
-
|
2179 |
-
|
|
|
|
|
|
|
2180 |
}
|
2181 |
|
2182 |
|
2183 |
-
wdi_front.mergeData = function (array1, array2)
|
2184 |
-
{
|
2185 |
-
|
2186 |
-
|
2187 |
for (var i = 0; i < array2.length; i++) {
|
2188 |
if (typeof array1[i] != 'undefined') {
|
2189 |
if (array2[i]['finished'] == 'finished') {
|
@@ -2276,8 +2292,6 @@ wdi_front.allImagesLoaded = function (currentFeed) {
|
|
2276 |
if (currentFeed.feed_row.feed_display_view == 'infinite_scroll') {
|
2277 |
jQuery('#wdi_feed_' + currentFeed.feed_row['wdi_feed_counter'] + ' .wdi_ajax_loading').addClass('wdi_hidden');
|
2278 |
}
|
2279 |
-
//custom event fired for user based custom js
|
2280 |
-
feed_container.trigger('wdi_feed_loaded');
|
2281 |
}
|
2282 |
|
2283 |
//shows different parts of the feed based user choice
|
@@ -2724,10 +2738,10 @@ wdi_front.parseLighboxData = function (currentFeed, filterFlag) {
|
|
2724 |
'number': 0,
|
2725 |
'rate': '',
|
2726 |
'rate_count': '0',
|
2727 |
-
'username': data[i]['user']['username'],
|
2728 |
-
'profile_picture': data[i]['user']['profile_picture'],
|
2729 |
'thumb_url': thumb_url,
|
2730 |
-
'comments_data': data[i]['comments']['data'],
|
2731 |
'images': data[i]['images'],
|
2732 |
'carousel_media': (typeof data[i]['carousel_media'] !== "undefined") ? data[i]['carousel_media'] : null
|
2733 |
}
|
@@ -2738,10 +2752,10 @@ wdi_front.parseLighboxData = function (currentFeed, filterFlag) {
|
|
2738 |
|
2739 |
wdi_front.convertUnixDate = function (date)
|
2740 |
{
|
2741 |
-
var utcSeconds =
|
2742 |
var newDate = new Date(0);
|
2743 |
newDate.setUTCSeconds(utcSeconds);
|
2744 |
-
var str = newDate.getFullYear() + '-' + newDate.getMonth() + '-' + newDate.getDate();
|
2745 |
str += ' ' + newDate.getHours() + ':' + newDate.getMinutes();
|
2746 |
return str;
|
2747 |
}
|
@@ -2759,8 +2773,7 @@ wdi_front.getDescription = function (desc)
|
|
2759 |
* use this data for lightbox
|
2760 |
* **/
|
2761 |
|
2762 |
-
wdi_front.getFileName = function (data)
|
2763 |
-
{
|
2764 |
if( typeof data !== 'undefined' ) {
|
2765 |
var link = data['link'];
|
2766 |
var type = data['type'];
|
@@ -2769,8 +2782,11 @@ wdi_front.getFileName = function (data)
|
|
2769 |
return data['videos']['standard_resolution']['url'];
|
2770 |
}
|
2771 |
else {
|
2772 |
-
|
2773 |
-
|
|
|
|
|
|
|
2774 |
}
|
2775 |
}
|
2776 |
}
|
@@ -3133,7 +3149,6 @@ WDIFeed.prototype.storeRawData = function (objects, variable)
|
|
3133 |
|
3134 |
for (var j = 0; j < _this.usersData.length; j++) {
|
3135 |
if (_this.usersData[j]['user_id'] == this.userId) {
|
3136 |
-
_this.usersData[j].finished = "finished";
|
3137 |
this.usersDataFinished = true;
|
3138 |
break;
|
3139 |
}
|
105 |
if (typeof wdi_ajax.ajax_response != "undefined") {
|
106 |
var init_feed_counter = wdi_feed_counter_init.wdi_feed_counter_init;
|
107 |
}
|
108 |
+
|
109 |
for (var i = init_feed_counter; i <= num; i++) {
|
110 |
|
111 |
if(jQuery('#wdi_feed_' + i).length === 0) { //conflict with Yoast SEO, Page Builder by SiteOrigin
|
142 |
currentFeed.imageIndex = 0; //index for image indexes
|
143 |
currentFeed.resIndex = 0; //responsive indexes used for pagination
|
144 |
currentFeed.currentPage = 1; //pagination page number
|
145 |
+
currentFeed.currentPageLoadMore = 0; //pagination page number
|
146 |
currentFeed.userSortFlags = []; //array for descripbing user based filter options
|
147 |
currentFeed.customFilterChanged = false; //flag to notice filter change, onclick on username
|
148 |
|
608 |
//recursively calling load more to get photos
|
609 |
var dataLength = wdi_front.getDataLength(currentFeed);
|
610 |
|
611 |
+
// Counting how many images had to load during the pagination according to options
|
612 |
+
var mustLoadedCount = parseInt(currentFeed.feed_row.number_of_photos)+parseInt(currentFeed.feed_row.load_more_number*currentFeed.currentPageLoadMore);
|
613 |
+
if (dataLength < mustLoadedCount && !frontendCustomFilterClicked && currentFeed.instagramRequestCounter <= currentFeed.maxConditionalFiltersRequestCount && !wdi_front.allDataHasFinished(currentFeed)) {
|
614 |
wdi_front.loadMore('', currentFeed);
|
|
|
615 |
} else {
|
616 |
+
currentFeed.currentPageLoadMore++;
|
617 |
wdi_front.allImagesLoaded(currentFeed);
|
618 |
}
|
619 |
|
751 |
|
752 |
currentFeed.displayedData.push(data[i]);
|
753 |
/*carousel feature*/
|
754 |
+
var wdi_media_type = "";
|
755 |
+
if(typeof data[i]["wdi_hashtag"] != "undefined"){
|
756 |
+
wdi_media_type = data[i]["wdi_hashtag"];
|
757 |
+
}
|
758 |
if (data[i]['type'] == 'image') {
|
759 |
+
var photoTemplate = wdi_front.getPhotoTemplate(currentFeed, wdi_media_type);
|
760 |
} else if(data[i].hasOwnProperty('videos') || data[i]['type'] == 'video') {
|
761 |
+
var photoTemplate = wdi_front.getVideoTemplate(currentFeed, wdi_media_type);
|
762 |
}
|
763 |
else{
|
764 |
+
var photoTemplate = wdi_front.getSliderTemplate(currentFeed, wdi_media_type);
|
765 |
}
|
766 |
|
767 |
var rawItem = data[i];
|
951 |
continue;
|
952 |
}
|
953 |
}
|
954 |
+
var wdi_media_type = "";
|
955 |
+
if(typeof data[i]["wdi_hashtag"] != "undefined"){
|
956 |
+
wdi_media_type = data[i]["wdi_hashtag"];
|
957 |
+
}
|
958 |
if (data[i]['type'] == 'image') {
|
959 |
+
var photoTemplate = wdi_front.getPhotoTemplate(currentFeed, wdi_media_type);
|
960 |
} else if(data[i].hasOwnProperty('videos')) {
|
961 |
+
var photoTemplate = wdi_front.getVideoTemplate(currentFeed, wdi_media_type);
|
962 |
}
|
963 |
else{
|
964 |
+
var photoTemplate = wdi_front.getSliderTemplate(currentFeed, wdi_media_type);
|
965 |
}
|
966 |
|
967 |
var rawItem = data[i];
|
1407 |
/*
|
1408 |
* Template for all feed items which have type=image
|
1409 |
*/
|
1410 |
+
wdi_front.getPhotoTemplate = function (currentFeed , type)
|
1411 |
{
|
1412 |
var page = wdi_front.setPage(currentFeed);
|
1413 |
var customClass = '';
|
1496 |
'</div>' +
|
1497 |
'</div>' +
|
1498 |
'</div>';
|
1499 |
+
var imageIndex = currentFeed['imageIndex'];
|
1500 |
if (currentFeed['feed_row']['show_likes'] === '1' || currentFeed['feed_row']['show_comments'] === '1' || currentFeed['feed_row']['show_description'] === '1') {
|
1501 |
source += '<div class="wdi_photo_meta">';
|
1502 |
+
if (currentFeed['feed_row']['show_likes'] === '1' && currentFeed['dataStorageList'][imageIndex]['likes']['count'] != 0) {
|
1503 |
source += '<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>';
|
1504 |
}
|
1505 |
+
if (currentFeed['feed_row']['show_comments'] === '1' && currentFeed['dataStorageList'][imageIndex]['comments']['count'] != 0) {
|
1506 |
source += '<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>';
|
1507 |
}
|
1508 |
source += '<div class="wdi_clear"></div>';
|
1523 |
/*
|
1524 |
* Template for all feed items which have type=image
|
1525 |
*/
|
1526 |
+
wdi_front.getSliderTemplate = function (currentFeed, type)
|
1527 |
{
|
1528 |
var page = wdi_front.setPage(currentFeed);
|
1529 |
var customClass = '';
|
1614 |
'</div>' +
|
1615 |
'</div>' +
|
1616 |
'</div>';
|
1617 |
+
var imageIndex = currentFeed['imageIndex'];
|
1618 |
if (currentFeed['feed_row']['show_likes'] === '1' || currentFeed['feed_row']['show_comments'] === '1' || currentFeed['feed_row']['show_description'] === '1') {
|
1619 |
source += '<div class="wdi_photo_meta">';
|
1620 |
+
if (currentFeed['feed_row']['show_likes'] === '1' && currentFeed['dataStorageList'][imageIndex]['likes']['count'] != 0) {
|
1621 |
source += '<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>';
|
1622 |
}
|
1623 |
+
if (currentFeed['feed_row']['show_comments'] === '1' && currentFeed['dataStorageList'][imageIndex]['comments']['count'] != 0) {
|
1624 |
source += '<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>';
|
1625 |
}
|
1626 |
source += '<div class="wdi_clear"></div>';
|
1651 |
/*
|
1652 |
* Template for all feed items which have type=video
|
1653 |
*/
|
1654 |
+
wdi_front.getVideoTemplate = function (currentFeed, type)
|
1655 |
{
|
1656 |
var page = wdi_front.setPage(currentFeed);
|
1657 |
var customClass = '';
|
1742 |
'</div>' +
|
1743 |
'</div>' +
|
1744 |
'</div>';
|
1745 |
+
var imageIndex = currentFeed['imageIndex'];
|
1746 |
if (currentFeed['feed_row']['show_likes'] === '1' || currentFeed['feed_row']['show_comments'] === '1' || currentFeed['feed_row']['show_description'] === '1') {
|
1747 |
source += '<div class="wdi_photo_meta">';
|
1748 |
+
if (currentFeed['feed_row']['show_likes'] === '1' && currentFeed['dataStorageList'][imageIndex]['likes']['count'] != 0) {
|
1749 |
source += '<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>';
|
1750 |
}
|
1751 |
+
if (currentFeed['feed_row']['show_comments'] === '1' && currentFeed['dataStorageList'][imageIndex]['comments']['count'] != 0) {
|
1752 |
source += '<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>';
|
1753 |
}
|
1754 |
source += '<div class="wdi_clear"></div>';
|
1812 |
}
|
1813 |
}
|
1814 |
|
1815 |
+
wdi_front.infiniteScroll = function (currentFeed) {
|
|
|
1816 |
if ((jQuery(window).scrollTop() + jQuery(window).height() - 100) >= jQuery('#wdi_feed_' + currentFeed.feed_row['wdi_feed_counter'] + ' #wdi_infinite_scroll').offset().top) {
|
1817 |
if (currentFeed.infiniteScrollFlag === false && currentFeed.stopInfiniteScrollFlag == false) {
|
1818 |
currentFeed.infiniteScrollFlag = true;
|
2093 |
currentFeed.temproraryUsersData[i] = currentFeed.usersData[i];
|
2094 |
}
|
2095 |
currentFeed['usersData'][i] = response;
|
2096 |
+
if ( typeof currentFeed['dataStorageRaw'][i] === 'undefined') {
|
2097 |
+
currentFeed['dataStorageRaw'][i] = {data:response['data']};
|
2098 |
+
} else {
|
2099 |
+
currentFeed['dataStorageRaw'][i]['data'] = currentFeed['dataStorageRaw'][i]['data'].concat(response['data']);
|
2100 |
+
}
|
2101 |
currentFeed.loadMoreDataCount--;
|
2102 |
}
|
2103 |
}
|
2104 |
wdi_front.checkForLoadMoreDone(currentFeed, button);
|
2105 |
};
|
2106 |
if (user.username[0] !== "#") {
|
2107 |
+
currentFeed.instagram.getUserMedia({
|
2108 |
+
user_id: user.username[0].id,
|
2109 |
success: success_function
|
2110 |
+
}, next_url);
|
2111 |
}
|
2112 |
else {
|
2113 |
currentFeed.instagram.getTagRecentMedia(user.username, {
|
2114 |
+
success: success_function
|
2115 |
},
|
2116 |
+
next_url,
|
2117 |
+
currentFeed.feed_row.hashtag_top_recent
|
2118 |
)
|
2119 |
}
|
2120 |
}
|
2184 |
|
2185 |
wdi_front.allDataHasFinished = function (currentFeed)
|
2186 |
{
|
|
|
|
|
2187 |
var c = 0;
|
2188 |
for (var j = 0; j < currentFeed.dataStorageRaw.length; j++) {
|
2189 |
+
if (currentFeed.usersData[j].pagination.next_url == '') {
|
2190 |
c++;
|
2191 |
+
currentFeed.usersData[j].finished = "finished";
|
2192 |
}
|
2193 |
}
|
2194 |
+
if (c == currentFeed.dataStorageRaw.length) {
|
2195 |
+
jQuery('#wdi_feed_' + currentFeed['feed_row']['wdi_feed_counter'] + ' .wdi_load_more').remove();
|
2196 |
+
return true;
|
2197 |
+
}
|
2198 |
+
return false;
|
2199 |
}
|
2200 |
|
2201 |
|
2202 |
+
wdi_front.mergeData = function (array1, array2) {
|
|
|
|
|
|
|
2203 |
for (var i = 0; i < array2.length; i++) {
|
2204 |
if (typeof array1[i] != 'undefined') {
|
2205 |
if (array2[i]['finished'] == 'finished') {
|
2292 |
if (currentFeed.feed_row.feed_display_view == 'infinite_scroll') {
|
2293 |
jQuery('#wdi_feed_' + currentFeed.feed_row['wdi_feed_counter'] + ' .wdi_ajax_loading').addClass('wdi_hidden');
|
2294 |
}
|
|
|
|
|
2295 |
}
|
2296 |
|
2297 |
//shows different parts of the feed based user choice
|
2738 |
'number': 0,
|
2739 |
'rate': '',
|
2740 |
'rate_count': '0',
|
2741 |
+
'username': (typeof data[i]['user'] !== 'undefined') ? data[i]['user']['username'] : '',
|
2742 |
+
'profile_picture': (typeof data[i]['user'] !== 'undefined') ? data[i]['user']['profile_picture'] : '',
|
2743 |
'thumb_url': thumb_url,
|
2744 |
+
'comments_data': (typeof data[i]['comments'] !== 'undefined') ? data[i]['comments']['data'] : '',
|
2745 |
'images': data[i]['images'],
|
2746 |
'carousel_media': (typeof data[i]['carousel_media'] !== "undefined") ? data[i]['carousel_media'] : null
|
2747 |
}
|
2752 |
|
2753 |
wdi_front.convertUnixDate = function (date)
|
2754 |
{
|
2755 |
+
var utcSeconds = new Date(date).getTime() / 1000;
|
2756 |
var newDate = new Date(0);
|
2757 |
newDate.setUTCSeconds(utcSeconds);
|
2758 |
+
var str = newDate.getFullYear() + '-' + (newDate.getMonth()+1) + '-' + newDate.getDate();
|
2759 |
str += ' ' + newDate.getHours() + ':' + newDate.getMinutes();
|
2760 |
return str;
|
2761 |
}
|
2773 |
* use this data for lightbox
|
2774 |
* **/
|
2775 |
|
2776 |
+
wdi_front.getFileName = function (data) {
|
|
|
2777 |
if( typeof data !== 'undefined' ) {
|
2778 |
var link = data['link'];
|
2779 |
var type = data['type'];
|
2782 |
return data['videos']['standard_resolution']['url'];
|
2783 |
}
|
2784 |
else {
|
2785 |
+
if ( typeof link !== 'undefined' ) {
|
2786 |
+
var linkFragments = link.split('/');
|
2787 |
+
return linkFragments[linkFragments.length - 2];
|
2788 |
+
}
|
2789 |
+
return '';
|
2790 |
}
|
2791 |
}
|
2792 |
}
|
3149 |
|
3150 |
for (var j = 0; j < _this.usersData.length; j++) {
|
3151 |
if (_this.usersData[j]['user_id'] == this.userId) {
|
|
|
3152 |
this.usersDataFinished = true;
|
3153 |
break;
|
3154 |
}
|
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(){return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click"}),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,r){var t,d,a,o;r=jQuery("#wdi_feed_"+r.feed_row.wdi_feed_counter),400===i.meta.code&&"APINotAllowedError"===i.meta.error_type&&(void 0!==i.wdi_current_feed_name&&(t=i.wdi_current_feed_name,void 0===(d=r.find(".wdi_private_feed_names")).attr("wdi_first_private_user")?d.attr("wdi_first_private_user",1):t=", "+t,d.append(t),r.find(".wdi_private_feed_error").removeClass("wdi_hidden")),r.find(".wdi_spinner").remove()),void 0!==r&&"APINotAllowedError"!=i.meta.error_type&&(r.find(".wdi_spinner").remove(),wdi_error_show=!0,a=r.find(".wdi_js_error"),o=r.find(".wdi_token_error"),0!=i&&null!=typeof i.meta&&"OAuthAccessTokenException"===i.meta.error_type?(o.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){}})):(a.removeClass("wdi_js_error"),a.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 r,t=i;t<=e;t++){0!==jQuery("#wdi_feed_"+t).length&&((r=new WDIFeed(window["wdi_feed_"+t])).instagram=new WDIInstagram,r.instagram.filterArguments={feed:r},r.instagram.addToken(r.feed_row.access_token),wdi_front.access_token=r.feed_row.access_token,r.dataStorageRaw=[],r.dataStorage=[],r.dataStorageList=[],r.allResponseLength=0,r.currentResponseLength=0,r.temproraryUsersData=[],r.removedUsers=0,r.nowLoadingImages=!0,r.imageIndex=0,r.resIndex=0,r.currentPage=1,r.userSortFlags=[],r.customFilterChanged=!1,r.maxConditionalFiltersRequestCount=10,r.instagramRequestCounter=0,r.mediaRequestsDone=!1,r.conditionalFilterBuffer=[],r.stopInfiniteScrollFlag=!1,"masonry"==r.feed_row.feed_type&&(r.displayedData=[]),"pagination"==r.feed_row.feed_display_view?(r.feed_row.resort_after_load_more=0,"image_browser"!=r.feed_row.feed_type?(r.feed_row.load_more_number=parseInt(r.feed_row.pagination_per_page_number),r.feed_row.number_of_photos=(1+parseInt(r.feed_row.pagination_preload_number))*r.feed_row.load_more_number):(r.feed_row.number_of_photos=1+parseInt(r.feed_row.image_browser_preload_number),r.feed_row.load_more_number=parseInt(r.feed_row.image_browser_load_number)),r.freeSpaces=(Math.floor(r.feed_row.pagination_per_page_number/r.feed_row.number_of_columns)+1)*r.feed_row.number_of_columns-r.feed_row.pagination_per_page_number):r.freeSpaces=0,r.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(r),"masonry"==r.feed_row.feed_type&&jQuery(window).trigger("resize"),wdi_front.bindEvents(r),window["wdi_feed_"+t]=r,wdi_front.init(r))}},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=[],r=[],t=[];void 0!==window.wdi_all_tags&&(i=window.wdi_all_tags);for(var d=0;d<e.feed_users.length;d++)"#"===e.feed_users[d].username[0]&&void 0!==e.feed_users[d].tag_id?(i[e.feed_users[d].tag_id]=e.feed_users[d],t[d]=e.feed_users[d]):r[0]=e.feed_users[d];window.wdi_all_tags=i,e.feed_users=void 0===t||wdi_front.isEmpty(t)?r:t;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 r=jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");r.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>'),wdi_responsive.columnControl(e,1);var t=r.attr("wdi-res").split("wdi_col_");if(r.find("#wdi_feed_item_example").remove(),2!==t.length)return i;var d=parseInt(t[1]);if(d<=0)return i;var a=r.width()/d-10,o=i;return a<=150?(o.image="thumbnail",o.video="low_bandwidth"):150<a&&a<=320?(o.image="low_resolution",o.video="low_resolution"):(o.image="standard_resolution",o.video="standard_resolution"),o},wdi_front.isJsonString=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},wdi_front.instagramRequest=function(i,r){var t=this,d=r.feed_users;"string"==typeof d[i]&&"self"===d[i]?r.instagram.getRecentLikedMedia({success:function(e){void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,r),r.mediaRequestsDone=!0,0!=(e=t.checkMediaResponse(e,r))&&t.saveSelfUserData(e,r)}}):"hashtag"==this.getInputType(d[i].username)?r.instagram.getTagRecentMedia(this.stripHashtag(d[i].username),{success:function(e){void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,r),r.mediaRequestsDone=!0,0!=(e=t.checkMediaResponse(e,r))&&t.saveUserData(e,r.feed_users[i],r)}},null,r.feed_row.hashtag_top_recent):"user"==this.getInputType(d[i].username)&&r.instagram.getUserMedia({user_id:d[i].id,success:function(e){void 0!==e.meta&&void 0!==e.meta.error_type&&(e.wdi_current_feed_name=d[i].username,wdi_front.show_alert(!1,e,r)),r.mediaRequestsDone=!0,0!=(e=t.checkMediaResponse(e,r))&&t.saveUserData(e,r.feed_users[i],r)}})},wdi_front.isHashtag=function(e){return"#"===e[0]},wdi_front.saveUserData=function(e,i,r){var t;e.user_id=i.id,e.username=i.username,"#"===e.user_id[0]&&(e.data=wdi_front.appendRequestHashtag(e.data,e.user_id)),r.usersData.push(e),r.currentResponseLength=wdi_front.getArrayContentLength(r.usersData,"data"),r.allResponseLength+=r.currentResponseLength,r.dataCount==r.usersData.length&&(r.currentResponseLength<r.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(r)?wdi_front.loadMore("initial-keep",r):(wdi_front.displayFeed(r),wdi_front.applyFilters(r),wdi_front.activeUsersCount(r)||"load_more_btn"==r.feed_row.feed_display_view&&((t=jQuery("#wdi_feed_"+r.feed_row.wdi_feed_counter)).find(".wdi_load_more").addClass("wdi_hidden"),t.find(".wdi_spinner").addClass("wdi_hidden"))))},wdi_front.saveSelfUserData=function(e,i){var r;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&&((r=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter)).find(".wdi_load_more").addClass("wdi_hidden"),r.find(".wdi_spinner").addClass("wdi_hidden"))))},wdi_front.userHasNoPhoto=function(e,i){var r=0,t=e.usersData;void 0!==i&&(t=i);for(var d=0;d<t.length;d++)void 0===t[d].pagination&&(t[d].pagination=[]),"liked"===e.feed_row.liked_feed?void 0===t[d].pagination.next_max_like_id&&r++:void 0===t[d].pagination.next_max_id&&r++;return r==t.length?1:0},wdi_front.appendRequestHashtag=function(e,i){for(var r=0;r<e.length;r++)e[r].wdi_hashtag=i;return e},wdi_front.displayFeed=function(e,i){0==e.customFilterChanged&&(r=wdi_front.feedSort(e,i));var r,t=e.customFilterChanged;1==e.customFilterChanged&&(r=e.customFilteredData,e.parsedData=wdi_front.parseLighboxData(e,!0)),"1"!=e.feed_row.resort_after_load_more?0==e.customFilterChanged&&(e.dataStorageList=e.dataStorageList.concat(r)):0==e.customFilterChanged&&(e.dataStorageList=r),"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),wdi_front.getDataLength(e)<e.photoCounter&&!t&&e.instagramRequestCounter<=e.maxConditionalFiltersRequestCount&&!wdi_front.allDataHasFinished(e)?wdi_front.loadMore("",e):wdi_front.allImagesLoaded(e),e.instagramRequestCounter>e.maxConditionalFiltersRequestCount&&(wdi_front.allImagesLoaded(e),0==r.length&&(e.stopInfiniteScrollFlag=!0)),"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"),e.instagramRequestCounter=0,e.conditionalFilterBuffer=[],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")){if("liked"==i.feed_row.liked_feed)return;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.masonryDisplayFeedItems=function(e,i){var r=[],t=[];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?r.push(0):r.push(jQuery(this).height()),t.push(jQuery(this))}),1==i.customFilterChanged&&(i.customFilterChanged=!1);for(var d,a,o,n,s,_=0;_<e.length;_++){"object"==typeof e[_].videos&&null==e[_].videos.standard_resolution||(i.displayedData.push(e[_]),d="image"==e[_].type?wdi_front.getPhotoTemplate(i):e[_].hasOwnProperty("videos")||"video"==e[_].type?wdi_front.getVideoTemplate(i):wdi_front.getSliderTemplate(i),a=e[_],o=d(wdi_front.createObject(a,i)),n=wdi_front.array_min(r),s=wdi_front.getImageResolution(e[_]),t[n.index].html(t[n.index].html()+o),r[n.index]+=t[n.index].width()*s,i.imageIndex++,"pagination"==i.feed_row.feed_display_view&&((_+1)%i.feed_row.pagination_per_page_number==0?i.resIndex+=i.freeSpaces+1:i.resIndex++))}i.wdi_loadedImages=0;var w=!1;i.wdi_load_count=_;var f=i.feed_row.wdi_feed_counter;jQuery("#wdi_feed_"+f+" img.wdi_img").on("load",function(){i.wdi_loadedImages++,l(),!1===w&&(wdi_responsive.columnControl(i,1),w=!0)});l(),1==i.paginatorNextFlag&&wdi_front.updatePagination(i,"next"),i.infiniteScrollFlag=!1}function l(){i.wdi_load_count===i.wdi_loadedImages&&0!=i.wdi_loadedImages&&(i.loadedImages=0,i.wdi_load_count=0,wdi_front.allImagesLoaded(i))}},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 r=0;if(void 0===i)for(var t=0;t<e.dataStorage.length;t++)r+=e.dataStorage[t].length;else for(t=0;t<i.length;t++)r+=i[t].length;return r},wdi_front.getArrayContentLength=function(e,i){for(var r=0,t=0;t<e.length;t++)"finished"!=e[t].finished&&void 0===e[t].error&&(r+=e[t][i].length);return r},wdi_front.displayFeedItems=function(e,i){if(0!=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length){var r=i.feed_row.wdi_feed_counter,t=jQuery("#wdi_feed_"+r+" .wdi_feed_wrapper");"1"===i.feed_row.resort_after_load_more&&(t.html(""),i.imageIndex=0),1==i.customFilterChanged&&(t.html(""),i.imageIndex=0,i.customFilterChanged=!1);var d;wdi_front.getImgCount(i),e.length;"pagination"==i.feed_row.feed_display_view&&(d=i.feed_row.load_more_number,"image_browser"==i.feed_row.feed_type&&(d=1),(jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+' [wdi_page="'+(i.currentPage-1)+'"]').length<d||0==e.length)&&(i.currentPage=--i.currentPage<=1?1:i.currentPage));for(var a,o,n,s=0;s<e.length;s++){if(void 0===e[s])return;"object"==typeof e[s].videos&&null==e[s].videos.standard_resolution||(a="image"==e[s].type?wdi_front.getPhotoTemplate(i):e[s].hasOwnProperty("videos")?wdi_front.getVideoTemplate(i):wdi_front.getSliderTemplate(i),o=e[s],n=a(wdi_front.createObject(o,i)),t.html(t.html()+n),i.imageIndex++,"pagination"==i.feed_row.feed_display_view&&((s+1)%i.feed_row.pagination_per_page_number==0?i.resIndex+=i.freeSpaces+1:i.resIndex++))}i.wdi_loadedImages=0;var _=!1;i.wdi_load_count=s;r=i.feed_row.wdi_feed_counter,t=jQuery("#wdi_feed_"+r+" img.wdi_img").on("load",function(){i.wdi_loadedImages++,i.wdi_load_count===i.wdi_loadedImages&&0!=i.wdi_loadedImages&&(i.loadedImages=0,i.wdi_load_count=0,wdi_front.allImagesLoaded(i)),!1===_&&(wdi_responsive.columnControl(i,1),_=!0)});1==i.paginatorNextFlag&&wdi_front.updatePagination(i,"next"),i.infiniteScrollFlag=!1}},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.sortingOperator=function(e,i){var r;switch(e){case"date":switch(i){case"asc":r=function(e,i){return e.created_time>i.created_time?1:-1};break;case"desc":r=function(e,i){return e.created_time>i.created_time?-1:1}}break;case"likes":switch(i){case"asc":r=function(e,i){return e.likes.count<i.likes.count?-1:1};break;case"desc":r=function(e,i){return e.likes.count<i.likes.count?1:-1}}break;case"comments":switch(i){case"asc":r=function(e,i){return e.comments.count<i.comments.count?-1:1};break;case"desc":r=function(e,i){return e.comments.count<i.comments.count?1:-1}}break;case"random":r=function(e,i){return.5<Math.random()?1:-1}}return r},wdi_front.feedSort=function(e,i){var r=e.feed_row.sort_images_by,t=e.feed_row.display_order;"1"===e.feed_row.resort_after_load_more?e.data=e.data.concat(wdi_front.smartPicker(e,i)):e.data=wdi_front.smartPicker(e,i);var d=wdi_front.sortingOperator(r,t);return e.data.sort(d),e.data},wdi_front.smartPicker=function(e,i){var r=[],t=0,d=[],a=Math.ceil(e.feed_row.number_of_photos/e.usersData.length),o=parseInt(e.feed_row.number_of_photos),n=0;""!=i&&void 0!==i&&null!=i&&(o=parseInt(i),a=Math.ceil(o/wdi_front.activeUsersCount(e)));e.storeRawData(e.usersData,"dataStorageRaw");for(var s,_=e.dataStorageRaw.sort(function(e,i){return e.length()>i.length()?1:-1}),w=e.usersData.sort(function(e,i){return e.data.length>i.data.length?1:-1}),f=0;f<w.length;f++){n+=a,_[f].length()<=n?(n-=_[f].length(),r.push(_[f].getData(_[f].length())),t+=r[r.length-1].length):(o<t+n&&(n=o-t),(!(s=[])===e.auto_trigger||s.length+wdi_front.getDataLength(e)+wdi_front.getDataLength(e,r)<e.feed_row.number_of_photos)&&(s=s.concat(_[f].getData(n))),n=0,t+=s.length,r.push(s))}for(f=0;f<r.length;f++)void 0===e.dataStorage[f]?e.dataStorage.push(r[f]):e.dataStorage[f]=e.dataStorage[f].concat(r[f]);for(e.parsedData=wdi_front.parseLighboxData(e),f=0;f<r.length;f++)d=d.concat(r[f]);return d},wdi_front.createObject=function(e,i){var r,t=null!=e.caption?e.caption.text:" ",d=wdi_url.plugin_url+"images/video_missing.png";"video"==e.type&&e.videos[i.feedVideoResolution]&&null!=e.videos[i.feedVideoResolution].url&&(d=e.hasOwnProperty("videos")?e.videos[i.feedVideoResolution].url:""),void 0===e.images[i.feedImageResolution]?r=wdi_url.plugin_url+"images/missing.png":"carousel"==e.type&&void 0===e.images[i.feedImageResolution].url?void 0!==e.carousel_media[0].images?r=e.carousel_media[0].images[i.feedImageResolution].url:void 0!==e.carousel_media[0].videos&&(r=wdi_url.plugin_url+"images/video_missing.png"):r=e.images[i.feedImageResolution].url;var a=i.imageIndex,o="square",n=e.images.standard_resolution.height,s=e.images.standard_resolution.width;s<n?o="portrait":n<s&&(o="landscape");var _=e.user.username;return""===_&&(_="no_user"),{id:e.id,caption:wdi_front.escape_tags(t),image_url:r,likes:e.likes.count,comments:e.comments.count,wdi_index:a,wdi_res_index:i.resIndex,wdi_media_user:_,link:e.link,video_url:d,wdi_username:_,wdi_shape:o}},wdi_front.setPage=function(e){var i=e.feed_row.feed_display_view,r=e.feed_row.feed_type;if("pagination"!=i)return"";var t,d=e.imageIndex;return t="image_browser"==r?1:Math.abs(e.feed_row.pagination_per_page_number),e.paginator=Math.ceil((d+1)/t),e.paginator},wdi_front.getPhotoTemplate=function(e){var i=wdi_front.setPage(e),r="",t="",d="",a="",o="tenweb-i-arrows-out",n="";"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(o=""),sourceAttr=(""!=i&&(t='wdi_page="'+i+'"'),"src"),""!=i&&1!=i&&(r="wdi_hidden"),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(n='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(r+=" wdi_full_caption");var s="";switch("blog_style"!==e.feed_row.feed_type&&(s="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":d="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":d="onclick=\"window.open ('<%= link%>','_blank')\"",a="wdi_hover_off",o="";break;case"custom_redirect":d="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",a="wdi_hover_off",o="";break;case"none":a="wdi_cursor_off wdi_hover_off",o=d=""}var w='<div class="wdi_feed_item '+r+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+t+' 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\" "+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+a+'" >'+n+'<div class="wdi_thumb_icon" '+d+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="tenweb-i '+o+'"></i></div></div></div></div></div></div>';return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(w+='<div class="wdi_photo_meta">',"#"===e.feed_row.thumb_user[0]&&"1"===e.feed_row.show_likes&&(w+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),"#"===e.feed_row.thumb_user[0]&&"1"===e.feed_row.show_comments&&(w+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),w+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(w+='<div class="wdi_photo_title" onclick='+s+" ><%=caption%></div>"),w+="</div>"),w+="</div>",_.template(w)},wdi_front.getSliderTemplate=function(e){var i=wdi_front.setPage(e),r="",t="",d="",a="",o="tenweb-i-clone",n="";"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(o=""),sourceAttr=(""!=i&&(t='wdi_page="'+i+'"'),"src"),""!=i&&1!=i&&(r="wdi_hidden"),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(n='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(r+=" wdi_full_caption");var s="";switch("blog_style"!==e.feed_row.feed_type&&(s="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":d="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":d="onclick=\"window.open ('<%= link%>','_blank')\"",a="wdi_hover_off",o="tenweb-i-clone";break;case"custom_redirect":d="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",a="wdi_hover_off",o="";break;case"none":a="wdi_cursor_off wdi_hover_off",o=d=""}var w='<div class="wdi_feed_item '+r+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+t+' 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\" "+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+a+'" >'+n+'<div class="wdi_thumb_icon" '+d+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="tenweb-i '+o+'"></i></div></div></div></div></div></div>';return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(w+='<div class="wdi_photo_meta">',"#"===e.feed_row.thumb_user[0]&&"1"===e.feed_row.show_likes&&(w+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),"#"===e.feed_row.thumb_user[0]&&"1"===e.feed_row.show_comments&&(w+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),w+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(w+='<div class="wdi_photo_title" onclick='+s+" ><%=caption%></div>"),w+="</div>"),w+="</div>",_.template(w)},wdi_front.replaceToVideo=function(e,i,r){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_"+r+' [wdi_index="'+i+'"] .wdi_photo_wrap_inner').html(overlayHtml),jQuery("#wdi_feed_"+r+' [wdi_index="'+i+'"] .wdi_photo_wrap_inner video').get(0).play()},wdi_front.getVideoTemplate=function(e){var i=wdi_front.setPage(e),r="",t="",d="tenweb-i-play",a="",o="",n="",s=(""!=i&&(t='wdi_page="'+i+'"'),"src");""!=i&&1!=i&&(r="wdi_hidden"),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(n='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(r+=" wdi_full_caption");var w="";switch("blog_style"!==e.feed_row.feed_type&&(w="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":a="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":a="onclick=\"window.open ('<%= link%>','_blank')\"",o="wdi_hover_off",d="tenweb-i-play";break;case"custom_redirect":a="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",o="wdi_hover_off",d="";break;case"none":o="wdi_cursor_off wdi_hover_off",d="","blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(a="onclick=wdi_front.replaceToVideo('<%= video_url%>','<%= wdi_index%>',"+e.feed_row.wdi_feed_counter+")",o="",d="tenweb-i-play")}var f='<div class="wdi_feed_item '+r+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+t+' 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\" "+s+'="<%=video_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+o+'" '+a+">"+n+'<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 '+d+'"></i></div></div></div></div></div></div>';return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(f+='<div class="wdi_photo_meta">',"#"===e.feed_row.thumb_user[0]&&"1"===e.feed_row.show_likes&&(f+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),"#"===e.feed_row.thumb_user[0]&&"1"===e.feed_row.show_comments&&(f+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),f+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(f+='<div class="wdi_photo_title" onclick='+w+" ><%=caption%></div>"),f+="</div>"),f+="</div>",_.template(f)},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(){wdi_front.loadMore(jQuery(this).find(".wdi_load_more_wrap"))}),"pagination"==e.feed_row.feed_display_view&&(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_next").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorNext(jQuery(this),e)}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_prev").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorPrev(jQuery(this),e)}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_last_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationLastPage(jQuery(this),e)}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_first_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationFirstPage(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&&(!1===e.infiniteScrollFlag&&0==e.stopInfiniteScrollFlag?(e.infiniteScrollFlag=!0,wdi_front.loadMore(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_infinite_scroll"),e)):e.stopInfiniteScrollFlag&&wdi_front.allImagesLoaded(e))},wdi_front.paginationFirstPage=function(e,i){var r;1!=i.paginator&&1!=i.currentPage&&(r=i.currentPage,i.currentPage=1,wdi_front.updatePagination(i,"custom",r),e.parent().find("#wdi_last_page").removeClass("wdi_disabled")),e.addClass("wdi_disabled")},wdi_front.paginationLastPage=function(e,i){var r;1!=i.paginator&&i.currentPage!=i.paginator&&(r=i.currentPage,i.currentPage=i.paginator,wdi_front.updatePagination(i,"custom",r),e.addClass("wdi_disabled"),e.parent().find("#wdi_first_page").removeClass("wdi_disabled"))},wdi_front.paginatorNext=function(e,i){var r,t=e.parent().find("#wdi_last_page"),d=e.parent().find("#wdi_first_page");i.paginatorNextFlag=!0,i.paginator!=i.currentPage||wdi_front.checkFeedFinished(i)?i.paginator>i.currentPage&&(i.currentPage++,wdi_front.updatePagination(i,"next"),i.paginator>i.currentPage?t.removeClass("wdi_disabled"):t.addClass("wdi_disabled")):(i.currentPage++,r=i.feed_row.number_of_photos,wdi_front.loadMore(e,i,r),t.addClass("wdi_disabled")),d.removeClass("wdi_disabled")},wdi_front.paginatorPrev=function(e,i){var r=e.parent().find("#wdi_last_page"),t=e.parent().find("#wdi_first_page");1!=i.currentPage?(i.currentPage--,wdi_front.updatePagination(i,"prev"),r.removeClass("wdi_disabled"),1==i.currentPage&&t.addClass("wdi_disabled")):t.addClass("wdi_disabled")},wdi_front.updatePagination=function(e,i,r){var t="#wdi_feed_"+e.feed_row.wdi_feed_counter;switch(jQuery(t+' [wdi_page="'+e.currentPage+'"]').each(function(){jQuery(this).removeClass("wdi_hidden")}),i){case"next":var r=e.currentPage-1;jQuery(t+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(t+' [wdi_page="'+r+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"prev":r=e.currentPage+1;jQuery(t+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(t+' [wdi_page="'+r+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"custom":(r=r)!=e.currentPage&&(jQuery(t+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(t+' [wdi_page="'+r+'"]').each(function(){jQuery(this).addClass("wdi_hidden")}))}e.paginatorNextFlag=!1,jQuery(t+" .wdi_feed_wrapper").css("height","auto"),jQuery(t+" #wdi_current_page").text(e.currentPage)},wdi_front.loadMore=function(e,i){var r,t=0;""!=e&&void 0!==e&&"initial"!=e&&"initial-keep"!=e&&(r=window[e.parent().parent().parent().parent().attr("id")]),void 0!==i&&(r=i);for(var d=0,a=0,o=0;o<r.userSortFlags.length;o++)if(!0===r.userSortFlags[o].flag){d++;for(var n=0;n<r.usersData.length;n++)r.userSortFlags[o].id===r.usersData[n].user_id&&"finished"===r.usersData[n].finished&&a++}if(d!==a||0==d){r.auto_trigger=""===e,wdi_front.ajaxLoader(r),"masonry"===r.feed_row.feed_type&&"pagination"==r.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)});for(o=0;o<r.usersData.length;o++)"finished"===r.usersData[o].finished&&t++;t===r.usersData.length&&(wdi_front.allImagesLoaded(r),jQuery("#wdi_feed_"+r.feed_row.wdi_feed_counter+" .wdi_load_more").remove());var s=r.usersData;r.loadMoreDataCount=r.feed_users.length;for(o=0;o<s.length;o++){var _,w=s[o].pagination,f={user_id:s[o].user_id,username:s[o].username};""!=w.next_url&&null!=w.next_url&&void 0!==w.next_url?(_=w.next_url,wdi_front.loadMoreRequest(f,_,r,e)):("initial-keep"==e&&(r.temproraryUsersData[o]=r.usersData[o]),r.loadMoreDataCount--,wdi_front.checkForLoadMoreDone(r,e))}}},wdi_front.loadMoreRequest=function(r,e,t,d){var a,i;t.mediaRequestsDone&&(t.usersData,a="",i=function(e){if(""===e||void 0===e||null==e)return a=wdi_front_messages.network_error,t.loadMoreDataCount--,void wdi_front.show_alert(a,e,t);if(void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,t),void 0!==e.meta&&void 0!==e.meta.code&&200!=e.meta.code)return a=e.meta.error_message,t.loadMoreDataCount--,void wdi_front.show_alert(a,e,t);e.user_id=r.user_id,e.username=r.username;for(var i=0;i<t.usersData.length;i++)e.user_id===t.usersData[i].user_id&&("#"===e.user_id[0]&&(e.data=wdi_front.appendRequestHashtag(e.data,e.user_id)),"initial-keep"==d&&(t.temproraryUsersData[i]=t.usersData[i]),t.usersData[i]=e,t.dataStorageRaw[i].data=t.dataStorageRaw[i].data.concat(e.data),t.loadMoreDataCount--);wdi_front.checkForLoadMoreDone(t,d)},"#"!==r.username[0]?t.instagram.requestByUrl(e,{success:i}):t.instagram.getTagRecentMedia(r.username,{success:i},e,t.feed_row.hashtag_top_recent))},wdi_front.checkForLoadMoreDone=function(e,i){var r=e.feed_row.load_more_number,t=e.feed_row.number_of_photos;if(0==e.loadMoreDataCount){e.temproraryUsersData=wdi_front.mergeData(e.temproraryUsersData,e.usersData);var d=wdi_front.getArrayContentLength(e.temproraryUsersData,"data");if("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=[]);else if(d<r&&!wdi_front.userHasNoPhoto(e,e.temproraryUsersData)&&e.instagramRequestCounter<=e.maxConditionalFiltersRequestCount)wdi_front.loadMore(void 0,e);else{if(e.usersData=e.temproraryUsersData,!wdi_front.activeUsersCount(e))return;wdi_front.displayFeed(e,r),wdi_front.applyFilters(e),e.temproraryUsersData=[]}}},wdi_front.allDataHasFinished=function(e){for(var i=0,r=0;r<e.dataStorageRaw.length;r++)0==e.dataStorageRaw[r].length()&&1==e.dataStorageRaw[r].locked&&i++;return i==e.dataStorageRaw.length},wdi_front.mergeData=function(e,i){for(var r=0;r<i.length;r++)if(void 0!==e[r]){if("finished"==i[r].finished)continue;if(void 0===e[r].pagination.next_max_id&&void 0===e[r].pagination.next_max_like_id)continue;e[r].data=e[r].data.concat(i[r].data),e[r].pagination=i[r].pagination,e[r].user_id=i[r].user_id,e[r].username=i[r].username,e[r].meta=i[r].meta}else e.push(i[r]);return e},wdi_front.brokenImageHandler=function(e){return!0},wdi_front.ajaxLoader=function(e){var i,r=e.feed_row.wdi_feed_counter,t=jQuery("#wdi_feed_"+r);"load_more_btn"==e.feed_row.feed_display_view&&(t.find(".wdi_load_more").addClass("wdi_hidden"),t.find(".wdi_spinner").removeClass("wdi_hidden")),"infinite_scroll"==e.feed_row.feed_display_view&&(0==t.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>'),t.append(i)):i=t.find(".wdi_ajax_loading"),i.removeClass("wdi_hidden"))},wdi_front.allImagesLoaded=function(e){var i=wdi_front.getDataLength(e);e.mediaRequestsDone||jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia"),0!=i||!e.mediaRequestsDone||0!=e.feed_row.conditional_filters.length&&0!=e.feed_row.conditional_filter_enable||jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>");var r=e.feed_row.wdi_feed_counter,t=jQuery("#wdi_feed_"+r);"load_more_btn"==e.feed_row.feed_display_view&&(t.find(".wdi_load_more").removeClass("wdi_hidden"),t.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"),t.trigger("wdi_feed_loaded")},wdi_front.show=function(e,i){var r,t,d,a=i.feed_row.wdi_feed_counter,o=jQuery("#wdi_feed_"+a+" .wdi_feed_container");switch(e){case"header":r={feed_thumb:i.feed_row.feed_thumb,feed_name:i.feed_row.feed_name},t=wdi_front.getHeaderTemplate()(r),d=o.find(".wdi_feed_header").html(),o.find(".wdi_feed_header").html(d+t)}},wdi_front.getUserTemplate=function(e,i){var r,t,d=e.dataCount;switch(i[0]){case"#":r="//instagram.com/explore/tags/"+i.substr(1,i.length);break;default:r="//instagram.com/"+i}t="onclick='"+('window.open("'+r+'","_blank")')+"'";var a='<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&&(a+='<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>'),a+="</div>",a+="<h3 "+t+"><%= user_name%></h3>","#"!==i[0]?("1"==e.feed_row.follow_on_instagram_btn&&(a+='<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>"),a+='<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>'):a+='<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>',a+='<div class="wdi_clear"></div>',1==d&&"#"!==i[0]&&"1"==e.feed_row.display_user_info&&(a+='<div class="wdi_bio"><%= bio%></div>',a+='<div class="wdi_website"><a target="_blank" href="<%= website_url%>" ><%= website%></a></div>'),a+="</div></div>",_.template(a)},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 r=window["wdi_feed_"+i];if(!(r.dataCount<2)&&0==r.nowLoadingImages){var t=jQuery("#wdi_feed_"+r.feed_row.wdi_feed_counter+'_users [user_index="'+e+'"]');t.find(".wdi_filter_overlay").toggleClass("wdi_filter_active_bg"),t.find(".wdi_header_user_text h3").toggleClass("wdi_filter_active_col"),t.find(".wdi_media_info").toggleClass("wdi_filter_active_col"),t.find(".wdi_follow_btn").toggleClass("wdi_filter_active_col"),r.customFilterChanged=!0,0==r.userSortFlags[e].flag?r.userSortFlags[e].flag=!0:r.userSortFlags[e].flag=!1;for(var d=0,a=0;a<r.userSortFlags.length;a++)1==r.userSortFlags[a].flag&&d++;"pagination"==r.feed_row.feed_display_view&&(r.resIndex=0),0!=d?wdi_front.filterData(r):r.customFilteredData=r.dataStorageList,wdi_front.displayFeed(r),"pagination"==r.feed_row.feed_display_view&&(r.paginator=Math.ceil(r.imageIndex/parseInt(r.feed_row.pagination_per_page_number)),r.currentPage=r.paginator,wdi_front.updatePagination(r,"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 r=0;r<e.dataStorageList.length;r++)for(var t=0;t<i.length;t++)(void 0!==e.dataStorageList[r].user.id&&e.dataStorageList[r].user.id==i[t].id||e.dataStorageList[r].wdi_hashtag==i[t].name)&&1==i[t].flag&&e.customFilteredData.push(e.dataStorageList[r])},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,r=0,t=0;t<i.length;t++)r+=i[t].length;return r},wdi_front.parseLighboxData=function(e,i){var r,t,d,a=e.dataStorage,o=e.feed_row.sort_images_by,n=e.feed_row.display_order,s=wdi_front.sortingOperator(o,n),_=[],w=[],f={};if(1==i)_=e.customFilteredData;else{for(var l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)_.push(a[l][u]);_.sort(s)}for(l=0;l<_.length;l++){void 0!==_[l]&&(r=void 0!==_[l]&&void 0!==_[l].media_url?_[l].media_url:wdi_url.plugin_url+"images/video_missing.png",void 0!==_[l]&&void 0===_[l].media_url&&"carousel"===_[l].type&&(void 0!==(t=_[l].carousel_media[0])&&void 0!==t.images?r=t.images.standard_resolution.url:void 0!==t&&void 0!==t.videos&&(r=t.videos.standard_resolution.url)),void(d=0)!==_[l]&&void 0!==_[l].comments&&(d=_[l].comments.count),f={alt:"",avg_rating:"",comment_count:d,date:wdi_front.convertUnixDate(_[l].created_time),description:wdi_front.getDescription(void 0!==_[l].caption&&null!==_[l].caption?wdi_front.escape_tags(_[l].caption.text):""),filename:wdi_front.getFileName(_[l]),filetype:wdi_front.getFileType(_[l]),hit_count:"0",id:_[l].id,image_url:_[l].link,number:0,rate:"",rate_count:"0",username:_[l].user.username,profile_picture:_[l].user.profile_picture,thumb_url:r,comments_data:_[l].comments.data,images:_[l].images,carousel_media:void 0!==_[l].carousel_media?_[l].carousel_media:null},w.push(f))}return w},wdi_front.convertUnixDate=function(e){var i=parseInt(e),r=new Date(0);r.setUTCSeconds(i);var t=r.getFullYear()+"-"+r.getMonth()+"-"+r.getDate();return t+=" "+r.getHours()+":"+r.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;var r=i.split("/");return r[r.length-2]}},wdi_front.getFileType=function(e){return"video"==e.type&&e.hasOwnProperty("videos")?"EMBED_OEMBED_INSTAGRAM_VIDEO":"EMBED_OEMBED_INSTAGRAM_IMAGE"},wdi_front.array_max=function(e){for(var i=e[0],r=0,t=1;t<e.length;t++)i<e[t]&&(i=e[t],r=t);return{value:i,index:r}},wdi_front.array_min=function(e){for(var i=e[0],r=0,t=1;t<e.length;t++)i>e[t]&&(i=e[t],r=t);return{value:i,index:r}},wdi_front.activeUsersCount=function(e){for(var i=0,r=0;r<e.usersData.length;r++)"finished"!=e.usersData[r].finished&&i++;return i},wdi_front.checkMediaResponse=function(e,i){return""==e||void 0===e||null==e?(errorMessage=wdi_front_messages.connection_error,wdi_front.show_alert(errorMessage,e,i),!1):""!=e&&void 0!==e&&null!=e&&200!=e.meta.code?(errorMessage=e.meta.error_message,wdi_front.show_alert(errorMessage,e,i),!1):e},wdi_front.stripHashtag=function(e){switch(e[0]){case"#":return e.substr(1,e.length);default:return e}},wdi_front.getInputType=function(e){switch(e[0]){case"#":return"hashtag";case"%":return"location";default:return"user"}},wdi_front.regexpTestCaption=function(e,i){var r=!1,t=!1,d=i.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&"),a=new RegExp("(?:^|\\s)"+d+"(?:^|\\s)"),o=new RegExp("(?:^|\\s)"+d,"g");for(null!=a.exec(e)&&(r=!0);null!=(match=o.exec(e));)t=!0;return 1==r||1==t},wdi_front.replaceNewLines=function(e){var i,r="vUkCJvN2ps3t",t=[];for(e=e.replace(/\r?\n|\r/g,r),i=new RegExp(r,"g");null!=(match=i.exec(e));)t.push(match.index);for(var d=e.split(r),a=0,o=0;o<d.length;o++)""==d[o]?a++:a=0,0<a&&(d.splice(o,1),a--,o--);return e=d.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 r=0;r<i.length;r++)if(e.id==i[r].id)return!0;return!1},WDIFeed.prototype.getIdFromUrl=function(e){for(var i=e.split("/"),r=!1,t=0;t<i.length;t++)if("p"==i[t]&&void 0!==i[t+1]){r=i[t+1];break}return r},WDIFeed.prototype.avoidDuplicateMedia=function(e){var i=e.data,r=[];void 0===i&&(i=[]);for(var t=0;t<i.length;t++)this.mediaExists(i[t],this.dataStorageList)||this.mediaExists(i[t],r)||this.mediaExists(i[t],this.conditionalFilterBuffer)||r.push(i[t]);return this.conditionalFilterBuffer=this.conditionalFilterBuffer.concat(r),{data:r,meta:e.meta,pagination:e.pagination}},WDIFeed.prototype.storeRawData=function(e,i){var t=this;if("object"==typeof this[i]&&"number"==typeof this[i].length)for(var r=0;r<e.length;r++){var d="";wdi_front.isHashtag(e[r].user_id)?void 0!==e[r].pagination.cursors&&(d=e[r].pagination.cursors.after):"liked"==t.feed_row.liked_feed?void 0===(d=e[r].pagination.next_max_like_id)&&(d=""):(null==e[r].pagination&&(e[r].pagination=[]),void 0===(d=e[r].pagination.next_max_id)&&(d="")),void 0===this[i][r]?this[i].push({data:e[r].data,index:0,locked:!1,hash_id:d,usersDataFinished:!1,userId:e[r].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 r=0;r<t.usersData.length;r++)if(t.usersData[r].user_id==this.userId){t.usersData[r].finished="finished",this.usersDataFinished=!0;break}return i}}):0==this[i][r].locked&&(d!=this[i][r].hash_id?(this[i][r].data=this[i][r].data.concat(e[r].data),this[i][r].hash_id=d):this[i][r].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,r=0;r<e.data.length;r++)if(e.data[r].username==e.args.username){i=!0;break}if(i)for(var t=0;t<n.length;t++)e.data[r].username==n[t].username&&(n[t].id=e.data[r].id)}for(var d=!1,a=0;a<n.length;a++)if(""==n[a].id||"username"==n[a].id){d=!0;break}d||(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(){return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click"}),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,r){var t,d;r=jQuery("#wdi_feed_"+r.feed_row.wdi_feed_counter),400===i.meta.code&&"APINotAllowedError"===i.meta.error_type&&(void 0!==i.wdi_current_feed_name&&(d=i.wdi_current_feed_name,void 0===(t=r.find(".wdi_private_feed_names")).attr("wdi_first_private_user")?t.attr("wdi_first_private_user",1):d=", "+d,t.append(d),r.find(".wdi_private_feed_error").removeClass("wdi_hidden")),r.find(".wdi_spinner").remove()),void 0!==r&&"APINotAllowedError"!=i.meta.error_type&&(r.find(".wdi_spinner").remove(),wdi_error_show=!0,d=r.find(".wdi_js_error"),r=r.find(".wdi_token_error"),0!=i&&null!=typeof i.meta&&"OAuthAccessTokenException"===i.meta.error_type?(r.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){}})):(d.removeClass("wdi_js_error"),d.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 r,t=i;t<=e;t++)0!==jQuery("#wdi_feed_"+t).length&&((r=new WDIFeed(window["wdi_feed_"+t])).instagram=new WDIInstagram,r.instagram.filterArguments={feed:r},r.instagram.addToken(r.feed_row.access_token),wdi_front.access_token=r.feed_row.access_token,r.dataStorageRaw=[],r.dataStorage=[],r.dataStorageList=[],r.allResponseLength=0,r.currentResponseLength=0,r.temproraryUsersData=[],r.removedUsers=0,r.nowLoadingImages=!0,r.imageIndex=0,r.resIndex=0,r.currentPage=1,r.currentPageLoadMore=0,r.userSortFlags=[],r.customFilterChanged=!1,r.maxConditionalFiltersRequestCount=10,r.instagramRequestCounter=0,r.mediaRequestsDone=!1,r.conditionalFilterBuffer=[],r.stopInfiniteScrollFlag=!1,"masonry"==r.feed_row.feed_type&&(r.displayedData=[]),"pagination"==r.feed_row.feed_display_view?(r.feed_row.resort_after_load_more=0,"image_browser"!=r.feed_row.feed_type?(r.feed_row.load_more_number=parseInt(r.feed_row.pagination_per_page_number),r.feed_row.number_of_photos=(1+parseInt(r.feed_row.pagination_preload_number))*r.feed_row.load_more_number):(r.feed_row.number_of_photos=1+parseInt(r.feed_row.image_browser_preload_number),r.feed_row.load_more_number=parseInt(r.feed_row.image_browser_load_number)),r.freeSpaces=(Math.floor(r.feed_row.pagination_per_page_number/r.feed_row.number_of_columns)+1)*r.feed_row.number_of_columns-r.feed_row.pagination_per_page_number):r.freeSpaces=0,r.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(r),"masonry"==r.feed_row.feed_type&&jQuery(window).trigger("resize"),wdi_front.bindEvents(r),window["wdi_feed_"+t]=r,wdi_front.init(r))},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=[],r=[],t=[];void 0!==window.wdi_all_tags&&(i=window.wdi_all_tags);for(var d=0;d<e.feed_users.length;d++)"#"===e.feed_users[d].username[0]&&void 0!==e.feed_users[d].tag_id?(i[e.feed_users[d].tag_id]=e.feed_users[d],t[d]=e.feed_users[d]):r[0]=e.feed_users[d];window.wdi_all_tags=i,e.feed_users=void 0===t||wdi_front.isEmpty(t)?r:t;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 r=jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter).find(".wdi_feed_wrapper");r.append('<div class="wdi_feed_item" id="wdi_feed_item_example"></div>'),wdi_responsive.columnControl(e,1);e=r.attr("wdi-res").split("wdi_col_");if(r.find("#wdi_feed_item_example").remove(),2!==e.length)return i;e=parseInt(e[1]);if(e<=0)return i;e=r.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,r){var t=this,d=r.feed_users;"string"==typeof d[i]&&"self"===d[i]?r.instagram.getRecentLikedMedia({success:function(e){void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,r),r.mediaRequestsDone=!0,0!=(e=t.checkMediaResponse(e,r))&&t.saveSelfUserData(e,r)}}):"hashtag"==this.getInputType(d[i].username)?r.instagram.getTagRecentMedia(this.stripHashtag(d[i].username),{success:function(e){void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,r),r.mediaRequestsDone=!0,0!=(e=t.checkMediaResponse(e,r))&&t.saveUserData(e,r.feed_users[i],r)}},null,r.feed_row.hashtag_top_recent):"user"==this.getInputType(d[i].username)&&r.instagram.getUserMedia({user_id:d[i].id,success:function(e){void 0!==e.meta&&void 0!==e.meta.error_type&&(e.wdi_current_feed_name=d[i].username,wdi_front.show_alert(!1,e,r)),r.mediaRequestsDone=!0,0!=(e=t.checkMediaResponse(e,r))&&t.saveUserData(e,r.feed_users[i],r)}})},wdi_front.isHashtag=function(e){return"#"===e[0]},wdi_front.saveUserData=function(e,i,r){e.user_id=i.id,e.username=i.username,"#"===e.user_id[0]&&(e.data=wdi_front.appendRequestHashtag(e.data,e.user_id)),r.usersData.push(e),r.currentResponseLength=wdi_front.getArrayContentLength(r.usersData,"data"),r.allResponseLength+=r.currentResponseLength,r.dataCount==r.usersData.length&&(r.currentResponseLength<r.feed_row.number_of_photos&&!wdi_front.userHasNoPhoto(r)?wdi_front.loadMore("initial-keep",r):(wdi_front.displayFeed(r),wdi_front.applyFilters(r),wdi_front.activeUsersCount(r)||"load_more_btn"==r.feed_row.feed_display_view&&((r=jQuery("#wdi_feed_"+r.feed_row.wdi_feed_counter)).find(".wdi_load_more").addClass("wdi_hidden"),r.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 r=0,t=e.usersData;void 0!==i&&(t=i);for(var d=0;d<t.length;d++)void 0===t[d].pagination&&(t[d].pagination=[]),"liked"===e.feed_row.liked_feed?void 0===t[d].pagination.next_max_like_id&&r++:void 0===t[d].pagination.next_max_id&&r++;return r==t.length?1:0},wdi_front.appendRequestHashtag=function(e,i){for(var r=0;r<e.length;r++)e[r].wdi_hashtag=i;return e},wdi_front.displayFeed=function(e,i){0==e.customFilterChanged&&(r=wdi_front.feedSort(e,i));var r,i=e.customFilterChanged;1==e.customFilterChanged&&(r=e.customFilteredData,e.parsedData=wdi_front.parseLighboxData(e,!0)),"1"!=e.feed_row.resort_after_load_more?0==e.customFilterChanged&&(e.dataStorageList=e.dataStorageList.concat(r)):0==e.customFilterChanged&&(e.dataStorageList=r),"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),wdi_front.getDataLength(e)<parseInt(e.feed_row.number_of_photos)+parseInt(e.feed_row.load_more_number*e.currentPageLoadMore)&&!i&&e.instagramRequestCounter<=e.maxConditionalFiltersRequestCount&&!wdi_front.allDataHasFinished(e)?wdi_front.loadMore("",e):(e.currentPageLoadMore++,wdi_front.allImagesLoaded(e)),e.instagramRequestCounter>e.maxConditionalFiltersRequestCount&&(wdi_front.allImagesLoaded(e),0==r.length&&(e.stopInfiniteScrollFlag=!0)),"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"),e.instagramRequestCounter=0,e.conditionalFilterBuffer=[],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.masonryDisplayFeedItems=function(e,i){var r=[],t=[];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?r.push(0):r.push(jQuery(this).height()),t.push(jQuery(this))}),1==i.customFilterChanged&&(i.customFilterChanged=!1);for(var d,a,o,n=0;n<e.length;n++)"object"==typeof e[n].videos&&null==e[n].videos.standard_resolution||(i.displayedData.push(e[n]),d="",void 0!==e[n].wdi_hashtag&&(d=e[n].wdi_hashtag),a="image"==e[n].type?wdi_front.getPhotoTemplate(i,d):e[n].hasOwnProperty("videos")||"video"==e[n].type?wdi_front.getVideoTemplate(i,d):wdi_front.getSliderTemplate(i,d),o=e[n],d=a(wdi_front.createObject(o,i)),a=wdi_front.array_min(r),o=wdi_front.getImageResolution(e[n]),t[a.index].html(t[a.index].html()+d),r[a.index]+=t[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_"+_+" img.wdi_img").on("load",function(){i.wdi_loadedImages++,w(),!1===s&&(wdi_responsive.columnControl(i,1),s=!0)});w(),1==i.paginatorNextFlag&&wdi_front.updatePagination(i,"next"),i.infiniteScrollFlag=!1}function w(){i.wdi_load_count===i.wdi_loadedImages&&0!=i.wdi_loadedImages&&(i.loadedImages=0,i.wdi_load_count=0,wdi_front.allImagesLoaded(i))}},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 r=0;if(void 0===i)for(var t=0;t<e.dataStorage.length;t++)r+=e.dataStorage[t].length;else for(t=0;t<i.length;t++)r+=i[t].length;return r},wdi_front.getArrayContentLength=function(e,i){for(var r=0,t=0;t<e.length;t++)"finished"!=e[t].finished&&void 0===e[t].error&&(r+=e[t][i].length);return r},wdi_front.displayFeedItems=function(e,i){if(0!=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").length){var r=i.feed_row.wdi_feed_counter,t=jQuery("#wdi_feed_"+r+" .wdi_feed_wrapper");"1"===i.feed_row.resort_after_load_more&&(t.html(""),i.imageIndex=0),1==i.customFilterChanged&&(t.html(""),i.imageIndex=0,i.customFilterChanged=!1);var d;wdi_front.getImgCount(i),e.length;"pagination"==i.feed_row.feed_display_view&&(d=i.feed_row.load_more_number,"image_browser"==i.feed_row.feed_type&&(d=1),(jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+' [wdi_page="'+(i.currentPage-1)+'"]').length<d||0==e.length)&&(i.currentPage=--i.currentPage<=1?1:i.currentPage));for(var a,o,n=0;n<e.length;n++){if(void 0===e[n])return;"object"==typeof e[n].videos&&null==e[n].videos.standard_resolution||(o="",void 0!==e[n].wdi_hashtag&&(o=e[n].wdi_hashtag),a="image"==e[n].type?wdi_front.getPhotoTemplate(i,o):e[n].hasOwnProperty("videos")?wdi_front.getVideoTemplate(i,o):wdi_front.getSliderTemplate(i,o),o=e[n],o=a(wdi_front.createObject(o,i)),t.html(t.html()+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;r=i.feed_row.wdi_feed_counter,t=jQuery("#wdi_feed_"+r+" img.wdi_img").on("load",function(){i.wdi_loadedImages++,i.wdi_load_count===i.wdi_loadedImages&&0!=i.wdi_loadedImages&&(i.loadedImages=0,i.wdi_load_count=0,wdi_front.allImagesLoaded(i)),!1===s&&(wdi_responsive.columnControl(i,1),s=!0)});1==i.paginatorNextFlag&&wdi_front.updatePagination(i,"next"),i.infiniteScrollFlag=!1}},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.sortingOperator=function(e,i){var r;switch(e){case"date":switch(i){case"asc":r=function(e,i){return e.created_time>i.created_time?1:-1};break;case"desc":r=function(e,i){return e.created_time>i.created_time?-1:1}}break;case"likes":switch(i){case"asc":r=function(e,i){return e.likes.count<i.likes.count?-1:1};break;case"desc":r=function(e,i){return e.likes.count<i.likes.count?1:-1}}break;case"comments":switch(i){case"asc":r=function(e,i){return e.comments.count<i.comments.count?-1:1};break;case"desc":r=function(e,i){return e.comments.count<i.comments.count?1:-1}}break;case"random":r=function(e,i){return.5<Math.random()?1:-1}}return r},wdi_front.feedSort=function(e,i){var r=e.feed_row.sort_images_by,t=e.feed_row.display_order;"1"===e.feed_row.resort_after_load_more?e.data=e.data.concat(wdi_front.smartPicker(e,i)):e.data=wdi_front.smartPicker(e,i);t=wdi_front.sortingOperator(r,t);return e.data.sort(t),e.data},wdi_front.smartPicker=function(e,i){var r=[],t=0,d=[],a=Math.ceil(e.feed_row.number_of_photos/e.usersData.length),o=parseInt(e.feed_row.number_of_photos),n=0;""!=i&&void 0!==i&&null!=i&&(o=parseInt(i),a=Math.ceil(o/wdi_front.activeUsersCount(e)));e.storeRawData(e.usersData,"dataStorageRaw");for(var s,_=e.dataStorageRaw.sort(function(e,i){return e.length()>i.length()?1:-1}),w=e.usersData.sort(function(e,i){return e.data.length>i.data.length?1:-1}),l=0;l<w.length;l++)n+=a,_[l].length()<=n?(n-=_[l].length(),r.push(_[l].getData(_[l].length())),t+=r[r.length-1].length):(o<t+n&&(n=o-t),(!(s=[])===e.auto_trigger||s.length+wdi_front.getDataLength(e)+wdi_front.getDataLength(e,r)<e.feed_row.number_of_photos)&&(s=s.concat(_[l].getData(n))),n=0,t+=s.length,r.push(s));for(l=0;l<r.length;l++)void 0===e.dataStorage[l]?e.dataStorage.push(r[l]):e.dataStorage[l]=e.dataStorage[l].concat(r[l]);for(e.parsedData=wdi_front.parseLighboxData(e),l=0;l<r.length;l++)d=d.concat(r[l]);return d},wdi_front.createObject=function(e,i){var r,t=null!=e.caption?e.caption.text:" ",d=wdi_url.plugin_url+"images/video_missing.png";"video"==e.type&&e.videos[i.feedVideoResolution]&&null!=e.videos[i.feedVideoResolution].url&&(d=e.hasOwnProperty("videos")?e.videos[i.feedVideoResolution].url:""),void 0===e.images[i.feedImageResolution]?r=wdi_url.plugin_url+"images/missing.png":"carousel"==e.type&&void 0===e.images[i.feedImageResolution].url?void 0!==e.carousel_media[0].images?r=e.carousel_media[0].images[i.feedImageResolution].url:void 0!==e.carousel_media[0].videos&&(r=wdi_url.plugin_url+"images/video_missing.png"):r=e.images[i.feedImageResolution].url;var a=i.imageIndex,o="square",n=e.images.standard_resolution.height,s=e.images.standard_resolution.width;s<n?o="portrait":n<s&&(o="landscape");s=e.user.username;return""===s&&(s="no_user"),{id:e.id,caption:wdi_front.escape_tags(t),image_url:r,likes:e.likes.count,comments:e.comments.count,wdi_index:a,wdi_res_index:i.resIndex,wdi_media_user:s,link:e.link,video_url:d,wdi_username:s,wdi_shape:o}},wdi_front.setPage=function(e){var i=e.feed_row.feed_display_view,r=e.feed_row.feed_type;if("pagination"!=i)return"";i=e.imageIndex;return r="image_browser"==r?1:Math.abs(e.feed_row.pagination_per_page_number),e.paginator=Math.ceil((i+1)/r),e.paginator},wdi_front.getPhotoTemplate=function(e,i){var r=wdi_front.setPage(e),t="",d="",a="",o="",n="tenweb-i-arrows-out",s="";"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(n=""),sourceAttr=(""!=r&&(d='wdi_page="'+r+'"'),"src"),""!=r&&1!=r&&(t="wdi_hidden"),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(s='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(t+=" wdi_full_caption");r="";switch("blog_style"!==e.feed_row.feed_type&&(r="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":a="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":a="onclick=\"window.open ('<%= link%>','_blank')\"",o="wdi_hover_off",n="";break;case"custom_redirect":a="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",o="wdi_hover_off",n="";break;case"none":o="wdi_cursor_off wdi_hover_off",n=a=""}d='<div class="wdi_feed_item '+t+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+d+' 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\" "+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+o+'" >'+s+'<div class="wdi_thumb_icon" '+a+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="tenweb-i '+n+'"></i></div></div></div></div></div></div>',s=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(d+='<div class="wdi_photo_meta">',"1"===e.feed_row.show_likes&&0!=e.dataStorageList[s].likes.count&&(d+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),"1"===e.feed_row.show_comments&&0!=e.dataStorageList[s].comments.count&&(d+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),d+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(d+='<div class="wdi_photo_title" onclick='+r+" ><%=caption%></div>"),d+="</div>"),d+="</div>",_.template(d)},wdi_front.getSliderTemplate=function(e,i){var r=wdi_front.setPage(e),t="",d="",a="",o="",n="tenweb-i-clone",s="";"blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(n=""),sourceAttr=(""!=r&&(d='wdi_page="'+r+'"'),"src"),""!=r&&1!=r&&(t="wdi_hidden"),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(s='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(t+=" wdi_full_caption");r="";switch("blog_style"!==e.feed_row.feed_type&&(r="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":a="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":a="onclick=\"window.open ('<%= link%>','_blank')\"",o="wdi_hover_off",n="tenweb-i-clone";break;case"custom_redirect":a="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",o="wdi_hover_off",n="";break;case"none":o="wdi_cursor_off wdi_hover_off",n=a=""}d='<div class="wdi_feed_item '+t+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+d+' 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\" "+sourceAttr+'="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+o+'" >'+s+'<div class="wdi_thumb_icon" '+a+' style="display:table;width:100%;height:100%;"><div style="display:table-cell;vertical-align:middle;text-align:center;color:white;"><i class="tenweb-i '+n+'"></i></div></div></div></div></div></div>',s=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(d+='<div class="wdi_photo_meta">',"1"===e.feed_row.show_likes&&0!=e.dataStorageList[s].likes.count&&(d+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),"1"===e.feed_row.show_comments&&0!=e.dataStorageList[s].comments.count&&(d+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),d+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(d+='<div class="wdi_photo_title" onclick='+r+" ><%=caption%></div>"),d+="</div>"),d+="</div>",_.template(d)},wdi_front.replaceToVideo=function(e,i,r){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_"+r+' [wdi_index="'+i+'"] .wdi_photo_wrap_inner').html(overlayHtml),jQuery("#wdi_feed_"+r+' [wdi_index="'+i+'"] .wdi_photo_wrap_inner video').get(0).play()},wdi_front.getVideoTemplate=function(e,i){var r=wdi_front.setPage(e),t="",d="",a="tenweb-i-play",o="",n="",s="",w=(""!=r&&(d='wdi_page="'+r+'"'),"src");""!=r&&1!=r&&(t="wdi_hidden"),"1"==e.feed_row.show_username_on_thumb&&e.data.length&&""!==e.data[0].user.username&&(s='<span class="wdi_media_user">@<%= wdi_username%></span>'),1==e.feed_row.show_full_description&&"masonry"==e.feed_row.feed_type&&(t+=" wdi_full_caption");r="";switch("blog_style"!==e.feed_row.feed_type&&(r="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":o="onclick=wdi_feed_"+e.feed_row.wdi_feed_counter+".galleryBox('<%=id%>')";break;case"instagram":o="onclick=\"window.open ('<%= link%>','_blank')\"",n="wdi_hover_off",a="tenweb-i-play";break;case"custom_redirect":o="onclick=\"window.open ('"+e.feed_row.redirect_url+"','_self')\"",n="wdi_hover_off",a="";break;case"none":n="wdi_cursor_off wdi_hover_off",a="","blog_style"!=e.feed_row.feed_type&&"image_browser"!=e.feed_row.feed_type||(o="onclick=wdi_front.replaceToVideo('<%= video_url%>','<%= wdi_index%>',"+e.feed_row.wdi_feed_counter+")",n="",a="tenweb-i-play")}w='<div class="wdi_feed_item '+t+'" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> '+d+' 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\" "+w+'="<%=video_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);"><div class="wdi_photo_overlay '+n+'" '+o+">"+s+'<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 '+a+'"></i></div></div></div></div></div></div>',s=e.imageIndex;return"1"!==e.feed_row.show_likes&&"1"!==e.feed_row.show_comments&&"1"!==e.feed_row.show_description||(w+='<div class="wdi_photo_meta">',"1"===e.feed_row.show_likes&&0!=e.dataStorageList[s].likes.count&&(w+='<div class="wdi_thumb_likes"><i class="tenweb-i tenweb-i-heart-o"> <%= likes%></i></div>'),"1"===e.feed_row.show_comments&&0!=e.dataStorageList[s].comments.count&&(w+='<div class="wdi_thumb_comments"><i class="tenweb-i tenweb-i-comment-square"> <%= comments%></i></div>'),w+='<div class="wdi_clear"></div>',"1"===e.feed_row.show_description&&(w+='<div class="wdi_photo_title" onclick='+r+" ><%=caption%></div>"),w+="</div>"),w+="</div>",_.template(w)},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(){wdi_front.loadMore(jQuery(this).find(".wdi_load_more_wrap"))}),"pagination"==e.feed_row.feed_display_view&&(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_next").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorNext(jQuery(this),e)}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_prev").on(wdi_front.clickOrTouch,function(){wdi_front.paginatorPrev(jQuery(this),e)}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_last_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationLastPage(jQuery(this),e)}),jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_first_page").on(wdi_front.clickOrTouch,function(){wdi_front.paginationFirstPage(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&&(!1===e.infiniteScrollFlag&&0==e.stopInfiniteScrollFlag?(e.infiniteScrollFlag=!0,wdi_front.loadMore(jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" #wdi_infinite_scroll"),e)):e.stopInfiniteScrollFlag&&wdi_front.allImagesLoaded(e))},wdi_front.paginationFirstPage=function(e,i){var r;1!=i.paginator&&1!=i.currentPage&&(r=i.currentPage,i.currentPage=1,wdi_front.updatePagination(i,"custom",r),e.parent().find("#wdi_last_page").removeClass("wdi_disabled")),e.addClass("wdi_disabled")},wdi_front.paginationLastPage=function(e,i){var r;1!=i.paginator&&i.currentPage!=i.paginator&&(r=i.currentPage,i.currentPage=i.paginator,wdi_front.updatePagination(i,"custom",r),e.addClass("wdi_disabled"),e.parent().find("#wdi_first_page").removeClass("wdi_disabled"))},wdi_front.paginatorNext=function(e,i){var r,t=e.parent().find("#wdi_last_page"),d=e.parent().find("#wdi_first_page");i.paginatorNextFlag=!0,i.paginator!=i.currentPage||wdi_front.checkFeedFinished(i)?i.paginator>i.currentPage&&(i.currentPage++,wdi_front.updatePagination(i,"next"),i.paginator>i.currentPage?t.removeClass("wdi_disabled"):t.addClass("wdi_disabled")):(i.currentPage++,r=i.feed_row.number_of_photos,wdi_front.loadMore(e,i,r),t.addClass("wdi_disabled")),d.removeClass("wdi_disabled")},wdi_front.paginatorPrev=function(e,i){var r=e.parent().find("#wdi_last_page"),e=e.parent().find("#wdi_first_page");1!=i.currentPage?(i.currentPage--,wdi_front.updatePagination(i,"prev"),r.removeClass("wdi_disabled"),1==i.currentPage&&e.addClass("wdi_disabled")):e.addClass("wdi_disabled")},wdi_front.updatePagination=function(e,i,r){var t="#wdi_feed_"+e.feed_row.wdi_feed_counter;switch(jQuery(t+' [wdi_page="'+e.currentPage+'"]').each(function(){jQuery(this).removeClass("wdi_hidden")}),i){case"next":var r=e.currentPage-1;jQuery(t+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(t+' [wdi_page="'+r+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"prev":r=e.currentPage+1;jQuery(t+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(t+' [wdi_page="'+r+'"]').each(function(){jQuery(this).addClass("wdi_hidden")});break;case"custom":(r=r)!=e.currentPage&&(jQuery(t+" .wdi_feed_wrapper").height(jQuery(".wdi_feed_wrapper").height()),jQuery(t+' [wdi_page="'+r+'"]').each(function(){jQuery(this).addClass("wdi_hidden")}))}e.paginatorNextFlag=!1,jQuery(t+" .wdi_feed_wrapper").css("height","auto"),jQuery(t+" #wdi_current_page").text(e.currentPage)},wdi_front.loadMore=function(e,i){var r,t=0;""!=e&&void 0!==e&&"initial"!=e&&"initial-keep"!=e&&(r=window[e.parent().parent().parent().parent().attr("id")]),void 0!==i&&(r=i);for(var d=0,a=0,o=0;o<r.userSortFlags.length;o++)if(!0===r.userSortFlags[o].flag){d++;for(var n=0;n<r.usersData.length;n++)r.userSortFlags[o].id===r.usersData[n].user_id&&"finished"===r.usersData[n].finished&&a++}if(d!==a||0==d){r.auto_trigger=""===e,wdi_front.ajaxLoader(r),"masonry"===r.feed_row.feed_type&&"pagination"==r.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)});for(o=0;o<r.usersData.length;o++)"finished"===r.usersData[o].finished&&t++;t===r.usersData.length&&(wdi_front.allImagesLoaded(r),jQuery("#wdi_feed_"+r.feed_row.wdi_feed_counter+" .wdi_load_more").remove());var s=r.usersData;r.loadMoreDataCount=r.feed_users.length;for(o=0;o<s.length;o++){var _=s[o].pagination,w={user_id:s[o].user_id,username:s[o].username};""!=_.next_url&&null!=_.next_url&&void 0!==_.next_url?(_=_.next_url,wdi_front.loadMoreRequest(w,_,r,e)):("initial-keep"==e&&(r.temproraryUsersData[o]=r.usersData[o]),r.loadMoreDataCount--,wdi_front.checkForLoadMoreDone(r,e))}}},wdi_front.loadMoreRequest=function(r,e,t,d){var a,i;t.mediaRequestsDone&&(t.usersData,a="",i=function(e){if(""===e||void 0===e||null==e)return a=wdi_front_messages.network_error,t.loadMoreDataCount--,void wdi_front.show_alert(a,e,t);if(void 0!==e.meta&&void 0!==e.meta.error_type&&wdi_front.show_alert(!1,e,t),void 0!==e.meta&&void 0!==e.meta.code&&200!=e.meta.code)return a=e.meta.error_message,t.loadMoreDataCount--,void wdi_front.show_alert(a,e,t);e.user_id=r.user_id,e.username=r.username;for(var i=0;i<t.usersData.length;i++)e.user_id===t.usersData[i].user_id&&("#"===e.user_id[0]&&(e.data=wdi_front.appendRequestHashtag(e.data,e.user_id)),"initial-keep"==d&&(t.temproraryUsersData[i]=t.usersData[i]),t.usersData[i]=e,void 0===t.dataStorageRaw[i]?t.dataStorageRaw[i]={data:e.data}:t.dataStorageRaw[i].data=t.dataStorageRaw[i].data.concat(e.data),t.loadMoreDataCount--);wdi_front.checkForLoadMoreDone(t,d)},"#"!==r.username[0]?t.instagram.getUserMedia({user_id:r.username[0].id,success:i},e):t.instagram.getTagRecentMedia(r.username,{success:i},e,t.feed_row.hashtag_top_recent))},wdi_front.checkForLoadMoreDone=function(e,i){var r,t=e.feed_row.load_more_number,d=e.feed_row.number_of_photos;0==e.loadMoreDataCount&&(e.temproraryUsersData=wdi_front.mergeData(e.temproraryUsersData,e.usersData),r=wdi_front.getArrayContentLength(e.temproraryUsersData,"data"),"initial-keep"==i&&(i="initial"),"initial"==i?r<d&&!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=[]):r<t&&!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,t),wdi_front.applyFilters(e),e.temproraryUsersData=[])))},wdi_front.allDataHasFinished=function(e){for(var i=0,r=0;r<e.dataStorageRaw.length;r++)""==e.usersData[r].pagination.next_url&&(i++,e.usersData[r].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 r=0;r<i.length;r++)void 0!==e[r]?"finished"!=i[r].finished&&(void 0===e[r].pagination.next_max_id&&void 0===e[r].pagination.next_max_like_id||(e[r].data=e[r].data.concat(i[r].data),e[r].pagination=i[r].pagination,e[r].user_id=i[r].user_id,e[r].username=i[r].username,e[r].meta=i[r].meta)):e.push(i[r]);return e},wdi_front.brokenImageHandler=function(e){return!0},wdi_front.ajaxLoader=function(e){var i,r=e.feed_row.wdi_feed_counter,r=jQuery("#wdi_feed_"+r);"load_more_btn"==e.feed_row.feed_display_view&&(r.find(".wdi_load_more").addClass("wdi_hidden"),r.find(".wdi_spinner").removeClass("wdi_hidden")),"infinite_scroll"==e.feed_row.feed_display_view&&(0==r.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>'),r.append(i)):i=r.find(".wdi_ajax_loading"),i.removeClass("wdi_hidden"))},wdi_front.allImagesLoaded=function(e){var i=wdi_front.getDataLength(e);e.mediaRequestsDone||jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").remove("wdi_nomedia"),0!=i||!e.mediaRequestsDone||0!=e.feed_row.conditional_filters.length&&0!=e.feed_row.conditional_filter_enable||jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").append("<p class='wdi_nomedia'>"+wdi_front_messages.feed_nomedia+"</p>");i=e.feed_row.wdi_feed_counter,i=jQuery("#wdi_feed_"+i);"load_more_btn"==e.feed_row.feed_display_view&&(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 r,t,d=i.feed_row.wdi_feed_counter,a=jQuery("#wdi_feed_"+d+" .wdi_feed_container");"header"===e&&(r={feed_thumb:i.feed_row.feed_thumb,feed_name:i.feed_row.feed_name},t=wdi_front.getHeaderTemplate()(r),r=a.find(".wdi_feed_header").html(),a.find(".wdi_feed_header").html(r+t))},wdi_front.getUserTemplate=function(e,i){var r=e.dataCount,t="#"===i[0]?"//instagram.com/explore/tags/"+i.substr(1,i.length):"//instagram.com/"+i,d="onclick='"+('window.open("'+t+'","_blank")')+"'",t='<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<r&&(t+='<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>'),t+="</div>",t+="<h3 "+d+"><%= user_name%></h3>","#"!==i[0]?("1"==e.feed_row.follow_on_instagram_btn&&(t+='<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>"),t+='<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>'):t+='<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>',t+='<div class="wdi_clear"></div>',1==r&&"#"!==i[0]&&"1"==e.feed_row.display_user_info&&(t+='<div class="wdi_bio"><%= bio%></div>',t+='<div class="wdi_website"><a target="_blank" href="<%= website_url%>" ><%= website%></a></div>'),t+="</div></div>",_.template(t)},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 r=window["wdi_feed_"+i],i=r.dataCount;if(!(i<2)&&0==r.nowLoadingImages){i=jQuery("#wdi_feed_"+r.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"),r.customFilterChanged=!0,0==r.userSortFlags[e].flag?r.userSortFlags[e].flag=!0:r.userSortFlags[e].flag=!1;for(var t=0,d=0;d<r.userSortFlags.length;d++)1==r.userSortFlags[d].flag&&t++;"pagination"==r.feed_row.feed_display_view&&(r.resIndex=0),0!=t?wdi_front.filterData(r):r.customFilteredData=r.dataStorageList,wdi_front.displayFeed(r),"pagination"==r.feed_row.feed_display_view&&(r.paginator=Math.ceil(r.imageIndex/parseInt(r.feed_row.pagination_per_page_number)),r.currentPage=r.paginator,wdi_front.updatePagination(r,"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 r=0;r<e.dataStorageList.length;r++)for(var t=0;t<i.length;t++)(void 0!==e.dataStorageList[r].user.id&&e.dataStorageList[r].user.id==i[t].id||e.dataStorageList[r].wdi_hashtag==i[t].name)&&1==i[t].flag&&e.customFilteredData.push(e.dataStorageList[r])},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,r=0,t=0;t<i.length;t++)r+=i[t].length;return r},wdi_front.parseLighboxData=function(e,i){var r,t,d,a=e.dataStorage,o=e.feed_row.sort_images_by,n=e.feed_row.display_order,n=wdi_front.sortingOperator(o,n),s=[],_=[];if(1==i)s=e.customFilteredData;else{for(var w=0;w<a.length;w++)for(var l=0;l<a[w].length;l++)s.push(a[w][l]);s.sort(n)}for(w=0;w<s.length;w++)void 0!==s[w]&&(t=void 0!==s[w]&&void 0!==s[w].media_url?s[w].media_url:wdi_url.plugin_url+"images/video_missing.png",void 0!==s[w]&&void 0===s[w].media_url&&"carousel"===s[w].type&&(void 0!==(d=s[w].carousel_media[0])&&void 0!==d.images?t=d.images.standard_resolution.url:void 0!==d&&void 0!==d.videos&&(t=d.videos.standard_resolution.url)),void(d=0)!==s[w]&&void 0!==s[w].comments&&(d=s[w].comments.count),r={alt:"",avg_rating:"",comment_count:d,date:wdi_front.convertUnixDate(s[w].created_time),description:wdi_front.getDescription(void 0!==s[w].caption&&null!==s[w].caption?wdi_front.escape_tags(s[w].caption.text):""),filename:wdi_front.getFileName(s[w]),filetype:wdi_front.getFileType(s[w]),hit_count:"0",id:s[w].id,image_url:s[w].link,number:0,rate:"",rate_count:"0",username:void 0!==s[w].user?s[w].user.username:"",profile_picture:void 0!==s[w].user?s[w].user.profile_picture:"",thumb_url:t,comments_data:void 0!==s[w].comments?s[w].comments.data:"",images:s[w].images,carousel_media:void 0!==s[w].carousel_media?s[w].carousel_media:null},_.push(r));return _},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":"EMBED_OEMBED_INSTAGRAM_IMAGE"},wdi_front.array_max=function(e){for(var i=e[0],r=0,t=1;t<e.length;t++)i<e[t]&&(i=e[t],r=t);return{value:i,index:r}},wdi_front.array_min=function(e){for(var i=e[0],r=0,t=1;t<e.length;t++)i>e[t]&&(i=e[t],r=t);return{value:i,index:r}},wdi_front.activeUsersCount=function(e){for(var i=0,r=0;r<e.usersData.length;r++)"finished"!=e.usersData[r].finished&&i++;return i},wdi_front.checkMediaResponse=function(e,i){return""==e||void 0===e||null==e?(errorMessage=wdi_front_messages.connection_error,wdi_front.show_alert(errorMessage,e,i),!1):""!=e&&void 0!==e&&null!=e&&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 r=!1,t=!1,d=i.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&"),i=new RegExp("(?:^|\\s)"+d+"(?:^|\\s)"),a=new RegExp("(?:^|\\s)"+d,"g");for(null!=i.exec(e)&&(r=!0);null!=(match=a.exec(e));)t=!0;return 1==r||1==t},wdi_front.replaceNewLines=function(e){var i,r="vUkCJvN2ps3t",t=[];for(e=e.replace(/\r?\n|\r/g,r),i=new RegExp(r,"g");null!=(match=i.exec(e));)t.push(match.index);for(var d=e.split(r),a=0,o=0;o<d.length;o++)""==d[o]?a++:a=0,0<a&&(d.splice(o,1),a--,o--);return e=d.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 r=0;r<i.length;r++)if(e.id==i[r].id)return!0;return!1},WDIFeed.prototype.getIdFromUrl=function(e){for(var i=e.split("/"),r=!1,t=0;t<i.length;t++)if("p"==i[t]&&void 0!==i[t+1]){r=i[t+1];break}return r},WDIFeed.prototype.avoidDuplicateMedia=function(e){var i=e.data,r=[];void 0===i&&(i=[]);for(var t=0;t<i.length;t++)this.mediaExists(i[t],this.dataStorageList)||this.mediaExists(i[t],r)||this.mediaExists(i[t],this.conditionalFilterBuffer)||r.push(i[t]);return this.conditionalFilterBuffer=this.conditionalFilterBuffer.concat(r),{data:r,meta:e.meta,pagination:e.pagination}},WDIFeed.prototype.storeRawData=function(e,i){var t=this;if("object"==typeof this[i]&&"number"==typeof this[i].length)for(var r=0;r<e.length;r++){var d="";wdi_front.isHashtag(e[r].user_id)?void 0!==e[r].pagination.cursors&&(d=e[r].pagination.cursors.after):"liked"==t.feed_row.liked_feed?void 0===(d=e[r].pagination.next_max_like_id)&&(d=""):(null==e[r].pagination&&(e[r].pagination=[]),void 0===(d=e[r].pagination.next_max_id)&&(d="")),void 0===this[i][r]?this[i].push({data:e[r].data,index:0,locked:!1,hash_id:d,usersDataFinished:!1,userId:e[r].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 r=0;r<t.usersData.length;r++)if(t.usersData[r].user_id==this.userId){this.usersDataFinished=!0;break}return i}}):0==this[i][r].locked&&(d!=this[i][r].hash_id?(this[i][r].data=this[i][r].data.concat(e[r].data),this[i][r].hash_id=d):this[i][r].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,r=0;r<e.data.length;r++)if(e.data[r].username==e.args.username){i=!0;break}if(i)for(var t=0;t<n.length;t++)e.data[r].username==n[t].username&&(n[t].id=e.data[r].id)}for(var d=!1,a=0;a<n.length;a++)if(""==n[a].id||"username"==n[a].id){d=!0;break}d||(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)});
|
js/wdi_instagram.js
CHANGED
@@ -6,15 +6,11 @@
|
|
6 |
* Author: Melik Karapetyan
|
7 |
* License: GPLv2 or later
|
8 |
*
|
9 |
-
*
|
10 |
-
*
|
11 |
-
*
|
12 |
-
*
|
13 |
* Methods:
|
14 |
* getSelfInfo = function( args ) : Get information about the owner of the access_token.
|
15 |
* searchForUsersByName = function( username, args ) : Get a list of users matching the query.
|
16 |
-
*
|
17 |
-
*
|
18 |
*
|
19 |
*/
|
20 |
|
@@ -154,15 +150,13 @@ function WDIInstagram(args) {
|
|
154 |
* non string values are not allowed
|
155 |
* @param {String} token [Instagram API access token]
|
156 |
*/
|
157 |
-
this.addToken = function (token)
|
158 |
-
{
|
159 |
if (typeof token == 'string') {
|
160 |
_this.access_tokens.push(token);
|
161 |
}
|
162 |
}
|
163 |
|
164 |
-
this.resetTokens = function ()
|
165 |
-
{
|
166 |
_this.access_tokens = [];
|
167 |
}
|
168 |
|
@@ -200,7 +194,8 @@ function WDIInstagram(args) {
|
|
200 |
*
|
201 |
* @return object of founded media
|
202 |
*/
|
203 |
-
this.getTagRecentMedia = function (tagname, args, next_url, endpoint, iter
|
|
|
204 |
var instagram = this,
|
205 |
noArgument = false,
|
206 |
successFlag = false,
|
@@ -215,7 +210,6 @@ function WDIInstagram(args) {
|
|
215 |
noArgument = true;
|
216 |
}
|
217 |
else {
|
218 |
-
|
219 |
if ('success' in args) {
|
220 |
successFlag = true;
|
221 |
}
|
@@ -225,13 +219,11 @@ function WDIInstagram(args) {
|
|
225 |
if ('error' in args) {
|
226 |
errorFlag = true;
|
227 |
}
|
228 |
-
|
229 |
if ('args' in args) {
|
230 |
argFlag = true;
|
231 |
} else {
|
232 |
args.args = {};
|
233 |
}
|
234 |
-
|
235 |
if ('count' in args) {
|
236 |
args['count'] = parseInt(args['count']);
|
237 |
if (!Number.isInteger(args['count']) || args['count'] <= 0) {
|
@@ -316,23 +308,22 @@ function WDIInstagram(args) {
|
|
316 |
});
|
317 |
|
318 |
function success(response) {
|
319 |
-
if ( typeof response["data"] === 'undefined' )
|
|
|
|
|
320 |
if ( successFlag ) {
|
321 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
322 |
if (typeof window[args.success[0]] != 'undefined') {
|
323 |
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
324 |
-
|
325 |
window[args.success[0]][args.success[1]](response);
|
326 |
}
|
327 |
}
|
328 |
} else if ( typeof args.success == 'string' ) {
|
329 |
if ( typeof window[args.success] == 'function' ) {
|
330 |
-
|
331 |
window[args.success](response);
|
332 |
}
|
333 |
}
|
334 |
else if ( typeof args.success == 'function' ) {
|
335 |
-
|
336 |
args.success(response);
|
337 |
}
|
338 |
}
|
@@ -340,7 +331,6 @@ function WDIInstagram(args) {
|
|
340 |
}
|
341 |
|
342 |
this.getTagId = function (tagname) {
|
343 |
-
|
344 |
var feed_users = [];
|
345 |
if ( typeof wdi_controller !== 'undefined' ) {
|
346 |
feed_users = wdi_controller.feed_users;
|
@@ -1057,11 +1047,9 @@ function WDIInstagram(args) {
|
|
1057 |
* @return object of founded media
|
1058 |
*/
|
1059 |
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
this.getUserMedia = function (args, next_url = '', iter = 0) {
|
1065 |
var instagram = this,
|
1066 |
noArgument = false,
|
1067 |
successFlag = false,
|
@@ -1469,7 +1457,7 @@ function WDIInstagram(args) {
|
|
1469 |
* we may need it later . disabled now ?
|
1470 |
* may require custom permissions
|
1471 |
* */
|
1472 |
-
this.getRecentMediaComments = function (media_id, args)
|
1473 |
{
|
1474 |
var instagram = this,
|
1475 |
noArgument = false,
|
@@ -1493,72 +1481,79 @@ function WDIInstagram(args) {
|
|
1493 |
}
|
1494 |
}
|
1495 |
|
1496 |
-
var req_url = 'https://api.instagram.com/v1/media/' + media_id + '/comments?access_token=' + getAccessToken();
|
1497 |
-
var wdi_callback = function (cache_data) {
|
1498 |
-
if(cache_data === false){
|
1499 |
-
jQuery.ajax({
|
1500 |
-
type: 'POST',
|
1501 |
-
dataType: 'jsonp',
|
1502 |
-
url: req_url,
|
1503 |
-
success: function (response)
|
1504 |
-
{
|
1505 |
-
_this.setDataToCache(req_url,response);
|
1506 |
-
success(response);
|
1507 |
-
},
|
1508 |
-
error: function (response)
|
1509 |
-
{
|
1510 |
-
if (errorFlag) {
|
1511 |
-
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1512 |
-
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1513 |
-
window[args['error'][0]][args['error'][1]](response);
|
1514 |
-
}
|
1515 |
-
} else
|
1516 |
-
if (typeof args['error'] == 'string') {
|
1517 |
-
if (typeof window[args['error']] == 'function') {
|
1518 |
-
window[args['error']](response);
|
1519 |
-
}
|
1520 |
-
} else
|
1521 |
-
if (typeof args['error'] == 'function') {
|
1522 |
-
args['error'](response);
|
1523 |
-
}
|
1524 |
-
}
|
1525 |
-
},
|
1526 |
-
statusCode: statusCode
|
1527 |
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1542 |
}
|
1543 |
} else
|
1544 |
-
if (typeof args
|
1545 |
-
if (typeof window[args
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1546 |
if (filter) {
|
1547 |
response = filter(response, instagram.filterArguments);
|
1548 |
}
|
1549 |
-
window[args.success](response);
|
1550 |
}
|
1551 |
-
}
|
1552 |
-
|
|
|
|
|
1553 |
if (filter) {
|
1554 |
response = filter(response, instagram.filterArguments);
|
1555 |
}
|
1556 |
-
args.success(response);
|
|
|
|
|
|
|
|
|
|
|
1557 |
}
|
|
|
1558 |
}
|
1559 |
}
|
1560 |
}
|
1561 |
-
_this.getDataFromCache(wdi_callback, req_url);
|
1562 |
}
|
1563 |
|
1564 |
|
@@ -1671,168 +1666,6 @@ function WDIInstagram(args) {
|
|
1671 |
}
|
1672 |
|
1673 |
|
1674 |
-
/**
|
1675 |
-
* make an ajax request based on url
|
1676 |
-
*
|
1677 |
-
*
|
1678 |
-
* @definition success_callback => which function to call in case of success
|
1679 |
-
* @definition error_callback => which function to call in case of error
|
1680 |
-
* @definition statusCode => StatusCode object.
|
1681 |
-
*
|
1682 |
-
* @param args = {
|
1683 |
-
* success : 'success_callback',
|
1684 |
-
* error : 'error_callback',
|
1685 |
-
* statusCode : statusCode,
|
1686 |
-
* args.args : arguments to be passed to filter function
|
1687 |
-
* }
|
1688 |
-
*
|
1689 |
-
*
|
1690 |
-
* if callback function is property of any other object just give it as array [ 'parent_object', 'callback_function']
|
1691 |
-
* or you can pass as callback function an anonymous function
|
1692 |
-
*
|
1693 |
-
*
|
1694 |
-
* @return object of founded media
|
1695 |
-
*/
|
1696 |
-
this.requestByUrl = function (requestUrl, args)
|
1697 |
-
{
|
1698 |
-
var instagram = this,
|
1699 |
-
noArgument = false,
|
1700 |
-
successFlag = false,
|
1701 |
-
errorFlag = false,
|
1702 |
-
argFlag = false,
|
1703 |
-
statusCode = this.statusCode,
|
1704 |
-
filter = this.getFilter('requestByUrl'),
|
1705 |
-
urlParts,
|
1706 |
-
urlPart;
|
1707 |
-
|
1708 |
-
//changing access token to random one
|
1709 |
-
urlParts = requestUrl.split('?')[1].split('&');
|
1710 |
-
for (var i = 0; i < urlParts.length; i++) {
|
1711 |
-
urlParts[i] = urlParts[i].split('=');
|
1712 |
-
if (urlParts[i][0] == 'access_token') {
|
1713 |
-
urlParts[i][1] = getAccessToken();
|
1714 |
-
}
|
1715 |
-
urlParts[i] = urlParts[i].join('=');
|
1716 |
-
}
|
1717 |
-
urlParts = urlParts.join('&');
|
1718 |
-
requestUrl = requestUrl.split('?')[0] + '?' + urlParts;
|
1719 |
-
|
1720 |
-
|
1721 |
-
if (typeof args == 'undefined' || args.length === 0) {
|
1722 |
-
noArgument = true;
|
1723 |
-
} else {
|
1724 |
-
if ('success' in args) {
|
1725 |
-
successFlag = true;
|
1726 |
-
}
|
1727 |
-
|
1728 |
-
if ('args' in args) {
|
1729 |
-
argFlag = true;
|
1730 |
-
} else {
|
1731 |
-
args.args = {};
|
1732 |
-
}
|
1733 |
-
|
1734 |
-
|
1735 |
-
if ('error' in args) {
|
1736 |
-
errorFlag = true;
|
1737 |
-
}
|
1738 |
-
|
1739 |
-
if ('statusCode' in args) {
|
1740 |
-
statusCode = args['statusCode'];
|
1741 |
-
}
|
1742 |
-
}
|
1743 |
-
|
1744 |
-
var wdi_callback = function (cache_data) {
|
1745 |
-
if(cache_data === false){
|
1746 |
-
jQuery.ajax({
|
1747 |
-
type: 'POST',
|
1748 |
-
dataType: 'jsonp',
|
1749 |
-
url: requestUrl,
|
1750 |
-
success: function (response)
|
1751 |
-
{
|
1752 |
-
_this.setDataToCache(requestUrl,response);
|
1753 |
-
if (successFlag) {
|
1754 |
-
if (typeof args.success == 'object' && args.success.length == 2) {
|
1755 |
-
if (typeof window[args.success[0]] != 'undefined') {
|
1756 |
-
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
1757 |
-
if (filter) {
|
1758 |
-
response = filter(response, instagram.filterArguments, args.args);
|
1759 |
-
}
|
1760 |
-
window[args.success[0]][args.success[1]](response);
|
1761 |
-
}
|
1762 |
-
}
|
1763 |
-
} else
|
1764 |
-
if (typeof args.success == 'string') {
|
1765 |
-
if (typeof window[args.success] == 'function') {
|
1766 |
-
if (filter) {
|
1767 |
-
response = filter(response, instagram.filterArguments, args.args);
|
1768 |
-
}
|
1769 |
-
window[args.success](response);
|
1770 |
-
}
|
1771 |
-
} else
|
1772 |
-
if (typeof args.success == 'function') {
|
1773 |
-
if (filter) {
|
1774 |
-
response = filter(response, instagram.filterArguments, args.args);
|
1775 |
-
}
|
1776 |
-
args.success(response);
|
1777 |
-
}
|
1778 |
-
}
|
1779 |
-
},
|
1780 |
-
error: function (response)
|
1781 |
-
{
|
1782 |
-
if (errorFlag) {
|
1783 |
-
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1784 |
-
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1785 |
-
window[args['error'][0]][args['error'][1]](response);
|
1786 |
-
}
|
1787 |
-
} else
|
1788 |
-
if (typeof args['error'] == 'string') {
|
1789 |
-
if (typeof window[args['error']] == 'function') {
|
1790 |
-
window[args['error']](response);
|
1791 |
-
}
|
1792 |
-
} else
|
1793 |
-
if (typeof args['error'] == 'function') {
|
1794 |
-
args['error'](response);
|
1795 |
-
}
|
1796 |
-
}
|
1797 |
-
},
|
1798 |
-
statusCode: statusCode
|
1799 |
-
});
|
1800 |
-
}
|
1801 |
-
else{
|
1802 |
-
success(cache_data);
|
1803 |
-
}
|
1804 |
-
function success(response) {
|
1805 |
-
if (successFlag) {
|
1806 |
-
if (typeof args.success == 'object' && args.success.length == 2) {
|
1807 |
-
if (typeof window[args.success[0]] != 'undefined') {
|
1808 |
-
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
1809 |
-
if (filter) {
|
1810 |
-
response = filter(response, instagram.filterArguments, args.args);
|
1811 |
-
}
|
1812 |
-
window[args.success[0]][args.success[1]](response);
|
1813 |
-
}
|
1814 |
-
}
|
1815 |
-
} else
|
1816 |
-
if (typeof args.success == 'string') {
|
1817 |
-
if (typeof window[args.success] == 'function') {
|
1818 |
-
if (filter) {
|
1819 |
-
response = filter(response, instagram.filterArguments, args.args);
|
1820 |
-
}
|
1821 |
-
window[args.success](response);
|
1822 |
-
}
|
1823 |
-
} else
|
1824 |
-
if (typeof args.success == 'function') {
|
1825 |
-
if (filter) {
|
1826 |
-
response = filter(response, instagram.filterArguments, args.args);
|
1827 |
-
}
|
1828 |
-
args.success(response);
|
1829 |
-
}
|
1830 |
-
}
|
1831 |
-
}
|
1832 |
-
}
|
1833 |
-
_this.getDataFromCache(wdi_callback, requestUrl);
|
1834 |
-
}
|
1835 |
-
|
1836 |
this.getDataFromCache = function (callback, cache_name, async) {
|
1837 |
if(typeof async === "undefined"){
|
1838 |
async = true;
|
6 |
* Author: Melik Karapetyan
|
7 |
* License: GPLv2 or later
|
8 |
*
|
|
|
|
|
|
|
|
|
9 |
* Methods:
|
10 |
* getSelfInfo = function( args ) : Get information about the owner of the access_token.
|
11 |
* searchForUsersByName = function( username, args ) : Get a list of users matching the query.
|
12 |
+
* searchForTagsByName = function(tagname, args) : Search for tags by name.
|
13 |
+
* getTagRecentMedia = function(tagname, args) : Gets recent media based on tagname
|
14 |
*
|
15 |
*/
|
16 |
|
150 |
* non string values are not allowed
|
151 |
* @param {String} token [Instagram API access token]
|
152 |
*/
|
153 |
+
this.addToken = function (token) {
|
|
|
154 |
if (typeof token == 'string') {
|
155 |
_this.access_tokens.push(token);
|
156 |
}
|
157 |
}
|
158 |
|
159 |
+
this.resetTokens = function () {
|
|
|
160 |
_this.access_tokens = [];
|
161 |
}
|
162 |
|
194 |
*
|
195 |
* @return object of founded media
|
196 |
*/
|
197 |
+
this.getTagRecentMedia = function (tagname, args, next_url, endpoint, iter) {
|
198 |
+
iter = (iter === undefined || typeof iter !== 'number') ? 0 : iter;
|
199 |
var instagram = this,
|
200 |
noArgument = false,
|
201 |
successFlag = false,
|
210 |
noArgument = true;
|
211 |
}
|
212 |
else {
|
|
|
213 |
if ('success' in args) {
|
214 |
successFlag = true;
|
215 |
}
|
219 |
if ('error' in args) {
|
220 |
errorFlag = true;
|
221 |
}
|
|
|
222 |
if ('args' in args) {
|
223 |
argFlag = true;
|
224 |
} else {
|
225 |
args.args = {};
|
226 |
}
|
|
|
227 |
if ('count' in args) {
|
228 |
args['count'] = parseInt(args['count']);
|
229 |
if (!Number.isInteger(args['count']) || args['count'] <= 0) {
|
308 |
});
|
309 |
|
310 |
function success(response) {
|
311 |
+
if ( typeof response["data"] === 'undefined' ) {
|
312 |
+
response["data"] = [];
|
313 |
+
}
|
314 |
if ( successFlag ) {
|
315 |
if (typeof args.success == 'object' && args.success.length == 2) {
|
316 |
if (typeof window[args.success[0]] != 'undefined') {
|
317 |
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
|
|
318 |
window[args.success[0]][args.success[1]](response);
|
319 |
}
|
320 |
}
|
321 |
} else if ( typeof args.success == 'string' ) {
|
322 |
if ( typeof window[args.success] == 'function' ) {
|
|
|
323 |
window[args.success](response);
|
324 |
}
|
325 |
}
|
326 |
else if ( typeof args.success == 'function' ) {
|
|
|
327 |
args.success(response);
|
328 |
}
|
329 |
}
|
331 |
}
|
332 |
|
333 |
this.getTagId = function (tagname) {
|
|
|
334 |
var feed_users = [];
|
335 |
if ( typeof wdi_controller !== 'undefined' ) {
|
336 |
feed_users = wdi_controller.feed_users;
|
1047 |
* @return object of founded media
|
1048 |
*/
|
1049 |
|
1050 |
+
this.getUserMedia = function (args, next_url, iter) {
|
1051 |
+
next_url = (next_url === undefined) ? '' : next_url;
|
1052 |
+
iter = (iter === undefined || typeof iter !== 'number') ? 0 : iter;
|
|
|
|
|
1053 |
var instagram = this,
|
1054 |
noArgument = false,
|
1055 |
successFlag = false,
|
1457 |
* we may need it later . disabled now ?
|
1458 |
* may require custom permissions
|
1459 |
* */
|
1460 |
+
this.getRecentMediaComments = function (media_id, args, next)
|
1461 |
{
|
1462 |
var instagram = this,
|
1463 |
noArgument = false,
|
1481 |
}
|
1482 |
}
|
1483 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1484 |
|
1485 |
+
jQuery(".wdi_comment_container #ajax_loading #opacity_div").css("display","block");
|
1486 |
+
jQuery(".wdi_comment_container #ajax_loading #loading_div").css("display","block");
|
1487 |
+
|
1488 |
+
jQuery.ajax({
|
1489 |
+
type: 'POST',
|
1490 |
+
url: wdi_ajax.ajax_url,
|
1491 |
+
dataType:"json",
|
1492 |
+
data: {
|
1493 |
+
wdi_nonce:wdi_ajax.wdi_nonce,
|
1494 |
+
action:"wdi_getRecentMediaComments",
|
1495 |
+
user_name:getUserName(),
|
1496 |
+
media_id:media_id,
|
1497 |
+
next:next
|
1498 |
+
},
|
1499 |
+
success: function (response)
|
1500 |
+
{
|
1501 |
+
success(response);
|
1502 |
+
},
|
1503 |
+
complete : function() {
|
1504 |
+
jQuery(".wdi_comment_container #ajax_loading #opacity_div").css("display","none");
|
1505 |
+
jQuery(".wdi_comment_container #ajax_loading #loading_div").css("display","none");
|
1506 |
+
},
|
1507 |
+
error: function (response)
|
1508 |
+
{
|
1509 |
+
if (errorFlag) {
|
1510 |
+
if (typeof args['error'] == 'object' && args['error'].length == 2) {
|
1511 |
+
if (typeof window[args['error'][0]][args['error'][1]] == 'function') {
|
1512 |
+
window[args['error'][0]][args['error'][1]](response);
|
1513 |
}
|
1514 |
} else
|
1515 |
+
if (typeof args['error'] == 'string') {
|
1516 |
+
if (typeof window[args['error']] == 'function') {
|
1517 |
+
window[args['error']](response);
|
1518 |
+
}
|
1519 |
+
} else
|
1520 |
+
if (typeof args['error'] == 'function') {
|
1521 |
+
args['error'](response);
|
1522 |
+
}
|
1523 |
+
}
|
1524 |
+
},
|
1525 |
+
statusCode: statusCode
|
1526 |
+
|
1527 |
+
});
|
1528 |
+
|
1529 |
+
function success(response) {
|
1530 |
+
if (successFlag) {
|
1531 |
+
if (typeof args.success == 'object' && args.success.length == 2) {
|
1532 |
+
if (typeof window[args.success[0]] != 'undefined') {
|
1533 |
+
if (typeof window[args.success[0]][args.success[1]] == 'function') {
|
1534 |
if (filter) {
|
1535 |
response = filter(response, instagram.filterArguments);
|
1536 |
}
|
1537 |
+
window[args.success[0]][args.success[1]](response);
|
1538 |
}
|
1539 |
+
}
|
1540 |
+
} else
|
1541 |
+
if (typeof args.success == 'string') {
|
1542 |
+
if (typeof window[args.success] == 'function') {
|
1543 |
if (filter) {
|
1544 |
response = filter(response, instagram.filterArguments);
|
1545 |
}
|
1546 |
+
window[args.success](response);
|
1547 |
+
}
|
1548 |
+
} else
|
1549 |
+
if (typeof args.success == 'function') {
|
1550 |
+
if (filter) {
|
1551 |
+
response = filter(response, instagram.filterArguments);
|
1552 |
}
|
1553 |
+
args.success(response);
|
1554 |
}
|
1555 |
}
|
1556 |
}
|
|
|
1557 |
}
|
1558 |
|
1559 |
|
1666 |
}
|
1667 |
|
1668 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1669 |
this.getDataFromCache = function (callback, cache_name, async) {
|
1670 |
if(typeof async === "undefined"){
|
1671 |
async = true;
|
js/wdi_instagram.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function WDIInstagram(e){this.user={},this.access_tokens=[],this.filters=[],void 0!==e&&(void 0!==e.access_tokens&&(this.access_tokens=e.access_tokens),void 0!==e.filters&&(this.filters=e.filters));var s=this;function t(){return void 0!==s.user&&void 0!==s.user.user_name?s.user.user_name:"undefined"!=typeof wdi_object&&void 0!==wdi_object.user?wdi_object.user.user_name:""}function r(){return void 0!==s.user&&void 0!==s.user.access_token?s.user.access_token:"undefined"!=typeof wdi_object&&void 0!==wdi_object.user&&void 0!==wdi_object.user.access_token?wdi_object.user.access_token:""}this.statusCode={429:function(){console.log(" 429: Too many requests. Try after one hour")}},this.getFilter=function(e){var t=s.filters;if(void 0===t)return!1;for(var r=0;r<t.length;r++)if(t[r].where==e)if("object"==typeof t[r].what&&2==t[r].what.length){if(void 0!==window[t[r].what[0]]&&"function"==typeof window[t[r].what[0]][t[r].what[1]])return window[t[r].what[0]][t[r].what[1]]}else{if("string"!=typeof t[r].what)return"function"==typeof t[r].what&&t[r].what;if("function"==typeof window[t[r].what])return window[t[r].what]}return!1},this.addToken=function(e){"string"==typeof e&&s.access_tokens.push(e)},this.resetTokens=function(){s.access_tokens=[]};var o=0,i={data:new Array,paging:{}};this.getTagRecentMedia=function(e,r,n,c,u=0){var a=!1,d=this.statusCode,f=!1;this.getFilter("getTagRecentMedia");c=0===parseInt(c)?"top_media":"recent_media",void 0===r||0===r.length||("success"in r&&(a=!0),"statusCode"in r&&(d=r.statusCode),"error"in r&&(f=!0),"args"in r?!0:r.args={},"count"in r?(r.count=parseInt(r.count),(!Number.isInteger(r.count)||r.count<=0)&&(r.count=33)):r.count=33);var w=this.getTagId(e);jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{iter:u,tagname:e,endpoint:c,wdi_nonce:wdi_ajax.wdi_nonce,wdiTagId:w,next_url:n,user_name:t(),action:"wdi_getTagRecentMedia",feed_id:wdi_ajax.feed_id},success:function(t){if(void 0!==t.error&&o<5)o++,s.getTagRecentMedia(e,r,n,c,u);else if(void 0!==t.response&&void 0!==t.response.iter&&i.data.length<parseInt(wdi_ajax.number_of_photos)&&u<10&&""!=t.response.paging.next)n=t.response.paging.next,i.data=i.data.concat(t.response.data),i.paging=t.response.paging,s.getTagRecentMedia(e,r,n,c,t.response.iter);else{if(0!=i.data.length&&(t.response=i),!1===w&&(w=""),void 0!==t.tag_data){var d=t.tag_data;void 0!==d.tag_id&&(w=d.tag_id);var f=[];void 0!==window.wdi_all_tags&&(f=window.wdi_all_tags),f[d.tag_id]=d,window.wdi_all_tags=f}t=t.response,(t=s.convertHashtagData(t)).meta={code:200},t.tag_id=w,function(e){void 0===e.data&&(e.data=[]);a&&("object"==typeof r.success&&2==r.success.length?void 0!==window[r.success[0]]&&"function"==typeof window[r.success[0]][r.success[1]]&&window[r.success[0]][r.success[1]](e):"string"==typeof r.success?"function"==typeof window[r.success]&&window[r.success](e):"function"==typeof r.success&&r.success(e))}(t)}},error:function(e){f&&("object"==typeof r.error&&2==r.error.length?"function"==typeof window[r.error[0]][r.error[1]]&&window[r.error[0]][r.error[1]](e):"string"==typeof r.error?"function"==typeof window[r.error]&&window[r.error](e):"function"==typeof r.error&&r.error(e))},statusCode:d})},this.getTagId=function(e){var s=[];if("undefined"!=typeof wdi_controller){if(0===(s=wdi_controller.feed_users).length){var t=jQuery("#WDI_feed_users").val();void 0!==t&&""!==t&&(s=JSON.parse(t))}}else void 0!==window.wdi_all_tags&&(s=window.wdi_all_tags);for(var r in s)if(e===s[r].username||"#"+e===s[r].username)return void 0!==s[r].tag_id&&s[r].tag_id;return!1},this.convertHashtagData=function(e){var s={data:[],pagination:{}};if(void 0!==e&&void 0!==e.paging&&(s.pagination={cursors:{after:e.paging.cursors.after},next_url:e.paging.next}),void 0!==e&&void 0!==e.data)for(var t in e.data){var r,o=e.data[t];r="IMAGE"===o.media_type?"image":"VIDEO"===o.media_type?"video":"carousel";var i={id:o.id,user:{id:"",full_name:"",profile_picture:"",username:""},images:{thumbnail:{width:150,height:150,url:o.media_url},low_resolution:{width:320,height:320,url:o.media_url},standard_resolution:{width:1080,height:1080,url:o.media_url}},created_time:o.timestamp,caption:{id:"",text:o.caption,created_time:"",from:{id:"",full_name:"",profile_picture:"",username:""}},user_has_liked:o.like_count>0,likes:{count:o.like_count},tags:[],filter:"Normal",comments:{count:o.comments_count},type:r,link:o.permalink,location:null,attribution:null,users_in_photo:[]};if("IMAGE"===o.media_type||"CAROUSEL_ALBUM"===o.media_type?i.images={thumbnail:{width:150,height:150,url:o.media_url},low_resolution:{width:320,height:320,url:o.media_url},standard_resolution:{width:1080,height:1080,url:o.media_url}}:"VIDEO"===o.media_type&&(i.videos={standard_resolution:{width:640,height:800,url:o.thumb_url},low_bandwidth:{width:480,height:600,url:o.thumb_url},low_resolution:{width:480,height:600,url:o.thumb_url}}),"CAROUSEL_ALBUM"===o.media_type)for(var n in i.carousel_media=[],o.children.data){if("IMAGE"===o.children.data[n].media_type)var c={images:{thumbnail:{width:150,height:150,url:o.children.data[n].media_url},low_resolution:{width:320,height:320,url:o.children.data[n].media_url},standard_resolution:{width:640,height:640,url:o.children.data[n].media_url}},users_in_photo:[],type:"image"};else c={videos:{standard_resolution:{width:640,height:800,url:o.children.data[n].media_url,id:o.children.data[n].id},low_bandwidth:{width:480,height:600,url:o.children.data[n].media_url,id:o.children.data[n].id},low_resolution:{width:480,height:600,url:o.children.data[n].media_url,id:o.children.data[n].id}},users_in_photo:[],type:"video"};i.carousel_media.push(c)}s.data.push(i)}return s},this.searchForTagsByName=function(e,t){var o=this,i=!1,n=this.statusCode,c=!1;filter=this.getFilter("searchForTagsByName"),void 0===t||0===t.length||("success"in t&&(i=!0),"error"in t&&(c=!0),"statusCode"in t&&(n=t.statusCode));var u="https://api.instagram.com/v1/tags/search?q="+e+"&access_token="+r();s.getDataFromCache(function(e){function r(e){i&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(filter&&(e=filter(e,o.filterArguments)),window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(filter&&(e=filter(e,o.filterArguments)),window[t.success](e)):"function"==typeof t.success&&(filter&&(e=filter(e,o.filterArguments)),t.success(e)))}!1===e?jQuery.ajax({type:"POST",url:u,dataType:"jsonp",success:function(e){s.setDataToCache(u,e),r(e)},error:function(e){c&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:n}):r(e)},u)},this.searchForUsersByName=function(e,s){var t=this,o=!1,i=(this.statusCode,!1),n=this.getFilter("searchForUsersByName");void 0===s||0===s.length||("success"in s&&(o=!0),"error"in s&&(i=!0),"statusCode"in s&&s.statusCode),jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/search?q="+e+"&access_token="+r(),success:function(e){o&&("object"==typeof s.success&&2==s.success.length?void 0!==window[s.success[0]]&&"function"==typeof window[s.success[0]][s.success[1]]&&(n&&(e=n(e,t.filterArguments)),e.args=s,window[s.success[0]][s.success[1]](e)):"string"==typeof s.success?"function"==typeof window[s.success]&&(n&&(e=n(e,t.filterArguments)),e.args=s,window[s.success](e)):"function"==typeof s.success&&(n&&(e=n(e,t.filterArguments)),e.args=s,s.success(e)))},error:function(e){i&&("object"==typeof s.error&&2==s.error.length?"function"==typeof window[s.error[0]][s.error[1]]&&window[s.error[0]][s.error[1]](e):"string"==typeof s.error?"function"==typeof window[s.error]&&window[s.error](e):"function"==typeof s.error&&s.error(e))},statusCode:this.statusCode})},this.getRecentLikedMedia=function(e){var s=this,t=!1,o=this.statusCode,i=!1,n=this.getFilter("getRecentLikedMedia"),c="https://api.instagram.com/v1/users/self/media/liked?access_token="+r();void 0===e||0===e.length||("success"in e&&(t=!0),"error"in e&&(i=!0),"statusCode"in e&&(o=e.statusCode),"args"in e?argFlag=!0:e.args={},"count"in e?(e.count=parseInt(e.count),(!Number.isInteger(e.count)||e.count<=0)&&(e.count=20)):e.count=20,c+="&count="+e.count,"next_max_like_id"in e&&(c+="&next_max_like_id="+e.next_max_like_id)),jQuery.ajax({type:"POST",dataType:"jsonp",url:c,success:function(r){t&&("object"==typeof e.success&&2==e.success.length?void 0!==window[e.success[0]]&&"function"==typeof window[e.success[0]][e.success[1]]&&(n&&(r=n(r,s.filterArguments,e.args)),window[e.success[0]][e.success[1]](r)):"string"==typeof e.success?"function"==typeof window[e.success]&&(n&&(r=n(r,s.filterArguments,e.args)),window[e.success](r)):"function"==typeof e.success&&(n&&(r=n(r,s.filterArguments,e.args)),e.success(r)))},error:function(s){i&&("object"==typeof e.error&&2==e.error.length?"function"==typeof window[e.error[0]][e.error[1]]&&window[e.error[0]][e.error[1]](s):"string"==typeof e.error?"function"==typeof window[e.error]&&window[e.error](s):"function"==typeof e.error&&e.error(s))},statusCode:o})},this.getUserRecentMedia=function(e,s){var t=this,o=!1,i=this.statusCode,n=!1,c=this.getFilter("getUserRecentMedia"),u="https://api.instagram.com/v1/users/"+e+"/media/recent/?access_token="+r();void 0===s||0===s.length||("success"in s&&(o=!0),"statusCode"in s&&(i=s.statusCode),"args"in s?!0:s.args={},"error"in s&&(n=!0),"count"in s?(s.count=parseInt(s.count),(!Number.isInteger(s.count)||s.count<=0)&&(s.count=33)):s.count=33,u+="&count="+s.count,"min_id"in s&&(u+="&min_id="+s.min_id),"max_id"in s&&(u+="&max_id="+s.max_id)),jQuery.ajax({type:"POST",dataType:"jsonp",url:u,success:function(e){void 0===e.data&&(e.data=[]),o&&("object"==typeof s.success&&2==s.success.length?void 0!==window[s.success[0]]&&"function"==typeof window[s.success[0]][s.success[1]]&&(c&&(e=c(e,t.filterArguments,s.args)),window[s.success[0]][s.success[1]](e)):"string"==typeof s.success?"function"==typeof window[s.success]&&(c&&(e=c(e,t.filterArguments,s.args)),window[s.success](e)):"function"==typeof s.success&&(c&&(e=c(e,t.filterArguments,s.args)),s.success(e)))},error:function(e){n&&("object"==typeof s.error&&2==s.error.length?"function"==typeof window[s.error[0]][s.error[1]]&&window[s.error[0]][s.error[1]](e):"string"==typeof s.error?"function"==typeof window[s.error]&&window[s.error](e):"function"==typeof s.error&&s.error(e))},statusCode:i})},this.getUserMedia=function(e,r="",n=0){var c=this,u=!1,a=this.statusCode,d=!1,f=this.getFilter("getUserMedia");void 0===e||0===e.length||("success"in e&&(u=!0),"error"in e&&(d=!0),"statusCode"in e&&(a=e.statusCode),"args"in e?!0:e.args={},"count"in e?(e.count=parseInt(e.count),(!Number.isInteger(e.count)||e.count<=0)&&(e.count=20)):e.count=20),jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_nonce:wdi_ajax.wdi_nonce,action:"wdi_getUserMedia",user_name:t(),feed_id:wdi_ajax.feed_id,next_url:r,iter:n},success:function(t){if(void 0!==t.error&&o<5)return o++,void s.getUserMedia(e,r,t.iter);void 0!==t.iter&&i.data.length<parseInt(wdi_ajax.number_of_photos)&&n<20&&""!=t.pagination.next_url?(r=t.pagination.next_url,i.data=i.data.concat(t.data),i.pagination=t.pagination,s.getUserMedia(e,r,t.iter)):(0!=i.data.length&&(t=i),t.meta={code:200},u&&("object"==typeof e.success&&2==e.success.length?void 0!==window[e.success[0]]&&"function"==typeof window[e.success[0]][e.success[1]]&&(f&&(t=s.addTags(t),t=f(t,c.filterArguments,e)),window[e.success[0]][e.success[1]](t)):"string"==typeof e.success?"function"==typeof window[e.success]&&(f&&(t=s.addTags(t),t=f(t,c.filterArguments,e)),window[e.success](t)):"function"==typeof e.success&&e.success(t)))},error:function(s){d&&("object"==typeof e.error&&2==e.error.length?"function"==typeof window[e.error[0]][e.error[1]]&&window[e.error[0]][e.error[1]](s):"string"==typeof e.error?"function"==typeof window[e.error]&&window[e.error](s):"function"==typeof e.error&&e.error(s))},statusCode:a})},this.getUserInfo=function(e,s){var t=this,o=!1,i=this.statusCode,n=!1,c=this.getFilter("getUserInfo");void 0===s||0===s.length||("success"in s&&(o=!0),"error"in s&&(n=!0),"statusCode"in s&&(i=s.statusCode)),jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/"+e+"/?access_token="+r(),success:function(e){o&&("object"==typeof s.success&&2==s.success.length?void 0!==window[s.success[0]]&&"function"==typeof window[s.success[0]][s.success[1]]&&(c&&(e=c(e,t.filterArguments)),window[s.success[0]][s.success[1]](e)):"string"==typeof s.success?"function"==typeof window[s.success]&&(c&&(e=c(e,t.filterArguments)),window[s.success](e)):"function"==typeof s.success&&(c&&(e=c(e,t.filterArguments)),s.success(e)))},error:function(e){n&&("object"==typeof s.error&&2==s.error.length?"function"==typeof window[s.error[0]][s.error[1]]&&window[s.error[0]][s.error[1]](e):"string"==typeof s.error?"function"==typeof window[s.error]&&window[s.error](e):"function"==typeof s.error&&s.error(e))},statusCode:i})},this.getSelfInfo=function(e){var t=this,o=!1,i=this.statusCode,n=!1,c=this.getFilter("getSelfInfo");void 0===e||0===e.length||("success"in e&&(o=!0),"error"in e&&(n=!0),"statusCode"in e&&(i=e.statusCode));var u="https://graph.facebook.com/v3.2/"+(void 0!==s.user&&void 0!==s.user.user_id?s.user.user_id:"undefined"!=typeof wdi_object&&void 0!==wdi_object.user?wdi_object.user.user_id:"")+"?fields=id,ig_id,username,name,biography,profile_picture_url,followers_count,follows_count,media_count,website&access_token="+r();s.getDataFromCache(function(r){var a;!1===r?jQuery.ajax({type:"POST",dataType:"jsonp",url:u,statusCode:i,success:function(r){s.setDataToCache(u,r),o&&("object"==typeof e.success&&2==e.success.length?void 0!==window[e.success[0]]&&"function"==typeof window[e.success[0]][e.success[1]]&&(c&&(r.meta={code:200},r=c(r,t.filterArguments)),window[e.success[0]][e.success[1]](r)):"string"==typeof e.success?"function"==typeof window[e.success]&&(c&&(r.meta={code:200},r=c(r,t.filterArguments)),window[e.success](r)):"function"==typeof e.success&&(c&&(r.meta={code:200},r=c(r,t.filterArguments)),e.success(r)))},error:function(s){n&&("object"==typeof e.error&&2==e.error.length?"function"==typeof window[e.error[0]][e.error[1]]&&window[e.error[0]][e.error[1]](s):"string"==typeof e.error?"function"==typeof window[e.error]&&window[e.error](s):"function"==typeof e.error&&e.error(s))}}):(a=r,o&&("object"==typeof e.success&&2==e.success.length?void 0!==window[e.success[0]]&&"function"==typeof window[e.success[0]][e.success[1]]&&(c&&(a=c(a,t.filterArguments)),window[e.success[0]][e.success[1]](a)):"string"==typeof e.success?"function"==typeof window[e.success]&&(c&&(a=c(a,t.filterArguments)),window[e.success](a)):"function"==typeof e.success&&(c&&(a=c(a,t.filterArguments)),e.success(a))))},u)},this.getRecentMediaComments=function(e,t){var o=this,i=!1,n=this.statusCode,c=!1,u=this.getFilter("getRecentMediaComments");void 0===t||0===t.length||("success"in t&&(i=!0),"error"in t&&(c=!0),"statusCode"in t&&(n=t.statusCode));var a="https://api.instagram.com/v1/media/"+e+"/comments?access_token="+r();s.getDataFromCache(function(e){function r(e){i&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(u&&(e=u(e,o.filterArguments)),window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(u&&(e=u(e,o.filterArguments)),window[t.success](e)):"function"==typeof t.success&&(u&&(e=u(e,o.filterArguments)),t.success(e)))}!1===e?jQuery.ajax({type:"POST",dataType:"jsonp",url:a,success:function(e){s.setDataToCache(a,e),r(e)},error:function(e){c&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:n}):r(e)},a)},this.getRecentMediaLikes=function(e,s){var t=this,o=!1,i=this.statusCode,n=!1,c=this.getFilter("getRecentMediaLikes");void 0===s||0===s.length||("success"in s&&(o=!0),"error"in s&&(n=!0),"statusCode"in s&&(i=s.statusCode)),jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/media/"+e+"/likes?access_token="+r(),success:function(e){o&&("object"==typeof s.success&&2==s.success.length?void 0!==window[s.success[0]]&&"function"==typeof window[s.success[0]][s.success[1]]&&(c&&(e=c(e,t.filterArguments)),window[s.success[0]][s.success[1]](e)):"string"==typeof s.success?"function"==typeof window[s.success]&&(c&&(e=c(e,t.filterArguments)),window[s.success](e)):"function"==typeof s.success&&(c&&(e=c(e,t.filterArguments)),s.success(e)))},error:function(e){n&&("object"==typeof s.error&&2==s.error.length?"function"==typeof window[s.error[0]][s.error[1]]&&window[s.error[0]][s.error[1]](e):"string"==typeof s.error?"function"==typeof window[s.error]&&window[s.error](e):"function"==typeof s.error&&s.error(e))},statusCode:i})},this.requestByUrl=function(e,t){var o,i=this,n=!1,c=!1,u=this.statusCode,a=this.getFilter("requestByUrl");o=e.split("?")[1].split("&");for(var d=0;d<o.length;d++)o[d]=o[d].split("="),"access_token"==o[d][0]&&(o[d][1]=r()),o[d]=o[d].join("=");o=o.join("&"),e=e.split("?")[0]+"?"+o,void 0===t||0===t.length||("success"in t&&(n=!0),"args"in t?!0:t.args={},"error"in t&&(c=!0),"statusCode"in t&&(u=t.statusCode));s.getDataFromCache(function(r){var o;!1===r?jQuery.ajax({type:"POST",dataType:"jsonp",url:e,success:function(r){s.setDataToCache(e,r),n&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(a&&(r=a(r,i.filterArguments,t.args)),window[t.success[0]][t.success[1]](r)):"string"==typeof t.success?"function"==typeof window[t.success]&&(a&&(r=a(r,i.filterArguments,t.args)),window[t.success](r)):"function"==typeof t.success&&(a&&(r=a(r,i.filterArguments,t.args)),t.success(r)))},error:function(e){c&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:u}):(o=r,n&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(a&&(o=a(o,i.filterArguments,t.args)),window[t.success[0]][t.success[1]](o)):"string"==typeof t.success?"function"==typeof window[t.success]&&(a&&(o=a(o,i.filterArguments,t.args)),window[t.success](o)):"function"==typeof t.success&&(a&&(o=a(o,i.filterArguments,t.args)),t.success(o))))},e)},this.getDataFromCache=function(e,s,t){void 0===t&&(t=!0),jQuery.ajax({type:"POST",async:t,url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_cache_name:s,wdi_nonce:wdi_ajax.wdi_nonce,WDI_MINIFY:wdi_ajax.WDI_MINIFY,task:"get",action:"wdi_cache"},success:function(s){if(s.success)if(void 0!==s.cache_data&&null!==s.cache_data){var t=JSON.parse(s.cache_data);e(t)}else e(!1);else e(!1)}})},this.setDataToCache=function(e,s){jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_cache_name:e,wdi_cache_response:JSON.stringify(s),wdi_nonce:wdi_ajax.wdi_nonce,task:"set",action:"wdi_cache"},success:function(e){}})}}
|
1 |
+
function WDIInstagram(e){this.user={},this.access_tokens=[],this.filters=[],void 0!==e&&(void 0!==e.access_tokens&&(this.access_tokens=e.access_tokens),void 0!==e.filters&&(this.filters=e.filters));var d=this;function f(){return void 0!==d.user&&void 0!==d.user.user_name?d.user.user_name:"undefined"!=typeof wdi_object&&void 0!==wdi_object.user?wdi_object.user.user_name:""}function u(){return void 0!==d.user&&void 0!==d.user.access_token?d.user.access_token:"undefined"!=typeof wdi_object&&void 0!==wdi_object.user&&void 0!==wdi_object.user.access_token?wdi_object.user.access_token:""}this.statusCode={429:function(){console.log(" 429: Too many requests. Try after one hour")}},this.getFilter=function(e){var t=d.filters;if(void 0===t)return!1;for(var s=0;s<t.length;s++)if(t[s].where==e)if("object"==typeof t[s].what&&2==t[s].what.length){if(void 0!==window[t[s].what[0]]&&"function"==typeof window[t[s].what[0]][t[s].what[1]])return window[t[s].what[0]][t[s].what[1]]}else{if("string"!=typeof t[s].what)return"function"==typeof t[s].what&&t[s].what;if("function"==typeof window[t[s].what])return window[t[s].what]}return!1},this.addToken=function(e){"string"==typeof e&&d.access_tokens.push(e)},this.resetTokens=function(){d.access_tokens=[]};var w=0,l={data:new Array,paging:{}};this.getTagRecentMedia=function(o,r,i,n,c){c=void 0===c||"number"!=typeof c?0:c;var a=!1,e=this.statusCode,t=!1;this.getFilter("getTagRecentMedia");n=0===parseInt(n)?"top_media":"recent_media",void 0===r||0===r.length||("success"in r&&(a=!0),"statusCode"in r&&(e=r.statusCode),"error"in r&&(t=!0),"args"in r||(r.args={}),"count"in r?(r.count=parseInt(r.count),(!Number.isInteger(r.count)||r.count<=0)&&(r.count=33)):r.count=33);var u=this.getTagId(o);jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{iter:c,tagname:o,endpoint:n,wdi_nonce:wdi_ajax.wdi_nonce,wdiTagId:u,next_url:i,user_name:f(),action:"wdi_getTagRecentMedia",feed_id:wdi_ajax.feed_id},success:function(e){var t,s;void 0!==e.error&&w<5?(w++,d.getTagRecentMedia(o,r,i,n,c)):void 0!==e.response&&void 0!==e.response.iter&&l.data.length<parseInt(wdi_ajax.number_of_photos)&&c<10&&""!=e.response.paging.next?(i=e.response.paging.next,l.data=l.data.concat(e.response.data),l.paging=e.response.paging,d.getTagRecentMedia(o,r,i,n,e.response.iter)):(0!=l.data.length&&(e.response=l),!1===u&&(u=""),void 0!==e.tag_data&&(void 0!==(t=e.tag_data).tag_id&&(u=t.tag_id),s=[],void 0!==window.wdi_all_tags&&(s=window.wdi_all_tags),s[t.tag_id]=t,window.wdi_all_tags=s),e=e.response,(e=d.convertHashtagData(e)).meta={code:200},e.tag_id=u,function(e){void 0===e.data&&(e.data=[]);a&&("object"==typeof r.success&&2==r.success.length?void 0!==window[r.success[0]]&&"function"==typeof window[r.success[0]][r.success[1]]&&window[r.success[0]][r.success[1]](e):"string"==typeof r.success?"function"==typeof window[r.success]&&window[r.success](e):"function"==typeof r.success&&r.success(e))}(e))},error:function(e){t&&("object"==typeof r.error&&2==r.error.length?"function"==typeof window[r.error[0]][r.error[1]]&&window[r.error[0]][r.error[1]](e):"string"==typeof r.error?"function"==typeof window[r.error]&&window[r.error](e):"function"==typeof r.error&&r.error(e))},statusCode:e})},this.getTagId=function(e){var t,s,o=[];for(s in"undefined"!=typeof wdi_controller?0!==(o=wdi_controller.feed_users).length||void 0!==(t=jQuery("#WDI_feed_users").val())&&""!==t&&(o=JSON.parse(t)):void 0!==window.wdi_all_tags&&(o=window.wdi_all_tags),o)if(e===o[s].username||"#"+e===o[s].username)return void 0!==o[s].tag_id&&o[s].tag_id;return!1},this.convertHashtagData=function(e){var t={data:[],pagination:{}};if(void 0!==e&&void 0!==e.paging&&(t.pagination={cursors:{after:e.paging.cursors.after},next_url:e.paging.next}),void 0!==e&&void 0!==e.data)for(var s in e.data){var o,r=e.data[s],i="IMAGE"===r.media_type?"image":"VIDEO"===r.media_type?"video":"carousel",n={id:r.id,user:{id:"",full_name:"",profile_picture:"",username:""},images:{thumbnail:{width:150,height:150,url:r.media_url},low_resolution:{width:320,height:320,url:r.media_url},standard_resolution:{width:1080,height:1080,url:r.media_url}},created_time:r.timestamp,caption:{id:"",text:r.caption,created_time:"",from:{id:"",full_name:"",profile_picture:"",username:""}},user_has_liked:0<r.like_count,likes:{count:r.like_count},tags:[],filter:"Normal",comments:{count:r.comments_count},type:i,link:r.permalink,location:null,attribution:null,users_in_photo:[]};if("IMAGE"===r.media_type||"CAROUSEL_ALBUM"===r.media_type?n.images={thumbnail:{width:150,height:150,url:r.media_url},low_resolution:{width:320,height:320,url:r.media_url},standard_resolution:{width:1080,height:1080,url:r.media_url}}:"VIDEO"===r.media_type&&(n.videos={standard_resolution:{width:640,height:800,url:r.thumb_url},low_bandwidth:{width:480,height:600,url:r.thumb_url},low_resolution:{width:480,height:600,url:r.thumb_url}}),"CAROUSEL_ALBUM"===r.media_type)for(var c in n.carousel_media=[],r.children.data)o="IMAGE"===r.children.data[c].media_type?{images:{thumbnail:{width:150,height:150,url:r.children.data[c].media_url},low_resolution:{width:320,height:320,url:r.children.data[c].media_url},standard_resolution:{width:640,height:640,url:r.children.data[c].media_url}},users_in_photo:[],type:"image"}:{videos:{standard_resolution:{width:640,height:800,url:r.children.data[c].media_url,id:r.children.data[c].id},low_bandwidth:{width:480,height:600,url:r.children.data[c].media_url,id:r.children.data[c].id},low_resolution:{width:480,height:600,url:r.children.data[c].media_url,id:r.children.data[c].id}},users_in_photo:[],type:"video"},n.carousel_media.push(o);t.data.push(n)}return t},this.searchForTagsByName=function(e,s){var o=this,r=!1,i=this.statusCode,n=!1;filter=this.getFilter("searchForTagsByName"),void 0===s||0===s.length||("success"in s&&(r=!0),"error"in s&&(n=!0),"statusCode"in s&&(i=s.statusCode));var c="https://api.instagram.com/v1/tags/search?q="+e+"&access_token="+u();d.getDataFromCache(function(e){function t(e){r&&("object"==typeof s.success&&2==s.success.length?void 0!==window[s.success[0]]&&"function"==typeof window[s.success[0]][s.success[1]]&&(filter&&(e=filter(e,o.filterArguments)),window[s.success[0]][s.success[1]](e)):"string"==typeof s.success?"function"==typeof window[s.success]&&(filter&&(e=filter(e,o.filterArguments)),window[s.success](e)):"function"==typeof s.success&&(filter&&(e=filter(e,o.filterArguments)),s.success(e)))}!1===e?jQuery.ajax({type:"POST",url:c,dataType:"jsonp",success:function(e){d.setDataToCache(c,e),t(e)},error:function(e){n&&("object"==typeof s.error&&2==s.error.length?"function"==typeof window[s.error[0]][s.error[1]]&&window[s.error[0]][s.error[1]](e):"string"==typeof s.error?"function"==typeof window[s.error]&&window[s.error](e):"function"==typeof s.error&&s.error(e))},statusCode:i}):t(e)},c)},this.searchForUsersByName=function(e,t){var s=this,o=!1,r=(this.statusCode,!1),i=this.getFilter("searchForUsersByName");void 0===t||0===t.length||("success"in t&&(o=!0),"error"in t&&(r=!0),"statusCode"in t&&t.statusCode),jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/search?q="+e+"&access_token="+u(),success:function(e){o&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(i&&(e=i(e,s.filterArguments)),e.args=t,window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(i&&(e=i(e,s.filterArguments)),e.args=t,window[t.success](e)):"function"==typeof t.success&&(i&&(e=i(e,s.filterArguments)),(e.args=t).success(e)))},error:function(e){r&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:this.statusCode})},this.getRecentLikedMedia=function(t){var s=this,o=!1,e=this.statusCode,r=!1,i=this.getFilter("getRecentLikedMedia"),n="https://api.instagram.com/v1/users/self/media/liked?access_token="+u();void 0===t||0===t.length||("success"in t&&(o=!0),"error"in t&&(r=!0),"statusCode"in t&&(e=t.statusCode),"args"in t?argFlag=!0:t.args={},"count"in t?(t.count=parseInt(t.count),(!Number.isInteger(t.count)||t.count<=0)&&(t.count=20)):t.count=20,n+="&count="+t.count,"next_max_like_id"in t&&(n+="&next_max_like_id="+t.next_max_like_id)),jQuery.ajax({type:"POST",dataType:"jsonp",url:n,success:function(e){o&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(i&&(e=i(e,s.filterArguments,t.args)),window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(i&&(e=i(e,s.filterArguments,t.args)),window[t.success](e)):"function"==typeof t.success&&(i&&(e=i(e,s.filterArguments,t.args)),t.success(e)))},error:function(e){r&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:e})},this.getUserRecentMedia=function(e,t){var s=this,o=!1,r=this.statusCode,i=!1,n=this.getFilter("getUserRecentMedia"),e="https://api.instagram.com/v1/users/"+e+"/media/recent/?access_token="+u();void 0===t||0===t.length||("success"in t&&(o=!0),"statusCode"in t&&(r=t.statusCode),"args"in t||(t.args={}),"error"in t&&(i=!0),"count"in t?(t.count=parseInt(t.count),(!Number.isInteger(t.count)||t.count<=0)&&(t.count=33)):t.count=33,e+="&count="+t.count,"min_id"in t&&(e+="&min_id="+t.min_id),"max_id"in t&&(e+="&max_id="+t.max_id)),jQuery.ajax({type:"POST",dataType:"jsonp",url:e,success:function(e){void 0===e.data&&(e.data=[]),o&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(n&&(e=n(e,s.filterArguments,t.args)),window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(n&&(e=n(e,s.filterArguments,t.args)),window[t.success](e)):"function"==typeof t.success&&(n&&(e=n(e,s.filterArguments,t.args)),t.success(e)))},error:function(e){i&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:r})},this.getUserMedia=function(t,s,o){s=void 0===s?"":s,o=void 0===o||"number"!=typeof o?0:o;var r=this,i=!1,e=this.statusCode,n=!1,c=this.getFilter("getUserMedia");void 0===t||0===t.length||("success"in t&&(i=!0),"error"in t&&(n=!0),"statusCode"in t&&(e=t.statusCode),"args"in t||(t.args={}),"count"in t?(t.count=parseInt(t.count),(!Number.isInteger(t.count)||t.count<=0)&&(t.count=20)):t.count=20),jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_nonce:wdi_ajax.wdi_nonce,action:"wdi_getUserMedia",user_name:f(),feed_id:wdi_ajax.feed_id,next_url:s,iter:o},success:function(e){if(void 0!==e.error&&w<5)return w++,void d.getUserMedia(t,s,e.iter);void 0!==e.iter&&l.data.length<parseInt(wdi_ajax.number_of_photos)&&o<20&&""!=e.pagination.next_url?(s=e.pagination.next_url,l.data=l.data.concat(e.data),l.pagination=e.pagination,d.getUserMedia(t,s,e.iter)):(0!=l.data.length&&(e=l),e.meta={code:200},i&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(c&&(e=d.addTags(e),e=c(e,r.filterArguments,t)),window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(c&&(e=d.addTags(e),e=c(e,r.filterArguments,t)),window[t.success](e)):"function"==typeof t.success&&t.success(e)))},error:function(e){n&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:e})},this.getUserInfo=function(e,t){var s=this,o=!1,r=this.statusCode,i=!1,n=this.getFilter("getUserInfo");void 0===t||0===t.length||("success"in t&&(o=!0),"error"in t&&(i=!0),"statusCode"in t&&(r=t.statusCode)),jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/users/"+e+"/?access_token="+u(),success:function(e){o&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(n&&(e=n(e,s.filterArguments)),window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(n&&(e=n(e,s.filterArguments)),window[t.success](e)):"function"==typeof t.success&&(n&&(e=n(e,s.filterArguments)),t.success(e)))},error:function(e){i&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:r})},this.getSelfInfo=function(s){var o=this,r=!1,i=this.statusCode,n=!1,c=this.getFilter("getSelfInfo");void 0===s||0===s.length||("success"in s&&(r=!0),"error"in s&&(n=!0),"statusCode"in s&&(i=s.statusCode));var a="https://graph.facebook.com/v3.2/"+(void 0!==d.user&&void 0!==d.user.user_id?d.user.user_id:"undefined"!=typeof wdi_object&&void 0!==wdi_object.user?wdi_object.user.user_id:"")+"?fields=id,ig_id,username,name,biography,profile_picture_url,followers_count,follows_count,media_count,website&access_token="+u();d.getDataFromCache(function(e){var t;!1===e?jQuery.ajax({type:"POST",dataType:"jsonp",url:a,statusCode:i,success:function(e){d.setDataToCache(a,e),r&&("object"==typeof s.success&&2==s.success.length?void 0!==window[s.success[0]]&&"function"==typeof window[s.success[0]][s.success[1]]&&(c&&(e.meta={code:200},e=c(e,o.filterArguments)),window[s.success[0]][s.success[1]](e)):"string"==typeof s.success?"function"==typeof window[s.success]&&(c&&(e.meta={code:200},e=c(e,o.filterArguments)),window[s.success](e)):"function"==typeof s.success&&(c&&(e.meta={code:200},e=c(e,o.filterArguments)),s.success(e)))},error:function(e){n&&("object"==typeof s.error&&2==s.error.length?"function"==typeof window[s.error[0]][s.error[1]]&&window[s.error[0]][s.error[1]](e):"string"==typeof s.error?"function"==typeof window[s.error]&&window[s.error](e):"function"==typeof s.error&&s.error(e))}}):(t=e,r&&("object"==typeof s.success&&2==s.success.length?void 0!==window[s.success[0]]&&"function"==typeof window[s.success[0]][s.success[1]]&&(c&&(t=c(t,o.filterArguments)),window[s.success[0]][s.success[1]](t)):"string"==typeof s.success?"function"==typeof window[s.success]&&(c&&(t=c(t,o.filterArguments)),window[s.success](t)):"function"==typeof s.success&&(c&&(t=c(t,o.filterArguments)),s.success(t))))},a)},this.getRecentMediaComments=function(e,t,s){var o=this,r=!1,i=this.statusCode,n=!1,c=this.getFilter("getRecentMediaComments");void 0===t||0===t.length||("success"in t&&(r=!0),"error"in t&&(n=!0),"statusCode"in t&&(i=t.statusCode)),jQuery(".wdi_comment_container #ajax_loading #opacity_div").css("display","block"),jQuery(".wdi_comment_container #ajax_loading #loading_div").css("display","block"),jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_nonce:wdi_ajax.wdi_nonce,action:"wdi_getRecentMediaComments",user_name:f(),media_id:e,next:s},success:function(e){e=e,r&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(c&&(e=c(e,o.filterArguments)),window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(c&&(e=c(e,o.filterArguments)),window[t.success](e)):"function"==typeof t.success&&(c&&(e=c(e,o.filterArguments)),t.success(e)))},complete:function(){jQuery(".wdi_comment_container #ajax_loading #opacity_div").css("display","none"),jQuery(".wdi_comment_container #ajax_loading #loading_div").css("display","none")},error:function(e){n&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:i})},this.getRecentMediaLikes=function(e,t){var s=this,o=!1,r=this.statusCode,i=!1,n=this.getFilter("getRecentMediaLikes");void 0===t||0===t.length||("success"in t&&(o=!0),"error"in t&&(i=!0),"statusCode"in t&&(r=t.statusCode)),jQuery.ajax({type:"POST",dataType:"jsonp",url:"https://api.instagram.com/v1/media/"+e+"/likes?access_token="+u(),success:function(e){o&&("object"==typeof t.success&&2==t.success.length?void 0!==window[t.success[0]]&&"function"==typeof window[t.success[0]][t.success[1]]&&(n&&(e=n(e,s.filterArguments)),window[t.success[0]][t.success[1]](e)):"string"==typeof t.success?"function"==typeof window[t.success]&&(n&&(e=n(e,s.filterArguments)),window[t.success](e)):"function"==typeof t.success&&(n&&(e=n(e,s.filterArguments)),t.success(e)))},error:function(e){i&&("object"==typeof t.error&&2==t.error.length?"function"==typeof window[t.error[0]][t.error[1]]&&window[t.error[0]][t.error[1]](e):"string"==typeof t.error?"function"==typeof window[t.error]&&window[t.error](e):"function"==typeof t.error&&t.error(e))},statusCode:r})},this.getDataFromCache=function(t,e,s){void 0===s&&(s=!0),jQuery.ajax({type:"POST",async:s,url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_cache_name:e,wdi_nonce:wdi_ajax.wdi_nonce,WDI_MINIFY:wdi_ajax.WDI_MINIFY,task:"get",action:"wdi_cache"},success:function(e){e.success&&void 0!==e.cache_data&&null!==e.cache_data?(e=JSON.parse(e.cache_data),t(e)):t(!1)}})},this.setDataToCache=function(e,t){jQuery.ajax({type:"POST",url:wdi_ajax.ajax_url,dataType:"json",data:{wdi_cache_name:e,wdi_cache_response:JSON.stringify(t),wdi_nonce:wdi_ajax.wdi_nonce,task:"set",action:"wdi_cache"},success:function(e){}})}}
|
js/wdi_responsive.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function wdi_responsive(){}jQuery(document).ready(function(){}),wdi_responsive.columnControl=function(e,
|
1 |
+
function wdi_responsive(){}jQuery(document).ready(function(){}),wdi_responsive.columnControl=function(n,e,d){var r,i,_,t;n.openRows=[],1===e?(r=jQuery("#wdi_feed_"+n.feed_row.wdi_feed_counter+" .wdi_feed_wrapper"),_=jQuery("#wdi_feed_"+n.feed_row.wdi_feed_counter+" .wdi_feed_item").css("width")+"",i=r.first().width(),_="px"==_.substr(_.length-2,_.length)?parseFloat(_):.01*i*parseFloat(_),"masonry"==n.feed_row.feed_type&&(_=jQuery("#wdi_feed_"+n.feed_row.wdi_feed_counter+" .wdi_masonry_column").first().width()),null!=d&&(_=d),d=(e=r.attr("wdi-res")).substr(0,8)+Math.round(i/_),r.removeClass(e),r.attr("wdi-res",d),r.addClass(d),e!=d&&(d=d.substr(8,d.length),"pagination"==n.feed_row.feed_display_view&&(n.freeSpaces=(Math.floor(n.feed_row.pagination_per_page_number/Math.round(i/_))+1)*Math.round(i/_)-n.feed_row.pagination_per_page_number,n.freeSpaces%d==0&&(n.freeSpaces=0),t=n.resIndex=0,jQuery("#wdi_feed_"+n.feed_row.wdi_feed_counter+" .wdi_feed_item").each(function(){jQuery(this).attr("wdi_res_index",n.resIndex),(t+1)%n.feed_row.pagination_per_page_number==0?n.resIndex+=n.freeSpaces+1:n.resIndex++,t++})))):jQuery(window).resize(function(){var e=jQuery("#wdi_feed_"+n.feed_row.wdi_feed_counter+" .wdi_feed_wrapper");if(0!=e.length){var d=jQuery("#wdi_feed_"+n.feed_row.wdi_feed_counter+" .wdi_feed_item").css("width")+"",r=e.first().width();d="px"==d.substr(d.length-2,d.length)?parseFloat(d):.01*r*parseFloat(d);var i=e.attr("wdi-res");"masonry"==n.feed_row.feed_type&&(d=jQuery("#wdi_feed_"+n.feed_row.wdi_feed_counter+" .wdi_masonry_column").first().width());var _,t=i.substr(0,8)+Math.round(r/d);if(e.removeClass(i),e.attr("wdi-res",t),e.addClass(t),"thumbnails"===n.feed_row.feed_type&&wdi_responsive.fixRow(n),"masonry"===n.feed_row.feed_type&&i!=t){wdi_front.ajaxLoader(n);var o=t.substr(8,t.length);e.html("");for(var a="",s=0;s<o;s++)a+='<div class="wdi_masonry_column" wdi_mas_col="'+s+'"></div>';a+='<div class="wdi_clear">',e.html(a),n.imageIndex=0,n.resIndex=0;e=n.displayedData;n.displayedData=[],wdi_front.masonryDisplayFeedItems(e,n),wdi_front.applyFilters(n)}i!=t&&(o=t.substr(8,t.length),"pagination"==n.feed_row.feed_display_view&&(n.freeSpaces=(Math.floor(n.feed_row.number_of_photos/Math.round(r/d))+1)*Math.round(r/d)-n.feed_row.number_of_photos,n.freeSpaces%o==0&&(n.freeSpaces=0),_=n.resIndex=0,jQuery("#wdi_feed_"+n.feed_row.wdi_feed_counter+" .wdi_feed_item").each(function(){jQuery(this).attr("wdi_res_index",n.resIndex),(_+1)%n.feed_row.pagination_per_page_number==0?n.resIndex+=n.freeSpaces+1:n.resIndex++,_++})))}})},wdi_responsive.bindCaptionEvent=function(e,d){},wdi_responsive.bindMasonryCaptionEvent=function(e,d){},wdi_responsive.showCaption=function(e,d){var r,i=window["wdi_feed_"+d],_=e.parent().parent();r="pagination"===i.feed_row.feed_display_view?"wdi_res_index":"wdi_index";for(var t=_.attr(r),d=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_feed_wrapper").attr("wdi-res"),o=parseInt(d.substr(8,d.length)),a=Math.floor(t/o),s=[],n=0;n<o;n++){var w=n+a*o;s.push(w)}_.hasClass("wdi_full_caption")?(e.css("white-space","nowrap"),_.removeClass("wdi_full_caption")):(e.css("white-space","normal"),_.addClass("wdi_full_caption"),_.attr("wdi_scroll_to",_.offset().top-50)),_.css("height","auto");for(var f=0,n=0;n<s.length;n++)(u=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_feed_wrapper ["+r+"="+s[n]+"]")).addClass("wdi_row_affected"),u.css("height","auto"),f<u.height()&&u.hasClass("wdi_full_caption")&&(f=u.height());0==f&&(f=_.height());for(var u,n=0;n<s.length;n++)(u=jQuery("#wdi_feed_"+i.feed_row.wdi_feed_counter+" .wdi_feed_wrapper ["+r+"="+s[n]+"]")).height(f);i.affectedRow=!0},wdi_responsive.fixRow=function(e){jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_row_affected").each(function(){jQuery(this).css("height","auto"),jQuery(this).removeClass("wdi_row_affected")}),"pagination"===e.feed_row.feed_display_view?jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_full_caption").each(function(){jQuery(this).hasClass("wdi_hidden")||(jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch),jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch))}):jQuery("#wdi_feed_"+e.feed_row.wdi_feed_counter+" .wdi_full_caption").each(function(){jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch),jQuery(this).find(".wdi_photo_title").trigger(wdi_front.clickOrTouch)})},wdi_responsive.showMasonryCaption=function(e,d){window["wdi_feed_"+d];d=e.parent().parent();d.hasClass("wdi_full_caption")?(e.css("white-space","nowrap"),d.removeClass("wdi_full_caption")):(d.attr("wdi_scroll_to",d.offset().top-50),e.css("white-space","normal"),d.addClass("wdi_full_caption"))};
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
|
2 |
Contributors: webdorado,10web,progmastery
|
3 |
Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.6
|
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,12 @@ 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.9 =
|
509 |
Fixed: Filters logic.
|
510 |
Fixed: Load more functionality.
|
1 |
+
=== 10Web Social Photo Feed ===
|
2 |
Contributors: webdorado,10web,progmastery
|
3 |
Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 1.4.10
|
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.10 =
|
509 |
+
Fixed: Open settings page after activation.
|
510 |
+
Fixed: Load more functionality.
|
511 |
+
Fixed: Feed does not work with hashtag for some cases.
|
512 |
+
Fixed: Error after re-connecting a Business account.
|
513 |
+
|
514 |
= 1.4.9 =
|
515 |
Fixed: Filters logic.
|
516 |
Fixed: Load more functionality.
|
wd-instagram-feed.php
CHANGED
@@ -3,14 +3,14 @@
|
|
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
|
10 |
*/
|
11 |
|
12 |
// define constants
|
13 |
-
define('WDI_VERSION', '1.4.
|
14 |
define('WDI_IS_FREE', TRUE);
|
15 |
define('WDI_PREFIX', 'wdi');
|
16 |
define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
@@ -55,8 +55,13 @@ function wdi_register_plugin_block($blocks){
|
|
55 |
function wdi_register_block_editor_assets($assets){
|
56 |
$wd_bp_plugin_url = WDI_URL;
|
57 |
$version = '2.0.3';
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
60 |
if(!isset($assets['version']) || version_compare($assets['version'], $version) === -1) {
|
61 |
$assets['version'] = $version;
|
62 |
$assets['js_path'] = $js_path;
|
@@ -200,7 +205,6 @@ function wdi_instagram_activate( $networkwide ) {
|
|
200 |
return;
|
201 |
}
|
202 |
}
|
203 |
-
add_option('wdi_do_activation_set_up_redirect', 1);
|
204 |
wdi_install();
|
205 |
}
|
206 |
|
@@ -271,7 +275,6 @@ function wdi_privacy_policy() {
|
|
271 |
$text
|
272 |
);
|
273 |
}
|
274 |
-
|
275 |
$wdi_options = wdi_get_options();
|
276 |
wp_schedule_single_event( time() + (intval($wdi_options["wdi_transient_time"])*60), 'wdi_cache_cron' );
|
277 |
|
@@ -360,26 +363,34 @@ function wdi_create_sample_feed($new_options){
|
|
360 |
return $new_options;
|
361 |
}
|
362 |
|
363 |
-
// Adding menues.
|
364 |
add_action('admin_menu', 'WDI_instagram_menu', 9);
|
365 |
function WDI_instagram_menu() {
|
366 |
$menu_icon = WDI_URL . '/images/menu_icon.png';
|
367 |
-
$parent_slug = "wdi_feeds";
|
368 |
$min_feeds_capability = wdi_get_create_feeds_cap();
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
$
|
378 |
-
$
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
}
|
384 |
}
|
385 |
|
@@ -569,7 +580,12 @@ function wdi_editor_button(){
|
|
569 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
570 |
$page = WDILibrary::get('action');
|
571 |
if($page != '' && (($page == 'WDIEditorShortcode'))) {
|
572 |
-
|
|
|
|
|
|
|
|
|
|
|
573 |
|
574 |
require_once(WDI_DIR . '/admin/controllers/WDIControllerEditorShortcode.php');
|
575 |
$controller_class = 'WDIControllerEditorShortcode';
|
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.10
|
7 |
Author: 10Web
|
8 |
Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
// define constants
|
13 |
+
define('WDI_VERSION', '1.4.10');
|
14 |
define('WDI_IS_FREE', TRUE);
|
15 |
define('WDI_PREFIX', 'wdi');
|
16 |
define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
55 |
function wdi_register_block_editor_assets($assets){
|
56 |
$wd_bp_plugin_url = WDI_URL;
|
57 |
$version = '2.0.3';
|
58 |
+
if (WDI_MINIFY === true) {
|
59 |
+
$js_path = $wd_bp_plugin_url . '/js/block.min.js';
|
60 |
+
$css_path = $wd_bp_plugin_url . '/css/block.min.css';
|
61 |
+
} else {
|
62 |
+
$js_path = $wd_bp_plugin_url . '/js/block.js';
|
63 |
+
$css_path = $wd_bp_plugin_url . '/css/block.css';
|
64 |
+
}
|
65 |
if(!isset($assets['version']) || version_compare($assets['version'], $version) === -1) {
|
66 |
$assets['version'] = $version;
|
67 |
$assets['js_path'] = $js_path;
|
205 |
return;
|
206 |
}
|
207 |
}
|
|
|
208 |
wdi_install();
|
209 |
}
|
210 |
|
275 |
$text
|
276 |
);
|
277 |
}
|
|
|
278 |
$wdi_options = wdi_get_options();
|
279 |
wp_schedule_single_event( time() + (intval($wdi_options["wdi_transient_time"])*60), 'wdi_cache_cron' );
|
280 |
|
363 |
return $new_options;
|
364 |
}
|
365 |
|
|
|
366 |
add_action('admin_menu', 'WDI_instagram_menu', 9);
|
367 |
function WDI_instagram_menu() {
|
368 |
$menu_icon = WDI_URL . '/images/menu_icon.png';
|
|
|
369 |
$min_feeds_capability = wdi_get_create_feeds_cap();
|
370 |
+
$wdi_options = get_option("wdi_instagram_options");
|
371 |
+
$authenticated_users_list = json_decode($wdi_options['wdi_authenticated_users_list']);
|
372 |
+
if ( empty($authenticated_users_list) ) {
|
373 |
+
$parent_slug = "wdi_settings";
|
374 |
+
add_menu_page(__('Instagram Settings', 'wd-instagram-feed'), 'Instagram Feed', $min_feeds_capability, $parent_slug, 'WDI_instagram_settings_page', $menu_icon);
|
375 |
+
add_submenu_page("", __('Uninstall', 'wd-instagram-feed'), __('Uninstall', 'wd-instagram-feed'), 'manage_options', 'wdi_uninstall', 'WDI_instagram_uninstall_page');
|
376 |
+
}
|
377 |
+
else {
|
378 |
+
$parent_slug = "wdi_feeds";
|
379 |
+
add_menu_page(__('Instagram Feed', 'wd-instagram-feed'), 'Instagram Feed', $min_feeds_capability, $parent_slug, 'WDI_instagram_feeds_page', $menu_icon);
|
380 |
+
add_submenu_page($parent_slug, __('Feeds', 'wd-instagram-feed'), __('Feeds', 'wd-instagram-feed'), $min_feeds_capability, 'wdi_feeds', 'WDI_instagram_feeds_page');
|
381 |
+
add_submenu_page($parent_slug, __('Themes', 'wd-instagram-feed'), __('Themes', 'wd-instagram-feed'), $min_feeds_capability, 'wdi_themes', 'WDI_instagram_themes_page');
|
382 |
+
add_submenu_page($parent_slug, __('Settings', 'wd-instagram-feed'), __('Settings', 'wd-instagram-feed'), 'manage_options', 'wdi_settings', 'WDI_instagram_settings_page');
|
383 |
+
add_submenu_page("", __('Uninstall', 'wd-instagram-feed'), __('Uninstall', 'wd-instagram-feed'), 'manage_options', 'wdi_uninstall', 'WDI_instagram_uninstall_page');
|
384 |
+
if ( WDI_IS_FREE ) {
|
385 |
+
/* Custom link to wordpress.org*/
|
386 |
+
global $submenu;
|
387 |
+
$url = 'https://wordpress.org/support/plugin/wd-instagram-feed/#new-post';
|
388 |
+
$submenu[$parent_slug][] = array(
|
389 |
+
'<div id="wdi_ask_question">' . __('Ask a question', 'wd-instagram-feed') . '</div>',
|
390 |
+
'manage_options',
|
391 |
+
$url
|
392 |
+
);
|
393 |
+
}
|
394 |
}
|
395 |
}
|
396 |
|
580 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
581 |
$page = WDILibrary::get('action');
|
582 |
if($page != '' && (($page == 'WDIEditorShortcode'))) {
|
583 |
+
if (WDI_MINIFY == TRUE) {
|
584 |
+
wp_register_script('wdi-shortcode', WDI_URL . '/js/shortcode.min.js', array('jquery'), WDI_VERSION);
|
585 |
+
} else {
|
586 |
+
wp_register_script('wdi-shortcode', WDI_URL . '/js/shortcode.js', array('jquery'), WDI_VERSION);
|
587 |
+
}
|
588 |
+
|
589 |
|
590 |
require_once(WDI_DIR . '/admin/controllers/WDIControllerEditorShortcode.php');
|
591 |
$controller_class = 'WDIControllerEditorShortcode';
|
wd/.gitignore
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
# Created by .ignore support plugin (hsz.mobi)
|
2 |
-
.idea/*
|
|
|
|