BuddyPress - Version 6.2.0-beta1

Version Description

= 6.1.0 = See: https://codex.buddypress.org/releases/version-6-1-0/

= 6.0.0 = See: https://codex.buddypress.org/releases/version-6-0-0/

= 5.2.0 = See: https://codex.buddypress.org/releases/version-5-2-0/

= 5.1.2 = See: https://codex.buddypress.org/releases/version-5-1-2/

= 5.1.1 = See: https://codex.buddypress.org/releases/version-5-1-1/

= 5.1.0 = See: https://codex.buddypress.org/releases/version-5-1-0/

= 5.0.0 = See: https://codex.buddypress.org/releases/version-5-0-0/

= 4.4.0 = See: https://codex.buddypress.org/releases/version-4-4-0/

= 4.3.0 = See: https://codex.buddypress.org/releases/version-4-3-0/

= 4.2.0 = See: https://codex.buddypress.org/releases/version-4-2-0/

= 4.1.0 = See: https://codex.buddypress.org/releases/version-4-1-0/

= 4.0.0 = See: https://codex.buddypress.org/releases/version-4-0-0/

Download this release

Release Info

Developer imath
Plugin Icon 128x128 BuddyPress
Version 6.2.0-beta1
Comparing to
See all releases

Code changes from version 6.1.0 to 6.2.0-beta1

bp-core/classes/class-bp-core-oembed-extension.php CHANGED
@@ -230,9 +230,10 @@ abstract class BP_Core_oEmbed_Extension {
230
 
231
  register_rest_route( 'oembed/1.0', "/embed/{$this->slug_endpoint}", array(
232
  array(
233
- 'methods' => WP_REST_Server::READABLE,
234
- 'callback' => array( $this, 'get_item' ),
235
- 'args' => $args
 
236
  ),
237
  ) );
238
  }
230
 
231
  register_rest_route( 'oembed/1.0', "/embed/{$this->slug_endpoint}", array(
232
  array(
233
+ 'methods' => WP_REST_Server::READABLE,
234
+ 'callback' => array( $this, 'get_item' ),
235
+ 'permission_callback' => '__return_true',
236
+ 'args' => $args
237
  ),
238
  ) );
239
  }
bp-core/classes/class-bp-phpmailer.php CHANGED
@@ -26,6 +26,7 @@ class BP_PHPMailer implements BP_Email_Delivery {
26
  */
27
  public function bp_email( BP_Email $email ) {
28
  static $phpmailer = null;
 
29
 
30
  /**
31
  * Filter PHPMailer object to use.
@@ -38,16 +39,32 @@ class BP_PHPMailer implements BP_Email_Delivery {
38
  */
39
  $phpmailer = apply_filters( 'bp_phpmailer_object', $phpmailer );
40
 
41
- if ( ! ( $phpmailer instanceof PHPMailer ) ) {
42
- if ( ! class_exists( 'PHPMailer' ) ) {
43
- require_once ABSPATH . WPINC . '/class-phpmailer.php';
44
- require_once ABSPATH . WPINC . '/class-smtp.php';
 
 
 
 
 
 
 
 
 
 
45
  }
 
 
 
 
 
 
46
 
47
- $phpmailer = new PHPMailer( true );
 
48
  }
49
 
50
-
51
  /*
52
  * Resets.
53
  */
@@ -58,21 +75,21 @@ class BP_PHPMailer implements BP_Email_Delivery {
58
  $phpmailer->clearReplyTos();
59
  $phpmailer->Sender = '';
60
 
61
-
62
  /*
63
  * Set up.
64
  */
65
-
66
  $phpmailer->IsMail();
67
  $phpmailer->CharSet = bp_get_option( 'blog_charset' );
68
 
69
-
70
  /*
71
  * Content.
72
  */
73
-
74
  $phpmailer->Subject = $email->get_subject( 'replace-tokens' );
75
- $content_plaintext = PHPMailer::normalizeBreaks( $email->get_content_plaintext( 'replace-tokens' ) );
 
 
 
 
76
 
77
  if ( $email->get( 'content_type' ) === 'html' ) {
78
  $phpmailer->msgHTML( $email->get_template( 'add-content' ) );
@@ -84,38 +101,79 @@ class BP_PHPMailer implements BP_Email_Delivery {
84
  }
85
 
86
  $recipient = $email->get_from();
87
- try {
88
- $phpmailer->SetFrom( $recipient->get_address(), $recipient->get_name(), false );
89
- } catch ( phpmailerException $e ) {
 
 
 
 
 
 
 
90
  }
91
 
92
  $recipient = $email->get_reply_to();
93
- try {
94
- $phpmailer->addReplyTo( $recipient->get_address(), $recipient->get_name() );
95
- } catch ( phpmailerException $e ) {
 
 
 
 
 
 
 
96
  }
97
 
98
  $recipients = $email->get_to();
99
- foreach ( $recipients as $recipient ) {
100
- try {
101
- $phpmailer->AddAddress( $recipient->get_address(), $recipient->get_name() );
102
- } catch ( phpmailerException $e ) {
 
 
 
 
 
 
 
 
 
103
  }
104
  }
105
 
106
  $recipients = $email->get_cc();
107
- foreach ( $recipients as $recipient ) {
108
- try {
109
- $phpmailer->AddCc( $recipient->get_address(), $recipient->get_name() );
110
- } catch ( phpmailerException $e ) {
 
 
 
 
 
 
 
 
 
111
  }
112
  }
113
 
114
  $recipients = $email->get_bcc();
115
- foreach ( $recipients as $recipient ) {
116
- try {
117
- $phpmailer->AddBcc( $recipient->get_address(), $recipient->get_name() );
118
- } catch ( phpmailerException $e ) {
 
 
 
 
 
 
 
 
 
119
  }
120
  }
121
 
@@ -124,7 +182,6 @@ class BP_PHPMailer implements BP_Email_Delivery {
124
  $phpmailer->AddCustomHeader( $name, $content );
125
  }
126
 
127
-
128
  /**
129
  * Fires after PHPMailer is initialised.
130
  *
@@ -137,14 +194,21 @@ class BP_PHPMailer implements BP_Email_Delivery {
137
  /** This filter is documented in wp-includes/pluggable.php */
138
  do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
139
 
140
- try {
141
- return $phpmailer->Send();
142
- } catch ( phpmailerException $e ) {
143
- return new WP_Error( $e->getCode(), $e->getMessage(), $email );
 
 
 
 
 
 
 
 
144
  }
145
  }
146
 
147
-
148
  /*
149
  * Utility/helper functions.
150
  */
26
  */
27
  public function bp_email( BP_Email $email ) {
28
  static $phpmailer = null;
29
+ $phpmailer_is_6_0 = false;
30
 
31
  /**
32
  * Filter PHPMailer object to use.
39
  */
40
  $phpmailer = apply_filters( 'bp_phpmailer_object', $phpmailer );
41
 
42
+ /**
43
+ * WordPress 5.5 deprecated version 5.2 of PHPMailer
44
+ * and is now using version 6.0 of PHPMailer.
45
+ */
46
+ if ( file_exists( ABSPATH . WPINC . '/PHPMailer/PHPMailer.php' ) ) {
47
+ if ( ! ( $phpmailer instanceof PHPMailer\PHPMailer\PHPMailer ) ) {
48
+ if ( ! class_exists( 'PHPMailer\\PHPMailer\\PHPMailer' ) ) {
49
+ require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
50
+ require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
51
+ require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
52
+ }
53
+
54
+ $phpmailer = new PHPMailer\PHPMailer\PHPMailer( true );
55
+ $phpmailer_is_6_0 = true;
56
  }
57
+ } else {
58
+ if ( ! ( $phpmailer instanceof PHPMailer ) ) {
59
+ if ( ! class_exists( 'PHPMailer' ) ) {
60
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
61
+ require_once ABSPATH . WPINC . '/class-smtp.php';
62
+ }
63
 
64
+ $phpmailer = new PHPMailer( true );
65
+ }
66
  }
67
 
 
68
  /*
69
  * Resets.
70
  */
75
  $phpmailer->clearReplyTos();
76
  $phpmailer->Sender = '';
77
 
 
78
  /*
79
  * Set up.
80
  */
 
81
  $phpmailer->IsMail();
82
  $phpmailer->CharSet = bp_get_option( 'blog_charset' );
83
 
 
84
  /*
85
  * Content.
86
  */
 
87
  $phpmailer->Subject = $email->get_subject( 'replace-tokens' );
88
+ if ( $phpmailer_is_6_0 ) {
89
+ $content_plaintext = PHPMailer\PHPMailer\PHPMailer::normalizeBreaks( $email->get_content_plaintext( 'replace-tokens' ) );
90
+ } else {
91
+ $content_plaintext = PHPMailer::normalizeBreaks( $email->get_content_plaintext( 'replace-tokens' ) );
92
+ }
93
 
94
  if ( $email->get( 'content_type' ) === 'html' ) {
95
  $phpmailer->msgHTML( $email->get_template( 'add-content' ) );
101
  }
102
 
103
  $recipient = $email->get_from();
104
+ if ( $phpmailer_is_6_0 ) {
105
+ try {
106
+ $phpmailer->setFrom( $recipient->get_address(), $recipient->get_name(), false );
107
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
108
+ }
109
+ } else {
110
+ try {
111
+ $phpmailer->SetFrom( $recipient->get_address(), $recipient->get_name(), false );
112
+ } catch ( phpmailerException $e ) {
113
+ }
114
  }
115
 
116
  $recipient = $email->get_reply_to();
117
+ if ( $phpmailer_is_6_0 ) {
118
+ try {
119
+ $phpmailer->addReplyTo( $recipient->get_address(), $recipient->get_name() );
120
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
121
+ }
122
+ } else {
123
+ try {
124
+ $phpmailer->addReplyTo( $recipient->get_address(), $recipient->get_name() );
125
+ } catch ( phpmailerException $e ) {
126
+ }
127
  }
128
 
129
  $recipients = $email->get_to();
130
+ if ( $phpmailer_is_6_0 ) {
131
+ foreach ( $recipients as $recipient ) {
132
+ try {
133
+ $phpmailer->AddAddress( $recipient->get_address(), $recipient->get_name() );
134
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
135
+ }
136
+ }
137
+ } else {
138
+ foreach ( $recipients as $recipient ) {
139
+ try {
140
+ $phpmailer->AddAddress( $recipient->get_address(), $recipient->get_name() );
141
+ } catch ( phpmailerException $e ) {
142
+ }
143
  }
144
  }
145
 
146
  $recipients = $email->get_cc();
147
+ if ( $phpmailer_is_6_0 ) {
148
+ foreach ( $recipients as $recipient ) {
149
+ try {
150
+ $phpmailer->AddCc( $recipient->get_address(), $recipient->get_name() );
151
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
152
+ }
153
+ }
154
+ } else {
155
+ foreach ( $recipients as $recipient ) {
156
+ try {
157
+ $phpmailer->AddCc( $recipient->get_address(), $recipient->get_name() );
158
+ } catch ( phpmailerException $e ) {
159
+ }
160
  }
161
  }
162
 
163
  $recipients = $email->get_bcc();
164
+ if ( $phpmailer_is_6_0 ) {
165
+ foreach ( $recipients as $recipient ) {
166
+ try {
167
+ $phpmailer->AddBcc( $recipient->get_address(), $recipient->get_name() );
168
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
169
+ }
170
+ }
171
+ } else {
172
+ foreach ( $recipients as $recipient ) {
173
+ try {
174
+ $phpmailer->AddBcc( $recipient->get_address(), $recipient->get_name() );
175
+ } catch ( phpmailerException $e ) {
176
+ }
177
  }
178
  }
179
 
182
  $phpmailer->AddCustomHeader( $name, $content );
183
  }
184
 
 
185
  /**
186
  * Fires after PHPMailer is initialised.
187
  *
194
  /** This filter is documented in wp-includes/pluggable.php */
195
  do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
196
 
197
+ if ( $phpmailer_is_6_0 ) {
198
+ try {
199
+ return $phpmailer->Send();
200
+ } catch ( PHPMailer\PHPMailer\Exception $e ) {
201
+ return new WP_Error( $e->getCode(), $e->getMessage(), $email );
202
+ }
203
+ } else {
204
+ try {
205
+ return $phpmailer->Send();
206
+ } catch ( phpmailerException $e ) {
207
+ return new WP_Error( $e->getCode(), $e->getMessage(), $email );
208
+ }
209
  }
210
  }
211
 
 
212
  /*
213
  * Utility/helper functions.
214
  */
bp-loader.php CHANGED
@@ -15,7 +15,7 @@
15
  * Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
16
  * Author: The BuddyPress Community
17
  * Author URI: https://buddypress.org/
18
- * Version: 6.1.0
19
  * Text Domain: buddypress
20
  * Domain Path: /bp-languages/
21
  * License: GPLv2 or later (license.txt)
@@ -30,7 +30,7 @@
30
  defined( 'ABSPATH' ) || exit;
31
 
32
  // Required PHP version.
33
- define( 'BP_REQUIRED_PHP_VERSION', '5.3.0' );
34
 
35
  /**
36
  * The main function responsible for returning the one true BuddyPress Instance to functions everywhere.
15
  * Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
16
  * Author: The BuddyPress Community
17
  * Author URI: https://buddypress.org/
18
+ * Version: 6.2.0-beta1
19
  * Text Domain: buddypress
20
  * Domain Path: /bp-languages/
21
  * License: GPLv2 or later (license.txt)
30
  defined( 'ABSPATH' ) || exit;
31
 
32
  // Required PHP version.
33
+ define( 'BP_REQUIRED_PHP_VERSION', '5.6.0' );
34
 
35
  /**
36
  * The main function responsible for returning the one true BuddyPress Instance to functions everywhere.
buddypress.pot CHANGED
@@ -9,7 +9,7 @@ msgstr ""
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-07-01T01:15:24+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: buddypress\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-07-22T23:50:47+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: buddypress\n"
class-buddypress.php CHANGED
@@ -303,7 +303,7 @@ class BuddyPress {
303
 
304
  /** Versions **********************************************************/
305
 
306
- $this->version = '6.1.0';
307
  $this->db_version = 12385;
308
 
309
  /** Loading ***********************************************************/
303
 
304
  /** Versions **********************************************************/
305
 
306
+ $this->version = '6.2.0-beta1';
307
  $this->db_version = 12385;
308
 
309
  /** Loading ***********************************************************/