Version Description
Fixed: Preview in Elementor. Fixed: Issue when "Check for new posts every" option set to 0.
Download this release
Release Info
Developer | 10web |
Plugin | WD Instagram Feed – Instagram Gallery |
Version | 1.4.13 |
Comparing to | |
See all releases |
Code changes from version 1.4.12 to 1.4.13
- admin/views/feeds.php +0 -1
- config.php +1 -1
- framework/WDIInstagram.php +1 -1
- frontend/shortcode.php +25 -59
- frontend/views/imagebrowser.php +9 -14
- frontend/views/thumbnails.php +11 -17
- js/wdi_frontend.js +4 -4
- js/wdi_responsive.js +8 -31
- readme.txt +5 -1
- wd-instagram-feed.php +19 -29
admin/views/feeds.php
CHANGED
@@ -783,7 +783,6 @@ class Feeds_view_wdi {
|
|
783 |
|
784 |
$formInfo = $this->getFormElements($current_id);
|
785 |
$tabs = $formInfo['tabs'];
|
786 |
-
|
787 |
$wdi_preview_link = $this->model->get_instagram_preview_post();
|
788 |
// for edit
|
789 |
$edit = FALSE;
|
783 |
|
784 |
$formInfo = $this->getFormElements($current_id);
|
785 |
$tabs = $formInfo['tabs'];
|
|
|
786 |
$wdi_preview_link = $this->model->get_instagram_preview_post();
|
787 |
// for edit
|
788 |
$edit = FALSE;
|
config.php
CHANGED
@@ -3,7 +3,7 @@ if ( !defined('ABSPATH') ) {
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
-
define('WDI_VERSION', '1.4.
|
7 |
define('WDI_IS_FREE', TRUE);
|
8 |
define('WDI_PREFIX', 'wdi');
|
9 |
define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
+
define('WDI_VERSION', '1.4.13');
|
7 |
define('WDI_IS_FREE', TRUE);
|
8 |
define('WDI_PREFIX', 'wdi');
|
9 |
define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
framework/WDIInstagram.php
CHANGED
@@ -66,7 +66,7 @@ class WDIInstagram {
|
|
66 |
}
|
67 |
$baseUrl = $api_url . $user_id . '/media/?fields=' . $media_fields . '&limit=100&access_token=' . $access_token;
|
68 |
}
|
69 |
-
|
70 |
if ( isset($cache_data) && $cache_data["success"] && isset($cache_data["cache_data"]) ) {
|
71 |
return base64_decode($cache_data["cache_data"]);
|
72 |
}
|
66 |
}
|
67 |
$baseUrl = $api_url . $user_id . '/media/?fields=' . $media_fields . '&limit=100&access_token=' . $access_token;
|
68 |
}
|
69 |
+
$cache_data = $this->cache->get_cache_data($baseUrl);
|
70 |
if ( isset($cache_data) && $cache_data["success"] && isset($cache_data["cache_data"]) ) {
|
71 |
return base64_decode($cache_data["cache_data"]);
|
72 |
}
|
frontend/shortcode.php
CHANGED
@@ -83,7 +83,7 @@ function wdi_feed($atts, $widget_params = '') {
|
|
83 |
return __('Cannot get other user media. API shut down by Instagram. Sorry. Display only your media.', "wd-instagram-feed");
|
84 |
}
|
85 |
|
86 |
-
if(isset($feed_row["feed_item_onclick"]) && $feed_row["feed_item_onclick"] ===
|
87 |
global $wdi_feed_item_onclick_type;
|
88 |
$wdi_feed_item_onclick_type = true;
|
89 |
}
|
@@ -213,50 +213,26 @@ function wdi_feed($atts, $widget_params = '') {
|
|
213 |
}
|
214 |
|
215 |
function wdi_register_frontend_scripts( $params = array() ){
|
216 |
-
|
|
|
217 |
wp_register_script('wdi_lazy_load', WDI_URL . '/js/jquery.lazyload.min.js', array("jquery"), wdi_get_pro_version(), true);
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
wp_register_script('wdi_responsive', WDI_URL . '/js/wdi_responsive.min.js', array("jquery", "wdi_frontend"), wdi_get_pro_version(), true);
|
222 |
-
} else {
|
223 |
-
wp_register_script('wdi_instagram', WDI_URL . '/js/wdi_instagram.js', array("jquery"), wdi_get_pro_version(), true);
|
224 |
-
wp_register_script('wdi_frontend', WDI_URL . '/js/wdi_frontend.js', array("jquery", 'wdi_instagram', 'wdi_lazy_load', 'underscore'), wdi_get_pro_version(), true);
|
225 |
-
wp_register_script('wdi_responsive', WDI_URL . '/js/wdi_responsive.js', array("jquery", "wdi_frontend"), wdi_get_pro_version(), true);
|
226 |
-
}
|
227 |
|
228 |
////////////////////////////GALLERY BOX//////////////////////////////
|
229 |
-
|
230 |
-
|
231 |
-
/* gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel */
|
232 |
-
wp_register_script('wdi_gallery_box', WDI_URL . '/js/gallerybox/wdi_gallery_box.min.js', array('jquery'), wdi_get_pro_version());
|
233 |
-
if($wdi_feed_item_onclick_type) {
|
234 |
-
wp_register_style('wdi_mCustomScrollbar', WDI_URL . '/css/gallerybox/jquery.mCustomScrollbar.min.css', array(), wdi_get_pro_version());
|
235 |
-
}
|
236 |
-
} else {
|
237 |
-
/* gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel */
|
238 |
-
wp_register_script('wdi_gallery_box', WDI_URL . '/js/gallerybox/wdi_gallery_box.js', array('jquery'), wdi_get_pro_version());
|
239 |
-
if($wdi_feed_item_onclick_type) {
|
240 |
-
wp_register_style('wdi_mCustomScrollbar', WDI_URL . '/css/gallerybox/jquery.mCustomScrollbar.css', array(), wdi_get_pro_version());
|
241 |
-
}
|
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 |
-
|
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');
|
257 |
$wdi_token_error_flag = get_option("wdi_token_error_flag");
|
258 |
|
259 |
-
|
260 |
$current_feed_id = $params['current_feed_id'];
|
261 |
$number_of_photos = $params['number_of_photos'];
|
262 |
wp_localize_script("wdi_frontend", 'wdi_ajax', array(
|
@@ -269,8 +245,7 @@ function wdi_register_frontend_scripts( $params = array() ){
|
|
269 |
|
270 |
wp_localize_script("wdi_frontend", 'wdi_url', array(
|
271 |
'plugin_url' => WDI_URL . '/',
|
272 |
-
'ajax_url' => admin_url('admin-ajax.php'))
|
273 |
-
);
|
274 |
|
275 |
wp_localize_script("wdi_frontend", 'wdi_front_messages',
|
276 |
array('connection_error' => __('Connection Error, try again later :(', 'wd-instagram-feed'),
|
@@ -295,26 +270,20 @@ function wdi_register_frontend_scripts( $params = array() ){
|
|
295 |
wdi_load_frontend_styles();
|
296 |
}
|
297 |
|
298 |
-
function wdi_load_frontend_styles(){
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
wp_register_style('
|
|
|
308 |
}
|
309 |
-
|
310 |
-
wp_register_style('font-tenweb', WDI_URL . '/css/tenweb-fonts/fonts.css', array(), wdi_get_pro_version());
|
311 |
-
wp_enqueue_style('font-tenweb');
|
312 |
-
|
313 |
-
wp_enqueue_style('wdi_frontend_thumbnails');
|
314 |
-
wp_enqueue_style('mCustomScrollbar');
|
315 |
}
|
316 |
|
317 |
-
|
318 |
function wdi_load_frontend_scripts(){
|
319 |
wp_enqueue_script('underscore');
|
320 |
wp_enqueue_script('wdi_lazy_load');
|
@@ -326,10 +295,6 @@ function wdi_load_frontend_scripts(){
|
|
326 |
wp_enqueue_script('jquery-mobile');
|
327 |
wp_enqueue_script('jquery-mCustomScrollbar');
|
328 |
wp_enqueue_script('jquery-fullscreen');
|
329 |
-
|
330 |
-
//styles
|
331 |
-
wp_enqueue_style('font-tenweb');
|
332 |
-
wp_enqueue_style('wdi_frontend_thumbnails');
|
333 |
}
|
334 |
|
335 |
/*load all scripts and styles directly without dependency on jquery*/
|
@@ -370,7 +335,8 @@ function wdi_load_frontend_scripts_ajax($additional_scripts = array(), $addition
|
|
370 |
}
|
371 |
|
372 |
$styles_handles = array(
|
373 |
-
'
|
|
|
374 |
'wdi_mCustomScrollbar',
|
375 |
);
|
376 |
|
83 |
return __('Cannot get other user media. API shut down by Instagram. Sorry. Display only your media.', "wd-instagram-feed");
|
84 |
}
|
85 |
|
86 |
+
if ( isset($feed_row["feed_item_onclick"]) && $feed_row["feed_item_onclick"] === 'lightbox' ){
|
87 |
global $wdi_feed_item_onclick_type;
|
88 |
$wdi_feed_item_onclick_type = true;
|
89 |
}
|
213 |
}
|
214 |
|
215 |
function wdi_register_frontend_scripts( $params = array() ){
|
216 |
+
global $wdi_feed_item_onclick_type;
|
217 |
+
$min = ( WDI_MINIFY === true ) ? '.min' : '';
|
218 |
wp_register_script('wdi_lazy_load', WDI_URL . '/js/jquery.lazyload.min.js', array("jquery"), wdi_get_pro_version(), true);
|
219 |
+
wp_register_script('wdi_instagram', WDI_URL . '/js/wdi_instagram' . $min . '.js', array("jquery"), wdi_get_pro_version(), true);
|
220 |
+
wp_register_script('wdi_frontend', WDI_URL . '/js/wdi_frontend' . $min . '.js', array("jquery", 'wdi_instagram', 'wdi_lazy_load', 'underscore'), wdi_get_pro_version(), true);
|
221 |
+
wp_register_script('wdi_responsive', WDI_URL . '/js/wdi_responsive' . $min . '.js', array("jquery", "wdi_frontend"), wdi_get_pro_version(), true);
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
|
223 |
////////////////////////////GALLERY BOX//////////////////////////////
|
224 |
+
wp_register_script('wdi_gallery_box', WDI_URL . '/js/gallerybox/wdi_gallery_box' . $min . '.js', array('jquery'), wdi_get_pro_version());
|
225 |
+
// scripts for popup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
wp_register_script('jquery-mobile', WDI_URL . '/js/gallerybox/jquery.mobile.min.js', array('jquery'), wdi_get_pro_version());
|
227 |
+
if ( $wdi_feed_item_onclick_type ) {
|
228 |
wp_register_script('jquery-mCustomScrollbar', WDI_URL . '/js/gallerybox/jquery.mCustomScrollbar.concat.min.js', array('jquery'), wdi_get_pro_version());
|
229 |
}
|
230 |
+
wp_register_script('jquery-fullscreen', WDI_URL . '/js/gallerybox/jquery.fullscreen-0.4.0' . $min . '.js', array('jquery'), wdi_get_pro_version());
|
|
|
|
|
|
|
|
|
231 |
|
232 |
+
// localize scrips
|
233 |
$user_is_admin = current_user_can('manage_options');
|
234 |
$wdi_token_error_flag = get_option("wdi_token_error_flag");
|
235 |
|
|
|
236 |
$current_feed_id = $params['current_feed_id'];
|
237 |
$number_of_photos = $params['number_of_photos'];
|
238 |
wp_localize_script("wdi_frontend", 'wdi_ajax', array(
|
245 |
|
246 |
wp_localize_script("wdi_frontend", 'wdi_url', array(
|
247 |
'plugin_url' => WDI_URL . '/',
|
248 |
+
'ajax_url' => admin_url('admin-ajax.php')));
|
|
|
249 |
|
250 |
wp_localize_script("wdi_frontend", 'wdi_front_messages',
|
251 |
array('connection_error' => __('Connection Error, try again later :(', 'wd-instagram-feed'),
|
270 |
wdi_load_frontend_styles();
|
271 |
}
|
272 |
|
273 |
+
function wdi_load_frontend_styles() {
|
274 |
+
global $wdi_feed_item_onclick_type;
|
275 |
+
$min = ( WDI_MINIFY === TRUE ) ? '.min' : '';
|
276 |
+
wp_register_style('wdi_font-tenweb', WDI_URL . '/css/tenweb-fonts/fonts.css', array(), wdi_get_pro_version());
|
277 |
+
wp_register_style('wdi_frontend', WDI_URL . '/css/wdi_frontend' . $min . '.css', array(), wdi_get_pro_version());
|
278 |
+
|
279 |
+
wp_enqueue_style('wdi_font-tenweb');
|
280 |
+
wp_enqueue_style('wdi_frontend');
|
281 |
+
if ( $wdi_feed_item_onclick_type ) {
|
282 |
+
wp_register_style('wdi_mCustomScrollbar', WDI_URL . '/css/gallerybox/jquery.mCustomScrollbar' . $min . '.css', array(), wdi_get_pro_version());
|
283 |
+
wp_enqueue_style('wdi_mCustomScrollbar');
|
284 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
}
|
286 |
|
|
|
287 |
function wdi_load_frontend_scripts(){
|
288 |
wp_enqueue_script('underscore');
|
289 |
wp_enqueue_script('wdi_lazy_load');
|
295 |
wp_enqueue_script('jquery-mobile');
|
296 |
wp_enqueue_script('jquery-mCustomScrollbar');
|
297 |
wp_enqueue_script('jquery-fullscreen');
|
|
|
|
|
|
|
|
|
298 |
}
|
299 |
|
300 |
/*load all scripts and styles directly without dependency on jquery*/
|
335 |
}
|
336 |
|
337 |
$styles_handles = array(
|
338 |
+
'wdi_font-tenweb',
|
339 |
+
'wdi_frontend',
|
340 |
'wdi_mCustomScrollbar',
|
341 |
);
|
342 |
|
frontend/views/imagebrowser.php
CHANGED
@@ -118,17 +118,16 @@ class WDI_ImageBrowser_view {
|
|
118 |
|
119 |
if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
|
120 |
wdi_load_frontend_scripts_ajax();
|
|
|
121 |
}
|
122 |
}
|
123 |
|
124 |
private function add_theme_styles(){
|
125 |
-
|
126 |
$theme = $this->model->theme_row;
|
127 |
|
128 |
require_once WDI_DIR . '/framework/WDI_generate_styles.php';
|
129 |
$generator = new WDI_generate_styles($theme['id'], $theme);
|
130 |
|
131 |
-
|
132 |
if($this->load_theme_css_file($generator) === true) {
|
133 |
return;
|
134 |
}
|
@@ -163,8 +162,7 @@ class WDI_ImageBrowser_view {
|
|
163 |
}
|
164 |
}
|
165 |
|
166 |
-
public function generate_feed_styles($feed_row)
|
167 |
-
{
|
168 |
$style = $this->model->theme_row;
|
169 |
$colNum = (100 / $feed_row['number_of_columns']);
|
170 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
@@ -176,10 +174,10 @@ class WDI_ImageBrowser_view {
|
|
176 |
}
|
177 |
|
178 |
<?php
|
179 |
-
|
180 |
if($feed_row['display_user_post_follow_number'] == '1'){
|
181 |
$header_text_padding =(intval($style['user_img_width']) - intval($style['users_text_font_size']))/4;
|
182 |
-
}
|
|
|
183 |
$header_text_padding =(intval($style['user_img_width']) - intval($style['users_text_font_size']))/2;
|
184 |
}
|
185 |
?>
|
@@ -200,8 +198,7 @@ class WDI_ImageBrowser_view {
|
|
200 |
width: <?php echo $colNum.'%'?>; /*thumbnail_size*/
|
201 |
}
|
202 |
|
203 |
-
<?php if($feed_row['disable_mobile_layout']=="0"){
|
204 |
-
?>
|
205 |
@media screen and (min-width: 800px) and (max-width: 1024px) {
|
206 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
|
207 |
width: <?php echo ($colNum<33.33) ? '33.333333333333%' : $colNum.'%'?>; /*thumbnail_size*/
|
@@ -216,7 +213,6 @@ class WDI_ImageBrowser_view {
|
|
216 |
margin: 0 auto;
|
217 |
background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
|
218 |
}
|
219 |
-
|
220 |
}
|
221 |
|
222 |
@media screen and (min-width: 480px) and (max-width: 800px) {
|
@@ -248,13 +244,12 @@ class WDI_ImageBrowser_view {
|
|
248 |
background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
|
249 |
}
|
250 |
}
|
251 |
-
|
252 |
-
<?php
|
253 |
-
}?>
|
254 |
-
<?php
|
255 |
$css = ob_get_contents();
|
256 |
ob_end_clean();
|
257 |
-
|
|
|
|
|
258 |
wp_register_style( 'generate_feed_styles', false );
|
259 |
wp_enqueue_style( 'generate_feed_styles' );
|
260 |
wp_add_inline_style( 'generate_feed_styles', $css );
|
118 |
|
119 |
if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
|
120 |
wdi_load_frontend_scripts_ajax();
|
121 |
+
echo '<style id="generate_feed_styles-inline-css">' . $this->generate_feed_styles( $feed_row, TRUE ) .'</style>';
|
122 |
}
|
123 |
}
|
124 |
|
125 |
private function add_theme_styles(){
|
|
|
126 |
$theme = $this->model->theme_row;
|
127 |
|
128 |
require_once WDI_DIR . '/framework/WDI_generate_styles.php';
|
129 |
$generator = new WDI_generate_styles($theme['id'], $theme);
|
130 |
|
|
|
131 |
if($this->load_theme_css_file($generator) === true) {
|
132 |
return;
|
133 |
}
|
162 |
}
|
163 |
}
|
164 |
|
165 |
+
public function generate_feed_styles( $feed_row, $return = FALSE ) {
|
|
|
166 |
$style = $this->model->theme_row;
|
167 |
$colNum = (100 / $feed_row['number_of_columns']);
|
168 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
174 |
}
|
175 |
|
176 |
<?php
|
|
|
177 |
if($feed_row['display_user_post_follow_number'] == '1'){
|
178 |
$header_text_padding =(intval($style['user_img_width']) - intval($style['users_text_font_size']))/4;
|
179 |
+
}
|
180 |
+
else{
|
181 |
$header_text_padding =(intval($style['user_img_width']) - intval($style['users_text_font_size']))/2;
|
182 |
}
|
183 |
?>
|
198 |
width: <?php echo $colNum.'%'?>; /*thumbnail_size*/
|
199 |
}
|
200 |
|
201 |
+
<?php if($feed_row['disable_mobile_layout']=="0") { ?>
|
|
|
202 |
@media screen and (min-width: 800px) and (max-width: 1024px) {
|
203 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
|
204 |
width: <?php echo ($colNum<33.33) ? '33.333333333333%' : $colNum.'%'?>; /*thumbnail_size*/
|
213 |
margin: 0 auto;
|
214 |
background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
|
215 |
}
|
|
|
216 |
}
|
217 |
|
218 |
@media screen and (min-width: 480px) and (max-width: 800px) {
|
244 |
background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
|
245 |
}
|
246 |
}
|
247 |
+
<?php }
|
|
|
|
|
|
|
248 |
$css = ob_get_contents();
|
249 |
ob_end_clean();
|
250 |
+
if ( $return ) {
|
251 |
+
return $css;
|
252 |
+
}
|
253 |
wp_register_style( 'generate_feed_styles', false );
|
254 |
wp_enqueue_style( 'generate_feed_styles' );
|
255 |
wp_add_inline_style( 'generate_feed_styles', $css );
|
frontend/views/thumbnails.php
CHANGED
@@ -49,8 +49,7 @@ class WDI_Thumbnails_view {
|
|
49 |
class="tenweb-i tenweb-i-step-forward wdi_pagination_ctrl wdi_disabled"></i></div></div> <?php
|
50 |
}
|
51 |
?>
|
52 |
-
<div class="wdi_feed_wrapper <?php echo 'wdi_col_' . $feed_row['number_of_columns'] ?>"
|
53 |
-
wdi-res='<?php echo 'wdi_col_' . $feed_row['number_of_columns'] ?>'></div>
|
54 |
<div class="wdi_clear"></div>
|
55 |
|
56 |
<?php switch ($feed_row['feed_display_view']) {
|
@@ -106,12 +105,9 @@ class WDI_Thumbnails_view {
|
|
106 |
<div class="wdi_front_overlay"></div>
|
107 |
</div>
|
108 |
<?php
|
109 |
-
|
110 |
}
|
111 |
|
112 |
-
|
113 |
-
public function pass_feed_data_to_js()
|
114 |
-
{
|
115 |
global $wdi_options;
|
116 |
$feed_row = $this->model->get_feed_row();
|
117 |
|
@@ -120,7 +116,6 @@ class WDI_Thumbnails_view {
|
|
120 |
$users = array();
|
121 |
}
|
122 |
|
123 |
-
$feed_row = $this->model->get_feed_row();
|
124 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
125 |
$feed_row['access_token'] = WDILibrary::get_user_access_token($users);
|
126 |
$feed_row['wdi_feed_counter'] = $wdi_feed_counter;
|
@@ -129,8 +124,9 @@ class WDI_Thumbnails_view {
|
|
129 |
wp_localize_script("wdi_frontend", 'wdi_theme_' . $this->model->theme_row['id'], $this->model->theme_row);
|
130 |
wp_localize_script("wdi_frontend", 'wdi_front', array('feed_counter' => $wdi_feed_counter));
|
131 |
|
132 |
-
if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
|
133 |
wdi_load_frontend_scripts_ajax();
|
|
|
134 |
}
|
135 |
}
|
136 |
|
@@ -173,13 +169,11 @@ class WDI_Thumbnails_view {
|
|
173 |
}
|
174 |
}
|
175 |
|
176 |
-
public function generate_feed_styles($feed_row)
|
177 |
-
{
|
178 |
$style = $this->model->theme_row;
|
179 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
180 |
$colNum = (100 / $feed_row['number_of_columns']);
|
181 |
-
|
182 |
-
ob_start()
|
183 |
?>
|
184 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_header {
|
185 |
display: <?php echo ($feed_row['display_header']=='1')? 'block' : 'none'?>; /*if display-header is true display:block*/
|
@@ -208,8 +202,7 @@ class WDI_Thumbnails_view {
|
|
208 |
line-height: 0;
|
209 |
}
|
210 |
|
211 |
-
<?php if($feed_row['disable_mobile_layout']=="0"){
|
212 |
-
?>
|
213 |
@media screen and (min-width: 800px) and (max-width: 1024px) {
|
214 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
|
215 |
width: <?php echo ($colNum<33.33) ? '33.333333333333%' : $colNum.'%'?>; /*thumbnail_size*/
|
@@ -258,11 +251,12 @@ class WDI_Thumbnails_view {
|
|
258 |
background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
|
259 |
}
|
260 |
}
|
261 |
-
|
262 |
-
<?php } ?>
|
263 |
-
<?php
|
264 |
$css = ob_get_contents();
|
265 |
ob_end_clean();
|
|
|
|
|
|
|
266 |
|
267 |
wp_register_style( 'generate_feed_styles', false );
|
268 |
wp_enqueue_style( 'generate_feed_styles' );
|
49 |
class="tenweb-i tenweb-i-step-forward wdi_pagination_ctrl wdi_disabled"></i></div></div> <?php
|
50 |
}
|
51 |
?>
|
52 |
+
<div class="wdi_feed_wrapper <?php echo 'wdi_col_' . $feed_row['number_of_columns'] ?>" wdi-res='<?php echo 'wdi_col_' . $feed_row['number_of_columns'] ?>'></div>
|
|
|
53 |
<div class="wdi_clear"></div>
|
54 |
|
55 |
<?php switch ($feed_row['feed_display_view']) {
|
105 |
<div class="wdi_front_overlay"></div>
|
106 |
</div>
|
107 |
<?php
|
|
|
108 |
}
|
109 |
|
110 |
+
public function pass_feed_data_to_js() {
|
|
|
|
|
111 |
global $wdi_options;
|
112 |
$feed_row = $this->model->get_feed_row();
|
113 |
|
116 |
$users = array();
|
117 |
}
|
118 |
|
|
|
119 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
120 |
$feed_row['access_token'] = WDILibrary::get_user_access_token($users);
|
121 |
$feed_row['wdi_feed_counter'] = $wdi_feed_counter;
|
124 |
wp_localize_script("wdi_frontend", 'wdi_theme_' . $this->model->theme_row['id'], $this->model->theme_row);
|
125 |
wp_localize_script("wdi_frontend", 'wdi_front', array('feed_counter' => $wdi_feed_counter));
|
126 |
|
127 |
+
if ( WDILibrary::is_ajax() || WDILibrary::elementor_is_active() ) {
|
128 |
wdi_load_frontend_scripts_ajax();
|
129 |
+
echo '<style id="generate_feed_styles-inline-css">' . $this->generate_feed_styles( $feed_row, TRUE ) .'</style>';
|
130 |
}
|
131 |
}
|
132 |
|
169 |
}
|
170 |
}
|
171 |
|
172 |
+
public function generate_feed_styles( $feed_row, $return = FALSE ) {
|
|
|
173 |
$style = $this->model->theme_row;
|
174 |
$wdi_feed_counter = $this->model->wdi_feed_counter;
|
175 |
$colNum = (100 / $feed_row['number_of_columns']);
|
176 |
+
ob_start();
|
|
|
177 |
?>
|
178 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_header {
|
179 |
display: <?php echo ($feed_row['display_header']=='1')? 'block' : 'none'?>; /*if display-header is true display:block*/
|
202 |
line-height: 0;
|
203 |
}
|
204 |
|
205 |
+
<?php if($feed_row['disable_mobile_layout']=="0") { ?>
|
|
|
206 |
@media screen and (min-width: 800px) and (max-width: 1024px) {
|
207 |
#wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
|
208 |
width: <?php echo ($colNum<33.33) ? '33.333333333333%' : $colNum.'%'?>; /*thumbnail_size*/
|
251 |
background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
|
252 |
}
|
253 |
}
|
254 |
+
<?php }
|
|
|
|
|
255 |
$css = ob_get_contents();
|
256 |
ob_end_clean();
|
257 |
+
if ( $return ) {
|
258 |
+
return $css;
|
259 |
+
}
|
260 |
|
261 |
wp_register_style( 'generate_feed_styles', false );
|
262 |
wp_enqueue_style( 'generate_feed_styles' );
|
js/wdi_frontend.js
CHANGED
@@ -277,7 +277,6 @@ wdi_front.getFeedItemResolution = function (currentFeed) {
|
|
277 |
var attr = container.attr('wdi-res').split('wdi_col_');
|
278 |
container.find('#wdi_feed_item_example').remove();
|
279 |
|
280 |
-
|
281 |
if(attr.length !== 2){
|
282 |
return defaultResolution;
|
283 |
}
|
@@ -288,16 +287,17 @@ wdi_front.getFeedItemResolution = function (currentFeed) {
|
|
288 |
}
|
289 |
|
290 |
var size = (container.width() / itemsCount) - 10;
|
291 |
-
|
292 |
var resolution = defaultResolution;
|
293 |
|
294 |
if(size <= 150){
|
295 |
resolution.image = "thumbnail";
|
296 |
resolution.video = "low_bandwidth";
|
297 |
-
}
|
|
|
298 |
resolution.image = "low_resolution";
|
299 |
resolution.video = "low_resolution";
|
300 |
-
}
|
|
|
301 |
resolution.image = "standard_resolution";
|
302 |
resolution.video = "standard_resolution";
|
303 |
}
|
277 |
var attr = container.attr('wdi-res').split('wdi_col_');
|
278 |
container.find('#wdi_feed_item_example').remove();
|
279 |
|
|
|
280 |
if(attr.length !== 2){
|
281 |
return defaultResolution;
|
282 |
}
|
287 |
}
|
288 |
|
289 |
var size = (container.width() / itemsCount) - 10;
|
|
|
290 |
var resolution = defaultResolution;
|
291 |
|
292 |
if(size <= 150){
|
293 |
resolution.image = "thumbnail";
|
294 |
resolution.video = "low_bandwidth";
|
295 |
+
}
|
296 |
+
else if(size > 150 && size <= 320){
|
297 |
resolution.image = "low_resolution";
|
298 |
resolution.video = "low_resolution";
|
299 |
+
}
|
300 |
+
else{
|
301 |
resolution.image = "standard_resolution";
|
302 |
resolution.video = "standard_resolution";
|
303 |
}
|
js/wdi_responsive.js
CHANGED
@@ -11,8 +11,7 @@ function wdi_responsive()
|
|
11 |
/*
|
12 |
* Calculates current column layout and gives proper column classes
|
13 |
*/
|
14 |
-
wdi_responsive.columnControl = function (currentFeed, load, customWidth)
|
15 |
-
{
|
16 |
currentFeed.openRows = [];
|
17 |
if (load === 1) {
|
18 |
var wrapper = jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + " .wdi_feed_wrapper");
|
@@ -37,8 +36,6 @@ wdi_responsive.columnControl = function (currentFeed, load, customWidth)
|
|
37 |
wrapper.removeClass(currentClass);
|
38 |
wrapper.attr('wdi-res', newClass);
|
39 |
wrapper.addClass(newClass);
|
40 |
-
|
41 |
-
|
42 |
//////////////////////////////////////////
|
43 |
if (currentClass != newClass) {
|
44 |
var colNum = newClass.substr(8, newClass.length);
|
@@ -64,13 +61,9 @@ wdi_responsive.columnControl = function (currentFeed, load, customWidth)
|
|
64 |
|
65 |
}
|
66 |
}
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
jQuery(window).resize(function ()
|
71 |
-
{
|
72 |
-
|
73 |
-
|
74 |
var wrapper = jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + " .wdi_feed_wrapper");
|
75 |
if (wrapper.length == 0) {
|
76 |
return;
|
@@ -85,8 +78,6 @@ wdi_responsive.columnControl = function (currentFeed, load, customWidth)
|
|
85 |
}
|
86 |
|
87 |
var currentClass = wrapper.attr('wdi-res');
|
88 |
-
|
89 |
-
|
90 |
//check if layout was changed then reposition masonry
|
91 |
if (currentFeed.feed_row.feed_type == 'masonry') {
|
92 |
var itemWidth = jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + " .wdi_masonry_column").first().width();
|
@@ -99,7 +90,6 @@ wdi_responsive.columnControl = function (currentFeed, load, customWidth)
|
|
99 |
wrapper.attr('wdi-res', newClass);
|
100 |
wrapper.addClass(newClass);
|
101 |
|
102 |
-
|
103 |
//Feed type based configurations
|
104 |
if (currentFeed.feed_row.feed_type === 'thumbnails') {
|
105 |
//fixes row which was opened by user
|
@@ -132,8 +122,6 @@ wdi_responsive.columnControl = function (currentFeed, load, customWidth)
|
|
132 |
wdi_front.masonryDisplayFeedItems(dataToBeDisplayed, currentFeed);
|
133 |
wdi_front.applyFilters(currentFeed);
|
134 |
///wdi_front.allImagesLoaded(currentFeed);
|
135 |
-
|
136 |
-
|
137 |
}
|
138 |
}
|
139 |
//////////////////////////////////////////
|
@@ -158,16 +146,10 @@ wdi_responsive.columnControl = function (currentFeed, load, customWidth)
|
|
158 |
}
|
159 |
k++;
|
160 |
});
|
161 |
-
|
162 |
}
|
163 |
}
|
164 |
-
|
165 |
-
|
166 |
});
|
167 |
-
|
168 |
}
|
169 |
-
|
170 |
-
|
171 |
};
|
172 |
wdi_responsive.bindCaptionEvent = function (imgtitle, currentFeed)
|
173 |
{
|
@@ -203,8 +185,6 @@ wdi_responsive.showCaption = function (caption, currentFeedCounter)
|
|
203 |
for (var i = 0; i < colNum; i++) {
|
204 |
var rowIndex = i + (imgBeforRows) * colNum;
|
205 |
indexes.push(rowIndex);
|
206 |
-
|
207 |
-
|
208 |
}
|
209 |
|
210 |
if (imgItem.hasClass('wdi_full_caption')) {
|
@@ -239,8 +219,7 @@ wdi_responsive.showCaption = function (caption, currentFeedCounter)
|
|
239 |
currentFeed.affectedRow = true;
|
240 |
|
241 |
}
|
242 |
-
wdi_responsive.fixRow = function (currentFeed)
|
243 |
-
{
|
244 |
jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + ' .wdi_row_affected').each(function ()
|
245 |
{
|
246 |
jQuery(this).css('height', 'auto');
|
@@ -255,7 +234,8 @@ wdi_responsive.fixRow = function (currentFeed)
|
|
255 |
jQuery(this).find('.wdi_photo_title').trigger(wdi_front.clickOrTouch);
|
256 |
}
|
257 |
});
|
258 |
-
}
|
|
|
259 |
jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + ' .wdi_full_caption').each(function ()
|
260 |
{
|
261 |
//triggering two times one time for fixing row second for bringing back old state
|
@@ -263,12 +243,9 @@ wdi_responsive.fixRow = function (currentFeed)
|
|
263 |
jQuery(this).find('.wdi_photo_title').trigger(wdi_front.clickOrTouch);
|
264 |
});
|
265 |
}
|
266 |
-
|
267 |
-
|
268 |
}
|
269 |
|
270 |
-
wdi_responsive.showMasonryCaption = function (caption, currentFeedCounter)
|
271 |
-
{
|
272 |
var currentFeed = window["wdi_feed_" + currentFeedCounter];
|
273 |
|
274 |
var imgItem = caption.parent().parent();
|
11 |
/*
|
12 |
* Calculates current column layout and gives proper column classes
|
13 |
*/
|
14 |
+
wdi_responsive.columnControl = function (currentFeed, load, customWidth) {
|
|
|
15 |
currentFeed.openRows = [];
|
16 |
if (load === 1) {
|
17 |
var wrapper = jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + " .wdi_feed_wrapper");
|
36 |
wrapper.removeClass(currentClass);
|
37 |
wrapper.attr('wdi-res', newClass);
|
38 |
wrapper.addClass(newClass);
|
|
|
|
|
39 |
//////////////////////////////////////////
|
40 |
if (currentClass != newClass) {
|
41 |
var colNum = newClass.substr(8, newClass.length);
|
61 |
|
62 |
}
|
63 |
}
|
64 |
+
}
|
65 |
+
else {
|
66 |
+
jQuery(window).resize(function () {
|
|
|
|
|
|
|
|
|
67 |
var wrapper = jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + " .wdi_feed_wrapper");
|
68 |
if (wrapper.length == 0) {
|
69 |
return;
|
78 |
}
|
79 |
|
80 |
var currentClass = wrapper.attr('wdi-res');
|
|
|
|
|
81 |
//check if layout was changed then reposition masonry
|
82 |
if (currentFeed.feed_row.feed_type == 'masonry') {
|
83 |
var itemWidth = jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + " .wdi_masonry_column").first().width();
|
90 |
wrapper.attr('wdi-res', newClass);
|
91 |
wrapper.addClass(newClass);
|
92 |
|
|
|
93 |
//Feed type based configurations
|
94 |
if (currentFeed.feed_row.feed_type === 'thumbnails') {
|
95 |
//fixes row which was opened by user
|
122 |
wdi_front.masonryDisplayFeedItems(dataToBeDisplayed, currentFeed);
|
123 |
wdi_front.applyFilters(currentFeed);
|
124 |
///wdi_front.allImagesLoaded(currentFeed);
|
|
|
|
|
125 |
}
|
126 |
}
|
127 |
//////////////////////////////////////////
|
146 |
}
|
147 |
k++;
|
148 |
});
|
|
|
149 |
}
|
150 |
}
|
|
|
|
|
151 |
});
|
|
|
152 |
}
|
|
|
|
|
153 |
};
|
154 |
wdi_responsive.bindCaptionEvent = function (imgtitle, currentFeed)
|
155 |
{
|
185 |
for (var i = 0; i < colNum; i++) {
|
186 |
var rowIndex = i + (imgBeforRows) * colNum;
|
187 |
indexes.push(rowIndex);
|
|
|
|
|
188 |
}
|
189 |
|
190 |
if (imgItem.hasClass('wdi_full_caption')) {
|
219 |
currentFeed.affectedRow = true;
|
220 |
|
221 |
}
|
222 |
+
wdi_responsive.fixRow = function (currentFeed) {
|
|
|
223 |
jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + ' .wdi_row_affected').each(function ()
|
224 |
{
|
225 |
jQuery(this).css('height', 'auto');
|
234 |
jQuery(this).find('.wdi_photo_title').trigger(wdi_front.clickOrTouch);
|
235 |
}
|
236 |
});
|
237 |
+
}
|
238 |
+
else {
|
239 |
jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter + ' .wdi_full_caption').each(function ()
|
240 |
{
|
241 |
//triggering two times one time for fixing row second for bringing back old state
|
243 |
jQuery(this).find('.wdi_photo_title').trigger(wdi_front.clickOrTouch);
|
244 |
});
|
245 |
}
|
|
|
|
|
246 |
}
|
247 |
|
248 |
+
wdi_responsive.showMasonryCaption = function (caption, currentFeedCounter) {
|
|
|
249 |
var currentFeed = window["wdi_feed_" + currentFeedCounter];
|
250 |
|
251 |
var imgItem = caption.parent().parent();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram
|
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.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,10 @@ 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.12 =
|
509 |
Fixed: Ordering for hashtag.
|
510 |
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 1.4.13
|
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.13 =
|
509 |
+
Fixed: Preview in Elementor.
|
510 |
+
Fixed: Issue when "Check for new posts every" option set to 0.
|
511 |
+
|
512 |
= 1.4.12 =
|
513 |
Fixed: Ordering for hashtag.
|
514 |
|
wd-instagram-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: 10Web Social Photo Feed
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin
|
5 |
* Description: 10Web Social Photo Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
|
6 |
-
* Version: 1.4.
|
7 |
* Author: 10Web
|
8 |
* Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
|
9 |
* License: GPLv2 or later
|
@@ -39,16 +39,13 @@ function wdi_register_plugin_block($blocks){
|
|
39 |
}
|
40 |
|
41 |
function wdi_register_block_editor_assets($assets){
|
42 |
-
$
|
43 |
$version = '2.0.3';
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
$css_path = $wd_bp_plugin_url . '/css/block.css';
|
50 |
-
}
|
51 |
-
if(!isset($assets['version']) || version_compare($assets['version'], $version) === -1) {
|
52 |
$assets['version'] = $version;
|
53 |
$assets['js_path'] = $js_path;
|
54 |
$assets['css_path'] = $css_path;
|
@@ -262,7 +259,9 @@ function wdi_privacy_policy() {
|
|
262 |
);
|
263 |
}
|
264 |
$wdi_options = wdi_get_options();
|
265 |
-
|
|
|
|
|
266 |
|
267 |
add_action( 'wdi_cache_cron', 'wdi_run_cache_cron' );
|
268 |
function wdi_run_cache_cron() {
|
@@ -420,20 +419,15 @@ function wdi_load_scripts(){
|
|
420 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
421 |
global $wdi_options;
|
422 |
$page = WDILibrary::get('page');
|
423 |
-
if($page === 'wdi_themes' || $page === 'wdi_feeds' || $page === 'wdi_settings' || $page === 'wdi_uninstall') {
|
|
|
424 |
wp_register_style(WDI_PREFIX . '-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
|
425 |
wp_enqueue_script('jquery-color');
|
426 |
wp_enqueue_script('wp-color-picker');
|
427 |
wp_enqueue_style('wp-color-picker');
|
428 |
|
429 |
-
|
430 |
-
|
431 |
-
wp_enqueue_script('wdi_instagram', plugins_url('js/wdi_instagram.min.js', __FILE__), array("jquery"), wdi_get_pro_version());
|
432 |
-
}
|
433 |
-
else {
|
434 |
-
wp_enqueue_script('wdi_admin', plugins_url('js/wdi_admin.js', __FILE__), array("jquery", 'wdi_instagram'), wdi_get_pro_version());
|
435 |
-
wp_enqueue_script('wdi_instagram', plugins_url('js/wdi_instagram.js', __FILE__), array("jquery"), wdi_get_pro_version());
|
436 |
-
}
|
437 |
|
438 |
//localize
|
439 |
$uninstall_url = wp_nonce_url(admin_url('admin-ajax.php'), 'wdiUninstallPlugin', 'uninstall_nonce');
|
@@ -482,16 +476,12 @@ function wdi_load_scripts(){
|
|
482 |
//loading admin styles
|
483 |
add_action('admin_enqueue_scripts', 'wdi_load_styles');
|
484 |
|
485 |
-
function wdi_load_styles(){
|
486 |
-
|
487 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
488 |
$page = WDILibrary::get('page');
|
489 |
-
if($page === 'wdi_themes' || $page === 'wdi_feeds' || $page === 'wdi_settings' || $page === 'wdi_uninstall') {
|
490 |
-
|
491 |
-
|
492 |
-
} else {
|
493 |
-
wp_enqueue_style('wdi_backend', plugins_url('css/wdi_backend.css', __FILE__), array(), wdi_get_pro_version());
|
494 |
-
}
|
495 |
}
|
496 |
}
|
497 |
|
@@ -829,7 +819,7 @@ function wdi_filter_var_notice(){
|
|
829 |
/*ELEMENTOR*/
|
830 |
add_action('plugins_loaded', 'wdi_elementor');
|
831 |
function wdi_elementor(){
|
832 |
-
if(defined('ELEMENTOR_VERSION')) {
|
833 |
include_once 'elementor/elementor.php';
|
834 |
WDIElementor::get_instance();
|
835 |
}
|
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.13
|
7 |
* Author: 10Web
|
8 |
* Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
|
9 |
* License: GPLv2 or later
|
39 |
}
|
40 |
|
41 |
function wdi_register_block_editor_assets($assets){
|
42 |
+
$min = ( WDI_MINIFY === true ) ? '.min' : '';
|
43 |
$version = '2.0.3';
|
44 |
+
$wd_bp_plugin_url = WDI_URL;
|
45 |
+
$js_path = $wd_bp_plugin_url . '/js/block' . $min . '.js';
|
46 |
+
$css_path = $wd_bp_plugin_url . '/css/block' . $min . '.css';
|
47 |
+
|
48 |
+
if ( !isset($assets['version']) || version_compare($assets['version'], $version) === -1 ) {
|
|
|
|
|
|
|
49 |
$assets['version'] = $version;
|
50 |
$assets['js_path'] = $js_path;
|
51 |
$assets['css_path'] = $css_path;
|
259 |
);
|
260 |
}
|
261 |
$wdi_options = wdi_get_options();
|
262 |
+
if ( $wdi_options["wdi_transient_time"] > 0 ) {
|
263 |
+
wp_schedule_single_event( time() + (intval($wdi_options["wdi_transient_time"])*60), 'wdi_cache_cron' );
|
264 |
+
}
|
265 |
|
266 |
add_action( 'wdi_cache_cron', 'wdi_run_cache_cron' );
|
267 |
function wdi_run_cache_cron() {
|
419 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
420 |
global $wdi_options;
|
421 |
$page = WDILibrary::get('page');
|
422 |
+
if ( $page === 'wdi_themes' || $page === 'wdi_feeds' || $page === 'wdi_settings' || $page === 'wdi_uninstall' ) {
|
423 |
+
$min = ( WDI_MINIFY === true ) ? '.min' : '';
|
424 |
wp_register_style(WDI_PREFIX . '-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
|
425 |
wp_enqueue_script('jquery-color');
|
426 |
wp_enqueue_script('wp-color-picker');
|
427 |
wp_enqueue_style('wp-color-picker');
|
428 |
|
429 |
+
wp_enqueue_script('wdi_admin', plugins_url('js/wdi_admin' . $min . '.js', __FILE__), array("jquery", 'wdi_instagram'), wdi_get_pro_version());
|
430 |
+
wp_enqueue_script('wdi_instagram', plugins_url('js/wdi_instagram' . $min . '.js', __FILE__), array("jquery"), wdi_get_pro_version());
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
|
432 |
//localize
|
433 |
$uninstall_url = wp_nonce_url(admin_url('admin-ajax.php'), 'wdiUninstallPlugin', 'uninstall_nonce');
|
476 |
//loading admin styles
|
477 |
add_action('admin_enqueue_scripts', 'wdi_load_styles');
|
478 |
|
479 |
+
function wdi_load_styles() {
|
|
|
480 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
481 |
$page = WDILibrary::get('page');
|
482 |
+
if ( $page === 'wdi_themes' || $page === 'wdi_feeds' || $page === 'wdi_settings' || $page === 'wdi_uninstall' ) {
|
483 |
+
$min = ( WDI_MINIFY === true ) ? '.min' : '';
|
484 |
+
wp_enqueue_style('wdi_backend', plugins_url('css/wdi_backend' . $min . '.css', __FILE__), array(), wdi_get_pro_version());
|
|
|
|
|
|
|
485 |
}
|
486 |
}
|
487 |
|
819 |
/*ELEMENTOR*/
|
820 |
add_action('plugins_loaded', 'wdi_elementor');
|
821 |
function wdi_elementor(){
|
822 |
+
if ( defined('ELEMENTOR_VERSION') ) {
|
823 |
include_once 'elementor/elementor.php';
|
824 |
WDIElementor::get_instance();
|
825 |
}
|