WD Facebook Feed – Custom Facebook Feed Plugin - Version 1.1.7

Version Description

  • Added: Banner to install 10Web manager.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Facebook Feed – Custom Facebook Feed Plugin
Version 1.1.7
Comparing to
See all releases

Code changes from version 1.1.6 to 1.1.7

admin/models/FFWDModelUninstall_ffwd.php CHANGED
@@ -28,6 +28,7 @@ class FFWDModelUninstall_ffwd
28
  $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_option");
29
  $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_theme");
30
  $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_shortcode");
 
31
  delete_option('ffwd_admin_notice');
32
  delete_option("ffwd_version");
33
  //delete_option("ffwd_subscribe_done");
28
  $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_option");
29
  $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_theme");
30
  $wpdb->query("DROP TABLE " . $wpdb->prefix . "wd_fb_shortcode");
31
+ delete_option('tenweb_notice_status');
32
  delete_option('ffwd_admin_notice');
33
  delete_option("ffwd_version");
34
  //delete_option("ffwd_subscribe_done");
admin/views/FFWDViewInfo_ffwd.php CHANGED
@@ -43,6 +43,7 @@ class FFWDViewInfo_ffwd
43
 
44
 
45
 
 
46
  <div class="ffwd_upgrade wd-clear" >
47
  <div class="ffwd-left">
48
 
@@ -68,6 +69,7 @@ class FFWDViewInfo_ffwd
68
  </div>
69
  </div>
70
  </div>
 
71
 
72
 
73
 
@@ -566,6 +568,7 @@ class FFWDViewInfo_ffwd
566
 
567
  <div id="message_div" class="updated" style="display: none;"></div>
568
 
 
569
  <div class="ffwd_upgrade wd-clear" >
570
  <div class="ffwd-left">
571
 
@@ -591,13 +594,15 @@ class FFWDViewInfo_ffwd
591
  </div>
592
  </div>
593
  </div>
 
594
 
595
 
596
- <script src="http://malsup.github.io/jquery.form.js"></script>
597
  <form class="wrap" method="post" id="ffwd_info_form" action="admin.php?page=info_ffwd" style="width:99%;">
598
  <h2></h2>
599
  <?php wp_nonce_field('info_ffwd', 'ffwd_nonce'); ?>
600
  <!-- <span class="wd-fb-icon"></span> -->
 
601
  <div class="ffwd_plugin_header">
602
 
603
  <span class="wd-fb-icon"></span>
43
 
44
 
45
 
46
+ <div class="wrap">
47
  <div class="ffwd_upgrade wd-clear" >
48
  <div class="ffwd-left">
49
 
69
  </div>
70
  </div>
71
  </div>
72
+ </div>
73
 
74
 
75
 
568
 
569
  <div id="message_div" class="updated" style="display: none;"></div>
570
 
571
+ <div class="wrap">
572
  <div class="ffwd_upgrade wd-clear" >
573
  <div class="ffwd-left">
574
 
594
  </div>
595
  </div>
596
  </div>
597
+ </div>
598
 
599
 
600
+ <script src="https://malsup.github.io/jquery.form.js"></script>
601
  <form class="wrap" method="post" id="ffwd_info_form" action="admin.php?page=info_ffwd" style="width:99%;">
602
  <h2></h2>
603
  <?php wp_nonce_field('info_ffwd', 'ffwd_nonce'); ?>
604
  <!-- <span class="wd-fb-icon"></span> -->
605
+ <div style="font-size: 16px" class="ffwd_notice"></div>
606
  <div class="ffwd_plugin_header">
607
 
608
  <span class="wd-fb-icon"></span>
admin/views/FFWDViewLicensing_ffwd.php CHANGED
@@ -26,7 +26,7 @@ class FFWDViewLicensing_ffwd {
26
  ?>
27
 
28
 
29
- <div id="ffwd_featurs_tables">
30
  <div id="ffwd_featurs_table1">
31
  <span>WordPress 3.4+ <?php _e("ready", 'ffwd'); ?></span>
32
 
26
  ?>
27
 
28
 
29
+ <div class="wrap" id="ffwd_featurs_tables">
30
  <div id="ffwd_featurs_table1">
31
  <span>WordPress 3.4+ <?php _e("ready", 'ffwd'); ?></span>
32
 
admin/views/FFWDViewOptions_ffwd.php CHANGED
@@ -32,6 +32,7 @@ class FFWDViewOptions_ffwd
32
  ?>
33
 
34
 
 
35
  <div class="ffwd_upgrade wd-clear" >
36
  <div class="ffwd-left">
37
 
@@ -57,6 +58,7 @@ class FFWDViewOptions_ffwd
57
  </div>
58
  </div>
59
  </div>
 
60
 
61
 
62
 
32
  ?>
33
 
34
 
35
+ <div class="wrap">
36
  <div class="ffwd_upgrade wd-clear" >
37
  <div class="ffwd-left">
38
 
58
  </div>
59
  </div>
60
  </div>
61
+ </div>
62
 
63
 
64
 
admin/views/FFWDViewThemes_ffwd.php CHANGED
@@ -27,6 +27,7 @@ class FFWDViewThemes_ffwd
27
  public function display()
28
  {
29
  ?>
 
30
  <div class="ffwd_upgrade wd-clear" >
31
  <div class="ffwd-left">
32
 
@@ -54,6 +55,7 @@ class FFWDViewThemes_ffwd
54
  <div style="clear: both;float: right;color: #15699F; font-size: 20px; margin-top:10px; padding:8px 15px;">
55
  This is FREE version, Customizing themes is available only in the PAID version.
56
  </div>
 
57
 
58
  <img src='<?php echo plugins_url('../../images/themes/thumbnail.png', __FILE__) ?>'/><br>
59
  <img src='<?php echo plugins_url('../../images/themes/masonry.png', __FILE__) ?>'/><br>
27
  public function display()
28
  {
29
  ?>
30
+ <div class="wrap">
31
  <div class="ffwd_upgrade wd-clear" >
32
  <div class="ffwd-left">
33
 
55
  <div style="clear: both;float: right;color: #15699F; font-size: 20px; margin-top:10px; padding:8px 15px;">
56
  This is FREE version, Customizing themes is available only in the PAID version.
57
  </div>
58
+ </div>
59
 
60
  <img src='<?php echo plugins_url('../../images/themes/thumbnail.png', __FILE__) ?>'/><br>
61
  <img src='<?php echo plugins_url('../../images/themes/masonry.png', __FILE__) ?>'/><br>
changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 1.1.6 =
4
  * Fixed: Minor bug.
5
 
1
  == Changelog ==
2
 
3
+ = 1.1.7 =
4
+ * Added: Banner to install 10Web manager.
5
+
6
  = 1.1.6 =
7
  * Fixed: Minor bug.
8
 
css/ffwd_tables.css CHANGED
@@ -1058,7 +1058,6 @@ span.no {
1058
  clear: both;
1059
  padding: 15px;
1060
  background: #fff;
1061
- margin: 6px 15px;
1062
  color: #6e7990;
1063
  font-size: 14px;
1064
  font-weight: bold;
@@ -1215,3 +1214,11 @@ div.ffwd_error {
1215
  position: absolute;
1216
  margin-left: 4px;
1217
  }
 
 
 
 
 
 
 
 
1058
  clear: both;
1059
  padding: 15px;
1060
  background: #fff;
 
1061
  color: #6e7990;
1062
  font-size: 14px;
1063
  font-weight: bold;
1214
  position: absolute;
1215
  margin-left: 4px;
1216
  }
1217
+
1218
+ #wpbody-content>div:not(.wrap):not(.wd_topic), .wrap .notice:not(.wd-notice) {
1219
+ display: none;
1220
+ }
1221
+
1222
+ #wpbody-content .wrap #v2_tenweb_notice_cont {
1223
+ display: flex;
1224
+ }
facebook-feed-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Facebook Feed by 10Web
5
  * Plugin URI: https://10web.io/plugins/wordpress-facebook-feed/
6
  * Description: Facebook Feed by 10Web is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
7
- * Version: 1.1.6
8
  * Author: 10Web
9
  * Author URI: https://10web.io/plugins/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -12,10 +12,9 @@
12
 
13
  define( 'WD_FFWD_DIR', WP_PLUGIN_DIR . "/" . plugin_basename( dirname( __FILE__ ) ) );
14
  define( 'WD_FFWD_URL', plugins_url( plugin_basename( dirname( __FILE__ ) ) ) );
15
- define( 'WD_FFWD_PRO', true );
16
  define( 'WD_FB_PREFIX', 'ffwd' );
17
  if (! defined( 'FFWD_VERSION' ) ){
18
- define ('FFWD_VERSION',"1.1.6");
19
  }
20
 
21
  add_action('admin_notices', 'ffwd_login_notice');
@@ -1105,91 +1104,6 @@ function ffwd_language_load() {
1105
 
1106
  add_action( 'init', 'ffwd_language_load' );
1107
 
1108
- function ffwd_bp_install_notice() {
1109
-
1110
- // Remove old notice.
1111
- if ( get_option('wds_bk_notice_status') !== FALSE ) {
1112
- update_option('wds_bk_notice_status', '1', 'no');
1113
- }
1114
-
1115
- // Show notice only on plugin pages.
1116
- if ( !isset($_GET['page']) || strpos(esc_html($_GET['page']), '_ffwd') === FALSE ) {
1117
- return '';
1118
- }
1119
-
1120
- $meta_value = get_option('wd_bk_notice_status');
1121
- if ( $meta_value === '' || $meta_value === FALSE ) {
1122
- ob_start();
1123
- $prefix = WD_FB_PREFIX;
1124
- $nicename = 'Facebook Feed by 10Web';
1125
- $url = WD_FFWD_URL;
1126
- $dismiss_url = add_query_arg(array( 'action' => 'wd_bp_dismiss' ), admin_url('admin-ajax.php'));
1127
- $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd'));
1128
- ?>
1129
- <div class="notice notice-info" id="wd_bp_notice_cont">
1130
- <p>
1131
- <img id="wd_bp_logo_notice" src="<?php echo $url . '/images/logo.png'; ?>" />
1132
- <?php echo sprintf(__("%s advises: Install brand new FREE %s plugin to keep your images and website safe.", $prefix), $nicename, '<a href="https://wordpress.org/plugins/backup-wd/" title="' . __("More details", $prefix) . '" target="_blank">' . __("Backup WD", $prefix) . '</a>'); ?>
1133
- <a class="button button-primary" href="<?php echo $install_url; ?>">
1134
- <span onclick="jQuery.post('<?php echo $dismiss_url; ?>');"><?php _e("Install", $prefix); ?></span>
1135
- </a>
1136
- </p>
1137
- <button type="button" class="wd_bp_notice_dissmiss notice-dismiss" onclick="jQuery('#wd_bp_notice_cont').hide(); jQuery.post('<?php echo $dismiss_url; ?>');"><span class="screen-reader-text"></span></button>
1138
- </div>
1139
- <style>
1140
- @media only screen and (max-width: 500px) {
1141
- body #wd_backup_logo {
1142
- max-width: 100%;
1143
- }
1144
- body #wd_bp_notice_cont p {
1145
- padding-right: 25px !important;
1146
- }
1147
- }
1148
- #wd_bp_logo_notice {
1149
- width: 40px;
1150
- float: left;
1151
- margin-right: 10px;
1152
- }
1153
- #wd_bp_notice_cont {
1154
- position: relative;
1155
- }
1156
- #wd_bp_notice_cont a {
1157
- margin: 0 5px;
1158
- }
1159
- #wd_bp_notice_cont .dashicons-dismiss:before {
1160
- content: "\f153";
1161
- background: 0 0;
1162
- color: #72777c;
1163
- display: block;
1164
- font: 400 16px/20px dashicons;
1165
- speak: none;
1166
- height: 20px;
1167
- text-align: center;
1168
- width: 20px;
1169
- -webkit-font-smoothing: antialiased;
1170
- -moz-osx-font-smoothing: grayscale;
1171
- }
1172
- .wd_bp_notice_dissmiss {
1173
- margin-top: 5px;
1174
- }
1175
- </style>
1176
- <?php
1177
- echo ob_get_clean();
1178
- }
1179
- }
1180
-
1181
- if ( !is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
1182
- add_action('admin_notices', 'ffwd_bp_install_notice');
1183
- }
1184
-
1185
- if ( !function_exists('wd_bps_install_notice_status') ) {
1186
- // Add usermeta to db.
1187
- function wd_bps_install_notice_status() {
1188
- update_option('wd_bk_notice_status', '1', 'no');
1189
- }
1190
- add_action('wp_ajax_wd_bp_dismiss', 'wd_bps_install_notice_status');
1191
- }
1192
-
1193
  function ffwd_version() {
1194
 
1195
  $version = FFWD_VERSION;
@@ -1256,4 +1170,327 @@ function ffwd_elementor(){
1256
  include_once 'elementor/elementor.php';
1257
  FFWDElementor::get_instance();
1258
  }
1259
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * Plugin Name: Facebook Feed by 10Web
5
  * Plugin URI: https://10web.io/plugins/wordpress-facebook-feed/
6
  * Description: Facebook Feed by 10Web is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
7
+ * Version: 1.1.7
8
  * Author: 10Web
9
  * Author URI: https://10web.io/plugins/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
12
 
13
  define( 'WD_FFWD_DIR', WP_PLUGIN_DIR . "/" . plugin_basename( dirname( __FILE__ ) ) );
14
  define( 'WD_FFWD_URL', plugins_url( plugin_basename( dirname( __FILE__ ) ) ) );
 
15
  define( 'WD_FB_PREFIX', 'ffwd' );
16
  if (! defined( 'FFWD_VERSION' ) ){
17
+ define ('FFWD_VERSION',"1.1.7");
18
  }
19
 
20
  add_action('admin_notices', 'ffwd_login_notice');
1104
 
1105
  add_action( 'init', 'ffwd_language_load' );
1106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1107
  function ffwd_version() {
1108
 
1109
  $version = FFWD_VERSION;
1170
  include_once 'elementor/elementor.php';
1171
  FFWDElementor::get_instance();
1172
  }
1173
+ }
1174
+
1175
+ /**
1176
+ * Show 10Web manager plugin install or activate banner.
1177
+ *
1178
+ * @return string
1179
+ */
1180
+ function ffwd_tenweb_install_notice() {
1181
+ if ( ( !isset($_GET['page']) || strpos(esc_html($_GET['page']), '_ffwd') === FALSE ) ||
1182
+ ( isset($_GET['task']) && !strpos(esc_html($_GET['task']), 'edit') === TRUE && !(strpos(esc_html($_GET['task']), 'display') > -1))) {
1183
+ return '';
1184
+ }
1185
+ // Remove old notice.
1186
+ if ( get_option('tenweb_notice_status') !== FALSE ) {
1187
+ update_option('tenweb_notice_status', '1', 'no');
1188
+ }
1189
+ $meta_value = get_option('tenweb_notice_status');
1190
+ if ( $meta_value === '' || $meta_value === FALSE ) {
1191
+ require_once( WD_FFWD_DIR . '/framework/WDW_FFWD_Library.php' );
1192
+ ob_start();
1193
+ $prefix = 'WD_FB_PREFIX';
1194
+ $url = WD_FFWD_URL;
1195
+ $dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
1196
+ $verify_url = add_query_arg( array ('action' => 'ffwd_tenweb_status'), admin_url('admin-ajax.php'));
1197
+ ?>
1198
+ <style>
1199
+ .hide {
1200
+ display: none !important;
1201
+ }
1202
+ #verifyUrl {
1203
+ display: none
1204
+ }
1205
+ #loading {
1206
+ position: absolute;
1207
+ right: 20px;
1208
+ top: 50%;
1209
+ transform: translateY(-50%);
1210
+ margin: 0px;
1211
+ background: url("<?php echo $url . '/images/ajax_loader.png'; ?>") no-repeat;
1212
+ background-size: 20px 20px;
1213
+ filter: alpha(opacity=70);
1214
+ }
1215
+ #wd_tenweb_logo_notice {
1216
+ height: 32px;
1217
+ float: left;
1218
+ }
1219
+ .error_install, .error_activate {
1220
+ color: red;
1221
+ font-size: 10px;
1222
+ }
1223
+ /* -------------------Version 2 styles------------------ */
1224
+ #wpbody-content #v2_tenweb_notice_cont {
1225
+ display: none;
1226
+ flex-wrap: wrap;
1227
+ background: #fff;
1228
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
1229
+ position: relative;
1230
+ padding: 5px 0;
1231
+ overflow: hidden;
1232
+ border-left: 4px solid #0073AA;
1233
+ font-family: Open Sans, sans-serif;
1234
+ height: 40px;
1235
+ min-height: 40px;
1236
+ }
1237
+ .v2_logo {
1238
+ display: flex;
1239
+ flex-direction: column;
1240
+ justify-content: center;
1241
+ height: inherit;
1242
+ }
1243
+
1244
+ #v2_tenweb_notice_cont {
1245
+ height: 50px;
1246
+ padding: 0px;
1247
+ }
1248
+
1249
+ .v2_content {
1250
+ flex-grow: 1;
1251
+ height: inherit;
1252
+ margin-left: 34px;
1253
+ }
1254
+
1255
+ .v2_content p {
1256
+ font-size: 16px;
1257
+ color: #333B46;
1258
+ font-weight: 600;
1259
+ line-height: 40px;
1260
+ margin: 0;
1261
+ }
1262
+ #wd_tenweb_logo_notice {
1263
+ margin-left: 35px;
1264
+ height: 30px;
1265
+ line-height: 100%;
1266
+ }
1267
+
1268
+ .v2_button {
1269
+ display: flex;
1270
+ margin-right: 30px;
1271
+ flex-direction: column;
1272
+ justify-content: center;
1273
+ }
1274
+
1275
+ .v2_button #install_now, #activate_now {
1276
+ width: 112px;
1277
+ height: 32px;
1278
+ line-height: 30px;
1279
+ font-size: 14px;
1280
+ text-align: center;
1281
+ padding: 0;
1282
+ }
1283
+
1284
+ #v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
1285
+ top: 3px;
1286
+ right: 3px;
1287
+ padding: 0px;
1288
+ }
1289
+
1290
+ .v2_button .button {
1291
+ position: relative;
1292
+ }
1293
+
1294
+ .v2_button .button #loading {
1295
+ position: absolute;
1296
+ right: 10px;
1297
+ top: 50%;
1298
+ transform: translateY(-50%);
1299
+ margin: 0px;
1300
+ background-size: 12px 12px;
1301
+ filter: alpha(opacity=70);
1302
+ width: 12px;
1303
+ height: 12px;
1304
+ }
1305
+
1306
+ @media only screen and (max-width: 1200px) and (min-width: 821px) {
1307
+ #wpbody-content #v2_tenweb_notice_cont {
1308
+ height: 50px;
1309
+ min-height: 50px;
1310
+ }
1311
+
1312
+ #v2_tenweb_notice_cont {
1313
+ height: 60px;
1314
+ }
1315
+
1316
+ .v2_content {
1317
+ margin-left: 25px;
1318
+ }
1319
+ .v2_content p {
1320
+ font-size: 14px;
1321
+ color: #333B46;
1322
+ font-weight: 600;
1323
+ line-height: 20px;
1324
+ margin-top: 5px;
1325
+ }
1326
+ .v2_content p span {
1327
+ display: block;
1328
+ }
1329
+
1330
+ #wd_tenweb_logo_notice {
1331
+ margin-left: 25px;
1332
+ height: 30px;
1333
+ line-height: 100%;
1334
+ }
1335
+
1336
+ .v2_button {
1337
+ display: flex;
1338
+ margin-right: 30px;
1339
+ flex-direction: column;
1340
+ justify-content: center;
1341
+ }
1342
+
1343
+ .v2_button #install_now {
1344
+ width: 112px;
1345
+ height: 32px;
1346
+ line-height: 30px;
1347
+ font-size: 14px;
1348
+ text-align: center;
1349
+ padding: 0;
1350
+ }
1351
+
1352
+ #v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
1353
+ top: 3px;
1354
+ right: 3px;
1355
+ }
1356
+ }
1357
+
1358
+ @media only screen and (max-width: 820px) and (min-width: 781px) {
1359
+
1360
+ #wpbody-content #v2_tenweb_notice_cont {
1361
+ height: 50px;
1362
+ min-height: 50px;
1363
+ }
1364
+
1365
+ #v2_tenweb_notice_cont {
1366
+ height: 60px;
1367
+ }
1368
+
1369
+ .v2_content {
1370
+ margin-left: 25px;
1371
+ }
1372
+
1373
+ .v2_content p {
1374
+ font-size: 13px;
1375
+ color: #333B46;
1376
+ font-weight: 600;
1377
+ line-height: 20px;
1378
+ margin-top: 5px;
1379
+ }
1380
+
1381
+ .v2_content p span {
1382
+ display: block;
1383
+ }
1384
+
1385
+ }
1386
+
1387
+ @media only screen and (max-width: 780px) {
1388
+
1389
+ #wpbody-content #v2_tenweb_notice_cont {
1390
+ height: auto;
1391
+ min-height: auto;
1392
+ }
1393
+
1394
+ #v2_tenweb_notice_cont {
1395
+ height: auto;
1396
+ padding: 5px;
1397
+ }
1398
+
1399
+ .v2_logo {
1400
+ display: block;
1401
+ height: auto;
1402
+ width: 100%;
1403
+ margin-top: 5px;
1404
+ }
1405
+
1406
+ .v2_content {
1407
+ display: block;
1408
+ margin-left: 9px;
1409
+ margin-top: 10px;
1410
+ width: calc(100% - 10px);
1411
+ }
1412
+
1413
+ .v2_content p {
1414
+ line-height: unset;
1415
+ font-size: 15px;
1416
+ line-height: 25px;
1417
+ }
1418
+ .v2_content p span{
1419
+ display: block
1420
+ }
1421
+ #wd_tenweb_logo_notice {
1422
+ margin-left: 9px;
1423
+ }
1424
+
1425
+ .v2_button {
1426
+ margin-left: 9px;
1427
+ margin-top: 10px;
1428
+ margin-bottom: 5px;
1429
+ }
1430
+ }
1431
+ </style>
1432
+ <div id="v2_tenweb_notice_cont" class="notice wd-notice">
1433
+ <div class="v2_logo">
1434
+ <img id="wd_tenweb_logo_notice" src="<?php echo $url . '/images/icon-feed.png'; ?>" />
1435
+ </div>
1436
+ <div class="v2_content">
1437
+ <p>
1438
+ <?php echo sprintf(__('%s10Web Facebook Feed advises:%s %sUse Image Optimizer service to optimize your images quickly and easily.%s', $prefix), '<span>','</span>', '<span>','</span>'); ?>
1439
+ </p>
1440
+ </div>
1441
+ <div class="v2_button">
1442
+ <?php WDW_FFWD_Library::twbb_install_button(2); ?>
1443
+ </div>
1444
+ <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; ?>');"><span class="screen-reader-text"></span></button>
1445
+ <div id="verifyUrl" data-url="<?php echo $verify_url; ?>"></div>
1446
+ </div>
1447
+ <?php
1448
+
1449
+ echo ob_get_clean();
1450
+ }
1451
+ }
1452
+
1453
+ if ( !function_exists('is_plugin_active') ) {
1454
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1455
+ }
1456
+
1457
+ if ( !is_plugin_active( '10web-manager/10web-manager.php' ) ) {
1458
+ add_action('admin_notices', 'ffwd_tenweb_install_notice');
1459
+ }
1460
+
1461
+ if ( !function_exists('wd_tenwebps_install_notice_status') ) {
1462
+ // Add usermeta to DB.
1463
+ function wd_tenwebps_install_notice_status() {
1464
+ update_option('tenweb_notice_status', '1', 'no');
1465
+ }
1466
+ add_action('wp_ajax_wd_tenweb_dismiss', 'wd_tenwebps_install_notice_status');
1467
+ }
1468
+ // Check status 10web manager install
1469
+ function ffwd_check_tenweb_status() {
1470
+ require_once( WD_FFWD_DIR . '/framework/WDW_FFWD_Library.php' );
1471
+ $status_install = 0;
1472
+ $status_active = 0;
1473
+ if ( WDW_FFWD_Library::is_plugin_installed('10web-manager') ) {
1474
+ $status_install = 1;
1475
+ }
1476
+ else {
1477
+ if ( is_plugin_active('10web-manager/10web-manager.php') ) {
1478
+ $status_active = 1;
1479
+ }
1480
+ }
1481
+ if ( WDW_FFWD_Library::is_plugin_installed('10web-manager') ) {
1482
+ $old_opt_array = array();
1483
+ $new_opt_array = array( 'wd-facebook-feed' => 93 ); // core_id
1484
+ $key = 'tenweb_manager_installed';
1485
+ $option = get_option($key);
1486
+ if ( !empty($option) ) {
1487
+ $old_opt_array = (array) json_decode($option);
1488
+ }
1489
+ $array_installed = array_merge($new_opt_array, $old_opt_array);
1490
+ update_option($key, json_encode($array_installed));
1491
+ }
1492
+ $jsondata = array( 'status_install' => $status_install, 'status_active' => $status_active );
1493
+ echo json_encode($jsondata);
1494
+ exit;
1495
+ }
1496
+ add_action('wp_ajax_ffwd_tenweb_status', 'ffwd_check_tenweb_status');
framework/WDFacebookFeed.php CHANGED
@@ -683,9 +683,14 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
683
  $data = self::decap_do_curl($fb_graph_url);
684
  // If error exist
685
  if(array_key_exists("error", $data)) {
686
- if( $data['error']['code']==4)
687
- update_option('ffwd_limit_notice',1);
688
- self::wd_fb_massage('error', $data['error']['message']);
 
 
 
 
 
689
  }else{
690
  // Set next page if it exists
691
  $paging = array_key_exists ( 'paging' , $data ) ? $data['paging'] : array();
683
  $data = self::decap_do_curl($fb_graph_url);
684
  // If error exist
685
  if(array_key_exists("error", $data)) {
686
+ if ($data['error']['code'] == 4){
687
+ update_option('ffwd_limit_notice', 1);
688
+ }
689
+ if($data['error']['code'] == 100){
690
+ self::wd_fb_massage('error', $data['error']['message'].' <a target="_blank" href="https://help.10web.io/hc/en-us/articles/360025514692-Solving-Facebook-Feed-Errors">See more</a>');
691
+ }else{
692
+ self::wd_fb_massage('error', $data['error']['message']);
693
+ }
694
  }else{
695
  // Set next page if it exists
696
  $paging = array_key_exists ( 'paging' , $data ) ? $data['paging'] : array();
framework/WDW_FFWD_Library.php CHANGED
@@ -981,4 +981,146 @@ class WDW_FFWD_Library {
981
  ////////////////////////////////////////////////////////////////////////////////////////
982
  // Listeners //
983
  ////////////////////////////////////////////////////////////////////////////////////////
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
984
  }
981
  ////////////////////////////////////////////////////////////////////////////////////////
982
  // Listeners //
983
  ////////////////////////////////////////////////////////////////////////////////////////
984
+
985
+ /**
986
+ * Is plugin active.
987
+ *
988
+ * @param $plugin_name
989
+ *
990
+ * @return bool
991
+ */
992
+ public static function is_plugin_installed($plugin_name) {
993
+ if ( is_dir(WP_PLUGIN_DIR . '/' . $plugin_name . '/') ) {
994
+ return TRUE;
995
+ }
996
+
997
+ return FALSE;
998
+ }
999
+
1000
+ /**
1001
+ * Get activation or deactivation link of a plugin
1002
+ *
1003
+ * @author Nazmul Ahsan <mail@nazmulahsan.me>
1004
+ *
1005
+ * @param string $plugin plugin file name
1006
+ * @param string $action action to perform. activate or deactivate
1007
+ *
1008
+ * @return string $url action url
1009
+ */
1010
+ public static function na_action_link( $plugin, $action = 'activate' ) {
1011
+ if ( strpos($plugin, '/') ) {
1012
+ $plugin = str_replace('\/', '%2F', $plugin);
1013
+ }
1014
+ $url = sprintf(admin_url('plugins.php?action=' . $action . '&plugin=%s&plugin_status=all&paged=1&s'), $plugin);
1015
+ $_REQUEST['plugin'] = $plugin;
1016
+ $url = wp_nonce_url($url, $action . '-plugin_' . $plugin);
1017
+
1018
+ return $url;
1019
+ }
1020
+
1021
+ public static function twbb_install_button($v) {
1022
+ $prefix = WD_FB_PREFIX;
1023
+ $slug = '10web-manager';
1024
+ $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $slug), 'install-plugin_' . $slug));
1025
+ $activation_url = self::na_action_link($slug . '/10web-manager.php', 'activate');
1026
+ $tenweb_url = admin_url('admin.php?page=tenweb_menu');
1027
+ $dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
1028
+ $activate = self::is_plugin_installed($slug) && !is_plugin_active('10web-manager/manager.php') ? TRUE : FALSE;
1029
+ ?>
1030
+ <a class="button<?php echo($v == 2 ? ' button-primary' : ''); ?> tenweb_activaion"
1031
+ id="<?php echo $activate ? 'activate_now' : 'install_now'; ?>"
1032
+ data-activation="<?php _e("Activation", $prefix); ?>"
1033
+ data-tenweb-url="<?php echo $tenweb_url; ?>"
1034
+ data-install-url="<?php echo $install_url; ?>"
1035
+ data-activate-url="<?php echo $activation_url; ?>">
1036
+ <span class="tenweb_activaion_text"><?php echo $activate ? __("Activate", $prefix) : __("Install", $prefix); ?></span>
1037
+ <span class="spinner" id="loading"></span>
1038
+ </a>
1039
+ <span class="hide <?php echo $activate ? 'error_activate' : 'error_install tenweb_active'; ?> ">
1040
+ <?php echo $activate ? __("Activation failed, please try again.", $prefix) : __("Installation failed, please try again.", $prefix); ?>
1041
+ </span>
1042
+ <script>
1043
+ var url = jQuery(".tenweb_activaion").attr("data-install-url");
1044
+ var activate_url = jQuery(".tenweb_activaion").attr("data-activate-url");
1045
+
1046
+ function install_tenweb_plugin() {
1047
+ jQuery("#loading").addClass('is-active');
1048
+ jQuery(this).prop('disable', true);
1049
+ jQuery.ajax({
1050
+ method: "POST",
1051
+ url: url,
1052
+ }).done(function () {
1053
+ /* Check if plugin installed.*/
1054
+ jQuery.ajax({
1055
+ type: 'POST',
1056
+ dataType: 'json',
1057
+ url: jQuery("#verifyUrl").attr('data-url'),
1058
+ error: function () {
1059
+ jQuery("#loading").removeClass('is-active');
1060
+ jQuery(".error_install").show();
1061
+ },
1062
+ success: function (response) {
1063
+ if (response.status_install == 1) {
1064
+ jQuery('#install_now .tenweb_activaion_text').text(jQuery("#install_now").data("activation"));
1065
+ activate_tenweb_plugin();
1066
+ }
1067
+ else {
1068
+ jQuery("#loading").removeClass('is-active');
1069
+ jQuery(".error_install").removeClass('hide');
1070
+ }
1071
+ }
1072
+ });
1073
+ }).fail(function () {
1074
+ jQuery("#loading").removeClass('is-active');
1075
+ jQuery(".error_install").removeClass('hide');
1076
+ });
1077
+ }
1078
+ function activate_tenweb_plugin() {
1079
+ jQuery("#activate_now #loading").addClass('is-active');
1080
+ jQuery.ajax({
1081
+ method: "POST",
1082
+ url: activate_url,
1083
+ }).done(function () {
1084
+ jQuery("#loading").removeClass('is-active');
1085
+ var data_tenweb_url = '';
1086
+ /* Check if plugin installed.*/
1087
+ jQuery.ajax({
1088
+ type: 'POST',
1089
+ dataType: 'json',
1090
+ url: jQuery("#verifyUrl").attr('data-url'),
1091
+ error: function () {
1092
+ jQuery("#loading").removeClass('is-active');
1093
+ jQuery(".error_activate").removeClass('hide');
1094
+ },
1095
+ success: function (response) {
1096
+ if (response.status_active == 0) {
1097
+ //jQuery('#install_now').addClass('hide');
1098
+ data_tenweb_url = jQuery('.tenweb_activaion').attr('data-tenweb-url');
1099
+ jQuery.post('<?php echo $dismiss_url; ?>');
1100
+ }
1101
+ else {
1102
+ jQuery("#loading").removeClass('is-active');
1103
+ jQuery(".error_activate").removeClass('hide');
1104
+ }
1105
+ },
1106
+ complete: function () {
1107
+ if (data_tenweb_url != '') {
1108
+ window.location.href = data_tenweb_url;
1109
+ }
1110
+ }
1111
+ });
1112
+ }).fail(function () {
1113
+ jQuery("#loading").removeClass('is-active');
1114
+ });
1115
+ }
1116
+ jQuery("#install_now").on("click", function () {
1117
+ install_tenweb_plugin();
1118
+ });
1119
+ jQuery("#activate_now").on("click", function () {
1120
+ activate_tenweb_plugin();
1121
+ });
1122
+ </script>
1123
+
1124
+ <?php
1125
+ }
1126
  }
js/ffwd.js CHANGED
@@ -250,6 +250,7 @@ data['image_onclick_action']=image_onclick_action
250
  console.log(result);
251
  result = JSON.parse(result);
252
  if(result[0] == "success") {
 
253
  if(current_id == 0) {
254
  jQuery("#current_id").val(result[1]);
255
  }
@@ -269,7 +270,10 @@ data['image_onclick_action']=image_onclick_action
269
  }
270
  }
271
  else {
272
- confirm(result[0] + " : " + result[1] + ".");
 
 
 
273
  }
274
  jQuery('#opacity_div').hide();
275
  jQuery('#loading_div').hide();
250
  console.log(result);
251
  result = JSON.parse(result);
252
  if(result[0] == "success") {
253
+ jQuery(".ffwd_notice").html("");
254
  if(current_id == 0) {
255
  jQuery("#current_id").val(result[1]);
256
  }
270
  }
271
  }
272
  else {
273
+ jQuery(".ffwd_notice").html('<div class="notice notice-error is-dismissible">\n' +
274
+ ' <p>'+result[0]+' : '+result[1]+'.</p>\n' +
275
+ ' </div>');
276
+ //confirm(result[0] + " : " + result[1] + ".");
277
  }
278
  jQuery('#opacity_div').hide();
279
  jQuery('#loading_div').hide();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: customizable facebook feed, facebook, facebook events, facebook feed, face
4
  Requires at least: 3.4
5
  Requires PHP: 5.2
6
  Tested up to: 5.1
7
- Stable tag: 1.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -132,6 +132,9 @@ The plugin uses Facebook API to get public data from Facebook. All the received
132
 
133
  == Changelog ==
134
 
 
 
 
135
  = 1.1.6 =
136
  * Fixed: Minor bug.
137
 
4
  Requires at least: 3.4
5
  Requires PHP: 5.2
6
  Tested up to: 5.1
7
+ Stable tag: 1.1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
132
 
133
  == Changelog ==
134
 
135
+ = 1.1.7 =
136
+ * Added: Banner to install 10Web manager.
137
+
138
  = 1.1.6 =
139
  * Fixed: Minor bug.
140