Version Description
Removed: Banner to install Image optimizer.
Download this release
Release Info
Developer | 10web |
Plugin | WD Instagram Feed – Instagram Gallery |
Version | 1.3.24 |
Comparing to | |
See all releases |
Code changes from version 1.3.23 to 1.3.24
- banner_class.php +0 -512
- readme.txt +6 -3
- wd-instagram-feed.php +12 -67
banner_class.php
DELETED
@@ -1,512 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TWBanner {
|
4 |
-
public $menu_postfix = ''; // To display on only current plugin pages.
|
5 |
-
public $prefix = ''; // Current plugin prefix.
|
6 |
-
public $logo = ''; // Current plugin logo relative URL.
|
7 |
-
public $plugin_slug = ''; // Current plugin slug.
|
8 |
-
public $plugin_url = ''; // Current plugin URL.
|
9 |
-
public $plugin_id = ''; // Current plugin id.
|
10 |
-
public $text = ''; // Banner text.
|
11 |
-
public $slug = ''; // Plugin slug to be installed.
|
12 |
-
public $mu_plugin_slug = ''; // Must use plugin slug.
|
13 |
-
public $base_php = ''; // Plugin base php filename to be installed.
|
14 |
-
public $page_url = ''; // Redirect to URL after activating the plugin.
|
15 |
-
public $status_install = 0; // Is plugin installed.
|
16 |
-
public $status_active = 0; // Is plugin active.
|
17 |
-
|
18 |
-
/**
|
19 |
-
* TW_Banner_Class constructor.
|
20 |
-
*
|
21 |
-
* @param $opt_banner_param
|
22 |
-
*/
|
23 |
-
public function __construct( $opt_banner_param ) {
|
24 |
-
$this->menu_postfix = $opt_banner_param["menu_postfix"];
|
25 |
-
$this->prefix = $opt_banner_param["prefix"];
|
26 |
-
$this->logo = $opt_banner_param["logo"];
|
27 |
-
$this->plugin_slug = $opt_banner_param['plugin_slug'];
|
28 |
-
$this->plugin_url = $opt_banner_param["plugin_url"];
|
29 |
-
$this->plugin_id = $opt_banner_param['plugin_id'];
|
30 |
-
$this->text = $opt_banner_param['text'];
|
31 |
-
$this->slug = $opt_banner_param['slug'];
|
32 |
-
$this->mu_plugin_slug = $opt_banner_param['mu_plugin_slug'];
|
33 |
-
$this->base_php = $opt_banner_param['base_php'];
|
34 |
-
$this->page_url = $opt_banner_param['page_url'];
|
35 |
-
$this->init();
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Add actions.
|
40 |
-
*/
|
41 |
-
public function init() {
|
42 |
-
add_action('wp_ajax_wd_tenweb_dismiss', array( $this, 'dismiss' ));
|
43 |
-
add_action('wp_ajax_tenweb_status', array( $this, 'change_status' ));
|
44 |
-
|
45 |
-
// Check the page to show banner.
|
46 |
-
if ( ( !isset($_GET['page']) || ( preg_match("/^$this->menu_postfix/", esc_html( $_GET['page'] )) === 0 && preg_match("/$this->menu_postfix$/", esc_html( $_GET['page'] )) === 0 )) || ( isset($_GET['task']) && !strpos(esc_html($_GET['task']), 'edit') === TRUE && !(strpos(esc_html($_GET['task']), 'display') > -1)) ) {
|
47 |
-
|
48 |
-
return;
|
49 |
-
}
|
50 |
-
|
51 |
-
if ( $this->is_plugin_mu($this->mu_plugin_slug) ) {
|
52 |
-
$this->status_install = 1;
|
53 |
-
$this->status_active = 1;
|
54 |
-
}
|
55 |
-
else {
|
56 |
-
$this->upgrade_install_status();
|
57 |
-
}
|
58 |
-
if ( !$this->status_active ) {
|
59 |
-
add_action('admin_notices', array( $this, 'tenweb_install_notice' ));
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Check plugin install status.
|
65 |
-
*/
|
66 |
-
public function upgrade_install_status() {
|
67 |
-
if ( !function_exists('is_plugin_active') ) {
|
68 |
-
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
69 |
-
}
|
70 |
-
if ( $this->is_plugin_installed($this->slug) ) {
|
71 |
-
$this->status_install = 1;
|
72 |
-
if ( is_plugin_active($this->slug . '/' . $this->base_php) ) {
|
73 |
-
$this->status_active = 1;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Save status.
|
80 |
-
*/
|
81 |
-
public function dismiss() {
|
82 |
-
update_option('tenweb_notice_status', '1', 'no');
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Plugin install/activate status.
|
87 |
-
*
|
88 |
-
* @return string
|
89 |
-
*/
|
90 |
-
public function tenweb_install_notice() {
|
91 |
-
// Remove old notice.
|
92 |
-
if ( get_option('tenweb_notice_status') !== FALSE ) {
|
93 |
-
update_option('tenweb_notice_status', '1', 'no');
|
94 |
-
}
|
95 |
-
$meta_value = get_option('tenweb_notice_status');
|
96 |
-
if ( $meta_value === '' || $meta_value === FALSE ) {
|
97 |
-
ob_start();
|
98 |
-
$dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
|
99 |
-
$verify_url = add_query_arg(array( 'action' => 'tenweb_status' ), admin_url('admin-ajax.php'));
|
100 |
-
?>
|
101 |
-
<style>
|
102 |
-
.hide {
|
103 |
-
display: none !important;
|
104 |
-
}
|
105 |
-
#verifyUrl {
|
106 |
-
display: none;
|
107 |
-
}
|
108 |
-
#loading {
|
109 |
-
position: absolute;
|
110 |
-
right: 20px;
|
111 |
-
top: 50%;
|
112 |
-
transform: translateY(-50%);
|
113 |
-
margin: 0px;
|
114 |
-
background: url("<?php echo $this->plugin_url . '/images/spinner.gif'; ?>") no-repeat;
|
115 |
-
background-size: 20px 20px;
|
116 |
-
filter: alpha(opacity=70);
|
117 |
-
}
|
118 |
-
#wd_tenweb_logo_notice {
|
119 |
-
height: 32px;
|
120 |
-
float: left;
|
121 |
-
}
|
122 |
-
.error_install,
|
123 |
-
.error_activate {
|
124 |
-
color: red;
|
125 |
-
font-size: 10px;
|
126 |
-
}
|
127 |
-
#wpbody-content #v2_tenweb_notice_cont {
|
128 |
-
display: none;
|
129 |
-
flex-wrap: wrap;
|
130 |
-
background: #fff;
|
131 |
-
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
|
132 |
-
position: relative;
|
133 |
-
margin-left: 0px;
|
134 |
-
padding: 5px 0;
|
135 |
-
overflow: hidden;
|
136 |
-
border-left: 4px solid #0073AA;
|
137 |
-
font-family: Open Sans, sans-serif;
|
138 |
-
height: 40px;
|
139 |
-
min-height: 40px;
|
140 |
-
box-sizing: initial;
|
141 |
-
}
|
142 |
-
.v2_logo {
|
143 |
-
display: flex;
|
144 |
-
flex-direction: column;
|
145 |
-
justify-content: center;
|
146 |
-
height: inherit;
|
147 |
-
}
|
148 |
-
#v2_tenweb_notice_cont {
|
149 |
-
height: 50px;
|
150 |
-
padding: 0px;
|
151 |
-
}
|
152 |
-
.v2_content {
|
153 |
-
flex-grow: 1;
|
154 |
-
height: inherit;
|
155 |
-
margin-left: 25px;
|
156 |
-
}
|
157 |
-
.v2_content p {
|
158 |
-
margin: 0px;
|
159 |
-
padding: 0px;
|
160 |
-
}
|
161 |
-
.v2_content p > span {
|
162 |
-
font-size: 16px;
|
163 |
-
color: #333B46;
|
164 |
-
font-weight: 600;
|
165 |
-
line-height: 40px;
|
166 |
-
margin: 0;
|
167 |
-
}
|
168 |
-
#wd_tenweb_logo_notice {
|
169 |
-
margin-left: 25px;
|
170 |
-
height: 30px;
|
171 |
-
line-height: 100%;
|
172 |
-
}
|
173 |
-
.v2_button {
|
174 |
-
display: flex;
|
175 |
-
margin-right: 30px;
|
176 |
-
flex-direction: column;
|
177 |
-
justify-content: center;
|
178 |
-
}
|
179 |
-
.v2_button #install_now, #activate_now {
|
180 |
-
width: 112px;
|
181 |
-
height: 32px;
|
182 |
-
line-height: 30px;
|
183 |
-
font-size: 14px;
|
184 |
-
text-align: center;
|
185 |
-
padding: 0;
|
186 |
-
}
|
187 |
-
#v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
|
188 |
-
top: 3px;
|
189 |
-
right: 3px;
|
190 |
-
padding: 0px;
|
191 |
-
}
|
192 |
-
.v2_button .button {
|
193 |
-
position: relative;
|
194 |
-
}
|
195 |
-
.v2_button .button #loading {
|
196 |
-
position: absolute;
|
197 |
-
right: 10px;
|
198 |
-
top: 50%;
|
199 |
-
transform: translateY(-50%);
|
200 |
-
margin: 0px;
|
201 |
-
background-size: 12px 12px;
|
202 |
-
filter: alpha(opacity=70);
|
203 |
-
width: 12px;
|
204 |
-
height: 12px;
|
205 |
-
}
|
206 |
-
@media only screen and (max-width: 1200px) and (min-width: 821px) {
|
207 |
-
#wpbody-content #v2_tenweb_notice_cont {
|
208 |
-
height: 50px;
|
209 |
-
min-height: 50px;
|
210 |
-
}
|
211 |
-
#v2_tenweb_notice_cont {
|
212 |
-
height: 60px;
|
213 |
-
}
|
214 |
-
.v2_content {
|
215 |
-
margin-left: 25px;
|
216 |
-
}
|
217 |
-
.v2_content p {
|
218 |
-
font-size: 14px;
|
219 |
-
color: #333B46;
|
220 |
-
font-weight: 600;
|
221 |
-
line-height: 20px;
|
222 |
-
margin-top: 5px;
|
223 |
-
}
|
224 |
-
.v2_content p span {
|
225 |
-
display: block;
|
226 |
-
}
|
227 |
-
#wd_tenweb_logo_notice {
|
228 |
-
margin-left: 25px;
|
229 |
-
height: 30px;
|
230 |
-
line-height: 100%;
|
231 |
-
}
|
232 |
-
.v2_button {
|
233 |
-
display: flex;
|
234 |
-
margin-right: 30px;
|
235 |
-
flex-direction: column;
|
236 |
-
justify-content: center;
|
237 |
-
}
|
238 |
-
.v2_button #install_now {
|
239 |
-
width: 112px;
|
240 |
-
height: 32px;
|
241 |
-
line-height: 30px;
|
242 |
-
font-size: 14px;
|
243 |
-
text-align: center;
|
244 |
-
padding: 0;
|
245 |
-
}
|
246 |
-
#v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
|
247 |
-
top: 3px;
|
248 |
-
right: 3px;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
@media only screen and (max-width: 820px) and (min-width: 781px) {
|
252 |
-
#wpbody-content #v2_tenweb_notice_cont {
|
253 |
-
height: 50px;
|
254 |
-
min-height: 50px;
|
255 |
-
}
|
256 |
-
#v2_tenweb_notice_cont {
|
257 |
-
height: 60px;
|
258 |
-
}
|
259 |
-
.v2_content {
|
260 |
-
margin-left: 25px;
|
261 |
-
}
|
262 |
-
.v2_content p {
|
263 |
-
font-size: 13px;
|
264 |
-
color: #333B46;
|
265 |
-
font-weight: 600;
|
266 |
-
line-height: 20px;
|
267 |
-
margin-top: 5px;
|
268 |
-
}
|
269 |
-
.v2_content p span {
|
270 |
-
display: block;
|
271 |
-
}
|
272 |
-
}
|
273 |
-
@media only screen and (max-width: 780px) {
|
274 |
-
#wpbody-content #v2_tenweb_notice_cont {
|
275 |
-
height: auto;
|
276 |
-
min-height: auto;
|
277 |
-
}
|
278 |
-
#v2_tenweb_notice_cont {
|
279 |
-
height: auto;
|
280 |
-
padding: 5px;
|
281 |
-
}
|
282 |
-
.v2_logo {
|
283 |
-
display: block;
|
284 |
-
height: auto;
|
285 |
-
width: 100%;
|
286 |
-
margin-top: 5px;
|
287 |
-
}
|
288 |
-
.v2_content {
|
289 |
-
display: block;
|
290 |
-
margin-left: 9px;
|
291 |
-
margin-top: 10px;
|
292 |
-
width: calc(100% - 10px);
|
293 |
-
}
|
294 |
-
.v2_content p {
|
295 |
-
line-height: unset;
|
296 |
-
font-size: 15px;
|
297 |
-
line-height: 25px;
|
298 |
-
}
|
299 |
-
.v2_content p span {
|
300 |
-
display: block;
|
301 |
-
}
|
302 |
-
#wd_tenweb_logo_notice {
|
303 |
-
margin-left: 9px;
|
304 |
-
}
|
305 |
-
.v2_button {
|
306 |
-
margin-left: 9px;
|
307 |
-
margin-top: 10px;
|
308 |
-
margin-bottom: 5px;
|
309 |
-
}
|
310 |
-
}
|
311 |
-
</style>
|
312 |
-
<script type="text/javascript">
|
313 |
-
jQuery(document).ready(function () {
|
314 |
-
jQuery('#v2_tenweb_notice_cont').css('display', 'flex');
|
315 |
-
});
|
316 |
-
</script>
|
317 |
-
<div id="v2_tenweb_notice_cont" class="notice wd-notice">
|
318 |
-
<div class="v2_logo">
|
319 |
-
<img id="wd_tenweb_logo_notice" src="<?php echo $this->plugin_url . $this->logo; ?>" />
|
320 |
-
</div>
|
321 |
-
<div class="v2_content">
|
322 |
-
<p>
|
323 |
-
<?php echo $this->text ?>
|
324 |
-
</p>
|
325 |
-
</div>
|
326 |
-
<div class="v2_button">
|
327 |
-
<?php $this->tw_install_button(2); ?>
|
328 |
-
</div>
|
329 |
-
<button type="button" class="wd_tenweb_notice_dissmiss notice-dismiss" onclick="jQuery('#v2_tenweb_notice_cont').attr('style', 'display: none !important;'); jQuery.post('<?php echo $dismiss_url; ?>');">
|
330 |
-
<span class="screen-reader-text"></span></button>
|
331 |
-
<div id="verifyUrl" data-url="<?php echo $verify_url; ?>"></div>
|
332 |
-
</div>
|
333 |
-
<?php
|
334 |
-
echo ob_get_clean();
|
335 |
-
}
|
336 |
-
}
|
337 |
-
|
338 |
-
/**
|
339 |
-
* Change status.
|
340 |
-
*/
|
341 |
-
public function change_status() {
|
342 |
-
$this->upgrade_install_status();
|
343 |
-
if ( $this->status_install ) {
|
344 |
-
$old_opt_array = array();
|
345 |
-
$new_opt_array = array( $this->plugin_slug => $this->plugin_id );
|
346 |
-
$key = 'tenweb_manager_installed';
|
347 |
-
$option = get_option($key);
|
348 |
-
if ( !empty($option) ) {
|
349 |
-
$old_opt_array = (array) json_decode($option);
|
350 |
-
}
|
351 |
-
$array_installed = array_merge($new_opt_array, $old_opt_array);
|
352 |
-
update_option($key, json_encode($array_installed));
|
353 |
-
}
|
354 |
-
$jsondata = array( 'status_install' => $this->status_install, 'status_active' => $this->status_active );
|
355 |
-
echo json_encode($jsondata);
|
356 |
-
exit;
|
357 |
-
}
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Install/activate button.
|
361 |
-
*
|
362 |
-
* @param $v
|
363 |
-
*/
|
364 |
-
public function tw_install_button( $v ) {
|
365 |
-
$prefix = $this->prefix;
|
366 |
-
$install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $this->slug), 'install-plugin_' . $this->slug));
|
367 |
-
$activation_url = $this->na_action_link($this->slug . '/' . $this->base_php, 'activate');
|
368 |
-
$tenweb_url = $this->page_url;
|
369 |
-
$dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
|
370 |
-
$activate = $this->status_install && !$this->status_active ? TRUE : FALSE;
|
371 |
-
?>
|
372 |
-
<a class="button<?php echo($v == 2 ? ' button-primary' : ''); ?> tenweb_activaion"
|
373 |
-
id="<?php echo $activate ? 'activate_now' : 'install_now'; ?>"
|
374 |
-
data-activation="<?php _e("Activation", $prefix); ?>"
|
375 |
-
data-tenweb-url="<?php echo $tenweb_url; ?>"
|
376 |
-
data-install-url="<?php echo $install_url; ?>"
|
377 |
-
data-activate-url="<?php echo $activation_url; ?>">
|
378 |
-
<span class="tenweb_activaion_text"><?php echo $activate ? __("Activate", $prefix) : __("Install", $prefix); ?></span>
|
379 |
-
<span class="spinner" id="loading"></span>
|
380 |
-
</a>
|
381 |
-
<span class="hide <?php echo $activate ? 'error_activate' : 'error_install tenweb_active'; ?> ">
|
382 |
-
<?php echo $activate ? __("Activation failed, please try again.", $prefix) : __("Installation failed, please try again.", $prefix); ?>
|
383 |
-
</span>
|
384 |
-
<script>
|
385 |
-
var url = jQuery(".tenweb_activaion").attr("data-install-url");
|
386 |
-
var activate_url = jQuery(".tenweb_activaion").attr("data-activate-url");
|
387 |
-
|
388 |
-
function install_tenweb_plugin() {
|
389 |
-
jQuery("#loading").addClass('is-active');
|
390 |
-
jQuery(this).prop('disable', true);
|
391 |
-
jQuery.ajax({
|
392 |
-
method: "POST",
|
393 |
-
url: url,
|
394 |
-
}).done(function () {
|
395 |
-
/* Check if plugin installed.*/
|
396 |
-
jQuery.ajax({
|
397 |
-
type: 'POST',
|
398 |
-
dataType: 'json',
|
399 |
-
url: jQuery("#verifyUrl").attr('data-url'),
|
400 |
-
error: function () {
|
401 |
-
jQuery("#loading").removeClass('is-active');
|
402 |
-
jQuery(".error_install").show();
|
403 |
-
},
|
404 |
-
success: function (response) {
|
405 |
-
if (response.status_install == 1) {
|
406 |
-
jQuery('#install_now .tenweb_activaion_text').text(jQuery("#install_now").data("activation"));
|
407 |
-
activate_tenweb_plugin();
|
408 |
-
}
|
409 |
-
else {
|
410 |
-
jQuery("#loading").removeClass('is-active');
|
411 |
-
jQuery(".error_install").removeClass('hide');
|
412 |
-
}
|
413 |
-
}
|
414 |
-
});
|
415 |
-
}).fail(function () {
|
416 |
-
jQuery("#loading").removeClass('is-active');
|
417 |
-
jQuery(".error_install").removeClass('hide');
|
418 |
-
});
|
419 |
-
}
|
420 |
-
|
421 |
-
function activate_tenweb_plugin() {
|
422 |
-
jQuery("#activate_now #loading").addClass('is-active');
|
423 |
-
jQuery.ajax({
|
424 |
-
method: "POST",
|
425 |
-
url: activate_url,
|
426 |
-
}).done(function () {
|
427 |
-
jQuery("#loading").removeClass('is-active');
|
428 |
-
var data_tenweb_url = '';
|
429 |
-
/* Check if plugin installed.*/
|
430 |
-
jQuery.ajax({
|
431 |
-
type: 'POST',
|
432 |
-
dataType: 'json',
|
433 |
-
url: jQuery("#verifyUrl").attr('data-url'),
|
434 |
-
error: function () {
|
435 |
-
jQuery("#loading").removeClass('is-active');
|
436 |
-
jQuery(".error_activate").removeClass('hide');
|
437 |
-
},
|
438 |
-
success: function (response) {
|
439 |
-
if (response.status_active == 1) {
|
440 |
-
//jQuery('#install_now').addClass('hide');
|
441 |
-
data_tenweb_url = jQuery('.tenweb_activaion').attr('data-tenweb-url');
|
442 |
-
jQuery.post('<?php echo $dismiss_url; ?>');
|
443 |
-
}
|
444 |
-
else {
|
445 |
-
jQuery("#loading").removeClass('is-active');
|
446 |
-
jQuery(".error_activate").removeClass('hide');
|
447 |
-
}
|
448 |
-
},
|
449 |
-
complete: function () {
|
450 |
-
if (data_tenweb_url != '') {
|
451 |
-
window.location.href = data_tenweb_url;
|
452 |
-
}
|
453 |
-
}
|
454 |
-
});
|
455 |
-
}).fail(function () {
|
456 |
-
jQuery("#loading").removeClass('is-active');
|
457 |
-
});
|
458 |
-
}
|
459 |
-
|
460 |
-
jQuery("#install_now").on("click", function () {
|
461 |
-
install_tenweb_plugin();
|
462 |
-
});
|
463 |
-
jQuery("#activate_now").on("click", function () {
|
464 |
-
activate_tenweb_plugin();
|
465 |
-
});
|
466 |
-
</script>
|
467 |
-
<?php
|
468 |
-
}
|
469 |
-
|
470 |
-
/**
|
471 |
-
* Check if plugin is installed.
|
472 |
-
*
|
473 |
-
* @param $plugin_slug
|
474 |
-
*
|
475 |
-
* @return bool
|
476 |
-
*/
|
477 |
-
public function is_plugin_installed( $plugin_slug ) {
|
478 |
-
if ( is_dir(WP_PLUGIN_DIR . '/' . $plugin_slug) ) {
|
479 |
-
return TRUE;
|
480 |
-
}
|
481 |
-
|
482 |
-
return FALSE;
|
483 |
-
}
|
484 |
-
|
485 |
-
/**
|
486 |
-
* Check if plugin is must used.
|
487 |
-
*
|
488 |
-
* @param $plugin_slug
|
489 |
-
*
|
490 |
-
* @return bool
|
491 |
-
*/
|
492 |
-
public function is_plugin_mu( $plugin_slug ) {
|
493 |
-
if ( $plugin_slug != '' ) {
|
494 |
-
if ( is_dir(WPMU_PLUGIN_DIR . '/' . $plugin_slug) ) {
|
495 |
-
return TRUE;
|
496 |
-
}
|
497 |
-
}
|
498 |
-
|
499 |
-
return FALSE;
|
500 |
-
}
|
501 |
-
|
502 |
-
public function na_action_link( $plugin, $action = 'activate' ) {
|
503 |
-
if ( strpos($plugin, '/') ) {
|
504 |
-
$plugin = str_replace('\/', '%2F', $plugin);
|
505 |
-
}
|
506 |
-
$url = sprintf(admin_url('plugins.php?action=' . $action . '&plugin=%s&plugin_status=all&paged=1&s'), $plugin);
|
507 |
-
$_REQUEST['plugin'] = $plugin;
|
508 |
-
$url = wp_nonce_url($url, $action . '-plugin_' . $plugin);
|
509 |
-
|
510 |
-
return $url;
|
511 |
-
}
|
512 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ed, 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.
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -506,8 +506,11 @@ Please make sure you don't have any important information before you proceed.
|
|
506 |
|
507 |
== Changelog ==
|
508 |
|
|
|
|
|
|
|
509 |
= 1.3.23 =
|
510 |
-
Fixed:
|
511 |
|
512 |
= 1.3.22 =
|
513 |
Improved: Do not use Font Awesome.
|
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.4
|
7 |
+
Stable tag: 1.3.24
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
506 |
|
507 |
== Changelog ==
|
508 |
|
509 |
+
= 1.3.24 =
|
510 |
+
Removed: Banner to install Image optimizer.
|
511 |
+
|
512 |
= 1.3.23 =
|
513 |
+
Fixed: Minor bug.
|
514 |
|
515 |
= 1.3.22 =
|
516 |
Improved: Do not use Font Awesome.
|
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.3.
|
7 |
Author: 10Web
|
8 |
Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
|
9 |
License: GPLv2 or later
|
@@ -21,7 +21,7 @@ define("WDI_META", "_" . WDI_VAR . "_meta");
|
|
21 |
//define("wdi",'wdi');
|
22 |
define('WDI_FEED_TABLE', 'wdi_feeds');
|
23 |
define('WDI_THEME_TABLE', 'wdi_themes');
|
24 |
-
define('WDI_VERSION', '1.3.
|
25 |
define('WD_WDI_PREFIX', 'wdi' );
|
26 |
define('WDI_IS_PRO', false );
|
27 |
$wdi_minify = ( isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true" ) ? FALSE : TRUE;
|
@@ -227,7 +227,6 @@ function wdi_send_response($data){
|
|
227 |
|
228 |
add_action('wp_ajax_WDIGalleryBox', 'wdi_ajax_frontend');
|
229 |
add_action('wp_ajax_nopriv_WDIGalleryBox', 'wdi_ajax_frontend');
|
230 |
-
add_action('admin_init', 'wdi_setup_redirect');
|
231 |
|
232 |
function wdi_ajax_frontend() {
|
233 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
@@ -276,20 +275,6 @@ function wdi_instagram_activate($networkwide) {
|
|
276 |
wdi_install();
|
277 |
}
|
278 |
|
279 |
-
function wdi_setup_redirect() {
|
280 |
-
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
281 |
-
if (get_option('wdi_do_activation_set_up_redirect') ) {
|
282 |
-
update_option('wdi_do_activation_set_up_redirect',0);
|
283 |
-
//wp_safe_redirect( admin_url( 'index.php?page=gmwd_setup' ) );
|
284 |
-
|
285 |
-
if(get_option( "wdi_subscribe_done" ) == 1){
|
286 |
-
return;
|
287 |
-
}
|
288 |
-
wp_safe_redirect( admin_url( 'admin.php?page=wdi_subscribe' ) );
|
289 |
-
exit;
|
290 |
-
}
|
291 |
-
}
|
292 |
-
|
293 |
add_filter('wdi_sanitize_options', 'wdi_create_sample_feed');
|
294 |
function wdi_create_sample_feed($new_options) {
|
295 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
@@ -416,29 +401,22 @@ function WDI_instagram_menu() {
|
|
416 |
$parent_slug = null;
|
417 |
$wdi_uninstall = true;
|
418 |
$wdi_uninstall_success = get_option(WDI_OPT);
|
419 |
-
if(isset($wdi_uninstall_success["wdi_plugin_uninstalled"]) && $wdi_uninstall_success["wdi_plugin_uninstalled"]==="true"){
|
420 |
-
$wdi_uninstall =
|
421 |
}
|
422 |
|
423 |
$has_token = (!isset($wdi_options['wdi_access_token']) || empty($wdi_options['wdi_access_token'])) && empty($wdi_options['fb_token']);
|
424 |
-
if($has_token && $wdi_uninstall) {
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
if( get_option( "wdi_subscribe_done" ) == 1 ){
|
432 |
-
$parent_slug = "wdi_feeds";
|
433 |
-
$settings_page = add_menu_page(__('Instagram Feed', "wd-instagram-feed"), 'Instagram Feed', $min_feeds_capability, 'wdi_feeds', 'WDI_instagram_feeds_page', $menu_icon);
|
434 |
-
}
|
435 |
-
|
436 |
|
437 |
add_submenu_page($parent_slug,__('Feeds',"wd-instagram-feed"),__('Feeds',"wd-instagram-feed"),$min_feeds_capability,'wdi_feeds','WDI_instagram_feeds_page');
|
438 |
add_submenu_page($parent_slug,__('Themes',"wd-instagram-feed"),__('Themes',"wd-instagram-feed"),$min_feeds_capability,'wdi_themes','WDI_instagram_themes_page');
|
439 |
add_submenu_page($parent_slug,__('Settings',"wd-instagram-feed"),__('Settings',"wd-instagram-feed"),'manage_options','wdi_settings','WDI_instagram_settings_page');
|
440 |
-
//add_submenu_page('overview_wdi',__('Featured Themes',"wd-instagram-feed"),__('Featured Themes',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_themes','wdi_featured_themes');
|
441 |
-
//add_submenu_page('overview_wdi',__('Featured Plugins',"wd-instagram-feed"),__('Featured Plugins',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_plugins','wdi_featured_plugins');
|
442 |
|
443 |
add_submenu_page($parent_slug,__('Premium Version',"wd-instagram-feed"),__('Premium Version',"wd-instagram-feed"),$min_feeds_capability,'wdi_licensing','WDI_instagram_licensing_page');
|
444 |
add_submenu_page("",__('Uninstall',"wd-instagram-feed"),__('Uninstall',"wd-instagram-feed"),'manage_options','wdi_uninstall','WDI_instagram_uninstall_page');
|
@@ -451,16 +429,6 @@ function WDI_instagram_menu() {
|
|
451 |
'manage_options',
|
452 |
$url
|
453 |
);
|
454 |
-
|
455 |
-
}
|
456 |
-
}
|
457 |
-
|
458 |
-
|
459 |
-
add_action('admin_menu', 'WDI_add_uninstall',26);
|
460 |
-
function WDI_add_uninstall(){
|
461 |
-
$parent_slug = null;
|
462 |
-
if( get_option( "wdi_subscribe_done" ) == 1 ){
|
463 |
-
$parent_slug = "wdi_feeds";
|
464 |
}
|
465 |
}
|
466 |
|
@@ -899,7 +867,7 @@ function wdi_wd_lib_init(){
|
|
899 |
"plugin_menu_title" => "Instagram Feed",
|
900 |
"plugin_menu_icon" => WDI_URL . '/images/menu_icon.png',
|
901 |
"deactivate" => true,
|
902 |
-
"subscribe" =>
|
903 |
"custom_post" => '', // if true => edit.php?post_type=contact
|
904 |
"menu_capability" => wdi_get_create_feeds_cap(),
|
905 |
"menu_position" => null,
|
@@ -980,29 +948,6 @@ function wdi_elementor(){
|
|
980 |
}
|
981 |
}
|
982 |
|
983 |
-
/**
|
984 |
-
* Show 10Web plugin's install/activate banner.
|
985 |
-
*/
|
986 |
-
if ( !class_exists ( 'TWBanner' ) ) {
|
987 |
-
require_once( WDI_DIR . '/banner_class.php' );
|
988 |
-
}
|
989 |
-
if ( !WDI_IS_PRO ) {
|
990 |
-
$tw_banner_params = array(
|
991 |
-
'menu_postfix' => WD_WDI_PREFIX . '_', // To display on only current plugin pages.
|
992 |
-
'prefix' => WD_WDI_PREFIX, // Current plugin prefix.
|
993 |
-
'logo' => '/images/insta_2.svg', // Current plugin logo relative URL.
|
994 |
-
'plugin_slug' => 'wd-instagram-feed', // Current plugin slug.
|
995 |
-
'plugin_url' => WDI_URL, // Current plugin URL.
|
996 |
-
'plugin_id' => 43, // Current plugin id.
|
997 |
-
'text' => sprintf(__("%s Instagram Feed advises:%s %sUse Image Optimizer service to optimize your images quickly and easily.%s", WD_WDI_PREFIX), '<span>','</span>', '<span>','</span>'), // Banner text.
|
998 |
-
'slug' => '10web-manager', // Plugin slug to be installed.
|
999 |
-
'mu_plugin_slug' => '10web-manager', // Must use plugin slug.
|
1000 |
-
'base_php' => '10web-manager.php', // Plugin base php filename to be installed.
|
1001 |
-
'page_url' => admin_url('admin.php?page=tenweb_menu'), // Redirect to URL after activating the plugin.
|
1002 |
-
);
|
1003 |
-
new TWBanner($tw_banner_params);
|
1004 |
-
}
|
1005 |
-
|
1006 |
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'wdi_add_ask_question_links');
|
1007 |
|
1008 |
/**
|
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.3.24
|
7 |
Author: 10Web
|
8 |
Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
|
9 |
License: GPLv2 or later
|
21 |
//define("wdi",'wdi');
|
22 |
define('WDI_FEED_TABLE', 'wdi_feeds');
|
23 |
define('WDI_THEME_TABLE', 'wdi_themes');
|
24 |
+
define('WDI_VERSION', '1.3.24');
|
25 |
define('WD_WDI_PREFIX', 'wdi' );
|
26 |
define('WDI_IS_PRO', false );
|
27 |
$wdi_minify = ( isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true" ) ? FALSE : TRUE;
|
227 |
|
228 |
add_action('wp_ajax_WDIGalleryBox', 'wdi_ajax_frontend');
|
229 |
add_action('wp_ajax_nopriv_WDIGalleryBox', 'wdi_ajax_frontend');
|
|
|
230 |
|
231 |
function wdi_ajax_frontend() {
|
232 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
275 |
wdi_install();
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
add_filter('wdi_sanitize_options', 'wdi_create_sample_feed');
|
279 |
function wdi_create_sample_feed($new_options) {
|
280 |
require_once(WDI_DIR . '/framework/WDILibrary.php');
|
401 |
$parent_slug = null;
|
402 |
$wdi_uninstall = true;
|
403 |
$wdi_uninstall_success = get_option(WDI_OPT);
|
404 |
+
if ( isset($wdi_uninstall_success["wdi_plugin_uninstalled"]) && $wdi_uninstall_success["wdi_plugin_uninstalled"] === "true" ) {
|
405 |
+
$wdi_uninstall = FALSE;
|
406 |
}
|
407 |
|
408 |
$has_token = (!isset($wdi_options['wdi_access_token']) || empty($wdi_options['wdi_access_token'])) && empty($wdi_options['fb_token']);
|
409 |
+
if ( $has_token && $wdi_uninstall ) {
|
410 |
+
add_menu_page(__('Instagram Feed', "wd-instagram-feed"), 'Instagram Feed', $min_feeds_capability, 'wdi_settings', 'WDI_instagram_settings_page', $menu_icon);
|
411 |
+
add_submenu_page("wdi_settings", __('Settings', "wd-instagram-feed"), __('Settings', "wd-instagram-feed"), 'manage_options', 'wdi_settings', 'WDI_instagram_settings_page');
|
412 |
+
}
|
413 |
+
else {
|
414 |
+
$parent_slug = "wdi_feeds";
|
415 |
+
add_menu_page(__('Instagram Feed', "wd-instagram-feed"), 'Instagram Feed', $min_feeds_capability, 'wdi_feeds', 'WDI_instagram_feeds_page', $menu_icon);
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
add_submenu_page($parent_slug,__('Feeds',"wd-instagram-feed"),__('Feeds',"wd-instagram-feed"),$min_feeds_capability,'wdi_feeds','WDI_instagram_feeds_page');
|
418 |
add_submenu_page($parent_slug,__('Themes',"wd-instagram-feed"),__('Themes',"wd-instagram-feed"),$min_feeds_capability,'wdi_themes','WDI_instagram_themes_page');
|
419 |
add_submenu_page($parent_slug,__('Settings',"wd-instagram-feed"),__('Settings',"wd-instagram-feed"),'manage_options','wdi_settings','WDI_instagram_settings_page');
|
|
|
|
|
420 |
|
421 |
add_submenu_page($parent_slug,__('Premium Version',"wd-instagram-feed"),__('Premium Version',"wd-instagram-feed"),$min_feeds_capability,'wdi_licensing','WDI_instagram_licensing_page');
|
422 |
add_submenu_page("",__('Uninstall',"wd-instagram-feed"),__('Uninstall',"wd-instagram-feed"),'manage_options','wdi_uninstall','WDI_instagram_uninstall_page');
|
429 |
'manage_options',
|
430 |
$url
|
431 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
}
|
433 |
}
|
434 |
|
867 |
"plugin_menu_title" => "Instagram Feed",
|
868 |
"plugin_menu_icon" => WDI_URL . '/images/menu_icon.png',
|
869 |
"deactivate" => true,
|
870 |
+
"subscribe" => false,
|
871 |
"custom_post" => '', // if true => edit.php?post_type=contact
|
872 |
"menu_capability" => wdi_get_create_feeds_cap(),
|
873 |
"menu_position" => null,
|
948 |
}
|
949 |
}
|
950 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
951 |
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'wdi_add_ask_question_links');
|
952 |
|
953 |
/**
|