bbPress - Version 2.3

Version Description

  • Added forum search functionality
  • Improved BuddyPress Group Forums integration
  • Improved allowed tags in topics and replies
  • Added template stack support to theme compatability
  • Added more forum migration options
Download this release

Release Info

Developer johnjamesjacoby
Plugin Icon 128x128 bbPress
Version 2.3
Comparing to
See all releases

Code changes from version 2.3-beta1 to 2.3

Files changed (63) hide show
  1. bbpress.php +27 -18
  2. includes/admin/admin.php +49 -45
  3. includes/admin/converter.php +6 -2
  4. includes/admin/converters/Example.php +1 -1
  5. includes/admin/converters/Invision.php +1 -1
  6. includes/admin/converters/Mingle.php +1 -1
  7. includes/admin/converters/SimplePress5.php +1 -1
  8. includes/admin/converters/Vanilla.php +1 -1
  9. includes/admin/converters/bbPress1.php +23 -21
  10. includes/admin/converters/vBulletin.php +1 -1
  11. includes/admin/forums.php +1 -1
  12. includes/admin/functions.php +20 -8
  13. includes/admin/metaboxes.php +0 -3
  14. includes/admin/replies.php +10 -52
  15. includes/admin/settings.php +1 -1
  16. includes/admin/tools.php +97 -88
  17. includes/admin/topics.php +11 -53
  18. includes/admin/users.php +3 -3
  19. includes/common/functions.php +54 -34
  20. includes/common/template-tags.php +17 -7
  21. includes/common/widgets.php +374 -206
  22. includes/core/actions.php +12 -7
  23. includes/core/capabilities.php +18 -0
  24. includes/core/filters.php +21 -33
  25. includes/core/functions.php +24 -1
  26. includes/core/sub-actions.php +12 -4
  27. includes/core/template-functions.php +22 -10
  28. includes/core/update.php +8 -1
  29. includes/extend/akismet.php +36 -4
  30. includes/extend/buddypress/activity.php +13 -56
  31. includes/extend/buddypress/group.php +332 -254
  32. includes/forums/capabilities.php +6 -2
  33. includes/forums/functions.php +90 -59
  34. includes/forums/template-tags.php +22 -29
  35. includes/replies/capabilities.php +4 -0
  36. includes/replies/functions.php +61 -30
  37. includes/replies/template-tags.php +41 -25
  38. includes/topics/capabilities.php +4 -0
  39. includes/topics/functions.php +179 -150
  40. includes/topics/template-tags.php +79 -54
  41. includes/users/capabilities.php +58 -22
  42. includes/users/functions.php +5 -6
  43. includes/users/template-tags.php +49 -46
  44. languages/bbpress.pot +718 -690
  45. readme.txt +9 -2
  46. templates/default/bbpress/content-single-forum.php +1 -1
  47. templates/default/bbpress/content-single-topic-lead.php +4 -4
  48. templates/default/bbpress/content-single-user.php +1 -1
  49. templates/default/bbpress/content-statistics.php +1 -1
  50. templates/default/bbpress/feedback-logged-in.php +1 -1
  51. templates/default/bbpress/feedback-no-access.php +1 -1
  52. templates/default/bbpress/feedback-no-forums.php +1 -1
  53. templates/default/bbpress/feedback-no-replies.php +1 -1
  54. templates/default/bbpress/feedback-no-search.php +1 -1
  55. templates/default/bbpress/feedback-no-topics.php +1 -1
  56. templates/default/bbpress/form-search.php +1 -1
  57. templates/default/bbpress/form-topic.php +1 -1
  58. templates/default/bbpress/form-user-roles.php +11 -0
  59. templates/default/bbpress/loop-search-reply.php +1 -1
  60. templates/default/bbpress/loop-search-topic.php +1 -1
  61. templates/default/bbpress/loop-single-reply.php +1 -1
  62. templates/default/extras/page-forum-statistics.php +1 -1
  63. templates/default/extras/single-user.php +1 -1
bbpress.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
- * $Id: bbpress.php 4732 2013-01-28 18:30:40Z johnjamesjacoby $
9
  *
10
  * @package bbPress
11
  * @subpackage Main
@@ -17,7 +17,7 @@
17
  * Description: bbPress is forum software with a twist from the creators of WordPress.
18
  * Author: The bbPress Community
19
  * Author URI: http://bbpress.org
20
- * Version: 2.3-beta1
21
  * Text Domain: bbpress
22
  * Domain Path: /languages/
23
  */
@@ -188,8 +188,8 @@ final class bbPress {
188
 
189
  /** Versions **********************************************************/
190
 
191
- $this->version = '2.3-beta1';
192
- $this->db_version = '224';
193
 
194
  /** Paths *************************************************************/
195
 
@@ -266,11 +266,6 @@ final class bbPress {
266
  $this->extend = new stdClass(); // Plugins add data here
267
  $this->errors = new WP_Error(); // Feedback
268
  $this->tab_index = apply_filters( 'bbp_default_tab_index', 100 );
269
-
270
- /** Cache *************************************************************/
271
-
272
- // Add bbPress to global cache groups
273
- wp_cache_add_global_groups( 'bbpress' );
274
  }
275
 
276
  /**
@@ -671,7 +666,7 @@ final class bbPress {
671
  bbp_get_closed_status_id(),
672
  apply_filters( 'bbp_register_closed_post_status', array(
673
  'label' => _x( 'Closed', 'post', 'bbpress' ),
674
- 'label_count' => _nx_noop( 'Closed <span class="count">(%s)</span>', 'Closed <span class="count">(%s)</span>', 'bbpress' ),
675
  'public' => true,
676
  'show_in_admin_all' => true
677
  ) )
@@ -682,7 +677,7 @@ final class bbPress {
682
  bbp_get_spam_status_id(),
683
  apply_filters( 'bbp_register_spam_post_status', array(
684
  'label' => _x( 'Spam', 'post', 'bbpress' ),
685
- 'label_count' => _nx_noop( 'Spam <span class="count">(%s)</span>', 'Spam <span class="count">(%s)</span>', 'bbpress' ),
686
  'protected' => true,
687
  'exclude_from_search' => true,
688
  'show_in_admin_status_list' => true,
@@ -695,7 +690,7 @@ final class bbPress {
695
  bbp_get_orphan_status_id(),
696
  apply_filters( 'bbp_register_orphan_post_status', array(
697
  'label' => _x( 'Orphan', 'post', 'bbpress' ),
698
- 'label_count' => _nx_noop( 'Orphan <span class="count">(%s)</span>', 'Orphans <span class="count">(%s)</span>', 'bbpress' ),
699
  'protected' => true,
700
  'exclude_from_search' => true,
701
  'show_in_admin_status_list' => true,
@@ -708,7 +703,7 @@ final class bbPress {
708
  bbp_get_hidden_status_id(),
709
  apply_filters( 'bbp_register_hidden_post_status', array(
710
  'label' => _x( 'Hidden', 'post', 'bbpress' ),
711
- 'label_count' => _nx_noop( 'Hidden <span class="count">(%s)</span>', 'Hidden <span class="count">(%s)</span>', 'bbpress' ),
712
  'private' => true,
713
  'exclude_from_search' => true,
714
  'show_in_admin_status_list' => true,
@@ -734,7 +729,7 @@ final class bbPress {
734
  $wp_post_statuses['trash']->protected = true;
735
 
736
  // User cannot view trash so set internal to true
737
- } elseif ( !current_user_can( 'view_trash' ) ) {
738
  $wp_post_statuses['trash']->internal = true;
739
  }
740
  }
@@ -783,6 +778,7 @@ final class bbPress {
783
  'query_var' => true,
784
  'show_tagcloud' => true,
785
  'hierarchical' => false,
 
786
  'public' => true,
787
  'show_ui' => bbp_allow_topic_tags() && current_user_can( 'bbp_topic_tags_admin' )
788
  )
@@ -797,15 +793,28 @@ final class bbPress {
797
  */
798
  public static function register_views() {
799
 
 
 
 
 
 
 
 
 
 
 
 
 
800
  // Topics with no replies
801
  bbp_register_view(
802
  'no-replies',
803
  __( 'Topics with no replies', 'bbpress' ),
804
  apply_filters( 'bbp_register_view_no_replies', array(
805
- 'meta_key' => '_bbp_reply_count',
806
- 'meta_value' => 1,
807
- 'meta_compare' => '<',
808
- 'orderby' => ''
 
809
  )
810
  ) );
811
  }
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
+ * $Id: bbpress.php 4849 2013-04-15 01:14:19Z johnjamesjacoby $
9
  *
10
  * @package bbPress
11
  * @subpackage Main
17
  * Description: bbPress is forum software with a twist from the creators of WordPress.
18
  * Author: The bbPress Community
19
  * Author URI: http://bbpress.org
20
+ * Version: 2.3
21
  * Text Domain: bbpress
22
  * Domain Path: /languages/
23
  */
188
 
189
  /** Versions **********************************************************/
190
 
191
+ $this->version = '2.3';
192
+ $this->db_version = '230';
193
 
194
  /** Paths *************************************************************/
195
 
266
  $this->extend = new stdClass(); // Plugins add data here
267
  $this->errors = new WP_Error(); // Feedback
268
  $this->tab_index = apply_filters( 'bbp_default_tab_index', 100 );
 
 
 
 
 
269
  }
270
 
271
  /**
666
  bbp_get_closed_status_id(),
667
  apply_filters( 'bbp_register_closed_post_status', array(
668
  'label' => _x( 'Closed', 'post', 'bbpress' ),
669
+ 'label_count' => _nx_noop( 'Closed <span class="count">(%s)</span>', 'Closed <span class="count">(%s)</span>', 'post', 'bbpress' ),
670
  'public' => true,
671
  'show_in_admin_all' => true
672
  ) )
677
  bbp_get_spam_status_id(),
678
  apply_filters( 'bbp_register_spam_post_status', array(
679
  'label' => _x( 'Spam', 'post', 'bbpress' ),
680
+ 'label_count' => _nx_noop( 'Spam <span class="count">(%s)</span>', 'Spam <span class="count">(%s)</span>', 'post', 'bbpress' ),
681
  'protected' => true,
682
  'exclude_from_search' => true,
683
  'show_in_admin_status_list' => true,
690
  bbp_get_orphan_status_id(),
691
  apply_filters( 'bbp_register_orphan_post_status', array(
692
  'label' => _x( 'Orphan', 'post', 'bbpress' ),
693
+ 'label_count' => _nx_noop( 'Orphan <span class="count">(%s)</span>', 'Orphans <span class="count">(%s)</span>', 'post', 'bbpress' ),
694
  'protected' => true,
695
  'exclude_from_search' => true,
696
  'show_in_admin_status_list' => true,
703
  bbp_get_hidden_status_id(),
704
  apply_filters( 'bbp_register_hidden_post_status', array(
705
  'label' => _x( 'Hidden', 'post', 'bbpress' ),
706
+ 'label_count' => _nx_noop( 'Hidden <span class="count">(%s)</span>', 'Hidden <span class="count">(%s)</span>', 'post', 'bbpress' ),
707
  'private' => true,
708
  'exclude_from_search' => true,
709
  'show_in_admin_status_list' => true,
729
  $wp_post_statuses['trash']->protected = true;
730
 
731
  // User cannot view trash so set internal to true
732
+ } else {
733
  $wp_post_statuses['trash']->internal = true;
734
  }
735
  }
778
  'query_var' => true,
779
  'show_tagcloud' => true,
780
  'hierarchical' => false,
781
+ 'show_in_nav_menus' => false,
782
  'public' => true,
783
  'show_ui' => bbp_allow_topic_tags() && current_user_can( 'bbp_topic_tags_admin' )
784
  )
793
  */
794
  public static function register_views() {
795
 
796
+ // Popular topics
797
+ bbp_register_view(
798
+ 'popular',
799
+ __( 'Most popular topics', 'bbpress' ),
800
+ apply_filters( 'bbp_register_view_popular', array(
801
+ 'meta_key' => '_bbp_reply_count',
802
+ 'max_num_pages' => 1,
803
+ 'orderby' => 'meta_value_num',
804
+ 'show_stickies' => false
805
+ )
806
+ ) );
807
+
808
  // Topics with no replies
809
  bbp_register_view(
810
  'no-replies',
811
  __( 'Topics with no replies', 'bbpress' ),
812
  apply_filters( 'bbp_register_view_no_replies', array(
813
+ 'meta_key' => '_bbp_reply_count',
814
+ 'meta_value' => 1,
815
+ 'meta_compare' => '<',
816
+ 'orderby' => '',
817
+ 'show_stickies' => false
818
  )
819
  ) );
820
  }
includes/admin/admin.php CHANGED
@@ -51,6 +51,13 @@ class BBP_Admin {
51
  */
52
  public $minimum_capability = 'keep_gate';
53
 
 
 
 
 
 
 
 
54
  /** Functions *************************************************************/
55
 
56
  /**
@@ -1317,60 +1324,54 @@ class BBP_Admin {
1317
  list( $display_version ) = explode( '-', bbp_get_version() ); ?>
1318
 
1319
  <div class="wrap about-wrap">
1320
- <h1><?php printf( __( 'Welcome to bbPress %s' ), $display_version ); ?></h1>
1321
- <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! bbPress %s is ready to make your community a safer, faster, and better looking place to hang out!' ), $display_version ); ?></div>
1322
- <div class="bbp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
1323
 
1324
  <h2 class="nav-tab-wrapper">
1325
  <a class="nav-tab nav-tab-active" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-about' ), 'index.php' ) ) ); ?>">
1326
- <?php _e( 'What&#8217;s New' ); ?>
1327
  </a><a class="nav-tab" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-credits' ), 'index.php' ) ) ); ?>">
1328
- <?php _e( 'Credits' ); ?>
1329
  </a>
1330
  </h2>
1331
 
1332
  <div class="changelog">
1333
- <h3><?php _e( 'In-depth User Profiles', 'bbpress' ); ?></h3>
1334
 
1335
  <div class="feature-section">
1336
- <h4><?php _e( 'User Details', 'bbpress' ); ?></h4>
1337
- <p><?php _e( 'Forum profiles include the details of your forum activity, including your topics and replies, subscriptions, and favorites.', 'bbpress' ); ?></p>
1338
 
1339
- <h4><?php _e( 'Easy Updating', 'bbpress' ); ?></h4>
1340
- <p><?php _e( 'You can easily update your profile without leaving bbPress.', 'bbpress' ); ?></p>
1341
  </div>
1342
  </div>
1343
 
1344
  <div class="changelog">
1345
- <h3><?php _e( 'Theme Compatibility', 'bbpress' ); ?></h3>
1346
 
1347
  <div class="feature-section">
1348
- <h4><?php _e( 'Twenty Twelve', 'bbpress' ); ?></h4>
1349
- <p><?php _e( 'Updated default templates are now Twenty Twelve compatible, and we refreshed our CSS to better integrate with other popular themes, too.', 'bbpress' ); ?></p>
1350
- </div>
1351
- </div>
1352
 
1353
- <div class="changelog">
1354
- <h3><?php _e( 'Improved User Management', 'bbpress' ); ?></h3>
1355
 
1356
- <div class="feature-section">
1357
- <h4><?php _e( 'Dynamic User Roles and Capabilities', 'bbpress' ); ?></h4>
1358
- <p><?php _e( 'bbPress now includes some fancy user-roles with smart default capabilities to help you manage your forums. New roles include Key Master (for complete administrative access), Moderator, and Participant for regular forum users.', 'bbpress' ); ?></p>
1359
 
1360
- <h4><?php _e( 'Manage Forum Users from WordPress', 'bbpress' ); ?></h4>
1361
- <p><?php _e( 'You can assign Forums roles to users individually, or bulk update them from the WordPress Users page. Users automatically start out as forum participants.', 'bbpress' ); ?></p>
1362
  </div>
1363
  </div>
1364
 
1365
  <div class="changelog">
1366
- <h3><?php _e( 'Better BuddyPress Integration', 'bbpress' ); ?></h3>
1367
 
1368
  <div class="feature-section">
1369
- <h4><?php _e( 'Use bbPress for Your BuddyPress Group Forums', 'bbpress' ); ?></h4>
1370
- <p><?php _e( 'You can now use bbPress to manage your BuddyPress Group Forums, allowing for seamless integration and improved plugin performance. Plugins developed for bbPress can now be extended to improve the BuddyPress Group Forums experience.', 'bbpress' ); ?></p>
1371
-
1372
- <h4><?php _e( 'Activity Stream Syncing', 'bbpress' ); ?></h4>
1373
- <p><?php _e( 'bbPress now keeps track of changes to topics and replies and keeps their corresponding BuddyPress Activity Stream updates synced.', 'bbpress' ); ?></p>
1374
  </div>
1375
  </div>
1376
 
@@ -1379,30 +1380,33 @@ class BBP_Admin {
1379
 
1380
  <div class="feature-section col three-col">
1381
  <div>
1382
- <h4><?php _e( 'Template Logic', 'bbpress' ); ?></h4>
1383
- <p><?php _e( 'New functions and template stacks are in place to help plugin developers extend bbPress further.', 'bbpress' ); ?></p>
1384
 
1385
- <h4><?php _e( 'Plugin Directory Structure', 'bbpress' ); ?></h4>
1386
- <p><?php _e( 'We simplified the bbPress plugin directory structure, making it easier for plugin developers to find the relevant code.', 'bbpress' ); ?></p>
1387
  </div>
1388
 
1389
  <div>
1390
- <h4><?php _e( 'Autocomplete', 'bbpress' ); ?></h4>
1391
- <p><?php _e( 'In WordPress Admin, you now select a parent forum or topic via autocomplete rather than a dropdown.', 'bbpress' ); ?></p>
1392
 
1393
- <h4><?php _e( 'Fancy Editor Support', 'bbpress' ); ?></h4>
1394
- <p><?php _e( 'We improved our support of the Fancy Editor, giving forum users a better experience.', 'bbpress' ); ?></p>
1395
  </div>
1396
 
1397
  <div class="last-feature">
1398
- <h4><?php _e( 'WordPress 3.5-ready', 'bbpress' ); ?></h4>
1399
- <p><?php _e( 'bbPress 2.2 has been thoroughly tested against the ongoing development of WordPress 3.5.', 'bbpress' ); ?></p>
 
 
 
1400
  </div>
1401
  </div>
1402
  </div>
1403
 
1404
  <div class="return-to-dashboard">
1405
- <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php _e( 'Go to Forum Settings' ); ?></a>
1406
  </div>
1407
 
1408
  </div>
@@ -1423,15 +1427,15 @@ class BBP_Admin {
1423
  list( $display_version ) = explode( '-', bbp_get_version() ); ?>
1424
 
1425
  <div class="wrap about-wrap">
1426
- <h1><?php printf( __( 'Welcome to bbPress %s' ), $display_version ); ?></h1>
1427
- <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! bbPress %s is ready to make your community a safer, faster, and better looking place to hang out!' ), $display_version ); ?></div>
1428
  <div class="bbp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
1429
 
1430
  <h2 class="nav-tab-wrapper">
1431
  <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-about' ), 'index.php' ) ) ); ?>" class="nav-tab">
1432
- <?php _e( 'What&#8217;s New' ); ?>
1433
  </a><a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-credits' ), 'index.php' ) ) ); ?>" class="nav-tab nav-tab-active">
1434
- <?php _e( 'Credits' ); ?>
1435
  </a>
1436
  </h2>
1437
 
@@ -1489,7 +1493,7 @@ class BBP_Admin {
1489
  </li>
1490
  </ul>
1491
 
1492
- <h4 class="wp-people-group"><?php _e( 'Core Contributors to bbPress 2.2', 'bbpress' ); ?></h4>
1493
  <p class="wp-credits-list">
1494
  <a href="http://profiles.wordpress.org/alexvorn2">alexvorn2</a>,
1495
  <a href="http://profiles.wordpress.org/anointed">anointed</a>,
@@ -1530,7 +1534,7 @@ class BBP_Admin {
1530
  </p>
1531
 
1532
  <div class="return-to-dashboard">
1533
- <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php _e( 'Go to Forum Settings' ); ?></a>
1534
  </div>
1535
 
1536
  </div>
51
  */
52
  public $minimum_capability = 'keep_gate';
53
 
54
+ /** Separator *************************************************************/
55
+
56
+ /**
57
+ * @var bool Whether or not to add an extra top level menu separator
58
+ */
59
+ public $show_separator = false;
60
+
61
  /** Functions *************************************************************/
62
 
63
  /**
1324
  list( $display_version ) = explode( '-', bbp_get_version() ); ?>
1325
 
1326
  <div class="wrap about-wrap">
1327
+ <h1><?php printf( __( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1>
1328
+ <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! bbPress %s goes great with pizza and popcorn, and will nicely complement your community too!', 'bbpress' ), $display_version ); ?></div>
1329
+ <div class="bbp-badge"><?php printf( __( 'Version %s', 'bbpress' ), $display_version ); ?></div>
1330
 
1331
  <h2 class="nav-tab-wrapper">
1332
  <a class="nav-tab nav-tab-active" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-about' ), 'index.php' ) ) ); ?>">
1333
+ <?php _e( 'What&#8217;s New', 'bbpress' ); ?>
1334
  </a><a class="nav-tab" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-credits' ), 'index.php' ) ) ); ?>">
1335
+ <?php _e( 'Credits', 'bbpress' ); ?>
1336
  </a>
1337
  </h2>
1338
 
1339
  <div class="changelog">
1340
+ <h3><?php _e( 'Forum Search', 'bbpress' ); ?></h3>
1341
 
1342
  <div class="feature-section">
1343
+ <h4><?php _e( 'Only Forum Content', 'bbpress' ); ?></h4>
1344
+ <p><?php _e( 'Allow your forums to be searched without mixing in your posts or pages.', 'bbpress' ); ?></p>
1345
 
1346
+ <h4><?php _e( 'Choose Your Own Slug', 'bbpress' ); ?></h4>
1347
+ <p><?php _e( 'Setup your forum search to live anywhere relative to the forum index.', 'bbpress' ); ?></p>
1348
  </div>
1349
  </div>
1350
 
1351
  <div class="changelog">
1352
+ <h3><?php _e( 'New & Improved Forum Importers', 'bbpress' ); ?></h3>
1353
 
1354
  <div class="feature-section">
1355
+ <h4><?php _e( 'BBCodes & Smilies', 'bbpress' ); ?></h4>
1356
+ <p><?php _e( 'Happy faces all-around now that the importers properly convert BBCodes & smilies. :)', 'bbpress' ); ?></p>
 
 
1357
 
1358
+ <h4><?php _e( 'Vanilla', 'bbpress' ); ?></h4>
1359
+ <p><?php _e( 'Tired of plain old Vanilla? Now you can easily switch to <del>Mint Chocolate Chip</del> bbPress!', 'bbpress' ); ?></p>
1360
 
1361
+ <h4><?php _e( 'SimplePress', 'bbpress' ); ?></h4>
1362
+ <p><?php _e( 'Converting an existing SimplePress powered forum to bbPress has never been "simpler!"', 'bbpress' ); ?></p>
 
1363
 
1364
+ <h4><?php _e( 'Mingle', 'bbpress' ); ?></h4>
1365
+ <p><?php _e( 'No time to... chit-chat; convert your Mingle forums to bbPress today!', 'bbpress' ); ?></p>
1366
  </div>
1367
  </div>
1368
 
1369
  <div class="changelog">
1370
+ <h3><?php _e( 'Even Better BuddyPress Integration', 'bbpress' ); ?></h3>
1371
 
1372
  <div class="feature-section">
1373
+ <h4><?php _e( 'bbPress powered BuddyPress Group Forums', 'bbpress' ); ?></h4>
1374
+ <p><?php _e( 'Use bbPress to manage your BuddyPress Group Forums, allowing for seamless integration and improved plugin performance.', 'bbpress' ); ?></p>
 
 
 
1375
  </div>
1376
  </div>
1377
 
1380
 
1381
  <div class="feature-section col three-col">
1382
  <div>
1383
+ <h4><?php _e( 'Smarter Fancy Editor', 'bbpress' ); ?></h4>
1384
+ <p><?php _e( 'We simplified the Fancy Editor, and the allowed HTML tags that work with it.', 'bbpress' ); ?></p>
1385
 
1386
+ <h4><?php _e( 'Better Code Posting', 'bbpress' ); ?></h4>
1387
+ <p><?php _e( 'Your users can now post code snippets without too much hassle.', 'bbpress' ); ?></p>
1388
  </div>
1389
 
1390
  <div>
1391
+ <h4><?php _e( 'Template Stacking', 'bbpress' ); ?></h4>
1392
+ <p><?php _e( 'Now you can replace specific template parts on the fly without modifying the existing theme.', 'bbpress' ); ?></p>
1393
 
1394
+ <h4><?php _e( 'TwentyThirteen Tested', 'bbpress' ); ?></h4>
1395
+ <p><?php _e( 'bbPress 2.3 already works with the in-development TwentyThirteen theme, coming in a future version of WordPress.', 'bbpress' ); ?></p>
1396
  </div>
1397
 
1398
  <div class="last-feature">
1399
+ <h4><?php _e( 'Statistics Shortcode', 'bbpress' ); ?></h4>
1400
+ <p><?php _e( 'The old statistics easter-egg page was turned into an easy to use shortcode.', 'bbpress' ); ?></p>
1401
+
1402
+ <h4><?php _e( 'Green Theme Updated', 'bbpress' ); ?></h4>
1403
+ <p><?php _e( 'The green admin theme easter-egg was updated to work with WordPress 3.5 changes.', 'bbpress' ); ?></p>
1404
  </div>
1405
  </div>
1406
  </div>
1407
 
1408
  <div class="return-to-dashboard">
1409
+ <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php _e( 'Go to Forum Settings', 'bbpress' ); ?></a>
1410
  </div>
1411
 
1412
  </div>
1427
  list( $display_version ) = explode( '-', bbp_get_version() ); ?>
1428
 
1429
  <div class="wrap about-wrap">
1430
+ <h1><?php printf( __( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1>
1431
+ <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! bbPress %s goes great with pizza and popcorn, and will nicely complement your community too!', 'bbpress' ), $display_version ); ?></div>
1432
  <div class="bbp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
1433
 
1434
  <h2 class="nav-tab-wrapper">
1435
  <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-about' ), 'index.php' ) ) ); ?>" class="nav-tab">
1436
+ <?php _e( 'What&#8217;s New', 'bbpress' ); ?>
1437
  </a><a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbp-credits' ), 'index.php' ) ) ); ?>" class="nav-tab nav-tab-active">
1438
+ <?php _e( 'Credits', 'bbpress' ); ?>
1439
  </a>
1440
  </h2>
1441
 
1493
  </li>
1494
  </ul>
1495
 
1496
+ <h4 class="wp-people-group"><?php _e( 'Core Contributors to bbPress 2.3', 'bbpress' ); ?></h4>
1497
  <p class="wp-credits-list">
1498
  <a href="http://profiles.wordpress.org/alexvorn2">alexvorn2</a>,
1499
  <a href="http://profiles.wordpress.org/anointed">anointed</a>,
1534
  </p>
1535
 
1536
  <div class="return-to-dashboard">
1537
+ <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ) ); ?>"><?php _e( 'Go to Forum Settings', 'bbpress' ); ?></a>
1538
  </div>
1539
 
1540
  </div>
includes/admin/converter.php CHANGED
@@ -26,6 +26,10 @@ class BBP_Converter {
26
  */
27
  public function __construct() {
28
 
 
 
 
 
29
  // Bail if request is not correct
30
  switch ( strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
31
 
@@ -379,7 +383,7 @@ class BBP_Converter {
379
  }
380
  } else {
381
  update_option( '_bbp_converter_start', $max + 1 );
382
- $this->converter_output( sprintf( __( 'Delete users wordpress default passwords (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
383
  }
384
  } else {
385
  update_option( '_bbp_converter_step', $step + 1 );
@@ -525,7 +529,7 @@ abstract class BBP_Converter_Base {
525
  protected $field_map = array();
526
 
527
  /**
528
- * @var object This is the connection to the wordpress datbase.
529
  */
530
  protected $wpdb;
531
 
26
  */
27
  public function __construct() {
28
 
29
+ // "I wonder where I'll float next."
30
+ if ( empty( $_SERVER['REQUEST_METHOD'] ) )
31
+ return;
32
+
33
  // Bail if request is not correct
34
  switch ( strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
35
 
383
  }
384
  } else {
385
  update_option( '_bbp_converter_start', $max + 1 );
386
+ $this->converter_output( sprintf( __( 'Delete users WordPress default passwords (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
387
  }
388
  } else {
389
  update_option( '_bbp_converter_step', $step + 1 );
529
  protected $field_map = array();
530
 
531
  /**
532
+ * @var object This is the connection to the WordPress datbase.
533
  */
534
  protected $wpdb;
535
 
includes/admin/converters/Example.php CHANGED
@@ -312,7 +312,7 @@ class Example_Converter extends BBP_Converter_Base
312
  /**
313
  * This method is to save the salt and password together. That
314
  * way when we authenticate it we can get it out of the database
315
- * as one value. Array values are auto sanitized by wordpress.
316
  */
317
  public function callback_savepass( $field, $row )
318
  {
312
  /**
313
  * This method is to save the salt and password together. That
314
  * way when we authenticate it we can get it out of the database
315
+ * as one value. Array values are auto sanitized by WordPress.
316
  */
317
  public function callback_savepass( $field, $row )
318
  {
includes/admin/converters/Invision.php CHANGED
@@ -506,7 +506,7 @@ class Invision extends BBP_Converter_Base {
506
  /**
507
  * This method is to save the salt and password together. That
508
  * way when we authenticate it we can get it out of the database
509
- * as one value. Array values are auto sanitized by wordpress.
510
  */
511
  public function callback_savepass( $field, $row ) {
512
  return array( 'hash' => $field, 'salt' => $row['members_pass_salt'] );
506
  /**
507
  * This method is to save the salt and password together. That
508
  * way when we authenticate it we can get it out of the database
509
+ * as one value. Array values are auto sanitized by WordPress.
510
  */
511
  public function callback_savepass( $field, $row ) {
512
  return array( 'hash' => $field, 'salt' => $row['members_pass_salt'] );
includes/admin/converters/Mingle.php CHANGED
@@ -406,7 +406,7 @@ class Mingle extends BBP_Converter_Base {
406
  /**
407
  * This method is to save the salt and password together. That
408
  * way when we authenticate it we can get it out of the database
409
- * as one value. Array values are auto sanitized by wordpress.
410
  */
411
  public function callback_savepass( $field, $row ) {
412
  return false;
406
  /**
407
  * This method is to save the salt and password together. That
408
  * way when we authenticate it we can get it out of the database
409
+ * as one value. Array values are auto sanitized by WordPress.
410
  */
411
  public function callback_savepass( $field, $row ) {
412
  return false;
includes/admin/converters/SimplePress5.php CHANGED
@@ -440,7 +440,7 @@ class SimplePress5 extends BBP_Converter_Base {
440
  /**
441
  * This method is to save the salt and password together. That
442
  * way when we authenticate it we can get it out of the database
443
- * as one value. Array values are auto sanitized by wordpress.
444
  */
445
  public function callback_savepass( $field, $row ) {
446
  return false;
440
  /**
441
  * This method is to save the salt and password together. That
442
  * way when we authenticate it we can get it out of the database
443
+ * as one value. Array values are auto sanitized by WordPress.
444
  */
445
  public function callback_savepass( $field, $row ) {
446
  return false;
includes/admin/converters/Vanilla.php CHANGED
@@ -518,7 +518,7 @@ class Vanilla extends BBP_Converter_Base {
518
  /**
519
  * This method is to save the salt and password together. That
520
  * way when we authenticate it we can get it out of the database
521
- * as one value. Array values are auto sanitized by wordpress.
522
  */
523
  public function callback_savepass( $field, $row ) {
524
  return false;
518
  /**
519
  * This method is to save the salt and password together. That
520
  * way when we authenticate it we can get it out of the database
521
+ * as one value. Array values are auto sanitized by WordPress.
522
  */
523
  public function callback_savepass( $field, $row ) {
524
  return false;
includes/admin/converters/bbPress1.php CHANGED
@@ -3,7 +3,8 @@
3
  /**
4
  * bbPress 1.1 Converter
5
  *
6
- * @since bbPress (rxxxx)
 
7
  */
8
  class bbPress1 extends BBP_Converter_Base {
9
 
@@ -32,7 +33,7 @@ class bbPress1 extends BBP_Converter_Base {
32
  'to_fieldname' => '_bbp_forum_id'
33
  );
34
 
35
- // Forum parent id (If no parent, 0. Stored in postmeta)
36
  $this->field_map[] = array(
37
  'from_tablename' => 'forums',
38
  'from_fieldname' => 'forum_parent',
@@ -56,7 +57,7 @@ class bbPress1 extends BBP_Converter_Base {
56
  'to_fieldname' => '_bbp_reply_count'
57
  );
58
 
59
- // Forum topic count (Stored in postmeta)
60
  $this->field_map[] = array(
61
  'from_tablename' => 'forums',
62
  'from_fieldname' => 'topics',
@@ -64,7 +65,7 @@ class bbPress1 extends BBP_Converter_Base {
64
  'to_fieldname' => '_bbp_total_topic_count'
65
  );
66
 
67
- // Forum reply count (Stored in postmeta)
68
  $this->field_map[] = array(
69
  'from_tablename' => 'forums',
70
  'from_fieldname' => 'posts',
@@ -138,7 +139,7 @@ class bbPress1 extends BBP_Converter_Base {
138
  'to_fieldname' => '_bbp_topic_id'
139
  );
140
 
141
- // Reply count (Stored in postmeta)
142
  $this->field_map[] = array(
143
  'from_tablename' => 'topics',
144
  'from_fieldname' => 'topic_posts',
@@ -147,7 +148,7 @@ class bbPress1 extends BBP_Converter_Base {
147
  'callback_method' => 'callback_topic_reply_count'
148
  );
149
 
150
- // Forum id (Stored in postmeta)
151
  $this->field_map[] = array(
152
  'from_tablename' => 'topics',
153
  'from_fieldname' => 'forum_id',
@@ -195,7 +196,7 @@ class bbPress1 extends BBP_Converter_Base {
195
  'callback_method' => 'callback_html'
196
  );
197
 
198
- // Post status (Spam, Trash or Publish)
199
  $this->field_map[] = array(
200
  'from_tablename' => 'posts',
201
  'from_fieldname' => 'post_status',
@@ -207,7 +208,7 @@ class bbPress1 extends BBP_Converter_Base {
207
  'callback_method' => 'callback_status'
208
  );
209
 
210
- // Author ip.
211
  $this->field_map[] = array(
212
  'from_tablename' => 'posts',
213
  'from_fieldname' => 'poster_ip',
@@ -218,7 +219,7 @@ class bbPress1 extends BBP_Converter_Base {
218
  'to_fieldname' => '_bbp_author_ip'
219
  );
220
 
221
- // Forum id (If no parent, 0)
222
  $this->field_map[] = array(
223
  'from_tablename' => 'topics',
224
  'from_fieldname' => 'forum_id',
@@ -294,7 +295,7 @@ class bbPress1 extends BBP_Converter_Base {
294
 
295
  /** Reply Section *****************************************************/
296
 
297
- // Post id. Stores in postmeta.
298
  $this->field_map[] = array(
299
  'from_tablename' => 'posts',
300
  'from_fieldname' => 'post_id',
@@ -302,7 +303,7 @@ class bbPress1 extends BBP_Converter_Base {
302
  'to_fieldname' => '_bbp_post_id'
303
  );
304
 
305
- // Topic id (Stores in postmeta)
306
  $this->field_map[] = array(
307
  'from_tablename' => 'posts',
308
  'from_fieldname' => 'topic_id',
@@ -311,7 +312,7 @@ class bbPress1 extends BBP_Converter_Base {
311
  'callback_method' => 'callback_topicid'
312
  );
313
 
314
- // Forum id (Stored in postmeta)
315
  $this->field_map[] = array(
316
  'from_tablename' => 'posts',
317
  'from_fieldname' => 'forum_id',
@@ -320,7 +321,8 @@ class bbPress1 extends BBP_Converter_Base {
320
  'callback_method' => 'callback_forumid'
321
  );
322
 
323
- // Topic title (for reply title).
 
324
  $this->field_map[] = array(
325
  'from_tablename' => 'topics',
326
  'from_fieldname' => 'topic_title',
@@ -332,7 +334,7 @@ class bbPress1 extends BBP_Converter_Base {
332
  'callback_method' => 'callback_reply_title'
333
  );
334
 
335
- // Author ip.
336
  $this->field_map[] = array(
337
  'from_tablename' => 'posts',
338
  'from_fieldname' => 'poster_ip',
@@ -349,7 +351,7 @@ class bbPress1 extends BBP_Converter_Base {
349
  'callback_method' => 'callback_userid'
350
  );
351
 
352
- // Reply status
353
  $this->field_map[] = array(
354
  'from_tablename' => 'posts',
355
  'from_fieldname' => 'post_status',
@@ -375,7 +377,7 @@ class bbPress1 extends BBP_Converter_Base {
375
  'to_fieldname' => 'menu_order'
376
  );
377
 
378
- // Topic id. If no parent, than 0.
379
  $this->field_map[] = array(
380
  'from_tablename' => 'posts',
381
  'from_fieldname' => 'topic_id',
@@ -412,7 +414,7 @@ class bbPress1 extends BBP_Converter_Base {
412
 
413
  /** User Section ******************************************************/
414
 
415
- // Store old User id. Stores in usermeta.
416
  $this->field_map[] = array(
417
  'from_tablename' => 'users',
418
  'from_fieldname' => 'ID',
@@ -420,7 +422,7 @@ class bbPress1 extends BBP_Converter_Base {
420
  'to_fieldname' => '_bbp_user_id'
421
  );
422
 
423
- // Store old User password. Stores in usermeta.
424
  $this->field_map[] = array(
425
  'from_tablename' => 'users',
426
  'from_fieldname' => 'user_pass',
@@ -521,7 +523,7 @@ class bbPress1 extends BBP_Converter_Base {
521
  /**
522
  * Verify the topic reply count.
523
  *
524
- * @param int $count bbPress 1.x reply count
525
  * @return string WordPress safe
526
  */
527
  public function callback_topic_reply_count( $count = 1 ) {
@@ -543,7 +545,7 @@ class bbPress1 extends BBP_Converter_Base {
543
  /**
544
  * This method is to save the salt and password together. That
545
  * way when we authenticate it we can get it out of the database
546
- * as one value. Array values are auto sanitized by wordpress.
547
  */
548
  public function callback_savepass( $field, $row ) {
549
  return false;
@@ -566,7 +568,7 @@ class bbPress1 extends BBP_Converter_Base {
566
  */
567
  protected function callback_html( $field ) {
568
  require_once( bbpress()->admin->admin_dir . 'parser.php' );
569
- $bbcode = BBCode::getInstance();
570
  $bbcode->enable_smileys = false;
571
  $bbcode->smiley_regex = false;
572
  return html_entity_decode( $bbcode->Parse( $field ) );
3
  /**
4
  * bbPress 1.1 Converter
5
  *
6
+ * @since bbPress (r3816)
7
+ * @link Codex Docs http://codex.bbpress.org/import-forums/bbpress-1-x-buddypress-group-forums
8
  */
9
  class bbPress1 extends BBP_Converter_Base {
10
 
33
  'to_fieldname' => '_bbp_forum_id'
34
  );
35
 
36
+ // Forum parent id (If no parent, then 0. Stored in postmeta)
37
  $this->field_map[] = array(
38
  'from_tablename' => 'forums',
39
  'from_fieldname' => 'forum_parent',
57
  'to_fieldname' => '_bbp_reply_count'
58
  );
59
 
60
+ // Forum total topic count (Stored in postmeta)
61
  $this->field_map[] = array(
62
  'from_tablename' => 'forums',
63
  'from_fieldname' => 'topics',
65
  'to_fieldname' => '_bbp_total_topic_count'
66
  );
67
 
68
+ // Forum total reply count (Stored in postmeta)
69
  $this->field_map[] = array(
70
  'from_tablename' => 'forums',
71
  'from_fieldname' => 'posts',
139
  'to_fieldname' => '_bbp_topic_id'
140
  );
141
 
142
+ // Topic reply count (Stored in postmeta)
143
  $this->field_map[] = array(
144
  'from_tablename' => 'topics',
145
  'from_fieldname' => 'topic_posts',
148
  'callback_method' => 'callback_topic_reply_count'
149
  );
150
 
151
+ // Topic parent forum id (If no parent, then 0. Stored in postmeta)
152
  $this->field_map[] = array(
153
  'from_tablename' => 'topics',
154
  'from_fieldname' => 'forum_id',
196
  'callback_method' => 'callback_html'
197
  );
198
 
199
+ // Topic status (Spam, Trash or Publish)
200
  $this->field_map[] = array(
201
  'from_tablename' => 'posts',
202
  'from_fieldname' => 'post_status',
208
  'callback_method' => 'callback_status'
209
  );
210
 
211
+ // Topic author ip (Stored in postmeta)
212
  $this->field_map[] = array(
213
  'from_tablename' => 'posts',
214
  'from_fieldname' => 'poster_ip',
219
  'to_fieldname' => '_bbp_author_ip'
220
  );
221
 
222
+ // Topic parent forum id (If no parent, then 0)
223
  $this->field_map[] = array(
224
  'from_tablename' => 'topics',
225
  'from_fieldname' => 'forum_id',
295
 
296
  /** Reply Section *****************************************************/
297
 
298
+ // Reply id (Stored in postmeta)
299
  $this->field_map[] = array(
300
  'from_tablename' => 'posts',
301
  'from_fieldname' => 'post_id',
303
  'to_fieldname' => '_bbp_post_id'
304
  );
305
 
306
+ // Reply parent topic id (If no parent, then 0. Stored in postmeta)
307
  $this->field_map[] = array(
308
  'from_tablename' => 'posts',
309
  'from_fieldname' => 'topic_id',
312
  'callback_method' => 'callback_topicid'
313
  );
314
 
315
+ // Reply parent forum id (If no parent, then 0. Stored in postmeta)
316
  $this->field_map[] = array(
317
  'from_tablename' => 'posts',
318
  'from_fieldname' => 'forum_id',
321
  'callback_method' => 'callback_forumid'
322
  );
323
 
324
+ // Reply title.
325
+ // Note: We join the topics table because post table does not include topic title.
326
  $this->field_map[] = array(
327
  'from_tablename' => 'topics',
328
  'from_fieldname' => 'topic_title',
334
  'callback_method' => 'callback_reply_title'
335
  );
336
 
337
+ // Reply author ip (Stored in postmeta)
338
  $this->field_map[] = array(
339
  'from_tablename' => 'posts',
340
  'from_fieldname' => 'poster_ip',
351
  'callback_method' => 'callback_userid'
352
  );
353
 
354
+ // Reply status (Spam, Trash or Publish)
355
  $this->field_map[] = array(
356
  'from_tablename' => 'posts',
357
  'from_fieldname' => 'post_status',
377
  'to_fieldname' => 'menu_order'
378
  );
379
 
380
+ // Reply parent topic id (If no parent, then 0)
381
  $this->field_map[] = array(
382
  'from_tablename' => 'posts',
383
  'from_fieldname' => 'topic_id',
414
 
415
  /** User Section ******************************************************/
416
 
417
+ // Store old User id (Stored in usermeta)
418
  $this->field_map[] = array(
419
  'from_tablename' => 'users',
420
  'from_fieldname' => 'ID',
422
  'to_fieldname' => '_bbp_user_id'
423
  );
424
 
425
+ // Store old User password (Stored in usermeta)
426
  $this->field_map[] = array(
427
  'from_tablename' => 'users',
428
  'from_fieldname' => 'user_pass',
523
  /**
524
  * Verify the topic reply count.
525
  *
526
+ * @param int $count bbPress 1.x topic and reply counts
527
  * @return string WordPress safe
528
  */
529
  public function callback_topic_reply_count( $count = 1 ) {
545
  /**
546
  * This method is to save the salt and password together. That
547
  * way when we authenticate it we can get it out of the database
548
+ * as one value. Array values are auto sanitized by WordPress.
549
  */
550
  public function callback_savepass( $field, $row ) {
551
  return false;
568
  */
569
  protected function callback_html( $field ) {
570
  require_once( bbpress()->admin->admin_dir . 'parser.php' );
571
+ $bbcode = BBCode::getInstance();
572
  $bbcode->enable_smileys = false;
573
  $bbcode->smiley_regex = false;
574
  return html_entity_decode( $bbcode->Parse( $field ) );
includes/admin/converters/vBulletin.php CHANGED
@@ -494,7 +494,7 @@ class vBulletin extends BBP_Converter_Base {
494
  /**
495
  * This method is to save the salt and password together. That
496
  * way when we authenticate it we can get it out of the database
497
- * as one value. Array values are auto sanitized by wordpress.
498
  */
499
  public function callback_savepass( $field, $row ) {
500
  $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
494
  /**
495
  * This method is to save the salt and password together. That
496
  * way when we authenticate it we can get it out of the database
497
+ * as one value. Array values are auto sanitized by WordPress.
498
  */
499
  public function callback_savepass( $field, $row ) {
500
  $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
includes/admin/forums.php CHANGED
@@ -292,7 +292,7 @@ class BBP_Forums_Admin {
292
  return $forum_id;
293
 
294
  // Bail if not a post request
295
- if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
296
  return $forum_id;
297
 
298
  // Nonce check
292
  return $forum_id;
293
 
294
  // Bail if not a post request
295
+ if ( ! bbp_is_post_request() )
296
  return $forum_id;
297
 
298
  // Nonce check
includes/admin/functions.php CHANGED
@@ -19,13 +19,25 @@ if ( !defined( 'ABSPATH' ) ) exit;
19
  */
20
  function bbp_admin_separator() {
21
 
22
- // Prevent duplicate separators when no new menu items exist
23
- if ( !current_user_can( 'edit_forums' ) && !current_user_can( 'edit_topics' ) && !current_user_can( 'edit_replies' ) )
24
- return;
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- // Prevent duplicate separators when no core menu items exist
27
- if ( !current_user_can( 'manage_options' ) )
28
  return;
 
29
 
30
  global $menu;
31
 
@@ -38,10 +50,10 @@ function bbp_admin_separator() {
38
  * @since bbPress (r2957)
39
  *
40
  * @param bool $menu_order Menu order
41
- * @return bool Always true
42
  */
43
  function bbp_admin_custom_menu_order( $menu_order = false ) {
44
- if ( !current_user_can( 'edit_forums' ) && !current_user_can( 'edit_topics' ) && !current_user_can( 'edit_replies' ) )
45
  return $menu_order;
46
 
47
  return true;
@@ -59,7 +71,7 @@ function bbp_admin_custom_menu_order( $menu_order = false ) {
59
  function bbp_admin_menu_order( $menu_order ) {
60
 
61
  // Bail if user cannot see any top level bbPress menus
62
- if ( empty( $menu_order ) || ( !current_user_can( 'edit_forums' ) && !current_user_can( 'edit_topics' ) && !current_user_can( 'edit_replies' ) ) )
63
  return $menu_order;
64
 
65
  // Initialize our custom order array
19
  */
20
  function bbp_admin_separator() {
21
 
22
+ // Caps necessary where a separator is necessary
23
+ $caps = array(
24
+ 'bbp_forums_admin',
25
+ 'bbp_topics_admin',
26
+ 'bbp_replies_admin',
27
+ );
28
+
29
+ // Loop through caps, and look for a reason to show the separator
30
+ foreach ( $caps as $cap ) {
31
+ if ( current_user_can( $cap ) ) {
32
+ bbpress()->admin->show_separator = true;
33
+ break;
34
+ }
35
+ }
36
 
37
+ // Bail if no separator
38
+ if ( false === bbpress()->admin->show_separator ) {
39
  return;
40
+ }
41
 
42
  global $menu;
43
 
50
  * @since bbPress (r2957)
51
  *
52
  * @param bool $menu_order Menu order
53
+ * @return mixed True if separator, false if not
54
  */
55
  function bbp_admin_custom_menu_order( $menu_order = false ) {
56
+ if ( false === bbpress()->admin->show_separator )
57
  return $menu_order;
58
 
59
  return true;
71
  function bbp_admin_menu_order( $menu_order ) {
72
 
73
  // Bail if user cannot see any top level bbPress menus
74
+ if ( empty( $menu_order ) || ( false === bbpress()->admin->show_separator ) )
75
  return $menu_order;
76
 
77
  // Initialize our custom order array
includes/admin/metaboxes.php CHANGED
@@ -301,7 +301,6 @@ function bbp_forum_metabox() {
301
  <?php bbp_dropdown( array(
302
  'post_type' => bbp_get_forum_post_type(),
303
  'selected' => $post_parent,
304
- 'post_parent' => 0,
305
  'numberposts' => -1,
306
  'orderby' => 'title',
307
  'order' => 'ASC',
@@ -359,7 +358,6 @@ function bbp_topic_metabox() {
359
  <?php bbp_dropdown( array(
360
  'post_type' => bbp_get_forum_post_type(),
361
  'selected' => bbp_get_topic_forum_id( $post_id ),
362
- 'post_parent' => 0,
363
  'numberposts' => -1,
364
  'orderby' => 'title',
365
  'order' => 'ASC',
@@ -412,7 +410,6 @@ function bbp_reply_metabox() {
412
  <?php bbp_dropdown( array(
413
  'post_type' => bbp_get_forum_post_type(),
414
  'selected' => $reply_forum_id,
415
- 'post_parent' => 0,
416
  'numberposts' => -1,
417
  'orderby' => 'title',
418
  'order' => 'ASC',
301
  <?php bbp_dropdown( array(
302
  'post_type' => bbp_get_forum_post_type(),
303
  'selected' => $post_parent,
 
304
  'numberposts' => -1,
305
  'orderby' => 'title',
306
  'order' => 'ASC',
358
  <?php bbp_dropdown( array(
359
  'post_type' => bbp_get_forum_post_type(),
360
  'selected' => bbp_get_topic_forum_id( $post_id ),
 
361
  'numberposts' => -1,
362
  'orderby' => 'title',
363
  'order' => 'ASC',
410
  <?php bbp_dropdown( array(
411
  'post_type' => bbp_get_forum_post_type(),
412
  'selected' => $reply_forum_id,
 
413
  'numberposts' => -1,
414
  'orderby' => 'title',
415
  'order' => 'ASC',
includes/admin/replies.php CHANGED
@@ -80,7 +80,6 @@ class BBP_Replies_Admin {
80
 
81
  // Anonymous metabox actions
82
  add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) );
83
- add_action( 'save_post', array( $this, 'author_metabox_save' ) );
84
 
85
  // Add ability to filter topics and replies per forum
86
  add_filter( 'restrict_manage_posts', array( $this, 'filter_dropdown' ) );
@@ -294,7 +293,7 @@ class BBP_Replies_Admin {
294
  return $reply_id;
295
 
296
  // Bail if not a post request
297
- if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
298
  return $reply_id;
299
 
300
  // Check action exists
@@ -313,11 +312,17 @@ class BBP_Replies_Admin {
313
  $topic_id = !empty( $_POST['parent_id'] ) ? (int) $_POST['parent_id'] : 0;
314
  $forum_id = !empty( $_POST['bbp_forum_id'] ) ? (int) $_POST['bbp_forum_id'] : bbp_get_topic_forum_id( $topic_id );
315
 
 
 
 
 
 
316
  // Formally update the reply
317
- bbp_update_reply( $reply_id, $topic_id, $forum_id );
318
 
319
  // Allow other fun things to happen
320
  do_action( 'bbp_reply_attributes_metabox_save', $reply_id, $topic_id, $forum_id );
 
321
 
322
  return $reply_id;
323
  }
@@ -358,53 +363,6 @@ class BBP_Replies_Admin {
358
  do_action( 'bbp_author_metabox', get_the_ID() );
359
  }
360
 
361
- /**
362
- * Save the author information for the topic/reply
363
- *
364
- * @since bbPress (r2828)
365
- *
366
- * @param int $post_id Topic or reply id
367
- * @uses bbp_get_topic() To get the topic
368
- * @uses bbp_get_reply() To get the reply
369
- * @uses current_user_can() To check if the current user can edit the
370
- * topic or reply
371
- * @uses bbp_filter_anonymous_post_data() To filter the anonymous user data
372
- * @uses update_post_meta() To update the anonymous user data
373
- * @uses do_action() Calls 'bbp_author_metabox_save' with the reply id and
374
- * anonymous data
375
- * @return int Topic or reply id
376
- */
377
- public function author_metabox_save( $post_id ) {
378
-
379
- if ( $this->bail() ) return $post_id;
380
-
381
- // Bail if no post_id
382
- if ( empty( $post_id ) )
383
- return $post_id;
384
-
385
- // Bail if not a post request
386
- if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
387
- return $post_id;
388
-
389
- // Bail if doing an autosave
390
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
391
- return $post_id;
392
-
393
- // Bail if user cannot edit replies or reply is not anonymous
394
- if ( !current_user_can( 'edit_reply', $post_id ) )
395
- return $post_id;
396
-
397
- $anonymous_data = bbp_filter_anonymous_post_data();
398
-
399
- update_post_meta( $post_id, '_bbp_anonymous_name', $anonymous_data['bbp_anonymous_name'] );
400
- update_post_meta( $post_id, '_bbp_anonymous_email', $anonymous_data['bbp_anonymous_email'] );
401
- update_post_meta( $post_id, '_bbp_anonymous_website', $anonymous_data['bbp_anonymous_website'] );
402
-
403
- do_action( 'bbp_author_metabox_save', $post_id, $anonymous_data );
404
-
405
- return $post_id;
406
- }
407
-
408
  /**
409
  * Add some general styling to the admin area
410
  *
@@ -500,7 +458,7 @@ class BBP_Replies_Admin {
500
  if ( $this->bail() ) return;
501
 
502
  // Only proceed if GET is a reply toggle action
503
- if ( 'GET' == $_SERVER['REQUEST_METHOD'] && !empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'bbp_toggle_reply_spam' ) ) && !empty( $_GET['reply_id'] ) ) {
504
  $action = $_GET['action']; // What action is taking place?
505
  $reply_id = (int) $_GET['reply_id']; // What's the reply id?
506
  $success = false; // Flag
@@ -562,7 +520,7 @@ class BBP_Replies_Admin {
562
  if ( $this->bail() ) return;
563
 
564
  // Only proceed if GET is a reply toggle action
565
- if ( 'GET' == $_SERVER['REQUEST_METHOD'] && !empty( $_GET['bbp_reply_toggle_notice'] ) && in_array( $_GET['bbp_reply_toggle_notice'], array( 'spammed', 'unspammed' ) ) && !empty( $_GET['reply_id'] ) ) {
566
  $notice = $_GET['bbp_reply_toggle_notice']; // Which notice?
567
  $reply_id = (int) $_GET['reply_id']; // What's the reply id?
568
  $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
80
 
81
  // Anonymous metabox actions
82
  add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) );
 
83
 
84
  // Add ability to filter topics and replies per forum
85
  add_filter( 'restrict_manage_posts', array( $this, 'filter_dropdown' ) );
293
  return $reply_id;
294
 
295
  // Bail if not a post request
296
+ if ( ! bbp_is_post_request() )
297
  return $reply_id;
298
 
299
  // Check action exists
312
  $topic_id = !empty( $_POST['parent_id'] ) ? (int) $_POST['parent_id'] : 0;
313
  $forum_id = !empty( $_POST['bbp_forum_id'] ) ? (int) $_POST['bbp_forum_id'] : bbp_get_topic_forum_id( $topic_id );
314
 
315
+ // Get reply author data
316
+ $anonymous_data = bbp_filter_anonymous_post_data();
317
+ $author_id = bbp_get_reply_author_id( $reply_id );
318
+ $is_edit = (bool) isset( $_POST['save'] );
319
+
320
  // Formally update the reply
321
+ bbp_update_reply( $reply_id, $topic_id, $forum_id, $anonymous_data, $author_id, $is_edit );
322
 
323
  // Allow other fun things to happen
324
  do_action( 'bbp_reply_attributes_metabox_save', $reply_id, $topic_id, $forum_id );
325
+ do_action( 'bbp_author_metabox_save', $reply_id, $anonymous_data );
326
 
327
  return $reply_id;
328
  }
363
  do_action( 'bbp_author_metabox', get_the_ID() );
364
  }
365
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  /**
367
  * Add some general styling to the admin area
368
  *
458
  if ( $this->bail() ) return;
459
 
460
  // Only proceed if GET is a reply toggle action
461
+ if ( bbp_is_get_request() && !empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'bbp_toggle_reply_spam' ) ) && !empty( $_GET['reply_id'] ) ) {
462
  $action = $_GET['action']; // What action is taking place?
463
  $reply_id = (int) $_GET['reply_id']; // What's the reply id?
464
  $success = false; // Flag
520
  if ( $this->bail() ) return;
521
 
522
  // Only proceed if GET is a reply toggle action
523
+ if ( bbp_is_get_request() && !empty( $_GET['bbp_reply_toggle_notice'] ) && in_array( $_GET['bbp_reply_toggle_notice'], array( 'spammed', 'unspammed' ) ) && !empty( $_GET['reply_id'] ) ) {
524
  $notice = $_GET['bbp_reply_toggle_notice']; // Which notice?
525
  $reply_id = (int) $_GET['reply_id']; // What's the reply id?
526
  $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
includes/admin/settings.php CHANGED
@@ -1352,7 +1352,7 @@ function bbp_admin_settings_help() {
1352
 
1353
  // Help Sidebar
1354
  $current_screen->set_help_sidebar(
1355
- '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
1356
  '<p>' . __( '<a href="http://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
1357
  '<p>' . __( '<a href="http://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
1358
  );
1352
 
1353
  // Help Sidebar
1354
  $current_screen->set_help_sidebar(
1355
+ '<p><strong>' . __( 'For more information:', 'bbpress' ) . '</strong></p>' .
1356
  '<p>' . __( '<a href="http://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
1357
  '<p>' . __( '<a href="http://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
1358
  );
includes/admin/tools.php CHANGED
@@ -79,24 +79,25 @@ function bbp_admin_repair() {
79
  */
80
  function bbp_admin_repair_handler() {
81
 
82
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) ) {
83
- check_admin_referer( 'bbpress-do-counts' );
84
 
85
- // Stores messages
86
- $messages = array();
87
 
88
- wp_cache_flush();
 
89
 
90
- foreach ( (array) bbp_admin_repair_list() as $item ) {
91
- if ( isset( $item[2] ) && isset( $_POST[$item[0]] ) && 1 == $_POST[$item[0]] && is_callable( $item[2] ) ) {
92
- $messages[] = call_user_func( $item[2] );
93
- }
 
94
  }
 
95
 
96
- if ( count( $messages ) ) {
97
- foreach ( $messages as $message ) {
98
- bbp_admin_tools_feedback( $message[1] );
99
- }
100
  }
101
  }
102
  }
@@ -157,22 +158,22 @@ function bbp_admin_tools_feedback( $message, $class = false ) {
157
  */
158
  function bbp_admin_repair_list() {
159
  $repair_list = array(
160
- 0 => array( 'bbp-sync-topic-meta', __( 'Recalculate the parent topic for each post', 'bbpress' ), 'bbp_admin_repair_topic_meta' ),
161
- 5 => array( 'bbp-sync-forum-meta', __( 'Recalculate the parent forum for each post', 'bbpress' ), 'bbp_admin_repair_forum_meta' ),
162
- 10 => array( 'bbp-sync-forum-visibility', __( 'Recalculate private and hidden forums', 'bbpress' ), 'bbp_admin_repair_forum_visibility' ),
163
- 15 => array( 'bbp-sync-all-topics-forums', __( 'Recalculate last activity in each topic and forum', 'bbpress' ), 'bbp_admin_repair_freshness' ),
164
- 20 => array( 'bbp-sync-all-topics-sticky', __( 'Recalculate the sticky replationship of each topic', 'bbpress' ), 'bbp_admin_repair_sticky' ),
165
- 25 => array( 'bbp-group-forums', __( 'Repair BuddyPress Group Forum relationships', 'bbpress' ), 'bbp_admin_repair_group_forum_relationship' ),
166
- 30 => array( 'bbp-forum-topics', __( 'Count topics in each forum', 'bbpress' ), 'bbp_admin_repair_forum_topic_count' ),
167
- 35 => array( 'bbp-forum-replies', __( 'Count replies in each forum', 'bbpress' ), 'bbp_admin_repair_forum_reply_count' ),
168
- 40 => array( 'bbp-topic-replies', __( 'Count replies in each topic', 'bbpress' ), 'bbp_admin_repair_topic_reply_count' ),
169
- 45 => array( 'bbp-topic-voices', __( 'Count voices in each topic', 'bbpress' ), 'bbp_admin_repair_topic_voice_count' ),
170
- 50 => array( 'bbp-topic-hidden-replies', __( 'Count spammed & trashed replies in each topic', 'bbpress' ), 'bbp_admin_repair_topic_hidden_reply_count' ),
171
- 55 => array( 'bbp-user-topics', __( 'Count topics for each user', 'bbpress' ), 'bbp_admin_repair_user_topic_count' ),
172
- 60 => array( 'bbp-user-replies', __( 'Count replies for each user', 'bbpress' ), 'bbp_admin_repair_user_reply_count' ),
173
- 65 => array( 'bbp-user-favorites', __( 'Remove trashed topics from user favorites', 'bbpress' ), 'bbp_admin_repair_user_favorites' ),
174
- 70 => array( 'bbp-user-subscriptions', __( 'Remove trashed topics from user subscriptions', 'bbpress' ), 'bbp_admin_repair_user_subscriptions' ),
175
- 75 => array( 'bbp-user-role-map', __( 'Remap existing users to default forum roles', 'bbpress' ), 'bbp_admin_repair_user_roles' )
176
  );
177
  ksort( $repair_list );
178
 
@@ -404,6 +405,7 @@ function bbp_admin_repair_group_forum_relationship() {
404
  wp_update_post( array(
405
  'ID' => $posts[0]->ID,
406
  'post_title' => __( 'Group Forums', 'bbpress' ),
 
407
  ) );
408
  }
409
 
@@ -1142,87 +1144,94 @@ function bbp_admin_reset() {
1142
  * @uses wp_cache_flush() To flush the cache
1143
  */
1144
  function bbp_admin_reset_handler() {
1145
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && !empty( $_POST['bbpress-are-you-sure'] ) ) {
1146
- check_admin_referer( 'bbpress-reset' );
1147
 
1148
- global $wpdb;
 
 
1149
 
1150
- // Stores messages
1151
- $messages = array();
1152
- $failed = __( 'Failed', 'bbpress' );
1153
- $success = __( 'Success!', 'bbpress' );
1154
 
1155
- // Flush the cache; things are about to get ugly.
1156
- wp_cache_flush();
1157
 
1158
- /** Posts *************************************************************/
1159
 
1160
- $statement = __( 'Deleting Posts&hellip; %s', 'bbpress' );
1161
- $sql_posts = $wpdb->get_results( "SELECT `ID` FROM `{$wpdb->posts}` WHERE `post_type` IN ('forum', 'topic', 'reply')", OBJECT_K );
1162
- $sql_delete = "DELETE FROM `{$wpdb->posts}` WHERE `post_type` IN ('forum', 'topic', 'reply')";
1163
- $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1164
- $messages[] = sprintf( $statement, $result );
1165
 
 
 
1166
 
1167
- /** Post Meta *********************************************************/
1168
 
1169
- if ( !empty( $sql_posts ) ) {
1170
- foreach( $sql_posts as $key => $value ) {
1171
- $sql_meta[] = $key;
1172
- }
1173
- $statement = __( 'Deleting Post Meta&hellip; %s', 'bbpress' );
1174
- $sql_meta = implode( "', '", $sql_meta );
1175
- $sql_delete = "DELETE FROM `{$wpdb->postmeta}` WHERE `post_id` IN ('{$sql_meta}');";
1176
- $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1177
- $messages[] = sprintf( $statement, $result );
1178
- }
1179
 
1180
- /** Topic Tags ********************************************************/
1181
 
1182
- $statement = __( 'Deleting Topic Tags&hellip; %s', 'bbpress' );
1183
- $sql_delete = "DELETE a,b,c FROM `{$wpdb->terms}` AS a LEFT JOIN `{$wpdb->term_taxonomy}` AS c ON a.term_id = c.term_id LEFT JOIN `{$wpdb->term_relationships}` AS b ON b.term_taxonomy_id = c.term_taxonomy_id WHERE c.taxonomy = 'topic-tag';";
 
 
 
 
 
 
 
1184
  $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1185
  $messages[] = sprintf( $statement, $result );
 
1186
 
1187
- /** User Meta *********************************************************/
1188
 
1189
- $statement = __( 'Deleting User Meta&hellip; %s', 'bbpress' );
1190
- $sql_delete = "DELETE FROM `{$wpdb->usermeta}` WHERE `meta_key` LIKE '%%_bbp_%%';";
1191
- $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1192
- $messages[] = sprintf( $statement, $result );
1193
 
1194
- /** Converter *********************************************************/
1195
 
1196
- $statement = __( 'Deleting Conversion Table&hellip; %s', 'bbpress' );
1197
- $table_name = $wpdb->prefix . 'bbp_converter_translator';
1198
- if ( $wpdb->get_var( "SHOW TABLES LIKE '{$table_name}'" ) == $table_name ) {
1199
- $wpdb->query( "DROP TABLE {$table_name}" );
1200
- $result = $success;
1201
- } else {
1202
- $result = $failed;
1203
- }
1204
- $messages[] = sprintf( $statement, $result );
1205
 
1206
- /** Options ***********************************************************/
1207
 
1208
- $statement = __( 'Deleting Settings&hellip; %s', 'bbpress' );
1209
- bbp_delete_options();
1210
- $messages[] = sprintf( $statement, $success );
 
 
 
 
 
 
1211
 
1212
- /** Roles *************************************************************/
1213
 
1214
- $statement = __( 'Deleting Roles and Capabilities&hellip; %s', 'bbpress' );
1215
- remove_role( bbp_get_moderator_role() );
1216
- remove_role( bbp_get_participant_role() );
1217
- bbp_remove_caps();
1218
- $messages[] = sprintf( $statement, $success );
1219
 
1220
- /** Output ************************************************************/
1221
 
1222
- if ( count( $messages ) ) {
1223
- foreach ( $messages as $message ) {
1224
- bbp_admin_tools_feedback( $message );
1225
- }
 
 
 
 
 
 
 
1226
  }
1227
  }
1228
  }
79
  */
80
  function bbp_admin_repair_handler() {
81
 
82
+ if ( ! bbp_is_post_request() )
83
+ return;
84
 
85
+ check_admin_referer( 'bbpress-do-counts' );
 
86
 
87
+ // Stores messages
88
+ $messages = array();
89
 
90
+ wp_cache_flush();
91
+
92
+ foreach ( (array) bbp_admin_repair_list() as $item ) {
93
+ if ( isset( $item[2] ) && isset( $_POST[$item[0]] ) && 1 == $_POST[$item[0]] && is_callable( $item[2] ) ) {
94
+ $messages[] = call_user_func( $item[2] );
95
  }
96
+ }
97
 
98
+ if ( count( $messages ) ) {
99
+ foreach ( $messages as $message ) {
100
+ bbp_admin_tools_feedback( $message[1] );
 
101
  }
102
  }
103
  }
158
  */
159
  function bbp_admin_repair_list() {
160
  $repair_list = array(
161
+ 0 => array( 'bbp-sync-topic-meta', __( 'Recalculate the parent topic for each post', 'bbpress' ), 'bbp_admin_repair_topic_meta' ),
162
+ 5 => array( 'bbp-sync-forum-meta', __( 'Recalculate the parent forum for each post', 'bbpress' ), 'bbp_admin_repair_forum_meta' ),
163
+ 10 => array( 'bbp-sync-forum-visibility', __( 'Recalculate private and hidden forums', 'bbpress' ), 'bbp_admin_repair_forum_visibility' ),
164
+ 15 => array( 'bbp-sync-all-topics-forums', __( 'Recalculate last activity in each topic and forum', 'bbpress' ), 'bbp_admin_repair_freshness' ),
165
+ 20 => array( 'bbp-sync-all-topics-sticky', __( 'Recalculate the sticky relationship of each topic', 'bbpress' ), 'bbp_admin_repair_sticky' ),
166
+ 25 => array( 'bbp-group-forums', __( 'Repair BuddyPress Group Forum relationships', 'bbpress' ), 'bbp_admin_repair_group_forum_relationship' ),
167
+ 30 => array( 'bbp-forum-topics', __( 'Count topics in each forum', 'bbpress' ), 'bbp_admin_repair_forum_topic_count' ),
168
+ 35 => array( 'bbp-forum-replies', __( 'Count replies in each forum', 'bbpress' ), 'bbp_admin_repair_forum_reply_count' ),
169
+ 40 => array( 'bbp-topic-replies', __( 'Count replies in each topic', 'bbpress' ), 'bbp_admin_repair_topic_reply_count' ),
170
+ 45 => array( 'bbp-topic-voices', __( 'Count voices in each topic', 'bbpress' ), 'bbp_admin_repair_topic_voice_count' ),
171
+ 50 => array( 'bbp-topic-hidden-replies', __( 'Count spammed & trashed replies in each topic', 'bbpress' ), 'bbp_admin_repair_topic_hidden_reply_count' ),
172
+ 55 => array( 'bbp-user-topics', __( 'Count topics for each user', 'bbpress' ), 'bbp_admin_repair_user_topic_count' ),
173
+ 60 => array( 'bbp-user-replies', __( 'Count replies for each user', 'bbpress' ), 'bbp_admin_repair_user_reply_count' ),
174
+ 65 => array( 'bbp-user-favorites', __( 'Remove trashed topics from user favorites', 'bbpress' ), 'bbp_admin_repair_user_favorites' ),
175
+ 70 => array( 'bbp-user-subscriptions', __( 'Remove trashed topics from user subscriptions', 'bbpress' ), 'bbp_admin_repair_user_subscriptions' ),
176
+ 75 => array( 'bbp-user-role-map', __( 'Remap existing users to default forum roles', 'bbpress' ), 'bbp_admin_repair_user_roles' )
177
  );
178
  ksort( $repair_list );
179
 
405
  wp_update_post( array(
406
  'ID' => $posts[0]->ID,
407
  'post_title' => __( 'Group Forums', 'bbpress' ),
408
+ 'post_name' => __( 'group-forums', 'bbpress' ),
409
  ) );
410
  }
411
 
1144
  * @uses wp_cache_flush() To flush the cache
1145
  */
1146
  function bbp_admin_reset_handler() {
 
 
1147
 
1148
+ // Bail if not resetting
1149
+ if ( ! bbp_is_post_request() || empty( $_POST['bbpress-are-you-sure'] ) )
1150
+ return;
1151
 
1152
+ // Only keymasters can proceed
1153
+ if ( ! bbp_is_user_keymaster() )
1154
+ return;
 
1155
 
1156
+ check_admin_referer( 'bbpress-reset' );
 
1157
 
1158
+ global $wpdb;
1159
 
1160
+ // Stores messages
1161
+ $messages = array();
1162
+ $failed = __( 'Failed', 'bbpress' );
1163
+ $success = __( 'Success!', 'bbpress' );
 
1164
 
1165
+ // Flush the cache; things are about to get ugly.
1166
+ wp_cache_flush();
1167
 
1168
+ /** Posts *************************************************************/
1169
 
1170
+ $statement = __( 'Deleting Posts&hellip; %s', 'bbpress' );
1171
+ $sql_posts = $wpdb->get_results( "SELECT `ID` FROM `{$wpdb->posts}` WHERE `post_type` IN ('forum', 'topic', 'reply')", OBJECT_K );
1172
+ $sql_delete = "DELETE FROM `{$wpdb->posts}` WHERE `post_type` IN ('forum', 'topic', 'reply')";
1173
+ $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1174
+ $messages[] = sprintf( $statement, $result );
 
 
 
 
 
1175
 
 
1176
 
1177
+ /** Post Meta *********************************************************/
1178
+
1179
+ if ( !empty( $sql_posts ) ) {
1180
+ foreach( $sql_posts as $key => $value ) {
1181
+ $sql_meta[] = $key;
1182
+ }
1183
+ $statement = __( 'Deleting Post Meta&hellip; %s', 'bbpress' );
1184
+ $sql_meta = implode( "', '", $sql_meta );
1185
+ $sql_delete = "DELETE FROM `{$wpdb->postmeta}` WHERE `post_id` IN ('{$sql_meta}');";
1186
  $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1187
  $messages[] = sprintf( $statement, $result );
1188
+ }
1189
 
1190
+ /** Topic Tags ********************************************************/
1191
 
1192
+ $statement = __( 'Deleting Topic Tags&hellip; %s', 'bbpress' );
1193
+ $sql_delete = "DELETE a,b,c FROM `{$wpdb->terms}` AS a LEFT JOIN `{$wpdb->term_taxonomy}` AS c ON a.term_id = c.term_id LEFT JOIN `{$wpdb->term_relationships}` AS b ON b.term_taxonomy_id = c.term_taxonomy_id WHERE c.taxonomy = 'topic-tag';";
1194
+ $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1195
+ $messages[] = sprintf( $statement, $result );
1196
 
1197
+ /** User Meta *********************************************************/
1198
 
1199
+ $statement = __( 'Deleting User Meta&hellip; %s', 'bbpress' );
1200
+ $sql_delete = "DELETE FROM `{$wpdb->usermeta}` WHERE `meta_key` LIKE '%%_bbp_%%';";
1201
+ $result = is_wp_error( $wpdb->query( $sql_delete ) ) ? $failed : $success;
1202
+ $messages[] = sprintf( $statement, $result );
 
 
 
 
 
1203
 
1204
+ /** Converter *********************************************************/
1205
 
1206
+ $statement = __( 'Deleting Conversion Table&hellip; %s', 'bbpress' );
1207
+ $table_name = $wpdb->prefix . 'bbp_converter_translator';
1208
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '{$table_name}'" ) == $table_name ) {
1209
+ $wpdb->query( "DROP TABLE {$table_name}" );
1210
+ $result = $success;
1211
+ } else {
1212
+ $result = $failed;
1213
+ }
1214
+ $messages[] = sprintf( $statement, $result );
1215
 
1216
+ /** Options ***********************************************************/
1217
 
1218
+ $statement = __( 'Deleting Settings&hellip; %s', 'bbpress' );
1219
+ bbp_delete_options();
1220
+ $messages[] = sprintf( $statement, $success );
 
 
1221
 
1222
+ /** Roles *************************************************************/
1223
 
1224
+ $statement = __( 'Deleting Roles and Capabilities&hellip; %s', 'bbpress' );
1225
+ remove_role( bbp_get_moderator_role() );
1226
+ remove_role( bbp_get_participant_role() );
1227
+ bbp_remove_caps();
1228
+ $messages[] = sprintf( $statement, $success );
1229
+
1230
+ /** Output ************************************************************/
1231
+
1232
+ if ( count( $messages ) ) {
1233
+ foreach ( $messages as $message ) {
1234
+ bbp_admin_tools_feedback( $message );
1235
  }
1236
  }
1237
  }
includes/admin/topics.php CHANGED
@@ -80,7 +80,6 @@ class BBP_Topics_Admin {
80
 
81
  // Anonymous metabox actions
82
  add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) );
83
- add_action( 'save_post', array( $this, 'author_metabox_save' ) );
84
 
85
  // Add ability to filter topics and replies per forum
86
  add_filter( 'restrict_manage_posts', array( $this, 'filter_dropdown' ) );
@@ -295,7 +294,7 @@ class BBP_Topics_Admin {
295
  return $topic_id;
296
 
297
  // Bail if not a post request
298
- if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
299
  return $topic_id;
300
 
301
  // Nonce check
@@ -309,8 +308,13 @@ class BBP_Topics_Admin {
309
  // Get the forum ID
310
  $forum_id = !empty( $_POST['parent_id'] ) ? (int) $_POST['parent_id'] : 0;
311
 
 
 
 
 
 
312
  // Formally update the topic
313
- bbp_update_topic( $topic_id, $forum_id );
314
 
315
  // Stickies
316
  if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
@@ -337,7 +341,8 @@ class BBP_Topics_Admin {
337
  }
338
 
339
  // Allow other fun things to happen
340
- do_action( 'bbp_topic_attributes_metabox_save', $topic_id, $forum_id );
 
341
 
342
  return $topic_id;
343
  }
@@ -376,53 +381,6 @@ class BBP_Topics_Admin {
376
  do_action( 'bbp_author_metabox', get_the_ID() );
377
  }
378
 
379
- /**
380
- * Save the author information for the topic
381
- *
382
- * @since bbPress (r2828)
383
- *
384
- * @param int $post_id Topic or reply id
385
- * @uses bbp_get_topic() To get the topic
386
- * @uses bbp_get_reply() To get the reply
387
- * @uses current_user_can() To check if the current user can edit the
388
- * topic or reply
389
- * @uses bbp_filter_author_post_data() To filter the author data
390
- * @uses update_post_meta() To update the anonymous user data
391
- * @uses do_action() Calls 'bbp_author_metabox_save' with the topic id and
392
- * anonymous data
393
- * @return int Topic or reply id
394
- */
395
- public function author_metabox_save( $post_id ) {
396
-
397
- if ( $this->bail() ) return $post_id;
398
-
399
- // Bail if no post_id
400
- if ( empty( $post_id ) )
401
- return $post_id;
402
-
403
- // Bail if doing an autosave
404
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
405
- return $post_id;
406
-
407
- // Bail if not a post request
408
- if ( 'POST' != strtoupper( $_SERVER['REQUEST_METHOD'] ) )
409
- return $post_id;
410
-
411
- // Bail if user cannot edit topics
412
- if ( !current_user_can( 'edit_topic', $post_id ) )
413
- return $post_id;
414
-
415
- $anonymous_data = bbp_filter_anonymous_post_data();
416
-
417
- update_post_meta( $post_id, '_bbp_anonymous_name', $anonymous_data['bbp_anonymous_name'] );
418
- update_post_meta( $post_id, '_bbp_anonymous_email', $anonymous_data['bbp_anonymous_email'] );
419
- update_post_meta( $post_id, '_bbp_anonymous_website', $anonymous_data['bbp_anonymous_website'] );
420
-
421
- do_action( 'bbp_author_metabox_save', $post_id, $anonymous_data );
422
-
423
- return $post_id;
424
- }
425
-
426
  /**
427
  * Add some general styling to the admin area
428
  *
@@ -526,7 +484,7 @@ class BBP_Topics_Admin {
526
  if ( $this->bail() ) return;
527
 
528
  // Only proceed if GET is a topic toggle action
529
- if ( 'GET' == $_SERVER['REQUEST_METHOD'] && !empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'bbp_toggle_topic_close', 'bbp_toggle_topic_stick', 'bbp_toggle_topic_spam' ) ) && !empty( $_GET['topic_id'] ) ) {
530
  $action = $_GET['action']; // What action is taking place?
531
  $topic_id = (int) $_GET['topic_id']; // What's the topic id?
532
  $success = false; // Flag
@@ -607,7 +565,7 @@ class BBP_Topics_Admin {
607
  if ( $this->bail() ) return;
608
 
609
  // Only proceed if GET is a topic toggle action
610
- if ( 'GET' == $_SERVER['REQUEST_METHOD'] && !empty( $_GET['bbp_topic_toggle_notice'] ) && in_array( $_GET['bbp_topic_toggle_notice'], array( 'opened', 'closed', 'super_sticked', 'sticked', 'unsticked', 'spammed', 'unspammed' ) ) && !empty( $_GET['topic_id'] ) ) {
611
  $notice = $_GET['bbp_topic_toggle_notice']; // Which notice?
612
  $topic_id = (int) $_GET['topic_id']; // What's the topic id?
613
  $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
80
 
81
  // Anonymous metabox actions
82
  add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) );
 
83
 
84
  // Add ability to filter topics and replies per forum
85
  add_filter( 'restrict_manage_posts', array( $this, 'filter_dropdown' ) );
294
  return $topic_id;
295
 
296
  // Bail if not a post request
297
+ if ( ! bbp_is_post_request() )
298
  return $topic_id;
299
 
300
  // Nonce check
308
  // Get the forum ID
309
  $forum_id = !empty( $_POST['parent_id'] ) ? (int) $_POST['parent_id'] : 0;
310
 
311
+ // Get topic author data
312
+ $anonymous_data = bbp_filter_anonymous_post_data();
313
+ $author_id = bbp_get_topic_author_id( $topic_id );
314
+ $is_edit = (bool) isset( $_POST['save'] );
315
+
316
  // Formally update the topic
317
+ bbp_update_topic( $topic_id, $forum_id, $anonymous_data, $author_id, $is_edit );
318
 
319
  // Stickies
320
  if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
341
  }
342
 
343
  // Allow other fun things to happen
344
+ do_action( 'bbp_topic_attributes_metabox_save', $topic_id, $forum_id );
345
+ do_action( 'bbp_author_metabox_save', $topic_id, $anonymous_data );
346
 
347
  return $topic_id;
348
  }
381
  do_action( 'bbp_author_metabox', get_the_ID() );
382
  }
383
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  /**
385
  * Add some general styling to the admin area
386
  *
484
  if ( $this->bail() ) return;
485
 
486
  // Only proceed if GET is a topic toggle action
487
+ if ( bbp_is_get_request() && !empty( $_GET['action'] ) && in_array( $_GET['action'], array( 'bbp_toggle_topic_close', 'bbp_toggle_topic_stick', 'bbp_toggle_topic_spam' ) ) && !empty( $_GET['topic_id'] ) ) {
488
  $action = $_GET['action']; // What action is taking place?
489
  $topic_id = (int) $_GET['topic_id']; // What's the topic id?
490
  $success = false; // Flag
565
  if ( $this->bail() ) return;
566
 
567
  // Only proceed if GET is a topic toggle action
568
+ if ( bbp_is_get_request() && !empty( $_GET['bbp_topic_toggle_notice'] ) && in_array( $_GET['bbp_topic_toggle_notice'], array( 'opened', 'closed', 'super_sticked', 'sticked', 'unsticked', 'spammed', 'unspammed' ) ) && !empty( $_GET['topic_id'] ) ) {
569
  $notice = $_GET['bbp_topic_toggle_notice']; // Which notice?
570
  $topic_id = (int) $_GET['topic_id']; // What's the topic id?
571
  $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
includes/admin/users.php CHANGED
@@ -76,7 +76,7 @@ class BBP_Users_Admin {
76
  $dynamic_roles = bbp_get_dynamic_roles();
77
 
78
  // Only keymasters can set other keymasters
79
- if ( ! current_user_can( 'keep_gate' ) )
80
  unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
81
 
82
  <h3><?php _e( 'Forums', 'bbpress' ); ?></h3>
@@ -132,7 +132,7 @@ class BBP_Users_Admin {
132
  $dynamic_roles = bbp_get_dynamic_roles();
133
 
134
  // Only keymasters can set other keymasters
135
- if ( ! current_user_can( 'keep_gate' ) )
136
  unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
137
 
138
  <label class="screen-reader-text" for="bbp-new-role"><?php _e( 'Change forum role to&hellip;', 'bbpress' ) ?></label>
@@ -189,7 +189,7 @@ class BBP_Users_Admin {
189
  $new_role = sanitize_text_field( $_REQUEST['bbp-new-role'] );
190
 
191
  // Only keymasters can set other keymasters
192
- if ( in_array( bbp_get_keymaster_role(), array( $user_role, $new_role ) ) && ! current_user_can( 'keep_gate' ) )
193
  continue;
194
 
195
  // Set the new forums role
76
  $dynamic_roles = bbp_get_dynamic_roles();
77
 
78
  // Only keymasters can set other keymasters
79
+ if ( ! bbp_is_user_keymaster() )
80
  unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
81
 
82
  <h3><?php _e( 'Forums', 'bbpress' ); ?></h3>
132
  $dynamic_roles = bbp_get_dynamic_roles();
133
 
134
  // Only keymasters can set other keymasters
135
+ if ( ! bbp_is_user_keymaster() )
136
  unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
137
 
138
  <label class="screen-reader-text" for="bbp-new-role"><?php _e( 'Change forum role to&hellip;', 'bbpress' ) ?></label>
189
  $new_role = sanitize_text_field( $_REQUEST['bbp-new-role'] );
190
 
191
  // Only keymasters can set other keymasters
192
+ if ( in_array( bbp_get_keymaster_role(), array( $user_role, $new_role ) ) && ! bbp_is_user_keymaster() )
193
  continue;
194
 
195
  // Set the new forums role
includes/common/functions.php CHANGED
@@ -578,7 +578,7 @@ function bbp_get_statistics( $args = '' ) {
578
  $statistics['hidden_topic_title'] = isset( $hidden_topic_title ) ? $hidden_topic_title : '';
579
  $statistics['hidden_reply_title'] = isset( $hidden_reply_title ) ? $hidden_reply_title : '';
580
 
581
- return apply_filters( 'bbp_get_statistics', $statistics, $args );
582
  }
583
 
584
  /** New/edit topic/reply helpers **********************************************/
@@ -632,7 +632,7 @@ function bbp_filter_anonymous_post_data( $args = '' ) {
632
  $retval = bbp_has_errors() ? false : $r;
633
 
634
  // Finally, return sanitized data or false
635
- return apply_filters( 'bbp_filter_anonymous_post_data', $retval, $args );
636
  }
637
 
638
  /**
@@ -681,14 +681,19 @@ function bbp_check_for_duplicate( $post_data = array() ) {
681
 
682
  $join = $clauses['join'];
683
  $where = $clauses['where'];
684
- } else{
685
  $join = $where = '';
686
  }
687
 
688
- // Simple duplicate check
689
- // Expected slashed ($post_type, $post_parent, $post_author, $post_content, $anonymous_data)
690
- $query = "SELECT ID FROM {$wpdb->posts} {$join} WHERE post_type = '{$r['post_type']}' AND post_status != '{$r['post_status']}' AND post_author = {$r['post_author']} AND post_content = '{$r['post_content']}' {$where}";
691
- $query .= !empty( $r['post_parent'] ) ? " AND post_parent = '{$r['post_parent']}'" : '';
 
 
 
 
 
692
  $query .= " LIMIT 1";
693
  $dupe = apply_filters( 'bbp_check_for_duplicate_query', $query, $r );
694
 
@@ -761,7 +766,7 @@ function bbp_check_for_flood( $anonymous_data = false, $author_id = 0 ) {
761
  * @param int $author_id Topic or reply author ID
762
  * @param string $title The title of the content
763
  * @param string $content The content being posted
764
- * @uses is_super_admin() Allow super admins to bypass blacklist
765
  * @uses bbp_current_author_ip() To get current user IP address
766
  * @uses bbp_current_author_ua() To get current user agent
767
  * @return bool True if test is passed, false if fail
@@ -772,8 +777,8 @@ function bbp_check_for_moderation( $anonymous_data = false, $author_id = 0, $tit
772
  if ( apply_filters( 'bbp_bypass_check_for_moderation', false, $anonymous_data, $author_id, $title, $content ) )
773
  return true;
774
 
775
- // Bail if super admin is author
776
- if ( is_super_admin( $author_id ) )
777
  return true;
778
 
779
  // Define local variable(s)
@@ -880,7 +885,7 @@ function bbp_check_for_moderation( $anonymous_data = false, $author_id = 0, $tit
880
  * @param int $author_id Topic or reply author ID
881
  * @param string $title The title of the content
882
  * @param string $content The content being posted
883
- * @uses is_super_admin() Allow super admins to bypass blacklist
884
  * @uses bbp_current_author_ip() To get current user IP address
885
  * @uses bbp_current_author_ua() To get current user agent
886
  * @return bool True if test is passed, false if fail
@@ -891,8 +896,8 @@ function bbp_check_for_blacklist( $anonymous_data = false, $author_id = 0, $titl
891
  if ( apply_filters( 'bbp_bypass_check_for_blacklist', false, $anonymous_data, $author_id, $title, $content ) )
892
  return true;
893
 
894
- // Bail if super admin is author
895
- if ( is_super_admin( $author_id ) )
896
  return true;
897
 
898
  // Define local variable
@@ -1250,10 +1255,10 @@ function bbp_get_public_child_last_id( $parent_id = 0, $post_type = 'post' ) {
1250
  $post_status = "'" . join( "', '", $post_status ) . "'";
1251
 
1252
  // Check for cache and set if needed
1253
- $child_id = wp_cache_get( $cache_id, 'bbpress' );
1254
  if ( empty( $child_id ) ) {
1255
  $child_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s' ORDER BY ID DESC LIMIT 1;", $parent_id, $post_type ) );
1256
- wp_cache_set( $cache_id, $child_id, 'bbpress' );
1257
  }
1258
 
1259
  // Filter and return
@@ -1293,10 +1298,10 @@ function bbp_get_public_child_count( $parent_id = 0, $post_type = 'post' ) {
1293
  $post_status = "'" . join( "', '", $post_status ) . "'";
1294
 
1295
  // Check for cache and set if needed
1296
- $child_count = wp_cache_get( $cache_id, 'bbpress' );
1297
  if ( empty( $child_count ) ) {
1298
  $child_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s';", $parent_id, $post_type ) );
1299
- wp_cache_set( $cache_id, $child_count, 'bbpress' );
1300
  }
1301
 
1302
  // Filter and return
@@ -1336,10 +1341,10 @@ function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
1336
  $post_status = "'" . join( "', '", $post_status ) . "'";
1337
 
1338
  // Check for cache and set if needed
1339
- $child_ids = wp_cache_get( $cache_id, 'bbpress' );
1340
  if ( empty( $child_ids ) ) {
1341
  $child_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s' ORDER BY ID DESC;", $parent_id, $post_type ) );
1342
- wp_cache_set( $cache_id, $child_ids, 'bbpress' );
1343
  }
1344
 
1345
  // Filter and return
@@ -1397,10 +1402,10 @@ function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
1397
  $post_status = "'" . join( "', '", $post_status ) . "'";
1398
 
1399
  // Check for cache and set if needed
1400
- $child_ids = wp_cache_get( $cache_id, 'bbpress' );
1401
  if ( empty( $child_ids ) ) {
1402
  $child_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s' ORDER BY ID DESC;", $parent_id, $post_type ) );
1403
- wp_cache_set( $cache_id, $child_ids, 'bbpress' );
1404
  }
1405
 
1406
  // Filter and return
@@ -1489,6 +1494,23 @@ function bbp_request_feed_trap( $query_vars = array() ) {
1489
 
1490
  // Forum/Topic/Reply Feed
1491
  if ( isset( $query_vars['post_type'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1492
 
1493
  // What bbPress post type are we looking for feeds on?
1494
  switch ( $query_vars['post_type'] ) {
@@ -1500,14 +1522,13 @@ function bbp_request_feed_trap( $query_vars = array() ) {
1500
  $meta_query = array();
1501
 
1502
  // Single forum
1503
- if ( isset( $query_vars[bbp_get_forum_post_type()] ) ) {
1504
 
1505
  // Load up our own query
1506
- query_posts( array(
1507
  'post_type' => bbp_get_forum_post_type(),
1508
- 'name' => $query_vars[bbp_get_forum_post_type()],
1509
  'feed' => true
1510
- ) );
1511
 
1512
  // Restrict to specific forum ID
1513
  $meta_query = array( array(
@@ -1527,7 +1548,7 @@ function bbp_request_feed_trap( $query_vars = array() ) {
1527
  'feed' => true,
1528
  'post_type' => bbp_get_reply_post_type(),
1529
  'post_parent' => 'any',
1530
- 'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
1531
  'posts_per_page' => bbp_get_replies_per_rss_page(),
1532
  'order' => 'DESC',
1533
  'meta_query' => $meta_query
@@ -1545,7 +1566,7 @@ function bbp_request_feed_trap( $query_vars = array() ) {
1545
  'feed' => true,
1546
  'post_type' => bbp_get_topic_post_type(),
1547
  'post_parent' => bbp_get_forum_id(),
1548
- 'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
1549
  'posts_per_page' => bbp_get_topics_per_rss_page(),
1550
  'order' => 'DESC'
1551
  );
@@ -1557,7 +1578,7 @@ function bbp_request_feed_trap( $query_vars = array() ) {
1557
  } else {
1558
 
1559
  // Exclude private/hidden forums if not looking at single
1560
- if ( empty( $query_vars['forum'] ) )
1561
  $meta_query = array( bbp_exclude_forum_ids( 'meta_query' ) );
1562
 
1563
  // The query
@@ -1566,7 +1587,7 @@ function bbp_request_feed_trap( $query_vars = array() ) {
1566
  'feed' => true,
1567
  'post_type' => array( bbp_get_reply_post_type(), bbp_get_topic_post_type() ),
1568
  'post_parent' => 'any',
1569
- 'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
1570
  'posts_per_page' => bbp_get_replies_per_rss_page(),
1571
  'order' => 'DESC',
1572
  'meta_query' => $meta_query
@@ -1582,14 +1603,13 @@ function bbp_request_feed_trap( $query_vars = array() ) {
1582
  case bbp_get_topic_post_type() :
1583
 
1584
  // Single topic
1585
- if ( isset( $query_vars[bbp_get_topic_post_type()] ) ) {
1586
 
1587
  // Load up our own query
1588
- query_posts( array(
1589
  'post_type' => bbp_get_topic_post_type(),
1590
- 'name' => $query_vars[bbp_get_topic_post_type()],
1591
  'feed' => true
1592
- ) );
1593
 
1594
  // Output the feed
1595
  bbp_display_replies_feed_rss2( array( 'feed' => true ) );
@@ -1623,7 +1643,7 @@ function bbp_request_feed_trap( $query_vars = array() ) {
1623
  );
1624
 
1625
  // All replies
1626
- if ( !isset( $query_vars[bbp_get_reply_post_type()] ) ) {
1627
  bbp_display_replies_feed_rss2( $the_query );
1628
  }
1629
 
578
  $statistics['hidden_topic_title'] = isset( $hidden_topic_title ) ? $hidden_topic_title : '';
579
  $statistics['hidden_reply_title'] = isset( $hidden_reply_title ) ? $hidden_reply_title : '';
580
 
581
+ return apply_filters( 'bbp_get_statistics', $statistics, $r );
582
  }
583
 
584
  /** New/edit topic/reply helpers **********************************************/
632
  $retval = bbp_has_errors() ? false : $r;
633
 
634
  // Finally, return sanitized data or false
635
+ return apply_filters( 'bbp_filter_anonymous_post_data', $retval, $r );
636
  }
637
 
638
  /**
681
 
682
  $join = $clauses['join'];
683
  $where = $clauses['where'];
684
+ } else {
685
  $join = $where = '';
686
  }
687
 
688
+ // Unslash $r to pass through $wpdb->prepare()
689
+ //
690
+ // @see: http://bbpress.trac.wordpress.org/ticket/2185/
691
+ // @see: http://core.trac.wordpress.org/changeset/23973/
692
+ $r = function_exists( 'wp_unslash' ) ? wp_unslash( $r ) : stripslashes_deep( $r );
693
+
694
+ // Prepare duplicate check query
695
+ $query = $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} {$join} WHERE post_type = %s AND post_status != %s AND post_author = %d AND post_content = %s {$where}", $r['post_type'], $r['post_status'], $r['post_author'], $r['post_content'] );
696
+ $query .= !empty( $r['post_parent'] ) ? $wpdb->prepare( " AND post_parent = %d", $r['post_parent'] ) : '';
697
  $query .= " LIMIT 1";
698
  $dupe = apply_filters( 'bbp_check_for_duplicate_query', $query, $r );
699
 
766
  * @param int $author_id Topic or reply author ID
767
  * @param string $title The title of the content
768
  * @param string $content The content being posted
769
+ * @uses bbp_is_user_keymaster() Allow keymasters to bypass blacklist
770
  * @uses bbp_current_author_ip() To get current user IP address
771
  * @uses bbp_current_author_ua() To get current user agent
772
  * @return bool True if test is passed, false if fail
777
  if ( apply_filters( 'bbp_bypass_check_for_moderation', false, $anonymous_data, $author_id, $title, $content ) )
778
  return true;
779
 
780
+ // Bail if keymaster is author
781
+ if ( bbp_is_user_keymaster( $author_id ) )
782
  return true;
783
 
784
  // Define local variable(s)
885
  * @param int $author_id Topic or reply author ID
886
  * @param string $title The title of the content
887
  * @param string $content The content being posted
888
+ * @uses bbp_is_user_keymaster() Allow keymasters to bypass blacklist
889
  * @uses bbp_current_author_ip() To get current user IP address
890
  * @uses bbp_current_author_ua() To get current user agent
891
  * @return bool True if test is passed, false if fail
896
  if ( apply_filters( 'bbp_bypass_check_for_blacklist', false, $anonymous_data, $author_id, $title, $content ) )
897
  return true;
898
 
899
+ // Bail if keymaster is author
900
+ if ( bbp_is_user_keymaster( $author_id ) )
901
  return true;
902
 
903
  // Define local variable
1255
  $post_status = "'" . join( "', '", $post_status ) . "'";
1256
 
1257
  // Check for cache and set if needed
1258
+ $child_id = wp_cache_get( $cache_id, 'bbpress_posts' );
1259
  if ( empty( $child_id ) ) {
1260
  $child_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s' ORDER BY ID DESC LIMIT 1;", $parent_id, $post_type ) );
1261
+ wp_cache_set( $cache_id, $child_id, 'bbpress_posts' );
1262
  }
1263
 
1264
  // Filter and return
1298
  $post_status = "'" . join( "', '", $post_status ) . "'";
1299
 
1300
  // Check for cache and set if needed
1301
+ $child_count = wp_cache_get( $cache_id, 'bbpress_posts' );
1302
  if ( empty( $child_count ) ) {
1303
  $child_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s';", $parent_id, $post_type ) );
1304
+ wp_cache_set( $cache_id, $child_count, 'bbpress_posts' );
1305
  }
1306
 
1307
  // Filter and return
1341
  $post_status = "'" . join( "', '", $post_status ) . "'";
1342
 
1343
  // Check for cache and set if needed
1344
+ $child_ids = wp_cache_get( $cache_id, 'bbpress_posts' );
1345
  if ( empty( $child_ids ) ) {
1346
  $child_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s' ORDER BY ID DESC;", $parent_id, $post_type ) );
1347
+ wp_cache_set( $cache_id, $child_ids, 'bbpress_posts' );
1348
  }
1349
 
1350
  // Filter and return
1402
  $post_status = "'" . join( "', '", $post_status ) . "'";
1403
 
1404
  // Check for cache and set if needed
1405
+ $child_ids = wp_cache_get( $cache_id, 'bbpress_posts' );
1406
  if ( empty( $child_ids ) ) {
1407
  $child_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s' ORDER BY ID DESC;", $parent_id, $post_type ) );
1408
+ wp_cache_set( $cache_id, $child_ids, 'bbpress_posts' );
1409
  }
1410
 
1411
  // Filter and return
1494
 
1495
  // Forum/Topic/Reply Feed
1496
  if ( isset( $query_vars['post_type'] ) ) {
1497
+
1498
+ // Supported select query vars
1499
+ $select_query_vars = array(
1500
+ 'p' => false,
1501
+ 'name' => false,
1502
+ $query_vars['post_type'] => false
1503
+ );
1504
+
1505
+ // Setup matched variables to select
1506
+ foreach ( $query_vars as $key => $value ) {
1507
+ if ( isset( $select_query_vars[$key] ) ) {
1508
+ $select_query_vars[$key] = $value;
1509
+ }
1510
+ }
1511
+
1512
+ // Remove any empties
1513
+ $select_query_vars = array_filter( $select_query_vars );
1514
 
1515
  // What bbPress post type are we looking for feeds on?
1516
  switch ( $query_vars['post_type'] ) {
1522
  $meta_query = array();
1523
 
1524
  // Single forum
1525
+ if ( !empty( $select_query_vars ) ) {
1526
 
1527
  // Load up our own query
1528
+ query_posts( array_merge( array(
1529
  'post_type' => bbp_get_forum_post_type(),
 
1530
  'feed' => true
1531
+ ), $select_query_vars ) );
1532
 
1533
  // Restrict to specific forum ID
1534
  $meta_query = array( array(
1548
  'feed' => true,
1549
  'post_type' => bbp_get_reply_post_type(),
1550
  'post_parent' => 'any',
1551
+ 'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
1552
  'posts_per_page' => bbp_get_replies_per_rss_page(),
1553
  'order' => 'DESC',
1554
  'meta_query' => $meta_query
1566
  'feed' => true,
1567
  'post_type' => bbp_get_topic_post_type(),
1568
  'post_parent' => bbp_get_forum_id(),
1569
+ 'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
1570
  'posts_per_page' => bbp_get_topics_per_rss_page(),
1571
  'order' => 'DESC'
1572
  );
1578
  } else {
1579
 
1580
  // Exclude private/hidden forums if not looking at single
1581
+ if ( empty( $select_query_vars ) )
1582
  $meta_query = array( bbp_exclude_forum_ids( 'meta_query' ) );
1583
 
1584
  // The query
1587
  'feed' => true,
1588
  'post_type' => array( bbp_get_reply_post_type(), bbp_get_topic_post_type() ),
1589
  'post_parent' => 'any',
1590
+ 'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
1591
  'posts_per_page' => bbp_get_replies_per_rss_page(),
1592
  'order' => 'DESC',
1593
  'meta_query' => $meta_query
1603
  case bbp_get_topic_post_type() :
1604
 
1605
  // Single topic
1606
+ if ( !empty( $select_query_vars ) ) {
1607
 
1608
  // Load up our own query
1609
+ query_posts( array_merge( array(
1610
  'post_type' => bbp_get_topic_post_type(),
 
1611
  'feed' => true
1612
+ ), $select_query_vars ) );
1613
 
1614
  // Output the feed
1615
  bbp_display_replies_feed_rss2( array( 'feed' => true ) );
1643
  );
1644
 
1645
  // All replies
1646
+ if ( empty( $select_query_vars ) ) {
1647
  bbp_display_replies_feed_rss2( $the_query );
1648
  }
1649
 
includes/common/template-tags.php CHANGED
@@ -570,7 +570,6 @@ function bbp_is_subscriptions() {
570
  *
571
  * @since bbPress (r2688)
572
  *
573
- * @uses bbp_is_query_name() To get the query name
574
  * @return bool True if it's the topics created page, false if not
575
  */
576
  function bbp_is_topics_created() {
@@ -592,7 +591,6 @@ function bbp_is_topics_created() {
592
  *
593
  * @since bbPress (r4225)
594
  *
595
- * @uses bbp_is_query_name() To get the query name
596
  * @return bool True if it's the topics created page, false if not
597
  */
598
  function bbp_is_replies_created() {
@@ -965,7 +963,7 @@ function bbp_body_class( $wp_classes, $custom_classes = false ) {
965
 
966
  // Add bbPress class if we are within a bbPress page
967
  if ( !empty( $bbp_classes ) ) {
968
- $bbp_classes[] = 'bbPress';
969
  }
970
 
971
  // Merge WP classes with bbPress classes and remove any duplicates
@@ -1111,7 +1109,7 @@ function bbp_wp_login_action( $args = '' ) {
1111
 
1112
  $login_url = site_url( $login_url, $r['context'] );
1113
 
1114
- echo apply_filters( 'bbp_wp_login_action', $login_url, $args );
1115
  }
1116
 
1117
  /**
@@ -1429,7 +1427,7 @@ function bbp_dropdown( $args = '' ) {
1429
  }
1430
  }
1431
 
1432
- return apply_filters( 'bbp_get_dropdown', $retval, $args );
1433
  }
1434
 
1435
  /**
@@ -2105,8 +2103,12 @@ function bbp_breadcrumb( $args = array() ) {
2105
 
2106
  /** Current Text ******************************************************/
2107
 
 
 
 
 
2108
  // Forum archive
2109
- if ( bbp_is_forum_archive() ) {
2110
  $pre_current_text = bbp_get_forum_archive_title();
2111
 
2112
  // Topic archive
@@ -2224,6 +2226,10 @@ function bbp_breadcrumb( $args = array() ) {
2224
  // Parents
2225
  $parent = get_post( $parent_id );
2226
 
 
 
 
 
2227
  // Switch through post_type to ensure correct filters are applied
2228
  switch ( $parent->post_type ) {
2229
 
@@ -2274,7 +2280,11 @@ function bbp_breadcrumb( $args = array() ) {
2274
 
2275
  // Pad the separator
2276
  if ( !empty( $r['pad_sep'] ) ) {
2277
- $sep = str_pad( $sep, strlen( $sep ) + ( (int) $r['pad_sep'] * 2 ), ' ', STR_PAD_BOTH );
 
 
 
 
2278
  }
2279
 
2280
  /** Finish Up *********************************************************/
570
  *
571
  * @since bbPress (r2688)
572
  *
 
573
  * @return bool True if it's the topics created page, false if not
574
  */
575
  function bbp_is_topics_created() {
591
  *
592
  * @since bbPress (r4225)
593
  *
 
594
  * @return bool True if it's the topics created page, false if not
595
  */
596
  function bbp_is_replies_created() {
963
 
964
  // Add bbPress class if we are within a bbPress page
965
  if ( !empty( $bbp_classes ) ) {
966
+ $bbp_classes[] = 'bbpress';
967
  }
968
 
969
  // Merge WP classes with bbPress classes and remove any duplicates
1109
 
1110
  $login_url = site_url( $login_url, $r['context'] );
1111
 
1112
+ echo apply_filters( 'bbp_wp_login_action', $login_url, $r );
1113
  }
1114
 
1115
  /**
1427
  }
1428
  }
1429
 
1430
+ return apply_filters( 'bbp_get_dropdown', $retval, $r );
1431
  }
1432
 
1433
  /**
2103
 
2104
  /** Current Text ******************************************************/
2105
 
2106
+ // Search page
2107
+ if ( bbp_is_search() ) {
2108
+ $pre_current_text = bbp_get_search_title();
2109
+
2110
  // Forum archive
2111
+ } elseif ( bbp_is_forum_archive() ) {
2112
  $pre_current_text = bbp_get_forum_archive_title();
2113
 
2114
  // Topic archive
2226
  // Parents
2227
  $parent = get_post( $parent_id );
2228
 
2229
+ // Skip parent if empty or error
2230
+ if ( empty( $parent ) || is_wp_error( $parent ) )
2231
+ continue;
2232
+
2233
  // Switch through post_type to ensure correct filters are applied
2234
  switch ( $parent->post_type ) {
2235
 
2280
 
2281
  // Pad the separator
2282
  if ( !empty( $r['pad_sep'] ) ) {
2283
+ if ( function_exists( 'mb_strlen' ) ) {
2284
+ $sep = str_pad( $sep, mb_strlen( $sep ) + ( (int) $r['pad_sep'] * 2 ), ' ', STR_PAD_BOTH );
2285
+ } else {
2286
+ $sep = str_pad( $sep, strlen( $sep ) + ( (int) $r['pad_sep'] * 2 ), ' ', STR_PAD_BOTH );
2287
+ }
2288
  }
2289
 
2290
  /** Finish Up *********************************************************/
includes/common/widgets.php CHANGED
@@ -63,20 +63,24 @@ class BBP_Login_Widget extends WP_Widget {
63
  * @uses apply_filters() Calls 'bbp_login_widget_title' with the title
64
  * @uses get_template_part() To get the login/logged in form
65
  */
66
- public function widget( $args, $instance ) {
 
 
 
67
 
68
  // Typical WordPress filter
69
- $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
70
 
71
  // bbPress filters
72
- $title = apply_filters( 'bbp_login_widget_title', $instance['title'], $instance, $this->id_base );
73
- $register = apply_filters( 'bbp_login_widget_register', $instance['register'], $instance, $this->id_base );
74
- $lostpass = apply_filters( 'bbp_login_widget_lostpass', $instance['lostpass'], $instance, $this->id_base );
75
 
76
  echo $args['before_widget'];
77
 
78
- if ( !empty( $title ) )
79
- echo $args['before_title'] . $title . $args['after_title'];
 
80
 
81
  if ( !is_user_logged_in() ) : ?>
82
 
@@ -109,19 +113,19 @@ class BBP_Login_Widget extends WP_Widget {
109
 
110
  </div>
111
 
112
- <?php if ( !empty( $register ) || !empty( $lostpass ) ) : ?>
113
 
114
  <div class="bbp-login-links">
115
 
116
- <?php if ( !empty( $register ) ) : ?>
117
 
118
- <a href="<?php echo esc_url( $register ); ?>" title="<?php esc_attr_e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php _e( 'Register', 'bbpress' ); ?></a>
119
 
120
  <?php endif; ?>
121
 
122
- <?php if ( !empty( $lostpass ) ) : ?>
123
 
124
- <a href="<?php echo esc_url( $lostpass ); ?>" title="<?php esc_attr_e( 'Lost Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php _e( 'Lost Password', 'bbpress' ); ?></a>
125
 
126
  <?php endif; ?>
127
 
@@ -172,32 +176,44 @@ class BBP_Login_Widget extends WP_Widget {
172
  * @uses BBP_Login_Widget::get_field_id() To output the field id
173
  * @uses BBP_Login_Widget::get_field_name() To output the field name
174
  */
175
- public function form( $instance ) {
176
 
177
- // Form values
178
- $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
179
- $register = !empty( $instance['register'] ) ? esc_attr( $instance['register'] ) : '';
180
- $lostpass = !empty( $instance['lostpass'] ) ? esc_attr( $instance['lostpass'] ) : '';
181
-
182
- ?>
183
 
184
  <p>
185
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
186
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label>
187
  </p>
188
 
189
  <p>
190
  <label for="<?php echo $this->get_field_id( 'register' ); ?>"><?php _e( 'Register URI:', 'bbpress' ); ?>
191
- <input class="widefat" id="<?php echo $this->get_field_id( 'register' ); ?>" name="<?php echo $this->get_field_name( 'register' ); ?>" type="text" value="<?php echo $register; ?>" /></label>
192
  </p>
193
 
194
  <p>
195
  <label for="<?php echo $this->get_field_id( 'lostpass' ); ?>"><?php _e( 'Lost Password URI:', 'bbpress' ); ?>
196
- <input class="widefat" id="<?php echo $this->get_field_id( 'lostpass' ); ?>" name="<?php echo $this->get_field_name( 'lostpass' ); ?>" type="text" value="<?php echo $lostpass; ?>" /></label>
197
  </p>
198
 
199
  <?php
200
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  }
202
 
203
  /**
@@ -253,33 +269,39 @@ class BBP_Views_Widget extends WP_Widget {
253
  * @uses bbp_view_url() To output the view url
254
  * @uses bbp_view_title() To output the view title
255
  */
256
- public function widget( $args, $instance ) {
257
 
258
  // Only output widget contents if views exist
259
- if ( bbp_get_views() ) :
 
 
260
 
261
- // Typical WordPress filter
262
- $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
263
 
264
- // bbPress filter
265
- $title = apply_filters( 'bbp_view_widget_title', $instance['title'], $instance, $this->id_base );
266
 
267
- echo $args['before_widget'];
268
- echo $args['before_title'] . $title . $args['after_title']; ?>
 
 
269
 
270
- <ul>
 
 
271
 
272
- <?php foreach ( array_keys( bbp_get_views() ) as $view ) : ?>
273
 
274
- <li><a class="bbp-view-title" href="<?php bbp_view_url( $view ); ?>" title="<?php bbp_view_title( $view ); ?>"><?php bbp_view_title( $view ); ?></a></li>
275
 
276
- <?php endforeach; ?>
277
 
278
- </ul>
279
 
280
- <?php echo $args['after_widget'];
281
 
282
- endif;
283
  }
284
 
285
  /**
@@ -290,7 +312,7 @@ class BBP_Views_Widget extends WP_Widget {
290
  * @param array $new_instance The new instance options
291
  * @param array $old_instance The old instance options
292
  */
293
- public function update( $new_instance, $old_instance ) {
294
  $instance = $old_instance;
295
  $instance['title'] = strip_tags( $new_instance['title'] );
296
 
@@ -306,17 +328,33 @@ class BBP_Views_Widget extends WP_Widget {
306
  * @uses BBP_Views_Widget::get_field_id() To output the field id
307
  * @uses BBP_Views_Widget::get_field_name() To output the field name
308
  */
309
- public function form( $instance ) {
310
- $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; ?>
 
 
311
 
312
  <p>
313
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
314
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" />
315
  </label>
316
  </p>
317
 
318
  <?php
319
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  }
321
 
322
  /**
@@ -370,14 +408,20 @@ class BBP_Search_Widget extends WP_Widget {
370
  */
371
  public function widget( $args, $instance ) {
372
 
 
 
 
373
  // Typical WordPress filter
374
- $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
375
 
376
  // bbPress filter
377
- $title = apply_filters( 'bbp_search_widget_title', $instance['title'], $instance, $this->id_base );
378
 
379
  echo $args['before_widget'];
380
- echo $args['before_title'] . $title . $args['after_title'];
 
 
 
381
 
382
  bbp_get_template_part( 'form', 'search' );
383
 
@@ -409,16 +453,32 @@ class BBP_Search_Widget extends WP_Widget {
409
  * @uses BBP_Search_Widget::get_field_name() To output the field name
410
  */
411
  public function form( $instance ) {
412
- $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; ?>
 
 
413
 
414
  <p>
415
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
416
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" />
417
  </label>
418
  </p>
419
 
420
  <?php
421
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  }
423
 
424
  /**
@@ -482,44 +542,51 @@ class BBP_Forums_Widget extends WP_Widget {
482
  */
483
  public function widget( $args, $instance ) {
484
 
 
 
 
485
  // Typical WordPress filter
486
- $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
487
 
488
  // bbPress filter
489
- $title = apply_filters( 'bbp_forum_widget_title', $instance['title'], $instance, $this->id_base );
490
- $parent_forum = !empty( $instance['parent_forum'] ) ? $instance['parent_forum'] : '0';
491
 
492
  // Note: private and hidden forums will be excluded via the
493
  // bbp_pre_get_posts_exclude_forums filter and function.
494
  $widget_query = new WP_Query( array(
495
- 'post_parent' => $parent_forum,
496
  'post_type' => bbp_get_forum_post_type(),
 
 
497
  'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
498
  'orderby' => 'menu_order',
499
  'order' => 'ASC'
500
  ) );
501
 
502
- if ( $widget_query->have_posts() ) :
 
 
 
503
 
504
- echo $args['before_widget'];
505
- echo $args['before_title'] . $title . $args['after_title']; ?>
506
 
507
- <ul>
 
 
508
 
509
- <?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
510
 
511
- <li><a class="bbp-forum-title" href="<?php bbp_forum_permalink( $widget_query->post->ID ); ?>" title="<?php bbp_forum_title( $widget_query->post->ID ); ?>"><?php bbp_forum_title( $widget_query->post->ID ); ?></a></li>
512
 
513
- <?php endwhile; ?>
514
 
515
- </ul>
516
 
517
- <?php echo $args['after_widget'];
518
 
519
- // Reset the $post global
520
- wp_reset_postdata();
521
 
522
- endif;
 
523
  }
524
 
525
  /**
@@ -553,18 +620,19 @@ class BBP_Forums_Widget extends WP_Widget {
553
  * @uses BBP_Forums_Widget::get_field_name() To output the field name
554
  */
555
  public function form( $instance ) {
556
- $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
557
- $parent_forum = !empty( $instance['parent_forum'] ) ? esc_attr( $instance['parent_forum'] ) : '0'; ?>
 
558
 
559
  <p>
560
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
561
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" />
562
  </label>
563
  </p>
564
 
565
  <p>
566
  <label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php _e( 'Parent Forum ID:', 'bbpress' ); ?>
567
- <input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo $parent_forum; ?>" />
568
  </label>
569
 
570
  <br />
@@ -574,6 +642,21 @@ class BBP_Forums_Widget extends WP_Widget {
574
 
575
  <?php
576
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577
  }
578
 
579
  /**
@@ -631,51 +714,45 @@ class BBP_Topics_Widget extends WP_Widget {
631
  * time
632
  * @uses bbp_get_topic_id() To get the topic id
633
  */
634
- public function widget( $args, $instance ) {
 
 
 
635
 
636
  // Typical WordPress filter
637
- $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
638
 
639
  // bbPress filter
640
- $title = apply_filters( 'bbp_topic_widget_title', $instance['title'], $instance, $this->id_base );
641
- $max_shown = !empty( $instance['max_shown'] ) ? (int) $instance['max_shown'] : 5;
642
- $show_date = !empty( $instance['show_date'] ) ? 'on' : false;
643
- $show_user = !empty( $instance['show_user'] ) ? 'on' : false;
644
- $parent_forum = !empty( $instance['parent_forum'] ) ? $instance['parent_forum'] : 'any';
645
- $order_by = !empty( $instance['order_by'] ) ? $instance['order_by'] : false;
646
 
647
  // How do we want to order our results?
648
- switch ( $order_by ) {
649
 
650
  // Order by most recent replies
651
  case 'freshness' :
652
  $topics_query = array(
653
- 'author' => 0,
654
  'post_type' => bbp_get_topic_post_type(),
655
- 'post_parent' => $parent_forum,
656
- 'posts_per_page' => $max_shown,
657
- 'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
658
- 'show_stickes' => false,
659
  'meta_key' => '_bbp_last_active_time',
660
  'orderby' => 'meta_value',
661
  'order' => 'DESC',
662
- 'meta_query' => array( bbp_exclude_forum_ids( 'meta_query' ) )
663
  );
664
  break;
665
 
666
  // Order by total number of replies
667
  case 'popular' :
668
  $topics_query = array(
669
- 'author' => 0,
670
  'post_type' => bbp_get_topic_post_type(),
671
- 'post_parent' => $parent_forum,
672
- 'posts_per_page' => $max_shown,
673
- 'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
674
- 'show_stickes' => false,
675
  'meta_key' => '_bbp_reply_count',
676
  'orderby' => 'meta_value',
677
- 'order' => 'DESC',
678
- 'meta_query' => array( bbp_exclude_forum_ids( 'meta_query' ) )
679
  );
680
  break;
681
 
@@ -683,14 +760,12 @@ class BBP_Topics_Widget extends WP_Widget {
683
  case 'newness' :
684
  default :
685
  $topics_query = array(
686
- 'author' => 0,
687
  'post_type' => bbp_get_topic_post_type(),
688
- 'post_parent' => $parent_forum,
689
- 'posts_per_page' => $max_shown,
690
- 'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
691
- 'show_stickes' => false,
692
- 'order' => 'DESC',
693
- 'meta_query' => array( bbp_exclude_forum_ids( 'meta_query' ) )
694
  );
695
  break;
696
  }
@@ -699,47 +774,55 @@ class BBP_Topics_Widget extends WP_Widget {
699
  // bbp_pre_get_posts_exclude_forums filter and function.
700
  $widget_query = new WP_Query( $topics_query );
701
 
702
- // Topics exist
703
- if ( $widget_query->have_posts() ) :
 
 
 
 
704
 
705
- echo $args['before_widget'];
706
- echo $args['before_title'] . $title . $args['after_title']; ?>
 
707
 
708
- <ul>
709
 
710
- <?php while ( $widget_query->have_posts() ) :
711
 
712
- $widget_query->the_post();
713
- $topic_id = bbp_get_topic_id( $widget_query->post->ID );
714
- $author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) ); ?>
715
 
716
- <li>
717
- <a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>" title="<?php bbp_topic_title( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a>
 
 
718
 
719
- <?php if ( 'on' == $show_user ) : ?>
 
720
 
721
- <?php printf( _x( 'by %1$s', 'widgets', 'bbpress' ), '<span class="topic-author">' . $author_link . '</span>' ); ?>
722
 
723
- <?php endif; ?>
724
 
725
- <?php if ( 'on' == $show_date ) : ?>
726
 
727
- <div><?php bbp_topic_last_active_time( $topic_id ); ?></div>
728
 
729
- <?php endif; ?>
730
 
731
- </li>
732
 
733
- <?php endwhile; ?>
734
 
735
- </ul>
736
 
737
- <?php echo $args['after_widget'];
738
 
739
- // Reset the $post global
740
- wp_reset_postdata();
741
 
742
- endif;
 
743
  }
744
 
745
  /**
@@ -750,13 +833,20 @@ class BBP_Topics_Widget extends WP_Widget {
750
  * @param array $new_instance The new instance options
751
  * @param array $old_instance The old instance options
752
  */
753
- public function update( $new_instance, $old_instance ) {
754
  $instance = $old_instance;
755
- $instance['title'] = strip_tags( $new_instance['title'] );
756
- $instance['max_shown'] = strip_tags( $new_instance['max_shown'] );
757
- $instance['show_date'] = strip_tags( $new_instance['show_date'] );
758
- $instance['show_user'] = strip_tags( $new_instance['show_user'] );
759
- $instance['order_by'] = strip_tags( $new_instance['order_by'] );
 
 
 
 
 
 
 
760
 
761
  return $instance;
762
  }
@@ -770,29 +860,57 @@ class BBP_Topics_Widget extends WP_Widget {
770
  * @uses BBP_Topics_Widget::get_field_id() To output the field id
771
  * @uses BBP_Topics_Widget::get_field_name() To output the field name
772
  */
773
- public function form( $instance ) {
774
- $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
775
- $max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
776
- $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
777
- $show_user = !empty( $instance['show_user'] ) ? esc_attr( $instance['show_user'] ) : '';
778
- $order_by = !empty( $instance['order_by'] ) ? esc_attr( $instance['order_by'] ) : ''; ?>
779
 
780
- <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
781
- <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum topics to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo $max_shown; ?>" /></label></p>
782
- <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $show_date ); ?> /></label></p>
783
- <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show topic author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( 'on', $show_user ); ?> /></label></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
784
 
785
  <p>
786
  <label for="<?php echo $this->get_field_id( 'order_by' ); ?>"><?php _e( 'Order By:', 'bbpress' ); ?></label>
787
  <select name="<?php echo $this->get_field_name( 'order_by' ); ?>" id="<?php echo $this->get_field_name( 'order_by' ); ?>">
788
- <option <?php selected( $order_by, 'newness' ); ?> value="newness"><?php _e( 'Newest Topics', 'bbpress' ); ?></option>
789
- <option <?php selected( $order_by, 'popular' ); ?> value="popular"><?php _e( 'Popular Topics', 'bbpress' ); ?></option>
790
- <option <?php selected( $order_by, 'freshness' ); ?> value="freshness"><?php _e( 'Topics With Recent Replies', 'bbpress' ); ?></option>
791
  </select>
792
  </p>
793
 
794
  <?php
795
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
796
  }
797
 
798
  /**
@@ -847,13 +965,22 @@ class BBP_Stats_Widget extends WP_Widget {
847
  * @uses apply_filters() Calls 'bbp_stats_widget_title' with the title
848
  * @uses bbp_get_template_part() To get the content-forum-statistics template
849
  */
850
- public function widget( $args, $instance ) {
 
 
 
851
 
852
- $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
853
- $title = apply_filters( 'bbp_stats_widget_title', $instance['title'], $instance, $this->id_base );
 
 
 
854
 
855
  echo $args['before_widget'];
856
- echo $args['before_title'] . $title . $args['after_title'];
 
 
 
857
 
858
  bbp_get_template_part( 'content', 'statistics' );
859
 
@@ -887,17 +1014,33 @@ class BBP_Stats_Widget extends WP_Widget {
887
  * @return string|void
888
  */
889
  public function form( $instance ) {
890
- $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; ?>
 
 
891
 
892
  <p>
893
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
894
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
895
- name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
896
  </label>
897
  </p>
898
 
899
  <?php
900
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
901
  }
902
 
903
  /**
@@ -960,83 +1103,91 @@ class BBP_Replies_Widget extends WP_Widget {
960
  */
961
  public function widget( $args, $instance ) {
962
 
 
 
 
963
  // Typical WordPress filter
964
- $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
965
 
966
  // bbPress filter
967
- $title = apply_filters( 'bbp_replies_widget_title', $instance['title'], $instance, $this->id_base );
968
- $max_shown = !empty( $instance['max_shown'] ) ? $instance['max_shown'] : '5';
969
- $show_date = !empty( $instance['show_date'] ) ? 'on' : false;
970
- $show_user = !empty( $instance['show_user'] ) ? 'on' : false;
971
- $post_types = !empty( $instance['post_type'] ) ? array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) : bbp_get_reply_post_type();
972
 
973
  // Note: private and hidden forums will be excluded via the
974
  // bbp_pre_get_posts_exclude_forums filter and function.
975
  $widget_query = new WP_Query( array(
976
- 'post_type' => $post_types,
977
- 'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
978
- 'posts_per_page' => $max_shown,
979
- 'meta_query' => array( bbp_exclude_forum_ids( 'meta_query' ) )
980
  ) );
981
 
982
- // Get replies and display them
983
- if ( $widget_query->have_posts() ) :
 
 
 
 
984
 
985
- echo $args['before_widget'];
986
- echo $args['before_title'] . $title . $args['after_title']; ?>
 
987
 
988
- <ul>
989
 
990
- <?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
991
 
992
- <li>
993
 
994
- <?php
995
 
996
- $reply_id = bbp_get_reply_id( $widget_query->post->ID );
997
- $author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) );
998
- $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . bbp_get_reply_excerpt( $reply_id, 50 ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a>';
999
 
1000
- // Reply author, link, and timestamp
1001
- if ( ( 'on' == $show_date ) && ( 'on' == $show_user ) ) :
 
 
 
 
1002
 
1003
- // translators: 1: reply author, 2: reply link, 3: reply timestamp
1004
- printf( _x( '%1$s on %2$s %3$s', 'widgets', 'bbpress' ), $author_link, $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
1005
 
1006
- // Reply link and timestamp
1007
- elseif ( $show_date == 'on' ) :
1008
 
1009
- // translators: 1: reply link, 2: reply timestamp
1010
- printf( _x( '%1$s %2$s', 'widgets', 'bbpress' ), $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
1011
 
1012
- // Reply author and title
1013
- elseif ( $show_user == 'on' ) :
1014
 
1015
- // translators: 1: reply author, 2: reply link
1016
- printf( _x( '%1$s on %2$s', 'widgets', 'bbpress' ), $author_link, $reply_link );
1017
 
1018
- // Only the reply title
1019
- else :
1020
 
1021
- // translators: 1: reply link
1022
- printf( _x( '%1$s', 'widgets', 'bbpress' ), $reply_link );
1023
 
1024
- endif;
 
1025
 
1026
- ?>
1027
 
1028
- </li>
1029
 
1030
- <?php endwhile; ?>
1031
 
1032
- </ul>
1033
 
1034
- <?php echo $args['after_widget'];
1035
 
1036
- // Reset the $post global
1037
- wp_reset_postdata();
1038
 
1039
- endif;
 
1040
  }
1041
 
1042
  /**
@@ -1047,12 +1198,12 @@ class BBP_Replies_Widget extends WP_Widget {
1047
  * @param array $new_instance The new instance options
1048
  * @param array $old_instance The old instance options
1049
  */
1050
- public function update( $new_instance, $old_instance ) {
1051
  $instance = $old_instance;
1052
- $instance['title'] = strip_tags( $new_instance['title'] );
1053
- $instance['max_shown'] = strip_tags( $new_instance['max_shown'] );
1054
- $instance['show_date'] = strip_tags( $new_instance['show_date'] );
1055
- $instance['show_user'] = strip_tags( $new_instance['show_user'] );
1056
 
1057
  return $instance;
1058
  }
@@ -1066,17 +1217,34 @@ class BBP_Replies_Widget extends WP_Widget {
1066
  * @uses BBP_Replies_Widget::get_field_id() To output the field id
1067
  * @uses BBP_Replies_Widget::get_field_name() To output the field name
1068
  */
1069
- public function form( $instance ) {
1070
- $title = !empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
1071
- $max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
1072
- $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
1073
- $show_user = !empty( $instance['show_user'] ) ? esc_attr( $instance['show_user'] ) : ''; ?>
1074
 
1075
- <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
1076
- <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum replies to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo $max_shown; ?>" /></label></p>
1077
- <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $show_date ); ?> /></label></p>
1078
- <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show reply author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( 'on', $show_user ); ?> /></label></p>
1079
 
1080
  <?php
1081
  }
1082
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  * @uses apply_filters() Calls 'bbp_login_widget_title' with the title
64
  * @uses get_template_part() To get the login/logged in form
65
  */
66
+ public function widget( $args = array(), $instance = array() ) {
67
+
68
+ // Get widget settings
69
+ $settings = $this->parse_settings( $instance );
70
 
71
  // Typical WordPress filter
72
+ $settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
73
 
74
  // bbPress filters
75
+ $settings['title'] = apply_filters( 'bbp_login_widget_title', $settings['title'], $instance, $this->id_base );
76
+ $settings['register'] = apply_filters( 'bbp_login_widget_register', $settings['register'], $instance, $this->id_base );
77
+ $settings['lostpass'] = apply_filters( 'bbp_login_widget_lostpass', $settings['lostpass'], $instance, $this->id_base );
78
 
79
  echo $args['before_widget'];
80
 
81
+ if ( !empty( $settings['title'] ) ) {
82
+ echo $args['before_title'] . $settings['title'] . $args['after_title'];
83
+ }
84
 
85
  if ( !is_user_logged_in() ) : ?>
86
 
113
 
114
  </div>
115
 
116
+ <?php if ( !empty( $settings['register'] ) || !empty( $settings['lostpass'] ) ) : ?>
117
 
118
  <div class="bbp-login-links">
119
 
120
+ <?php if ( !empty( $settings['register'] ) ) : ?>
121
 
122
+ <a href="<?php echo esc_url( $settings['register'] ); ?>" title="<?php esc_attr_e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php _e( 'Register', 'bbpress' ); ?></a>
123
 
124
  <?php endif; ?>
125
 
126
+ <?php if ( !empty( $settings['lostpass'] ) ) : ?>
127
 
128
+ <a href="<?php echo esc_url( $settings['lostpass'] ); ?>" title="<?php esc_attr_e( 'Lost Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php _e( 'Lost Password', 'bbpress' ); ?></a>
129
 
130
  <?php endif; ?>
131
 
176
  * @uses BBP_Login_Widget::get_field_id() To output the field id
177
  * @uses BBP_Login_Widget::get_field_name() To output the field name
178
  */
179
+ public function form( $instance = array() ) {
180
 
181
+ // Get widget settings
182
+ $settings = $this->parse_settings( $instance ); ?>
 
 
 
 
183
 
184
  <p>
185
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
186
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label>
187
  </p>
188
 
189
  <p>
190
  <label for="<?php echo $this->get_field_id( 'register' ); ?>"><?php _e( 'Register URI:', 'bbpress' ); ?>
191
+ <input class="widefat" id="<?php echo $this->get_field_id( 'register' ); ?>" name="<?php echo $this->get_field_name( 'register' ); ?>" type="text" value="<?php echo esc_url( $settings['register'] ); ?>" /></label>
192
  </p>
193
 
194
  <p>
195
  <label for="<?php echo $this->get_field_id( 'lostpass' ); ?>"><?php _e( 'Lost Password URI:', 'bbpress' ); ?>
196
+ <input class="widefat" id="<?php echo $this->get_field_id( 'lostpass' ); ?>" name="<?php echo $this->get_field_name( 'lostpass' ); ?>" type="text" value="<?php echo esc_url( $settings['lostpass'] ); ?>" /></label>
197
  </p>
198
 
199
  <?php
200
  }
201
+
202
+ /**
203
+ * Merge the widget settings into defaults array.
204
+ *
205
+ * @since bbPress (r4802)
206
+ *
207
+ * @param $instance Instance
208
+ * @uses bbp_parse_args() To merge widget settings into defaults
209
+ */
210
+ public function parse_settings( $instance = array() ) {
211
+ return bbp_parse_args( $instance, array(
212
+ 'title' => '',
213
+ 'register' => '',
214
+ 'lostpass' => ''
215
+ ), 'login_widget_settings' );
216
+ }
217
  }
218
 
219
  /**
269
  * @uses bbp_view_url() To output the view url
270
  * @uses bbp_view_title() To output the view title
271
  */
272
+ public function widget( $args = array(), $instance = array() ) {
273
 
274
  // Only output widget contents if views exist
275
+ if ( ! bbp_get_views() ) {
276
+ return;
277
+ }
278
 
279
+ // Get widget settings
280
+ $settings = $this->parse_settings( $instance );
281
 
282
+ // Typical WordPress filter
283
+ $settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
284
 
285
+ // bbPress filter
286
+ $settings['title'] = apply_filters( 'bbp_view_widget_title', $settings['title'], $instance, $this->id_base );
287
+
288
+ echo $args['before_widget'];
289
 
290
+ if ( !empty( $settings['title'] ) ) {
291
+ echo $args['before_title'] . $settings['title'] . $args['after_title'];
292
+ } ?>
293
 
294
+ <ul>
295
 
296
+ <?php foreach ( array_keys( bbp_get_views() ) as $view ) : ?>
297
 
298
+ <li><a class="bbp-view-title" href="<?php bbp_view_url( $view ); ?>" title="<?php bbp_view_title( $view ); ?>"><?php bbp_view_title( $view ); ?></a></li>
299
 
300
+ <?php endforeach; ?>
301
 
302
+ </ul>
303
 
304
+ <?php echo $args['after_widget'];
305
  }
306
 
307
  /**
312
  * @param array $new_instance The new instance options
313
  * @param array $old_instance The old instance options
314
  */
315
+ public function update( $new_instance = array(), $old_instance = array() ) {
316
  $instance = $old_instance;
317
  $instance['title'] = strip_tags( $new_instance['title'] );
318
 
328
  * @uses BBP_Views_Widget::get_field_id() To output the field id
329
  * @uses BBP_Views_Widget::get_field_name() To output the field name
330
  */
331
+ public function form( $instance = array() ) {
332
+
333
+ // Get widget settings
334
+ $settings = $this->parse_settings( $instance ); ?>
335
 
336
  <p>
337
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
338
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
339
  </label>
340
  </p>
341
 
342
  <?php
343
  }
344
+
345
+ /**
346
+ * Merge the widget settings into defaults array.
347
+ *
348
+ * @since bbPress (r4802)
349
+ *
350
+ * @param $instance Instance
351
+ * @uses bbp_parse_args() To merge widget settings into defaults
352
+ */
353
+ public function parse_settings( $instance = array() ) {
354
+ return bbp_parse_args( $instance, array(
355
+ 'title' => ''
356
+ ), 'view_widget_settings' );
357
+ }
358
  }
359
 
360
  /**
408
  */
409
  public function widget( $args, $instance ) {
410
 
411
+ // Get widget settings
412
+ $settings = $this->parse_settings( $instance );
413
+
414
  // Typical WordPress filter
415
+ $settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
416
 
417
  // bbPress filter
418
+ $settings['title'] = apply_filters( 'bbp_search_widget_title', $settings['title'], $instance, $this->id_base );
419
 
420
  echo $args['before_widget'];
421
+
422
+ if ( !empty( $settings['title'] ) ) {
423
+ echo $args['before_title'] . $settings['title'] . $args['after_title'];
424
+ }
425
 
426
  bbp_get_template_part( 'form', 'search' );
427
 
453
  * @uses BBP_Search_Widget::get_field_name() To output the field name
454
  */
455
  public function form( $instance ) {
456
+
457
+ // Get widget settings
458
+ $settings = $this->parse_settings( $instance ); ?>
459
 
460
  <p>
461
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
462
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
463
  </label>
464
  </p>
465
 
466
  <?php
467
  }
468
+
469
+ /**
470
+ * Merge the widget settings into defaults array.
471
+ *
472
+ * @since bbPress (r4802)
473
+ *
474
+ * @param $instance Instance
475
+ * @uses bbp_parse_args() To merge widget settings into defaults
476
+ */
477
+ public function parse_settings( $instance = array() ) {
478
+ return bbp_parse_args( $instance, array(
479
+ 'title' => __( 'Search Forums', 'bbpress' )
480
+ ), 'search_widget_settings' );
481
+ }
482
  }
483
 
484
  /**
542
  */
543
  public function widget( $args, $instance ) {
544
 
545
+ // Get widget settings
546
+ $settings = $this->parse_settings( $instance );
547
+
548
  // Typical WordPress filter
549
+ $settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
550
 
551
  // bbPress filter
552
+ $settings['title'] = apply_filters( 'bbp_forum_widget_title', $settings['title'], $instance, $this->id_base );
 
553
 
554
  // Note: private and hidden forums will be excluded via the
555
  // bbp_pre_get_posts_exclude_forums filter and function.
556
  $widget_query = new WP_Query( array(
 
557
  'post_type' => bbp_get_forum_post_type(),
558
+ 'post_parent' => $settings['parent_forum'],
559
+ 'post_status' => bbp_get_public_status_id(),
560
  'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
561
  'orderby' => 'menu_order',
562
  'order' => 'ASC'
563
  ) );
564
 
565
+ // Bail if no posts
566
+ if ( ! $widget_query->have_posts() ) {
567
+ return;
568
+ }
569
 
570
+ echo $args['before_widget'];
 
571
 
572
+ if ( !empty( $settings['title'] ) ) {
573
+ echo $args['before_title'] . $settings['title'] . $args['after_title'];
574
+ } ?>
575
 
576
+ <ul>
577
 
578
+ <?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
579
 
580
+ <li><a class="bbp-forum-title" href="<?php bbp_forum_permalink( $widget_query->post->ID ); ?>" title="<?php bbp_forum_title( $widget_query->post->ID ); ?>"><?php bbp_forum_title( $widget_query->post->ID ); ?></a></li>
581
 
582
+ <?php endwhile; ?>
583
 
584
+ </ul>
585
 
586
+ <?php echo $args['after_widget'];
 
587
 
588
+ // Reset the $post global
589
+ wp_reset_postdata();
590
  }
591
 
592
  /**
620
  * @uses BBP_Forums_Widget::get_field_name() To output the field name
621
  */
622
  public function form( $instance ) {
623
+
624
+ // Get widget settings
625
+ $settings = $this->parse_settings( $instance ); ?>
626
 
627
  <p>
628
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
629
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
630
  </label>
631
  </p>
632
 
633
  <p>
634
  <label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php _e( 'Parent Forum ID:', 'bbpress' ); ?>
635
+ <input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo esc_attr( $settings['parent_forum'] ); ?>" />
636
  </label>
637
 
638
  <br />
642
 
643
  <?php
644
  }
645
+
646
+ /**
647
+ * Merge the widget settings into defaults array.
648
+ *
649
+ * @since bbPress (r4802)
650
+ *
651
+ * @param $instance Instance
652
+ * @uses bbp_parse_args() To merge widget settings into defaults
653
+ */
654
+ public function parse_settings( $instance = array() ) {
655
+ return bbp_parse_args( $instance, array(
656
+ 'title' => __( 'Forums', 'bbpress' ),
657
+ 'parent_forum' => 0
658
+ ), 'forum_widget_settings' );
659
+ }
660
  }
661
 
662
  /**
714
  * time
715
  * @uses bbp_get_topic_id() To get the topic id
716
  */
717
+ public function widget( $args = array(), $instance = array() ) {
718
+
719
+ // Get widget settings
720
+ $settings = $this->parse_settings( $instance );
721
 
722
  // Typical WordPress filter
723
+ $settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
724
 
725
  // bbPress filter
726
+ $settings['title'] = apply_filters( 'bbp_topic_widget_title', $settings['title'], $instance, $this->id_base );
 
 
 
 
 
727
 
728
  // How do we want to order our results?
729
+ switch ( $settings['order_by'] ) {
730
 
731
  // Order by most recent replies
732
  case 'freshness' :
733
  $topics_query = array(
 
734
  'post_type' => bbp_get_topic_post_type(),
735
+ 'post_parent' => $settings['parent_forum'],
736
+ 'posts_per_page' => (int) $settings['max_shown'],
737
+ 'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
738
+ 'show_stickies' => false,
739
  'meta_key' => '_bbp_last_active_time',
740
  'orderby' => 'meta_value',
741
  'order' => 'DESC',
 
742
  );
743
  break;
744
 
745
  // Order by total number of replies
746
  case 'popular' :
747
  $topics_query = array(
 
748
  'post_type' => bbp_get_topic_post_type(),
749
+ 'post_parent' => $settings['parent_forum'],
750
+ 'posts_per_page' => (int) $settings['max_shown'],
751
+ 'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
752
+ 'show_stickies' => false,
753
  'meta_key' => '_bbp_reply_count',
754
  'orderby' => 'meta_value',
755
+ 'order' => 'DESC'
 
756
  );
757
  break;
758
 
760
  case 'newness' :
761
  default :
762
  $topics_query = array(
 
763
  'post_type' => bbp_get_topic_post_type(),
764
+ 'post_parent' => $settings['parent_forum'],
765
+ 'posts_per_page' => (int) $settings['max_shown'],
766
+ 'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
767
+ 'show_stickies' => false,
768
+ 'order' => 'DESC'
 
769
  );
770
  break;
771
  }
774
  // bbp_pre_get_posts_exclude_forums filter and function.
775
  $widget_query = new WP_Query( $topics_query );
776
 
777
+ // Bail if no topics are found
778
+ if ( ! $widget_query->have_posts() ) {
779
+ return;
780
+ }
781
+
782
+ echo $args['before_widget'];
783
 
784
+ if ( !empty( $settings['title'] ) ) {
785
+ echo $args['before_title'] . $settings['title'] . $args['after_title'];
786
+ } ?>
787
 
788
+ <ul>
789
 
790
+ <?php while ( $widget_query->have_posts() ) :
791
 
792
+ $widget_query->the_post();
793
+ $topic_id = bbp_get_topic_id( $widget_query->post->ID );
794
+ $author_link = '';
795
 
796
+ // Maybe get the topic author
797
+ if ( 'on' == $settings['show_user'] ) :
798
+ $author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) );
799
+ endif; ?>
800
 
801
+ <li>
802
+ <a class="bbp-forum-title" href="<?php echo esc_url( bbp_get_topic_permalink( $topic_id ) ); ?>" title="<?php echo esc_attr( bbp_get_topic_title( $topic_id ) ); ?>"><?php bbp_topic_title( $topic_id ); ?></a>
803
 
804
+ <?php if ( ! empty( $author_link ) ) : ?>
805
 
806
+ <?php printf( _x( 'by %1$s', 'widgets', 'bbpress' ), '<span class="topic-author">' . $author_link . '</span>' ); ?>
807
 
808
+ <?php endif; ?>
809
 
810
+ <?php if ( 'on' == $settings['show_date'] ) : ?>
811
 
812
+ <div><?php bbp_topic_last_active_time( $topic_id ); ?></div>
813
 
814
+ <?php endif; ?>
815
 
816
+ </li>
817
 
818
+ <?php endwhile; ?>
819
 
820
+ </ul>
821
 
822
+ <?php echo $args['after_widget'];
 
823
 
824
+ // Reset the $post global
825
+ wp_reset_postdata();
826
  }
827
 
828
  /**
833
  * @param array $new_instance The new instance options
834
  * @param array $old_instance The old instance options
835
  */
836
+ public function update( $new_instance = array(), $old_instance = array() ) {
837
  $instance = $old_instance;
838
+ $instance['title'] = strip_tags( $new_instance['title'] );
839
+ $instance['order_by'] = strip_tags( $new_instance['order_by'] );
840
+ $instance['show_date'] = (bool) $new_instance['show_date'];
841
+ $instance['show_user'] = (bool) $new_instance['show_user'];
842
+ $instance['max_shown'] = (int) $new_instance['max_shown'];
843
+
844
+ // Force to any
845
+ if ( !empty( $instance['parent_forum'] ) || !is_numeric( $instance['parent_forum'] ) ) {
846
+ $instance['parent_forum'] = 'any';
847
+ } else {
848
+ $instance['parent_forum'] = (int) $new_instance['parent_forum'];
849
+ }
850
 
851
  return $instance;
852
  }
860
  * @uses BBP_Topics_Widget::get_field_id() To output the field id
861
  * @uses BBP_Topics_Widget::get_field_name() To output the field name
862
  */
863
+ public function form( $instance = array() ) {
 
 
 
 
 
864
 
865
+ // Get widget settings
866
+ $settings = $this->parse_settings( $instance ); ?>
867
+
868
+ <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label></p>
869
+ <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum topics to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo esc_attr( $settings['max_shown'] ); ?>" /></label></p>
870
+
871
+ <p>
872
+ <label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php _e( 'Parent Forum ID:', 'bbpress' ); ?>
873
+ <input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo esc_attr( $settings['parent_forum'] ); ?>" />
874
+ </label>
875
+
876
+ <br />
877
+
878
+ <small><?php _e( '"0" to show only root - "any" to show all', 'bbpress' ); ?></small>
879
+ </p>
880
+
881
+ <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $settings['show_date'] ); ?> /></label></p>
882
+ <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show topic author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( 'on', $settings['show_user'] ); ?> /></label></p>
883
 
884
  <p>
885
  <label for="<?php echo $this->get_field_id( 'order_by' ); ?>"><?php _e( 'Order By:', 'bbpress' ); ?></label>
886
  <select name="<?php echo $this->get_field_name( 'order_by' ); ?>" id="<?php echo $this->get_field_name( 'order_by' ); ?>">
887
+ <option <?php selected( $settings['order_by'], 'newness' ); ?> value="newness"><?php _e( 'Newest Topics', 'bbpress' ); ?></option>
888
+ <option <?php selected( $settings['order_by'], 'popular' ); ?> value="popular"><?php _e( 'Popular Topics', 'bbpress' ); ?></option>
889
+ <option <?php selected( $settings['order_by'], 'freshness' ); ?> value="freshness"><?php _e( 'Topics With Recent Replies', 'bbpress' ); ?></option>
890
  </select>
891
  </p>
892
 
893
  <?php
894
  }
895
+
896
+ /**
897
+ * Merge the widget settings into defaults array.
898
+ *
899
+ * @since bbPress (r4802)
900
+ *
901
+ * @param $instance Instance
902
+ * @uses bbp_parse_args() To merge widget options into defaults
903
+ */
904
+ public function parse_settings( $instance = array() ) {
905
+ return bbp_parse_args( $instance, array(
906
+ 'title' => __( 'Recent Topics', 'bbpress' ),
907
+ 'max_shown' => 5,
908
+ 'show_date' => false,
909
+ 'show_user' => false,
910
+ 'parent_forum' => 'any',
911
+ 'order_by' => false
912
+ ), 'topic_widget_settings' );
913
+ }
914
  }
915
 
916
  /**
965
  * @uses apply_filters() Calls 'bbp_stats_widget_title' with the title
966
  * @uses bbp_get_template_part() To get the content-forum-statistics template
967
  */
968
+ public function widget( $args = array(), $instance = array() ) {
969
+
970
+ // Get widget settings
971
+ $settings = $this->parse_settings( $instance );
972
 
973
+ // Typical WordPress filter
974
+ $settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
975
+
976
+ // bbPress widget title filter
977
+ $settings['title'] = apply_filters( 'bbp_stats_widget_title', $settings['title'], $instance, $this->id_base );
978
 
979
  echo $args['before_widget'];
980
+
981
+ if ( !empty( $settings['title'] ) ) {
982
+ echo $args['before_title'] . $settings['title'] . $args['after_title'];
983
+ }
984
 
985
  bbp_get_template_part( 'content', 'statistics' );
986
 
1014
  * @return string|void
1015
  */
1016
  public function form( $instance ) {
1017
+
1018
+ // Get widget settings
1019
+ $settings = $this->parse_settings( $instance ); ?>
1020
 
1021
  <p>
1022
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?>
1023
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>"/>
 
1024
  </label>
1025
  </p>
1026
 
1027
  <?php
1028
  }
1029
+
1030
+ /**
1031
+ * Merge the widget settings into defaults array.
1032
+ *
1033
+ * @since bbPress (r4802)
1034
+ *
1035
+ * @param $instance Instance
1036
+ * @uses bbp_parse_args() To merge widget settings into defaults
1037
+ */
1038
+ public function parse_settings( $instance = array() ) {
1039
+ return bbp_parse_args( $instance, array(
1040
+ 'title' => __( 'Forum Statistics', 'bbpress' )
1041
+ ),
1042
+ 'stats_widget_settings' );
1043
+ }
1044
  }
1045
 
1046
  /**
1103
  */
1104
  public function widget( $args, $instance ) {
1105
 
1106
+ // Get widget settings
1107
+ $settings = $this->parse_settings( $instance );
1108
+
1109
  // Typical WordPress filter
1110
+ $settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
1111
 
1112
  // bbPress filter
1113
+ $settings['title'] = apply_filters( 'bbp_replies_widget_title', $settings['title'], $instance, $this->id_base );
 
 
 
 
1114
 
1115
  // Note: private and hidden forums will be excluded via the
1116
  // bbp_pre_get_posts_exclude_forums filter and function.
1117
  $widget_query = new WP_Query( array(
1118
+ 'post_type' => bbp_get_reply_post_type(),
1119
+ 'post_status' => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
1120
+ 'posts_per_page' => (int) $settings['max_shown']
 
1121
  ) );
1122
 
1123
+ // Bail if no replies
1124
+ if ( ! $widget_query->have_posts() ) {
1125
+ return;
1126
+ }
1127
+
1128
+ echo $args['before_widget'];
1129
 
1130
+ if ( !empty( $settings['title'] ) ) {
1131
+ echo $args['before_title'] . $settings['title'] . $args['after_title'];
1132
+ } ?>
1133
 
1134
+ <ul>
1135
 
1136
+ <?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
1137
 
1138
+ <li>
1139
 
1140
+ <?php
1141
 
1142
+ // Verify the reply ID
1143
+ $reply_id = bbp_get_reply_id( $widget_query->post->ID );
1144
+ $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a>';
1145
 
1146
+ // Only query user if showing them
1147
+ if ( 'on' == $settings['show_user'] ) :
1148
+ $author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) );
1149
+ else :
1150
+ $author_link = false;
1151
+ endif;
1152
 
1153
+ // Reply author, link, and timestamp
1154
+ if ( ( 'on' == $settings['show_date'] ) && !empty( $author_link ) ) :
1155
 
1156
+ // translators: 1: reply author, 2: reply link, 3: reply timestamp
1157
+ printf( _x( '%1$s on %2$s %3$s', 'widgets', 'bbpress' ), $author_link, $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
1158
 
1159
+ // Reply link and timestamp
1160
+ elseif ( 'on' == $settings['show_date'] ) :
1161
 
1162
+ // translators: 1: reply link, 2: reply timestamp
1163
+ printf( _x( '%1$s %2$s', 'widgets', 'bbpress' ), $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
1164
 
1165
+ // Reply author and title
1166
+ elseif ( !empty( $author_link ) ) :
1167
 
1168
+ // translators: 1: reply author, 2: reply link
1169
+ printf( _x( '%1$s on %2$s', 'widgets', 'bbpress' ), $author_link, $reply_link );
1170
 
1171
+ // Only the reply title
1172
+ else :
1173
 
1174
+ // translators: 1: reply link
1175
+ printf( _x( '%1$s', 'widgets', 'bbpress' ), $reply_link );
1176
 
1177
+ endif;
1178
 
1179
+ ?>
1180
 
1181
+ </li>
1182
 
1183
+ <?php endwhile; ?>
1184
 
1185
+ </ul>
1186
 
1187
+ <?php echo $args['after_widget'];
 
1188
 
1189
+ // Reset the $post global
1190
+ wp_reset_postdata();
1191
  }
1192
 
1193
  /**
1198
  * @param array $new_instance The new instance options
1199
  * @param array $old_instance The old instance options
1200
  */
1201
+ public function update( $new_instance = array(), $old_instance = array() ) {
1202
  $instance = $old_instance;
1203
+ $instance['title'] = strip_tags( $new_instance['title'] );
1204
+ $instance['show_date'] = (bool) $new_instance['show_date'];
1205
+ $instance['show_user'] = (bool) $new_instance['show_user'];
1206
+ $instance['max_shown'] = (int) $new_instance['max_shown'];
1207
 
1208
  return $instance;
1209
  }
1217
  * @uses BBP_Replies_Widget::get_field_id() To output the field id
1218
  * @uses BBP_Replies_Widget::get_field_name() To output the field name
1219
  */
1220
+ public function form( $instance = array() ) {
1221
+
1222
+ // Get widget settings
1223
+ $settings = $this->parse_settings( $instance ); ?>
 
1224
 
1225
+ <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label></p>
1226
+ <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum replies to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo esc_attr( $settings['max_shown'] ); ?>" /></label></p>
1227
+ <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $settings['show_date'] ); ?> /></label></p>
1228
+ <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show reply author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( 'on', $settings['show_user'] ); ?> /></label></p>
1229
 
1230
  <?php
1231
  }
1232
+
1233
+ /**
1234
+ * Merge the widget settings into defaults array.
1235
+ *
1236
+ * @since bbPress (r4802)
1237
+ *
1238
+ * @param $instance Instance
1239
+ * @uses bbp_parse_args() To merge widget settings into defaults
1240
+ */
1241
+ public function parse_settings( $instance = array() ) {
1242
+ return bbp_parse_args( $instance, array(
1243
+ 'title' => __( 'Recent Replies', 'bbpress' ),
1244
+ 'max_shown' => 5,
1245
+ 'show_date' => false,
1246
+ 'show_user' => false
1247
+ ),
1248
+ 'replies_widget_settings' );
1249
+ }
1250
+ }
includes/core/actions.php CHANGED
@@ -48,7 +48,7 @@ add_action( 'wp_footer', 'bbp_footer', 10 );
48
  add_action( 'set_current_user', 'bbp_setup_current_user', 10 );
49
  add_action( 'setup_theme', 'bbp_setup_theme', 10 );
50
  add_action( 'after_setup_theme', 'bbp_after_setup_theme', 10 );
51
- add_action( 'template_redirect', 'bbp_template_redirect', 10 );
52
  add_action( 'login_form_login', 'bbp_login_form_login', 10 );
53
  add_action( 'profile_update', 'bbp_profile_update', 10, 2 ); // user_id and old_user_data
54
  add_action( 'user_register', 'bbp_user_register', 10 );
@@ -82,12 +82,17 @@ add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20 );
82
  add_action( 'bbp_init', 'bbp_ready', 999 );
83
 
84
  /**
85
- * There is no action API for roles to use, so hook in immediately after the
86
- * $wp_roles global is set, which is the 'setup_theme' action.
 
 
 
 
 
87
  *
88
  * This is kind of lame, but is all we have for now.
89
  */
90
- add_action( 'bbp_setup_theme', 'bbp_add_forums_roles', 1 );
91
 
92
  /**
93
  * When setting up the current user, make sure they have a role for the forums.
@@ -136,13 +141,13 @@ add_action( 'bbp_widgets_init', array( 'BBP_Topics_Widget', 'register_widget' )
136
  add_action( 'bbp_widgets_init', array( 'BBP_Replies_Widget', 'register_widget' ), 10 );
137
  add_action( 'bbp_widgets_init', array( 'BBP_Stats_Widget', 'register_widget' ), 10 );
138
 
139
- // Template - Head, foot, errors and messages
140
- add_action( 'bbp_loaded', 'bbp_login_notices' );
141
  add_action( 'bbp_head', 'bbp_topic_notices' );
142
  add_action( 'bbp_template_notices', 'bbp_template_notices' );
143
 
144
  // Always exclude private/hidden forums if needed
145
- add_action( 'pre_get_posts', 'bbp_pre_get_posts_exclude_forums', 4 );
146
 
147
  // Profile Page Messages
148
  add_action( 'bbp_template_notices', 'bbp_notice_edit_user_success' );
48
  add_action( 'set_current_user', 'bbp_setup_current_user', 10 );
49
  add_action( 'setup_theme', 'bbp_setup_theme', 10 );
50
  add_action( 'after_setup_theme', 'bbp_after_setup_theme', 10 );
51
+ add_action( 'template_redirect', 'bbp_template_redirect', 8 ); // Before BuddyPress's 10 [BB2225]
52
  add_action( 'login_form_login', 'bbp_login_form_login', 10 );
53
  add_action( 'profile_update', 'bbp_profile_update', 10, 2 ); // user_id and old_user_data
54
  add_action( 'user_register', 'bbp_user_register', 10 );
82
  add_action( 'bbp_init', 'bbp_ready', 999 );
83
 
84
  /**
85
+ * There is no action API for roles to use, so hook in immediately after
86
+ * everything is included (including the theme's functions.php. This is after
87
+ * the $wp_roles global is set but before $wp->init().
88
+ *
89
+ * If it's hooked in any sooner, role names may not be translated correctly.
90
+ *
91
+ * @link http://bbpress.trac.wordpress.org/ticket/2219
92
  *
93
  * This is kind of lame, but is all we have for now.
94
  */
95
+ add_action( 'bbp_after_setup_theme', 'bbp_add_forums_roles', 1 );
96
 
97
  /**
98
  * When setting up the current user, make sure they have a role for the forums.
141
  add_action( 'bbp_widgets_init', array( 'BBP_Replies_Widget', 'register_widget' ), 10 );
142
  add_action( 'bbp_widgets_init', array( 'BBP_Stats_Widget', 'register_widget' ), 10 );
143
 
144
+ // Notices (loaded after bbp_init for translations)
145
+ add_action( 'bbp_head', 'bbp_login_notices' );
146
  add_action( 'bbp_head', 'bbp_topic_notices' );
147
  add_action( 'bbp_template_notices', 'bbp_template_notices' );
148
 
149
  // Always exclude private/hidden forums if needed
150
+ add_action( 'pre_get_posts', 'bbp_pre_get_posts_normalize_forum_visibility', 4 );
151
 
152
  // Profile Page Messages
153
  add_action( 'bbp_template_notices', 'bbp_notice_edit_user_success' );
includes/core/capabilities.php CHANGED
@@ -326,6 +326,7 @@ function bbp_get_wp_roles() {
326
  * We do this to avoid adding these values to the database.
327
  *
328
  * @since bbPress (r4290)
 
329
  */
330
  function bbp_add_forums_roles() {
331
  $wp_roles = bbp_get_wp_roles();
@@ -335,6 +336,8 @@ function bbp_add_forums_roles() {
335
  $wp_roles->role_objects[$role_id] = new WP_Role( $role_id, $details['capabilities'] );
336
  $wp_roles->role_names[$role_id] = $details['name'];
337
  }
 
 
338
  }
339
 
340
  /**
@@ -436,6 +439,21 @@ function bbp_get_dynamic_roles() {
436
  ) );
437
  }
438
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  /**
440
  * Removes the bbPress roles from the editable roles array
441
  *
326
  * We do this to avoid adding these values to the database.
327
  *
328
  * @since bbPress (r4290)
329
+ * @return WP_Roles The main $wp_roles global
330
  */
331
  function bbp_add_forums_roles() {
332
  $wp_roles = bbp_get_wp_roles();
336
  $wp_roles->role_objects[$role_id] = new WP_Role( $role_id, $details['capabilities'] );
337
  $wp_roles->role_names[$role_id] = $details['name'];
338
  }
339
+
340
+ return $wp_roles;
341
  }
342
 
343
  /**
439
  ) );
440
  }
441
 
442
+ /**
443
+ * Gets a translated role name from a role ID
444
+ *
445
+ * @since bbPress (r4792)
446
+ *
447
+ * @param string $role_id
448
+ * @return string Translated role name
449
+ */
450
+ function bbp_get_dynamic_role_name( $role_id = '' ) {
451
+ $roles = bbp_get_dynamic_roles();
452
+ $role = isset( $roles[$role_id] ) ? $roles[$role_id]['name'] : '';
453
+
454
+ return apply_filters( 'bbp_get_dynamic_role_name', $role, $role_id, $roles );
455
+ }
456
+
457
  /**
458
  * Removes the bbPress roles from the editable roles array
459
  *
includes/core/filters.php CHANGED
@@ -76,8 +76,11 @@ add_filter( 'bbp_request', 'bbp_request_feed_trap' );
76
  * template hierarchy, start here by removing this filter, then look at how
77
  * bbp_template_include() works and do something similar. :)
78
  */
79
- add_filter( 'bbp_template_include', 'bbp_template_include_theme_supports', 2, 1 );
80
- add_filter( 'bbp_template_include', 'bbp_template_include_theme_compat', 4, 2 );
 
 
 
81
 
82
  // Links
83
  add_filter( 'paginate_links', 'bbp_add_view_all' );
@@ -91,6 +94,16 @@ add_filter( 'bbp_new_topic_pre_title', 'wp_filter_kses' );
91
  add_filter( 'bbp_edit_reply_pre_title', 'wp_filter_kses' );
92
  add_filter( 'bbp_edit_topic_pre_title', 'wp_filter_kses' );
93
 
 
 
 
 
 
 
 
 
 
 
94
  // balanceTags, wp_filter_kses and wp_rel_nofollow on new/edit topic/reply text
95
  add_filter( 'bbp_new_reply_pre_content', 'wp_rel_nofollow' );
96
  add_filter( 'bbp_new_reply_pre_content', 'bbp_filter_kses' );
@@ -121,23 +134,23 @@ add_filter( 'bbp_get_user_profile_edit_link', 'stripslashes' );
121
 
122
  // Run filters on reply content
123
  add_filter( 'bbp_get_reply_content', 'make_clickable', 4 );
 
124
  add_filter( 'bbp_get_reply_content', 'wptexturize', 6 );
125
  add_filter( 'bbp_get_reply_content', 'convert_chars', 8 );
126
  add_filter( 'bbp_get_reply_content', 'capital_P_dangit', 10 );
127
  add_filter( 'bbp_get_reply_content', 'convert_smilies', 20 );
128
- add_filter( 'bbp_get_reply_content', 'force_balance_tags', 25 );
129
- add_filter( 'bbp_get_reply_content', 'wpautop', 30 );
130
- add_filter( 'bbp_get_reply_content', 'bbp_mention_filter', 40 );
131
 
132
  // Run filters on topic content
133
  add_filter( 'bbp_get_topic_content', 'make_clickable', 4 );
 
134
  add_filter( 'bbp_get_topic_content', 'wptexturize', 6 );
135
  add_filter( 'bbp_get_topic_content', 'convert_chars', 8 );
136
  add_filter( 'bbp_get_topic_content', 'capital_P_dangit', 10 );
137
  add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 );
138
- add_filter( 'bbp_get_topic_content', 'force_balance_tags', 25 );
139
- add_filter( 'bbp_get_topic_content', 'wpautop', 30 );
140
- add_filter( 'bbp_get_topic_content', 'bbp_mention_filter', 40 );
141
 
142
  // Add number format filter to functions requiring numeric output
143
  add_filter( 'bbp_get_user_topic_count', 'bbp_number_format', 10 );
@@ -151,18 +164,6 @@ add_filter( 'bbp_get_topic_voice_count', 'bbp_number_format', 10 );
151
  add_filter( 'bbp_get_topic_reply_count', 'bbp_number_format', 10 );
152
  add_filter( 'bbp_get_topic_post_count', 'bbp_number_format', 10 );
153
 
154
- // Code filters on input
155
- add_filter( 'bbp_new_reply_pre_content', 'bbp_code_trick_reverse' );
156
- add_filter( 'bbp_edit_reply_pre_content', 'bbp_code_trick_reverse' );
157
- add_filter( 'bbp_new_topic_pre_content', 'bbp_code_trick_reverse' );
158
- add_filter( 'bbp_edit_topic_pre_content', 'bbp_code_trick_reverse' );
159
-
160
- // Code filters on output (hooked in early for plugin compatibility)
161
- add_filter( 'bbp_get_reply_content', 'bbp_code_trick', 4 );
162
- add_filter( 'bbp_get_reply_content', 'bbp_encode_bad', 6 );
163
- add_filter( 'bbp_get_topic_content', 'bbp_code_trick', 4 );
164
- add_filter( 'bbp_get_topic_content', 'bbp_encode_bad', 6 );
165
-
166
  // Run wp_kses_data on topic/reply content in admin section
167
  if ( is_admin() ) {
168
  add_filter( 'bbp_get_reply_content', 'bbp_kses_data' );
@@ -183,19 +184,6 @@ add_filter( 'bbp_get_author_link', 'bbp_suppress_private_author_link',
183
  add_filter( 'bbp_get_topic_author_link', 'bbp_suppress_private_author_link', 10, 2 );
184
  add_filter( 'bbp_get_reply_author_link', 'bbp_suppress_private_author_link', 10, 2 );
185
 
186
- // Filter bbPress template locations
187
- add_filter( 'bbp_get_template_part', 'bbp_add_template_locations' );
188
- add_filter( 'bbp_get_profile_template', 'bbp_add_template_locations' );
189
- add_filter( 'bbp_get_profileedit_template', 'bbp_add_template_locations' );
190
- add_filter( 'bbp_get_singleview_template', 'bbp_add_template_locations' );
191
- add_filter( 'bbp_get_forumedit_template', 'bbp_add_template_locations' );
192
- add_filter( 'bbp_get_topicedit_template', 'bbp_add_template_locations' );
193
- add_filter( 'bbp_get_topicsplit_template', 'bbp_add_template_locations' );
194
- add_filter( 'bbp_get_topicmerge_template', 'bbp_add_template_locations' );
195
- add_filter( 'bbp_get_topictag_template', 'bbp_add_template_locations' );
196
- add_filter( 'bbp_get_topictagedit_template', 'bbp_add_template_locations' );
197
- add_filter( 'bbp_get_replymove_template', 'bbp_add_template_locations' );
198
-
199
  // Topic and reply author display names
200
  add_filter( 'bbp_get_topic_author_display_name', 'wptexturize' );
201
  add_filter( 'bbp_get_topic_author_display_name', 'convert_chars' );
76
  * template hierarchy, start here by removing this filter, then look at how
77
  * bbp_template_include() works and do something similar. :)
78
  */
79
+ add_filter( 'bbp_template_include', 'bbp_template_include_theme_supports', 2, 1 );
80
+ add_filter( 'bbp_template_include', 'bbp_template_include_theme_compat', 4, 2 );
81
+
82
+ // Filter bbPress template locations
83
+ add_filter( 'bbp_get_template_stack', 'bbp_add_template_stack_locations' );
84
 
85
  // Links
86
  add_filter( 'paginate_links', 'bbp_add_view_all' );
94
  add_filter( 'bbp_edit_reply_pre_title', 'wp_filter_kses' );
95
  add_filter( 'bbp_edit_topic_pre_title', 'wp_filter_kses' );
96
 
97
+ // Code filters on output (hooked in early for plugin compatibility)
98
+ add_filter( 'bbp_get_reply_content', 'bbp_code_trick', 3 );
99
+ add_filter( 'bbp_get_topic_content', 'bbp_code_trick', 3 );
100
+
101
+ // Code filters on input
102
+ add_filter( 'bbp_new_reply_pre_content', 'bbp_code_trick_reverse' );
103
+ add_filter( 'bbp_edit_reply_pre_content', 'bbp_code_trick_reverse' );
104
+ add_filter( 'bbp_new_topic_pre_content', 'bbp_code_trick_reverse' );
105
+ add_filter( 'bbp_edit_topic_pre_content', 'bbp_code_trick_reverse' );
106
+
107
  // balanceTags, wp_filter_kses and wp_rel_nofollow on new/edit topic/reply text
108
  add_filter( 'bbp_new_reply_pre_content', 'wp_rel_nofollow' );
109
  add_filter( 'bbp_new_reply_pre_content', 'bbp_filter_kses' );
134
 
135
  // Run filters on reply content
136
  add_filter( 'bbp_get_reply_content', 'make_clickable', 4 );
137
+ add_filter( 'bbp_get_reply_content', 'bbp_mention_filter', 5 );
138
  add_filter( 'bbp_get_reply_content', 'wptexturize', 6 );
139
  add_filter( 'bbp_get_reply_content', 'convert_chars', 8 );
140
  add_filter( 'bbp_get_reply_content', 'capital_P_dangit', 10 );
141
  add_filter( 'bbp_get_reply_content', 'convert_smilies', 20 );
142
+ add_filter( 'bbp_get_reply_content', 'force_balance_tags', 30 );
143
+ add_filter( 'bbp_get_reply_content', 'wpautop', 40 );
 
144
 
145
  // Run filters on topic content
146
  add_filter( 'bbp_get_topic_content', 'make_clickable', 4 );
147
+ add_filter( 'bbp_get_topic_content', 'bbp_mention_filter', 5 );
148
  add_filter( 'bbp_get_topic_content', 'wptexturize', 6 );
149
  add_filter( 'bbp_get_topic_content', 'convert_chars', 8 );
150
  add_filter( 'bbp_get_topic_content', 'capital_P_dangit', 10 );
151
  add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 );
152
+ add_filter( 'bbp_get_topic_content', 'force_balance_tags', 30 );
153
+ add_filter( 'bbp_get_topic_content', 'wpautop', 40 );
 
154
 
155
  // Add number format filter to functions requiring numeric output
156
  add_filter( 'bbp_get_user_topic_count', 'bbp_number_format', 10 );
164
  add_filter( 'bbp_get_topic_reply_count', 'bbp_number_format', 10 );
165
  add_filter( 'bbp_get_topic_post_count', 'bbp_number_format', 10 );
166
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  // Run wp_kses_data on topic/reply content in admin section
168
  if ( is_admin() ) {
169
  add_filter( 'bbp_get_reply_content', 'bbp_kses_data' );
184
  add_filter( 'bbp_get_topic_author_link', 'bbp_suppress_private_author_link', 10, 2 );
185
  add_filter( 'bbp_get_reply_author_link', 'bbp_suppress_private_author_link', 10, 2 );
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  // Topic and reply author display names
188
  add_filter( 'bbp_get_topic_author_display_name', 'wptexturize' );
189
  add_filter( 'bbp_get_topic_author_display_name', 'convert_chars' );
includes/core/functions.php CHANGED
@@ -327,7 +327,7 @@ function bbp_mention_filter( $content = '' ) {
327
  continue;
328
 
329
  // Replace name in content
330
- $content = preg_replace( '/(@' . $username . '\b)/', "<a href='" . bbp_get_user_profile_url( $user->ID ) . "' rel='nofollow' class='bbp-mention-link {$username}'>@{$username}</a>", $content );
331
  }
332
 
333
  // Return modified content
@@ -516,3 +516,26 @@ function bbp_get_view_rewrite_id() {
516
  function bbp_delete_rewrite_rules() {
517
  delete_option( 'rewrite_rules' );
518
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
  continue;
328
 
329
  // Replace name in content
330
+ $content = preg_replace( '/(@' . $username . '\b)/', sprintf( '<a href="%1$s" rel="nofollow">@%2$s</a>', bbp_get_user_profile_url( $user->ID ), $username ), $content );
331
  }
332
 
333
  // Return modified content
516
  function bbp_delete_rewrite_rules() {
517
  delete_option( 'rewrite_rules' );
518
  }
519
+
520
+ /** Requests ******************************************************************/
521
+
522
+ /**
523
+ * Return true|false if this is a POST request
524
+ *
525
+ * @since bbPress (r4790)
526
+ * @return bool
527
+ */
528
+ function bbp_is_post_request() {
529
+ return (bool) ( 'POST' == strtoupper( $_SERVER['REQUEST_METHOD'] ) );
530
+ }
531
+
532
+ /**
533
+ * Return true|false if this is a GET request
534
+ *
535
+ * @since bbPress (r4790)
536
+ * @return bool
537
+ */
538
+ function bbp_is_get_request() {
539
+ return (bool) ( 'GET' == strtoupper( $_SERVER['REQUEST_METHOD'] ) );
540
+ }
541
+
includes/core/sub-actions.php CHANGED
@@ -136,9 +136,17 @@ function bbp_widgets_init() {
136
  * Setup the currently logged-in user
137
  *
138
  * @since bbPress (r2695)
 
139
  * @uses do_action() Calls 'bbp_setup_current_user'
140
  */
141
  function bbp_setup_current_user() {
 
 
 
 
 
 
 
142
  do_action( 'bbp_setup_current_user' );
143
  }
144
 
@@ -326,10 +334,10 @@ function bbp_after_setup_theme() {
326
  function bbp_post_request() {
327
 
328
  // Bail if not a POST action
329
- if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
330
  return;
331
 
332
- // Bail if action is not bbp-new-reply
333
  if ( empty( $_POST['action'] ) )
334
  return;
335
 
@@ -345,10 +353,10 @@ function bbp_post_request() {
345
  function bbp_get_request() {
346
 
347
  // Bail if not a POST action
348
- if ( 'GET' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
349
  return;
350
 
351
- // Bail if action is not bbp-new-reply
352
  if ( empty( $_GET['action'] ) )
353
  return;
354
 
136
  * Setup the currently logged-in user
137
  *
138
  * @since bbPress (r2695)
139
+ * @uses did_action() To make sure the user isn't loaded out of order
140
  * @uses do_action() Calls 'bbp_setup_current_user'
141
  */
142
  function bbp_setup_current_user() {
143
+
144
+ // If the current user is being setup before the "init" action has fired,
145
+ // strange (and difficult to debug) role/capability issues will occur.
146
+ if ( ! did_action( 'after_setup_theme' ) ) {
147
+ _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ), '2.3' );
148
+ }
149
+
150
  do_action( 'bbp_setup_current_user' );
151
  }
152
 
334
  function bbp_post_request() {
335
 
336
  // Bail if not a POST action
337
+ if ( ! bbp_is_post_request() )
338
  return;
339
 
340
+ // Bail if no action
341
  if ( empty( $_POST['action'] ) )
342
  return;
343
 
353
  function bbp_get_request() {
354
 
355
  // Bail if not a POST action
356
+ if ( ! bbp_is_get_request() )
357
  return;
358
 
359
+ // Bail if no action
360
  if ( empty( $_GET['action'] ) )
361
  return;
362
 
includes/core/template-functions.php CHANGED
@@ -68,8 +68,9 @@ function bbp_locate_template( $template_names, $load = false, $require_once = tr
68
  foreach ( (array) $template_names as $template_name ) {
69
 
70
  // Continue if template is empty
71
- if ( empty( $template_name ) )
72
  continue;
 
73
 
74
  // Trim off any slashes from the template name
75
  $template_name = ltrim( $template_name, '/' );
@@ -78,8 +79,9 @@ function bbp_locate_template( $template_names, $load = false, $require_once = tr
78
  foreach ( (array) $template_locations as $template_location ) {
79
 
80
  // Continue if $template_location is empty
81
- if ( empty( $template_location ) )
82
  continue;
 
83
 
84
  // Check child theme first
85
  if ( file_exists( trailingslashit( $template_location ) . $template_name ) ) {
@@ -89,9 +91,19 @@ function bbp_locate_template( $template_names, $load = false, $require_once = tr
89
  }
90
  }
91
 
 
 
 
 
 
 
 
 
 
92
  // Maybe load the template if one was located
93
- if ( ( true == $load ) && !empty( $located ) )
94
  load_template( $located, $require_once );
 
95
 
96
  return $located;
97
  }
@@ -247,18 +259,18 @@ function bbp_get_template_locations( $templates = array() ) {
247
  * @param array $templates
248
  * @return array()
249
  */
250
- function bbp_add_template_locations( $templates = array() ) {
251
  $retval = array();
252
 
253
  // Get alternate locations
254
- $locations = bbp_get_template_locations( $templates );
255
 
256
- // Loop through locations and templates and combine
257
- foreach ( (array) $locations as $location )
258
- foreach ( (array) $templates as $template )
259
- $retval[] = ltrim( trailingslashit( $location ) . $template, '/' );
260
 
261
- return apply_filters( 'bbp_add_template_locations', array_unique( $retval ), $templates );
262
  }
263
 
264
  /**
68
  foreach ( (array) $template_names as $template_name ) {
69
 
70
  // Continue if template is empty
71
+ if ( empty( $template_name ) ) {
72
  continue;
73
+ }
74
 
75
  // Trim off any slashes from the template name
76
  $template_name = ltrim( $template_name, '/' );
79
  foreach ( (array) $template_locations as $template_location ) {
80
 
81
  // Continue if $template_location is empty
82
+ if ( empty( $template_location ) ) {
83
  continue;
84
+ }
85
 
86
  // Check child theme first
87
  if ( file_exists( trailingslashit( $template_location ) . $template_name ) ) {
91
  }
92
  }
93
 
94
+ /**
95
+ * This action exists only to follow the standard bbPress coding convention,
96
+ * and should not be used to short-circuit any part of the template locator.
97
+ *
98
+ * If you want to override a specific template part, please either filter
99
+ * 'bbp_get_template_part' or add a new location to the template stack.
100
+ */
101
+ do_action( 'bbp_locate_template', $located, $template_name, $template_names, $template_locations, $load, $require_once );
102
+
103
  // Maybe load the template if one was located
104
+ if ( ( true == $load ) && !empty( $located ) ) {
105
  load_template( $located, $require_once );
106
+ }
107
 
108
  return $located;
109
  }
259
  * @param array $templates
260
  * @return array()
261
  */
262
+ function bbp_add_template_stack_locations( $stacks = array() ) {
263
  $retval = array();
264
 
265
  // Get alternate locations
266
+ $locations = bbp_get_template_locations();
267
 
268
+ // Loop through locations and stacks and combine
269
+ foreach ( (array) $stacks as $stack )
270
+ foreach ( (array) $locations as $custom_location )
271
+ $retval[] = untrailingslashit( trailingslashit( $stack ) . $custom_location );
272
 
273
+ return apply_filters( 'bbp_add_template_stack_locations', array_unique( $retval ), $stacks );
274
  }
275
 
276
  /**
includes/core/update.php CHANGED
@@ -233,7 +233,7 @@ function bbp_version_updater() {
233
 
234
  // 2.0, 2.0.1, 2.0.2, 2.0.3
235
  if ( $raw_db_version < 200 ) {
236
- // Do nothing
237
  }
238
 
239
  /** 2.1 Branch ************************************************************/
@@ -264,6 +264,13 @@ function bbp_version_updater() {
264
  bbp_remove_caps();
265
  }
266
 
 
 
 
 
 
 
 
267
  /** All done! *************************************************************/
268
 
269
  // Bump the version
233
 
234
  // 2.0, 2.0.1, 2.0.2, 2.0.3
235
  if ( $raw_db_version < 200 ) {
236
+ // No changes
237
  }
238
 
239
  /** 2.1 Branch ************************************************************/
264
  bbp_remove_caps();
265
  }
266
 
267
+ /** 2.3 Branch ************************************************************/
268
+
269
+ // 2.3
270
+ if ( $raw_db_version < 230 ) {
271
+ // No changes
272
+ }
273
+
274
  /** All done! *************************************************************/
275
 
276
  // Bump the version
includes/extend/akismet.php CHANGED
@@ -84,7 +84,7 @@ class BBP_Akismet {
84
  * @uses bbp_get_reply_url() To get the permalink of the reply
85
  * @uses bbp_current_author_ip() To get the IP address of the current user
86
  * @uses BBP_Akismet::maybe_spam() To check if post is spam
87
- * @uses akismet_get_user_roles() To get the role(s) of the current user
88
  * @uses do_action() To call the 'bbp_akismet_spam_caught' hook
89
  * @uses add_filter() To call the 'bbp_new_reply_pre_set_terms' hook
90
  *
@@ -148,7 +148,7 @@ class BBP_Akismet {
148
  'user_agent' => $_SERVER['HTTP_USER_AGENT'],
149
  'user_ID' => $post_data['post_author'],
150
  'user_ip' => bbp_current_author_ip(),
151
- 'user_role' => akismet_get_user_roles( $post_data['post_author'] ),
152
  );
153
 
154
  // Check the post_data
@@ -208,7 +208,7 @@ class BBP_Akismet {
208
  * @uses get_post_meta() To get the post meta
209
  * @uses bbp_get_user_profile_url() To get a user's profile url
210
  * @uses get_permalink() To get the permalink of the post_parent
211
- * @uses akismet_get_user_roles() To get the role(s) of the post_author
212
  * @uses bbp_current_author_ip() To get the IP address of the current user
213
  * @uses BBP_Akismet::maybe_spam() To submit the post as ham or spam
214
  * @uses update_post_meta() To update the post meta with some Akismet data
@@ -271,7 +271,7 @@ class BBP_Akismet {
271
  'permalink' => get_permalink( $post_id ),
272
  'user_ID' => $_post->post_author,
273
  'user_ip' => get_post_meta( $post_id, '_bbp_author_ip', true ),
274
- 'user_role' => akismet_get_user_roles( $_post->post_author ),
275
  );
276
 
277
  // Use the original version stored in post_meta if available
@@ -682,5 +682,37 @@ class BBP_Akismet {
682
  return $response;
683
  }
684
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  }
686
  endif;
84
  * @uses bbp_get_reply_url() To get the permalink of the reply
85
  * @uses bbp_current_author_ip() To get the IP address of the current user
86
  * @uses BBP_Akismet::maybe_spam() To check if post is spam
87
+ * @uses BBP_Akismet::get_user_roles() To get the role(s) of the current user
88
  * @uses do_action() To call the 'bbp_akismet_spam_caught' hook
89
  * @uses add_filter() To call the 'bbp_new_reply_pre_set_terms' hook
90
  *
148
  'user_agent' => $_SERVER['HTTP_USER_AGENT'],
149
  'user_ID' => $post_data['post_author'],
150
  'user_ip' => bbp_current_author_ip(),
151
+ 'user_role' => $this->get_user_roles( $post_data['post_author'] ),
152
  );
153
 
154
  // Check the post_data
208
  * @uses get_post_meta() To get the post meta
209
  * @uses bbp_get_user_profile_url() To get a user's profile url
210
  * @uses get_permalink() To get the permalink of the post_parent
211
+ * @uses BBP_Akismet::get_user_roles() To get the role(s) of the post_author
212
  * @uses bbp_current_author_ip() To get the IP address of the current user
213
  * @uses BBP_Akismet::maybe_spam() To submit the post as ham or spam
214
  * @uses update_post_meta() To update the post meta with some Akismet data
271
  'permalink' => get_permalink( $post_id ),
272
  'user_ID' => $_post->post_author,
273
  'user_ip' => get_post_meta( $post_id, '_bbp_author_ip', true ),
274
+ 'user_role' => $this->get_user_roles( $_post->post_author ),
275
  );
276
 
277
  // Use the original version stored in post_meta if available
682
  return $response;
683
  }
684
  }
685
+
686
+ /**
687
+ * Return a user's roles on this site (including super_admin)
688
+ *
689
+ * @since bbPress (r4812)
690
+ *
691
+ * @param type $user_id
692
+ * @return boolean
693
+ */
694
+ private function get_user_roles( $user_id = 0 ) {
695
+
696
+ // Default return value
697
+ $roles = array();
698
+
699
+ // Bail if cannot query the user
700
+ if ( ! class_exists( 'WP_User' ) || empty( $user_id ) ) {
701
+ return false;
702
+ }
703
+
704
+ // User ID
705
+ $user = new WP_User( $user_id );
706
+ if ( isset( $user->roles ) ) {
707
+ $roles = (array) $user->roles;
708
+ }
709
+
710
+ // Super admin
711
+ if ( is_multisite() && is_super_admin( $user_id ) ) {
712
+ $roles[] = 'super_admin';
713
+ }
714
+
715
+ return implode( ',', $roles );
716
+ }
717
  }
718
  endif;
includes/extend/buddypress/activity.php CHANGED
@@ -31,49 +31,49 @@ class BBP_BuddyPress_Activity {
31
  private $component = '';
32
 
33
  /**
34
- * Forum Create Activty Action
35
  *
36
  * @var string
37
  */
38
  private $forum_create = '';
39
 
40
  /**
41
- * Topic Create Activty Action
42
  *
43
  * @var string
44
  */
45
  private $topic_create = '';
46
 
47
  /**
48
- * Topic Close Activty Action
49
  *
50
  * @var string
51
  */
52
  private $topic_close = '';
53
 
54
  /**
55
- * Topic Edit Activty Action
56
  *
57
  * @var string
58
  */
59
  private $topic_edit = '';
60
 
61
  /**
62
- * Topic Open Activty Action
63
  *
64
  * @var string
65
  */
66
  private $topic_open = '';
67
 
68
  /**
69
- * Reply Create Activty Action
70
  *
71
  * @var string
72
  */
73
  private $reply_create = '';
74
 
75
  /**
76
- * Reply Edit Activty Action
77
  *
78
  * @var string
79
  */
@@ -171,20 +171,6 @@ class BBP_BuddyPress_Activity {
171
 
172
  // Link directly to the topic or reply
173
  add_filter( 'bp_activity_get_permalink', array( $this, 'activity_get_permalink' ), 10, 2 );
174
-
175
- /** Mentions **********************************************************/
176
-
177
- // Convert mentions into links on create
178
- add_filter( 'bbp_new_topic_pre_content', 'bp_activity_at_name_filter' );
179
- add_filter( 'bbp_new_reply_pre_content', 'bp_activity_at_name_filter' );
180
-
181
- // Convert mentions into links on edit
182
- add_filter( 'bbp_edit_topic_pre_content', 'bp_activity_at_name_filter' );
183
- add_filter( 'bbp_edit_reply_pre_content', 'bp_activity_at_name_filter' );
184
-
185
- // Revert links into text on edit
186
- add_filter( 'bbp_get_form_topic_content', array( $this, 'strip_mentions_on_edit' ) );
187
- add_filter( 'bbp_get_form_reply_content', array( $this, 'strip_mentions_on_edit' ) );
188
  }
189
 
190
  /**
@@ -199,35 +185,6 @@ class BBP_BuddyPress_Activity {
199
 
200
  /** Methods ***************************************************************/
201
 
202
- /**
203
- * Strip out BuddyPress activity at-name HTML on topic/reply edit
204
- *
205
- * Copied from bp_forums_strip_mentions_on_post_edit() in case forums
206
- * component is not active or is not loaded in yet.
207
- *
208
- * @since bbPress (r3475)
209
- * @param type $content Optional
210
- * @uses bp_get_root_domain()
211
- * @uses bp_get_members_root_slug()
212
- * @return string
213
- */
214
- public function strip_mentions_on_edit( $content = '' ) {
215
-
216
- // Backwards compat for members root slug
217
- if ( function_exists( 'bp_get_members_root_slug' ) ) {
218
- $members_root = bp_get_members_root_slug();
219
- } elseif ( defined( 'BP_MEMBERS_SLUG' ) ) {
220
- $members_root = BP_MEMBERS_SLUG;
221
- } else {
222
- $members_root = 'members';
223
- }
224
-
225
- $pattern = "|<a href=&#039;" . bp_get_root_domain() . "/" . $members_root . "/[A-Za-z0-9-_\.]+/&#039; rel=&#039;nofollow&#039;>(@[A-Za-z0-9-_\.@]+)</a>|";
226
- $content = preg_replace( $pattern, "$1", htmlspecialchars_decode( $content ) );
227
-
228
- return $content;
229
- }
230
-
231
  /**
232
  * Register our activity actions with BuddyPress
233
  *
@@ -463,9 +420,9 @@ class BBP_BuddyPress_Activity {
463
  $forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
464
 
465
  // Activity action & text
466
- $activity_text = sprintf( __( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
467
- $activity_action = apply_filters( 'bbp_activity_topic_create', $activity_text, $user_id, $topic_id, $forum_id );
468
- $activity_content = apply_filters( 'bbp_activity_topic_create_excerpt', bp_create_excerpt( $topic_content ), $topic_content );
469
 
470
  // Compile the activity stream results
471
  $activity = array(
@@ -613,9 +570,9 @@ class BBP_BuddyPress_Activity {
613
  $forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
614
 
615
  // Activity action & text
616
- $activity_text = sprintf( __( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
617
- $activity_action = apply_filters( 'bbp_activity_reply_create', $activity_text, $user_id, $reply_id, $topic_id );
618
- $activity_content = apply_filters( 'bbp_activity_reply_create_excerpt', bp_create_excerpt( $reply_content ), $reply_content );
619
 
620
  // Compile the activity stream results
621
  $activity = array(
31
  private $component = '';
32
 
33
  /**
34
+ * Forum Create Activity Action
35
  *
36
  * @var string
37
  */
38
  private $forum_create = '';
39
 
40
  /**
41
+ * Topic Create Activity Action
42
  *
43
  * @var string
44
  */
45
  private $topic_create = '';
46
 
47
  /**
48
+ * Topic Close Activity Action
49
  *
50
  * @var string
51
  */
52
  private $topic_close = '';
53
 
54
  /**
55
+ * Topic Edit Activity Action
56
  *
57
  * @var string
58
  */
59
  private $topic_edit = '';
60
 
61
  /**
62
+ * Topic Open Activity Action
63
  *
64
  * @var string
65
  */
66
  private $topic_open = '';
67
 
68
  /**
69
+ * Reply Create Activity Action
70
  *
71
  * @var string
72
  */
73
  private $reply_create = '';
74
 
75
  /**
76
+ * Reply Edit Activity Action
77
  *
78
  * @var string
79
  */
171
 
172
  // Link directly to the topic or reply
173
  add_filter( 'bp_activity_get_permalink', array( $this, 'activity_get_permalink' ), 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  }
175
 
176
  /**
185
 
186
  /** Methods ***************************************************************/
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  /**
189
  * Register our activity actions with BuddyPress
190
  *
420
  $forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
421
 
422
  // Activity action & text
423
+ $activity_text = sprintf( __( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
424
+ $activity_action = apply_filters( 'bbp_activity_topic_create', $activity_text, $user_id, $topic_id, $forum_id );
425
+ $activity_content = apply_filters( 'bbp_activity_topic_create_excerpt', $topic_content );
426
 
427
  // Compile the activity stream results
428
  $activity = array(
570
  $forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
571
 
572
  // Activity action & text
573
+ $activity_text = sprintf( __( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
574
+ $activity_action = apply_filters( 'bbp_activity_reply_create', $activity_text, $user_id, $reply_id, $topic_id );
575
+ $activity_content = apply_filters( 'bbp_activity_reply_create_excerpt', $reply_content );
576
 
577
  // Compile the activity stream results
578
  $activity = array(
includes/extend/buddypress/group.php CHANGED
@@ -3,6 +3,10 @@
3
  /**
4
  * bbPress BuddyPress Group Extension Class
5
  *
 
 
 
 
6
  * @package bbPress
7
  * @subpackage BuddyPress
8
  * @todo maybe move to BuddyPress Forums once bbPress 1.1 can be removed
@@ -44,9 +48,11 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
44
  */
45
  private function setup_variables() {
46
 
47
- // Name and slug
48
  $this->name = __( 'Forum', 'bbpress' );
49
  $this->nav_item_name = __( 'Forum', 'bbpress' );
 
 
50
  $this->slug = 'forum';
51
  $this->topic_slug = 'topic';
52
  $this->reply_slug = 'reply';
@@ -80,6 +86,15 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
80
 
81
  // Remove group forum cap map when view is done
82
  add_action( 'bbp_after_group_forum_display', array( $this, 'remove_group_forum_meta_cap_map' ) );
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
  /**
@@ -113,9 +128,6 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
113
  // Map group forum activity items to groups
114
  add_filter( 'bbp_before_record_activity_parse_args', array( $this, 'map_activity_to_group' ) );
115
 
116
- // No subforums yet, so suppress them for now
117
- add_filter( 'bbp_get_forum_subforum_count_int', array( $this, 'no_subforums_yet' ) );
118
-
119
  /** Caps **************************************************************/
120
 
121
  // Only add these filters if inside a group forum
@@ -236,49 +248,103 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
236
  * Show forums and new forum form when editing a group
237
  *
238
  * @since bbPress (r3563)
 
 
239
  * @uses bbp_get_template_part()
240
  */
241
- public function edit_screen() {
 
 
 
242
 
243
- $checked = bp_get_new_group_enable_forum() || bp_group_is_forum_enabled( bp_get_group_id() ); ?>
 
 
 
244
 
245
- <h4><?php _e( 'Enable Group Forum', 'bbpress' ); ?></h4>
 
246
 
247
- <p><?php _e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
248
 
249
- <div class="checkbox">
250
- <label><input type="checkbox" name="bbp-edit-group-forum" id="bbp-edit-group-forum" value="1"<?php checked( $checked ); ?> /> <?php _e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
251
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
 
253
- <p class="description"><?php _e( 'Saying no will not delete existing forum content.', 'bbpress' ); ?></p>
 
 
254
 
255
- <input type="submit" value="<?php esc_attr_e( 'Save Settings', 'bbpress' ); ?>" />
256
 
257
  <?php
258
 
259
  // Verify intent
260
- wp_nonce_field( 'groups_edit_save_' . $this->slug );
 
 
 
 
261
  }
262
 
263
  /**
264
  * Save the Group Forum data on edit
265
  *
266
  * @since bbPress (r3465)
 
267
  * @uses bbp_new_forum_handler() To check for forum creation
268
  * @uses bbp_edit_forum_handler() To check for forum edit
269
  */
270
- public function edit_screen_save() {
271
 
272
  // Bail if not a POST action
273
- if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
274
  return;
275
 
276
- check_admin_referer( 'groups_edit_save_' . $this->slug );
 
 
277
 
278
- $edit_forum = !empty( $_POST['bbp-edit-group-forum'] ) ? true : false;
279
- $forum_id = 0;
280
- $group_id = bp_get_current_group_id();
281
- $forum_ids = array_values( bbp_get_group_forum_ids( $group_id ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
 
283
  // Normalize group forum relationships now
284
  if ( !empty( $forum_ids ) ) {
@@ -300,6 +366,10 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
300
  $forum_id = (int) ( is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids );
301
  }
302
 
 
 
 
 
303
  // Update the group forum setting
304
  $group = $this->toggle_group_forum( $group_id, $edit_forum );
305
 
@@ -328,12 +398,54 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
328
  'post_status' => $status
329
  ) );
330
 
 
 
 
 
 
 
 
 
331
  // Run the BP-specific functions for new groups
332
- $this->new_forum( array( 'forum_id' => $forum_id ) );
333
  }
334
 
335
- // Redirect after save
336
- bp_core_redirect( trailingslashit( bp_get_group_permalink( buddypress()->groups->current_group ) . '/admin/' . $this->slug ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  }
338
 
339
  /** Create ****************************************************************/
@@ -372,7 +484,11 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
372
  */
373
  public function create_screen_save() {
374
 
375
- check_admin_referer( 'groups_create_save_' . $this->slug );
 
 
 
 
376
 
377
  $create_forum = !empty( $_POST['bbp-create-group-forum'] ) ? true : false;
378
  $forum_id = 0;
@@ -474,7 +590,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
474
 
475
  // Validate forum_id
476
  $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
477
- $group_id = bp_get_current_group_id();
478
 
479
  bbp_add_forum_id_to_group( $group_id, $forum_id );
480
  bbp_add_group_id_to_forum( $forum_id, $group_id );
@@ -499,12 +615,41 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
499
 
500
  // Validate forum_id
501
  $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
502
- $group_id = bp_get_current_group_id();
503
 
504
  bbp_remove_forum_id_from_group( $group_id, $forum_id );
505
  bbp_remove_group_id_from_forum( $forum_id, $group_id );
506
  }
507
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
508
  /**
509
  * Toggle the enable_forum group setting on or off
510
  *
@@ -530,6 +675,11 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
530
  // Save the group
531
  $group->save();
532
 
 
 
 
 
 
533
  // Return the group
534
  return $group;
535
  }
@@ -539,6 +689,9 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
539
  /**
540
  * Output the forums for a group in the edit screens
541
  *
 
 
 
542
  * @since bbPress (r3653)
543
  * @uses bp_get_current_group_id()
544
  * @uses bbp_get_group_forum_ids()
@@ -546,6 +699,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
546
  * @uses bbp_get_template_part()
547
  */
548
  public function display_forums( $offset = 0 ) {
 
549
 
550
  // Allow actions immediately before group forum output
551
  do_action( 'bbp_before_group_forum_display' );
@@ -553,208 +707,101 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
553
  // Load up bbPress once
554
  $bbp = bbpress();
555
 
556
- // Forum data
557
- $forum_slug = bp_action_variable( $offset );
558
- $forum_ids = bbp_get_group_forum_ids( bp_get_current_group_id() );
559
- $forum_args = array( 'post__in' => $forum_ids, 'post_parent' => null );
560
 
561
- // Unset global queries
562
- $bbp->forum_query = new stdClass;
563
- $bbp->topic_query = new stdClass;
564
- $bbp->reply_query = new stdClass;
565
 
566
- // Unset global ID's
567
- $bbp->current_forum_id = 0;
568
- $bbp->current_topic_id = 0;
569
- $bbp->current_reply_id = 0;
570
- $bbp->current_topic_tag_id = 0;
571
 
572
- // Reset the post data
573
- wp_reset_postdata();
574
 
575
- // Allow admins special views
576
- $post_status = array( bbp_get_closed_status_id(), bbp_get_public_status_id() );
577
- if ( is_super_admin() || current_user_can( 'moderate' ) || bp_is_item_admin() || bp_is_item_mod() )
578
- $post_status = array_merge( $post_status, array( bbp_get_spam_status_id(), bbp_get_trash_status_id() ) ); ?>
579
 
580
  <div id="bbpress-forums">
581
 
582
- <?php
583
-
584
- // Looking at the group forum root
585
- if ( empty( $forum_slug ) || ( 'page' == $forum_slug ) ) :
586
-
587
- // Query forums and show them if they exist
588
- if ( !empty( $forum_ids ) && bbp_has_forums( $forum_args ) ) :
589
-
590
- // Only one forum found
591
- if ( 1 == $bbp->forum_query->post_count ) :
592
-
593
- // Remove 'name' check for paginated requests
594
- if ( 'page' == $forum_slug ) {
595
- $forum_args = array( 'post_type' => bbp_get_forum_post_type() );
596
- } else {
597
- $forum_args = array( 'name' => $forum_slug, 'post_type' => bbp_get_forum_post_type() );
598
- }
599
-
600
- // Get the forums
601
- $forums = get_posts( $forum_args );
602
-
603
- bbp_the_forum();
604
-
605
- // Forum exists
606
- if ( !empty( $forums ) ) :
607
- $forum = $forums[0];
608
-
609
- // Suppress subforums for now
610
- add_filter( 'bbp_get_forum_subforum_count', '__return_false' );
611
-
612
- // Set up forum data
613
- bbpress()->current_forum_id = $forum->ID;
614
- bbp_set_query_name( 'bbp_single_forum' ); ?>
615
-
616
- <h3><?php bbp_forum_title(); ?></h3>
617
-
618
- <?php bbp_get_template_part( 'content', 'single-forum' ); ?>
619
-
620
- <?php
621
 
622
- // Remove the subforum suppression filter
623
- remove_filter( 'bbp_get_forum_subforum_count', '__return_false' );
624
 
625
- ?>
 
626
 
627
- <?php else : ?>
 
628
 
629
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
 
630
 
631
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
 
632
 
633
- <?php endif;
 
634
 
635
- // More than 1 forum found or group forum admin screen
636
- elseif ( 1 < $bbp->forum_query->post_count ) : ?>
637
-
638
- <h3><?php _e( 'Forums', 'bbpress' ); ?></h3>
639
-
640
- <?php bbp_get_template_part( 'loop', 'forums' ); ?>
641
-
642
- <h3><?php _e( 'Topics', 'bbpress' ); ?></h3>
643
-
644
- <?php if ( bbp_has_topics( array( 'post_parent__in' => $forum_ids ) ) ) : ?>
645
-
646
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
647
-
648
- <?php bbp_get_template_part( 'loop', 'topics' ); ?>
649
-
650
- <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
651
-
652
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
653
-
654
- <?php else : ?>
655
-
656
- <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
657
-
658
- <?php bbp_get_template_part( 'form', 'topic' ); ?>
659
 
660
- <?php endif;
661
 
662
  // No forums found
663
  else : ?>
664
 
665
  <div id="message" class="info">
666
- <p><?php _e( 'This group does not currently have any forums.', 'bbpress' ); ?></p>
667
  </div>
668
 
669
  <?php endif;
670
 
671
- // No forums found
672
- else : ?>
673
-
674
- <div id="message" class="info">
675
- <p><?php _e( 'This group does not currently have any forums.', 'bbpress' ); ?></p>
676
- </div>
677
-
678
- <?php endif;
679
-
680
- // Single forum
681
- elseif ( ( bp_action_variable( $offset ) != $this->slug ) && ( bp_action_variable( $offset ) != $this->topic_slug ) && ( bp_action_variable( $offset ) != $this->reply_slug ) ) :
682
-
683
- // Get forum data
684
- $forum_slug = bp_action_variable( $offset );
685
- $forum_args = array( 'name' => $forum_slug, 'post_type' => bbp_get_forum_post_type() );
686
- $forums = get_posts( $forum_args );
687
-
688
- // Forum exists
689
- if ( !empty( $forums ) ) :
690
- $forum = $forums[0];
691
-
692
- // Set up forum data
693
- $forum_id = bbpress()->current_forum_id = $forum->ID;
694
 
695
- // Reset necessary forum_query attributes for forums loop to function
696
- $bbp->forum_query->query_vars['post_type'] = bbp_get_forum_post_type();
697
- $bbp->forum_query->in_the_loop = true;
698
- $bbp->forum_query->post = get_post( $forum_id );
699
 
700
- // Forum edit
701
- if ( bp_action_variable( $offset + 1 ) == $bbp->edit_id ) :
702
- global $wp_query, $post;
703
 
704
- $wp_query->bbp_is_edit = true;
705
- $wp_query->bbp_is_forum_edit = true;
706
- $post = $forum;
707
 
708
- bbp_set_query_name( 'bbp_forum_form' );
709
- bbp_get_template_part( 'form', 'forum' );
710
-
711
- else :
712
- bbp_set_query_name( 'bbp_single_forum' ); ?>
 
713
 
 
 
 
714
  <h3><?php bbp_forum_title(); ?></h3>
 
 
 
715
 
716
- <?php bbp_get_template_part( 'content', 'single-forum' );
717
-
718
- endif;
719
-
720
- else :
721
- bbp_get_template_part( 'feedback', 'no-topics' );
722
- bbp_get_template_part( 'form', 'topic' );
723
-
724
- endif;
725
 
726
- // Single topic
727
- elseif ( bp_action_variable( $offset ) == $this->topic_slug ) :
728
 
729
- // Get topic data
730
- $topic_slug = bp_action_variable( $offset + 1 );
731
- $topic_args = array( 'name' => $topic_slug, 'post_type' => bbp_get_topic_post_type(), 'post_status' => $post_status );
732
- $topics = get_posts( $topic_args );
733
 
734
- // Topic exists
735
- if ( !empty( $topics ) ) :
736
- $topic = $topics[0];
737
-
738
- // Set up topic data
739
- $topic_id = bbpress()->current_topic_id = $topic->ID;
740
- $forum_id = bbp_get_topic_forum_id( $topic_id );
741
-
742
- // Reset necessary forum_query attributes for topics loop to function
743
- $bbp->forum_query->query_vars['post_type'] = bbp_get_forum_post_type();
744
- $bbp->forum_query->in_the_loop = true;
745
- $bbp->forum_query->post = get_post( $forum_id );
746
 
747
- // Reset necessary topic_query attributes for topics loop to function
748
- $bbp->topic_query->query_vars['post_type'] = bbp_get_topic_post_type();
749
- $bbp->topic_query->in_the_loop = true;
750
- $bbp->topic_query->post = $topic;
751
 
752
- // Topic edit
753
- if ( bp_action_variable( $offset + 2 ) == $bbp->edit_id ) :
754
- global $wp_query, $post;
755
  $wp_query->bbp_is_edit = true;
756
  $wp_query->bbp_is_topic_edit = true;
757
- $post = $topic;
 
 
758
 
759
  // Merge
760
  if ( !empty( $_GET['action'] ) && 'merge' == $_GET['action'] ) :
@@ -775,77 +822,59 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
775
 
776
  // Single Topic
777
  else:
778
- bbp_set_query_name( 'bbp_single_topic' ); ?>
779
-
780
- <h3><?php bbp_topic_title(); ?></h3>
781
-
782
- <?php bbp_get_template_part( 'content', 'single-topic' );
783
-
784
  endif;
 
785
 
786
- // No Topics
787
- else :
788
- bbp_get_template_part( 'feedback', 'no-topics' );
789
- bbp_get_template_part( 'form', 'topic' );
790
-
791
- endif;
792
-
793
- // Single reply
794
- elseif ( bp_action_variable( $offset ) == $this->reply_slug ) :
795
-
796
- // Get reply data
797
- $reply_slug = bp_action_variable( $offset + 1 );
798
- $reply_args = array( 'name' => $reply_slug, 'post_type' => bbp_get_reply_post_type() );
799
- $replies = get_posts( $reply_args );
800
-
801
- if ( empty( $replies ) )
802
- return;
803
 
804
- // Get the first reply
805
- $reply = $replies[0];
806
 
807
- // Set up reply data
808
- $reply_id = bbpress()->current_reply_id = $reply->ID;
809
- $topic_id = bbp_get_reply_topic_id( $reply_id );
810
- $forum_id = bbp_get_reply_forum_id( $reply_id );
 
811
 
812
- // Reset necessary forum_query attributes for reply to function
813
- $bbp->forum_query->query_vars['post_type'] = bbp_get_forum_post_type();
814
- $bbp->forum_query->in_the_loop = true;
815
- $bbp->forum_query->post = get_post( $forum_id );
 
 
 
816
 
817
- // Reset necessary topic_query attributes for reply to function
818
- $bbp->topic_query->query_vars['post_type'] = bbp_get_topic_post_type();
819
- $bbp->topic_query->in_the_loop = true;
820
- $bbp->topic_query->post = get_post( $topic_id );
821
 
822
- // Reset necessary reply_query attributes for reply to function
823
- $bbp->reply_query->query_vars['post_type'] = bbp_get_reply_post_type();
824
- $bbp->reply_query->in_the_loop = true;
825
- $bbp->reply_query->post = $reply;
826
 
827
- if ( bp_action_variable( $offset + 2 ) == $bbp->edit_id ) :
828
- global $wp_query, $post;
829
 
830
- $wp_query->bbp_is_edit = true;
831
- $wp_query->bbp_is_reply_edit = true;
832
- $post = $reply;
833
 
834
- // Move
835
- if ( !empty( $_GET['action'] ) && ( 'move' == $_GET['action'] ) ) :
836
- bbp_set_query_name( 'bbp_reply_move' );
837
- bbp_get_template_part( 'form', 'reply-move' );
838
 
839
- // Edit
840
- else :
841
- bbp_set_query_name( 'bbp_reply_form' );
842
- bbp_get_template_part( 'form', 'reply' );
843
 
 
 
 
 
 
844
  endif;
 
 
845
 
846
- endif;
847
-
848
- endif; ?>
849
 
850
  </div>
851
 
@@ -855,6 +884,51 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
855
  do_action( 'bbp_after_group_forum_display' );
856
  }
857
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
858
  /** Redirect Helpers ******************************************************/
859
 
860
  /**
@@ -959,9 +1033,10 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
959
  *
960
  * @param bool $retval Are we allowed to view the reply form?
961
  * @uses bp_is_group() To determine if we're on a group page
962
- * @uses bp_loggedin_user_id() To determine if a user is logged in.
963
- * @uses bp_group_is_member() Is the current user a member of the group?
964
- * @uses bp_group_is_user_banned() Is the current user banned from the group?
 
965
  *
966
  * @return bool
967
  */
@@ -975,10 +1050,13 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
975
  // Bail if user is not logged in
976
  if ( ! is_user_logged_in() ) {
977
  return $retval;
978
- }
 
 
 
979
 
980
  // Non-members cannot see forms
981
- if ( ! bbp_group_is_member() ) {
982
  $retval = false;
983
 
984
  // Banned users cannot see forms
@@ -1242,7 +1320,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
1242
  bp_core_redirect( $redirect_to );
1243
  }
1244
 
1245
- /** Activity ***************************************************************/
1246
 
1247
  /**
1248
  * Map a forum post to its corresponding group in the group activity stream.
3
  /**
4
  * bbPress BuddyPress Group Extension Class
5
  *
6
+ * This file is responsible for connecting bbPress to BuddyPress's Groups
7
+ * Component. It's a great example of how to perform both simple and advanced
8
+ * techniques to manipulate bbPress's default output.
9
+ *
10
  * @package bbPress
11
  * @subpackage BuddyPress
12
  * @todo maybe move to BuddyPress Forums once bbPress 1.1 can be removed
48
  */
49
  private function setup_variables() {
50
 
51
+ // Component Name
52
  $this->name = __( 'Forum', 'bbpress' );
53
  $this->nav_item_name = __( 'Forum', 'bbpress' );
54
+
55
+ // Component slugs (hardcoded to match bbPress 1.x functionality)
56
  $this->slug = 'forum';
57
  $this->topic_slug = 'topic';
58
  $this->reply_slug = 'reply';
86
 
87
  // Remove group forum cap map when view is done
88
  add_action( 'bbp_after_group_forum_display', array( $this, 'remove_group_forum_meta_cap_map' ) );
89
+
90
+ // bbPress needs to listen to BuddyPress group deletion.
91
+ add_action( 'groups_before_delete_group', array( $this, 'disconnect_forum_from_group' ) );
92
+
93
+ // Adds a bbPress metabox to the new BuddyPress Group Admin UI
94
+ add_action( 'bp_groups_admin_meta_boxes', array( $this, 'group_admin_ui_edit_screen' ) );
95
+
96
+ // Saves the bbPress options if they come from the BuddyPress Group Admin UI
97
+ add_action( 'bp_group_admin_edit_after', array( $this, 'edit_screen_save' ) );
98
  }
99
 
100
  /**
128
  // Map group forum activity items to groups
129
  add_filter( 'bbp_before_record_activity_parse_args', array( $this, 'map_activity_to_group' ) );
130
 
 
 
 
131
  /** Caps **************************************************************/
132
 
133
  // Only add these filters if inside a group forum
248
  * Show forums and new forum form when editing a group
249
  *
250
  * @since bbPress (r3563)
251
+ * @param object $group (the group to edit if in Group Admin UI)
252
+ * @uses is_admin() To check if we're in the Group Admin UI
253
  * @uses bbp_get_template_part()
254
  */
255
+ public function edit_screen( $group = false ) {
256
+ $forum_id = 0;
257
+ $group_id = empty( $group->id ) ? bp_get_new_group_id() : $group->id ;
258
+ $forum_ids = bbp_get_group_forum_ids( $group_id );
259
 
260
+ // Get the first forum ID
261
+ if ( !empty( $forum_ids ) ) {
262
+ $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
263
+ }
264
 
265
+ // Should box be checked already?
266
+ $checked = is_admin() ? bp_group_is_forum_enabled( $group ) : bp_get_new_group_enable_forum() || bp_group_is_forum_enabled( bp_get_group_id() ); ?>
267
 
268
+ <h4><?php _e( 'Group Forum Settings', 'bbpress' ); ?></h4>
269
 
270
+ <fieldset>
271
+ <legend class="screen-reader-text"><?php _e( 'Group Forum Settings', 'bbpress' ); ?></legend>
272
+ <p><?php _e( 'Create a discussion forum to allow members of this group to communicate in a structured, bulletin-board style fashion.', 'bbpress' ); ?></p>
273
+
274
+ <div class="field-group">
275
+ <div class="checkbox">
276
+ <label><input type="checkbox" name="bbp-edit-group-forum" id="bbp-edit-group-forum" value="1"<?php checked( $checked ); ?> /> <?php _e( 'Yes. I want this group to have a forum.', 'bbpress' ); ?></label>
277
+ </div>
278
+
279
+ <p class="description"><?php _e( 'Saying no will not delete existing forum content.', 'bbpress' ); ?></p>
280
+ </div>
281
+
282
+ <?php if ( bbp_is_user_keymaster() ) : ?>
283
+ <div class="field-group">
284
+ <label for="bbp_group_forum_id"><?php _e( 'Group Forum:', 'bbpress' ); ?></label>
285
+ <?php
286
+ bbp_dropdown( array(
287
+ 'select_id' => 'bbp_group_forum_id',
288
+ 'show_none' => __( '(No Forum)', 'bbpress' ),
289
+ 'selected' => $forum_id
290
+ ) );
291
+ ?>
292
+ <p class="description"><?php _e( 'Network administrators can reconfigure which forum belongs to this group.', 'bbpress' ); ?></p>
293
+ </div>
294
+ <?php endif; ?>
295
 
296
+ <?php if ( !is_admin() ) : ?>
297
+ <input type="submit" value="<?php esc_attr_e( 'Save Settings', 'bbpress' ); ?>" />
298
+ <?php endif; ?>
299
 
300
+ </fieldset>
301
 
302
  <?php
303
 
304
  // Verify intent
305
+ if ( is_admin() ) {
306
+ wp_nonce_field( 'groups_edit_save_' . $this->slug, 'forum_group_admin_ui' );
307
+ } else {
308
+ wp_nonce_field( 'groups_edit_save_' . $this->slug );
309
+ }
310
  }
311
 
312
  /**
313
  * Save the Group Forum data on edit
314
  *
315
  * @since bbPress (r3465)
316
+ * @param int $group_id (to handle Group Admin UI hook bp_group_admin_edit_after )
317
  * @uses bbp_new_forum_handler() To check for forum creation
318
  * @uses bbp_edit_forum_handler() To check for forum edit
319
  */
320
+ public function edit_screen_save( $group_id = 0 ) {
321
 
322
  // Bail if not a POST action
323
+ if ( ! bbp_is_post_request() )
324
  return;
325
 
326
+ // Admin Nonce check
327
+ if ( is_admin() ) {
328
+ check_admin_referer( 'groups_edit_save_' . $this->slug, 'forum_group_admin_ui' );
329
 
330
+ // Theme-side Nonce check
331
+ } elseif ( ! bbp_verify_nonce_request( 'groups_edit_save_' . $this->slug ) ) {
332
+ bbp_add_error( 'bbp_edit_group_forum_screen_save', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
333
+ return;
334
+ }
335
+
336
+ $edit_forum = !empty( $_POST['bbp-edit-group-forum'] ) ? true : false;
337
+ $forum_id = 0;
338
+ $group_id = !empty( $group_id ) ? $group_id : bp_get_current_group_id();
339
+
340
+ // Keymasters have the ability to reconfigure forums
341
+ if ( bbp_is_user_keymaster() ) {
342
+ $forum_ids = ! empty( $_POST['bbp_group_forum_id'] ) ? (array) (int) $_POST['bbp_group_forum_id'] : array();
343
+
344
+ // Use the existing forum IDs
345
+ } else {
346
+ $forum_ids = array_values( bbp_get_group_forum_ids( $group_id ) );
347
+ }
348
 
349
  // Normalize group forum relationships now
350
  if ( !empty( $forum_ids ) ) {
366
  $forum_id = (int) ( is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids );
367
  }
368
 
369
+ // Update the group ID and forum ID relationships
370
+ bbp_update_group_forum_ids( $group_id, (array) $forum_ids );
371
+ bbp_update_forum_group_ids( $forum_id, (array) $group_id );
372
+
373
  // Update the group forum setting
374
  $group = $this->toggle_group_forum( $group_id, $edit_forum );
375
 
398
  'post_status' => $status
399
  ) );
400
 
401
+ // Setup forum args with forum ID
402
+ $new_forum_args = array( 'forum_id' => $forum_id );
403
+
404
+ // If in admin, also include the group ID
405
+ if ( is_admin() && !empty( $group_id ) ) {
406
+ $new_forum_args['group_id'] = $group_id;
407
+ }
408
+
409
  // Run the BP-specific functions for new groups
410
+ $this->new_forum( $new_forum_args );
411
  }
412
 
413
+ // Redirect after save when not in admin
414
+ if ( !is_admin() ) {
415
+ bp_core_redirect( trailingslashit( bp_get_group_permalink( buddypress()->groups->current_group ) . '/admin/' . $this->slug ) );
416
+ }
417
+ }
418
+
419
+ /**
420
+ * Adds a metabox to BuddyPress Group Admin UI
421
+ *
422
+ * @since bbPress (r4814)
423
+ *
424
+ * @uses add_meta_box
425
+ * @uses BBP_Forums_Group_Extension::group_admin_ui_display_metabox() To display the edit screen
426
+ */
427
+ public function group_admin_ui_edit_screen() {
428
+ add_meta_box(
429
+ 'bbpress_group_admin_ui_meta_box',
430
+ _x( 'Discussion Forum', 'group admin edit screen', 'bbpress' ),
431
+ array( &$this, 'group_admin_ui_display_metabox' ),
432
+ get_current_screen()->id,
433
+ 'side',
434
+ 'core'
435
+ );
436
+ }
437
+
438
+ /**
439
+ * Displays the bbPress metabox in BuddyPress Group Admin UI
440
+ *
441
+ * @since bbPress (r4814)
442
+ *
443
+ * @param object $item (group object)
444
+ * @uses add_meta_box
445
+ * @uses BBP_Forums_Group_Extension::edit_screen() To get the html
446
+ */
447
+ public function group_admin_ui_display_metabox( $item ) {
448
+ $this->edit_screen( $item );
449
  }
450
 
451
  /** Create ****************************************************************/
484
  */
485
  public function create_screen_save() {
486
 
487
+ // Nonce check
488
+ if ( ! bbp_verify_nonce_request( 'groups_create_save_' . $this->slug ) ) {
489
+ bbp_add_error( 'bbp_create_group_forum_screen_save', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
490
+ return;
491
+ }
492
 
493
  $create_forum = !empty( $_POST['bbp-create-group-forum'] ) ? true : false;
494
  $forum_id = 0;
590
 
591
  // Validate forum_id
592
  $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
593
+ $group_id = !empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
594
 
595
  bbp_add_forum_id_to_group( $group_id, $forum_id );
596
  bbp_add_group_id_to_forum( $forum_id, $group_id );
615
 
616
  // Validate forum_id
617
  $forum_id = bbp_get_forum_id( $forum_args['forum_id'] );
618
+ $group_id = !empty( $forum_args['group_id'] ) ? $forum_args['group_id'] : bp_get_current_group_id();
619
 
620
  bbp_remove_forum_id_from_group( $group_id, $forum_id );
621
  bbp_remove_group_id_from_forum( $forum_id, $group_id );
622
  }
623
 
624
+ /**
625
+ * Listening to BuddyPress Group deletion to remove the forum
626
+ *
627
+ * @param int $group_id The group ID
628
+ * @uses bbp_get_group_forum_ids()
629
+ * @uses BBP_Forums_Group_Extension::remove_forum()
630
+ */
631
+ public function disconnect_forum_from_group( $group_id = 0 ) {
632
+
633
+ // Bail if no group ID available
634
+ if ( empty( $group_id ) ) {
635
+ return;
636
+ }
637
+
638
+ // Get the forums for the current group
639
+ $forum_ids = bbp_get_group_forum_ids( $group_id );
640
+
641
+ // Use the first forum ID
642
+ if ( empty( $forum_ids ) )
643
+ return;
644
+
645
+ // Get the first forum ID
646
+ $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
647
+ $this->remove_forum( array(
648
+ 'forum_id' => $forum_id,
649
+ 'group_id' => $group_id
650
+ ) );
651
+ }
652
+
653
  /**
654
  * Toggle the enable_forum group setting on or off
655
  *
675
  // Save the group
676
  $group->save();
677
 
678
+ // Maybe disconnect forum from group
679
+ if ( empty( $enabled ) ) {
680
+ $this->disconnect_forum_from_group( $group_id );
681
+ }
682
+
683
  // Return the group
684
  return $group;
685
  }
689
  /**
690
  * Output the forums for a group in the edit screens
691
  *
692
+ * As of right now, bbPress only supports 1-to-1 group forum relationships.
693
+ * In the future, many-to-many should be allowed.
694
+ *
695
  * @since bbPress (r3653)
696
  * @uses bp_get_current_group_id()
697
  * @uses bbp_get_group_forum_ids()
699
  * @uses bbp_get_template_part()
700
  */
701
  public function display_forums( $offset = 0 ) {
702
+ global $wp_query;
703
 
704
  // Allow actions immediately before group forum output
705
  do_action( 'bbp_before_group_forum_display' );
707
  // Load up bbPress once
708
  $bbp = bbpress();
709
 
710
+ /** Query Resets ******************************************************/
 
 
 
711
 
712
+ // Forum data
713
+ $forum_action = bp_action_variable( $offset );
714
+ $forum_id = array_shift( bbp_get_group_forum_ids( bp_get_current_group_id() ) );
 
715
 
716
+ // Always load up the group forum
717
+ bbp_has_forums( array(
718
+ 'p' => $forum_id,
719
+ 'post_parent' => null
720
+ ) );
721
 
722
+ // Set the global forum ID
723
+ $bbp->current_forum_id = $forum_id;
724
 
725
+ // Assume forum query
726
+ bbp_set_query_name( 'bbp_single_forum' ); ?>
 
 
727
 
728
  <div id="bbpress-forums">
729
 
730
+ <?php switch ( $forum_action ) :
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
731
 
732
+ /** Single Forum **********************************************/
 
733
 
734
+ case false :
735
+ case 'page' :
736
 
737
+ // Strip the super stickies from topic query
738
+ add_filter( 'bbp_get_super_stickies', array( $this, 'no_super_stickies' ), 10, 1 );
739
 
740
+ // Unset the super sticky option on topic form
741
+ add_filter( 'bbp_after_topic_type_select_parse_args', array( $this, 'unset_super_sticky' ), 10, 1 );
742
 
743
+ // Query forums and show them if they exist
744
+ if ( bbp_forums() ) :
745
 
746
+ // Setup the forum
747
+ bbp_the_forum(); ?>
748
 
749
+ <h3><?php bbp_forum_title(); ?></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
750
 
751
+ <?php bbp_get_template_part( 'content', 'single-forum' );
752
 
753
  // No forums found
754
  else : ?>
755
 
756
  <div id="message" class="info">
757
+ <p><?php _e( 'This group does not currently have a forum.', 'bbpress' ); ?></p>
758
  </div>
759
 
760
  <?php endif;
761
 
762
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
763
 
764
+ /** Single Topic **********************************************/
 
 
 
765
 
766
+ case $this->topic_slug :
 
 
767
 
768
+ // hide the 'to front' admin links
769
+ add_filter( 'bbp_get_topic_stick_link', array( $this, 'hide_super_sticky_admin_link' ), 10, 2 );
 
770
 
771
+ // Get the topic
772
+ bbp_has_topics( array(
773
+ 'name' => bp_action_variable( $offset + 1 ),
774
+ 'posts_per_page' => 1,
775
+ 'show_stickies' => false
776
+ ) );
777
 
778
+ // If no topic, 404
779
+ if ( ! bbp_topics() ) {
780
+ bp_do_404( bbp_get_forum_permalink( $forum_id ) ); ?>
781
  <h3><?php bbp_forum_title(); ?></h3>
782
+ <?php bbp_get_template_part( 'feedback', 'no-topics' );
783
+ return;
784
+ }
785
 
786
+ // Setup the topic
787
+ bbp_the_topic(); ?>
 
 
 
 
 
 
 
788
 
789
+ <h3><?php bbp_topic_title(); ?></h3>
 
790
 
791
+ <?php
 
 
 
792
 
793
+ // Topic edit
794
+ if ( bp_action_variable( $offset + 2 ) == bbp_get_edit_rewrite_id() ) :
 
 
 
 
 
 
 
 
 
 
795
 
796
+ // Unset the super sticky link on edit topic template
797
+ add_filter( 'bbp_after_topic_type_select_parse_args', array( $this, 'unset_super_sticky' ), 10, 1 );
 
 
798
 
799
+ // Set the edit switches
 
 
800
  $wp_query->bbp_is_edit = true;
801
  $wp_query->bbp_is_topic_edit = true;
802
+
803
+ // Setup the global forum ID
804
+ $bbp->current_topic_id = get_the_ID();
805
 
806
  // Merge
807
  if ( !empty( $_GET['action'] ) && 'merge' == $_GET['action'] ) :
822
 
823
  // Single Topic
824
  else:
825
+ bbp_set_query_name( 'bbp_single_topic' );
826
+ bbp_get_template_part( 'content', 'single-topic' );
 
 
 
 
827
  endif;
828
+ break;
829
 
830
+ /** Single Reply **********************************************/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
831
 
832
+ case $this->reply_slug :
 
833
 
834
+ // Get the reply
835
+ bbp_has_replies( array(
836
+ 'name' => bp_action_variable( $offset + 1 ),
837
+ 'posts_per_page' => 1
838
+ ) );
839
 
840
+ // If no topic, 404
841
+ if ( ! bbp_replies() ) {
842
+ bp_do_404( bbp_get_forum_permalink( $forum_id ) ); ?>
843
+ <h3><?php bbp_forum_title(); ?></h3>
844
+ <?php bbp_get_template_part( 'feedback', 'no-replies' );
845
+ return;
846
+ }
847
 
848
+ // Setup the reply
849
+ bbp_the_reply(); ?>
 
 
850
 
851
+ <h3><?php bbp_reply_title(); ?></h3>
 
 
 
852
 
853
+ <?php if ( bp_action_variable( $offset + 2 ) == bbp_get_edit_rewrite_id() ) :
 
854
 
855
+ // Set the edit switches
856
+ $wp_query->bbp_is_edit = true;
857
+ $wp_query->bbp_is_reply_edit = true;
858
 
859
+ // Setup the global reply ID
860
+ $bbp->current_reply_id = get_the_ID();
 
 
861
 
862
+ // Move
863
+ if ( !empty( $_GET['action'] ) && ( 'move' == $_GET['action'] ) ) :
864
+ bbp_set_query_name( 'bbp_reply_move' );
865
+ bbp_get_template_part( 'form', 'reply-move' );
866
 
867
+ // Edit
868
+ else :
869
+ bbp_set_query_name( 'bbp_reply_form' );
870
+ bbp_get_template_part( 'form', 'reply' );
871
+ endif;
872
  endif;
873
+ break;
874
+ endswitch;
875
 
876
+ // Reset the query
877
+ wp_reset_query(); ?>
 
878
 
879
  </div>
880
 
884
  do_action( 'bbp_after_group_forum_display' );
885
  }
886
 
887
+ /** Super sticky filters ***************************************************/
888
+
889
+ /**
890
+ * Strip super stickies from the topic query
891
+ *
892
+ * @since bbPress (r4810)
893
+ * @access private
894
+ * @param array $super the super sticky post ID's
895
+ * @return array (empty)
896
+ */
897
+ public function no_super_stickies( $super = array() ) {
898
+ $super = array();
899
+ return $super;
900
+ }
901
+
902
+ /**
903
+ * Unset the type super sticky from topic type
904
+ *
905
+ * @since bbPress (r4810)
906
+ * @access private
907
+ * @param array $args
908
+ * @return array $args without the to-front link
909
+ */
910
+ public function unset_super_sticky( $args = array() ) {
911
+ $args['super_text'] = '';
912
+ return $args;
913
+ }
914
+
915
+ /**
916
+ * Ugly preg_replace to hide the to front admin link
917
+ *
918
+ * @since bbPress (r4810)
919
+ * @access private
920
+ * @param string $retval
921
+ * @param array $args
922
+ * @return string $retval without the to-front link
923
+ */
924
+ public function hide_super_sticky_admin_link( $retval = '', $args = array() ) {
925
+ if ( strpos( $retval, '(' ) ) {
926
+ $retval = preg_replace( '/(\(.+?)+(\))/i', '', $retval );
927
+ }
928
+
929
+ return $retval;
930
+ }
931
+
932
  /** Redirect Helpers ******************************************************/
933
 
934
  /**
1033
  *
1034
  * @param bool $retval Are we allowed to view the reply form?
1035
  * @uses bp_is_group() To determine if we're on a group page
1036
+ * @uses is_user_logged_in() To determine if a user is logged in.
1037
+ * @uses bbp_is_user_keymaster() Is the current user a keymaster?
1038
+ * @uses bbp_group_is_member() Is the current user a member of the group?
1039
+ * @uses bbp_group_is_user_banned() Is the current user banned from the group?
1040
  *
1041
  * @return bool
1042
  */
1050
  // Bail if user is not logged in
1051
  if ( ! is_user_logged_in() ) {
1052
  return $retval;
1053
+
1054
+ // Keymasters can always pass go
1055
+ } elseif ( bbp_is_user_keymaster() ) {
1056
+ $retval = true;
1057
 
1058
  // Non-members cannot see forms
1059
+ } elseif ( ! bbp_group_is_member() ) {
1060
  $retval = false;
1061
 
1062
  // Banned users cannot see forms
1320
  bp_core_redirect( $redirect_to );
1321
  }
1322
 
1323
+ /** Activity **************************************************************/
1324
 
1325
  /**
1326
  * Map a forum post to its corresponding group in the group activity stream.
includes/forums/capabilities.php CHANGED
@@ -111,8 +111,12 @@ function bbp_map_forum_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg
111
  case 'edit_others_forums' :
112
 
113
  // Moderators can always edit
114
- if ( user_can( $user_id, 'moderate' ) ) {
115
- $caps = array( 'moderate' );
 
 
 
 
116
  }
117
 
118
  break;
111
  case 'edit_others_forums' :
112
 
113
  // Moderators can always edit
114
+ if ( user_can( $user_id, 'keep_gate' ) ) {
115
+ $caps = array( 'keep_gate' );
116
+
117
+ // Otherwise, block
118
+ } else {
119
+ $caps = array( 'do_not_allow' );
120
  }
121
 
122
  break;
includes/forums/functions.php CHANGED
@@ -78,7 +78,7 @@ function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
78
  * Handles the front end forum submission
79
  *
80
  * @param string $action The requested action to compare this function to
81
- * @uses bbPress:errors::add() To log various error messages
82
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
83
  * @uses bbp_is_anonymous() To check if an anonymous post is being made
84
  * @uses current_user_can() To check if the current user can publish forum
@@ -170,7 +170,7 @@ function bbp_new_forum_handler( $action = '' ) {
170
  // Forum parent was passed (the norm)
171
  if ( !empty( $_POST['bbp_forum_parent_id'] ) )
172
  $forum_parent_id = (int) $_POST['bbp_forum_parent_id'];
173
-
174
  // Filter and sanitize
175
  $forum_parent_id = apply_filters( 'bbp_new_forum_pre_parent_id', $forum_parent_id );
176
 
@@ -199,7 +199,7 @@ function bbp_new_forum_handler( $action = '' ) {
199
  // Forum is hidden and user cannot access
200
  if ( bbp_is_forum_hidden( $forum_parent_id ) && !current_user_can( 'read_hidden_forums' ) ) {
201
  bbp_add_error( 'bbp_new_forum_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
202
- }
203
  }
204
 
205
  /** Forum Flooding ********************************************************/
@@ -1155,7 +1155,7 @@ function bbp_update_forum_last_reply_id( $forum_id = 0, $reply_id = 0 ) {
1155
  // Cast as integer in case of empty or string
1156
  $reply_id = (int) $reply_id;
1157
  $children_last_reply = (int) $children_last_reply;
1158
-
1159
  // If child forums have higher ID, check for newer reply id
1160
  if ( !empty( $children ) && ( $children_last_reply > $reply_id ) )
1161
  $reply_id = $children_last_reply;
@@ -1535,7 +1535,7 @@ function bbp_get_private_forum_ids() {
1535
  *
1536
  * @param string Optional. The type of value to return. (string|array|meta_query)
1537
  *
1538
- * @uses is_super_admin()
1539
  * @uses bbp_get_hidden_forum_ids()
1540
  * @uses bbp_get_private_forum_ids()
1541
  * @uses apply_filters()
@@ -1559,9 +1559,9 @@ function bbp_exclude_forum_ids( $type = 'string' ) {
1559
  $retval = array( array() ) ;
1560
  break;
1561
  }
1562
-
1563
- // Exclude for everyone but super admins
1564
- if ( !is_super_admin() ) {
1565
 
1566
  // Private forums
1567
  if ( !current_user_can( 'read_private_forums' ) )
@@ -1607,9 +1607,13 @@ function bbp_exclude_forum_ids( $type = 'string' ) {
1607
  }
1608
 
1609
  /**
1610
- * Adjusts topic and reply queries to exclude items that might be contained
1611
- * inside hidden or private forums that the user does not have the capability
1612
- * to view.
 
 
 
 
1613
  *
1614
  * @since bbPress (r3291)
1615
  *
@@ -1621,74 +1625,99 @@ function bbp_exclude_forum_ids( $type = 'string' ) {
1621
  * @uses bbp_get_reply_post_type()
1622
  * @return WP_Query
1623
  */
1624
- function bbp_pre_get_posts_exclude_forums( $posts_query ) {
1625
 
1626
  // Bail if all forums are explicitly allowed
1627
- if ( true === apply_filters( 'bbp_include_all_forums', $posts_query ) )
1628
  return;
 
1629
 
1630
  // Bail if $posts_query is not an object or of incorrect class
1631
- if ( !is_object( $posts_query ) || !is_a( $posts_query, 'WP_Query' ) )
1632
  return;
 
1633
 
1634
  // Bail if filters are suppressed on this query
1635
- if ( true == $posts_query->get( 'suppress_filters' ) )
1636
  return;
 
1637
 
1638
- // Only exclude forums on bbPress queries
1639
- switch ( $posts_query->get( 'post_type' ) ) {
1640
 
1641
- // Forums
1642
- case bbp_get_forum_post_type() :
1643
 
1644
- // Prevent accidental wp-admin post_row override
1645
- if ( is_admin() && isset( $_REQUEST['post_status'] ) )
1646
- break;
 
1647
 
1648
- // Define local variable
1649
- $status = array();
1650
 
1651
- // All users can see published forums
1652
- $status[] = bbp_get_public_status_id();
1653
 
1654
- // Add bbp_get_private_status_id() if user is capable
1655
- if ( current_user_can( 'read_private_forums' ) ) {
1656
- $status[] = bbp_get_private_status_id();
1657
- }
 
 
 
 
1658
 
1659
- // Add bbp_get_hidden_status_id() if user is capable
1660
- if ( current_user_can( 'read_hidden_forums' ) ) {
1661
- $status[] = bbp_get_hidden_status_id();
 
 
 
 
1662
  }
1663
 
1664
- // Implode and add the statuses
1665
- $posts_query->set( 'post_status', implode( ',', $status ) );
 
 
1666
 
1667
- break;
1668
 
1669
- // Topics
1670
- case bbp_get_topic_post_type() :
 
 
 
 
1671
 
1672
- // Replies
1673
- case bbp_get_reply_post_type() :
 
 
1674
 
1675
- // Get forums to exclude
1676
- $forum_ids = bbp_exclude_forum_ids( 'meta_query' );
 
1677
 
1678
- // Bail if no forums to exclude
1679
- if ( empty( $forum_ids ) )
1680
- return;
1681
 
1682
- // Get any existing meta queries
1683
- $meta_query = $posts_query->get( 'meta_query' );
1684
 
1685
- // Add our meta query to existing
1686
- $meta_query[] = $forum_ids;
 
 
1687
 
1688
- // Set the meta_query var
1689
- $posts_query->set( 'meta_query', $meta_query );
1690
 
1691
- break;
 
 
 
 
1692
  }
1693
  }
1694
 
@@ -1765,7 +1794,7 @@ function bbp_forum_query_last_reply_id( $forum_id, $topic_ids = 0 ) {
1765
  global $wpdb;
1766
 
1767
  $cache_id = 'bbp_get_forum_' . $forum_id . '_reply_id';
1768
- $reply_id = (int) wp_cache_get( $cache_id, 'bbpress' );
1769
 
1770
  if ( empty( $reply_id ) ) {
1771
 
@@ -1775,9 +1804,9 @@ function bbp_forum_query_last_reply_id( $forum_id, $topic_ids = 0 ) {
1775
 
1776
  if ( !empty( $topic_ids ) ) {
1777
  $reply_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent IN ( " . join( ',', $topic_ids ) . " ) AND post_status = '%s' AND post_type = '%s' ORDER BY ID DESC LIMIT 1;", bbp_get_public_status_id(), bbp_get_reply_post_type() ) );
1778
- wp_cache_set( $cache_id, $reply_id, 'bbpress' ); // May be (int) 0
1779
  } else {
1780
- wp_cache_set( $cache_id, '0', 'bbpress' );
1781
  }
1782
  }
1783
 
@@ -1794,6 +1823,7 @@ function bbp_forum_query_last_reply_id( $forum_id, $topic_ids = 0 ) {
1794
  *
1795
  * @uses current_user_can() To check if the current user can read private forums
1796
  * @uses is_singular() To check if it's a singular page
 
1797
  * @uses bbp_get_forum_post_type() To get the forum post type
1798
  * @uses bbp_get_topic_post_type() To get the topic post type
1799
  * @uses bbp_get_reply_post_type() TO get the reply post type
@@ -1805,7 +1835,7 @@ function bbp_forum_query_last_reply_id( $forum_id, $topic_ids = 0 ) {
1805
  function bbp_forum_enforce_hidden() {
1806
 
1807
  // Bail if not viewing a single item or if user has caps
1808
- if ( !is_singular() || is_super_admin() || current_user_can( 'read_hidden_forums' ) )
1809
  return;
1810
 
1811
  global $wp_query;
@@ -1846,6 +1876,7 @@ function bbp_forum_enforce_hidden() {
1846
  *
1847
  * @uses current_user_can() To check if the current user can read private forums
1848
  * @uses is_singular() To check if it's a singular page
 
1849
  * @uses bbp_get_forum_post_type() To get the forum post type
1850
  * @uses bbp_get_topic_post_type() To get the topic post type
1851
  * @uses bbp_get_reply_post_type() TO get the reply post type
@@ -1857,7 +1888,7 @@ function bbp_forum_enforce_hidden() {
1857
  function bbp_forum_enforce_private() {
1858
 
1859
  // Bail if not viewing a single item or if user has caps
1860
- if ( !is_singular() || is_super_admin() || current_user_can( 'read_private_forums' ) )
1861
  return;
1862
 
1863
  global $wp_query;
@@ -1894,7 +1925,7 @@ function bbp_forum_enforce_private() {
1894
 
1895
  /**
1896
  * Redirect if unathorized user is attempting to edit a forum
1897
- *
1898
  * @since bbPress (r3607)
1899
  *
1900
  * @uses bbp_is_forum_edit()
@@ -1966,7 +1997,7 @@ function bbp_delete_forum_topics( $forum_id = 0 ) {
1966
 
1967
  /**
1968
  * Trash all topics inside a forum
1969
- *
1970
  * @since bbPress (r3668)
1971
  *
1972
  * @param int $forum_id
78
  * Handles the front end forum submission
79
  *
80
  * @param string $action The requested action to compare this function to
81
+ * @uses bbp_add_error() To add an error message
82
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
83
  * @uses bbp_is_anonymous() To check if an anonymous post is being made
84
  * @uses current_user_can() To check if the current user can publish forum
170
  // Forum parent was passed (the norm)
171
  if ( !empty( $_POST['bbp_forum_parent_id'] ) )
172
  $forum_parent_id = (int) $_POST['bbp_forum_parent_id'];
173
+
174
  // Filter and sanitize
175
  $forum_parent_id = apply_filters( 'bbp_new_forum_pre_parent_id', $forum_parent_id );
176
 
199
  // Forum is hidden and user cannot access
200
  if ( bbp_is_forum_hidden( $forum_parent_id ) && !current_user_can( 'read_hidden_forums' ) ) {
201
  bbp_add_error( 'bbp_new_forum_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
202
+ }
203
  }
204
 
205
  /** Forum Flooding ********************************************************/
1155
  // Cast as integer in case of empty or string
1156
  $reply_id = (int) $reply_id;
1157
  $children_last_reply = (int) $children_last_reply;
1158
+
1159
  // If child forums have higher ID, check for newer reply id
1160
  if ( !empty( $children ) && ( $children_last_reply > $reply_id ) )
1161
  $reply_id = $children_last_reply;
1535
  *
1536
  * @param string Optional. The type of value to return. (string|array|meta_query)
1537
  *
1538
+ * @uses bbp_is_user_keymaster()
1539
  * @uses bbp_get_hidden_forum_ids()
1540
  * @uses bbp_get_private_forum_ids()
1541
  * @uses apply_filters()
1559
  $retval = array( array() ) ;
1560
  break;
1561
  }
1562
+
1563
+ // Exclude for everyone but keymasters
1564
+ if ( ! bbp_is_user_keymaster() ) {
1565
 
1566
  // Private forums
1567
  if ( !current_user_can( 'read_private_forums' ) )
1607
  }
1608
 
1609
  /**
1610
+ * Adjusts forum, topic, and reply queries to exclude items that might be
1611
+ * contained inside hidden or private forums that the user does not have the
1612
+ * capability to view.
1613
+ *
1614
+ * Doing it with an action allows us to trap all WP_Query's rather than needing
1615
+ * to hardcode this logic into each query. It also protects forum content for
1616
+ * plugins that might be doing their own queries.
1617
  *
1618
  * @since bbPress (r3291)
1619
  *
1625
  * @uses bbp_get_reply_post_type()
1626
  * @return WP_Query
1627
  */
1628
+ function bbp_pre_get_posts_normalize_forum_visibility( $posts_query = null ) {
1629
 
1630
  // Bail if all forums are explicitly allowed
1631
+ if ( true === apply_filters( 'bbp_include_all_forums', false, $posts_query ) ) {
1632
  return;
1633
+ }
1634
 
1635
  // Bail if $posts_query is not an object or of incorrect class
1636
+ if ( !is_object( $posts_query ) || !is_a( $posts_query, 'WP_Query' ) ) {
1637
  return;
1638
+ }
1639
 
1640
  // Bail if filters are suppressed on this query
1641
+ if ( true == $posts_query->get( 'suppress_filters' ) ) {
1642
  return;
1643
+ }
1644
 
1645
+ // Get query post types array .
1646
+ $post_types = (array) $posts_query->get( 'post_type' );
1647
 
1648
+ // Forums
1649
+ if ( in_array( bbp_get_forum_post_type() , $post_types ) ) {
1650
 
1651
+ // Prevent accidental wp-admin post_row override
1652
+ if ( is_admin() && isset( $_REQUEST['post_status'] ) ) {
1653
+ return;
1654
+ }
1655
 
1656
+ /** Default ***********************************************************/
 
1657
 
1658
+ // Get any existing post status
1659
+ $post_stati = $posts_query->get( 'post_status' );
1660
 
1661
+ // Default to public status
1662
+ if ( empty( $post_stati ) ) {
1663
+ $post_stati[] = bbp_get_public_status_id();
1664
+
1665
+ // Split the status string
1666
+ } elseif ( is_string( $post_stati ) ) {
1667
+ $post_stati = explode( ',', $post_stati );
1668
+ }
1669
 
1670
+ /** Private ***********************************************************/
1671
+
1672
+ // Remove bbp_get_private_status_id() if user is not capable
1673
+ if ( ! current_user_can( 'read_private_forums' ) ) {
1674
+ $key = array_search( bbp_get_private_status_id(), $post_stati );
1675
+ if ( !empty( $key ) ) {
1676
+ unset( $post_stati[$key] );
1677
  }
1678
 
1679
+ // ...or add it if they are
1680
+ } else {
1681
+ $post_stati[] = bbp_get_private_status_id();
1682
+ }
1683
 
1684
+ /** Hidden ************************************************************/
1685
 
1686
+ // Remove bbp_get_hidden_status_id() if user is not capable
1687
+ if ( ! current_user_can( 'read_hidden_forums' ) ) {
1688
+ $key = array_search( bbp_get_hidden_status_id(), $post_stati );
1689
+ if ( !empty( $key ) ) {
1690
+ unset( $post_stati[$key] );
1691
+ }
1692
 
1693
+ // ...or add it if they are
1694
+ } else {
1695
+ $post_stati[] = bbp_get_hidden_status_id();
1696
+ }
1697
 
1698
+ // Add the statuses
1699
+ $posts_query->set( 'post_status', $post_stati );
1700
+ }
1701
 
1702
+ // Topics Or Replies
1703
+ if ( array_intersect( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ), $post_types ) ) {
 
1704
 
1705
+ // Get forums to exclude
1706
+ $forum_ids = bbp_exclude_forum_ids( 'meta_query' );
1707
 
1708
+ // Bail if no forums to exclude
1709
+ if ( ! array_filter( $forum_ids ) ) {
1710
+ return;
1711
+ }
1712
 
1713
+ // Get any existing meta queries
1714
+ $meta_query = $posts_query->get( 'meta_query' );
1715
 
1716
+ // Add our meta query to existing
1717
+ $meta_query[] = $forum_ids;
1718
+
1719
+ // Set the meta_query var
1720
+ $posts_query->set( 'meta_query', $meta_query );
1721
  }
1722
  }
1723
 
1794
  global $wpdb;
1795
 
1796
  $cache_id = 'bbp_get_forum_' . $forum_id . '_reply_id';
1797
+ $reply_id = (int) wp_cache_get( $cache_id, 'bbpress_posts' );
1798
 
1799
  if ( empty( $reply_id ) ) {
1800
 
1804
 
1805
  if ( !empty( $topic_ids ) ) {
1806
  $reply_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent IN ( " . join( ',', $topic_ids ) . " ) AND post_status = '%s' AND post_type = '%s' ORDER BY ID DESC LIMIT 1;", bbp_get_public_status_id(), bbp_get_reply_post_type() ) );
1807
+ wp_cache_set( $cache_id, $reply_id, 'bbpress_posts' ); // May be (int) 0
1808
  } else {
1809
+ wp_cache_set( $cache_id, '0', 'bbpress_posts' );
1810
  }
1811
  }
1812
 
1823
  *
1824
  * @uses current_user_can() To check if the current user can read private forums
1825
  * @uses is_singular() To check if it's a singular page
1826
+ * @uses bbp_is_user_keymaster() To check if user is a keymaster
1827
  * @uses bbp_get_forum_post_type() To get the forum post type
1828
  * @uses bbp_get_topic_post_type() To get the topic post type
1829
  * @uses bbp_get_reply_post_type() TO get the reply post type
1835
  function bbp_forum_enforce_hidden() {
1836
 
1837
  // Bail if not viewing a single item or if user has caps
1838
+ if ( !is_singular() || bbp_is_user_keymaster() || current_user_can( 'read_hidden_forums' ) )
1839
  return;
1840
 
1841
  global $wp_query;
1876
  *
1877
  * @uses current_user_can() To check if the current user can read private forums
1878
  * @uses is_singular() To check if it's a singular page
1879
+ * @uses bbp_is_user_keymaster() To check if user is a keymaster
1880
  * @uses bbp_get_forum_post_type() To get the forum post type
1881
  * @uses bbp_get_topic_post_type() To get the topic post type
1882
  * @uses bbp_get_reply_post_type() TO get the reply post type
1888
  function bbp_forum_enforce_private() {
1889
 
1890
  // Bail if not viewing a single item or if user has caps
1891
+ if ( !is_singular() || bbp_is_user_keymaster() || current_user_can( 'read_private_forums' ) )
1892
  return;
1893
 
1894
  global $wp_query;
1925
 
1926
  /**
1927
  * Redirect if unathorized user is attempting to edit a forum
1928
+ *
1929
  * @since bbPress (r3607)
1930
  *
1931
  * @uses bbp_is_forum_edit()
1997
 
1998
  /**
1999
  * Trash all topics inside a forum
2000
+ *
2001
  * @since bbPress (r3668)
2002
  *
2003
  * @param int $forum_id
includes/forums/template-tags.php CHANGED
@@ -57,22 +57,11 @@ function bbp_forum_post_type() {
57
  */
58
  function bbp_has_forums( $args = '' ) {
59
 
60
- // Setup possible post__not_in array
61
- $post_stati[] = bbp_get_public_status_id();
62
-
63
- // Check if user can read private forums
64
- if ( current_user_can( 'read_private_forums' ) )
65
- $post_stati[] = bbp_get_private_status_id();
66
-
67
- // Check if user can read hidden forums
68
- if ( current_user_can( 'read_hidden_forums' ) )
69
- $post_stati[] = bbp_get_hidden_status_id();
70
-
71
  // Parse arguments with default forum query for most circumstances
72
  $bbp_f = bbp_parse_args( $args, array(
73
  'post_type' => bbp_get_forum_post_type(),
74
  'post_parent' => bbp_is_forum_archive() ? 0 : bbp_get_forum_id() ,
75
- 'post_status' => implode( ',', $post_stati ),
76
  'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
77
  'orderby' => 'menu_order',
78
  'order' => 'ASC'
@@ -384,7 +373,7 @@ function bbp_forum_content( $forum_id = 0 ) {
384
  }
385
 
386
  /**
387
- * Allow topic rows to have adminstrative actions
388
  *
389
  * @since bbPress (r3653)
390
  * @uses do_action()
@@ -623,10 +612,10 @@ function bbp_forum_get_subforums( $args = '' ) {
623
  $post_stati[] = bbp_get_public_status_id();
624
 
625
  // Super admin get whitelisted post statuses
626
- if ( is_super_admin() ) {
627
  $post_stati = array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id() );
628
 
629
- // Not a super admin, so check caps
630
  } else {
631
 
632
  // Check if user can read private forums
@@ -659,7 +648,7 @@ function bbp_forum_get_subforums( $args = '' ) {
659
  // No forum passed
660
  $sub_forums = !empty( $r['post_parent'] ) ? $get_posts->query( $r ) : array();
661
 
662
- return (array) apply_filters( 'bbp_forum_get_subforums', $sub_forums, $args );
663
  }
664
 
665
  /**
@@ -800,7 +789,10 @@ function bbp_forum_last_topic_title( $forum_id = 0 ) {
800
  */
801
  function bbp_get_forum_last_topic_title( $forum_id = 0 ) {
802
  $forum_id = bbp_get_forum_id( $forum_id );
803
- return apply_filters( 'bbp_get_forum_last_topic_title', bbp_get_topic_title( bbp_get_forum_last_topic_id( $forum_id ) ), $forum_id );
 
 
 
804
  }
805
 
806
  /**
@@ -1742,10 +1734,11 @@ function bbp_suppress_private_author_link( $author_link, $args ) {
1742
  * @since bbPress (r2667)
1743
  *
1744
  * @param int $forum_id Optional. Forum ID.
 
1745
  * @uses bbp_get_forum_class() To get the row class of the forum
1746
  */
1747
- function bbp_forum_class( $forum_id = 0 ) {
1748
- echo bbp_get_forum_class( $forum_id );
1749
  }
1750
  /**
1751
  * Return the row class of a forum
@@ -1753,6 +1746,7 @@ function bbp_forum_class( $forum_id = 0 ) {
1753
  * @since bbPress (r2667)
1754
  *
1755
  * @param int $forum_id Optional. Forum ID
 
1756
  * @uses bbp_get_forum_id() To validate the forum id
1757
  * @uses bbp_is_forum_category() To see if forum is a category
1758
  * @uses bbp_get_forum_status() To get the forum status
@@ -1762,11 +1756,11 @@ function bbp_forum_class( $forum_id = 0 ) {
1762
  * @uses apply_filters() Calls 'bbp_get_forum_class' with the classes
1763
  * @return string Row class of the forum
1764
  */
1765
- function bbp_get_forum_class( $forum_id = 0 ) {
1766
  $bbp = bbpress();
1767
  $forum_id = bbp_get_forum_id( $forum_id );
1768
  $count = isset( $bbp->forum_query->current_post ) ? $bbp->forum_query->current_post : 1;
1769
- $classes = array();
1770
 
1771
  // Get some classes
1772
  $classes[] = 'loop-item-' . $count;
@@ -1816,7 +1810,6 @@ function bbp_single_forum_description( $args = '' ) {
1816
  * @uses bbp_get_forum_id() To get the forum id
1817
  * @uses bbp_get_forum_topic_count() To get the forum topic count
1818
  * @uses bbp_get_forum_reply_count() To get the forum reply count
1819
- * @uses bbp_get_forum_subforum_count() To get the forum subforum count
1820
  * @uses bbp_get_forum_freshness_link() To get the forum freshness link
1821
  * @uses bbp_get_forum_last_active_id() To get the forum last active id
1822
  * @uses bbp_get_author_link() To get the author link
@@ -1922,7 +1915,7 @@ function bbp_single_forum_description( $args = '' ) {
1922
  $retstr = $r['before'] . $retstr . $r['after'];
1923
 
1924
  // Return filtered result
1925
- return apply_filters( 'bbp_get_single_forum_description', $retstr, $args );
1926
  }
1927
 
1928
  /** Forms *********************************************************************/
@@ -1949,7 +1942,7 @@ function bbp_form_forum_title() {
1949
  function bbp_get_form_forum_title() {
1950
 
1951
  // Get _POST data
1952
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_forum_title'] ) ) {
1953
  $forum_title = $_POST['bbp_forum_title'];
1954
 
1955
  // Get edit data
@@ -1986,8 +1979,8 @@ function bbp_form_forum_content() {
1986
  function bbp_get_form_forum_content() {
1987
 
1988
  // Get _POST data
1989
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_forum_content'] ) ) {
1990
- $forum_content = $_POST['bbp_forum_content'];
1991
 
1992
  // Get edit data
1993
  } elseif ( bbp_is_forum_edit() ) {
@@ -2024,7 +2017,7 @@ function bbp_form_forum_parent() {
2024
  function bbp_get_form_forum_parent() {
2025
 
2026
  // Get _POST data
2027
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_forum_id'] ) ) {
2028
  $forum_parent = $_POST['bbp_forum_id'];
2029
 
2030
  // Get edit data
@@ -2062,7 +2055,7 @@ function bbp_form_forum_type() {
2062
  function bbp_get_form_forum_type() {
2063
 
2064
  // Get _POST data
2065
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_forum_type'] ) ) {
2066
  $forum_type = $_POST['bbp_forum_type'];
2067
 
2068
  // Get edit data
@@ -2100,7 +2093,7 @@ function bbp_form_forum_visibility() {
2100
  function bbp_get_form_forum_visibility() {
2101
 
2102
  // Get _POST data
2103
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_forum_visibility'] ) ) {
2104
  $forum_visibility = $_POST['bbp_forum_visibility'];
2105
 
2106
  // Get edit data
57
  */
58
  function bbp_has_forums( $args = '' ) {
59
 
 
 
 
 
 
 
 
 
 
 
 
60
  // Parse arguments with default forum query for most circumstances
61
  $bbp_f = bbp_parse_args( $args, array(
62
  'post_type' => bbp_get_forum_post_type(),
63
  'post_parent' => bbp_is_forum_archive() ? 0 : bbp_get_forum_id() ,
64
+ 'post_status' => bbp_get_public_status_id(),
65
  'posts_per_page' => get_option( '_bbp_forums_per_page', 50 ),
66
  'orderby' => 'menu_order',
67
  'order' => 'ASC'
373
  }
374
 
375
  /**
376
+ * Allow forum rows to have adminstrative actions
377
  *
378
  * @since bbPress (r3653)
379
  * @uses do_action()
612
  $post_stati[] = bbp_get_public_status_id();
613
 
614
  // Super admin get whitelisted post statuses
615
+ if ( bbp_is_user_keymaster() ) {
616
  $post_stati = array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id() );
617
 
618
+ // Not a keymaster, so check caps
619
  } else {
620
 
621
  // Check if user can read private forums
648
  // No forum passed
649
  $sub_forums = !empty( $r['post_parent'] ) ? $get_posts->query( $r ) : array();
650
 
651
+ return (array) apply_filters( 'bbp_forum_get_subforums', $sub_forums, $r );
652
  }
653
 
654
  /**
789
  */
790
  function bbp_get_forum_last_topic_title( $forum_id = 0 ) {
791
  $forum_id = bbp_get_forum_id( $forum_id );
792
+ $topic_id = bbp_get_forum_last_topic_id( $forum_id );
793
+ $title = !empty( $topic_id ) ? bbp_get_topic_title( $topic_id ) : '';
794
+
795
+ return apply_filters( 'bbp_get_forum_last_topic_title', $title, $forum_id );
796
  }
797
 
798
  /**
1734
  * @since bbPress (r2667)
1735
  *
1736
  * @param int $forum_id Optional. Forum ID.
1737
+ * @param array Extra classes you can pass when calling this function
1738
  * @uses bbp_get_forum_class() To get the row class of the forum
1739
  */
1740
+ function bbp_forum_class( $forum_id = 0, $classes = array() ) {
1741
+ echo bbp_get_forum_class( $forum_id, $classes );
1742
  }
1743
  /**
1744
  * Return the row class of a forum
1746
  * @since bbPress (r2667)
1747
  *
1748
  * @param int $forum_id Optional. Forum ID
1749
+ * @param array Extra classes you can pass when calling this function
1750
  * @uses bbp_get_forum_id() To validate the forum id
1751
  * @uses bbp_is_forum_category() To see if forum is a category
1752
  * @uses bbp_get_forum_status() To get the forum status
1756
  * @uses apply_filters() Calls 'bbp_get_forum_class' with the classes
1757
  * @return string Row class of the forum
1758
  */
1759
+ function bbp_get_forum_class( $forum_id = 0, $classes = array() ) {
1760
  $bbp = bbpress();
1761
  $forum_id = bbp_get_forum_id( $forum_id );
1762
  $count = isset( $bbp->forum_query->current_post ) ? $bbp->forum_query->current_post : 1;
1763
+ $classes = (array) $classes;
1764
 
1765
  // Get some classes
1766
  $classes[] = 'loop-item-' . $count;
1810
  * @uses bbp_get_forum_id() To get the forum id
1811
  * @uses bbp_get_forum_topic_count() To get the forum topic count
1812
  * @uses bbp_get_forum_reply_count() To get the forum reply count
 
1813
  * @uses bbp_get_forum_freshness_link() To get the forum freshness link
1814
  * @uses bbp_get_forum_last_active_id() To get the forum last active id
1815
  * @uses bbp_get_author_link() To get the author link
1915
  $retstr = $r['before'] . $retstr . $r['after'];
1916
 
1917
  // Return filtered result
1918
+ return apply_filters( 'bbp_get_single_forum_description', $retstr, $r );
1919
  }
1920
 
1921
  /** Forms *********************************************************************/
1942
  function bbp_get_form_forum_title() {
1943
 
1944
  // Get _POST data
1945
+ if ( bbp_is_post_request() && isset( $_POST['bbp_forum_title'] ) ) {
1946
  $forum_title = $_POST['bbp_forum_title'];
1947
 
1948
  // Get edit data
1979
  function bbp_get_form_forum_content() {
1980
 
1981
  // Get _POST data
1982
+ if ( bbp_is_post_request() && isset( $_POST['bbp_forum_content'] ) ) {
1983
+ $forum_content = stripslashes( $_POST['bbp_forum_content'] );
1984
 
1985
  // Get edit data
1986
  } elseif ( bbp_is_forum_edit() ) {
2017
  function bbp_get_form_forum_parent() {
2018
 
2019
  // Get _POST data
2020
+ if ( bbp_is_post_request() && isset( $_POST['bbp_forum_id'] ) ) {
2021
  $forum_parent = $_POST['bbp_forum_id'];
2022
 
2023
  // Get edit data
2055
  function bbp_get_form_forum_type() {
2056
 
2057
  // Get _POST data
2058
+ if ( bbp_is_post_request() && isset( $_POST['bbp_forum_type'] ) ) {
2059
  $forum_type = $_POST['bbp_forum_type'];
2060
 
2061
  // Get edit data
2093
  function bbp_get_form_forum_visibility() {
2094
 
2095
  // Get _POST data
2096
+ if ( bbp_is_post_request() && isset( $_POST['bbp_forum_visibility'] ) ) {
2097
  $forum_visibility = $_POST['bbp_forum_visibility'];
2098
 
2099
  // Get edit data
includes/replies/capabilities.php CHANGED
@@ -102,6 +102,10 @@ function bbp_map_reply_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg
102
  // Moderators can always edit
103
  if ( user_can( $user_id, 'moderate' ) ) {
104
  $caps = array( 'moderate' );
 
 
 
 
105
  }
106
 
107
  break;
102
  // Moderators can always edit
103
  if ( user_can( $user_id, 'moderate' ) ) {
104
  $caps = array( 'moderate' );
105
+
106
+ // Otherwise, block
107
+ } else {
108
+ $caps = array( 'do_not_allow' );
109
  }
110
 
111
  break;
includes/replies/functions.php CHANGED
@@ -87,7 +87,7 @@ function bbp_insert_reply( $reply_data = array(), $reply_meta = array() ) {
87
  * @uses bbp_set_current_anonymous_user_data() To set the anonymous user
88
  * cookies
89
  * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
90
- * @uses remove_filter() To remove 'wp_filter_kses' filters if needed
91
  * @uses esc_attr() For sanitization
92
  * @uses bbp_check_for_flood() To check for flooding
93
  * @uses bbp_check_for_duplicate() To check for duplicates
@@ -111,7 +111,7 @@ function bbp_new_reply_handler( $action = '' ) {
111
 
112
  // Nonce check
113
  if ( ! bbp_verify_nonce_request( 'bbp-new-reply' ) ) {
114
- bbp_add_error( 'bbp_rew_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
115
  return;
116
  }
117
 
@@ -167,10 +167,10 @@ function bbp_new_reply_handler( $action = '' ) {
167
 
168
  /** Unfiltered HTML *******************************************************/
169
 
170
- // Remove wp_filter_kses filters from title and content for capable users and if the nonce is verified
171
  if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $topic_id ) == $_POST['_bbp_unfiltered_html_reply'] ) {
172
- remove_filter( 'bbp_new_reply_pre_title', 'wp_filter_kses' );
173
- remove_filter( 'bbp_new_reply_pre_content', 'wp_filter_kses' );
174
  }
175
 
176
  /** Reply Title ***********************************************************/
@@ -223,6 +223,13 @@ function bbp_new_reply_handler( $action = '' ) {
223
  $reply_status = bbp_get_public_status_id();
224
  }
225
 
 
 
 
 
 
 
 
226
  /** Topic Tags ************************************************************/
227
 
228
  // Either replace terms
@@ -370,7 +377,7 @@ function bbp_new_reply_handler( $action = '' ) {
370
  * @uses current_user_can() To check if the current user can edit that reply
371
  * @uses bbp_filter_anonymous_post_data() To filter anonymous data
372
  * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
373
- * @uses remove_filter() To remove 'wp_filter_kses' filters if needed
374
  * @uses esc_attr() For sanitization
375
  * @uses apply_filters() Calls 'bbp_edit_reply_pre_title' with the title and
376
  * reply id
@@ -448,10 +455,10 @@ function bbp_edit_reply_handler( $action = '' ) {
448
  }
449
  }
450
 
451
- // Remove wp_filter_kses filters from title and content for capable users and if the nonce is verified
452
  if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $reply_id ) == $_POST['_bbp_unfiltered_html_reply'] ) {
453
- remove_filter( 'bbp_edit_reply_pre_title', 'wp_filter_kses' );
454
- remove_filter( 'bbp_edit_reply_pre_content', 'wp_filter_kses' );
455
  }
456
 
457
  /** Reply Topic ***********************************************************/
@@ -988,7 +995,6 @@ function bbp_update_reply_topic_id( $reply_id = 0, $topic_id = 0 ) {
988
  * - reason: Reason for editing
989
  * - revision_id: Revision id
990
  * @uses bbp_get_reply_id() To get the reply id
991
- * @uses bbp_get_user_id() To get the user id
992
  * @uses bbp_format_revision_reason() To format the reason
993
  * @uses bbp_get_reply_raw_revision_log() To get the raw reply revision log
994
  * @uses update_post_meta() To update the reply revision log meta
@@ -1028,7 +1034,7 @@ function bbp_update_reply_revision_log( $args = '' ) {
1028
  * @since bbPress (r4521)
1029
  *
1030
  * @param string $action The requested action to compare this function to
1031
- * @uses bbPress:errors::add() To log various error messages
1032
  * @uses bbp_get_reply() To get the reply
1033
  * @uses bbp_get_topic() To get the topics
1034
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
@@ -1229,15 +1235,15 @@ function bbp_move_reply_handler( $action = '' ) {
1229
  'post_date' => $destination_post_date,
1230
  'post_date_gmt' => get_gmt_from_date( $destination_post_date )
1231
  );
1232
-
1233
  // Update destination topic
1234
  wp_update_post( $postarr );
1235
  }
1236
-
1237
  // Set the last reply ID and freshness to the move_reply
1238
  $last_reply_id = $move_reply->ID;
1239
  $freshness = $move_reply->post_date;
1240
-
1241
  // It is a new topic and we need to set some default metas to make
1242
  // the topic display in bbp_has_topics() list
1243
  if ( 'topic' == $move_option ) {
@@ -1256,7 +1262,7 @@ function bbp_move_reply_handler( $action = '' ) {
1256
  bbp_update_topic_last_reply_id ( $source_topic->ID );
1257
  bbp_update_topic_last_active_id ( $source_topic->ID );
1258
  bbp_update_topic_last_active_time( $source_topic->ID );
1259
-
1260
  /** Successful Move ******************************************************/
1261
 
1262
  // Update counts, etc...
@@ -1533,6 +1539,11 @@ function bbp_unspam_reply( $reply_id = 0 ) {
1533
  // Get pre spam status
1534
  $reply['post_status'] = get_post_meta( $reply_id, '_bbp_spam_meta_status', true );
1535
 
 
 
 
 
 
1536
  // Delete pre spam meta
1537
  delete_post_meta( $reply_id, '_bbp_spam_meta_status' );
1538
 
@@ -1709,14 +1720,14 @@ function bbp_reply_content_autoembed() {
1709
  global $wp_embed;
1710
 
1711
  if ( bbp_use_autoembed() && is_a( $wp_embed, 'WP_Embed' ) ) {
1712
- add_filter( 'bbp_get_reply_content', array( $wp_embed, 'autoembed' ), 8 );
1713
  }
1714
  }
1715
 
1716
  /** Filters *******************************************************************/
1717
 
1718
  /**
1719
- * Used by bbp_has_replies() to add the topic to the posts
1720
  *
1721
  * This function filters the 'post_where' of the WP_Query, and changes the query
1722
  * to include both the topic AND its children in the same loop.
@@ -1726,37 +1737,57 @@ function bbp_reply_content_autoembed() {
1726
  * @param string $where
1727
  * @return string
1728
  */
1729
- function _bbp_has_replies_where( $where, $query ) {
 
 
 
 
 
 
 
1730
 
1731
  // Bail if no post_parent to replace
1732
- if ( ! is_numeric( $query->get( 'post_parent' ) ) )
1733
  return $where;
 
1734
 
1735
  // Bail if not a topic and reply query
1736
- if ( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) != $query->get( 'post_type' ) )
1737
  return $where;
 
1738
 
1739
- // Bail if meta query
1740
- if ( $query->get( 'meta_key' ) || $query->get( 'meta_query' ) )
1741
  return $where;
 
 
 
1742
 
1743
  global $wpdb;
1744
 
1745
  // Table name for posts
1746
  $table_name = $wpdb->prefix . 'posts';
1747
 
1748
- // Get the topic ID
1749
- $topic_id = bbp_get_topic_id();
1750
 
1751
- // The text we're searching for
1752
- $search = "WHERE 1=1 AND {$table_name}.post_parent = {$topic_id}";
 
 
 
1753
 
1754
- // The text to replace it with
1755
- $replace = "FORCE INDEX (PRIMARY, post_parent) WHERE 1=1 AND ({$table_name}.ID = {$topic_id} OR {$table_name}.post_parent = {$topic_id})";
 
 
 
1756
 
1757
  // Try to replace the search text with the replacement
1758
- if ( $new_where = str_replace( $search, $replace, $where ) )
 
1759
  $where = $new_where;
 
1760
 
1761
  return $where;
1762
  }
@@ -1810,7 +1841,7 @@ function bbp_display_replies_feed_rss2( $replies_query = array() ) {
1810
  $title = ' &#187; ' . __( 'All Replies', 'bbpress' );
1811
 
1812
  // Display the feed
1813
- header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
1814
  header( 'Status: 200 OK' );
1815
  echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; ?>
1816
 
87
  * @uses bbp_set_current_anonymous_user_data() To set the anonymous user
88
  * cookies
89
  * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
90
+ * @uses remove_filter() To remove the custom kses filters if needed
91
  * @uses esc_attr() For sanitization
92
  * @uses bbp_check_for_flood() To check for flooding
93
  * @uses bbp_check_for_duplicate() To check for duplicates
111
 
112
  // Nonce check
113
  if ( ! bbp_verify_nonce_request( 'bbp-new-reply' ) ) {
114
+ bbp_add_error( 'bbp_new_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
115
  return;
116
  }
117
 
167
 
168
  /** Unfiltered HTML *******************************************************/
169
 
170
+ // Remove the custom kses filters from title and content for capable users and if the nonce is verified
171
  if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $topic_id ) == $_POST['_bbp_unfiltered_html_reply'] ) {
172
+ remove_filter( 'bbp_new_reply_pre_title', 'wp_filter_kses' );
173
+ remove_filter( 'bbp_new_reply_pre_content', 'bbp_filter_kses' );
174
  }
175
 
176
  /** Reply Title ***********************************************************/
223
  $reply_status = bbp_get_public_status_id();
224
  }
225
 
226
+ /** Topic Closed **********************************************************/
227
+
228
+ // If topic is closed, moderators can still reply
229
+ if ( bbp_is_topic_closed( $topic_id ) && ! current_user_can( 'moderate' ) ) {
230
+ bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>ERROR</strong>: Topic is closed.', 'bbpress' ) );
231
+ }
232
+
233
  /** Topic Tags ************************************************************/
234
 
235
  // Either replace terms
377
  * @uses current_user_can() To check if the current user can edit that reply
378
  * @uses bbp_filter_anonymous_post_data() To filter anonymous data
379
  * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
380
+ * @uses remove_filter() To remove the custom kses filters if needed
381
  * @uses esc_attr() For sanitization
382
  * @uses apply_filters() Calls 'bbp_edit_reply_pre_title' with the title and
383
  * reply id
455
  }
456
  }
457
 
458
+ // Remove the custom kses filters from title and content for capable users and if the nonce is verified
459
  if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $reply_id ) == $_POST['_bbp_unfiltered_html_reply'] ) {
460
+ remove_filter( 'bbp_edit_reply_pre_title', 'wp_filter_kses' );
461
+ remove_filter( 'bbp_edit_reply_pre_content', 'bbp_filter_kses' );
462
  }
463
 
464
  /** Reply Topic ***********************************************************/
995
  * - reason: Reason for editing
996
  * - revision_id: Revision id
997
  * @uses bbp_get_reply_id() To get the reply id
 
998
  * @uses bbp_format_revision_reason() To format the reason
999
  * @uses bbp_get_reply_raw_revision_log() To get the raw reply revision log
1000
  * @uses update_post_meta() To update the reply revision log meta
1034
  * @since bbPress (r4521)
1035
  *
1036
  * @param string $action The requested action to compare this function to
1037
+ * @uses bbp_add_error() To add an error message
1038
  * @uses bbp_get_reply() To get the reply
1039
  * @uses bbp_get_topic() To get the topics
1040
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
1235
  'post_date' => $destination_post_date,
1236
  'post_date_gmt' => get_gmt_from_date( $destination_post_date )
1237
  );
1238
+
1239
  // Update destination topic
1240
  wp_update_post( $postarr );
1241
  }
1242
+
1243
  // Set the last reply ID and freshness to the move_reply
1244
  $last_reply_id = $move_reply->ID;
1245
  $freshness = $move_reply->post_date;
1246
+
1247
  // It is a new topic and we need to set some default metas to make
1248
  // the topic display in bbp_has_topics() list
1249
  if ( 'topic' == $move_option ) {
1262
  bbp_update_topic_last_reply_id ( $source_topic->ID );
1263
  bbp_update_topic_last_active_id ( $source_topic->ID );
1264
  bbp_update_topic_last_active_time( $source_topic->ID );
1265
+
1266
  /** Successful Move ******************************************************/
1267
 
1268
  // Update counts, etc...
1539
  // Get pre spam status
1540
  $reply['post_status'] = get_post_meta( $reply_id, '_bbp_spam_meta_status', true );
1541
 
1542
+ // If no previous status, default to publish
1543
+ if ( empty( $reply['post_status'] ) ) {
1544
+ $reply['post_status'] = bbp_get_public_status_id();
1545
+ }
1546
+
1547
  // Delete pre spam meta
1548
  delete_post_meta( $reply_id, '_bbp_spam_meta_status' );
1549
 
1720
  global $wp_embed;
1721
 
1722
  if ( bbp_use_autoembed() && is_a( $wp_embed, 'WP_Embed' ) ) {
1723
+ add_filter( 'bbp_get_reply_content', array( $wp_embed, 'autoembed' ), 2 );
1724
  }
1725
  }
1726
 
1727
  /** Filters *******************************************************************/
1728
 
1729
  /**
1730
+ * Used by bbp_has_replies() to add the lead topic post to the posts loop
1731
  *
1732
  * This function filters the 'post_where' of the WP_Query, and changes the query
1733
  * to include both the topic AND its children in the same loop.
1737
  * @param string $where
1738
  * @return string
1739
  */
1740
+ function _bbp_has_replies_where( $where = '', $query = false ) {
1741
+
1742
+ /** Bail ******************************************************************/
1743
+
1744
+ // Bail if the sky is falling
1745
+ if ( empty( $where ) || empty( $query ) ) {
1746
+ return $where;
1747
+ }
1748
 
1749
  // Bail if no post_parent to replace
1750
+ if ( ! is_numeric( $query->get( 'post_parent' ) ) ) {
1751
  return $where;
1752
+ }
1753
 
1754
  // Bail if not a topic and reply query
1755
+ if ( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) != $query->get( 'post_type' ) ) {
1756
  return $where;
1757
+ }
1758
 
1759
+ // Bail if including or excluding specific post ID's
1760
+ if ( $query->get( 'post__not_in' ) || $query->get( 'post__in' ) ) {
1761
  return $where;
1762
+ }
1763
+
1764
+ /** Proceed ***************************************************************/
1765
 
1766
  global $wpdb;
1767
 
1768
  // Table name for posts
1769
  $table_name = $wpdb->prefix . 'posts';
1770
 
1771
+ // Get the topic ID from the post_parent, set in bbp_has_replies()
1772
+ $topic_id = bbp_get_topic_id( $query->get( 'post_parent' ) );
1773
 
1774
+ // The texts to search for
1775
+ $search = array(
1776
+ "FROM {$table_name} " ,
1777
+ "WHERE 1=1 AND {$table_name}.post_parent = {$topic_id}"
1778
+ );
1779
 
1780
+ // The texts to replace them with
1781
+ $replace = array(
1782
+ $search[0] . "FORCE INDEX (PRIMARY, post_parent) " ,
1783
+ "WHERE 1=1 AND ({$table_name}.ID = {$topic_id} OR {$table_name}.post_parent = {$topic_id})"
1784
+ );
1785
 
1786
  // Try to replace the search text with the replacement
1787
+ $new_where = str_replace( $search, $replace, $where );
1788
+ if ( ! empty( $new_where ) ) {
1789
  $where = $new_where;
1790
+ }
1791
 
1792
  return $where;
1793
  }
1841
  $title = ' &#187; ' . __( 'All Replies', 'bbpress' );
1842
 
1843
  // Display the feed
1844
+ header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true );
1845
  header( 'Status: 200 OK' );
1846
  echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; ?>
1847
 
includes/replies/template-tags.php CHANGED
@@ -47,7 +47,6 @@ function bbp_reply_post_type() {
47
  * @uses bbp_get_topic_id() To get the topic id
48
  * @uses bbp_get_reply_post_type() To get the reply post type
49
  * @uses bbp_get_topic_post_type() To get the topic post type
50
- * @uses bbp_is_query_name() To check if we are getting replies for a widget
51
  * @uses get_option() To get the replies per page option
52
  * @uses bbp_get_paged() To get the current page value
53
  * @uses current_user_can() To check if the current user is capable of editing
@@ -118,7 +117,7 @@ function bbp_has_replies( $args = '' ) {
118
 
119
  // Call the query
120
  $bbp->reply_query = new WP_Query( $r );
121
-
122
  // Add pagination values to query object
123
  $bbp->reply_query->posts_per_page = $r['posts_per_page'];
124
  $bbp->reply_query->paged = $r['paged'];
@@ -137,14 +136,18 @@ function bbp_has_replies( $args = '' ) {
137
  // If pretty permalinks are enabled, make our pagination pretty
138
  if ( $wp_rewrite->using_permalinks() ) {
139
 
140
- // Page or single
141
- if ( is_page() || is_single() ) {
142
- $base = get_permalink();
143
-
144
  // User's replies
145
- } elseif ( bbp_is_single_user_replies() ) {
146
  $base = bbp_get_user_replies_created_url( bbp_get_displayed_user_id() );
147
 
 
 
 
 
 
 
 
 
148
  // Single topic
149
  } else {
150
  $base = get_permalink( bbp_get_topic_id() );
@@ -509,14 +512,22 @@ function bbp_reply_excerpt( $reply_id = 0, $length = 100 ) {
509
  function bbp_get_reply_excerpt( $reply_id = 0, $length = 100 ) {
510
  $reply_id = bbp_get_reply_id( $reply_id );
511
  $length = (int) $length;
512
- $excerpt = get_post_field( $reply_id, 'post_excerpt' );
513
 
514
- if ( empty( $excerpt ) )
515
  $excerpt = bbp_get_reply_content( $reply_id );
 
516
 
517
  $excerpt = trim ( strip_tags( $excerpt ) );
518
 
519
- if ( !empty( $length ) && strlen( $excerpt ) > $length ) {
 
 
 
 
 
 
 
520
  $excerpt = substr( $excerpt, 0, $length - 1 );
521
  $excerpt .= '&hellip;';
522
  }
@@ -562,8 +573,8 @@ function bbp_reply_post_date( $reply_id = 0, $humanize = false, $gmt = false ) {
562
 
563
  // August 4, 2012 at 2:37 pm
564
  } else {
565
- $date = get_post_time( get_option( 'date_format' ), $gmt, $reply_id );
566
- $time = get_post_time( get_option( 'time_format' ), $gmt, $reply_id );
567
  $result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );
568
  }
569
 
@@ -1057,18 +1068,21 @@ function bbp_reply_author_link( $args = '' ) {
1057
  // Reply ID is good
1058
  if ( !empty( $reply_id ) ) {
1059
 
 
 
 
 
1060
  // Tweak link title if empty
1061
  if ( empty( $$r['link_title'] ) ) {
1062
- $link_title = sprintf( !bbp_is_reply_anonymous( $reply_id ) ? __( 'View %s\'s profile', 'bbpress' ) : __( 'Visit %s\'s website', 'bbpress' ), bbp_get_reply_author_display_name( $reply_id ) );
1063
 
1064
  // Use what was passed if not
1065
  } else {
1066
  $link_title = $r['link_title'];
1067
  }
1068
 
 
1069
  $link_title = !empty( $link_title ) ? ' title="' . $link_title . '"' : '';
1070
- $author_url = bbp_get_reply_author_url( $reply_id );
1071
- $anonymous = bbp_is_reply_anonymous( $reply_id );
1072
  $author_links = array();
1073
 
1074
  // Get avatar
@@ -1246,7 +1260,7 @@ function bbp_reply_author_role( $args = array() ) {
1246
  $role = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );
1247
  $author_role = sprintf( '%1$s<div class="%2$s">%3$s</div>%4$s', $r['before'], $r['class'], $role, $r['after'] );
1248
 
1249
- return apply_filters( 'bbp_get_reply_author_role', $author_role, $args );
1250
  }
1251
 
1252
  /**
@@ -1756,7 +1770,7 @@ function bbp_reply_spam_link( $args = '' ) {
1756
  * @return string Reply spam link
1757
  */
1758
  function bbp_get_reply_spam_link( $args = '' ) {
1759
-
1760
  // Parse arguments against default values
1761
  $r = bbp_parse_args( $args, array(
1762
  'id' => 0,
@@ -1923,10 +1937,11 @@ function bbp_topic_split_link( $args = '' ) {
1923
  * @since bbPress (r2678)
1924
  *
1925
  * @param int $reply_id Optional. Reply ID
 
1926
  * @uses bbp_get_reply_class() To get the reply class
1927
  */
1928
- function bbp_reply_class( $reply_id = 0 ) {
1929
- echo bbp_get_reply_class( $reply_id );
1930
  }
1931
  /**
1932
  * Return the row class of a reply
@@ -1934,6 +1949,7 @@ function bbp_reply_class( $reply_id = 0 ) {
1934
  * @since bbPress (r2678)
1935
  *
1936
  * @param int $reply_id Optional. Reply ID
 
1937
  * @uses bbp_get_reply_id() To validate the reply id
1938
  * @uses bbp_get_reply_forum_id() To get the reply's forum id
1939
  * @uses bbp_get_reply_topic_id() To get the reply's topic id
@@ -1941,11 +1957,11 @@ function bbp_reply_class( $reply_id = 0 ) {
1941
  * @uses apply_filters() Calls 'bbp_get_reply_class' with the classes
1942
  * @return string Row class of the reply
1943
  */
1944
- function bbp_get_reply_class( $reply_id = 0 ) {
1945
  $bbp = bbpress();
1946
  $reply_id = bbp_get_reply_id( $reply_id );
1947
  $count = isset( $bbp->reply_query->current_post ) ? $bbp->reply_query->current_post : 1;
1948
- $classes = array();
1949
  $classes[] = ( (int) $count % 2 ) ? 'even' : 'odd';
1950
  $classes[] = 'bbp-parent-forum-' . bbp_get_reply_forum_id( $reply_id );
1951
  $classes[] = 'bbp-parent-topic-' . bbp_get_reply_topic_id( $reply_id );
@@ -2075,8 +2091,8 @@ function bbp_form_reply_content() {
2075
  function bbp_get_form_reply_content() {
2076
 
2077
  // Get _POST data
2078
- if ( 'POST' == strtoupper( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_reply_content'] ) ) {
2079
- $reply_content = $_POST['bbp_reply_content'];
2080
 
2081
  // Get edit data
2082
  } elseif ( bbp_is_reply_edit() ) {
@@ -2112,7 +2128,7 @@ function bbp_form_reply_log_edit() {
2112
  function bbp_get_form_reply_log_edit() {
2113
 
2114
  // Get _POST data
2115
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_log_reply_edit'] ) ) {
2116
  $reply_revision = $_POST['bbp_log_reply_edit'];
2117
 
2118
  // No data
@@ -2145,7 +2161,7 @@ function bbp_form_reply_edit_reason() {
2145
  function bbp_get_form_reply_edit_reason() {
2146
 
2147
  // Get _POST data
2148
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_reply_edit_reason'] ) ) {
2149
  $reply_edit_reason = $_POST['bbp_reply_edit_reason'];
2150
 
2151
  // No data
47
  * @uses bbp_get_topic_id() To get the topic id
48
  * @uses bbp_get_reply_post_type() To get the reply post type
49
  * @uses bbp_get_topic_post_type() To get the topic post type
 
50
  * @uses get_option() To get the replies per page option
51
  * @uses bbp_get_paged() To get the current page value
52
  * @uses current_user_can() To check if the current user is capable of editing
117
 
118
  // Call the query
119
  $bbp->reply_query = new WP_Query( $r );
120
+
121
  // Add pagination values to query object
122
  $bbp->reply_query->posts_per_page = $r['posts_per_page'];
123
  $bbp->reply_query->paged = $r['paged'];
136
  // If pretty permalinks are enabled, make our pagination pretty
137
  if ( $wp_rewrite->using_permalinks() ) {
138
 
 
 
 
 
139
  // User's replies
140
+ if ( bbp_is_single_user_replies() ) {
141
  $base = bbp_get_user_replies_created_url( bbp_get_displayed_user_id() );
142
 
143
+ // Root profile page
144
+ } elseif ( bbp_is_single_user() ) {
145
+ $base = bbp_get_user_profile_url( bbp_get_displayed_user_id() );
146
+
147
+ // Page or single post
148
+ } elseif ( is_page() || is_single() ) {
149
+ $base = get_permalink();
150
+
151
  // Single topic
152
  } else {
153
  $base = get_permalink( bbp_get_topic_id() );
512
  function bbp_get_reply_excerpt( $reply_id = 0, $length = 100 ) {
513
  $reply_id = bbp_get_reply_id( $reply_id );
514
  $length = (int) $length;
515
+ $excerpt = get_post_field( 'post_excerpt', $reply_id );
516
 
517
+ if ( empty( $excerpt ) ) {
518
  $excerpt = bbp_get_reply_content( $reply_id );
519
+ }
520
 
521
  $excerpt = trim ( strip_tags( $excerpt ) );
522
 
523
+ // Multibyte support
524
+ if ( function_exists( 'mb_strlen' ) ) {
525
+ $excerpt_length = mb_strlen( $excerpt );
526
+ } else {
527
+ $excerpt_length = strlen( $excerpt );
528
+ }
529
+
530
+ if ( !empty( $length ) && ( $excerpt_length > $length ) ) {
531
  $excerpt = substr( $excerpt, 0, $length - 1 );
532
  $excerpt .= '&hellip;';
533
  }
573
 
574
  // August 4, 2012 at 2:37 pm
575
  } else {
576
+ $date = get_post_time( get_option( 'date_format' ), $gmt, $reply_id, true );
577
+ $time = get_post_time( get_option( 'time_format' ), $gmt, $reply_id, true );
578
  $result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );
579
  }
580
 
1068
  // Reply ID is good
1069
  if ( !empty( $reply_id ) ) {
1070
 
1071
+ // Get some useful reply information
1072
+ $author_url = bbp_get_reply_author_url( $reply_id );
1073
+ $anonymous = bbp_is_reply_anonymous( $reply_id );
1074
+
1075
  // Tweak link title if empty
1076
  if ( empty( $$r['link_title'] ) ) {
1077
+ $link_title = sprintf( empty( $anonymous ) ? __( 'View %s\'s profile', 'bbpress' ) : __( 'Visit %s\'s website', 'bbpress' ), bbp_get_reply_author_display_name( $reply_id ) );
1078
 
1079
  // Use what was passed if not
1080
  } else {
1081
  $link_title = $r['link_title'];
1082
  }
1083
 
1084
+ // Setup title and author_links array
1085
  $link_title = !empty( $link_title ) ? ' title="' . $link_title . '"' : '';
 
 
1086
  $author_links = array();
1087
 
1088
  // Get avatar
1260
  $role = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );
1261
  $author_role = sprintf( '%1$s<div class="%2$s">%3$s</div>%4$s', $r['before'], $r['class'], $role, $r['after'] );
1262
 
1263
+ return apply_filters( 'bbp_get_reply_author_role', $author_role, $r );
1264
  }
1265
 
1266
  /**
1770
  * @return string Reply spam link
1771
  */
1772
  function bbp_get_reply_spam_link( $args = '' ) {
1773
+
1774
  // Parse arguments against default values
1775
  $r = bbp_parse_args( $args, array(
1776
  'id' => 0,
1937
  * @since bbPress (r2678)
1938
  *
1939
  * @param int $reply_id Optional. Reply ID
1940
+ * @param array Extra classes you can pass when calling this function
1941
  * @uses bbp_get_reply_class() To get the reply class
1942
  */
1943
+ function bbp_reply_class( $reply_id = 0, $classes = array() ) {
1944
+ echo bbp_get_reply_class( $reply_id, $classes );
1945
  }
1946
  /**
1947
  * Return the row class of a reply
1949
  * @since bbPress (r2678)
1950
  *
1951
  * @param int $reply_id Optional. Reply ID
1952
+ * @param array Extra classes you can pass when calling this function
1953
  * @uses bbp_get_reply_id() To validate the reply id
1954
  * @uses bbp_get_reply_forum_id() To get the reply's forum id
1955
  * @uses bbp_get_reply_topic_id() To get the reply's topic id
1957
  * @uses apply_filters() Calls 'bbp_get_reply_class' with the classes
1958
  * @return string Row class of the reply
1959
  */
1960
+ function bbp_get_reply_class( $reply_id = 0, $classes = array() ) {
1961
  $bbp = bbpress();
1962
  $reply_id = bbp_get_reply_id( $reply_id );
1963
  $count = isset( $bbp->reply_query->current_post ) ? $bbp->reply_query->current_post : 1;
1964
+ $classes = (array) $classes;
1965
  $classes[] = ( (int) $count % 2 ) ? 'even' : 'odd';
1966
  $classes[] = 'bbp-parent-forum-' . bbp_get_reply_forum_id( $reply_id );
1967
  $classes[] = 'bbp-parent-topic-' . bbp_get_reply_topic_id( $reply_id );
2091
  function bbp_get_form_reply_content() {
2092
 
2093
  // Get _POST data
2094
+ if ( bbp_is_post_request() && isset( $_POST['bbp_reply_content'] ) ) {
2095
+ $reply_content = stripslashes( $_POST['bbp_reply_content'] );
2096
 
2097
  // Get edit data
2098
  } elseif ( bbp_is_reply_edit() ) {
2128
  function bbp_get_form_reply_log_edit() {
2129
 
2130
  // Get _POST data
2131
+ if ( bbp_is_post_request() && isset( $_POST['bbp_log_reply_edit'] ) ) {
2132
  $reply_revision = $_POST['bbp_log_reply_edit'];
2133
 
2134
  // No data
2161
  function bbp_get_form_reply_edit_reason() {
2162
 
2163
  // Get _POST data
2164
+ if ( bbp_is_post_request() && isset( $_POST['bbp_reply_edit_reason'] ) ) {
2165
  $reply_edit_reason = $_POST['bbp_reply_edit_reason'];
2166
 
2167
  // No data
includes/topics/capabilities.php CHANGED
@@ -120,6 +120,10 @@ function bbp_map_topic_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg
120
  // Moderators can always edit
121
  if ( user_can( $user_id, 'moderate' ) ) {
122
  $caps = array( $cap );
 
 
 
 
123
  }
124
 
125
  break;
120
  // Moderators can always edit
121
  if ( user_can( $user_id, 'moderate' ) ) {
122
  $caps = array( $cap );
123
+
124
+ // Otherwise, block
125
+ } else {
126
+ $caps = array( 'do_not_allow' );
127
  }
128
 
129
  break;
includes/topics/functions.php CHANGED
@@ -80,7 +80,7 @@ function bbp_insert_topic( $topic_data = array(), $topic_meta = array() ) {
80
  * Handles the front end topic submission
81
  *
82
  * @param string $action The requested action to compare this function to
83
- * @uses bbPress:errors::add() To log various error messages
84
  * @uses bbp_verify_nonce_request() To verify the nonce and check the referer
85
  * @uses bbp_is_anonymous() To check if an anonymous post is being made
86
  * @uses current_user_can() To check if the current user can publish topic
@@ -95,7 +95,7 @@ function bbp_insert_topic( $topic_data = array(), $topic_meta = array() ) {
95
  * @uses bbp_check_for_flood() To check for flooding
96
  * @uses bbp_check_for_duplicate() To check for duplicates
97
  * @uses bbp_get_topic_post_type() To get the topic post type
98
- * @uses remove_filter() To remove 'wp_filter_kses' filters if needed
99
  * @uses apply_filters() Calls 'bbp_new_topic_pre_title' with the content
100
  * @uses apply_filters() Calls 'bbp_new_topic_pre_content' with the content
101
  * @uses bbPress::errors::get_error_codes() To get the {@link WP_Error} errors
@@ -153,10 +153,10 @@ function bbp_new_topic_handler( $action = '' ) {
153
  $topic_author = bbp_get_current_user_id();
154
  }
155
 
156
- // Remove wp_filter_kses filters from title and content for capable users and if the nonce is verified
157
  if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_topic'] ) && wp_create_nonce( 'bbp-unfiltered-html-topic_new' ) == $_POST['_bbp_unfiltered_html_topic'] ) {
158
- remove_filter( 'bbp_new_topic_pre_title', 'wp_filter_kses' );
159
- remove_filter( 'bbp_new_topic_pre_content', 'wp_filter_kses' );
160
  }
161
 
162
  /** Topic Title ***********************************************************/
@@ -186,31 +186,42 @@ function bbp_new_topic_handler( $action = '' ) {
186
  /** Topic Forum ***********************************************************/
187
 
188
  // Forum id was not passed
189
- if ( empty( $_POST['bbp_forum_id'] ) )
190
  bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
191
 
192
  // Forum id was passed
193
- elseif ( is_numeric( $_POST['bbp_forum_id'] ) )
194
  $forum_id = (int) $_POST['bbp_forum_id'];
 
195
 
196
  // Forum exists
197
  if ( !empty( $forum_id ) ) {
198
 
199
  // Forum is a category
200
- if ( bbp_is_forum_category( $forum_id ) )
201
  bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) );
202
 
203
- // Forum is closed and user cannot access
204
- if ( bbp_is_forum_closed( $forum_id ) && !current_user_can( 'edit_forum', $forum_id ) )
205
- bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
 
 
 
 
206
 
207
- // Forum is private and user cannot access
208
- if ( bbp_is_forum_private( $forum_id ) && !current_user_can( 'read_private_forums' ) )
209
- bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
 
 
210
 
211
- // Forum is hidden and user cannot access
212
- if ( bbp_is_forum_hidden( $forum_id ) && !current_user_can( 'read_hidden_forums' ) )
213
- bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
 
 
 
 
214
  }
215
 
216
  /** Topic Flooding ********************************************************/
@@ -224,7 +235,7 @@ function bbp_new_topic_handler( $action = '' ) {
224
  bbp_add_error( 'bbp_topic_duplicate', __( '<strong>ERROR</strong>: Duplicate topic detected; it looks as though you&#8217;ve already said that!', 'bbpress' ) );
225
 
226
  /** Topic Blacklist *******************************************************/
227
-
228
  if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
229
  bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
230
 
@@ -285,30 +296,6 @@ function bbp_new_topic_handler( $action = '' ) {
285
 
286
  if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
287
 
288
- /** Stickies **********************************************************/
289
-
290
- if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
291
-
292
- // What's the haps?
293
- switch ( $_POST['bbp_stick_topic'] ) {
294
-
295
- // Sticky in this forum
296
- case 'stick' :
297
- bbp_stick_topic( $topic_id );
298
- break;
299
-
300
- // Super sticky in all forums
301
- case 'super' :
302
- bbp_stick_topic( $topic_id, true );
303
- break;
304
-
305
- // We can avoid this as it is a new topic
306
- case 'unstick' :
307
- default :
308
- break;
309
- }
310
- }
311
-
312
  /** Trash Check *******************************************************/
313
 
314
  // If the forum is trash, or the topic_status is switched to
@@ -336,6 +323,31 @@ function bbp_new_topic_handler( $action = '' ) {
336
 
337
  do_action( 'bbp_new_topic', $topic_id, $forum_id, $anonymous_data, $topic_author );
338
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  /** Additional Actions (After Save) ***********************************/
340
 
341
  do_action( 'bbp_new_topic_post_extras', $topic_id );
@@ -383,7 +395,7 @@ function bbp_new_topic_handler( $action = '' ) {
383
  * Handles the front end edit topic submission
384
  *
385
  * @param string $action The requested action to compare this function to
386
- * @uses bbPress:errors::add() To log various error messages
387
  * @uses bbp_get_topic() To get the topic
388
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
389
  * @uses bbp_is_topic_anonymous() To check if topic is by an anonymous user
@@ -394,7 +406,7 @@ function bbp_new_topic_handler( $action = '' ) {
394
  * @uses bbp_is_forum_category() To check if the forum is a category
395
  * @uses bbp_is_forum_closed() To check if the forum is closed
396
  * @uses bbp_is_forum_private() To check if the forum is private
397
- * @uses remove_filter() To remove 'wp_filter_kses' filters if needed
398
  * @uses apply_filters() Calls 'bbp_edit_topic_pre_title' with the title and
399
  * topic id
400
  * @uses apply_filters() Calls 'bbp_edit_topic_pre_content' with the content
@@ -471,10 +483,10 @@ function bbp_edit_topic_handler( $action = '' ) {
471
  return;
472
  }
473
 
474
- // Remove wp_filter_kses filters from title and content for capable users and if the nonce is verified
475
  if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_topic'] ) && ( wp_create_nonce( 'bbp-unfiltered-html-topic_' . $topic_id ) == $_POST['_bbp_unfiltered_html_topic'] ) ) {
476
- remove_filter( 'bbp_edit_topic_pre_title', 'wp_filter_kses' );
477
- remove_filter( 'bbp_edit_topic_pre_content', 'wp_filter_kses' );
478
  }
479
 
480
  /** Topic Forum ***********************************************************/
@@ -495,20 +507,30 @@ function bbp_edit_topic_handler( $action = '' ) {
495
  if ( !empty( $forum_id ) && ( $forum_id !== $current_forum_id ) ) {
496
 
497
  // Forum is a category
498
- if ( bbp_is_forum_category( $forum_id ) )
499
  bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) );
500
 
501
- // Forum is closed and user cannot access
502
- if ( bbp_is_forum_closed( $forum_id ) && !current_user_can( 'edit_forum', $forum_id ) )
503
- bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
504
 
505
- // Forum is private and user cannot access
506
- if ( bbp_is_forum_private( $forum_id ) && !current_user_can( 'read_private_forums' ) )
507
- bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
 
 
 
 
 
 
 
508
 
509
- // Forum is hidden and user cannot access
510
- if ( bbp_is_forum_hidden( $forum_id ) && !current_user_can( 'read_hidden_forums' ) )
511
- bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
 
 
 
 
512
  }
513
 
514
  /** Topic Title ***********************************************************/
@@ -536,12 +558,12 @@ function bbp_edit_topic_handler( $action = '' ) {
536
  bbp_add_error( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
537
 
538
  /** Topic Blacklist *******************************************************/
539
-
540
  if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
541
  bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
542
 
543
  /** Topic Status **********************************************************/
544
-
545
  // Maybe put into moderation
546
  if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
547
 
@@ -617,62 +639,66 @@ function bbp_edit_topic_handler( $action = '' ) {
617
  add_post_type_support( bbp_get_topic_post_type(), 'revisions' );
618
  }
619
 
620
- /** Stickies **************************************************************/
621
-
622
- if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
623
 
624
- // What's the dilly?
625
- switch ( $_POST['bbp_stick_topic'] ) {
626
 
627
- // Sticky in forum
628
- case 'stick' :
629
- bbp_stick_topic( $topic_id );
630
- break;
631
 
632
- // Sticky in all forums
633
- case 'super' :
634
- bbp_stick_topic( $topic_id, true );
635
- break;
636
 
637
- // Normal
638
- case 'unstick' :
639
- default :
640
- bbp_unstick_topic( $topic_id );
641
- break;
642
  }
643
- }
644
 
645
- /** Revisions *************************************************************/
646
-
647
- // Revision Reason
648
- if ( !empty( $_POST['bbp_topic_edit_reason'] ) )
649
- $topic_edit_reason = esc_attr( strip_tags( $_POST['bbp_topic_edit_reason'] ) );
650
-
651
- // Update revision log
652
- if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( 1 == $_POST['bbp_log_topic_edit'] ) ) {
653
- $revision_id = wp_save_post_revision( $topic_id );
654
- if ( ! empty( $revision_id ) ) {
655
- bbp_update_topic_revision_log( array(
656
- 'topic_id' => $topic_id,
657
- 'revision_id' => $revision_id,
658
- 'author_id' => bbp_get_current_user_id(),
659
- 'reason' => $topic_edit_reason
660
- ) );
661
  }
662
- }
663
 
664
- /** No Errors *************************************************************/
665
-
666
- if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
667
-
668
- // Update counts, etc...
669
- do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic_author , true /* Is edit */ );
670
 
671
  // If the new forum id is not equal to the old forum id, run the
672
  // bbp_move_topic action and pass the topic's forum id as the
673
  // first arg and topic id as the second to update counts.
674
- if ( $forum_id != $topic->post_parent )
675
  bbp_move_topic_handler( $topic_id, $topic->post_parent, $forum_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
676
 
677
  /** Additional Actions (After Save) ***********************************/
678
 
@@ -928,6 +954,9 @@ function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
928
  $old_forum_id = bbp_get_forum_id( $old_forum_id );
929
  $new_forum_id = bbp_get_forum_id( $new_forum_id );
930
 
 
 
 
931
  /** Stickies **************************************************************/
932
 
933
  // Get forum stickies
@@ -939,53 +968,49 @@ function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
939
  // Define local variables
940
  $updated_stickies = array();
941
 
942
- // Loop through stickies of forum
943
- foreach ( $old_stickies as $sticky_topic_id ) {
944
-
945
- // Add non-matches to the updated array
946
  if ( $topic_id != $sticky_topic_id ) {
947
  $updated_stickies[] = $sticky_topic_id;
948
  }
949
  }
950
 
951
- // No more stickies so delete the beta
952
- if ( empty( $updated_stickies ) ) {
953
- delete_post_meta ( $old_forum_id, '_bbp_sticky_topics' );
954
 
955
- // Still stickies so update the meta
956
- } else {
957
- update_post_meta( $old_forum_id, '_bbp_sticky_topics', $updated_stickies );
958
- }
 
 
 
 
959
 
960
- // Topic was sticky, so restick in new forum
961
- bbp_stick_topic( $topic_id );
 
962
  }
963
-
964
  /** Topic Replies *********************************************************/
965
 
966
  // Get the topics replies
967
  $replies = bbp_get_all_child_ids( $topic_id, bbp_get_reply_post_type() );
968
 
969
  // Update the forum_id of all replies in the topic
970
- foreach ( $replies as $reply_id )
971
  bbp_update_reply_forum_id( $reply_id, $new_forum_id );
972
-
973
- // Forum topic meta
974
- bbp_update_topic_forum_id( $topic_id, $new_forum_id );
975
 
976
  /** Old forum_id **********************************************************/
977
 
978
  // Get topic ancestors
979
- $ancestors = array_values( array_unique( array_merge( array( $old_forum_id ), (array) get_post_ancestors( $old_forum_id ) ) ) );
980
-
981
- // Loop through ancestors
982
- if ( !empty( $ancestors ) ) {
983
- foreach ( $ancestors as $ancestor ) {
984
 
985
- // If ancestor is a forum, update counts
 
 
986
  if ( bbp_is_forum( $ancestor ) ) {
987
-
988
- // Update the forum
989
  bbp_update_forum( array(
990
  'forum_id' => $ancestor,
991
  ) );
@@ -996,19 +1021,18 @@ function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
996
  /** New forum_id **********************************************************/
997
 
998
  // Make sure we're not walking twice
999
- if ( !in_array( $new_forum_id, $ancestors ) ) {
1000
 
1001
  // Get topic ancestors
1002
- $ancestors = array_values( array_unique( array_merge( array( $new_forum_id ), (array) get_post_ancestors( $new_forum_id ) ) ) );
1003
 
1004
- // Loop through ancestors
1005
- if ( !empty( $ancestors ) ) {
1006
- foreach ( $ancestors as $ancestor ) {
1007
 
1008
- // If ancestor is a forum, update counts
 
 
1009
  if ( bbp_is_forum( $ancestor ) ) {
1010
-
1011
- // Update the forum
1012
  bbp_update_forum( array(
1013
  'forum_id' => $ancestor,
1014
  ) );
@@ -1026,7 +1050,7 @@ function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
1026
  * @since bbPress (r2756)
1027
  *
1028
  * @param string $action The requested action to compare this function to
1029
- * @uses bbPress:errors::add() To log various error messages
1030
  * @uses bbp_get_topic() To get the topics
1031
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
1032
  * @uses current_user_can() To check if the current user can edit the topics
@@ -1071,10 +1095,11 @@ function bbp_merge_topic_handler( $action = '' ) {
1071
  /** Source Topic **********************************************************/
1072
 
1073
  // Topic id
1074
- if ( empty( $_POST['bbp_topic_id'] ) )
1075
  bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
1076
- else
1077
  $source_topic_id = (int) $_POST['bbp_topic_id'];
 
1078
 
1079
  // Nonce check
1080
  if ( ! bbp_verify_nonce_request( 'bbp-merge-topic_' . $source_topic_id ) ) {
@@ -1308,7 +1333,7 @@ function bbp_merge_topic_count( $destination_topic_id, $source_topic_id, $source
1308
  * @since bbPress (r2756)
1309
  *
1310
  * @param string $action The requested action to compare this function to
1311
- * @uses bbPress:errors::add() To log various error messages
1312
  * @uses bbp_get_reply() To get the reply
1313
  * @uses bbp_get_topic() To get the topics
1314
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
@@ -1614,7 +1639,7 @@ function bbp_split_topic_handler( $action = '' ) {
1614
  bbp_update_topic_last_reply_id ( $source_topic->ID );
1615
  bbp_update_topic_last_active_id ( $source_topic->ID );
1616
  bbp_update_topic_last_active_time( $source_topic->ID );
1617
-
1618
  /** Successful Split ******************************************************/
1619
 
1620
  // Update counts, etc...
@@ -1678,7 +1703,7 @@ function bbp_split_topic_count( $from_reply_id, $source_topic_id, $destination_t
1678
  * @param string $action The requested action to compare this function to
1679
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
1680
  * @uses current_user_can() To check if the current user can edit/delete tags
1681
- * @uses bbPress::errors::add() To log the error messages
1682
  * @uses wp_update_term() To update the topic tag
1683
  * @uses get_term_link() To get the topic tag url
1684
  * @uses term_exists() To check if the topic tag already exists
@@ -2538,7 +2563,6 @@ function bbp_update_topic_anonymous_reply_count( $topic_id = 0 ) {
2538
  * - reason: Reason for editing
2539
  * - revision_id: Revision id
2540
  * @uses bbp_get_topic_id() To get the topic id
2541
- * @uses bbp_get_user_id() To get the user id
2542
  * @uses bbp_format_revision_reason() To format the reason
2543
  * @uses bbp_get_topic_raw_revision_log() To get the raw topic revision log
2544
  * @uses update_post_meta() To update the topic revision log meta
@@ -2755,7 +2779,7 @@ function bbp_spam_topic( $topic_id = 0 ) {
2755
  $topic['tax_input'] = array( bbp_get_topic_tag_tax_id() => '' );
2756
  }
2757
  }
2758
-
2759
  // Set post status to spam
2760
  $topic['post_status'] = bbp_get_spam_status_id();
2761
 
@@ -2837,6 +2861,11 @@ function bbp_unspam_topic( $topic_id = 0 ) {
2837
  // Get pre spam status
2838
  $topic_status = get_post_meta( $topic_id, '_bbp_spam_meta_status', true );
2839
 
 
 
 
 
 
2840
  // Set post status to pre spam
2841
  $topic['post_status'] = $topic_status;
2842
 
@@ -2966,7 +2995,7 @@ function bbp_unstick_topic( $topic_id = 0 ) {
2966
 
2967
  /**
2968
  * Called before deleting a topic.
2969
- *
2970
  * This function is supplemental to the actual topic deletion which is
2971
  * handled by WordPress core API functions. It is used to clean up after
2972
  * a topic that is being deleted.
@@ -3022,7 +3051,7 @@ function bbp_delete_topic( $topic_id = 0 ) {
3022
  * This function is supplemental to the actual topic being trashed which is
3023
  * handled by WordPress core API functions. It is used to clean up after
3024
  * a topic that is being trashed.
3025
- *
3026
  * @uses bbp_get_topic_id() To get the topic id
3027
  * @uses bbp_is_topic() To check if the passed id is a topic
3028
  * @uses do_action() Calls 'bbp_trash_topic' with the topic id
@@ -3242,7 +3271,7 @@ function bbp_topic_content_autoembed() {
3242
  global $wp_embed;
3243
 
3244
  if ( bbp_use_autoembed() && is_a( $wp_embed, 'WP_Embed' ) ) {
3245
- add_filter( 'bbp_get_topic_content', array( $wp_embed, 'autoembed' ), 8 );
3246
  }
3247
  }
3248
 
@@ -3284,7 +3313,7 @@ function bbp_display_topics_feed_rss2( $topics_query = array() ) {
3284
  return;
3285
 
3286
  // Display the feed
3287
- header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
3288
  header( 'Status: 200 OK' );
3289
  echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; ?>
3290
 
@@ -3353,7 +3382,7 @@ function bbp_display_topics_feed_rss2( $topics_query = array() ) {
3353
 
3354
  /**
3355
  * Redirect if unathorized user is attempting to edit a topic
3356
- *
3357
  * @since bbPress (r3605)
3358
  *
3359
  * @uses bbp_is_topic_edit()
@@ -3377,7 +3406,7 @@ function bbp_check_topic_edit() {
3377
 
3378
  /**
3379
  * Redirect if unathorized user is attempting to edit a topic tag
3380
- *
3381
  * @since bbPress (r3605)
3382
  *
3383
  * @uses bbp_is_topic_tag_edit()
80
  * Handles the front end topic submission
81
  *
82
  * @param string $action The requested action to compare this function to
83
+ * @uses bbp_add_error() To add an error message
84
  * @uses bbp_verify_nonce_request() To verify the nonce and check the referer
85
  * @uses bbp_is_anonymous() To check if an anonymous post is being made
86
  * @uses current_user_can() To check if the current user can publish topic
95
  * @uses bbp_check_for_flood() To check for flooding
96
  * @uses bbp_check_for_duplicate() To check for duplicates
97
  * @uses bbp_get_topic_post_type() To get the topic post type
98
+ * @uses remove_filter() To remove the custom kses filters if needed
99
  * @uses apply_filters() Calls 'bbp_new_topic_pre_title' with the content
100
  * @uses apply_filters() Calls 'bbp_new_topic_pre_content' with the content
101
  * @uses bbPress::errors::get_error_codes() To get the {@link WP_Error} errors
153
  $topic_author = bbp_get_current_user_id();
154
  }
155
 
156
+ // Remove the custom kses filters from title and content for capable users and if the nonce is verified
157
  if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_topic'] ) && wp_create_nonce( 'bbp-unfiltered-html-topic_new' ) == $_POST['_bbp_unfiltered_html_topic'] ) {
158
+ remove_filter( 'bbp_new_topic_pre_title', 'wp_filter_kses' );
159
+ remove_filter( 'bbp_new_topic_pre_content', 'bbp_filter_kses' );
160
  }
161
 
162
  /** Topic Title ***********************************************************/
186
  /** Topic Forum ***********************************************************/
187
 
188
  // Forum id was not passed
189
+ if ( empty( $_POST['bbp_forum_id'] ) ) {
190
  bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
191
 
192
  // Forum id was passed
193
+ } elseif ( is_numeric( $_POST['bbp_forum_id'] ) ) {
194
  $forum_id = (int) $_POST['bbp_forum_id'];
195
+ }
196
 
197
  // Forum exists
198
  if ( !empty( $forum_id ) ) {
199
 
200
  // Forum is a category
201
+ if ( bbp_is_forum_category( $forum_id ) ) {
202
  bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) );
203
 
204
+ // Forum is not a category
205
+ } else {
206
+
207
+ // Forum is closed and user cannot access
208
+ if ( bbp_is_forum_closed( $forum_id ) && !current_user_can( 'edit_forum', $forum_id ) ) {
209
+ bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
210
+ }
211
 
212
+ // Forum is private and user cannot access
213
+ if ( bbp_is_forum_private( $forum_id ) ) {
214
+ if ( !current_user_can( 'read_private_forums' ) ) {
215
+ bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
216
+ }
217
 
218
+ // Forum is hidden and user cannot access
219
+ } elseif ( bbp_is_forum_hidden( $forum_id ) ) {
220
+ if ( !current_user_can( 'read_hidden_forums' ) ) {
221
+ bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
222
+ }
223
+ }
224
+ }
225
  }
226
 
227
  /** Topic Flooding ********************************************************/
235
  bbp_add_error( 'bbp_topic_duplicate', __( '<strong>ERROR</strong>: Duplicate topic detected; it looks as though you&#8217;ve already said that!', 'bbpress' ) );
236
 
237
  /** Topic Blacklist *******************************************************/
238
+
239
  if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
240
  bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
241
 
296
 
297
  if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  /** Trash Check *******************************************************/
300
 
301
  // If the forum is trash, or the topic_status is switched to
323
 
324
  do_action( 'bbp_new_topic', $topic_id, $forum_id, $anonymous_data, $topic_author );
325
 
326
+ /** Stickies **********************************************************/
327
+
328
+ // Sticky check after 'bbp_new_topic' action so forum ID meta is set
329
+ if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
330
+
331
+ // What's the haps?
332
+ switch ( $_POST['bbp_stick_topic'] ) {
333
+
334
+ // Sticky in this forum
335
+ case 'stick' :
336
+ bbp_stick_topic( $topic_id );
337
+ break;
338
+
339
+ // Super sticky in all forums
340
+ case 'super' :
341
+ bbp_stick_topic( $topic_id, true );
342
+ break;
343
+
344
+ // We can avoid this as it is a new topic
345
+ case 'unstick' :
346
+ default :
347
+ break;
348
+ }
349
+ }
350
+
351
  /** Additional Actions (After Save) ***********************************/
352
 
353
  do_action( 'bbp_new_topic_post_extras', $topic_id );
395
  * Handles the front end edit topic submission
396
  *
397
  * @param string $action The requested action to compare this function to
398
+ * @uses bbp_add_error() To add an error message
399
  * @uses bbp_get_topic() To get the topic
400
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
401
  * @uses bbp_is_topic_anonymous() To check if topic is by an anonymous user
406
  * @uses bbp_is_forum_category() To check if the forum is a category
407
  * @uses bbp_is_forum_closed() To check if the forum is closed
408
  * @uses bbp_is_forum_private() To check if the forum is private
409
+ * @uses remove_filter() To remove the custom kses filters if needed
410
  * @uses apply_filters() Calls 'bbp_edit_topic_pre_title' with the title and
411
  * topic id
412
  * @uses apply_filters() Calls 'bbp_edit_topic_pre_content' with the content
483
  return;
484
  }
485
 
486
+ // Remove the custom kses filters from title and content for capable users and if the nonce is verified
487
  if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_topic'] ) && ( wp_create_nonce( 'bbp-unfiltered-html-topic_' . $topic_id ) == $_POST['_bbp_unfiltered_html_topic'] ) ) {
488
+ remove_filter( 'bbp_edit_topic_pre_title', 'wp_filter_kses' );
489
+ remove_filter( 'bbp_edit_topic_pre_content', 'bbp_filter_kses' );
490
  }
491
 
492
  /** Topic Forum ***********************************************************/
507
  if ( !empty( $forum_id ) && ( $forum_id !== $current_forum_id ) ) {
508
 
509
  // Forum is a category
510
+ if ( bbp_is_forum_category( $forum_id ) ) {
511
  bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) );
512
 
513
+ // Forum is not a category
514
+ } else {
 
515
 
516
+ // Forum is closed and user cannot access
517
+ if ( bbp_is_forum_closed( $forum_id ) && !current_user_can( 'edit_forum', $forum_id ) ) {
518
+ bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
519
+ }
520
+
521
+ // Forum is private and user cannot access
522
+ if ( bbp_is_forum_private( $forum_id ) ) {
523
+ if ( !current_user_can( 'read_private_forums' ) ) {
524
+ bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
525
+ }
526
 
527
+ // Forum is hidden and user cannot access
528
+ } elseif ( bbp_is_forum_hidden( $forum_id ) ) {
529
+ if ( !current_user_can( 'read_hidden_forums' ) ) {
530
+ bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
531
+ }
532
+ }
533
+ }
534
  }
535
 
536
  /** Topic Title ***********************************************************/
558
  bbp_add_error( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
559
 
560
  /** Topic Blacklist *******************************************************/
561
+
562
  if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
563
  bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
564
 
565
  /** Topic Status **********************************************************/
566
+
567
  // Maybe put into moderation
568
  if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
569
 
639
  add_post_type_support( bbp_get_topic_post_type(), 'revisions' );
640
  }
641
 
642
+ /** No Errors *************************************************************/
 
 
643
 
644
+ if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
 
645
 
646
+ // Update counts, etc...
647
+ do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic_author , true /* Is edit */ );
 
 
648
 
649
+ /** Revisions *********************************************************/
 
 
 
650
 
651
+ // Revision Reason
652
+ if ( !empty( $_POST['bbp_topic_edit_reason'] ) ) {
653
+ $topic_edit_reason = esc_attr( strip_tags( $_POST['bbp_topic_edit_reason'] ) );
 
 
654
  }
 
655
 
656
+ // Update revision log
657
+ if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( 1 == $_POST['bbp_log_topic_edit'] ) ) {
658
+ $revision_id = wp_save_post_revision( $topic_id );
659
+ if ( ! empty( $revision_id ) ) {
660
+ bbp_update_topic_revision_log( array(
661
+ 'topic_id' => $topic_id,
662
+ 'revision_id' => $revision_id,
663
+ 'author_id' => bbp_get_current_user_id(),
664
+ 'reason' => $topic_edit_reason
665
+ ) );
666
+ }
 
 
 
 
 
667
  }
 
668
 
669
+ /** Move Topic ********************************************************/
 
 
 
 
 
670
 
671
  // If the new forum id is not equal to the old forum id, run the
672
  // bbp_move_topic action and pass the topic's forum id as the
673
  // first arg and topic id as the second to update counts.
674
+ if ( $forum_id != $topic->post_parent ) {
675
  bbp_move_topic_handler( $topic_id, $topic->post_parent, $forum_id );
676
+ }
677
+
678
+ /** Stickies **********************************************************/
679
+
680
+ if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
681
+
682
+ // What's the dilly?
683
+ switch ( $_POST['bbp_stick_topic'] ) {
684
+
685
+ // Sticky in forum
686
+ case 'stick' :
687
+ bbp_stick_topic( $topic_id );
688
+ break;
689
+
690
+ // Sticky in all forums
691
+ case 'super' :
692
+ bbp_stick_topic( $topic_id, true );
693
+ break;
694
+
695
+ // Normal
696
+ case 'unstick' :
697
+ default :
698
+ bbp_unstick_topic( $topic_id );
699
+ break;
700
+ }
701
+ }
702
 
703
  /** Additional Actions (After Save) ***********************************/
704
 
954
  $old_forum_id = bbp_get_forum_id( $old_forum_id );
955
  $new_forum_id = bbp_get_forum_id( $new_forum_id );
956
 
957
+ // Update topic forum's ID
958
+ bbp_update_topic_forum_id( $topic_id, $new_forum_id );
959
+
960
  /** Stickies **************************************************************/
961
 
962
  // Get forum stickies
968
  // Define local variables
969
  $updated_stickies = array();
970
 
971
+ // Loop through stickies of forum and add misses to the updated array
972
+ foreach ( (array) $old_stickies as $sticky_topic_id ) {
 
 
973
  if ( $topic_id != $sticky_topic_id ) {
974
  $updated_stickies[] = $sticky_topic_id;
975
  }
976
  }
977
 
978
+ // If stickies are different, update or delete them
979
+ if ( $updated_stickies != $old_stickies ) {
 
980
 
981
+ // No more stickies so delete the meta
982
+ if ( empty( $updated_stickies ) ) {
983
+ delete_post_meta( $old_forum_id, '_bbp_sticky_topics' );
984
+
985
+ // Still stickies so update the meta
986
+ } else {
987
+ update_post_meta( $old_forum_id, '_bbp_sticky_topics', $updated_stickies );
988
+ }
989
 
990
+ // Topic was sticky, so restick in new forum
991
+ bbp_stick_topic( $topic_id );
992
+ }
993
  }
994
+
995
  /** Topic Replies *********************************************************/
996
 
997
  // Get the topics replies
998
  $replies = bbp_get_all_child_ids( $topic_id, bbp_get_reply_post_type() );
999
 
1000
  // Update the forum_id of all replies in the topic
1001
+ foreach ( $replies as $reply_id ) {
1002
  bbp_update_reply_forum_id( $reply_id, $new_forum_id );
1003
+ }
 
 
1004
 
1005
  /** Old forum_id **********************************************************/
1006
 
1007
  // Get topic ancestors
1008
+ $old_forum_ancestors = array_values( array_unique( array_merge( array( $old_forum_id ), (array) get_post_ancestors( $old_forum_id ) ) ) );
 
 
 
 
1009
 
1010
+ // Loop through ancestors and update them
1011
+ if ( !empty( $old_forum_ancestors ) ) {
1012
+ foreach ( $old_forum_ancestors as $ancestor ) {
1013
  if ( bbp_is_forum( $ancestor ) ) {
 
 
1014
  bbp_update_forum( array(
1015
  'forum_id' => $ancestor,
1016
  ) );
1021
  /** New forum_id **********************************************************/
1022
 
1023
  // Make sure we're not walking twice
1024
+ if ( !in_array( $new_forum_id, $old_forum_ancestors ) ) {
1025
 
1026
  // Get topic ancestors
1027
+ $new_forum_ancestors = array_values( array_unique( array_merge( array( $new_forum_id ), (array) get_post_ancestors( $new_forum_id ) ) ) );
1028
 
1029
+ // Make sure we're not walking twice
1030
+ $new_forum_ancestors = array_diff( $new_forum_ancestors, $old_forum_ancestors );
 
1031
 
1032
+ // Loop through ancestors and update them
1033
+ if ( !empty( $new_forum_ancestors ) ) {
1034
+ foreach ( $new_forum_ancestors as $ancestor ) {
1035
  if ( bbp_is_forum( $ancestor ) ) {
 
 
1036
  bbp_update_forum( array(
1037
  'forum_id' => $ancestor,
1038
  ) );
1050
  * @since bbPress (r2756)
1051
  *
1052
  * @param string $action The requested action to compare this function to
1053
+ * @uses bbp_add_error() To add an error message
1054
  * @uses bbp_get_topic() To get the topics
1055
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
1056
  * @uses current_user_can() To check if the current user can edit the topics
1095
  /** Source Topic **********************************************************/
1096
 
1097
  // Topic id
1098
+ if ( empty( $_POST['bbp_topic_id'] ) ) {
1099
  bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
1100
+ } else {
1101
  $source_topic_id = (int) $_POST['bbp_topic_id'];
1102
+ }
1103
 
1104
  // Nonce check
1105
  if ( ! bbp_verify_nonce_request( 'bbp-merge-topic_' . $source_topic_id ) ) {
1333
  * @since bbPress (r2756)
1334
  *
1335
  * @param string $action The requested action to compare this function to
1336
+ * @uses bbp_add_error() To add an error message
1337
  * @uses bbp_get_reply() To get the reply
1338
  * @uses bbp_get_topic() To get the topics
1339
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
1639
  bbp_update_topic_last_reply_id ( $source_topic->ID );
1640
  bbp_update_topic_last_active_id ( $source_topic->ID );
1641
  bbp_update_topic_last_active_time( $source_topic->ID );
1642
+
1643
  /** Successful Split ******************************************************/
1644
 
1645
  // Update counts, etc...
1703
  * @param string $action The requested action to compare this function to
1704
  * @uses bbp_verify_nonce_request() To verify the nonce and check the request
1705
  * @uses current_user_can() To check if the current user can edit/delete tags
1706
+ * @uses bbp_add_error() To add an error message
1707
  * @uses wp_update_term() To update the topic tag
1708
  * @uses get_term_link() To get the topic tag url
1709
  * @uses term_exists() To check if the topic tag already exists
2563
  * - reason: Reason for editing
2564
  * - revision_id: Revision id
2565
  * @uses bbp_get_topic_id() To get the topic id
 
2566
  * @uses bbp_format_revision_reason() To format the reason
2567
  * @uses bbp_get_topic_raw_revision_log() To get the raw topic revision log
2568
  * @uses update_post_meta() To update the topic revision log meta
2779
  $topic['tax_input'] = array( bbp_get_topic_tag_tax_id() => '' );
2780
  }
2781
  }
2782
+
2783
  // Set post status to spam
2784
  $topic['post_status'] = bbp_get_spam_status_id();
2785
 
2861
  // Get pre spam status
2862
  $topic_status = get_post_meta( $topic_id, '_bbp_spam_meta_status', true );
2863
 
2864
+ // If no previous status, default to publish
2865
+ if ( empty( $topic_status ) ) {
2866
+ $topic_status = bbp_get_public_status_id();
2867
+ }
2868
+
2869
  // Set post status to pre spam
2870
  $topic['post_status'] = $topic_status;
2871
 
2995
 
2996
  /**
2997
  * Called before deleting a topic.
2998
+ *
2999
  * This function is supplemental to the actual topic deletion which is
3000
  * handled by WordPress core API functions. It is used to clean up after
3001
  * a topic that is being deleted.
3051
  * This function is supplemental to the actual topic being trashed which is
3052
  * handled by WordPress core API functions. It is used to clean up after
3053
  * a topic that is being trashed.
3054
+ *
3055
  * @uses bbp_get_topic_id() To get the topic id
3056
  * @uses bbp_is_topic() To check if the passed id is a topic
3057
  * @uses do_action() Calls 'bbp_trash_topic' with the topic id
3271
  global $wp_embed;
3272
 
3273
  if ( bbp_use_autoembed() && is_a( $wp_embed, 'WP_Embed' ) ) {
3274
+ add_filter( 'bbp_get_topic_content', array( $wp_embed, 'autoembed' ), 2 );
3275
  }
3276
  }
3277
 
3313
  return;
3314
 
3315
  // Display the feed
3316
+ header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true );
3317
  header( 'Status: 200 OK' );
3318
  echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; ?>
3319
 
3382
 
3383
  /**
3384
  * Redirect if unathorized user is attempting to edit a topic
3385
+ *
3386
  * @since bbPress (r3605)
3387
  *
3388
  * @uses bbp_is_topic_edit()
3406
 
3407
  /**
3408
  * Redirect if unathorized user is attempting to edit a topic tag
3409
+ *
3410
  * @since bbPress (r3605)
3411
  *
3412
  * @uses bbp_is_topic_tag_edit()
includes/topics/template-tags.php CHANGED
@@ -161,39 +161,56 @@ function bbp_has_topics( $args = '' ) {
161
 
162
  // Get super stickies and stickies in this forum
163
  $stickies = bbp_get_super_stickies();
164
- $stickies = !empty( $r['post_parent'] ) ? array_merge( $stickies, bbp_get_stickies( $r['post_parent'] ) ) : $stickies;
 
 
 
 
 
 
165
  $stickies = array_unique( $stickies );
166
 
167
  // We have stickies
168
  if ( is_array( $stickies ) && !empty( $stickies ) ) {
169
 
170
- // Setup the number of stickies and reset offset to 0
171
- $num_topics = count( $bbp->topic_query->posts );
172
- $sticky_offset = 0;
173
 
174
  // Loop over topics and relocate stickies to the front.
175
- for ( $i = 0; $i < $num_topics; $i++ ) {
176
- if ( in_array( $bbp->topic_query->posts[$i]->ID, $stickies ) ) {
177
- $sticky = $bbp->topic_query->posts[$i];
178
 
179
- // Remove sticky from current position
180
- array_splice( $bbp->topic_query->posts, $i, 1 );
181
 
182
- // Move to front, after other stickies
183
- array_splice( $bbp->topic_query->posts, $sticky_offset, 0, array( $sticky ) );
 
 
184
 
185
- // Increment the sticky offset. The next sticky will be placed at this offset.
 
186
  $sticky_offset++;
187
 
188
- // Remove post from sticky posts array
189
- $offset = array_search( $sticky->ID, $stickies );
 
 
 
 
 
190
 
191
  // Cleanup
192
- unset( $stickies[$offset] );
193
- unset( $sticky );
194
  }
 
 
 
195
  }
196
 
 
 
 
197
  // If any posts have been excluded specifically, Ignore those that are sticky.
198
  if ( !empty( $stickies ) && !empty( $r['post__not_in'] ) ) {
199
  $stickies = array_diff( $stickies, $r['post__not_in'] );
@@ -212,6 +229,9 @@ function bbp_has_topics( $args = '' ) {
212
  'include' => $stickies
213
  );
214
 
 
 
 
215
  // What are the default allowed statuses (based on user caps)
216
  if ( bbp_get_view_all() ) {
217
  $sticky_query['post_status'] = $r['post_status'];
@@ -228,22 +248,14 @@ function bbp_has_topics( $args = '' ) {
228
  // Get a count of the visible stickies
229
  $sticky_count = count( $sticky_posts );
230
 
231
- // Loop through stickies and add them to beginning of array
232
- foreach ( $sticky_posts as $sticky )
233
- $topics[] = $sticky;
234
-
235
- // Loop through topics and add them to end of array
236
- foreach ( $bbp->topic_query->posts as $topic )
237
- $topics[] = $topic;
238
 
239
  // Adjust loop and counts for new sticky positions
240
- $bbp->topic_query->posts = $topics;
241
  $bbp->topic_query->found_posts = (int) $bbp->topic_query->found_posts + (int) $sticky_count;
242
  $bbp->topic_query->post_count = (int) $bbp->topic_query->post_count + (int) $sticky_count;
243
 
244
  // Cleanup
245
- unset( $topics );
246
- unset( $stickies );
247
  unset( $sticky_posts );
248
  }
249
  }
@@ -665,14 +677,22 @@ function bbp_topic_excerpt( $topic_id = 0, $length = 100 ) {
665
  function bbp_get_topic_excerpt( $topic_id = 0, $length = 100 ) {
666
  $topic_id = bbp_get_topic_id( $topic_id );
667
  $length = (int) $length;
668
- $excerpt = get_post_field( $topic_id, 'post_excerpt' );
669
 
670
- if ( empty( $excerpt ) )
671
  $excerpt = bbp_get_topic_content( $topic_id );
 
672
 
673
  $excerpt = trim( strip_tags( $excerpt ) );
674
 
675
- if ( !empty( $length ) && strlen( $excerpt ) > $length ) {
 
 
 
 
 
 
 
676
  $excerpt = substr( $excerpt, 0, $length - 1 );
677
  $excerpt .= '&hellip;';
678
  }
@@ -718,8 +738,8 @@ function bbp_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) {
718
 
719
  // August 4, 2012 at 2:37 pm
720
  } else {
721
- $date = get_post_time( get_option( 'date_format' ), $gmt, $topic_id );
722
- $time = get_post_time( get_option( 'time_format' ), $gmt, $topic_id );
723
  $result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );
724
  }
725
 
@@ -1375,18 +1395,21 @@ function bbp_topic_author_link( $args = '' ) {
1375
  // Topic ID is good
1376
  if ( !empty( $topic_id ) ) {
1377
 
 
 
 
 
1378
  // Tweak link title if empty
1379
  if ( empty( $r['link_title'] ) ) {
1380
- $link_title = sprintf( !bbp_is_topic_anonymous( $topic_id ) ? __( 'View %s\'s profile', 'bbpress' ) : __( 'Visit %s\'s website', 'bbpress' ), bbp_get_topic_author_display_name( $topic_id ) );
1381
 
1382
  // Use what was passed if not
1383
  } else {
1384
  $link_title = $r['link_title'];
1385
  }
1386
 
 
1387
  $link_title = !empty( $link_title ) ? ' title="' . $link_title . '"' : '';
1388
- $author_url = bbp_get_topic_author_url( $topic_id );
1389
- $anonymous = bbp_is_topic_anonymous( $topic_id );
1390
  $author_links = array();
1391
 
1392
  // Get avatar
@@ -2140,10 +2163,11 @@ function bbp_topic_tag_list( $topic_id = 0, $args = '' ) {
2140
  * @since bbPress (r2667)
2141
  *
2142
  * @param int $topic_id Optional. Topic id
 
2143
  * @uses bbp_get_topic_class() To get the topic class
2144
  */
2145
- function bbp_topic_class( $topic_id = 0 ) {
2146
- echo bbp_get_topic_class( $topic_id );
2147
  }
2148
  /**
2149
  * Return the row class of a topic
@@ -2151,6 +2175,7 @@ function bbp_topic_class( $topic_id = 0 ) {
2151
  * @since bbPress (r2667)
2152
  *
2153
  * @param int $topic_id Optional. Topic id
 
2154
  * @uses bbp_is_topic_sticky() To check if the topic is a sticky
2155
  * @uses bbp_is_topic_super_sticky() To check if the topic is a super sticky
2156
  * @uses bbp_get_topic_forum_id() To get the topic forum id
@@ -2159,11 +2184,11 @@ function bbp_topic_class( $topic_id = 0 ) {
2159
  * and topic id
2160
  * @return string Row class of a topic
2161
  */
2162
- function bbp_get_topic_class( $topic_id = 0 ) {
2163
  $bbp = bbpress();
2164
  $topic_id = bbp_get_topic_id( $topic_id );
2165
  $count = isset( $bbp->topic_query->current_post ) ? $bbp->topic_query->current_post : 1;
2166
- $classes = array();
2167
  $classes[] = ( (int) $count % 2 ) ? 'even' : 'odd';
2168
  $classes[] = bbp_is_topic_sticky( $topic_id, false ) ? 'sticky' : '';
2169
  $classes[] = bbp_is_topic_super_sticky( $topic_id ) ? 'super-sticky' : '';
@@ -2263,7 +2288,7 @@ function bbp_topic_admin_links( $args = '' ) {
2263
  // Process the admin links
2264
  $links = implode( $r['sep'], array_filter( $r['links'] ) );
2265
 
2266
- return apply_filters( 'bbp_get_topic_admin_links', $r['before'] . $links . $r['after'], $args );
2267
  }
2268
 
2269
  /**
@@ -2298,7 +2323,7 @@ function bbp_topic_edit_link( $args = '' ) {
2298
  * @return string Topic edit link
2299
  */
2300
  function bbp_get_topic_edit_link( $args = '' ) {
2301
-
2302
  // Parse arguments against default values
2303
  $r = bbp_parse_args( $args, array(
2304
  'id' => 0,
@@ -2787,7 +2812,7 @@ function bbp_forum_pagination_links() {
2787
  * @uses bbp_get_topic_id() To get the topic id
2788
  * @uses apply_filters() Calls 'bbp_topic_notices' with the notice text, topic
2789
  * status and topic id
2790
- * @uses bbPress::errors::add() To add the notices to the error handler
2791
  */
2792
  function bbp_topic_notices() {
2793
 
@@ -2862,7 +2887,7 @@ function bbp_topic_type_select( $args = '' ) {
2862
  $topic_id = bbp_get_topic_id( $r['topic_id'] );
2863
 
2864
  // Post value is passed
2865
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST[ $r['select_id'] ] ) ) {
2866
  $sticky_current = $_POST[ $r['select_id'] ];
2867
 
2868
  // Topic is super sticky
@@ -2878,7 +2903,7 @@ function bbp_topic_type_select( $args = '' ) {
2878
  } else {
2879
 
2880
  // Post value is passed
2881
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST[ $r['select_id'] ] ) ) {
2882
  $sticky_current = $_POST[ $r['select_id'] ];
2883
 
2884
  // Default to unstick
@@ -2890,11 +2915,11 @@ function bbp_topic_type_select( $args = '' ) {
2890
  // Used variables
2891
  $tab = !empty( $r['tab'] ) ? ' tabindex="' . $r['tab'] . '"' : '';
2892
  $select_id = esc_attr( $r['select_id'] );
2893
- $sticky_statuses = array (
2894
  'unstick' => $r['unstick_text'],
2895
  'stick' => $r['stick_text'],
2896
  'super' => $r['super_text'],
2897
- ); ?>
2898
 
2899
  <select name="<?php echo $select_id; ?>" id="<?php echo $select_id; ?>"<?php echo $tab; ?>>
2900
 
@@ -2970,7 +2995,7 @@ function bbp_single_topic_description( $args = '' ) {
2970
  $voice_count = sprintf( _n( '%s voice', '%s voices', $vc_int, 'bbpress' ), $voice_count );
2971
 
2972
  // Topic has replies
2973
- $last_reply = bbp_get_topic_last_active_id( $topic_id );
2974
  if ( !empty( $last_reply ) ) {
2975
  $last_updated_by = bbp_get_author_link( array( 'post_id' => $last_reply, 'size' => $r['size'] ) );
2976
  $retstr = sprintf( __( 'This topic contains %1$s, has %2$s, and was last updated by %3$s %4$s.', 'bbpress' ), $reply_count, $voice_count, $last_updated_by, $time_since );
@@ -3326,7 +3351,7 @@ function bbp_form_topic_title() {
3326
  function bbp_get_form_topic_title() {
3327
 
3328
  // Get _POST data
3329
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_topic_title'] ) ) {
3330
  $topic_title = $_POST['bbp_topic_title'];
3331
 
3332
  // Get edit data
@@ -3363,8 +3388,8 @@ function bbp_form_topic_content() {
3363
  function bbp_get_form_topic_content() {
3364
 
3365
  // Get _POST data
3366
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_topic_content'] ) ) {
3367
- $topic_content = $_POST['bbp_topic_content'];
3368
 
3369
  // Get edit data
3370
  } elseif ( bbp_is_topic_edit() ) {
@@ -3410,7 +3435,7 @@ function bbp_form_topic_tags() {
3410
  function bbp_get_form_topic_tags() {
3411
 
3412
  // Get _POST data
3413
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_topic_tags'] ) ) {
3414
  $topic_tags = $_POST['bbp_topic_tags'];
3415
 
3416
  // Get edit data
@@ -3493,7 +3518,7 @@ function bbp_form_topic_forum() {
3493
  function bbp_get_form_topic_forum() {
3494
 
3495
  // Get _POST data
3496
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_forum_id'] ) ) {
3497
  $topic_forum = (int) $_POST['bbp_forum_id'];
3498
 
3499
  // Get edit data
@@ -3533,7 +3558,7 @@ function bbp_form_topic_subscribed() {
3533
  function bbp_get_form_topic_subscribed() {
3534
 
3535
  // Get _POST data
3536
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_topic_subscription'] ) ) {
3537
  $topic_subscribed = (bool) $_POST['bbp_topic_subscription'];
3538
 
3539
  // Get edit data
@@ -3588,7 +3613,7 @@ function bbp_form_topic_log_edit() {
3588
  function bbp_get_form_topic_log_edit() {
3589
 
3590
  // Get _POST data
3591
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_log_topic_edit'] ) ) {
3592
  $topic_revision = (int) $_POST['bbp_log_topic_edit'];
3593
 
3594
  // No data
@@ -3624,7 +3649,7 @@ function bbp_form_topic_edit_reason() {
3624
  function bbp_get_form_topic_edit_reason() {
3625
 
3626
  // Get _POST data
3627
- if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_topic_edit_reason'] ) ) {
3628
  $topic_edit_reason = $_POST['bbp_topic_edit_reason'];
3629
 
3630
  // No data
161
 
162
  // Get super stickies and stickies in this forum
163
  $stickies = bbp_get_super_stickies();
164
+
165
+ // Get stickies for current forum
166
+ if ( !empty( $r['post_parent'] ) ) {
167
+ $stickies = array_merge( $stickies, bbp_get_stickies( $r['post_parent'] ) );
168
+ }
169
+
170
+ // Remove any duplicate stickies
171
  $stickies = array_unique( $stickies );
172
 
173
  // We have stickies
174
  if ( is_array( $stickies ) && !empty( $stickies ) ) {
175
 
176
+ // Start the offset at -1 so first sticky is at correct 0 offset
177
+ $sticky_offset = -1;
 
178
 
179
  // Loop over topics and relocate stickies to the front.
180
+ foreach ( $stickies as $sticky_index => $sticky_ID ) {
 
 
181
 
182
+ // Get the post offset from the posts array
183
+ $post_offsets = wp_filter_object_list( $bbp->topic_query->posts, array( 'ID' => $sticky_ID ), 'OR', 'ID' );
184
 
185
+ // Continue if no post offsets
186
+ if ( empty( $post_offsets ) ) {
187
+ continue;
188
+ }
189
 
190
+ // Loop over posts in current query and splice them into position
191
+ foreach ( array_keys( $post_offsets ) as $post_offset ) {
192
  $sticky_offset++;
193
 
194
+ $sticky = $bbp->topic_query->posts[$post_offset];
195
+
196
+ // Remove sticky from current position
197
+ array_splice( $bbp->topic_query->posts, $post_offset, 1 );
198
+
199
+ // Move to front, after other stickies
200
+ array_splice( $bbp->topic_query->posts, $sticky_offset, 0, array( $sticky ) );
201
 
202
  // Cleanup
203
+ unset( $stickies[$sticky_index] );
204
+ unset( $sticky );
205
  }
206
+
207
+ // Cleanup
208
+ unset( $post_offsets );
209
  }
210
 
211
+ // Cleanup
212
+ unset( $sticky_offset );
213
+
214
  // If any posts have been excluded specifically, Ignore those that are sticky.
215
  if ( !empty( $stickies ) && !empty( $r['post__not_in'] ) ) {
216
  $stickies = array_diff( $stickies, $r['post__not_in'] );
229
  'include' => $stickies
230
  );
231
 
232
+ // Cleanup
233
+ unset( $stickies );
234
+
235
  // What are the default allowed statuses (based on user caps)
236
  if ( bbp_get_view_all() ) {
237
  $sticky_query['post_status'] = $r['post_status'];
248
  // Get a count of the visible stickies
249
  $sticky_count = count( $sticky_posts );
250
 
251
+ // Merge the stickies topics with the query topics .
252
+ $bbp->topic_query->posts = array_merge( $sticky_posts, $bbp->topic_query->posts );
 
 
 
 
 
253
 
254
  // Adjust loop and counts for new sticky positions
 
255
  $bbp->topic_query->found_posts = (int) $bbp->topic_query->found_posts + (int) $sticky_count;
256
  $bbp->topic_query->post_count = (int) $bbp->topic_query->post_count + (int) $sticky_count;
257
 
258
  // Cleanup
 
 
259
  unset( $sticky_posts );
260
  }
261
  }
677
  function bbp_get_topic_excerpt( $topic_id = 0, $length = 100 ) {
678
  $topic_id = bbp_get_topic_id( $topic_id );
679
  $length = (int) $length;
680
+ $excerpt = get_post_field( 'post_excerpt', $topic_id );
681
 
682
+ if ( empty( $excerpt ) ) {
683
  $excerpt = bbp_get_topic_content( $topic_id );
684
+ }
685
 
686
  $excerpt = trim( strip_tags( $excerpt ) );
687
 
688
+ // Multibyte support
689
+ if ( function_exists( 'mb_strlen' ) ) {
690
+ $excerpt_length = mb_strlen( $excerpt );
691
+ } else {
692
+ $excerpt_length = strlen( $excerpt );
693
+ }
694
+
695
+ if ( !empty( $length ) && ( $excerpt_length > $length ) ) {
696
  $excerpt = substr( $excerpt, 0, $length - 1 );
697
  $excerpt .= '&hellip;';
698
  }
738
 
739
  // August 4, 2012 at 2:37 pm
740
  } else {
741
+ $date = get_post_time( get_option( 'date_format' ), $gmt, $topic_id, true );
742
+ $time = get_post_time( get_option( 'time_format' ), $gmt, $topic_id, true );
743
  $result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );
744
  }
745
 
1395
  // Topic ID is good
1396
  if ( !empty( $topic_id ) ) {
1397
 
1398
+ // Get some useful topic information
1399
+ $author_url = bbp_get_topic_author_url( $topic_id );
1400
+ $anonymous = bbp_is_topic_anonymous( $topic_id );
1401
+
1402
  // Tweak link title if empty
1403
  if ( empty( $r['link_title'] ) ) {
1404
+ $link_title = sprintf( empty( $anonymous ) ? __( 'View %s\'s profile', 'bbpress' ) : __( 'Visit %s\'s website', 'bbpress' ), bbp_get_topic_author_display_name( $topic_id ) );
1405
 
1406
  // Use what was passed if not
1407
  } else {
1408
  $link_title = $r['link_title'];
1409
  }
1410
 
1411
+ // Setup title and author_links array
1412
  $link_title = !empty( $link_title ) ? ' title="' . $link_title . '"' : '';
 
 
1413
  $author_links = array();
1414
 
1415
  // Get avatar
2163
  * @since bbPress (r2667)
2164
  *
2165
  * @param int $topic_id Optional. Topic id
2166
+ * @param array Extra classes you can pass when calling this function
2167
  * @uses bbp_get_topic_class() To get the topic class
2168
  */
2169
+ function bbp_topic_class( $topic_id = 0, $classes = array() ) {
2170
+ echo bbp_get_topic_class( $topic_id, $classes );
2171
  }
2172
  /**
2173
  * Return the row class of a topic
2175
  * @since bbPress (r2667)
2176
  *
2177
  * @param int $topic_id Optional. Topic id
2178
+ * @param array Extra classes you can pass when calling this function
2179
  * @uses bbp_is_topic_sticky() To check if the topic is a sticky
2180
  * @uses bbp_is_topic_super_sticky() To check if the topic is a super sticky
2181
  * @uses bbp_get_topic_forum_id() To get the topic forum id
2184
  * and topic id
2185
  * @return string Row class of a topic
2186
  */
2187
+ function bbp_get_topic_class( $topic_id = 0, $classes = array() ) {
2188
  $bbp = bbpress();
2189
  $topic_id = bbp_get_topic_id( $topic_id );
2190
  $count = isset( $bbp->topic_query->current_post ) ? $bbp->topic_query->current_post : 1;
2191
+ $classes = (array) $classes;
2192
  $classes[] = ( (int) $count % 2 ) ? 'even' : 'odd';
2193
  $classes[] = bbp_is_topic_sticky( $topic_id, false ) ? 'sticky' : '';
2194
  $classes[] = bbp_is_topic_super_sticky( $topic_id ) ? 'super-sticky' : '';
2288
  // Process the admin links
2289
  $links = implode( $r['sep'], array_filter( $r['links'] ) );
2290
 
2291
+ return apply_filters( 'bbp_get_topic_admin_links', $r['before'] . $links . $r['after'], $r );
2292
  }
2293
 
2294
  /**
2323
  * @return string Topic edit link
2324
  */
2325
  function bbp_get_topic_edit_link( $args = '' ) {
2326
+
2327
  // Parse arguments against default values
2328
  $r = bbp_parse_args( $args, array(
2329
  'id' => 0,
2812
  * @uses bbp_get_topic_id() To get the topic id
2813
  * @uses apply_filters() Calls 'bbp_topic_notices' with the notice text, topic
2814
  * status and topic id
2815
+ * @uses bbp_add_error() To add an error message
2816
  */
2817
  function bbp_topic_notices() {
2818
 
2887
  $topic_id = bbp_get_topic_id( $r['topic_id'] );
2888
 
2889
  // Post value is passed
2890
+ if ( bbp_is_post_request() && isset( $_POST[ $r['select_id'] ] ) ) {
2891
  $sticky_current = $_POST[ $r['select_id'] ];
2892
 
2893
  // Topic is super sticky
2903
  } else {
2904
 
2905
  // Post value is passed
2906
+ if ( bbp_is_post_request() && isset( $_POST[ $r['select_id'] ] ) ) {
2907
  $sticky_current = $_POST[ $r['select_id'] ];
2908
 
2909
  // Default to unstick
2915
  // Used variables
2916
  $tab = !empty( $r['tab'] ) ? ' tabindex="' . $r['tab'] . '"' : '';
2917
  $select_id = esc_attr( $r['select_id'] );
2918
+ $sticky_statuses = array_filter( array(
2919
  'unstick' => $r['unstick_text'],
2920
  'stick' => $r['stick_text'],
2921
  'super' => $r['super_text'],
2922
+ ) ); ?>
2923
 
2924
  <select name="<?php echo $select_id; ?>" id="<?php echo $select_id; ?>"<?php echo $tab; ?>>
2925
 
2995
  $voice_count = sprintf( _n( '%s voice', '%s voices', $vc_int, 'bbpress' ), $voice_count );
2996
 
2997
  // Topic has replies
2998
+ $last_reply = bbp_get_topic_last_reply_id( $topic_id );
2999
  if ( !empty( $last_reply ) ) {
3000
  $last_updated_by = bbp_get_author_link( array( 'post_id' => $last_reply, 'size' => $r['size'] ) );
3001
  $retstr = sprintf( __( 'This topic contains %1$s, has %2$s, and was last updated by %3$s %4$s.', 'bbpress' ), $reply_count, $voice_count, $last_updated_by, $time_since );
3351
  function bbp_get_form_topic_title() {
3352
 
3353
  // Get _POST data
3354
+ if ( bbp_is_post_request() && isset( $_POST['bbp_topic_title'] ) ) {
3355
  $topic_title = $_POST['bbp_topic_title'];
3356
 
3357
  // Get edit data
3388
  function bbp_get_form_topic_content() {
3389
 
3390
  // Get _POST data
3391
+ if ( bbp_is_post_request() && isset( $_POST['bbp_topic_content'] ) ) {
3392
+ $topic_content = stripslashes( $_POST['bbp_topic_content'] );
3393
 
3394
  // Get edit data
3395
  } elseif ( bbp_is_topic_edit() ) {
3435
  function bbp_get_form_topic_tags() {
3436
 
3437
  // Get _POST data
3438
+ if ( bbp_is_post_request() && isset( $_POST['bbp_topic_tags'] ) ) {
3439
  $topic_tags = $_POST['bbp_topic_tags'];
3440
 
3441
  // Get edit data
3518
  function bbp_get_form_topic_forum() {
3519
 
3520
  // Get _POST data
3521
+ if ( bbp_is_post_request() && isset( $_POST['bbp_forum_id'] ) ) {
3522
  $topic_forum = (int) $_POST['bbp_forum_id'];
3523
 
3524
  // Get edit data
3558
  function bbp_get_form_topic_subscribed() {
3559
 
3560
  // Get _POST data
3561
+ if ( bbp_is_post_request() && isset( $_POST['bbp_topic_subscription'] ) ) {
3562
  $topic_subscribed = (bool) $_POST['bbp_topic_subscription'];
3563
 
3564
  // Get edit data
3613
  function bbp_get_form_topic_log_edit() {
3614
 
3615
  // Get _POST data
3616
+ if ( bbp_is_post_request() && isset( $_POST['bbp_log_topic_edit'] ) ) {
3617
  $topic_revision = (int) $_POST['bbp_log_topic_edit'];
3618
 
3619
  // No data
3649
  function bbp_get_form_topic_edit_reason() {
3650
 
3651
  // Get _POST data
3652
+ if ( bbp_is_post_request() && isset( $_POST['bbp_topic_edit_reason'] ) ) {
3653
  $topic_edit_reason = $_POST['bbp_topic_edit_reason'];
3654
 
3655
  // No data
includes/users/capabilities.php CHANGED
@@ -81,6 +81,10 @@ function bbp_set_user_role( $user_id = 0, $new_role = '' ) {
81
 
82
  // Add the new role
83
  if ( !empty( $new_role ) ) {
 
 
 
 
84
  $user->add_role( $new_role );
85
  }
86
  }
@@ -107,7 +111,7 @@ function bbp_set_user_role( $user_id = 0, $new_role = '' ) {
107
  function bbp_get_user_role( $user_id = 0 ) {
108
 
109
  // Validate user id
110
- $user_id = bbp_get_user_id( $user_id, false, false );
111
  $user = get_userdata( $user_id );
112
  $role = false;
113
 
@@ -136,22 +140,23 @@ function bbp_get_user_role( $user_id = 0 ) {
136
  * @return string
137
  */
138
  function bbp_get_user_blog_role( $user_id = 0 ) {
139
- global $wp_roles;
140
 
141
- // This really shold not be necessary anymore, and will likely be removed
142
- // at a later date. If roles aren't loaded yet, something else is wrong.
143
- if ( ! isset( $wp_roles ) )
144
- $wp_roles = new WP_Roles();
145
 
146
  // Validate user id
147
- $user_id = bbp_get_user_id( $user_id, false, false );
148
  $user = get_userdata( $user_id );
149
  $role = false;
150
- $all_roles = apply_filters( 'editable_roles', $wp_roles->roles );
151
 
152
  // User has roles so lets
153
  if ( ! empty( $user->roles ) ) {
154
- $roles = array_intersect( array_values( $user->roles ), array_keys( $all_roles ) );
 
 
 
 
 
155
 
156
  // If there's a role in the array, use the first one
157
  if ( !empty( $roles ) ) {
@@ -163,7 +168,7 @@ function bbp_get_user_blog_role( $user_id = 0 ) {
163
  }
164
 
165
  /**
166
- * Helper function hooked to 'bbp_edit_user_profile_update' action to save or
167
  * update user roles and capabilities.
168
  *
169
  * @since bbPress (r4235)
@@ -186,10 +191,20 @@ function bbp_profile_update_role( $user_id = 0 ) {
186
  $new_role = sanitize_text_field( $_POST['bbp-forums-role'] );
187
  $forums_role = bbp_get_user_role( $user_id );
188
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  // Set the new forums role
190
- if ( $new_role != $forums_role ) {
191
- bbp_set_user_role( $user_id, $new_role );
192
- }
193
  }
194
 
195
  /**
@@ -266,6 +281,10 @@ function bbp_set_current_user_default_role() {
266
 
267
  // Add the user to the site
268
  if ( true == $add_to_site ) {
 
 
 
 
269
  $bbp->current_user->add_role( $new_role );
270
 
271
  // Don't add the user, but still give them the correct caps dynamically
@@ -348,7 +367,7 @@ function bbp_is_user_spammer( $user_id = 0 ) {
348
  * @uses bbp_is_single_user()
349
  * @uses bbp_is_user_home()
350
  * @uses bbp_get_displayed_user_field()
351
- * @uses is_super_admin()
352
  * @uses get_blogs_of_user()
353
  * @uses get_current_blog_id()
354
  * @uses bbp_get_topic_post_type()
@@ -371,8 +390,8 @@ function bbp_make_spam_user( $user_id = 0 ) {
371
  if ( empty( $user_id ) )
372
  return false;
373
 
374
- // Bail if user ID is super admin
375
- if ( is_super_admin( $user_id ) )
376
  return false;
377
 
378
  // Arm the torpedos
@@ -437,7 +456,7 @@ function bbp_make_spam_user( $user_id = 0 ) {
437
  * @uses bbp_is_single_user()
438
  * @uses bbp_is_user_home()
439
  * @uses bbp_get_displayed_user_field()
440
- * @uses is_super_admin()
441
  * @uses get_blogs_of_user()
442
  * @uses bbp_get_topic_post_type()
443
  * @uses bbp_get_reply_post_type()
@@ -459,8 +478,8 @@ function bbp_make_ham_user( $user_id = 0 ) {
459
  if ( empty( $user_id ) )
460
  return false;
461
 
462
- // Bail if user ID is super admin
463
- if ( is_super_admin( $user_id ) )
464
  return false;
465
 
466
  // Arm the torpedos
@@ -611,6 +630,23 @@ function bbp_is_user_inactive( $user_id = 0 ) {
611
  return !bbp_is_user_active( $user_id );
612
  }
613
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
614
  /**
615
  * Does a user have a profile for the current site
616
  *
@@ -621,7 +657,7 @@ function bbp_is_user_inactive( $user_id = 0 ) {
621
  *
622
  * @uses bbp_get_user_id() To verify the user ID
623
  * @uses get_userdata() To get the user's data
624
- * @uses is_super_admin() To determine if user can see inactive users
625
  * @uses bbp_is_user_inactive() To check if user is spammer or deleted
626
  * @uses apply_filters() To allow override of this functions result
627
  *
@@ -642,8 +678,8 @@ function bbp_user_has_profile( $user_id = 0 ) {
642
  if ( empty( $user ) ) {
643
  $retval = false;
644
 
645
- // User is inactive, and current user is not a super admin
646
- } elseif ( ! is_super_admin() && bbp_is_user_inactive( $user->ID ) ) {
647
  $retval = false;
648
  }
649
 
81
 
82
  // Add the new role
83
  if ( !empty( $new_role ) ) {
84
+
85
+ // Make sure bbPress roles are added
86
+ bbp_add_forums_roles();
87
+
88
  $user->add_role( $new_role );
89
  }
90
  }
111
  function bbp_get_user_role( $user_id = 0 ) {
112
 
113
  // Validate user id
114
+ $user_id = bbp_get_user_id( $user_id );
115
  $user = get_userdata( $user_id );
116
  $role = false;
117
 
140
  * @return string
141
  */
142
  function bbp_get_user_blog_role( $user_id = 0 ) {
 
143
 
144
+ // Add bbPress roles (returns $wp_roles global)
145
+ $wp_roles = bbp_add_forums_roles();
 
 
146
 
147
  // Validate user id
148
+ $user_id = bbp_get_user_id( $user_id );
149
  $user = get_userdata( $user_id );
150
  $role = false;
 
151
 
152
  // User has roles so lets
153
  if ( ! empty( $user->roles ) ) {
154
+
155
+ // Apply the WordPress 'editable_roles' filter to let plugins ride along
156
+ $all_roles = apply_filters( 'editable_roles', $wp_roles->roles );
157
+
158
+ // Look for an intersection of user roles to available blog roles
159
+ $roles = array_intersect( array_values( $user->roles ), array_keys( $all_roles ) );
160
 
161
  // If there's a role in the array, use the first one
162
  if ( !empty( $roles ) ) {
168
  }
169
 
170
  /**
171
+ * Helper function hooked to 'bbp_profile_update' action to save or
172
  * update user roles and capabilities.
173
  *
174
  * @since bbPress (r4235)
191
  $new_role = sanitize_text_field( $_POST['bbp-forums-role'] );
192
  $forums_role = bbp_get_user_role( $user_id );
193
 
194
+ // Bail if no role change
195
+ if ( $new_role == $forums_role )
196
+ return;
197
+
198
+ // Bail if trying to set their own role
199
+ if ( bbp_is_user_home_edit() )
200
+ return;
201
+
202
+ // Bail if current user cannot promote the passing user
203
+ if ( ! current_user_can( 'promote_user', $user_id ) )
204
+ return;
205
+
206
  // Set the new forums role
207
+ bbp_set_user_role( $user_id, $new_role );
 
 
208
  }
209
 
210
  /**
281
 
282
  // Add the user to the site
283
  if ( true == $add_to_site ) {
284
+
285
+ // Make sure bbPress roles are added
286
+ bbp_add_forums_roles();
287
+
288
  $bbp->current_user->add_role( $new_role );
289
 
290
  // Don't add the user, but still give them the correct caps dynamically
367
  * @uses bbp_is_single_user()
368
  * @uses bbp_is_user_home()
369
  * @uses bbp_get_displayed_user_field()
370
+ * @uses bbp_is_user_keymaster()
371
  * @uses get_blogs_of_user()
372
  * @uses get_current_blog_id()
373
  * @uses bbp_get_topic_post_type()
390
  if ( empty( $user_id ) )
391
  return false;
392
 
393
+ // Bail if user ID is keymaster
394
+ if ( bbp_is_user_keymaster( $user_id ) )
395
  return false;
396
 
397
  // Arm the torpedos
456
  * @uses bbp_is_single_user()
457
  * @uses bbp_is_user_home()
458
  * @uses bbp_get_displayed_user_field()
459
+ * @uses bbp_is_user_keymaster()
460
  * @uses get_blogs_of_user()
461
  * @uses bbp_get_topic_post_type()
462
  * @uses bbp_get_reply_post_type()
478
  if ( empty( $user_id ) )
479
  return false;
480
 
481
+ // Bail if user ID is keymaster
482
+ if ( bbp_is_user_keymaster( $user_id ) )
483
  return false;
484
 
485
  // Arm the torpedos
630
  return !bbp_is_user_active( $user_id );
631
  }
632
 
633
+ /**
634
+ * Checks if user is a keymaster
635
+ *
636
+ * @since bbPress (r4783)
637
+ *
638
+ * @param int $user_id
639
+ * @return bool True if keymaster, false if not
640
+ */
641
+ function bbp_is_user_keymaster( $user_id = 0 ) {
642
+
643
+ // Default to current user ID if none is passed
644
+ $_user_id = (int) ! empty( $user_id ) ? $user_id : bbp_get_current_user_id();
645
+
646
+ // Filter and return
647
+ return (bool) apply_filters( 'bbp_is_user_keymaster', user_can( $_user_id, 'keep_gate' ), $_user_id, $user_id );
648
+ }
649
+
650
  /**
651
  * Does a user have a profile for the current site
652
  *
657
  *
658
  * @uses bbp_get_user_id() To verify the user ID
659
  * @uses get_userdata() To get the user's data
660
+ * @uses bbp_is_user_keymaster() To determine if user can see inactive users
661
  * @uses bbp_is_user_inactive() To check if user is spammer or deleted
662
  * @uses apply_filters() To allow override of this functions result
663
  *
678
  if ( empty( $user ) ) {
679
  $retval = false;
680
 
681
+ // User is inactive, and current user is not a keymaster
682
+ } elseif ( ! bbp_is_user_keymaster() && bbp_is_user_inactive( $user->ID ) ) {
683
  $retval = false;
684
  }
685
 
includes/users/functions.php CHANGED
@@ -531,10 +531,10 @@ function bbp_get_topic_subscribers( $topic_id = 0 ) {
531
  global $wpdb;
532
 
533
  $key = $wpdb->prefix . '_bbp_subscriptions';
534
- $users = wp_cache_get( 'bbp_get_topic_subscribers_' . $topic_id, 'bbpress' );
535
  if ( empty( $users ) ) {
536
  $users = $wpdb->get_col( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = '{$key}' and FIND_IN_SET('{$topic_id}', meta_value) > 0" );
537
- wp_cache_set( 'bbp_get_topic_subscribers_' . $topic_id, $users, 'bbpress' );
538
  }
539
 
540
  if ( !empty( $users ) ) {
@@ -858,7 +858,6 @@ function bbp_subscriptions_handler( $action = '' ) {
858
  * @uses is_email() To check if the string is an email id or not
859
  * @uses wpdb::get_blog_prefix() To get the blog prefix
860
  * @uses is_network_admin() To check if the user is the network admin
861
- * @uses is_super_admin() To check if the user is super admin
862
  * @uses revoke_super_admin() To revoke super admin priviledges
863
  * @uses grant_super_admin() To grant super admin priviledges
864
  * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
@@ -1092,15 +1091,15 @@ function bbp_check_user_edit() {
1092
  * @since bbPress (r2996)
1093
  *
1094
  * @uses is_user_logged_in() To check if user is logged in
1095
- * @uses is_super_admin() To check if user is a super admin
1096
  * @uses current_user_can() To check if the current user can spectate
1097
  * @uses is_bbpress() To check if in a bbPress section of the site
1098
  * @uses bbp_set_404() To set a 404 status
1099
  */
1100
  function bbp_forum_enforce_blocked() {
1101
 
1102
- // Bail if not logged in or super admin
1103
- if ( ! is_user_logged_in() || is_super_admin() ) {
1104
  return;
1105
  }
1106
 
531
  global $wpdb;
532
 
533
  $key = $wpdb->prefix . '_bbp_subscriptions';
534
+ $users = wp_cache_get( 'bbp_get_topic_subscribers_' . $topic_id, 'bbpress_users' );
535
  if ( empty( $users ) ) {
536
  $users = $wpdb->get_col( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = '{$key}' and FIND_IN_SET('{$topic_id}', meta_value) > 0" );
537
+ wp_cache_set( 'bbp_get_topic_subscribers_' . $topic_id, $users, 'bbpress_users' );
538
  }
539
 
540
  if ( !empty( $users ) ) {
858
  * @uses is_email() To check if the string is an email id or not
859
  * @uses wpdb::get_blog_prefix() To get the blog prefix
860
  * @uses is_network_admin() To check if the user is the network admin
 
861
  * @uses revoke_super_admin() To revoke super admin priviledges
862
  * @uses grant_super_admin() To grant super admin priviledges
863
  * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
1091
  * @since bbPress (r2996)
1092
  *
1093
  * @uses is_user_logged_in() To check if user is logged in
1094
+ * @uses bbp_is_user_keymaster() To check if user is a keymaster
1095
  * @uses current_user_can() To check if the current user can spectate
1096
  * @uses is_bbpress() To check if in a bbPress section of the site
1097
  * @uses bbp_set_404() To set a 404 status
1098
  */
1099
  function bbp_forum_enforce_blocked() {
1100
 
1101
+ // Bail if not logged in or keymaster
1102
+ if ( ! is_user_logged_in() || bbp_is_user_keymaster() ) {
1103
  return;
1104
  }
1105
 
includes/users/template-tags.php CHANGED
@@ -45,16 +45,16 @@ function bbp_user_id( $user_id = 0, $displayed_user_fallback = true, $current_us
45
  $bbp_user_id = $user_id;
46
 
47
  // Currently viewing or editing a user
48
- } elseif ( ( true == $displayed_user_fallback ) && !empty( $bbp->displayed_user->ID ) ) {
49
  $bbp_user_id = $bbp->displayed_user->ID;
50
 
51
  // Maybe fallback on the current_user ID
52
- } elseif ( ( true == $current_user_fallback ) && !empty( $bbp->current_user->ID ) ) {
53
  $bbp_user_id = $bbp->current_user->ID;
54
 
55
  // Failsafe
56
  } else {
57
- $bbp_user_id = get_query_var( 'bbp_user_id' );
58
  }
59
 
60
  return (int) apply_filters( 'bbp_get_user_id', (int) $bbp_user_id, $displayed_user_fallback, $current_user_fallback );
@@ -265,7 +265,7 @@ function bbp_user_nicename( $user_id = 0, $args = array() ) {
265
  function bbp_get_user_nicename( $user_id = 0, $args = array() ) {
266
 
267
  // Bail if no user ID passed
268
- $user_id = bbp_get_user_id( $user_id, false, false );
269
  if ( empty( $user_id ) )
270
  return false;
271
 
@@ -291,7 +291,7 @@ function bbp_user_nicename( $user_id = 0, $args = array() ) {
291
  $retval = !empty( $nicename ) ? ( $r['before'] . $nicename . $r['after'] ) : '';
292
 
293
  // Filter and return
294
- return (string) apply_filters( 'bbp_get_user_nicename', $retval, $user_id, $args );
295
  }
296
 
297
  /**
@@ -470,7 +470,7 @@ function bbp_user_display_role( $user_id = 0 ) {
470
  *
471
  * @param int $user_id
472
  * @uses bbp_get_user_id() to verify the user ID
473
- * @uses is_super_admin() to check if user is a super admin
474
  * @uses bbp_is_user_inactive() to check if user is inactive
475
  * @uses user_can() to check if user has special capabilities
476
  * @uses apply_filters() Calls 'bbp_get_user_display_role' with the
@@ -480,30 +480,24 @@ function bbp_user_display_role( $user_id = 0 ) {
480
  function bbp_get_user_display_role( $user_id = 0 ) {
481
 
482
  // Validate user id
483
- $user_id = bbp_get_user_id( $user_id, false, false );
484
-
485
- // Capes earn Vinz Clortho status
486
- if ( is_super_admin( $user_id ) ) {
487
- $role = __( 'Key Master', 'bbpress' );
488
-
489
- // Inactive
490
- } elseif ( bbp_is_user_inactive() ) {
491
- $role = __( 'Inactive', 'bbpress' );
492
 
493
  // User is not registered
494
- } elseif ( empty( $user_id ) ) {
495
  $role = __( 'Guest', 'bbpress' );
496
 
497
- // Moderator
498
- } elseif ( user_can( $user_id, 'moderate' ) ) {
499
- $role = __( 'Moderator', 'bbpress' );
500
-
501
- // Participant
502
- } elseif ( user_can( $user_id, 'participate' ) ) {
503
- $role = __( 'Participant', 'bbpress' );
504
 
505
- // Anyone else
506
  } else {
 
 
 
 
 
 
507
  $role = __( 'Member', 'bbpress' );
508
  }
509
 
@@ -580,7 +574,7 @@ function bbp_author_ip( $args = '' ) {
580
 
581
  // Used as post id
582
  $post_id = is_numeric( $args ) ? (int) $args : 0;
583
-
584
  // Parse arguments against default values
585
  $r = bbp_parse_args( $args, array(
586
  'post_id' => $post_id,
@@ -730,7 +724,7 @@ function bbp_user_favorites_link( $args = array(), $user_id = 0, $wrap = true )
730
  return false;
731
  }
732
 
733
- // Decine which link to show
734
  $is_fav = bbp_is_user_favorite( $user_id, $topic_id );
735
  if ( !empty( $is_fav ) ) {
736
  $text = $r['favorited'];
@@ -888,7 +882,7 @@ function bbp_user_subscribe_link( $args = '', $user_id = 0, $wrap = true ) {
888
  return false;
889
  }
890
 
891
- // Decine which link to show
892
  $is_subscribed = bbp_is_user_subscribed( $user_id, $topic_id );
893
  if ( !empty( $is_subscribed ) ) {
894
  $text = $r['unsubscribe'];
@@ -1057,7 +1051,7 @@ function bbp_edit_user_forums_role() {
1057
  $dynamic_roles = bbp_get_dynamic_roles();
1058
 
1059
  // Only keymasters can set other keymasters
1060
- if ( ! current_user_can( 'keep_gate' ) )
1061
  unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
1062
 
1063
  <select name="bbp-forums-role" id="bbp-forums-role">
@@ -1473,7 +1467,7 @@ function bbp_author_link( $args = '' ) {
1473
  * @uses bbp_parse_args()
1474
  * @uses bbp_get_user_id()
1475
  * @uses current_user_can()
1476
- * @uses is_super_admin()
1477
  * @uses bbp_is_forum_public()
1478
  * @uses bbp_is_forum_private()
1479
  * @uses bbp_is_forum_hidden()
@@ -1496,8 +1490,8 @@ function bbp_user_can_view_forum( $args = '' ) {
1496
  $forum_id = bbp_get_forum_id( $r['forum_id'] );
1497
  $retval = false;
1498
 
1499
- // User is a super admin
1500
- if ( is_super_admin() ) {
1501
  $retval = true;
1502
 
1503
  // Forum is public, and user can read forums or is not logged in
@@ -1521,7 +1515,7 @@ function bbp_user_can_view_forum( $args = '' ) {
1521
  *
1522
  * @since bbPress (r3127)
1523
  *
1524
- * @uses is_super_admin()
1525
  * @uses is_user_logged_in()
1526
  * @uses bbp_allow_anonymous()
1527
  * @uses bbp_is_user_active()
@@ -1535,8 +1529,8 @@ function bbp_current_user_can_publish_topics() {
1535
  // Users need to earn access
1536
  $retval = false;
1537
 
1538
- // Always allow super admins
1539
- if ( is_super_admin() ) {
1540
  $retval = true;
1541
 
1542
  // Do not allow anonymous if not enabled
@@ -1557,7 +1551,7 @@ function bbp_current_user_can_publish_topics() {
1557
  *
1558
  * @since bbPress (r3549)
1559
  *
1560
- * @uses is_super_admin()
1561
  * @uses bbp_is_user_active()
1562
  * @uses current_user_can()
1563
  * @uses apply_filters()
@@ -1569,8 +1563,8 @@ function bbp_current_user_can_publish_forums() {
1569
  // Users need to earn access
1570
  $retval = false;
1571
 
1572
- // Always allow super admins
1573
- if ( is_super_admin() ) {
1574
  $retval = true;
1575
 
1576
  // User is logged in
@@ -1587,7 +1581,7 @@ function bbp_current_user_can_publish_forums() {
1587
  *
1588
  * @since bbPress (r3127)
1589
  *
1590
- * @uses is_super_admin()
1591
  * @uses is_user_logged_in()
1592
  * @uses bbp_allow_anonymous()
1593
  * @uses bbp_is_user_active()
@@ -1601,8 +1595,8 @@ function bbp_current_user_can_publish_replies() {
1601
  // Users need to earn access
1602
  $retval = false;
1603
 
1604
- // Always allow super admins
1605
- if ( is_super_admin() ) {
1606
  $retval = true;
1607
 
1608
  // Do not allow anonymous if not enabled
@@ -1620,6 +1614,12 @@ function bbp_current_user_can_publish_replies() {
1620
 
1621
  /** Forms *********************************************************************/
1622
 
 
 
 
 
 
 
1623
  /**
1624
  * Get the forums the current user has the ability to see and post to
1625
  *
@@ -1674,6 +1674,7 @@ function bbp_get_forums_for_current_user( $args = array() ) {
1674
  *
1675
  * @since bbPress (r3549)
1676
  *
 
1677
  * @uses bbp_is_forum_edit()
1678
  * @uses current_user_can()
1679
  * @uses bbp_get_forum_id()
@@ -1685,8 +1686,8 @@ function bbp_current_user_can_access_create_forum_form() {
1685
  // Users need to earn access
1686
  $retval = false;
1687
 
1688
- // Always allow super admins
1689
- if ( is_super_admin() ) {
1690
  $retval = true;
1691
 
1692
  // Looking at a single forum & forum is open
@@ -1707,6 +1708,7 @@ function bbp_current_user_can_access_create_forum_form() {
1707
  *
1708
  * @since bbPress (r3127)
1709
  *
 
1710
  * @uses bbp_is_topic_edit()
1711
  * @uses current_user_can()
1712
  * @uses bbp_get_topic_id()
@@ -1720,8 +1722,8 @@ function bbp_current_user_can_access_create_topic_form() {
1720
  // Users need to earn access
1721
  $retval = false;
1722
 
1723
- // Always allow super admins
1724
- if ( is_super_admin() ) {
1725
  $retval = true;
1726
 
1727
  // Looking at a single forum & forum is open
@@ -1742,6 +1744,7 @@ function bbp_current_user_can_access_create_topic_form() {
1742
  *
1743
  * @since bbPress (r3127)
1744
  *
 
1745
  * @uses bbp_is_topic_edit()
1746
  * @uses current_user_can()
1747
  * @uses bbp_get_topic_id()
@@ -1755,8 +1758,8 @@ function bbp_current_user_can_access_create_reply_form() {
1755
  // Users need to earn access
1756
  $retval = false;
1757
 
1758
- // Always allow super admins
1759
- if ( is_super_admin() ) {
1760
  $retval = true;
1761
 
1762
  // Looking at a single topic, topic is open, and forum is open
45
  $bbp_user_id = $user_id;
46
 
47
  // Currently viewing or editing a user
48
+ } elseif ( ( true === $displayed_user_fallback ) && !empty( $bbp->displayed_user->ID ) ) {
49
  $bbp_user_id = $bbp->displayed_user->ID;
50
 
51
  // Maybe fallback on the current_user ID
52
+ } elseif ( ( true === $current_user_fallback ) && !empty( $bbp->current_user->ID ) ) {
53
  $bbp_user_id = $bbp->current_user->ID;
54
 
55
  // Failsafe
56
  } else {
57
+ $bbp_user_id = 0;
58
  }
59
 
60
  return (int) apply_filters( 'bbp_get_user_id', (int) $bbp_user_id, $displayed_user_fallback, $current_user_fallback );
265
  function bbp_get_user_nicename( $user_id = 0, $args = array() ) {
266
 
267
  // Bail if no user ID passed
268
+ $user_id = bbp_get_user_id( $user_id );
269
  if ( empty( $user_id ) )
270
  return false;
271
 
291
  $retval = !empty( $nicename ) ? ( $r['before'] . $nicename . $r['after'] ) : '';
292
 
293
  // Filter and return
294
+ return (string) apply_filters( 'bbp_get_user_nicename', $retval, $user_id, $r );
295
  }
296
 
297
  /**
470
  *
471
  * @param int $user_id
472
  * @uses bbp_get_user_id() to verify the user ID
473
+ * @uses bbp_is_user_keymaster() to check if user is a keymaster
474
  * @uses bbp_is_user_inactive() to check if user is inactive
475
  * @uses user_can() to check if user has special capabilities
476
  * @uses apply_filters() Calls 'bbp_get_user_display_role' with the
480
  function bbp_get_user_display_role( $user_id = 0 ) {
481
 
482
  // Validate user id
483
+ $user_id = bbp_get_user_id( $user_id );
 
 
 
 
 
 
 
 
484
 
485
  // User is not registered
486
+ if ( empty( $user_id ) ) {
487
  $role = __( 'Guest', 'bbpress' );
488
 
489
+ // User is not active
490
+ } elseif ( bbp_is_user_inactive( $user_id ) ) {
491
+ $role = __( 'Inactive', 'bbpress' );
 
 
 
 
492
 
493
+ // User have a role
494
  } else {
495
+ $role_id = bbp_get_user_role( $user_id );
496
+ $role = bbp_get_dynamic_role_name( $role_id );
497
+ }
498
+
499
+ // No role found so default to generic "Member"
500
+ if ( empty( $role ) ) {
501
  $role = __( 'Member', 'bbpress' );
502
  }
503
 
574
 
575
  // Used as post id
576
  $post_id = is_numeric( $args ) ? (int) $args : 0;
577
+
578
  // Parse arguments against default values
579
  $r = bbp_parse_args( $args, array(
580
  'post_id' => $post_id,
724
  return false;
725
  }
726
 
727
+ // Decide which link to show
728
  $is_fav = bbp_is_user_favorite( $user_id, $topic_id );
729
  if ( !empty( $is_fav ) ) {
730
  $text = $r['favorited'];
882
  return false;
883
  }
884
 
885
+ // Decide which link to show
886
  $is_subscribed = bbp_is_user_subscribed( $user_id, $topic_id );
887
  if ( !empty( $is_subscribed ) ) {
888
  $text = $r['unsubscribe'];
1051
  $dynamic_roles = bbp_get_dynamic_roles();
1052
 
1053
  // Only keymasters can set other keymasters
1054
+ if ( ! bbp_is_user_keymaster() )
1055
  unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>
1056
 
1057
  <select name="bbp-forums-role" id="bbp-forums-role">
1467
  * @uses bbp_parse_args()
1468
  * @uses bbp_get_user_id()
1469
  * @uses current_user_can()
1470
+ * @uses bbp_is_user_keymaster()
1471
  * @uses bbp_is_forum_public()
1472
  * @uses bbp_is_forum_private()
1473
  * @uses bbp_is_forum_hidden()
1490
  $forum_id = bbp_get_forum_id( $r['forum_id'] );
1491
  $retval = false;
1492
 
1493
+ // User is a keymaster
1494
+ if ( bbp_is_user_keymaster() ) {
1495
  $retval = true;
1496
 
1497
  // Forum is public, and user can read forums or is not logged in
1515
  *
1516
  * @since bbPress (r3127)
1517
  *
1518
+ * @uses bbp_is_user_keymaster()
1519
  * @uses is_user_logged_in()
1520
  * @uses bbp_allow_anonymous()
1521
  * @uses bbp_is_user_active()
1529
  // Users need to earn access
1530
  $retval = false;
1531
 
1532
+ // Always allow keymasters
1533
+ if ( bbp_is_user_keymaster() ) {
1534
  $retval = true;
1535
 
1536
  // Do not allow anonymous if not enabled
1551
  *
1552
  * @since bbPress (r3549)
1553
  *
1554
+ * @uses bbp_is_user_keymaster()
1555
  * @uses bbp_is_user_active()
1556
  * @uses current_user_can()
1557
  * @uses apply_filters()
1563
  // Users need to earn access
1564
  $retval = false;
1565
 
1566
+ // Always allow keymasters
1567
+ if ( bbp_is_user_keymaster() ) {
1568
  $retval = true;
1569
 
1570
  // User is logged in
1581
  *
1582
  * @since bbPress (r3127)
1583
  *
1584
+ * @uses bbp_is_user_keymaster()
1585
  * @uses is_user_logged_in()
1586
  * @uses bbp_allow_anonymous()
1587
  * @uses bbp_is_user_active()
1595
  // Users need to earn access
1596
  $retval = false;
1597
 
1598
+ // Always allow keymasters
1599
+ if ( bbp_is_user_keymaster() ) {
1600
  $retval = true;
1601
 
1602
  // Do not allow anonymous if not enabled
1614
 
1615
  /** Forms *********************************************************************/
1616
 
1617
+ /**
1618
+ * The following functions should be turned into mapped meta capabilities in a
1619
+ * future version. They exist only to remove complex logistical capability
1620
+ * checks from within template parts.
1621
+ */
1622
+
1623
  /**
1624
  * Get the forums the current user has the ability to see and post to
1625
  *
1674
  *
1675
  * @since bbPress (r3549)
1676
  *
1677
+ * @uses bbp_is_user_keymaster()
1678
  * @uses bbp_is_forum_edit()
1679
  * @uses current_user_can()
1680
  * @uses bbp_get_forum_id()
1686
  // Users need to earn access
1687
  $retval = false;
1688
 
1689
+ // Always allow keymasters
1690
+ if ( bbp_is_user_keymaster() ) {
1691
  $retval = true;
1692
 
1693
  // Looking at a single forum & forum is open
1708
  *
1709
  * @since bbPress (r3127)
1710
  *
1711
+ * @uses bbp_is_user_keymaster()
1712
  * @uses bbp_is_topic_edit()
1713
  * @uses current_user_can()
1714
  * @uses bbp_get_topic_id()
1722
  // Users need to earn access
1723
  $retval = false;
1724
 
1725
+ // Always allow keymasters
1726
+ if ( bbp_is_user_keymaster() ) {
1727
  $retval = true;
1728
 
1729
  // Looking at a single forum & forum is open
1744
  *
1745
  * @since bbPress (r3127)
1746
  *
1747
+ * @uses bbp_is_user_keymaster()
1748
  * @uses bbp_is_topic_edit()
1749
  * @uses current_user_can()
1750
  * @uses bbp_get_topic_id()
1758
  // Users need to earn access
1759
  $retval = false;
1760
 
1761
+ // Always allow keymasters
1762
+ if ( bbp_is_user_keymaster() ) {
1763
  $retval = true;
1764
 
1765
  // Looking at a single topic, topic is open, and forum is open
languages/bbpress.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: bbPress 2.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bbpress\n"
7
- "POT-Creation-Date: 2013-01-28 18:51:15+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -20,11 +20,10 @@ msgstr ""
20
  msgid "bbPress Default"
21
  msgstr ""
22
 
23
- #: bbpress.php:487 bbpress.php:488 includes/admin/admin.php:211
24
- #: includes/admin/admin.php:212 includes/admin/admin.php:222
25
- #: includes/admin/admin.php:223 includes/admin/users.php:82
26
- #: includes/extend/buddypress/group.php:638
27
- #: includes/extend/buddypress/loader.php:42
28
  #: includes/extend/buddypress/loader.php:170
29
  #: includes/extend/buddypress/loader.php:259
30
  #: includes/extend/buddypress/loader.php:310
@@ -33,16 +32,16 @@ msgid "Forums"
33
  msgstr ""
34
 
35
  #: bbpress.php:489 includes/admin/forums.php:420
36
- #: includes/admin/metaboxes.php:50 includes/admin/metaboxes.php:358
37
- #: includes/admin/metaboxes.php:411 includes/admin/replies.php:621
38
- #: includes/admin/topics.php:686 includes/extend/buddypress/group.php:48
39
- #: includes/extend/buddypress/group.php:49
40
- #: includes/forums/template-tags.php:2145
41
  #: templates/default/bbpress/loop-forums.php:19
42
  msgid "Forum"
43
  msgstr ""
44
 
45
- #: bbpress.php:490 includes/admin/tools.php:1103
46
  msgid "All Forums"
47
  msgstr ""
48
 
@@ -55,9 +54,9 @@ msgid "Create New Forum"
55
  msgstr ""
56
 
57
  #: bbpress.php:493 bbpress.php:550 bbpress.php:607
58
- #: includes/common/template-tags.php:2148
59
- #: includes/replies/template-tags.php:1570
60
- #: includes/topics/template-tags.php:2307
61
  #: templates/default/bbpress/user-details.php:65
62
  msgid "Edit"
63
  msgstr ""
@@ -70,7 +69,7 @@ msgstr ""
70
  msgid "View Forum"
71
  msgstr ""
72
 
73
- #: bbpress.php:498
74
  msgid "Search Forums"
75
  msgstr ""
76
 
@@ -92,24 +91,23 @@ msgstr ""
92
 
93
  #: bbpress.php:544 bbpress.php:545 includes/admin/forums.php:421
94
  #: includes/admin/settings.php:187 includes/admin/settings.php:208
95
- #: includes/admin/topics.php:685 includes/extend/buddypress/activity.php:400
96
- #: includes/extend/buddypress/group.php:642
97
- #: includes/forums/template-tags.php:2293
98
  #: templates/default/bbpress/content-statistics.php:27
99
  #: templates/default/bbpress/loop-forums.php:20
100
  msgid "Topics"
101
  msgstr ""
102
 
103
  #: bbpress.php:546 includes/admin/metaboxes.php:67
104
- #: includes/admin/metaboxes.php:437 includes/admin/replies.php:622
105
  #: templates/default/bbpress/content-single-topic-lead.php:22
106
  #: templates/default/bbpress/content-single-topic-lead.php:94
107
  #: templates/default/bbpress/loop-topics.php:19
108
  msgid "Topic"
109
  msgstr ""
110
 
111
- #: bbpress.php:547 includes/admin/tools.php:1104
112
- #: includes/topics/functions.php:3302
113
  msgid "All Topics"
114
  msgstr ""
115
 
@@ -141,8 +139,8 @@ msgstr ""
141
  msgid "No topics found in Trash"
142
  msgstr ""
143
 
144
- #: bbpress.php:558 includes/admin/metaboxes.php:357
145
- #: includes/admin/metaboxes.php:410 includes/extend/buddypress/group.php:948
146
  #: templates/default/bbpress/form-topic.php:125
147
  msgid "Forum:"
148
  msgstr ""
@@ -153,9 +151,9 @@ msgstr ""
153
 
154
  #: bbpress.php:601 bbpress.php:602 includes/admin/forums.php:422
155
  #: includes/admin/settings.php:195 includes/admin/settings.php:216
156
- #: includes/admin/topics.php:687 includes/core/theme-compat.php:560
157
- #: includes/extend/buddypress/activity.php:401
158
- #: includes/forums/template-tags.php:2357
159
  #: templates/default/bbpress/content-statistics.php:32
160
  #: templates/default/bbpress/loop-forums.php:21
161
  #: templates/default/bbpress/loop-replies.php:32
@@ -168,8 +166,8 @@ msgstr ""
168
  msgid "Reply"
169
  msgstr ""
170
 
171
- #: bbpress.php:604 includes/admin/tools.php:1105
172
- #: includes/replies/functions.php:1810
173
  msgid "All Replies"
174
  msgstr ""
175
 
@@ -201,7 +199,8 @@ msgstr ""
201
  msgid "No replies found in Trash"
202
  msgstr ""
203
 
204
- #: bbpress.php:615 includes/admin/metaboxes.php:436
 
205
  msgid "Topic:"
206
  msgstr ""
207
 
@@ -215,7 +214,7 @@ msgid "Closed"
215
  msgstr ""
216
 
217
  #: bbpress.php:674
218
- msgctxt "bbpress"
219
  msgid "Closed <span class=\"count\">(%s)</span>"
220
  msgid_plural "Closed <span class=\"count\">(%s)</span>"
221
  msgstr[0] ""
@@ -227,7 +226,7 @@ msgid "Spam"
227
  msgstr ""
228
 
229
  #: bbpress.php:685
230
- msgctxt "bbpress"
231
  msgid "Spam <span class=\"count\">(%s)</span>"
232
  msgid_plural "Spam <span class=\"count\">(%s)</span>"
233
  msgstr[0] ""
@@ -239,7 +238,7 @@ msgid "Orphan"
239
  msgstr ""
240
 
241
  #: bbpress.php:698
242
- msgctxt "bbpress"
243
  msgid "Orphan <span class=\"count\">(%s)</span>"
244
  msgid_plural "Orphans <span class=\"count\">(%s)</span>"
245
  msgstr[0] ""
@@ -251,7 +250,7 @@ msgid "Hidden"
251
  msgstr ""
252
 
253
  #: bbpress.php:711
254
- msgctxt "bbpress"
255
  msgid "Hidden <span class=\"count\">(%s)</span>"
256
  msgid_plural "Hidden <span class=\"count\">(%s)</span>"
257
  msgstr[0] ""
@@ -298,442 +297,440 @@ msgid "View Topic Tag"
298
  msgstr ""
299
 
300
  #: bbpress.php:803
 
 
 
 
301
  msgid "Topics with no replies"
302
  msgstr ""
303
 
304
- #: includes/admin/admin.php:176 includes/admin/functions.php:224
305
  #: includes/admin/tools.php:34
306
  msgid "Repair Forums"
307
  msgstr ""
308
 
309
- #: includes/admin/admin.php:177
310
  msgid "Forum Repair"
311
  msgstr ""
312
 
313
- #: includes/admin/admin.php:186 includes/admin/functions.php:228
314
  #: includes/admin/settings.php:1269
315
  msgid "Import Forums"
316
  msgstr ""
317
 
318
- #: includes/admin/admin.php:187
319
  msgid "Forum Import"
320
  msgstr ""
321
 
322
- #: includes/admin/admin.php:196 includes/admin/functions.php:232
323
- #: includes/admin/tools.php:1094
324
  msgid "Reset Forums"
325
  msgstr ""
326
 
327
- #: includes/admin/admin.php:197
328
  msgid "Forum Reset"
329
  msgstr ""
330
 
331
- #: includes/admin/admin.php:235 includes/admin/admin.php:236
332
- #: includes/admin/admin.php:244 includes/admin/admin.php:245
333
  msgid "Welcome to bbPress"
334
  msgstr ""
335
 
336
- #: includes/admin/admin.php:258 includes/admin/admin.php:259
337
- #: includes/admin/admin.php:280 includes/admin/admin.php:281
338
- #: includes/admin/admin.php:1607 includes/admin/admin.php:1696
339
  msgid "Update Forums"
340
  msgstr ""
341
 
342
- #: includes/admin/admin.php:471
343
  msgid "Settings"
344
  msgstr ""
345
 
346
- #: includes/admin/admin.php:472
347
  msgid "About"
348
  msgstr ""
349
 
350
- #: includes/admin/admin.php:484
351
  msgid "Right Now in Forums"
352
  msgstr ""
353
 
354
- #: includes/admin/admin.php:1248
355
  msgctxt "admin color scheme"
356
  msgid "Green"
357
  msgstr ""
358
 
359
- #: includes/admin/admin.php:1302
360
  msgid "%s - %s"
361
  msgstr ""
362
 
363
- #: includes/admin/admin.php:1320 includes/admin/admin.php:1426
364
  msgid "Welcome to bbPress %s"
365
  msgstr ""
366
 
367
- #: includes/admin/admin.php:1321 includes/admin/admin.php:1427
368
  msgid ""
369
- "Thank you for updating to the latest version! bbPress %s is ready to make "
370
- "your community a safer, faster, and better looking place to hang out!"
371
  msgstr ""
372
 
373
- #: includes/admin/admin.php:1322 includes/admin/admin.php:1428
374
  msgid "Version %s"
375
  msgstr ""
376
 
377
- #: includes/admin/admin.php:1326 includes/admin/admin.php:1432
378
  msgid "What&#8217;s New"
379
  msgstr ""
380
 
381
- #: includes/admin/admin.php:1328 includes/admin/admin.php:1434
382
  msgid "Credits"
383
  msgstr ""
384
 
385
- #: includes/admin/admin.php:1333
386
- msgid "In-depth User Profiles"
387
  msgstr ""
388
 
389
- #: includes/admin/admin.php:1336
390
- msgid "User Details"
391
  msgstr ""
392
 
393
- #: includes/admin/admin.php:1337
394
- msgid ""
395
- "Forum profiles include the details of your forum activity, including your "
396
- "topics and replies, subscriptions, and favorites."
397
  msgstr ""
398
 
399
- #: includes/admin/admin.php:1339
400
- msgid "Easy Updating"
401
  msgstr ""
402
 
403
- #: includes/admin/admin.php:1340
404
- msgid "You can easily update your profile without leaving bbPress."
405
  msgstr ""
406
 
407
- #: includes/admin/admin.php:1345
408
- msgid "Theme Compatibility"
409
  msgstr ""
410
 
411
- #: includes/admin/admin.php:1348
412
- msgid "Twenty Twelve"
413
  msgstr ""
414
 
415
- #: includes/admin/admin.php:1349
416
  msgid ""
417
- "Updated default templates are now Twenty Twelve compatible, and we refreshed "
418
- "our CSS to better integrate with other popular themes, too."
419
  msgstr ""
420
 
421
- #: includes/admin/admin.php:1354
422
- msgid "Improved User Management"
423
- msgstr ""
424
-
425
- #: includes/admin/admin.php:1357
426
- msgid "Dynamic User Roles and Capabilities"
427
  msgstr ""
428
 
429
- #: includes/admin/admin.php:1358
430
  msgid ""
431
- "bbPress now includes some fancy user-roles with smart default capabilities "
432
- "to help you manage your forums. New roles include Key Master (for complete "
433
- "administrative access), Moderator, and Participant for regular forum users."
434
  msgstr ""
435
 
436
- #: includes/admin/admin.php:1360
437
- msgid "Manage Forum Users from WordPress"
438
  msgstr ""
439
 
440
- #: includes/admin/admin.php:1361
441
  msgid ""
442
- "You can assign Forums roles to users individually, or bulk update them from "
443
- "the WordPress Users page. Users automatically start out as forum "
444
- "participants."
445
  msgstr ""
446
 
447
- #: includes/admin/admin.php:1366
448
- msgid "Better BuddyPress Integration"
449
  msgstr ""
450
 
451
- #: includes/admin/admin.php:1369
452
- msgid "Use bbPress for Your BuddyPress Group Forums"
453
  msgstr ""
454
 
455
  #: includes/admin/admin.php:1370
456
- msgid ""
457
- "You can now use bbPress to manage your BuddyPress Group Forums, allowing for "
458
- "seamless integration and improved plugin performance. Plugins developed for "
459
- "bbPress can now be extended to improve the BuddyPress Group Forums "
460
- "experience."
461
  msgstr ""
462
 
463
- #: includes/admin/admin.php:1372
464
- msgid "Activity Stream Syncing"
465
  msgstr ""
466
 
467
- #: includes/admin/admin.php:1373
468
  msgid ""
469
- "bbPress now keeps track of changes to topics and replies and keeps their "
470
- "corresponding BuddyPress Activity Stream updates synced."
471
  msgstr ""
472
 
473
- #: includes/admin/admin.php:1378
474
  msgid "Under the Hood"
475
  msgstr ""
476
 
477
- #: includes/admin/admin.php:1382
478
- msgid "Template Logic"
479
  msgstr ""
480
 
481
- #: includes/admin/admin.php:1383
482
  msgid ""
483
- "New functions and template stacks are in place to help plugin developers "
484
- "extend bbPress further."
485
  msgstr ""
486
 
487
- #: includes/admin/admin.php:1385
488
- msgid "Plugin Directory Structure"
489
  msgstr ""
490
 
491
- #: includes/admin/admin.php:1386
 
 
 
 
 
 
 
 
492
  msgid ""
493
- "We simplified the bbPress plugin directory structure, making it easier for "
494
- "plugin developers to find the relevant code."
495
  msgstr ""
496
 
497
- #: includes/admin/admin.php:1390
498
- msgid "Autocomplete"
499
  msgstr ""
500
 
501
- #: includes/admin/admin.php:1391
502
  msgid ""
503
- "In WordPress Admin, you now select a parent forum or topic via autocomplete "
504
- "rather than a dropdown."
505
  msgstr ""
506
 
507
- #: includes/admin/admin.php:1393
508
- msgid "Fancy Editor Support"
509
  msgstr ""
510
 
511
- #: includes/admin/admin.php:1394
512
  msgid ""
513
- "We improved our support of the Fancy Editor, giving forum users a better "
514
- "experience."
515
  msgstr ""
516
 
517
- #: includes/admin/admin.php:1398
518
- msgid "WordPress 3.5-ready"
519
  msgstr ""
520
 
521
- #: includes/admin/admin.php:1399
522
  msgid ""
523
- "bbPress 2.2 has been thoroughly tested against the ongoing development of "
524
- "WordPress 3.5."
525
  msgstr ""
526
 
527
- #: includes/admin/admin.php:1405 includes/admin/admin.php:1533
528
  msgid "Go to Forum Settings"
529
  msgstr ""
530
 
531
- #: includes/admin/admin.php:1438
532
  msgid "bbPress is created by a worldwide swarm of busy, busy bees."
533
  msgstr ""
534
 
535
- #: includes/admin/admin.php:1440
536
  msgid "Project Leaders"
537
  msgstr ""
538
 
539
- #: includes/admin/admin.php:1445
540
  msgid "Founding Developer"
541
  msgstr ""
542
 
543
- #: includes/admin/admin.php:1450
544
  msgid "Lead Developer"
545
  msgstr ""
546
 
547
- #: includes/admin/admin.php:1454
548
  msgid "Contributing Developers"
549
  msgstr ""
550
 
551
- #: includes/admin/admin.php:1473
552
  msgid "Codex Rockstars"
553
  msgstr ""
554
 
555
- #: includes/admin/admin.php:1492
556
- msgid "Core Contributors to bbPress 2.2"
557
  msgstr ""
558
 
559
- #: includes/admin/admin.php:1559 includes/admin/admin.php:1581
560
  msgid "Update Forum"
561
  msgstr ""
562
 
563
- #: includes/admin/admin.php:1570 includes/admin/admin.php:1624
564
  msgid "All done!"
565
  msgstr ""
566
 
567
- #: includes/admin/admin.php:1571 includes/admin/admin.php:1625
568
  msgid "Go Back"
569
  msgstr ""
570
 
571
- #: includes/admin/admin.php:1580
572
  msgid ""
573
  "You can update your forum through this page. Hit the link below to update."
574
  msgstr ""
575
 
576
- #: includes/admin/admin.php:1652
577
  msgid ""
578
  "Warning! Problem updating %1$s. Your server may not be able to connect to "
579
  "sites running on it. Error message: <em>%2$s</em>"
580
  msgstr ""
581
 
582
- #: includes/admin/admin.php:1676
583
  msgid ""
584
  "If your browser doesn&#8217;t start loading the next page automatically, "
585
  "click this link:"
586
  msgstr ""
587
 
588
- #: includes/admin/admin.php:1677
589
  msgid "Next Forums"
590
  msgstr ""
591
 
592
- #: includes/admin/admin.php:1695
593
  msgid ""
594
  "You can update all the forums on your network through this page. It works by "
595
  "calling the update script of each site automatically. Hit the link below to "
596
  "update."
597
  msgstr ""
598
 
599
- #: includes/admin/converter.php:80
600
  msgid "Database Settings"
601
  msgstr ""
602
 
603
- #: includes/admin/converter.php:83
604
  msgid "Select Platform"
605
  msgstr ""
606
 
607
- #: includes/admin/converter.php:87
608
  msgid "Database Server"
609
  msgstr ""
610
 
611
- #: includes/admin/converter.php:91
612
  msgid "Database Port"
613
  msgstr ""
614
 
615
- #: includes/admin/converter.php:95
616
  msgid "Database Name"
617
  msgstr ""
618
 
619
- #: includes/admin/converter.php:99
620
  msgid "Database User"
621
  msgstr ""
622
 
623
- #: includes/admin/converter.php:103
624
  msgid "Database Password"
625
  msgstr ""
626
 
627
- #: includes/admin/converter.php:107
628
  msgid "Table Prefix"
629
  msgstr ""
630
 
631
- #: includes/admin/converter.php:111
632
  msgid "Options"
633
  msgstr ""
634
 
635
- #: includes/admin/converter.php:114
636
  msgid "Rows Limit"
637
  msgstr ""
638
 
639
- #: includes/admin/converter.php:118
640
  msgid "Delay Time"
641
  msgstr ""
642
 
643
- #: includes/admin/converter.php:122
644
  msgid "Convert Users"
645
  msgstr ""
646
 
647
- #: includes/admin/converter.php:126
648
  msgid "Start Over"
649
  msgstr ""
650
 
651
- #: includes/admin/converter.php:130
652
  msgid "Purge Previous Import"
653
  msgstr ""
654
 
655
- #: includes/admin/converter.php:219
656
  msgid "Starting Conversion"
657
  msgstr ""
658
 
659
- #: includes/admin/converter.php:244 includes/admin/converter.php:471
660
  msgid "Conversion Complete"
661
  msgstr ""
662
 
663
- #: includes/admin/converter.php:338
664
  msgid "No data to clean"
665
  msgstr ""
666
 
667
- #: includes/admin/converter.php:342
668
  msgid "Deleting previously converted data (%1$s - %2$s)"
669
  msgstr ""
670
 
671
- #: includes/admin/converter.php:358
672
  msgid "No users to convert"
673
  msgstr ""
674
 
675
- #: includes/admin/converter.php:362
676
  msgid "Converting users (%1$s - %2$s)"
677
  msgstr ""
678
 
679
- #: includes/admin/converter.php:378
680
  msgid "No passwords to clear"
681
  msgstr ""
682
 
683
- #: includes/admin/converter.php:382
684
- msgid "Delete users wordpress default passwords (%1$s - %2$s)"
685
  msgstr ""
686
 
687
- #: includes/admin/converter.php:397
688
  msgid "No forums to convert"
689
  msgstr ""
690
 
691
- #: includes/admin/converter.php:401
692
  msgid "Converting forums (%1$s - %2$s)"
693
  msgstr ""
694
 
695
- #: includes/admin/converter.php:412
696
  msgid "No forum parents to convert"
697
  msgstr ""
698
 
699
- #: includes/admin/converter.php:416
700
  msgid "Calculating forum hierarchy (%1$s - %2$s)"
701
  msgstr ""
702
 
703
- #: includes/admin/converter.php:427
704
  msgid "No topics to convert"
705
  msgstr ""
706
 
707
- #: includes/admin/converter.php:431
708
  msgid "Converting topics (%1$s - %2$s)"
709
  msgstr ""
710
 
711
- #: includes/admin/converter.php:442
712
  msgid "No tags to convert"
713
  msgstr ""
714
 
715
- #: includes/admin/converter.php:446
716
  msgid "Converting topic tags (%1$s - %2$s)"
717
  msgstr ""
718
 
719
- #: includes/admin/converter.php:457
720
  msgid "No replies to convert"
721
  msgstr ""
722
 
723
- #: includes/admin/converter.php:461
724
  msgid "Converting replies (%1$s - %2$s)"
725
  msgstr ""
726
 
727
  #: includes/admin/converters/Invision.php:502
728
  #: includes/admin/converters/SimplePress5.php:495
729
  #: includes/admin/converters/Vanilla.php:514
730
- #: includes/admin/converters/bbPress1.php:539
731
  #: includes/admin/converters/vBulletin.php:536
732
  msgid "Re: "
733
  msgstr ""
734
 
735
- #: includes/admin/forums.php:120 includes/admin/replies.php:132
736
- #: includes/admin/settings.php:1309 includes/admin/topics.php:132
737
  msgid "Overview"
738
  msgstr ""
739
 
@@ -743,13 +740,13 @@ msgid ""
743
  "the display of this screen to suit your workflow."
744
  msgstr ""
745
 
746
- #: includes/admin/forums.php:128 includes/admin/replies.php:140
747
- #: includes/admin/topics.php:140
748
  msgid "Screen Content"
749
  msgstr ""
750
 
751
- #: includes/admin/forums.php:130 includes/admin/replies.php:142
752
- #: includes/admin/topics.php:142
753
  msgid ""
754
  "You can customize the display of this screen&#8217;s contents in a number of "
755
  "ways:"
@@ -776,8 +773,8 @@ msgid ""
776
  "creator in the forums list."
777
  msgstr ""
778
 
779
- #: includes/admin/forums.php:141 includes/admin/replies.php:154
780
- #: includes/admin/topics.php:153
781
  msgid "Available Actions"
782
  msgstr ""
783
 
@@ -806,8 +803,8 @@ msgid ""
806
  "Which link is available depends on your forum&#8217;s status."
807
  msgstr ""
808
 
809
- #: includes/admin/forums.php:154 includes/admin/replies.php:169
810
- #: includes/admin/topics.php:170
811
  msgid "Bulk Actions"
812
  msgstr ""
813
 
@@ -826,25 +823,25 @@ msgid ""
826
  msgstr ""
827
 
828
  #: includes/admin/forums.php:162 includes/admin/forums.php:233
829
- #: includes/admin/replies.php:177 includes/admin/replies.php:245
830
- #: includes/admin/settings.php:1355 includes/admin/topics.php:178
831
- #: includes/admin/topics.php:246
832
  msgid "For more information:"
833
  msgstr ""
834
 
835
  #: includes/admin/forums.php:163 includes/admin/forums.php:234
836
- #: includes/admin/replies.php:178 includes/admin/replies.php:246
837
- #: includes/admin/settings.php:1356 includes/admin/topics.php:179
838
- #: includes/admin/topics.php:247
839
  msgid ""
840
  "<a href=\"http://codex.bbpress.org\" target=\"_blank\">bbPress "
841
  "Documentation</a>"
842
  msgstr ""
843
 
844
  #: includes/admin/forums.php:164 includes/admin/forums.php:235
845
- #: includes/admin/replies.php:179 includes/admin/replies.php:247
846
- #: includes/admin/settings.php:1357 includes/admin/topics.php:180
847
- #: includes/admin/topics.php:248
848
  msgid ""
849
  "<a href=\"http://bbpress.org/forums/\" target=\"_blank\">bbPress Support "
850
  "Forums</a>"
@@ -860,8 +857,8 @@ msgid ""
860
  "screen."
861
  msgstr ""
862
 
863
- #: includes/admin/forums.php:182 includes/admin/replies.php:197
864
- #: includes/admin/topics.php:198
865
  msgid "Customizing This Display"
866
  msgstr ""
867
 
@@ -955,18 +952,18 @@ msgstr ""
955
  msgid "<strong>Order</strong> allows you to order your forums numerically."
956
  msgstr ""
957
 
958
- #: includes/admin/forums.php:220 includes/admin/replies.php:232
959
- #: includes/admin/topics.php:233
960
  msgid "Publish Box"
961
  msgstr ""
962
 
963
- #: includes/admin/forums.php:226 includes/admin/replies.php:238
964
- #: includes/admin/topics.php:239
965
  msgid "Discussion Settings"
966
  msgstr ""
967
 
968
- #: includes/admin/forums.php:228 includes/admin/replies.php:240
969
- #: includes/admin/topics.php:241
970
  msgid ""
971
  "<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy "
972
  "blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to "
@@ -986,23 +983,23 @@ msgstr ""
986
  msgid "Creator"
987
  msgstr ""
988
 
989
- #: includes/admin/forums.php:424 includes/admin/replies.php:624
990
- #: includes/admin/topics.php:690
991
  msgid "Created"
992
  msgstr ""
993
 
994
- #: includes/admin/forums.php:425 includes/admin/topics.php:691
995
  #: templates/default/bbpress/loop-forums.php:22
996
  #: templates/default/bbpress/loop-topics.php:22
997
  msgid "Freshness"
998
  msgstr ""
999
 
1000
- #: includes/admin/forums.php:462 includes/admin/replies.php:732
1001
- #: includes/admin/topics.php:770
1002
  msgid "%1$s <br /> %2$s"
1003
  msgstr ""
1004
 
1005
- #: includes/admin/forums.php:474 includes/forums/template-tags.php:541
1006
  msgid "No Topics"
1007
  msgstr ""
1008
 
@@ -1010,13 +1007,13 @@ msgstr ""
1010
  msgid "Forum updated. <a href=\"%s\">View forum</a>"
1011
  msgstr ""
1012
 
1013
- #: includes/admin/forums.php:543 includes/admin/replies.php:904
1014
- #: includes/admin/topics.php:976
1015
  msgid "Custom field updated."
1016
  msgstr ""
1017
 
1018
- #: includes/admin/forums.php:546 includes/admin/replies.php:907
1019
- #: includes/admin/topics.php:979
1020
  msgid "Custom field deleted."
1021
  msgstr ""
1022
 
@@ -1048,8 +1045,8 @@ msgid ""
1048
  msgstr ""
1049
 
1050
  #. translators: Publish box date format, see http:php.net/date
1051
- #: includes/admin/forums.php:569 includes/admin/replies.php:930
1052
- #: includes/admin/topics.php:1002
1053
  msgid "M j, Y @ G:i"
1054
  msgstr ""
1055
 
@@ -1094,7 +1091,7 @@ msgid "You are using <span class=\"b\">bbPress %s</span>."
1094
  msgstr ""
1095
 
1096
  #: includes/admin/metaboxes.php:261 includes/admin/metaboxes.php:262
1097
- #: includes/admin/metaboxes.php:351
1098
  msgid "Type:"
1099
  msgstr ""
1100
 
@@ -1116,88 +1113,88 @@ msgstr ""
1116
  msgid "Forum Parent"
1117
  msgstr ""
1118
 
1119
- #: includes/admin/metaboxes.php:315 includes/admin/metaboxes.php:373
1120
- #: includes/admin/metaboxes.php:426
1121
  msgid "&mdash; No parent &mdash;"
1122
  msgstr ""
1123
 
1124
- #: includes/admin/metaboxes.php:323
1125
  msgid "Order:"
1126
  msgstr ""
1127
 
1128
- #: includes/admin/metaboxes.php:324
1129
  msgid "Forum Order"
1130
  msgstr ""
1131
 
1132
- #: includes/admin/metaboxes.php:352
1133
  msgid "Topic Type"
1134
  msgstr ""
1135
 
1136
- #: includes/admin/metaboxes.php:467
1137
  #: templates/default/bbpress/form-topic-tag.php:35
1138
  msgid "Name:"
1139
  msgstr ""
1140
 
1141
- #: includes/admin/metaboxes.php:468
1142
  #: templates/default/bbpress/form-user-edit.php:14
1143
  #: templates/default/bbpress/form-user-edit.php:19
1144
  msgid "Name"
1145
  msgstr ""
1146
 
1147
- #: includes/admin/metaboxes.php:473
1148
  msgid "Email:"
1149
  msgstr ""
1150
 
1151
- #: includes/admin/metaboxes.php:474
1152
  #: templates/default/bbpress/form-user-edit.php:103
1153
  #: templates/default/bbpress/form-user-register.php:28
1154
  msgid "Email"
1155
  msgstr ""
1156
 
1157
- #: includes/admin/metaboxes.php:479
1158
  #: templates/default/bbpress/form-anonymous.php:32
1159
  msgid "Website:"
1160
  msgstr ""
1161
 
1162
- #: includes/admin/metaboxes.php:480
1163
  #: templates/default/bbpress/form-user-edit.php:57
1164
  msgid "Website"
1165
  msgstr ""
1166
 
1167
- #: includes/admin/metaboxes.php:487
1168
  msgid "IP:"
1169
  msgstr ""
1170
 
1171
- #: includes/admin/metaboxes.php:488
1172
  msgid "IP Address"
1173
  msgstr ""
1174
 
1175
- #: includes/admin/replies.php:134
1176
  msgid ""
1177
  "This screen provides access to all of your replies. You can customize the "
1178
  "display of this screen to suit your workflow."
1179
  msgstr ""
1180
 
1181
- #: includes/admin/replies.php:144
1182
  msgid ""
1183
  "You can hide/display columns based on your needs and decide how many replies "
1184
  "to list per screen using the Screen Options tab."
1185
  msgstr ""
1186
 
1187
- #: includes/admin/replies.php:145
1188
  msgid ""
1189
  "You can filter the list of replies by reply status using the text links in "
1190
  "the upper left to show All, Published, Draft, or Trashed replies. The "
1191
  "default view is to show all replies."
1192
  msgstr ""
1193
 
1194
- #: includes/admin/replies.php:146
1195
  msgid ""
1196
  "You can view replies in a simple title list or with an excerpt. Choose the "
1197
  "view you prefer by clicking on the icons at the top of the list on the right."
1198
  msgstr ""
1199
 
1200
- #: includes/admin/replies.php:147
1201
  msgid ""
1202
  "You can refine the list to show only replies in a specific category or from "
1203
  "a specific month by using the dropdown menus above the replies list. Click "
@@ -1205,52 +1202,52 @@ msgid ""
1205
  "by clicking on the reply author, category or tag in the replies list."
1206
  msgstr ""
1207
 
1208
- #: includes/admin/replies.php:156
1209
  msgid ""
1210
  "Hovering over a row in the replies list will display action links that allow "
1211
  "you to manage your reply. You can perform the following actions:"
1212
  msgstr ""
1213
 
1214
- #: includes/admin/replies.php:158
1215
  msgid ""
1216
  "<strong>Edit</strong> takes you to the editing screen for that reply. You "
1217
  "can also reach that screen by clicking on the reply title."
1218
  msgstr ""
1219
 
1220
- #: includes/admin/replies.php:160
1221
  msgid ""
1222
  "<strong>Trash</strong> removes your reply from this list and places it in "
1223
  "the trash, from which you can permanently delete it."
1224
  msgstr ""
1225
 
1226
- #: includes/admin/replies.php:161
1227
  msgid ""
1228
  "<strong>Spam</strong> removes your reply from this list and places it in the "
1229
  "spam queue, from which you can permanently delete it."
1230
  msgstr ""
1231
 
1232
- #: includes/admin/replies.php:162
1233
  msgid ""
1234
  "<strong>Preview</strong> will show you what your draft reply will look like "
1235
  "if you publish it. View will take you to your live site to view the reply. "
1236
  "Which link is available depends on your reply&#8217;s status."
1237
  msgstr ""
1238
 
1239
- #: includes/admin/replies.php:171
1240
  msgid ""
1241
  "You can also edit or move multiple replies to the trash at once. Select the "
1242
  "replies you want to act on using the checkboxes, then select the action you "
1243
  "want to take from the Bulk Actions menu and click Apply."
1244
  msgstr ""
1245
 
1246
- #: includes/admin/replies.php:172
1247
  msgid ""
1248
  "When using Bulk Edit, you can change the metadata (categories, author, etc.) "
1249
  "for all selected replies at once. To remove a reply from the grouping, just "
1250
  "click the x next to its name in the Bulk Edit area that appears."
1251
  msgstr ""
1252
 
1253
- #: includes/admin/replies.php:193
1254
  msgid ""
1255
  "The title field and the big reply editing Area are fixed in place, but you "
1256
  "can reposition all the other boxes using drag and drop, and can minimize or "
@@ -1260,17 +1257,17 @@ msgid ""
1260
  "screen."
1261
  msgstr ""
1262
 
1263
- #: includes/admin/replies.php:203
1264
  msgid "Title and Reply Editor"
1265
  msgstr ""
1266
 
1267
- #: includes/admin/replies.php:205
1268
  msgid ""
1269
  "<strong>Title</strong> - Enter a title for your reply. After you enter a "
1270
  "title, you&#8217;ll see the permalink below, which you can edit."
1271
  msgstr ""
1272
 
1273
- #: includes/admin/replies.php:206
1274
  msgid ""
1275
  "<strong>Reply Editor</strong> - Enter the text for your reply. There are two "
1276
  "modes of editing: Visual and HTML. Choose the mode by clicking on the "
@@ -1284,7 +1281,7 @@ msgid ""
1284
  "over the top area. Exit Fullscreen back to the regular reply editor."
1285
  msgstr ""
1286
 
1287
- #: includes/admin/replies.php:209
1288
  msgid ""
1289
  "<strong>Publish</strong> - You can set the terms of publishing your reply in "
1290
  "the Publish box. For Status, Visibility, and Publish (immediately), click on "
@@ -1295,7 +1292,7 @@ msgid ""
1295
  "future or backdate a reply."
1296
  msgstr ""
1297
 
1298
- #: includes/admin/replies.php:212
1299
  msgid ""
1300
  "<strong>reply Format</strong> - This designates how your theme will display "
1301
  "a specific reply. For example, you could have a <em>standard</em> blog reply "
@@ -1306,7 +1303,7 @@ msgid ""
1306
  "formats."
1307
  msgstr ""
1308
 
1309
- #: includes/admin/replies.php:216
1310
  msgid ""
1311
  "<strong>Featured Image</strong> - This allows you to associate an image with "
1312
  "your reply without inserting it. This is usually useful only if your theme "
@@ -1314,66 +1311,66 @@ msgid ""
1314
  "custom header, etc."
1315
  msgstr ""
1316
 
1317
- #: includes/admin/replies.php:221 includes/admin/replies.php:266
1318
  msgid "Reply Attributes"
1319
  msgstr ""
1320
 
1321
- #: includes/admin/replies.php:223
1322
  msgid "Select the attributes that your reply should have:"
1323
  msgstr ""
1324
 
1325
- #: includes/admin/replies.php:225
1326
  msgid ""
1327
  "<strong>Forum</strong> dropdown determines the parent forum that the reply "
1328
  "belongs to. Select the forum, or leave the default (Use Forum of Topic) to "
1329
  "post the reply in forum of the topic."
1330
  msgstr ""
1331
 
1332
- #: includes/admin/replies.php:226
1333
  msgid ""
1334
  "<strong>Topic</strong> determines the parent topic that the reply belongs to."
1335
  msgstr ""
1336
 
1337
- #: includes/admin/replies.php:241
1338
  msgid ""
1339
  "<strong>Discussion</strong> - You can turn comments and pings on or off, and "
1340
  "if there are comments on the reply, you can see them here and moderate them."
1341
  msgstr ""
1342
 
1343
- #: includes/admin/replies.php:351 includes/admin/topics.php:369
1344
  #: templates/default/bbpress/form-anonymous.php:17
1345
  msgid "Author Information"
1346
  msgstr ""
1347
 
1348
- #: includes/admin/replies.php:512
1349
  msgid "The reply was not found!"
1350
  msgstr ""
1351
 
1352
- #: includes/admin/replies.php:515 includes/admin/topics.php:541
1353
  msgid "You do not have the permission to do that!"
1354
  msgstr ""
1355
 
1356
- #: includes/admin/replies.php:583
1357
  msgid "There was a problem marking the reply \"%1$s\" as spam."
1358
  msgstr ""
1359
 
1360
- #: includes/admin/replies.php:583
1361
  msgid "Reply \"%1$s\" successfully marked as spam."
1362
  msgstr ""
1363
 
1364
- #: includes/admin/replies.php:587
1365
  msgid "There was a problem unmarking the reply \"%1$s\" as spam."
1366
  msgstr ""
1367
 
1368
- #: includes/admin/replies.php:587
1369
  msgid "Reply \"%1$s\" successfully unmarked as spam."
1370
  msgstr ""
1371
 
1372
- #: includes/admin/replies.php:620
1373
  msgid "Title"
1374
  msgstr ""
1375
 
1376
- #: includes/admin/replies.php:623 includes/admin/topics.php:689
1377
  #: templates/default/bbpress/loop-replies.php:18
1378
  #: templates/default/bbpress/loop-replies.php:52
1379
  #: templates/default/bbpress/loop-search.php:18
@@ -1381,119 +1378,119 @@ msgstr ""
1381
  msgid "Author"
1382
  msgstr ""
1383
 
1384
- #: includes/admin/replies.php:677 includes/admin/replies.php:685
1385
  msgid "No Topic"
1386
  msgstr ""
1387
 
1388
- #: includes/admin/replies.php:703 includes/admin/replies.php:718
1389
- #: includes/admin/topics.php:741
1390
  msgid "No Forum"
1391
  msgstr ""
1392
 
1393
- #: includes/admin/replies.php:709
1394
  msgid "(Mismatch)"
1395
  msgstr ""
1396
 
1397
- #: includes/admin/replies.php:777 includes/admin/topics.php:830
1398
  msgid "View &#8220;%s&#8221;"
1399
  msgstr ""
1400
 
1401
- #: includes/admin/replies.php:777 includes/admin/topics.php:830
1402
  msgid "View"
1403
  msgstr ""
1404
 
1405
- #: includes/admin/replies.php:788
1406
  msgid "Mark the reply as not spam"
1407
  msgstr ""
1408
 
1409
- #: includes/admin/replies.php:788 includes/admin/topics.php:861
1410
  msgid "Not spam"
1411
  msgstr ""
1412
 
1413
- #: includes/admin/replies.php:790
1414
  msgid "Mark this reply as spam"
1415
  msgstr ""
1416
 
1417
- #: includes/admin/replies.php:790 includes/admin/topics.php:863
1418
- #: includes/replies/template-tags.php:1765
1419
- #: includes/topics/template-tags.php:2688
1420
  msgid "Spam"
1421
  msgstr ""
1422
 
1423
- #: includes/admin/replies.php:799 includes/admin/topics.php:871
1424
- #: includes/replies/template-tags.php:1707
1425
- #: includes/topics/template-tags.php:2444
1426
  msgid "Restore this item from the Trash"
1427
  msgstr ""
1428
 
1429
- #: includes/admin/replies.php:799 includes/admin/topics.php:871
1430
- #: includes/replies/template-tags.php:1695
1431
- #: includes/topics/template-tags.php:2432
1432
  msgid "Restore"
1433
  msgstr ""
1434
 
1435
- #: includes/admin/replies.php:801 includes/admin/topics.php:873
1436
- #: includes/replies/template-tags.php:1709
1437
- #: includes/topics/template-tags.php:2446
1438
  msgid "Move this item to the Trash"
1439
  msgstr ""
1440
 
1441
- #: includes/admin/replies.php:801 includes/admin/topics.php:873
1442
- #: includes/replies/template-tags.php:1694
1443
- #: includes/topics/template-tags.php:2431
1444
  msgid "Trash"
1445
  msgstr ""
1446
 
1447
- #: includes/admin/replies.php:805 includes/admin/topics.php:877
1448
- #: includes/replies/template-tags.php:1713
1449
- #: includes/topics/template-tags.php:2450
1450
  msgid "Delete this item permanently"
1451
  msgstr ""
1452
 
1453
- #: includes/admin/replies.php:805 includes/admin/topics.php:877
1454
  msgid "Delete Permanently"
1455
  msgstr ""
1456
 
1457
- #: includes/admin/replies.php:831 includes/admin/topics.php:903
1458
  msgid "Empty Spam"
1459
  msgstr ""
1460
 
1461
- #: includes/admin/replies.php:841 includes/admin/topics.php:913
1462
  msgid "In all forums"
1463
  msgstr ""
1464
 
1465
- #: includes/admin/replies.php:901
1466
  msgid "Reply updated. <a href=\"%s\">View topic</a>"
1467
  msgstr ""
1468
 
1469
- #: includes/admin/replies.php:910
1470
  msgid "Reply updated."
1471
  msgstr ""
1472
 
1473
  #. translators: %s: date and time of the revision
1474
- #: includes/admin/replies.php:915
1475
  msgid "Reply restored to revision from %s"
1476
  msgstr ""
1477
 
1478
- #: includes/admin/replies.php:919
1479
  msgid "Reply created. <a href=\"%s\">View topic</a>"
1480
  msgstr ""
1481
 
1482
- #: includes/admin/replies.php:922
1483
  msgid "Reply saved."
1484
  msgstr ""
1485
 
1486
- #: includes/admin/replies.php:925
1487
  msgid "Reply submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
1488
  msgstr ""
1489
 
1490
- #: includes/admin/replies.php:928
1491
  msgid ""
1492
  "Reply scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
1493
  "\">Preview topic</a>"
1494
  msgstr ""
1495
 
1496
- #: includes/admin/replies.php:935
1497
  msgid "Reply draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
1498
  msgstr ""
1499
 
@@ -2040,279 +2037,283 @@ msgstr ""
2040
  msgid "Repair Items"
2041
  msgstr ""
2042
 
2043
- #: includes/admin/tools.php:160
2044
  msgid "Recalculate the parent topic for each post"
2045
  msgstr ""
2046
 
2047
- #: includes/admin/tools.php:161
2048
  msgid "Recalculate the parent forum for each post"
2049
  msgstr ""
2050
 
2051
- #: includes/admin/tools.php:162
2052
  msgid "Recalculate private and hidden forums"
2053
  msgstr ""
2054
 
2055
- #: includes/admin/tools.php:163
2056
  msgid "Recalculate last activity in each topic and forum"
2057
  msgstr ""
2058
 
2059
- #: includes/admin/tools.php:164
2060
- msgid "Recalculate the sticky replationship of each topic"
2061
  msgstr ""
2062
 
2063
- #: includes/admin/tools.php:165
2064
  msgid "Repair BuddyPress Group Forum relationships"
2065
  msgstr ""
2066
 
2067
- #: includes/admin/tools.php:166
2068
  msgid "Count topics in each forum"
2069
  msgstr ""
2070
 
2071
- #: includes/admin/tools.php:167
2072
  msgid "Count replies in each forum"
2073
  msgstr ""
2074
 
2075
- #: includes/admin/tools.php:168
2076
  msgid "Count replies in each topic"
2077
  msgstr ""
2078
 
2079
- #: includes/admin/tools.php:169
2080
  msgid "Count voices in each topic"
2081
  msgstr ""
2082
 
2083
- #: includes/admin/tools.php:170
2084
  msgid "Count spammed & trashed replies in each topic"
2085
  msgstr ""
2086
 
2087
- #: includes/admin/tools.php:171
2088
  msgid "Count topics for each user"
2089
  msgstr ""
2090
 
2091
- #: includes/admin/tools.php:172
2092
  msgid "Count replies for each user"
2093
  msgstr ""
2094
 
2095
- #: includes/admin/tools.php:173
2096
  msgid "Remove trashed topics from user favorites"
2097
  msgstr ""
2098
 
2099
- #: includes/admin/tools.php:174
2100
  msgid "Remove trashed topics from user subscriptions"
2101
  msgstr ""
2102
 
2103
- #: includes/admin/tools.php:175
2104
  msgid "Remap existing users to default forum roles"
2105
  msgstr ""
2106
 
2107
- #: includes/admin/tools.php:195
2108
  msgid "Counting the number of replies in each topic&hellip; %s"
2109
  msgstr ""
2110
 
2111
- #: includes/admin/tools.php:196 includes/admin/tools.php:239
2112
- #: includes/admin/tools.php:281 includes/admin/tools.php:326
2113
- #: includes/admin/tools.php:442 includes/admin/tools.php:476
2114
- #: includes/admin/tools.php:508 includes/admin/tools.php:553
2115
- #: includes/admin/tools.php:598 includes/admin/tools.php:660
2116
- #: includes/admin/tools.php:728 includes/admin/tools.php:776
2117
- #: includes/admin/tools.php:882 includes/admin/tools.php:940
2118
- #: includes/admin/tools.php:989 includes/admin/tools.php:1043
2119
  msgid "Failed!"
2120
  msgstr ""
2121
 
2122
- #: includes/admin/tools.php:222 includes/admin/tools.php:265
2123
- #: includes/admin/tools.php:291 includes/admin/tools.php:457
2124
- #: includes/admin/tools.php:491 includes/admin/tools.php:536
2125
- #: includes/admin/tools.php:581 includes/admin/tools.php:643
2126
- #: includes/admin/tools.php:704 includes/admin/tools.php:866
2127
- #: includes/admin/tools.php:923 includes/admin/tools.php:973
2128
- #: includes/admin/tools.php:1027 includes/admin/tools.php:1072
2129
  msgid "Complete!"
2130
  msgstr ""
2131
 
2132
- #: includes/admin/tools.php:238
2133
  msgid "Counting the number of voices in each topic&hellip; %s"
2134
  msgstr ""
2135
 
2136
- #: includes/admin/tools.php:280
2137
  msgid ""
2138
  "Counting the number of spammed and trashed replies in each topic&hellip; %s"
2139
  msgstr ""
2140
 
2141
- #: includes/admin/tools.php:305
2142
  msgid "Repairing BuddyPress group-forum relationships&hellip; %s"
2143
  msgstr ""
2144
 
2145
- #: includes/admin/tools.php:406
2146
  msgid "Group Forums"
2147
  msgstr ""
2148
 
2149
- #: includes/admin/tools.php:422
 
 
 
 
2150
  msgid ""
2151
  "Complete! %s groups updated; %s forums updated; %s forum statuses synced."
2152
  msgstr ""
2153
 
2154
- #: includes/admin/tools.php:441
2155
  msgid "Counting the number of topics in each forum&hellip; %s"
2156
  msgstr ""
2157
 
2158
- #: includes/admin/tools.php:475
2159
  msgid "Counting the number of replies in each forum&hellip; %s"
2160
  msgstr ""
2161
 
2162
- #: includes/admin/tools.php:507
2163
  msgid "Counting the number of topics each user has created&hellip; %s"
2164
  msgstr ""
2165
 
2166
- #: includes/admin/tools.php:552
2167
  msgid "Counting the number of topics to which each user has replied&hellip; %s"
2168
  msgstr ""
2169
 
2170
- #: includes/admin/tools.php:597
2171
  msgid "Removing trashed topics from user favorites&hellip; %s"
2172
  msgstr ""
2173
 
2174
- #: includes/admin/tools.php:627 includes/admin/tools.php:688
2175
  msgid "Nothing to remove!"
2176
  msgstr ""
2177
 
2178
- #: includes/admin/tools.php:659
2179
  msgid "Removing trashed topics from user subscriptions&hellip; %s"
2180
  msgstr ""
2181
 
2182
- #: includes/admin/tools.php:721
2183
  msgid "Remapping forum role for each user on this site&hellip; %s"
2184
  msgstr ""
2185
 
2186
- #: includes/admin/tools.php:759
2187
  msgid "Complete! %s users updated."
2188
  msgstr ""
2189
 
2190
- #: includes/admin/tools.php:775
2191
  msgid "Recomputing latest post in every topic and forum&hellip; %s"
2192
  msgstr ""
2193
 
2194
- #: includes/admin/tools.php:881
2195
  msgid "Repairing the sticky topic to the parent forum relationships&hellip; %s"
2196
  msgstr ""
2197
 
2198
- #: includes/admin/tools.php:939
2199
  msgid "Recalculating forum visibility &hellip; %s"
2200
  msgstr ""
2201
 
2202
- #: includes/admin/tools.php:988
2203
  msgid "Recalculating the forum for each post &hellip; %s"
2204
  msgstr ""
2205
 
2206
- #: includes/admin/tools.php:1042
2207
  msgid "Recalculating the topic for each post &hellip; %s"
2208
  msgstr ""
2209
 
2210
- #: includes/admin/tools.php:1095
2211
  msgid ""
2212
  "This will revert your forums back to a brand new installation. This process "
2213
  "cannot be undone. <strong>Backup your database before proceeding</strong>."
2214
  msgstr ""
2215
 
2216
- #: includes/admin/tools.php:1101
2217
  msgid "The following data will be removed:"
2218
  msgstr ""
2219
 
2220
- #: includes/admin/tools.php:1106
2221
  msgid "All Topic Tags"
2222
  msgstr ""
2223
 
2224
- #: includes/admin/tools.php:1107
2225
  msgid "Related Meta Data"
2226
  msgstr ""
2227
 
2228
- #: includes/admin/tools.php:1108
2229
  msgid "Forum Settings"
2230
  msgstr ""
2231
 
2232
- #: includes/admin/tools.php:1109
2233
  msgid "Forum Activity"
2234
  msgstr ""
2235
 
2236
- #: includes/admin/tools.php:1110
2237
  msgid "Forum User Roles"
2238
  msgstr ""
2239
 
2240
- #: includes/admin/tools.php:1111
2241
  msgid "Importer Helper Data"
2242
  msgstr ""
2243
 
2244
- #: includes/admin/tools.php:1115
2245
  msgid "Are you sure you want to do this?"
2246
  msgstr ""
2247
 
2248
- #: includes/admin/tools.php:1118
2249
  msgid "Say it ain't so!"
2250
  msgstr ""
2251
 
2252
- #: includes/admin/tools.php:1119
2253
  msgid "This process cannot be undone."
2254
  msgstr ""
2255
 
2256
- #: includes/admin/tools.php:1127
2257
  msgid "Reset bbPress"
2258
  msgstr ""
2259
 
2260
- #: includes/admin/tools.php:1152
2261
  msgid "Failed"
2262
  msgstr ""
2263
 
2264
- #: includes/admin/tools.php:1153
2265
  msgid "Success!"
2266
  msgstr ""
2267
 
2268
- #: includes/admin/tools.php:1160
2269
  msgid "Deleting Posts&hellip; %s"
2270
  msgstr ""
2271
 
2272
- #: includes/admin/tools.php:1173
2273
  msgid "Deleting Post Meta&hellip; %s"
2274
  msgstr ""
2275
 
2276
- #: includes/admin/tools.php:1182
2277
  msgid "Deleting Topic Tags&hellip; %s"
2278
  msgstr ""
2279
 
2280
- #: includes/admin/tools.php:1189
2281
  msgid "Deleting User Meta&hellip; %s"
2282
  msgstr ""
2283
 
2284
- #: includes/admin/tools.php:1196
2285
  msgid "Deleting Conversion Table&hellip; %s"
2286
  msgstr ""
2287
 
2288
- #: includes/admin/tools.php:1208
2289
  msgid "Deleting Settings&hellip; %s"
2290
  msgstr ""
2291
 
2292
- #: includes/admin/tools.php:1214
2293
  msgid "Deleting Roles and Capabilities&hellip; %s"
2294
  msgstr ""
2295
 
2296
- #: includes/admin/topics.php:134
2297
  msgid ""
2298
  "This screen displays the individual topics on your site. You can customize "
2299
  "the display of this screen to suit your workflow."
2300
  msgstr ""
2301
 
2302
- #: includes/admin/topics.php:144
2303
  msgid ""
2304
  "You can hide/display columns based on your needs and decide how many topics "
2305
  "to list per screen using the Screen Options tab."
2306
  msgstr ""
2307
 
2308
- #: includes/admin/topics.php:145
2309
  msgid ""
2310
  "You can filter the list of topics by topic status using the text links in "
2311
  "the upper left to show All, Published, or Trashed topics. The default view "
2312
  "is to show all topics."
2313
  msgstr ""
2314
 
2315
- #: includes/admin/topics.php:146
2316
  msgid ""
2317
  "You can refine the list to show only topics from a specific month by using "
2318
  "the dropdown menus above the topics list. Click the Filter button after "
@@ -2320,71 +2321,71 @@ msgid ""
2320
  "creator in the topics list."
2321
  msgstr ""
2322
 
2323
- #: includes/admin/topics.php:155
2324
  msgid ""
2325
  "Hovering over a row in the topics list will display action links that allow "
2326
  "you to manage your topic. You can perform the following actions:"
2327
  msgstr ""
2328
 
2329
- #: includes/admin/topics.php:157
2330
  msgid ""
2331
  "<strong>Edit</strong> takes you to the editing screen for that topic. You "
2332
  "can also reach that screen by clicking on the topic title."
2333
  msgstr ""
2334
 
2335
- #: includes/admin/topics.php:158
2336
  msgid ""
2337
  "<strong>Trash</strong> removes your topic from this list and places it in "
2338
  "the trash, from which you can permanently delete it."
2339
  msgstr ""
2340
 
2341
- #: includes/admin/topics.php:159
2342
  msgid ""
2343
  "<strong>Spam</strong> removes your topic from this list and places it in the "
2344
  "spam queue, from which you can permanently delete it."
2345
  msgstr ""
2346
 
2347
- #: includes/admin/topics.php:160
2348
  msgid ""
2349
  "<strong>Preview</strong> will show you what your draft topic will look like "
2350
  "if you publish it. View will take you to your live site to view the topic. "
2351
  "Which link is available depends on your topic&#8217;s status."
2352
  msgstr ""
2353
 
2354
- #: includes/admin/topics.php:161
2355
  msgid ""
2356
  "<strong>Close</strong> will mark the selected topic as &#8217;closed&#8217; "
2357
  "and disable the option to post new replies to the topic."
2358
  msgstr ""
2359
 
2360
- #: includes/admin/topics.php:162
2361
  msgid ""
2362
  "<strong>Stick</strong> will keep the selected topic &#8217;pinned&#8217; to "
2363
  "the top the parent forum topic list."
2364
  msgstr ""
2365
 
2366
- #: includes/admin/topics.php:163
2367
  msgid ""
2368
  "<strong>Stick <em>(to front)</em></strong> will keep the selected topic "
2369
  "&#8217;pinned&#8217; to the top of ALL forums and be visable in any forums "
2370
  "topics list."
2371
  msgstr ""
2372
 
2373
- #: includes/admin/topics.php:172
2374
  msgid ""
2375
  "You can also edit or move multiple topics to the trash at once. Select the "
2376
  "topics you want to act on using the checkboxes, then select the action you "
2377
  "want to take from the Bulk Actions menu and click Apply."
2378
  msgstr ""
2379
 
2380
- #: includes/admin/topics.php:173
2381
  msgid ""
2382
  "When using Bulk Edit, you can change the metadata (categories, author, etc.) "
2383
  "for all selected topics at once. To remove a topic from the grouping, just "
2384
  "click the x next to its name in the Bulk Edit area that appears."
2385
  msgstr ""
2386
 
2387
- #: includes/admin/topics.php:194
2388
  msgid ""
2389
  "The title field and the big topic editing Area are fixed in place, but you "
2390
  "can reposition all the other boxes using drag and drop, and can minimize or "
@@ -2394,17 +2395,17 @@ msgid ""
2394
  "screen."
2395
  msgstr ""
2396
 
2397
- #: includes/admin/topics.php:204
2398
  msgid "Title and Topic Editor"
2399
  msgstr ""
2400
 
2401
- #: includes/admin/topics.php:206
2402
  msgid ""
2403
  "<strong>Title</strong> - Enter a title for your topic. After you enter a "
2404
  "title, you&#8217;ll see the permalink below, which you can edit."
2405
  msgstr ""
2406
 
2407
- #: includes/admin/topics.php:207
2408
  msgid ""
2409
  "<strong>Topic Editor</strong> - Enter the text for your topic. There are two "
2410
  "modes of editing: Visual and HTML. Choose the mode by clicking on the "
@@ -2418,7 +2419,7 @@ msgid ""
2418
  "over the top area. Exit Fullscreen back to the regular topic editor."
2419
  msgstr ""
2420
 
2421
- #: includes/admin/topics.php:210
2422
  msgid ""
2423
  "<strong>Publish</strong> - You can set the terms of publishing your topic in "
2424
  "the Publish box. For Status, Visibility, and Publish (immediately), click on "
@@ -2429,7 +2430,7 @@ msgid ""
2429
  "future or backdate a topic."
2430
  msgstr ""
2431
 
2432
- #: includes/admin/topics.php:213
2433
  msgid ""
2434
  "<strong>topic Format</strong> - This designates how your theme will display "
2435
  "a specific topic. For example, you could have a <em>standard</em> blog topic "
@@ -2440,7 +2441,7 @@ msgid ""
2440
  "formats."
2441
  msgstr ""
2442
 
2443
- #: includes/admin/topics.php:217
2444
  msgid ""
2445
  "<strong>Featured Image</strong> - This allows you to associate an image with "
2446
  "your topic without inserting it. This is usually useful only if your theme "
@@ -2448,22 +2449,22 @@ msgid ""
2448
  "custom header, etc."
2449
  msgstr ""
2450
 
2451
- #: includes/admin/topics.php:222 includes/admin/topics.php:267
2452
  msgid "Topic Attributes"
2453
  msgstr ""
2454
 
2455
- #: includes/admin/topics.php:224
2456
  msgid "Select the attributes that your topic should have:"
2457
  msgstr ""
2458
 
2459
- #: includes/admin/topics.php:226
2460
  msgid ""
2461
  "<strong>Forum</strong> dropdown determines the parent forum that the topic "
2462
  "belongs to. Select the forum or category from the dropdown, or leave the "
2463
  "default (No Forum) to post the topic without an assigned forum."
2464
  msgstr ""
2465
 
2466
- #: includes/admin/topics.php:227
2467
  msgid ""
2468
  "<strong>Topic Type</strong> dropdown indicates the sticky status of the "
2469
  "topic. Selecting the super sticky option would stick the topic to the front "
@@ -2471,176 +2472,176 @@ msgid ""
2471
  "its respective forum. Selecting normal would not stick the topic anywhere."
2472
  msgstr ""
2473
 
2474
- #: includes/admin/topics.php:242
2475
  msgid ""
2476
  "<strong>Discussion</strong> - You can turn comments and pings on or off, and "
2477
  "if there are comments on the topic, you can see them here and moderate them."
2478
  msgstr ""
2479
 
2480
- #: includes/admin/topics.php:538
2481
  msgid "The topic was not found!"
2482
  msgstr ""
2483
 
2484
- #: includes/admin/topics.php:628
2485
  msgid "There was a problem opening the topic \"%1$s\"."
2486
  msgstr ""
2487
 
2488
- #: includes/admin/topics.php:628
2489
  msgid "Topic \"%1$s\" successfully opened."
2490
  msgstr ""
2491
 
2492
- #: includes/admin/topics.php:632
2493
  msgid "There was a problem closing the topic \"%1$s\"."
2494
  msgstr ""
2495
 
2496
- #: includes/admin/topics.php:632
2497
  msgid "Topic \"%1$s\" successfully closed."
2498
  msgstr ""
2499
 
2500
- #: includes/admin/topics.php:636
2501
  msgid "There was a problem sticking the topic \"%1$s\" to front."
2502
  msgstr ""
2503
 
2504
- #: includes/admin/topics.php:636
2505
  msgid "Topic \"%1$s\" successfully sticked to front."
2506
  msgstr ""
2507
 
2508
- #: includes/admin/topics.php:640
2509
  msgid "There was a problem sticking the topic \"%1$s\"."
2510
  msgstr ""
2511
 
2512
- #: includes/admin/topics.php:640
2513
  msgid "Topic \"%1$s\" successfully sticked."
2514
  msgstr ""
2515
 
2516
- #: includes/admin/topics.php:644
2517
  msgid "There was a problem unsticking the topic \"%1$s\"."
2518
  msgstr ""
2519
 
2520
- #: includes/admin/topics.php:644
2521
  msgid "Topic \"%1$s\" successfully unsticked."
2522
  msgstr ""
2523
 
2524
- #: includes/admin/topics.php:648
2525
  msgid "There was a problem marking the topic \"%1$s\" as spam."
2526
  msgstr ""
2527
 
2528
- #: includes/admin/topics.php:648
2529
  msgid "Topic \"%1$s\" successfully marked as spam."
2530
  msgstr ""
2531
 
2532
- #: includes/admin/topics.php:652
2533
  msgid "There was a problem unmarking the topic \"%1$s\" as spam."
2534
  msgstr ""
2535
 
2536
- #: includes/admin/topics.php:652
2537
  msgid "Topic \"%1$s\" successfully unmarked as spam."
2538
  msgstr ""
2539
 
2540
- #: includes/admin/topics.php:688 templates/default/bbpress/loop-topics.php:20
2541
  msgid "Voices"
2542
  msgstr ""
2543
 
2544
- #: includes/admin/topics.php:748
2545
  msgid "(No Forum)"
2546
  msgstr ""
2547
 
2548
- #: includes/admin/topics.php:783 includes/topics/template-tags.php:1873
2549
  msgid "No Replies"
2550
  msgstr ""
2551
 
2552
- #: includes/admin/topics.php:840
2553
  msgid "Close this topic"
2554
  msgstr ""
2555
 
2556
- #: includes/admin/topics.php:840
2557
  msgctxt "Close a Topic"
2558
  msgid "Close"
2559
  msgstr ""
2560
 
2561
- #: includes/admin/topics.php:842
2562
  msgid "Open this topic"
2563
  msgstr ""
2564
 
2565
- #: includes/admin/topics.php:842
2566
  msgctxt "Open a Topic"
2567
  msgid "Open"
2568
  msgstr ""
2569
 
2570
- #: includes/admin/topics.php:851
2571
  msgid "Unstick this topic"
2572
  msgstr ""
2573
 
2574
- #: includes/admin/topics.php:851 includes/topics/template-tags.php:2562
2575
  msgid "Unstick"
2576
  msgstr ""
2577
 
2578
- #: includes/admin/topics.php:854
2579
  msgid "Stick this topic to its forum"
2580
  msgstr ""
2581
 
2582
- #: includes/admin/topics.php:854 includes/topics/template-tags.php:2561
2583
  msgid "Stick"
2584
  msgstr ""
2585
 
2586
- #: includes/admin/topics.php:854
2587
  msgid "Stick this topic to front"
2588
  msgstr ""
2589
 
2590
- #: includes/admin/topics.php:854 includes/topics/template-tags.php:2563
2591
  msgid "to front"
2592
  msgstr ""
2593
 
2594
- #: includes/admin/topics.php:861
2595
  msgid "Mark the topic as not spam"
2596
  msgstr ""
2597
 
2598
- #: includes/admin/topics.php:863
2599
  msgid "Mark this topic as spam"
2600
  msgstr ""
2601
 
2602
- #: includes/admin/topics.php:973
2603
  msgid "Topic updated. <a href=\"%s\">View topic</a>"
2604
  msgstr ""
2605
 
2606
- #: includes/admin/topics.php:982
2607
  msgid "Topic updated."
2608
  msgstr ""
2609
 
2610
  #. translators: %s: date and time of the revision
2611
- #: includes/admin/topics.php:987
2612
  msgid "Topic restored to revision from %s"
2613
  msgstr ""
2614
 
2615
- #: includes/admin/topics.php:991
2616
  msgid "Topic created. <a href=\"%s\">View topic</a>"
2617
  msgstr ""
2618
 
2619
- #: includes/admin/topics.php:994
2620
  msgid "Topic saved."
2621
  msgstr ""
2622
 
2623
- #: includes/admin/topics.php:997
2624
  msgid "Topic submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
2625
  msgstr ""
2626
 
2627
- #: includes/admin/topics.php:1000
2628
  msgid ""
2629
  "Topic scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
2630
  "\">Preview topic</a>"
2631
  msgstr ""
2632
 
2633
- #: includes/admin/topics.php:1007
2634
  msgid "Topic draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
2635
  msgstr ""
2636
 
2637
  #: includes/admin/users.php:87 includes/admin/users.php:213
2638
- #: templates/default/bbpress/form-user-roles.php:9
2639
  msgid "Forum Role"
2640
  msgstr ""
2641
 
2642
  #: includes/admin/users.php:96 includes/admin/users.php:100
2643
- #: includes/users/template-tags.php:1064
2644
  msgid "&mdash; No role for these forums &mdash;"
2645
  msgstr ""
2646
 
@@ -2741,7 +2742,7 @@ msgstr ""
2741
  msgid "<strong>ERROR</strong>: Invalid email address submitted!"
2742
  msgstr ""
2743
 
2744
- #: includes/common/functions.php:1063
2745
  msgid ""
2746
  "%1$s wrote:\n"
2747
  "\n"
@@ -2756,90 +2757,90 @@ msgid ""
2756
  "Login and visit the topic to unsubscribe from these emails."
2757
  msgstr ""
2758
 
2759
- #: includes/common/functions.php:1701
2760
  msgid ""
2761
  "Conditional query tags do not work before the query is run. Before then, "
2762
  "they always return false."
2763
  msgstr ""
2764
 
2765
- #: includes/common/template-tags.php:1417
2766
  msgid "No topics available"
2767
  msgstr ""
2768
 
2769
- #: includes/common/template-tags.php:1422
2770
  msgid "No forums available"
2771
  msgstr ""
2772
 
2773
- #: includes/common/template-tags.php:1427
2774
  msgid "None available"
2775
  msgstr ""
2776
 
2777
- #: includes/common/template-tags.php:1555 includes/replies/functions.php:1146
2778
- #: includes/topics/functions.php:1222 includes/topics/functions.php:1577
2779
  #: templates/default/bbpress/form-reply.php:29
2780
  msgid "Reply To: %s"
2781
  msgstr ""
2782
 
2783
- #: includes/common/template-tags.php:2074
2784
  msgid "Home"
2785
  msgstr ""
2786
 
2787
- #: includes/common/template-tags.php:2140
2788
  msgid "(Edit)"
2789
  msgstr ""
2790
 
2791
- #: includes/common/template-tags.php:2144
2792
- #: includes/common/template-tags.php:2254
2793
- #: includes/common/template-tags.php:2491 includes/core/theme-compat.php:631
2794
  #: templates/default/extras/taxonomy-topic-tag-edit.php:17
2795
  #: templates/default/extras/taxonomy-topic-tag.php:17
2796
  msgid "Topic Tag: %s"
2797
  msgstr ""
2798
 
2799
- #: includes/common/template-tags.php:2165
2800
  msgid "&lsaquo;"
2801
  msgstr ""
2802
 
2803
- #: includes/common/template-tags.php:2165
2804
  msgid "&rsaquo;"
2805
  msgstr ""
2806
 
2807
- #: includes/common/template-tags.php:2258
2808
  #: includes/search/template-tags.php:213
2809
  #: templates/default/bbpress/form-search.php:16
2810
  msgid "Search"
2811
  msgstr ""
2812
 
2813
- #: includes/common/template-tags.php:2425
2814
  msgid "Log Out"
2815
  msgstr ""
2816
 
2817
- #: includes/common/template-tags.php:2478
2818
  msgid "Forum: %s"
2819
  msgstr ""
2820
 
2821
- #: includes/common/template-tags.php:2482
2822
  msgid "Topic: %s"
2823
  msgstr ""
2824
 
2825
- #: includes/common/template-tags.php:2500
2826
  msgid "Your Profile"
2827
  msgstr ""
2828
 
2829
- #: includes/common/template-tags.php:2505
2830
  #: templates/default/bbpress/user-details.php:29
2831
  msgid "%s's Profile"
2832
  msgstr ""
2833
 
2834
- #: includes/common/template-tags.php:2513
2835
  msgid "Edit Your Profile"
2836
  msgstr ""
2837
 
2838
- #: includes/common/template-tags.php:2518
2839
  msgid "Edit %s's Profile"
2840
  msgstr ""
2841
 
2842
- #: includes/common/template-tags.php:2525
2843
  msgid "View: %s"
2844
  msgstr ""
2845
 
@@ -2852,42 +2853,42 @@ msgstr ""
2852
  msgid "(bbPress) Login Widget"
2853
  msgstr ""
2854
 
2855
- #: includes/common/widgets.php:85 includes/common/widgets.php:106
2856
  #: templates/default/bbpress/form-user-login.php:14
2857
  #: templates/default/bbpress/form-user-login.php:35
2858
  msgid "Log In"
2859
  msgstr ""
2860
 
2861
- #: includes/common/widgets.php:88
2862
  #: templates/default/bbpress/form-user-edit.php:98
2863
  #: templates/default/bbpress/form-user-login.php:17
2864
  #: templates/default/bbpress/form-user-register.php:23
2865
  msgid "Username"
2866
  msgstr ""
2867
 
2868
- #: includes/common/widgets.php:93
2869
  #: templates/default/bbpress/form-user-login.php:22
2870
  msgid "Password"
2871
  msgstr ""
2872
 
2873
- #: includes/common/widgets.php:99
2874
  msgid "Remember Me"
2875
  msgstr ""
2876
 
2877
- #: includes/common/widgets.php:118
2878
  #: templates/default/bbpress/form-user-register.php:36
2879
  msgid "Register"
2880
  msgstr ""
2881
 
2882
- #: includes/common/widgets.php:124
2883
  #: templates/default/bbpress/form-user-lost-pass.php:14
2884
  msgid "Lost Password"
2885
  msgstr ""
2886
 
2887
- #: includes/common/widgets.php:185 includes/common/widgets.php:313
2888
- #: includes/common/widgets.php:415 includes/common/widgets.php:560
2889
- #: includes/common/widgets.php:780 includes/common/widgets.php:893
2890
- #: includes/common/widgets.php:1075
2891
  msgid "Title:"
2892
  msgstr ""
2893
 
@@ -2899,152 +2900,168 @@ msgstr ""
2899
  msgid "Lost Password URI:"
2900
  msgstr ""
2901
 
2902
- #: includes/common/widgets.php:227
2903
  msgid "A list of registered optional topic views."
2904
  msgstr ""
2905
 
2906
- #: includes/common/widgets.php:230
2907
  msgid "(bbPress) Topic Views List"
2908
  msgstr ""
2909
 
2910
- #: includes/common/widgets.php:346
2911
  msgid "The bbPress forum search form."
2912
  msgstr ""
2913
 
2914
- #: includes/common/widgets.php:349
2915
  msgid "(bbPress) Forum Search Form"
2916
  msgstr ""
2917
 
2918
- #: includes/common/widgets.php:448
2919
  msgid "A list of forums with an option to set the parent."
2920
  msgstr ""
2921
 
2922
- #: includes/common/widgets.php:451
2923
  msgid "(bbPress) Forums List"
2924
  msgstr ""
2925
 
2926
- #: includes/common/widgets.php:566
2927
  msgid "Parent Forum ID:"
2928
  msgstr ""
2929
 
2930
- #: includes/common/widgets.php:572
2931
  msgid "\"0\" to show only root - \"any\" to show all"
2932
  msgstr ""
2933
 
2934
- #: includes/common/widgets.php:603
2935
  msgid "A list of recent topics, sorted by popularity or freshness."
2936
  msgstr ""
2937
 
2938
- #: includes/common/widgets.php:606
2939
  msgid "(bbPress) Recent Topics"
2940
  msgstr ""
2941
 
2942
- #: includes/common/widgets.php:721
2943
  msgctxt "widgets"
2944
  msgid "by %1$s"
2945
  msgstr ""
2946
 
2947
- #: includes/common/widgets.php:781
2948
  msgid "Maximum topics to show:"
2949
  msgstr ""
2950
 
2951
- #: includes/common/widgets.php:782 includes/common/widgets.php:1077
2952
  msgid "Show post date:"
2953
  msgstr ""
2954
 
2955
- #: includes/common/widgets.php:783
2956
  msgid "Show topic author:"
2957
  msgstr ""
2958
 
2959
- #: includes/common/widgets.php:786
2960
  msgid "Order By:"
2961
  msgstr ""
2962
 
2963
- #: includes/common/widgets.php:788
2964
  msgid "Newest Topics"
2965
  msgstr ""
2966
 
2967
- #: includes/common/widgets.php:789
2968
  #: templates/default/extras/page-forum-statistics.php:34
2969
  msgid "Popular Topics"
2970
  msgstr ""
2971
 
2972
- #: includes/common/widgets.php:790
2973
  msgid "Topics With Recent Replies"
2974
  msgstr ""
2975
 
2976
- #: includes/common/widgets.php:822
 
 
 
 
2977
  msgid "Some statistics from your forum."
2978
  msgstr ""
2979
 
2980
- #: includes/common/widgets.php:825
2981
  msgid "(bbPress) Statistics"
2982
  msgstr ""
2983
 
2984
- #: includes/common/widgets.php:927
 
 
 
 
2985
  msgid "A list of the most recent replies."
2986
  msgstr ""
2987
 
2988
- #: includes/common/widgets.php:930
2989
  msgid "(bbPress) Recent Replies"
2990
  msgstr ""
2991
 
2992
  #. translators: 1: reply author, 2: reply link, 3: reply timestamp
2993
- #: includes/common/widgets.php:1004
2994
  msgctxt "widgets"
2995
  msgid "%1$s on %2$s %3$s"
2996
  msgstr ""
2997
 
2998
  #. translators: 1: reply link, 2: reply timestamp
2999
- #: includes/common/widgets.php:1010
3000
  msgctxt "widgets"
3001
  msgid "%1$s %2$s"
3002
  msgstr ""
3003
 
3004
  #. translators: 1: reply author, 2: reply link
3005
- #: includes/common/widgets.php:1016
3006
  msgctxt "widgets"
3007
  msgid "%1$s on %2$s"
3008
  msgstr ""
3009
 
3010
  #. translators: 1: reply link
3011
- #: includes/common/widgets.php:1022
3012
  msgctxt "widgets"
3013
  msgid "%1$s"
3014
  msgstr ""
3015
 
3016
- #: includes/common/widgets.php:1076
3017
  msgid "Maximum replies to show:"
3018
  msgstr ""
3019
 
3020
- #: includes/common/widgets.php:1078
3021
  msgid "Show reply author:"
3022
  msgstr ""
3023
 
3024
- #: includes/core/capabilities.php:409
 
 
 
 
3025
  msgid "Keymaster"
3026
  msgstr ""
3027
 
3028
- #: includes/core/capabilities.php:415 includes/users/template-tags.php:499
3029
  msgid "Moderator"
3030
  msgstr ""
3031
 
3032
- #: includes/core/capabilities.php:421 includes/users/template-tags.php:503
3033
  msgid "Participant"
3034
  msgstr ""
3035
 
3036
- #: includes/core/capabilities.php:427
3037
  msgid "Spectator"
3038
  msgstr ""
3039
 
3040
- #: includes/core/capabilities.php:433
3041
  msgid "Blocked"
3042
  msgstr ""
3043
 
3044
- #: includes/core/capabilities.php:537 includes/core/capabilities.php:547
3045
  msgid "Editable forum roles no longer exist."
3046
  msgstr ""
3047
 
 
 
 
 
3048
  #: includes/core/update.php:172
3049
  msgid "General"
3050
  msgstr ""
@@ -3099,53 +3116,80 @@ msgid ""
3099
  "retry again later."
3100
  msgstr ""
3101
 
3102
- #: includes/extend/buddypress/activity.php:240
3103
  msgid "New forum topic"
3104
  msgstr ""
3105
 
3106
- #: includes/extend/buddypress/activity.php:241
3107
  msgid "New forum reply"
3108
  msgstr ""
3109
 
3110
- #: includes/extend/buddypress/activity.php:466
3111
  msgid "%1$s started the topic %2$s in the forum %3$s"
3112
  msgstr ""
3113
 
3114
- #: includes/extend/buddypress/activity.php:616
3115
  msgid "%1$s replied to the topic %2$s in the forum %3$s"
3116
  msgstr ""
3117
 
3118
- #: includes/extend/buddypress/group.php:245
3119
- msgid "Enable Group Forum"
 
3120
  msgstr ""
3121
 
3122
- #: includes/extend/buddypress/group.php:247
3123
- #: includes/extend/buddypress/group.php:356
3124
  msgid ""
3125
  "Create a discussion forum to allow members of this group to communicate in a "
3126
  "structured, bulletin-board style fashion."
3127
  msgstr ""
3128
 
3129
- #: includes/extend/buddypress/group.php:250
3130
- #: includes/extend/buddypress/group.php:359
3131
  msgid "Yes. I want this group to have a forum."
3132
  msgstr ""
3133
 
3134
- #: includes/extend/buddypress/group.php:253
3135
  msgid "Saying no will not delete existing forum content."
3136
  msgstr ""
3137
 
3138
- #: includes/extend/buddypress/group.php:255
 
 
 
 
 
 
 
 
 
3139
  msgid "Save Settings"
3140
  msgstr ""
3141
 
3142
- #: includes/extend/buddypress/group.php:354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3143
  msgid "Group Forum"
3144
  msgstr ""
3145
 
3146
- #: includes/extend/buddypress/group.php:666
3147
- #: includes/extend/buddypress/group.php:675
3148
- msgid "This group does not currently have any forums."
3149
  msgstr ""
3150
 
3151
  #: includes/extend/buddypress/loader.php:99
@@ -3172,17 +3216,6 @@ msgstr ""
3172
  msgid "Subscribed Topics"
3173
  msgstr ""
3174
 
3175
- #: includes/forums/functions.php:118 includes/forums/functions.php:394
3176
- #: includes/replies/functions.php:114 includes/replies/functions.php:419
3177
- #: includes/replies/functions.php:1093 includes/topics/functions.php:120
3178
- #: includes/topics/functions.php:470 includes/topics/functions.php:1081
3179
- #: includes/topics/functions.php:1380 includes/topics/functions.php:1727
3180
- #: includes/topics/functions.php:1766 includes/topics/functions.php:1823
3181
- #: includes/users/functions.php:463 includes/users/functions.php:781
3182
- #: includes/users/functions.php:907 includes/users/functions.php:913
3183
- msgid "<strong>ERROR</strong>: Are you sure you wanted to do that?"
3184
- msgstr ""
3185
-
3186
  #: includes/forums/functions.php:131
3187
  msgid ""
3188
  "<strong>ERROR</strong>: You do not have permission to create new forums."
@@ -3223,7 +3256,7 @@ msgid ""
3223
  msgstr ""
3224
 
3225
  #: includes/forums/functions.php:208 includes/replies/functions.php:203
3226
- #: includes/topics/functions.php:219
3227
  msgid "<strong>ERROR</strong>: Slow down; you move too fast."
3228
  msgstr ""
3229
 
@@ -3251,86 +3284,86 @@ msgstr ""
3251
  msgid "<strong>ERROR</strong>: Your forum cannot be edited at this time."
3252
  msgstr ""
3253
 
3254
- #: includes/forums/template-tags.php:1128
3255
- #: includes/forums/template-tags.php:1865
3256
  msgid "%s topic"
3257
  msgid_plural "%s topics"
3258
  msgstr[0] ""
3259
  msgstr[1] ""
3260
 
3261
- #: includes/forums/template-tags.php:1144
3262
- #: includes/topics/template-tags.php:1929
3263
  msgid " (+ %d hidden)"
3264
  msgstr ""
3265
 
3266
- #: includes/forums/template-tags.php:1854
3267
- #: includes/topics/template-tags.php:1913
3268
  msgid "%s reply"
3269
  msgid_plural "%s replies"
3270
  msgstr[0] ""
3271
  msgstr[1] ""
3272
 
3273
- #: includes/forums/template-tags.php:1874
3274
  msgid ""
3275
  "This category contains %1$s and %2$s, and was last updated by %3$s %4$s."
3276
  msgstr ""
3277
 
3278
- #: includes/forums/template-tags.php:1876
3279
  msgid "This forum contains %1$s and %2$s, and was last updated by %3$s %4$s."
3280
  msgstr ""
3281
 
3282
- #: includes/forums/template-tags.php:1882
3283
  msgid "This category contains %1$s, and was last updated by %2$s %3$s."
3284
  msgstr ""
3285
 
3286
- #: includes/forums/template-tags.php:1884
3287
  msgid "This forum contains %1$s, and was last updated by %2$s %3$s."
3288
  msgstr ""
3289
 
3290
- #: includes/forums/template-tags.php:1894
3291
  msgid "This category contains %1$s and %2$s."
3292
  msgstr ""
3293
 
3294
- #: includes/forums/template-tags.php:1896
3295
  msgid "This forum contains %1$s and %2$s."
3296
  msgstr ""
3297
 
3298
- #: includes/forums/template-tags.php:1904
3299
  msgid "This category contains %1$s."
3300
  msgstr ""
3301
 
3302
- #: includes/forums/template-tags.php:1906
3303
  msgid "This forum contains %1$s."
3304
  msgstr ""
3305
 
3306
- #: includes/forums/template-tags.php:1910
3307
  msgid "This forum is empty."
3308
  msgstr ""
3309
 
3310
- #: includes/forums/template-tags.php:2146
3311
  msgid "Category"
3312
  msgstr ""
3313
 
3314
- #: includes/forums/template-tags.php:2183
3315
  msgctxt "Forum Status"
3316
  msgid "Open"
3317
  msgstr ""
3318
 
3319
- #: includes/forums/template-tags.php:2184
3320
  msgctxt "Forum Status"
3321
  msgid "Closed"
3322
  msgstr ""
3323
 
3324
- #: includes/forums/template-tags.php:2221
3325
  msgid "Public"
3326
  msgstr ""
3327
 
3328
- #: includes/forums/template-tags.php:2222
3329
  #: templates/default/bbpress/feedback-no-access.php:13
3330
  msgid "Private"
3331
  msgstr ""
3332
 
3333
- #: includes/forums/template-tags.php:2223
3334
  msgid "Hidden"
3335
  msgstr ""
3336
 
@@ -3343,7 +3376,7 @@ msgid "<strong>ERROR</strong>: Topic ID is missing."
3343
  msgstr ""
3344
 
3345
  #: includes/replies/functions.php:165 includes/topics/functions.php:190
3346
- #: includes/topics/functions.php:484
3347
  msgid "<strong>ERROR</strong>: Forum ID is missing."
3348
  msgstr ""
3349
 
@@ -3409,171 +3442,171 @@ msgstr ""
3409
  msgid "<strong>ERROR</strong>: Your reply cannot be edited at this time."
3410
  msgstr ""
3411
 
3412
- #: includes/replies/functions.php:1070
3413
  msgid "<strong>ERROR</strong>: Reply ID to move not found!"
3414
  msgstr ""
3415
 
3416
- #: includes/replies/functions.php:1079
3417
  msgid "<strong>ERROR</strong>: The reply you want to move was not found."
3418
  msgstr ""
3419
 
3420
- #: includes/replies/functions.php:1088
3421
  msgid "<strong>ERROR</strong>: The topic you want to move from was not found."
3422
  msgstr ""
3423
 
3424
- #: includes/replies/functions.php:1099 includes/topics/functions.php:1092
3425
- #: includes/topics/functions.php:1386
3426
  msgid ""
3427
  "<strong>ERROR</strong>: You do not have the permissions to edit the source "
3428
  "topic."
3429
  msgstr ""
3430
 
3431
- #: includes/replies/functions.php:1109
3432
  msgid "<strong>ERROR</strong>: You need to choose a valid move option."
3433
  msgstr ""
3434
 
3435
- #: includes/replies/functions.php:1122 includes/topics/functions.php:1407
3436
  msgid "<strong>ERROR</strong>: Destination topic ID not found!"
3437
  msgstr ""
3438
 
3439
- #: includes/replies/functions.php:1132
3440
  msgid "<strong>ERROR</strong>: The topic you want to move to was not found!"
3441
  msgstr ""
3442
 
3443
- #: includes/replies/functions.php:1137 includes/topics/functions.php:1420
3444
  msgid ""
3445
  "<strong>ERROR</strong>: You do not have the permissions to edit the "
3446
  "destination topic!"
3447
  msgstr ""
3448
 
3449
- #: includes/replies/functions.php:1197 includes/topics/functions.php:1459
3450
  msgid ""
3451
  "<strong>ERROR</strong>: There was a problem converting the reply into the "
3452
  "topic. Please try again."
3453
  msgstr ""
3454
 
3455
- #: includes/replies/functions.php:1202 includes/topics/functions.php:1464
3456
  msgid ""
3457
  "<strong>ERROR</strong>: You do not have the permissions to create new "
3458
  "topics. The reply could not be converted into a topic."
3459
  msgstr ""
3460
 
3461
- #: includes/replies/functions.php:1371
3462
  msgid "<strong>ERROR:</strong> You do not have the permission to do that!"
3463
  msgstr ""
3464
 
3465
- #: includes/replies/functions.php:1384
3466
  msgid ""
3467
  "<strong>ERROR</strong>: There was a problem unmarking the reply as spam!"
3468
  msgstr ""
3469
 
3470
- #: includes/replies/functions.php:1384
3471
  msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam!"
3472
  msgstr ""
3473
 
3474
- #: includes/replies/functions.php:1403
3475
  msgid "<strong>ERROR</strong>: There was a problem trashing the reply!"
3476
  msgstr ""
3477
 
3478
- #: includes/replies/functions.php:1411
3479
  msgid "<strong>ERROR</strong>: There was a problem untrashing the reply!"
3480
  msgstr ""
3481
 
3482
- #: includes/replies/functions.php:1419
3483
  msgid "<strong>ERROR</strong>: There was a problem deleting the reply!"
3484
  msgstr ""
3485
 
3486
- #: includes/replies/functions.php:1808
3487
  msgid "All Posts"
3488
  msgstr ""
3489
 
3490
- #: includes/replies/functions.php:1850 includes/topics/functions.php:3327
3491
  msgid "Replies: %s"
3492
  msgstr ""
3493
 
3494
- #: includes/replies/template-tags.php:567
3495
- #: includes/topics/template-tags.php:723
3496
  msgctxt "date at time"
3497
  msgid "%1$s at %2$s"
3498
  msgstr ""
3499
 
3500
- #: includes/replies/template-tags.php:665
3501
  msgid "This reply was modified %1$s by %2$s. Reason: %3$s"
3502
  msgstr ""
3503
 
3504
- #: includes/replies/template-tags.php:667
3505
  msgid "This reply was modified %1$s by %2$s."
3506
  msgstr ""
3507
 
3508
- #: includes/replies/template-tags.php:953
3509
- #: includes/topics/template-tags.php:1271 includes/users/template-tags.php:165
3510
  msgid "Anonymous"
3511
  msgstr ""
3512
 
3513
- #: includes/replies/template-tags.php:1062
3514
- #: includes/topics/template-tags.php:1380
3515
- #: includes/users/template-tags.php:1425
3516
  msgid "View %s's profile"
3517
  msgstr ""
3518
 
3519
- #: includes/replies/template-tags.php:1062
3520
- #: includes/topics/template-tags.php:1380
3521
- #: includes/users/template-tags.php:1425
3522
  msgid "Visit %s's website"
3523
  msgstr ""
3524
 
3525
- #: includes/replies/template-tags.php:1696
3526
- #: includes/topics/template-tags.php:2433
3527
  #: templates/default/bbpress/form-topic-tag.php:88
3528
  #: templates/default/bbpress/form-topic-tag.php:101
3529
  msgid "Delete"
3530
  msgstr ""
3531
 
3532
- #: includes/replies/template-tags.php:1713
3533
- #: includes/topics/template-tags.php:2450
3534
  msgid "Are you sure you want to delete that permanently?"
3535
  msgstr ""
3536
 
3537
- #: includes/replies/template-tags.php:1766
3538
- #: includes/topics/template-tags.php:2689
3539
  msgid "Unspam"
3540
  msgstr ""
3541
 
3542
- #: includes/replies/template-tags.php:1829
3543
  msgid "Move"
3544
  msgstr ""
3545
 
3546
- #: includes/replies/template-tags.php:1830
3547
  msgid "Move this reply"
3548
  msgstr ""
3549
 
3550
- #: includes/replies/template-tags.php:1896
3551
  msgid "Split"
3552
  msgstr ""
3553
 
3554
- #: includes/replies/template-tags.php:1897
3555
  msgid "Split the topic from this reply"
3556
  msgstr ""
3557
 
3558
- #: includes/replies/template-tags.php:2002
3559
  msgid "Viewing %1$s reply"
3560
  msgid_plural "Viewing %1$s replies"
3561
  msgstr[0] ""
3562
  msgstr[1] ""
3563
 
3564
- #: includes/replies/template-tags.php:2006
3565
  msgid "Viewing %2$s replies (of %4$s total)"
3566
  msgid_plural "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
3567
  msgstr[0] ""
3568
  msgstr[1] ""
3569
 
3570
- #: includes/replies/template-tags.php:2014
3571
  msgid "Viewing %1$s post"
3572
  msgid_plural "Viewing %1$s posts"
3573
  msgstr[0] ""
3574
  msgstr[1] ""
3575
 
3576
- #: includes/replies/template-tags.php:2018
3577
  msgid "Viewing %2$s post (of %4$s total)"
3578
  msgid_plural "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
3579
  msgstr[0] ""
@@ -3600,267 +3633,267 @@ msgid ""
3600
  "<strong>ERROR</strong>: You do not have permission to create new topics."
3601
  msgstr ""
3602
 
3603
- #: includes/topics/functions.php:172 includes/topics/functions.php:524
3604
  msgid "<strong>ERROR</strong>: Your topic needs a title."
3605
  msgstr ""
3606
 
3607
- #: includes/topics/functions.php:184 includes/topics/functions.php:536
3608
  msgid "<strong>ERROR</strong>: Your topic cannot be empty."
3609
  msgstr ""
3610
 
3611
- #: includes/topics/functions.php:201
3612
  msgid ""
3613
  "<strong>ERROR</strong>: This forum is a category. No topics can be created "
3614
  "in this forum."
3615
  msgstr ""
3616
 
3617
- #: includes/topics/functions.php:205 includes/topics/functions.php:503
3618
  msgid "<strong>ERROR</strong>: This forum has been closed to new topics."
3619
  msgstr ""
3620
 
3621
- #: includes/topics/functions.php:209 includes/topics/functions.php:507
3622
  msgid ""
3623
  "<strong>ERROR</strong>: This forum is private and you do not have the "
3624
  "capability to read or create new topics in it."
3625
  msgstr ""
3626
 
3627
- #: includes/topics/functions.php:213 includes/topics/functions.php:511
3628
  msgid ""
3629
  "<strong>ERROR</strong>: This forum is hidden and you do not have the "
3630
  "capability to read or create new topics in it."
3631
  msgstr ""
3632
 
3633
- #: includes/topics/functions.php:224
3634
  msgid ""
3635
  "<strong>ERROR</strong>: Duplicate topic detected; it looks as though "
3636
  "you&#8217;ve already said that!"
3637
  msgstr ""
3638
 
3639
- #: includes/topics/functions.php:229
3640
  msgid "<strong>ERROR</strong>: Your topic cannot be created at this time."
3641
  msgstr ""
3642
 
3643
- #: includes/topics/functions.php:432 includes/topics/functions.php:1075
3644
  msgid "<strong>ERROR</strong>: Topic ID not found."
3645
  msgstr ""
3646
 
3647
- #: includes/topics/functions.php:443
3648
  msgid "<strong>ERROR</strong>: The topic you want to edit was not found."
3649
  msgstr ""
3650
 
3651
- #: includes/topics/functions.php:454
3652
  msgid "<strong>ERROR</strong>: You do not have permission to edit that topic."
3653
  msgstr ""
3654
 
3655
- #: includes/topics/functions.php:499
3656
  msgid ""
3657
  "<strong>ERROR</strong>: This forum is a category. No topics can be created "
3658
  "in it."
3659
  msgstr ""
3660
 
3661
- #: includes/topics/functions.php:541
3662
  msgid "<strong>ERROR</strong>: Your topic cannot be edited at this time."
3663
  msgstr ""
3664
 
3665
- #: includes/topics/functions.php:1086
3666
  msgid "<strong>ERROR</strong>: The topic you want to merge was not found."
3667
  msgstr ""
3668
 
3669
- #: includes/topics/functions.php:1100
3670
  msgid "<strong>ERROR</strong>: Destination topic ID not found."
3671
  msgstr ""
3672
 
3673
- #: includes/topics/functions.php:1106
3674
  msgid "<strong>ERROR</strong>: The topic you want to merge to was not found."
3675
  msgstr ""
3676
 
3677
- #: includes/topics/functions.php:1110
3678
  msgid ""
3679
  "<strong>ERROR</strong>: You do not have the permissions to edit the "
3680
  "destination topic."
3681
  msgstr ""
3682
 
3683
- #: includes/topics/functions.php:1359
3684
  msgid "<strong>ERROR</strong>: Reply ID to split the topic from not found!"
3685
  msgstr ""
3686
 
3687
- #: includes/topics/functions.php:1367
3688
  msgid "<strong>ERROR</strong>: The reply you want to split from was not found."
3689
  msgstr ""
3690
 
3691
- #: includes/topics/functions.php:1376
3692
  msgid "<strong>ERROR</strong>: The topic you want to split was not found."
3693
  msgstr ""
3694
 
3695
- #: includes/topics/functions.php:1394
3696
  msgid "<strong>ERROR</strong>: You need to choose a valid split option."
3697
  msgstr ""
3698
 
3699
- #: includes/topics/functions.php:1416
3700
  msgid "<strong>ERROR</strong>: The topic you want to split to was not found!"
3701
  msgstr ""
3702
 
3703
- #: includes/topics/functions.php:1715
3704
  msgid ""
3705
  "<strong>ERROR</strong>: The following problem(s) have been found while "
3706
  "getting the tag: %s"
3707
  msgstr ""
3708
 
3709
- #: includes/topics/functions.php:1733 includes/topics/functions.php:1772
3710
  msgid ""
3711
  "<strong>ERROR</strong>: You do not have the permissions to edit the topic "
3712
  "tags."
3713
  msgstr ""
3714
 
3715
- #: includes/topics/functions.php:1739 includes/topics/functions.php:1778
3716
  msgid "<strong>ERROR</strong>: You need to enter a tag name."
3717
  msgstr ""
3718
 
3719
- #: includes/topics/functions.php:1749
3720
  msgid ""
3721
  "<strong>ERROR</strong>: The following problem(s) have been found while "
3722
  "updating the tag: %s"
3723
  msgstr ""
3724
 
3725
- #: includes/topics/functions.php:1788 includes/topics/functions.php:1806
3726
  msgid ""
3727
  "<strong>ERROR</strong>: The following problem(s) have been found while "
3728
  "merging the tags: %s"
3729
  msgstr ""
3730
 
3731
- #: includes/topics/functions.php:1797
3732
  msgid ""
3733
  "<strong>ERROR</strong>: The tags which are being merged can not be the same."
3734
  msgstr ""
3735
 
3736
- #: includes/topics/functions.php:1829
3737
  msgid ""
3738
  "<strong>ERROR</strong>: You do not have the permissions to delete the topic "
3739
  "tags."
3740
  msgstr ""
3741
 
3742
- #: includes/topics/functions.php:1838
3743
  msgid ""
3744
  "<strong>ERROR</strong>: The following problem(s) have been found while "
3745
  "deleting the tag: %s"
3746
  msgstr ""
3747
 
3748
- #: includes/topics/functions.php:1963
3749
  msgid "<strong>ERROR:</strong> You do not have the permission to do that."
3750
  msgstr ""
3751
 
3752
- #: includes/topics/functions.php:1976
3753
  msgid "<strong>ERROR</strong>: There was a problem closing the topic."
3754
  msgstr ""
3755
 
3756
- #: includes/topics/functions.php:1976
3757
  msgid "<strong>ERROR</strong>: There was a problem opening the topic."
3758
  msgstr ""
3759
 
3760
- #: includes/topics/functions.php:1987
3761
  msgid "<strong>ERROR</strong>: There was a problem unsticking the topic."
3762
  msgstr ""
3763
 
3764
- #: includes/topics/functions.php:1987
3765
  msgid "<strong>ERROR</strong>: There was a problem sticking the topic."
3766
  msgstr ""
3767
 
3768
- #: includes/topics/functions.php:1997
3769
  msgid ""
3770
  "<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
3771
  msgstr ""
3772
 
3773
- #: includes/topics/functions.php:1997
3774
  msgid "<strong>ERROR</strong>: There was a problem marking the topic as spam."
3775
  msgstr ""
3776
 
3777
- #: includes/topics/functions.php:2016
3778
  msgid "<strong>ERROR</strong>: There was a problem trashing the topic."
3779
  msgstr ""
3780
 
3781
- #: includes/topics/functions.php:2024
3782
  msgid "<strong>ERROR</strong>: There was a problem untrashing the topic."
3783
  msgstr ""
3784
 
3785
- #: includes/topics/functions.php:2032
3786
  msgid "<strong>ERROR</strong>: There was a problem deleting the topic."
3787
  msgstr ""
3788
 
3789
- #: includes/topics/template-tags.php:900
3790
  msgid "This topic was modified %1$s by %2$s. Reason: %3$s"
3791
  msgstr ""
3792
 
3793
- #: includes/topics/template-tags.php:902
3794
  msgid "This topic was modified %1$s by %2$s."
3795
  msgstr ""
3796
 
3797
- #: includes/topics/template-tags.php:2106
3798
  msgid "Tagged:"
3799
  msgstr ""
3800
 
3801
- #: includes/topics/template-tags.php:2501
3802
  msgctxt "Topic Status"
3803
  msgid "Close"
3804
  msgstr ""
3805
 
3806
- #: includes/topics/template-tags.php:2502
3807
  msgctxt "Topic Status"
3808
  msgid "Open"
3809
  msgstr ""
3810
 
3811
- #: includes/topics/template-tags.php:2632
3812
  #: templates/default/bbpress/form-topic-tag.php:59
3813
  #: templates/default/bbpress/form-topic-tag.php:73
3814
  msgid "Merge"
3815
  msgstr ""
3816
 
3817
- #: includes/topics/template-tags.php:2742
3818
  msgid "Viewing %1$s topic"
3819
  msgid_plural "Viewing %1$s topics"
3820
  msgstr[0] ""
3821
  msgstr[1] ""
3822
 
3823
- #: includes/topics/template-tags.php:2746
3824
  msgid "Viewing topic %2$s (of %4$s total)"
3825
  msgid_plural "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
3826
  msgstr[0] ""
3827
  msgstr[1] ""
3828
 
3829
- #: includes/topics/template-tags.php:2806
3830
  msgid "This topic is marked as spam."
3831
  msgstr ""
3832
 
3833
- #: includes/topics/template-tags.php:2811
3834
  msgid "This topic is in the trash."
3835
  msgstr ""
3836
 
3837
- #: includes/topics/template-tags.php:2850
3838
  msgid "Normal"
3839
  msgstr ""
3840
 
3841
- #: includes/topics/template-tags.php:2851
3842
  msgid "Sticky"
3843
  msgstr ""
3844
 
3845
- #: includes/topics/template-tags.php:2852
3846
  msgid "Super Sticky"
3847
  msgstr ""
3848
 
3849
- #: includes/topics/template-tags.php:2970
3850
  msgid "%s voice"
3851
  msgid_plural "%s voices"
3852
  msgstr[0] ""
3853
  msgstr[1] ""
3854
 
3855
- #: includes/topics/template-tags.php:2976
3856
  msgid "This topic contains %1$s, has %2$s, and was last updated by %3$s %4$s."
3857
  msgstr ""
3858
 
3859
- #: includes/topics/template-tags.php:2980
3860
  msgid "This topic contains %1$s and has %2$s."
3861
  msgstr ""
3862
 
3863
- #: includes/topics/template-tags.php:2984
3864
  msgid "This topic has no replies."
3865
  msgstr ""
3866
 
@@ -3902,74 +3935,70 @@ msgid "<strong>ERROR</strong>: There was a problem subscribing to that topic!"
3902
  msgstr ""
3903
 
3904
  #: includes/users/template-tags.php:487
3905
- msgid "Key Master"
3906
  msgstr ""
3907
 
3908
  #: includes/users/template-tags.php:491
3909
  msgid "Inactive"
3910
  msgstr ""
3911
 
3912
- #: includes/users/template-tags.php:495
3913
- msgid "Guest"
3914
- msgstr ""
3915
-
3916
- #: includes/users/template-tags.php:507
3917
  msgid "Member"
3918
  msgstr ""
3919
 
3920
- #: includes/users/template-tags.php:547
3921
  msgid "Admin"
3922
  msgstr ""
3923
 
3924
- #: includes/users/template-tags.php:713
3925
  msgid "Favorite"
3926
  msgstr ""
3927
 
3928
- #: includes/users/template-tags.php:714
3929
  msgid "Favorited"
3930
  msgstr ""
3931
 
3932
- #: includes/users/template-tags.php:871
3933
  msgid "Subscribe"
3934
  msgstr ""
3935
 
3936
- #: includes/users/template-tags.php:872
3937
  msgid "Unsubscribe"
3938
  msgstr ""
3939
 
3940
- #: includes/users/template-tags.php:939
3941
  msgid "User updated."
3942
  msgstr ""
3943
 
3944
- #: includes/users/template-tags.php:964
3945
  msgid "You have super admin privileges."
3946
  msgstr ""
3947
 
3948
- #: includes/users/template-tags.php:964
3949
  msgid "This user has super admin privileges."
3950
  msgstr ""
3951
 
3952
- #: includes/users/template-tags.php:1029
3953
  msgid "&mdash; No role for this site &mdash;"
3954
  msgstr ""
3955
 
3956
- #: includes/users/template-tags.php:1227
3957
  msgid "You are now logged out."
3958
  msgstr ""
3959
 
3960
- #: includes/users/template-tags.php:1231
3961
  msgid "New user registration is currently not allowed."
3962
  msgstr ""
3963
 
3964
- #: includes/users/template-tags.php:1240
3965
  msgid "Check your e-mail for the confirmation link."
3966
  msgstr ""
3967
 
3968
- #: includes/users/template-tags.php:1245
3969
  msgid "Check your e-mail for your new password."
3970
  msgstr ""
3971
 
3972
- #: includes/users/template-tags.php:1250
3973
  msgid "Registration complete. Please check your e-mail."
3974
  msgstr ""
3975
 
@@ -4155,7 +4184,6 @@ msgid ""
4155
  msgstr ""
4156
 
4157
  #: templates/default/bbpress/form-reply.php:60
4158
- #: templates/default/bbpress/form-topic.php:86
4159
  msgid "Reply:"
4160
  msgstr ""
4161
 
@@ -4514,7 +4542,7 @@ msgid ""
4514
  "account."
4515
  msgstr ""
4516
 
4517
- #: templates/default/bbpress/form-user-roles.php:2
4518
  msgid "Blog Role"
4519
  msgstr ""
4520
 
@@ -4697,9 +4725,9 @@ msgstr ""
4697
  msgid "bbPress"
4698
  msgstr ""
4699
 
4700
- #. #-#-#-#-# plugin.pot (bbPress 2.3-beta1) #-#-#-#-#
4701
  #. Plugin URI of the plugin/theme
4702
- #. #-#-#-#-# plugin.pot (bbPress 2.3-beta1) #-#-#-#-#
4703
  #. Author URI of the plugin/theme
4704
  msgid "http://bbpress.org"
4705
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: bbPress 2.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bbpress\n"
7
+ "POT-Creation-Date: 2013-04-10 04:43:09+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
20
  msgid "bbPress Default"
21
  msgstr ""
22
 
23
+ #: bbpress.php:487 bbpress.php:488 includes/admin/admin.php:218
24
+ #: includes/admin/admin.php:219 includes/admin/admin.php:229
25
+ #: includes/admin/admin.php:230 includes/admin/users.php:82
26
+ #: includes/common/widgets.php:656 includes/extend/buddypress/loader.php:42
 
27
  #: includes/extend/buddypress/loader.php:170
28
  #: includes/extend/buddypress/loader.php:259
29
  #: includes/extend/buddypress/loader.php:310
32
  msgstr ""
33
 
34
  #: bbpress.php:489 includes/admin/forums.php:420
35
+ #: includes/admin/metaboxes.php:50 includes/admin/metaboxes.php:357
36
+ #: includes/admin/metaboxes.php:409 includes/admin/replies.php:579
37
+ #: includes/admin/topics.php:644 includes/extend/buddypress/group.php:52
38
+ #: includes/extend/buddypress/group.php:53
39
+ #: includes/forums/template-tags.php:2138
40
  #: templates/default/bbpress/loop-forums.php:19
41
  msgid "Forum"
42
  msgstr ""
43
 
44
+ #: bbpress.php:490 includes/admin/tools.php:1105
45
  msgid "All Forums"
46
  msgstr ""
47
 
54
  msgstr ""
55
 
56
  #: bbpress.php:493 bbpress.php:550 bbpress.php:607
57
+ #: includes/common/template-tags.php:2150
58
+ #: includes/replies/template-tags.php:1584
59
+ #: includes/topics/template-tags.php:2332
60
  #: templates/default/bbpress/user-details.php:65
61
  msgid "Edit"
62
  msgstr ""
69
  msgid "View Forum"
70
  msgstr ""
71
 
72
+ #: bbpress.php:498 includes/common/widgets.php:479
73
  msgid "Search Forums"
74
  msgstr ""
75
 
91
 
92
  #: bbpress.php:544 bbpress.php:545 includes/admin/forums.php:421
93
  #: includes/admin/settings.php:187 includes/admin/settings.php:208
94
+ #: includes/admin/topics.php:643 includes/extend/buddypress/activity.php:357
95
+ #: includes/forums/template-tags.php:2286
 
96
  #: templates/default/bbpress/content-statistics.php:27
97
  #: templates/default/bbpress/loop-forums.php:20
98
  msgid "Topics"
99
  msgstr ""
100
 
101
  #: bbpress.php:546 includes/admin/metaboxes.php:67
102
+ #: includes/admin/metaboxes.php:434 includes/admin/replies.php:580
103
  #: templates/default/bbpress/content-single-topic-lead.php:22
104
  #: templates/default/bbpress/content-single-topic-lead.php:94
105
  #: templates/default/bbpress/loop-topics.php:19
106
  msgid "Topic"
107
  msgstr ""
108
 
109
+ #: bbpress.php:547 includes/admin/tools.php:1106
110
+ #: includes/topics/functions.php:3331
111
  msgid "All Topics"
112
  msgstr ""
113
 
139
  msgid "No topics found in Trash"
140
  msgstr ""
141
 
142
+ #: bbpress.php:558 includes/admin/metaboxes.php:356
143
+ #: includes/admin/metaboxes.php:408 includes/extend/buddypress/group.php:1022
144
  #: templates/default/bbpress/form-topic.php:125
145
  msgid "Forum:"
146
  msgstr ""
151
 
152
  #: bbpress.php:601 bbpress.php:602 includes/admin/forums.php:422
153
  #: includes/admin/settings.php:195 includes/admin/settings.php:216
154
+ #: includes/admin/topics.php:645 includes/core/theme-compat.php:560
155
+ #: includes/extend/buddypress/activity.php:358
156
+ #: includes/forums/template-tags.php:2350
157
  #: templates/default/bbpress/content-statistics.php:32
158
  #: templates/default/bbpress/loop-forums.php:21
159
  #: templates/default/bbpress/loop-replies.php:32
166
  msgid "Reply"
167
  msgstr ""
168
 
169
+ #: bbpress.php:604 includes/admin/tools.php:1107
170
+ #: includes/replies/functions.php:1834
171
  msgid "All Replies"
172
  msgstr ""
173
 
199
  msgid "No replies found in Trash"
200
  msgstr ""
201
 
202
+ #: bbpress.php:615 includes/admin/metaboxes.php:433
203
+ #: templates/default/bbpress/form-topic.php:86
204
  msgid "Topic:"
205
  msgstr ""
206
 
214
  msgstr ""
215
 
216
  #: bbpress.php:674
217
+ msgctxt "post"
218
  msgid "Closed <span class=\"count\">(%s)</span>"
219
  msgid_plural "Closed <span class=\"count\">(%s)</span>"
220
  msgstr[0] ""
226
  msgstr ""
227
 
228
  #: bbpress.php:685
229
+ msgctxt "post"
230
  msgid "Spam <span class=\"count\">(%s)</span>"
231
  msgid_plural "Spam <span class=\"count\">(%s)</span>"
232
  msgstr[0] ""
238
  msgstr ""
239
 
240
  #: bbpress.php:698
241
+ msgctxt "post"
242
  msgid "Orphan <span class=\"count\">(%s)</span>"
243
  msgid_plural "Orphans <span class=\"count\">(%s)</span>"
244
  msgstr[0] ""
250
  msgstr ""
251
 
252
  #: bbpress.php:711
253
+ msgctxt "post"
254
  msgid "Hidden <span class=\"count\">(%s)</span>"
255
  msgid_plural "Hidden <span class=\"count\">(%s)</span>"
256
  msgstr[0] ""
297
  msgstr ""
298
 
299
  #: bbpress.php:803
300
+ msgid "Most popular topics"
301
+ msgstr ""
302
+
303
+ #: bbpress.php:815
304
  msgid "Topics with no replies"
305
  msgstr ""
306
 
307
+ #: includes/admin/admin.php:183 includes/admin/functions.php:236
308
  #: includes/admin/tools.php:34
309
  msgid "Repair Forums"
310
  msgstr ""
311
 
312
+ #: includes/admin/admin.php:184
313
  msgid "Forum Repair"
314
  msgstr ""
315
 
316
+ #: includes/admin/admin.php:193 includes/admin/functions.php:240
317
  #: includes/admin/settings.php:1269
318
  msgid "Import Forums"
319
  msgstr ""
320
 
321
+ #: includes/admin/admin.php:194
322
  msgid "Forum Import"
323
  msgstr ""
324
 
325
+ #: includes/admin/admin.php:203 includes/admin/functions.php:244
326
+ #: includes/admin/tools.php:1096
327
  msgid "Reset Forums"
328
  msgstr ""
329
 
330
+ #: includes/admin/admin.php:204
331
  msgid "Forum Reset"
332
  msgstr ""
333
 
334
+ #: includes/admin/admin.php:242 includes/admin/admin.php:243
335
+ #: includes/admin/admin.php:251 includes/admin/admin.php:252
336
  msgid "Welcome to bbPress"
337
  msgstr ""
338
 
339
+ #: includes/admin/admin.php:265 includes/admin/admin.php:266
340
+ #: includes/admin/admin.php:287 includes/admin/admin.php:288
341
+ #: includes/admin/admin.php:1611 includes/admin/admin.php:1700
342
  msgid "Update Forums"
343
  msgstr ""
344
 
345
+ #: includes/admin/admin.php:478
346
  msgid "Settings"
347
  msgstr ""
348
 
349
+ #: includes/admin/admin.php:479
350
  msgid "About"
351
  msgstr ""
352
 
353
+ #: includes/admin/admin.php:491
354
  msgid "Right Now in Forums"
355
  msgstr ""
356
 
357
+ #: includes/admin/admin.php:1255
358
  msgctxt "admin color scheme"
359
  msgid "Green"
360
  msgstr ""
361
 
362
+ #: includes/admin/admin.php:1309
363
  msgid "%s - %s"
364
  msgstr ""
365
 
366
+ #: includes/admin/admin.php:1327 includes/admin/admin.php:1430
367
  msgid "Welcome to bbPress %s"
368
  msgstr ""
369
 
370
+ #: includes/admin/admin.php:1328 includes/admin/admin.php:1431
371
  msgid ""
372
+ "Thank you for updating to the latest version! bbPress %s goes great with "
373
+ "pizza and popcorn, and will nicely complement your community too!"
374
  msgstr ""
375
 
376
+ #: includes/admin/admin.php:1329 includes/admin/admin.php:1432
377
  msgid "Version %s"
378
  msgstr ""
379
 
380
+ #: includes/admin/admin.php:1333 includes/admin/admin.php:1436
381
  msgid "What&#8217;s New"
382
  msgstr ""
383
 
384
+ #: includes/admin/admin.php:1335 includes/admin/admin.php:1438
385
  msgid "Credits"
386
  msgstr ""
387
 
388
+ #: includes/admin/admin.php:1340
389
+ msgid "Forum Search"
390
  msgstr ""
391
 
392
+ #: includes/admin/admin.php:1343
393
+ msgid "Only Forum Content"
394
  msgstr ""
395
 
396
+ #: includes/admin/admin.php:1344
397
+ msgid "Allow your forums to be searched without mixing in your posts or pages."
 
 
398
  msgstr ""
399
 
400
+ #: includes/admin/admin.php:1346
401
+ msgid "Choose Your Own Slug"
402
  msgstr ""
403
 
404
+ #: includes/admin/admin.php:1347
405
+ msgid "Setup your forum search to live anywhere relative to the forum index."
406
  msgstr ""
407
 
408
+ #: includes/admin/admin.php:1352
409
+ msgid "New & Improved Forum Importers"
410
  msgstr ""
411
 
412
+ #: includes/admin/admin.php:1355
413
+ msgid "BBCodes & Smilies"
414
  msgstr ""
415
 
416
+ #: includes/admin/admin.php:1356
417
  msgid ""
418
+ "Happy faces all-around now that the importers properly convert BBCodes & "
419
+ "smilies. :)"
420
  msgstr ""
421
 
422
+ #: includes/admin/admin.php:1358
423
+ msgid "Vanilla"
 
 
 
 
424
  msgstr ""
425
 
426
+ #: includes/admin/admin.php:1359
427
  msgid ""
428
+ "Tired of plain old Vanilla? Now you can easily switch to <del>Mint Chocolate "
429
+ "Chip</del> bbPress!"
 
430
  msgstr ""
431
 
432
+ #: includes/admin/admin.php:1361
433
+ msgid "SimplePress"
434
  msgstr ""
435
 
436
+ #: includes/admin/admin.php:1362
437
  msgid ""
438
+ "Converting an existing SimplePress powered forum to bbPress has never been "
439
+ "\"simpler!\""
 
440
  msgstr ""
441
 
442
+ #: includes/admin/admin.php:1364
443
+ msgid "Mingle"
444
  msgstr ""
445
 
446
+ #: includes/admin/admin.php:1365
447
+ msgid "No time to... chit-chat; convert your Mingle forums to bbPress today!"
448
  msgstr ""
449
 
450
  #: includes/admin/admin.php:1370
451
+ msgid "Even Better BuddyPress Integration"
 
 
 
 
452
  msgstr ""
453
 
454
+ #: includes/admin/admin.php:1373
455
+ msgid "bbPress powered BuddyPress Group Forums"
456
  msgstr ""
457
 
458
+ #: includes/admin/admin.php:1374
459
  msgid ""
460
+ "Use bbPress to manage your BuddyPress Group Forums, allowing for seamless "
461
+ "integration and improved plugin performance."
462
  msgstr ""
463
 
464
+ #: includes/admin/admin.php:1379
465
  msgid "Under the Hood"
466
  msgstr ""
467
 
468
+ #: includes/admin/admin.php:1383
469
+ msgid "Smarter Fancy Editor"
470
  msgstr ""
471
 
472
+ #: includes/admin/admin.php:1384
473
  msgid ""
474
+ "We simplified the Fancy Editor, and the allowed HTML tags that work with it."
 
475
  msgstr ""
476
 
477
+ #: includes/admin/admin.php:1386
478
+ msgid "Better Code Posting"
479
  msgstr ""
480
 
481
+ #: includes/admin/admin.php:1387
482
+ msgid "Your users can now post code snippets without too much hassle."
483
+ msgstr ""
484
+
485
+ #: includes/admin/admin.php:1391
486
+ msgid "Template Stacking"
487
+ msgstr ""
488
+
489
+ #: includes/admin/admin.php:1392
490
  msgid ""
491
+ "Now you can replace specific template parts on the fly without modifying the "
492
+ "existing theme."
493
  msgstr ""
494
 
495
+ #: includes/admin/admin.php:1394
496
+ msgid "TwentyThirteen Tested"
497
  msgstr ""
498
 
499
+ #: includes/admin/admin.php:1395
500
  msgid ""
501
+ "bbPress 2.3 already works with the in-development TwentyThirteen theme, "
502
+ "coming in a future version of WordPress."
503
  msgstr ""
504
 
505
+ #: includes/admin/admin.php:1399
506
+ msgid "Statistics Shortcode"
507
  msgstr ""
508
 
509
+ #: includes/admin/admin.php:1400
510
  msgid ""
511
+ "The old statistics easter-egg page was turned into an easy to use shortcode."
 
512
  msgstr ""
513
 
514
+ #: includes/admin/admin.php:1402
515
+ msgid "Green Theme Updated"
516
  msgstr ""
517
 
518
+ #: includes/admin/admin.php:1403
519
  msgid ""
520
+ "The green admin theme easter-egg was updated to work with WordPress 3.5 "
521
+ "changes."
522
  msgstr ""
523
 
524
+ #: includes/admin/admin.php:1409 includes/admin/admin.php:1537
525
  msgid "Go to Forum Settings"
526
  msgstr ""
527
 
528
+ #: includes/admin/admin.php:1442
529
  msgid "bbPress is created by a worldwide swarm of busy, busy bees."
530
  msgstr ""
531
 
532
+ #: includes/admin/admin.php:1444
533
  msgid "Project Leaders"
534
  msgstr ""
535
 
536
+ #: includes/admin/admin.php:1449
537
  msgid "Founding Developer"
538
  msgstr ""
539
 
540
+ #: includes/admin/admin.php:1454
541
  msgid "Lead Developer"
542
  msgstr ""
543
 
544
+ #: includes/admin/admin.php:1458
545
  msgid "Contributing Developers"
546
  msgstr ""
547
 
548
+ #: includes/admin/admin.php:1477
549
  msgid "Codex Rockstars"
550
  msgstr ""
551
 
552
+ #: includes/admin/admin.php:1496
553
+ msgid "Core Contributors to bbPress 2.3"
554
  msgstr ""
555
 
556
+ #: includes/admin/admin.php:1563 includes/admin/admin.php:1585
557
  msgid "Update Forum"
558
  msgstr ""
559
 
560
+ #: includes/admin/admin.php:1574 includes/admin/admin.php:1628
561
  msgid "All done!"
562
  msgstr ""
563
 
564
+ #: includes/admin/admin.php:1575 includes/admin/admin.php:1629
565
  msgid "Go Back"
566
  msgstr ""
567
 
568
+ #: includes/admin/admin.php:1584
569
  msgid ""
570
  "You can update your forum through this page. Hit the link below to update."
571
  msgstr ""
572
 
573
+ #: includes/admin/admin.php:1656
574
  msgid ""
575
  "Warning! Problem updating %1$s. Your server may not be able to connect to "
576
  "sites running on it. Error message: <em>%2$s</em>"
577
  msgstr ""
578
 
579
+ #: includes/admin/admin.php:1680
580
  msgid ""
581
  "If your browser doesn&#8217;t start loading the next page automatically, "
582
  "click this link:"
583
  msgstr ""
584
 
585
+ #: includes/admin/admin.php:1681
586
  msgid "Next Forums"
587
  msgstr ""
588
 
589
+ #: includes/admin/admin.php:1699
590
  msgid ""
591
  "You can update all the forums on your network through this page. It works by "
592
  "calling the update script of each site automatically. Hit the link below to "
593
  "update."
594
  msgstr ""
595
 
596
+ #: includes/admin/converter.php:84
597
  msgid "Database Settings"
598
  msgstr ""
599
 
600
+ #: includes/admin/converter.php:87
601
  msgid "Select Platform"
602
  msgstr ""
603
 
604
+ #: includes/admin/converter.php:91
605
  msgid "Database Server"
606
  msgstr ""
607
 
608
+ #: includes/admin/converter.php:95
609
  msgid "Database Port"
610
  msgstr ""
611
 
612
+ #: includes/admin/converter.php:99
613
  msgid "Database Name"
614
  msgstr ""
615
 
616
+ #: includes/admin/converter.php:103
617
  msgid "Database User"
618
  msgstr ""
619
 
620
+ #: includes/admin/converter.php:107
621
  msgid "Database Password"
622
  msgstr ""
623
 
624
+ #: includes/admin/converter.php:111
625
  msgid "Table Prefix"
626
  msgstr ""
627
 
628
+ #: includes/admin/converter.php:115
629
  msgid "Options"
630
  msgstr ""
631
 
632
+ #: includes/admin/converter.php:118
633
  msgid "Rows Limit"
634
  msgstr ""
635
 
636
+ #: includes/admin/converter.php:122
637
  msgid "Delay Time"
638
  msgstr ""
639
 
640
+ #: includes/admin/converter.php:126
641
  msgid "Convert Users"
642
  msgstr ""
643
 
644
+ #: includes/admin/converter.php:130
645
  msgid "Start Over"
646
  msgstr ""
647
 
648
+ #: includes/admin/converter.php:134
649
  msgid "Purge Previous Import"
650
  msgstr ""
651
 
652
+ #: includes/admin/converter.php:223
653
  msgid "Starting Conversion"
654
  msgstr ""
655
 
656
+ #: includes/admin/converter.php:248 includes/admin/converter.php:475
657
  msgid "Conversion Complete"
658
  msgstr ""
659
 
660
+ #: includes/admin/converter.php:342
661
  msgid "No data to clean"
662
  msgstr ""
663
 
664
+ #: includes/admin/converter.php:346
665
  msgid "Deleting previously converted data (%1$s - %2$s)"
666
  msgstr ""
667
 
668
+ #: includes/admin/converter.php:362
669
  msgid "No users to convert"
670
  msgstr ""
671
 
672
+ #: includes/admin/converter.php:366
673
  msgid "Converting users (%1$s - %2$s)"
674
  msgstr ""
675
 
676
+ #: includes/admin/converter.php:382
677
  msgid "No passwords to clear"
678
  msgstr ""
679
 
680
+ #: includes/admin/converter.php:386
681
+ msgid "Delete users WordPress default passwords (%1$s - %2$s)"
682
  msgstr ""
683
 
684
+ #: includes/admin/converter.php:401
685
  msgid "No forums to convert"
686
  msgstr ""
687
 
688
+ #: includes/admin/converter.php:405
689
  msgid "Converting forums (%1$s - %2$s)"
690
  msgstr ""
691
 
692
+ #: includes/admin/converter.php:416
693
  msgid "No forum parents to convert"
694
  msgstr ""
695
 
696
+ #: includes/admin/converter.php:420
697
  msgid "Calculating forum hierarchy (%1$s - %2$s)"
698
  msgstr ""
699
 
700
+ #: includes/admin/converter.php:431
701
  msgid "No topics to convert"
702
  msgstr ""
703
 
704
+ #: includes/admin/converter.php:435
705
  msgid "Converting topics (%1$s - %2$s)"
706
  msgstr ""
707
 
708
+ #: includes/admin/converter.php:446
709
  msgid "No tags to convert"
710
  msgstr ""
711
 
712
+ #: includes/admin/converter.php:450
713
  msgid "Converting topic tags (%1$s - %2$s)"
714
  msgstr ""
715
 
716
+ #: includes/admin/converter.php:461
717
  msgid "No replies to convert"
718
  msgstr ""
719
 
720
+ #: includes/admin/converter.php:465
721
  msgid "Converting replies (%1$s - %2$s)"
722
  msgstr ""
723
 
724
  #: includes/admin/converters/Invision.php:502
725
  #: includes/admin/converters/SimplePress5.php:495
726
  #: includes/admin/converters/Vanilla.php:514
727
+ #: includes/admin/converters/bbPress1.php:541
728
  #: includes/admin/converters/vBulletin.php:536
729
  msgid "Re: "
730
  msgstr ""
731
 
732
+ #: includes/admin/forums.php:120 includes/admin/replies.php:131
733
+ #: includes/admin/settings.php:1309 includes/admin/topics.php:131
734
  msgid "Overview"
735
  msgstr ""
736
 
740
  "the display of this screen to suit your workflow."
741
  msgstr ""
742
 
743
+ #: includes/admin/forums.php:128 includes/admin/replies.php:139
744
+ #: includes/admin/topics.php:139
745
  msgid "Screen Content"
746
  msgstr ""
747
 
748
+ #: includes/admin/forums.php:130 includes/admin/replies.php:141
749
+ #: includes/admin/topics.php:141
750
  msgid ""
751
  "You can customize the display of this screen&#8217;s contents in a number of "
752
  "ways:"
773
  "creator in the forums list."
774
  msgstr ""
775
 
776
+ #: includes/admin/forums.php:141 includes/admin/replies.php:153
777
+ #: includes/admin/topics.php:152
778
  msgid "Available Actions"
779
  msgstr ""
780
 
803
  "Which link is available depends on your forum&#8217;s status."
804
  msgstr ""
805
 
806
+ #: includes/admin/forums.php:154 includes/admin/replies.php:168
807
+ #: includes/admin/topics.php:169
808
  msgid "Bulk Actions"
809
  msgstr ""
810
 
823
  msgstr ""
824
 
825
  #: includes/admin/forums.php:162 includes/admin/forums.php:233
826
+ #: includes/admin/replies.php:176 includes/admin/replies.php:244
827
+ #: includes/admin/settings.php:1355 includes/admin/topics.php:177
828
+ #: includes/admin/topics.php:245
829
  msgid "For more information:"
830
  msgstr ""
831
 
832
  #: includes/admin/forums.php:163 includes/admin/forums.php:234
833
+ #: includes/admin/replies.php:177 includes/admin/replies.php:245
834
+ #: includes/admin/settings.php:1356 includes/admin/topics.php:178
835
+ #: includes/admin/topics.php:246
836
  msgid ""
837
  "<a href=\"http://codex.bbpress.org\" target=\"_blank\">bbPress "
838
  "Documentation</a>"
839
  msgstr ""
840
 
841
  #: includes/admin/forums.php:164 includes/admin/forums.php:235
842
+ #: includes/admin/replies.php:178 includes/admin/replies.php:246
843
+ #: includes/admin/settings.php:1357 includes/admin/topics.php:179
844
+ #: includes/admin/topics.php:247
845
  msgid ""
846
  "<a href=\"http://bbpress.org/forums/\" target=\"_blank\">bbPress Support "
847
  "Forums</a>"
857
  "screen."
858
  msgstr ""
859
 
860
+ #: includes/admin/forums.php:182 includes/admin/replies.php:196
861
+ #: includes/admin/topics.php:197
862
  msgid "Customizing This Display"
863
  msgstr ""
864
 
952
  msgid "<strong>Order</strong> allows you to order your forums numerically."
953
  msgstr ""
954
 
955
+ #: includes/admin/forums.php:220 includes/admin/replies.php:231
956
+ #: includes/admin/topics.php:232
957
  msgid "Publish Box"
958
  msgstr ""
959
 
960
+ #: includes/admin/forums.php:226 includes/admin/replies.php:237
961
+ #: includes/admin/topics.php:238
962
  msgid "Discussion Settings"
963
  msgstr ""
964
 
965
+ #: includes/admin/forums.php:228 includes/admin/replies.php:239
966
+ #: includes/admin/topics.php:240
967
  msgid ""
968
  "<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy "
969
  "blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to "
983
  msgid "Creator"
984
  msgstr ""
985
 
986
+ #: includes/admin/forums.php:424 includes/admin/replies.php:582
987
+ #: includes/admin/topics.php:648
988
  msgid "Created"
989
  msgstr ""
990
 
991
+ #: includes/admin/forums.php:425 includes/admin/topics.php:649
992
  #: templates/default/bbpress/loop-forums.php:22
993
  #: templates/default/bbpress/loop-topics.php:22
994
  msgid "Freshness"
995
  msgstr ""
996
 
997
+ #: includes/admin/forums.php:462 includes/admin/replies.php:690
998
+ #: includes/admin/topics.php:728
999
  msgid "%1$s <br /> %2$s"
1000
  msgstr ""
1001
 
1002
+ #: includes/admin/forums.php:474 includes/forums/template-tags.php:530
1003
  msgid "No Topics"
1004
  msgstr ""
1005
 
1007
  msgid "Forum updated. <a href=\"%s\">View forum</a>"
1008
  msgstr ""
1009
 
1010
+ #: includes/admin/forums.php:543 includes/admin/replies.php:862
1011
+ #: includes/admin/topics.php:934
1012
  msgid "Custom field updated."
1013
  msgstr ""
1014
 
1015
+ #: includes/admin/forums.php:546 includes/admin/replies.php:865
1016
+ #: includes/admin/topics.php:937
1017
  msgid "Custom field deleted."
1018
  msgstr ""
1019
 
1045
  msgstr ""
1046
 
1047
  #. translators: Publish box date format, see http:php.net/date
1048
+ #: includes/admin/forums.php:569 includes/admin/replies.php:888
1049
+ #: includes/admin/topics.php:960
1050
  msgid "M j, Y @ G:i"
1051
  msgstr ""
1052
 
1091
  msgstr ""
1092
 
1093
  #: includes/admin/metaboxes.php:261 includes/admin/metaboxes.php:262
1094
+ #: includes/admin/metaboxes.php:350
1095
  msgid "Type:"
1096
  msgstr ""
1097
 
1113
  msgid "Forum Parent"
1114
  msgstr ""
1115
 
1116
+ #: includes/admin/metaboxes.php:314 includes/admin/metaboxes.php:371
1117
+ #: includes/admin/metaboxes.php:423
1118
  msgid "&mdash; No parent &mdash;"
1119
  msgstr ""
1120
 
1121
+ #: includes/admin/metaboxes.php:322
1122
  msgid "Order:"
1123
  msgstr ""
1124
 
1125
+ #: includes/admin/metaboxes.php:323
1126
  msgid "Forum Order"
1127
  msgstr ""
1128
 
1129
+ #: includes/admin/metaboxes.php:351
1130
  msgid "Topic Type"
1131
  msgstr ""
1132
 
1133
+ #: includes/admin/metaboxes.php:464
1134
  #: templates/default/bbpress/form-topic-tag.php:35
1135
  msgid "Name:"
1136
  msgstr ""
1137
 
1138
+ #: includes/admin/metaboxes.php:465
1139
  #: templates/default/bbpress/form-user-edit.php:14
1140
  #: templates/default/bbpress/form-user-edit.php:19
1141
  msgid "Name"
1142
  msgstr ""
1143
 
1144
+ #: includes/admin/metaboxes.php:470
1145
  msgid "Email:"
1146
  msgstr ""
1147
 
1148
+ #: includes/admin/metaboxes.php:471
1149
  #: templates/default/bbpress/form-user-edit.php:103
1150
  #: templates/default/bbpress/form-user-register.php:28
1151
  msgid "Email"
1152
  msgstr ""
1153
 
1154
+ #: includes/admin/metaboxes.php:476
1155
  #: templates/default/bbpress/form-anonymous.php:32
1156
  msgid "Website:"
1157
  msgstr ""
1158
 
1159
+ #: includes/admin/metaboxes.php:477
1160
  #: templates/default/bbpress/form-user-edit.php:57
1161
  msgid "Website"
1162
  msgstr ""
1163
 
1164
+ #: includes/admin/metaboxes.php:484
1165
  msgid "IP:"
1166
  msgstr ""
1167
 
1168
+ #: includes/admin/metaboxes.php:485
1169
  msgid "IP Address"
1170
  msgstr ""
1171
 
1172
+ #: includes/admin/replies.php:133
1173
  msgid ""
1174
  "This screen provides access to all of your replies. You can customize the "
1175
  "display of this screen to suit your workflow."
1176
  msgstr ""
1177
 
1178
+ #: includes/admin/replies.php:143
1179
  msgid ""
1180
  "You can hide/display columns based on your needs and decide how many replies "
1181
  "to list per screen using the Screen Options tab."
1182
  msgstr ""
1183
 
1184
+ #: includes/admin/replies.php:144
1185
  msgid ""
1186
  "You can filter the list of replies by reply status using the text links in "
1187
  "the upper left to show All, Published, Draft, or Trashed replies. The "
1188
  "default view is to show all replies."
1189
  msgstr ""
1190
 
1191
+ #: includes/admin/replies.php:145
1192
  msgid ""
1193
  "You can view replies in a simple title list or with an excerpt. Choose the "
1194
  "view you prefer by clicking on the icons at the top of the list on the right."
1195
  msgstr ""
1196
 
1197
+ #: includes/admin/replies.php:146
1198
  msgid ""
1199
  "You can refine the list to show only replies in a specific category or from "
1200
  "a specific month by using the dropdown menus above the replies list. Click "
1202
  "by clicking on the reply author, category or tag in the replies list."
1203
  msgstr ""
1204
 
1205
+ #: includes/admin/replies.php:155
1206
  msgid ""
1207
  "Hovering over a row in the replies list will display action links that allow "
1208
  "you to manage your reply. You can perform the following actions:"
1209
  msgstr ""
1210
 
1211
+ #: includes/admin/replies.php:157
1212
  msgid ""
1213
  "<strong>Edit</strong> takes you to the editing screen for that reply. You "
1214
  "can also reach that screen by clicking on the reply title."
1215
  msgstr ""
1216
 
1217
+ #: includes/admin/replies.php:159
1218
  msgid ""
1219
  "<strong>Trash</strong> removes your reply from this list and places it in "
1220
  "the trash, from which you can permanently delete it."
1221
  msgstr ""
1222
 
1223
+ #: includes/admin/replies.php:160
1224
  msgid ""
1225
  "<strong>Spam</strong> removes your reply from this list and places it in the "
1226
  "spam queue, from which you can permanently delete it."
1227
  msgstr ""
1228
 
1229
+ #: includes/admin/replies.php:161
1230
  msgid ""
1231
  "<strong>Preview</strong> will show you what your draft reply will look like "
1232
  "if you publish it. View will take you to your live site to view the reply. "
1233
  "Which link is available depends on your reply&#8217;s status."
1234
  msgstr ""
1235
 
1236
+ #: includes/admin/replies.php:170
1237
  msgid ""
1238
  "You can also edit or move multiple replies to the trash at once. Select the "
1239
  "replies you want to act on using the checkboxes, then select the action you "
1240
  "want to take from the Bulk Actions menu and click Apply."
1241
  msgstr ""
1242
 
1243
+ #: includes/admin/replies.php:171
1244
  msgid ""
1245
  "When using Bulk Edit, you can change the metadata (categories, author, etc.) "
1246
  "for all selected replies at once. To remove a reply from the grouping, just "
1247
  "click the x next to its name in the Bulk Edit area that appears."
1248
  msgstr ""
1249
 
1250
+ #: includes/admin/replies.php:192
1251
  msgid ""
1252
  "The title field and the big reply editing Area are fixed in place, but you "
1253
  "can reposition all the other boxes using drag and drop, and can minimize or "
1257
  "screen."
1258
  msgstr ""
1259
 
1260
+ #: includes/admin/replies.php:202
1261
  msgid "Title and Reply Editor"
1262
  msgstr ""
1263
 
1264
+ #: includes/admin/replies.php:204
1265
  msgid ""
1266
  "<strong>Title</strong> - Enter a title for your reply. After you enter a "
1267
  "title, you&#8217;ll see the permalink below, which you can edit."
1268
  msgstr ""
1269
 
1270
+ #: includes/admin/replies.php:205
1271
  msgid ""
1272
  "<strong>Reply Editor</strong> - Enter the text for your reply. There are two "
1273
  "modes of editing: Visual and HTML. Choose the mode by clicking on the "
1281
  "over the top area. Exit Fullscreen back to the regular reply editor."
1282
  msgstr ""
1283
 
1284
+ #: includes/admin/replies.php:208
1285
  msgid ""
1286
  "<strong>Publish</strong> - You can set the terms of publishing your reply in "
1287
  "the Publish box. For Status, Visibility, and Publish (immediately), click on "
1292
  "future or backdate a reply."
1293
  msgstr ""
1294
 
1295
+ #: includes/admin/replies.php:211
1296
  msgid ""
1297
  "<strong>reply Format</strong> - This designates how your theme will display "
1298
  "a specific reply. For example, you could have a <em>standard</em> blog reply "
1303
  "formats."
1304
  msgstr ""
1305
 
1306
+ #: includes/admin/replies.php:215
1307
  msgid ""
1308
  "<strong>Featured Image</strong> - This allows you to associate an image with "
1309
  "your reply without inserting it. This is usually useful only if your theme "
1311
  "custom header, etc."
1312
  msgstr ""
1313
 
1314
+ #: includes/admin/replies.php:220 includes/admin/replies.php:265
1315
  msgid "Reply Attributes"
1316
  msgstr ""
1317
 
1318
+ #: includes/admin/replies.php:222
1319
  msgid "Select the attributes that your reply should have:"
1320
  msgstr ""
1321
 
1322
+ #: includes/admin/replies.php:224
1323
  msgid ""
1324
  "<strong>Forum</strong> dropdown determines the parent forum that the reply "
1325
  "belongs to. Select the forum, or leave the default (Use Forum of Topic) to "
1326
  "post the reply in forum of the topic."
1327
  msgstr ""
1328
 
1329
+ #: includes/admin/replies.php:225
1330
  msgid ""
1331
  "<strong>Topic</strong> determines the parent topic that the reply belongs to."
1332
  msgstr ""
1333
 
1334
+ #: includes/admin/replies.php:240
1335
  msgid ""
1336
  "<strong>Discussion</strong> - You can turn comments and pings on or off, and "
1337
  "if there are comments on the reply, you can see them here and moderate them."
1338
  msgstr ""
1339
 
1340
+ #: includes/admin/replies.php:356 includes/admin/topics.php:374
1341
  #: templates/default/bbpress/form-anonymous.php:17
1342
  msgid "Author Information"
1343
  msgstr ""
1344
 
1345
+ #: includes/admin/replies.php:470
1346
  msgid "The reply was not found!"
1347
  msgstr ""
1348
 
1349
+ #: includes/admin/replies.php:473 includes/admin/topics.php:499
1350
  msgid "You do not have the permission to do that!"
1351
  msgstr ""
1352
 
1353
+ #: includes/admin/replies.php:541
1354
  msgid "There was a problem marking the reply \"%1$s\" as spam."
1355
  msgstr ""
1356
 
1357
+ #: includes/admin/replies.php:541
1358
  msgid "Reply \"%1$s\" successfully marked as spam."
1359
  msgstr ""
1360
 
1361
+ #: includes/admin/replies.php:545
1362
  msgid "There was a problem unmarking the reply \"%1$s\" as spam."
1363
  msgstr ""
1364
 
1365
+ #: includes/admin/replies.php:545
1366
  msgid "Reply \"%1$s\" successfully unmarked as spam."
1367
  msgstr ""
1368
 
1369
+ #: includes/admin/replies.php:578
1370
  msgid "Title"
1371
  msgstr ""
1372
 
1373
+ #: includes/admin/replies.php:581 includes/admin/topics.php:647
1374
  #: templates/default/bbpress/loop-replies.php:18
1375
  #: templates/default/bbpress/loop-replies.php:52
1376
  #: templates/default/bbpress/loop-search.php:18
1378
  msgid "Author"
1379
  msgstr ""
1380
 
1381
+ #: includes/admin/replies.php:635 includes/admin/replies.php:643
1382
  msgid "No Topic"
1383
  msgstr ""
1384
 
1385
+ #: includes/admin/replies.php:661 includes/admin/replies.php:676
1386
+ #: includes/admin/topics.php:699
1387
  msgid "No Forum"
1388
  msgstr ""
1389
 
1390
+ #: includes/admin/replies.php:667
1391
  msgid "(Mismatch)"
1392
  msgstr ""
1393
 
1394
+ #: includes/admin/replies.php:735 includes/admin/topics.php:788
1395
  msgid "View &#8220;%s&#8221;"
1396
  msgstr ""
1397
 
1398
+ #: includes/admin/replies.php:735 includes/admin/topics.php:788
1399
  msgid "View"
1400
  msgstr ""
1401
 
1402
+ #: includes/admin/replies.php:746
1403
  msgid "Mark the reply as not spam"
1404
  msgstr ""
1405
 
1406
+ #: includes/admin/replies.php:746 includes/admin/topics.php:819
1407
  msgid "Not spam"
1408
  msgstr ""
1409
 
1410
+ #: includes/admin/replies.php:748
1411
  msgid "Mark this reply as spam"
1412
  msgstr ""
1413
 
1414
+ #: includes/admin/replies.php:748 includes/admin/topics.php:821
1415
+ #: includes/replies/template-tags.php:1779
1416
+ #: includes/topics/template-tags.php:2713
1417
  msgid "Spam"
1418
  msgstr ""
1419
 
1420
+ #: includes/admin/replies.php:757 includes/admin/topics.php:829
1421
+ #: includes/replies/template-tags.php:1721
1422
+ #: includes/topics/template-tags.php:2469
1423
  msgid "Restore this item from the Trash"
1424
  msgstr ""
1425
 
1426
+ #: includes/admin/replies.php:757 includes/admin/topics.php:829
1427
+ #: includes/replies/template-tags.php:1709
1428
+ #: includes/topics/template-tags.php:2457
1429
  msgid "Restore"
1430
  msgstr ""
1431
 
1432
+ #: includes/admin/replies.php:759 includes/admin/topics.php:831
1433
+ #: includes/replies/template-tags.php:1723
1434
+ #: includes/topics/template-tags.php:2471
1435
  msgid "Move this item to the Trash"
1436
  msgstr ""
1437
 
1438
+ #: includes/admin/replies.php:759 includes/admin/topics.php:831
1439
+ #: includes/replies/template-tags.php:1708
1440
+ #: includes/topics/template-tags.php:2456
1441
  msgid "Trash"
1442
  msgstr ""
1443
 
1444
+ #: includes/admin/replies.php:763 includes/admin/topics.php:835
1445
+ #: includes/replies/template-tags.php:1727
1446
+ #: includes/topics/template-tags.php:2475
1447
  msgid "Delete this item permanently"
1448
  msgstr ""
1449
 
1450
+ #: includes/admin/replies.php:763 includes/admin/topics.php:835
1451
  msgid "Delete Permanently"
1452
  msgstr ""
1453
 
1454
+ #: includes/admin/replies.php:789 includes/admin/topics.php:861
1455
  msgid "Empty Spam"
1456
  msgstr ""
1457
 
1458
+ #: includes/admin/replies.php:799 includes/admin/topics.php:871
1459
  msgid "In all forums"
1460
  msgstr ""
1461
 
1462
+ #: includes/admin/replies.php:859
1463
  msgid "Reply updated. <a href=\"%s\">View topic</a>"
1464
  msgstr ""
1465
 
1466
+ #: includes/admin/replies.php:868
1467
  msgid "Reply updated."
1468
  msgstr ""
1469
 
1470
  #. translators: %s: date and time of the revision
1471
+ #: includes/admin/replies.php:873
1472
  msgid "Reply restored to revision from %s"
1473
  msgstr ""
1474
 
1475
+ #: includes/admin/replies.php:877
1476
  msgid "Reply created. <a href=\"%s\">View topic</a>"
1477
  msgstr ""
1478
 
1479
+ #: includes/admin/replies.php:880
1480
  msgid "Reply saved."
1481
  msgstr ""
1482
 
1483
+ #: includes/admin/replies.php:883
1484
  msgid "Reply submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
1485
  msgstr ""
1486
 
1487
+ #: includes/admin/replies.php:886
1488
  msgid ""
1489
  "Reply scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
1490
  "\">Preview topic</a>"
1491
  msgstr ""
1492
 
1493
+ #: includes/admin/replies.php:893
1494
  msgid "Reply draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
1495
  msgstr ""
1496
 
2037
  msgid "Repair Items"
2038
  msgstr ""
2039
 
2040
+ #: includes/admin/tools.php:161
2041
  msgid "Recalculate the parent topic for each post"
2042
  msgstr ""
2043
 
2044
+ #: includes/admin/tools.php:162
2045
  msgid "Recalculate the parent forum for each post"
2046
  msgstr ""
2047
 
2048
+ #: includes/admin/tools.php:163
2049
  msgid "Recalculate private and hidden forums"
2050
  msgstr ""
2051
 
2052
+ #: includes/admin/tools.php:164
2053
  msgid "Recalculate last activity in each topic and forum"
2054
  msgstr ""
2055
 
2056
+ #: includes/admin/tools.php:165
2057
+ msgid "Recalculate the sticky relationship of each topic"
2058
  msgstr ""
2059
 
2060
+ #: includes/admin/tools.php:166
2061
  msgid "Repair BuddyPress Group Forum relationships"
2062
  msgstr ""
2063
 
2064
+ #: includes/admin/tools.php:167
2065
  msgid "Count topics in each forum"
2066
  msgstr ""
2067
 
2068
+ #: includes/admin/tools.php:168
2069
  msgid "Count replies in each forum"
2070
  msgstr ""
2071
 
2072
+ #: includes/admin/tools.php:169
2073
  msgid "Count replies in each topic"
2074
  msgstr ""
2075
 
2076
+ #: includes/admin/tools.php:170
2077
  msgid "Count voices in each topic"
2078
  msgstr ""
2079
 
2080
+ #: includes/admin/tools.php:171
2081
  msgid "Count spammed & trashed replies in each topic"
2082
  msgstr ""
2083
 
2084
+ #: includes/admin/tools.php:172
2085
  msgid "Count topics for each user"
2086
  msgstr ""
2087
 
2088
+ #: includes/admin/tools.php:173
2089
  msgid "Count replies for each user"
2090
  msgstr ""
2091
 
2092
+ #: includes/admin/tools.php:174
2093
  msgid "Remove trashed topics from user favorites"
2094
  msgstr ""
2095
 
2096
+ #: includes/admin/tools.php:175
2097
  msgid "Remove trashed topics from user subscriptions"
2098
  msgstr ""
2099
 
2100
+ #: includes/admin/tools.php:176
2101
  msgid "Remap existing users to default forum roles"
2102
  msgstr ""
2103
 
2104
+ #: includes/admin/tools.php:196
2105
  msgid "Counting the number of replies in each topic&hellip; %s"
2106
  msgstr ""
2107
 
2108
+ #: includes/admin/tools.php:197 includes/admin/tools.php:240
2109
+ #: includes/admin/tools.php:282 includes/admin/tools.php:327
2110
+ #: includes/admin/tools.php:444 includes/admin/tools.php:478
2111
+ #: includes/admin/tools.php:510 includes/admin/tools.php:555
2112
+ #: includes/admin/tools.php:600 includes/admin/tools.php:662
2113
+ #: includes/admin/tools.php:730 includes/admin/tools.php:778
2114
+ #: includes/admin/tools.php:884 includes/admin/tools.php:942
2115
+ #: includes/admin/tools.php:991 includes/admin/tools.php:1045
2116
  msgid "Failed!"
2117
  msgstr ""
2118
 
2119
+ #: includes/admin/tools.php:223 includes/admin/tools.php:266
2120
+ #: includes/admin/tools.php:292 includes/admin/tools.php:459
2121
+ #: includes/admin/tools.php:493 includes/admin/tools.php:538
2122
+ #: includes/admin/tools.php:583 includes/admin/tools.php:645
2123
+ #: includes/admin/tools.php:706 includes/admin/tools.php:868
2124
+ #: includes/admin/tools.php:925 includes/admin/tools.php:975
2125
+ #: includes/admin/tools.php:1029 includes/admin/tools.php:1074
2126
  msgid "Complete!"
2127
  msgstr ""
2128
 
2129
+ #: includes/admin/tools.php:239
2130
  msgid "Counting the number of voices in each topic&hellip; %s"
2131
  msgstr ""
2132
 
2133
+ #: includes/admin/tools.php:281
2134
  msgid ""
2135
  "Counting the number of spammed and trashed replies in each topic&hellip; %s"
2136
  msgstr ""
2137
 
2138
+ #: includes/admin/tools.php:306
2139
  msgid "Repairing BuddyPress group-forum relationships&hellip; %s"
2140
  msgstr ""
2141
 
2142
+ #: includes/admin/tools.php:407
2143
  msgid "Group Forums"
2144
  msgstr ""
2145
 
2146
+ #: includes/admin/tools.php:408
2147
+ msgid "group-forums"
2148
+ msgstr ""
2149
+
2150
+ #: includes/admin/tools.php:424
2151
  msgid ""
2152
  "Complete! %s groups updated; %s forums updated; %s forum statuses synced."
2153
  msgstr ""
2154
 
2155
+ #: includes/admin/tools.php:443
2156
  msgid "Counting the number of topics in each forum&hellip; %s"
2157
  msgstr ""
2158
 
2159
+ #: includes/admin/tools.php:477
2160
  msgid "Counting the number of replies in each forum&hellip; %s"
2161
  msgstr ""
2162
 
2163
+ #: includes/admin/tools.php:509
2164
  msgid "Counting the number of topics each user has created&hellip; %s"
2165
  msgstr ""
2166
 
2167
+ #: includes/admin/tools.php:554
2168
  msgid "Counting the number of topics to which each user has replied&hellip; %s"
2169
  msgstr ""
2170
 
2171
+ #: includes/admin/tools.php:599
2172
  msgid "Removing trashed topics from user favorites&hellip; %s"
2173
  msgstr ""
2174
 
2175
+ #: includes/admin/tools.php:629 includes/admin/tools.php:690
2176
  msgid "Nothing to remove!"
2177
  msgstr ""
2178
 
2179
+ #: includes/admin/tools.php:661
2180
  msgid "Removing trashed topics from user subscriptions&hellip; %s"
2181
  msgstr ""
2182
 
2183
+ #: includes/admin/tools.php:723
2184
  msgid "Remapping forum role for each user on this site&hellip; %s"
2185
  msgstr ""
2186
 
2187
+ #: includes/admin/tools.php:761
2188
  msgid "Complete! %s users updated."
2189
  msgstr ""
2190
 
2191
+ #: includes/admin/tools.php:777
2192
  msgid "Recomputing latest post in every topic and forum&hellip; %s"
2193
  msgstr ""
2194
 
2195
+ #: includes/admin/tools.php:883
2196
  msgid "Repairing the sticky topic to the parent forum relationships&hellip; %s"
2197
  msgstr ""
2198
 
2199
+ #: includes/admin/tools.php:941
2200
  msgid "Recalculating forum visibility &hellip; %s"
2201
  msgstr ""
2202
 
2203
+ #: includes/admin/tools.php:990
2204
  msgid "Recalculating the forum for each post &hellip; %s"
2205
  msgstr ""
2206
 
2207
+ #: includes/admin/tools.php:1044
2208
  msgid "Recalculating the topic for each post &hellip; %s"
2209
  msgstr ""
2210
 
2211
+ #: includes/admin/tools.php:1097
2212
  msgid ""
2213
  "This will revert your forums back to a brand new installation. This process "
2214
  "cannot be undone. <strong>Backup your database before proceeding</strong>."
2215
  msgstr ""
2216
 
2217
+ #: includes/admin/tools.php:1103
2218
  msgid "The following data will be removed:"
2219
  msgstr ""
2220
 
2221
+ #: includes/admin/tools.php:1108
2222
  msgid "All Topic Tags"
2223
  msgstr ""
2224
 
2225
+ #: includes/admin/tools.php:1109
2226
  msgid "Related Meta Data"
2227
  msgstr ""
2228
 
2229
+ #: includes/admin/tools.php:1110
2230
  msgid "Forum Settings"
2231
  msgstr ""
2232
 
2233
+ #: includes/admin/tools.php:1111
2234
  msgid "Forum Activity"
2235
  msgstr ""
2236
 
2237
+ #: includes/admin/tools.php:1112
2238
  msgid "Forum User Roles"
2239
  msgstr ""
2240
 
2241
+ #: includes/admin/tools.php:1113
2242
  msgid "Importer Helper Data"
2243
  msgstr ""
2244
 
2245
+ #: includes/admin/tools.php:1117
2246
  msgid "Are you sure you want to do this?"
2247
  msgstr ""
2248
 
2249
+ #: includes/admin/tools.php:1120
2250
  msgid "Say it ain't so!"
2251
  msgstr ""
2252
 
2253
+ #: includes/admin/tools.php:1121
2254
  msgid "This process cannot be undone."
2255
  msgstr ""
2256
 
2257
+ #: includes/admin/tools.php:1129
2258
  msgid "Reset bbPress"
2259
  msgstr ""
2260
 
2261
+ #: includes/admin/tools.php:1162
2262
  msgid "Failed"
2263
  msgstr ""
2264
 
2265
+ #: includes/admin/tools.php:1163
2266
  msgid "Success!"
2267
  msgstr ""
2268
 
2269
+ #: includes/admin/tools.php:1170
2270
  msgid "Deleting Posts&hellip; %s"
2271
  msgstr ""
2272
 
2273
+ #: includes/admin/tools.php:1183
2274
  msgid "Deleting Post Meta&hellip; %s"
2275
  msgstr ""
2276
 
2277
+ #: includes/admin/tools.php:1192
2278
  msgid "Deleting Topic Tags&hellip; %s"
2279
  msgstr ""
2280
 
2281
+ #: includes/admin/tools.php:1199
2282
  msgid "Deleting User Meta&hellip; %s"
2283
  msgstr ""
2284
 
2285
+ #: includes/admin/tools.php:1206
2286
  msgid "Deleting Conversion Table&hellip; %s"
2287
  msgstr ""
2288
 
2289
+ #: includes/admin/tools.php:1218
2290
  msgid "Deleting Settings&hellip; %s"
2291
  msgstr ""
2292
 
2293
+ #: includes/admin/tools.php:1224
2294
  msgid "Deleting Roles and Capabilities&hellip; %s"
2295
  msgstr ""
2296
 
2297
+ #: includes/admin/topics.php:133
2298
  msgid ""
2299
  "This screen displays the individual topics on your site. You can customize "
2300
  "the display of this screen to suit your workflow."
2301
  msgstr ""
2302
 
2303
+ #: includes/admin/topics.php:143
2304
  msgid ""
2305
  "You can hide/display columns based on your needs and decide how many topics "
2306
  "to list per screen using the Screen Options tab."
2307
  msgstr ""
2308
 
2309
+ #: includes/admin/topics.php:144
2310
  msgid ""
2311
  "You can filter the list of topics by topic status using the text links in "
2312
  "the upper left to show All, Published, or Trashed topics. The default view "
2313
  "is to show all topics."
2314
  msgstr ""
2315
 
2316
+ #: includes/admin/topics.php:145
2317
  msgid ""
2318
  "You can refine the list to show only topics from a specific month by using "
2319
  "the dropdown menus above the topics list. Click the Filter button after "
2321
  "creator in the topics list."
2322
  msgstr ""
2323
 
2324
+ #: includes/admin/topics.php:154
2325
  msgid ""
2326
  "Hovering over a row in the topics list will display action links that allow "
2327
  "you to manage your topic. You can perform the following actions:"
2328
  msgstr ""
2329
 
2330
+ #: includes/admin/topics.php:156
2331
  msgid ""
2332
  "<strong>Edit</strong> takes you to the editing screen for that topic. You "
2333
  "can also reach that screen by clicking on the topic title."
2334
  msgstr ""
2335
 
2336
+ #: includes/admin/topics.php:157
2337
  msgid ""
2338
  "<strong>Trash</strong> removes your topic from this list and places it in "
2339
  "the trash, from which you can permanently delete it."
2340
  msgstr ""
2341
 
2342
+ #: includes/admin/topics.php:158
2343
  msgid ""
2344
  "<strong>Spam</strong> removes your topic from this list and places it in the "
2345
  "spam queue, from which you can permanently delete it."
2346
  msgstr ""
2347
 
2348
+ #: includes/admin/topics.php:159
2349
  msgid ""
2350
  "<strong>Preview</strong> will show you what your draft topic will look like "
2351
  "if you publish it. View will take you to your live site to view the topic. "
2352
  "Which link is available depends on your topic&#8217;s status."
2353
  msgstr ""
2354
 
2355
+ #: includes/admin/topics.php:160
2356
  msgid ""
2357
  "<strong>Close</strong> will mark the selected topic as &#8217;closed&#8217; "
2358
  "and disable the option to post new replies to the topic."
2359
  msgstr ""
2360
 
2361
+ #: includes/admin/topics.php:161
2362
  msgid ""
2363
  "<strong>Stick</strong> will keep the selected topic &#8217;pinned&#8217; to "
2364
  "the top the parent forum topic list."
2365
  msgstr ""
2366
 
2367
+ #: includes/admin/topics.php:162
2368
  msgid ""
2369
  "<strong>Stick <em>(to front)</em></strong> will keep the selected topic "
2370
  "&#8217;pinned&#8217; to the top of ALL forums and be visable in any forums "
2371
  "topics list."
2372
  msgstr ""
2373
 
2374
+ #: includes/admin/topics.php:171
2375
  msgid ""
2376
  "You can also edit or move multiple topics to the trash at once. Select the "
2377
  "topics you want to act on using the checkboxes, then select the action you "
2378
  "want to take from the Bulk Actions menu and click Apply."
2379
  msgstr ""
2380
 
2381
+ #: includes/admin/topics.php:172
2382
  msgid ""
2383
  "When using Bulk Edit, you can change the metadata (categories, author, etc.) "
2384
  "for all selected topics at once. To remove a topic from the grouping, just "
2385
  "click the x next to its name in the Bulk Edit area that appears."
2386
  msgstr ""
2387
 
2388
+ #: includes/admin/topics.php:193
2389
  msgid ""
2390
  "The title field and the big topic editing Area are fixed in place, but you "
2391
  "can reposition all the other boxes using drag and drop, and can minimize or "
2395
  "screen."
2396
  msgstr ""
2397
 
2398
+ #: includes/admin/topics.php:203
2399
  msgid "Title and Topic Editor"
2400
  msgstr ""
2401
 
2402
+ #: includes/admin/topics.php:205
2403
  msgid ""
2404
  "<strong>Title</strong> - Enter a title for your topic. After you enter a "
2405
  "title, you&#8217;ll see the permalink below, which you can edit."
2406
  msgstr ""
2407
 
2408
+ #: includes/admin/topics.php:206
2409
  msgid ""
2410
  "<strong>Topic Editor</strong> - Enter the text for your topic. There are two "
2411
  "modes of editing: Visual and HTML. Choose the mode by clicking on the "
2419
  "over the top area. Exit Fullscreen back to the regular topic editor."
2420
  msgstr ""
2421
 
2422
+ #: includes/admin/topics.php:209
2423
  msgid ""
2424
  "<strong>Publish</strong> - You can set the terms of publishing your topic in "
2425
  "the Publish box. For Status, Visibility, and Publish (immediately), click on "
2430
  "future or backdate a topic."
2431
  msgstr ""
2432
 
2433
+ #: includes/admin/topics.php:212
2434
  msgid ""
2435
  "<strong>topic Format</strong> - This designates how your theme will display "
2436
  "a specific topic. For example, you could have a <em>standard</em> blog topic "
2441
  "formats."
2442
  msgstr ""
2443
 
2444
+ #: includes/admin/topics.php:216
2445
  msgid ""
2446
  "<strong>Featured Image</strong> - This allows you to associate an image with "
2447
  "your topic without inserting it. This is usually useful only if your theme "
2449
  "custom header, etc."
2450
  msgstr ""
2451
 
2452
+ #: includes/admin/topics.php:221 includes/admin/topics.php:266
2453
  msgid "Topic Attributes"
2454
  msgstr ""
2455
 
2456
+ #: includes/admin/topics.php:223
2457
  msgid "Select the attributes that your topic should have:"
2458
  msgstr ""
2459
 
2460
+ #: includes/admin/topics.php:225
2461
  msgid ""
2462
  "<strong>Forum</strong> dropdown determines the parent forum that the topic "
2463
  "belongs to. Select the forum or category from the dropdown, or leave the "
2464
  "default (No Forum) to post the topic without an assigned forum."
2465
  msgstr ""
2466
 
2467
+ #: includes/admin/topics.php:226
2468
  msgid ""
2469
  "<strong>Topic Type</strong> dropdown indicates the sticky status of the "
2470
  "topic. Selecting the super sticky option would stick the topic to the front "
2472
  "its respective forum. Selecting normal would not stick the topic anywhere."
2473
  msgstr ""
2474
 
2475
+ #: includes/admin/topics.php:241
2476
  msgid ""
2477
  "<strong>Discussion</strong> - You can turn comments and pings on or off, and "
2478
  "if there are comments on the topic, you can see them here and moderate them."
2479
  msgstr ""
2480
 
2481
+ #: includes/admin/topics.php:496
2482
  msgid "The topic was not found!"
2483
  msgstr ""
2484
 
2485
+ #: includes/admin/topics.php:586
2486
  msgid "There was a problem opening the topic \"%1$s\"."
2487
  msgstr ""
2488
 
2489
+ #: includes/admin/topics.php:586
2490
  msgid "Topic \"%1$s\" successfully opened."
2491
  msgstr ""
2492
 
2493
+ #: includes/admin/topics.php:590
2494
  msgid "There was a problem closing the topic \"%1$s\"."
2495
  msgstr ""
2496
 
2497
+ #: includes/admin/topics.php:590
2498
  msgid "Topic \"%1$s\" successfully closed."
2499
  msgstr ""
2500
 
2501
+ #: includes/admin/topics.php:594
2502
  msgid "There was a problem sticking the topic \"%1$s\" to front."
2503
  msgstr ""
2504
 
2505
+ #: includes/admin/topics.php:594
2506
  msgid "Topic \"%1$s\" successfully sticked to front."
2507
  msgstr ""
2508
 
2509
+ #: includes/admin/topics.php:598
2510
  msgid "There was a problem sticking the topic \"%1$s\"."
2511
  msgstr ""
2512
 
2513
+ #: includes/admin/topics.php:598
2514
  msgid "Topic \"%1$s\" successfully sticked."
2515
  msgstr ""
2516
 
2517
+ #: includes/admin/topics.php:602
2518
  msgid "There was a problem unsticking the topic \"%1$s\"."
2519
  msgstr ""
2520
 
2521
+ #: includes/admin/topics.php:602
2522
  msgid "Topic \"%1$s\" successfully unsticked."
2523
  msgstr ""
2524
 
2525
+ #: includes/admin/topics.php:606
2526
  msgid "There was a problem marking the topic \"%1$s\" as spam."
2527
  msgstr ""
2528
 
2529
+ #: includes/admin/topics.php:606
2530
  msgid "Topic \"%1$s\" successfully marked as spam."
2531
  msgstr ""
2532
 
2533
+ #: includes/admin/topics.php:610
2534
  msgid "There was a problem unmarking the topic \"%1$s\" as spam."
2535
  msgstr ""
2536
 
2537
+ #: includes/admin/topics.php:610
2538
  msgid "Topic \"%1$s\" successfully unmarked as spam."
2539
  msgstr ""
2540
 
2541
+ #: includes/admin/topics.php:646 templates/default/bbpress/loop-topics.php:20
2542
  msgid "Voices"
2543
  msgstr ""
2544
 
2545
+ #: includes/admin/topics.php:706 includes/extend/buddypress/group.php:288
2546
  msgid "(No Forum)"
2547
  msgstr ""
2548
 
2549
+ #: includes/admin/topics.php:741 includes/topics/template-tags.php:1896
2550
  msgid "No Replies"
2551
  msgstr ""
2552
 
2553
+ #: includes/admin/topics.php:798
2554
  msgid "Close this topic"
2555
  msgstr ""
2556
 
2557
+ #: includes/admin/topics.php:798
2558
  msgctxt "Close a Topic"
2559
  msgid "Close"
2560
  msgstr ""
2561
 
2562
+ #: includes/admin/topics.php:800
2563
  msgid "Open this topic"
2564
  msgstr ""
2565
 
2566
+ #: includes/admin/topics.php:800
2567
  msgctxt "Open a Topic"
2568
  msgid "Open"
2569
  msgstr ""
2570
 
2571
+ #: includes/admin/topics.php:809
2572
  msgid "Unstick this topic"
2573
  msgstr ""
2574
 
2575
+ #: includes/admin/topics.php:809 includes/topics/template-tags.php:2587
2576
  msgid "Unstick"
2577
  msgstr ""
2578
 
2579
+ #: includes/admin/topics.php:812
2580
  msgid "Stick this topic to its forum"
2581
  msgstr ""
2582
 
2583
+ #: includes/admin/topics.php:812 includes/topics/template-tags.php:2586
2584
  msgid "Stick"
2585
  msgstr ""
2586
 
2587
+ #: includes/admin/topics.php:812
2588
  msgid "Stick this topic to front"
2589
  msgstr ""
2590
 
2591
+ #: includes/admin/topics.php:812 includes/topics/template-tags.php:2588
2592
  msgid "to front"
2593
  msgstr ""
2594
 
2595
+ #: includes/admin/topics.php:819
2596
  msgid "Mark the topic as not spam"
2597
  msgstr ""
2598
 
2599
+ #: includes/admin/topics.php:821
2600
  msgid "Mark this topic as spam"
2601
  msgstr ""
2602
 
2603
+ #: includes/admin/topics.php:931
2604
  msgid "Topic updated. <a href=\"%s\">View topic</a>"
2605
  msgstr ""
2606
 
2607
+ #: includes/admin/topics.php:940
2608
  msgid "Topic updated."
2609
  msgstr ""
2610
 
2611
  #. translators: %s: date and time of the revision
2612
+ #: includes/admin/topics.php:945
2613
  msgid "Topic restored to revision from %s"
2614
  msgstr ""
2615
 
2616
+ #: includes/admin/topics.php:949
2617
  msgid "Topic created. <a href=\"%s\">View topic</a>"
2618
  msgstr ""
2619
 
2620
+ #: includes/admin/topics.php:952
2621
  msgid "Topic saved."
2622
  msgstr ""
2623
 
2624
+ #: includes/admin/topics.php:955
2625
  msgid "Topic submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
2626
  msgstr ""
2627
 
2628
+ #: includes/admin/topics.php:958
2629
  msgid ""
2630
  "Topic scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
2631
  "\">Preview topic</a>"
2632
  msgstr ""
2633
 
2634
+ #: includes/admin/topics.php:965
2635
  msgid "Topic draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
2636
  msgstr ""
2637
 
2638
  #: includes/admin/users.php:87 includes/admin/users.php:213
2639
+ #: templates/default/bbpress/form-user-roles.php:20
2640
  msgid "Forum Role"
2641
  msgstr ""
2642
 
2643
  #: includes/admin/users.php:96 includes/admin/users.php:100
2644
+ #: includes/users/template-tags.php:1058
2645
  msgid "&mdash; No role for these forums &mdash;"
2646
  msgstr ""
2647
 
2742
  msgid "<strong>ERROR</strong>: Invalid email address submitted!"
2743
  msgstr ""
2744
 
2745
+ #: includes/common/functions.php:1065
2746
  msgid ""
2747
  "%1$s wrote:\n"
2748
  "\n"
2757
  "Login and visit the topic to unsubscribe from these emails."
2758
  msgstr ""
2759
 
2760
+ #: includes/common/functions.php:1718
2761
  msgid ""
2762
  "Conditional query tags do not work before the query is run. Before then, "
2763
  "they always return false."
2764
  msgstr ""
2765
 
2766
+ #: includes/common/template-tags.php:1415
2767
  msgid "No topics available"
2768
  msgstr ""
2769
 
2770
+ #: includes/common/template-tags.php:1420
2771
  msgid "No forums available"
2772
  msgstr ""
2773
 
2774
+ #: includes/common/template-tags.php:1425
2775
  msgid "None available"
2776
  msgstr ""
2777
 
2778
+ #: includes/common/template-tags.php:1553 includes/replies/functions.php:1145
2779
+ #: includes/topics/functions.php:1247 includes/topics/functions.php:1602
2780
  #: templates/default/bbpress/form-reply.php:29
2781
  msgid "Reply To: %s"
2782
  msgstr ""
2783
 
2784
+ #: includes/common/template-tags.php:2072
2785
  msgid "Home"
2786
  msgstr ""
2787
 
2788
+ #: includes/common/template-tags.php:2142
2789
  msgid "(Edit)"
2790
  msgstr ""
2791
 
2792
+ #: includes/common/template-tags.php:2146
2793
+ #: includes/common/template-tags.php:2260
2794
+ #: includes/common/template-tags.php:2501 includes/core/theme-compat.php:631
2795
  #: templates/default/extras/taxonomy-topic-tag-edit.php:17
2796
  #: templates/default/extras/taxonomy-topic-tag.php:17
2797
  msgid "Topic Tag: %s"
2798
  msgstr ""
2799
 
2800
+ #: includes/common/template-tags.php:2167
2801
  msgid "&lsaquo;"
2802
  msgstr ""
2803
 
2804
+ #: includes/common/template-tags.php:2167
2805
  msgid "&rsaquo;"
2806
  msgstr ""
2807
 
2808
+ #: includes/common/template-tags.php:2264
2809
  #: includes/search/template-tags.php:213
2810
  #: templates/default/bbpress/form-search.php:16
2811
  msgid "Search"
2812
  msgstr ""
2813
 
2814
+ #: includes/common/template-tags.php:2435
2815
  msgid "Log Out"
2816
  msgstr ""
2817
 
2818
+ #: includes/common/template-tags.php:2488
2819
  msgid "Forum: %s"
2820
  msgstr ""
2821
 
2822
+ #: includes/common/template-tags.php:2492
2823
  msgid "Topic: %s"
2824
  msgstr ""
2825
 
2826
+ #: includes/common/template-tags.php:2510
2827
  msgid "Your Profile"
2828
  msgstr ""
2829
 
2830
+ #: includes/common/template-tags.php:2515
2831
  #: templates/default/bbpress/user-details.php:29
2832
  msgid "%s's Profile"
2833
  msgstr ""
2834
 
2835
+ #: includes/common/template-tags.php:2523
2836
  msgid "Edit Your Profile"
2837
  msgstr ""
2838
 
2839
+ #: includes/common/template-tags.php:2528
2840
  msgid "Edit %s's Profile"
2841
  msgstr ""
2842
 
2843
+ #: includes/common/template-tags.php:2535
2844
  msgid "View: %s"
2845
  msgstr ""
2846
 
2853
  msgid "(bbPress) Login Widget"
2854
  msgstr ""
2855
 
2856
+ #: includes/common/widgets.php:89 includes/common/widgets.php:110
2857
  #: templates/default/bbpress/form-user-login.php:14
2858
  #: templates/default/bbpress/form-user-login.php:35
2859
  msgid "Log In"
2860
  msgstr ""
2861
 
2862
+ #: includes/common/widgets.php:92
2863
  #: templates/default/bbpress/form-user-edit.php:98
2864
  #: templates/default/bbpress/form-user-login.php:17
2865
  #: templates/default/bbpress/form-user-register.php:23
2866
  msgid "Username"
2867
  msgstr ""
2868
 
2869
+ #: includes/common/widgets.php:97
2870
  #: templates/default/bbpress/form-user-login.php:22
2871
  msgid "Password"
2872
  msgstr ""
2873
 
2874
+ #: includes/common/widgets.php:103
2875
  msgid "Remember Me"
2876
  msgstr ""
2877
 
2878
+ #: includes/common/widgets.php:122
2879
  #: templates/default/bbpress/form-user-register.php:36
2880
  msgid "Register"
2881
  msgstr ""
2882
 
2883
+ #: includes/common/widgets.php:128
2884
  #: templates/default/bbpress/form-user-lost-pass.php:14
2885
  msgid "Lost Password"
2886
  msgstr ""
2887
 
2888
+ #: includes/common/widgets.php:185 includes/common/widgets.php:337
2889
+ #: includes/common/widgets.php:461 includes/common/widgets.php:628
2890
+ #: includes/common/widgets.php:868 includes/common/widgets.php:1022
2891
+ #: includes/common/widgets.php:1225
2892
  msgid "Title:"
2893
  msgstr ""
2894
 
2900
  msgid "Lost Password URI:"
2901
  msgstr ""
2902
 
2903
+ #: includes/common/widgets.php:243
2904
  msgid "A list of registered optional topic views."
2905
  msgstr ""
2906
 
2907
+ #: includes/common/widgets.php:246
2908
  msgid "(bbPress) Topic Views List"
2909
  msgstr ""
2910
 
2911
+ #: includes/common/widgets.php:384
2912
  msgid "The bbPress forum search form."
2913
  msgstr ""
2914
 
2915
+ #: includes/common/widgets.php:387
2916
  msgid "(bbPress) Forum Search Form"
2917
  msgstr ""
2918
 
2919
+ #: includes/common/widgets.php:508
2920
  msgid "A list of forums with an option to set the parent."
2921
  msgstr ""
2922
 
2923
+ #: includes/common/widgets.php:511
2924
  msgid "(bbPress) Forums List"
2925
  msgstr ""
2926
 
2927
+ #: includes/common/widgets.php:634 includes/common/widgets.php:872
2928
  msgid "Parent Forum ID:"
2929
  msgstr ""
2930
 
2931
+ #: includes/common/widgets.php:640 includes/common/widgets.php:878
2932
  msgid "\"0\" to show only root - \"any\" to show all"
2933
  msgstr ""
2934
 
2935
+ #: includes/common/widgets.php:686
2936
  msgid "A list of recent topics, sorted by popularity or freshness."
2937
  msgstr ""
2938
 
2939
+ #: includes/common/widgets.php:689
2940
  msgid "(bbPress) Recent Topics"
2941
  msgstr ""
2942
 
2943
+ #: includes/common/widgets.php:806
2944
  msgctxt "widgets"
2945
  msgid "by %1$s"
2946
  msgstr ""
2947
 
2948
+ #: includes/common/widgets.php:869
2949
  msgid "Maximum topics to show:"
2950
  msgstr ""
2951
 
2952
+ #: includes/common/widgets.php:881 includes/common/widgets.php:1227
2953
  msgid "Show post date:"
2954
  msgstr ""
2955
 
2956
+ #: includes/common/widgets.php:882
2957
  msgid "Show topic author:"
2958
  msgstr ""
2959
 
2960
+ #: includes/common/widgets.php:885
2961
  msgid "Order By:"
2962
  msgstr ""
2963
 
2964
+ #: includes/common/widgets.php:887
2965
  msgid "Newest Topics"
2966
  msgstr ""
2967
 
2968
+ #: includes/common/widgets.php:888
2969
  #: templates/default/extras/page-forum-statistics.php:34
2970
  msgid "Popular Topics"
2971
  msgstr ""
2972
 
2973
+ #: includes/common/widgets.php:889
2974
  msgid "Topics With Recent Replies"
2975
  msgstr ""
2976
 
2977
+ #: includes/common/widgets.php:906
2978
+ msgid "Recent Topics"
2979
+ msgstr ""
2980
+
2981
+ #: includes/common/widgets.php:940
2982
  msgid "Some statistics from your forum."
2983
  msgstr ""
2984
 
2985
+ #: includes/common/widgets.php:943
2986
  msgid "(bbPress) Statistics"
2987
  msgstr ""
2988
 
2989
+ #: includes/common/widgets.php:1040
2990
+ msgid "Forum Statistics"
2991
+ msgstr ""
2992
+
2993
+ #: includes/common/widgets.php:1070
2994
  msgid "A list of the most recent replies."
2995
  msgstr ""
2996
 
2997
+ #: includes/common/widgets.php:1073
2998
  msgid "(bbPress) Recent Replies"
2999
  msgstr ""
3000
 
3001
  #. translators: 1: reply author, 2: reply link, 3: reply timestamp
3002
+ #: includes/common/widgets.php:1157
3003
  msgctxt "widgets"
3004
  msgid "%1$s on %2$s %3$s"
3005
  msgstr ""
3006
 
3007
  #. translators: 1: reply link, 2: reply timestamp
3008
+ #: includes/common/widgets.php:1163
3009
  msgctxt "widgets"
3010
  msgid "%1$s %2$s"
3011
  msgstr ""
3012
 
3013
  #. translators: 1: reply author, 2: reply link
3014
+ #: includes/common/widgets.php:1169
3015
  msgctxt "widgets"
3016
  msgid "%1$s on %2$s"
3017
  msgstr ""
3018
 
3019
  #. translators: 1: reply link
3020
+ #: includes/common/widgets.php:1175
3021
  msgctxt "widgets"
3022
  msgid "%1$s"
3023
  msgstr ""
3024
 
3025
+ #: includes/common/widgets.php:1226
3026
  msgid "Maximum replies to show:"
3027
  msgstr ""
3028
 
3029
+ #: includes/common/widgets.php:1228
3030
  msgid "Show reply author:"
3031
  msgstr ""
3032
 
3033
+ #: includes/common/widgets.php:1243
3034
+ msgid "Recent Replies"
3035
+ msgstr ""
3036
+
3037
+ #: includes/core/capabilities.php:412
3038
  msgid "Keymaster"
3039
  msgstr ""
3040
 
3041
+ #: includes/core/capabilities.php:418
3042
  msgid "Moderator"
3043
  msgstr ""
3044
 
3045
+ #: includes/core/capabilities.php:424
3046
  msgid "Participant"
3047
  msgstr ""
3048
 
3049
+ #: includes/core/capabilities.php:430
3050
  msgid "Spectator"
3051
  msgstr ""
3052
 
3053
+ #: includes/core/capabilities.php:436
3054
  msgid "Blocked"
3055
  msgstr ""
3056
 
3057
+ #: includes/core/capabilities.php:555 includes/core/capabilities.php:565
3058
  msgid "Editable forum roles no longer exist."
3059
  msgstr ""
3060
 
3061
+ #: includes/core/sub-actions.php:147
3062
+ msgid "The current user is being initialized without using $wp->init()."
3063
+ msgstr ""
3064
+
3065
  #: includes/core/update.php:172
3066
  msgid "General"
3067
  msgstr ""
3116
  "retry again later."
3117
  msgstr ""
3118
 
3119
+ #: includes/extend/buddypress/activity.php:197
3120
  msgid "New forum topic"
3121
  msgstr ""
3122
 
3123
+ #: includes/extend/buddypress/activity.php:198
3124
  msgid "New forum reply"
3125
  msgstr ""
3126
 
3127
+ #: includes/extend/buddypress/activity.php:423
3128
  msgid "%1$s started the topic %2$s in the forum %3$s"
3129
  msgstr ""
3130
 
3131
+ #: includes/extend/buddypress/activity.php:573
3132
  msgid "%1$s replied to the topic %2$s in the forum %3$s"
3133
  msgstr ""
3134
 
3135
+ #: includes/extend/buddypress/group.php:268
3136
+ #: includes/extend/buddypress/group.php:271
3137
+ msgid "Group Forum Settings"
3138
  msgstr ""
3139
 
3140
+ #: includes/extend/buddypress/group.php:272
3141
+ #: includes/extend/buddypress/group.php:468
3142
  msgid ""
3143
  "Create a discussion forum to allow members of this group to communicate in a "
3144
  "structured, bulletin-board style fashion."
3145
  msgstr ""
3146
 
3147
+ #: includes/extend/buddypress/group.php:276
3148
+ #: includes/extend/buddypress/group.php:471
3149
  msgid "Yes. I want this group to have a forum."
3150
  msgstr ""
3151
 
3152
+ #: includes/extend/buddypress/group.php:279
3153
  msgid "Saying no will not delete existing forum content."
3154
  msgstr ""
3155
 
3156
+ #: includes/extend/buddypress/group.php:284
3157
+ msgid "Group Forum:"
3158
+ msgstr ""
3159
+
3160
+ #: includes/extend/buddypress/group.php:292
3161
+ msgid ""
3162
+ "Network administrators can reconfigure which forum belongs to this group."
3163
+ msgstr ""
3164
+
3165
+ #: includes/extend/buddypress/group.php:297
3166
  msgid "Save Settings"
3167
  msgstr ""
3168
 
3169
+ #: includes/extend/buddypress/group.php:332
3170
+ #: includes/extend/buddypress/group.php:489 includes/forums/functions.php:118
3171
+ #: includes/forums/functions.php:394 includes/replies/functions.php:114
3172
+ #: includes/replies/functions.php:419 includes/replies/functions.php:1092
3173
+ #: includes/topics/functions.php:120 includes/topics/functions.php:482
3174
+ #: includes/topics/functions.php:1106 includes/topics/functions.php:1405
3175
+ #: includes/topics/functions.php:1752 includes/topics/functions.php:1791
3176
+ #: includes/topics/functions.php:1848 includes/users/functions.php:463
3177
+ #: includes/users/functions.php:781 includes/users/functions.php:906
3178
+ #: includes/users/functions.php:912
3179
+ msgid "<strong>ERROR</strong>: Are you sure you wanted to do that?"
3180
+ msgstr ""
3181
+
3182
+ #: includes/extend/buddypress/group.php:430
3183
+ msgctxt "group admin edit screen"
3184
+ msgid "Discussion Forum"
3185
+ msgstr ""
3186
+
3187
+ #: includes/extend/buddypress/group.php:466
3188
  msgid "Group Forum"
3189
  msgstr ""
3190
 
3191
+ #: includes/extend/buddypress/group.php:757
3192
+ msgid "This group does not currently have a forum."
 
3193
  msgstr ""
3194
 
3195
  #: includes/extend/buddypress/loader.php:99
3216
  msgid "Subscribed Topics"
3217
  msgstr ""
3218
 
 
 
 
 
 
 
 
 
 
 
 
3219
  #: includes/forums/functions.php:131
3220
  msgid ""
3221
  "<strong>ERROR</strong>: You do not have permission to create new forums."
3256
  msgstr ""
3257
 
3258
  #: includes/forums/functions.php:208 includes/replies/functions.php:203
3259
+ #: includes/topics/functions.php:230
3260
  msgid "<strong>ERROR</strong>: Slow down; you move too fast."
3261
  msgstr ""
3262
 
3284
  msgid "<strong>ERROR</strong>: Your forum cannot be edited at this time."
3285
  msgstr ""
3286
 
3287
+ #: includes/forums/template-tags.php:1120
3288
+ #: includes/forums/template-tags.php:1858
3289
  msgid "%s topic"
3290
  msgid_plural "%s topics"
3291
  msgstr[0] ""
3292
  msgstr[1] ""
3293
 
3294
+ #: includes/forums/template-tags.php:1136
3295
+ #: includes/topics/template-tags.php:1952
3296
  msgid " (+ %d hidden)"
3297
  msgstr ""
3298
 
3299
+ #: includes/forums/template-tags.php:1847
3300
+ #: includes/topics/template-tags.php:1936
3301
  msgid "%s reply"
3302
  msgid_plural "%s replies"
3303
  msgstr[0] ""
3304
  msgstr[1] ""
3305
 
3306
+ #: includes/forums/template-tags.php:1867
3307
  msgid ""
3308
  "This category contains %1$s and %2$s, and was last updated by %3$s %4$s."
3309
  msgstr ""
3310
 
3311
+ #: includes/forums/template-tags.php:1869
3312
  msgid "This forum contains %1$s and %2$s, and was last updated by %3$s %4$s."
3313
  msgstr ""
3314
 
3315
+ #: includes/forums/template-tags.php:1875
3316
  msgid "This category contains %1$s, and was last updated by %2$s %3$s."
3317
  msgstr ""
3318
 
3319
+ #: includes/forums/template-tags.php:1877
3320
  msgid "This forum contains %1$s, and was last updated by %2$s %3$s."
3321
  msgstr ""
3322
 
3323
+ #: includes/forums/template-tags.php:1887
3324
  msgid "This category contains %1$s and %2$s."
3325
  msgstr ""
3326
 
3327
+ #: includes/forums/template-tags.php:1889
3328
  msgid "This forum contains %1$s and %2$s."
3329
  msgstr ""
3330
 
3331
+ #: includes/forums/template-tags.php:1897
3332
  msgid "This category contains %1$s."
3333
  msgstr ""
3334
 
3335
+ #: includes/forums/template-tags.php:1899
3336
  msgid "This forum contains %1$s."
3337
  msgstr ""
3338
 
3339
+ #: includes/forums/template-tags.php:1903
3340
  msgid "This forum is empty."
3341
  msgstr ""
3342
 
3343
+ #: includes/forums/template-tags.php:2139
3344
  msgid "Category"
3345
  msgstr ""
3346
 
3347
+ #: includes/forums/template-tags.php:2176
3348
  msgctxt "Forum Status"
3349
  msgid "Open"
3350
  msgstr ""
3351
 
3352
+ #: includes/forums/template-tags.php:2177
3353
  msgctxt "Forum Status"
3354
  msgid "Closed"
3355
  msgstr ""
3356
 
3357
+ #: includes/forums/template-tags.php:2214
3358
  msgid "Public"
3359
  msgstr ""
3360
 
3361
+ #: includes/forums/template-tags.php:2215
3362
  #: templates/default/bbpress/feedback-no-access.php:13
3363
  msgid "Private"
3364
  msgstr ""
3365
 
3366
+ #: includes/forums/template-tags.php:2216
3367
  msgid "Hidden"
3368
  msgstr ""
3369
 
3376
  msgstr ""
3377
 
3378
  #: includes/replies/functions.php:165 includes/topics/functions.php:190
3379
+ #: includes/topics/functions.php:496
3380
  msgid "<strong>ERROR</strong>: Forum ID is missing."
3381
  msgstr ""
3382
 
3442
  msgid "<strong>ERROR</strong>: Your reply cannot be edited at this time."
3443
  msgstr ""
3444
 
3445
+ #: includes/replies/functions.php:1069
3446
  msgid "<strong>ERROR</strong>: Reply ID to move not found!"
3447
  msgstr ""
3448
 
3449
+ #: includes/replies/functions.php:1078
3450
  msgid "<strong>ERROR</strong>: The reply you want to move was not found."
3451
  msgstr ""
3452
 
3453
+ #: includes/replies/functions.php:1087
3454
  msgid "<strong>ERROR</strong>: The topic you want to move from was not found."
3455
  msgstr ""
3456
 
3457
+ #: includes/replies/functions.php:1098 includes/topics/functions.php:1117
3458
+ #: includes/topics/functions.php:1411
3459
  msgid ""
3460
  "<strong>ERROR</strong>: You do not have the permissions to edit the source "
3461
  "topic."
3462
  msgstr ""
3463
 
3464
+ #: includes/replies/functions.php:1108
3465
  msgid "<strong>ERROR</strong>: You need to choose a valid move option."
3466
  msgstr ""
3467
 
3468
+ #: includes/replies/functions.php:1121 includes/topics/functions.php:1432
3469
  msgid "<strong>ERROR</strong>: Destination topic ID not found!"
3470
  msgstr ""
3471
 
3472
+ #: includes/replies/functions.php:1131
3473
  msgid "<strong>ERROR</strong>: The topic you want to move to was not found!"
3474
  msgstr ""
3475
 
3476
+ #: includes/replies/functions.php:1136 includes/topics/functions.php:1445
3477
  msgid ""
3478
  "<strong>ERROR</strong>: You do not have the permissions to edit the "
3479
  "destination topic!"
3480
  msgstr ""
3481
 
3482
+ #: includes/replies/functions.php:1196 includes/topics/functions.php:1484
3483
  msgid ""
3484
  "<strong>ERROR</strong>: There was a problem converting the reply into the "
3485
  "topic. Please try again."
3486
  msgstr ""
3487
 
3488
+ #: includes/replies/functions.php:1201 includes/topics/functions.php:1489
3489
  msgid ""
3490
  "<strong>ERROR</strong>: You do not have the permissions to create new "
3491
  "topics. The reply could not be converted into a topic."
3492
  msgstr ""
3493
 
3494
+ #: includes/replies/functions.php:1370
3495
  msgid "<strong>ERROR:</strong> You do not have the permission to do that!"
3496
  msgstr ""
3497
 
3498
+ #: includes/replies/functions.php:1383
3499
  msgid ""
3500
  "<strong>ERROR</strong>: There was a problem unmarking the reply as spam!"
3501
  msgstr ""
3502
 
3503
+ #: includes/replies/functions.php:1383
3504
  msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam!"
3505
  msgstr ""
3506
 
3507
+ #: includes/replies/functions.php:1402
3508
  msgid "<strong>ERROR</strong>: There was a problem trashing the reply!"
3509
  msgstr ""
3510
 
3511
+ #: includes/replies/functions.php:1410
3512
  msgid "<strong>ERROR</strong>: There was a problem untrashing the reply!"
3513
  msgstr ""
3514
 
3515
+ #: includes/replies/functions.php:1418
3516
  msgid "<strong>ERROR</strong>: There was a problem deleting the reply!"
3517
  msgstr ""
3518
 
3519
+ #: includes/replies/functions.php:1832
3520
  msgid "All Posts"
3521
  msgstr ""
3522
 
3523
+ #: includes/replies/functions.php:1874 includes/topics/functions.php:3356
3524
  msgid "Replies: %s"
3525
  msgstr ""
3526
 
3527
+ #: includes/replies/template-tags.php:578
3528
+ #: includes/topics/template-tags.php:743
3529
  msgctxt "date at time"
3530
  msgid "%1$s at %2$s"
3531
  msgstr ""
3532
 
3533
+ #: includes/replies/template-tags.php:676
3534
  msgid "This reply was modified %1$s by %2$s. Reason: %3$s"
3535
  msgstr ""
3536
 
3537
+ #: includes/replies/template-tags.php:678
3538
  msgid "This reply was modified %1$s by %2$s."
3539
  msgstr ""
3540
 
3541
+ #: includes/replies/template-tags.php:964
3542
+ #: includes/topics/template-tags.php:1291 includes/users/template-tags.php:165
3543
  msgid "Anonymous"
3544
  msgstr ""
3545
 
3546
+ #: includes/replies/template-tags.php:1077
3547
+ #: includes/topics/template-tags.php:1404
3548
+ #: includes/users/template-tags.php:1419
3549
  msgid "View %s's profile"
3550
  msgstr ""
3551
 
3552
+ #: includes/replies/template-tags.php:1077
3553
+ #: includes/topics/template-tags.php:1404
3554
+ #: includes/users/template-tags.php:1419
3555
  msgid "Visit %s's website"
3556
  msgstr ""
3557
 
3558
+ #: includes/replies/template-tags.php:1710
3559
+ #: includes/topics/template-tags.php:2458
3560
  #: templates/default/bbpress/form-topic-tag.php:88
3561
  #: templates/default/bbpress/form-topic-tag.php:101
3562
  msgid "Delete"
3563
  msgstr ""
3564
 
3565
+ #: includes/replies/template-tags.php:1727
3566
+ #: includes/topics/template-tags.php:2475
3567
  msgid "Are you sure you want to delete that permanently?"
3568
  msgstr ""
3569
 
3570
+ #: includes/replies/template-tags.php:1780
3571
+ #: includes/topics/template-tags.php:2714
3572
  msgid "Unspam"
3573
  msgstr ""
3574
 
3575
+ #: includes/replies/template-tags.php:1843
3576
  msgid "Move"
3577
  msgstr ""
3578
 
3579
+ #: includes/replies/template-tags.php:1844
3580
  msgid "Move this reply"
3581
  msgstr ""
3582
 
3583
+ #: includes/replies/template-tags.php:1910
3584
  msgid "Split"
3585
  msgstr ""
3586
 
3587
+ #: includes/replies/template-tags.php:1911
3588
  msgid "Split the topic from this reply"
3589
  msgstr ""
3590
 
3591
+ #: includes/replies/template-tags.php:2018
3592
  msgid "Viewing %1$s reply"
3593
  msgid_plural "Viewing %1$s replies"
3594
  msgstr[0] ""
3595
  msgstr[1] ""
3596
 
3597
+ #: includes/replies/template-tags.php:2022
3598
  msgid "Viewing %2$s replies (of %4$s total)"
3599
  msgid_plural "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
3600
  msgstr[0] ""
3601
  msgstr[1] ""
3602
 
3603
+ #: includes/replies/template-tags.php:2030
3604
  msgid "Viewing %1$s post"
3605
  msgid_plural "Viewing %1$s posts"
3606
  msgstr[0] ""
3607
  msgstr[1] ""
3608
 
3609
+ #: includes/replies/template-tags.php:2034
3610
  msgid "Viewing %2$s post (of %4$s total)"
3611
  msgid_plural "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
3612
  msgstr[0] ""
3633
  "<strong>ERROR</strong>: You do not have permission to create new topics."
3634
  msgstr ""
3635
 
3636
+ #: includes/topics/functions.php:172 includes/topics/functions.php:546
3637
  msgid "<strong>ERROR</strong>: Your topic needs a title."
3638
  msgstr ""
3639
 
3640
+ #: includes/topics/functions.php:184 includes/topics/functions.php:558
3641
  msgid "<strong>ERROR</strong>: Your topic cannot be empty."
3642
  msgstr ""
3643
 
3644
+ #: includes/topics/functions.php:202
3645
  msgid ""
3646
  "<strong>ERROR</strong>: This forum is a category. No topics can be created "
3647
  "in this forum."
3648
  msgstr ""
3649
 
3650
+ #: includes/topics/functions.php:209 includes/topics/functions.php:518
3651
  msgid "<strong>ERROR</strong>: This forum has been closed to new topics."
3652
  msgstr ""
3653
 
3654
+ #: includes/topics/functions.php:215 includes/topics/functions.php:524
3655
  msgid ""
3656
  "<strong>ERROR</strong>: This forum is private and you do not have the "
3657
  "capability to read or create new topics in it."
3658
  msgstr ""
3659
 
3660
+ #: includes/topics/functions.php:221 includes/topics/functions.php:530
3661
  msgid ""
3662
  "<strong>ERROR</strong>: This forum is hidden and you do not have the "
3663
  "capability to read or create new topics in it."
3664
  msgstr ""
3665
 
3666
+ #: includes/topics/functions.php:235
3667
  msgid ""
3668
  "<strong>ERROR</strong>: Duplicate topic detected; it looks as though "
3669
  "you&#8217;ve already said that!"
3670
  msgstr ""
3671
 
3672
+ #: includes/topics/functions.php:240
3673
  msgid "<strong>ERROR</strong>: Your topic cannot be created at this time."
3674
  msgstr ""
3675
 
3676
+ #: includes/topics/functions.php:444 includes/topics/functions.php:1099
3677
  msgid "<strong>ERROR</strong>: Topic ID not found."
3678
  msgstr ""
3679
 
3680
+ #: includes/topics/functions.php:455
3681
  msgid "<strong>ERROR</strong>: The topic you want to edit was not found."
3682
  msgstr ""
3683
 
3684
+ #: includes/topics/functions.php:466
3685
  msgid "<strong>ERROR</strong>: You do not have permission to edit that topic."
3686
  msgstr ""
3687
 
3688
+ #: includes/topics/functions.php:511
3689
  msgid ""
3690
  "<strong>ERROR</strong>: This forum is a category. No topics can be created "
3691
  "in it."
3692
  msgstr ""
3693
 
3694
+ #: includes/topics/functions.php:563
3695
  msgid "<strong>ERROR</strong>: Your topic cannot be edited at this time."
3696
  msgstr ""
3697
 
3698
+ #: includes/topics/functions.php:1111
3699
  msgid "<strong>ERROR</strong>: The topic you want to merge was not found."
3700
  msgstr ""
3701
 
3702
+ #: includes/topics/functions.php:1125
3703
  msgid "<strong>ERROR</strong>: Destination topic ID not found."
3704
  msgstr ""
3705
 
3706
+ #: includes/topics/functions.php:1131
3707
  msgid "<strong>ERROR</strong>: The topic you want to merge to was not found."
3708
  msgstr ""
3709
 
3710
+ #: includes/topics/functions.php:1135
3711
  msgid ""
3712
  "<strong>ERROR</strong>: You do not have the permissions to edit the "
3713
  "destination topic."
3714
  msgstr ""
3715
 
3716
+ #: includes/topics/functions.php:1384
3717
  msgid "<strong>ERROR</strong>: Reply ID to split the topic from not found!"
3718
  msgstr ""
3719
 
3720
+ #: includes/topics/functions.php:1392
3721
  msgid "<strong>ERROR</strong>: The reply you want to split from was not found."
3722
  msgstr ""
3723
 
3724
+ #: includes/topics/functions.php:1401
3725
  msgid "<strong>ERROR</strong>: The topic you want to split was not found."
3726
  msgstr ""
3727
 
3728
+ #: includes/topics/functions.php:1419
3729
  msgid "<strong>ERROR</strong>: You need to choose a valid split option."
3730
  msgstr ""
3731
 
3732
+ #: includes/topics/functions.php:1441
3733
  msgid "<strong>ERROR</strong>: The topic you want to split to was not found!"
3734
  msgstr ""
3735
 
3736
+ #: includes/topics/functions.php:1740
3737
  msgid ""
3738
  "<strong>ERROR</strong>: The following problem(s) have been found while "
3739
  "getting the tag: %s"
3740
  msgstr ""
3741
 
3742
+ #: includes/topics/functions.php:1758 includes/topics/functions.php:1797
3743
  msgid ""
3744
  "<strong>ERROR</strong>: You do not have the permissions to edit the topic "
3745
  "tags."
3746
  msgstr ""
3747
 
3748
+ #: includes/topics/functions.php:1764 includes/topics/functions.php:1803
3749
  msgid "<strong>ERROR</strong>: You need to enter a tag name."
3750
  msgstr ""
3751
 
3752
+ #: includes/topics/functions.php:1774
3753
  msgid ""
3754
  "<strong>ERROR</strong>: The following problem(s) have been found while "
3755
  "updating the tag: %s"
3756
  msgstr ""
3757
 
3758
+ #: includes/topics/functions.php:1813 includes/topics/functions.php:1831
3759
  msgid ""
3760
  "<strong>ERROR</strong>: The following problem(s) have been found while "
3761
  "merging the tags: %s"
3762
  msgstr ""
3763
 
3764
+ #: includes/topics/functions.php:1822
3765
  msgid ""
3766
  "<strong>ERROR</strong>: The tags which are being merged can not be the same."
3767
  msgstr ""
3768
 
3769
+ #: includes/topics/functions.php:1854
3770
  msgid ""
3771
  "<strong>ERROR</strong>: You do not have the permissions to delete the topic "
3772
  "tags."
3773
  msgstr ""
3774
 
3775
+ #: includes/topics/functions.php:1863
3776
  msgid ""
3777
  "<strong>ERROR</strong>: The following problem(s) have been found while "
3778
  "deleting the tag: %s"
3779
  msgstr ""
3780
 
3781
+ #: includes/topics/functions.php:1988
3782
  msgid "<strong>ERROR:</strong> You do not have the permission to do that."
3783
  msgstr ""
3784
 
3785
+ #: includes/topics/functions.php:2001
3786
  msgid "<strong>ERROR</strong>: There was a problem closing the topic."
3787
  msgstr ""
3788
 
3789
+ #: includes/topics/functions.php:2001
3790
  msgid "<strong>ERROR</strong>: There was a problem opening the topic."
3791
  msgstr ""
3792
 
3793
+ #: includes/topics/functions.php:2012
3794
  msgid "<strong>ERROR</strong>: There was a problem unsticking the topic."
3795
  msgstr ""
3796
 
3797
+ #: includes/topics/functions.php:2012
3798
  msgid "<strong>ERROR</strong>: There was a problem sticking the topic."
3799
  msgstr ""
3800
 
3801
+ #: includes/topics/functions.php:2022
3802
  msgid ""
3803
  "<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
3804
  msgstr ""
3805
 
3806
+ #: includes/topics/functions.php:2022
3807
  msgid "<strong>ERROR</strong>: There was a problem marking the topic as spam."
3808
  msgstr ""
3809
 
3810
+ #: includes/topics/functions.php:2041
3811
  msgid "<strong>ERROR</strong>: There was a problem trashing the topic."
3812
  msgstr ""
3813
 
3814
+ #: includes/topics/functions.php:2049
3815
  msgid "<strong>ERROR</strong>: There was a problem untrashing the topic."
3816
  msgstr ""
3817
 
3818
+ #: includes/topics/functions.php:2057
3819
  msgid "<strong>ERROR</strong>: There was a problem deleting the topic."
3820
  msgstr ""
3821
 
3822
+ #: includes/topics/template-tags.php:920
3823
  msgid "This topic was modified %1$s by %2$s. Reason: %3$s"
3824
  msgstr ""
3825
 
3826
+ #: includes/topics/template-tags.php:922
3827
  msgid "This topic was modified %1$s by %2$s."
3828
  msgstr ""
3829
 
3830
+ #: includes/topics/template-tags.php:2129
3831
  msgid "Tagged:"
3832
  msgstr ""
3833
 
3834
+ #: includes/topics/template-tags.php:2526
3835
  msgctxt "Topic Status"
3836
  msgid "Close"
3837
  msgstr ""
3838
 
3839
+ #: includes/topics/template-tags.php:2527
3840
  msgctxt "Topic Status"
3841
  msgid "Open"
3842
  msgstr ""
3843
 
3844
+ #: includes/topics/template-tags.php:2657
3845
  #: templates/default/bbpress/form-topic-tag.php:59
3846
  #: templates/default/bbpress/form-topic-tag.php:73
3847
  msgid "Merge"
3848
  msgstr ""
3849
 
3850
+ #: includes/topics/template-tags.php:2767
3851
  msgid "Viewing %1$s topic"
3852
  msgid_plural "Viewing %1$s topics"
3853
  msgstr[0] ""
3854
  msgstr[1] ""
3855
 
3856
+ #: includes/topics/template-tags.php:2771
3857
  msgid "Viewing topic %2$s (of %4$s total)"
3858
  msgid_plural "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
3859
  msgstr[0] ""
3860
  msgstr[1] ""
3861
 
3862
+ #: includes/topics/template-tags.php:2831
3863
  msgid "This topic is marked as spam."
3864
  msgstr ""
3865
 
3866
+ #: includes/topics/template-tags.php:2836
3867
  msgid "This topic is in the trash."
3868
  msgstr ""
3869
 
3870
+ #: includes/topics/template-tags.php:2875
3871
  msgid "Normal"
3872
  msgstr ""
3873
 
3874
+ #: includes/topics/template-tags.php:2876
3875
  msgid "Sticky"
3876
  msgstr ""
3877
 
3878
+ #: includes/topics/template-tags.php:2877
3879
  msgid "Super Sticky"
3880
  msgstr ""
3881
 
3882
+ #: includes/topics/template-tags.php:2995
3883
  msgid "%s voice"
3884
  msgid_plural "%s voices"
3885
  msgstr[0] ""
3886
  msgstr[1] ""
3887
 
3888
+ #: includes/topics/template-tags.php:3001
3889
  msgid "This topic contains %1$s, has %2$s, and was last updated by %3$s %4$s."
3890
  msgstr ""
3891
 
3892
+ #: includes/topics/template-tags.php:3005
3893
  msgid "This topic contains %1$s and has %2$s."
3894
  msgstr ""
3895
 
3896
+ #: includes/topics/template-tags.php:3009
3897
  msgid "This topic has no replies."
3898
  msgstr ""
3899
 
3935
  msgstr ""
3936
 
3937
  #: includes/users/template-tags.php:487
3938
+ msgid "Guest"
3939
  msgstr ""
3940
 
3941
  #: includes/users/template-tags.php:491
3942
  msgid "Inactive"
3943
  msgstr ""
3944
 
3945
+ #: includes/users/template-tags.php:501
 
 
 
 
3946
  msgid "Member"
3947
  msgstr ""
3948
 
3949
+ #: includes/users/template-tags.php:541
3950
  msgid "Admin"
3951
  msgstr ""
3952
 
3953
+ #: includes/users/template-tags.php:707
3954
  msgid "Favorite"
3955
  msgstr ""
3956
 
3957
+ #: includes/users/template-tags.php:708
3958
  msgid "Favorited"
3959
  msgstr ""
3960
 
3961
+ #: includes/users/template-tags.php:865
3962
  msgid "Subscribe"
3963
  msgstr ""
3964
 
3965
+ #: includes/users/template-tags.php:866
3966
  msgid "Unsubscribe"
3967
  msgstr ""
3968
 
3969
+ #: includes/users/template-tags.php:933
3970
  msgid "User updated."
3971
  msgstr ""
3972
 
3973
+ #: includes/users/template-tags.php:958
3974
  msgid "You have super admin privileges."
3975
  msgstr ""
3976
 
3977
+ #: includes/users/template-tags.php:958
3978
  msgid "This user has super admin privileges."
3979
  msgstr ""
3980
 
3981
+ #: includes/users/template-tags.php:1023
3982
  msgid "&mdash; No role for this site &mdash;"
3983
  msgstr ""
3984
 
3985
+ #: includes/users/template-tags.php:1221
3986
  msgid "You are now logged out."
3987
  msgstr ""
3988
 
3989
+ #: includes/users/template-tags.php:1225
3990
  msgid "New user registration is currently not allowed."
3991
  msgstr ""
3992
 
3993
+ #: includes/users/template-tags.php:1234
3994
  msgid "Check your e-mail for the confirmation link."
3995
  msgstr ""
3996
 
3997
+ #: includes/users/template-tags.php:1239
3998
  msgid "Check your e-mail for your new password."
3999
  msgstr ""
4000
 
4001
+ #: includes/users/template-tags.php:1244
4002
  msgid "Registration complete. Please check your e-mail."
4003
  msgstr ""
4004
 
4184
  msgstr ""
4185
 
4186
  #: templates/default/bbpress/form-reply.php:60
 
4187
  msgid "Reply:"
4188
  msgstr ""
4189
 
4542
  "account."
4543
  msgstr ""
4544
 
4545
+ #: templates/default/bbpress/form-user-roles.php:13
4546
  msgid "Blog Role"
4547
  msgstr ""
4548
 
4725
  msgid "bbPress"
4726
  msgstr ""
4727
 
4728
+ #. #-#-#-#-# plugin.pot (bbPress 2.3-rc1) #-#-#-#-#
4729
  #. Plugin URI of the plugin/theme
4730
+ #. #-#-#-#-# plugin.pot (bbPress 2.3-rc1) #-#-#-#-#
4731
  #. Author URI of the plugin/theme
4732
  msgid "http://bbpress.org"
4733
  msgstr ""
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: matt, johnjamesjacoby, jmdodd
3
  Tags: forums, discussion, support, theme, akismet, multisite
4
  Requires at least: 3.5
5
- Tested up to: 3.5
6
- Stable tag: 2.2.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -26,6 +26,13 @@ We're keeping things as small and light as possible while still allowing for gre
26
 
27
  == Changelog ==
28
 
 
 
 
 
 
 
 
29
  = 2.2.4 =
30
  * Prepare converter queries
31
  * Improve validation and sanitization of form values
2
  Contributors: matt, johnjamesjacoby, jmdodd
3
  Tags: forums, discussion, support, theme, akismet, multisite
4
  Requires at least: 3.5
5
+ Tested up to: 3.6
6
+ Stable tag: 2.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
26
 
27
  == Changelog ==
28
 
29
+ = 2.3 =
30
+ * Added forum search functionality
31
+ * Improved BuddyPress Group Forums integration
32
+ * Improved allowed tags in topics and replies
33
+ * Added template stack support to theme compatability
34
+ * Added more forum migration options
35
+
36
  = 2.2.4 =
37
  * Prepare converter queries
38
  * Improve validation and sanitization of form values
templates/default/bbpress/content-single-forum.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Single Topic Content Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * Single Forum Content Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/content-single-topic-lead.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Single Topic Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
@@ -57,7 +57,7 @@
57
 
58
  <?php bbp_topic_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
59
 
60
- <?php if ( is_super_admin() ) : ?>
61
 
62
  <?php do_action( 'bbp_theme_before_topic_author_admin_details' ); ?>
63
 
@@ -92,11 +92,11 @@
92
  <div class="bbp-topic-content">
93
 
94
  <?php _e( 'Topic', 'bbpress' ); ?>
95
-
96
  </div><!-- .bbp-topic-content -->
97
 
98
  </li>
99
 
100
- </ul><!-- #topic-<?php bbp_topic_id(); ?>-replies -->
101
 
102
  <?php do_action( 'bbp_template_after_lead_topic' ); ?>
1
  <?php
2
 
3
  /**
4
+ * Single Topic Lead Content Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
57
 
58
  <?php bbp_topic_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
59
 
60
+ <?php if ( bbp_is_user_keymaster() ) : ?>
61
 
62
  <?php do_action( 'bbp_theme_before_topic_author_admin_details' ); ?>
63
 
92
  <div class="bbp-topic-content">
93
 
94
  <?php _e( 'Topic', 'bbpress' ); ?>
95
+
96
  </div><!-- .bbp-topic-content -->
97
 
98
  </li>
99
 
100
+ </ul><!-- #bbp-topic-<?php bbp_topic_id(); ?>-lead -->
101
 
102
  <?php do_action( 'bbp_template_after_lead_topic' ); ?>
templates/default/bbpress/content-single-user.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Single User Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * Single User Content Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/content-statistics.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Template Name: bbPress - Statistics
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * Statistics Content Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/feedback-logged-in.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Already Logged In
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * Logged In Feedback Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/feedback-no-access.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * No access
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * No Access Feedback Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/feedback-no-forums.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Oh bother!
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * No Forums Feedback Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/feedback-no-replies.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Oh bother!
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * No Replies Feedback Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/feedback-no-search.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Oh bother!
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * No Search Results Feedback Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/feedback-no-topics.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Oh bother!
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * No Topics Feedback Part
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
templates/default/bbpress/form-search.php CHANGED
@@ -13,6 +13,6 @@
13
  <div>
14
  <label class="screen-reader-text hidden" for="bbp_search"><?php _e( 'Search for:', 'bbpress' ); ?></label>
15
  <input tabindex="<?php bbp_tab_index(); ?>" type="text" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" id="bbp_search" />
16
- <input tabindex="<?php bbp_tab_index(); ?>" class="button" type="submit" id="bbp_search_submit" value="<?php _e( 'Search', 'bbpress' ); ?>" />
17
  </div>
18
  </form>
13
  <div>
14
  <label class="screen-reader-text hidden" for="bbp_search"><?php _e( 'Search for:', 'bbpress' ); ?></label>
15
  <input tabindex="<?php bbp_tab_index(); ?>" type="text" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" id="bbp_search" />
16
+ <input tabindex="<?php bbp_tab_index(); ?>" class="button" type="submit" id="bbp_search_submit" value="<?php esc_attr_e( 'Search', 'bbpress' ); ?>" />
17
  </div>
18
  </form>
templates/default/bbpress/form-topic.php CHANGED
@@ -83,7 +83,7 @@
83
  <?php if ( !function_exists( 'wp_editor' ) ) : ?>
84
 
85
  <p>
86
- <label for="bbp_reply_content"><?php _e( 'Reply:', 'bbpress' ); ?></label><br />
87
  <textarea id="bbp_topic_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_topic_content" cols="60" rows="6"><?php bbp_form_topic_content(); ?></textarea>
88
  </p>
89
 
83
  <?php if ( !function_exists( 'wp_editor' ) ) : ?>
84
 
85
  <p>
86
+ <label for="bbp_topic_content"><?php _e( 'Topic:', 'bbpress' ); ?></label><br />
87
  <textarea id="bbp_topic_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_topic_content" cols="60" rows="6"><?php bbp_form_topic_content(); ?></textarea>
88
  </p>
89
 
templates/default/bbpress/form-user-roles.php CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  <div>
2
  <label for="role"><?php _e( 'Blog Role', 'bbpress' ) ?></label>
3
 
1
+ <?php
2
+
3
+ /**
4
+ * User Roles Profile Edit Part
5
+ *
6
+ * @package bbPress
7
+ * @subpackage Theme
8
+ */
9
+
10
+ ?>
11
+
12
  <div>
13
  <label for="role"><?php _e( 'Blog Role', 'bbpress' ) ?></label>
14
 
templates/default/bbpress/loop-search-reply.php CHANGED
@@ -42,7 +42,7 @@
42
 
43
  <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
44
 
45
- <?php if ( is_super_admin() ) : ?>
46
 
47
  <?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
48
 
42
 
43
  <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
44
 
45
+ <?php if ( bbp_is_user_keymaster() ) : ?>
46
 
47
  <?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
48
 
templates/default/bbpress/loop-search-topic.php CHANGED
@@ -62,7 +62,7 @@
62
 
63
  <?php bbp_topic_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
64
 
65
- <?php if ( is_super_admin() ) : ?>
66
 
67
  <?php do_action( 'bbp_theme_before_topic_author_admin_details' ); ?>
68
 
62
 
63
  <?php bbp_topic_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
64
 
65
+ <?php if ( bbp_is_user_keymaster() ) : ?>
66
 
67
  <?php do_action( 'bbp_theme_before_topic_author_admin_details' ); ?>
68
 
templates/default/bbpress/loop-single-reply.php CHANGED
@@ -44,7 +44,7 @@
44
 
45
  <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
46
 
47
- <?php if ( is_super_admin() ) : ?>
48
 
49
  <?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
50
 
44
 
45
  <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
46
 
47
+ <?php if ( bbp_is_user_keymaster() ) : ?>
48
 
49
  <?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
50
 
templates/default/extras/page-forum-statistics.php CHANGED
@@ -29,7 +29,7 @@ get_header(); ?>
29
 
30
  <?php bbp_set_query_name( 'bbp_popular_topics' ); ?>
31
 
32
- <?php if ( bbp_has_topics( array( 'meta_key' => '_bbp_reply_count', 'posts_per_page' => 15, 'max_num_pages' => 1, 'orderby' => 'meta_value_num', 'show_stickies' => false ) ) ) : ?>
33
 
34
  <h2 class="entry-title"><?php _e( 'Popular Topics', 'bbpress' ); ?></h2>
35
 
29
 
30
  <?php bbp_set_query_name( 'bbp_popular_topics' ); ?>
31
 
32
+ <?php if ( bbp_view_query( 'popular' ) ) : ?>
33
 
34
  <h2 class="entry-title"><?php _e( 'Popular Topics', 'bbpress' ); ?></h2>
35
 
templates/default/extras/single-user.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * User Profile
5
  *
6
  * @package bbPress
7
  * @subpackage Theme
1
  <?php
2
 
3
  /**
4
+ * Single User
5
  *
6
  * @package bbPress
7
  * @subpackage Theme