Version Description
- Removed: Banner to install Image optimizer.
Download this release
Release Info
Developer | 10web |
Plugin | WD Facebook Feed – Custom Facebook Feed Plugin |
Version | 1.1.18 |
Comparing to | |
See all releases |
Code changes from version 1.1.17 to 1.1.18
- banner_class.php +0 -512
- facebook-feed-wd.php +29 -85
- readme.txt +4 -1
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/", sanitize_text_field( $_GET['page'] )) === 0 && preg_match("/$this->menu_postfix$/", sanitize_text_field( $_GET['page'] )) === 0 )) || ( isset($_GET['task']) && !strpos(sanitize_text_field($_GET['task']), 'edit') === TRUE && !(strpos(sanitize_text_field($_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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|
5 |
* Plugin URI: https://10web.io/plugins/wordpress-facebook-feed/?utm_source=facebook_feed&utm_medium=free_plugin
|
6 |
* Description: 10Web Social Feed is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
|
7 |
-
* Version: 1.1.
|
8 |
* Author: 10Web
|
9 |
* Author URI: https://10web.io/plugins/?utm_source=facebook_feed&utm_medium=free_plugin
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -15,7 +15,7 @@ define( 'WD_FFWD_URL', plugins_url( plugin_basename( dirname( __FILE__ ) ) ) );
|
|
15 |
define( 'WD_FB_PREFIX', 'ffwd' );
|
16 |
define( 'WD_FB_IS_FREE', TRUE );
|
17 |
if (! defined( 'FFWD_VERSION' ) ){
|
18 |
-
define ('FFWD_VERSION',"1.1.
|
19 |
}
|
20 |
|
21 |
add_action('admin_notices', 'ffwd_login_notice');
|
@@ -90,70 +90,37 @@ function ffwd_silent_update(){
|
|
90 |
|
91 |
// Plugin menu.
|
92 |
function ffwd_menu_panel() {
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
add_action( 'admin_print_styles-' . $galleries_page, 'ffwd_styles' );
|
120 |
-
add_action( 'admin_print_scripts-' . $galleries_page, 'ffwd_scripts' );
|
121 |
-
add_action( 'load-' . $galleries_page, 'ffwd_add_ffwd_info_per_page_option' );
|
122 |
-
// }
|
123 |
-
$options_page = add_submenu_page( $parent_slug, 'Options', 'Options', 'manage_options', 'options_ffwd', 'ffwd_menu' );
|
124 |
-
add_action( 'admin_print_styles-' . $options_page, 'ffwd_styles' );
|
125 |
-
add_action( 'admin_print_scripts-' . $options_page, 'ffwd_admin_scripts' );
|
126 |
-
// if($required){
|
127 |
-
$themes_page = add_submenu_page( $parent_slug, 'Themes', 'Themes', 'manage_options', 'themes_ffwd', 'ffwd_menu' );
|
128 |
-
add_action( 'admin_print_styles-' . $themes_page, 'ffwd_styles' );
|
129 |
-
add_action( 'admin_print_scripts-' . $themes_page, 'ffwd_admin_scripts' );
|
130 |
-
add_action( 'load-' . $themes_page, 'ffwd_add_themes_per_page_option' );
|
131 |
-
// }
|
132 |
-
$licensing_page = add_submenu_page( $parent_slug, 'Get Premium', 'Get Premium', 'manage_options', 'ffwd_licensing', 'ffwd_licensing_page' );
|
133 |
-
add_action( 'admin_print_styles-' . $licensing_page, 'ffwd_styles' );
|
134 |
-
|
135 |
-
/* Custom link to wordpress.org*/
|
136 |
-
global $submenu;
|
137 |
-
$url = 'https://wordpress.org/support/plugin/wd-facebook-feed/#new-post';
|
138 |
-
$submenu[$parent_slug][] = array(
|
139 |
-
'<div id="ffwd_ask_question">' . __('Ask a question', 'ffwd_menu') . '</div>',
|
140 |
-
'manage_options',
|
141 |
-
$url
|
142 |
-
);
|
143 |
-
}
|
144 |
-
$uninstall_page = add_submenu_page( '', 'Uninstall', 'Uninstall', 'manage_options', 'uninstall_ffwd', 'ffwd_menu' );
|
145 |
-
add_action( 'admin_print_styles-' . $uninstall_page, 'ffwd_styles' );
|
146 |
-
add_action( 'admin_print_scripts-' . $uninstall_page, 'ffwd_admin_scripts' );
|
147 |
-
|
148 |
}
|
149 |
-
|
150 |
-
|
151 |
add_action( 'admin_menu', 'ffwd_menu_panel', 9);
|
152 |
|
153 |
-
|
154 |
add_action( 'init', 'ffwd_silently_update' );
|
155 |
|
156 |
-
|
157 |
add_filter('wp_get_default_privacy_policy_content', 'ffwd_privacy_policy');
|
158 |
function ffwd_privacy_policy($content){
|
159 |
$title = __('Facebook Feed by 10Web', "ffwd");
|
@@ -295,7 +262,7 @@ Multiple Feeds per Post/Page", "wd_ads"),
|
|
295 |
"plugin_menu_title" => "Facebook Feed by 10Web",
|
296 |
"plugin_menu_icon" => WD_FFWD_URL . '/images/ffwd/ffwd_logo_small.png',
|
297 |
"deactivate" => TRUE,
|
298 |
-
"subscribe" =>
|
299 |
"custom_post" => 'info_ffwd',
|
300 |
"display_overview" => FALSE,
|
301 |
);
|
@@ -1187,29 +1154,6 @@ function ffwd_elementor(){
|
|
1187 |
}
|
1188 |
}
|
1189 |
|
1190 |
-
/**
|
1191 |
-
* Show 10Web plugin's install/activate banner.
|
1192 |
-
*/
|
1193 |
-
if ( !class_exists ( 'TWBanner' ) ) {
|
1194 |
-
require_once( WD_FFWD_DIR . '/banner_class.php' );
|
1195 |
-
}
|
1196 |
-
if ( WD_FB_IS_FREE ) {
|
1197 |
-
$tw_banner_params = array(
|
1198 |
-
'menu_postfix' => '_' . WD_FB_PREFIX, // To display on only current plugin pages.
|
1199 |
-
'prefix' => WD_FB_PREFIX, // Current plugin prefix.
|
1200 |
-
'logo' => '/images/wt-gb/ffwd_logo_editor.svg', // Current plugin logo relative URL.
|
1201 |
-
'plugin_slug' => 'wd-facebook-feed', // Current plugin slug.
|
1202 |
-
'plugin_url' => WD_FFWD_URL, // Current plugin URL.
|
1203 |
-
'plugin_id' => 93, // Current plugin id.
|
1204 |
-
'text' => sprintf(__("%s Facebook Feed advises:%s %sUse Image Optimizer service to optimize your images quickly and easily.%s", WD_FB_PREFIX), '<span>','</span>', '<span>','</span>'), // Banner text.
|
1205 |
-
'slug' => '10web-manager', // Plugin slug to be installed.
|
1206 |
-
'mu_plugin_slug' => '10web-manager', // Must use plugin slug.
|
1207 |
-
'base_php' => '10web-manager.php', // Plugin base php filename to be installed.
|
1208 |
-
'page_url' => admin_url('admin.php?page=tenweb_menu'), // Redirect to URL after activating the plugin.
|
1209 |
-
);
|
1210 |
-
new TWBanner($tw_banner_params);
|
1211 |
-
}
|
1212 |
-
|
1213 |
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'ffwd_add_ask_question_links');
|
1214 |
|
1215 |
/**
|
4 |
* Plugin Name: 10Web Social Feed
|
5 |
* Plugin URI: https://10web.io/plugins/wordpress-facebook-feed/?utm_source=facebook_feed&utm_medium=free_plugin
|
6 |
* Description: 10Web Social Feed is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
|
7 |
+
* Version: 1.1.18
|
8 |
* Author: 10Web
|
9 |
* Author URI: https://10web.io/plugins/?utm_source=facebook_feed&utm_medium=free_plugin
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
define( 'WD_FB_PREFIX', 'ffwd' );
|
16 |
define( 'WD_FB_IS_FREE', TRUE );
|
17 |
if (! defined( 'FFWD_VERSION' ) ){
|
18 |
+
define ('FFWD_VERSION',"1.1.18");
|
19 |
}
|
20 |
|
21 |
add_action('admin_notices', 'ffwd_login_notice');
|
90 |
|
91 |
// Plugin menu.
|
92 |
function ffwd_menu_panel() {
|
93 |
+
$parent_slug = "info_ffwd";
|
94 |
+
add_menu_page('Facebook Feed', 'Facebook Feed', 'manage_options', $parent_slug, 'ffwd_menu', WD_FFWD_URL . '/images/ffwd/ffwd_logo_small.png');
|
95 |
+
$galleries_page = add_submenu_page($parent_slug, 'Feeds', 'Feeds', 'manage_options', 'info_ffwd', 'ffwd_menu');
|
96 |
+
add_action('admin_print_styles-' . $galleries_page, 'ffwd_styles');
|
97 |
+
add_action('admin_print_scripts-' . $galleries_page, 'ffwd_scripts');
|
98 |
+
add_action('load-' . $galleries_page, 'ffwd_add_ffwd_info_per_page_option');
|
99 |
+
$options_page = add_submenu_page($parent_slug, 'Options', 'Options', 'manage_options', 'options_ffwd', 'ffwd_menu');
|
100 |
+
add_action('admin_print_styles-' . $options_page, 'ffwd_styles');
|
101 |
+
add_action('admin_print_scripts-' . $options_page, 'ffwd_admin_scripts');
|
102 |
+
$themes_page = add_submenu_page($parent_slug, 'Themes', 'Themes', 'manage_options', 'themes_ffwd', 'ffwd_menu');
|
103 |
+
add_action('admin_print_styles-' . $themes_page, 'ffwd_styles');
|
104 |
+
add_action('admin_print_scripts-' . $themes_page, 'ffwd_admin_scripts');
|
105 |
+
add_action('load-' . $themes_page, 'ffwd_add_themes_per_page_option');
|
106 |
+
$licensing_page = add_submenu_page($parent_slug, 'Get Premium', 'Get Premium', 'manage_options', 'ffwd_licensing', 'ffwd_licensing_page');
|
107 |
+
add_action('admin_print_styles-' . $licensing_page, 'ffwd_styles');
|
108 |
+
/* Custom link to wordpress.org*/
|
109 |
+
global $submenu;
|
110 |
+
$url = 'https://wordpress.org/support/plugin/wd-facebook-feed/#new-post';
|
111 |
+
$submenu[$parent_slug][] = array(
|
112 |
+
'<div id="ffwd_ask_question">' . __('Ask a question', 'ffwd_menu') . '</div>',
|
113 |
+
'manage_options',
|
114 |
+
$url,
|
115 |
+
);
|
116 |
+
$uninstall_page = add_submenu_page($parent_slug, 'Uninstall', 'Uninstall', 'manage_options', 'uninstall_ffwd', 'ffwd_menu');
|
117 |
+
add_action('admin_print_styles-' . $uninstall_page, 'ffwd_styles');
|
118 |
+
add_action('admin_print_scripts-' . $uninstall_page, 'ffwd_admin_scripts');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
|
|
|
|
120 |
add_action( 'admin_menu', 'ffwd_menu_panel', 9);
|
121 |
|
|
|
122 |
add_action( 'init', 'ffwd_silently_update' );
|
123 |
|
|
|
124 |
add_filter('wp_get_default_privacy_policy_content', 'ffwd_privacy_policy');
|
125 |
function ffwd_privacy_policy($content){
|
126 |
$title = __('Facebook Feed by 10Web', "ffwd");
|
262 |
"plugin_menu_title" => "Facebook Feed by 10Web",
|
263 |
"plugin_menu_icon" => WD_FFWD_URL . '/images/ffwd/ffwd_logo_small.png',
|
264 |
"deactivate" => TRUE,
|
265 |
+
"subscribe" => false,
|
266 |
"custom_post" => 'info_ffwd',
|
267 |
"display_overview" => FALSE,
|
268 |
);
|
1154 |
}
|
1155 |
}
|
1156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1157 |
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'ffwd_add_ask_question_links');
|
1158 |
|
1159 |
/**
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: customizable facebook feed, facebook, facebook feed, facebook group, faceb
|
|
4 |
Requires at least: 3.4
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -105,6 +105,9 @@ The plugin uses Facebook API to get public data from Facebook. All the received
|
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
108 |
= 1.1.17 =
|
109 |
* Fixed: Styles with Twenty Twenty theme.
|
110 |
|
4 |
Requires at least: 3.4
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 1.1.18
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
105 |
|
106 |
== Changelog ==
|
107 |
|
108 |
+
= 1.1.18 =
|
109 |
+
* Removed: Banner to install Image optimizer.
|
110 |
+
|
111 |
= 1.1.17 =
|
112 |
* Fixed: Styles with Twenty Twenty theme.
|
113 |
|