Version Description
- Confirmed WordPress 3.4 compatibility
- Fix single forums not working when switching visibility
- Fix hierarchical forum capability check
Download this release
Release Info
| Developer | johnjamesjacoby |
| Plugin | |
| Version | 2.0.3 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.2 to 2.0.3
- bbp-includes/bbp-forum-functions.php +42 -58
- bbp-includes/bbp-forum-template.php +1 -1
- bbpress.php +3 -3
- readme.txt +7 -2
bbp-includes/bbp-forum-functions.php
CHANGED
|
@@ -206,46 +206,38 @@ function bbp_publicize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 206 |
|
| 207 |
do_action( 'bbp_publicize_forum', $forum_id );
|
| 208 |
|
| 209 |
-
//
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
// Remove from _bbp_private_forums site option
|
| 213 |
-
if ( bbp_get_private_status_id() == $current_visibility ) {
|
| 214 |
-
|
| 215 |
-
// Get private forums
|
| 216 |
-
$private = bbp_get_private_forum_ids();
|
| 217 |
|
| 218 |
-
|
| 219 |
-
|
| 220 |
|
| 221 |
-
|
| 222 |
|
| 223 |
-
|
| 224 |
-
|
| 225 |
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
}
|
| 230 |
|
| 231 |
-
|
| 232 |
-
|
| 233 |
|
| 234 |
-
|
| 235 |
-
|
| 236 |
|
| 237 |
-
|
| 238 |
-
if ( in_array( $forum_id, $hidden ) ) {
|
| 239 |
|
| 240 |
-
|
|
|
|
| 241 |
|
| 242 |
-
|
| 243 |
-
|
|
|
|
| 244 |
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
}
|
| 248 |
-
}
|
| 249 |
|
| 250 |
// Update forum post_status
|
| 251 |
global $wpdb;
|
|
@@ -276,29 +268,25 @@ function bbp_privatize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 276 |
// Only run queries if visibility is changing
|
| 277 |
if ( bbp_get_private_status_id() != $current_visibility ) {
|
| 278 |
|
| 279 |
-
//
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
// Get hidden forums
|
| 283 |
-
$hidden = bbp_get_hidden_forum_ids();
|
| 284 |
|
| 285 |
-
|
| 286 |
-
|
| 287 |
|
| 288 |
-
|
| 289 |
|
| 290 |
-
|
| 291 |
-
|
| 292 |
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
}
|
| 296 |
}
|
| 297 |
|
| 298 |
// Add to '_bbp_private_forums' site option
|
| 299 |
$private = bbp_get_private_forum_ids();
|
| 300 |
$private[] = $forum_id;
|
| 301 |
-
update_option( '_bbp_private_forums', array_unique( array_values( $private ) ) );
|
| 302 |
|
| 303 |
// Update forums visibility setting
|
| 304 |
global $wpdb;
|
|
@@ -329,29 +317,25 @@ function bbp_hide_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 329 |
// Only run queries if visibility is changing
|
| 330 |
if ( bbp_get_hidden_status_id() != $current_visibility ) {
|
| 331 |
|
| 332 |
-
//
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
// Get private forums
|
| 336 |
-
$private = bbp_get_private_forum_ids();
|
| 337 |
|
| 338 |
-
|
| 339 |
-
|
| 340 |
|
| 341 |
-
|
| 342 |
|
| 343 |
-
|
| 344 |
-
|
| 345 |
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
}
|
| 349 |
}
|
| 350 |
|
| 351 |
// Add to '_bbp_hidden_forums' site option
|
| 352 |
$hidden = bbp_get_hidden_forum_ids();
|
| 353 |
$hidden[] = $forum_id;
|
| 354 |
-
update_option( '_bbp_hidden_forums', array_unique( array_values( $hidden ) ) );
|
| 355 |
|
| 356 |
// Update forums visibility setting
|
| 357 |
global $wpdb;
|
| 206 |
|
| 207 |
do_action( 'bbp_publicize_forum', $forum_id );
|
| 208 |
|
| 209 |
+
// Get private forums
|
| 210 |
+
$private = bbp_get_private_forum_ids();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
|
| 212 |
+
// Find this forum in the array
|
| 213 |
+
if ( in_array( $forum_id, $private ) ) {
|
| 214 |
|
| 215 |
+
$offset = array_search( $forum_id, $private );
|
| 216 |
|
| 217 |
+
// Splice around it
|
| 218 |
+
array_splice( $private, $offset, 1 );
|
| 219 |
|
| 220 |
+
// Update private forums minus this one
|
| 221 |
+
update_option( '_bbp_private_forums', array_unique( array_filter( array_values( $private ) ) ) );
|
| 222 |
+
}
|
|
|
|
| 223 |
|
| 224 |
+
// Get hidden forums
|
| 225 |
+
$hidden = bbp_get_hidden_forum_ids();
|
| 226 |
|
| 227 |
+
// Find this forum in the array
|
| 228 |
+
if ( in_array( $forum_id, $hidden ) ) {
|
| 229 |
|
| 230 |
+
$offset = array_search( $forum_id, $hidden );
|
|
|
|
| 231 |
|
| 232 |
+
// Splice around it
|
| 233 |
+
array_splice( $hidden, $offset, 1 );
|
| 234 |
|
| 235 |
+
// Update hidden forums minus this one
|
| 236 |
+
update_option( '_bbp_hidden_forums', array_unique( array_filter( array_values( $hidden ) ) ) );
|
| 237 |
+
}
|
| 238 |
|
| 239 |
+
// Only run queries if visibility is changing
|
| 240 |
+
if ( bbp_get_public_status_id() != $current_visibility ) {
|
|
|
|
|
|
|
| 241 |
|
| 242 |
// Update forum post_status
|
| 243 |
global $wpdb;
|
| 268 |
// Only run queries if visibility is changing
|
| 269 |
if ( bbp_get_private_status_id() != $current_visibility ) {
|
| 270 |
|
| 271 |
+
// Get hidden forums
|
| 272 |
+
$hidden = bbp_get_hidden_forum_ids();
|
|
|
|
|
|
|
|
|
|
| 273 |
|
| 274 |
+
// Find this forum in the array
|
| 275 |
+
if ( in_array( $forum_id, $hidden ) ) {
|
| 276 |
|
| 277 |
+
$offset = array_search( $forum_id, $hidden );
|
| 278 |
|
| 279 |
+
// Splice around it
|
| 280 |
+
array_splice( $hidden, $offset, 1 );
|
| 281 |
|
| 282 |
+
// Update hidden forums minus this one
|
| 283 |
+
update_option( '_bbp_hidden_forums', array_unique( array_filter( array_values( $hidden ) ) ) );
|
|
|
|
| 284 |
}
|
| 285 |
|
| 286 |
// Add to '_bbp_private_forums' site option
|
| 287 |
$private = bbp_get_private_forum_ids();
|
| 288 |
$private[] = $forum_id;
|
| 289 |
+
update_option( '_bbp_private_forums', array_unique( array_filter( array_values( $private ) ) ) );
|
| 290 |
|
| 291 |
// Update forums visibility setting
|
| 292 |
global $wpdb;
|
| 317 |
// Only run queries if visibility is changing
|
| 318 |
if ( bbp_get_hidden_status_id() != $current_visibility ) {
|
| 319 |
|
| 320 |
+
// Get private forums
|
| 321 |
+
$private = bbp_get_private_forum_ids();
|
|
|
|
|
|
|
|
|
|
| 322 |
|
| 323 |
+
// Find this forum in the array
|
| 324 |
+
if ( in_array( $forum_id, $private ) ) {
|
| 325 |
|
| 326 |
+
$offset = array_search( $forum_id, $private );
|
| 327 |
|
| 328 |
+
// Splice around it
|
| 329 |
+
array_splice( $private, $offset, 1 );
|
| 330 |
|
| 331 |
+
// Update private forums minus this one
|
| 332 |
+
update_option( '_bbp_private_forums', array_unique( array_filter( array_values( $private ) ) ) );
|
|
|
|
| 333 |
}
|
| 334 |
|
| 335 |
// Add to '_bbp_hidden_forums' site option
|
| 336 |
$hidden = bbp_get_hidden_forum_ids();
|
| 337 |
$hidden[] = $forum_id;
|
| 338 |
+
update_option( '_bbp_hidden_forums', array_unique( array_filter( array_values( $hidden ) ) ) );
|
| 339 |
|
| 340 |
// Update forums visibility setting
|
| 341 |
global $wpdb;
|
bbp-includes/bbp-forum-template.php
CHANGED
|
@@ -549,7 +549,7 @@ function bbp_get_forum_ancestors( $forum_id = 0 ) {
|
|
| 549 |
$ancestors = array();
|
| 550 |
|
| 551 |
if ( $forum = bbp_get_forum( $forum_id ) ) {
|
| 552 |
-
while ( 0 !== $forum->post_parent ) {
|
| 553 |
$ancestors[] = $forum->post_parent;
|
| 554 |
$forum = bbp_get_forum( $forum->post_parent );
|
| 555 |
}
|
| 549 |
$ancestors = array();
|
| 550 |
|
| 551 |
if ( $forum = bbp_get_forum( $forum_id ) ) {
|
| 552 |
+
while ( 0 !== (int) $forum->post_parent ) {
|
| 553 |
$ancestors[] = $forum->post_parent;
|
| 554 |
$forum = bbp_get_forum( $forum->post_parent );
|
| 555 |
}
|
bbpress.php
CHANGED
|
@@ -15,7 +15,7 @@
|
|
| 15 |
* Description: bbPress is forum software with a twist from the creators of WordPress.
|
| 16 |
* Author: The bbPress Community
|
| 17 |
* Author URI: http://bbpress.org
|
| 18 |
-
* Version: 2.0.
|
| 19 |
* Text Domain: bbpress
|
| 20 |
* Domain Path: /bbp-languages/
|
| 21 |
*/
|
|
@@ -48,12 +48,12 @@ class bbPress {
|
|
| 48 |
/**
|
| 49 |
* @public string bbPress version
|
| 50 |
*/
|
| 51 |
-
public $version = '2.0.
|
| 52 |
|
| 53 |
/**
|
| 54 |
* @public string bbPress DB version
|
| 55 |
*/
|
| 56 |
-
public $db_version = '
|
| 57 |
|
| 58 |
/** Post types ************************************************************/
|
| 59 |
|
| 15 |
* Description: bbPress is forum software with a twist from the creators of WordPress.
|
| 16 |
* Author: The bbPress Community
|
| 17 |
* Author URI: http://bbpress.org
|
| 18 |
+
* Version: 2.0.3
|
| 19 |
* Text Domain: bbpress
|
| 20 |
* Domain Path: /bbp-languages/
|
| 21 |
*/
|
| 48 |
/**
|
| 49 |
* @public string bbPress version
|
| 50 |
*/
|
| 51 |
+
public $version = '2.0.3';
|
| 52 |
|
| 53 |
/**
|
| 54 |
* @public string bbPress DB version
|
| 55 |
*/
|
| 56 |
+
public $db_version = '203';
|
| 57 |
|
| 58 |
/** Post types ************************************************************/
|
| 59 |
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: matt, johnjamesjacoby
|
| 3 |
Tags: bbpress, forums, discussion, support, theme, buddypress, akismet, multisite
|
| 4 |
Requires at least: 3.2.1
|
| 5 |
-
Tested up to: 3.
|
| 6 |
-
Stable tag: 2.0.
|
| 7 |
|
| 8 |
bbPress is forum software with a twist from the creators of WordPress
|
| 9 |
|
|
@@ -24,6 +24,11 @@ We're keeping things as small and light as possible while still allowing for gre
|
|
| 24 |
|
| 25 |
== Changelog ==
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
= 2.0.2 =
|
| 28 |
* Fix forum and topic freshness recount
|
| 29 |
* Fix non-admin post editing
|
| 2 |
Contributors: matt, johnjamesjacoby
|
| 3 |
Tags: bbpress, forums, discussion, support, theme, buddypress, akismet, multisite
|
| 4 |
Requires at least: 3.2.1
|
| 5 |
+
Tested up to: 3.4
|
| 6 |
+
Stable tag: 2.0.3
|
| 7 |
|
| 8 |
bbPress is forum software with a twist from the creators of WordPress
|
| 9 |
|
| 24 |
|
| 25 |
== Changelog ==
|
| 26 |
|
| 27 |
+
= 2.0.3 =
|
| 28 |
+
* Confirmed WordPress 3.4 compatibility
|
| 29 |
+
* Fix single forums not working when switching visibility
|
| 30 |
+
* Fix hierarchical forum capability check
|
| 31 |
+
|
| 32 |
= 2.0.2 =
|
| 33 |
* Fix forum and topic freshness recount
|
| 34 |
* Fix non-admin post editing
|
