WD Facebook Feed – Custom Facebook Feed Plugin - Version 1.0.12

Version Description

  • Fixed: Changes in database after plugin version update via FTP or AJAX requests with silent activation
Download this release

Release Info

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

Code changes from version 1.0.11 to 1.0.12

Files changed (3) hide show
  1. facebook-feed-wd.php +23 -2
  2. readme.txt +5 -2
  3. update/ffwd_update.php +13 -11
facebook-feed-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Facebook Feed WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
6
  * Description:Facebook Feed WD is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
7
- * Version: 1.0.11
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -75,6 +75,27 @@ function ffwd_menu_panel()
75
 
76
  add_action('admin_menu', 'ffwd_menu_panel');
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  function ffwd_menu()
79
  {
80
  global $wpdb;
@@ -708,7 +729,7 @@ add_action('init', 'ffwd_language_load');
708
  function ffwd_version()
709
  {
710
 
711
- $version = '1.0.11';
712
 
713
  if (get_option('ffwd_version') === false) {
714
  add_option('ffwd_version', $version);
4
  * Plugin Name: Facebook Feed WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
6
  * Description:Facebook Feed WD is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
7
+ * Version: 1.0.12
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
75
 
76
  add_action('admin_menu', 'ffwd_menu_panel');
77
 
78
+ add_action('init', 'ffwd_silently_update');
79
+
80
+ function ffwd_silently_update()
81
+ {
82
+ global $wpdb;
83
+
84
+
85
+ $old_version=ffwd_get_version();
86
+
87
+ $new_version = ffwd_version();
88
+
89
+ $newer = version_compare($new_version, $old_version, '>');
90
+ if ($newer) {
91
+ require_once WD_FFWD_DIR . '/update/ffwd_update.php';
92
+ /*adds new params for new versions*/
93
+ ffwd_update_diff($new_version, $old_version);
94
+
95
+
96
+ }
97
+ }
98
+
99
  function ffwd_menu()
100
  {
101
  global $wpdb;
729
  function ffwd_version()
730
  {
731
 
732
+ $version = '1.0.12';
733
 
734
  if (get_option('ffwd_version') === false) {
735
  add_option('ffwd_version', $version);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webdorado
3
  Donate link: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
4
  Tags: customizable, facebook, facebook events, facebook feed, facebook group, facebook like box, facebook likes, facebook page, facebook photos, facebook plugin, facebook posts, likebox
5
  Requires at least: 3.4
6
- Tested up to: 4.6
7
- Stable tag: 1.0.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -66,6 +66,9 @@ Upgrade to [Facebook Feed Pro](https://web-dorado.com/products/wordpress-faceboo
66
 
67
  == Changelog ==
68
 
 
 
 
69
  = 1.0.11 =
70
  * Added: Reactions
71
  * Changed: Graph api calls
3
  Donate link: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
4
  Tags: customizable, facebook, facebook events, facebook feed, facebook group, facebook like box, facebook likes, facebook page, facebook photos, facebook plugin, facebook posts, likebox
5
  Requires at least: 3.4
6
+ Tested up to: 4.7
7
+ Stable tag: 1.0.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
66
 
67
  == Changelog ==
68
 
69
+ = 1.0.12 =
70
+ * Fixed: Changes in database after plugin version update via FTP or AJAX requests with silent activation
71
+
72
  = 1.0.11 =
73
  * Added: Reactions
74
  * Changed: Graph api calls
update/ffwd_update.php CHANGED
@@ -20,22 +20,24 @@ function ffwd_update_diff($new_v, $old_v = 0.0){
20
  }
21
 
22
 
23
- if(version_compare($old_v,'1.0.11','<')) {
24
- $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `reactions` text NOT NULL DEFAULT ''");
25
- $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `comments` text NOT NULL DEFAULT ''");
26
- $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `shares` text NOT NULL DEFAULT ''");
27
- $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `attachments` text NOT NULL DEFAULT ''");
28
- $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `who_post` text NOT NULL DEFAULT ''");
29
 
 
 
 
 
 
 
 
30
 
31
 
32
- $query = "SELECT * FROM " . $wpdb->prefix . "wd_fb_info";
33
- $rows = $wpdb->get_results($query);
34
- require_once(WD_FFWD_DIR . '/framework/WDFacebookFeed.php');
35
 
36
 
37
- WDFacebookFeed::updateOnVersionChange($rows);
38
-
39
 
40
  }
41
 
20
  }
21
 
22
 
23
+ if(version_compare($old_v,'1.0.12','<')) {
 
 
 
 
 
24
 
25
+ $check_columns= $wpdb->get_results('SHOW COLUMNS FROM '. $wpdb->prefix . 'wd_fb_data LIKE "comments"');
26
+ if(empty($check_columns)) {
27
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `reactions` text NOT NULL DEFAULT ''");
28
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `comments` text NOT NULL DEFAULT ''");
29
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `shares` text NOT NULL DEFAULT ''");
30
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `attachments` text NOT NULL DEFAULT ''");
31
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wd_fb_data ADD `who_post` text NOT NULL DEFAULT ''");
32
 
33
 
34
+ $query = "SELECT * FROM " . $wpdb->prefix . "wd_fb_info";
35
+ $rows = $wpdb->get_results($query);
36
+ require_once(WD_FFWD_DIR . '/framework/WDFacebookFeed.php');
37
 
38
 
39
+ WDFacebookFeed::updateOnVersionChange($rows);
40
+ }
41
 
42
  }
43