wpForo Forum - Version 2.0.2

Version Description

Download this release

Release Info

Developer Tomdever
Plugin Icon 128x128 wpForo Forum
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

Files changed (4) hide show
  1. autoload.php +22 -0
  2. includes/installation.php +0 -15
  3. readme.txt +3 -2
  4. wpforo.php +2 -2
autoload.php CHANGED
@@ -32,3 +32,25 @@ if( ! function_exists( 'WPF' ) ) {
32
 
33
  // Global for backwards compatibility.
34
  $GLOBALS['wpforo'] = WPF();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  // Global for backwards compatibility.
34
  $GLOBALS['wpforo'] = WPF();
35
+
36
+ // #### deactivate old addons
37
+ function wpforo_deactivate_all_old_addons() {
38
+ $v = get_option( 'wpforo_version', '' );
39
+ if( WPFORO_VERSION !== $v && version_compare( $v, '2.0.0', '<' ) ){
40
+ // #### deactivate old addons
41
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
42
+ require_once WPFORO_DIR . '/includes/functions.php';
43
+ $plugins = [];
44
+ foreach( wpforo_get_addons_info() as $addon ){
45
+ if( file_exists( $addon['ABSPATH'] ) ){
46
+ $plugin_data = get_plugin_data( $addon['ABSPATH'] );
47
+ if( $plugin_data['Version'] ){
48
+ $plugin_basename = plugin_basename( $addon['ABSPATH'] );
49
+ if( version_compare( $plugin_data['Version'], '3.0.0', '<' ) && is_plugin_active( $plugin_basename ) ) $plugins[] = $plugin_basename;
50
+ }
51
+ }
52
+ }
53
+ if( $plugins ) deactivate_plugins($plugins);
54
+ }
55
+ }
56
+ wpforo_deactivate_all_old_addons();
includes/installation.php CHANGED
@@ -75,21 +75,6 @@ function wpforo_activation() {
75
 
76
  function wpforo_upgrade(){
77
  if( version_compare( get_option( 'wpforo_version', '' ), '2.0.0', '<' ) ){
78
- // #### deactivate old addons
79
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
80
- $plugins = [];
81
- $addons = wpforo_get_addons_info();
82
- foreach( $addons as $addon ){
83
- if( file_exists( $addon['ABSPATH'] ) ){
84
- $plugin_data = get_plugin_data( $addon['ABSPATH'] );
85
- if( $plugin_data['Version'] ){
86
- $plugin_basename = plugin_basename( $addon['ABSPATH'] );
87
- if( version_compare( $plugin_data['Version'], '3.0.0', '<' ) && is_plugin_active( $plugin_basename ) ) $plugins[] = $plugin_basename;
88
- }
89
- }
90
- }
91
- if( $plugins ) deactivate_plugins($plugins);
92
-
93
  // #### migrate old options to new settings
94
  require_once WPFORO_DIR . "/includes/options-migration.php";
95
  _wpforo_migrate_old_options_to_new();
75
 
76
  function wpforo_upgrade(){
77
  if( version_compare( get_option( 'wpforo_version', '' ), '2.0.0', '<' ) ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  // #### migrate old options to new settings
79
  require_once WPFORO_DIR . "/includes/options-migration.php";
80
  _wpforo_migrate_old_options_to_new();
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: gVectors Team
3
  Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
  Requires at least: 5.1
5
  Tested up to: 6.0
6
- Stable tag: 2.0.1
7
  Requires PHP: 5.6 and higher
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -162,12 +162,13 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
162
 
163
  == Changelog ==
164
 
165
- = wpForo Forum 2.0.1 | 03.08.2021 =
166
 
167
  [wpForo Forum v2.0.1 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-2-0-1-is-released/)
168
 
169
  IMPORTANT NOTES for UPDATE
170
 
 
171
  - This is a major update with fully changed forum theme. This update will remove forum template and css customizations. Also, some settings might be reset and you may need to update them again.
172
  - After the update, please delete all caches and purge CDN if you have.
173
  - Please read [Update to wpForo v2 Instruction](https://wpforo.com/docs/wpforo-v2/getting-started/update-to-wpforo-v2/)
3
  Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
  Requires at least: 5.1
5
  Tested up to: 6.0
6
+ Stable tag: 2.0.2
7
  Requires PHP: 5.6 and higher
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
162
 
163
  == Changelog ==
164
 
165
+ = wpForo Forum 2.0.1 / 2.0.2 | 03.08.2021 =
166
 
167
  [wpForo Forum v2.0.1 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-2-0-1-is-released/)
168
 
169
  IMPORTANT NOTES for UPDATE
170
 
171
+ - Please deactivate current addons or update them to 3.0.0 version before updating wpForo to 2.0.x
172
  - This is a major update with fully changed forum theme. This update will remove forum template and css customizations. Also, some settings might be reset and you may need to update them again.
173
  - After the update, please delete all caches and purge CDN if you have.
174
  - Please read [Update to wpForo v2 Instruction](https://wpforo.com/docs/wpforo-v2/getting-started/update-to-wpforo-v2/)
wpforo.php CHANGED
@@ -5,14 +5,14 @@
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
- * Version: 2.0.1
9
  * Text Domain: wpforo
10
  * Domain Path: /languages
11
  */
12
 
13
  namespace wpforo;
14
 
15
- define( 'WPFORO_VERSION', '2.0.1' );
16
 
17
  //Exit if accessed directly
18
  if( ! defined( 'ABSPATH' ) ) exit;
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
+ * Version: 2.0.2
9
  * Text Domain: wpforo
10
  * Domain Path: /languages
11
  */
12
 
13
  namespace wpforo;
14
 
15
+ define( 'WPFORO_VERSION', '2.0.2' );
16
 
17
  //Exit if accessed directly
18
  if( ! defined( 'ABSPATH' ) ) exit;