BuddyPress - Version 1.8-beta1

Version Description

= 1.7.2 = See: http://codex.buddypress.org/releases/version-1-7-2/

= 1.7.1 = See: http://codex.buddypress.org/releases/version-1-7-1/

= 1.7 = See: http://codex.buddypress.org/releases/version-1-7/

= 1.6.5 = See: http://codex.buddypress.org/releases/version-1-6-5/

= 1.6.4 = See: http://codex.buddypress.org/releases/version-1-6-4/

= 1.6.3 = See: http://codex.buddypress.org/releases/version-1-6-3/

= 1.6.2 = Compatibility with WordPress 3.5

= 1.6.1 = Fixes 4 bugs

= 1.6 = See: http://codex.buddypress.org/releases/version-1-6/

= 1.5 = See: http://codex.buddypress.org/releases/version-1-5/

= 1.2.9 = Compatibility with WordPress 3.2

= 1.2.8 = Compatibility with WordPress 3.1

= 1.2.7 = Fixes over 10 bugs.

Download this release

Release Info

Developer boonebgorges
Plugin Icon 128x128 BuddyPress
Version 1.8-beta1
Comparing to
See all releases

Code changes from version 1.7.2 to 1.8-beta1

Files changed (99) hide show
  1. bp-activity/bp-activity-actions.php +85 -44
  2. bp-activity/bp-activity-admin.php +7 -7
  3. bp-activity/bp-activity-cache.php +18 -1
  4. bp-activity/bp-activity-classes.php +350 -6
  5. bp-activity/bp-activity-filters.php +15 -0
  6. bp-activity/bp-activity-functions.php +32 -5
  7. bp-activity/bp-activity-loader.php +26 -20
  8. bp-activity/bp-activity-screens.php +68 -11
  9. bp-activity/bp-activity-template.php +53 -7
  10. bp-activity/feeds/bp-activity-favorites-feed.php +0 -74
  11. bp-activity/feeds/bp-activity-friends-feed.php +0 -64
  12. bp-activity/feeds/bp-activity-group-feed.php +0 -59
  13. bp-activity/feeds/bp-activity-mentions-feed.php +0 -65
  14. bp-activity/feeds/bp-activity-mygroups-feed.php +0 -65
  15. bp-activity/feeds/bp-activity-personal-feed.php +0 -64
  16. bp-activity/feeds/bp-activity-sitewide-feed.php +0 -59
  17. bp-blogs/bp-blogs-actions.php +1 -1
  18. bp-blogs/bp-blogs-functions.php +8 -9
  19. bp-blogs/bp-blogs-loader.php +9 -0
  20. bp-blogs/bp-blogs-screens.php +48 -0
  21. bp-blogs/bp-blogs-widgets.php +32 -9
  22. bp-core/admin/bp-core-functions.php +12 -0
  23. bp-core/bp-core-actions.php +2 -0
  24. bp-core/bp-core-admin.php +4 -4
  25. bp-core/bp-core-adminbar.php +1 -0
  26. bp-core/bp-core-avatars.php +83 -65
  27. bp-core/bp-core-buddybar.php +15 -18
  28. bp-core/bp-core-classes.php +73 -13
  29. bp-core/bp-core-component.php +58 -50
  30. bp-core/bp-core-dependency.php +10 -0
  31. bp-core/bp-core-functions.php +647 -564
  32. bp-core/bp-core-loader.php +3 -2
  33. bp-core/bp-core-options.php +3 -3
  34. bp-core/bp-core-template-loader.php +27 -11
  35. bp-core/bp-core-template.php +25 -14
  36. bp-core/bp-core-theme-compatibility.php +87 -89
  37. bp-core/bp-core-widgets.php +16 -10
  38. bp-core/deprecated/1.2.php +48 -0
  39. bp-forums/bp-forums-loader.php +6 -0
  40. bp-forums/deprecated/1.6.php +96 -8
  41. bp-forums/deprecated/1.7.php +0 -229
  42. bp-friends/bp-friends-functions.php +4 -0
  43. bp-groups/admin/css/admin.css +37 -0
  44. bp-groups/admin/css/admin.min.css +1 -1
  45. bp-groups/admin/js/admin.js +17 -1
  46. bp-groups/admin/js/admin.min.js +1 -1
  47. bp-groups/bp-groups-actions.php +28 -13
  48. bp-groups/bp-groups-admin.php +149 -59
  49. bp-groups/bp-groups-cache.php +6 -4
  50. bp-groups/bp-groups-classes.php +1578 -188
  51. bp-groups/bp-groups-functions.php +58 -16
  52. bp-groups/bp-groups-loader.php +11 -1
  53. bp-groups/bp-groups-screens.php +84 -3
  54. bp-groups/bp-groups-template.php +43 -23
  55. bp-groups/bp-groups-widgets.php +7 -5
  56. bp-languages/buddypress.pot +860 -838
  57. bp-loader.php +41 -24
  58. bp-members/bp-members-functions.php +114 -7
  59. bp-members/bp-members-notifications.php +1 -1
  60. bp-members/bp-members-screens.php +83 -2
  61. bp-members/bp-members-template.php +4 -3
  62. bp-messages/bp-messages-template.php +4 -2
  63. bp-messages/js/autocomplete/jquery.autocompletefb.js +2 -2
  64. bp-messages/js/autocomplete/jquery.autocompletefb.min.js +1 -1
  65. bp-templates/bp-legacy/buddypress-functions.php +109 -42
  66. bp-templates/bp-legacy/buddypress/activity/comment.php +1 -1
  67. bp-templates/bp-legacy/buddypress/activity/index.php +10 -6
  68. bp-templates/bp-legacy/buddypress/groups/single/admin.php +40 -40
  69. bp-templates/bp-legacy/buddypress/members/activate.php +1 -1
  70. bp-templates/bp-legacy/buddypress/members/index.php +2 -0
  71. bp-templates/bp-legacy/buddypress/members/register.php +8 -8
  72. bp-templates/bp-legacy/buddypress/members/single/home.php +1 -1
  73. bp-templates/bp-legacy/buddypress/members/single/profile.php +5 -11
  74. bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php +14 -26
  75. bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php +21 -33
  76. bp-templates/bp-legacy/buddypress/members/single/settings/general.php +19 -33
  77. bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php +12 -26
  78. bp-templates/bp-legacy/css/buddypress.css +103 -114
  79. bp-templates/bp-legacy/js/buddypress.js +119 -34
  80. bp-themes/bp-default/_inc/ajax.php +17 -4
  81. bp-themes/bp-default/_inc/css/default.css +14 -0
  82. bp-themes/bp-default/_inc/global.js +94 -26
  83. bp-themes/bp-default/activity/comment.php +1 -1
  84. bp-themes/bp-default/activity/index.php +6 -2
  85. bp-themes/bp-default/comments.php +1 -1
  86. bp-themes/bp-default/functions.php +2 -1
  87. bp-themes/bp-default/groups/single/admin.php +40 -40
  88. bp-themes/bp-default/members/index.php +2 -0
  89. bp-themes/bp-default/members/single/profile.php +5 -11
  90. bp-themes/bp-default/members/single/settings/general.php +1 -1
  91. bp-themes/bp-default/registration/activate.php +1 -1
  92. bp-themes/bp-default/registration/register.php +9 -9
  93. bp-themes/bp-default/rtl.css +2 -2
  94. bp-themes/bp-default/style.css +2 -2
  95. bp-xprofile/admin/js/admin.js +6 -0
  96. bp-xprofile/admin/js/admin.min.js +1 -1
  97. bp-xprofile/bp-xprofile-admin.php +2 -2
  98. bp-xprofile/bp-xprofile-classes.php +5 -6
  99. bp-xprofile/bp-xprofile-template.php +34 -2
bp-activity/bp-activity-actions.php CHANGED
@@ -45,14 +45,13 @@ add_action( 'bp_init', 'bp_register_activity_actions', 8 );
45
  * @return bool False on failure
46
  */
47
  function bp_activity_action_permalink_router() {
48
- global $bp;
49
 
50
  // Not viewing activity
51
- if ( !bp_is_activity_component() || !bp_is_current_action( 'p' ) )
52
  return false;
53
 
54
  // No activity to display
55
- if ( !bp_action_variable( 0 ) || !is_numeric( bp_action_variable( 0 ) ) )
56
  return false;
57
 
58
  // Get the activity details
@@ -62,7 +61,6 @@ function bp_activity_action_permalink_router() {
62
  if ( empty( $activity['activities'][0] ) ) {
63
  bp_do_404();
64
  return;
65
-
66
  } else {
67
  $activity = $activity['activities'][0];
68
  }
@@ -71,10 +69,10 @@ function bp_activity_action_permalink_router() {
71
  $redirect = false;
72
 
73
  // Redirect based on the type of activity
74
- if ( bp_is_active( 'groups' ) && $activity->component == $bp->groups->id ) {
75
 
76
  // Activity is a user update
77
- if ( !empty( $activity->user_id ) ) {
78
  $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
79
 
80
  // Activity is something else
@@ -87,20 +85,21 @@ function bp_activity_action_permalink_router() {
87
  }
88
 
89
  // Set redirect to users' activity stream
90
- } else {
91
  $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
92
  }
93
 
94
  // If set, add the original query string back onto the redirect URL
95
- if ( !empty( $_SERVER['QUERY_STRING'] ) ) {
96
  $query_frags = array();
97
  wp_parse_str( $_SERVER['QUERY_STRING'], $query_frags );
98
  $redirect = add_query_arg( urlencode_deep( $query_frags ), $redirect );
99
  }
100
 
101
  // Allow redirect to be filtered
102
- if ( !$redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) )
103
  bp_core_redirect( bp_get_root_domain() );
 
104
 
105
  // Redirect to the actual activity permalink page
106
  bp_core_redirect( $redirect );
@@ -422,16 +421,22 @@ add_action( 'bp_actions', 'bp_activity_action_remove_favorite' );
422
  * @return bool False on failure
423
  */
424
  function bp_activity_action_sitewide_feed() {
425
- global $bp, $wp_query;
426
 
427
- if ( !bp_is_activity_component() || !bp_is_current_action( 'feed' ) || bp_is_user() || !empty( $bp->groups->current_group ) )
428
  return false;
429
 
430
- $wp_query->is_404 = false;
431
- status_header( 200 );
 
432
 
433
- include_once( 'feeds/bp-activity-sitewide-feed.php' );
434
- die;
 
 
 
 
 
435
  }
436
  add_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
437
 
@@ -448,16 +453,21 @@ add_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
448
  * @return bool False on failure
449
  */
450
  function bp_activity_action_personal_feed() {
451
- global $wp_query;
452
-
453
- if ( !bp_is_user_activity() || !bp_is_current_action( 'feed' ) )
454
  return false;
 
455
 
456
- $wp_query->is_404 = false;
457
- status_header( 200 );
 
458
 
459
- include_once( 'feeds/bp-activity-personal-feed.php' );
460
- die;
 
 
 
 
 
461
  }
462
  add_action( 'bp_actions', 'bp_activity_action_personal_feed' );
463
 
@@ -477,16 +487,21 @@ add_action( 'bp_actions', 'bp_activity_action_personal_feed' );
477
  * @return bool False on failure
478
  */
479
  function bp_activity_action_friends_feed() {
480
- global $wp_query;
481
-
482
- if ( !bp_is_active( 'friends' ) || !bp_is_user_activity() || !bp_is_current_action( bp_get_friends_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
483
  return false;
 
484
 
485
- $wp_query->is_404 = false;
486
- status_header( 200 );
 
487
 
488
- include_once( 'feeds/bp-activity-friends-feed.php' );
489
- die;
 
 
 
 
 
490
  }
491
  add_action( 'bp_actions', 'bp_activity_action_friends_feed' );
492
 
@@ -506,16 +521,29 @@ add_action( 'bp_actions', 'bp_activity_action_friends_feed' );
506
  * @return bool False on failure
507
  */
508
  function bp_activity_action_my_groups_feed() {
509
- global $wp_query;
510
-
511
- if ( !bp_is_active( 'groups' ) || !bp_is_user_activity() || !bp_is_current_action( bp_get_groups_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
512
  return false;
 
513
 
514
- $wp_query->is_404 = false;
515
- status_header( 200 );
516
-
517
- include_once( 'feeds/bp-activity-mygroups-feed.php' );
518
- die;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  }
520
  add_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
521
 
@@ -535,6 +563,10 @@ add_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
535
  function bp_activity_action_mentions_feed() {
536
  global $wp_query;
537
 
 
 
 
 
538
  if ( !bp_is_user_activity() || !bp_is_current_action( 'mentions' ) || !bp_is_action_variable( 'feed', 0 ) )
539
  return false;
540
 
@@ -560,16 +592,25 @@ add_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
560
  * @return bool False on failure
561
  */
562
  function bp_activity_action_favorites_feed() {
563
- global $wp_query;
564
-
565
- if ( !bp_is_user_activity() || !bp_is_current_action( 'favorites' ) || !bp_is_action_variable( 'feed', 0 ) )
566
  return false;
 
567
 
568
- $wp_query->is_404 = false;
569
- status_header( 200 );
 
570
 
571
- include_once( 'feeds/bp-activity-favorites-feed.php' );
572
- die;
 
 
 
 
 
 
 
 
 
573
  }
574
  add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
575
 
45
  * @return bool False on failure
46
  */
47
  function bp_activity_action_permalink_router() {
 
48
 
49
  // Not viewing activity
50
+ if ( ! bp_is_activity_component() || ! bp_is_current_action( 'p' ) )
51
  return false;
52
 
53
  // No activity to display
54
+ if ( ! bp_action_variable( 0 ) || ! is_numeric( bp_action_variable( 0 ) ) )
55
  return false;
56
 
57
  // Get the activity details
61
  if ( empty( $activity['activities'][0] ) ) {
62
  bp_do_404();
63
  return;
 
64
  } else {
65
  $activity = $activity['activities'][0];
66
  }
69
  $redirect = false;
70
 
71
  // Redirect based on the type of activity
72
+ if ( bp_is_active( 'groups' ) && $activity->component == buddypress()->groups->id ) {
73
 
74
  // Activity is a user update
75
+ if ( ! empty( $activity->user_id ) ) {
76
  $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
77
 
78
  // Activity is something else
85
  }
86
 
87
  // Set redirect to users' activity stream
88
+ } else if ( ! empty( $activity->user_id ) ) {
89
  $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
90
  }
91
 
92
  // If set, add the original query string back onto the redirect URL
93
+ if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
94
  $query_frags = array();
95
  wp_parse_str( $_SERVER['QUERY_STRING'], $query_frags );
96
  $redirect = add_query_arg( urlencode_deep( $query_frags ), $redirect );
97
  }
98
 
99
  // Allow redirect to be filtered
100
+ if ( ! $redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) ) {
101
  bp_core_redirect( bp_get_root_domain() );
102
+ }
103
 
104
  // Redirect to the actual activity permalink page
105
  bp_core_redirect( $redirect );
421
  * @return bool False on failure
422
  */
423
  function bp_activity_action_sitewide_feed() {
424
+ global $bp;
425
 
426
+ if ( ! bp_is_activity_component() || ! bp_is_current_action( 'feed' ) || bp_is_user() || ! empty( $bp->groups->current_group ) )
427
  return false;
428
 
429
+ // setup the feed
430
+ buddypress()->activity->feed = new BP_Activity_Feed( array(
431
+ 'id' => 'sitewide',
432
 
433
+ /* translators: Sitewide activity RSS title - "[Site Name] | Site Wide Activity" */
434
+ 'title' => sprintf( __( '%s | Site Wide Activity', 'buddypress' ), bp_get_site_name() ),
435
+
436
+ 'link' => bp_get_activity_directory_permalink(),
437
+ 'description' => __( 'Activity feed for the entire site.', 'buddypress' ),
438
+ 'activity_args' => 'display_comments=threaded'
439
+ ) );
440
  }
441
  add_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
442
 
453
  * @return bool False on failure
454
  */
455
  function bp_activity_action_personal_feed() {
456
+ if ( ! bp_is_user_activity() || ! bp_is_current_action( 'feed' ) ) {
 
 
457
  return false;
458
+ }
459
 
460
+ // setup the feed
461
+ buddypress()->activity->feed = new BP_Activity_Feed( array(
462
+ 'id' => 'personal',
463
 
464
+ /* translators: Personal activity RSS title - "[Site Name] | [User Display Name] | Activity" */
465
+ 'title' => sprintf( __( '%1$s | %2$s | Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
466
+
467
+ 'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() ),
468
+ 'description' => sprintf( __( 'Activity feed for %s.', 'buddypress' ), bp_get_displayed_user_fullname() ),
469
+ 'activity_args' => 'user_id=' . bp_displayed_user_id()
470
+ ) );
471
  }
472
  add_action( 'bp_actions', 'bp_activity_action_personal_feed' );
473
 
487
  * @return bool False on failure
488
  */
489
  function bp_activity_action_friends_feed() {
490
+ if ( ! bp_is_active( 'friends' ) || ! bp_is_user_activity() || ! bp_is_current_action( bp_get_friends_slug() ) || ! bp_is_action_variable( 'feed', 0 ) ) {
 
 
491
  return false;
492
+ }
493
 
494
+ // setup the feed
495
+ buddypress()->activity->feed = new BP_Activity_Feed( array(
496
+ 'id' => 'friends',
497
 
498
+ /* translators: Friends activity RSS title - "[Site Name] | [User Display Name] | Friends Activity" */
499
+ 'title' => sprintf( __( '%1$s | %2$s | Friends Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
500
+
501
+ 'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() ),
502
+ 'description' => sprintf( __( "Activity feed for %s' friends.", 'buddypress' ), bp_get_displayed_user_fullname() ),
503
+ 'activity_args' => 'scope=friends'
504
+ ) );
505
  }
506
  add_action( 'bp_actions', 'bp_activity_action_friends_feed' );
507
 
521
  * @return bool False on failure
522
  */
523
  function bp_activity_action_my_groups_feed() {
524
+ if ( ! bp_is_active( 'groups' ) || ! bp_is_user_activity() || ! bp_is_current_action( bp_get_groups_slug() ) || ! bp_is_action_variable( 'feed', 0 ) ) {
 
 
525
  return false;
526
+ }
527
 
528
+ // get displayed user's group IDs
529
+ $groups = groups_get_user_groups();
530
+ $group_ids = implode( ',', $groups['groups'] );
531
+
532
+ // setup the feed
533
+ buddypress()->activity->feed = new BP_Activity_Feed( array(
534
+ 'id' => 'mygroups',
535
+
536
+ /* translators: Member groups activity RSS title - "[Site Name] | [User Display Name] | Groups Activity" */
537
+ 'title' => sprintf( __( '%1$s | %2$s | Group Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
538
+
539
+ 'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() ),
540
+ 'description' => sprintf( __( "Public group activity feed of which %s is a member of.", 'buddypress' ), bp_get_displayed_user_fullname() ),
541
+ 'activity_args' => array(
542
+ 'object' => buddypress()->groups->id,
543
+ 'primary_id' => $group_ids,
544
+ 'display_comments' => 'threaded'
545
+ )
546
+ ) );
547
  }
548
  add_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
549
 
563
  function bp_activity_action_mentions_feed() {
564
  global $wp_query;
565
 
566
+ if ( ! bp_activity_do_mentions() ) {
567
+ return false;
568
+ }
569
+
570
  if ( !bp_is_user_activity() || !bp_is_current_action( 'mentions' ) || !bp_is_action_variable( 'feed', 0 ) )
571
  return false;
572
 
592
  * @return bool False on failure
593
  */
594
  function bp_activity_action_favorites_feed() {
595
+ if ( ! bp_is_user_activity() || ! bp_is_current_action( 'favorites' ) || ! bp_is_action_variable( 'feed', 0 ) ) {
 
 
596
  return false;
597
+ }
598
 
599
+ // get displayed user's favorite activity IDs
600
+ $favs = bp_activity_get_user_favorites( bp_displayed_user_id() );
601
+ $fav_ids = implode( ',', (array) $favs );
602
 
603
+ // setup the feed
604
+ buddypress()->activity->feed = new BP_Activity_Feed( array(
605
+ 'id' => 'favorites',
606
+
607
+ /* translators: User activity favorites RSS title - "[Site Name] | [User Display Name] | Favorites" */
608
+ 'title' => sprintf( __( '%1$s | %2$s | Favorites', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
609
+
610
+ 'link' => bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/',
611
+ 'description' => sprintf( __( "Activity feed of %s' favorites.", 'buddypress' ), bp_get_displayed_user_fullname() ),
612
+ 'activity_args' => 'include=' . $fav_ids
613
+ ) );
614
  }
615
  add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
616
 
bp-activity/bp-activity-admin.php CHANGED
@@ -588,7 +588,7 @@ function bp_activity_admin_edit() {
588
 
589
  <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
590
  <div id="post-body-content">
591
- <div id="postdiv" class="postarea">
592
  <div id="bp_activity_action" class="postbox">
593
  <h3><?php _e( 'Action', 'buddypress' ); ?></h3>
594
  <div class="inside">
@@ -1127,13 +1127,13 @@ class BP_Activity_List_Table extends WP_List_Table {
1127
  * @since BuddyPress (1.6)
1128
  */
1129
  function get_views() {
1130
- $redirect_to = remove_query_arg( array( 'activity_status', 'aid', 'deleted', 'error', 'spammed', 'unspammed', 'updated', ), $_SERVER['REQUEST_URI'] );
1131
- ?>
1132
  <ul class="subsubsub">
1133
- <li class="all"><a href="<?php echo esc_attr( esc_url( $redirect_to ) ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
1134
- <li class="spam"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'activity_status', 'spam', $redirect_to ) ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li>
1135
 
1136
- <?php do_action( 'bp_activity_list_table_get_views', $redirect_to, $this->view ); ?>
1137
  </ul>
1138
  <?php
1139
  }
@@ -1224,7 +1224,7 @@ class BP_Activity_List_Table extends WP_List_Table {
1224
  * @since BuddyPress (1.6)
1225
  */
1226
  function column_cb( $item ) {
1227
- printf( '<input type="checkbox" name="aid[]" value="%d" />', (int) $item['id'] );
1228
  }
1229
 
1230
  /**
588
 
589
  <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
590
  <div id="post-body-content">
591
+ <div id="postdiv">
592
  <div id="bp_activity_action" class="postbox">
593
  <h3><?php _e( 'Action', 'buddypress' ); ?></h3>
594
  <div class="inside">
1127
  * @since BuddyPress (1.6)
1128
  */
1129
  function get_views() {
1130
+ $url_base = bp_get_admin_url( 'admin.php?page=bp-activity' ); ?>
1131
+
1132
  <ul class="subsubsub">
1133
+ <li class="all"><a href="<?php echo esc_attr( esc_url( $url_base ) ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
1134
+ <li class="spam"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'activity_status', 'spam', $url_base ) ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li>
1135
 
1136
+ <?php do_action( 'bp_activity_list_table_get_views', $url_base, $this->view ); ?>
1137
  </ul>
1138
  <?php
1139
  }
1224
  * @since BuddyPress (1.6)
1225
  */
1226
  function column_cb( $item ) {
1227
+ printf( '<label class="screen-reader-text" for="aid-%1$d">' . __( 'Select activity item %1$d', 'buddypress' ) . '</label><input type="checkbox" name="aid[]" value="%1$d" id="aid-%1$d" />', $item['id'] );
1228
  }
1229
 
1230
  /**
bp-activity/bp-activity-cache.php CHANGED
@@ -32,6 +32,23 @@ function bp_activity_update_meta_cache( $activity_ids = false ) {
32
  'meta_table' => $bp->activity->table_name_meta,
33
  'cache_key_prefix' => 'bp_activity_meta'
34
  );
35
-
36
  bp_update_meta_cache( $cache_args );
37
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  'meta_table' => $bp->activity->table_name_meta,
33
  'cache_key_prefix' => 'bp_activity_meta'
34
  );
35
+
36
  bp_update_meta_cache( $cache_args );
37
  }
38
+
39
+ /**
40
+ * Clear the cache for all metadata of a given activity
41
+ *
42
+ * @param int $activity_id
43
+ */
44
+ function bp_activity_clear_meta_cache_for_activity( $activity_id ) {
45
+ global $wp_object_cache;
46
+
47
+ if ( is_object( $wp_object_cache ) && ! empty( $wp_object_cache->cache['bp'] ) ) {
48
+ foreach ( $wp_object_cache->cache['bp'] as $ckey => $cvalue ) {
49
+ if ( 0 === strpos( $ckey, 'bp_activity_meta_' . $activity_id ) ) {
50
+ wp_cache_delete( $ckey, 'bp' );
51
+ }
52
+ }
53
+ }
54
+ }
bp-activity/bp-activity-classes.php CHANGED
@@ -144,6 +144,7 @@ class BP_Activity_Activity {
144
  'sort' => 'DESC', // ASC or DESC
145
  'exclude' => false, // Array of ids to exclude
146
  'in' => false, // Array of ids to limit query by (IN)
 
147
  'filter' => false, // See self::get_filter_sql()
148
  'search_terms' => false, // Terms to search by
149
  'display_comments' => false, // Whether to include activity comments
@@ -158,6 +159,8 @@ class BP_Activity_Activity {
158
 
159
  $from_sql = " FROM {$bp->activity->table_name} a LEFT JOIN {$wpdb->users} u ON a.user_id = u.ID";
160
 
 
 
161
  // Where conditions
162
  $where_conditions = array();
163
 
@@ -197,6 +200,17 @@ class BP_Activity_Activity {
197
  $where_conditions['in'] = "a.id IN ({$in})";
198
  }
199
 
 
 
 
 
 
 
 
 
 
 
 
200
  // Alter the query based on whether we want to show activity item
201
  // comments in the stream like normal comments or threaded below
202
  // the activity.
@@ -228,12 +242,12 @@ class BP_Activity_Activity {
228
  $per_page = absint( $per_page );
229
 
230
  $pag_sql = $wpdb->prepare( "LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page );
231
- $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
232
  } else {
233
- $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $select_sql, $from_sql, $where_sql, $sort ) );
234
  }
235
 
236
- $total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', "SELECT count(a.id) FROM {$bp->activity->table_name} a {$index_hint_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $where_sql, $sort );
237
 
238
  $total_activities = $wpdb->get_var( $total_activities_sql );
239
 
@@ -242,7 +256,7 @@ class BP_Activity_Activity {
242
  $activity_user_ids = wp_list_pluck( $activities, 'user_id' );
243
  $activity_user_ids = implode( ',', wp_parse_id_list( $activity_user_ids ) );
244
 
245
- if ( !empty( $activity_user_ids ) ) {
246
  if ( $names = $wpdb->get_results( "SELECT user_id, value AS user_fullname FROM {$bp->profile->table_name_data} WHERE field_id = 1 AND user_id IN ({$activity_user_ids})" ) ) {
247
  foreach ( (array) $names as $name )
248
  $tmp_names[$name->user_id] = $name->user_fullname;
@@ -280,6 +294,46 @@ class BP_Activity_Activity {
280
  return array( 'activities' => $activities, 'total' => (int) $total_activities );
281
  }
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  /**
284
  * In BuddyPress 1.2.x, this was used to retrieve specific activity stream items (for example, on an activity's permalink page).
285
  * As of 1.5.x, use BP_Activity_Activity::get() with an 'in' parameter instead.
@@ -425,6 +479,10 @@ class BP_Activity_Activity {
425
 
426
  $activity_ids = implode( ',', wp_parse_id_list( $activity_ids ) );
427
 
 
 
 
 
428
  return $wpdb->query( "DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids})" );
429
  }
430
 
@@ -556,10 +614,14 @@ class BP_Activity_Activity {
556
  return $wpdb->get_results( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND secondary_item_id = %d", $parent_id ) );
557
  }
558
 
 
 
 
 
 
559
  function get_recorded_components() {
560
  global $wpdb, $bp;
561
-
562
- return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT component FROM {$bp->activity->table_name} ORDER BY component ASC" ) );
563
  }
564
 
565
  function get_sitewide_items_for_feed( $limit = 35 ) {
@@ -668,3 +730,285 @@ class BP_Activity_Activity {
668
  return $wpdb->get_var( $wpdb->prepare( "UPDATE {$bp->activity->table_name} SET hide_sitewide = 1 WHERE user_id = %d", $user_id ) );
669
  }
670
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  'sort' => 'DESC', // ASC or DESC
145
  'exclude' => false, // Array of ids to exclude
146
  'in' => false, // Array of ids to limit query by (IN)
147
+ 'meta_query' => false, // Filter by activitymeta
148
  'filter' => false, // See self::get_filter_sql()
149
  'search_terms' => false, // Terms to search by
150
  'display_comments' => false, // Whether to include activity comments
159
 
160
  $from_sql = " FROM {$bp->activity->table_name} a LEFT JOIN {$wpdb->users} u ON a.user_id = u.ID";
161
 
162
+ $join_sql = '';
163
+
164
  // Where conditions
165
  $where_conditions = array();
166
 
200
  $where_conditions['in'] = "a.id IN ({$in})";
201
  }
202
 
203
+ // Process meta_query into SQL
204
+ $meta_query_sql = self::get_meta_query_sql( $meta_query );
205
+
206
+ if ( ! empty( $meta_query_sql['join'] ) ) {
207
+ $join_sql .= $meta_query_sql['join'];
208
+ }
209
+
210
+ if ( ! empty( $meta_query_sql['where'] ) ) {
211
+ $where_conditions[] = $meta_query_sql['where'];
212
+ }
213
+
214
  // Alter the query based on whether we want to show activity item
215
  // comments in the stream like normal comments or threaded below
216
  // the activity.
242
  $per_page = absint( $per_page );
243
 
244
  $pag_sql = $wpdb->prepare( "LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page );
245
+ $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
246
  } else {
247
+ $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $select_sql, $from_sql, $where_sql, $sort ) );
248
  }
249
 
250
+ $total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', "SELECT count(a.id) FROM {$bp->activity->table_name} a {$index_hint_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $where_sql, $sort );
251
 
252
  $total_activities = $wpdb->get_var( $total_activities_sql );
253
 
256
  $activity_user_ids = wp_list_pluck( $activities, 'user_id' );
257
  $activity_user_ids = implode( ',', wp_parse_id_list( $activity_user_ids ) );
258
 
259
+ if ( !empty( $activity_user_ids ) ) {
260
  if ( $names = $wpdb->get_results( "SELECT user_id, value AS user_fullname FROM {$bp->profile->table_name_data} WHERE field_id = 1 AND user_id IN ({$activity_user_ids})" ) ) {
261
  foreach ( (array) $names as $name )
262
  $tmp_names[$name->user_id] = $name->user_fullname;
294
  return array( 'activities' => $activities, 'total' => (int) $total_activities );
295
  }
296
 
297
+ /**
298
+ * Get the SQL for the 'meta_query' param in BP_Activity_Activity::get()
299
+ *
300
+ * We use WP_Meta_Query to do the heavy lifting of parsing the
301
+ * meta_query array and creating the necessary SQL clauses. However,
302
+ * since BP_Activity_Activity::get() builds its SQL differently than
303
+ * WP_Query, we have to alter the return value (stripping the leading
304
+ * AND keyword from the 'where' clause).
305
+ *
306
+ * @since 1.8
307
+ *
308
+ * @param array $meta_query An array of meta_query filters. See the
309
+ * documentation for WP_Meta_Query for details.
310
+ * @return array $sql_array 'join' and 'where' clauses
311
+ */
312
+ public static function get_meta_query_sql( $meta_query = array() ) {
313
+ global $wpdb;
314
+
315
+ $sql_array = array(
316
+ 'join' => '',
317
+ 'where' => '',
318
+ );
319
+
320
+ if ( ! empty( $meta_query ) ) {
321
+ $activity_meta_query = new WP_Meta_Query( $meta_query );
322
+
323
+ // WP_Meta_Query expects the table name at
324
+ // $wpdb->activitymeta
325
+ $wpdb->activitymeta = buddypress()->activity->table_name_meta;
326
+
327
+ $meta_sql = $activity_meta_query->get_sql( 'activity', 'a', 'id' );
328
+
329
+ // Strip the leading AND - BP handles it in get()
330
+ $sql_array['where'] = preg_replace( '/^\sAND/', '', $meta_sql['where'] );
331
+ $sql_array['join'] = $meta_sql['join'];
332
+ }
333
+
334
+ return $sql_array;
335
+ }
336
+
337
  /**
338
  * In BuddyPress 1.2.x, this was used to retrieve specific activity stream items (for example, on an activity's permalink page).
339
  * As of 1.5.x, use BP_Activity_Activity::get() with an 'in' parameter instead.
479
 
480
  $activity_ids = implode( ',', wp_parse_id_list( $activity_ids ) );
481
 
482
+ foreach ( (array) $activity_ids as $activity_id ) {
483
+ bp_activity_clear_meta_cache_for_activity( $activity_id );
484
+ }
485
+
486
  return $wpdb->query( "DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids})" );
487
  }
488
 
614
  return $wpdb->get_results( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND secondary_item_id = %d", $parent_id ) );
615
  }
616
 
617
+ /**
618
+ * Fetch a list of all components that have activity items recorded
619
+ *
620
+ * @return array
621
+ */
622
  function get_recorded_components() {
623
  global $wpdb, $bp;
624
+ return $wpdb->get_col( "SELECT DISTINCT component FROM {$bp->activity->table_name} ORDER BY component ASC" );
 
625
  }
626
 
627
  function get_sitewide_items_for_feed( $limit = 35 ) {
730
  return $wpdb->get_var( $wpdb->prepare( "UPDATE {$bp->activity->table_name} SET hide_sitewide = 1 WHERE user_id = %d", $user_id ) );
731
  }
732
  }
733
+
734
+ /**
735
+ * Create a RSS feed using the activity component.
736
+ *
737
+ * You should only construct a new feed when you've validated that you're on
738
+ * the appropriate screen.
739
+ *
740
+ * See {@link bp_activity_action_sitewide_feed()} as an example.
741
+ *
742
+ * Accepted parameters:
743
+ * id - internal id for the feed; should be alphanumeric only
744
+ * (required)
745
+ * title - RSS feed title
746
+ * link - Relevant link for the RSS feed
747
+ * description - RSS feed description
748
+ * ttl - Time-to-live (see inline doc in constructor)
749
+ * update_period - Part of the syndication module (see inline doc in
750
+ * constructor for more info)
751
+ * update_frequency - Part of the syndication module (see inline doc in
752
+ * constructor for more info)
753
+ * max - Number of feed items to display
754
+ * activity_args - Arguments passed to {@link bp_has_activities()}
755
+ *
756
+ * @since BuddyPress (1.8)
757
+ */
758
+ class BP_Activity_Feed {
759
+ /**
760
+ * Holds our custom class properties.
761
+ *
762
+ * These variables are stored in a protected array that is magically
763
+ * updated using PHP 5.2+ methods.
764
+ *
765
+ * @see BP_Feed::__construct() This is where $data is added
766
+ * @var array
767
+ */
768
+ protected $data;
769
+
770
+ /**
771
+ * Magic method for checking the existence of a certain data variable.
772
+ *
773
+ * @param string $key
774
+ */
775
+ public function __isset( $key ) { return isset( $this->data[$key] ); }
776
+
777
+ /**
778
+ * Magic method for getting a certain data variable.
779
+ *
780
+ * @param string $key
781
+ */
782
+ public function __get( $key ) { return isset( $this->data[$key] ) ? $this->data[$key] : null; }
783
+
784
+ /**
785
+ * Constructor.
786
+ *
787
+ * @param $args Array
788
+ */
789
+ public function __construct( $args = array() ) {
790
+ // If feeds are disabled, stop now!
791
+ if ( false === (bool) apply_filters( 'bp_activity_enable_feeds', true ) ) {
792
+ global $wp_query;
793
+
794
+ // set feed flag to false
795
+ $wp_query->is_feed = false;
796
+
797
+ return false;
798
+ }
799
+
800
+ // Setup data
801
+ $this->data = wp_parse_args( $args, array(
802
+ // Internal identifier for the RSS feed - should be alphanumeric only
803
+ 'id' => '',
804
+
805
+ // RSS title - should be plain-text
806
+ 'title' => '',
807
+
808
+ // relevant link for the RSS feed
809
+ 'link' => '',
810
+
811
+ // RSS description - should be plain-text
812
+ 'description' => '',
813
+
814
+ // Time-to-live - number of minutes to cache the data before an aggregator
815
+ // requests it again. This is only acknowledged if the RSS client supports it
816
+ //
817
+ // See: http://www.rssboard.org/rss-profile#element-channel-ttl
818
+ // http://www.kbcafe.com/rss/rssfeedstate.html#ttl
819
+ 'ttl' => '30',
820
+
821
+ // Syndication module - similar to ttl, but not really supported by RSS
822
+ // clients
823
+ //
824
+ // See: http://web.resource.org/rss/1.0/modules/syndication/#description
825
+ // http://www.kbcafe.com/rss/rssfeedstate.html#syndicationmodule
826
+ 'update_period' => 'hourly',
827
+ 'update_frequency' => 2,
828
+
829
+ // Number of items to display
830
+ 'max' => 50,
831
+
832
+ // Activity arguments passed to bp_has_activities()
833
+ 'activity_args' => array()
834
+ ) );
835
+
836
+ // Plugins can use this filter to modify the feed before it is setup
837
+ do_action_ref_array( 'bp_activity_feed_prefetch', array( &$this ) );
838
+
839
+ // Setup class properties
840
+ $this->setup_properties();
841
+
842
+ // Check if id is valid
843
+ if ( empty( $this->id ) ) {
844
+ _doing_it_wrong( 'BP_Activity_Feed', __( "RSS feed 'id' must be defined", 'buddypress' ), 'BP 1.8' );
845
+ return false;
846
+ }
847
+
848
+ // Plugins can use this filter to modify the feed after it's setup
849
+ do_action_ref_array( 'bp_activity_feed_postfetch', array( &$this ) );
850
+
851
+ // Setup feed hooks
852
+ $this->setup_hooks();
853
+
854
+ // Output the feed
855
+ $this->output();
856
+
857
+ // Kill the rest of the output
858
+ die();
859
+ }
860
+
861
+ /** SETUP ****************************************************************/
862
+
863
+ /**
864
+ * Setup and validate the class properties.
865
+ */
866
+ protected function setup_properties() {
867
+ $this->id = sanitize_title( $this->id );
868
+ $this->title = strip_tags( $this->title );
869
+ $this->link = esc_url_raw( $this->link );
870
+ $this->description = strip_tags( $this->description );
871
+ $this->ttl = (int) $this->ttl;
872
+ $this->update_period = strip_tags( $this->update_period );
873
+ $this->update_frequency = (int) $this->update_frequency;
874
+
875
+ $this->activity_args = wp_parse_args( $this->activity_args, array(
876
+ 'max' => $this->max,
877
+ 'display_comments' => 'stream'
878
+ ) );
879
+
880
+ }
881
+
882
+ /**
883
+ * Setup some hooks that are used in the feed.
884
+ *
885
+ * Currently, these hooks are used to maintain backwards compatibility with
886
+ * the RSS feeds previous to BP 1.8.
887
+ */
888
+ protected function setup_hooks() {
889
+ add_action( 'bp_activity_feed_rss_attributes', array( $this, 'backpat_rss_attributes' ) );
890
+ add_action( 'bp_activity_feed_channel_elements', array( $this, 'backpat_channel_elements' ) );
891
+ add_action( 'bp_activity_feed_item_elements', array( $this, 'backpat_item_elements' ) );
892
+ }
893
+
894
+ /** BACKPAT HOOKS ********************************************************/
895
+
896
+ public function backpat_rss_attributes() {
897
+ do_action( 'bp_activity_' . $this->id . '_feed' );
898
+ }
899
+
900
+ public function backpat_channel_elements() {
901
+ do_action( 'bp_activity_' . $this->id . '_feed_head' );
902
+ }
903
+
904
+ public function backpat_item_elements() {
905
+ switch ( $this->id ) {
906
+
907
+ // sitewide and friends feeds use the 'personal' hook
908
+ case 'sitewide' :
909
+ case 'friends' :
910
+ $id = 'personal';
911
+
912
+ break;
913
+
914
+ default :
915
+ $id = $this->id;
916
+
917
+ break;
918
+ }
919
+
920
+ do_action( 'bp_activity_' . $id . '_feed_item' );
921
+ }
922
+
923
+ /** HELPERS **************************************************************/
924
+
925
+ /**
926
+ * Output the feed's item content.
927
+ */
928
+ protected function feed_content() {
929
+ bp_activity_content_body();
930
+
931
+ switch ( $this->id ) {
932
+
933
+ // also output parent activity item if we're on a specific feed
934
+ case 'favorites' :
935
+ case 'friends' :
936
+ case 'mentions' :
937
+ case 'personal' :
938
+
939
+ if ( 'activity_comment' == bp_get_activity_action_name() ) :
940
+ ?>
941
+ <strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> -
942
+ <?php bp_activity_parent_content() ?>
943
+ <?php
944
+ endif;
945
+
946
+ break;
947
+ }
948
+ }
949
+
950
+ /** OUTPUT ***************************************************************/
951
+
952
+ /**
953
+ * Output the RSS feed.
954
+ */
955
+ protected function output() {
956
+ // set up some additional headers if not on a directory page
957
+ // this is done b/c BP uses pseudo-pages
958
+ if ( ! bp_is_directory() ) {
959
+ global $wp_query;
960
+
961
+ $wp_query->is_404 = false;
962
+ status_header( 200 );
963
+ }
964
+
965
+ header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
966
+ echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?'.'>';
967
+ ?>
968
+
969
+ <rss version="2.0"
970
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
971
+ xmlns:atom="http://www.w3.org/2005/Atom"
972
+ xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
973
+ xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
974
+ <?php do_action( 'bp_activity_feed_rss_attributes' ); ?>
975
+ >
976
+
977
+ <channel>
978
+ <title><?php echo $this->title; ?></title>
979
+ <link><?php echo $this->link; ?></link>
980
+ <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
981
+ <description><?php echo $this->description ?></description>
982
+ <lastBuildDate><?php echo mysql2date( 'D, d M Y H:i:s O', bp_activity_get_last_updated(), false ); ?></lastBuildDate>
983
+ <generator>http://buddypress.org/?v=<?php bp_version(); ?></generator>
984
+ <language><?php bloginfo_rss( 'language' ); ?></language>
985
+ <ttl><?php echo $this->ttl; ?></ttl>
986
+ <sy:updatePeriod><?php echo $this->update_period; ?></sy:updatePeriod>
987
+ <sy:updateFrequency><?php echo $this->update_frequency; ?></sy:updateFrequency>
988
+ <?php do_action( 'bp_activity_feed_channel_elements' ); ?>
989
+
990
+ <?php if ( bp_has_activities( $this->activity_args ) ) : ?>
991
+ <?php while ( bp_activities() ) : bp_the_activity(); ?>
992
+ <item>
993
+ <guid isPermaLink="false"><?php bp_activity_feed_item_guid(); ?></guid>
994
+ <title><?php echo stripslashes( bp_get_activity_feed_item_title() ); ?></title>
995
+ <link><?php bp_activity_thread_permalink() ?></link>
996
+ <pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false ); ?></pubDate>
997
+
998
+ <?php if ( bp_get_activity_feed_item_description() ) : ?>
999
+ <content:encoded><![CDATA[<?php $this->feed_content(); ?>]]></content:encoded>
1000
+ <?php endif; ?>
1001
+
1002
+ <?php if ( bp_activity_can_comment() ) : ?>
1003
+ <slash:comments><?php bp_activity_comment_count(); ?></slash:comments>
1004
+ <?php endif; ?>
1005
+
1006
+ <?php do_action( 'bp_activity_feed_item_elements' ); ?>
1007
+ </item>
1008
+ <?php endwhile; ?>
1009
+
1010
+ <?php endif; ?>
1011
+ </channel>
1012
+ </rss><?php
1013
+ }
1014
+ }
bp-activity/bp-activity-filters.php CHANGED
@@ -208,6 +208,11 @@ function bp_activity_filter_kses( $content ) {
208
  */
209
  function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
210
 
 
 
 
 
 
211
  // Try to find mentions
212
  $usernames = bp_activity_find_mentions( $content );
213
 
@@ -237,6 +242,11 @@ function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
237
  * @uses bp_activity_find_mentions()
238
  */
239
  function bp_activity_at_name_filter_updates( $activity ) {
 
 
 
 
 
240
  // If activity was marked as spam, stop the rest of this function.
241
  if ( ! empty( $activity->is_spam ) )
242
  return;
@@ -271,6 +281,11 @@ function bp_activity_at_name_filter_updates( $activity ) {
271
  * @uses bp_activity_update_mention_count_for_user()
272
  */
273
  function bp_activity_at_name_send_emails( $activity ) {
 
 
 
 
 
274
  // If our temporary variable doesn't exist, stop now.
275
  if ( empty( buddypress()->activity->mentioned_users ) )
276
  return;
208
  */
209
  function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
210
 
211
+ // Are mentions disabled?
212
+ if ( ! bp_activity_do_mentions() ) {
213
+ return $content;
214
+ }
215
+
216
  // Try to find mentions
217
  $usernames = bp_activity_find_mentions( $content );
218
 
242
  * @uses bp_activity_find_mentions()
243
  */
244
  function bp_activity_at_name_filter_updates( $activity ) {
245
+ // Are mentions disabled?
246
+ if ( ! bp_activity_do_mentions() ) {
247
+ return;
248
+ }
249
+
250
  // If activity was marked as spam, stop the rest of this function.
251
  if ( ! empty( $activity->is_spam ) )
252
  return;
281
  * @uses bp_activity_update_mention_count_for_user()
282
  */
283
  function bp_activity_at_name_send_emails( $activity ) {
284
+ // Are mentions disabled?
285
+ if ( ! bp_activity_do_mentions() ) {
286
+ return;
287
+ }
288
+
289
  // If our temporary variable doesn't exist, stop now.
290
  if ( empty( buddypress()->activity->mentioned_users ) )
291
  return;
bp-activity/bp-activity-functions.php CHANGED
@@ -27,6 +27,30 @@ function bp_activity_has_directory() {
27
  return (bool) !empty( $bp->pages->activity->id );
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Searches through the content of an activity item to locate usernames,
32
  * designated by an @ sign.
@@ -367,7 +391,7 @@ function bp_activity_add_user_favorite( $activity_id, $user_id = 0 ) {
367
  $user_id = bp_loggedin_user_id();
368
 
369
  // Update the user's personal favorites
370
- $my_favs = bp_get_user_meta( bp_loggedin_user_id(), 'bp_favorite_activities', true );
371
  $my_favs[] = $activity_id;
372
 
373
  // Update the total number of users who have favorited this activity
@@ -375,7 +399,7 @@ function bp_activity_add_user_favorite( $activity_id, $user_id = 0 ) {
375
  $fav_count = !empty( $fav_count ) ? (int) $fav_count + 1 : 1;
376
 
377
  // Update user meta
378
- bp_update_user_meta( bp_loggedin_user_id(), 'bp_favorite_activities', $my_favs );
379
 
380
  // Update activity meta counts
381
  if ( true === bp_activity_update_meta( $activity_id, 'favorite_count', $fav_count ) ) {
@@ -881,6 +905,7 @@ function bp_activity_get( $args = '' ) {
881
  'display_comments' => false, // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item
882
 
883
  'search_terms' => false, // Pass search terms as a string
 
884
  'show_hidden' => false, // Show activity items that are hidden site-wide?
885
  'exclude' => false, // Comma-separated list of activity IDs to exclude
886
  'in' => false, // Comma-separated list or array of activity IDs to which you want to limit the query
@@ -902,7 +927,7 @@ function bp_activity_get( $args = '' ) {
902
  extract( $r, EXTR_SKIP );
903
 
904
  // Attempt to return a cached copy of the first page of sitewide activity.
905
- if ( 1 == (int) $page && empty( $max ) && empty( $search_terms ) && empty( $filter ) && empty( $exclude ) && empty( $in ) && 'DESC' == $sort && empty( $exclude ) && 'ham_only' == $spam ) {
906
  if ( !$activity = wp_cache_get( 'bp_activity_sitewide_front', 'bp' ) ) {
907
  $args = array(
908
  'page' => $page,
@@ -910,6 +935,7 @@ function bp_activity_get( $args = '' ) {
910
  'max' => $max,
911
  'sort' => $sort,
912
  'search_terms' => $search_terms,
 
913
  'filter' => $filter,
914
  'display_comments' => $display_comments,
915
  'show_hidden' => $show_hidden,
@@ -926,6 +952,7 @@ function bp_activity_get( $args = '' ) {
926
  'max' => $max,
927
  'sort' => $sort,
928
  'search_terms' => $search_terms,
 
929
  'filter' => $filter,
930
  'display_comments' => $display_comments,
931
  'show_hidden' => $show_hidden,
@@ -1103,10 +1130,10 @@ function bp_activity_post_update( $args = '' ) {
1103
  'type' => 'activity_update'
1104
  ) );
1105
 
1106
- $activity_content = apply_filters( 'bp_activity_latest_update_content', $content );
1107
 
1108
  // Add this update to the "latest update" usermeta so it can be fetched anywhere.
1109
- bp_update_user_meta( bp_loggedin_user_id(), 'bp_latest_update', array( 'id' => $activity_id, 'content' => $content ) );
1110
 
1111
  do_action( 'bp_activity_posted_update', $content, $user_id, $activity_id );
1112
 
27
  return (bool) !empty( $bp->pages->activity->id );
28
  }
29
 
30
+ /**
31
+ * Are mentions enabled or disabled?
32
+ *
33
+ * The Mentions feature does a number of things, all of which will be turned
34
+ * off if you disable mentions:
35
+ * - Detecting and auto-linking @username in all BP/WP content
36
+ * - Sending BP notifications and emails to users when they are mentioned
37
+ * using the @username syntax
38
+ * - The Public Message button on user profiles
39
+ *
40
+ * Mentions are enabled by default. To disable, put the following line in
41
+ * bp-custom.php or your theme's functions.php file:
42
+ *
43
+ * add_filter( 'bp_activity_do_mentions', '__return_false' );
44
+ *
45
+ * @since BuddyPress (1.8)
46
+ *
47
+ * @uses apply_filters() To call 'bp_activity_do_mentions' hook.
48
+ * @return bool $retval True to enable mentions, false to disable.
49
+ */
50
+ function bp_activity_do_mentions() {
51
+ return (bool) apply_filters( 'bp_activity_do_mentions', true );
52
+ }
53
+
54
  /**
55
  * Searches through the content of an activity item to locate usernames,
56
  * designated by an @ sign.
391
  $user_id = bp_loggedin_user_id();
392
 
393
  // Update the user's personal favorites
394
+ $my_favs = bp_get_user_meta( $user_id, 'bp_favorite_activities', true );
395
  $my_favs[] = $activity_id;
396
 
397
  // Update the total number of users who have favorited this activity
399
  $fav_count = !empty( $fav_count ) ? (int) $fav_count + 1 : 1;
400
 
401
  // Update user meta
402
+ bp_update_user_meta( $user_id, 'bp_favorite_activities', $my_favs );
403
 
404
  // Update activity meta counts
405
  if ( true === bp_activity_update_meta( $activity_id, 'favorite_count', $fav_count ) ) {
905
  'display_comments' => false, // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item
906
 
907
  'search_terms' => false, // Pass search terms as a string
908
+ 'meta_query' => false, // Filter by activity meta. See WP_Meta_Query for format
909
  'show_hidden' => false, // Show activity items that are hidden site-wide?
910
  'exclude' => false, // Comma-separated list of activity IDs to exclude
911
  'in' => false, // Comma-separated list or array of activity IDs to which you want to limit the query
927
  extract( $r, EXTR_SKIP );
928
 
929
  // Attempt to return a cached copy of the first page of sitewide activity.
930
+ if ( 1 == (int) $page && empty( $max ) && empty( $search_terms ) && empty( $meta_query ) && empty( $filter ) && empty( $exclude ) && empty( $in ) && 'DESC' == $sort && empty( $exclude ) && 'ham_only' == $spam ) {
931
  if ( !$activity = wp_cache_get( 'bp_activity_sitewide_front', 'bp' ) ) {
932
  $args = array(
933
  'page' => $page,
935
  'max' => $max,
936
  'sort' => $sort,
937
  'search_terms' => $search_terms,
938
+ 'meta_query' => $meta_query,
939
  'filter' => $filter,
940
  'display_comments' => $display_comments,
941
  'show_hidden' => $show_hidden,
952
  'max' => $max,
953
  'sort' => $sort,
954
  'search_terms' => $search_terms,
955
+ 'meta_query' => $meta_query,
956
  'filter' => $filter,
957
  'display_comments' => $display_comments,
958
  'show_hidden' => $show_hidden,
1130
  'type' => 'activity_update'
1131
  ) );
1132
 
1133
+ $activity_content = apply_filters( 'bp_activity_latest_update_content', $content, $activity_content );
1134
 
1135
  // Add this update to the "latest update" usermeta so it can be fetched anywhere.
1136
+ bp_update_user_meta( bp_loggedin_user_id(), 'bp_latest_update', array( 'id' => $activity_id, 'content' => $activity_content ) );
1137
 
1138
  do_action( 'bp_activity_posted_update', $content, $user_id, $activity_id );
1139
 
bp-activity/bp-activity-loader.php CHANGED
@@ -150,15 +150,17 @@ class BP_Activity_Component extends BP_Component {
150
  );
151
 
152
  // @ mentions
153
- $sub_nav[] = array(
154
- 'name' => __( 'Mentions', 'buddypress' ),
155
- 'slug' => 'mentions',
156
- 'parent_url' => $activity_link,
157
- 'parent_slug' => $this->slug,
158
- 'screen_function' => 'bp_activity_screen_mentions',
159
- 'position' => 20,
160
- 'item_css_id' => 'activity-mentions'
161
- );
 
 
162
 
163
  // Favorite activity items
164
  $sub_nav[] = array(
@@ -228,11 +230,13 @@ class BP_Activity_Component extends BP_Component {
228
  $activity_link = trailingslashit( $user_domain . $this->slug );
229
 
230
  // Unread message count
231
- $count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() );
232
- if ( !empty( $count ) ) {
233
- $title = sprintf( __( 'Mentions <span class="count">%s</span>', 'buddypress' ), number_format_i18n( $count ) );
234
- } else {
235
- $title = __( 'Mentions', 'buddypress' );
 
 
236
  }
237
 
238
  // Add the "Activity" sub menu
@@ -244,12 +248,14 @@ class BP_Activity_Component extends BP_Component {
244
  );
245
 
246
  // Mentions
247
- $wp_admin_nav[] = array(
248
- 'parent' => 'my-account-' . $this->id,
249
- 'id' => 'my-account-' . $this->id . '-mentions',
250
- 'title' => $title,
251
- 'href' => trailingslashit( $activity_link . 'mentions' )
252
- );
 
 
253
 
254
  // Personal
255
  $wp_admin_nav[] = array(
150
  );
151
 
152
  // @ mentions
153
+ if ( bp_activity_do_mentions() ) {
154
+ $sub_nav[] = array(
155
+ 'name' => __( 'Mentions', 'buddypress' ),
156
+ 'slug' => 'mentions',
157
+ 'parent_url' => $activity_link,
158
+ 'parent_slug' => $this->slug,
159
+ 'screen_function' => 'bp_activity_screen_mentions',
160
+ 'position' => 20,
161
+ 'item_css_id' => 'activity-mentions'
162
+ );
163
+ }
164
 
165
  // Favorite activity items
166
  $sub_nav[] = array(
230
  $activity_link = trailingslashit( $user_domain . $this->slug );
231
 
232
  // Unread message count
233
+ if ( bp_activity_do_mentions() ) {
234
+ $count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() );
235
+ if ( !empty( $count ) ) {
236
+ $title = sprintf( __( 'Mentions <span class="count">%s</span>', 'buddypress' ), number_format_i18n( $count ) );
237
+ } else {
238
+ $title = __( 'Mentions', 'buddypress' );
239
+ }
240
  }
241
 
242
  // Add the "Activity" sub menu
248
  );
249
 
250
  // Mentions
251
+ if ( bp_activity_do_mentions() ) {
252
+ $wp_admin_nav[] = array(
253
+ 'parent' => 'my-account-' . $this->id,
254
+ 'id' => 'my-account-' . $this->id . '-mentions',
255
+ 'title' => $title,
256
+ 'href' => trailingslashit( $activity_link . 'mentions' )
257
+ );
258
+ }
259
 
260
  // Personal
261
  $wp_admin_nav[] = array(
bp-activity/bp-activity-screens.php CHANGED
@@ -265,11 +265,17 @@ add_action( 'bp_screens', 'bp_activity_screen_single_activity_permalink' );
265
  */
266
  function bp_activity_screen_notification_settings() {
267
 
268
- if ( !$mention = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_mention', true ) )
269
- $mention = 'yes';
 
 
 
 
 
 
 
270
 
271
- if ( !$reply = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_reply', true ) )
272
- $reply = 'yes'; ?>
273
 
274
  <table class="notification-settings" id="activity-notification-settings">
275
  <thead>
@@ -282,12 +288,15 @@ function bp_activity_screen_notification_settings() {
282
  </thead>
283
 
284
  <tbody>
285
- <tr id="activity-notification-settings-mentions">
286
- <td>&nbsp;</td>
287
- <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>
288
- <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ) ?>/></td>
289
- <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ) ?>/></td>
290
- </tr>
 
 
 
291
  <tr id="activity-notification-settings-replies">
292
  <td>&nbsp;</td>
293
  <td><?php _e( "A member replies to an update or comment you've posted", 'buddypress' ) ?></td>
@@ -309,7 +318,7 @@ add_action( 'bp_notification_settings', 'bp_activity_screen_notification_setting
309
  * The main theme compat class for BuddyPress Activity
310
  *
311
  * This class sets up the necessary theme compatability actions to safely output
312
- * group template parts to the_title and the_content areas of a theme.
313
  *
314
  * @since BuddyPress (1.7)
315
  */
@@ -341,11 +350,13 @@ class BP_Activity_Theme_Compat {
341
 
342
  do_action( 'bp_activity_screen_index' );
343
 
 
344
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
345
  add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
346
 
347
  // Single activity
348
  } elseif ( bp_is_single_activity() ) {
 
349
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
350
  add_filter( 'bp_replace_the_content', array( $this, 'single_dummy_content' ) );
351
  }
@@ -353,6 +364,29 @@ class BP_Activity_Theme_Compat {
353
 
354
  /** Directory *************************************************************/
355
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  /**
357
  * Update the global $post with directory data
358
  *
@@ -383,6 +417,29 @@ class BP_Activity_Theme_Compat {
383
 
384
  /** Single ****************************************************************/
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  /**
387
  * Update the global $post with the displayed user's data
388
  *
265
  */
266
  function bp_activity_screen_notification_settings() {
267
 
268
+ if ( bp_activity_do_mentions() ) {
269
+ if ( ! $mention = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_mention', true ) ) {
270
+ $mention = 'yes';
271
+ }
272
+ }
273
+
274
+ if ( ! $reply = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_reply', true ) ) {
275
+ $reply = 'yes';
276
+ }
277
 
278
+ ?>
 
279
 
280
  <table class="notification-settings" id="activity-notification-settings">
281
  <thead>
288
  </thead>
289
 
290
  <tbody>
291
+ <?php if ( bp_activity_do_mentions() ) : ?>
292
+ <tr id="activity-notification-settings-mentions">
293
+ <td>&nbsp;</td>
294
+ <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>
295
+ <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ) ?>/></td>
296
+ <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ) ?>/></td>
297
+ </tr>
298
+ <?php endif; ?>
299
+
300
  <tr id="activity-notification-settings-replies">
301
  <td>&nbsp;</td>
302
  <td><?php _e( "A member replies to an update or comment you've posted", 'buddypress' ) ?></td>
318
  * The main theme compat class for BuddyPress Activity
319
  *
320
  * This class sets up the necessary theme compatability actions to safely output
321
+ * activity template parts to the_title and the_content areas of a theme.
322
  *
323
  * @since BuddyPress (1.7)
324
  */
350
 
351
  do_action( 'bp_activity_screen_index' );
352
 
353
+ add_filter( 'bp_get_buddypress_template', array( $this, 'directory_template_hierarchy' ) );
354
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
355
  add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
356
 
357
  // Single activity
358
  } elseif ( bp_is_single_activity() ) {
359
+ add_filter( 'bp_get_buddypress_template', array( $this, 'single_template_hierarchy' ) );
360
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
361
  add_filter( 'bp_replace_the_content', array( $this, 'single_dummy_content' ) );
362
  }
364
 
365
  /** Directory *************************************************************/
366
 
367
+ /**
368
+ * Add template hierarchy to theme compat for the activity directory page.
369
+ *
370
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
371
+ *
372
+ * @since BuddyPress (1.8)
373
+ *
374
+ * @param string $templates The templates from bp_get_theme_compat_templates()
375
+ * @return array $templates Array of custom templates to look for.
376
+ */
377
+ public function directory_template_hierarchy( $templates ) {
378
+ // Setup our templates based on priority
379
+ $new_templates = apply_filters( 'bp_template_hierarchy_activity_directory', array(
380
+ 'activity/index-directory.php'
381
+ ) );
382
+
383
+ // Merge new templates with existing stack
384
+ // @see bp_get_theme_compat_templates()
385
+ $templates = array_merge( (array) $new_templates, $templates );
386
+
387
+ return $templates;
388
+ }
389
+
390
  /**
391
  * Update the global $post with directory data
392
  *
417
 
418
  /** Single ****************************************************************/
419
 
420
+ /**
421
+ * Add custom template hierarchy to theme compat for activity permalink pages.
422
+ *
423
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
424
+ *
425
+ * @since BuddyPress (1.8)
426
+ *
427
+ * @param string $templates The templates from bp_get_theme_compat_templates()
428
+ * @return array $templates Array of custom templates to look for.
429
+ */
430
+ public function single_template_hierarchy( $templates ) {
431
+ // Setup our templates based on priority
432
+ $new_templates = apply_filters( 'bp_template_hierarchy_activity_single_item', array(
433
+ 'activity/single/index.php'
434
+ ) );
435
+
436
+ // Merge new templates with existing stack
437
+ // @see bp_get_theme_compat_templates()
438
+ $templates = array_merge( (array) $new_templates, $templates );
439
+
440
+ return $templates;
441
+ }
442
+
443
  /**
444
  * Update the global $post with the displayed user's data
445
  *
bp-activity/bp-activity-template.php CHANGED
@@ -150,6 +150,7 @@ class BP_Activity_Template {
150
  'in' => false,
151
  'filter' => false,
152
  'search_terms' => false,
 
153
  'display_comments' => 'threaded',
154
  'show_hidden' => false,
155
  'spam' => 'ham_only',
@@ -172,7 +173,7 @@ class BP_Activity_Template {
172
 
173
  // Fetch all activity items
174
  else
175
- $this->activities = bp_activity_get( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'filter' => $filter, 'show_hidden' => $show_hidden, 'exclude' => $exclude, 'in' => $in, 'spam' => $spam ) );
176
 
177
  if ( !$max || $max >= (int) $this->activities['total'] )
178
  $this->total_activity_count = (int) $this->activities['total'];
@@ -361,6 +362,8 @@ function bp_has_activities( $args = '' ) {
361
  'primary_id' => $primary_id, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
362
  'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
363
 
 
 
364
  // Searching
365
  'search_terms' => false // specify terms to search on
366
  );
@@ -410,11 +413,17 @@ function bp_has_activities( $args = '' ) {
410
  if ( empty( $favs ) )
411
  return false;
412
 
413
- $include = implode( ',', (array) $favs );
414
  $display_comments = true;
 
415
  break;
416
  case 'mentions':
417
 
 
 
 
 
 
418
  // Start search at @ symbol and stop search at closing tag delimiter.
419
  $search_terms = '@' . bp_core_get_username( $user_id ) . '<';
420
  $display_comments = 'stream';
@@ -453,6 +462,7 @@ function bp_has_activities( $args = '' ) {
453
  'in' => $in,
454
  'filter' => $filter,
455
  'search_terms' => $search_terms,
 
456
  'display_comments' => $display_comments,
457
  'show_hidden' => $show_hidden,
458
  'spam' => $spam
@@ -1073,14 +1083,14 @@ function bp_activity_secondary_avatar( $args = '' ) {
1073
  case 'groups' :
1074
  $object = 'group';
1075
  $item_id = $activities_template->activity->item_id;
 
 
1076
 
1077
  // Only if groups is active
1078
  if ( bp_is_active( 'groups' ) ) {
1079
  $group = groups_get_group( array( 'group_id' => $item_id ) );
1080
  $link = bp_get_group_permalink( $group );
1081
  $name = $group->name;
1082
- } else {
1083
- $name = '';
1084
  }
1085
 
1086
  if ( empty( $alt ) ) {
@@ -2019,6 +2029,34 @@ function bp_activity_thread_permalink() {
2019
  return apply_filters( 'bp_get_activity_thread_permalink', $link );
2020
  }
2021
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2022
  /**
2023
  * Echoes the activity favorite link
2024
  *
@@ -2395,6 +2433,10 @@ function bp_total_favorite_count_for_user( $user_id = 0 ) {
2395
  * @return int The total favorite count for a specified user
2396
  */
2397
  function bp_get_total_favorite_count_for_user( $user_id = 0 ) {
 
 
 
 
2398
  return apply_filters( 'bp_get_total_favorite_count_for_user', bp_activity_total_favorites_for_user( $user_id ) );
2399
  }
2400
 
@@ -2408,7 +2450,7 @@ function bp_total_favorite_count_for_user( $user_id = 0 ) {
2408
  * @uses bp_get_total_favorite_count_for_user()
2409
  */
2410
  function bp_total_mention_count_for_user( $user_id = 0 ) {
2411
- echo bp_get_total_favorite_count_for_user( $user_id );
2412
  }
2413
 
2414
  /**
@@ -2422,6 +2464,10 @@ function bp_total_mention_count_for_user( $user_id = 0 ) {
2422
  * @return int The total mention count for a specified user
2423
  */
2424
  function bp_get_total_mention_count_for_user( $user_id = 0 ) {
 
 
 
 
2425
  return apply_filters( 'bp_get_total_mention_count_for_user', bp_get_user_meta( $user_id, 'bp_new_mention_count', true ) );
2426
  }
2427
 
@@ -2458,7 +2504,7 @@ function bp_send_public_message_link() {
2458
  if ( bp_is_my_profile() || !is_user_logged_in() )
2459
  return false;
2460
 
2461
- return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/?r=' . bp_core_get_username( bp_displayed_user_id(), bp_get_displayed_user_username(), $bp->displayed_user->userdata->user_login ) ) );
2462
  }
2463
 
2464
  /**
@@ -2757,7 +2803,7 @@ function bp_activities_member_rss_link() { echo bp_get_member_activity_feed_link
2757
  $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed/';
2758
  elseif ( 'favorites' == bp_current_action() )
2759
  $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
2760
- elseif ( 'mentions' == bp_current_action() )
2761
  $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
2762
  else
2763
  $link = '';
150
  'in' => false,
151
  'filter' => false,
152
  'search_terms' => false,
153
+ 'meta_query' => false,
154
  'display_comments' => 'threaded',
155
  'show_hidden' => false,
156
  'spam' => 'ham_only',
173
 
174
  // Fetch all activity items
175
  else
176
+ $this->activities = bp_activity_get( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'meta_query' => $meta_query, 'filter' => $filter, 'show_hidden' => $show_hidden, 'exclude' => $exclude, 'in' => $in, 'spam' => $spam ) );
177
 
178
  if ( !$max || $max >= (int) $this->activities['total'] )
179
  $this->total_activity_count = (int) $this->activities['total'];
362
  'primary_id' => $primary_id, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
363
  'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
364
 
365
+ 'meta_query' => false, // filter on activity meta. See WP_Meta_Query for format
366
+
367
  // Searching
368
  'search_terms' => false // specify terms to search on
369
  );
413
  if ( empty( $favs ) )
414
  return false;
415
 
416
+ $in = implode( ',', (array) $favs );
417
  $display_comments = true;
418
+ $user_id = 0;
419
  break;
420
  case 'mentions':
421
 
422
+ // Are mentions disabled?
423
+ if ( ! bp_activity_do_mentions() ) {
424
+ return false;
425
+ }
426
+
427
  // Start search at @ symbol and stop search at closing tag delimiter.
428
  $search_terms = '@' . bp_core_get_username( $user_id ) . '<';
429
  $display_comments = 'stream';
462
  'in' => $in,
463
  'filter' => $filter,
464
  'search_terms' => $search_terms,
465
+ 'meta_query' => $meta_query,
466
  'display_comments' => $display_comments,
467
  'show_hidden' => $show_hidden,
468
  'spam' => $spam
1083
  case 'groups' :
1084
  $object = 'group';
1085
  $item_id = $activities_template->activity->item_id;
1086
+ $link = '';
1087
+ $name = '';
1088
 
1089
  // Only if groups is active
1090
  if ( bp_is_active( 'groups' ) ) {
1091
  $group = groups_get_group( array( 'group_id' => $item_id ) );
1092
  $link = bp_get_group_permalink( $group );
1093
  $name = $group->name;
 
 
1094
  }
1095
 
1096
  if ( empty( $alt ) ) {
2029
  return apply_filters( 'bp_get_activity_thread_permalink', $link );
2030
  }
2031
 
2032
+ /**
2033
+ * Echoes the activity comment permalink
2034
+ *
2035
+ * @since BuddyPress (1.8)
2036
+ *
2037
+ * @uses bp_get_activity_permalink_id()
2038
+ */
2039
+ function bp_activity_comment_permalink() {
2040
+ echo bp_get_activity_comment_permalink();
2041
+ }
2042
+ /**
2043
+ * Gets the activity comment permalink
2044
+ *
2045
+ * @since BuddyPress (1.8)
2046
+ *
2047
+ * @uses bp_activity_get_permalink()
2048
+ * @uses apply_filters() To call the 'bp_get_activity_comment_permalink' hook
2049
+ *
2050
+ * @return string $link The activity comment permalink
2051
+ */
2052
+ function bp_get_activity_comment_permalink() {
2053
+ global $activities_template;
2054
+
2055
+ $link = bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ) . '#acomment-' . $activities_template->activity->current_comment->id;
2056
+
2057
+ return apply_filters( 'bp_get_activity_comment_permalink', $link );
2058
+ }
2059
+
2060
  /**
2061
  * Echoes the activity favorite link
2062
  *
2433
  * @return int The total favorite count for a specified user
2434
  */
2435
  function bp_get_total_favorite_count_for_user( $user_id = 0 ) {
2436
+ if ( ! $user_id ) {
2437
+ $user_id = bp_displayed_user_id();
2438
+ }
2439
+
2440
  return apply_filters( 'bp_get_total_favorite_count_for_user', bp_activity_total_favorites_for_user( $user_id ) );
2441
  }
2442
 
2450
  * @uses bp_get_total_favorite_count_for_user()
2451
  */
2452
  function bp_total_mention_count_for_user( $user_id = 0 ) {
2453
+ echo bp_get_total_mention_count_for_user( $user_id );
2454
  }
2455
 
2456
  /**
2464
  * @return int The total mention count for a specified user
2465
  */
2466
  function bp_get_total_mention_count_for_user( $user_id = 0 ) {
2467
+ if ( ! $user_id ) {
2468
+ $user_id = bp_displayed_user_id();
2469
+ }
2470
+
2471
  return apply_filters( 'bp_get_total_mention_count_for_user', bp_get_user_meta( $user_id, 'bp_new_mention_count', true ) );
2472
  }
2473
 
2504
  if ( bp_is_my_profile() || !is_user_logged_in() )
2505
  return false;
2506
 
2507
+ return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( bp_get_activity_directory_permalink() . '?r=' . bp_core_get_username( bp_displayed_user_id(), bp_get_displayed_user_username(), $bp->displayed_user->userdata->user_login ) ) );
2508
  }
2509
 
2510
  /**
2803
  $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed/';
2804
  elseif ( 'favorites' == bp_current_action() )
2805
  $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
2806
+ elseif ( 'mentions' == bp_current_action() && bp_activity_do_mentions() )
2807
  $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
2808
  else
2809
  $link = '';
bp-activity/feeds/bp-activity-favorites-feed.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * RSS2 Feed Template for displaying a member's favorite activity
5
- *
6
- * @package BuddyPress
7
- * @subpackage ActivityFeeds
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- header('Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
14
- header('Status: 200 OK');
15
- echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?'.'>'; ?>
16
-
17
- <rss version="2.0"
18
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
19
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
20
- xmlns:dc="http://purl.org/dc/elements/1.1/"
21
- xmlns:atom="http://www.w3.org/2005/Atom"
22
- <?php do_action('bp_activity_favorites_feed'); ?>
23
- >
24
-
25
- <channel>
26
- <?php /* translators: Favorited activity RSS title - "[Site Name] | [Displayed User Name] | Favorite Activity" */ ?>
27
- <title><?php printf( '%1$s | %2$s | %3$s', bp_get_site_name(), bp_get_displayed_user_fullname(), __( 'Favorite Activity', 'buddypress' ) ) ?></title>
28
- <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
29
- <link><?php echo home_url( bp_get_activity_root_slug() . '/#my-favorites/' ) ?></link>
30
- <description><?php printf( __( '%s - Favorite Activity', 'buddypress' ), bp_get_displayed_user_fullname() ) ?></description>
31
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
32
- <generator>http://buddypress.org/?v=<?php echo BP_VERSION ?></generator>
33
- <language><?php bloginfo_rss( 'language' ); ?></language>
34
-
35
- <?php do_action('bp_activity_favorites_feed_head'); ?>
36
-
37
- <?php
38
- $favs = bp_activity_get_user_favorites( bp_displayed_user_id() );
39
- $fav_ids = implode( ',', (array) $favs );
40
- ?>
41
-
42
- <?php if ( bp_has_activities( 'include=' . $fav_ids . '&max=50&display_comments=stream' ) ) : ?>
43
- <?php while ( bp_activities() ) : bp_the_activity(); ?>
44
-
45
- <item>
46
- <guid><?php bp_activity_thread_permalink() ?></guid>
47
- <title><?php bp_activity_feed_item_title() ?></title>
48
- <link><?php echo bp_activity_thread_permalink() ?></link>
49
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?></pubDate>
50
-
51
- <description>
52
- <![CDATA[
53
- <?php bp_activity_feed_item_description() ?>
54
-
55
- <?php if ( bp_activity_can_comment() ) : ?>
56
- <p><?php printf( __( 'Comments: %s', 'buddypress' ), bp_activity_get_comment_count() ); ?></p>
57
- <?php endif; ?>
58
-
59
- <?php if ( 'activity_comment' == bp_get_activity_action_name() ) : ?>
60
- <br /><strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> -
61
- <?php bp_activity_parent_content() ?>
62
- <?php endif; ?>
63
- ]]>
64
- </description>
65
-
66
- <?php do_action('bp_activity_favorites_feed_item'); ?>
67
-
68
- </item>
69
-
70
- <?php endwhile; ?>
71
- <?php endif; ?>
72
-
73
- </channel>
74
- </rss>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-activity/feeds/bp-activity-friends-feed.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * RSS2 Feed Template for displaying a member's friends activity stream.
5
- *
6
- * @package BuddyPress
7
- * @subpackage ActivityFeeds
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
14
- header('Status: 200 OK');
15
- echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
16
-
17
- <rss version="2.0"
18
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
19
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
20
- xmlns:dc="http://purl.org/dc/elements/1.1/"
21
- xmlns:atom="http://www.w3.org/2005/Atom"
22
- <?php do_action('bp_activity_friends_feed'); ?>
23
- >
24
-
25
- <channel>
26
- <?php /* translators: Member friends activity RSS title - "[Site Name] | Friends Activity" */ ?>
27
- <title><?php bp_site_name() ?> | <?php bp_displayed_user_fullname(); ?> | <?php _e( 'Friends Activity', 'buddypress' ); ?></title>
28
- <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
29
- <link><?php echo bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/feed'; ?></link>
30
- <description><?php printf( __( '%s - Friends Activity Feed', 'buddypress' ), bp_get_displayed_user_fullname() ); ?></description>
31
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
32
- <generator>http://buddypress.org/?v=<?php echo BP_VERSION; ?></generator>
33
- <language><?php bloginfo_rss( 'language' ); ?></language>
34
- <?php do_action('bp_activity_friends_feed_head'); ?>
35
-
36
- <?php if ( bp_has_activities( 'scope=friends&max=50&display_comments=stream' ) ) : ?>
37
- <?php while ( bp_activities() ) : bp_the_activity(); ?>
38
- <item>
39
- <guid><?php bp_activity_thread_permalink(); ?></guid>
40
- <title><?php bp_activity_feed_item_title(); ?></title>
41
- <link><?php echo bp_activity_thread_permalink(); ?></link>
42
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?></pubDate>
43
-
44
- <description>
45
- <![CDATA[
46
- <?php bp_activity_feed_item_description(); ?>
47
-
48
- <?php if ( bp_activity_can_comment() ) : ?>
49
- <p><?php printf( __( 'Comments: %s', 'buddypress' ), bp_activity_get_comment_count() ); ?></p>
50
- <?php endif; ?>
51
-
52
- <?php if ( 'activity_comment' == bp_get_activity_action_name() ) : ?>
53
- <br /><strong><?php _e( 'In reply to', 'buddypress' ); ?></strong> -
54
- <?php bp_activity_parent_content(); ?>
55
- <?php endif; ?>
56
- ]]>
57
- </description>
58
- <?php do_action('bp_activity_personal_feed_item'); ?>
59
- </item>
60
- <?php endwhile; ?>
61
-
62
- <?php endif; ?>
63
- </channel>
64
- </rss>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-activity/feeds/bp-activity-group-feed.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * RSS2 Feed Template for displaying a group activity stream
5
- *
6
- * @package BuddyPress
7
- * @subpackage ActivityFeeds
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
14
- header('Status: 200 OK');
15
- echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
16
-
17
- <rss version="2.0"
18
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
19
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
20
- xmlns:dc="http://purl.org/dc/elements/1.1/"
21
- xmlns:atom="http://www.w3.org/2005/Atom"
22
- <?php do_action('bp_activity_group_feed'); ?>
23
- >
24
-
25
- <channel>
26
- <?php /* translators: Single group activity RSS title - "[Site Name] | [Group Name] | Group Activity" */ ?>
27
- <title><?php printf( '%1$s | %2$s | %3$s', bp_get_site_name(), bp_get_current_group_name(), __( 'Group Activity', 'buddypress' ) ) ?></title>
28
- <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
29
- <link><?php echo bp_get_group_permalink( $bp->groups->current_group ) . bp_get_activity_slug() . '/feed' ?></link>
30
- <description><?php printf( __( '%s - Group Activity Feed', 'buddypress' ), $bp->groups->current_group->name ) ?></description>
31
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
32
- <generator>http://buddypress.org/?v=<?php echo BP_VERSION ?></generator>
33
- <language><?php bloginfo_rss( 'language' ); ?></language>
34
- <?php do_action('bp_activity_group_feed_head'); ?>
35
-
36
- <?php if ( bp_has_activities( 'object=' . $bp->groups->id . '&primary_id=' . $bp->groups->current_group->id . '&max=50&display_comments=threaded' ) ) : ?>
37
- <?php while ( bp_activities() ) : bp_the_activity(); ?>
38
- <item>
39
- <guid><?php bp_activity_thread_permalink() ?></guid>
40
- <title><?php bp_activity_feed_item_title() ?></title>
41
- <link><?php echo bp_activity_thread_permalink() ?></link>
42
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?></pubDate>
43
-
44
- <description>
45
- <![CDATA[
46
- <?php bp_activity_feed_item_description() ?>
47
-
48
- <?php if ( bp_activity_can_comment() ) : ?>
49
- <p><?php printf( __( 'Comments: %s', 'buddypress' ), bp_activity_get_comment_count() ); ?></p>
50
- <?php endif; ?>
51
- ]]>
52
- </description>
53
- <?php do_action('bp_activity_group_feed_item'); ?>
54
- </item>
55
- <?php endwhile; ?>
56
-
57
- <?php endif; ?>
58
- </channel>
59
- </rss>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-activity/feeds/bp-activity-mentions-feed.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * RSS2 Feed Template for displaying a member's activity mentions
5
- *
6
- * @package BuddyPress
7
- * @subpackage ActivityFeeds
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
14
- header('Status: 200 OK');
15
- echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
16
-
17
- <rss version="2.0"
18
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
19
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
20
- xmlns:dc="http://purl.org/dc/elements/1.1/"
21
- xmlns:atom="http://www.w3.org/2005/Atom"
22
- <?php do_action('bp_activity_mentions_feed'); ?>
23
- >
24
-
25
- <channel>
26
- <?php /* translators: Mentions RSS title - "[Site Name] | [Displayed User Name] | Mentions" */ ?>
27
- <title><?php printf( '%1$s | %2$s | %3$s', bp_get_site_name(), bp_get_displayed_user_fullname(), __( 'Mentions', 'buddypress' ) ) ?></title>
28
- <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
29
- <link><?php echo home_url( bp_get_activity_root_slug() . '/#mentions/' ) ?></link>
30
- <?php /* translators: Mentions RSS title - "[Site Name] | [Displayed User Name] | Mentions" */ ?>
31
- <description><?php printf( __( '%s - Mentions', 'buddypress' ), bp_get_displayed_user_fullname() ) ?></description>
32
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
33
- <generator>http://buddypress.org/?v=<?php echo BP_VERSION ?></generator>
34
- <language><?php bloginfo_rss( 'language' ); ?></language>
35
- <?php do_action('bp_activity_mentions_feed_head'); ?>
36
-
37
- <?php if ( bp_has_activities( 'max=50&display_comments=stream&search_terms=@' . bp_core_get_username( bp_displayed_user_id() ) ) ) : ?>
38
- <?php while ( bp_activities() ) : bp_the_activity(); ?>
39
- <item>
40
- <guid><?php bp_activity_thread_permalink() ?></guid>
41
- <title><?php bp_activity_feed_item_title() ?></title>
42
- <link><?php echo bp_activity_thread_permalink() ?></link>
43
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?></pubDate>
44
-
45
- <description>
46
- <![CDATA[
47
- <?php bp_activity_feed_item_description() ?>
48
-
49
- <?php if ( bp_activity_can_comment() ) : ?>
50
- <p><?php printf( __( 'Comments: %s', 'buddypress' ), bp_activity_get_comment_count() ); ?></p>
51
- <?php endif; ?>
52
-
53
- <?php if ( 'activity_comment' == bp_get_activity_action_name() ) : ?>
54
- <br /><strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> -
55
- <?php bp_activity_parent_content() ?>
56
- <?php endif; ?>
57
- ]]>
58
- </description>
59
- <?php do_action('bp_activity_mentions_feed_item'); ?>
60
- </item>
61
- <?php endwhile; ?>
62
-
63
- <?php endif; ?>
64
- </channel>
65
- </rss>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-activity/feeds/bp-activity-mygroups-feed.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * RSS2 Feed Template for displaying a member's group's activity
5
- *
6
- * @package BuddyPress
7
- * @subpackage ActivityFeeds
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
14
- header('Status: 200 OK');
15
- echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
16
-
17
- <rss version="2.0"
18
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
19
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
20
- xmlns:dc="http://purl.org/dc/elements/1.1/"
21
- xmlns:atom="http://www.w3.org/2005/Atom"
22
- <?php do_action('bp_activity_mygroups_feed'); ?>
23
- >
24
-
25
- <channel>
26
- <?php /* translators: Member groups activity RSS title - "[Site Name] | [Displayed User Name] | My Groups - Public Activity" */ ?>
27
- <title><?php printf( '%1$s | %2$s | %3$s', bp_get_site_name(), bp_get_displayed_user_fullname(), __( 'My Groups - Public Activity', 'buddypress' ) ) ?></title>
28
- <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
29
- <link><?php echo home_url( bp_get_activity_root_slug() . '/#my-groups/' ) ?></link>
30
- <?php /* translators: Member groups activity RSS description - "[Displayed user name] - My Groups - Public Activity" */ ?>
31
- <description><?php printf( __( '%1$s - My Groups - Public Activity', 'buddypress' ), bp_get_displayed_user_fullname() ) ?></description>
32
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
33
- <generator>http://buddypress.org/?v=<?php echo BP_VERSION ?></generator>
34
- <language><?php bloginfo_rss( 'language' ); ?></language>
35
- <?php do_action('bp_activity_mygroups_feed_head'); ?>
36
-
37
- <?php
38
- $groups = groups_get_user_groups( bp_loggedin_user_id() );
39
- $group_ids = implode( ',', $groups['groups'] );
40
- ?>
41
-
42
- <?php if ( bp_has_activities( 'object=' . $bp->groups->id . '&primary_id=' . $group_ids . '&max=50&display_comments=threaded' ) ) : ?>
43
- <?php while ( bp_activities() ) : bp_the_activity(); ?>
44
- <item>
45
- <guid><?php bp_activity_thread_permalink() ?></guid>
46
- <title><?php bp_activity_feed_item_title() ?></title>
47
- <link><?php echo bp_activity_thread_permalink() ?></link>
48
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?></pubDate>
49
-
50
- <description>
51
- <![CDATA[
52
- <?php bp_activity_feed_item_description() ?>
53
-
54
- <?php if ( bp_activity_can_comment() ) : ?>
55
- <p><?php printf( __( 'Comments: %s', 'buddypress' ), bp_activity_get_comment_count() ); ?></p>
56
- <?php endif; ?>
57
- ]]>
58
- </description>
59
- <?php do_action('bp_activity_mygroups_feed_item'); ?>
60
- </item>
61
- <?php endwhile; ?>
62
-
63
- <?php endif; ?>
64
- </channel>
65
- </rss>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-activity/feeds/bp-activity-personal-feed.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * RSS2 Feed Template for displaying a member's activity stream.
5
- *
6
- * @package BuddyPress
7
- * @subpackage ActivityFeeds
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
14
- header('Status: 200 OK');
15
- echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
16
-
17
- <rss version="2.0"
18
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
19
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
20
- xmlns:dc="http://purl.org/dc/elements/1.1/"
21
- xmlns:atom="http://www.w3.org/2005/Atom"
22
- <?php do_action('bp_activity_personal_feed'); ?>
23
- >
24
-
25
- <channel>
26
- <?php /* translators: Personal activity RSS title - "[Site Name] | [Displayed User Name] | Activity" */ ?>
27
- <title><?php printf( '%1$s | %2$s | %3$s', bp_get_site_name(), bp_get_displayed_user_fullname(), __( 'Activity', 'buddypress' ) ) ?></title>
28
- <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
29
- <link><?php echo bp_displayed_user_domain() . bp_get_activity_slug() . '/feed' ?></link>
30
- <description><?php printf( __( '%s - Activity Feed', 'buddypress' ), bp_get_displayed_user_fullname() ) ?></description>
31
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
32
- <generator>http://buddypress.org/?v=<?php echo BP_VERSION ?></generator>
33
- <language><?php bloginfo_rss( 'language' ); ?></language>
34
- <?php do_action('bp_activity_personal_feed_head'); ?>
35
-
36
- <?php if ( bp_has_activities( 'user_id=' . bp_displayed_user_id() . '&max=50&display_comments=stream' ) ) : ?>
37
- <?php while ( bp_activities() ) : bp_the_activity(); ?>
38
- <item>
39
- <guid><?php bp_activity_thread_permalink() ?></guid>
40
- <title><?php bp_activity_feed_item_title() ?></title>
41
- <link><?php echo bp_activity_thread_permalink() ?></link>
42
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?></pubDate>
43
-
44
- <description>
45
- <![CDATA[
46
- <?php bp_activity_feed_item_description() ?>
47
-
48
- <?php if ( bp_activity_can_comment() ) : ?>
49
- <p><?php printf( __( 'Comments: %s', 'buddypress' ), bp_activity_get_comment_count() ); ?></p>
50
- <?php endif; ?>
51
-
52
- <?php if ( 'activity_comment' == bp_get_activity_action_name() ) : ?>
53
- <br /><strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> -
54
- <?php bp_activity_parent_content() ?>
55
- <?php endif; ?>
56
- ]]>
57
- </description>
58
- <?php do_action('bp_activity_personal_feed_item'); ?>
59
- </item>
60
- <?php endwhile; ?>
61
-
62
- <?php endif; ?>
63
- </channel>
64
- </rss>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-activity/feeds/bp-activity-sitewide-feed.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * RSS2 Feed Template for displaying the site wide activity stream.
5
- *
6
- * @package BuddyPress
7
- * @subpackage ActivityFeeds
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) ) exit;
12
-
13
- header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
14
- header('Status: 200 OK');
15
- echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
16
-
17
- <rss version="2.0"
18
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
19
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
20
- xmlns:dc="http://purl.org/dc/elements/1.1/"
21
- xmlns:atom="http://www.w3.org/2005/Atom"
22
- <?php do_action('bp_activity_sitewide_feed'); ?>
23
- >
24
-
25
- <channel>
26
- <?php /* translators: Sitewide activity RSS title - "[Site Name] | Site Wide Activity" */ ?>
27
- <title><?php printf( '%1$s | %2$s', bp_get_site_name(), __( 'Site Wide Activity', 'buddypress' ) ) ?></title>
28
- <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
29
- <link><?php echo bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/feed' ?></link>
30
- <description><?php _e( 'Site Wide Activity Feed', 'buddypress' ) ?></description>
31
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
32
- <generator>http://buddypress.org/?v=<?php echo BP_VERSION ?></generator>
33
- <language><?php bloginfo_rss( 'language' ); ?></language>
34
- <?php do_action('bp_activity_sitewide_feed_head'); ?>
35
-
36
- <?php if ( bp_has_activities( 'type=sitewide&max=50&display_comments=threaded' ) ) : ?>
37
- <?php while ( bp_activities() ) : bp_the_activity(); ?>
38
- <item>
39
- <guid><?php bp_activity_thread_permalink() ?></guid>
40
- <title><?php bp_activity_feed_item_title() ?></title>
41
- <link><?php bp_activity_thread_permalink() ?></link>
42
- <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?></pubDate>
43
-
44
- <description>
45
- <![CDATA[
46
- <?php bp_activity_feed_item_description() ?>
47
-
48
- <?php if ( bp_activity_can_comment() ) : ?>
49
- <p><?php printf( __( 'Comments: %s', 'buddypress' ), bp_activity_get_comment_count() ); ?></p>
50
- <?php endif; ?>
51
- ]]>
52
- </description>
53
- <?php do_action('bp_activity_personal_feed_item'); ?>
54
- </item>
55
- <?php endwhile; ?>
56
-
57
- <?php endif; ?>
58
- </channel>
59
- </rss>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-blogs/bp-blogs-actions.php CHANGED
@@ -26,7 +26,7 @@ function bp_blogs_redirect_to_random_blog() {
26
  // Multisite is active so find a random blog
27
  if ( is_multisite() ) {
28
  $blog = bp_blogs_get_random_blogs( 1, 1 );
29
- bp_core_redirect( get_site_url( $blog['blogs'][0]->blog_id ) );
30
 
31
  // No multisite and still called, always redirect to root
32
  } else {
26
  // Multisite is active so find a random blog
27
  if ( is_multisite() ) {
28
  $blog = bp_blogs_get_random_blogs( 1, 1 );
29
+ bp_core_redirect( get_home_url( $blog['blogs'][0]->blog_id ) );
30
 
31
  // No multisite and still called, always redirect to root
32
  } else {
bp-blogs/bp-blogs-functions.php CHANGED
@@ -49,21 +49,21 @@ function bp_blogs_record_existing_blogs() {
49
  $wpdb->query( "TRUNCATE TABLE {$bp->blogs->table_name}" );
50
 
51
  if ( is_multisite() ) {
52
- $blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0 AND site_id = %d" ), $wpdb->siteid );
53
  } else {
54
  $blog_ids = 1;
55
  }
56
 
57
  if ( !empty( $blog_ids ) ) {
58
  foreach( (array) $blog_ids as $blog_id ) {
59
- $users = get_users( array( 'blog_id' => $blog_id ) );
60
- $subscribers = get_users( array( 'blog_id' => $blog_id, 'role' => 'subscriber' ) );
61
 
62
  if ( !empty( $users ) ) {
63
  foreach ( (array) $users as $user ) {
64
  // Don't record blogs for subscribers
65
  if ( !in_array( $user, $subscribers ) ) {
66
- bp_blogs_record_blog( $blog_id, $user->ID, true );
67
  }
68
  }
69
  }
@@ -76,7 +76,7 @@ function bp_blogs_record_existing_blogs() {
76
  *
77
  * If $user_id is provided, you can restrict site from being recordable
78
  * only to particular users.
79
- *
80
  * @since BuddyPress (1.7)
81
  * @param int $blog_id
82
  * @param int|null $user_id
@@ -104,7 +104,7 @@ function bp_blogs_is_blog_recordable( $blog_id, $user_id = 0 ) {
104
  * Makes BuddyPress aware of sites that activities shouldn't be trackable.
105
  * If $user_id is provided, the developer can restrict site from
106
  * being trackable only to particular users.
107
- *
108
  * @since BuddyPress (1.7)
109
  * @param int $blog_id
110
  * @param int|null $user_id
@@ -172,8 +172,8 @@ function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) {
172
  // Record this in activity streams
173
  bp_blogs_record_activity( array(
174
  'user_id' => $recorded_blog->user_id,
175
- 'action' => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the site %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_site_url( $recorded_blog->blog_id ) . '">' . esc_attr( $name ) . '</a>' ), $recorded_blog, $name, $description ),
176
- 'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_site_url( $recorded_blog->blog_id ), $recorded_blog->blog_id ),
177
  'type' => 'new_blog',
178
  'item_id' => $recorded_blog->blog_id
179
  ) );
@@ -257,7 +257,6 @@ function bp_blogs_record_post( $post_id, $post, $user_id = 0 ) {
257
  if ( bp_is_active( 'activity' ) ) {
258
  $existing = bp_activity_get( array(
259
  'filter' => array(
260
- 'user_id' => (int) $post->post_author,
261
  'action' => 'new_blog_post',
262
  'primary_id' => $blog_id,
263
  'secondary_id' => $post_id,
49
  $wpdb->query( "TRUNCATE TABLE {$bp->blogs->table_name}" );
50
 
51
  if ( is_multisite() ) {
52
+ $blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0 AND site_id = %d", $wpdb->siteid ) );
53
  } else {
54
  $blog_ids = 1;
55
  }
56
 
57
  if ( !empty( $blog_ids ) ) {
58
  foreach( (array) $blog_ids as $blog_id ) {
59
+ $users = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ID' ) );
60
+ $subscribers = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ID', 'role' => 'subscriber' ) );
61
 
62
  if ( !empty( $users ) ) {
63
  foreach ( (array) $users as $user ) {
64
  // Don't record blogs for subscribers
65
  if ( !in_array( $user, $subscribers ) ) {
66
+ bp_blogs_record_blog( $blog_id, $user, true );
67
  }
68
  }
69
  }
76
  *
77
  * If $user_id is provided, you can restrict site from being recordable
78
  * only to particular users.
79
+ *
80
  * @since BuddyPress (1.7)
81
  * @param int $blog_id
82
  * @param int|null $user_id
104
  * Makes BuddyPress aware of sites that activities shouldn't be trackable.
105
  * If $user_id is provided, the developer can restrict site from
106
  * being trackable only to particular users.
107
+ *
108
  * @since BuddyPress (1.7)
109
  * @param int $blog_id
110
  * @param int|null $user_id
172
  // Record this in activity streams
173
  bp_blogs_record_activity( array(
174
  'user_id' => $recorded_blog->user_id,
175
+ 'action' => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the site %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_home_url( $recorded_blog->blog_id ) . '">' . esc_attr( $name ) . '</a>' ), $recorded_blog, $name, $description ),
176
+ 'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_home_url( $recorded_blog->blog_id ), $recorded_blog->blog_id ),
177
  'type' => 'new_blog',
178
  'item_id' => $recorded_blog->blog_id
179
  ) );
257
  if ( bp_is_active( 'activity' ) ) {
258
  $existing = bp_activity_get( array(
259
  'filter' => array(
 
260
  'action' => 'new_blog_post',
261
  'primary_id' => $blog_id,
262
  'secondary_id' => $post_id,
bp-blogs/bp-blogs-loader.php CHANGED
@@ -180,6 +180,15 @@ class BP_Blogs_Component extends BP_Component {
180
  'href' => trailingslashit( $blogs_link )
181
  );
182
 
 
 
 
 
 
 
 
 
 
183
  }
184
 
185
  parent::setup_admin_bar( $wp_admin_nav );
180
  'href' => trailingslashit( $blogs_link )
181
  );
182
 
183
+ // Create a Blog
184
+ if ( bp_blog_signup_enabled() ) {
185
+ $wp_admin_nav[] = array(
186
+ 'parent' => 'my-account-' . $this->id,
187
+ 'id' => 'my-account-' . $this->id . '-create',
188
+ 'title' => __( 'Create a Blog', 'buddypress' ),
189
+ 'href' => trailingslashit( bp_get_blogs_directory_permalink() . 'create' )
190
+ );
191
+ }
192
  }
193
 
194
  parent::setup_admin_bar( $wp_admin_nav );
bp-blogs/bp-blogs-screens.php CHANGED
@@ -86,11 +86,13 @@ class BP_Blogs_Theme_Compat {
86
 
87
  do_action( 'bp_blogs_screen_index' );
88
 
 
89
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
90
  add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
91
 
92
  // Create blog
93
  } elseif ( is_user_logged_in() && bp_blog_signup_enabled() ) {
 
94
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) );
95
  add_filter( 'bp_replace_the_content', array( $this, 'create_content' ) );
96
  }
@@ -98,6 +100,29 @@ class BP_Blogs_Theme_Compat {
98
 
99
  /** Directory *************************************************************/
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  /**
102
  * Update the global $post with directory data
103
  *
@@ -136,6 +161,29 @@ class BP_Blogs_Theme_Compat {
136
 
137
  /** Create ****************************************************************/
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  /**
140
  * Update the global $post with create screen data
141
  *
86
 
87
  do_action( 'bp_blogs_screen_index' );
88
 
89
+ add_filter( 'bp_get_buddypress_template', array( $this, 'directory_template_hierarchy' ) );
90
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
91
  add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
92
 
93
  // Create blog
94
  } elseif ( is_user_logged_in() && bp_blog_signup_enabled() ) {
95
+ add_filter( 'bp_get_buddypress_template', array( $this, 'create_template_hierarchy' ) );
96
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) );
97
  add_filter( 'bp_replace_the_content', array( $this, 'create_content' ) );
98
  }
100
 
101
  /** Directory *************************************************************/
102
 
103
+ /**
104
+ * Add template hierarchy to theme compat for the blog directory page.
105
+ *
106
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
107
+ *
108
+ * @since BuddyPress (1.8)
109
+ *
110
+ * @param string $templates The templates from bp_get_theme_compat_templates()
111
+ * @return array $templates Array of custom templates to look for.
112
+ */
113
+ public function directory_template_hierarchy( $templates ) {
114
+ // Setup our templates based on priority
115
+ $new_templates = apply_filters( 'bp_template_hierarchy_blogs_create', array(
116
+ 'blogs/index-directory.php'
117
+ ) );
118
+
119
+ // Merge new templates with existing stack
120
+ // @see bp_get_theme_compat_templates()
121
+ $templates = array_merge( (array) $new_templates, $templates );
122
+
123
+ return $templates;
124
+ }
125
+
126
  /**
127
  * Update the global $post with directory data
128
  *
161
 
162
  /** Create ****************************************************************/
163
 
164
+ /**
165
+ * Add custom template hierarchy to theme compat for the blog create page.
166
+ *
167
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
168
+ *
169
+ * @since BuddyPress (1.8)
170
+ *
171
+ * @param string $templates The templates from bp_get_theme_compat_templates()
172
+ * @return array $templates Array of custom templates to look for.
173
+ */
174
+ public function create_template_hierarchy( $templates ) {
175
+ // Setup our templates based on priority
176
+ $new_templates = apply_filters( 'bp_template_hierarchy_blogs_create', array(
177
+ 'blogs/index-create.php'
178
+ ) );
179
+
180
+ // Merge new templates with existing stack
181
+ // @see bp_get_theme_compat_templates()
182
+ $templates = array_merge( (array) $new_templates, $templates );
183
+
184
+ return $templates;
185
+ }
186
+
187
  /**
188
  * Update the global $post with create screen data
189
  *
bp-blogs/bp-blogs-widgets.php CHANGED
@@ -19,18 +19,29 @@ function bp_blogs_register_widgets() {
19
  }
20
  add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' );
21
 
 
 
 
22
  class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
23
 
24
  function __construct() {
25
- parent::__construct( false, $name = _x( '(BuddyPress) Recent Networkwide Posts', 'widget name', 'buddypress' ) );
 
 
 
 
26
  }
27
 
28
- function widget($args, $instance) {
 
 
29
 
30
- extract( $args );
 
 
31
 
32
- echo $before_widget;
33
- echo $before_title . $widget_name . $after_title;
34
 
35
  if ( empty( $instance['max_posts'] ) || !$instance['max_posts'] )
36
  $instance['max_posts'] = 10; ?>
@@ -68,23 +79,35 @@ class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
68
  </div>
69
  <?php endif; ?>
70
 
71
- <?php echo $after_widget; ?>
72
  <?php
73
  }
74
 
75
  function update( $new_instance, $old_instance ) {
76
  $instance = $old_instance;
 
77
  $instance['max_posts'] = strip_tags( $new_instance['max_posts'] );
 
78
 
79
  return $instance;
80
  }
81
 
82
  function form( $instance ) {
83
- $instance = wp_parse_args( (array) $instance, array( 'max_posts' => 10 ) );
 
 
 
 
 
 
84
  $max_posts = strip_tags( $instance['max_posts'] );
 
 
85
  ?>
86
 
87
- <p><label for="bp-blogs-widget-posts-max"><?php _e('Max posts to show:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_posts' ); ?>" name="<?php echo $this->get_field_name( 'max_posts' ); ?>" type="text" value="<?php echo esc_attr( $max_posts ); ?>" style="width: 30%" /></label></p>
88
- <?php
 
 
89
  }
90
  }
19
  }
20
  add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' );
21
 
22
+ /**
23
+ * The Recent Networkwide Posts widget
24
+ */
25
  class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
26
 
27
  function __construct() {
28
+ $widget_ops = array(
29
+ 'description' => __( 'A list of recently published posts from across your network.', 'buddypress' ),
30
+ 'classname' => 'widget_bp_blogs_widget buddypress widget',
31
+ );
32
+ parent::__construct( false, $name = _x( '(BuddyPress) Recent Networkwide Posts', 'widget name', 'buddypress' ), $widget_ops );
33
  }
34
 
35
+ function widget( $args, $instance ) {
36
+
37
+ $title = ! empty( $instance['title'] ) ? esc_html( $instance['title'] ) : __( 'Recent Networkwide Posts', 'buddypress' );
38
 
39
+ if ( ! empty( $instance['link_title'] ) ) {
40
+ $title = '<a href="' . trailingslashit( bp_get_root_domain() ) . trailingslashit( bp_get_blogs_root_slug() ) . '">' . esc_html( $title ) . '</a>';
41
+ }
42
 
43
+ echo $args['before_widget'];
44
+ echo $args['before_title'] . $title . $args['after_title'];
45
 
46
  if ( empty( $instance['max_posts'] ) || !$instance['max_posts'] )
47
  $instance['max_posts'] = 10; ?>
79
  </div>
80
  <?php endif; ?>
81
 
82
+ <?php echo $args['after_widget']; ?>
83
  <?php
84
  }
85
 
86
  function update( $new_instance, $old_instance ) {
87
  $instance = $old_instance;
88
+ $instance['title'] = strip_tags( $new_instance['title'] );
89
  $instance['max_posts'] = strip_tags( $new_instance['max_posts'] );
90
+ $instance['link_title'] = (bool) $new_instance['link_title'];
91
 
92
  return $instance;
93
  }
94
 
95
  function form( $instance ) {
96
+ $instance = wp_parse_args( (array) $instance, array(
97
+ 'title' => __( 'Recent Networkwide Posts', 'buddypress' ),
98
+ 'max_posts' => 10,
99
+ 'link_title' => false,
100
+ ) );
101
+
102
+ $title = strip_tags( $instance['title'] );
103
  $max_posts = strip_tags( $instance['max_posts'] );
104
+ $link_title = (bool) $instance['link_title'];
105
+
106
  ?>
107
 
108
+ <p><label for="<?php echo $this->get_field_id( 'title' ) ?>"><?php _ex( 'Title:', 'Label for the Title field of the Recent Networkwide Posts widget', 'buddypress' ) ?> <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( $title ) ?>" style="width: 100%;" /></label></p>
109
+ <p><label for="<?php echo $this->get_field_id( 'link_title' ) ?>"><input type="checkbox" name="<?php echo $this->get_field_name( 'link_title' ) ?>" value="1" <?php checked( $link_title ) ?> /> <?php _e( 'Link widget title to Blogs directory', 'buddypress' ) ?></label></p>
110
+ <p><label for="<?php echo $this->get_field_id( 'max_posts' ) ?>"><?php _e( 'Max posts to show:', 'buddypress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_posts' ); ?>" name="<?php echo $this->get_field_name( 'max_posts' ); ?>" type="text" value="<?php echo esc_attr( $max_posts ); ?>" style="width: 30%" /></label></p>
111
+ <?php
112
  }
113
  }
bp-core/admin/bp-core-functions.php CHANGED
@@ -365,6 +365,18 @@ function bp_core_admin_tabs( $active_tab = '' ) {
365
  )
366
  );
367
 
 
 
 
 
 
 
 
 
 
 
 
 
368
  // Loop through tabs and build navigation
369
  foreach ( array_values( $tabs ) as $tab_data ) {
370
  $is_current = (bool) ( $tab_data['name'] == $active_tab );
365
  )
366
  );
367
 
368
+ // If forums component is active, add additional tab
369
+ if ( bp_is_active( 'forums' ) && class_exists( 'BP_Forums_Component' ) ) {
370
+ // enqueue thickbox
371
+ wp_enqueue_script( 'thickbox' );
372
+ wp_enqueue_style( 'thickbox' );
373
+
374
+ $tabs['3'] = array(
375
+ 'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bb-forums-setup' ), 'admin.php' ) ),
376
+ 'name' => __( 'Forums', 'buddypress' )
377
+ );
378
+ }
379
+
380
  // Loop through tabs and build navigation
381
  foreach ( array_values( $tabs ) as $tab_data ) {
382
  $is_current = (bool) ( $tab_data['name'] == $active_tab );
bp-core/bp-core-actions.php CHANGED
@@ -41,6 +41,7 @@ add_action( 'wp_enqueue_scripts', 'bp_enqueue_scripts', 10 );
41
  add_action( 'admin_bar_menu', 'bp_setup_admin_bar', 20 ); // After WP core
42
  add_action( 'template_redirect', 'bp_template_redirect', 10 );
43
  add_action( 'widgets_init', 'bp_widgets_init', 10 );
 
44
 
45
  /**
46
  * bp_loaded - Attached to 'plugins_loaded' above
@@ -67,6 +68,7 @@ add_action( 'bp_init', 'bp_setup_globals', 4 );
67
  add_action( 'bp_init', 'bp_setup_nav', 6 );
68
  add_action( 'bp_init', 'bp_setup_title', 8 );
69
  add_action( 'bp_init', 'bp_core_load_admin_bar_css', 12 );
 
70
 
71
  /**
72
  * bp_template_redirect - Attached to 'template_redirect' above
41
  add_action( 'admin_bar_menu', 'bp_setup_admin_bar', 20 ); // After WP core
42
  add_action( 'template_redirect', 'bp_template_redirect', 10 );
43
  add_action( 'widgets_init', 'bp_widgets_init', 10 );
44
+ add_action( 'generate_rewrite_rules', 'bp_generate_rewrite_rules', 10 );
45
 
46
  /**
47
  * bp_loaded - Attached to 'plugins_loaded' above
68
  add_action( 'bp_init', 'bp_setup_nav', 6 );
69
  add_action( 'bp_init', 'bp_setup_title', 8 );
70
  add_action( 'bp_init', 'bp_core_load_admin_bar_css', 12 );
71
+ add_action( 'bp_init', 'bp_add_rewrite_tags', 20 );
72
 
73
  /**
74
  * bp_template_redirect - Attached to 'template_redirect' above
bp-core/bp-core-admin.php CHANGED
@@ -422,7 +422,7 @@ class BP_Admin {
422
 
423
  <div class="feature-section">
424
  <h4><?php _e( 'It Just Works', 'buddypress' ); ?></h4>
425
- <p><?php _e( 'BuddyPress is now compatible with <strong>any WordPress theme</strong>. If your theme has BuddyPress-specific templates and styling, we&#8217;ll use them. If not, we provide what you need to make your BuddyPress content look great. Still want to customize? No problem - you can override our templates just like you would in a WordPress child theme. <a href="http://codex.buddypress.org/theme-compatibility/">Learn more about theme compatibility</a>.', 'buddypress' ); ?></p>
426
  </div>
427
  </div>
428
 
@@ -489,9 +489,9 @@ class BP_Admin {
489
  list( $display_version ) = explode( '-', bp_get_version() ); ?>
490
 
491
  <div class="wrap about-wrap">
492
- <h1><?php printf( __( 'Welcome to BuddyPress %s' ), $display_version ); ?></h1>
493
- <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! BuddyPress %s is ready to make your community a safer, faster, and better looking place to hang out!' ), $display_version ); ?></div>
494
- <div class="bp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
495
 
496
  <h2 class="nav-tab-wrapper">
497
  <a href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-about' ), 'index.php' ) ) ); ?>" class="nav-tab">
422
 
423
  <div class="feature-section">
424
  <h4><?php _e( 'It Just Works', 'buddypress' ); ?></h4>
425
+ <p><?php _e( 'BuddyPress is now compatible with <strong>any WordPress theme</strong>. If your theme has BuddyPress-specific templates and styling, we&#8217;ll use them. If not, we provide what you need to make your BuddyPress content look great. Still want to customize? No problem - you can override our templates just like you would in a WordPress child theme. <a href="http://codex.buddypress.org/developer-and-designer-information/">Learn more about theme compatibility</a>.', 'buddypress' ); ?></p>
426
  </div>
427
  </div>
428
 
489
  list( $display_version ) = explode( '-', bp_get_version() ); ?>
490
 
491
  <div class="wrap about-wrap">
492
+ <h1><?php printf( __( 'Welcome to BuddyPress %s', 'buddypress' ), $display_version ); ?></h1>
493
+ <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! BuddyPress %s is ready to make your community a safer, faster, and better looking place to hang out!', 'buddypress' ), $display_version ); ?></div>
494
+ <div class="bp-badge"><?php printf( __( 'Version %s', 'buddypress' ), $display_version ); ?></div>
495
 
496
  <h2 class="nav-tab-wrapper">
497
  <a href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-about' ), 'index.php' ) ) ); ?>" class="nav-tab">
bp-core/bp-core-adminbar.php CHANGED
@@ -62,6 +62,7 @@ add_action( 'admin_bar_menu', 'bp_admin_bar_my_account_root', 100 );
62
  * @uses add_action() To hook 'bp_core_admin_bar' to 'admin_footer'
63
  */
64
  function bp_core_load_admin_bar() {
 
65
  // Show the Toolbar for logged out users
66
  if ( ! is_user_logged_in() && (int) bp_get_option( 'hide-loggedout-adminbar' ) != 1 ) {
67
  show_admin_bar( true );
62
  * @uses add_action() To hook 'bp_core_admin_bar' to 'admin_footer'
63
  */
64
  function bp_core_load_admin_bar() {
65
+
66
  // Show the Toolbar for logged out users
67
  if ( ! is_user_logged_in() && (int) bp_get_option( 'hide-loggedout-adminbar' ) != 1 ) {
68
  show_admin_bar( true );
bp-core/bp-core-avatars.php CHANGED
@@ -338,7 +338,7 @@ function bp_core_fetch_avatar( $args = '' ) {
338
 
339
  // ...or only the URL
340
  } else {
341
- return apply_filters( 'bp_core_fetch_avatar_url', $avatar_url );
342
  }
343
  }
344
  }
@@ -399,7 +399,7 @@ function bp_core_fetch_avatar( $args = '' ) {
399
  if ( true === $html ) {
400
  return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $html_alt . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
401
  } else {
402
- return apply_filters( 'bp_core_fetch_avatar_url', $gravatar );
403
  }
404
  }
405
 
@@ -783,49 +783,107 @@ function bp_core_check_avatar_type($file) {
783
  }
784
 
785
  /**
786
- * bp_core_avatar_upload_path()
787
  *
788
- * Returns the absolute upload path for the WP installation
 
789
  *
790
- * @uses wp_upload_dir To get upload directory info
791
- * @return string Absolute path to WP upload directory
 
 
 
 
 
 
 
 
792
  */
793
- function bp_core_avatar_upload_path() {
794
  $bp = buddypress();
795
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
796
  // See if the value has already been calculated and stashed in the $bp global
797
- if ( isset( $bp->avatar->upload_path ) ) {
798
- $basedir = $bp->avatar->upload_path;
799
  } else {
800
  // If this value has been set in a constant, just use that
801
- if ( defined( 'BP_AVATAR_UPLOAD_PATH' ) ) {
802
- $basedir = BP_AVATAR_UPLOAD_PATH;
803
  } else {
804
- if ( !bp_is_root_blog() ) {
805
- // Switch dynamically in order to support BP_ENABLE_MULTIBLOG
806
- switch_to_blog( bp_get_root_blog_id() );
807
- }
808
 
809
- // Get upload directory information from current site
810
- $upload_dir = wp_upload_dir();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
811
 
812
  // Directory does not exist and cannot be created
813
- if ( !empty( $upload_dir['error'] ) ) {
814
- $basedir = '';
815
 
816
  } else {
817
- $basedir = $upload_dir['basedir'];
 
 
 
 
 
 
818
  }
819
 
820
- // Will bail if not switched
821
- restore_current_blog();
822
  }
823
 
824
  // Stash in $bp for later use
825
- $bp->avatar->upload_path = $basedir;
826
  }
827
 
828
- return apply_filters( 'bp_core_avatar_upload_path', $basedir );
 
 
 
 
 
 
 
 
 
 
 
 
829
  }
830
 
831
  /**
@@ -837,47 +895,7 @@ function bp_core_avatar_upload_path() {
837
  * @return string Full URL to current upload location
838
  */
839
  function bp_core_avatar_url() {
840
- $bp = buddypress();
841
-
842
- // See if the value has already been calculated and stashed in the $bp global
843
- if ( isset( $bp->avatar->url ) ) {
844
- $baseurl = $bp->avatar->url;
845
-
846
- } else {
847
- // If this value has been set in a constant, just use that
848
- if ( defined( 'BP_AVATAR_URL' ) ) {
849
- $baseurl = BP_AVATAR_URL;
850
- } else {
851
- // If multisite, and we're not on the BP root blog, switch to it
852
- if ( is_multisite() ) {
853
- switch_to_blog( bp_get_root_blog_id() );
854
- }
855
-
856
- // Get upload directory information from current site
857
- $upload_dir = wp_upload_dir();
858
-
859
- // Directory does not exist and cannot be created
860
- if ( ! empty( $upload_dir['error'] ) ) {
861
- $baseurl = '';
862
-
863
- } else {
864
- $baseurl = $upload_dir['baseurl'];
865
-
866
- // If we're using https, update the protocol. Workaround for WP13941, WP15928, WP19037.
867
- if ( is_ssl() )
868
- $baseurl = str_replace( 'http://', 'https://', $baseurl );
869
-
870
- }
871
-
872
- // Will bail if not switched
873
- restore_current_blog();
874
- }
875
-
876
- // Stash in $bp for later use
877
- $bp->avatar->url = $baseurl;
878
- }
879
-
880
- return apply_filters( 'bp_core_avatar_url', $baseurl );
881
  }
882
 
883
  /**
338
 
339
  // ...or only the URL
340
  } else {
341
+ return apply_filters( 'bp_core_fetch_avatar_url', $avatar_url, $params );
342
  }
343
  }
344
  }
399
  if ( true === $html ) {
400
  return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $html_alt . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
401
  } else {
402
+ return apply_filters( 'bp_core_fetch_avatar_url', $gravatar, $params );
403
  }
404
  }
405
 
783
  }
784
 
785
  /**
786
+ * Fetches data from the BP root blog's upload directory.
787
  *
788
+ * Handy for multisite instances because all uploads are made on the BP root
789
+ * blog and we need to query the BP root blog for the upload directory data.
790
  *
791
+ * This function ensures that we only need to use {@link switch_to_blog()}
792
+ * once to get what we need.
793
+ *
794
+ * @since BuddyPress (1.8)
795
+ *
796
+ * @uses wp_upload_dir()
797
+ *
798
+ * @param string $type The variable we want to return from the $bp->avatars object.
799
+ * Only 'upload_path' and 'url' are supported.
800
+ * @return string
801
  */
802
+ function bp_core_get_upload_dir( $type = 'upload_path' ) {
803
  $bp = buddypress();
804
 
805
+ switch ( $type ) {
806
+ case 'upload_path' :
807
+ $constant = 'BP_AVATAR_UPLOAD_PATH';
808
+ $key = 'basedir';
809
+
810
+ break;
811
+
812
+ case 'url' :
813
+ $constant = 'BP_AVATAR_URL';
814
+ $key = 'baseurl';
815
+
816
+ break;
817
+
818
+ default :
819
+ return false;
820
+
821
+ break;
822
+ }
823
+
824
  // See if the value has already been calculated and stashed in the $bp global
825
+ if ( isset( $bp->avatar->$type ) ) {
826
+ $retval = $bp->avatar->$type;
827
  } else {
828
  // If this value has been set in a constant, just use that
829
+ if ( defined( $constant ) ) {
830
+ $retval = constant( $constant );
831
  } else {
 
 
 
 
832
 
833
+ // Use cached upload dir data if available
834
+ if ( ! empty( $bp->avatar->upload_dir ) ) {
835
+ $upload_dir = $bp->avatar->upload_dir;
836
+
837
+ // No cache, so query for it
838
+ } else {
839
+ // We need to switch to the root blog on multisite installs
840
+ if ( is_multisite() ) {
841
+ switch_to_blog( bp_get_root_blog_id() );
842
+ }
843
+
844
+ // Get upload directory information from current site
845
+ $upload_dir = wp_upload_dir();
846
+
847
+ // Will bail if not switched
848
+ restore_current_blog();
849
+
850
+ // Stash upload directory data for later use
851
+ $bp->avatar->upload_dir = $upload_dir;
852
+ }
853
 
854
  // Directory does not exist and cannot be created
855
+ if ( ! empty( $upload_dir['error'] ) ) {
856
+ $retval = '';
857
 
858
  } else {
859
+ $retval = $upload_dir[$key];
860
+
861
+ // If $key is 'baseurl', check to see if we're on SSL
862
+ // Workaround for WP13941, WP15928, WP19037.
863
+ if ( $key == 'baseurl' && is_ssl() ) {
864
+ $retval = str_replace( 'http://', 'https://', $retval );
865
+ }
866
  }
867
 
 
 
868
  }
869
 
870
  // Stash in $bp for later use
871
+ $bp->avatar->$type = $retval;
872
  }
873
 
874
+ return $retval;
875
+ }
876
+
877
+ /**
878
+ * bp_core_avatar_upload_path()
879
+ *
880
+ * Returns the absolute upload path for the WP installation
881
+ *
882
+ * @uses wp_upload_dir To get upload directory info
883
+ * @return string Absolute path to WP upload directory
884
+ */
885
+ function bp_core_avatar_upload_path() {
886
+ return apply_filters( 'bp_core_avatar_upload_path', bp_core_get_upload_dir() );
887
  }
888
 
889
  /**
895
  * @return string Full URL to current upload location
896
  */
897
  function bp_core_avatar_url() {
898
+ return apply_filters( 'bp_core_avatar_url', bp_core_get_upload_dir( 'url' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
899
  }
900
 
901
  /**
bp-core/bp-core-buddybar.php CHANGED
@@ -81,8 +81,11 @@ function bp_core_new_nav_item( $args = '' ) {
81
  if ( !empty( $default_subnav_slug ) && bp_is_current_action( $default_subnav_slug ) && !bp_action_variable( 0 ) ) {
82
  unset( $bp->canonical_stack['action'] );
83
  } elseif ( ! bp_current_action() ) {
84
- $func = is_object( $screen_function[0] ) ? array( &$screen_function[0], $screen_function[1] ) : $screen_function;
85
- add_action( 'bp_screens', $func, 3 );
 
 
 
86
 
87
  if ( !empty( $default_subnav_slug ) ) {
88
  $bp->current_action = apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r );
@@ -112,9 +115,8 @@ function bp_core_new_nav_default( $args = '' ) {
112
  extract( $r, EXTR_SKIP );
113
 
114
  if ( $function = $bp->bp_nav[$parent_slug]['screen_function'] ) {
115
- if ( is_object( $function[0] ) ) {
116
- remove_action( 'bp_screens', array( &$function[0], $function[1] ), 3 );
117
- } else {
118
  remove_action( 'bp_screens', $function, 3 );
119
  }
120
  }
@@ -136,9 +138,7 @@ function bp_core_new_nav_default( $args = '' ) {
136
  // No subnav item has been requested in the URL, so set a new nav default
137
  if ( empty( $unfiltered_action ) ) {
138
  if ( !bp_is_current_action( $subnav_slug ) ) {
139
- if ( is_object( $screen_function[0] ) ) {
140
- add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 );
141
- } else {
142
  add_action( 'bp_screens', $screen_function, 3 );
143
  }
144
 
@@ -278,9 +278,8 @@ function bp_core_new_subnav_item( $args = '' ) {
278
 
279
  // Before hooking the screen function, check user access
280
  if ( !empty( $user_has_access ) ) {
281
- if ( is_object( $screen_function[0] ) ) {
282
- add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 );
283
- } else {
284
  add_action( 'bp_screens', $screen_function, 3 );
285
  }
286
  } else {
@@ -390,9 +389,8 @@ function bp_core_remove_nav_item( $parent_id ) {
390
  return false;
391
 
392
  if ( $function = $bp->bp_nav[$parent_id]['screen_function'] ) {
393
- if ( is_object( $function[0] ) ) {
394
- remove_action( 'bp_screens', array( &$function[0], $function[1] ), 3 );
395
- } else {
396
  remove_action( 'bp_screens', $function, 3 );
397
  }
398
  }
@@ -412,10 +410,9 @@ function bp_core_remove_subnav_item( $parent_id, $slug ) {
412
 
413
  $screen_function = isset( $bp->bp_options_nav[$parent_id][$slug]['screen_function'] ) ? $bp->bp_options_nav[$parent_id][$slug]['screen_function'] : false;
414
 
415
- if ( !empty( $screen_function ) ) {
416
- if ( is_object( $screen_function[0] ) ) {
417
- remove_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 );
418
- } else {
419
  remove_action( 'bp_screens', $screen_function, 3 );
420
  }
421
  }
81
  if ( !empty( $default_subnav_slug ) && bp_is_current_action( $default_subnav_slug ) && !bp_action_variable( 0 ) ) {
82
  unset( $bp->canonical_stack['action'] );
83
  } elseif ( ! bp_current_action() ) {
84
+
85
+ // Add our screen hook if screen function is callable
86
+ if ( is_callable( $screen_function ) ) {
87
+ add_action( 'bp_screens', $screen_function, 3 );
88
+ }
89
 
90
  if ( !empty( $default_subnav_slug ) ) {
91
  $bp->current_action = apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r );
115
  extract( $r, EXTR_SKIP );
116
 
117
  if ( $function = $bp->bp_nav[$parent_slug]['screen_function'] ) {
118
+ // Remove our screen hook if screen function is callable
119
+ if ( is_callable( $function ) ) {
 
120
  remove_action( 'bp_screens', $function, 3 );
121
  }
122
  }
138
  // No subnav item has been requested in the URL, so set a new nav default
139
  if ( empty( $unfiltered_action ) ) {
140
  if ( !bp_is_current_action( $subnav_slug ) ) {
141
+ if ( is_callable( $screen_function ) ) {
 
 
142
  add_action( 'bp_screens', $screen_function, 3 );
143
  }
144
 
278
 
279
  // Before hooking the screen function, check user access
280
  if ( !empty( $user_has_access ) ) {
281
+ // Add our screen hook if screen function is callable
282
+ if ( is_callable( $screen_function ) ) {
 
283
  add_action( 'bp_screens', $screen_function, 3 );
284
  }
285
  } else {
389
  return false;
390
 
391
  if ( $function = $bp->bp_nav[$parent_id]['screen_function'] ) {
392
+ // Remove our screen hook if screen function is callable
393
+ if ( is_callable( $function ) ) {
 
394
  remove_action( 'bp_screens', $function, 3 );
395
  }
396
  }
410
 
411
  $screen_function = isset( $bp->bp_options_nav[$parent_id][$slug]['screen_function'] ) ? $bp->bp_options_nav[$parent_id][$slug]['screen_function'] : false;
412
 
413
+ if ( ! empty( $screen_function ) ) {
414
+ // Remove our screen hook if screen function is callable
415
+ if ( is_callable( $screen_function ) ) {
 
416
  remove_action( 'bp_screens', $screen_function, 3 );
417
  }
418
  }
bp-core/bp-core-classes.php CHANGED
@@ -47,6 +47,14 @@ class BP_User_Query {
47
 
48
  /** Variables *************************************************************/
49
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Array of variables to query with
52
  *
@@ -119,8 +127,15 @@ class BP_User_Query {
119
  * @param string|array $query The query variables
120
  */
121
  public function __construct( $query = null ) {
122
- if ( ! empty( $query ) ) {
123
- $this->query_vars = wp_parse_args( $query, array(
 
 
 
 
 
 
 
124
  'type' => 'newest',
125
  'per_page' => 0,
126
  'page' => 1,
@@ -161,6 +176,22 @@ class BP_User_Query {
161
  $this->populate_extras();
162
  }
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  /**
165
  * Prepare the query for user_ids
166
  *
@@ -198,11 +229,13 @@ class BP_User_Query {
198
  switch ( $type ) {
199
 
200
  // 'online' query happens against the last_activity usermeta key
 
 
201
  case 'online' :
202
  $this->uid_name = 'user_id';
203
  $sql['select'] = "SELECT DISTINCT u.{$this->uid_name} as id FROM {$wpdb->usermeta} u";
204
  $sql['where'][] = $wpdb->prepare( "u.meta_key = %s", bp_get_user_meta_key( 'last_activity' ) );
205
- $sql['where'][] = 'u.meta_value >= DATE_SUB( UTC_TIMESTAMP(), INTERVAL 5 MINUTE )';
206
  $sql['orderby'] = "ORDER BY u.meta_value";
207
  $sql['order'] = "DESC";
208
 
@@ -234,7 +267,7 @@ class BP_User_Query {
234
  $this->uid_name = 'user_id';
235
  $sql['select'] = "SELECT DISTINCT u.{$this->uid_name} as id FROM {$wpdb->usermeta} u";
236
  $sql['where'][] = $wpdb->prepare( "u.meta_key = %s", bp_get_user_meta_key( 'total_friend_count' ) );
237
- $sql['orderby'] = "ORDER BY u.meta_value";
238
  $sql['order'] = "DESC";
239
 
240
  break;
@@ -282,9 +315,10 @@ class BP_User_Query {
282
  /** WHERE *************************************************************/
283
 
284
  // 'include' - User ids to include in the results
285
- if ( false !== $include ) {
286
- $include = wp_parse_id_list( $include );
287
- $include_ids = $wpdb->escape( implode( ',', (array) $include ) );
 
288
  $sql['where'][] = "u.{$this->uid_name} IN ({$include_ids})";
289
  }
290
 
@@ -296,18 +330,17 @@ class BP_User_Query {
296
  }
297
 
298
  // 'user_id' - When a user id is passed, limit to the friends of the user
299
- // Only parse this if no 'include' param is passed, to account for
300
- // friend request queries
301
  // @todo remove need for bp_is_active() check
302
- if ( empty( $include ) && ! empty( $user_id ) && bp_is_active( 'friends' ) ) {
303
  $friend_ids = friends_get_friend_user_ids( $user_id );
304
  $friend_ids = implode( ',', wp_parse_id_list( $friend_ids ) );
305
 
306
  if ( ! empty( $friend_ids ) ) {
307
  $sql['where'][] = "u.{$this->uid_name} IN ({$friend_ids})";
308
 
309
- // If the user has no friends, and we're not including specific users, make sure the query returns null
310
- } elseif ( empty( $include ) ) {
 
311
  $sql['where'][] = $this->no_results['where'];
312
  }
313
  }
@@ -318,7 +351,10 @@ class BP_User_Query {
318
  // To avoid global joins, do a separate query
319
  // @todo remove need for bp_is_active() check
320
  if ( false !== $search_terms && bp_is_active( 'xprofile' ) ) {
321
- $found_user_ids = $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->profile->table_name_data} WHERE value LIKE %s", '%%' . like_escape( $search_terms ) . '%%' ) );
 
 
 
322
 
323
  if ( ! empty( $found_user_ids ) ) {
324
  $sql['where'][] = "u.{$this->uid_name} IN (" . implode( ',', wp_parse_id_list( $found_user_ids ) ) . ")";
@@ -425,6 +461,26 @@ class BP_User_Query {
425
  }
426
  }
427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  /**
429
  * Perform a database query to populate any extra metadata we might need.
430
  * Different components will hook into the 'bp_user_query_populate_extras'
@@ -1569,6 +1625,10 @@ class BP_Button {
1569
  if ( true == $this->block_self && bp_is_my_profile() )
1570
  return false;
1571
 
 
 
 
 
1572
  // Wrapper properties
1573
  if ( false !== $this->wrapper ) {
1574
 
47
 
48
  /** Variables *************************************************************/
49
 
50
+ /**
51
+ * Unaltered params as passed to the constructor
52
+ *
53
+ * @since BuddyPress (1.8)
54
+ * @var array
55
+ */
56
+ public $query_vars_raw = array();
57
+
58
  /**
59
  * Array of variables to query with
60
  *
127
  * @param string|array $query The query variables
128
  */
129
  public function __construct( $query = null ) {
130
+
131
+ // Store the raw query vars for later access
132
+ $this->query_vars_raw = $query;
133
+
134
+ // Allow extending classes to register action/filter hooks
135
+ $this->setup_hooks();
136
+
137
+ if ( ! empty( $this->query_vars_raw ) ) {
138
+ $this->query_vars = wp_parse_args( $this->query_vars_raw, array(
139
  'type' => 'newest',
140
  'per_page' => 0,
141
  'page' => 1,
176
  $this->populate_extras();
177
  }
178
 
179
+ /**
180
+ * Allow extending classes to set up action/filter hooks
181
+ *
182
+ * When extending BP_User_Query, you may need to use some of its
183
+ * internal hooks to modify the output. It's not convenient to call
184
+ * add_action() or add_filter() in your class constructor, because
185
+ * BP_User_Query::__construct() contains a fair amount of logic that
186
+ * you may not want to override in your class. Define this method in
187
+ * your own class if you need a place where your extending class can
188
+ * add its hooks early in the query-building process. See
189
+ * BP_Group_Member_Query::setup_hooks() for an example.
190
+ *
191
+ * @since BuddyPress (1.8)
192
+ */
193
+ public function setup_hooks() {}
194
+
195
  /**
196
  * Prepare the query for user_ids
197
  *
229
  switch ( $type ) {
230
 
231
  // 'online' query happens against the last_activity usermeta key
232
+ // Filter 'bp_user_query_online_interval' to modify the
233
+ // number of minutes used as an interval
234
  case 'online' :
235
  $this->uid_name = 'user_id';
236
  $sql['select'] = "SELECT DISTINCT u.{$this->uid_name} as id FROM {$wpdb->usermeta} u";
237
  $sql['where'][] = $wpdb->prepare( "u.meta_key = %s", bp_get_user_meta_key( 'last_activity' ) );
238
+ $sql['where'][] = $wpdb->prepare( "u.meta_value >= DATE_SUB( UTC_TIMESTAMP(), INTERVAL %d MINUTE )", apply_filters( 'bp_user_query_online_interval', 15 ) );
239
  $sql['orderby'] = "ORDER BY u.meta_value";
240
  $sql['order'] = "DESC";
241
 
267
  $this->uid_name = 'user_id';
268
  $sql['select'] = "SELECT DISTINCT u.{$this->uid_name} as id FROM {$wpdb->usermeta} u";
269
  $sql['where'][] = $wpdb->prepare( "u.meta_key = %s", bp_get_user_meta_key( 'total_friend_count' ) );
270
+ $sql['orderby'] = "ORDER BY CONVERT(u.meta_value, SIGNED)";
271
  $sql['order'] = "DESC";
272
 
273
  break;
315
  /** WHERE *************************************************************/
316
 
317
  // 'include' - User ids to include in the results
318
+ $include = ! empty( $include ) ? wp_parse_id_list( $include ) : array();
319
+ $include_ids = $this->get_include_ids( $include );
320
+ if ( ! empty( $include_ids ) ) {
321
+ $include_ids = implode( ',', wp_parse_id_list( $include_ids ) );
322
  $sql['where'][] = "u.{$this->uid_name} IN ({$include_ids})";
323
  }
324
 
330
  }
331
 
332
  // 'user_id' - When a user id is passed, limit to the friends of the user
 
 
333
  // @todo remove need for bp_is_active() check
334
+ if ( ! empty( $user_id ) && bp_is_active( 'friends' ) ) {
335
  $friend_ids = friends_get_friend_user_ids( $user_id );
336
  $friend_ids = implode( ',', wp_parse_id_list( $friend_ids ) );
337
 
338
  if ( ! empty( $friend_ids ) ) {
339
  $sql['where'][] = "u.{$this->uid_name} IN ({$friend_ids})";
340
 
341
+ // If the user has no friends, the query should always
342
+ // return no users
343
+ } else {
344
  $sql['where'][] = $this->no_results['where'];
345
  }
346
  }
351
  // To avoid global joins, do a separate query
352
  // @todo remove need for bp_is_active() check
353
  if ( false !== $search_terms && bp_is_active( 'xprofile' ) ) {
354
+ $search_terms_clean = mysql_real_escape_string( mysql_real_escape_string( $search_terms ) );
355
+ $search_terms_clean = like_escape( $search_terms_clean );
356
+ $found_user_ids_query = "SELECT user_id FROM {$bp->profile->table_name_data} WHERE value LIKE '%" . $search_terms_clean . "%'";
357
+ $found_user_ids = $wpdb->get_col( $found_user_ids_query );
358
 
359
  if ( ! empty( $found_user_ids ) ) {
360
  $sql['where'][] = "u.{$this->uid_name} IN (" . implode( ',', wp_parse_id_list( $found_user_ids ) ) . ")";
461
  }
462
  }
463
 
464
+ /**
465
+ * Fetches the ids of users to put in the IN clause of the main query
466
+ *
467
+ * By default, returns the value passed to it
468
+ * ($this->query_vars['include']). Having this abstracted into a
469
+ * standalone method means that extending classes can override the
470
+ * logic, parsing together their own user_id limits with the 'include'
471
+ * ids passed to the class constructor. See BP_Group_Member_Query for
472
+ * an example.
473
+ *
474
+ * @since BuddyPress (1.8)
475
+ * @param array Sanitized array of user ids, as passed to the 'include'
476
+ * parameter of the class constructor
477
+ * @return array The list of users to which the main query should be
478
+ * limited
479
+ */
480
+ public function get_include_ids( $include = array() ) {
481
+ return $include;
482
+ }
483
+
484
  /**
485
  * Perform a database query to populate any extra metadata we might need.
486
  * Different components will hook into the 'bp_user_query_populate_extras'
1625
  if ( true == $this->block_self && bp_is_my_profile() )
1626
  return false;
1627
 
1628
+ // No button if you are the current user in a loop
1629
+ if ( true === $this->block_self && is_user_logged_in() && bp_loggedin_user_id() === bp_get_member_user_id() )
1630
+ return false;
1631
+
1632
  // Wrapper properties
1633
  if ( false !== $this->wrapper ) {
1634
 
bp-core/bp-core-component.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  // Exit if accessed directly
3
  if ( !defined( 'ABSPATH' ) ) exit;
4
 
@@ -18,51 +19,53 @@ if ( !class_exists( 'BP_Component' ) ) :
18
  */
19
  class BP_Component {
20
 
 
 
21
  /**
22
  * @var string Unique name (for internal identification)
23
  * @internal
24
  */
25
- var $name;
26
 
27
  /**
28
  * @var Unique ID (normally for custom post type)
29
  */
30
- var $id;
31
 
32
  /**
33
  * @var string Unique slug (used in query string and permalinks)
34
  */
35
- var $slug;
36
 
37
  /**
38
  * @var bool Does this component need a top-level directory?
39
  */
40
- var $has_directory;
41
 
42
  /**
43
  * @var string The path to the component's files
44
  */
45
- var $path;
46
 
47
  /**
48
  * @var WP_Query The loop for this component
49
  */
50
- var $query;
51
 
52
  /**
53
  * @var string The current ID of the queried object
54
  */
55
- var $current_id;
56
 
57
  /**
58
  * @var string Function to call for notifications
59
  */
60
- var $notification_callback;
61
 
62
  /**
63
  * @var array WordPress Toolbar links
64
  */
65
- var $admin_menu;
66
 
67
  /**
68
  * Search input box placeholder string for the component
@@ -70,7 +73,7 @@ class BP_Component {
70
  * @since BuddyPress (1.5)
71
  * @var string
72
  */
73
- public $search_string;
74
 
75
  /**
76
  * Component's root slug
@@ -78,20 +81,23 @@ class BP_Component {
78
  * @since BuddyPress (1.5)
79
  * @var string
80
  */
81
- public $root_slug;
 
 
82
 
83
  /**
84
  * Component loader
85
  *
86
  * @since BuddyPress (1.5)
87
  *
88
- * @param mixed $args Required. Supports these args:
89
- * - id: Unique ID (for internal identification). Letters, numbers, and underscores only
90
- * - name: Unique name. This should be a translatable name, eg __( 'Groups', 'buddypress' )
91
- * - path: The file path for the component's files. Used by BP_Component::includes()
92
  * @uses bp_Component::setup_actions() Setup the hooks and actions
93
  */
94
- function start( $id, $name, $path ) {
 
95
  // Internal identifier of component
96
  $this->id = $id;
97
 
@@ -115,38 +121,37 @@ class BP_Component {
115
  *
116
  * @param arr $args Used to
117
  */
118
- function setup_globals( $args = '' ) {
119
- global $bp;
120
 
121
  /** Slugs *************************************************************/
122
 
123
- $defaults = array(
124
  'slug' => $this->id,
125
  'root_slug' => '',
126
  'has_directory' => false,
127
  'notification_callback' => '',
128
  'search_string' => '',
129
  'global_tables' => ''
130
- );
131
- $r = wp_parse_args( $args, $defaults );
132
 
133
  // Slug used for permalink URI chunk after root
134
- $this->slug = apply_filters( 'bp_' . $this->id . '_slug', $r['slug'] );
135
 
136
  // Slug used for root directory
137
- $this->root_slug = apply_filters( 'bp_' . $this->id . '_root_slug', $r['root_slug'] );
138
 
139
  // Does this component have a top-level directory?
140
- $this->has_directory = apply_filters( 'bp_' . $this->id . '_has_directory', $r['has_directory'] );
141
 
142
  // Search string
143
- $this->search_string = apply_filters( 'bp_' . $this->id . '_search_string', $r['search_string'] );
144
 
145
  // Notifications callback
146
  $this->notification_callback = apply_filters( 'bp_' . $this->id . '_notification_callback', $r['notification_callback'] );
147
 
148
  // Set up global table names
149
  if ( !empty( $r['global_tables'] ) ) {
 
150
  // This filter allows for component-specific filtering of table names
151
  // To filter *all* tables, use the 'bp_core_get_table_prefix' filter instead
152
  $r['global_tables'] = apply_filters( 'bp_' . $this->id . '_global_tables', $r['global_tables'] );
@@ -154,12 +159,12 @@ class BP_Component {
154
  foreach ( $r['global_tables'] as $global_name => $table_name ) {
155
  $this->$global_name = $table_name;
156
  }
157
- }
158
 
159
  /** BuddyPress ********************************************************/
160
 
161
  // Register this component in the loaded components array
162
- $bp->loaded_components[$this->slug] = $this->id;
163
 
164
  // Call action
165
  do_action( 'bp_' . $this->id . '_setup_globals' );
@@ -189,14 +194,16 @@ class BP_Component {
189
  *
190
  * @uses do_action() Calls 'bp_{@link bp_Component::name}includes'
191
  */
192
- function includes( $includes = '' ) {
 
 
193
  if ( empty( $includes ) )
194
  return;
195
 
196
  $slashed_path = trailingslashit( $this->path );
197
 
198
  // Loop through files to be included
199
- foreach ( $includes as $file ) {
200
 
201
  $paths = array(
202
 
@@ -231,38 +238,38 @@ class BP_Component {
231
  * @uses add_action() To add various actions
232
  * @uses do_action() Calls 'bp_{@link BP_Component::name}setup_actions'
233
  */
234
- function setup_actions() {
235
 
236
  // Setup globals
237
- add_action( 'bp_setup_globals', array ( $this, 'setup_globals' ), 10 );
238
 
239
  // Include required files. Called early to ensure that BP core
240
  // components are loaded before plugins that hook their loader functions
241
  // to bp_include with the default priority of 10. This is for backwards
242
  // compatibility; henceforth, plugins should register themselves by
243
  // extending this base class.
244
- add_action( 'bp_include', array ( $this, 'includes' ), 8 );
245
 
246
  // Setup navigation
247
- add_action( 'bp_setup_nav', array ( $this, 'setup_nav' ), 10 );
248
 
249
  // Setup WP Toolbar menus
250
- add_action( 'bp_setup_admin_bar', array ( $this, 'setup_admin_bar' ), 10 );
251
 
252
  // Setup component title
253
- add_action( 'bp_setup_title', array ( $this, 'setup_title' ), 10 );
254
 
255
  // Register post types
256
- add_action( 'bp_register_post_types', array ( $this, 'register_post_types' ), 10 );
257
 
258
  // Register taxonomies
259
- add_action( 'bp_register_taxonomies', array ( $this, 'register_taxonomies' ), 10 );
260
 
261
  // Add the rewrite tags
262
- add_action( 'bp_add_rewrite_tags', array ( $this, 'add_rewrite_tags' ), 10 );
263
 
264
  // Generate rewrite rules
265
- add_action( 'bp_generate_rewrite_rules', array ( $this, 'generate_rewrite_rules' ), 10 );
266
 
267
  // Additional actions can be attached here
268
  do_action( 'bp_' . $this->id . '_setup_actions' );
@@ -271,10 +278,10 @@ class BP_Component {
271
  /**
272
  * Setup the navigation
273
  *
274
- * @param arr $main_nav Optional
275
- * @param arr $sub_nav Optional
276
  */
277
- function setup_nav( $main_nav = '', $sub_nav = '' ) {
278
 
279
  // No sub nav items without a main nav item
280
  if ( !empty( $main_nav ) ) {
@@ -282,7 +289,7 @@ class BP_Component {
282
 
283
  // Sub nav items are not required
284
  if ( !empty( $sub_nav ) ) {
285
- foreach( $sub_nav as $nav ) {
286
  bp_core_new_subnav_item( $nav );
287
  }
288
  }
@@ -298,7 +305,7 @@ class BP_Component {
298
  * @global obj $wp_admin_bar
299
  * @param array $wp_admin_menus
300
  */
301
- function setup_admin_bar( $wp_admin_nav = '' ) {
302
 
303
  // Bail if this is an ajax request
304
  if ( defined( 'DOING_AJAX' ) )
@@ -318,8 +325,9 @@ class BP_Component {
318
  global $wp_admin_bar;
319
 
320
  // Add each admin menu
321
- foreach( $this->admin_menu as $admin_menu )
322
  $wp_admin_bar->add_menu( $admin_menu );
 
323
  }
324
 
325
  // Call action
@@ -333,7 +341,7 @@ class BP_Component {
333
  *
334
  * @uses do_action() Calls 'bp_{@link bp_Component::name}setup_title'
335
  */
336
- function setup_title( ) {
337
  do_action( 'bp_' . $this->id . '_setup_title' );
338
  }
339
 
@@ -344,7 +352,7 @@ class BP_Component {
344
  *
345
  * @uses do_action() Calls 'bp_{@link bp_Component::name}_register_post_types'
346
  */
347
- function register_post_types() {
348
  do_action( 'bp_' . $this->id . '_register_post_types' );
349
  }
350
 
@@ -355,7 +363,7 @@ class BP_Component {
355
  *
356
  * @uses do_action() Calls 'bp_{@link bp_Component::name}_register_taxonomies'
357
  */
358
- function register_taxonomies() {
359
  do_action( 'bp_' . $this->id . '_register_taxonomies' );
360
  }
361
 
@@ -366,7 +374,7 @@ class BP_Component {
366
  *
367
  * @uses do_action() Calls 'bp_{@link bp_Component::name}_add_rewrite_tags'
368
  */
369
- function add_rewrite_tags() {
370
  do_action( 'bp_' . $this->id . '_add_rewrite_tags' );
371
  }
372
 
@@ -377,7 +385,7 @@ class BP_Component {
377
  *
378
  * @uses do_action() Calls 'bp_{@link bp_Component::name}_generate_rewrite_rules'
379
  */
380
- function generate_rewrite_rules ( $wp_rewrite ) {
381
  do_action( 'bp_' . $this->id . '_generate_rewrite_rules' );
382
  }
383
  }
1
  <?php
2
+
3
  // Exit if accessed directly
4
  if ( !defined( 'ABSPATH' ) ) exit;
5
 
19
  */
20
  class BP_Component {
21
 
22
+ /** Variables *************************************************************/
23
+
24
  /**
25
  * @var string Unique name (for internal identification)
26
  * @internal
27
  */
28
+ public $name = '';
29
 
30
  /**
31
  * @var Unique ID (normally for custom post type)
32
  */
33
+ public $id = '';
34
 
35
  /**
36
  * @var string Unique slug (used in query string and permalinks)
37
  */
38
+ public $slug = '';
39
 
40
  /**
41
  * @var bool Does this component need a top-level directory?
42
  */
43
+ public $has_directory = false;
44
 
45
  /**
46
  * @var string The path to the component's files
47
  */
48
+ public $path = '';
49
 
50
  /**
51
  * @var WP_Query The loop for this component
52
  */
53
+ public $query = false;
54
 
55
  /**
56
  * @var string The current ID of the queried object
57
  */
58
+ public $current_id = '';
59
 
60
  /**
61
  * @var string Function to call for notifications
62
  */
63
+ public $notification_callback = '';
64
 
65
  /**
66
  * @var array WordPress Toolbar links
67
  */
68
+ public $admin_menu = '';
69
 
70
  /**
71
  * Search input box placeholder string for the component
73
  * @since BuddyPress (1.5)
74
  * @var string
75
  */
76
+ public $search_string = '';
77
 
78
  /**
79
  * Component's root slug
81
  * @since BuddyPress (1.5)
82
  * @var string
83
  */
84
+ public $root_slug = '';
85
+
86
+ /** Methods ***************************************************************/
87
 
88
  /**
89
  * Component loader
90
  *
91
  * @since BuddyPress (1.5)
92
  *
93
+ * @param string $id Unique ID (for internal identification). Letters, numbers, and underscores only
94
+ * @param string $name Unique name. This should be a translatable name, eg __( 'Groups', 'buddypress' )
95
+ * @param string $path The file path for the component's files. Used by BP_Component::includes()
96
+ *
97
  * @uses bp_Component::setup_actions() Setup the hooks and actions
98
  */
99
+ public function start( $id = '', $name = '', $path = '' ) {
100
+
101
  // Internal identifier of component
102
  $this->id = $id;
103
 
121
  *
122
  * @param arr $args Used to
123
  */
124
+ public function setup_globals( $args = array() ) {
 
125
 
126
  /** Slugs *************************************************************/
127
 
128
+ $r = wp_parse_args( $args, array(
129
  'slug' => $this->id,
130
  'root_slug' => '',
131
  'has_directory' => false,
132
  'notification_callback' => '',
133
  'search_string' => '',
134
  'global_tables' => ''
135
+ ) );
 
136
 
137
  // Slug used for permalink URI chunk after root
138
+ $this->slug = apply_filters( 'bp_' . $this->id . '_slug', $r['slug'] );
139
 
140
  // Slug used for root directory
141
+ $this->root_slug = apply_filters( 'bp_' . $this->id . '_root_slug', $r['root_slug'] );
142
 
143
  // Does this component have a top-level directory?
144
+ $this->has_directory = apply_filters( 'bp_' . $this->id . '_has_directory', $r['has_directory'] );
145
 
146
  // Search string
147
+ $this->search_string = apply_filters( 'bp_' . $this->id . '_search_string', $r['search_string'] );
148
 
149
  // Notifications callback
150
  $this->notification_callback = apply_filters( 'bp_' . $this->id . '_notification_callback', $r['notification_callback'] );
151
 
152
  // Set up global table names
153
  if ( !empty( $r['global_tables'] ) ) {
154
+
155
  // This filter allows for component-specific filtering of table names
156
  // To filter *all* tables, use the 'bp_core_get_table_prefix' filter instead
157
  $r['global_tables'] = apply_filters( 'bp_' . $this->id . '_global_tables', $r['global_tables'] );
159
  foreach ( $r['global_tables'] as $global_name => $table_name ) {
160
  $this->$global_name = $table_name;
161
  }
162
+ }
163
 
164
  /** BuddyPress ********************************************************/
165
 
166
  // Register this component in the loaded components array
167
+ buddypress()->loaded_components[$this->slug] = $this->id;
168
 
169
  // Call action
170
  do_action( 'bp_' . $this->id . '_setup_globals' );
194
  *
195
  * @uses do_action() Calls 'bp_{@link bp_Component::name}includes'
196
  */
197
+ public function includes( $includes = array() ) {
198
+
199
+ // Bail if no files to include
200
  if ( empty( $includes ) )
201
  return;
202
 
203
  $slashed_path = trailingslashit( $this->path );
204
 
205
  // Loop through files to be included
206
+ foreach ( (array) $includes as $file ) {
207
 
208
  $paths = array(
209
 
238
  * @uses add_action() To add various actions
239
  * @uses do_action() Calls 'bp_{@link BP_Component::name}setup_actions'
240
  */
241
+ public function setup_actions() {
242
 
243
  // Setup globals
244
+ add_action( 'bp_setup_globals', array( $this, 'setup_globals' ), 10 );
245
 
246
  // Include required files. Called early to ensure that BP core
247
  // components are loaded before plugins that hook their loader functions
248
  // to bp_include with the default priority of 10. This is for backwards
249
  // compatibility; henceforth, plugins should register themselves by
250
  // extending this base class.
251
+ add_action( 'bp_include', array( $this, 'includes' ), 8 );
252
 
253
  // Setup navigation
254
+ add_action( 'bp_setup_nav', array( $this, 'setup_nav' ), 10 );
255
 
256
  // Setup WP Toolbar menus
257
+ add_action( 'bp_setup_admin_bar', array( $this, 'setup_admin_bar' ), 10 );
258
 
259
  // Setup component title
260
+ add_action( 'bp_setup_title', array( $this, 'setup_title' ), 10 );
261
 
262
  // Register post types
263
+ add_action( 'bp_register_post_types', array( $this, 'register_post_types' ), 10 );
264
 
265
  // Register taxonomies
266
+ add_action( 'bp_register_taxonomies', array( $this, 'register_taxonomies' ), 10 );
267
 
268
  // Add the rewrite tags
269
+ add_action( 'bp_add_rewrite_tags', array( $this, 'add_rewrite_tags' ), 10 );
270
 
271
  // Generate rewrite rules
272
+ add_action( 'bp_generate_rewrite_rules', array( $this, 'generate_rewrite_rules' ), 10 );
273
 
274
  // Additional actions can be attached here
275
  do_action( 'bp_' . $this->id . '_setup_actions' );
278
  /**
279
  * Setup the navigation
280
  *
281
+ * @param array $main_nav Optional
282
+ * @param array $sub_nav Optional
283
  */
284
+ public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
285
 
286
  // No sub nav items without a main nav item
287
  if ( !empty( $main_nav ) ) {
289
 
290
  // Sub nav items are not required
291
  if ( !empty( $sub_nav ) ) {
292
+ foreach( (array) $sub_nav as $nav ) {
293
  bp_core_new_subnav_item( $nav );
294
  }
295
  }
305
  * @global obj $wp_admin_bar
306
  * @param array $wp_admin_menus
307
  */
308
+ public function setup_admin_bar( $wp_admin_nav = array() ) {
309
 
310
  // Bail if this is an ajax request
311
  if ( defined( 'DOING_AJAX' ) )
325
  global $wp_admin_bar;
326
 
327
  // Add each admin menu
328
+ foreach( $this->admin_menu as $admin_menu ) {
329
  $wp_admin_bar->add_menu( $admin_menu );
330
+ }
331
  }
332
 
333
  // Call action
341
  *
342
  * @uses do_action() Calls 'bp_{@link bp_Component::name}setup_title'
343
  */
344
+ public function setup_title() {
345
  do_action( 'bp_' . $this->id . '_setup_title' );
346
  }
347
 
352
  *
353
  * @uses do_action() Calls 'bp_{@link bp_Component::name}_register_post_types'
354
  */
355
+ public function register_post_types() {
356
  do_action( 'bp_' . $this->id . '_register_post_types' );
357
  }
358
 
363
  *
364
  * @uses do_action() Calls 'bp_{@link bp_Component::name}_register_taxonomies'
365
  */
366
+ public function register_taxonomies() {
367
  do_action( 'bp_' . $this->id . '_register_taxonomies' );
368
  }
369
 
374
  *
375
  * @uses do_action() Calls 'bp_{@link bp_Component::name}_add_rewrite_tags'
376
  */
377
+ public function add_rewrite_tags() {
378
  do_action( 'bp_' . $this->id . '_add_rewrite_tags' );
379
  }
380
 
385
  *
386
  * @uses do_action() Calls 'bp_{@link bp_Component::name}_generate_rewrite_rules'
387
  */
388
+ public function generate_rewrite_rules() {
389
  do_action( 'bp_' . $this->id . '_generate_rewrite_rules' );
390
  }
391
  }
bp-core/bp-core-dependency.php CHANGED
@@ -180,6 +180,16 @@ function bp_enqueue_scripts() {
180
  do_action ( 'bp_enqueue_scripts' );
181
  }
182
 
 
 
 
 
 
 
 
 
 
 
183
  /**
184
  * Piggy back action for BuddyPress sepecific theme actions before the theme has
185
  * been setup and the theme's functions.php has loaded.
180
  do_action ( 'bp_enqueue_scripts' );
181
  }
182
 
183
+ /**
184
+ * Add the BuddyPress-specific rewrite tags
185
+ *
186
+ * @since BuddyPress (1.8)
187
+ * @uses do_action() Calls 'bp_add_rewrite_tags'
188
+ */
189
+ function bp_add_rewrite_tags() {
190
+ do_action( 'bp_add_rewrite_tags' );
191
+ }
192
+
193
  /**
194
  * Piggy back action for BuddyPress sepecific theme actions before the theme has
195
  * been setup and the theme's functions.php has loaded.
bp-core/bp-core-functions.php CHANGED
@@ -84,6 +84,124 @@ function bp_core_get_table_prefix() {
84
  return apply_filters( 'bp_core_get_table_prefix', $wpdb->base_prefix );
85
  }
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  /**
88
  * Fetches BP pages from the meta table, depending on setup
89
  *
@@ -286,132 +404,161 @@ function bp_core_component_slug_from_root_slug( $root_slug ) {
286
  }
287
 
288
  /**
289
- * Returns the domain for the root blog.
290
- * eg: http://domain.com/ OR https://domain.com
 
291
  *
292
- * @package BuddyPress Core
293
- * @uses get_blog_option() WordPress function to fetch blog meta.
294
- * @return $domain The domain URL for the blog.
295
  */
296
- function bp_core_get_root_domain() {
 
297
 
298
- $domain = get_home_url( bp_get_root_blog_id() );
 
299
 
300
- return apply_filters( 'bp_core_get_root_domain', $domain );
301
- }
302
 
303
- /**
304
- * Get the current GMT time to save into the DB
305
- *
306
- * @package BuddyPress Core
307
- * @since BuddyPress (1.2.6)
308
- */
309
- function bp_core_current_time( $gmt = true ) {
310
- // Get current time in MYSQL format
311
- $current_time = current_time( 'mysql', $gmt );
312
 
313
- return apply_filters( 'bp_core_current_time', $current_time );
 
 
 
 
 
 
 
 
 
314
  }
315
 
316
- /**
317
- * Adds a feedback (error/success) message to the WP cookie so it can be
318
- * displayed after the page reloads.
319
- *
320
- * @package BuddyPress Core
321
- *
322
- * @global BuddyPress $bp The one true BuddyPress instance
323
- * @param str $message Feedback to give to user
324
- * @param str $type updated|success|error|warning
325
- */
326
- function bp_core_add_message( $message, $type = '' ) {
327
  global $bp;
328
 
329
- // Success is the default
330
- if ( empty( $type ) )
331
- $type = 'success';
332
 
333
- // Send the values to the cookie for page reload display
334
- @setcookie( 'bp-message', $message, time() + 60 * 60 * 24, COOKIEPATH );
335
- @setcookie( 'bp-message-type', $type, time() + 60 * 60 * 24, COOKIEPATH );
336
 
337
- /***
338
- * Send the values to the $bp global so we can still output messages
339
- * without a page reload
340
- */
341
- $bp->template_message = $message;
342
- $bp->template_message_type = $type;
343
  }
344
 
345
  /**
346
- * Checks if there is a feedback message in the WP cookie, if so, adds a
347
- * "template_notices" action so that the message can be parsed into the template
348
- * and displayed to the user.
349
  *
350
- * After the message is displayed, it removes the message vars from the cookie
351
- * so that the message is not shown to the user multiple times.
352
  *
353
- * @package BuddyPress Core
354
- * @global $bp_message The message text
355
- * @global $bp_message_type The type of message (error/success)
356
- * @uses setcookie() Sets a cookie value for the user.
357
  */
358
- function bp_core_setup_message() {
359
- global $bp;
 
360
 
361
- if ( empty( $bp->template_message ) && isset( $_COOKIE['bp-message'] ) )
362
- $bp->template_message = $_COOKIE['bp-message'];
363
 
364
- if ( empty( $bp->template_message_type ) && isset( $_COOKIE['bp-message-type'] ) )
365
- $bp->template_message_type = $_COOKIE['bp-message-type'];
 
 
 
 
 
 
 
366
 
367
- add_action( 'template_notices', 'bp_core_render_message' );
368
 
369
- @setcookie( 'bp-message', false, time() - 1000, COOKIEPATH );
370
- @setcookie( 'bp-message-type', false, time() - 1000, COOKIEPATH );
371
  }
372
- add_action( 'bp_actions', 'bp_core_setup_message', 5 );
373
 
374
  /**
375
- * Renders a feedback message (either error or success message) to the theme template.
376
- * The hook action 'template_notices' is used to call this function, it is not called directly.
377
  *
378
  * @package BuddyPress Core
379
- * @global BuddyPress $bp The one true BuddyPress instance
380
  */
381
- function bp_core_render_message() {
382
- global $bp;
383
-
384
- if ( !empty( $bp->template_message ) ) :
385
- $type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';
386
- $content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>
387
-
388
- <div id="message" class="bp-template-notice <?php echo $type; ?>">
389
-
390
- <?php echo $content; ?>
391
-
392
- </div>
393
 
394
- <?php
 
 
 
 
395
 
396
- do_action( 'bp_core_render_message' );
 
 
397
 
398
- endif;
 
399
  }
400
 
401
  /**
402
- * Format numbers the BuddyPress way
403
  *
404
- * @param str $number
405
- * @param bool $decimals
406
- * @return str
407
  */
408
- function bp_core_number_format( $number, $decimals = false ) {
409
-
410
- // Force number to 0 if needed
411
- if ( empty( $number ) )
412
- $number = 0;
413
 
414
- return apply_filters( 'bp_core_number_format', number_format_i18n( $number, $decimals ), $number, $decimals );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  }
416
 
417
  /**
@@ -423,6 +570,10 @@ function bp_core_number_format( $number, $decimals = false ) {
423
  * eg: 4 days
424
  * eg: 4 weeks and 6 days
425
  *
 
 
 
 
426
  * @package BuddyPress Core
427
  * @uses apply_filters() Filter 'bp_core_time_since_pre' to bypass BP's calculations
428
  * @uses apply_filters() Filter 'bp_core_time_since' to modify BP's calculations
@@ -444,13 +595,13 @@ function bp_core_time_since( $older_date, $newer_date = false ) {
444
 
445
  // array of time period chunks
446
  $chunks = array(
447
- array( 60 * 60 * 24 * 365 , __( 'year', 'buddypress' ), __( 'years', 'buddypress' ) ),
448
- array( 60 * 60 * 24 * 30 , __( 'month', 'buddypress' ), __( 'months', 'buddypress' ) ),
449
- array( 60 * 60 * 24 * 7, __( 'week', 'buddypress' ), __( 'weeks', 'buddypress' ) ),
450
- array( 60 * 60 * 24 , __( 'day', 'buddypress' ), __( 'days', 'buddypress' ) ),
451
- array( 60 * 60 , __( 'hour', 'buddypress' ), __( 'hours', 'buddypress' ) ),
452
- array( 60 , __( 'minute', 'buddypress' ), __( 'minutes', 'buddypress' ) ),
453
- array( 1, __( 'second', 'buddypress' ), __( 'seconds', 'buddypress' ) )
454
  );
455
 
456
  if ( !empty( $older_date ) && !is_numeric( $older_date ) ) {
@@ -483,7 +634,7 @@ function bp_core_time_since( $older_date, $newer_date = false ) {
483
 
484
  // Step one: the first chunk
485
  for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
486
- $seconds = $chunks[$i][0];
487
 
488
  // Finding the biggest chunk (if the chunk fits, break)
489
  $count = floor( $since / $seconds );
@@ -499,17 +650,62 @@ function bp_core_time_since( $older_date, $newer_date = false ) {
499
  } else {
500
 
501
  // Set output var
502
- $output = ( 1 == $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
503
 
504
  // Step two: the second chunk
 
 
 
 
 
505
  if ( $i + 2 < $j ) {
506
- $seconds2 = $chunks[$i + 1][0];
507
- $name2 = $chunks[$i + 1][1];
508
  $count2 = floor( ( $since - ( $seconds * $count ) ) / $seconds2 );
509
 
510
  // Add to output var
511
  if ( 0 != $count2 ) {
512
- $output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'buddypress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'buddypress' ) . ' ' . $count2 . ' ' . $chunks[$i + 1][2];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
513
  }
514
  }
515
 
@@ -528,6 +724,95 @@ function bp_core_time_since( $older_date, $newer_date = false ) {
528
  return apply_filters( 'bp_core_time_since', $output, $older_date, $newer_date );
529
  }
530
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
531
  /**
532
  * Record user activity to the database. Many functions use a "last active" feature to
533
  * show the length of time since the user was last active.
@@ -584,331 +869,55 @@ function bp_core_get_last_activity( $last_activity_date, $string ) {
584
  return apply_filters( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string );
585
  }
586
 
 
 
587
  /**
588
- * Get the path of of the current site.
589
  *
590
- * @package BuddyPress Core
 
 
591
  *
592
- * @global object $current_site
593
- * @return string
594
- */
595
- function bp_core_get_site_path() {
596
- global $current_site;
597
-
598
- if ( is_multisite() )
599
- $site_path = $current_site->path;
600
- else {
601
- $site_path = (array) explode( '/', home_url() );
602
-
603
- if ( count( $site_path ) < 2 )
604
- $site_path = '/';
605
- else {
606
- // Unset the first three segments (http(s)://domain.com part)
607
- unset( $site_path[0] );
608
- unset( $site_path[1] );
609
- unset( $site_path[2] );
610
-
611
- if ( !count( $site_path ) )
612
- $site_path = '/';
613
- else
614
- $site_path = '/' . implode( '/', $site_path ) . '/';
615
- }
616
- }
617
-
618
- return apply_filters( 'bp_core_get_site_path', $site_path );
619
- }
620
-
621
- /**
622
- * Performs a status safe wp_redirect() that is compatible with bp_catch_uri()
623
  *
624
- * @package BuddyPress Core
625
- * @uses wp_safe_redirect()
626
- */
627
- function bp_core_redirect( $location, $status = 302 ) {
628
-
629
- // On some setups, passing the value of wp_get_referer() may result in an
630
- // empty value for $location, which results in an error. Ensure that we
631
- // have a valid URL.
632
- if ( empty( $location ) )
633
- $location = bp_get_root_domain();
634
-
635
- // Make sure we don't call status_header() in bp_core_do_catch_uri() as this
636
- // conflicts with wp_redirect() and wp_safe_redirect().
637
- buddypress()->no_status_set = true;
638
-
639
- wp_safe_redirect( $location, $status );
640
- die;
641
- }
642
-
643
- /**
644
- * Returns the referrer URL without the http(s)://
645
  *
646
- * @package BuddyPress Core
647
- * @return The referrer URL
 
648
  */
649
- function bp_core_referrer() {
650
- $referer = explode( '/', wp_get_referer() );
651
- unset( $referer[0], $referer[1], $referer[2] );
652
- return implode( '/', $referer );
653
  }
654
 
655
  /**
656
- * Adds illegal names to WP so that root components will not conflict with
657
- * blog names on a subdirectory installation.
658
  *
659
- * For example, it would stop someone creating a blog with the slug "groups".
 
 
 
 
 
 
 
 
 
 
 
 
660
  */
661
- function bp_core_add_illegal_names() {
662
- update_site_option( 'illegal_names', get_site_option( 'illegal_names' ), array() );
663
  }
664
 
665
  /**
666
- * A javascript free implementation of the search functions in BuddyPress
667
- *
668
- * @package BuddyPress Core
669
- * @param string $slug The slug to redirect to for searching.
670
- */
671
- function bp_core_action_search_site( $slug = '' ) {
672
-
673
- if ( !bp_is_current_component( bp_get_search_slug() ) )
674
- return;
675
-
676
- if ( empty( $_POST['search-terms'] ) ) {
677
- bp_core_redirect( bp_get_root_domain() );
678
- return;
679
- }
680
-
681
- $search_terms = stripslashes( $_POST['search-terms'] );
682
- $search_which = !empty( $_POST['search-which'] ) ? $_POST['search-which'] : '';
683
- $query_string = '/?s=';
684
-
685
- if ( empty( $slug ) ) {
686
- switch ( $search_which ) {
687
- case 'posts':
688
- $slug = '';
689
- $var = '/?s=';
690
-
691
- // If posts aren't displayed on the front page, find the post page's slug.
692
- if ( 'page' == get_option( 'show_on_front' ) ) {
693
- $page = get_post( get_option( 'page_for_posts' ) );
694
-
695
- if ( !is_wp_error( $page ) && !empty( $page->post_name ) ) {
696
- $slug = $page->post_name;
697
- $var = '?s=';
698
- }
699
- }
700
- break;
701
-
702
- case 'blogs':
703
- $slug = bp_is_active( 'blogs' ) ? bp_get_blogs_root_slug() : '';
704
- break;
705
-
706
- case 'forums':
707
- $slug = bp_is_active( 'forums' ) ? bp_get_forums_root_slug() : '';
708
- $query_string = '/?fs=';
709
- break;
710
-
711
- case 'groups':
712
- $slug = bp_is_active( 'groups' ) ? bp_get_groups_root_slug() : '';
713
- break;
714
-
715
- case 'members':
716
- default:
717
- $slug = bp_get_members_root_slug();
718
- break;
719
- }
720
-
721
- if ( empty( $slug ) && 'posts' != $search_which ) {
722
- bp_core_redirect( bp_get_root_domain() );
723
- return;
724
- }
725
- }
726
-
727
- bp_core_redirect( apply_filters( 'bp_core_search_site', home_url( $slug . $query_string . urlencode( $search_terms ) ), $search_terms ) );
728
- }
729
- add_action( 'bp_init', 'bp_core_action_search_site', 7 );
730
-
731
- /**
732
- * Prints the generation time in the footer of the site.
733
- *
734
- * @package BuddyPress Core
735
- */
736
- function bp_core_print_generation_time() {
737
- ?>
738
-
739
- <!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->
740
-
741
- <?php
742
- }
743
- add_action( 'wp_footer', 'bp_core_print_generation_time' );
744
-
745
- /**
746
- * Load the buddypress translation file for current language
747
- *
748
- * @package BuddyPress Core
749
- */
750
- function bp_core_load_buddypress_textdomain() {
751
- $locale = apply_filters( 'buddypress_locale', get_locale() );
752
- $mofile = sprintf( 'buddypress-%s.mo', $locale );
753
- $mofile_global = WP_LANG_DIR . '/' . $mofile;
754
- $mofile_local = BP_PLUGIN_DIR . 'bp-languages/' . $mofile;
755
-
756
- if ( file_exists( $mofile_global ) )
757
- return load_textdomain( 'buddypress', $mofile_global );
758
- elseif ( file_exists( $mofile_local ) )
759
- return load_textdomain( 'buddypress', $mofile_local );
760
- else
761
- return false;
762
- }
763
- add_action ( 'bp_core_loaded', 'bp_core_load_buddypress_textdomain' );
764
-
765
- /**
766
- * Initializes {@link BP_Embed} after everything is loaded.
767
- *
768
- * @global object $bp BuddyPress global settings
769
- * @package BuddyPress Core
770
- * @since BuddyPress (1.5)
771
- */
772
- function bp_embed_init() {
773
- global $bp;
774
-
775
- if ( empty( $bp->embed ) )
776
- $bp->embed = new BP_Embed();
777
- }
778
- add_action( 'bp_init', 'bp_embed_init', 9 );
779
-
780
- /**
781
- * This function originally let plugins add support for pages in the root of the install.
782
- * These root level pages are now handled by actual WordPress pages and this function is now
783
- * a convenience for compatibility with the new method.
784
- *
785
- * @global $bp BuddyPress global settings
786
- * @param $slug str The slug of the component
787
- */
788
- function bp_core_add_root_component( $slug ) {
789
- global $bp;
790
-
791
- if ( empty( $bp->pages ) )
792
- $bp->pages = bp_core_get_directory_pages();
793
-
794
- $match = false;
795
-
796
- // Check if the slug is registered in the $bp->pages global
797
- foreach ( (array) $bp->pages as $key => $page ) {
798
- if ( $key == $slug || $page->slug == $slug )
799
- $match = true;
800
- }
801
-
802
- // If there was no match, add a page for this root component
803
- if ( empty( $match ) ) {
804
- $bp->add_root[] = $slug;
805
- }
806
-
807
- // Make sure that this component is registered as requiring a top-level directory
808
- if ( isset( $bp->{$slug} ) ) {
809
- $bp->loaded_components[$bp->{$slug}->slug] = $bp->{$slug}->id;
810
- $bp->{$slug}->has_directory = true;
811
- }
812
- }
813
-
814
- function bp_core_create_root_component_page() {
815
- global $bp;
816
-
817
- $new_page_ids = array();
818
-
819
- foreach ( (array) $bp->add_root as $slug )
820
- $new_page_ids[$slug] = wp_insert_post( array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_title' => ucwords( $slug ), 'post_status' => 'publish', 'post_type' => 'page' ) );
821
-
822
- $page_ids = array_merge( (array) $new_page_ids, (array) bp_core_get_directory_page_ids() );
823
- bp_core_update_directory_page_ids( $page_ids );
824
- }
825
-
826
- /**
827
- * Is this the root blog ID?
828
- *
829
- * @package BuddyPress
830
- * @since BuddyPress (1.5)
831
- *
832
- * @param int $blog_id Optional. Defaults to the current blog id.
833
- * @return bool $is_root_blog Returns true if this is bp_get_root_blog_id().
834
- */
835
- function bp_is_root_blog( $blog_id = 0 ) {
836
-
837
- // Assume false
838
- $is_root_blog = false;
839
-
840
- // Use current blog if no ID is passed
841
- if ( empty( $blog_id ) )
842
- $blog_id = get_current_blog_id();
843
-
844
- // Compare to root blog ID
845
- if ( $blog_id == bp_get_root_blog_id() )
846
- $is_root_blog = true;
847
-
848
- return (bool) apply_filters( 'bp_is_root_blog', (bool) $is_root_blog );
849
- }
850
-
851
- /**
852
- * Is this bp_get_root_blog_id()?
853
- *
854
- * @package BuddyPress
855
- * @since BuddyPress (1.5)
856
- *
857
- * @return int Return the root site ID
858
- */
859
- function bp_get_root_blog_id() {
860
- global $bp;
861
-
862
- return (int) apply_filters( 'bp_get_root_blog_id', (int) $bp->root_blog_id );
863
- }
864
-
865
- /**
866
- * Get the meta_key for a given piece of user metadata
867
- *
868
- * BuddyPress stores a number of pieces of userdata in the WordPress central usermeta table. In
869
- * order to allow plugins to enable multiple instances of BuddyPress on a single WP installation,
870
- * BP's usermeta keys are filtered with this function, so that they can be altered on the fly.
871
- *
872
- * Plugin authors should use BP's _user_meta() functions, which bakes in bp_get_user_meta_key().
873
- * $last_active = bp_get_user_meta( $user_id, 'last_activity', true );
874
- * If you have to use WP's _user_meta() functions for some reason, you should use this function, eg
875
- * $last_active = get_user_meta( $user_id, bp_get_user_meta_key( 'last_activity' ), true );
876
- * If using the WP functions, do not not hardcode your meta keys.
877
- *
878
- * @package BuddyPress
879
- * @since BuddyPress (1.5)
880
- *
881
- * @uses apply_filters() Filter bp_get_user_meta_key to modify keys individually
882
- * @param str $key
883
- * @return str $key
884
- */
885
- function bp_get_user_meta_key( $key = false ) {
886
- return apply_filters( 'bp_get_user_meta_key', $key );
887
- }
888
-
889
- /**
890
- * Get a piece of usermeta
891
- *
892
- * This is a wrapper for get_user_meta() that allows for easy use of bp_get_user_meta_key(), thereby
893
- * increasing compatibility with non-standard BP setups.
894
- *
895
- * @package BuddyPress
896
- * @since BuddyPress (1.5)
897
- *
898
- * @uses bp_get_user_meta_key() For a filterable version of the meta key
899
- * @uses get_user_meta() See get_user_meta() docs for more details on parameters
900
- * @param int $user_id The id of the user whose meta you're fetching
901
- * @param string $key The meta key to retrieve.
902
- * @param bool $single Whether to return a single value.
903
- * @return mixed Will be an array if $single is false. Will be value of meta data field if $single
904
- * is true.
905
- */
906
- function bp_get_user_meta( $user_id, $key, $single = false ) {
907
- return get_user_meta( $user_id, bp_get_user_meta_key( $key ), $single );
908
- }
909
-
910
- /**
911
- * Update a piece of usermeta
912
  *
913
  * This is a wrapper for update_user_meta() that allows for easy use of bp_get_user_meta_key(),
914
  * thereby increasing compatibility with non-standard BP setups.
@@ -920,169 +929,51 @@ function bp_get_user_meta( $user_id, $key, $single = false ) {
920
  * @uses update_user_meta() See update_user_meta() docs for more details on parameters
921
  * @param int $user_id The id of the user whose meta you're setting
922
  * @param string $key The meta key to set.
923
- * @param mixed $value Metadata value.
924
- * @param mixed $prev_value Optional. Previous value to check before removing.
925
- * @return bool False on failure, true if success.
926
- */
927
- function bp_update_user_meta( $user_id, $key, $value, $prev_value = '' ) {
928
- return update_user_meta( $user_id, bp_get_user_meta_key( $key ), $value, $prev_value );
929
- }
930
-
931
- /**
932
- * Delete a piece of usermeta
933
- *
934
- * This is a wrapper for delete_user_meta() that allows for easy use of bp_get_user_meta_key(),
935
- * thereby increasing compatibility with non-standard BP setups.
936
- *
937
- * @package BuddyPress
938
- * @since BuddyPress (1.5)
939
- *
940
- * @uses bp_get_user_meta_key() For a filterable version of the meta key
941
- * @uses delete_user_meta() See delete_user_meta() docs for more details on parameters
942
- * @param int $user_id The id of the user whose meta you're deleting
943
- * @param string $key The meta key to delete.
944
- * @param mixed $value Optional. Metadata value.
945
- * @return bool False for failure. True for success.
946
- */
947
- function bp_delete_user_meta( $user_id, $key, $value = '' ) {
948
- return delete_user_meta( $user_id, bp_get_user_meta_key( $key ), $value );
949
- }
950
-
951
- /**
952
- * Are we running username compatibility mode?
953
- *
954
- * @package BuddyPress
955
- * @since BuddyPress (1.5)
956
- *
957
- * @uses apply_filters() Filter 'bp_is_username_compatibility_mode' to alter
958
- * @return bool False when compatibility mode is disabled (default); true when enabled
959
- */
960
- function bp_is_username_compatibility_mode() {
961
- return apply_filters( 'bp_is_username_compatibility_mode', defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) && BP_ENABLE_USERNAME_COMPATIBILITY_MODE );
962
- }
963
-
964
- /**
965
- * Are we running multiblog mode?
966
- *
967
- * Note that BP_ENABLE_MULTIBLOG is different from (but dependent on) WordPress
968
- * Multisite. "Multiblog" is BuddyPress setup that allows BuddyPress components
969
- * to be viewed on every blog on the network, each with their own settings.
970
- *
971
- * Thus, instead of having all 'boonebgorges' links go to
972
- * http://example.com/members/boonebgorges
973
- * on the root blog, each blog will have its own version of the same content, eg
974
- * http://site2.example.com/members/boonebgorges (for subdomains)
975
- * http://example.com/site2/members/boonebgorges (for subdirectories)
976
- *
977
- * Multiblog mode is disabled by default, meaning that all BuddyPress content
978
- * must be viewed on the root blog. It's also recommended not to use the
979
- * BP_ENABLE_MULTIBLOG constant beyond 1.7, as BuddyPress can now be activated
980
- * on individual sites.
981
- *
982
- * Why would you want to use this? Originally it was intended to allow
983
- * BuddyPress to live in mu-plugins and be visible on mapped domains. This is
984
- * a very small use-case with large architectural shortcomings, so do not go
985
- * down this road unless you specifically need to.
986
- *
987
- * @package BuddyPress
988
- * @since BuddyPress (1.5)
989
- *
990
- * @uses apply_filters() Filter 'bp_is_multiblog_mode' to alter
991
- * @return bool False when multiblog mode is disabled (default); true when enabled
992
- */
993
- function bp_is_multiblog_mode() {
994
-
995
- // Setup some default values
996
- $retval = false;
997
- $is_multisite = is_multisite();
998
- $network_active = bp_is_network_activated();
999
- $is_multiblog = defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG;
1000
-
1001
- // Multisite, Network Activated, and Specifically Multiblog
1002
- if ( $is_multisite && $network_active && $is_multiblog ) {
1003
- $retval = true;
1004
-
1005
- // Multisite, but not network activated
1006
- } elseif ( $is_multisite && ! $network_active ) {
1007
- $retval = true;
1008
- }
1009
-
1010
- return apply_filters( 'bp_is_multiblog_mode', $retval );
1011
- }
1012
-
1013
- /**
1014
- * Should we use the WP Toolbar?
1015
- *
1016
- * The WP Toolbar, introduced in WP 3.1, is fully supported in BuddyPress as of BP 1.5.
1017
- * For BP 1.6, the WP Toolbar is the default.
1018
- *
1019
- * @return bool False when WP Toolbar support is disabled; true when enabled (default)
1020
- * @since BuddyPress (1.5)
1021
- * @uses apply_filters() Filter 'bp_use_wp_admin_bar' to alter
1022
- */
1023
- function bp_use_wp_admin_bar() {
1024
- $use_admin_bar = true;
1025
-
1026
- // Has the WP Toolbar constant been explicity set?
1027
- if ( defined( 'BP_USE_WP_ADMIN_BAR' ) && ! BP_USE_WP_ADMIN_BAR )
1028
- $use_admin_bar = false;
1029
-
1030
- // Has the admin chosen to use the BuddyBar during an upgrade?
1031
- elseif ( (bool) bp_get_option( '_bp_force_buddybar', false ) )
1032
- $use_admin_bar = false;
1033
-
1034
- return apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar );
1035
  }
1036
 
1037
  /**
1038
- * A utility for parsing individual function arguments into an array.
1039
- *
1040
- * The purpose of this function is to help with backward compatibility in cases where
1041
- *
1042
- * function foo( $bar = 1, $baz = false, $barry = array(), $blip = false ) { // ...
1043
- *
1044
- * is deprecated in favor of
1045
- *
1046
- * function foo( $args = array() ) {
1047
- * $defaults = array(
1048
- * 'bar' => 1,
1049
- * 'arg2' => false,
1050
- * 'arg3' => array(),
1051
- * 'arg4' => false,
1052
- * );
1053
- * $r = wp_parse_args( $args, $defaults ); // ...
1054
- *
1055
- * The first argument, $old_args_keys, is an array that matches the parameter positions (keys) to
1056
- * the new $args keys (values):
1057
  *
1058
- * $old_args_keys = array(
1059
- * 0 => 'bar', // because $bar was the 0th parameter for foo()
1060
- * 1 => 'baz', // because $baz was the 1st parameter for foo()
1061
- * 2 => 'barry', // etc
1062
- * 3 => 'blip'
1063
- * );
1064
  *
1065
- * For the second argument, $func_args, you should just pass the value of func_get_args().
 
1066
  *
1067
- * @since BuddyPress (1.6)
1068
- * @param array $old_args_keys
1069
- * @param array $func_args
1070
- * @return array $new_args
 
 
1071
  */
1072
- function bp_core_parse_args_array( $old_args_keys, $func_args ) {
1073
- $new_args = array();
1074
-
1075
- foreach( $old_args_keys as $arg_num => $arg_key ) {
1076
- if ( isset( $func_args[$arg_num] ) ) {
1077
- $new_args[$arg_key] = $func_args[$arg_num];
1078
- }
1079
- }
1080
-
1081
- return $new_args;
1082
  }
1083
 
1084
  /** Embeds ********************************************************************/
1085
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1086
  /**
1087
  * Are oembeds allowed in activity items?
1088
  *
@@ -1197,6 +1088,96 @@ function bp_core_admin_hook() {
1197
  return apply_filters( 'bp_core_admin_hook', $hook );
1198
  }
1199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1200
  /**
1201
  * Is BuddyPress active at the network level for this network?
1202
  *
@@ -1326,3 +1307,105 @@ function bp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) {
1326
 
1327
  return $result;
1328
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  return apply_filters( 'bp_core_get_table_prefix', $wpdb->base_prefix );
85
  }
86
 
87
+ /**
88
+ * Format numbers the BuddyPress way
89
+ *
90
+ * @param str $number
91
+ * @param bool $decimals
92
+ * @return str
93
+ */
94
+ function bp_core_number_format( $number, $decimals = false ) {
95
+
96
+ // Force number to 0 if needed
97
+ if ( empty( $number ) )
98
+ $number = 0;
99
+
100
+ return apply_filters( 'bp_core_number_format', number_format_i18n( $number, $decimals ), $number, $decimals );
101
+ }
102
+
103
+ /**
104
+ * A utility for parsing individual function arguments into an array.
105
+ *
106
+ * The purpose of this function is to help with backward compatibility in cases where
107
+ *
108
+ * function foo( $bar = 1, $baz = false, $barry = array(), $blip = false ) { // ...
109
+ *
110
+ * is deprecated in favor of
111
+ *
112
+ * function foo( $args = array() ) {
113
+ * $defaults = array(
114
+ * 'bar' => 1,
115
+ * 'arg2' => false,
116
+ * 'arg3' => array(),
117
+ * 'arg4' => false,
118
+ * );
119
+ * $r = wp_parse_args( $args, $defaults ); // ...
120
+ *
121
+ * The first argument, $old_args_keys, is an array that matches the parameter positions (keys) to
122
+ * the new $args keys (values):
123
+ *
124
+ * $old_args_keys = array(
125
+ * 0 => 'bar', // because $bar was the 0th parameter for foo()
126
+ * 1 => 'baz', // because $baz was the 1st parameter for foo()
127
+ * 2 => 'barry', // etc
128
+ * 3 => 'blip'
129
+ * );
130
+ *
131
+ * For the second argument, $func_args, you should just pass the value of func_get_args().
132
+ *
133
+ * @since BuddyPress (1.6)
134
+ * @param array $old_args_keys
135
+ * @param array $func_args
136
+ * @return array $new_args
137
+ */
138
+ function bp_core_parse_args_array( $old_args_keys, $func_args ) {
139
+ $new_args = array();
140
+
141
+ foreach( $old_args_keys as $arg_num => $arg_key ) {
142
+ if ( isset( $func_args[$arg_num] ) ) {
143
+ $new_args[$arg_key] = $func_args[$arg_num];
144
+ }
145
+ }
146
+
147
+ return $new_args;
148
+ }
149
+
150
+ /**
151
+ * Sanitize an 'order' parameter for use in building SQL queries
152
+ *
153
+ * Strings like 'DESC', 'desc', ' desc' will be interpreted into 'DESC'.
154
+ * Everything else becomes 'ASC'.
155
+ *
156
+ * @since BuddyPress (1.8)
157
+ * @param string $order The 'order' string, as passed to the SQL constructor
158
+ * @return string The sanitized value 'DESC' or 'ASC'
159
+ */
160
+ function bp_esc_sql_order( $order = '' ) {
161
+ $order = strtoupper( trim( $order ) );
162
+ return 'DESC' === $order ? 'DESC' : 'ASC';
163
+ }
164
+
165
+ /**
166
+ * Are we running username compatibility mode?
167
+ *
168
+ * @package BuddyPress
169
+ * @since BuddyPress (1.5)
170
+ *
171
+ * @uses apply_filters() Filter 'bp_is_username_compatibility_mode' to alter
172
+ * @return bool False when compatibility mode is disabled (default); true when enabled
173
+ * @todo Move to members component?
174
+ */
175
+ function bp_is_username_compatibility_mode() {
176
+ return apply_filters( 'bp_is_username_compatibility_mode', defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) && BP_ENABLE_USERNAME_COMPATIBILITY_MODE );
177
+ }
178
+
179
+ /**
180
+ * Should we use the WP Toolbar?
181
+ *
182
+ * The WP Toolbar, introduced in WP 3.1, is fully supported in BuddyPress as of BP 1.5.
183
+ * For BP 1.6, the WP Toolbar is the default.
184
+ *
185
+ * @return bool False when WP Toolbar support is disabled; true when enabled (default)
186
+ * @since BuddyPress (1.5)
187
+ * @uses apply_filters() Filter 'bp_use_wp_admin_bar' to alter
188
+ */
189
+ function bp_use_wp_admin_bar() {
190
+ $use_admin_bar = true;
191
+
192
+ // Has the WP Toolbar constant been explicity set?
193
+ if ( defined( 'BP_USE_WP_ADMIN_BAR' ) && ! BP_USE_WP_ADMIN_BAR )
194
+ $use_admin_bar = false;
195
+
196
+ // Has the admin chosen to use the BuddyBar during an upgrade?
197
+ elseif ( (bool) bp_get_option( '_bp_force_buddybar', false ) )
198
+ $use_admin_bar = false;
199
+
200
+ return apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar );
201
+ }
202
+
203
+ /** Directory *****************************************************************/
204
+
205
  /**
206
  * Fetches BP pages from the meta table, depending on setup
207
  *
404
  }
405
 
406
  /**
407
+ * This function originally let plugins add support for pages in the root of the install.
408
+ * These root level pages are now handled by actual WordPress pages and this function is now
409
+ * a convenience for compatibility with the new method.
410
  *
411
+ * @global $bp BuddyPress global settings
412
+ * @param $slug str The slug of the component
 
413
  */
414
+ function bp_core_add_root_component( $slug ) {
415
+ global $bp;
416
 
417
+ if ( empty( $bp->pages ) )
418
+ $bp->pages = bp_core_get_directory_pages();
419
 
420
+ $match = false;
 
421
 
422
+ // Check if the slug is registered in the $bp->pages global
423
+ foreach ( (array) $bp->pages as $key => $page ) {
424
+ if ( $key == $slug || $page->slug == $slug )
425
+ $match = true;
426
+ }
 
 
 
 
427
 
428
+ // If there was no match, add a page for this root component
429
+ if ( empty( $match ) ) {
430
+ $bp->add_root[] = $slug;
431
+ }
432
+
433
+ // Make sure that this component is registered as requiring a top-level directory
434
+ if ( isset( $bp->{$slug} ) ) {
435
+ $bp->loaded_components[$bp->{$slug}->slug] = $bp->{$slug}->id;
436
+ $bp->{$slug}->has_directory = true;
437
+ }
438
  }
439
 
440
+ function bp_core_create_root_component_page() {
 
 
 
 
 
 
 
 
 
 
441
  global $bp;
442
 
443
+ $new_page_ids = array();
 
 
444
 
445
+ foreach ( (array) $bp->add_root as $slug )
446
+ $new_page_ids[$slug] = wp_insert_post( array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_title' => ucwords( $slug ), 'post_status' => 'publish', 'post_type' => 'page' ) );
 
447
 
448
+ $page_ids = array_merge( (array) $new_page_ids, (array) bp_core_get_directory_page_ids() );
449
+ bp_core_update_directory_page_ids( $page_ids );
 
 
 
 
450
  }
451
 
452
  /**
453
+ * Adds illegal names to WP so that root components will not conflict with
454
+ * blog names on a subdirectory installation.
 
455
  *
456
+ * For example, it would stop someone creating a blog with the slug "groups".
 
457
  *
458
+ * @todo Deprecate?
 
 
 
459
  */
460
+ function bp_core_add_illegal_names() {
461
+ update_site_option( 'illegal_names', get_site_option( 'illegal_names' ), array() );
462
+ }
463
 
464
+ /** URI ***********************************************************************/
 
465
 
466
+ /**
467
+ * Returns the domain for the root blog.
468
+ * eg: http://domain.com/ OR https://domain.com
469
+ *
470
+ * @package BuddyPress Core
471
+ * @uses get_blog_option() WordPress function to fetch blog meta.
472
+ * @return $domain The domain URL for the blog.
473
+ */
474
+ function bp_core_get_root_domain() {
475
 
476
+ $domain = get_home_url( bp_get_root_blog_id() );
477
 
478
+ return apply_filters( 'bp_core_get_root_domain', $domain );
 
479
  }
 
480
 
481
  /**
482
+ * Performs a status safe wp_redirect() that is compatible with bp_catch_uri()
 
483
  *
484
  * @package BuddyPress Core
485
+ * @uses wp_safe_redirect()
486
  */
487
+ function bp_core_redirect( $location, $status = 302 ) {
 
 
 
 
 
 
 
 
 
 
 
488
 
489
+ // On some setups, passing the value of wp_get_referer() may result in an
490
+ // empty value for $location, which results in an error. Ensure that we
491
+ // have a valid URL.
492
+ if ( empty( $location ) )
493
+ $location = bp_get_root_domain();
494
 
495
+ // Make sure we don't call status_header() in bp_core_do_catch_uri() as this
496
+ // conflicts with wp_redirect() and wp_safe_redirect().
497
+ buddypress()->no_status_set = true;
498
 
499
+ wp_safe_redirect( $location, $status );
500
+ die;
501
  }
502
 
503
  /**
504
+ * Returns the referrer URL without the http(s)://
505
  *
506
+ * @package BuddyPress Core
507
+ * @return The referrer URL
 
508
  */
509
+ function bp_core_referrer() {
510
+ $referer = explode( '/', wp_get_referer() );
511
+ unset( $referer[0], $referer[1], $referer[2] );
512
+ return implode( '/', $referer );
513
+ }
514
 
515
+ /**
516
+ * Get the path of of the current site.
517
+ *
518
+ * @package BuddyPress Core
519
+ *
520
+ * @global object $current_site
521
+ * @return string
522
+ */
523
+ function bp_core_get_site_path() {
524
+ global $current_site;
525
+
526
+ if ( is_multisite() )
527
+ $site_path = $current_site->path;
528
+ else {
529
+ $site_path = (array) explode( '/', home_url() );
530
+
531
+ if ( count( $site_path ) < 2 )
532
+ $site_path = '/';
533
+ else {
534
+ // Unset the first three segments (http(s)://domain.com part)
535
+ unset( $site_path[0] );
536
+ unset( $site_path[1] );
537
+ unset( $site_path[2] );
538
+
539
+ if ( !count( $site_path ) )
540
+ $site_path = '/';
541
+ else
542
+ $site_path = '/' . implode( '/', $site_path ) . '/';
543
+ }
544
+ }
545
+
546
+ return apply_filters( 'bp_core_get_site_path', $site_path );
547
+ }
548
+
549
+ /** Time **********************************************************************/
550
+
551
+ /**
552
+ * Get the current GMT time to save into the DB
553
+ *
554
+ * @package BuddyPress Core
555
+ * @since BuddyPress (1.2.6)
556
+ */
557
+ function bp_core_current_time( $gmt = true ) {
558
+ // Get current time in MYSQL format
559
+ $current_time = current_time( 'mysql', $gmt );
560
+
561
+ return apply_filters( 'bp_core_current_time', $current_time );
562
  }
563
 
564
  /**
570
  * eg: 4 days
571
  * eg: 4 weeks and 6 days
572
  *
573
+ * Note that fractions of minutes are not represented in the return string. So
574
+ * an interval of 3 minutes will be represented by "3 minutes ago", as will an
575
+ * interval of 3 minutes 59 seconds.
576
+ *
577
  * @package BuddyPress Core
578
  * @uses apply_filters() Filter 'bp_core_time_since_pre' to bypass BP's calculations
579
  * @uses apply_filters() Filter 'bp_core_time_since' to modify BP's calculations
595
 
596
  // array of time period chunks
597
  $chunks = array(
598
+ YEAR_IN_SECONDS,
599
+ 30 * DAY_IN_SECONDS,
600
+ WEEK_IN_SECONDS,
601
+ DAY_IN_SECONDS,
602
+ HOUR_IN_SECONDS,
603
+ MINUTE_IN_SECONDS,
604
+ 1
605
  );
606
 
607
  if ( !empty( $older_date ) && !is_numeric( $older_date ) ) {
634
 
635
  // Step one: the first chunk
636
  for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
637
+ $seconds = $chunks[$i];
638
 
639
  // Finding the biggest chunk (if the chunk fits, break)
640
  $count = floor( $since / $seconds );
650
  } else {
651
 
652
  // Set output var
653
+ switch ( $seconds ) {
654
+ case YEAR_IN_SECONDS :
655
+ $output = sprintf( _n( '%s year', '%s years', $count, 'buddypress' ), $count );
656
+ break;
657
+ case 30 * DAY_IN_SECONDS :
658
+ $output = sprintf( _n( '%s month', '%s months', $count, 'buddypress' ), $count );
659
+ break;
660
+ case WEEK_IN_SECONDS :
661
+ $output = sprintf( _n( '%s week', '%s weeks', $count, 'buddypress' ), $count );
662
+ break;
663
+ case DAY_IN_SECONDS :
664
+ $output = sprintf( _n( '%s day', '%s days', $count, 'buddypress' ), $count );
665
+ break;
666
+ case HOUR_IN_SECONDS :
667
+ $output = sprintf( _n( '%s hour', '%s hours', $count, 'buddypress' ), $count );
668
+ break;
669
+ case MINUTE_IN_SECONDS :
670
+ $output = sprintf( _n( '%s minute', '%s minutes', $count, 'buddypress' ), $count );
671
+ break;
672
+ default:
673
+ $output = sprintf( _n( '%s second', '%s seconds', $count, 'buddypress' ), $count );
674
+ }
675
 
676
  // Step two: the second chunk
677
+ // A quirk in the implementation means that this
678
+ // condition fails in the case of minutes and seconds.
679
+ // We've left the quirk in place, since fractions of a
680
+ // minute are not a useful piece of information for our
681
+ // purposes
682
  if ( $i + 2 < $j ) {
683
+ $seconds2 = $chunks[$i + 1];
 
684
  $count2 = floor( ( $since - ( $seconds * $count ) ) / $seconds2 );
685
 
686
  // Add to output var
687
  if ( 0 != $count2 ) {
688
+ $output .= _x( ',', 'Separator in time since', 'buddypress' ) . ' ';
689
+
690
+ switch ( $seconds2 ) {
691
+ case 30 * DAY_IN_SECONDS :
692
+ $output .= sprintf( _n( '%s month', '%s months', $count2, 'buddypress' ), $count2 );
693
+ break;
694
+ case WEEK_IN_SECONDS :
695
+ $output .= sprintf( _n( '%s week', '%s weeks', $count2, 'buddypress' ), $count2 );
696
+ break;
697
+ case DAY_IN_SECONDS :
698
+ $output .= sprintf( _n( '%s day', '%s days', $count2, 'buddypress' ), $count2 );
699
+ break;
700
+ case HOUR_IN_SECONDS :
701
+ $output .= sprintf( _n( '%s hour', '%s hours', $count2, 'buddypress' ), $count2 );
702
+ break;
703
+ case MINUTE_IN_SECONDS :
704
+ $output .= sprintf( _n( '%s minute', '%s minutes', $count2, 'buddypress' ), $count2 );
705
+ break;
706
+ default:
707
+ $output .= sprintf( _n( '%s second', '%s seconds', $count2, 'buddypress' ), $count2 );
708
+ }
709
  }
710
  }
711
 
724
  return apply_filters( 'bp_core_time_since', $output, $older_date, $newer_date );
725
  }
726
 
727
+ /** Messages ******************************************************************/
728
+
729
+ /**
730
+ * Adds a feedback (error/success) message to the WP cookie so it can be
731
+ * displayed after the page reloads.
732
+ *
733
+ * @package BuddyPress Core
734
+ *
735
+ * @global BuddyPress $bp The one true BuddyPress instance
736
+ * @param str $message Feedback to give to user
737
+ * @param str $type updated|success|error|warning
738
+ */
739
+ function bp_core_add_message( $message, $type = '' ) {
740
+ global $bp;
741
+
742
+ // Success is the default
743
+ if ( empty( $type ) )
744
+ $type = 'success';
745
+
746
+ // Send the values to the cookie for page reload display
747
+ @setcookie( 'bp-message', $message, time() + 60 * 60 * 24, COOKIEPATH );
748
+ @setcookie( 'bp-message-type', $type, time() + 60 * 60 * 24, COOKIEPATH );
749
+
750
+ /***
751
+ * Send the values to the $bp global so we can still output messages
752
+ * without a page reload
753
+ */
754
+ $bp->template_message = $message;
755
+ $bp->template_message_type = $type;
756
+ }
757
+
758
+ /**
759
+ * Checks if there is a feedback message in the WP cookie, if so, adds a
760
+ * "template_notices" action so that the message can be parsed into the template
761
+ * and displayed to the user.
762
+ *
763
+ * After the message is displayed, it removes the message vars from the cookie
764
+ * so that the message is not shown to the user multiple times.
765
+ *
766
+ * @package BuddyPress Core
767
+ * @global $bp_message The message text
768
+ * @global $bp_message_type The type of message (error/success)
769
+ * @uses setcookie() Sets a cookie value for the user.
770
+ */
771
+ function bp_core_setup_message() {
772
+ global $bp;
773
+
774
+ if ( empty( $bp->template_message ) && isset( $_COOKIE['bp-message'] ) )
775
+ $bp->template_message = $_COOKIE['bp-message'];
776
+
777
+ if ( empty( $bp->template_message_type ) && isset( $_COOKIE['bp-message-type'] ) )
778
+ $bp->template_message_type = $_COOKIE['bp-message-type'];
779
+
780
+ add_action( 'template_notices', 'bp_core_render_message' );
781
+
782
+ @setcookie( 'bp-message', false, time() - 1000, COOKIEPATH );
783
+ @setcookie( 'bp-message-type', false, time() - 1000, COOKIEPATH );
784
+ }
785
+ add_action( 'bp_actions', 'bp_core_setup_message', 5 );
786
+
787
+ /**
788
+ * Renders a feedback message (either error or success message) to the theme template.
789
+ * The hook action 'template_notices' is used to call this function, it is not called directly.
790
+ *
791
+ * @package BuddyPress Core
792
+ * @global BuddyPress $bp The one true BuddyPress instance
793
+ */
794
+ function bp_core_render_message() {
795
+ global $bp;
796
+
797
+ if ( !empty( $bp->template_message ) ) :
798
+ $type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';
799
+ $content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>
800
+
801
+ <div id="message" class="bp-template-notice <?php echo $type; ?>">
802
+
803
+ <?php echo $content; ?>
804
+
805
+ </div>
806
+
807
+ <?php
808
+
809
+ do_action( 'bp_core_render_message' );
810
+
811
+ endif;
812
+ }
813
+
814
+ /** Last active ***************************************************************/
815
+
816
  /**
817
  * Record user activity to the database. Many functions use a "last active" feature to
818
  * show the length of time since the user was last active.
869
  return apply_filters( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string );
870
  }
871
 
872
+ /** Meta **********************************************************************/
873
+
874
  /**
875
+ * Get the meta_key for a given piece of user metadata
876
  *
877
+ * BuddyPress stores a number of pieces of userdata in the WordPress central usermeta table. In
878
+ * order to allow plugins to enable multiple instances of BuddyPress on a single WP installation,
879
+ * BP's usermeta keys are filtered with this function, so that they can be altered on the fly.
880
  *
881
+ * Plugin authors should use BP's _user_meta() functions, which bakes in bp_get_user_meta_key().
882
+ * $last_active = bp_get_user_meta( $user_id, 'last_activity', true );
883
+ * If you have to use WP's _user_meta() functions for some reason, you should use this function, eg
884
+ * $last_active = get_user_meta( $user_id, bp_get_user_meta_key( 'last_activity' ), true );
885
+ * If using the WP functions, do not not hardcode your meta keys.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
886
  *
887
+ * @package BuddyPress
888
+ * @since BuddyPress (1.5)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
889
  *
890
+ * @uses apply_filters() Filter bp_get_user_meta_key to modify keys individually
891
+ * @param str $key
892
+ * @return str $key
893
  */
894
+ function bp_get_user_meta_key( $key = false ) {
895
+ return apply_filters( 'bp_get_user_meta_key', $key );
 
 
896
  }
897
 
898
  /**
899
+ * Get a piece of usermeta
 
900
  *
901
+ * This is a wrapper for get_user_meta() that allows for easy use of bp_get_user_meta_key(), thereby
902
+ * increasing compatibility with non-standard BP setups.
903
+ *
904
+ * @package BuddyPress
905
+ * @since BuddyPress (1.5)
906
+ *
907
+ * @uses bp_get_user_meta_key() For a filterable version of the meta key
908
+ * @uses get_user_meta() See get_user_meta() docs for more details on parameters
909
+ * @param int $user_id The id of the user whose meta you're fetching
910
+ * @param string $key The meta key to retrieve.
911
+ * @param bool $single Whether to return a single value.
912
+ * @return mixed Will be an array if $single is false. Will be value of meta data field if $single
913
+ * is true.
914
  */
915
+ function bp_get_user_meta( $user_id, $key, $single = false ) {
916
+ return get_user_meta( $user_id, bp_get_user_meta_key( $key ), $single );
917
  }
918
 
919
  /**
920
+ * Update a piece of usermeta
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
921
  *
922
  * This is a wrapper for update_user_meta() that allows for easy use of bp_get_user_meta_key(),
923
  * thereby increasing compatibility with non-standard BP setups.
929
  * @uses update_user_meta() See update_user_meta() docs for more details on parameters
930
  * @param int $user_id The id of the user whose meta you're setting
931
  * @param string $key The meta key to set.
932
+ * @param mixed $value Metadata value.
933
+ * @param mixed $prev_value Optional. Previous value to check before removing.
934
+ * @return bool False on failure, true if success.
935
+ */
936
+ function bp_update_user_meta( $user_id, $key, $value, $prev_value = '' ) {
937
+ return update_user_meta( $user_id, bp_get_user_meta_key( $key ), $value, $prev_value );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
938
  }
939
 
940
  /**
941
+ * Delete a piece of usermeta
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
942
  *
943
+ * This is a wrapper for delete_user_meta() that allows for easy use of bp_get_user_meta_key(),
944
+ * thereby increasing compatibility with non-standard BP setups.
 
 
 
 
945
  *
946
+ * @package BuddyPress
947
+ * @since BuddyPress (1.5)
948
  *
949
+ * @uses bp_get_user_meta_key() For a filterable version of the meta key
950
+ * @uses delete_user_meta() See delete_user_meta() docs for more details on parameters
951
+ * @param int $user_id The id of the user whose meta you're deleting
952
+ * @param string $key The meta key to delete.
953
+ * @param mixed $value Optional. Metadata value.
954
+ * @return bool False for failure. True for success.
955
  */
956
+ function bp_delete_user_meta( $user_id, $key, $value = '' ) {
957
+ return delete_user_meta( $user_id, bp_get_user_meta_key( $key ), $value );
 
 
 
 
 
 
 
 
958
  }
959
 
960
  /** Embeds ********************************************************************/
961
 
962
+ /**
963
+ * Initializes {@link BP_Embed} after everything is loaded.
964
+ *
965
+ * @global object $bp BuddyPress global settings
966
+ * @package BuddyPress Core
967
+ * @since BuddyPress (1.5)
968
+ */
969
+ function bp_embed_init() {
970
+ global $bp;
971
+
972
+ if ( empty( $bp->embed ) )
973
+ $bp->embed = new BP_Embed();
974
+ }
975
+ add_action( 'bp_init', 'bp_embed_init', 9 );
976
+
977
  /**
978
  * Are oembeds allowed in activity items?
979
  *
1088
  return apply_filters( 'bp_core_admin_hook', $hook );
1089
  }
1090
 
1091
+ /** Multisite *****************************************************************/
1092
+
1093
+ /**
1094
+ * Is this the root blog ID?
1095
+ *
1096
+ * @package BuddyPress
1097
+ * @since BuddyPress (1.5)
1098
+ *
1099
+ * @param int $blog_id Optional. Defaults to the current blog id.
1100
+ * @return bool $is_root_blog Returns true if this is bp_get_root_blog_id().
1101
+ */
1102
+ function bp_is_root_blog( $blog_id = 0 ) {
1103
+
1104
+ // Assume false
1105
+ $is_root_blog = false;
1106
+
1107
+ // Use current blog if no ID is passed
1108
+ if ( empty( $blog_id ) )
1109
+ $blog_id = get_current_blog_id();
1110
+
1111
+ // Compare to root blog ID
1112
+ if ( $blog_id == bp_get_root_blog_id() )
1113
+ $is_root_blog = true;
1114
+
1115
+ return (bool) apply_filters( 'bp_is_root_blog', (bool) $is_root_blog );
1116
+ }
1117
+
1118
+ /**
1119
+ * Is this bp_get_root_blog_id()?
1120
+ *
1121
+ * @package BuddyPress
1122
+ * @since BuddyPress (1.5)
1123
+ *
1124
+ * @return int Return the root site ID
1125
+ */
1126
+ function bp_get_root_blog_id() {
1127
+ global $bp;
1128
+
1129
+ return (int) apply_filters( 'bp_get_root_blog_id', (int) $bp->root_blog_id );
1130
+ }
1131
+
1132
+ /**
1133
+ * Are we running multiblog mode?
1134
+ *
1135
+ * Note that BP_ENABLE_MULTIBLOG is different from (but dependent on) WordPress
1136
+ * Multisite. "Multiblog" is BuddyPress setup that allows BuddyPress components
1137
+ * to be viewed on every blog on the network, each with their own settings.
1138
+ *
1139
+ * Thus, instead of having all 'boonebgorges' links go to
1140
+ * http://example.com/members/boonebgorges
1141
+ * on the root blog, each blog will have its own version of the same content, eg
1142
+ * http://site2.example.com/members/boonebgorges (for subdomains)
1143
+ * http://example.com/site2/members/boonebgorges (for subdirectories)
1144
+ *
1145
+ * Multiblog mode is disabled by default, meaning that all BuddyPress content
1146
+ * must be viewed on the root blog. It's also recommended not to use the
1147
+ * BP_ENABLE_MULTIBLOG constant beyond 1.7, as BuddyPress can now be activated
1148
+ * on individual sites.
1149
+ *
1150
+ * Why would you want to use this? Originally it was intended to allow
1151
+ * BuddyPress to live in mu-plugins and be visible on mapped domains. This is
1152
+ * a very small use-case with large architectural shortcomings, so do not go
1153
+ * down this road unless you specifically need to.
1154
+ *
1155
+ * @package BuddyPress
1156
+ * @since BuddyPress (1.5)
1157
+ *
1158
+ * @uses apply_filters() Filter 'bp_is_multiblog_mode' to alter
1159
+ * @return bool False when multiblog mode is disabled (default); true when enabled
1160
+ */
1161
+ function bp_is_multiblog_mode() {
1162
+
1163
+ // Setup some default values
1164
+ $retval = false;
1165
+ $is_multisite = is_multisite();
1166
+ $network_active = bp_is_network_activated();
1167
+ $is_multiblog = defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG;
1168
+
1169
+ // Multisite, Network Activated, and Specifically Multiblog
1170
+ if ( $is_multisite && $network_active && $is_multiblog ) {
1171
+ $retval = true;
1172
+
1173
+ // Multisite, but not network activated
1174
+ } elseif ( $is_multisite && ! $network_active ) {
1175
+ $retval = true;
1176
+ }
1177
+
1178
+ return apply_filters( 'bp_is_multiblog_mode', $retval );
1179
+ }
1180
+
1181
  /**
1182
  * Is BuddyPress active at the network level for this network?
1183
  *
1307
 
1308
  return $result;
1309
  }
1310
+
1311
+ /** Miscellaneous hooks *******************************************************/
1312
+
1313
+ /**
1314
+ * Load the buddypress translation file for current language
1315
+ *
1316
+ * @package BuddyPress Core
1317
+ */
1318
+ function bp_core_load_buddypress_textdomain() {
1319
+ // Try to load via load_plugin_textdomain() first, for future
1320
+ // wordpress.org translation downloads
1321
+ if ( load_plugin_textdomain( 'buddypress', false, 'buddypress/bp-languages' ) ) {
1322
+ return true;
1323
+ }
1324
+
1325
+ // Nothing found in bp-languages, so try to load from WP_LANG_DIR
1326
+ $locale = apply_filters( 'buddypress_locale', get_locale() );
1327
+ $mofile = WP_LANG_DIR . '/buddypress-' . $locale . '.mo';
1328
+
1329
+ return load_textdomain( 'buddypress', $mofile );
1330
+ }
1331
+ add_action ( 'bp_core_loaded', 'bp_core_load_buddypress_textdomain' );
1332
+
1333
+ /**
1334
+ * A javascript free implementation of the search functions in BuddyPress
1335
+ *
1336
+ * @package BuddyPress Core
1337
+ * @param string $slug The slug to redirect to for searching.
1338
+ */
1339
+ function bp_core_action_search_site( $slug = '' ) {
1340
+
1341
+ if ( !bp_is_current_component( bp_get_search_slug() ) )
1342
+ return;
1343
+
1344
+ if ( empty( $_POST['search-terms'] ) ) {
1345
+ bp_core_redirect( bp_get_root_domain() );
1346
+ return;
1347
+ }
1348
+
1349
+ $search_terms = stripslashes( $_POST['search-terms'] );
1350
+ $search_which = !empty( $_POST['search-which'] ) ? $_POST['search-which'] : '';
1351
+ $query_string = '/?s=';
1352
+
1353
+ if ( empty( $slug ) ) {
1354
+ switch ( $search_which ) {
1355
+ case 'posts':
1356
+ $slug = '';
1357
+ $var = '/?s=';
1358
+
1359
+ // If posts aren't displayed on the front page, find the post page's slug.
1360
+ if ( 'page' == get_option( 'show_on_front' ) ) {
1361
+ $page = get_post( get_option( 'page_for_posts' ) );
1362
+
1363
+ if ( !is_wp_error( $page ) && !empty( $page->post_name ) ) {
1364
+ $slug = $page->post_name;
1365
+ $var = '?s=';
1366
+ }
1367
+ }
1368
+ break;
1369
+
1370
+ case 'blogs':
1371
+ $slug = bp_is_active( 'blogs' ) ? bp_get_blogs_root_slug() : '';
1372
+ break;
1373
+
1374
+ case 'forums':
1375
+ $slug = bp_is_active( 'forums' ) ? bp_get_forums_root_slug() : '';
1376
+ $query_string = '/?fs=';
1377
+ break;
1378
+
1379
+ case 'groups':
1380
+ $slug = bp_is_active( 'groups' ) ? bp_get_groups_root_slug() : '';
1381
+ break;
1382
+
1383
+ case 'members':
1384
+ default:
1385
+ $slug = bp_get_members_root_slug();
1386
+ break;
1387
+ }
1388
+
1389
+ if ( empty( $slug ) && 'posts' != $search_which ) {
1390
+ bp_core_redirect( bp_get_root_domain() );
1391
+ return;
1392
+ }
1393
+ }
1394
+
1395
+ bp_core_redirect( apply_filters( 'bp_core_search_site', home_url( $slug . $query_string . urlencode( $search_terms ) ), $search_terms ) );
1396
+ }
1397
+ add_action( 'bp_init', 'bp_core_action_search_site', 7 );
1398
+
1399
+ /**
1400
+ * Prints the generation time in the footer of the site.
1401
+ *
1402
+ * @package BuddyPress Core
1403
+ */
1404
+ function bp_core_print_generation_time() {
1405
+ ?>
1406
+
1407
+ <!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->
1408
+
1409
+ <?php
1410
+ }
1411
+ add_action( 'wp_footer', 'bp_core_print_generation_time' );
bp-core/bp-core-loader.php CHANGED
@@ -70,14 +70,15 @@ class BP_Core extends BP_Component {
70
  } elseif ( $deactivated_components = bp_get_option( 'bp-deactivated-components' ) ) {
71
 
72
  // Trim off namespace and filename
73
- foreach ( (array) $deactivated_components as $component => $value )
74
  $trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) );
 
75
 
76
  // Set globals
77
  $bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed );
78
 
79
  // Setup the active components
80
- $active_components = array_fill_keys( array_diff( array_values( array_merge( $optional_components, $required_components ) ), array_values( $deactivated_components ) ), '1' );
81
 
82
  // Set the active component global
83
  $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components );
70
  } elseif ( $deactivated_components = bp_get_option( 'bp-deactivated-components' ) ) {
71
 
72
  // Trim off namespace and filename
73
+ foreach ( array_keys( (array) $deactivated_components ) as $component ) {
74
  $trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) );
75
+ }
76
 
77
  // Set globals
78
  $bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed );
79
 
80
  // Setup the active components
81
+ $active_components = array_fill_keys( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_values( $bp->deactivated_components ) ), '1' );
82
 
83
  // Set the active component global
84
  $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components );
bp-core/bp-core-options.php CHANGED
@@ -493,7 +493,7 @@ function bp_group_forums_root_id( $default = '0' ) {
493
  * @return int Is anonymous posting allowed?
494
  */
495
  function bp_get_group_forums_root_id( $default = '0' ) {
496
- return (int) apply_filters( 'bp_get_group_forums_root_id', (int) bp_get_option( '_bbp_group_forums_root_id', $default ) );
497
  }
498
 
499
  /**
@@ -507,7 +507,7 @@ function bp_group_forums_root_id( $default = '0' ) {
507
  * @return bool Is group forums enabled or not
508
  */
509
  function bp_is_group_forums_active( $default = true ) {
510
- return (bool) apply_filters( 'bp_is_group_forums_active', (bool) bp_get_option( '_bbp_enable_group_forums', $default ) );
511
  }
512
 
513
  /**
@@ -534,5 +534,5 @@ function bp_is_akismet_active( $default = true ) {
534
  * @return string ID of the subtheme
535
  */
536
  function bp_get_theme_package_id( $default = 'legacy' ) {
537
- return apply_filters( 'bp_get_theme_package_id', get_option( '_bp_theme_package_id', $default ) );
538
  }
493
  * @return int Is anonymous posting allowed?
494
  */
495
  function bp_get_group_forums_root_id( $default = '0' ) {
496
+ return (int) apply_filters( 'bp_get_group_forums_root_id', (int) bp_get_option( '_bp_group_forums_root_id', $default ) );
497
  }
498
 
499
  /**
507
  * @return bool Is group forums enabled or not
508
  */
509
  function bp_is_group_forums_active( $default = true ) {
510
+ return (bool) apply_filters( 'bp_is_group_forums_active', (bool) bp_get_option( '_bp_enable_group_forums', $default ) );
511
  }
512
 
513
  /**
534
  * @return string ID of the subtheme
535
  */
536
  function bp_get_theme_package_id( $default = 'legacy' ) {
537
+ return apply_filters( 'bp_get_theme_package_id', bp_get_option( '_bp_theme_package_id', $default ) );
538
  }
bp-core/bp-core-template-loader.php CHANGED
@@ -211,10 +211,7 @@ function bp_buffer_template_part( $slug, $name = null, $echo = true ) {
211
  add_filter( 'the_content', 'bp_replace_the_content' );
212
 
213
  // Get the output buffer contents
214
- $output = ob_get_contents();
215
-
216
- // Flush the output buffer
217
- ob_end_clean();
218
 
219
  // Echo or return the output buffer contents
220
  if ( true === $echo ) {
@@ -341,19 +338,38 @@ function bp_template_include_theme_supports( $template = '' ) {
341
  // Look for root BuddyPress template files in parent/child themes
342
  $new_template = apply_filters( 'bp_get_root_template', false, $template );
343
 
344
- // BuddyPress template file exists
 
345
  if ( !empty( $new_template ) ) {
346
-
347
- // Override the WordPress template with a BuddyPress one
348
- $template = $new_template;
349
-
350
- // @see: bp_template_include_theme_compat()
351
- buddypress()->theme_compat->found_template = true;
352
  }
353
 
354
  return apply_filters( 'bp_template_include_theme_supports', $template );
355
  }
356
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  /**
358
  * Attempt to load a custom BuddyPress functions file, similar to each themes
359
  * functions.php file.
211
  add_filter( 'the_content', 'bp_replace_the_content' );
212
 
213
  // Get the output buffer contents
214
+ $output = ob_get_clean();
 
 
 
215
 
216
  // Echo or return the output buffer contents
217
  if ( true === $echo ) {
338
  // Look for root BuddyPress template files in parent/child themes
339
  $new_template = apply_filters( 'bp_get_root_template', false, $template );
340
 
341
+ // A BuddyPress template file was located, so override the WordPress
342
+ // template and use it to switch off BuddyPress's theme compatibility.
343
  if ( !empty( $new_template ) ) {
344
+ $template = bp_set_template_included( $new_template );
 
 
 
 
 
345
  }
346
 
347
  return apply_filters( 'bp_template_include_theme_supports', $template );
348
  }
349
 
350
+ /**
351
+ * Set the included template
352
+ *
353
+ * @since BuddyPress (1.8)
354
+ * @param mixed $template Default false
355
+ * @return mixed False if empty. Template name if template included
356
+ */
357
+ function bp_set_template_included( $template = false ) {
358
+ buddypress()->theme_compat->found_template = $template;
359
+
360
+ return buddypress()->theme_compat->found_template;
361
+ }
362
+
363
+ /**
364
+ * Is a BuddyPress template being included?
365
+ *
366
+ * @since BuddyPress (1.8)
367
+ * @return bool True if yes, false if no
368
+ */
369
+ function bp_is_template_included() {
370
+ return ! empty( buddypress()->theme_compat->found_template );
371
+ }
372
+
373
  /**
374
  * Attempt to load a custom BuddyPress functions file, similar to each themes
375
  * functions.php file.
bp-core/bp-core-template.php CHANGED
@@ -1597,7 +1597,7 @@ function bp_is_register_page() {
1597
  function bp_the_body_class() {
1598
  echo bp_get_the_body_class();
1599
  }
1600
- function bp_get_the_body_class( $wp_classes, $custom_classes = false ) {
1601
 
1602
  $bp_classes = array();
1603
 
@@ -1891,19 +1891,30 @@ function bp_get_nav_menu_items() {
1891
  * Displays a navigation menu.
1892
  *
1893
  * @param string|array $args Optional arguments:
1894
- * before - Text before the link text.
1895
- * container - Whether to wrap the ul, and what to wrap it with. Defaults to div.
1896
- * container_class - The class that is applied to the container. Defaults to 'menu-bp-container'.
1897
- * container_id - The ID that is applied to the container. Defaults to blank.
1898
- * depth - How many levels of the hierarchy are to be included. 0 means all. Defaults to 0.
1899
- * echo - Whether to echo the menu or return it. Defaults to echo.
1900
- * fallback_cb - If the menu doesn't exists, a callback function will fire. Defaults to false (no fallback).
1901
- * items_wrap - How the list items should be wrapped. Defaults to a ul with an id and class. Uses printf() format with numbered placeholders.
1902
- * link_after - Text after the link.
1903
- * link_before - Text before the link.
1904
- * menu_class - CSS class to use for the ul element which forms the menu. Defaults to 'menu'.
1905
- * menu_id - The ID that is applied to the ul element which forms the menu. Defaults to 'menu-bp', incremented.
1906
- * walker - Allows a custom walker to be specified. Defaults to 'BP_Walker_Nav_Menu'.
 
 
 
 
 
 
 
 
 
 
 
1907
  * @since BuddyPress (1.7)
1908
  */
1909
  function bp_nav_menu( $args = array() ) {
1597
  function bp_the_body_class() {
1598
  echo bp_get_the_body_class();
1599
  }
1600
+ function bp_get_the_body_class( $wp_classes = array(), $custom_classes = false ) {
1601
 
1602
  $bp_classes = array();
1603
 
1891
  * Displays a navigation menu.
1892
  *
1893
  * @param string|array $args Optional arguments:
1894
+ * - before Text before the link text.
1895
+ * - container Whether to wrap the ul, and what to wrap it with.
1896
+ * Defaults to div.
1897
+ * - container_class The class that is applied to the container. Defaults to
1898
+ * 'menu-bp-container'.
1899
+ * - container_id The ID that is applied to the container. Defaults to
1900
+ * blank.
1901
+ * - depth How many levels of the hierarchy are to be included. 0
1902
+ * means all. Defaults to 0.
1903
+ * - echo Whether to echo the menu or return it. Defaults to echo.
1904
+ * - fallback_cb If the menu doesn't exists, a callback function will
1905
+ * fire. Defaults to false (no fallback).
1906
+ * - items_wrap How the list items should be wrapped. Defaults to a ul
1907
+ * with an id and class. Uses printf() format with numbered
1908
+ * placeholders.
1909
+ * - link_after Text after the link.
1910
+ * - link_before Text before the link.
1911
+ * - menu_class CSS class to use for the ul element which forms the menu.
1912
+ * Defaults to 'menu'.
1913
+ * - menu_id The ID that is applied to the ul element which forms the
1914
+ * menu. Defaults to 'menu-bp', incremented.
1915
+ * - walker Allows a custom walker to be specified. Defaults to
1916
+ * 'BP_Walker_Nav_Menu'.
1917
+ *
1918
  * @since BuddyPress (1.7)
1919
  */
1920
  function bp_nav_menu( $args = array() ) {
bp-core/bp-core-theme-compatibility.php CHANGED
@@ -336,6 +336,7 @@ function bp_register_theme_package( $theme = array(), $override = true ) {
336
  $bp->theme_compat->packages[$theme->id] = $theme;
337
  }
338
  }
 
339
  /**
340
  * This fun little function fills up some WordPress globals with dummy data to
341
  * stop your average page template from complaining about it missing.
@@ -348,43 +349,9 @@ function bp_register_theme_package( $theme = array(), $override = true ) {
348
  function bp_theme_compat_reset_post( $args = array() ) {
349
  global $wp_query, $post;
350
 
351
- // Default arguments
352
- $defaults = array(
353
- 'ID' => -9999,
354
- 'post_status' => 'publish',
355
- 'post_author' => 0,
356
- 'post_parent' => 0,
357
- 'post_type' => 'page',
358
- 'post_date' => 0,
359
- 'post_date_gmt' => 0,
360
- 'post_modified' => 0,
361
- 'post_modified_gmt' => 0,
362
- 'post_content' => '',
363
- 'post_title' => '',
364
- 'post_category' => 0,
365
- 'post_excerpt' => '',
366
- 'post_content_filtered' => '',
367
- 'post_mime_type' => '',
368
- 'post_password' => '',
369
- 'post_name' => '',
370
- 'guid' => '',
371
- 'menu_order' => 0,
372
- 'pinged' => '',
373
- 'to_ping' => '',
374
- 'ping_status' => '',
375
- 'comment_status' => 'closed',
376
- 'comment_count' => 0,
377
-
378
- 'is_404' => false,
379
- 'is_page' => false,
380
- 'is_single' => false,
381
- 'is_archive' => false,
382
- 'is_tax' => false,
383
- );
384
-
385
  // Switch defaults if post is set
386
  if ( isset( $wp_query->post ) ) {
387
- $defaults = array(
388
  'ID' => $wp_query->post->ID,
389
  'post_status' => $wp_query->post->post_status,
390
  'post_author' => $wp_query->post->post_author,
@@ -408,52 +375,60 @@ function bp_theme_compat_reset_post( $args = array() ) {
408
  'ping_status' => $wp_query->post->ping_status,
409
  'comment_status' => $wp_query->post->comment_status,
410
  'comment_count' => $wp_query->post->comment_count,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
 
412
- 'is_404' => false,
413
- 'is_page' => false,
414
- 'is_single' => false,
415
- 'is_archive' => false,
416
- 'is_tax' => false,
417
- );
418
  }
419
- $dummy = wp_parse_args( $args, $defaults ); //, 'theme_compat_reset_post' );
420
-
421
- // Clear out the post related globals
422
- unset( $wp_query->posts );
423
- unset( $wp_query->post );
424
- unset( $post );
425
-
426
- // Setup the dummy post object
427
- $wp_query->post = new stdClass;
428
- $wp_query->post->ID = $dummy['ID'];
429
- $wp_query->post->post_status = $dummy['post_status'];
430
- $wp_query->post->post_author = $dummy['post_author'];
431
- $wp_query->post->post_parent = $dummy['post_parent'];
432
- $wp_query->post->post_type = $dummy['post_type'];
433
- $wp_query->post->post_date = $dummy['post_date'];
434
- $wp_query->post->post_date_gmt = $dummy['post_date_gmt'];
435
- $wp_query->post->post_modified = $dummy['post_modified'];
436
- $wp_query->post->post_modified_gmt = $dummy['post_modified_gmt'];
437
- $wp_query->post->post_content = $dummy['post_content'];
438
- $wp_query->post->post_title = $dummy['post_title'];
439
- $wp_query->post->post_excerpt = $dummy['post_excerpt'];
440
- $wp_query->post->post_content_filtered = $dummy['post_content_filtered'];
441
- $wp_query->post->post_mime_type = $dummy['post_mime_type'];
442
- $wp_query->post->post_password = $dummy['post_password'];
443
- $wp_query->post->post_name = $dummy['post_name'];
444
- $wp_query->post->guid = $dummy['guid'];
445
- $wp_query->post->menu_order = $dummy['menu_order'];
446
- $wp_query->post->pinged = $dummy['pinged'];
447
- $wp_query->post->to_ping = $dummy['to_ping'];
448
- $wp_query->post->ping_status = $dummy['ping_status'];
449
- $wp_query->post->comment_status = $dummy['comment_status'];
450
- $wp_query->post->comment_count = $dummy['comment_count'];
451
 
452
  // Set the $post global
453
- $post = $wp_query->post;
454
 
455
- // Setup the dummy post loop
456
- $wp_query->posts[0] = $wp_query->post;
 
457
 
458
  // Prevent comments form from appearing
459
  $wp_query->post_count = 1;
@@ -463,8 +438,20 @@ function bp_theme_compat_reset_post( $args = array() ) {
463
  $wp_query->is_archive = $dummy['is_archive'];
464
  $wp_query->is_tax = $dummy['is_tax'];
465
 
 
 
 
 
 
 
 
 
 
 
 
 
466
  // If we are resetting a post, we are in theme compat
467
- bp_set_theme_compat_active();
468
  }
469
 
470
  /**
@@ -518,24 +505,19 @@ function bp_template_include_theme_compat( $template = '' ) {
518
  * Uses bp_get_theme_compat_templates() to provide fall-backs that
519
  * should be coded without superfluous mark-up and logic (prev/next
520
  * navigation, comments, date/time, etc...)
 
 
 
521
  */
522
  if ( bp_is_theme_compat_active() ) {
 
523
 
524
- // Remove all filters from the_content
525
- bp_remove_all_filters( 'the_content' );
526
-
527
- // Add a filter on the_content late, which we will later remove
528
- if ( ! has_filter( 'the_content', 'bp_replace_the_content' ) ) {
529
- add_filter( 'the_content', 'bp_replace_the_content' );
530
- }
531
 
532
  // Add BuddyPress's head action to wp_head
533
  if ( ! has_action( 'wp_head', 'bp_head' ) ) {
534
  add_action( 'wp_head', 'bp_head' );
535
  }
536
-
537
- // Find the appropriate template file
538
- $template = bp_get_theme_compat_templates();
539
  }
540
 
541
  return apply_filters( 'bp_template_include_theme_compat', $template );
@@ -552,13 +534,19 @@ function bp_template_include_theme_compat( $template = '' ) {
552
  */
553
  function bp_replace_the_content( $content = '' ) {
554
 
555
- if ( ! in_the_loop() )
 
556
  return $content;
557
 
 
 
 
 
 
558
  $new_content = apply_filters( 'bp_replace_the_content', $content );
559
 
560
  // Juggle the content around and try to prevent unsightly comments
561
- if ( !empty( $new_content ) && ( $new_content != $content ) ) {
562
 
563
  // Set the content to be the new content
564
  $content = $new_content;
@@ -574,6 +562,16 @@ function bp_replace_the_content( $content = '' ) {
574
  return $content;
575
  }
576
 
 
 
 
 
 
 
 
 
 
 
577
  /** Filters *******************************************************************/
578
 
579
  /**
336
  $bp->theme_compat->packages[$theme->id] = $theme;
337
  }
338
  }
339
+
340
  /**
341
  * This fun little function fills up some WordPress globals with dummy data to
342
  * stop your average page template from complaining about it missing.
349
  function bp_theme_compat_reset_post( $args = array() ) {
350
  global $wp_query, $post;
351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  // Switch defaults if post is set
353
  if ( isset( $wp_query->post ) ) {
354
+ $dummy = wp_parse_args( $args, array(
355
  'ID' => $wp_query->post->ID,
356
  'post_status' => $wp_query->post->post_status,
357
  'post_author' => $wp_query->post->post_author,
375
  'ping_status' => $wp_query->post->ping_status,
376
  'comment_status' => $wp_query->post->comment_status,
377
  'comment_count' => $wp_query->post->comment_count,
378
+ 'filter' => $wp_query->post->filter,
379
+
380
+ 'is_404' => false,
381
+ 'is_page' => false,
382
+ 'is_single' => false,
383
+ 'is_archive' => false,
384
+ 'is_tax' => false,
385
+ ) );
386
+ } else {
387
+ $dummy = wp_parse_args( $args, array(
388
+ 'ID' => -9999,
389
+ 'post_status' => 'public',
390
+ 'post_author' => 0,
391
+ 'post_parent' => 0,
392
+ 'post_type' => 'page',
393
+ 'post_date' => 0,
394
+ 'post_date_gmt' => 0,
395
+ 'post_modified' => 0,
396
+ 'post_modified_gmt' => 0,
397
+ 'post_content' => '',
398
+ 'post_title' => '',
399
+ 'post_excerpt' => '',
400
+ 'post_content_filtered' => '',
401
+ 'post_mime_type' => '',
402
+ 'post_password' => '',
403
+ 'post_name' => '',
404
+ 'guid' => '',
405
+ 'menu_order' => 0,
406
+ 'pinged' => '',
407
+ 'to_ping' => '',
408
+ 'ping_status' => '',
409
+ 'comment_status' => 'closed',
410
+ 'comment_count' => 0,
411
+ 'filter' => 'raw',
412
+
413
+ 'is_404' => false,
414
+ 'is_page' => false,
415
+ 'is_single' => false,
416
+ 'is_archive' => false,
417
+ 'is_tax' => false,
418
+ ) );
419
+ }
420
 
421
+ // Bail if dummy post is empty
422
+ if ( empty( $dummy ) ) {
423
+ return;
 
 
 
424
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425
 
426
  // Set the $post global
427
+ $post = new WP_Post( (object) $dummy );
428
 
429
+ // Copy the new post global into the main $wp_query
430
+ $wp_query->post = $post;
431
+ $wp_query->posts = array( $post );
432
 
433
  // Prevent comments form from appearing
434
  $wp_query->post_count = 1;
438
  $wp_query->is_archive = $dummy['is_archive'];
439
  $wp_query->is_tax = $dummy['is_tax'];
440
 
441
+ // Clean up the dummy post
442
+ unset( $dummy );
443
+
444
+ /**
445
+ * Force the header back to 200 status if not a deliberate 404
446
+ *
447
+ * @see http://bbpress.trac.wordpress.org/ticket/1973
448
+ */
449
+ if ( ! $wp_query->is_404() ) {
450
+ status_header( 200 );
451
+ }
452
+
453
  // If we are resetting a post, we are in theme compat
454
+ bp_set_theme_compat_active( true );
455
  }
456
 
457
  /**
505
  * Uses bp_get_theme_compat_templates() to provide fall-backs that
506
  * should be coded without superfluous mark-up and logic (prev/next
507
  * navigation, comments, date/time, etc...)
508
+ *
509
+ * Hook into 'bp_get_buddypress_template' to override the array of
510
+ * possible templates, or 'bp_buddypress_template' to override the result.
511
  */
512
  if ( bp_is_theme_compat_active() ) {
513
+ $template = bp_get_theme_compat_templates();
514
 
515
+ add_filter( 'the_content', 'bp_replace_the_content' );
 
 
 
 
 
 
516
 
517
  // Add BuddyPress's head action to wp_head
518
  if ( ! has_action( 'wp_head', 'bp_head' ) ) {
519
  add_action( 'wp_head', 'bp_head' );
520
  }
 
 
 
521
  }
522
 
523
  return apply_filters( 'bp_template_include_theme_compat', $template );
534
  */
535
  function bp_replace_the_content( $content = '' ) {
536
 
537
+ // Bail if not the main loop where theme compat is happening
538
+ if ( ! bp_do_theme_compat() )
539
  return $content;
540
 
541
+ // Set theme compat to false early, to avoid recursion from nested calls to
542
+ // the_content() that execute before theme compat has unhooked itself.
543
+ bp_set_theme_compat_active( false );
544
+
545
+ // Do we have new content to replace the old content?
546
  $new_content = apply_filters( 'bp_replace_the_content', $content );
547
 
548
  // Juggle the content around and try to prevent unsightly comments
549
+ if ( !empty( $new_content ) && ( $new_content !== $content ) ) {
550
 
551
  // Set the content to be the new content
552
  $content = $new_content;
562
  return $content;
563
  }
564
 
565
+ /**
566
+ * Are we replacing the_content
567
+ *
568
+ * @since BuddyPress (1.8)
569
+ * @return bool
570
+ */
571
+ function bp_do_theme_compat() {
572
+ return (bool) ( ! bp_is_template_included() && in_the_loop() && bp_is_theme_compat_active() );
573
+ }
574
+
575
  /** Filters *******************************************************************/
576
 
577
  /**
bp-core/bp-core-widgets.php CHANGED
@@ -17,7 +17,7 @@ class BP_Core_Members_Widget extends WP_Widget {
17
  function __construct() {
18
  $widget_ops = array(
19
  'description' => __( 'A dynamic list of recently active, popular, and newest members', 'buddypress' ),
20
- 'classname' => 'widget_bp_core_members_widget buddypress',
21
  );
22
  parent::__construct( false, $name = _x( '(BuddyPress) Members', 'widget name', 'buddypress' ), $widget_ops );
23
 
@@ -34,9 +34,11 @@ class BP_Core_Members_Widget extends WP_Widget {
34
  if ( !$instance['member_default'] )
35
  $instance['member_default'] = 'active';
36
 
 
 
37
  echo $before_widget;
38
 
39
- $title = $instance['link_title'] ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) . '">' . $instance['title'] . '</a>' : $instance['title'];
40
 
41
  echo $before_title
42
  . $title
@@ -44,12 +46,12 @@ class BP_Core_Members_Widget extends WP_Widget {
44
 
45
  <?php if ( bp_has_members( 'user_id=0&type=' . $instance['member_default'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
46
  <div class="item-options" id="members-list-options">
47
- <a href="<?php echo site_url( bp_get_members_root_slug() ); ?>" id="newest-members" <?php if ( $instance['member_default'] == 'newest' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Newest', 'buddypress' ) ?></a>
48
- | <a href="<?php echo site_url( bp_get_members_root_slug() ); ?>" id="recently-active-members" <?php if ( $instance['member_default'] == 'active' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Active', 'buddypress' ) ?></a>
49
 
50
  <?php if ( bp_is_active( 'friends' ) ) : ?>
51
 
52
- | <a href="<?php echo site_url( bp_get_members_root_slug() ); ?>" id="popular-members" <?php if ( $instance['member_default'] == 'popular' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Popular', 'buddypress' ) ?></a>
53
 
54
  <?php endif; ?>
55
  </div>
@@ -148,18 +150,20 @@ class BP_Core_Whos_Online_Widget extends WP_Widget {
148
  function __construct() {
149
  $widget_ops = array(
150
  'description' => __( 'Avatars of users who are currently online', 'buddypress' ),
151
- 'classname' => 'widget_bp_core_whos_online_widget buddypress',
152
  );
153
  parent::__construct( false, $name = _x( "(BuddyPress) Who's Online", 'widget name', 'buddypress' ), $widget_ops );
154
  }
155
 
156
  function widget($args, $instance) {
157
 
158
- extract( $args );
 
 
159
 
160
  echo $before_widget;
161
  echo $before_title
162
- . $instance['title']
163
  . $after_title; ?>
164
 
165
  <?php if ( bp_has_members( 'user_id=0&type=online&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
@@ -215,7 +219,7 @@ class BP_Core_Recently_Active_Widget extends WP_Widget {
215
  function __construct() {
216
  $widget_ops = array(
217
  'description' => __( 'Avatars of recently active members', 'buddypress' ),
218
- 'classname' => 'widget_bp_core_recently_active_widget buddypress',
219
  );
220
  parent::__construct( false, $name = _x( '(BuddyPress) Recently Active Members', 'widget name', 'buddypress' ), $widget_ops );
221
  }
@@ -224,9 +228,11 @@ class BP_Core_Recently_Active_Widget extends WP_Widget {
224
 
225
  extract( $args );
226
 
 
 
227
  echo $before_widget;
228
  echo $before_title
229
- . $instance['title']
230
  . $after_title; ?>
231
 
232
  <?php if ( bp_has_members( 'user_id=0&type=active&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
17
  function __construct() {
18
  $widget_ops = array(
19
  'description' => __( 'A dynamic list of recently active, popular, and newest members', 'buddypress' ),
20
+ 'classname' => 'widget_bp_core_members_widget buddypress widget',
21
  );
22
  parent::__construct( false, $name = _x( '(BuddyPress) Members', 'widget name', 'buddypress' ), $widget_ops );
23
 
34
  if ( !$instance['member_default'] )
35
  $instance['member_default'] = 'active';
36
 
37
+ $title = apply_filters( 'widget_title', $instance['title'] );
38
+
39
  echo $before_widget;
40
 
41
+ $title = $instance['link_title'] ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) . '">' . $title . '</a>' : $title;
42
 
43
  echo $before_title
44
  . $title
46
 
47
  <?php if ( bp_has_members( 'user_id=0&type=' . $instance['member_default'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
48
  <div class="item-options" id="members-list-options">
49
+ <a href="<?php bp_members_directory_permalink(); ?>" id="newest-members" <?php if ( $instance['member_default'] == 'newest' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Newest', 'buddypress' ) ?></a>
50
+ | <a href="<?php bp_members_directory_permalink(); ?>" id="recently-active-members" <?php if ( $instance['member_default'] == 'active' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Active', 'buddypress' ) ?></a>
51
 
52
  <?php if ( bp_is_active( 'friends' ) ) : ?>
53
 
54
+ | <a href="<?php bp_members_directory_permalink(); ?>" id="popular-members" <?php if ( $instance['member_default'] == 'popular' ) : ?>class="selected"<?php endif; ?>><?php _e( 'Popular', 'buddypress' ) ?></a>
55
 
56
  <?php endif; ?>
57
  </div>
150
  function __construct() {
151
  $widget_ops = array(
152
  'description' => __( 'Avatars of users who are currently online', 'buddypress' ),
153
+ 'classname' => 'widget_bp_core_whos_online_widget buddypress widget',
154
  );
155
  parent::__construct( false, $name = _x( "(BuddyPress) Who's Online", 'widget name', 'buddypress' ), $widget_ops );
156
  }
157
 
158
  function widget($args, $instance) {
159
 
160
+ extract( $args );
161
+
162
+ $title = apply_filters( 'widget_title', $instance['title'] );
163
 
164
  echo $before_widget;
165
  echo $before_title
166
+ . $title
167
  . $after_title; ?>
168
 
169
  <?php if ( bp_has_members( 'user_id=0&type=online&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
219
  function __construct() {
220
  $widget_ops = array(
221
  'description' => __( 'Avatars of recently active members', 'buddypress' ),
222
+ 'classname' => 'widget_bp_core_recently_active_widget buddypress widget',
223
  );
224
  parent::__construct( false, $name = _x( '(BuddyPress) Recently Active Members', 'widget name', 'buddypress' ), $widget_ops );
225
  }
228
 
229
  extract( $args );
230
 
231
+ $title = apply_filters( 'widget_title', $instance['title'] );
232
+
233
  echo $before_widget;
234
  echo $before_title
235
+ . $title
236
  . $after_title; ?>
237
 
238
  <?php if ( bp_has_members( 'user_id=0&type=active&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=1' ) ) : ?>
bp-core/deprecated/1.2.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Retrieve sitewide activity
5
+ *
6
+ * You should use bp_activity_get() instead
7
+ *
8
+ * @since BuddyPress (1.0)
9
+ * @deprecated BuddyPress (1.2)
10
+ *
11
+ * @param array $args
12
+ *
13
+ * @uses BP_Activity_Activity::get() {@link BP_Activity_Activity}
14
+ *
15
+ * @return object $activity The activity/activities object
16
+ */
17
+ function bp_activity_get_sitewide( $args = '' ) {
18
+ _deprecated_function( __FUNCTION__, '1.2', 'bp_activity_get()' );
19
+
20
+ $defaults = array(
21
+ 'max' => false, // Maximum number of results to return
22
+ 'page' => 1, // page 1 without a per_page will result in no pagination.
23
+ 'per_page' => false, // results per page
24
+ 'sort' => 'DESC', // sort ASC or DESC
25
+ 'display_comments' => false, // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item
26
+
27
+ 'search_terms' => false, // Pass search terms as a string
28
+ 'show_hidden' => false, // Show activity items that are hidden site-wide?
29
+
30
+ /**
31
+ * Pass filters as an array:
32
+ * array(
33
+ * 'user_id' => false, // user_id to filter on
34
+ * 'object' => false, // object to filter on e.g. groups, profile, status, friends
35
+ * 'action' => false, // action to filter on e.g. new_wire_post, new_forum_post, profile_updated
36
+ * 'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
37
+ * 'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
38
+ * );
39
+ */
40
+ 'filter' => array()
41
+ );
42
+
43
+ $args = wp_parse_args( $args, $defaults );
44
+
45
+ return apply_filters( 'bp_activity_get_sitewide', BP_Activity_Activity::get( $args ), $r );
46
+ }
47
+
48
+
bp-forums/bp-forums-loader.php CHANGED
@@ -82,6 +82,12 @@ class BP_Forums_Component extends BP_Component {
82
  if ( !defined( 'BB_PATH' ) )
83
  $includes[] = 'bbpress-sa';
84
 
 
 
 
 
 
 
85
  parent::includes( $includes );
86
  }
87
 
82
  if ( !defined( 'BB_PATH' ) )
83
  $includes[] = 'bbpress-sa';
84
 
85
+ // Admin-specific code
86
+ if ( is_admin() ) {
87
+ $includes[] = 'deprecated/1.6';
88
+ $includes[] = 'deprecated/1.7';
89
+ }
90
+
91
  parent::includes( $includes );
92
  }
93
 
bp-forums/deprecated/1.6.php CHANGED
@@ -14,8 +14,26 @@
14
  // Exit if accessed directly
15
  if ( !defined( 'ABSPATH' ) ) exit;
16
 
 
 
 
17
  function bp_forums_bbpress_admin() {
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?>
20
 
21
  <div class="wrap">
@@ -37,15 +55,21 @@ function bp_forums_bbpress_admin() {
37
 
38
  // Delete the bb-config.php location option
39
  bp_delete_option( 'bb-config-location' );
 
 
 
 
 
40
  bp_forums_bbpress_install_wizard();
41
 
42
  else : ?>
43
 
44
- <div>
45
- <h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
46
 
47
  <p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
48
- <p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
 
49
 
50
  <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
51
  <ul class="description" style="list-style: square; margin-left: 30px;">
@@ -56,7 +80,30 @@ function bp_forums_bbpress_admin() {
56
  </ul>
57
 
58
  <div>
59
- <a class="button button-primary" href="<?php echo $action ?>"><?php _e( 'Reinstall Group Forums', 'buddypress' ) ?></a> &nbsp;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  </div>
61
  </div>
62
 
@@ -67,10 +114,28 @@ function bp_forums_bbpress_admin() {
67
  }
68
 
69
  function bp_forums_bbpress_install_wizard() {
70
- $post_url = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
 
71
 
72
  $step = isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : '';
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  switch( $step ) {
75
  case 'existing':
76
  if ( isset( $_REQUEST['doinstall'] ) && ( 1 == (int) $_REQUEST['doinstall'] ) ) {
@@ -98,7 +163,7 @@ function bp_forums_bbpress_install_wizard() {
98
  break;
99
 
100
  case 'new':
101
- if ( isset( $_REQUEST['doinstall'] ) && 1 == (int) $_REQUEST['doinstall'] ) {
102
  $result = bp_forums_bbpress_install();
103
 
104
  switch ( $result ) {
@@ -141,11 +206,12 @@ function bp_forums_bbpress_install_wizard() {
141
  wp_admin_css( 'plugin-install' );
142
  ?>
143
 
144
- <div>
145
  <h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
146
 
147
  <p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
148
- <p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
 
149
 
150
  <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
151
  <ul class="description" style="list-style: square; margin-left: 30px;">
@@ -161,6 +227,28 @@ function bp_forums_bbpress_install_wizard() {
161
  </div>
162
  </div>
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  <?php }
165
  break;
166
  }
14
  // Exit if accessed directly
15
  if ( !defined( 'ABSPATH' ) ) exit;
16
 
17
+ /**
18
+ * Outputs the markup for the bb-forums-admin panel
19
+ */
20
  function bp_forums_bbpress_admin() {
21
 
22
+ // The text and URL of the Site Wide Forums button differs depending on whether bbPress
23
+ // is running
24
+ if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
25
+ // The bbPress admin page will always be on the root blog. switch_to_blog() will
26
+ // pass through if we're already there.
27
+ switch_to_blog( bp_get_root_blog_id() );
28
+ $button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) );
29
+ restore_current_blog();
30
+
31
+ $button_text = __( 'Configure bbPress', 'buddypress' );
32
+ } else {
33
+ $button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) );
34
+ $button_text = __( 'Install bbPress', 'buddypress' );
35
+ }
36
+
37
  $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?>
38
 
39
  <div class="wrap">
55
 
56
  // Delete the bb-config.php location option
57
  bp_delete_option( 'bb-config-location' );
58
+
59
+ // Now delete the bb-config.php file
60
+ @unlink( ABSPATH . 'bb-config.php' );
61
+
62
+ // show the updated wizard
63
  bp_forums_bbpress_install_wizard();
64
 
65
  else : ?>
66
 
67
+ <div style="width: 45%; float: left; margin-top: 20px;">
68
+ <h3><?php _e( '(Installed)', 'buddypress' ); ?> <?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
69
 
70
  <p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
71
+
72
+ <p><?php _e( 'Note: This component is retired and will not be receiving any updates in the future. Only use this component if your current site relies on it.' , 'buddypress' ); ?></p>
73
 
74
  <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
75
  <ul class="description" style="list-style: square; margin-left: 30px;">
80
  </ul>
81
 
82
  <div>
83
+ <a class="button button-primary confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> &nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
88
+ <h3><?php _e( 'New! bbPress', 'buddypress' ) ?></h3>
89
+ <p><?php _e( 'bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', 'buddypress' ) ?></p>
90
+
91
+ <p><?php _e( 'It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', 'buddypress' ) ?></p>
92
+
93
+ <ul class="description" style="list-style: square; margin-left: 30px;">
94
+ <li><?php _e( 'Non-group specific forum creation', 'buddypress' ); ?></p></li>
95
+ <li><?php _e( 'Moderation via the WP admin dashboard', 'buddypress' ); ?></p></li>
96
+ <li><?php _e( 'Topic splitting', 'buddypress' ); ?></p></li>
97
+ <li><?php _e( 'Revisions', 'buddypress' ); ?></p></li>
98
+ <li><?php _e( 'Spam management', 'buddypress' ); ?></p></li>
99
+ <li><?php _e( 'Subscriptions', 'buddypress' ); ?></p></li>
100
+ <li><?php _e( 'And more!', 'buddypress' ); ?></p></li>
101
+ </ul>
102
+
103
+ <p><?php printf( __( 'If you decide to use bbPress, you will need to deactivate the legacy group forum component. For more info, <a href="%s">read this codex article</a>.', 'buddypress' ), 'http://codex.buddypress.org/user/setting-up-a-new-installation/installing-group-and-sitewide-forums/using-bbpress-2-2-with-buddypress/' ) ?></p>
104
+
105
+ <div>
106
+ <a class="button thickbox button-primary" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
107
  </div>
108
  </div>
109
 
114
  }
115
 
116
  function bp_forums_bbpress_install_wizard() {
117
+ $post_url = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
118
+ $bbpress_plugin_is_active = false;
119
 
120
  $step = isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : '';
121
 
122
+ // The text and URL of the Site Wide Forums button differs depending on whether bbPress
123
+ // is running
124
+ if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
125
+ $bbpress_plugin_is_active = true;
126
+
127
+ // The bbPress admin page will always be on the root blog. switch_to_blog() will
128
+ // pass through if we're already there.
129
+ switch_to_blog( bp_get_root_blog_id() );
130
+ $button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) );
131
+ restore_current_blog();
132
+
133
+ $button_text = __( 'Configure bbPress', 'buddypress' );
134
+ } else {
135
+ $button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) );
136
+ $button_text = __( 'Install bbPress', 'buddypress' );
137
+ }
138
+
139
  switch( $step ) {
140
  case 'existing':
141
  if ( isset( $_REQUEST['doinstall'] ) && ( 1 == (int) $_REQUEST['doinstall'] ) ) {
163
  break;
164
 
165
  case 'new':
166
+ if ( isset( $_REQUEST['doinstall'] ) && 1 == (int)$_REQUEST['doinstall'] ) {
167
  $result = bp_forums_bbpress_install();
168
 
169
  switch ( $result ) {
206
  wp_admin_css( 'plugin-install' );
207
  ?>
208
 
209
+ <div style="width: 45%; float: left; margin-top: 20px;">
210
  <h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
211
 
212
  <p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
213
+
214
+ <p><?php _e( 'Note: This component is retired and will not be receiving any updates in the future. Only use this component if your current site relies on it.' , 'buddypress' ); ?></p>
215
 
216
  <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
217
  <ul class="description" style="list-style: square; margin-left: 30px;">
227
  </div>
228
  </div>
229
 
230
+ <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
231
+ <h3><?php _e( 'New! bbPress', 'buddypress' ) ?></h3>
232
+ <p><?php _e( 'bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', 'buddypress' ) ?></p>
233
+
234
+ <p><?php _e( 'It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', 'buddypress' ) ?></p>
235
+
236
+ <ul class="description" style="list-style: square; margin-left: 30px;">
237
+ <li><?php _e( 'Non-group specific forum creation', 'buddypress' ); ?></p></li>
238
+ <li><?php _e( 'Moderation via the WP admin dashboard', 'buddypress' ); ?></p></li>
239
+ <li><?php _e( 'Topic splitting', 'buddypress' ); ?></p></li>
240
+ <li><?php _e( 'Revisions', 'buddypress' ); ?></p></li>
241
+ <li><?php _e( 'Spam management', 'buddypress' ); ?></p></li>
242
+ <li><?php _e( 'Subscriptions', 'buddypress' ); ?></p></li>
243
+ <li><?php _e( 'And more!', 'buddypress' ); ?></p></li>
244
+ </ul>
245
+
246
+ <p><?php printf( __( 'If you decide to use bbPress, you will need to deactivate the legacy group forum component. For more info, <a href="%s">read this codex article</a>.', 'buddypress' ), 'http://codex.buddypress.org/user/setting-up-a-new-installation/installing-group-and-sitewide-forums/using-bbpress-2-2-with-buddypress/' ) ?></p>
247
+ <div>
248
+ <a class="button button-primary <?php if ( ! $bbpress_plugin_is_active ) { echo esc_attr( 'thickbox' ); }?>" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
249
+ </div>
250
+ </div>
251
+
252
  <?php }
253
  break;
254
  }
bp-forums/deprecated/1.7.php CHANGED
@@ -29,235 +29,6 @@ function bp_forums_add_admin_menu() {
29
  }
30
  add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' );
31
 
32
- /**
33
- * Outputs the markup for the bb-forums-admin panel
34
- */
35
- function bp_forums_bbpress_admin() {
36
-
37
- // The text and URL of the Site Wide Forums button differs depending on whether bbPress
38
- // is running
39
- if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
40
- // The bbPress admin page will always be on the root blog. switch_to_blog() will
41
- // pass through if we're already there.
42
- switch_to_blog( bp_get_root_blog_id() );
43
- $button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) );
44
- restore_current_blog();
45
-
46
- $button_text = __( 'Configure Site Wide Forums', 'buddypress' );
47
- } else {
48
- $button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) );
49
- $button_text = __( 'Install Site Wide Forums', 'buddypress' );
50
- }
51
-
52
- $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?>
53
-
54
- <div class="wrap">
55
- <?php screen_icon( 'buddypress' ); ?>
56
-
57
- <h2 class="nav-tab-wrapper"><?php bp_core_admin_tabs( __( 'Forums', 'buddypress' ) ); ?></h2>
58
-
59
- <?php if ( isset( $_POST['submit'] ) ) : ?>
60
-
61
- <div id="message" class="updated fade">
62
- <p><?php _e( 'Settings Saved.', 'buddypress' ) ?></p>
63
- </div>
64
-
65
- <?php endif; ?>
66
-
67
- <?php
68
-
69
- if ( isset( $_REQUEST['reinstall'] ) || !bp_forums_is_installed_correctly() ) :
70
-
71
- // Delete the bb-config.php location option
72
- bp_delete_option( 'bb-config-location' );
73
-
74
- // Now delete the bb-config.php file
75
- @unlink( ABSPATH . 'bb-config.php' );
76
-
77
- // show the updated wizard
78
- bp_forums_bbpress_install_wizard();
79
-
80
- else : ?>
81
-
82
- <div style="width: 45%; float: left; margin-top: 20px;">
83
- <h3><?php _e( '(Installed)', 'buddypress' ); ?> <?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
84
-
85
- <p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
86
- <p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
87
-
88
- <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
89
- <ul class="description" style="list-style: square; margin-left: 30px;">
90
- <li><?php _e( 'Group Integration', 'buddypress' ); ?></p></li>
91
- <li><?php _e( 'Member Profile Integration', 'buddypress' ); ?></p></li>
92
- <li><?php _e( 'Activity Stream Integration', 'buddypress' ); ?></p></li>
93
- <li><?php _e( '@ Mention Integration', 'buddypress' ); ?></p></li>
94
- </ul>
95
-
96
- <div>
97
- <a class="button button-primary confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> &nbsp;
98
- </div>
99
- </div>
100
-
101
- <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
102
- <h3><?php _e( 'New! Site Wide Forums', 'buddypress' ) ?></h3>
103
- <p><?php _e( 'Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress' ) ?></p>
104
- <p class="description"><?php _e( 'You may activate both Group and Site Wide forums, but this may create a poor experience for your members.', 'buddypress' ) ?></p>
105
-
106
- <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
107
- <ul class="description" style="list-style: square; margin-left: 30px;">
108
- <li><?php _e( 'Central Discussion Area', 'buddypress' ); ?></p></li>
109
- <li><?php _e( 'Forum Plugins Available', 'buddypress' ); ?></p></li>
110
- <li><?php _e( 'Activity Stream Integration', 'buddypress' ); ?></p></li>
111
- <li><?php _e( '@ Mention Integration', 'buddypress' ); ?></p></li>
112
- </ul>
113
-
114
- <div>
115
- <a class="button thickbox button-primary" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
116
- </div>
117
- </div>
118
-
119
- <?php endif; ?>
120
-
121
- <p class="clear description"><?php printf( __( 'Need help deciding between Group Forums and Site Wide Forums? Visit <a href="%s">the BuddyPress codex</a> for more information.', 'buddypress' ), 'http://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/' ) ?></p>
122
- </div>
123
- <?php
124
- }
125
-
126
- function bp_forums_bbpress_install_wizard() {
127
- $post_url = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
128
- $bbpress_plugin_is_active = false;
129
-
130
- $step = isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : '';
131
-
132
- // The text and URL of the Site Wide Forums button differs depending on whether bbPress
133
- // is running
134
- if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
135
- $bbpress_plugin_is_active = true;
136
-
137
- // The bbPress admin page will always be on the root blog. switch_to_blog() will
138
- // pass through if we're already there.
139
- switch_to_blog( bp_get_root_blog_id() );
140
- $button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) );
141
- restore_current_blog();
142
-
143
- $button_text = __( 'Configure Site Wide Forums', 'buddypress' );
144
- } else {
145
- $button_url = bp_get_admin_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500' ), 'plugin-install.php' ) );
146
- $button_text = __( 'Install Site Wide Forums', 'buddypress' );
147
- }
148
-
149
- switch( $step ) {
150
- case 'existing':
151
- if ( isset( $_REQUEST['doinstall'] ) && ( 1 == (int) $_REQUEST['doinstall'] ) ) {
152
- if ( !bp_forums_configure_existing_install() ) {
153
- _e( 'The bb-config.php file was not found at that location, please try again.', 'buddypress' );
154
- } else {
155
- ?>
156
- <h3><?php _e( 'Forums were set up correctly using your existing bbPress install!', 'buddypress' ) ?></h3>
157
- <p><?php _e( 'BuddyPress will now use its internal copy of bbPress to run the forums on your site. If you wish, you can remove your old bbPress installation files, as long as you keep the bb-config.php file in the same location.', 'buddypress' ) ?></p><?php
158
- }
159
- } else { ?>
160
-
161
- <form action="" method="post">
162
- <h3><?php _e( 'Existing bbPress Installation', 'buddypress' ) ?></h3>
163
- <p><?php _e( "BuddyPress can make use of your existing bbPress install. Just provide the location of your <code>bb-config.php</code> file, and BuddyPress will do the rest.", 'buddypress' ) ?></p>
164
- <p><label><code>bb-config.php</code> file location:</label><br /><input style="width: 50%" type="text" name="bbconfigloc" id="bbconfigloc" value="<?php echo str_replace( 'buddypress', '', $_SERVER['DOCUMENT_ROOT'] ) ?>" /></p>
165
- <p><input type="submit" class="button-primary" value="<?php _e( 'Complete Installation', 'buddypress' ) ?>" /></p>
166
- <input type="hidden" name="step" value="existing" />
167
- <input type="hidden" name="doinstall" value="1" />
168
- <?php wp_nonce_field( 'bp_forums_existing_install_init' ) ?>
169
- </form>
170
-
171
- <?php
172
- }
173
- break;
174
-
175
- case 'new':
176
- if ( isset( $_REQUEST['doinstall'] ) && 1 == (int)$_REQUEST['doinstall'] ) {
177
- $result = bp_forums_bbpress_install();
178
-
179
- switch ( $result ) {
180
- case 1:
181
- _e( '<p>All done! Configuration settings have been saved to the file <code>bb-config.php</code> in the root of your WordPress install.</p>', 'buddypress' );
182
- break;
183
- default:
184
- // Just write the contents to screen
185
- _e( '<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>', 'buddypress' ); ?>
186
-
187
- <textarea style="display:block; margin-top: 30px; width: 80%;" rows="50"><?php echo htmlspecialchars( $result ); ?></textarea>
188
-
189
- <?php
190
- break;
191
- }
192
- } else { ?>
193
-
194
- <h3><?php _e( 'New bbPress Installation', 'buddypress' ) ?></h3>
195
- <p><?php _e( "You've decided to set up a new installation of bbPress for forum management in BuddyPress. This is very simple and is usually just a one click
196
- process. When you're ready, hit the link below.", 'buddypress' ) ?></p>
197
- <p><a class="button-primary" href="<?php echo wp_nonce_url( $post_url . '&step=new&doinstall=1', 'bp_forums_new_install_init' ) ?>"><?php _e( 'Complete Installation', 'buddypress' ) ?></a></p>
198
-
199
- <?php
200
- }
201
- break;
202
-
203
- default:
204
- if ( !file_exists( BP_PLUGIN_DIR . '/bp-forums/bbpress/' ) ) { ?>
205
-
206
- <div id="message" class="error">
207
- <p><?php printf( __( 'bbPress files were not found. To install the forums component you must download a copy of bbPress and make sure it is in the folder: "%s"', 'buddypress' ), 'wp-content/plugins/buddypress/bp-forums/bbpress/' ) ?></p>
208
- </div>
209
-
210
- <?php } else {
211
-
212
- // Include the plugin install
213
-
214
- add_thickbox();
215
- wp_enqueue_script( 'plugin-install' );
216
- wp_admin_css( 'plugin-install' );
217
- ?>
218
-
219
- <div style="width: 45%; float: left; margin-top: 20px;">
220
- <h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
221
-
222
- <p><?php _e( 'Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.' , 'buddypress' ); ?></p>
223
- <p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
224
-
225
- <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
226
- <ul class="description" style="list-style: square; margin-left: 30px;">
227
- <li><?php _e( 'Group Integration', 'buddypress' ); ?></p></li>
228
- <li><?php _e( 'Member Profile Integration', 'buddypress' ); ?></p></li>
229
- <li><?php _e( 'Activity Stream Integration', 'buddypress' ); ?></p></li>
230
- <li><?php _e( '@ Mention Integration', 'buddypress' ); ?></p></li>
231
- </ul>
232
-
233
- <div>
234
- <a class="button button-primary" href="<?php echo $post_url . '&step=new' ?>"><?php _e( 'Install Group Forums', 'buddypress' ) ?></a> &nbsp;
235
- <a class="button" href="<?php echo $post_url . '&step=existing' ?>"><?php _e( 'Use Existing Installation', 'buddypress' ) ?></a>
236
- </div>
237
- </div>
238
-
239
- <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
240
- <h3><?php _e( 'New! Site Wide Forums', 'buddypress' ) ?></h3>
241
- <p><?php _e( 'Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress' ) ?></p>
242
- <p class="description"><?php _e( 'You may activate both Group and Site Wide forums, but this may create a poor experience for your members.', 'buddypress' ) ?></p>
243
-
244
- <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
245
- <ul class="description" style="list-style: square; margin-left: 30px;">
246
- <li><?php _e( 'Central Discussion Area', 'buddypress' ); ?></p></li>
247
- <li><?php _e( 'Forum Plugins Available', 'buddypress' ); ?></p></li>
248
- <li><?php _e( 'Activity Stream Integration', 'buddypress' ); ?></p></li>
249
- <li><?php _e( '@ Mention Integration', 'buddypress' ); ?></p></li>
250
- </ul>
251
- <div>
252
- <a class="button button-primary <?php if ( ! $bbpress_plugin_is_active ) { echo esc_attr( 'thickbox' ); }?>" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
253
- </div>
254
- </div>
255
-
256
- <?php }
257
- break;
258
- }
259
- }
260
-
261
  function bp_forums_configure_existing_install() {
262
  global $wpdb, $bbdb;
263
 
29
  }
30
  add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' );
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  function bp_forums_configure_existing_install() {
33
  global $wpdb, $bbdb;
34
 
bp-friends/bp-friends-functions.php CHANGED
@@ -65,11 +65,15 @@ function friends_remove_friend( $initiator_userid, $friend_userid ) {
65
  // Remove the activity stream item for the user who canceled the friendship
66
  friends_delete_activity( array( 'item_id' => $friendship_id, 'type' => 'friendship_accepted', 'user_id' => bp_displayed_user_id() ) );
67
 
 
 
68
  do_action( 'friends_friendship_deleted', $friendship_id, $initiator_userid, $friend_userid );
69
 
70
  if ( $friendship->delete() ) {
71
  friends_update_friend_totals( $initiator_userid, $friend_userid, 'remove' );
72
 
 
 
73
  return true;
74
  }
75
 
65
  // Remove the activity stream item for the user who canceled the friendship
66
  friends_delete_activity( array( 'item_id' => $friendship_id, 'type' => 'friendship_accepted', 'user_id' => bp_displayed_user_id() ) );
67
 
68
+ // This hook is misleadingly named - the friendship is not yet deleted.
69
+ // This is your last chance to do something while the friendship exists
70
  do_action( 'friends_friendship_deleted', $friendship_id, $initiator_userid, $friend_userid );
71
 
72
  if ( $friendship->delete() ) {
73
  friends_update_friend_totals( $initiator_userid, $friend_userid, 'remove' );
74
 
75
+ do_action( 'friends_friendship_post_delete', $initiator_userid, $friend_userid );
76
+
77
  return true;
78
  }
79
 
bp-groups/admin/css/admin.css CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  #bp-groups-edit-form input {
2
  outline: medium none;
3
  padding: 3px 8px;
@@ -14,7 +23,35 @@
14
  .bp-groups-settings-section {
15
  margin-bottom: 15px;
16
  }
 
 
 
 
 
 
 
17
  ul.bp-group-delete-list {
18
  list-style-type: disc;
19
  margin: 4px 26px;
20
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body.toplevel_page_bp-groups table.groups th#status,
2
+ body.toplevel_page_bp-groups table.groups th#members {
3
+ width: 10%;
4
+ }
5
+
6
+ body.toplevel_page_bp-groups table.groups th#last_active {
7
+ width: 15%;
8
+ }
9
+
10
  #bp-groups-edit-form input {
11
  outline: medium none;
12
  padding: 3px 8px;
23
  .bp-groups-settings-section {
24
  margin-bottom: 15px;
25
  }
26
+ .bp-groups-member-type {
27
+ position: relative;
28
+ padding-bottom: 1.7em;
29
+ }
30
+ .bp-groups-member-type > h4 {
31
+ margin-bottom: .5em;
32
+ }
33
  ul.bp-group-delete-list {
34
  list-style-type: disc;
35
  margin: 4px 26px;
36
  }
37
+ .bp-group-admin-pagination {
38
+ position: absolute;
39
+ text-align: right;
40
+ width: 100%;
41
+ }
42
+ .bp-group-admin-pagination.table-top {
43
+ top: 0;
44
+ }
45
+ .bp-group-admin-pagination.table-bottom {
46
+ bottom: 0;
47
+ }
48
+ .bp-group-admin-pagination-viewing {
49
+ font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
50
+ color: #777;
51
+ font-size: 12px;
52
+ font-style: italic;
53
+ }
54
+ .bp-group-admin-pagination-links {
55
+ white-space: nowrap;
56
+ padding-left: 15px;
57
+ }
bp-groups/admin/css/admin.min.css CHANGED
@@ -1 +1 @@
1
- #bp-groups-edit-form input{outline:medium none;padding:3px 8px}#bp-groups-edit-form input#bp-groups-name{font-size:1.7em;width:100%}#bp-groups-edit-form input#bp-groups-new-members{width:100%;max-width:90%;border:0}.bp-groups-settings-section{margin-bottom:15px}ul.bp-group-delete-list{list-style-type:disc;margin:4px 26px}
1
+ body.toplevel_page_bp-groups table.groups th#status,body.toplevel_page_bp-groups table.groups th#members{width:10%}body.toplevel_page_bp-groups table.groups th#last_active{width:15%}#bp-groups-edit-form input{outline:medium none;padding:3px 8px}#bp-groups-edit-form input#bp-groups-name{font-size:1.7em;width:100%}#bp-groups-edit-form input#bp-groups-new-members{width:100%;max-width:90%;border:0}.bp-groups-settings-section{margin-bottom:15px}.bp-groups-member-type{position:relative;padding-bottom:1.7em}.bp-groups-member-type>h4{margin-bottom:.5em}ul.bp-group-delete-list{list-style-type:disc;margin:4px 26px}.bp-group-admin-pagination{position:absolute;text-align:right;width:100%}.bp-group-admin-pagination.table-top{top:0}.bp-group-admin-pagination.table-bottom{bottom:0}.bp-group-admin-pagination-viewing{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;color:#777;font-size:12px;font-style:italic}.bp-group-admin-pagination-links{white-space:nowrap;padding-left:15px}
bp-groups/admin/js/admin.js CHANGED
@@ -11,8 +11,10 @@
11
  $(e.target).closest('li').remove();
12
  }
13
 
14
- var id = 'undefined' !== typeof group_members ? '&group_members=' + group_members : '';
15
  $(document).ready( function() {
 
 
16
  /* Initialize autocomplete */
17
  $( '.bp-suggest-user' ).autocomplete({
18
  source: ajaxurl + '?action=bp_group_admin_member_autocomplete' + id,
@@ -27,5 +29,19 @@
27
  /* Replace noscript placeholder */
28
  $( '#bp-groups-new-members' ).attr( 'placeholder', BP_Group_Admin.add_member_placeholder );
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  });
31
  })(jQuery);
11
  $(e.target).closest('li').remove();
12
  }
13
 
14
+ var id = 'undefined' !== typeof group_id ? '&group_id=' + group_id : '';
15
  $(document).ready( function() {
16
+ window.warn_on_leave = false;
17
+
18
  /* Initialize autocomplete */
19
  $( '.bp-suggest-user' ).autocomplete({
20
  source: ajaxurl + '?action=bp_group_admin_member_autocomplete' + id,
29
  /* Replace noscript placeholder */
30
  $( '#bp-groups-new-members' ).attr( 'placeholder', BP_Group_Admin.add_member_placeholder );
31
 
32
+ /* Warn before leaving unsaved changes */
33
+ $(document).on( 'change', 'input#bp-groups-name, input#bp-groups-description, select.bp-groups-role, #bp-groups-settings-section-status input[type="radio"]', function() {
34
+ window.warn_on_leave = true;
35
+ });
36
+
37
+ $( 'input#save' ).on( 'click', function() {
38
+ window.warn_on_leave = false;
39
+ });
40
+
41
+ window.onbeforeunload = function(e) {
42
+ if ( window.warn_on_leave ) {
43
+ return BP_Group_Admin.warn_on_leave;
44
+ }
45
+ };
46
  });
47
  })(jQuery);
bp-groups/admin/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- (function(c){function b(h,f){var g="bp-groups-remove-new-member-"+f.item.value;c("#bp-groups-new-members-list").append('<li><a href="#" class="bp-groups-remove-new-member" id="'+g+'">x</a> '+f.item.label+"</li>");c("#"+g).bind("click",function(i){a(i);return false});c("#bp-groups-new-members-list").after('<input name="new_members[]" type="hidden" value="'+f.item.value+'" />')}function a(f){c(f.target).closest("li").remove()}var d="undefined"!==typeof group_members?"&group_members="+group_members:"";c(document).ready(function(){c(".bp-suggest-user").autocomplete({source:ajaxurl+"?action=bp_group_admin_member_autocomplete"+d,delay:500,minLength:2,position:("undefined"!==typeof isRtl&&isRtl)?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){c(this).addClass("open")},close:function(){c(this).removeClass("open");c(this).val("")},select:function(e,f){b(e,f)}});c("#bp-groups-new-members").attr("placeholder",BP_Group_Admin.add_member_placeholder)})})(jQuery);
1
+ (function(c){function b(h,f){var g="bp-groups-remove-new-member-"+f.item.value;c("#bp-groups-new-members-list").append('<li><a href="#" class="bp-groups-remove-new-member" id="'+g+'">x</a> '+f.item.label+"</li>");c("#"+g).bind("click",function(i){a(i);return false});c("#bp-groups-new-members-list").after('<input name="new_members[]" type="hidden" value="'+f.item.value+'" />')}function a(f){c(f.target).closest("li").remove()}var d="undefined"!==typeof group_id?"&group_id="+group_id:"";c(document).ready(function(){window.warn_on_leave=false;c(".bp-suggest-user").autocomplete({source:ajaxurl+"?action=bp_group_admin_member_autocomplete"+d,delay:500,minLength:2,position:("undefined"!==typeof isRtl&&isRtl)?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){c(this).addClass("open")},close:function(){c(this).removeClass("open");c(this).val("")},select:function(e,f){b(e,f)}});c("#bp-groups-new-members").attr("placeholder",BP_Group_Admin.add_member_placeholder);c(document).on("change",'input#bp-groups-name, input#bp-groups-description, select.bp-groups-role, #bp-groups-settings-section-status input[type="radio"]',function(){window.warn_on_leave=true});c("input#save").on("click",function(){window.warn_on_leave=false});window.onbeforeunload=function(f){if(window.warn_on_leave){return BP_Group_Admin.warn_on_leave}}})})(jQuery);
bp-groups/bp-groups-actions.php CHANGED
@@ -79,9 +79,6 @@ function groups_action_create_group() {
79
  bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
80
  bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/' );
81
  }
82
-
83
- groups_update_groupmeta( $bp->groups->new_group_id, 'total_member_count', 1 );
84
- groups_update_groupmeta( $bp->groups->new_group_id, 'last_activity', bp_core_current_time() );
85
  }
86
 
87
  if ( 'group-settings' == bp_get_groups_current_create_step() ) {
@@ -307,21 +304,39 @@ function groups_action_redirect_to_random_group() {
307
  }
308
  add_action( 'bp_actions', 'groups_action_redirect_to_random_group' );
309
 
 
 
 
 
 
310
  function groups_action_group_feed() {
311
- global $bp, $wp_query;
312
 
313
- if ( !bp_is_active( 'activity' ) || !bp_is_groups_component() || !isset( $bp->groups->current_group ) || !bp_is_current_action( 'feed' ) )
314
- return false;
315
 
316
- $wp_query->is_404 = false;
317
- status_header( 200 );
318
 
319
- if ( 'public' != $bp->groups->current_group->status ) {
320
- if ( !groups_is_user_member( bp_loggedin_user_id(), $bp->groups->current_group->id ) )
321
- return false;
 
322
  }
323
 
324
- include_once( BP_PLUGIN_DIR . '/bp-activity/feeds/bp-activity-group-feed.php' );
325
- die;
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  }
327
  add_action( 'bp_actions', 'groups_action_group_feed' );
79
  bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
80
  bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/' );
81
  }
 
 
 
82
  }
83
 
84
  if ( 'group-settings' == bp_get_groups_current_create_step() ) {
304
  }
305
  add_action( 'bp_actions', 'groups_action_redirect_to_random_group' );
306
 
307
+ /**
308
+ * Load the activity feed for the specific group.
309
+ *
310
+ * @since BuddyPress (v1.2)
311
+ */
312
  function groups_action_group_feed() {
 
313
 
314
+ // get current group
315
+ $group = groups_get_current_group();
316
 
317
+ if ( ! bp_is_active( 'activity' ) || ! bp_is_groups_component() || ! $group || ! bp_is_current_action( 'feed' ) )
318
+ return false;
319
 
320
+ // if group isn't public or if logged-in user is not a member of the group, do
321
+ // not output the group activity feed
322
+ if ( ! bp_group_is_visible( $group ) ) {
323
+ return false;
324
  }
325
 
326
+ // setup the feed
327
+ buddypress()->activity->feed = new BP_Activity_Feed( array(
328
+ 'id' => 'group',
329
+
330
+ /* translators: Group activity RSS title - "[Site Name] | [Group Name] | Activity" */
331
+ 'title' => sprintf( __( '%1$s | %2$s | Activity', 'buddypress' ), bp_get_site_name(), bp_get_current_group_name() ),
332
+
333
+ 'link' => bp_get_group_permalink( $group ),
334
+ 'description' => sprintf( __( "Activity feed for the group, %s.", 'buddypress' ), bp_get_current_group_name() ),
335
+ 'activity_args' => array(
336
+ 'object' => buddypress()->groups->id,
337
+ 'primary_id' => bp_get_current_group_id(),
338
+ 'display_comments' => 'threaded'
339
+ )
340
+ ) );
341
  }
342
  add_action( 'bp_actions', 'groups_action_group_feed' );
bp-groups/bp-groups-admin.php CHANGED
@@ -166,7 +166,8 @@ function bp_groups_admin_load() {
166
  wp_enqueue_style( 'bp_groups_admin_css', BP_PLUGIN_URL . "bp-groups/admin/css/admin.{$min}css", array(), bp_get_version() );
167
 
168
  wp_localize_script( 'bp_groups_admin_js', 'BP_Group_Admin', array(
169
- 'add_member_placeholder' => __( 'Start typing a username to add a new member.', 'buddypress' )
 
170
  ) );
171
 
172
  if ( $doaction && 'save' == $doaction ) {
@@ -503,7 +504,7 @@ function bp_groups_admin_edit() {
503
 
504
  <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
505
  <div id="post-body-content">
506
- <div id="postdiv" class="postarea">
507
  <div id="bp_groups_name" class="postbox">
508
  <h3><?php _e( 'Name and Description', 'buddypress' ); ?></h3>
509
  <div class="inside">
@@ -621,6 +622,10 @@ function bp_groups_admin_index() {
621
  <h2>
622
  <?php _e( 'Groups', 'buddypress' ); ?>
623
 
 
 
 
 
624
  <?php if ( !empty( $_REQUEST['s'] ) ) : ?>
625
  <span class="subtitle"><?php printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ); ?></span>
626
  <?php endif; ?>
@@ -699,6 +704,8 @@ function bp_groups_admin_edit_metabox_add_new_members( $item ) {
699
  /**
700
  * Members metabox
701
  *
 
 
702
  * @since BuddyPress (1.7)
703
  */
704
  function bp_groups_admin_edit_metabox_members( $item ) {
@@ -707,50 +714,38 @@ function bp_groups_admin_edit_metabox_members( $item ) {
707
  // Pull up a list of group members, so we can separate out the types
708
  // We'll also keep track of group members here to place them into a
709
  // javascript variable, which will help with group member autocomplete
710
- $member_ids = array();
711
- $members = array(
712
  'admin' => array(),
713
  'mod' => array(),
714
  'member' => array(),
715
- 'banned' => array()
716
  );
717
 
718
- if ( bp_group_has_members( array(
719
- 'group_id' => $item->id,
720
- 'exclude_admins_mods' => false,
721
- 'exclude_banned' => false
722
- ) ) ) {
723
- // Get a list of admins and mods, to reduce lookups
724
- // We'll rekey them by user_id for convenience
725
- $admins = $mods = array();
726
-
727
- foreach ( (array) groups_get_group_admins( $item->id ) as $admin_obj ) {
728
- $admins[ $admin_obj->user_id ] = $admin_obj;
729
- }
730
 
731
- foreach ( (array) groups_get_group_mods( $item->id ) as $admin_obj ) {
732
- $mods[ $admin_obj->user_id ] = $admin_obj;
733
- }
 
 
 
 
 
 
 
734
 
735
- while ( bp_group_members() ) {
736
- bp_group_the_member();
737
- if ( bp_get_group_member_is_banned() ) {
738
- $members['banned'][] = $members_template->member;
739
- } else if ( isset( $admins[ bp_get_group_member_id() ] ) ) {
740
- $members['admin'][] = $members_template->member;
741
- } else if ( isset( $mods[ bp_get_group_member_id() ] ) ) {
742
- $members['mod'][] = $members_template->member;
743
- } else {
744
- $members['member'][] = $members_template->member;
745
- }
746
 
747
- $member_ids[] = bp_get_group_member_id();
748
- }
749
  }
750
 
751
  // Echo out the javascript variable
752
- $member_ids = ! empty( $member_ids ) ? implode( ',', $member_ids ) : '';
753
- echo '<script type="text/javascript">var group_members = "' . $member_ids . '";</script>';
754
 
755
  // Loop through each member type
756
  foreach ( $members as $member_type => $type_users ) : ?>
@@ -766,6 +761,10 @@ function bp_groups_admin_edit_metabox_members( $item ) {
766
  endswitch; ?>
767
  </h4>
768
 
 
 
 
 
769
  <?php if ( !empty( $type_users ) ) : ?>
770
 
771
  <table class="widefat bp-group-members">
@@ -780,22 +779,21 @@ function bp_groups_admin_edit_metabox_members( $item ) {
780
  <tbody>
781
 
782
  <?php foreach ( $type_users as $type_user ) : ?>
783
-
784
  <tr>
785
- <th scope="row" class="uid-column"><?php echo esc_html( $type_user->user_id ); ?></th>
786
 
787
  <td class="uname-column">
788
- <a style="float: left;" href="<?php echo bp_core_get_user_domain( $type_user->user_id ); ?>"><?php echo bp_core_fetch_avatar( array(
789
- 'item_id' => $type_user->user_id,
790
  'width' => '32',
791
  'height' => '32'
792
  ) ); ?></a>
793
 
794
- <span style="margin: 8px; float: left;"><?php echo bp_core_get_userlink( $type_user->user_id ) ?></span>
795
  </td>
796
 
797
  <td class="urole-column">
798
- <select class="bp-groups-role" id="bp-groups-role-<?php echo esc_attr( $type_user->user_id ); ?>" name="bp-groups-role[<?php echo esc_attr( $type_user->user_id ); ?>]">
799
  <option value="admin" <?php selected( 'admin', $member_type ) ?>><?php _e( 'Administrator', 'buddypress' ) ?></option>
800
  <option value="mod" <?php selected( 'mod', $member_type ) ?>><?php _e( 'Moderator', 'buddypress' ) ?></option>
801
  <option value="member" <?php selected( 'member', $member_type ) ?>><?php _e( 'Member', 'buddypress' ) ?></option>
@@ -810,15 +808,27 @@ function bp_groups_admin_edit_metabox_members( $item ) {
810
  *
811
  * @todo remove this, and do database detection on save
812
  */ ?>
813
- <input type="hidden" name="bp-groups-existing-role[<?php echo esc_attr( $type_user->user_id ); ?>]" value="<?php echo esc_attr( $member_type ); ?>" />
814
  </td>
815
  </tr>
816
 
 
 
 
 
 
 
 
 
817
  <?php endforeach; ?>
818
 
819
  </tbody>
820
  </table>
821
 
 
 
 
 
822
  <?php else : ?>
823
 
824
  <p class="bp-groups-no-members description"><?php _e( 'No members of this type', 'buddypress' ) ?></p>
@@ -859,6 +869,63 @@ function bp_groups_admin_edit_metabox_status( $item ) {
859
  <?php
860
  }
861
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
862
  /**
863
  * Match a set of user ids up to a set of usernames
864
  *
@@ -890,9 +957,19 @@ function bp_groups_admin_autocomplete_handler() {
890
  $return = array();
891
 
892
  // Exclude current group members
893
- $group_members = isset( $_REQUEST['group_members'] ) ? wp_parse_id_list( $_REQUEST['group_members'] ) : array();
894
- $terms = isset( $_REQUEST['term'] ) ? $_REQUEST['term'] : '';
895
- $users = get_users( array(
 
 
 
 
 
 
 
 
 
 
896
  'blog_id' => false,
897
  'search' => '*' . $terms . '*',
898
  'exclude' => $group_members,
@@ -968,24 +1045,27 @@ class BP_Groups_List_Table extends WP_List_Table {
968
  // Set per page from the screen options
969
  $per_page = $this->get_items_per_page( str_replace( '-', '_', "{$screen->id}_per_page" ) );
970
 
971
- // Sort order. Note: not supported in bp_has_groups()
972
- $order = 'ASC';
973
  if ( !empty( $_REQUEST['order'] ) ) {
974
  $order = ( 'desc' == strtolower( $_REQUEST['order'] ) ) ? 'DESC' : 'ASC';
975
  }
976
 
977
  // Order by - default to newest
978
- $type = 'newest';
979
- if ( !empty( $_REQUEST['orderby'] ) ) {
980
  switch ( $_REQUEST['orderby'] ) {
981
  case 'name' :
982
- $type = 'alphabetical';
983
  break;
984
  case 'id' :
985
- $type = 'newest';
986
  break;
987
  case 'members' :
988
- $type = 'popular';
 
 
 
989
  break;
990
  }
991
  }
@@ -1026,7 +1106,7 @@ class BP_Groups_List_Table extends WP_List_Table {
1026
  'include' => $include,
1027
  'per_page' => $per_page,
1028
  'page' => $page,
1029
- 'type' => $type,
1030
  'order' => $order
1031
  );
1032
 
@@ -1133,7 +1213,8 @@ class BP_Groups_List_Table extends WP_List_Table {
1133
  * @since BuddyPress (1.7)
1134
  */
1135
  function get_views() {
1136
- $url_base = remove_query_arg( array( 'orderby', 'order', 'group_status' ), $_SERVER['REQUEST_URI'] ); ?>
 
1137
  <ul class="subsubsub">
1138
  <li class="all"><a href="<?php echo esc_attr( esc_url( $url_base ) ); ?>" class="<?php if ( 'all' == $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
1139
  <li class="public"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'group_status', 'public', $url_base ) ) ); ?>" class="<?php if ( 'public' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Public <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->group_counts['public'] ) ); ?></a> |</li>
@@ -1178,15 +1259,24 @@ class BP_Groups_List_Table extends WP_List_Table {
1178
  /**
1179
  * Get the column names for sortable columns
1180
  *
 
 
 
 
 
 
 
 
 
1181
  * @return array
1182
  * @since BuddyPress (1.7)
1183
  */
1184
  function get_sortable_columns() {
1185
  return array(
1186
- 'gid' => array( 'gid', false ),
1187
- 'comment' => array( 'name', false ),
1188
- 'members' => array( 'members', false ),
1189
- 'last_active' => array( 'last_active', false )
1190
  );
1191
  }
1192
 
@@ -1198,7 +1288,7 @@ class BP_Groups_List_Table extends WP_List_Table {
1198
  * @since BuddyPress (1.7)
1199
  */
1200
  function column_cb( $item = array() ) {
1201
- printf( '<input type="checkbox" name="gid[]" value="%d" />', (int) $item['id'] );
1202
  }
1203
 
1204
  /**
166
  wp_enqueue_style( 'bp_groups_admin_css', BP_PLUGIN_URL . "bp-groups/admin/css/admin.{$min}css", array(), bp_get_version() );
167
 
168
  wp_localize_script( 'bp_groups_admin_js', 'BP_Group_Admin', array(
169
+ 'add_member_placeholder' => __( 'Start typing a username to add a new member.', 'buddypress' ),
170
+ 'warn_on_leave' => __( 'If you leave this page, you will lose any unsaved changes you have made to the group.', 'buddypress' ),
171
  ) );
172
 
173
  if ( $doaction && 'save' == $doaction ) {
504
 
505
  <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
506
  <div id="post-body-content">
507
+ <div id="postdiv">
508
  <div id="bp_groups_name" class="postbox">
509
  <h3><?php _e( 'Name and Description', 'buddypress' ); ?></h3>
510
  <div class="inside">
622
  <h2>
623
  <?php _e( 'Groups', 'buddypress' ); ?>
624
 
625
+ <?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?>
626
+ <a class="add-new-h2" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a>
627
+ <?php endif; ?>
628
+
629
  <?php if ( !empty( $_REQUEST['s'] ) ) : ?>
630
  <span class="subtitle"><?php printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ); ?></span>
631
  <?php endif; ?>
704
  /**
705
  * Members metabox
706
  *
707
+ * @param obj $item The BP_Groups_Group object
708
+ *
709
  * @since BuddyPress (1.7)
710
  */
711
  function bp_groups_admin_edit_metabox_members( $item ) {
714
  // Pull up a list of group members, so we can separate out the types
715
  // We'll also keep track of group members here to place them into a
716
  // javascript variable, which will help with group member autocomplete
717
+ $members = array(
 
718
  'admin' => array(),
719
  'mod' => array(),
720
  'member' => array(),
721
+ 'banned' => array(),
722
  );
723
 
724
+ $pagination = array(
725
+ 'admin' => array(),
726
+ 'mod' => array(),
727
+ 'member' => array(),
728
+ 'banned' => array(),
729
+ );
 
 
 
 
 
 
730
 
731
+ foreach ( $members as $type => &$member_type_users ) {
732
+ $page_qs_key = $type . '_page';
733
+ $current_type_page = isset( $_GET[ $page_qs_key ] ) ? absint( $_GET[ $page_qs_key ] ) : 1;
734
+ $member_type_query = new BP_Group_Member_Query( array(
735
+ 'group_id' => $item->id,
736
+ 'group_role' => array( $type ),
737
+ 'type' => 'alphabetical',
738
+ 'per_page' => 10,
739
+ 'page' => $current_type_page,
740
+ ) );
741
 
742
+ $member_type_users = $member_type_query->results;
 
 
 
 
 
 
 
 
 
 
743
 
744
+ $pagination[ $type ] = bp_groups_admin_create_pagination_links( $member_type_query, $type );
 
745
  }
746
 
747
  // Echo out the javascript variable
748
+ echo '<script type="text/javascript">var group_id = "' . $item->id . '";</script>';
 
749
 
750
  // Loop through each member type
751
  foreach ( $members as $member_type => $type_users ) : ?>
761
  endswitch; ?>
762
  </h4>
763
 
764
+ <div class="bp-group-admin-pagination table-top">
765
+ <?php echo $pagination[ $member_type ] ?>
766
+ </div>
767
+
768
  <?php if ( !empty( $type_users ) ) : ?>
769
 
770
  <table class="widefat bp-group-members">
779
  <tbody>
780
 
781
  <?php foreach ( $type_users as $type_user ) : ?>
 
782
  <tr>
783
+ <th scope="row" class="uid-column"><?php echo esc_html( $type_user->ID ); ?></th>
784
 
785
  <td class="uname-column">
786
+ <a style="float: left;" href="<?php echo bp_core_get_user_domain( $type_user->ID ); ?>"><?php echo bp_core_fetch_avatar( array(
787
+ 'item_id' => $type_user->ID,
788
  'width' => '32',
789
  'height' => '32'
790
  ) ); ?></a>
791
 
792
+ <span style="margin: 8px; float: left;"><?php echo bp_core_get_userlink( $type_user->ID ) ?></span>
793
  </td>
794
 
795
  <td class="urole-column">
796
+ <select class="bp-groups-role" id="bp-groups-role-<?php echo esc_attr( $type_user->ID ); ?>" name="bp-groups-role[<?php echo esc_attr( $type_user->ID ); ?>]">
797
  <option value="admin" <?php selected( 'admin', $member_type ) ?>><?php _e( 'Administrator', 'buddypress' ) ?></option>
798
  <option value="mod" <?php selected( 'mod', $member_type ) ?>><?php _e( 'Moderator', 'buddypress' ) ?></option>
799
  <option value="member" <?php selected( 'member', $member_type ) ?>><?php _e( 'Member', 'buddypress' ) ?></option>
808
  *
809
  * @todo remove this, and do database detection on save
810
  */ ?>
811
+ <input type="hidden" name="bp-groups-existing-role[<?php echo esc_attr( $type_user->ID ); ?>]" value="<?php echo esc_attr( $member_type ); ?>" />
812
  </td>
813
  </tr>
814
 
815
+ <?php if ( has_filter( 'bp_groups_admin_manage_member_row' ) ) : ?>
816
+ <tr>
817
+ <td colspan="3">
818
+ <?php do_action( 'bp_groups_admin_manage_member_row', $type_user->ID, $item ); ?>
819
+ </td>
820
+ </tr>
821
+ <?php endif; ?>
822
+
823
  <?php endforeach; ?>
824
 
825
  </tbody>
826
  </table>
827
 
828
+ <div class="bp-group-admin-pagination table-bottom">
829
+ <?php echo $pagination[ $member_type ] ?>
830
+ </div>
831
+
832
  <?php else : ?>
833
 
834
  <p class="bp-groups-no-members description"><?php _e( 'No members of this type', 'buddypress' ) ?></p>
869
  <?php
870
  }
871
 
872
+ /**
873
+ * Create pagination links out of a BP_Group_Member_Query
874
+ *
875
+ * This function is intended to create pagination links for use under the
876
+ * Manage Members section of the Groups Admin Dashboard pages. It is a stopgap
877
+ * measure until a more general pagination solution is in place for BuddyPress.
878
+ * Plugin authors should not use this function, as it is likely to be
879
+ * deprecated soon.
880
+ *
881
+ * @since BuddyPress (1.8)
882
+ * @param object $query A BP_Group_Member_Query object
883
+ * @param string $member_type member|mod|admin|banned
884
+ */
885
+ function bp_groups_admin_create_pagination_links( BP_Group_Member_Query $query, $member_type ) {
886
+ $pagination = '';
887
+
888
+ if ( ! in_array( $member_type, array( 'admin', 'mod', 'member', 'banned' ) ) ) {
889
+ return $pagination;
890
+ }
891
+
892
+ // The key used to paginate this member type in the $_GET global
893
+ $qs_key = $member_type . '_page';
894
+ $url_base = remove_query_arg( array( $qs_key, 'updated', 'success_modified' ), $_SERVER['REQUEST_URI'] );
895
+
896
+ $page = isset( $_GET[ $qs_key ] ) ? absint( $_GET[ $qs_key ] ) : 1;
897
+ $per_page = 10; // @todo Make this customizable?
898
+
899
+ // Don't show anything if there's no pagination
900
+ if ( 1 === $page && $query->total_users <= $per_page ) {
901
+ return $pagination;
902
+ }
903
+
904
+ $current_page_start = ( ( $page - 1 ) * $per_page ) + 1;
905
+ $current_page_end = $page * $per_page > intval( $query->total_users ) ? $query->total_users : $page * $per_page;
906
+
907
+ $pag_links = paginate_links( array(
908
+ 'base' => add_query_arg( $qs_key, '%#%', $url_base ),
909
+ 'format' => '',
910
+ 'prev_text' => __( '&laquo;' ),
911
+ 'next_text' => __( '&raquo;' ),
912
+ 'total' => ceil( $query->total_users / $per_page ),
913
+ 'current' => $page,
914
+ ) );
915
+
916
+ $viewing_text = sprintf(
917
+ __( 'Viewing %1$s - %2$s of %3$s', 'buddypress' ),
918
+ number_format_i18n( $current_page_start ),
919
+ number_format_i18n( $current_page_end ),
920
+ sprintf( _n( '%s member', '%s members', $query->total_users, 'buddypress' ), $query->total_users )
921
+ );
922
+
923
+ $pagination .= '<span class="bp-group-admin-pagination-viewing">' . $viewing_text . '</span>';
924
+ $pagination .= '<span class="bp-group-admin-pagination-links">' . $pag_links . '</span>';
925
+
926
+ return $pagination;
927
+ }
928
+
929
  /**
930
  * Match a set of user ids up to a set of usernames
931
  *
957
  $return = array();
958
 
959
  // Exclude current group members
960
+ $group_id = isset( $_GET['group_id'] ) ? wp_parse_id_list( $_GET['group_id'] ) : array();
961
+ $group_member_query = new BP_Group_Member_Query( array(
962
+ 'group_id' => $group_id,
963
+ 'per_page' => 0, // show all
964
+ 'group_type' => array( 'member', 'mod', 'admin', ),
965
+ 'populate_extras' => false,
966
+ 'count_total' => false,
967
+ ) );
968
+
969
+ $group_members = ! empty( $group_member_query->results ) ? wp_list_pluck( $group_member_query->results, 'ID' ) : array();
970
+
971
+ $terms = isset( $_GET['term'] ) ? $_GET['term'] : '';
972
+ $users = get_users( array(
973
  'blog_id' => false,
974
  'search' => '*' . $terms . '*',
975
  'exclude' => $group_members,
1045
  // Set per page from the screen options
1046
  $per_page = $this->get_items_per_page( str_replace( '-', '_', "{$screen->id}_per_page" ) );
1047
 
1048
+ // Sort order.
1049
+ $order = 'DESC';
1050
  if ( !empty( $_REQUEST['order'] ) ) {
1051
  $order = ( 'desc' == strtolower( $_REQUEST['order'] ) ) ? 'DESC' : 'ASC';
1052
  }
1053
 
1054
  // Order by - default to newest
1055
+ $orderby = 'last_activity';
1056
+ if ( ! empty( $_REQUEST['orderby'] ) ) {
1057
  switch ( $_REQUEST['orderby'] ) {
1058
  case 'name' :
1059
+ $orderby = 'name';
1060
  break;
1061
  case 'id' :
1062
+ $orderby = 'date_created';
1063
  break;
1064
  case 'members' :
1065
+ $orderby = 'total_member_count';
1066
+ break;
1067
+ case 'last_active' :
1068
+ $orderby = 'last_activity';
1069
  break;
1070
  }
1071
  }
1106
  'include' => $include,
1107
  'per_page' => $per_page,
1108
  'page' => $page,
1109
+ 'orderby' => $orderby,
1110
  'order' => $order
1111
  );
1112
 
1213
  * @since BuddyPress (1.7)
1214
  */
1215
  function get_views() {
1216
+ $url_base = bp_get_admin_url( 'admin.php?page=bp-groups' ); ?>
1217
+
1218
  <ul class="subsubsub">
1219
  <li class="all"><a href="<?php echo esc_attr( esc_url( $url_base ) ); ?>" class="<?php if ( 'all' == $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
1220
  <li class="public"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'group_status', 'public', $url_base ) ) ); ?>" class="<?php if ( 'public' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Public <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->group_counts['public'] ) ); ?></a> |</li>
1259
  /**
1260
  * Get the column names for sortable columns
1261
  *
1262
+ * Note: It's not documented in WP, but the second item in the
1263
+ * nested arrays below is $desc_first. Normally, we would set
1264
+ * last_active to be desc_first (since you're generally interested in
1265
+ * the *most* recently active group, not the *least*). But because
1266
+ * the default sort for the Groups admin screen is DESC by last_active,
1267
+ * we want the first click on the Last Active column header to switch
1268
+ * the sort order - ie, to make it ASC. Thus last_active is set to
1269
+ * $desc_first = false.
1270
+ *
1271
  * @return array
1272
  * @since BuddyPress (1.7)
1273
  */
1274
  function get_sortable_columns() {
1275
  return array(
1276
+ 'gid' => array( 'gid', false ),
1277
+ 'comment' => array( 'name', false ),
1278
+ 'members' => array( 'members', false ),
1279
+ 'last_active' => array( 'last_active', false ),
1280
  );
1281
  }
1282
 
1288
  * @since BuddyPress (1.7)
1289
  */
1290
  function column_cb( $item = array() ) {
1291
+ printf( '<label class="screen-reader-text" for="aid-%1$d">' . __( 'Select group %1$d', 'buddypress' ) . '</label><input type="checkbox" name="aid[]" value="%1$d" id="aid-%1$d" />', $item['id'] );
1292
  }
1293
 
1294
  /**
bp-groups/bp-groups-cache.php CHANGED
@@ -94,10 +94,12 @@ add_action( 'bp_groups_delete_group', 'bp_groups_clear_group_members_caches', 10
94
  function groups_clear_group_user_object_cache( $group_id, $user_id ) {
95
  wp_cache_delete( 'bp_total_groups_for_user_' . $user_id, 'bp' );
96
  }
97
- add_action( 'groups_join_group', 'groups_clear_group_user_object_cache', 10, 2 );
98
- add_action( 'groups_leave_group', 'groups_clear_group_user_object_cache', 10, 2 );
99
- add_action( 'groups_ban_member', 'groups_clear_group_user_object_cache', 10, 2 );
100
- add_action( 'groups_unban_member', 'groups_clear_group_user_object_cache', 10, 2 );
 
 
101
 
102
  /* List actions to clear super cached pages on, if super cache is installed */
103
  add_action( 'groups_join_group', 'bp_core_clear_cache' );
94
  function groups_clear_group_user_object_cache( $group_id, $user_id ) {
95
  wp_cache_delete( 'bp_total_groups_for_user_' . $user_id, 'bp' );
96
  }
97
+ add_action( 'groups_join_group', 'groups_clear_group_user_object_cache', 10, 2 );
98
+ add_action( 'groups_leave_group', 'groups_clear_group_user_object_cache', 10, 2 );
99
+ add_action( 'groups_ban_member', 'groups_clear_group_user_object_cache', 10, 2 );
100
+ add_action( 'groups_unban_member', 'groups_clear_group_user_object_cache', 10, 2 );
101
+ add_action( 'groups_uninvite_user', 'groups_clear_group_user_object_cache', 10, 2 );
102
+ add_action( 'groups_remove_member', 'groups_clear_group_user_object_cache', 10, 2 );
103
 
104
  /* List actions to clear super cached pages on, if super cache is installed */
105
  add_action( 'groups_join_group', 'bp_core_clear_cache' );
bp-groups/bp-groups-classes.php CHANGED
@@ -91,6 +91,8 @@ class BP_Groups_Group {
91
  else
92
  $this->mods[] = $user;
93
  }
 
 
94
  }
95
  }
96
 
@@ -332,19 +334,21 @@ class BP_Groups_Group {
332
  }
333
 
334
  $defaults = array(
335
- 'type' => 'newest',
 
 
336
  'per_page' => null,
337
  'page' => null,
338
  'user_id' => 0,
339
  'search_terms' => false,
 
340
  'include' => false,
341
  'populate_extras' => true,
342
  'exclude' => false,
343
- 'show_hidden' => false
344
  );
345
 
346
  $r = wp_parse_args( $args, $defaults );
347
- extract( $r );
348
 
349
  $sql = array();
350
  $total_sql = array();
@@ -352,59 +356,92 @@ class BP_Groups_Group {
352
  $sql['select'] = "SELECT g.*, gm1.meta_value AS total_member_count, gm2.meta_value AS last_activity";
353
  $sql['from'] = " FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2,";
354
 
355
- if ( !empty( $user_id ) )
356
  $sql['members_from'] = " {$bp->groups->table_name_members} m,";
 
357
 
358
  $sql['group_from'] = " {$bp->groups->table_name} g WHERE";
359
 
360
- if ( !empty( $user_id ) )
361
  $sql['user_where'] = " g.id = m.group_id AND";
 
362
 
363
  $sql['where'] = " g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count'";
364
 
365
- if ( empty( $show_hidden ) )
366
  $sql['hidden'] = " AND g.status != 'hidden'";
 
367
 
368
- if ( !empty( $search_terms ) ) {
369
- $search_terms = esc_sql( like_escape( $search_terms ) );
370
  $sql['search'] = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
371
  }
372
 
373
- if ( !empty( $user_id ) )
374
- $sql['user'] = $wpdb->prepare( " AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $user_id );
 
 
 
 
 
 
 
 
 
 
 
 
375
 
376
- if ( !empty( $include ) ) {
377
  $include = wp_parse_id_list( $r['include'] );
378
  $include = $wpdb->escape( implode( ',', $include ) );
379
  $sql['include'] = " AND g.id IN ({$include})";
380
  }
381
 
382
- if ( !empty( $exclude ) ) {
383
  $exclude = wp_parse_id_list( $r['exclude'] );
384
  $exclude = $wpdb->escape( implode( ',', $exclude ) );
385
  $sql['exclude'] = " AND g.id NOT IN ({$exclude})";
386
  }
387
 
388
- switch ( $type ) {
389
- case 'newest': default:
390
- $sql['order'] = " ORDER BY g.date_created DESC";
391
- break;
392
- case 'active':
393
- $sql[] = "ORDER BY last_activity DESC";
394
- break;
395
- case 'popular':
396
- $sql[] = "ORDER BY CONVERT(gm1.meta_value, SIGNED) DESC";
397
- break;
398
- case 'alphabetical':
399
- $sql[] = "ORDER BY g.name ASC";
400
- break;
401
- case 'random':
402
- $sql[] = "ORDER BY rand()";
403
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
  }
405
 
406
- if ( !empty( $per_page ) && !empty( $page ) )
407
- $sql['pagination'] = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $per_page), intval( $per_page ) );
 
408
 
409
  // Get paginated results
410
  $paged_groups_sql = apply_filters( 'bp_groups_get_paged_groups_sql', join( ' ', (array) $sql ), $sql );
@@ -412,25 +449,31 @@ class BP_Groups_Group {
412
 
413
  $total_sql['select'] = "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name} g, {$bp->groups->table_name_members} gm1, {$bp->groups->table_name_groupmeta} gm2";
414
 
415
- if ( !empty( $user_id ) )
416
  $total_sql['select'] .= ", {$bp->groups->table_name_members} m";
 
417
 
418
- if ( !empty( $sql['hidden'] ) )
419
  $total_sql['where'][] = "g.status != 'hidden'";
 
420
 
421
- if ( !empty( $sql['search'] ) )
422
  $total_sql['where'][] = "( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
 
423
 
424
- if ( !empty( $user_id ) )
425
- $total_sql['where'][] = "m.group_id = g.id AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0";
 
426
 
427
  // Already escaped in the paginated results block
428
- if ( ! empty( $include ) )
429
  $total_sql['where'][] = "g.id IN ({$include})";
 
430
 
431
  // Already escaped in the paginated results block
432
- if ( ! empty( $exclude ) )
433
  $total_sql['where'][] = "g.id NOT IN ({$exclude})";
 
434
 
435
  $total_sql['where'][] = "g.id = gm1.group_id";
436
  $total_sql['where'][] = "g.id = gm2.group_id";
@@ -438,8 +481,9 @@ class BP_Groups_Group {
438
 
439
  $t_sql = $total_sql['select'];
440
 
441
- if ( !empty( $total_sql['where'] ) )
442
  $t_sql .= " WHERE " . join( ' AND ', (array) $total_sql['where'] );
 
443
 
444
  // Get total group results
445
  $total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', $t_sql, $total_sql );
@@ -451,9 +495,9 @@ class BP_Groups_Group {
451
  }
452
 
453
  // Populate some extra information instead of querying each time in the loop
454
- if ( !empty( $populate_extras ) ) {
455
  $group_ids = $wpdb->escape( join( ',', (array) $group_ids ) );
456
- $paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, $type );
457
  }
458
 
459
  // Grab all groupmeta
@@ -464,6 +508,136 @@ class BP_Groups_Group {
464
  return array( 'groups' => $paged_groups, 'total' => $total_groups );
465
  }
466
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  function get_by_most_forum_topics( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
468
  global $wpdb, $bp, $bbdb;
469
 
@@ -773,6 +947,182 @@ class BP_Groups_Group {
773
  }
774
  }
775
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
776
  class BP_Groups_Member {
777
  var $id;
778
  var $group_id;
@@ -872,6 +1222,12 @@ class BP_Groups_Member {
872
 
873
  $this->id = $wpdb->insert_id;
874
 
 
 
 
 
 
 
875
  do_action_ref_array( 'groups_member_after_save', array( &$this ) );
876
 
877
  return true;
@@ -902,50 +1258,33 @@ class BP_Groups_Member {
902
  }
903
 
904
  function ban() {
905
-
906
  if ( !empty( $this->is_admin ) )
907
  return false;
908
 
909
  $this->is_mod = 0;
910
  $this->is_banned = 1;
911
 
912
- groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) - 1 ) );
913
-
914
- $group_count = bp_get_user_meta( $this->user_id, 'total_group_count', true );
915
- if ( !empty( $group_count ) )
916
- bp_update_user_meta( $this->user_id, 'total_group_count', (int) $group_count - 1 );
917
-
918
  return $this->save();
919
  }
920
 
921
  function unban() {
922
-
923
  if ( !empty( $this->is_admin ) )
924
  return false;
925
 
926
  $this->is_banned = 0;
927
 
928
- groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) + 1 ) );
929
- bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
930
-
931
  return $this->save();
932
  }
933
 
934
  function accept_invite() {
935
-
936
  $this->inviter_id = 0;
937
  $this->is_confirmed = 1;
938
  $this->date_modified = bp_core_current_time();
939
-
940
- bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
941
  }
942
 
943
  function accept_request() {
944
-
945
  $this->is_confirmed = 1;
946
  $this->date_modified = bp_core_current_time();
947
-
948
- bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
949
  }
950
 
951
  function remove() {
@@ -956,21 +1295,51 @@ class BP_Groups_Member {
956
  if ( !$result = $wpdb->query( $sql ) )
957
  return false;
958
 
959
- groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) - 1 ) );
 
960
 
961
- $group_count = bp_get_user_meta( $this->user_id, 'total_group_count', true );
962
- if ( !empty( $group_count ) )
963
- bp_update_user_meta( $this->user_id, 'total_group_count', (int) $group_count - 1 );
964
 
965
  return $result;
966
  }
967
 
968
  /** Static Methods ********************************************************/
969
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
970
  function delete( $user_id, $group_id ) {
971
  global $wpdb, $bp;
972
 
973
- return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $user_id, $group_id ) );
 
 
 
 
 
 
 
 
974
  }
975
 
976
  function get_group_ids( $user_id, $limit = false, $page = false ) {
@@ -1225,6 +1594,8 @@ class BP_Groups_Member {
1225
  function get_all_for_group( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) {
1226
  global $bp, $wpdb;
1227
 
 
 
1228
  $pag_sql = '';
1229
  if ( !empty( $limit ) && !empty( $page ) )
1230
  $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
@@ -1316,191 +1687,1210 @@ class BP_Groups_Member {
1316
  * API for creating group extensions without having to hardcode the content into
1317
  * the theme.
1318
  *
1319
- * This class must be extended for each group extension and the following methods overridden:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1320
  *
1321
- * BP_Group_Extension::widget_display(), BP_Group_Extension::display(),
1322
- * BP_Group_Extension::edit_screen_save(), BP_Group_Extension::edit_screen(),
1323
- * BP_Group_Extension::create_screen_save(), BP_Group_Extension::create_screen()
 
 
 
 
 
 
1324
  *
1325
  * @package BuddyPress
1326
  * @subpackage Groups
1327
  * @since BuddyPress (1.1)
1328
  */
1329
  class BP_Group_Extension {
1330
- var $name = false;
1331
- var $slug = false;
1332
-
1333
- // The name/slug of the Group Admin tab for this extension
1334
- var $admin_name = '';
1335
- var $admin_slug = '';
1336
-
1337
- // The name/slug of the Group Creation tab for this extension
1338
- var $create_name = '';
1339
- var $create_slug = '';
1340
-
1341
- // Will this extension be visible to non-members of a group? Options: public/private
1342
- var $visibility = 'public';
1343
 
1344
- var $create_step_position = 81;
1345
- var $nav_item_position = 81;
1346
 
1347
  /**
1348
- * @var string Context for the optional admin metabox
1349
- * @see https://codex.wordpress.org/Function_Reference/add_meta_box for
1350
- * possible values
1351
- * @since BuddyPress (1.7)
1352
  */
1353
- var $admin_metabox_context = 'normal';
1354
 
1355
  /**
1356
- * @var string Priority for the optional admin menabox
1357
- * @see https://codex.wordpress.org/Function_Reference/add_meta_box for
1358
- * possible values
1359
- * @since BuddyPress (1.7)
1360
  */
1361
- var $admin_metabox_priority = 'core';
1362
 
1363
- var $enable_create_step = true;
1364
- var $enable_nav_item = true;
1365
- var $enable_edit_item = true;
1366
- var $enable_admin_item = true;
 
1367
 
1368
- var $nav_item_name = false;
 
 
 
 
1369
 
1370
- var $display_hook = 'groups_custom_group_boxes';
1371
- var $template_file = 'groups/single/plugins';
 
 
 
1372
 
1373
- // Methods you should override
 
 
 
1374
 
1375
- function display() {}
 
 
 
1376
 
1377
- function widget_display() {}
 
 
 
 
1378
 
1379
- function edit_screen() {}
 
 
 
1380
 
1381
- function edit_screen_save() {}
 
 
 
1382
 
1383
- function create_screen() {}
 
 
 
1384
 
1385
- function create_screen_save() {}
 
 
 
 
1386
 
1387
- // Private Methods
 
 
 
 
1388
 
1389
- function _register() {
1390
- global $bp;
1391
 
1392
- // If admin/create names and slugs are not provided, they fall back on the main
1393
- // name and slug for the extension
1394
- if ( !$this->admin_name ) {
1395
- $this->admin_name = $this->name;
1396
- }
1397
 
1398
- if ( !$this->admin_slug ) {
1399
- $this->admin_slug = $this->slug;
1400
- }
 
 
1401
 
1402
- if ( !$this->create_name ) {
1403
- $this->create_name = $this->name;
1404
- }
 
 
 
1405
 
1406
- if ( !$this->create_slug ) {
1407
- $this->create_slug = $this->slug;
1408
- }
 
 
1409
 
1410
- if ( !empty( $this->enable_create_step ) ) {
1411
- // Insert the group creation step for the new group extension
1412
- $bp->groups->group_creation_steps[$this->create_slug] = array( 'name' => $this->create_name, 'slug' => $this->create_slug, 'position' => $this->create_step_position );
1413
 
1414
- // Attach the group creation step display content action
1415
- add_action( 'groups_custom_create_steps', array( &$this, 'create_screen' ) );
 
 
 
1416
 
1417
- // Attach the group creation step save content action
1418
- add_action( 'groups_create_group_step_save_' . $this->create_slug, array( &$this, 'create_screen_save' ) );
1419
- }
1420
 
1421
- // When we are viewing a single group, add the group extension nav item
1422
- if ( bp_is_group() ) {
1423
- if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) {
1424
- if ( $this->enable_nav_item ) {
1425
- bp_core_new_subnav_item( array( 'name' => ( !$this->nav_item_name ) ? $this->name : $this->nav_item_name, 'slug' => $this->slug, 'parent_slug' => $bp->groups->current_group->slug, 'parent_url' => bp_get_group_permalink( $bp->groups->current_group ), 'position' => $this->nav_item_position, 'item_css_id' => 'nav-' . $this->slug, 'screen_function' => array( &$this, '_display_hook' ), 'user_has_access' => $this->enable_nav_item ) );
1426
 
1427
- // When we are viewing the extension display page, set the title and options title
1428
- if ( bp_is_current_action( $this->slug ) ) {
1429
- add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
1430
- add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
1431
- }
1432
- }
 
 
 
 
 
 
 
1433
 
1434
- // Hook the group home widget
1435
- if ( !bp_current_action() && bp_is_current_action( 'home' ) )
1436
- add_action( $this->display_hook, array( &$this, 'widget_display' ) );
1437
- }
1438
- }
1439
 
1440
- // Construct the admin edit tab for the new group extension
1441
- if ( !empty( $this->enable_edit_item ) && bp_is_item_admin() ) {
1442
- add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->admin_slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $this->admin_slug ) ) . '\">' . esc_attr( $this->admin_name ) . '</a></li>";' ), 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1443
 
1444
- // Catch the edit screen and forward it to the plugin template
1445
- if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) && bp_is_action_variable( $this->admin_slug, 0 ) ) {
1446
- // Check whether the user is saving changes
1447
- $this->edit_screen_save();
 
 
 
 
 
 
 
 
 
 
 
1448
 
1449
- add_action( 'groups_custom_edit_steps', array( &$this, 'edit_screen' ) );
 
1450
 
1451
- if ( '' != bp_locate_template( array( 'groups/single/home.php' ), false ) ) {
1452
- bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
1453
- } else {
1454
- add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) );
1455
- add_action( 'bp_template_content', array( &$this, 'edit_screen' ) );
1456
- bp_core_load_template( apply_filters( 'bp_core_template_plugin', '/groups/single/plugins' ) );
1457
- }
1458
- }
1459
  }
1460
 
1461
- // Construct the admin metabox
1462
- // Plugin authors: Note that $this->enable_admin_item must be
1463
- // set to true, and self::admin_screen() must be defined
1464
- if ( ! empty( $this->enable_admin_item ) && is_admin() && method_exists( get_class( $this ), 'admin_screen' ) ) {
1465
- // Hook the admin screen markup function to the content hook
1466
- add_action( 'bp_groups_admin_meta_box_content_' . $this->slug, array( $this, 'admin_screen' ) );
1467
-
1468
- // Initialize the metabox
1469
- add_action( 'bp_groups_admin_meta_boxes', array( $this, '_meta_box_display_callback' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1470
 
1471
- // Catch the metabox save
1472
- add_action( 'bp_group_admin_edit_after', array( $this, 'admin_screen_save' ), 10 );
 
 
 
 
 
 
 
 
 
 
1473
  }
1474
- }
1475
 
1476
- function _display_hook() {
1477
- add_action( 'bp_template_content', array( &$this, 'display' ) );
1478
- bp_core_load_template( apply_filters( 'bp_core_template_plugin', $this->template_file ) );
1479
  }
1480
 
1481
  /**
1482
- * Create the Dashboard meta box for this extension
1483
  *
1484
- * @since BuddyPress (1.7)
 
 
 
 
 
1485
  */
1486
- function _meta_box_display_callback() {
1487
- $group_id = isset( $_GET['gid'] ) ? (int) $_GET['gid'] : 0;
1488
 
1489
- add_meta_box(
1490
- $this->slug,
1491
- $this->name,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1492
  create_function( '', 'do_action( "bp_groups_admin_meta_box_content_' . $this->slug . '", ' . $group_id . ' );' ),
1493
  get_current_screen()->id,
1494
- $this->admin_metabox_context,
1495
- $this->admin_metabox_priority
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1496
  );
1497
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1498
  }
1499
 
1500
- function bp_register_group_extension( $group_extension_class ) {
1501
 
1502
- if ( !class_exists( $group_extension_class ) )
1503
  return false;
 
1504
 
1505
  // Register the group extension on the bp_init action so we have access
1506
  // to all plugins.
91
  else
92
  $this->mods[] = $user;
93
  }
94
+ } else {
95
+ $this->id = 0;
96
  }
97
  }
98
 
334
  }
335
 
336
  $defaults = array(
337
+ 'type' => null,
338
+ 'orderby' => 'date_created',
339
+ 'order' => 'DESC',
340
  'per_page' => null,
341
  'page' => null,
342
  'user_id' => 0,
343
  'search_terms' => false,
344
+ 'meta_query' => false,
345
  'include' => false,
346
  'populate_extras' => true,
347
  'exclude' => false,
348
+ 'show_hidden' => false,
349
  );
350
 
351
  $r = wp_parse_args( $args, $defaults );
 
352
 
353
  $sql = array();
354
  $total_sql = array();
356
  $sql['select'] = "SELECT g.*, gm1.meta_value AS total_member_count, gm2.meta_value AS last_activity";
357
  $sql['from'] = " FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2,";
358
 
359
+ if ( ! empty( $r['user_id'] ) ) {
360
  $sql['members_from'] = " {$bp->groups->table_name_members} m,";
361
+ }
362
 
363
  $sql['group_from'] = " {$bp->groups->table_name} g WHERE";
364
 
365
+ if ( ! empty( $r['user_id'] ) ) {
366
  $sql['user_where'] = " g.id = m.group_id AND";
367
+ }
368
 
369
  $sql['where'] = " g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count'";
370
 
371
+ if ( empty( $r['show_hidden'] ) ) {
372
  $sql['hidden'] = " AND g.status != 'hidden'";
373
+ }
374
 
375
+ if ( ! empty( $r['search_terms'] ) ) {
376
+ $search_terms = esc_sql( like_escape( $r['search_terms'] ) );
377
  $sql['search'] = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
378
  }
379
 
380
+ $meta_query_sql = self::get_meta_query_sql( $r['meta_query'] );
381
+
382
+ if ( ! empty( $meta_query_sql['join'] ) ) {
383
+ $sql['from'] .= $meta_query_sql['join'];
384
+ $total_sql['select'] .= $meta_query_sql['join_total'];
385
+ }
386
+
387
+ if ( ! empty( $meta_query_sql['where'] ) ) {
388
+ $sql['meta'] = $meta_query_sql['where'];
389
+ }
390
+
391
+ if ( ! empty( $r['user_id'] ) ) {
392
+ $sql['user'] = $wpdb->prepare( " AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $r['user_id'] );
393
+ }
394
 
395
+ if ( ! empty( $r['include'] ) ) {
396
  $include = wp_parse_id_list( $r['include'] );
397
  $include = $wpdb->escape( implode( ',', $include ) );
398
  $sql['include'] = " AND g.id IN ({$include})";
399
  }
400
 
401
+ if ( ! empty( $r['exclude'] ) ) {
402
  $exclude = wp_parse_id_list( $r['exclude'] );
403
  $exclude = $wpdb->escape( implode( ',', $exclude ) );
404
  $sql['exclude'] = " AND g.id NOT IN ({$exclude})";
405
  }
406
 
407
+ /** Order/orderby ********************************************/
408
+
409
+ $order = $r['order'];
410
+ $orderby = $r['orderby'];
411
+
412
+ // If a 'type' parameter was passed, parse it and overwrite
413
+ // 'order' and 'orderby' params passed to the function
414
+ if ( ! empty( $r['type'] ) ) {
415
+ $order_orderby = self::convert_type_to_order_orderby( $r['type'] );
416
+
417
+ // If an invalid type is passed, $order_orderby will be
418
+ // an array with empty values. In this case, we stick
419
+ // with the default values of $order and $orderby
420
+ if ( ! empty( $order_orderby['order'] ) ) {
421
+ $order = $order_orderby['order'];
422
+ }
423
+
424
+ if ( ! empty( $order_orderby['orderby'] ) ) {
425
+ $orderby = $order_orderby['orderby'];
426
+ }
427
+ }
428
+
429
+ // Sanitize 'order'
430
+ $order = bp_esc_sql_order( $order );
431
+
432
+ // Convert 'orderby' into the proper ORDER BY term
433
+ $orderby = self::convert_orderby_to_order_by_term( $orderby );
434
+
435
+ // Random order is a special case
436
+ if ( 'rand()' === $orderby ) {
437
+ $sql[] = "ORDER BY rand()";
438
+ } else {
439
+ $sql[] = "ORDER BY {$orderby} {$order}";
440
  }
441
 
442
+ if ( ! empty( $r['per_page'] ) && ! empty( $r['page'] ) ) {
443
+ $sql['pagination'] = $wpdb->prepare( "LIMIT %d, %d", intval( ( $r['page'] - 1 ) * $r['per_page']), intval( $r['per_page'] ) );
444
+ }
445
 
446
  // Get paginated results
447
  $paged_groups_sql = apply_filters( 'bp_groups_get_paged_groups_sql', join( ' ', (array) $sql ), $sql );
449
 
450
  $total_sql['select'] = "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name} g, {$bp->groups->table_name_members} gm1, {$bp->groups->table_name_groupmeta} gm2";
451
 
452
+ if ( ! empty( $r['user_id'] ) ) {
453
  $total_sql['select'] .= ", {$bp->groups->table_name_members} m";
454
+ }
455
 
456
+ if ( ! empty( $sql['hidden'] ) ) {
457
  $total_sql['where'][] = "g.status != 'hidden'";
458
+ }
459
 
460
+ if ( ! empty( $sql['search'] ) ) {
461
  $total_sql['where'][] = "( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
462
+ }
463
 
464
+ if ( ! empty( $r['user_id'] ) ) {
465
+ $total_sql['where'][] = $wpdb->prepare( "m.group_id = g.id AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $r['user_id'] );
466
+ }
467
 
468
  // Already escaped in the paginated results block
469
+ if ( ! empty( $include ) ) {
470
  $total_sql['where'][] = "g.id IN ({$include})";
471
+ }
472
 
473
  // Already escaped in the paginated results block
474
+ if ( ! empty( $exclude ) ) {
475
  $total_sql['where'][] = "g.id NOT IN ({$exclude})";
476
+ }
477
 
478
  $total_sql['where'][] = "g.id = gm1.group_id";
479
  $total_sql['where'][] = "g.id = gm2.group_id";
481
 
482
  $t_sql = $total_sql['select'];
483
 
484
+ if ( ! empty( $total_sql['where'] ) ) {
485
  $t_sql .= " WHERE " . join( ' AND ', (array) $total_sql['where'] );
486
+ }
487
 
488
  // Get total group results
489
  $total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', $t_sql, $total_sql );
495
  }
496
 
497
  // Populate some extra information instead of querying each time in the loop
498
+ if ( !empty( $r['populate_extras'] ) ) {
499
  $group_ids = $wpdb->escape( join( ',', (array) $group_ids ) );
500
+ $paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, $r['type'] );
501
  }
502
 
503
  // Grab all groupmeta
508
  return array( 'groups' => $paged_groups, 'total' => $total_groups );
509
  }
510
 
511
+ /**
512
+ * Get the SQL for the 'meta_query' param in BP_Activity_Activity::get()
513
+ *
514
+ * We use WP_Meta_Query to do the heavy lifting of parsing the
515
+ * meta_query array and creating the necessary SQL clauses. However,
516
+ * since BP_Activity_Activity::get() builds its SQL differently than
517
+ * WP_Query, we have to alter the return value (stripping the leading
518
+ * AND keyword from the 'where' clause).
519
+ *
520
+ * @since BuddyPress (1.8)
521
+ * @access protected
522
+ *
523
+ * @param array $meta_query An array of meta_query filters. See the
524
+ * documentation for WP_Meta_Query for details.
525
+ * @return array $sql_array 'join' and 'where' clauses
526
+ */
527
+ protected static function get_meta_query_sql( $meta_query = array() ) {
528
+ global $wpdb;
529
+
530
+ $sql_array = array(
531
+ 'join' => '',
532
+ 'where' => '',
533
+ );
534
+
535
+ if ( ! empty( $meta_query ) ) {
536
+ $groups_meta_query = new WP_Meta_Query( $meta_query );
537
+
538
+ // WP_Meta_Query expects the table name at
539
+ // $wpdb->group
540
+ $wpdb->groupmeta = buddypress()->groups->table_name_groupmeta;
541
+
542
+ $meta_sql = $groups_meta_query->get_sql( 'group', 'g', 'id' );
543
+
544
+ // BP_Groups_Group::get uses the comma syntax for table
545
+ // joins, which means that we have to do some regex to
546
+ // convert the INNER JOIN and move the ON clause to a
547
+ // WHERE condition
548
+ //
549
+ // @todo It may be better in the long run to refactor
550
+ // the more general query syntax to accord better with
551
+ // BP/WP convention
552
+ preg_match( '/INNER JOIN (.*) ON/', $meta_sql['join'], $matches_a );
553
+ preg_match( '/ON \((.*)\)$/', $meta_sql['join'], $matches_b );
554
+ if ( ! empty( $matches_a[1] ) && ! empty( $matches_b[1] ) ) {
555
+ $sql_array['join'] = $matches_a[1] . ', ';
556
+ $sql_array['where'] = preg_replace( '/^(\sAND\s+[\(\s]+)/', '$1' . $matches_b[1] . ' AND ', $meta_sql['where'] );
557
+ }
558
+ }
559
+
560
+ return $sql_array;
561
+ }
562
+
563
+ /**
564
+ * Convert the 'type' parameter to 'order' and 'orderby'
565
+ *
566
+ * @since BuddyPress (1.8)
567
+ * @access protected
568
+ * @param string $type The 'type' shorthand param
569
+ * @return array 'order' and 'orderby'
570
+ */
571
+ protected function convert_type_to_order_orderby( $type = '' ) {
572
+ $order = $orderby = '';
573
+
574
+ switch ( $type ) {
575
+ case 'newest' :
576
+ $order = 'DESC';
577
+ $orderby = 'date_created';
578
+ break;
579
+
580
+ case 'active' :
581
+ $order = 'DESC';
582
+ $orderby = 'last_activity';
583
+ break;
584
+
585
+ case 'popular' :
586
+ $order = 'DESC';
587
+ $orderby = 'total_member_count';
588
+ break;
589
+
590
+ case 'alphabetical' :
591
+ $order = 'ASC';
592
+ $orderby = 'name';
593
+ break;
594
+
595
+ case 'random' :
596
+ $order = '';
597
+ $orderby = 'random';
598
+ break;
599
+ }
600
+
601
+ return array( 'order' => $order, 'orderby' => $orderby );
602
+ }
603
+
604
+ /**
605
+ * Convert the 'orderby' param into a proper SQL term/column
606
+ *
607
+ * @since BuddyPress (1.8)
608
+ * @access protected
609
+ * @param string $orderby
610
+ * @return string $order_by_term
611
+ */
612
+ protected function convert_orderby_to_order_by_term( $orderby ) {
613
+ $order_by_term = '';
614
+
615
+ switch ( $orderby ) {
616
+ case 'date_created' :
617
+ default :
618
+ $order_by_term = 'g.date_created';
619
+ break;
620
+
621
+ case 'last_activity' :
622
+ $order_by_term = 'last_activity';
623
+ break;
624
+
625
+ case 'total_member_count' :
626
+ $order_by_term = 'CONVERT(gm1.meta_value, SIGNED)';
627
+ break;
628
+
629
+ case 'name' :
630
+ $order_by_term = 'g.name';
631
+ break;
632
+
633
+ case 'random' :
634
+ $order_by_term = 'rand()';
635
+ break;
636
+ }
637
+
638
+ return $order_by_term;
639
+ }
640
+
641
  function get_by_most_forum_topics( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
642
  global $wpdb, $bp, $bbdb;
643
 
947
  }
948
  }
949
 
950
+ /**
951
+ * Query for the members of a group
952
+ *
953
+ * @since BuddyPress (1.8)
954
+ */
955
+ class BP_Group_Member_Query extends BP_User_Query {
956
+ /**
957
+ * Set up action hooks
958
+ *
959
+ * @since BuddyPress (1.8)
960
+ */
961
+ public function setup_hooks() {
962
+ // Take this early opportunity to set the default 'type' param
963
+ // to 'last_modified', which will ensure that BP_User_Query
964
+ // trusts our order and does not try to apply its own
965
+ if ( empty( $this->query_vars_raw['type'] ) ) {
966
+ $this->query_vars_raw['type'] = 'last_modified';
967
+ }
968
+
969
+ // Set up our populate_extras method
970
+ add_action( 'bp_user_query_populate_extras', array( $this, 'populate_group_member_extras' ), 10, 2 );
971
+ }
972
+
973
+ /**
974
+ * Get a list of user_ids to include in the IN clause of the main query
975
+ *
976
+ * Overrides BP_User_Query::get_include_ids(), adding our additional
977
+ * group-member logic.
978
+ *
979
+ * @since BuddyPress (1.8)
980
+ * @param array
981
+ * @return array
982
+ */
983
+ public function get_include_ids( $include ) {
984
+ // The following args are specific to group member queries, and
985
+ // are not present in the query_vars of a normal BP_User_Query.
986
+ // We loop through to make sure that defaults are set (though
987
+ // values passed to the constructor will, as usual, override
988
+ // these defaults).
989
+ $this->query_vars = wp_parse_args( $this->query_vars, array(
990
+ 'group_id' => 0,
991
+ 'group_role' => array( 'member' ),
992
+ ) );
993
+
994
+ $group_member_ids = $this->get_group_member_ids();
995
+
996
+ // If the group member query returned no users, bail with an
997
+ // array that will guarantee no matches for BP_User_Query
998
+ if ( empty( $group_member_ids ) ) {
999
+ return array( 0 );
1000
+ }
1001
+
1002
+ if ( ! empty( $include ) ) {
1003
+ $group_member_ids = array_intersect( $include, $group_member_ids );
1004
+ }
1005
+
1006
+ return $group_member_ids;
1007
+ }
1008
+
1009
+ /**
1010
+ * Get the members of the queried group
1011
+ *
1012
+ * @since BuddyPress (1.8)
1013
+ * @return array $ids User IDs of relevant group member ids
1014
+ */
1015
+ protected function get_group_member_ids() {
1016
+ global $wpdb;
1017
+
1018
+ $bp = buddypress();
1019
+ $sql = array(
1020
+ 'select' => "SELECT user_id FROM {$bp->groups->table_name_members}",
1021
+ 'where' => array(),
1022
+ 'orderby' => '',
1023
+ 'order' => '',
1024
+ 'limit' => '',
1025
+ );
1026
+
1027
+ /** WHERE clauses *****************************************************/
1028
+
1029
+ $sql['where'][] = $wpdb->prepare( "group_id = %d", $this->query_vars['group_id'] );
1030
+
1031
+ // Role information is stored as follows: admins have
1032
+ // is_admin = 1, mods have is_mod = 1, banned have is_banned =
1033
+ // 1, and members have all three set to 0.
1034
+ $roles = !empty( $this->query_vars['group_role'] ) ? $this->query_vars['group_role'] : array();
1035
+ if ( is_string( $roles ) ) {
1036
+ $roles = explode( ',', $roles );
1037
+ }
1038
+
1039
+ // Sanitize: Only 'admin', 'mod', 'member', and 'banned' are valid
1040
+ $allowed_roles = array( 'admin', 'mod', 'member', 'banned' );
1041
+ foreach ( $roles as $role_key => $role_value ) {
1042
+ if ( ! in_array( $role_value, $allowed_roles ) ) {
1043
+ unset( $roles[ $role_key ] );
1044
+ }
1045
+ }
1046
+
1047
+ $roles = array_unique( $roles );
1048
+
1049
+ // When querying for a set of roles containing 'member' (for
1050
+ // which there is no dedicated is_ column), figure out a list
1051
+ // of columns *not* to match
1052
+ $roles_sql = '';
1053
+ if ( in_array( 'member', $roles ) ) {
1054
+ $role_columns = array();
1055
+ foreach ( array_diff( $allowed_roles, $roles ) as $excluded_role ) {
1056
+ $role_columns[] = 'is_' . $excluded_role . ' = 0';
1057
+ }
1058
+
1059
+ if ( ! empty( $role_columns ) ) {
1060
+ $roles_sql = '(' . implode( ' AND ', $role_columns ) . ')';
1061
+ }
1062
+
1063
+ // When querying for a set of roles *not* containing 'member',
1064
+ // simply construct a list of is_* = 1 clauses
1065
+ } else {
1066
+ $role_columns = array();
1067
+ foreach ( $roles as $role ) {
1068
+ $role_columns[] = 'is_' . $role . ' = 1';
1069
+ }
1070
+
1071
+ if ( ! empty( $role_columns ) ) {
1072
+ $roles_sql = '(' . implode( ' OR ', $role_columns ) . ')';
1073
+ }
1074
+ }
1075
+
1076
+ if ( ! empty( $roles_sql ) ) {
1077
+ $sql['where'][] = $roles_sql;
1078
+ }
1079
+
1080
+ $sql['where'] = ! empty( $sql['where'] ) ? 'WHERE ' . implode( ' AND ', $sql['where'] ) : '';
1081
+
1082
+ /** ORDER BY clause ***************************************************/
1083
+
1084
+ // @todo For now, mimicking legacy behavior of
1085
+ // bp_group_has_members(), which has us order by date_modified
1086
+ // only. Should abstract it in the future
1087
+ $sql['orderby'] = "ORDER BY date_modified";
1088
+ $sql['order'] = "DESC";
1089
+
1090
+ /** LIMIT clause ******************************************************/
1091
+
1092
+ $ids = $wpdb->get_col( "{$sql['select']} {$sql['where']} {$sql['orderby']} {$sql['order']} {$sql['limit']}" );
1093
+
1094
+ return $ids;
1095
+ }
1096
+
1097
+ /**
1098
+ * Fetch additional data required in bp_group_has_members() loops
1099
+ *
1100
+ * @since BuddyPress (1.8)
1101
+ * @param object $query BP_User_Query object. Because we're filtering
1102
+ * the current object, we use $this inside of the method instead
1103
+ * @param string $user_ids_sql Sanitized, comma-separated string of
1104
+ * the user ids returned by the main query
1105
+ */
1106
+ public function populate_group_member_extras( $query, $user_ids_sql ) {
1107
+ global $wpdb;
1108
+
1109
+ $bp = buddypress();
1110
+ $extras = $wpdb->get_results( $wpdb->prepare( "SELECT user_id, date_modified, is_banned FROM {$bp->groups->table_name_members} WHERE user_id IN ({$user_ids_sql}) AND group_id = %d", $this->query_vars['group_id'] ) );
1111
+
1112
+ foreach ( (array) $extras as $extra ) {
1113
+ if ( isset( $this->results[ $extra->user_id ] ) ) {
1114
+ // user_id is provided for backward compatibility
1115
+ $this->results[ $extra->user_id ]->user_id = (int) $extra->user_id;
1116
+ $this->results[ $extra->user_id ]->is_banned = (int) $extra->is_banned;
1117
+ $this->results[ $extra->user_id ]->date_modified = $extra->date_modified;
1118
+ }
1119
+ }
1120
+
1121
+ // Don't filter other BP_User_Query objects on the same page
1122
+ remove_action( 'bp_user_query_populate_extras', array( $this, 'populate_group_member_extras' ), 10, 2 );
1123
+ }
1124
+ }
1125
+
1126
  class BP_Groups_Member {
1127
  var $id;
1128
  var $group_id;
1222
 
1223
  $this->id = $wpdb->insert_id;
1224
 
1225
+ // Update the user's group count
1226
+ self::refresh_total_group_count_for_user( $this->user_id );
1227
+
1228
+ // Update the group's member count
1229
+ self::refresh_total_member_count_for_group( $this->group_id );
1230
+
1231
  do_action_ref_array( 'groups_member_after_save', array( &$this ) );
1232
 
1233
  return true;
1258
  }
1259
 
1260
  function ban() {
 
1261
  if ( !empty( $this->is_admin ) )
1262
  return false;
1263
 
1264
  $this->is_mod = 0;
1265
  $this->is_banned = 1;
1266
 
 
 
 
 
 
 
1267
  return $this->save();
1268
  }
1269
 
1270
  function unban() {
 
1271
  if ( !empty( $this->is_admin ) )
1272
  return false;
1273
 
1274
  $this->is_banned = 0;
1275
 
 
 
 
1276
  return $this->save();
1277
  }
1278
 
1279
  function accept_invite() {
 
1280
  $this->inviter_id = 0;
1281
  $this->is_confirmed = 1;
1282
  $this->date_modified = bp_core_current_time();
 
 
1283
  }
1284
 
1285
  function accept_request() {
 
1286
  $this->is_confirmed = 1;
1287
  $this->date_modified = bp_core_current_time();
 
 
1288
  }
1289
 
1290
  function remove() {
1295
  if ( !$result = $wpdb->query( $sql ) )
1296
  return false;
1297
 
1298
+ // Update the user's group count
1299
+ self::refresh_total_group_count_for_user( $this->user_id );
1300
 
1301
+ // Update the group's member count
1302
+ self::refresh_total_member_count_for_group( $this->group_id );
 
1303
 
1304
  return $result;
1305
  }
1306
 
1307
  /** Static Methods ********************************************************/
1308
 
1309
+ /**
1310
+ * Refresh the total_group_count for a user
1311
+ *
1312
+ * @since BuddyPress (1.8)
1313
+ * @param int $user_id
1314
+ * @return bool True on success
1315
+ */
1316
+ public static function refresh_total_group_count_for_user( $user_id ) {
1317
+ return bp_update_user_meta( $user_id, 'total_group_count', (int) self::total_group_count( $user_id ) );
1318
+ }
1319
+
1320
+ /**
1321
+ * Refresh the total_member_count for a group
1322
+ *
1323
+ * @since BuddyPress (1.8)
1324
+ * @param int $group_id
1325
+ * @return bool True on success
1326
+ */
1327
+ public static function refresh_total_member_count_for_group( $group_id ) {
1328
+ return groups_update_groupmeta( $group_id, 'total_member_count', (int) BP_Groups_Group::get_total_member_count( $group_id ) );
1329
+ }
1330
+
1331
  function delete( $user_id, $group_id ) {
1332
  global $wpdb, $bp;
1333
 
1334
+ $remove = $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $user_id, $group_id ) );
1335
+
1336
+ // Update the user's group count
1337
+ self::refresh_total_group_count_for_user( $user_id );
1338
+
1339
+ // Update the group's member count
1340
+ self::refresh_total_member_count_for_group( $group_id );
1341
+
1342
+ return $remove;
1343
  }
1344
 
1345
  function get_group_ids( $user_id, $limit = false, $page = false ) {
1594
  function get_all_for_group( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) {
1595
  global $bp, $wpdb;
1596
 
1597
+ _deprecated_function( __METHOD__, '1.8', 'BP_Group_Member_Query' );
1598
+
1599
  $pag_sql = '';
1600
  if ( !empty( $limit ) && !empty( $page ) )
1601
  $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
1687
  * API for creating group extensions without having to hardcode the content into
1688
  * the theme.
1689
  *
1690
+ * To implement, extend this class. In your constructor, pass an optional array
1691
+ * of arguments to parent::init() to configure your widget. The config array
1692
+ * supports the following values:
1693
+ * - 'slug' A unique identifier for your extension. This value will be used
1694
+ * to build URLs, so make it URL-safe
1695
+ * - 'name' A translatable name for your extension. This value is used to
1696
+ populate the navigation tab, as well as the default titles for admin/
1697
+ edit/create tabs.
1698
+ * - 'visibility' Set to 'public' (default) for your extension (the main tab
1699
+ * as well as the widget) to be available to anyone who can access the
1700
+ * group, 'private' otherwise.
1701
+ * - 'nav_item_position' An integer explaining where the nav item should
1702
+ * appear in the tab list
1703
+ * - 'enable_nav_item' Set to true for your extension's main tab to be
1704
+ * available to anyone who can access the group.
1705
+ * - 'nav_item_name' The translatable text you want to appear in the nav tab.
1706
+ * Defaults to the value of 'name'.
1707
+ * - 'display_hook' The WordPress action that the widget_display() method is
1708
+ * hooked to
1709
+ * - 'template_file' The template file that will be used to load the content
1710
+ * of your main extension tab. Defaults to 'groups/single/plugins.php'.
1711
+ * - 'screens' A multi-dimensional array, described below
1712
+ *
1713
+ * BP_Group_Extension uses the concept of "settings screens". There are three
1714
+ * contexts for settings screens:
1715
+ * - 'create', which inserts a new step into the group creation process
1716
+ * - 'edit', which adds a tab for your extension into the Admin section of
1717
+ * a group
1718
+ * - 'admin', which adds a metabox to the Groups administration panel in the
1719
+ * WordPress Dashboard
1720
+ * Each of these settings screens is populated by a pair of methods: one that
1721
+ * creates the markup for the screen, and one that processes form data
1722
+ * submitted from the screen. If your plugin needs screens in all three
1723
+ * contexts, and if the markup and form processing logic will be the same in
1724
+ * each case, you can define two methods to handle all of the screens:
1725
+ * function settings_screen() {}
1726
+ * function settings_screen_save() {}
1727
+ * If one or more of your settings screen needs separate logic, you may define
1728
+ * context-specific methods, for example:
1729
+ * function edit_screen() {}
1730
+ * function edit_screen_save() {}
1731
+ * BP_Group_Extension will use the more specific methods if they are available.
1732
+ *
1733
+ * You can further customize the settings screens (tab names, etc) by passing
1734
+ * an optional 'screens' parameter to the init array. The format is as follows:
1735
+ * 'screens' => array(
1736
+ * 'create' => array(
1737
+ * 'slug' => 'foo',
1738
+ * 'name' => 'Foo',
1739
+ * 'position' => 55,
1740
+ * 'screen_callback' => 'my_create_screen_callback',
1741
+ * 'screen_save_callback' => 'my_create_screen_save_callback',
1742
+ * ),
1743
+ * 'edit' => array( // ...
1744
+ * ),
1745
+ * Only provide those arguments that you actually want to change from the
1746
+ * default configuration. BP_Group_Extension will do the rest.
1747
  *
1748
+ * Note that the 'edit' screen accepts an additional parameter: 'submit_text',
1749
+ * which defines the text of the Submit button automatically added to the Edit
1750
+ * screen of the extension (defaults to 'Save Changes'). Also, the 'admin'
1751
+ * screen accepts two additional parameters: 'metabox_priority' and
1752
+ * 'metabox_context'. See the docs for add_meta_box() for more details on these
1753
+ * arguments.
1754
+ *
1755
+ * Prior to BuddyPress 1.7, group extension configurations were set slightly
1756
+ * differently. The legacy method is still supported, though deprecated.
1757
  *
1758
  * @package BuddyPress
1759
  * @subpackage Groups
1760
  * @since BuddyPress (1.1)
1761
  */
1762
  class BP_Group_Extension {
 
 
 
 
 
 
 
 
 
 
 
 
 
1763
 
1764
+ /** Public ****************************************************************/
 
1765
 
1766
  /**
1767
+ * @var array Information about this extension's screens
1768
+ * @since BuddyPress (1.8)
 
 
1769
  */
1770
+ public $screens = array();
1771
 
1772
  /**
1773
+ * @var string The name of the extending class
1774
+ * @since BuddyPress (1.8)
 
 
1775
  */
1776
+ public $class_name = '';
1777
 
1778
+ /**
1779
+ * @var object A ReflectionClass object of the current extension
1780
+ * @since BuddyPress (1.8)
1781
+ */
1782
+ public $class_reflection = null;
1783
 
1784
+ /**
1785
+ * @var array Parsed configuration paramaters for the extension
1786
+ * @since BuddyPress (1.8)
1787
+ */
1788
+ public $params = array();
1789
 
1790
+ /**
1791
+ * @var int The id of the current group
1792
+ * @since BuddyPress (1.8)
1793
+ */
1794
+ public $group_id = 0;
1795
 
1796
+ /**
1797
+ * @var string The slug of the current extension
1798
+ */
1799
+ public $slug = '';
1800
 
1801
+ /**
1802
+ * @var string The translatable name of the current extension
1803
+ */
1804
+ public $name = '';
1805
 
1806
+ /**
1807
+ * @var string Whether the extension tab is visible. 'public'
1808
+ * or 'private'
1809
+ */
1810
+ public $visibility = 'public';
1811
 
1812
+ /**
1813
+ * @var int The numeric position of the main nav item
1814
+ */
1815
+ public $nav_item_position = 81;
1816
 
1817
+ /**
1818
+ * @var bool Whether to show the nav item
1819
+ */
1820
+ public $enable_nav_item = false;
1821
 
1822
+ /**
1823
+ * @var string The text of the nav item. Defaults to self::name
1824
+ */
1825
+ public $nav_item_name = '';
1826
 
1827
+ /**
1828
+ * @var string The WP action that self::widget_display() is attached to.
1829
+ * Defaults to 'groups_custom_group_boxes'
1830
+ */
1831
+ public $display_hook = 'groups_custom_group_boxes';
1832
 
1833
+ /**
1834
+ * @var string The template file used to load the plugin content.
1835
+ * Defaults to 'groups/single/plugins'
1836
+ */
1837
+ public $template_file = 'groups/single/plugins';
1838
 
1839
+ /** Protected *************************************************************/
 
1840
 
1841
+ /**
1842
+ * @var bool Has the extension been initialized?
1843
+ * @since BuddyPress (1.8)
1844
+ */
1845
+ protected $initialized = false;
1846
 
1847
+ /**
1848
+ * @var array Extension properties as set by legacy extensions
1849
+ * @since BuddyPress (1.8)
1850
+ */
1851
+ protected $legacy_properties = array();
1852
 
1853
+ /**
1854
+ * @var array Extension properties as set by legacy extensions, but
1855
+ * converted to match the new format for params
1856
+ * @since BuddyPress (1.8)
1857
+ */
1858
+ protected $legacy_properties_converted = array();
1859
 
1860
+ /**
1861
+ * @var array Miscellaneous data as set by the __set() magic method
1862
+ * @since BuddyPress (1.8)
1863
+ */
1864
+ protected $data = array();
1865
 
1866
+ /** Screen Overrides ******************************************************/
 
 
1867
 
1868
+ /**
1869
+ * Screen override methods are how your extension will display content
1870
+ * and handle form submits. Your extension should only override those
1871
+ * methods that it needs for its purposes.
1872
+ */
1873
 
1874
+ // The content of the group tab
1875
+ public function display() {}
 
1876
 
1877
+ // Content displayed in a widget sidebar, if applicable
1878
+ public function widget_display() {}
 
 
 
1879
 
1880
+ // *_screen() displays the settings form for the given context
1881
+ // *_screen_save() processes data submitted via the settings form
1882
+ // The settings_* methods are generic fallbacks, which can optionally
1883
+ // be overridden by the more specific edit_*, create_*, and admin_*
1884
+ // versions.
1885
+ public function settings_screen( $group_id = null ) {}
1886
+ public function settings_screen_save( $group_id = null ) {}
1887
+ public function edit_screen( $group_id = null ) {}
1888
+ public function edit_screen_save( $group_id = null ) {}
1889
+ public function create_screen( $group_id = null ) {}
1890
+ public function create_screen_save( $group_id = null ) {}
1891
+ public function admin_screen( $group_id = null ) {}
1892
+ public function admin_screen_save( $group_id = null ) {}
1893
 
1894
+ /** Setup *************************************************************/
 
 
 
 
1895
 
1896
+ /**
1897
+ * Initialize the extension, using your config settings
1898
+ *
1899
+ * Your plugin should call this method at the very end of its
1900
+ * constructor, like so:
1901
+ *
1902
+ * public function __construct() {
1903
+ * $args = array(
1904
+ * 'slug' => 'my-group-extension',
1905
+ * 'name' => 'My Group Extension',
1906
+ * // ...
1907
+ * );
1908
+ *
1909
+ * parent::init( $args );
1910
+ * }
1911
+ *
1912
+ * @since BuddyPress (1.8)
1913
+ * @param array $args See inline definition below for arguments
1914
+ */
1915
+ public function init( $args = array() ) {
1916
+
1917
+ // Before this init() method was introduced, plugins were
1918
+ // encouraged to set their config directly. For backward
1919
+ // compatibility with these plugins, we detect whether this is
1920
+ // one of those legacy plugins, and parse any legacy arguments
1921
+ // with those passed to init()
1922
+ $this->parse_legacy_properties();
1923
+ $args = $this->parse_args_r( $args, $this->legacy_properties_converted );
1924
+
1925
+ // Parse with defaults
1926
+ $this->params = $this->parse_args_r( $args, array(
1927
+ 'slug' => $this->slug,
1928
+ 'name' => $this->name,
1929
+ 'visibility' => $this->visibility,
1930
+ 'nav_item_position' => $this->nav_item_position,
1931
+ 'enable_nav_item' => (bool) $this->enable_nav_item,
1932
+ 'nav_item_name' => $this->nav_item_name,
1933
+ 'display_hook' => $this->display_hook,
1934
+ 'template_file' => $this->template_file,
1935
+ 'screens' => $this->get_default_screens(),
1936
+ ) );
1937
+
1938
+ $this->initialized = true;
1939
+ }
1940
 
1941
+ /**
1942
+ * The main setup routine for the extension
1943
+ *
1944
+ * This method contains the primary logic for setting up an extension's
1945
+ * configuration, setting up backward compatibility for legacy plugins,
1946
+ * and hooking the extension's screen functions into WP and BP.
1947
+ *
1948
+ * Marked 'public' because it must be accessible to add_action().
1949
+ * However, you should never need to invoke this method yourself - it
1950
+ * is called automatically at the right point in the load order by
1951
+ * bp_register_group_extension().
1952
+ *
1953
+ * @since BuddyPress (1.1)
1954
+ */
1955
+ public function _register() {
1956
 
1957
+ // Detect and parse properties set by legacy extensions
1958
+ $this->parse_legacy_properties();
1959
 
1960
+ // Initialize, if necessary. This should only happen for
1961
+ // legacy extensions that don't call parent::init() themselves
1962
+ if ( true !== $this->initialized ) {
1963
+ $this->init();
 
 
 
 
1964
  }
1965
 
1966
+ // Set some config values, based on the parsed params
1967
+ $this->group_id = $this->get_group_id();
1968
+ $this->slug = $this->params['slug'];
1969
+ $this->name = $this->params['name'];
1970
+ $this->visibility = $this->params['visibility'];
1971
+ $this->nav_item_position = $this->params['nav_item_position'];
1972
+ $this->nav_item_name = $this->params['nav_item_name'];
1973
+ $this->display_hook = $this->params['display_hook'];
1974
+ $this->template_file = $this->params['template_file'];
1975
+
1976
+ // Configure 'screens': create, admin, and edit contexts
1977
+ $this->setup_screens();
1978
+
1979
+ // Mirror configuration data so it's accessible to plugins
1980
+ // that look for it in its old locations
1981
+ $this->setup_legacy_properties();
1982
+
1983
+ // Hook the extension into BuddyPress
1984
+ $this->setup_display_hooks();
1985
+ $this->setup_create_hooks();
1986
+ $this->setup_edit_hooks();
1987
+ $this->setup_admin_hooks();
1988
+ }
1989
 
1990
+ /**
1991
+ * Set up some basic info about the Extension
1992
+ *
1993
+ * Here we collect the name of the extending class, as well as a
1994
+ * ReflectionClass that is used in get_screen_callback() to determine
1995
+ * whether your extension overrides certain callback methods.
1996
+ *
1997
+ * @since BuddyPress (1.8)
1998
+ */
1999
+ protected function setup_class_info() {
2000
+ if ( empty( $this->class_name ) ) {
2001
+ $this->class_name = get_class( $this );
2002
  }
 
2003
 
2004
+ if ( is_null( $this->class_reflection ) ) {
2005
+ $this->class_reflection = new ReflectionClass( $this->class_name );
2006
+ }
2007
  }
2008
 
2009
  /**
2010
+ * Get the current group id
2011
  *
2012
+ * Check for:
2013
+ * - current group
2014
+ * - new group
2015
+ * - group admin
2016
+ *
2017
+ * @since BuddyPress (1.8)
2018
  */
2019
+ public static function get_group_id() {
 
2020
 
2021
+ // Usually this will work
2022
+ $group_id = bp_get_current_group_id();
2023
+
2024
+ // On the admin, get the group id out of the $_GET params
2025
+ if ( empty( $group_id ) && is_admin() && ( isset( $_GET['page'] ) && ( 'bp-groups' === $_GET['page'] ) ) && ! empty( $_GET['gid'] ) ) {
2026
+ $group_id = (int) $_GET['gid'];
2027
+ }
2028
+
2029
+ // This fallback will only be hit when the create step is very
2030
+ // early
2031
+ if ( empty( $group_id ) && bp_get_new_group_id() ) {
2032
+ $group_id = bp_get_new_group_id();
2033
+ }
2034
+
2035
+ // On some setups, the group id has to be fetched out of the
2036
+ // $_POST array
2037
+ // @todo Figure out why this is happening during group creation
2038
+ if ( empty( $group_id ) && isset( $_POST['group_id'] ) ) {
2039
+ $group_id = (int) $_POST['group_id'];
2040
+ }
2041
+
2042
+ return $group_id;
2043
+ }
2044
+
2045
+ /**
2046
+ * Gather configuration data about your screens
2047
+ *
2048
+ * @since BuddyPress (1.8)
2049
+ */
2050
+ protected function get_default_screens() {
2051
+ $this->setup_class_info();
2052
+
2053
+ $screens = array(
2054
+ 'create' => array(
2055
+ 'position' => 81,
2056
+ ),
2057
+ 'edit' => array(
2058
+ 'submit_text' => __( 'Save Changes', 'buddypress' ),
2059
+ ),
2060
+ 'admin' => array(
2061
+ 'metabox_context' => 'normal',
2062
+ 'metabox_priority' => 'core',
2063
+ ),
2064
+ );
2065
+
2066
+ foreach ( $screens as $context => &$screen ) {
2067
+ $screen['enabled'] = true;
2068
+ $screen['name'] = $this->name;
2069
+ $screen['slug'] = $this->slug;
2070
+
2071
+ $screen['screen_callback'] = $this->get_screen_callback( $context, 'screen' );
2072
+ $screen['screen_save_callback'] = $this->get_screen_callback( $context, 'screen_save' );
2073
+ }
2074
+
2075
+ return $screens;
2076
+ }
2077
+
2078
+ /**
2079
+ * Set up screens array based on params
2080
+ *
2081
+ * @since BuddyPress (1.8)
2082
+ */
2083
+ protected function setup_screens() {
2084
+ foreach ( (array) $this->params['screens'] as $context => $screen ) {
2085
+ if ( empty( $screen['slug'] ) ) {
2086
+ $screen['slug'] = $this->slug;
2087
+ }
2088
+
2089
+ if ( empty( $screen['name'] ) ) {
2090
+ $screen['name'] = $this->name;
2091
+ }
2092
+
2093
+ $this->screens[ $context ] = $screen;
2094
+ }
2095
+ }
2096
+
2097
+ /** Display ***************************************************************/
2098
+
2099
+ /**
2100
+ * Hook this extension's group tab into BuddyPress, if necessary
2101
+ *
2102
+ * @since BuddyPress (1.8)
2103
+ */
2104
+ protected function setup_display_hooks() {
2105
+
2106
+ // Bail if not a group
2107
+ if ( ! bp_is_group() ) {
2108
+ return;
2109
+ }
2110
+
2111
+ // Bail if the current user doesn't have access
2112
+ if ( ( 'public' !== $this->visibility ) && ! buddypress()->groups->current_group->user_has_access ) {
2113
+ return;
2114
+ }
2115
+
2116
+ if ( true === $this->enable_nav_item ) {
2117
+ bp_core_new_subnav_item( array(
2118
+ 'name' => ! $this->nav_item_name ? $this->name : $this->nav_item_name,
2119
+ 'slug' => $this->slug,
2120
+ 'parent_slug' => bp_get_current_group_slug(),
2121
+ 'parent_url' => bp_get_group_permalink( groups_get_current_group() ),
2122
+ 'position' => $this->nav_item_position,
2123
+ 'item_css_id' => 'nav-' . $this->slug,
2124
+ 'screen_function' => array( &$this, '_display_hook' ),
2125
+ 'user_has_access' => $this->enable_nav_item
2126
+ ) );
2127
+
2128
+ // When we are viewing the extension display page, set the title and options title
2129
+ if ( bp_is_current_action( $this->slug ) ) {
2130
+ add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
2131
+ add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
2132
+ }
2133
+ }
2134
+
2135
+ // Hook the group home widget
2136
+ if ( ! bp_current_action() && bp_is_current_action( 'home' ) ) {
2137
+ add_action( $this->display_hook, array( &$this, 'widget_display' ) );
2138
+ }
2139
+ }
2140
+
2141
+ /**
2142
+ * Hooks the main display method, and loads the template file
2143
+ */
2144
+ public function _display_hook() {
2145
+ add_action( 'bp_template_content', array( &$this, 'display' ) );
2146
+ bp_core_load_template( apply_filters( 'bp_core_template_plugin', $this->template_file ) );
2147
+ }
2148
+
2149
+ /** Create ****************************************************************/
2150
+
2151
+ /**
2152
+ * Hook this extension's Create step into BuddyPress, if necessary
2153
+ *
2154
+ * @since BuddyPress (1.8)
2155
+ */
2156
+ protected function setup_create_hooks() {
2157
+ if ( ! $this->is_screen_enabled( 'create' ) ) {
2158
+ return;
2159
+ }
2160
+
2161
+ $screen = $this->screens['create'];
2162
+
2163
+ // Insert the group creation step for the new group extension
2164
+ buddypress()->groups->group_creation_steps[ $screen['slug'] ] = array(
2165
+ 'name' => $screen['name'],
2166
+ 'slug' => $screen['slug'],
2167
+ 'position' => $screen['position'],
2168
+ );
2169
+
2170
+ // The maybe_ methods check to see whether the create_*
2171
+ // callbacks should be invoked (ie, are we on the
2172
+ // correct group creation step). Hooked in separate
2173
+ // methods because current creation step info not yet
2174
+ // available at this point
2175
+ add_action( 'groups_custom_create_steps', array( $this, 'maybe_create_screen' ) );
2176
+ add_action( 'groups_create_group_step_save_' . $screen['slug'], array( $this, 'maybe_create_screen_save' ) );
2177
+ }
2178
+
2179
+ /**
2180
+ * Call the create_screen() method, if we're on the right page
2181
+ *
2182
+ * @since 1.8
2183
+ */
2184
+ public function maybe_create_screen() {
2185
+ if ( ! bp_is_group_creation_step( $this->screens['create']['slug'] ) ) {
2186
+ return;
2187
+ }
2188
+
2189
+ call_user_func( $this->screens['create']['screen_callback'], $this->group_id );
2190
+ $this->nonce_field( 'create' );
2191
+
2192
+ // The create screen requires an additional nonce field
2193
+ // due to a quirk in the way the templates are built
2194
+ wp_nonce_field( 'groups_create_save_' . bp_get_groups_current_create_step() );
2195
+ }
2196
+
2197
+ /**
2198
+ * Call the create_screen_save() method, if we're on the right page
2199
+ *
2200
+ * @since 1.8
2201
+ */
2202
+ public function maybe_create_screen_save() {
2203
+ if ( ! bp_is_group_creation_step( $this->screens['create']['slug'] ) ) {
2204
+ return;
2205
+ }
2206
+
2207
+ $this->check_nonce( 'create' );
2208
+ call_user_func( $this->screens['create']['screen_save_callback'], $this->group_id );
2209
+ }
2210
+
2211
+ /** Edit ******************************************************************/
2212
+
2213
+ /**
2214
+ * Hook this extension's Edit panel into BuddyPress, if necessary
2215
+ *
2216
+ * @since BuddyPress (1.8)
2217
+ */
2218
+ protected function setup_edit_hooks() {
2219
+
2220
+ // Bail if not an edit screen
2221
+ if ( ! $this->is_screen_enabled( 'edit' ) || ! bp_is_item_admin() ) {
2222
+ return;
2223
+ }
2224
+
2225
+ $screen = $this->screens['edit'];
2226
+
2227
+ $position = isset( $screen['position'] ) ? (int) $screen['position'] : 10;
2228
+
2229
+ // Add the tab
2230
+ // @todo BP should be using bp_core_new_subnav_item()
2231
+ add_action( 'groups_admin_tabs', create_function( '$current, $group_slug',
2232
+ '$selected = "";
2233
+ if ( "' . esc_attr( $screen['slug'] ) . '" == $current )
2234
+ $selected = " class=\"current\"";
2235
+ echo "<li{$selected}><a href=\"' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $screen['slug'] ) ) . '\">' . esc_attr( $screen['name'] ) . '</a></li>";'
2236
+ ), $position, 2 );
2237
+
2238
+ // Catch the edit screen and forward it to the plugin template
2239
+ if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) && bp_is_action_variable( $screen['slug'], 0 ) ) {
2240
+ $this->call_edit_screen_save( $this->group_id );
2241
+
2242
+ add_action( 'groups_custom_edit_steps', array( &$this, 'call_edit_screen' ) );
2243
+
2244
+ // Determine the proper template and save for later
2245
+ // loading
2246
+ if ( '' !== bp_locate_template( array( 'groups/single/home.php' ), false ) ) {
2247
+ $this->edit_screen_template = '/groups/single/home';
2248
+ } else {
2249
+ add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) );
2250
+ add_action( 'bp_template_content', array( &$this, 'call_edit_screen' ) );
2251
+ $this->edit_screen_template = '/groups/single/plugins';
2252
+ }
2253
+
2254
+ // We load the template at bp_screens, to give all
2255
+ // extensions a chance to load
2256
+ add_action( 'bp_screens', array( $this, 'call_edit_screen_template_loader' ) );
2257
+ }
2258
+ }
2259
+
2260
+ /**
2261
+ * Call the edit_screen() method
2262
+ *
2263
+ * Previous versions of BP_Group_Extension required plugins to provide
2264
+ * their own Submit button and nonce fields when building markup. In
2265
+ * BP 1.8, this requirement was lifted - BP_Group_Extension now handles
2266
+ * all required submit buttons and nonces.
2267
+ *
2268
+ * We put the edit screen markup into an output buffer before echoing.
2269
+ * This is so that we can check for the presence of a hardcoded submit
2270
+ * button, as would be present in legacy plugins; if one is found, we
2271
+ * do not auto-add our own button.
2272
+ *
2273
+ * @since BuddyPress (1.8)
2274
+ */
2275
+ public function call_edit_screen() {
2276
+ ob_start();
2277
+ call_user_func( $this->screens['edit']['screen_callback'], $this->group_id );
2278
+ $screen = ob_get_contents();
2279
+ ob_end_clean();
2280
+
2281
+ echo $this->maybe_add_submit_button( $screen );
2282
+
2283
+ $this->nonce_field( 'edit' );
2284
+ }
2285
+
2286
+ /**
2287
+ * Check the nonce, and call the edit_screen_save() method
2288
+ *
2289
+ * @since BuddyPress (1.8)
2290
+ */
2291
+ public function call_edit_screen_save() {
2292
+ if ( empty( $_POST ) ) {
2293
+ return;
2294
+ }
2295
+
2296
+ $this->check_nonce( 'edit' );
2297
+ call_user_func( $this->screens['edit']['screen_save_callback'], $this->group_id );
2298
+ }
2299
+
2300
+ /**
2301
+ * Load the template that houses the Edit screen
2302
+ *
2303
+ * Separated out into a callback so that it can run after all other
2304
+ * Group Extensions have had a chance to register their navigation, to
2305
+ * avoid missing tabs.
2306
+ *
2307
+ * Hooked to 'bp_screens'.
2308
+ *
2309
+ * @see BP_Group_Extension::setup_edit_hooks()
2310
+ * @access public So that do_action() has access. Do not call directly.
2311
+ * @since BuddyPress (1.8)
2312
+ */
2313
+ public function call_edit_screen_template_loader() {
2314
+ bp_core_load_template( $this->edit_screen_template );
2315
+ }
2316
+
2317
+ /**
2318
+ * Add a submit button to the edit form, if it needs one
2319
+ *
2320
+ * There's an inconsistency in the way that the group Edit and Create
2321
+ * screens are rendered: the Create screen has a submit button built
2322
+ * in, but the Edit screen does not. This function allows plugin
2323
+ * authors to write markup that does not contain the submit button for
2324
+ * use on both the Create and Edit screens - BP will provide the button
2325
+ * if one is not found.
2326
+ *
2327
+ * @since BuddyPress (1.8)
2328
+ * @param string $screen The screen markup, captured in the output buffer
2329
+ * @param string $screen The same markup, with a submit button added
2330
+ */
2331
+ protected function maybe_add_submit_button( $screen = '' ) {
2332
+ if ( $this->has_submit_button( $screen ) ) {
2333
+ return $screen;
2334
+ }
2335
+
2336
+ return $screen . sprintf(
2337
+ '<div id="%s"><input type="submit" name="save" value="%s" id="%s"></div>',
2338
+ 'bp-group-edit-' . $this->slug . '-submit-wrapper',
2339
+ $this->screens['edit']['submit_text'],
2340
+ 'bp-group-edit-' . $this->slug . '-submit'
2341
+ );
2342
+ }
2343
+
2344
+ /**
2345
+ * Does the given markup have a submit button?
2346
+ *
2347
+ * @since BuddyPress (1.8)
2348
+ * @param $screen The markup to check
2349
+ * @return bool
2350
+ */
2351
+ public static function has_submit_button( $screen = '' ) {
2352
+ $pattern = "/<input[^>]+type=[\'\"]submit[\'\"]/";
2353
+ preg_match( $pattern, $screen, $matches );
2354
+ return ! empty( $matches[0] );
2355
+ }
2356
+
2357
+ /** Admin *****************************************************************/
2358
+
2359
+ /**
2360
+ * Hook this extension's Admin metabox into BuddyPress, if necessary
2361
+ *
2362
+ * @since BuddyPress (1.8)
2363
+ */
2364
+ protected function setup_admin_hooks() {
2365
+ if ( ! $this->is_screen_enabled( 'admin' ) || ! is_admin() ) {
2366
+ return;
2367
+ }
2368
+
2369
+ // Hook the admin screen markup function to the content hook
2370
+ add_action( 'bp_groups_admin_meta_box_content_' . $this->slug, array( $this, 'call_admin_screen' ) );
2371
+
2372
+ // Initialize the metabox
2373
+ add_action( 'bp_groups_admin_meta_boxes', array( $this, '_meta_box_display_callback' ) );
2374
+
2375
+ // Catch the metabox save
2376
+ add_action( 'bp_group_admin_edit_after', array( $this, 'call_admin_screen_save' ), 10 );
2377
+ }
2378
+
2379
+ /**
2380
+ * Call the admin_screen() method, and add a nonce field
2381
+ *
2382
+ * @since BuddyPress (1.8)
2383
+ */
2384
+ public function call_admin_screen() {
2385
+ call_user_func( $this->screens['admin']['screen_callback'], $this->group_id );
2386
+ $this->nonce_field( 'admin' );
2387
+ }
2388
+
2389
+ /**
2390
+ * Check the nonce, and call the admin_screen_save() method
2391
+ *
2392
+ * @since BuddyPress (1.8)
2393
+ */
2394
+ public function call_admin_screen_save() {
2395
+ $this->check_nonce( 'admin' );
2396
+ call_user_func( $this->screens['admin']['screen_save_callback'], $this->group_id );
2397
+ }
2398
+
2399
+ /**
2400
+ * Create the Dashboard meta box for this extension
2401
+ *
2402
+ * @since BuddyPress (1.7)
2403
+ */
2404
+ public function _meta_box_display_callback() {
2405
+ $group_id = isset( $_GET['gid'] ) ? (int) $_GET['gid'] : 0;
2406
+ $screen = $this->screens['admin'];
2407
+
2408
+ add_meta_box(
2409
+ $screen['slug'],
2410
+ $screen['name'],
2411
  create_function( '', 'do_action( "bp_groups_admin_meta_box_content_' . $this->slug . '", ' . $group_id . ' );' ),
2412
  get_current_screen()->id,
2413
+ $screen['metabox_context'],
2414
+ $screen['metabox_priority']
2415
+ );
2416
+ }
2417
+
2418
+
2419
+ /** Utilities *************************************************************/
2420
+
2421
+ /**
2422
+ * Generate the nonce fields for a settings form
2423
+ *
2424
+ * The nonce field name (the second param passed to wp_nonce_field)
2425
+ * contains this extension's slug and is thus unique to this extension.
2426
+ * This is necessary because in some cases (namely, the Dashboard),
2427
+ * more than one extension may generate nonces on the same page, and we
2428
+ * must avoid name clashes.
2429
+ *
2430
+ * @since BuddyPress (1.8)
2431
+ * @uses wp_nonce_field()
2432
+ * @param string $context 'create', 'edit', 'admin'
2433
+ */
2434
+ public function nonce_field( $context = '' ) {
2435
+ wp_nonce_field( 'bp_group_extension_' . $this->slug . '_' . $context, '_bp_group_' . $context . '_nonce_' . $this->slug );
2436
+ }
2437
+
2438
+ /**
2439
+ * Check the nonce on a submitted settings form
2440
+ *
2441
+ * @since BuddyPress (1.8)
2442
+ * @uses check_admin_referer()
2443
+ * @param string $context 'create', 'edit', 'admin'
2444
+ */
2445
+ public function check_nonce( $context = '' ) {
2446
+ check_admin_referer( 'bp_group_extension_' . $this->slug . '_' . $context, '_bp_group_' . $context . '_nonce_' . $this->slug );
2447
+ }
2448
+
2449
+ /**
2450
+ * Is the specified screen enabled?
2451
+ *
2452
+ * To be enabled, a screen must both have the 'enabled' key set to true
2453
+ * (legacy: $this->enable_create_step, etc), and its screen_callback
2454
+ * must also exist and be callable.
2455
+ *
2456
+ * @since BuddyPress (1.8)
2457
+ * @param string $context 'create', 'edit', 'admin'
2458
+ * @return bool
2459
+ */
2460
+ public function is_screen_enabled( $context = '' ) {
2461
+ $enabled = false;
2462
+
2463
+ if ( isset( $this->screens[ $context ] ) ) {
2464
+ $enabled = $this->screens[ $context ]['enabled'] && is_callable( $this->screens[ $context ]['screen_callback'] );
2465
+ }
2466
+
2467
+ return (bool) $enabled;
2468
+ }
2469
+
2470
+ /**
2471
+ * Get the appropriate screen callback for the specified context/type
2472
+ *
2473
+ * BP Group Extensions have three special "screen contexts": create,
2474
+ * admin, and edit. Each of these contexts has a corresponding
2475
+ * _screen() and _screen_save() method, which allow group extension
2476
+ * plugins to define different markup and logic for each context.
2477
+ *
2478
+ * BP also supports fallback settings_screen() and
2479
+ * settings_screen_save() methods, which can be used to define markup
2480
+ * and logic that is shared between context. For each context, you may
2481
+ * either provide context-specific methods, or you can let BP fall back
2482
+ * on the shared settings_* callbacks.
2483
+ *
2484
+ * For example, consider a BP_Group_Extension implementation that looks
2485
+ * like this:
2486
+ *
2487
+ * // ...
2488
+ * function create_screen( $group_id ) { ... }
2489
+ * function create_screen_save( $group_id ) { ... }
2490
+ * function settings_screen( $group_id ) { ... }
2491
+ * function settings_screen_save( $group_id ) { ... }
2492
+ * // ...
2493
+ *
2494
+ * BP_Group_Extension will use your create_* methods for the Create
2495
+ * steps, and will use your generic settings_* methods for the Edit
2496
+ * and Admin contexts. This schema allows plugin authors maximum
2497
+ * flexibility without having to repeat themselves.
2498
+ *
2499
+ * The get_screen_callback() method uses a ReflectionClass object to
2500
+ * determine whether your extension has provided a given callback.
2501
+ *
2502
+ * @since BuddyPress (1.8)
2503
+ * @param string $context 'create', 'edit', 'admin'
2504
+ * @param string $type 'screen', 'screen_save'
2505
+ * @return mixed A callable function handle
2506
+ */
2507
+ public function get_screen_callback( $context = '', $type = 'screen' ) {
2508
+ $callback = '';
2509
+
2510
+ // Try the context-specific callback first
2511
+ $method = $context . '_' . $type;
2512
+ $rmethod = $this->class_reflection->getMethod( $method );
2513
+ if ( isset( $rmethod->class ) && $this->class_name === $rmethod->class ) {
2514
+ $callback = array( $this->class_name, $method );
2515
+ }
2516
+
2517
+ if ( empty( $callback ) ) {
2518
+ $fallback_method = 'settings_' . $type;
2519
+ $rfallback_method = $this->class_reflection->getMethod( $fallback_method );
2520
+ if ( isset( $rfallback_method->class ) && $this->class_name === $rfallback_method->class ) {
2521
+ $callback = array( $this->class_name, $fallback_method );
2522
+ }
2523
+ }
2524
+
2525
+ return $callback;
2526
+ }
2527
+
2528
+ /**
2529
+ * Recursive argument parsing
2530
+ *
2531
+ * This acts like a multi-dimensional version of wp_parse_args() (minus
2532
+ * the querystring parsing - you must pass arrays).
2533
+ *
2534
+ * Values from $a override those from $b; keys in $b that don't exist
2535
+ * in $a are passed through.
2536
+ *
2537
+ * This is different from array_merge_recursive(), both because of the
2538
+ * order of preference ($a overrides $b) and because of the fact that
2539
+ * array_merge_recursive() combines arrays deep in the tree, rather
2540
+ * than overwriting the b array with the a array.
2541
+ *
2542
+ * The implementation of this function is specific to the needs of
2543
+ * BP_Group_Extension, where we know that arrays will always be
2544
+ * associative, and that an argument under a given key in one array
2545
+ * will be matched by a value of identical depth in the other one. The
2546
+ * function is NOT designed for general use, and will probably result
2547
+ * in unexpected results when used with data in the wild. See, eg,
2548
+ * http://core.trac.wordpress.org/ticket/19888
2549
+ *
2550
+ * @since BuddyPress (1.8)
2551
+ * @arg array $a
2552
+ * @arg array $b
2553
+ * @return array
2554
+ */
2555
+ public static function parse_args_r( &$a, $b ) {
2556
+ $a = (array) $a;
2557
+ $b = (array) $b;
2558
+ $r = $b;
2559
+
2560
+ foreach ( $a as $k => &$v ) {
2561
+ if ( is_array( $v ) && isset( $r[ $k ] ) ) {
2562
+ $r[ $k ] = self::parse_args_r( $v, $r[ $k ] );
2563
+ } else {
2564
+ $r[ $k ] = $v;
2565
+ }
2566
+ }
2567
+
2568
+ return $r;
2569
+ }
2570
+
2571
+ /** Legacy Support ********************************************************/
2572
+
2573
+ /**
2574
+ * In BuddyPress 1.8, the recommended technique for configuring
2575
+ * extensions changed from directly setting various object properties
2576
+ * in the class constructor, to passing a configuration array to
2577
+ * parent::init(). The following methods ensure that extensions created
2578
+ * in the old way continue to work, by converting legacy configuration
2579
+ * data to the new format.
2580
+ */
2581
+
2582
+ /**
2583
+ * Provide access to otherwise unavailable object properties
2584
+ *
2585
+ * This magic method is here for backward compatibility with plugins
2586
+ * that refer to config properties that have moved to a different
2587
+ * location (such as enable_create_step, which is now at
2588
+ * $this->screens['create']['enabled']
2589
+ *
2590
+ * The legacy_properties array is set up in
2591
+ * self::setup_legacy_properties().
2592
+ *
2593
+ * @since BuddyPress (1.8)
2594
+ * @param string $key
2595
+ * @return mixed
2596
+ */
2597
+ public function __get( $key ) {
2598
+ if ( isset( $this->legacy_properties[ $key ] ) ) {
2599
+ return $this->legacy_properties[ $key ];
2600
+ } elseif ( isset( $this->data[ $key ] ) ) {
2601
+ return $this->data[ $key ];
2602
+ } else {
2603
+ return null;
2604
+ }
2605
+ }
2606
+
2607
+ /**
2608
+ * Provide a fallback for isset( $this->foo ) when foo is unavailable
2609
+ *
2610
+ * This magit method is here for backward compatibility with plugins
2611
+ * that have set their class config options directly in the class
2612
+ * constructor. The parse_legacy_properties() method of the current
2613
+ * class needs to check whether any legacy keys have been put into the
2614
+ * $this->data array.
2615
+ *
2616
+ * @since BuddyPress (1.8)
2617
+ * @param string $key
2618
+ * @return bool
2619
+ */
2620
+ public function __isset( $key ) {
2621
+ if ( isset( $this->legacy_properties[ $key ] ) ) {
2622
+ return true;
2623
+ } elseif ( isset( $this->data[ $key ] ) ) {
2624
+ return true;
2625
+ } else {
2626
+ return false;
2627
+ }
2628
+ }
2629
+
2630
+ /**
2631
+ * Allow plugins to set otherwise unavailable object properties
2632
+ *
2633
+ * This magic method is here for backward compatibility with plugins
2634
+ * that may attempt to modify the group extension by manually assigning
2635
+ * a value to an object property that no longer exists, such as
2636
+ * $this->enable_create_step.
2637
+ *
2638
+ * @since BuddyPress (1.8)
2639
+ * @param string $key
2640
+ * @param mixed $value
2641
+ */
2642
+ public function __set( $key, $value ) {
2643
+
2644
+ if ( empty( $this->initialized ) ) {
2645
+ $this->data[ $key ] = $value;
2646
+ }
2647
+
2648
+ switch ( $key ) {
2649
+ case 'enable_create_step' :
2650
+ $this->screens['create']['enabled'] = $value;
2651
+ break;
2652
+
2653
+ case 'enable_edit_item' :
2654
+ $this->screens['edit']['enabled'] = $value;
2655
+ break;
2656
+
2657
+ case 'enable_admin_item' :
2658
+ $this->screens['admin']['enabled'] = $value;
2659
+ break;
2660
+
2661
+ case 'create_step_position' :
2662
+ $this->screens['create']['position'] = $value;
2663
+ break;
2664
+
2665
+ // Note: 'admin' becomes 'edit' to distinguish from Dashboard 'admin'
2666
+ case 'admin_name' :
2667
+ $this->screens['edit']['name'] = $value;
2668
+ break;
2669
+
2670
+ case 'admin_slug' :
2671
+ $this->screens['edit']['slug'] = $value;
2672
+ break;
2673
+
2674
+ case 'create_name' :
2675
+ $this->screens['create']['name'] = $value;
2676
+ break;
2677
+
2678
+ case 'create_slug' :
2679
+ $this->screens['create']['slug'] = $value;
2680
+ break;
2681
+
2682
+ case 'admin_metabox_context' :
2683
+ $this->screens['admin']['metabox_context'] = $value;
2684
+ break;
2685
+
2686
+ case 'admin_metabox_priority' :
2687
+ $this->screens['admin']['metabox_priority'] = $value;
2688
+ break;
2689
+
2690
+ default :
2691
+ $this->data[ $key ] = $value;
2692
+ break;
2693
+ }
2694
+ }
2695
+
2696
+ /**
2697
+ * Returns a list of legacy properties
2698
+ *
2699
+ * The legacy implementation of BP_Group_Extension used all of these
2700
+ * object properties for configuration. Some have been moved.
2701
+ *
2702
+ * @since BuddyPress (1.8)
2703
+ * @return array
2704
+ */
2705
+ protected function get_legacy_property_list() {
2706
+ return array(
2707
+ 'name',
2708
+ 'slug',
2709
+ 'admin_name',
2710
+ 'admin_slug',
2711
+ 'create_name',
2712
+ 'create_slug',
2713
+ 'visibility',
2714
+ 'create_step_position',
2715
+ 'nav_item_position',
2716
+ 'admin_metabox_context',
2717
+ 'admin_metabox_priority',
2718
+ 'enable_create_step',
2719
+ 'enable_nav_item',
2720
+ 'enable_edit_item',
2721
+ 'enable_admin_item',
2722
+ 'nav_item_name',
2723
+ 'display_hook',
2724
+ 'template_file',
2725
  );
2726
  }
2727
+
2728
+ /**
2729
+ * Parse legacy properties
2730
+ *
2731
+ * The old standard for BP_Group_Extension was for plugins to register
2732
+ * their settings as properties in their constructor. The new method is
2733
+ * to pass a config array to the init() method. In order to support
2734
+ * legacy plugins, we slurp up legacy properties, and later on we'll
2735
+ * parse them into the new init() array.
2736
+ *
2737
+ * @since BuddyPress (1.8)
2738
+ */
2739
+ protected function parse_legacy_properties() {
2740
+
2741
+ // Only run this one time
2742
+ if ( ! empty( $this->legacy_properties_converted ) ) {
2743
+ return;
2744
+ }
2745
+
2746
+ $properties = $this->get_legacy_property_list();
2747
+
2748
+ // By-reference variable for convenience
2749
+ $lpc =& $this->legacy_properties_converted;
2750
+
2751
+ foreach ( $properties as $property ) {
2752
+
2753
+ // No legacy config exists for this key
2754
+ if ( ! isset( $this->{$property} ) ) {
2755
+ continue;
2756
+ }
2757
+
2758
+ // Grab the value and record it as appropriate
2759
+ $value = $this->{$property};
2760
+
2761
+ switch ( $property ) {
2762
+ case 'enable_create_step' :
2763
+ $lpc['screens']['create']['enabled'] = (bool) $value;
2764
+ break;
2765
+
2766
+ case 'enable_edit_item' :
2767
+ $lpc['screens']['edit']['enabled'] = (bool) $value;
2768
+ break;
2769
+
2770
+ case 'enable_admin_item' :
2771
+ $lpc['screens']['admin']['enabled'] = (bool) $value;
2772
+ break;
2773
+
2774
+ case 'create_step_position' :
2775
+ $lpc['screens']['create']['position'] = $value;
2776
+ break;
2777
+
2778
+ // Note: 'admin' becomes 'edit' to distinguish from Dashboard 'admin'
2779
+ case 'admin_name' :
2780
+ $lpc['screens']['edit']['name'] = $value;
2781
+ break;
2782
+
2783
+ case 'admin_slug' :
2784
+ $lpc['screens']['edit']['slug'] = $value;
2785
+ break;
2786
+
2787
+ case 'create_name' :
2788
+ $lpc['screens']['create']['name'] = $value;
2789
+ break;
2790
+
2791
+ case 'create_slug' :
2792
+ $lpc['screens']['create']['slug'] = $value;
2793
+ break;
2794
+
2795
+ case 'admin_metabox_context' :
2796
+ $lpc['screens']['admin']['metabox_context'] = $value;
2797
+ break;
2798
+
2799
+ case 'admin_metabox_priority' :
2800
+ $lpc['screens']['admin']['metabox_priority'] = $value;
2801
+ break;
2802
+
2803
+ default :
2804
+ $lpc[ $property ] = $value;
2805
+ break;
2806
+ }
2807
+ }
2808
+ }
2809
+
2810
+ /**
2811
+ * Set up legacy properties
2812
+ *
2813
+ * This method is responsible for ensuring that all legacy config
2814
+ * properties are stored in an array $this->legacy_properties, so that
2815
+ * they remain available to plugins that reference the variables at
2816
+ * their old locations.
2817
+ *
2818
+ * @see self::__get()
2819
+ *
2820
+ * @since BuddyPress (1.8)
2821
+ */
2822
+ protected function setup_legacy_properties() {
2823
+
2824
+ // Only run this one time
2825
+ if ( ! empty( $this->legacy_properties ) ) {
2826
+ return;
2827
+ }
2828
+
2829
+ $properties = $this->get_legacy_property_list();
2830
+ $params = $this->params;
2831
+ $lp =& $this->legacy_properties;
2832
+
2833
+ foreach ( $properties as $property ) {
2834
+ switch ( $property ) {
2835
+ case 'enable_create_step' :
2836
+ $lp['enable_create_step'] = $params['screens']['create']['enabled'];
2837
+ break;
2838
+
2839
+ case 'enable_edit_item' :
2840
+ $lp['enable_edit_item'] = $params['screens']['edit']['enabled'];
2841
+ break;
2842
+
2843
+ case 'enable_admin_item' :
2844
+ $lp['enable_admin_item'] = $params['screens']['admin']['enabled'];
2845
+ break;
2846
+
2847
+ case 'create_step_position' :
2848
+ $lp['create_step_position'] = $params['screens']['create']['position'];
2849
+ break;
2850
+
2851
+ // Note: 'admin' becomes 'edit' to distinguish from Dashboard 'admin'
2852
+ case 'admin_name' :
2853
+ $lp['admin_name'] = $params['screens']['edit']['name'];
2854
+ break;
2855
+
2856
+ case 'admin_slug' :
2857
+ $lp['admin_slug'] = $params['screens']['edit']['slug'];
2858
+ break;
2859
+
2860
+ case 'create_name' :
2861
+ $lp['create_name'] = $params['screens']['create']['name'];
2862
+ break;
2863
+
2864
+ case 'create_slug' :
2865
+ $lp['create_slug'] = $params['screens']['create']['slug'];
2866
+ break;
2867
+
2868
+ case 'admin_metabox_context' :
2869
+ $lp['admin_metabox_context'] = $params['screens']['admin']['metabox_context'];
2870
+ break;
2871
+
2872
+ case 'admin_metabox_priority' :
2873
+ $lp['admin_metabox_priority'] = $params['screens']['admin']['metabox_priority'];
2874
+ break;
2875
+
2876
+ default :
2877
+ // All other items get moved over
2878
+ $lp[ $property ] = $params[ $property ];
2879
+
2880
+ // Also reapply to the object, for backpat
2881
+ $this->{$property} = $params[ $property ];
2882
+
2883
+ break;
2884
+ }
2885
+ }
2886
+ }
2887
  }
2888
 
2889
+ function bp_register_group_extension( $group_extension_class = '' ) {
2890
 
2891
+ if ( ! class_exists( $group_extension_class ) ) {
2892
  return false;
2893
+ }
2894
 
2895
  // Register the group extension on the bp_init action so we have access
2896
  // to all plugins.
bp-groups/bp-groups-functions.php CHANGED
@@ -123,6 +123,8 @@ function groups_create_group( $args = '' ) {
123
  $member->date_modified = bp_core_current_time();
124
  $member->save();
125
 
 
 
126
  do_action( 'groups_create_group', $group->id, $member, $group );
127
 
128
  } else {
@@ -296,12 +298,6 @@ function groups_leave_group( $group_id, $user_id = 0 ) {
296
  if ( !groups_uninvite_user( $user_id, $group_id ) )
297
  return false;
298
 
299
- // Modify group member count
300
- groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') - 1 );
301
-
302
- // Modify user's group memberhip count
303
- bp_update_user_meta( $user_id, 'total_group_count', (int) bp_get_user_meta( $user_id, 'total_group_count', true ) - 1 );
304
-
305
  /**
306
  * If the user joined this group less than five minutes ago, remove the
307
  * joined_group activity so users cannot flood the activity stream by
@@ -361,7 +357,6 @@ function groups_join_group( $group_id, $user_id = 0 ) {
361
  ) );
362
 
363
  // Modify group meta
364
- groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 );
365
  groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
366
 
367
  do_action( 'groups_join_group', $group_id, $user_id );
@@ -382,7 +377,11 @@ function groups_get_group_mods( $group_id ) {
382
  /**
383
  * Fetch the members of a group
384
  *
385
- * Procedural wrapper for BP_Groups_Member::get_all_for_group().
 
 
 
 
386
  *
387
  * @param int $group_id
388
  * @param int $limit Maximum members to return
@@ -392,8 +391,49 @@ function groups_get_group_mods( $group_id ) {
392
  * @param array|string $exclude Array or comma-sep list of users to exclude
393
  * @return array Multi-d array of 'members' list and 'count'
394
  */
395
- function groups_get_group_members( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) {
396
- return BP_Groups_Member::get_all_for_group( $group_id, $limit, $page, $exclude_admins_mods, $exclude_banned, $exclude );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
  }
398
 
399
  function groups_get_total_member_count( $group_id ) {
@@ -413,11 +453,14 @@ function groups_get_total_member_count( $group_id ) {
413
  function groups_get_groups( $args = '' ) {
414
 
415
  $defaults = array(
416
- 'type' => 'active', // active, newest, alphabetical, random, popular, most-forum-topics or most-forum-posts
 
 
417
  'user_id' => false, // Pass a user_id to limit to only groups that this user is a member of
418
  'include' => false, // Only include these specific groups (group_ids)
419
  'exclude' => false, // Do not include these specific groups (group_ids)
420
  'search_terms' => false, // Limit to groups that match these search terms
 
421
  'show_hidden' => false, // Show hidden groups to non-admins
422
  'per_page' => 20, // The number of results to return per page
423
  'page' => 1, // The page to return if limiting per page
@@ -432,10 +475,13 @@ function groups_get_groups( $args = '' ) {
432
  'include' => $r['include'],
433
  'exclude' => $r['exclude'],
434
  'search_terms' => $r['search_terms'],
 
435
  'show_hidden' => $r['show_hidden'],
436
  'per_page' => $r['per_page'],
437
  'page' => $r['page'],
438
- 'populate_extras' => $r['populate_extras']
 
 
439
  ) );
440
 
441
  return apply_filters_ref_array( 'groups_get_groups', array( &$groups, &$r ) );
@@ -670,7 +716,6 @@ function groups_accept_invite( $user_id, $group_id ) {
670
  $member->delete_request( $user_id, $group_id );
671
 
672
  // Modify group meta
673
- groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 );
674
  groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
675
 
676
  bp_core_delete_notifications_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
@@ -868,9 +913,6 @@ function groups_accept_membership_request( $membership_id, $user_id = 0, $group_
868
  if ( groups_check_user_has_invite( $membership->user_id, $membership->group_id ) )
869
  groups_delete_invite( $membership->user_id, $membership->group_id );
870
 
871
- // Modify group member count
872
- groups_update_groupmeta( $membership->group_id, 'total_member_count', (int) groups_get_groupmeta( $membership->group_id, 'total_member_count') + 1 );
873
-
874
  // Record this in activity streams
875
  $group = groups_get_group( array( 'group_id' => $membership->group_id ) );
876
 
123
  $member->date_modified = bp_core_current_time();
124
  $member->save();
125
 
126
+ groups_update_groupmeta( $group->id, 'last_activity', bp_core_current_time() );
127
+
128
  do_action( 'groups_create_group', $group->id, $member, $group );
129
 
130
  } else {
298
  if ( !groups_uninvite_user( $user_id, $group_id ) )
299
  return false;
300
 
 
 
 
 
 
 
301
  /**
302
  * If the user joined this group less than five minutes ago, remove the
303
  * joined_group activity so users cannot flood the activity stream by
357
  ) );
358
 
359
  // Modify group meta
 
360
  groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
361
 
362
  do_action( 'groups_join_group', $group_id, $user_id );
377
  /**
378
  * Fetch the members of a group
379
  *
380
+ * Since BuddyPress 1.8, a procedural wrapper for BP_Group_Member_Query.
381
+ * Previously called BP_Groups_Member::get_all_for_group().
382
+ *
383
+ * To use the legacy query, filter 'bp_use_legacy_group_member_query',
384
+ * returning true.
385
  *
386
  * @param int $group_id
387
  * @param int $limit Maximum members to return
391
  * @param array|string $exclude Array or comma-sep list of users to exclude
392
  * @return array Multi-d array of 'members' list and 'count'
393
  */
394
+ function groups_get_group_members( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false, $group_role = false ) {
395
+
396
+ // For legacy users. Use of BP_Groups_Member::get_all_for_group()
397
+ // is deprecated. func_get_args() can't be passed to a function in PHP
398
+ // 5.2.x, so we create a variable
399
+ $func_args = func_get_args();
400
+ if ( apply_filters( 'bp_use_legacy_group_member_query', false, __FUNCTION__, $func_args ) ) {
401
+ $retval = BP_Groups_Member::get_all_for_group( $group_id, $limit, $page, $exclude_admins_mods, $exclude_banned, $exclude );
402
+ } else {
403
+
404
+ // exclude_admins_mods and exclude_banned are legacy arguments.
405
+ // Convert to group_role
406
+ if ( empty( $group_role ) ) {
407
+ $group_role = array( 'member' );
408
+
409
+ if ( ! $exclude_admins_mods ) {
410
+ $group_role[] = 'mod';
411
+ $group_role[] = 'admin';
412
+ }
413
+
414
+ if ( ! $exclude_banned ) {
415
+ $group_role[] = 'banned';
416
+ }
417
+ }
418
+
419
+ // Perform the group member query (extends BP_User_Query)
420
+ $members = new BP_Group_Member_Query( array(
421
+ 'group_id' => $group_id,
422
+ 'per_page' => $limit,
423
+ 'page' => $page,
424
+ 'group_role' => $group_role,
425
+ 'exclude' => $exclude,
426
+ 'type' => 'last_modified',
427
+ ) );
428
+
429
+ // Structure the return value as expected by the template functions
430
+ $retval = array(
431
+ 'members' => array_values( $members->results ),
432
+ 'count' => $members->total_users,
433
+ );
434
+ }
435
+
436
+ return $retval;
437
  }
438
 
439
  function groups_get_total_member_count( $group_id ) {
453
  function groups_get_groups( $args = '' ) {
454
 
455
  $defaults = array(
456
+ 'type' => false, // active, newest, alphabetical, random, popular, most-forum-topics or most-forum-posts
457
+ 'order' => 'DESC', // 'ASC' or 'DESC'
458
+ 'orderby' => 'date_created', // date_created, last_activity, total_member_count, name, random
459
  'user_id' => false, // Pass a user_id to limit to only groups that this user is a member of
460
  'include' => false, // Only include these specific groups (group_ids)
461
  'exclude' => false, // Do not include these specific groups (group_ids)
462
  'search_terms' => false, // Limit to groups that match these search terms
463
+ 'meta_query' => false, // Filter by groupmeta. See WP_Meta_Query for syntax
464
  'show_hidden' => false, // Show hidden groups to non-admins
465
  'per_page' => 20, // The number of results to return per page
466
  'page' => 1, // The page to return if limiting per page
475
  'include' => $r['include'],
476
  'exclude' => $r['exclude'],
477
  'search_terms' => $r['search_terms'],
478
+ 'meta_query' => $r['meta_query'],
479
  'show_hidden' => $r['show_hidden'],
480
  'per_page' => $r['per_page'],
481
  'page' => $r['page'],
482
+ 'populate_extras' => $r['populate_extras'],
483
+ 'order' => $r['order'],
484
+ 'orderby' => $r['orderby'],
485
  ) );
486
 
487
  return apply_filters_ref_array( 'groups_get_groups', array( &$groups, &$r ) );
716
  $member->delete_request( $user_id, $group_id );
717
 
718
  // Modify group meta
 
719
  groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
720
 
721
  bp_core_delete_notifications_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
913
  if ( groups_check_user_has_invite( $membership->user_id, $membership->group_id ) )
914
  groups_delete_invite( $membership->user_id, $membership->group_id );
915
 
 
 
 
916
  // Record this in activity streams
917
  $group = groups_get_group( array( 'group_id' => $membership->group_id ) );
918
 
bp-groups/bp-groups-loader.php CHANGED
@@ -305,7 +305,7 @@ class BP_Groups_Component extends BP_Component {
305
  ) );
306
 
307
  // If avatar uploads are not disabled, add avatar option
308
- if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) {
309
  $this->group_creation_steps['group-avatar'] = array(
310
  'name' => __( 'Avatar', 'buddypress' ),
311
  'position' => 20
@@ -545,6 +545,16 @@ class BP_Groups_Component extends BP_Component {
545
  'title' => $pending,
546
  'href' => trailingslashit( $groups_link . 'invites' )
547
  );
 
 
 
 
 
 
 
 
 
 
548
  }
549
 
550
  parent::setup_admin_bar( $wp_admin_nav );
305
  ) );
306
 
307
  // If avatar uploads are not disabled, add avatar option
308
+ if ( ! (int) buddypress()->site_options['bp-disable-avatar-uploads'] ) {
309
  $this->group_creation_steps['group-avatar'] = array(
310
  'name' => __( 'Avatar', 'buddypress' ),
311
  'position' => 20
545
  'title' => $pending,
546
  'href' => trailingslashit( $groups_link . 'invites' )
547
  );
548
+
549
+ // Create a Group
550
+ if ( bp_user_can_create_groups() ) {
551
+ $wp_admin_nav[] = array(
552
+ 'parent' => 'my-account-' . $this->id,
553
+ 'id' => 'my-account-' . $this->id . '-create',
554
+ 'title' => __( 'Create a Group', 'buddypress' ),
555
+ 'href' => trailingslashit( bp_get_groups_directory_permalink() . 'create' )
556
+ );
557
+ }
558
  }
559
 
560
  parent::setup_admin_bar( $wp_admin_nav );
bp-groups/bp-groups-screens.php CHANGED
@@ -466,7 +466,7 @@ function groups_screen_group_request_membership() {
466
 
467
  if ( 'private' != $bp->groups->current_group->status )
468
  return false;
469
-
470
  // If the user has submitted a request, send it.
471
  if ( isset( $_POST['group-request-send']) ) {
472
 
@@ -523,7 +523,9 @@ function groups_screen_group_admin_edit_details() {
523
  if ( !check_admin_referer( 'groups_edit_group_details' ) )
524
  return false;
525
 
526
- if ( !groups_edit_base_group_details( $_POST['group-id'], $_POST['group-name'], $_POST['group-desc'], (int) $_POST['group-notify-members'] ) ) {
 
 
527
  bp_core_add_message( __( 'There was an error updating group details, please try again.', 'buddypress' ), 'error' );
528
  } else {
529
  bp_core_add_message( __( 'Group details were successfully updated.', 'buddypress' ) );
@@ -969,16 +971,19 @@ class BP_Groups_Theme_Compat {
969
 
970
  do_action( 'groups_directory_groups_setup' );
971
 
 
972
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
973
  add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
974
 
975
  // Creating a group
976
  } elseif ( bp_is_groups_component() && bp_is_current_action( 'create' ) ) {
 
977
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) );
978
  add_filter( 'bp_replace_the_content', array( $this, 'create_content' ) );
979
 
980
- // Group admin
981
  } elseif ( bp_is_single_item() ) {
 
982
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
983
  add_filter( 'bp_replace_the_content', array( $this, 'single_content' ) );
984
 
@@ -987,6 +992,29 @@ class BP_Groups_Theme_Compat {
987
 
988
  /** Directory *************************************************************/
989
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
990
  /**
991
  * Update the global $post with directory data
992
  *
@@ -1025,6 +1053,29 @@ class BP_Groups_Theme_Compat {
1025
 
1026
  /** Create ****************************************************************/
1027
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1028
  /**
1029
  * Update the global $post with create screen data
1030
  *
@@ -1063,6 +1114,36 @@ class BP_Groups_Theme_Compat {
1063
 
1064
  /** Single ****************************************************************/
1065
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1066
  /**
1067
  * Update the global $post with single group data
1068
  *
466
 
467
  if ( 'private' != $bp->groups->current_group->status )
468
  return false;
469
+
470
  // If the user has submitted a request, send it.
471
  if ( isset( $_POST['group-request-send']) ) {
472
 
523
  if ( !check_admin_referer( 'groups_edit_group_details' ) )
524
  return false;
525
 
526
+ $group_notify_members = isset( $_POST['group-notify-members'] ) ? (int) $_POST['group-notify-members'] : 0;
527
+
528
+ if ( !groups_edit_base_group_details( $_POST['group-id'], $_POST['group-name'], $_POST['group-desc'], $group_notify_members ) ) {
529
  bp_core_add_message( __( 'There was an error updating group details, please try again.', 'buddypress' ), 'error' );
530
  } else {
531
  bp_core_add_message( __( 'Group details were successfully updated.', 'buddypress' ) );
971
 
972
  do_action( 'groups_directory_groups_setup' );
973
 
974
+ add_filter( 'bp_get_buddypress_template', array( $this, 'directory_template_hierarchy' ) );
975
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
976
  add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
977
 
978
  // Creating a group
979
  } elseif ( bp_is_groups_component() && bp_is_current_action( 'create' ) ) {
980
+ add_filter( 'bp_get_buddypress_template', array( $this, 'create_template_hierarchy' ) );
981
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) );
982
  add_filter( 'bp_replace_the_content', array( $this, 'create_content' ) );
983
 
984
+ // Group page
985
  } elseif ( bp_is_single_item() ) {
986
+ add_filter( 'bp_get_buddypress_template', array( $this, 'single_template_hierarchy' ) );
987
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
988
  add_filter( 'bp_replace_the_content', array( $this, 'single_content' ) );
989
 
992
 
993
  /** Directory *************************************************************/
994
 
995
+ /**
996
+ * Add template hierarchy to theme compat for the group directory page.
997
+ *
998
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
999
+ *
1000
+ * @since BuddyPress (1.8)
1001
+ *
1002
+ * @param string $templates The templates from bp_get_theme_compat_templates()
1003
+ * @return array $templates Array of custom templates to look for.
1004
+ */
1005
+ public function directory_template_hierarchy( $templates ) {
1006
+ // Setup our templates based on priority
1007
+ $new_templates = apply_filters( 'bp_template_hierarchy_groups_directory', array(
1008
+ 'groups/index-directory.php'
1009
+ ) );
1010
+
1011
+ // Merge new templates with existing stack
1012
+ // @see bp_get_theme_compat_templates()
1013
+ $templates = array_merge( (array) $new_templates, $templates );
1014
+
1015
+ return $templates;
1016
+ }
1017
+
1018
  /**
1019
  * Update the global $post with directory data
1020
  *
1053
 
1054
  /** Create ****************************************************************/
1055
 
1056
+ /**
1057
+ * Add custom template hierarchy to theme compat for the group create page.
1058
+ *
1059
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
1060
+ *
1061
+ * @since BuddyPress (1.8)
1062
+ *
1063
+ * @param string $templates The templates from bp_get_theme_compat_templates()
1064
+ * @return array $templates Array of custom templates to look for.
1065
+ */
1066
+ public function create_template_hierarchy( $templates ) {
1067
+ // Setup our templates based on priority
1068
+ $new_templates = apply_filters( 'bp_template_hierarchy_groups_create', array(
1069
+ 'groups/index-create.php'
1070
+ ) );
1071
+
1072
+ // Merge new templates with existing stack
1073
+ // @see bp_get_theme_compat_templates()
1074
+ $templates = array_merge( $new_templates, $templates );
1075
+
1076
+ return $templates;
1077
+ }
1078
+
1079
  /**
1080
  * Update the global $post with create screen data
1081
  *
1114
 
1115
  /** Single ****************************************************************/
1116
 
1117
+ /**
1118
+ * Add custom template hierarchy to theme compat for group pages.
1119
+ *
1120
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
1121
+ *
1122
+ * @since BuddyPress (1.8)
1123
+ *
1124
+ * @param string $templates The templates from bp_get_theme_compat_templates()
1125
+ * @return array $templates Array of custom templates to look for.
1126
+ */
1127
+ public function single_template_hierarchy( $templates ) {
1128
+ // Setup some variables we're going to reference in our custom templates
1129
+ $group = groups_get_current_group();
1130
+
1131
+ // Setup our templates based on priority
1132
+ $new_templates = apply_filters( 'bp_template_hierarchy_groups_single_item', array(
1133
+ 'groups/single/index-id-' . sanitize_file_name( bp_get_current_group_id() ) . '.php',
1134
+ 'groups/single/index-slug-' . sanitize_file_name( bp_get_current_group_slug() ) . '.php',
1135
+ 'groups/single/index-action-' . sanitize_file_name( bp_current_action() ) . '.php',
1136
+ 'groups/single/index-status-' . sanitize_file_name( $group->status ) . '.php',
1137
+ 'groups/single/index.php'
1138
+ ) );
1139
+
1140
+ // Merge new templates with existing stack
1141
+ // @see bp_get_theme_compat_templates()
1142
+ $templates = array_merge( (array) $new_templates, $templates );
1143
+
1144
+ return $templates;
1145
+ }
1146
+
1147
  /**
1148
  * Update the global $post with single group data
1149
  *
bp-groups/bp-groups-template.php CHANGED
@@ -144,6 +144,7 @@ class BP_Groups_Template {
144
  'include' => false,
145
  'exclude' => false,
146
  'search_terms' => '',
 
147
  'populate_extras' => true
148
  );
149
 
@@ -165,10 +166,13 @@ class BP_Groups_Template {
165
  } else {
166
  $this->groups = groups_get_groups( array(
167
  'type' => $type,
 
 
168
  'per_page' => $this->pag_num,
169
  'page' => $this->pag_page,
170
  'user_id' => $user_id,
171
  'search_terms' => $search_terms,
 
172
  'include' => $include,
173
  'exclude' => $exclude,
174
  'populate_extras' => $populate_extras,
@@ -264,6 +268,17 @@ class BP_Groups_Template {
264
  }
265
  }
266
 
 
 
 
 
 
 
 
 
 
 
 
267
  function bp_has_groups( $args = '' ) {
268
  global $groups_template, $bp;
269
 
@@ -273,7 +288,7 @@ function bp_has_groups( $args = '' ) {
273
  * pass their parameters directly to the loop.
274
  */
275
  $slug = false;
276
- $type = 'active';
277
  $user_id = 0;
278
  $order = '';
279
 
@@ -282,6 +297,7 @@ function bp_has_groups( $args = '' ) {
282
  $user_id = bp_displayed_user_id();
283
 
284
  // Type
 
285
  if ( bp_is_current_action( 'my-groups' ) ) {
286
  if ( 'most-popular' == $order ) {
287
  $type = 'popular';
@@ -296,7 +312,9 @@ function bp_has_groups( $args = '' ) {
296
  }
297
 
298
  $defaults = array(
299
- 'type' => $type,
 
 
300
  'page' => 1,
301
  'per_page' => 20,
302
  'max' => false,
@@ -307,10 +325,11 @@ function bp_has_groups( $args = '' ) {
307
  'user_id' => $user_id, // Pass a user ID to limit to groups this user has joined
308
  'slug' => $slug, // Pass a group slug to only return that group
309
  'search_terms' => '', // Pass search terms to return only matching groups
 
310
  'include' => false, // Pass comma separated list or array of group ID's to return only these groups
311
  'exclude' => false, // Pass comma separated list or array of group ID's to exclude these groups
312
 
313
- 'populate_extras' => true // Get extra meta - is_member, is_banned
314
  );
315
 
316
  $r = wp_parse_args( $args, $defaults );
@@ -326,6 +345,8 @@ function bp_has_groups( $args = '' ) {
326
 
327
  $groups_template = new BP_Groups_Template( array(
328
  'type' => $r['type'],
 
 
329
  'page' => (int) $r['page'],
330
  'per_page' => (int) $r['per_page'],
331
  'max' => (int) $r['max'],
@@ -334,6 +355,7 @@ function bp_has_groups( $args = '' ) {
334
  'user_id' => (int) $r['user_id'],
335
  'slug' => $r['slug'],
336
  'search_terms' => $r['search_terms'],
 
337
  'include' => $r['include'],
338
  'exclude' => $r['exclude'],
339
  'populate_extras' => (bool) $r['populate_extras']
@@ -651,30 +673,30 @@ function bp_group_date_created( $group = false ) {
651
 
652
  return apply_filters( 'bp_get_group_date_created', bp_core_time_since( strtotime( $group->date_created ) ) );
653
  }
654
-
655
  function bp_group_creator_username( $group = false ) {
656
  echo bp_get_group_creator_username( $group );
657
  }
658
  function bp_get_group_creator_username( $group = false ) {
659
  global $groups_template;
660
-
661
  if ( empty( $group ) )
662
  $group =& $groups_template->group;
663
-
664
  return apply_filters( 'bp_get_group_creator_username', bp_core_get_user_displayname( $group->creator_id ) );
665
- }
666
 
667
  function bp_group_creator_id( $group = false ) {
668
  echo bp_get_group_creator_id( $group );
669
  }
670
  function bp_get_group_creator_id( $group = false ) {
671
  global $groups_template;
672
-
673
  if ( empty( $group ) )
674
  $group =& $groups_template->group;
675
-
676
  return apply_filters( 'bp_get_group_creator_id', $group->creator_id );
677
- }
678
 
679
  function bp_group_creator_permalink( $group = false ) {
680
  echo bp_get_group_creator_permalink( $group );
@@ -686,14 +708,14 @@ function bp_group_creator_permalink( $group = false ) {
686
  $group =& $groups_template->group;
687
 
688
  return apply_filters( 'bp_get_group_creator_permalink', bp_core_get_user_domain( $group->creator_id ) );
689
- }
690
 
691
  function bp_is_group_creator( $group = false, $user_id = 0 ) {
692
  global $groups_template;
693
-
694
  if ( empty( $group ) )
695
  $group =& $groups_template->group;
696
-
697
  if ( empty( $user_id ) )
698
  $user_id = bp_loggedin_user_id();
699
 
@@ -726,7 +748,7 @@ function bp_group_creator_avatar( $group = false, $args = array() ) {
726
  return apply_filters( 'bp_get_group_creator_avatar', $avatar );
727
  }
728
 
729
-
730
  function bp_group_is_admin() {
731
  return bp_is_item_admin();
732
  }
@@ -1875,11 +1897,11 @@ class BP_Groups_Group_Members_Template {
1875
  var $pag_links;
1876
  var $total_group_count;
1877
 
1878
- function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) {
1879
 
1880
  $this->pag_page = isset( $_REQUEST['mlpage'] ) ? intval( $_REQUEST['mlpage'] ) : 1;
1881
  $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
1882
- $this->members = BP_Groups_Member::get_all_for_group( $group_id, $this->pag_num, $this->pag_page, $exclude_admins_mods, $exclude_banned, $exclude );
1883
 
1884
  if ( !$max || $max >= (int) $this->members['count'] )
1885
  $this->total_member_count = (int) $this->members['count'];
@@ -1955,19 +1977,17 @@ class BP_Groups_Group_Members_Template {
1955
  function bp_group_has_members( $args = '' ) {
1956
  global $members_template;
1957
 
1958
- $defaults = array(
1959
  'group_id' => bp_get_current_group_id(),
1960
  'per_page' => 20,
1961
  'max' => false,
1962
  'exclude' => false,
1963
  'exclude_admins_mods' => 1,
1964
- 'exclude_banned' => 1
1965
- );
1966
-
1967
- $r = wp_parse_args( $args, $defaults );
1968
- extract( $r, EXTR_SKIP );
1969
 
1970
- $members_template = new BP_Groups_Group_Members_Template( $group_id, $per_page, $max, (int) $exclude_admins_mods, (int) $exclude_banned, $exclude );
1971
  return apply_filters( 'bp_group_has_members', $members_template->has_members(), $members_template );
1972
  }
1973
 
144
  'include' => false,
145
  'exclude' => false,
146
  'search_terms' => '',
147
+ 'meta_query' => false,
148
  'populate_extras' => true
149
  );
150
 
166
  } else {
167
  $this->groups = groups_get_groups( array(
168
  'type' => $type,
169
+ 'order' => $order,
170
+ 'orderby' => $orderby,
171
  'per_page' => $this->pag_num,
172
  'page' => $this->pag_page,
173
  'user_id' => $user_id,
174
  'search_terms' => $search_terms,
175
+ 'meta_query' => $meta_query,
176
  'include' => $include,
177
  'exclude' => $exclude,
178
  'populate_extras' => $populate_extras,
268
  }
269
  }
270
 
271
+ /**
272
+ * Start the Groups Template Loop
273
+ *
274
+ * See the $defaults definition below for a description of parameters.
275
+ *
276
+ * Note that the 'type' parameter overrides 'order' and 'orderby'. See
277
+ * BP_Groups_Group::get() for more details.
278
+ *
279
+ * @param array $args
280
+ * @return bool True if there are groups to display that match the params
281
+ */
282
  function bp_has_groups( $args = '' ) {
283
  global $groups_template, $bp;
284
 
288
  * pass their parameters directly to the loop.
289
  */
290
  $slug = false;
291
+ $type = '';
292
  $user_id = 0;
293
  $order = '';
294
 
297
  $user_id = bp_displayed_user_id();
298
 
299
  // Type
300
+ // @todo What is $order? At some point it was removed incompletely?
301
  if ( bp_is_current_action( 'my-groups' ) ) {
302
  if ( 'most-popular' == $order ) {
303
  $type = 'popular';
312
  }
313
 
314
  $defaults = array(
315
+ 'type' => $type, // 'type' is an override for 'order' and 'orderby'. See docblock.
316
+ 'order' => 'DESC',
317
+ 'orderby' => 'last_activity',
318
  'page' => 1,
319
  'per_page' => 20,
320
  'max' => false,
325
  'user_id' => $user_id, // Pass a user ID to limit to groups this user has joined
326
  'slug' => $slug, // Pass a group slug to only return that group
327
  'search_terms' => '', // Pass search terms to return only matching groups
328
+ 'meta_query' => false, // Filter by groupmeta. See WP_Meta_Query for format
329
  'include' => false, // Pass comma separated list or array of group ID's to return only these groups
330
  'exclude' => false, // Pass comma separated list or array of group ID's to exclude these groups
331
 
332
+ 'populate_extras' => true, // Get extra meta - is_member, is_banned
333
  );
334
 
335
  $r = wp_parse_args( $args, $defaults );
345
 
346
  $groups_template = new BP_Groups_Template( array(
347
  'type' => $r['type'],
348
+ 'order' => $r['order'],
349
+ 'orderby' => $r['orderby'],
350
  'page' => (int) $r['page'],
351
  'per_page' => (int) $r['per_page'],
352
  'max' => (int) $r['max'],
355
  'user_id' => (int) $r['user_id'],
356
  'slug' => $r['slug'],
357
  'search_terms' => $r['search_terms'],
358
+ 'meta_query' => $r['meta_query'],
359
  'include' => $r['include'],
360
  'exclude' => $r['exclude'],
361
  'populate_extras' => (bool) $r['populate_extras']
673
 
674
  return apply_filters( 'bp_get_group_date_created', bp_core_time_since( strtotime( $group->date_created ) ) );
675
  }
676
+
677
  function bp_group_creator_username( $group = false ) {
678
  echo bp_get_group_creator_username( $group );
679
  }
680
  function bp_get_group_creator_username( $group = false ) {
681
  global $groups_template;
682
+
683
  if ( empty( $group ) )
684
  $group =& $groups_template->group;
685
+
686
  return apply_filters( 'bp_get_group_creator_username', bp_core_get_user_displayname( $group->creator_id ) );
687
+ }
688
 
689
  function bp_group_creator_id( $group = false ) {
690
  echo bp_get_group_creator_id( $group );
691
  }
692
  function bp_get_group_creator_id( $group = false ) {
693
  global $groups_template;
694
+
695
  if ( empty( $group ) )
696
  $group =& $groups_template->group;
697
+
698
  return apply_filters( 'bp_get_group_creator_id', $group->creator_id );
699
+ }
700
 
701
  function bp_group_creator_permalink( $group = false ) {
702
  echo bp_get_group_creator_permalink( $group );
708
  $group =& $groups_template->group;
709
 
710
  return apply_filters( 'bp_get_group_creator_permalink', bp_core_get_user_domain( $group->creator_id ) );
711
+ }
712
 
713
  function bp_is_group_creator( $group = false, $user_id = 0 ) {
714
  global $groups_template;
715
+
716
  if ( empty( $group ) )
717
  $group =& $groups_template->group;
718
+
719
  if ( empty( $user_id ) )
720
  $user_id = bp_loggedin_user_id();
721
 
748
  return apply_filters( 'bp_get_group_creator_avatar', $avatar );
749
  }
750
 
751
+
752
  function bp_group_is_admin() {
753
  return bp_is_item_admin();
754
  }
1897
  var $pag_links;
1898
  var $total_group_count;
1899
 
1900
+ function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude, $group_role = false ) {
1901
 
1902
  $this->pag_page = isset( $_REQUEST['mlpage'] ) ? intval( $_REQUEST['mlpage'] ) : 1;
1903
  $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
1904
+ $this->members = groups_get_group_members( $group_id, $this->pag_num, $this->pag_page, $exclude_admins_mods, $exclude_banned, $exclude, $group_role );
1905
 
1906
  if ( !$max || $max >= (int) $this->members['count'] )
1907
  $this->total_member_count = (int) $this->members['count'];
1977
  function bp_group_has_members( $args = '' ) {
1978
  global $members_template;
1979
 
1980
+ $r = wp_parse_args( $args, array(
1981
  'group_id' => bp_get_current_group_id(),
1982
  'per_page' => 20,
1983
  'max' => false,
1984
  'exclude' => false,
1985
  'exclude_admins_mods' => 1,
1986
+ 'exclude_banned' => 1,
1987
+ 'group_role' => false,
1988
+ ) );
 
 
1989
 
1990
+ $members_template = new BP_Groups_Group_Members_Template( $r['group_id'], $r['per_page'], $r['max'], (int) $r['exclude_admins_mods'], (int) $r['exclude_banned'], $r['exclude'], $r['group_role'] );
1991
  return apply_filters( 'bp_group_has_members', $members_template->has_members(), $members_template );
1992
  }
1993
 
bp-groups/bp-groups-widgets.php CHANGED
@@ -26,7 +26,7 @@ class BP_Groups_Widget extends WP_Widget {
26
  function __construct() {
27
  $widget_ops = array(
28
  'description' => __( 'A dynamic list of recently active, popular, and newest groups', 'buddypress' ),
29
- 'classname' => 'widget_bp_groups_widget buddypress',
30
  );
31
  parent::__construct( false, _x( '(BuddyPress) Groups', 'widget name', 'buddypress' ), $widget_ops );
32
 
@@ -47,17 +47,19 @@ class BP_Groups_Widget extends WP_Widget {
47
  if ( empty( $instance['title'] ) )
48
  $instance['title'] = __( 'Groups', 'buddypress' );
49
 
 
 
50
  echo $before_widget;
51
 
52
- $title = !empty( $instance['link_title'] ) ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) . '">' . $instance['title'] . '</a>' : $instance['title'];
53
 
54
  echo $before_title . $title . $after_title; ?>
55
 
56
  <?php if ( bp_has_groups( 'user_id=' . $user_id . '&type=' . $instance['group_default'] . '&max=' . $instance['max_groups'] ) ) : ?>
57
  <div class="item-options" id="groups-list-options">
58
- <a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="newest-groups"<?php if ( $instance['group_default'] == 'newest' ) : ?> class="selected"<?php endif; ?>><?php _e("Newest", 'buddypress') ?></a> |
59
- <a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="recently-active-groups"<?php if ( $instance['group_default'] == 'active' ) : ?> class="selected"<?php endif; ?>><?php _e("Active", 'buddypress') ?></a> |
60
- <a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="popular-groups" <?php if ( $instance['group_default'] == 'popular' ) : ?> class="selected"<?php endif; ?>><?php _e("Popular", 'buddypress') ?></a>
61
  </div>
62
 
63
  <ul id="groups-list" class="item-list">
26
  function __construct() {
27
  $widget_ops = array(
28
  'description' => __( 'A dynamic list of recently active, popular, and newest groups', 'buddypress' ),
29
+ 'classname' => 'widget_bp_groups_widget buddypress widget',
30
  );
31
  parent::__construct( false, _x( '(BuddyPress) Groups', 'widget name', 'buddypress' ), $widget_ops );
32
 
47
  if ( empty( $instance['title'] ) )
48
  $instance['title'] = __( 'Groups', 'buddypress' );
49
 
50
+ $title = apply_filters( 'widget_title', $instance['title'] );
51
+
52
  echo $before_widget;
53
 
54
+ $title = !empty( $instance['link_title'] ) ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) . '">' . $title . '</a>' : $title;
55
 
56
  echo $before_title . $title . $after_title; ?>
57
 
58
  <?php if ( bp_has_groups( 'user_id=' . $user_id . '&type=' . $instance['group_default'] . '&max=' . $instance['max_groups'] ) ) : ?>
59
  <div class="item-options" id="groups-list-options">
60
+ <a href="<?php bp_groups_directory_permalink(); ?>" id="newest-groups"<?php if ( $instance['group_default'] == 'newest' ) : ?> class="selected"<?php endif; ?>><?php _e("Newest", 'buddypress') ?></a> |
61
+ <a href="<?php bp_groups_directory_permalink(); ?>" id="recently-active-groups"<?php if ( $instance['group_default'] == 'active' ) : ?> class="selected"<?php endif; ?>><?php _e("Active", 'buddypress') ?></a> |
62
+ <a href="<?php bp_groups_directory_permalink(); ?>" id="popular-groups" <?php if ( $instance['group_default'] == 'popular' ) : ?> class="selected"<?php endif; ?>><?php _e("Popular", 'buddypress') ?></a>
63
  </div>
64
 
65
  <ul id="groups-list" class="item-list">
bp-languages/buddypress.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: BuddyPress \n"
6
  "Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
7
- "POT-Creation-Date: 2013-05-15 18:35:23+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,77 +12,129 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: bp-activity/bp-activity-actions.php:158
16
  msgid "Activity deleted successfully"
17
  msgstr ""
18
 
19
- #: bp-activity/bp-activity-actions.php:160
20
  msgid "There was an error when deleting that activity"
21
  msgstr ""
22
 
23
- #: bp-activity/bp-activity-actions.php:214
24
  msgid "The activity item has been marked as spam and is no longer visible."
25
  msgstr ""
26
 
27
- #: bp-activity/bp-activity-actions.php:263
28
- #: bp-templates/bp-legacy/buddypress-functions.php:554
29
- #: bp-themes/bp-default/_inc/ajax.php:263
30
  msgid "Please enter some content to post."
31
  msgstr ""
32
 
33
- #: bp-activity/bp-activity-actions.php:284
34
  msgid "Update Posted!"
35
  msgstr ""
36
 
37
- #: bp-activity/bp-activity-actions.php:286
38
  msgid "There was an error when posting your update, please try again."
39
  msgstr ""
40
 
41
- #: bp-activity/bp-activity-actions.php:323
42
- #: bp-templates/bp-legacy/buddypress-functions.php:602
43
- #: bp-themes/bp-default/_inc/ajax.php:311
44
  msgid "Please do not leave the comment area blank."
45
  msgstr ""
46
 
47
- #: bp-activity/bp-activity-actions.php:334
48
  msgid "Reply Posted!"
49
  msgstr ""
50
 
51
- #: bp-activity/bp-activity-actions.php:336
52
- #: bp-templates/bp-legacy/buddypress-functions.php:605
53
- #: bp-templates/bp-legacy/buddypress-functions.php:614
54
- #: bp-themes/bp-default/_inc/ajax.php:314
55
- #: bp-themes/bp-default/_inc/ajax.php:323
56
  msgid "There was an error posting that reply, please try again."
57
  msgstr ""
58
 
59
- #: bp-activity/bp-activity-actions.php:368
60
  msgid "Activity marked as favorite."
61
  msgstr ""
62
 
63
- #: bp-activity/bp-activity-actions.php:370
64
  msgid "There was an error marking that activity as a favorite, please try again."
65
  msgstr ""
66
 
67
- #: bp-activity/bp-activity-actions.php:402
68
  msgid "Activity removed as favorite."
69
  msgstr ""
70
 
71
- #: bp-activity/bp-activity-actions.php:404
72
  msgid "There was an error removing that activity as a favorite, please try again."
73
  msgstr ""
74
 
75
- #. translators: Personal activity RSS title - "[Site Name] | [Displayed User
 
 
 
 
 
 
 
 
 
 
 
76
  #. Name] | Activity"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
  #: bp-activity/bp-activity-admin.php:35 bp-activity/bp-activity-admin.php:36
79
  #: bp-activity/bp-activity-admin.php:852 bp-activity/bp-activity-admin.php:1167
80
  #: bp-activity/bp-activity-loader.php:118
81
- #: bp-activity/bp-activity-loader.php:242
82
- #: bp-activity/bp-activity-screens.php:278
83
- #: bp-activity/bp-activity-screens.php:394
84
- #: bp-activity/feeds/bp-activity-personal-feed.php:27
85
- #: bp-core/bp-core-admin.php:409
86
  msgid "Activity"
87
  msgstr ""
88
 
@@ -95,10 +147,10 @@ msgid "ERROR: The item you are trying to reply to cannot be found, or it has bee
95
  msgstr ""
96
 
97
  #: bp-activity/bp-activity-admin.php:197 bp-activity/bp-activity-admin.php:244
98
- #: bp-core/admin/bp-core-functions.php:402
99
- #: bp-core/admin/bp-core-functions.php:420
100
- #: bp-core/admin/bp-core-functions.php:439
101
- #: bp-core/admin/bp-core-functions.php:458 bp-groups/bp-groups-admin.php:107
102
  #: bp-groups/bp-groups-admin.php:143
103
  msgid "Overview"
104
  msgstr ""
@@ -136,10 +188,10 @@ msgid "For information about when and how BuddyPress uses all of these settings,
136
  msgstr ""
137
 
138
  #: bp-activity/bp-activity-admin.php:216 bp-activity/bp-activity-admin.php:261
139
- #: bp-core/admin/bp-core-functions.php:408
140
- #: bp-core/admin/bp-core-functions.php:426
141
- #: bp-core/admin/bp-core-functions.php:445
142
- #: bp-core/admin/bp-core-functions.php:464 bp-groups/bp-groups-admin.php:115
143
  #: bp-groups/bp-groups-admin.php:159
144
  msgid "For more information:"
145
  msgstr ""
@@ -149,10 +201,10 @@ msgid "<a href=\"http://codex.buddypress.org/buddypress-site-administration/mana
149
  msgstr ""
150
 
151
  #: bp-activity/bp-activity-admin.php:218 bp-activity/bp-activity-admin.php:262
152
- #: bp-core/admin/bp-core-functions.php:410
153
- #: bp-core/admin/bp-core-functions.php:428
154
- #: bp-core/admin/bp-core-functions.php:447
155
- #: bp-core/admin/bp-core-functions.php:466 bp-groups/bp-groups-admin.php:160
156
  msgid "<a href=\"http://buddypress.org/support/\">Support Forums</a>"
157
  msgstr ""
158
 
@@ -247,8 +299,8 @@ msgid "Submitted on: <strong>%1$s</strong>"
247
  msgstr ""
248
 
249
  #: bp-activity/bp-activity-admin.php:665 bp-activity/bp-activity-admin.php:1281
250
- #: bp-forums/bp-forums-template.php:1270 bp-groups/bp-groups-admin.php:1248
251
- #: bp-themes/bp-default/functions.php:507 bp-xprofile/bp-xprofile-admin.php:456
252
  #: bp-xprofile/bp-xprofile-loader.php:185
253
  #: bp-xprofile/bp-xprofile-loader.php:245
254
  msgid "Edit"
@@ -322,7 +374,7 @@ msgstr ""
322
  msgid "Activity related to ID #%s"
323
  msgstr ""
324
 
325
- #: bp-activity/bp-activity-admin.php:856 bp-groups/bp-groups-admin.php:625
326
  msgid "Search results for &#8220;%s&#8221;"
327
  msgstr ""
328
 
@@ -334,12 +386,12 @@ msgstr ""
334
  msgid "Reply to Activity"
335
  msgstr ""
336
 
337
- #: bp-activity/bp-activity-admin.php:884 bp-groups/bp-groups-admin.php:585
338
  #: bp-templates/bp-legacy/buddypress/activity/entry.php:102
339
  #: bp-templates/bp-legacy/buddypress/forums/index.php:116
340
  #: bp-themes/bp-default/forums/index.php:134
341
  #: bp-xprofile/bp-xprofile-classes.php:406
342
- #: bp-xprofile/bp-xprofile-classes.php:929
343
  msgid "Cancel"
344
  msgstr ""
345
 
@@ -355,7 +407,7 @@ msgstr ""
355
  msgid "No activities found."
356
  msgstr ""
357
 
358
- #: bp-activity/bp-activity-admin.php:1133 bp-groups/bp-groups-admin.php:1138
359
  #: bp-messages/bp-messages-template.php:434
360
  msgid "All"
361
  msgstr ""
@@ -374,7 +426,7 @@ msgid "Not Spam"
374
  msgstr ""
375
 
376
  #: bp-activity/bp-activity-admin.php:1151
377
- #: bp-activity/bp-activity-admin.php:1291 bp-groups/bp-groups-admin.php:584
378
  msgid "Delete Permanently"
379
  msgstr ""
380
 
@@ -394,6 +446,10 @@ msgstr ""
394
  msgid "Filter"
395
  msgstr ""
396
 
 
 
 
 
397
  #: bp-activity/bp-activity-admin.php:1291 bp-core/bp-core-cssjs.php:20
398
  msgid "Are you sure?"
399
  msgstr ""
@@ -464,48 +520,57 @@ msgid "<span>%1$s</span> &mdash; %2$s"
464
  msgstr ""
465
 
466
  #: bp-activity/bp-activity-classes.php:120
467
- #: bp-activity/bp-activity-template.php:120 bp-groups/bp-groups-classes.php:316
468
  #: bp-groups/bp-groups-template.php:114
469
  msgid "Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details."
470
  msgstr ""
471
 
472
- #: bp-activity/bp-activity-filters.php:348
 
 
 
 
 
 
 
 
473
  msgid "[Read more]"
474
  msgstr ""
475
 
476
- #: bp-activity/bp-activity-filters.php:353
477
  msgid "&hellip;"
478
  msgstr ""
479
 
480
- #: bp-activity/bp-activity-functions.php:199
481
  msgid "@%s Mentions"
482
  msgstr ""
483
 
484
- #: bp-activity/bp-activity-functions.php:202
485
  msgid "You have %1$d new mentions"
486
  msgstr ""
487
 
488
- #: bp-activity/bp-activity-functions.php:206
489
  msgid "%1$s mentioned you"
490
  msgstr ""
491
 
492
- #: bp-activity/bp-activity-functions.php:843
493
  msgid "Posted a status update"
494
  msgstr ""
495
 
496
- #: bp-activity/bp-activity-functions.php:844
497
  msgid "Replied to a status update"
498
  msgstr ""
499
 
500
- #: bp-activity/bp-activity-functions.php:1092
501
  msgid "%s posted an update"
502
  msgstr ""
503
 
504
- #: bp-activity/bp-activity-functions.php:1161
 
505
  msgid "%s posted a new activity comment"
506
  msgstr ""
507
 
508
- #: bp-activity/bp-activity-functions.php:1536
509
  msgid "Thumbnail"
510
  msgstr ""
511
 
@@ -519,69 +584,65 @@ msgid "Search Activity..."
519
  msgstr ""
520
 
521
  #: bp-activity/bp-activity-loader.php:144
522
- #: bp-activity/bp-activity-loader.php:258
523
  msgid "Personal"
524
  msgstr ""
525
 
526
- #. translators: Mentions RSS title - "[Site Name] | [Displayed User Name] |
527
- #. Mentions"
528
-
529
- #: bp-activity/bp-activity-loader.php:154
530
- #: bp-activity/bp-activity-loader.php:235
531
- #: bp-activity/feeds/bp-activity-mentions-feed.php:27
532
- #: bp-templates/bp-legacy/buddypress/activity/index.php:57
533
- #: bp-themes/bp-default/activity/index.php:77
534
  msgid "Mentions"
535
  msgstr ""
536
 
537
- #: bp-activity/bp-activity-loader.php:165
538
- #: bp-activity/bp-activity-loader.php:266
539
  msgid "Favorites"
540
  msgstr ""
541
 
542
- #: bp-activity/bp-activity-loader.php:177
543
- #: bp-activity/bp-activity-loader.php:275 bp-friends/bp-friends-loader.php:164
544
  #: bp-friends/bp-friends-screens.php:83
545
  msgid "Friends"
546
  msgstr ""
547
 
548
- #: bp-activity/bp-activity-loader.php:190
549
- #: bp-activity/bp-activity-loader.php:285 bp-core/bp-core-template.php:246
550
  #: bp-groups/bp-groups-activity.php:150 bp-groups/bp-groups-activity.php:186
551
  #: bp-groups/bp-groups-activity.php:222 bp-groups/bp-groups-activity.php:258
552
  #: bp-groups/bp-groups-admin.php:35 bp-groups/bp-groups-admin.php:36
553
- #: bp-groups/bp-groups-admin.php:622 bp-groups/bp-groups-loader.php:517
554
- #: bp-groups/bp-groups-screens.php:893 bp-groups/bp-groups-screens.php:999
555
- #: bp-groups/bp-groups-screens.php:1001 bp-groups/bp-groups-screens.php:1037
556
- #: bp-groups/bp-groups-screens.php:1039 bp-groups/bp-groups-widgets.php:48
557
- #: bp-groups/bp-groups-widgets.php:117
558
  msgid "Groups"
559
  msgstr ""
560
 
561
- #: bp-activity/bp-activity-loader.php:233
562
  msgid "Mentions <span class=\"count\">%s</span>"
563
  msgstr ""
564
 
565
- #: bp-activity/bp-activity-loader.php:310
566
  msgid "My Activity"
567
  msgstr ""
568
 
569
- #: bp-activity/bp-activity-loader.php:315
570
- #: bp-activity/bp-activity-template.php:975
571
- #: bp-activity/bp-activity-template.php:1111
572
- #: bp-activity/bp-activity-template.php:1122 bp-blogs/bp-blogs-loader.php:209
573
- #: bp-forums/bp-forums-loader.php:212 bp-forums/bp-forums-template.php:487
574
  #: bp-forums/bp-forums-template.php:604 bp-forums/bp-forums-template.php:1200
575
- #: bp-friends/bp-friends-loader.php:212 bp-groups/bp-groups-loader.php:572
576
- #: bp-groups/bp-groups-template.php:748 bp-groups/bp-groups-template.php:771
577
- #: bp-groups/bp-groups-template.php:1200 bp-groups/bp-groups-template.php:1216
578
- #: bp-groups/bp-groups-template.php:1265 bp-groups/bp-groups-template.php:1281
579
- #: bp-groups/bp-groups-template.php:1992 bp-groups/bp-groups-template.php:2001
580
- #: bp-groups/bp-groups-template.php:2010 bp-groups/bp-groups-template.php:2758
581
  #: bp-members/bp-members-buddybar.php:90 bp-members/bp-members-loader.php:198
582
- #: bp-members/bp-members-template.php:519
583
- #: bp-members/bp-members-template.php:819
584
- #: bp-members/bp-members-template.php:838
585
  #: bp-messages/bp-messages-loader.php:264
586
  #: bp-messages/bp-messages-template.php:326
587
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:185
@@ -666,76 +727,72 @@ msgstr ""
666
  msgid "You do not have access to this activity."
667
  msgstr ""
668
 
669
- #: bp-activity/bp-activity-screens.php:279 bp-blogs/bp-blogs-template.php:683
670
- #: bp-friends/bp-friends-screens.php:84 bp-groups/bp-groups-screens.php:894
671
  #: bp-messages/bp-messages-screens.php:169
672
- #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:26
673
  #: bp-templates/bp-legacy/buddypress/members/register.php:223
674
- #: bp-themes/bp-default/groups/single/admin.php:26
675
  #: bp-themes/bp-default/registration/register.php:228
676
  msgid "Yes"
677
  msgstr ""
678
 
679
- #: bp-activity/bp-activity-screens.php:280 bp-blogs/bp-blogs-template.php:687
680
- #: bp-friends/bp-friends-screens.php:85 bp-groups/bp-groups-screens.php:895
681
  #: bp-messages/bp-messages-screens.php:170
682
- #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:27
683
  #: bp-templates/bp-legacy/buddypress/members/register.php:224
684
- #: bp-themes/bp-default/groups/single/admin.php:27
685
  #: bp-themes/bp-default/registration/register.php:229
686
  msgid "No"
687
  msgstr ""
688
 
689
- #: bp-activity/bp-activity-screens.php:287
690
  msgid "A member mentions you in an update using \"@%s\""
691
  msgstr ""
692
 
693
- #: bp-activity/bp-activity-screens.php:293
694
  msgid "A member replies to an update or comment you've posted"
695
  msgstr ""
696
 
697
- #: bp-activity/bp-activity-screens.php:364
698
  msgid "Sitewide Activity"
699
  msgstr ""
700
 
701
- #: bp-activity/bp-activity-template.php:220
702
  msgctxt "Activity pagination previous text"
703
  msgid "&larr;"
704
  msgstr ""
705
 
706
- #: bp-activity/bp-activity-template.php:221
707
  msgctxt "Activity pagination next text"
708
  msgid "&rarr;"
709
  msgstr ""
710
 
711
- #: bp-activity/bp-activity-template.php:526
712
  msgid "Viewing item %1$s to %2$s (of %3$s items)"
713
  msgstr ""
714
 
715
- #: bp-activity/bp-activity-template.php:975
716
  msgid "Profile picture"
717
  msgstr ""
718
 
719
- #: bp-activity/bp-activity-template.php:1087
720
  msgid "Group logo"
721
  msgstr ""
722
 
723
- #: bp-activity/bp-activity-template.php:1090 bp-groups/bp-groups-admin.php:1262
724
- #: bp-groups/bp-groups-template.php:494
725
  msgid "Group logo of %s"
726
  msgstr ""
727
 
728
- #: bp-activity/bp-activity-template.php:1101
729
  msgid "Profile picture of the author of the site %s"
730
  msgstr ""
731
 
732
- #: bp-activity/bp-activity-template.php:1326
733
  msgid "View Discussion"
734
  msgstr ""
735
 
736
- #: bp-activity/bp-activity-template.php:2167
737
- #: bp-forums/bp-forums-template.php:1271 bp-groups/bp-groups-admin.php:1156
738
- #: bp-groups/bp-groups-admin.php:1251 bp-groups/bp-groups-template.php:1464
739
  #: bp-templates/bp-legacy/buddypress/activity/comment.php:43
740
  #: bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php:51
741
  #: bp-templates/bp-legacy/buddypress/members/single/messages/single.php:24
@@ -746,124 +803,38 @@ msgstr ""
746
  msgid "Delete"
747
  msgstr ""
748
 
749
- #: bp-activity/bp-activity-template.php:2214
750
  #: bp-core/admin/bp-core-slugs.php:109 bp-core/admin/bp-core-slugs.php:172
751
- #: bp-core/bp-core-loader.php:225 bp-members/bp-members-loader.php:172
752
- #: bp-members/bp-members-template.php:624
753
- #: bp-templates/bp-legacy/buddypress-functions.php:258
754
  #: bp-themes/bp-default/activity/entry.php:37
755
- #: bp-themes/bp-default/functions.php:165
756
  #: bp-xprofile/bp-xprofile-loader.php:175
757
  #: bp-xprofile/bp-xprofile-loader.php:237
758
  msgid "View"
759
  msgstr ""
760
 
761
- #: bp-activity/bp-activity-template.php:2308
762
  msgid "Clear Filter"
763
  msgstr ""
764
 
765
- #: bp-activity/bp-activity-template.php:2491
766
  msgid "a user"
767
  msgstr ""
768
 
769
- #: bp-activity/bp-activity-template.php:2531
770
  msgid "Send a public message on your activity stream."
771
  msgstr ""
772
 
773
- #: bp-activity/bp-activity-template.php:2532
774
  msgid "Public Message"
775
  msgstr ""
776
 
777
- #: bp-activity/bp-activity-template.php:2954
778
  msgid "Site Wide Activity RSS Feed"
779
  msgstr ""
780
 
781
- #. translators: Favorited activity RSS title - "[Site Name] | [Displayed User
782
- #. Name] | Favorite Activity"
783
-
784
- #: bp-activity/feeds/bp-activity-favorites-feed.php:27
785
- msgid "Favorite Activity"
786
- msgstr ""
787
-
788
- #: bp-activity/feeds/bp-activity-favorites-feed.php:30
789
- msgid "%s - Favorite Activity"
790
- msgstr ""
791
-
792
- #: bp-activity/feeds/bp-activity-favorites-feed.php:56
793
- #: bp-activity/feeds/bp-activity-friends-feed.php:49
794
- #: bp-activity/feeds/bp-activity-group-feed.php:49
795
- #: bp-activity/feeds/bp-activity-mentions-feed.php:50
796
- #: bp-activity/feeds/bp-activity-mygroups-feed.php:55
797
- #: bp-activity/feeds/bp-activity-personal-feed.php:49
798
- #: bp-activity/feeds/bp-activity-sitewide-feed.php:49
799
- msgid "Comments: %s"
800
- msgstr ""
801
-
802
- #: bp-activity/feeds/bp-activity-favorites-feed.php:60
803
- #: bp-activity/feeds/bp-activity-friends-feed.php:53
804
- #: bp-activity/feeds/bp-activity-mentions-feed.php:54
805
- #: bp-activity/feeds/bp-activity-personal-feed.php:53
806
- msgid "In reply to"
807
- msgstr ""
808
-
809
- #. translators: Member friends activity RSS title - "[Site Name] | Friends
810
- #. Activity"
811
-
812
- #: bp-activity/feeds/bp-activity-friends-feed.php:27
813
- msgid "Friends Activity"
814
- msgstr ""
815
-
816
- #: bp-activity/feeds/bp-activity-friends-feed.php:30
817
- msgid "%s - Friends Activity Feed"
818
- msgstr ""
819
-
820
- #. translators: Single group activity RSS title - "[Site Name] | [Group Name] |
821
- #. Group Activity"
822
-
823
- #: bp-activity/feeds/bp-activity-group-feed.php:27
824
- msgid "Group Activity"
825
- msgstr ""
826
-
827
- #: bp-activity/feeds/bp-activity-group-feed.php:30
828
- msgid "%s - Group Activity Feed"
829
- msgstr ""
830
-
831
- #. translators: Mentions RSS title - "[Site Name] | [Displayed User Name] |
832
- #. Mentions"
833
-
834
- #: bp-activity/feeds/bp-activity-mentions-feed.php:31
835
- msgid "%s - Mentions"
836
- msgstr ""
837
-
838
- #. translators: Member groups activity RSS title - "[Site Name] | [Displayed
839
- #. User Name] | My Groups - Public Activity"
840
-
841
- #: bp-activity/feeds/bp-activity-mygroups-feed.php:27
842
- msgid "My Groups - Public Activity"
843
- msgstr ""
844
-
845
- #. translators: Member groups activity RSS description - "[Displayed user name]
846
- #. - My Groups - Public Activity"
847
-
848
- #: bp-activity/feeds/bp-activity-mygroups-feed.php:31
849
- msgid "%1$s - My Groups - Public Activity"
850
- msgstr ""
851
-
852
- #: bp-activity/feeds/bp-activity-personal-feed.php:30
853
- msgid "%s - Activity Feed"
854
- msgstr ""
855
-
856
- #. translators: Sitewide activity RSS title - "[Site Name] | Site Wide
857
- #. Activity"
858
-
859
- #: bp-activity/feeds/bp-activity-sitewide-feed.php:27
860
- msgid "Site Wide Activity"
861
- msgstr ""
862
-
863
- #: bp-activity/feeds/bp-activity-sitewide-feed.php:30
864
- msgid "Site Wide Activity Feed"
865
- msgstr ""
866
-
867
  #: bp-blogs/bp-blogs-activity.php:31
868
  msgid "New site created"
869
  msgstr ""
@@ -877,23 +848,23 @@ msgid "New post comment posted"
877
  msgstr ""
878
 
879
  #: bp-blogs/bp-blogs-buddybar.php:43 bp-blogs/bp-blogs-loader.php:131
880
- #: bp-blogs/bp-blogs-loader.php:179 bp-blogs/bp-blogs-loader.php:200
881
  msgid "My Sites"
882
  msgstr ""
883
 
884
- #: bp-blogs/bp-blogs-buddybar.php:55 bp-core/bp-core-buddybar.php:548
885
  msgid "Dashboard"
886
  msgstr ""
887
 
888
- #: bp-blogs/bp-blogs-buddybar.php:56 bp-core/bp-core-buddybar.php:552
889
  msgid "New Post"
890
  msgstr ""
891
 
892
- #: bp-blogs/bp-blogs-buddybar.php:57 bp-core/bp-core-buddybar.php:553
893
  msgid "Manage Posts"
894
  msgstr ""
895
 
896
- #: bp-blogs/bp-blogs-buddybar.php:58 bp-core/bp-core-buddybar.php:554
897
  msgid "Manage Comments"
898
  msgstr ""
899
 
@@ -913,11 +884,11 @@ msgstr ""
913
  msgid "%1$s wrote a new post, %2$s"
914
  msgstr ""
915
 
916
- #: bp-blogs/bp-blogs-functions.php:361
917
  msgid "%1$s commented on the post, %2$s, on the site %3$s"
918
  msgstr ""
919
 
920
- #: bp-blogs/bp-blogs-functions.php:363
921
  msgid "%1$s commented on the post, %2$s"
922
  msgstr ""
923
 
@@ -937,14 +908,15 @@ msgstr ""
937
  msgid "Sites"
938
  msgstr ""
939
 
940
- #: bp-blogs/bp-blogs-screens.php:110 bp-blogs/bp-blogs-screens.php:112
941
- #: bp-blogs/bp-blogs-screens.php:148 bp-blogs/bp-blogs-screens.php:150
942
- #: bp-core/bp-core-template.php:249
943
- msgid "Blogs"
944
  msgstr ""
945
 
946
- #: bp-blogs/bp-blogs-screens.php:110 bp-blogs/bp-blogs-screens.php:148
947
- msgid "Create a Blog"
 
 
948
  msgstr ""
949
 
950
  #: bp-blogs/bp-blogs-template.php:136
@@ -965,10 +937,10 @@ msgstr ""
965
  msgid "Profile picture of site author %s"
966
  msgstr ""
967
 
968
- #: bp-blogs/bp-blogs-template.php:403 bp-core/bp-core-classes.php:718
969
- #: bp-groups/bp-groups-widgets.php:78 bp-groups/bp-groups-widgets.php:181
970
- #: bp-members/bp-members-template.php:595
971
- #: bp-members/bp-members-template.php:870
972
  #: bp-templates/bp-legacy/buddypress/groups/groups-loop.php:47
973
  #: bp-templates/bp-legacy/buddypress/groups/single/group-header.php:42
974
  #: bp-themes/bp-default/groups/groups-loop.php:47
@@ -1061,8 +1033,8 @@ msgid "%s's Recent Comments"
1061
  msgstr ""
1062
 
1063
  #: bp-blogs/bp-blogs-template.php:803 bp-core/deprecated/1.5.php:417
1064
- #: bp-forums/bp-forums-template.php:1321 bp-groups/bp-groups-template.php:2483
1065
- #: bp-members/bp-members-template.php:709
1066
  #: bp-messages/bp-messages-template.php:367 bp-themes/bp-default/header.php:30
1067
  #: bp-themes/bp-default/searchform.php:5
1068
  msgid "Search"
@@ -1072,16 +1044,33 @@ msgstr ""
1072
  msgid "Visit Site"
1073
  msgstr ""
1074
 
1075
- #: bp-blogs/bp-blogs-widgets.php:25
 
 
 
 
1076
  msgctxt "widget name"
1077
  msgid "(BuddyPress) Recent Networkwide Posts"
1078
  msgstr ""
1079
 
1080
- #: bp-blogs/bp-blogs-widgets.php:67
 
 
 
 
1081
  msgid "Sorry, there were no posts found. Why not write one?"
1082
  msgstr ""
1083
 
1084
- #: bp-blogs/bp-blogs-widgets.php:87
 
 
 
 
 
 
 
 
 
1085
  msgid "Max posts to show:"
1086
  msgstr ""
1087
 
@@ -1275,41 +1264,49 @@ msgstr ""
1275
 
1276
  #: bp-core/admin/bp-core-functions.php:364
1277
  #: bp-core/admin/bp-core-settings.php:258 bp-core/bp-core-admin.php:331
1278
- #: bp-groups/bp-groups-loader.php:302 bp-groups/bp-groups-template.php:1446
1279
  #: bp-settings/bp-settings-loader.php:23 bp-settings/bp-settings-loader.php:73
1280
  #: bp-settings/bp-settings-loader.php:165
1281
  msgid "Settings"
1282
  msgstr ""
1283
 
1284
- #: bp-core/admin/bp-core-functions.php:409
 
 
 
 
 
 
 
 
1285
  msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-components\">Managing Components</a>"
1286
  msgstr ""
1287
 
1288
- #: bp-core/admin/bp-core-functions.php:427
1289
  msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-pages\">Managing Pages</a>"
1290
  msgstr ""
1291
 
1292
- #: bp-core/admin/bp-core-functions.php:446
1293
  msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-settings\">Managing Settings</a>"
1294
  msgstr ""
1295
 
1296
- #: bp-core/admin/bp-core-functions.php:465
1297
  msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#users-profile-fields\">Managing Profile Fields</a>"
1298
  msgstr ""
1299
 
1300
- #: bp-core/admin/bp-core-functions.php:483
1301
  msgid "By default, all BuddyPress components are enabled. You can selectively disable any of the components by using the form. Your BuddyPress installation will continue to function. However, the features of the disabled components will no longer be accessible to anyone using the site."
1302
  msgstr ""
1303
 
1304
- #: bp-core/admin/bp-core-functions.php:487
1305
  msgid "BuddyPress Components use WordPress Pages for their root directory/archive pages. Here you can change the page associations for each active component."
1306
  msgstr ""
1307
 
1308
- #: bp-core/admin/bp-core-functions.php:491
1309
  msgid "Extra configuration settings."
1310
  msgstr ""
1311
 
1312
- #: bp-core/admin/bp-core-functions.php:495
1313
  msgid "Your users will distinguish themselves through their profile page. Create relevant profile fields that will show on each users profile.</br></br>Note: Any fields in the first group will appear on the signup page."
1314
  msgstr ""
1315
 
@@ -1392,10 +1389,10 @@ msgid "New Page"
1392
  msgstr ""
1393
 
1394
  #: bp-core/admin/bp-core-slugs.php:105 bp-core/admin/bp-core-slugs.php:168
1395
- #: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:19
1396
  #: bp-themes/bp-default/members/single/settings/capabilities.php:61
1397
  #: bp-xprofile/bp-xprofile-classes.php:401
1398
- #: bp-xprofile/bp-xprofile-classes.php:928
1399
  msgid "Save"
1400
  msgstr ""
1401
 
@@ -1530,9 +1527,9 @@ msgid "BuddyPress&#8217;s powerful features help your users connect and collabor
1530
  msgstr ""
1531
 
1532
  #: bp-core/bp-core-admin.php:408 bp-core/bp-core-template.php:243
1533
- #: bp-core/bp-core-widgets.php:111 bp-groups/bp-groups-admin.php:764
1534
- #: bp-groups/bp-groups-template.php:1454 bp-members/bp-members-loader.php:24
1535
- #: bp-members/bp-members-screens.php:329
1536
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:231
1537
  #: bp-themes/bp-default/groups/single/admin.php:231
1538
  msgid "Members"
@@ -1555,7 +1552,7 @@ msgid "It Just Works"
1555
  msgstr ""
1556
 
1557
  #: bp-core/bp-core-admin.php:425
1558
- msgid "BuddyPress is now compatible with <strong>any WordPress theme</strong>. If your theme has BuddyPress-specific templates and styling, we&#8217;ll use them. If not, we provide what you need to make your BuddyPress content look great. Still want to customize? No problem - you can override our templates just like you would in a WordPress child theme. <a href=\"http://codex.buddypress.org/theme-compatibility/\">Learn more about theme compatibility</a>."
1559
  msgstr ""
1560
 
1561
  #: bp-core/bp-core-admin.php:430
@@ -1658,7 +1655,7 @@ msgstr ""
1658
  msgid "Core Contributors to BuddyPress 1.7"
1659
  msgstr ""
1660
 
1661
- #: bp-core/bp-core-adminbar.php:36 bp-core/bp-core-buddybar.php:498
1662
  msgid "My Account"
1663
  msgstr ""
1664
 
@@ -1706,42 +1703,42 @@ msgstr ""
1706
  msgid "Upload failed! Error was: %s"
1707
  msgstr ""
1708
 
1709
- #: bp-core/bp-core-avatars.php:733 bp-core/bp-core-classes.php:715
1710
- #: bp-core/bp-core-classes.php:716 bp-core/bp-core-classes.php:717
1711
  #: bp-core/bp-core-template.php:98 bp-core/bp-core-template.php:107
1712
  msgid "Avatar of %s"
1713
  msgstr ""
1714
 
1715
- #: bp-core/bp-core-buddybar.php:303
1716
  msgid "You do not have access to this page."
1717
  msgstr ""
1718
 
1719
- #: bp-core/bp-core-buddybar.php:482 bp-themes/bp-default/sidebar.php:53
1720
  msgid "Log In"
1721
  msgstr ""
1722
 
1723
- #: bp-core/bp-core-buddybar.php:486
1724
  msgid "Sign Up"
1725
  msgstr ""
1726
 
1727
- #: bp-core/bp-core-buddybar.php:540 bp-core/deprecated/1.5.php:307
1728
- #: bp-members/bp-members-template.php:773 bp-themes/bp-default/sidebar.php:18
1729
  msgid "Log Out"
1730
  msgstr ""
1731
 
1732
- #: bp-core/bp-core-buddybar.php:569 bp-groups/bp-groups-admin.php:1245
1733
  msgid "Visit"
1734
  msgstr ""
1735
 
1736
- #: bp-core/bp-core-buddybar.php:571
1737
  msgid "Random Member"
1738
  msgstr ""
1739
 
1740
- #: bp-core/bp-core-buddybar.php:575
1741
  msgid "Random Group"
1742
  msgstr ""
1743
 
1744
- #: bp-core/bp-core-buddybar.php:581
1745
  msgid "Random Site"
1746
  msgstr ""
1747
 
@@ -1758,7 +1755,7 @@ msgstr ""
1758
  msgid "You must log in to access the page you requested."
1759
  msgstr ""
1760
 
1761
- #: bp-core/bp-core-classes.php:732
1762
  msgid "%d group"
1763
  msgid_plural "%d groups"
1764
  msgstr[0] ""
@@ -1789,7 +1786,7 @@ msgstr ""
1789
  msgid "Activate %s"
1790
  msgstr ""
1791
 
1792
- #: bp-core/bp-core-filters.php:285 bp-members/bp-members-functions.php:1357
1793
  msgid ""
1794
  "Thanks for registering! To complete the activation of your account please click the following link:\n"
1795
  "\n"
@@ -1797,7 +1794,7 @@ msgid ""
1797
  "\n"
1798
  msgstr ""
1799
 
1800
- #: bp-core/bp-core-filters.php:286 bp-members/bp-members-functions.php:1358
1801
  msgid "Activate Your Account"
1802
  msgstr ""
1803
 
@@ -1823,131 +1820,117 @@ msgstr ""
1823
  msgid "%s Directory"
1824
  msgstr ""
1825
 
1826
- #: bp-core/bp-core-filters.php:365 bp-members/bp-members-screens.php:430
1827
  #: bp-themes/bp-default/registration/register.php:23
1828
  msgid "Create an Account"
1829
  msgstr ""
1830
 
1831
- #: bp-core/bp-core-filters.php:369 bp-members/bp-members-screens.php:438
1832
  #: bp-themes/bp-default/registration/activate.php:13
1833
  msgid "Activate your Account"
1834
  msgstr ""
1835
 
1836
- #: bp-core/bp-core-filters.php:373 bp-groups/bp-groups-screens.php:999
1837
- #: bp-groups/bp-groups-screens.php:1037
1838
  #: bp-themes/bp-default/groups/create.php:18
1839
  #: bp-themes/bp-default/groups/index.php:21
1840
  msgid "Create a Group"
1841
  msgstr ""
1842
 
1843
- #: bp-core/bp-core-functions.php:204
1844
  msgctxt "Page title for the Activity directory."
1845
  msgid "Activity"
1846
  msgstr ""
1847
 
1848
- #: bp-core/bp-core-functions.php:205
1849
  msgctxt "Page title for the Groups directory."
1850
  msgid "Groups"
1851
  msgstr ""
1852
 
1853
- #: bp-core/bp-core-functions.php:206
1854
  msgctxt "Page title for the Sites directory."
1855
  msgid "Sites"
1856
  msgstr ""
1857
 
1858
- #: bp-core/bp-core-functions.php:207
1859
  msgctxt "Page title for the user account activation screen."
1860
  msgid "Activate"
1861
  msgstr ""
1862
 
1863
- #: bp-core/bp-core-functions.php:208
1864
  msgctxt "Page title for the Members directory."
1865
  msgid "Members"
1866
  msgstr ""
1867
 
1868
- #: bp-core/bp-core-functions.php:209
1869
  msgctxt "Page title for the user registration screen."
1870
  msgid "Register"
1871
  msgstr ""
1872
 
1873
- #: bp-core/bp-core-functions.php:441
1874
  msgid "sometime"
1875
  msgstr ""
1876
 
1877
- #: bp-core/bp-core-functions.php:442
1878
  msgid "right now"
1879
  msgstr ""
1880
 
1881
- #: bp-core/bp-core-functions.php:443
1882
  msgid "%s ago"
1883
  msgstr ""
1884
 
1885
- #: bp-core/bp-core-functions.php:447
1886
- msgid "year"
1887
- msgstr ""
1888
-
1889
- #: bp-core/bp-core-functions.php:447
1890
- msgid "years"
1891
- msgstr ""
1892
-
1893
- #: bp-core/bp-core-functions.php:448
1894
- msgid "month"
1895
- msgstr ""
1896
-
1897
- #: bp-core/bp-core-functions.php:448
1898
- msgid "months"
1899
- msgstr ""
1900
-
1901
- #: bp-core/bp-core-functions.php:449
1902
- msgid "week"
1903
- msgstr ""
1904
-
1905
- #: bp-core/bp-core-functions.php:449
1906
- msgid "weeks"
1907
- msgstr ""
1908
-
1909
- #: bp-core/bp-core-functions.php:450
1910
- msgid "day"
1911
- msgstr ""
1912
-
1913
- #: bp-core/bp-core-functions.php:450
1914
- msgid "days"
1915
- msgstr ""
1916
 
1917
- #: bp-core/bp-core-functions.php:451
1918
- msgid "hour"
1919
- msgstr ""
 
 
1920
 
1921
- #: bp-core/bp-core-functions.php:451
1922
- msgid "hours"
1923
- msgstr ""
 
 
1924
 
1925
- #: bp-core/bp-core-functions.php:452
1926
- msgid "minute"
1927
- msgstr ""
 
 
1928
 
1929
- #: bp-core/bp-core-functions.php:452
1930
- msgid "minutes"
1931
- msgstr ""
 
 
1932
 
1933
- #: bp-core/bp-core-functions.php:453
1934
- msgid "second"
1935
- msgstr ""
 
 
1936
 
1937
- #: bp-core/bp-core-functions.php:453
1938
- msgid "seconds"
1939
- msgstr ""
 
 
1940
 
1941
- #: bp-core/bp-core-functions.php:512
1942
  msgctxt "Separator in time since"
1943
  msgid ","
1944
  msgstr ""
1945
 
1946
- #: bp-core/bp-core-functions.php:580
1947
  msgid "Not recently active"
1948
  msgstr ""
1949
 
1950
- #: bp-core/bp-core-loader.php:214 bp-members/bp-members-loader.php:158
1951
  #: bp-xprofile/bp-xprofile-loader.php:154
1952
  #: bp-xprofile/bp-xprofile-loader.php:229
1953
  msgid "Profile"
@@ -1961,19 +1944,11 @@ msgstr ""
1961
  msgid "%1$s at %2$s"
1962
  msgstr ""
1963
 
1964
- #: bp-core/bp-core-template.php:252 bp-forums/bp-forums-loader.php:103
1965
- #: bp-forums/bp-forums-loader.php:166 bp-forums/bp-forums-loader.php:207
1966
- #: bp-forums/bp-forums-screens.php:188 bp-forums/bp-forums-screens.php:190
1967
- #: bp-forums/deprecated/1.6.php:24 bp-forums/deprecated/1.7.php:25
1968
- #: bp-forums/deprecated/1.7.php:57 bp-forums/deprecated/1.7.php:329
1969
- msgid "Forums"
1970
- msgstr ""
1971
-
1972
  #: bp-core/bp-core-template.php:254
1973
- #: bp-templates/bp-legacy/buddypress/activity/index.php:79
1974
  #: bp-templates/bp-legacy/buddypress/forums/forums-loop.php:40
1975
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:27
1976
- #: bp-themes/bp-default/activity/index.php:99
1977
  #: bp-themes/bp-default/forums/forums-loop.php:40
1978
  #: bp-themes/bp-default/members/single/activity.php:27
1979
  msgid "Posts"
@@ -2004,9 +1979,9 @@ msgctxt "widget name"
2004
  msgid "(BuddyPress) Members"
2005
  msgstr ""
2006
 
2007
- #: bp-core/bp-core-widgets.php:47 bp-core/bp-core-widgets.php:133
2008
  #: bp-core/deprecated/1.6.php:129 bp-core/deprecated/1.6.php:152
2009
- #: bp-groups/bp-groups-widgets.php:58 bp-groups/bp-groups-widgets.php:139
2010
  #: bp-templates/bp-legacy/buddypress/blogs/index.php:39
2011
  #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:22
2012
  #: bp-themes/bp-default/blogs/index.php:56
@@ -2014,22 +1989,22 @@ msgstr ""
2014
  msgid "Newest"
2015
  msgstr ""
2016
 
2017
- #: bp-core/bp-core-widgets.php:48 bp-core/bp-core-widgets.php:134
2018
- #: bp-groups/bp-groups-widgets.php:59 bp-groups/bp-groups-widgets.php:140
2019
  msgid "Active"
2020
  msgstr ""
2021
 
2022
- #: bp-core/bp-core-widgets.php:52 bp-core/bp-core-widgets.php:135
2023
- #: bp-groups/bp-groups-widgets.php:60 bp-groups/bp-groups-widgets.php:141
2024
  msgid "Popular"
2025
  msgstr ""
2026
 
2027
- #: bp-core/bp-core-widgets.php:89
2028
  msgid "No one has signed up yet!"
2029
  msgstr ""
2030
 
2031
- #: bp-core/bp-core-widgets.php:124 bp-core/bp-core-widgets.php:204
2032
- #: bp-core/bp-core-widgets.php:271 bp-groups/bp-groups-widgets.php:130
2033
  #: bp-templates/bp-legacy/buddypress/forums/index.php:86
2034
  #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:47
2035
  #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:75
@@ -2039,53 +2014,53 @@ msgstr ""
2039
  msgid "Title:"
2040
  msgstr ""
2041
 
2042
- #: bp-core/bp-core-widgets.php:126
2043
  msgid "Link widget title to Members directory"
2044
  msgstr ""
2045
 
2046
- #: bp-core/bp-core-widgets.php:128
2047
  msgid "Max members to show:"
2048
  msgstr ""
2049
 
2050
- #: bp-core/bp-core-widgets.php:131
2051
  msgid "Default members to show:"
2052
  msgstr ""
2053
 
2054
- #: bp-core/bp-core-widgets.php:150
2055
  msgid "Avatars of users who are currently online"
2056
  msgstr ""
2057
 
2058
- #: bp-core/bp-core-widgets.php:153
2059
  msgctxt "widget name"
2060
  msgid "(BuddyPress) Who's Online"
2061
  msgstr ""
2062
 
2063
- #: bp-core/bp-core-widgets.php:176
2064
  msgid "There are no users currently online"
2065
  msgstr ""
2066
 
2067
- #: bp-core/bp-core-widgets.php:195
2068
  msgid "Who's Online"
2069
  msgstr ""
2070
 
2071
- #: bp-core/bp-core-widgets.php:206 bp-core/bp-core-widgets.php:273
2072
  msgid "Max Members to show:"
2073
  msgstr ""
2074
 
2075
- #: bp-core/bp-core-widgets.php:217
2076
  msgid "Avatars of recently active members"
2077
  msgstr ""
2078
 
2079
- #: bp-core/bp-core-widgets.php:220
2080
  msgctxt "widget name"
2081
  msgid "(BuddyPress) Recently Active Members"
2082
  msgstr ""
2083
 
2084
- #: bp-core/bp-core-widgets.php:243
2085
  msgid "There are no recently active members"
2086
  msgstr ""
2087
 
2088
- #: bp-core/bp-core-widgets.php:325
2089
  msgid "There were no members found, please try another filter."
2090
  msgstr ""
2091
 
@@ -2100,7 +2075,7 @@ msgstr ""
2100
 
2101
  #: bp-core/deprecated/1.5.php:149
2102
  #: bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php:15
2103
- #: bp-themes/bp-default/functions.php:641
2104
  #: bp-themes/bp-default/members/single/profile/profile-wp.php:15
2105
  msgid "Name"
2106
  msgstr ""
@@ -2113,7 +2088,7 @@ msgstr ""
2113
 
2114
  #: bp-core/deprecated/1.5.php:167
2115
  #: bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php:33
2116
- #: bp-themes/bp-default/functions.php:645
2117
  #: bp-themes/bp-default/members/single/profile/profile-wp.php:33
2118
  msgid "Website"
2119
  msgstr ""
@@ -2141,12 +2116,12 @@ msgid "%1$s mentioned you in the group \"%2$s\""
2141
  msgstr ""
2142
 
2143
  #: bp-core/deprecated/1.6.php:128 bp-core/deprecated/1.6.php:149
2144
- #: bp-groups/bp-groups-template.php:2498 bp-groups/bp-groups-template.php:2520
2145
  msgid "Recently Active"
2146
  msgstr ""
2147
 
2148
  #: bp-core/deprecated/1.6.php:130 bp-core/deprecated/1.6.php:155
2149
- #: bp-groups/bp-groups-template.php:2503 bp-groups/bp-groups-template.php:2535
2150
  msgid "Alphabetically"
2151
  msgstr ""
2152
 
@@ -2158,19 +2133,19 @@ msgstr ""
2158
  msgid "Search Forums..."
2159
  msgstr ""
2160
 
2161
- #: bp-forums/bp-forums-loader.php:125 bp-forums/bp-forums-loader.php:174
2162
  msgid "Topics Started"
2163
  msgstr ""
2164
 
2165
- #: bp-forums/bp-forums-loader.php:136
2166
  msgid "Replied To"
2167
  msgstr ""
2168
 
2169
- #: bp-forums/bp-forums-loader.php:182
2170
  msgid "Replies"
2171
  msgstr ""
2172
 
2173
- #: bp-forums/bp-forums-loader.php:190
2174
  msgid "Favorite Topics"
2175
  msgstr ""
2176
 
@@ -2198,8 +2173,8 @@ msgstr ""
2198
  msgid "Please pick the group forum where you would like to post this topic."
2199
  msgstr ""
2200
 
2201
- #: bp-forums/bp-forums-screens.php:188 bp-groups/bp-groups-template.php:1690
2202
- #: bp-groups/bp-groups-template.php:1691
2203
  #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:19
2204
  #: bp-themes/bp-default/forums/index.php:23
2205
  #: bp-themes/bp-default/groups/single/forum.php:19
@@ -2219,8 +2194,8 @@ msgstr ""
2219
  #: bp-forums/bp-forums-template.php:505 bp-forums/bp-forums-template.php:567
2220
  #: bp-forums/bp-forums-template.php:1216
2221
  #: bp-messages/bp-messages-classes.php:269
2222
- #: bp-messages/bp-messages-template.php:841
2223
- #: bp-messages/bp-messages-template.php:902
2224
  msgid "Deleted User"
2225
  msgstr ""
2226
 
@@ -2228,11 +2203,11 @@ msgstr ""
2228
  msgid "Group logo for %s"
2229
  msgstr ""
2230
 
2231
- #: bp-forums/bp-forums-template.php:683 bp-groups/bp-groups-template.php:1013
2232
  msgid "%d post"
2233
  msgstr ""
2234
 
2235
- #: bp-forums/bp-forums-template.php:685 bp-groups/bp-groups-template.php:1015
2236
  msgid "%d posts"
2237
  msgstr ""
2238
 
@@ -2282,150 +2257,154 @@ msgstr ""
2282
  msgid "Viewing post %1$s to %2$s (%3$s total posts)"
2283
  msgstr ""
2284
 
2285
- #: bp-forums/deprecated/1.6.php:29 bp-forums/deprecated/1.7.php:62
 
 
 
 
 
 
 
 
2286
  msgid "Settings Saved."
2287
  msgstr ""
2288
 
2289
- #: bp-forums/deprecated/1.6.php:45 bp-forums/deprecated/1.6.php:145
2290
- #: bp-forums/deprecated/1.7.php:83 bp-forums/deprecated/1.7.php:220
 
 
 
2291
  msgid "Forums for Groups"
2292
  msgstr ""
2293
 
2294
- #: bp-forums/deprecated/1.6.php:47 bp-forums/deprecated/1.6.php:147
2295
- #: bp-forums/deprecated/1.7.php:85 bp-forums/deprecated/1.7.php:222
2296
  msgid "Give each individual group its own discussion forum. Choose this if you'd like to keep your members' conversations separated into distinct areas."
2297
  msgstr ""
2298
 
2299
- #: bp-forums/deprecated/1.6.php:48 bp-forums/deprecated/1.6.php:148
2300
- #: bp-forums/deprecated/1.7.php:86 bp-forums/deprecated/1.7.php:223
2301
- msgid "You may use an existing bbPress installation if you have one."
2302
  msgstr ""
2303
 
2304
- #: bp-forums/deprecated/1.6.php:50 bp-forums/deprecated/1.6.php:150
2305
- #: bp-forums/deprecated/1.7.php:88 bp-forums/deprecated/1.7.php:106
2306
- #: bp-forums/deprecated/1.7.php:225 bp-forums/deprecated/1.7.php:244
2307
  msgid "Features"
2308
  msgstr ""
2309
 
2310
- #: bp-forums/deprecated/1.6.php:52 bp-forums/deprecated/1.6.php:152
2311
- #: bp-forums/deprecated/1.7.php:90 bp-forums/deprecated/1.7.php:227
2312
  msgid "Group Integration"
2313
  msgstr ""
2314
 
2315
- #: bp-forums/deprecated/1.6.php:53 bp-forums/deprecated/1.6.php:153
2316
- #: bp-forums/deprecated/1.7.php:91 bp-forums/deprecated/1.7.php:228
2317
  msgid "Member Profile Integration"
2318
  msgstr ""
2319
 
2320
- #: bp-forums/deprecated/1.6.php:54 bp-forums/deprecated/1.6.php:154
2321
- #: bp-forums/deprecated/1.7.php:92 bp-forums/deprecated/1.7.php:110
2322
- #: bp-forums/deprecated/1.7.php:229 bp-forums/deprecated/1.7.php:248
2323
  msgid "Activity Stream Integration"
2324
  msgstr ""
2325
 
2326
- #: bp-forums/deprecated/1.6.php:55 bp-forums/deprecated/1.6.php:155
2327
- #: bp-forums/deprecated/1.7.php:93 bp-forums/deprecated/1.7.php:111
2328
- #: bp-forums/deprecated/1.7.php:230 bp-forums/deprecated/1.7.php:249
2329
  msgid "@ Mention Integration"
2330
  msgstr ""
2331
 
2332
- #: bp-forums/deprecated/1.6.php:59
2333
- msgid "Reinstall Group Forums"
2334
  msgstr ""
2335
 
2336
- #: bp-forums/deprecated/1.6.php:78 bp-forums/deprecated/1.7.php:153
2337
- msgid "The bb-config.php file was not found at that location, please try again."
2338
  msgstr ""
2339
 
2340
- #: bp-forums/deprecated/1.6.php:81 bp-forums/deprecated/1.7.php:156
2341
- msgid "Forums were set up correctly using your existing bbPress install!"
2342
  msgstr ""
2343
 
2344
- #: bp-forums/deprecated/1.6.php:82 bp-forums/deprecated/1.7.php:157
2345
- msgid "BuddyPress will now use its internal copy of bbPress to run the forums on your site. If you wish, you can remove your old bbPress installation files, as long as you keep the bb-config.php file in the same location."
2346
  msgstr ""
2347
 
2348
- #: bp-forums/deprecated/1.6.php:87 bp-forums/deprecated/1.7.php:162
2349
- msgid "Existing bbPress Installation"
2350
  msgstr ""
2351
 
2352
- #: bp-forums/deprecated/1.6.php:88 bp-forums/deprecated/1.7.php:163
2353
- msgid "BuddyPress can make use of your existing bbPress install. Just provide the location of your <code>bb-config.php</code> file, and BuddyPress will do the rest."
2354
  msgstr ""
2355
 
2356
- #: bp-forums/deprecated/1.6.php:90 bp-forums/deprecated/1.6.php:122
2357
- #: bp-forums/deprecated/1.7.php:165 bp-forums/deprecated/1.7.php:197
2358
- msgid "Complete Installation"
2359
  msgstr ""
2360
 
2361
- #: bp-forums/deprecated/1.6.php:106 bp-forums/deprecated/1.7.php:181
2362
- msgid "<p>All done! Configuration settings have been saved to the file <code>bb-config.php</code> in the root of your WordPress install.</p>"
2363
  msgstr ""
2364
 
2365
- #: bp-forums/deprecated/1.6.php:110 bp-forums/deprecated/1.7.php:185
2366
- msgid "<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>"
2367
  msgstr ""
2368
 
2369
- #: bp-forums/deprecated/1.6.php:119 bp-forums/deprecated/1.7.php:194
2370
- msgid "New bbPress Installation"
2371
  msgstr ""
2372
 
2373
- #: bp-forums/deprecated/1.6.php:120 bp-forums/deprecated/1.7.php:195
2374
- msgid ""
2375
- "You've decided to set up a new installation of bbPress for forum management in BuddyPress. This is very simple and is usually just a one click\n"
2376
- "\t\t\t\tprocess. When you're ready, hit the link below."
2377
  msgstr ""
2378
 
2379
- #: bp-forums/deprecated/1.6.php:132 bp-forums/deprecated/1.7.php:207
2380
- msgid "bbPress files were not found. To install the forums component you must download a copy of bbPress and make sure it is in the folder: \"%s\""
2381
  msgstr ""
2382
 
2383
- #: bp-forums/deprecated/1.6.php:159 bp-forums/deprecated/1.7.php:234
2384
- msgid "Install Group Forums"
2385
  msgstr ""
2386
 
2387
- #: bp-forums/deprecated/1.6.php:160 bp-forums/deprecated/1.7.php:235
2388
- msgid "Use Existing Installation"
2389
  msgstr ""
2390
 
2391
- #: bp-forums/deprecated/1.7.php:46 bp-forums/deprecated/1.7.php:143
2392
- msgid "Configure Site Wide Forums"
2393
  msgstr ""
2394
 
2395
- #: bp-forums/deprecated/1.7.php:49 bp-forums/deprecated/1.7.php:146
2396
- msgid "Install Site Wide Forums"
2397
  msgstr ""
2398
 
2399
- #: bp-forums/deprecated/1.7.php:83
2400
- msgid "(Installed)"
2401
  msgstr ""
2402
 
2403
- #: bp-forums/deprecated/1.7.php:97
2404
- msgid "Uninstall Group Forums"
2405
  msgstr ""
2406
 
2407
- #: bp-forums/deprecated/1.7.php:102 bp-forums/deprecated/1.7.php:240
2408
- msgid "New! Site Wide Forums"
 
 
 
 
2409
  msgstr ""
2410
 
2411
- #: bp-forums/deprecated/1.7.php:103 bp-forums/deprecated/1.7.php:241
2412
- msgid "Your site will have central forums that are not isolated to any specific group. Choose this if you'd like to have a central forum area for your members."
2413
  msgstr ""
2414
 
2415
- #: bp-forums/deprecated/1.7.php:104 bp-forums/deprecated/1.7.php:242
2416
- msgid "You may activate both Group and Site Wide forums, but this may create a poor experience for your members."
 
 
2417
  msgstr ""
2418
 
2419
- #: bp-forums/deprecated/1.7.php:108 bp-forums/deprecated/1.7.php:246
2420
- msgid "Central Discussion Area"
2421
  msgstr ""
2422
 
2423
- #: bp-forums/deprecated/1.7.php:109 bp-forums/deprecated/1.7.php:247
2424
- msgid "Forum Plugins Available"
2425
  msgstr ""
2426
 
2427
- #: bp-forums/deprecated/1.7.php:121
2428
- msgid "Need help deciding between Group Forums and Site Wide Forums? Visit <a href=\"%s\">the BuddyPress codex</a> for more information."
2429
  msgstr ""
2430
 
2431
  #: bp-friends/bp-friends-actions.php:35
@@ -2445,8 +2424,8 @@ msgid "You already have a pending friendship request with this user"
2445
  msgstr ""
2446
 
2447
  #: bp-friends/bp-friends-actions.php:70
2448
- #: bp-templates/bp-legacy/buddypress-functions.php:889
2449
- #: bp-themes/bp-default/_inc/ajax.php:605
2450
  msgid "Friendship could not be canceled."
2451
  msgstr ""
2452
 
@@ -2491,8 +2470,8 @@ msgstr ""
2491
  msgid "You have a friendship request from %s"
2492
  msgstr ""
2493
 
2494
- #: bp-friends/bp-friends-functions.php:100
2495
- #: bp-friends/bp-friends-functions.php:109
2496
  msgid "%1$s and %2$s are now friends"
2497
  msgstr ""
2498
 
@@ -2506,14 +2485,14 @@ msgstr ""
2506
 
2507
  #: bp-friends/bp-friends-loader.php:118 bp-friends/bp-friends-loader.php:180
2508
  #: bp-friends/bp-friends-loader.php:207
2509
- #: bp-templates/bp-legacy/buddypress/activity/index.php:100
2510
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:35
2511
- #: bp-themes/bp-default/activity/index.php:120
2512
  #: bp-themes/bp-default/members/single/activity.php:35
2513
  msgid "Friendships"
2514
  msgstr ""
2515
 
2516
- #: bp-friends/bp-friends-loader.php:128 bp-groups/bp-groups-template.php:1458
2517
  msgid "Requests"
2518
  msgstr ""
2519
 
@@ -2622,8 +2601,8 @@ msgid "%d friends"
2622
  msgstr ""
2623
 
2624
  #: bp-friends/bp-friends-template.php:285
2625
- #: bp-templates/bp-legacy/buddypress-functions.php:901
2626
- #: bp-themes/bp-default/_inc/ajax.php:617
2627
  msgid "Cancel Friendship Request"
2628
  msgstr ""
2629
 
@@ -2638,10 +2617,10 @@ msgstr ""
2638
 
2639
  #: bp-friends/bp-friends-template.php:319
2640
  #: bp-friends/bp-friends-template.php:320
2641
- #: bp-templates/bp-legacy/buddypress-functions.php:891
2642
- #: bp-templates/bp-legacy/buddypress-functions.php:909
2643
- #: bp-themes/bp-default/_inc/ajax.php:607
2644
- #: bp-themes/bp-default/_inc/ajax.php:625
2645
  msgid "Add Friend"
2646
  msgstr ""
2647
 
@@ -2657,42 +2636,46 @@ msgstr ""
2657
  msgid "Please fill in all of the required fields"
2658
  msgstr ""
2659
 
2660
- #: bp-groups/bp-groups-actions.php:79 bp-groups/bp-groups-actions.php:106
2661
  msgid "There was an error saving group details, please try again."
2662
  msgstr ""
2663
 
2664
- #: bp-groups/bp-groups-actions.php:145
2665
  msgid "%1$s created the group %2$s"
2666
  msgstr ""
2667
 
2668
- #: bp-groups/bp-groups-actions.php:197
2669
  msgid "There was an error saving the group avatar, please try uploading again."
2670
  msgstr ""
2671
 
2672
- #: bp-groups/bp-groups-actions.php:199
2673
  msgid "The group avatar was uploaded successfully!"
2674
  msgstr ""
2675
 
2676
- #: bp-groups/bp-groups-actions.php:223 bp-groups/bp-groups-actions.php:230
2677
  msgid "There was an error joining the group."
2678
  msgstr ""
2679
 
2680
- #: bp-groups/bp-groups-actions.php:232
2681
  msgid "You joined the group!"
2682
  msgstr ""
2683
 
2684
- #: bp-groups/bp-groups-actions.php:258 bp-groups/bp-groups-screens.php:709
2685
  msgid "This group must have at least one admin"
2686
  msgstr ""
2687
 
2688
- #: bp-groups/bp-groups-actions.php:261
2689
  msgid "There was an error leaving the group."
2690
  msgstr ""
2691
 
2692
- #: bp-groups/bp-groups-actions.php:263 bp-groups/bp-groups-functions.php:313
2693
  msgid "You successfully left the group."
2694
  msgstr ""
2695
 
 
 
 
 
2696
  #: bp-groups/bp-groups-activity.php:23
2697
  msgid "Created a group"
2698
  msgstr ""
@@ -2826,74 +2809,78 @@ msgstr ""
2826
  msgid "Start typing a username to add a new member."
2827
  msgstr ""
2828
 
2829
- #: bp-groups/bp-groups-admin.php:443
 
 
 
 
2830
  msgid "You cannot remove all administrators from a group."
2831
  msgstr ""
2832
 
2833
- #: bp-groups/bp-groups-admin.php:447
2834
  msgid "An error occurred when trying to update your group details."
2835
  msgstr ""
2836
 
2837
- #: bp-groups/bp-groups-admin.php:449
2838
  msgid "The group has been updated successfully."
2839
  msgstr ""
2840
 
2841
- #: bp-groups/bp-groups-admin.php:453
2842
  msgid "The following users could not be added to the group: <em>%s</em>"
2843
  msgstr ""
2844
 
2845
- #: bp-groups/bp-groups-admin.php:457
2846
  msgid "The following users were successfully added to the group: <em>%s</em>"
2847
  msgstr ""
2848
 
2849
- #: bp-groups/bp-groups-admin.php:462
2850
  msgid "An error occurred when trying to modify the following members: <em>%s</em>"
2851
  msgstr ""
2852
 
2853
- #: bp-groups/bp-groups-admin.php:467
2854
  msgid "The following members were successfully modified: <em>%s</em>"
2855
  msgstr ""
2856
 
2857
- #: bp-groups/bp-groups-admin.php:486 bp-groups/bp-groups-adminbar.php:40
2858
  #: bp-xprofile/bp-xprofile-admin.php:114
2859
  msgid "Edit Group"
2860
  msgstr ""
2861
 
2862
- #: bp-groups/bp-groups-admin.php:489
2863
  msgid "Add New"
2864
  msgstr ""
2865
 
2866
- #: bp-groups/bp-groups-admin.php:508
2867
  msgid "Name and Description"
2868
  msgstr ""
2869
 
2870
- #: bp-groups/bp-groups-admin.php:535
2871
  msgid "No group found with this ID. <a href=\"%s\">Go back and try again</a>."
2872
  msgstr ""
2873
 
2874
- #: bp-groups/bp-groups-admin.php:573
2875
  msgid "Delete Groups"
2876
  msgstr ""
2877
 
2878
- #: bp-groups/bp-groups-admin.php:574
2879
  msgid "You are about to delete the following groups:"
2880
  msgstr ""
2881
 
2882
- #: bp-groups/bp-groups-admin.php:582
2883
  msgid "This action cannot be undone."
2884
  msgstr ""
2885
 
2886
- #: bp-groups/bp-groups-admin.php:609
2887
  msgid "%s group has been permanently deleted."
2888
  msgid_plural "%s groups have been permanently deleted."
2889
  msgstr[0] ""
2890
  msgstr[1] ""
2891
 
2892
- #: bp-groups/bp-groups-admin.php:638
2893
  msgid "Search all Groups"
2894
  msgstr ""
2895
 
2896
- #: bp-groups/bp-groups-admin.php:660
2897
  #: bp-templates/bp-legacy/buddypress/groups/create.php:112
2898
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:47
2899
  #: bp-themes/bp-default/groups/create.php:119
@@ -2901,29 +2888,29 @@ msgstr ""
2901
  msgid "Enable discussion forum"
2902
  msgstr ""
2903
 
2904
- #: bp-groups/bp-groups-admin.php:665
2905
  msgid "Privacy"
2906
  msgstr ""
2907
 
2908
- #: bp-groups/bp-groups-admin.php:668 bp-groups/bp-groups-admin.php:1295
2909
- #: bp-groups/bp-groups-template.php:625
2910
  msgid "Public"
2911
  msgstr ""
2912
 
2913
- #: bp-groups/bp-groups-admin.php:669 bp-groups/bp-groups-admin.php:1298
2914
- #: bp-groups/bp-groups-template.php:627
2915
  msgid "Private"
2916
  msgstr ""
2917
 
2918
- #: bp-groups/bp-groups-admin.php:670 bp-groups/bp-groups-admin.php:1301
2919
  msgid "Hidden"
2920
  msgstr ""
2921
 
2922
- #: bp-groups/bp-groups-admin.php:674
2923
  msgid "Who can invite others to this group?"
2924
  msgstr ""
2925
 
2926
- #: bp-groups/bp-groups-admin.php:677
2927
  #: bp-templates/bp-legacy/buddypress/groups/create.php:89
2928
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:99
2929
  #: bp-themes/bp-default/groups/create.php:96
@@ -2931,7 +2918,7 @@ msgstr ""
2931
  msgid "All group members"
2932
  msgstr ""
2933
 
2934
- #: bp-groups/bp-groups-admin.php:678
2935
  #: bp-templates/bp-legacy/buddypress/groups/create.php:94
2936
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:104
2937
  #: bp-themes/bp-default/groups/create.php:101
@@ -2939,7 +2926,7 @@ msgstr ""
2939
  msgid "Group admins and mods only"
2940
  msgstr ""
2941
 
2942
- #: bp-groups/bp-groups-admin.php:679
2943
  #: bp-templates/bp-legacy/buddypress/groups/create.php:99
2944
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:109
2945
  #: bp-themes/bp-default/groups/create.php:106
@@ -2947,66 +2934,66 @@ msgstr ""
2947
  msgid "Group admins only"
2948
  msgstr ""
2949
 
2950
- #: bp-groups/bp-groups-admin.php:694
2951
  msgid "Enter a comma-separated list of user logins."
2952
  msgstr ""
2953
 
2954
- #: bp-groups/bp-groups-admin.php:762
2955
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:177
2956
  #: bp-themes/bp-default/groups/single/admin.php:177
2957
  msgid "Administrators"
2958
  msgstr ""
2959
 
2960
- #: bp-groups/bp-groups-admin.php:763
2961
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:205
2962
  #: bp-themes/bp-default/groups/single/admin.php:205
2963
  msgid "Moderators"
2964
  msgstr ""
2965
 
2966
- #: bp-groups/bp-groups-admin.php:765
2967
  msgid "Banned Users"
2968
  msgstr ""
2969
 
2970
- #: bp-groups/bp-groups-admin.php:774
2971
  msgctxt "Group member user_id in group admin"
2972
  msgid "ID"
2973
  msgstr ""
2974
 
2975
- #: bp-groups/bp-groups-admin.php:775
2976
  msgctxt "Group member name in group admin"
2977
  msgid "Name"
2978
  msgstr ""
2979
 
2980
- #: bp-groups/bp-groups-admin.php:776
2981
  msgctxt "Group member role in group admin"
2982
  msgid "Group Role"
2983
  msgstr ""
2984
 
2985
- #: bp-groups/bp-groups-admin.php:799
2986
  msgid "Administrator"
2987
  msgstr ""
2988
 
2989
- #: bp-groups/bp-groups-admin.php:800
2990
  msgid "Moderator"
2991
  msgstr ""
2992
 
2993
- #: bp-groups/bp-groups-admin.php:801
2994
  msgid "Member"
2995
  msgstr ""
2996
 
2997
- #: bp-groups/bp-groups-admin.php:802
2998
  msgid "Banned"
2999
  msgstr ""
3000
 
3001
- #: bp-groups/bp-groups-admin.php:803
3002
  msgid "Remove From Group"
3003
  msgstr ""
3004
 
3005
- #: bp-groups/bp-groups-admin.php:824
3006
  msgid "No members of this type"
3007
  msgstr ""
3008
 
3009
- #: bp-groups/bp-groups-admin.php:849 bp-groups/bp-groups-adminbar.php:102
3010
  #: bp-groups/bp-groups-buddybar.php:58
3011
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:360
3012
  #: bp-themes/bp-default/groups/single/admin.php:360
@@ -3014,14 +3001,14 @@ msgstr ""
3014
  msgid "Delete Group"
3015
  msgstr ""
3016
 
3017
- #: bp-groups/bp-groups-admin.php:853
3018
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:32
3019
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:117
3020
  #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:58
3021
  #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:74
3022
  #: bp-templates/bp-legacy/buddypress/members/single/profile/edit.php:148
3023
- #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:30
3024
- #: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:19
3025
  #: bp-themes/bp-default/groups/single/admin.php:32
3026
  #: bp-themes/bp-default/groups/single/admin.php:117
3027
  #: bp-themes/bp-default/groups/single/forum/edit.php:58
@@ -3033,53 +3020,75 @@ msgstr ""
3033
  msgid "Save Changes"
3034
  msgstr ""
3035
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3036
  #. translators: 1: user_login, 2: user_email
3037
 
3038
- #: bp-groups/bp-groups-admin.php:906
3039
  msgid "%1$s (%2$s)"
3040
  msgstr ""
3041
 
3042
- #: bp-groups/bp-groups-admin.php:1075
3043
  msgid "No groups found."
3044
  msgstr ""
3045
 
3046
- #: bp-groups/bp-groups-admin.php:1139
3047
  msgid "Public <span class=\"count\">(%s)</span>"
3048
  msgstr ""
3049
 
3050
- #: bp-groups/bp-groups-admin.php:1140
3051
  msgid "Private <span class=\"count\">(%s)</span>"
3052
  msgstr ""
3053
 
3054
- #: bp-groups/bp-groups-admin.php:1141
3055
  msgid "Hidden <span class=\"count\">(%s)</span>"
3056
  msgstr ""
3057
 
3058
- #: bp-groups/bp-groups-admin.php:1170
3059
  msgctxt "Groups admin Group Name column header"
3060
  msgid "Name"
3061
  msgstr ""
3062
 
3063
- #: bp-groups/bp-groups-admin.php:1171
3064
  msgctxt "Groups admin Group Description column header"
3065
  msgid "Description"
3066
  msgstr ""
3067
 
3068
- #: bp-groups/bp-groups-admin.php:1172
3069
  msgctxt "Groups admin Privacy Status column header"
3070
  msgid "Status"
3071
  msgstr ""
3072
 
3073
- #: bp-groups/bp-groups-admin.php:1173
3074
  msgctxt "Groups admin Members column header"
3075
  msgid "# Members"
3076
  msgstr ""
3077
 
3078
- #: bp-groups/bp-groups-admin.php:1174
3079
  msgctxt "Groups admin Last Active column header"
3080
  msgid "Last Active"
3081
  msgstr ""
3082
 
 
 
 
 
3083
  #: bp-groups/bp-groups-adminbar.php:48 bp-groups/bp-groups-buddybar.php:34
3084
  msgid "Edit Details"
3085
  msgstr ""
@@ -3112,16 +3121,16 @@ msgstr ""
3112
  msgid "Group Settings"
3113
  msgstr ""
3114
 
3115
- #: bp-groups/bp-groups-buddybar.php:40 bp-groups/bp-groups-loader.php:585
3116
- #: bp-groups/bp-groups-template.php:2586
3117
  msgid "Group Avatar"
3118
  msgstr ""
3119
 
3120
- #: bp-groups/bp-groups-classes.php:884
3121
  msgid "Group Mod"
3122
  msgstr ""
3123
 
3124
- #: bp-groups/bp-groups-classes.php:890 bp-groups/bp-groups-functions.php:121
3125
  msgid "Group Admin"
3126
  msgstr ""
3127
 
@@ -3137,16 +3146,16 @@ msgstr ""
3137
  msgid "%1$s edited the forum topic %2$s in the group %3$s"
3138
  msgstr ""
3139
 
3140
- #: bp-groups/bp-groups-functions.php:288
3141
  msgid "As the only Admin, you cannot leave the group."
3142
  msgstr ""
3143
 
3144
- #: bp-groups/bp-groups-functions.php:357 bp-groups/bp-groups-functions.php:878
3145
  #: bp-groups/bp-groups-screens.php:62
3146
  msgid "%1$s joined the group %2$s"
3147
  msgstr ""
3148
 
3149
- #: bp-groups/bp-groups-functions.php:568
3150
  msgid "%1$s posted an update in the group %2$s"
3151
  msgstr ""
3152
 
@@ -3162,11 +3171,11 @@ msgstr ""
3162
  msgid "You are not an admin of this group."
3163
  msgstr ""
3164
 
3165
- #: bp-groups/bp-groups-loader.php:298 bp-groups/bp-groups-template.php:1439
3166
  msgid "Details"
3167
  msgstr ""
3168
 
3169
- #: bp-groups/bp-groups-loader.php:310 bp-groups/bp-groups-template.php:1450
3170
  msgid "Avatar"
3171
  msgstr ""
3172
 
@@ -3179,7 +3188,7 @@ msgid "Groups <span>%d</span>"
3179
  msgstr ""
3180
 
3181
  #: bp-groups/bp-groups-loader.php:368 bp-groups/bp-groups-loader.php:398
3182
- #: bp-groups/bp-groups-loader.php:537 bp-groups/bp-groups-loader.php:565
3183
  msgid "Memberships"
3184
  msgstr ""
3185
 
@@ -3192,10 +3201,10 @@ msgctxt "Group home navigation title"
3192
  msgid "Home"
3193
  msgstr ""
3194
 
3195
- #: bp-groups/bp-groups-loader.php:427 bp-groups/bp-groups-template.php:1771
3196
- #: bp-groups/bp-groups-template.php:1772
3197
- #: bp-templates/bp-legacy/buddypress-functions.php:1008
3198
- #: bp-themes/bp-default/_inc/ajax.php:724
3199
  msgid "Request Membership"
3200
  msgstr ""
3201
 
@@ -3436,187 +3445,183 @@ msgstr ""
3436
  msgid "Your membership request was sent to the group administrator successfully. You will be notified when the group administrator responds to your request."
3437
  msgstr ""
3438
 
3439
- #: bp-groups/bp-groups-screens.php:527
3440
  msgid "There was an error updating group details, please try again."
3441
  msgstr ""
3442
 
3443
- #: bp-groups/bp-groups-screens.php:529
3444
  msgid "Group details were successfully updated."
3445
  msgstr ""
3446
 
3447
- #: bp-groups/bp-groups-screens.php:571
3448
  msgid "There was an error updating group settings, please try again."
3449
  msgstr ""
3450
 
3451
- #: bp-groups/bp-groups-screens.php:573
3452
  msgid "Group settings were successfully updated."
3453
  msgstr ""
3454
 
3455
- #: bp-groups/bp-groups-screens.php:605 bp-xprofile/bp-xprofile-actions.php:39
3456
  msgid "Your avatar was deleted successfully!"
3457
  msgstr ""
3458
 
3459
- #: bp-groups/bp-groups-screens.php:607 bp-xprofile/bp-xprofile-actions.php:41
3460
  msgid "There was a problem deleting that avatar, please try again."
3461
  msgstr ""
3462
 
3463
- #: bp-groups/bp-groups-screens.php:650
3464
  msgid "There was a problem cropping the avatar."
3465
  msgstr ""
3466
 
3467
- #: bp-groups/bp-groups-screens.php:652
3468
  msgid "The new group avatar was uploaded successfully."
3469
  msgstr ""
3470
 
3471
- #: bp-groups/bp-groups-screens.php:688
3472
  msgid "There was an error when promoting that user, please try again"
3473
  msgstr ""
3474
 
3475
- #: bp-groups/bp-groups-screens.php:690
3476
  msgid "User promoted successfully"
3477
  msgstr ""
3478
 
3479
- #: bp-groups/bp-groups-screens.php:713
3480
  msgid "There was an error when demoting that user, please try again"
3481
  msgstr ""
3482
 
3483
- #: bp-groups/bp-groups-screens.php:715
3484
  msgid "User demoted successfully"
3485
  msgstr ""
3486
 
3487
- #: bp-groups/bp-groups-screens.php:731
3488
  msgid "There was an error when banning that user, please try again"
3489
  msgstr ""
3490
 
3491
- #: bp-groups/bp-groups-screens.php:733
3492
  msgid "User banned successfully"
3493
  msgstr ""
3494
 
3495
- #: bp-groups/bp-groups-screens.php:749
3496
  msgid "There was an error when unbanning that user, please try again"
3497
  msgstr ""
3498
 
3499
- #: bp-groups/bp-groups-screens.php:751
3500
  msgid "User ban removed successfully"
3501
  msgstr ""
3502
 
3503
- #: bp-groups/bp-groups-screens.php:767
3504
  msgid "There was an error removing that user from the group, please try again"
3505
  msgstr ""
3506
 
3507
- #: bp-groups/bp-groups-screens.php:769
3508
  msgid "User removed successfully"
3509
  msgstr ""
3510
 
3511
- #: bp-groups/bp-groups-screens.php:807
3512
  msgid "There was an error accepting the membership request, please try again."
3513
  msgstr ""
3514
 
3515
- #: bp-groups/bp-groups-screens.php:809
3516
  msgid "Group membership request accepted"
3517
  msgstr ""
3518
 
3519
- #: bp-groups/bp-groups-screens.php:818
3520
  msgid "There was an error rejecting the membership request, please try again."
3521
  msgstr ""
3522
 
3523
- #: bp-groups/bp-groups-screens.php:820
3524
  msgid "Group membership request rejected"
3525
  msgstr ""
3526
 
3527
- #: bp-groups/bp-groups-screens.php:852
3528
  msgid "There was an error deleting the group, please try again."
3529
  msgstr ""
3530
 
3531
- #: bp-groups/bp-groups-screens.php:854
3532
  msgid "The group was deleted successfully"
3533
  msgstr ""
3534
 
3535
- #: bp-groups/bp-groups-screens.php:902
3536
  msgid "A member invites you to join a group"
3537
  msgstr ""
3538
 
3539
- #: bp-groups/bp-groups-screens.php:908
3540
  msgid "Group information is updated"
3541
  msgstr ""
3542
 
3543
- #: bp-groups/bp-groups-screens.php:914
3544
  msgid "You are promoted to a group administrator or moderator"
3545
  msgstr ""
3546
 
3547
- #: bp-groups/bp-groups-screens.php:920
3548
  msgid "A member requests to join a private group for which you are an admin"
3549
  msgstr ""
3550
 
3551
- #: bp-groups/bp-groups-template.php:214
3552
  msgctxt "Group pagination previous text"
3553
  msgid "&larr;"
3554
  msgstr ""
3555
 
3556
- #: bp-groups/bp-groups-template.php:215
3557
  msgctxt "Group pagination next text"
3558
  msgid "&rarr;"
3559
  msgstr ""
3560
 
3561
- #: bp-groups/bp-groups-template.php:458
3562
  msgid "Public Group"
3563
  msgstr ""
3564
 
3565
- #: bp-groups/bp-groups-template.php:460
3566
  msgid "Hidden Group"
3567
  msgstr ""
3568
 
3569
- #: bp-groups/bp-groups-template.php:462
3570
  msgid "Private Group"
3571
  msgstr ""
3572
 
3573
- #: bp-groups/bp-groups-template.php:464
3574
  msgid "Group"
3575
  msgstr ""
3576
 
3577
- #: bp-groups/bp-groups-template.php:536
3578
  msgid "not yet active"
3579
  msgstr ""
3580
 
3581
- #: bp-groups/bp-groups-template.php:718
3582
  msgid "Group creator avatar of %s"
3583
  msgstr ""
3584
 
3585
- #: bp-groups/bp-groups-template.php:753
3586
  msgid "No Admins"
3587
  msgstr ""
3588
 
3589
- #: bp-groups/bp-groups-template.php:780
3590
  msgid "No Mods"
3591
  msgstr ""
3592
 
3593
- #: bp-groups/bp-groups-template.php:862
3594
  msgid "Filter Groups"
3595
  msgstr ""
3596
 
3597
- #: bp-groups/bp-groups-template.php:910
3598
  msgid "Viewing group %1$s to %2$s (of %3$s groups)"
3599
  msgstr ""
3600
 
3601
- #: bp-groups/bp-groups-template.php:938
3602
- msgid "%s member"
3603
- msgstr ""
3604
-
3605
- #: bp-groups/bp-groups-template.php:940
3606
  #: bp-templates/bp-legacy/buddypress/members/single/groups/invites.php:14
3607
  #: bp-themes/bp-default/members/single/groups/invites.php:14
3608
  msgid "%s members"
3609
  msgstr ""
3610
 
3611
- #: bp-groups/bp-groups-template.php:979
3612
  msgid "%d topic"
3613
  msgstr ""
3614
 
3615
- #: bp-groups/bp-groups-template.php:981
3616
  msgid "%d topics"
3617
  msgstr ""
3618
 
3619
- #: bp-groups/bp-groups-template.php:1207 bp-groups/bp-groups-template.php:1272
3620
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:190
3621
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:217
3622
  #: bp-themes/bp-default/groups/single/admin.php:190
@@ -3624,16 +3629,16 @@ msgstr ""
3624
  msgid "Demote to Member"
3625
  msgstr ""
3626
 
3627
- #: bp-groups/bp-groups-template.php:1220 bp-groups/bp-groups-template.php:1285
3628
- #: bp-groups/bp-groups-template.php:2085
3629
  msgid "joined %s"
3630
  msgstr ""
3631
 
3632
- #: bp-groups/bp-groups-template.php:1243
3633
  msgid "This group has no administrators"
3634
  msgstr ""
3635
 
3636
- #: bp-groups/bp-groups-template.php:1271
3637
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:216
3638
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:272
3639
  #: bp-themes/bp-default/groups/single/admin.php:216
@@ -3641,75 +3646,75 @@ msgstr ""
3641
  msgid "Promote to Admin"
3642
  msgstr ""
3643
 
3644
- #: bp-groups/bp-groups-template.php:1305
3645
  msgid "This group has no moderators"
3646
  msgstr ""
3647
 
3648
- #: bp-groups/bp-groups-template.php:1730 bp-groups/bp-groups-template.php:1731
3649
- #: bp-templates/bp-legacy/buddypress-functions.php:987
3650
- #: bp-themes/bp-default/_inc/ajax.php:703
3651
  msgid "Leave Group"
3652
  msgstr ""
3653
 
3654
- #: bp-groups/bp-groups-template.php:1753 bp-groups/bp-groups-template.php:1754
3655
- #: bp-templates/bp-legacy/buddypress-functions.php:1006
3656
- #: bp-themes/bp-default/_inc/ajax.php:722
3657
  msgid "Join Group"
3658
  msgstr ""
3659
 
3660
- #: bp-groups/bp-groups-template.php:1786 bp-groups/bp-groups-template.php:1787
3661
  msgid "Request Sent"
3662
  msgstr ""
3663
 
3664
- #: bp-groups/bp-groups-template.php:1817
3665
  msgid "This is a private group and you must request group membership in order to join."
3666
  msgstr ""
3667
 
3668
- #: bp-groups/bp-groups-template.php:1819
3669
  msgid "This is a private group. To join you must be a registered site member and request group membership."
3670
  msgstr ""
3671
 
3672
- #: bp-groups/bp-groups-template.php:1822
3673
  msgid "This is a private group. Your membership request is awaiting approval from the group administrator."
3674
  msgstr ""
3675
 
3676
- #: bp-groups/bp-groups-template.php:1826
3677
  msgid "This is a hidden group and only invited members can join."
3678
  msgstr ""
3679
 
3680
- #: bp-groups/bp-groups-template.php:2133
3681
  msgid "Viewing members %1$s to %2$s (of %3$s members)"
3682
  msgstr ""
3683
 
3684
- #: bp-groups/bp-groups-template.php:2359
3685
  msgid "Group avatar"
3686
  msgstr ""
3687
 
3688
- #: bp-groups/bp-groups-template.php:2499 bp-groups/bp-groups-template.php:2523
3689
  msgid "Recently Joined"
3690
  msgstr ""
3691
 
3692
- #: bp-groups/bp-groups-template.php:2500 bp-groups/bp-groups-template.php:2526
3693
  msgid "Most Popular"
3694
  msgstr ""
3695
 
3696
- #: bp-groups/bp-groups-template.php:2501 bp-groups/bp-groups-template.php:2529
3697
  msgid "Administrator Of"
3698
  msgstr ""
3699
 
3700
- #: bp-groups/bp-groups-template.php:2502 bp-groups/bp-groups-template.php:2532
3701
  msgid "Moderator Of"
3702
  msgstr ""
3703
 
3704
- #: bp-groups/bp-groups-template.php:2590
3705
  msgid "No Group Avatar"
3706
  msgstr ""
3707
 
3708
- #: bp-groups/bp-groups-template.php:2791
3709
  msgid "requested %s"
3710
  msgstr ""
3711
 
3712
- #: bp-groups/bp-groups-template.php:2966
3713
  msgid "Group Activity RSS Feed"
3714
  msgstr ""
3715
 
@@ -3722,27 +3727,27 @@ msgctxt "widget name"
3722
  msgid "(BuddyPress) Groups"
3723
  msgstr ""
3724
 
3725
- #: bp-groups/bp-groups-widgets.php:76 bp-groups/bp-groups-widgets.php:179
3726
  msgid "created %s"
3727
  msgstr ""
3728
 
3729
- #: bp-groups/bp-groups-widgets.php:95
3730
  msgid "There are no groups to display."
3731
  msgstr ""
3732
 
3733
- #: bp-groups/bp-groups-widgets.php:132
3734
  msgid "Link widget title to Groups directory"
3735
  msgstr ""
3736
 
3737
- #: bp-groups/bp-groups-widgets.php:134
3738
  msgid "Max groups to show:"
3739
  msgstr ""
3740
 
3741
- #: bp-groups/bp-groups-widgets.php:137
3742
  msgid "Default groups to show:"
3743
  msgstr ""
3744
 
3745
- #: bp-groups/bp-groups-widgets.php:197
3746
  msgid "No groups matched the current filter."
3747
  msgstr ""
3748
 
@@ -3750,7 +3755,7 @@ msgstr ""
3750
  msgid "Cheatin&#8217; huh?"
3751
  msgstr ""
3752
 
3753
- #: bp-loader.php:530
3754
  msgid "BuddyPress Default"
3755
  msgstr ""
3756
 
@@ -3783,8 +3788,8 @@ msgid "Edit Member"
3783
  msgstr ""
3784
 
3785
  #: bp-members/bp-members-adminbar.php:99
3786
- #: bp-xprofile/bp-xprofile-template.php:895
3787
- #: bp-xprofile/bp-xprofile-template.php:896
3788
  msgid "Edit Profile"
3789
  msgstr ""
3790
 
@@ -3796,7 +3801,7 @@ msgstr ""
3796
  #: bp-members/bp-members-adminbar.php:123
3797
  #: bp-settings/bp-settings-loader.php:130
3798
  #: bp-settings/bp-settings-loader.php:190
3799
- #: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:33
3800
  #: bp-themes/bp-default/members/single/settings/delete-account.php:50
3801
  #: bp-themes/bp-default/members/single/settings/delete-account.php:76
3802
  msgid "Delete Account"
@@ -3831,61 +3836,66 @@ msgstr ""
3831
  msgid "Delete %s's Account"
3832
  msgstr ""
3833
 
3834
- #: bp-members/bp-members-functions.php:897
 
3835
  msgid "<strong>ERROR</strong>: Your account has been marked as a spammer."
3836
  msgstr ""
3837
 
3838
- #: bp-members/bp-members-functions.php:1071
3839
  msgid "Please check your email address."
3840
  msgstr ""
3841
 
3842
- #: bp-members/bp-members-functions.php:1074
3843
- #: bp-members/bp-members-functions.php:1077
3844
  msgid "Sorry, that email address is not allowed!"
3845
  msgstr ""
3846
 
3847
- #: bp-members/bp-members-functions.php:1080
3848
  msgid "Sorry, that email address is already used!"
3849
  msgstr ""
3850
 
3851
- #: bp-members/bp-members-functions.php:1098
3852
  msgid "Please enter a username"
3853
  msgstr ""
3854
 
3855
- #: bp-members/bp-members-functions.php:1106
3856
- msgid "Only lowercase letters and numbers allowed"
 
 
 
 
3857
  msgstr ""
3858
 
3859
- #: bp-members/bp-members-functions.php:1109
3860
  msgid "Username must be at least 4 characters"
3861
  msgstr ""
3862
 
3863
- #: bp-members/bp-members-functions.php:1112
3864
  msgid "Sorry, usernames may not contain the character \"_\"!"
3865
  msgstr ""
3866
 
3867
- #: bp-members/bp-members-functions.php:1119
3868
  msgid "Sorry, usernames must have letters too!"
3869
  msgstr ""
3870
 
3871
- #: bp-members/bp-members-functions.php:1123
3872
  msgid "Sorry, that username already exists!"
3873
  msgstr ""
3874
 
3875
- #: bp-members/bp-members-functions.php:1168
3876
  msgid "<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href=\"mailto:%s\">webmaster</a> !"
3877
  msgstr ""
3878
 
3879
- #: bp-members/bp-members-functions.php:1266
3880
- #: bp-members/bp-members-functions.php:1270
3881
  msgid "Invalid activation key"
3882
  msgstr ""
3883
 
3884
- #: bp-members/bp-members-functions.php:1307
3885
  msgid "%s became a registered member"
3886
  msgstr ""
3887
 
3888
- #: bp-members/bp-members-functions.php:1391
3889
  msgid "<strong>ERROR</strong>: Your account has not been activated. Check your email for the activation link."
3890
  msgstr ""
3891
 
@@ -3913,12 +3923,12 @@ msgstr ""
3913
  msgid "Your account is now active!"
3914
  msgstr ""
3915
 
3916
- #: bp-members/bp-members-screens.php:433
3917
  #: bp-themes/bp-default/registration/register.php:253
3918
- msgid "Sign Up Complete!"
3919
  msgstr ""
3920
 
3921
- #: bp-members/bp-members-screens.php:441
3922
  #: bp-themes/bp-default/registration/activate.php:11
3923
  msgid "Account Activated"
3924
  msgstr ""
@@ -3933,41 +3943,41 @@ msgctxt "Member pagination next text"
3933
  msgid "&rarr;"
3934
  msgstr ""
3935
 
3936
- #: bp-members/bp-members-template.php:346
3937
  msgid "Viewing member %1$s to %2$s (of %3$s active members)"
3938
  msgstr ""
3939
 
3940
- #: bp-members/bp-members-template.php:348
3941
  msgid "Viewing member %1$s to %2$s (of %3$s members with friends)"
3942
  msgstr ""
3943
 
3944
- #: bp-members/bp-members-template.php:350
3945
  msgid "Viewing member %1$s to %2$s (of %3$s members online)"
3946
  msgstr ""
3947
 
3948
- #: bp-members/bp-members-template.php:352
3949
  msgid "Viewing member %1$s to %2$s (of %3$s members)"
3950
  msgstr ""
3951
 
3952
- #: bp-members/bp-members-template.php:597
3953
  msgid "Never active"
3954
  msgstr ""
3955
 
3956
- #: bp-members/bp-members-template.php:619
3957
  msgctxt "member latest update in member directory"
3958
  msgid "- &quot;%s &quot;"
3959
  msgstr ""
3960
 
3961
- #: bp-members/bp-members-template.php:676
3962
  msgctxt "Records the timestamp that the user registered into the activy stream"
3963
  msgid "registered %s"
3964
  msgstr ""
3965
 
3966
- #: bp-members/bp-members-template.php:1145
3967
  msgid "Your Avatar"
3968
  msgstr ""
3969
 
3970
- #: bp-members/bp-members-template.php:1215
3971
  msgid "Activity RSS Feed"
3972
  msgstr ""
3973
 
@@ -3992,8 +4002,8 @@ msgid "There was an error deleting messages."
3992
  msgstr ""
3993
 
3994
  #: bp-messages/bp-messages-actions.php:91
3995
- #: bp-templates/bp-legacy/buddypress-functions.php:1167
3996
- #: bp-themes/bp-default/_inc/ajax.php:871
3997
  msgid "Messages deleted."
3998
  msgstr ""
3999
 
@@ -4182,28 +4192,28 @@ msgstr ""
4182
  #: bp-messages/bp-messages-template.php:607
4183
  #: bp-templates/bp-legacy/buddypress/members/register.php:166
4184
  #: bp-templates/bp-legacy/buddypress/members/single/profile/edit.php:130
4185
- #: bp-templates/bp-legacy/buddypress-functions.php:257
4186
- #: bp-themes/bp-default/functions.php:164
4187
  #: bp-themes/bp-default/members/single/profile/edit.php:130
4188
  #: bp-themes/bp-default/registration/register.php:171
4189
  msgid "Close"
4190
  msgstr ""
4191
 
4192
- #: bp-messages/bp-messages-template.php:650
4193
  msgid "Send a private message to this user."
4194
  msgstr ""
4195
 
4196
- #: bp-messages/bp-messages-template.php:651
4197
  msgid "Private Message"
4198
  msgstr ""
4199
 
4200
- #: bp-messages/bp-messages-template.php:834
4201
  msgid "%d Recipients"
4202
  msgstr ""
4203
 
4204
- #: bp-messages/bp-messages-template.php:922
4205
- #: bp-templates/bp-legacy/buddypress-functions.php:1073
4206
- #: bp-themes/bp-default/_inc/ajax.php:777
4207
  msgid "Sent %s"
4208
  msgstr ""
4209
 
@@ -4301,24 +4311,24 @@ msgid "Mark as Favorite"
4301
  msgstr ""
4302
 
4303
  #: bp-templates/bp-legacy/buddypress/activity/entry.php:66
4304
- #: bp-templates/bp-legacy/buddypress-functions.php:259
4305
- #: bp-templates/bp-legacy/buddypress-functions.php:764
4306
- #: bp-templates/bp-legacy/buddypress-functions.php:781
4307
- #: bp-themes/bp-default/_inc/ajax.php:481
4308
- #: bp-themes/bp-default/_inc/ajax.php:498
4309
  #: bp-themes/bp-default/activity/entry.php:68
4310
- #: bp-themes/bp-default/functions.php:166
4311
  msgid "Favorite"
4312
  msgstr ""
4313
 
4314
  #: bp-templates/bp-legacy/buddypress/activity/entry.php:70
4315
- #: bp-templates/bp-legacy/buddypress-functions.php:260
4316
- #: bp-templates/bp-legacy/buddypress-functions.php:762
4317
- #: bp-templates/bp-legacy/buddypress-functions.php:783
4318
- #: bp-themes/bp-default/_inc/ajax.php:479
4319
- #: bp-themes/bp-default/_inc/ajax.php:500
4320
  #: bp-themes/bp-default/activity/entry.php:72
4321
- #: bp-themes/bp-default/functions.php:167
4322
  msgid "Remove Favorite"
4323
  msgstr ""
4324
 
@@ -4333,9 +4343,9 @@ msgid "The public activity for everyone on this site."
4333
  msgstr ""
4334
 
4335
  #: bp-templates/bp-legacy/buddypress/activity/index.php:19
4336
- #: bp-templates/bp-legacy/buddypress/members/index.php:17
4337
  #: bp-themes/bp-default/activity/index.php:39
4338
- #: bp-themes/bp-default/members/index.php:33
4339
  msgid "All Members <span>%s</span>"
4340
  msgstr ""
4341
 
@@ -4345,9 +4355,9 @@ msgid "The activity of my friends only."
4345
  msgstr ""
4346
 
4347
  #: bp-templates/bp-legacy/buddypress/activity/index.php:29
4348
- #: bp-templates/bp-legacy/buddypress/members/index.php:20
4349
  #: bp-themes/bp-default/activity/index.php:49
4350
- #: bp-themes/bp-default/members/index.php:37
4351
  msgid "My Friends <span>%s</span>"
4352
  msgstr ""
4353
 
@@ -4373,100 +4383,103 @@ msgstr ""
4373
  msgid "My Favorites <span>%s</span>"
4374
  msgstr ""
4375
 
4376
- #: bp-templates/bp-legacy/buddypress/activity/index.php:57
4377
- #: bp-themes/bp-default/activity/index.php:77
4378
  msgid "Activity that I have been mentioned in."
4379
  msgstr ""
4380
 
4381
- #: bp-templates/bp-legacy/buddypress/activity/index.php:57
4382
- #: bp-themes/bp-default/activity/index.php:77
4383
- msgid "<span>%s new</span>"
4384
- msgstr ""
 
 
 
4385
 
4386
- #: bp-templates/bp-legacy/buddypress/activity/index.php:67
4387
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:3
4388
- #: bp-themes/bp-default/activity/index.php:87
4389
  #: bp-themes/bp-default/groups/single/activity.php:3
4390
  msgid "RSS Feed"
4391
  msgstr ""
4392
 
4393
- #: bp-templates/bp-legacy/buddypress/activity/index.php:67
4394
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:3
4395
- #: bp-themes/bp-default/activity/index.php:87
4396
  #: bp-themes/bp-default/groups/single/activity.php:3
4397
  msgid "RSS"
4398
  msgstr ""
4399
 
4400
- #: bp-templates/bp-legacy/buddypress/activity/index.php:72
4401
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:8
4402
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:18
4403
- #: bp-themes/bp-default/activity/index.php:92
4404
  #: bp-themes/bp-default/groups/single/activity.php:8
4405
  #: bp-themes/bp-default/members/single/activity.php:18
4406
  msgid "Show:"
4407
  msgstr ""
4408
 
4409
- #: bp-templates/bp-legacy/buddypress/activity/index.php:74
4410
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:10
4411
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:20
4412
- #: bp-themes/bp-default/activity/index.php:94
4413
  #: bp-themes/bp-default/groups/single/activity.php:10
4414
  #: bp-themes/bp-default/members/single/activity.php:20
4415
  msgid "Everything"
4416
  msgstr ""
4417
 
4418
- #: bp-templates/bp-legacy/buddypress/activity/index.php:75
4419
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:11
4420
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:21
4421
- #: bp-themes/bp-default/activity/index.php:95
4422
  #: bp-themes/bp-default/groups/single/activity.php:11
4423
  #: bp-themes/bp-default/members/single/activity.php:21
4424
  msgid "Updates"
4425
  msgstr ""
4426
 
4427
- #: bp-templates/bp-legacy/buddypress/activity/index.php:80
4428
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:28
4429
- #: bp-themes/bp-default/activity/index.php:100
4430
  #: bp-themes/bp-default/members/single/activity.php:28
4431
  msgid "Comments"
4432
  msgstr ""
4433
 
4434
- #: bp-templates/bp-legacy/buddypress/activity/index.php:86
4435
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:14
4436
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:43
4437
- #: bp-themes/bp-default/activity/index.php:106
4438
  #: bp-themes/bp-default/groups/single/activity.php:14
4439
  #: bp-themes/bp-default/members/single/activity.php:43
4440
  msgid "Forum Topics"
4441
  msgstr ""
4442
 
4443
- #: bp-templates/bp-legacy/buddypress/activity/index.php:87
4444
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:15
4445
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:44
4446
- #: bp-themes/bp-default/activity/index.php:107
4447
  #: bp-themes/bp-default/groups/single/activity.php:15
4448
  #: bp-themes/bp-default/members/single/activity.php:44
4449
  msgid "Forum Replies"
4450
  msgstr ""
4451
 
4452
- #: bp-templates/bp-legacy/buddypress/activity/index.php:93
4453
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:50
4454
- #: bp-themes/bp-default/activity/index.php:113
4455
  #: bp-themes/bp-default/members/single/activity.php:50
4456
  msgid "New Groups"
4457
  msgstr ""
4458
 
4459
- #: bp-templates/bp-legacy/buddypress/activity/index.php:94
4460
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:18
4461
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:51
4462
- #: bp-themes/bp-default/activity/index.php:114
4463
  #: bp-themes/bp-default/groups/single/activity.php:18
4464
  #: bp-themes/bp-default/members/single/activity.php:51
4465
  msgid "Group Memberships"
4466
  msgstr ""
4467
 
4468
- #: bp-templates/bp-legacy/buddypress/activity/index.php:104
4469
- #: bp-themes/bp-default/activity/index.php:124
4470
  msgid "New Members"
4471
  msgstr ""
4472
 
@@ -4514,7 +4527,7 @@ msgstr ""
4514
  #: bp-templates/bp-legacy/buddypress/forums/index.php:42
4515
  #: bp-templates/bp-legacy/buddypress/groups/index.php:36
4516
  #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:36
4517
- #: bp-templates/bp-legacy/buddypress/members/index.php:33
4518
  #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:19
4519
  #: bp-templates/bp-legacy/buddypress/members/single/forums.php:18
4520
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:20
@@ -4523,7 +4536,7 @@ msgstr ""
4523
  #: bp-themes/bp-default/forums/index.php:60
4524
  #: bp-themes/bp-default/groups/index.php:55
4525
  #: bp-themes/bp-default/groups/single/forum.php:36
4526
- #: bp-themes/bp-default/members/index.php:53
4527
  #: bp-themes/bp-default/members/single/blogs.php:19
4528
  #: bp-themes/bp-default/members/single/forums.php:18
4529
  #: bp-themes/bp-default/members/single/friends.php:20
@@ -4535,7 +4548,7 @@ msgstr ""
4535
  #: bp-templates/bp-legacy/buddypress/forums/index.php:44
4536
  #: bp-templates/bp-legacy/buddypress/groups/index.php:39
4537
  #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:38
4538
- #: bp-templates/bp-legacy/buddypress/members/index.php:35
4539
  #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:21
4540
  #: bp-templates/bp-legacy/buddypress/members/single/forums.php:20
4541
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:22
@@ -4544,7 +4557,7 @@ msgstr ""
4544
  #: bp-themes/bp-default/forums/index.php:62
4545
  #: bp-themes/bp-default/groups/index.php:57
4546
  #: bp-themes/bp-default/groups/single/forum.php:38
4547
- #: bp-themes/bp-default/members/index.php:55
4548
  #: bp-themes/bp-default/members/single/blogs.php:21
4549
  #: bp-themes/bp-default/members/single/forums.php:20
4550
  #: bp-themes/bp-default/members/single/friends.php:22
@@ -4554,13 +4567,13 @@ msgstr ""
4554
 
4555
  #: bp-templates/bp-legacy/buddypress/blogs/index.php:40
4556
  #: bp-templates/bp-legacy/buddypress/groups/index.php:42
4557
- #: bp-templates/bp-legacy/buddypress/members/index.php:39
4558
  #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:23
4559
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:24
4560
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:25
4561
  #: bp-themes/bp-default/blogs/index.php:57
4562
  #: bp-themes/bp-default/groups/index.php:60
4563
- #: bp-themes/bp-default/members/index.php:60
4564
  #: bp-themes/bp-default/members/single/blogs.php:23
4565
  #: bp-themes/bp-default/members/single/friends.php:24
4566
  #: bp-themes/bp-default/members/single/groups.php:25
@@ -4663,7 +4676,7 @@ msgstr ""
4663
 
4664
  #: bp-templates/bp-legacy/buddypress/forums/index.php:98
4665
  #: bp-themes/bp-default/forums/index.php:116
4666
- #: bp-xprofile/bp-xprofile-template.php:459
4667
  msgid "----"
4668
  msgstr ""
4669
 
@@ -4864,8 +4877,8 @@ msgstr ""
4864
 
4865
  #: bp-templates/bp-legacy/buddypress/groups/create.php:222
4866
  #: bp-templates/bp-legacy/buddypress/groups/single/send-invites.php:42
4867
- #: bp-templates/bp-legacy/buddypress-functions.php:853
4868
- #: bp-themes/bp-default/_inc/ajax.php:570
4869
  #: bp-themes/bp-default/groups/create.php:229
4870
  #: bp-themes/bp-default/groups/single/send-invites.php:42
4871
  msgid "Remove Invite"
@@ -4922,9 +4935,9 @@ msgstr ""
4922
  msgid "Newly Created"
4923
  msgstr ""
4924
 
4925
- #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:25
4926
- #: bp-themes/bp-default/groups/single/admin.php:25
4927
- msgid "Notify group members of changes via email"
4928
  msgstr ""
4929
 
4930
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:137
@@ -5125,7 +5138,7 @@ msgstr ""
5125
 
5126
  #: bp-templates/bp-legacy/buddypress/members/activate.php:16
5127
  #: bp-themes/bp-default/registration/activate.php:25
5128
- msgid "Your account was activated successfully! You can now log in with the username and password you provided when you signed up."
5129
  msgstr ""
5130
 
5131
  #: bp-templates/bp-legacy/buddypress/members/activate.php:21
@@ -5138,9 +5151,9 @@ msgstr ""
5138
  msgid "Activation Key:"
5139
  msgstr ""
5140
 
5141
- #: bp-templates/bp-legacy/buddypress/members/index.php:36
5142
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:23
5143
- #: bp-themes/bp-default/members/index.php:56
5144
  #: bp-themes/bp-default/members/single/friends.php:23
5145
  msgid "Newest Registered"
5146
  msgstr ""
@@ -5449,62 +5462,62 @@ msgstr ""
5449
  msgid "%s's Profile"
5450
  msgstr ""
5451
 
5452
- #: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:15
5453
  #: bp-themes/bp-default/members/single/settings/capabilities.php:57
5454
  msgid "This user is a spammer."
5455
  msgstr ""
5456
 
5457
- #: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:13
5458
  #: bp-themes/bp-default/members/single/settings/delete-account.php:56
5459
  msgid "Deleting your account will delete all of the content you have created. It will be completely irrecoverable."
5460
  msgstr ""
5461
 
5462
- #: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:17
5463
  #: bp-themes/bp-default/members/single/settings/delete-account.php:60
5464
  msgid "Deleting this account will delete all of the content it has created. It will be completely irrecoverable."
5465
  msgstr ""
5466
 
5467
- #: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:29
5468
  #: bp-themes/bp-default/members/single/settings/delete-account.php:72
5469
  msgid "I understand the consequences."
5470
  msgstr ""
5471
 
5472
- #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:15
5473
  #: bp-themes/bp-default/members/single/settings/general.php:57
5474
  msgid "Current Password <span>(required to update email or change current password)</span>"
5475
  msgstr ""
5476
 
5477
- #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:16
5478
  #: bp-themes/bp-default/members/single/settings/general.php:58
5479
  msgid "Password Lost and Found"
5480
  msgstr ""
5481
 
5482
- #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:16
5483
  #: bp-themes/bp-default/members/single/settings/general.php:58
5484
  msgid "Lost your password?"
5485
  msgstr ""
5486
 
5487
- #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:20
5488
  #: bp-themes/bp-default/members/single/settings/general.php:62
5489
  msgid "Account Email"
5490
  msgstr ""
5491
 
5492
- #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:23
5493
  #: bp-themes/bp-default/members/single/settings/general.php:65
5494
  msgid "Change Password <span>(leave blank for no change)</span>"
5495
  msgstr ""
5496
 
5497
- #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:24
5498
  #: bp-themes/bp-default/members/single/settings/general.php:66
5499
  msgid "New Password"
5500
  msgstr ""
5501
 
5502
- #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:25
5503
  #: bp-themes/bp-default/members/single/settings/general.php:67
5504
  msgid "Repeat New Password"
5505
  msgstr ""
5506
 
5507
- #: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:12
5508
  #: bp-themes/bp-default/members/single/settings/notifications.php:54
5509
  msgid "Send a notification by email when:"
5510
  msgstr ""
@@ -5513,115 +5526,124 @@ msgstr ""
5513
  msgid "BuddyPress Legacy"
5514
  msgstr ""
5515
 
5516
- #: bp-templates/bp-legacy/buddypress-functions.php:251
5517
  #: bp-themes/bp-default/functions.php:158
5518
  msgid "My Favorites"
5519
  msgstr ""
5520
 
5521
- #: bp-templates/bp-legacy/buddypress-functions.php:252
5522
  #: bp-themes/bp-default/functions.php:159
5523
  msgid "Accepted"
5524
  msgstr ""
5525
 
5526
- #: bp-templates/bp-legacy/buddypress-functions.php:253
5527
  #: bp-themes/bp-default/functions.php:160
5528
  msgid "Rejected"
5529
  msgstr ""
5530
 
5531
- #: bp-templates/bp-legacy/buddypress-functions.php:254
5532
  #: bp-themes/bp-default/functions.php:161
5533
  msgid "Show all comments for this thread"
5534
  msgstr ""
5535
 
5536
- #: bp-templates/bp-legacy/buddypress-functions.php:255
5537
  #: bp-themes/bp-default/functions.php:162
5538
- msgid "Show all"
5539
  msgstr ""
5540
 
5541
- #: bp-templates/bp-legacy/buddypress-functions.php:256
5542
  #: bp-themes/bp-default/functions.php:163
 
 
 
 
 
5543
  msgid "comments"
5544
  msgstr ""
5545
 
5546
- #: bp-templates/bp-legacy/buddypress-functions.php:569
5547
- #: bp-themes/bp-default/_inc/ajax.php:278
 
 
 
 
5548
  msgid "There was a problem posting your update, please try again."
5549
  msgstr ""
5550
 
5551
- #: bp-templates/bp-legacy/buddypress-functions.php:663
5552
- #: bp-templates/bp-legacy/buddypress-functions.php:699
5553
- #: bp-themes/bp-default/_inc/ajax.php:380
5554
- #: bp-themes/bp-default/_inc/ajax.php:416
5555
  msgid "There was a problem when deleting. Please try again."
5556
  msgstr ""
5557
 
5558
- #: bp-templates/bp-legacy/buddypress-functions.php:899
5559
- #: bp-themes/bp-default/_inc/ajax.php:615
5560
  msgid " Friendship could not be requested."
5561
  msgstr ""
5562
 
5563
- #: bp-templates/bp-legacy/buddypress-functions.php:911
5564
- #: bp-themes/bp-default/_inc/ajax.php:627
5565
  msgid "Friendship request could not be cancelled."
5566
  msgstr ""
5567
 
5568
- #: bp-templates/bp-legacy/buddypress-functions.php:916
5569
- #: bp-themes/bp-default/_inc/ajax.php:632
5570
  msgid "Request Pending"
5571
  msgstr ""
5572
 
5573
- #: bp-templates/bp-legacy/buddypress-functions.php:936
5574
- #: bp-themes/bp-default/_inc/ajax.php:652
5575
  msgid "There was a problem accepting that request. Please try again."
5576
  msgstr ""
5577
 
5578
- #: bp-templates/bp-legacy/buddypress-functions.php:955
5579
- #: bp-themes/bp-default/_inc/ajax.php:671
5580
  msgid "There was a problem rejecting that request. Please try again."
5581
  msgstr ""
5582
 
5583
- #: bp-templates/bp-legacy/buddypress-functions.php:985
5584
- #: bp-themes/bp-default/_inc/ajax.php:701
5585
  msgid "Error joining group"
5586
  msgstr ""
5587
 
5588
- #: bp-templates/bp-legacy/buddypress-functions.php:994
5589
- #: bp-themes/bp-default/_inc/ajax.php:710
5590
  msgid "Error requesting membership"
5591
  msgstr ""
5592
 
5593
- #: bp-templates/bp-legacy/buddypress-functions.php:996
5594
- #: bp-themes/bp-default/_inc/ajax.php:712
5595
  msgid "Membership Requested"
5596
  msgstr ""
5597
 
5598
- #: bp-templates/bp-legacy/buddypress-functions.php:1004
5599
- #: bp-themes/bp-default/_inc/ajax.php:720
5600
  msgid "Error leaving group"
5601
  msgstr ""
5602
 
5603
- #: bp-templates/bp-legacy/buddypress-functions.php:1027
5604
- #: bp-themes/bp-default/_inc/ajax.php:743
5605
  msgid "There was a problem closing the notice."
5606
  msgstr ""
5607
 
5608
- #: bp-templates/bp-legacy/buddypress-functions.php:1090
5609
- #: bp-themes/bp-default/_inc/ajax.php:794
5610
  msgid "There was a problem sending that reply. Please try again."
5611
  msgstr ""
5612
 
5613
- #: bp-templates/bp-legacy/buddypress-functions.php:1108
5614
- #: bp-themes/bp-default/_inc/ajax.php:812
5615
  msgid "There was a problem marking messages as unread."
5616
  msgstr ""
5617
 
5618
- #: bp-templates/bp-legacy/buddypress-functions.php:1133
5619
- #: bp-themes/bp-default/_inc/ajax.php:837
5620
  msgid "There was a problem marking messages as read."
5621
  msgstr ""
5622
 
5623
- #: bp-templates/bp-legacy/buddypress-functions.php:1158
5624
- #: bp-themes/bp-default/_inc/ajax.php:862
5625
  msgid "There was a problem deleting messages."
5626
  msgstr ""
5627
 
@@ -5766,78 +5788,78 @@ msgstr ""
5766
  msgid "Primary Navigation"
5767
  msgstr ""
5768
 
5769
- #: bp-themes/bp-default/functions.php:389
5770
  msgid "The sidebar widget area"
5771
  msgstr ""
5772
 
5773
- #: bp-themes/bp-default/functions.php:398
5774
  msgid "First Footer Widget Area"
5775
  msgstr ""
5776
 
5777
- #: bp-themes/bp-default/functions.php:400
5778
  msgid "The first footer widget area"
5779
  msgstr ""
5780
 
5781
- #: bp-themes/bp-default/functions.php:409
5782
  msgid "Second Footer Widget Area"
5783
  msgstr ""
5784
 
5785
- #: bp-themes/bp-default/functions.php:411
5786
  msgid "The second footer widget area"
5787
  msgstr ""
5788
 
5789
- #: bp-themes/bp-default/functions.php:420
5790
  msgid "Third Footer Widget Area"
5791
  msgstr ""
5792
 
5793
- #: bp-themes/bp-default/functions.php:422
5794
  msgid "The third footer widget area"
5795
  msgstr ""
5796
 
5797
- #: bp-themes/bp-default/functions.php:431
5798
  msgid "Fourth Footer Widget Area"
5799
  msgstr ""
5800
 
5801
- #: bp-themes/bp-default/functions.php:433
5802
  msgid "The fourth footer widget area"
5803
  msgstr ""
5804
 
5805
  #. translators: 1: comment author url, 2: comment author name, 3: comment
5806
  #. permalink, 4: comment date/timestamp
5807
 
5808
- #: bp-themes/bp-default/functions.php:488
5809
  msgid "<a href=\"%1$s\" rel=\"nofollow\">%2$s</a> said on <a href=\"%3$s\"><span class=\"time-since\">%4$s</span></a>"
5810
  msgstr ""
5811
 
5812
- #: bp-themes/bp-default/functions.php:495
5813
  msgid "Your comment is awaiting moderation."
5814
  msgstr ""
5815
 
5816
- #: bp-themes/bp-default/functions.php:507
5817
  msgid "Edit comment"
5818
  msgstr ""
5819
 
5820
- #: bp-themes/bp-default/functions.php:577
5821
  msgid "Theme activated! This theme contains <a href=\"%s\">custom header image</a> support and <a href=\"%s\">sidebar widgets</a>."
5822
  msgstr ""
5823
 
5824
- #: bp-themes/bp-default/functions.php:643
5825
  msgid "Email"
5826
  msgstr ""
5827
 
5828
- #: bp-themes/bp-default/functions.php:653
5829
  msgid "You must be <a href=\"%1$s\">logged in</a> to post a comment."
5830
  msgstr ""
5831
 
5832
- #: bp-themes/bp-default/functions.php:654
5833
  msgid "Leave a reply"
5834
  msgstr ""
5835
 
5836
- #: bp-themes/bp-default/functions.php:741
5837
  msgid "&larr; Previous Entries"
5838
  msgstr ""
5839
 
5840
- #: bp-themes/bp-default/functions.php:742
5841
  msgid "Next Entries &rarr;"
5842
  msgstr ""
5843
 
@@ -6042,133 +6064,133 @@ msgstr ""
6042
  msgid "Group Description"
6043
  msgstr ""
6044
 
6045
- #: bp-xprofile/bp-xprofile-classes.php:753
6046
  msgid "Please enter options for this Field:"
6047
  msgstr ""
6048
 
6049
- #: bp-xprofile/bp-xprofile-classes.php:755
6050
  msgid "Sort Order:"
6051
  msgstr ""
6052
 
6053
- #: bp-xprofile/bp-xprofile-classes.php:757
6054
  msgid "Custom"
6055
  msgstr ""
6056
 
6057
- #: bp-xprofile/bp-xprofile-classes.php:758
6058
  msgid "Ascending"
6059
  msgstr ""
6060
 
6061
- #: bp-xprofile/bp-xprofile-classes.php:759
6062
  msgid "Descending"
6063
  msgstr ""
6064
 
6065
- #: bp-xprofile/bp-xprofile-classes.php:787
6066
- #: bp-xprofile/bp-xprofile-classes.php:804
6067
  msgid "Default Value"
6068
  msgstr ""
6069
 
6070
- #: bp-xprofile/bp-xprofile-classes.php:811
6071
  msgid "Add Another Option"
6072
  msgstr ""
6073
 
6074
- #: bp-xprofile/bp-xprofile-classes.php:819
6075
  msgid "Add Field"
6076
  msgstr ""
6077
 
6078
- #: bp-xprofile/bp-xprofile-classes.php:831
6079
  msgid "Edit Field"
6080
  msgstr ""
6081
 
6082
- #: bp-xprofile/bp-xprofile-classes.php:838
6083
  msgid "Fields marked * are required"
6084
  msgstr ""
6085
 
6086
- #: bp-xprofile/bp-xprofile-classes.php:851
6087
  msgid "Field Title"
6088
  msgstr ""
6089
 
6090
- #: bp-xprofile/bp-xprofile-classes.php:858
6091
  msgid "Field Description"
6092
  msgstr ""
6093
 
6094
- #: bp-xprofile/bp-xprofile-classes.php:867
6095
  msgid "Is This Field Required?"
6096
  msgstr ""
6097
 
6098
- #: bp-xprofile/bp-xprofile-classes.php:869
6099
  msgid "Not Required"
6100
  msgstr ""
6101
 
6102
- #: bp-xprofile/bp-xprofile-classes.php:870
6103
  msgid "Required"
6104
  msgstr ""
6105
 
6106
- #: bp-xprofile/bp-xprofile-classes.php:875
6107
  msgid "Field Type"
6108
  msgstr ""
6109
 
6110
- #: bp-xprofile/bp-xprofile-classes.php:877
6111
  msgid "Text Box"
6112
  msgstr ""
6113
 
6114
- #: bp-xprofile/bp-xprofile-classes.php:878
6115
  msgid "Multi-line Text Box"
6116
  msgstr ""
6117
 
6118
- #: bp-xprofile/bp-xprofile-classes.php:879
6119
  msgid "Date Selector"
6120
  msgstr ""
6121
 
6122
- #: bp-xprofile/bp-xprofile-classes.php:880
6123
  msgid "Radio Buttons"
6124
  msgstr ""
6125
 
6126
- #: bp-xprofile/bp-xprofile-classes.php:881
6127
  msgid "Drop Down Select Box"
6128
  msgstr ""
6129
 
6130
- #: bp-xprofile/bp-xprofile-classes.php:882
6131
  msgid "Multi Select Box"
6132
  msgstr ""
6133
 
6134
- #: bp-xprofile/bp-xprofile-classes.php:883
6135
  msgid "Checkboxes"
6136
  msgstr ""
6137
 
6138
- #: bp-xprofile/bp-xprofile-classes.php:903
6139
  msgid "Default Visibility"
6140
  msgstr ""
6141
 
6142
- #: bp-xprofile/bp-xprofile-classes.php:916
6143
  msgid "Per-Member Visibility"
6144
  msgstr ""
6145
 
6146
- #: bp-xprofile/bp-xprofile-classes.php:918
6147
  msgid "Let members change this field's visibility"
6148
  msgstr ""
6149
 
6150
- #: bp-xprofile/bp-xprofile-classes.php:919
6151
  msgid "Enforce the default visibility for all members"
6152
  msgstr ""
6153
 
6154
- #: bp-xprofile/bp-xprofile-classes.php:929
6155
  msgid "or"
6156
  msgstr ""
6157
 
6158
- #: bp-xprofile/bp-xprofile-classes.php:947
6159
  msgid "Please make sure you fill out all required fields."
6160
  msgstr ""
6161
 
6162
- #: bp-xprofile/bp-xprofile-classes.php:950
6163
  msgid "Radio button field types require at least one option. Please add options below."
6164
  msgstr ""
6165
 
6166
- #: bp-xprofile/bp-xprofile-classes.php:953
6167
- #: bp-xprofile/bp-xprofile-classes.php:956
6168
  msgid "Select box field types require at least one option. Please add options below."
6169
  msgstr ""
6170
 
6171
- #: bp-xprofile/bp-xprofile-classes.php:959
6172
  msgid "Checkbox field types require at least one option. Please add options below."
6173
  msgstr ""
6174
 
@@ -6204,62 +6226,62 @@ msgstr ""
6204
  msgid "Your new avatar was uploaded successfully."
6205
  msgstr ""
6206
 
6207
- #: bp-xprofile/bp-xprofile-template.php:664
6208
  msgid "January"
6209
  msgstr ""
6210
 
6211
- #: bp-xprofile/bp-xprofile-template.php:665
6212
  msgid "February"
6213
  msgstr ""
6214
 
6215
- #: bp-xprofile/bp-xprofile-template.php:666
6216
  msgid "March"
6217
  msgstr ""
6218
 
6219
- #: bp-xprofile/bp-xprofile-template.php:667
6220
  msgid "April"
6221
  msgstr ""
6222
 
6223
- #: bp-xprofile/bp-xprofile-template.php:668
6224
  msgid "May"
6225
  msgstr ""
6226
 
6227
- #: bp-xprofile/bp-xprofile-template.php:669
6228
  msgid "June"
6229
  msgstr ""
6230
 
6231
- #: bp-xprofile/bp-xprofile-template.php:670
6232
  msgid "July"
6233
  msgstr ""
6234
 
6235
- #: bp-xprofile/bp-xprofile-template.php:671
6236
  msgid "August"
6237
  msgstr ""
6238
 
6239
- #: bp-xprofile/bp-xprofile-template.php:672
6240
  msgid "September"
6241
  msgstr ""
6242
 
6243
- #: bp-xprofile/bp-xprofile-template.php:673
6244
  msgid "October"
6245
  msgstr ""
6246
 
6247
- #: bp-xprofile/bp-xprofile-template.php:674
6248
  msgid "November"
6249
  msgstr ""
6250
 
6251
- #: bp-xprofile/bp-xprofile-template.php:675
6252
  msgid "December"
6253
  msgstr ""
6254
 
6255
- #: bp-xprofile/bp-xprofile-template.php:843
6256
  msgid "Avatar uploads are currently disabled. Why not use a <a href=\"http://gravatar.com\" target=\"_blank\">gravatar</a> instead?"
6257
  msgstr ""
6258
 
6259
- #: bp-xprofile/bp-xprofile-template.php:851
6260
  msgid "Profile not recently updated"
6261
  msgstr ""
6262
 
6263
- #: bp-xprofile/bp-xprofile-template.php:861
6264
  msgid "Profile updated %s"
6265
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: BuddyPress \n"
6
  "Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
7
+ "POT-Creation-Date: 2013-06-13 01:35:16+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: bp-activity/bp-activity-actions.php:157
16
  msgid "Activity deleted successfully"
17
  msgstr ""
18
 
19
+ #: bp-activity/bp-activity-actions.php:159
20
  msgid "There was an error when deleting that activity"
21
  msgstr ""
22
 
23
+ #: bp-activity/bp-activity-actions.php:213
24
  msgid "The activity item has been marked as spam and is no longer visible."
25
  msgstr ""
26
 
27
+ #: bp-activity/bp-activity-actions.php:262
28
+ #: bp-templates/bp-legacy/buddypress-functions.php:621
29
+ #: bp-themes/bp-default/_inc/ajax.php:276
30
  msgid "Please enter some content to post."
31
  msgstr ""
32
 
33
+ #: bp-activity/bp-activity-actions.php:283
34
  msgid "Update Posted!"
35
  msgstr ""
36
 
37
+ #: bp-activity/bp-activity-actions.php:285
38
  msgid "There was an error when posting your update, please try again."
39
  msgstr ""
40
 
41
+ #: bp-activity/bp-activity-actions.php:322
42
+ #: bp-templates/bp-legacy/buddypress-functions.php:669
43
+ #: bp-themes/bp-default/_inc/ajax.php:324
44
  msgid "Please do not leave the comment area blank."
45
  msgstr ""
46
 
47
+ #: bp-activity/bp-activity-actions.php:333
48
  msgid "Reply Posted!"
49
  msgstr ""
50
 
51
+ #: bp-activity/bp-activity-actions.php:335
52
+ #: bp-templates/bp-legacy/buddypress-functions.php:672
53
+ #: bp-templates/bp-legacy/buddypress-functions.php:681
54
+ #: bp-themes/bp-default/_inc/ajax.php:327
55
+ #: bp-themes/bp-default/_inc/ajax.php:336
56
  msgid "There was an error posting that reply, please try again."
57
  msgstr ""
58
 
59
+ #: bp-activity/bp-activity-actions.php:367
60
  msgid "Activity marked as favorite."
61
  msgstr ""
62
 
63
+ #: bp-activity/bp-activity-actions.php:369
64
  msgid "There was an error marking that activity as a favorite, please try again."
65
  msgstr ""
66
 
67
+ #: bp-activity/bp-activity-actions.php:401
68
  msgid "Activity removed as favorite."
69
  msgstr ""
70
 
71
+ #: bp-activity/bp-activity-actions.php:403
72
  msgid "There was an error removing that activity as a favorite, please try again."
73
  msgstr ""
74
 
75
+ #. translators: Sitewide activity RSS title - "[Site Name] | Site Wide
76
+ #. Activity"
77
+
78
+ #: bp-activity/bp-activity-actions.php:434
79
+ msgid "%s | Site Wide Activity"
80
+ msgstr ""
81
+
82
+ #: bp-activity/bp-activity-actions.php:437
83
+ msgid "Activity feed for the entire site."
84
+ msgstr ""
85
+
86
+ #. translators: Personal activity RSS title - "[Site Name] | [User Display
87
  #. Name] | Activity"
88
+ #. translators: Group activity RSS title - "[Site Name] | [Group Name] |
89
+ #. Activity"
90
+
91
+ #: bp-activity/bp-activity-actions.php:465 bp-groups/bp-groups-actions.php:331
92
+ msgid "%1$s | %2$s | Activity"
93
+ msgstr ""
94
+
95
+ #: bp-activity/bp-activity-actions.php:468
96
+ msgid "Activity feed for %s."
97
+ msgstr ""
98
+
99
+ #. translators: Friends activity RSS title - "[Site Name] | [User Display Name]
100
+ #. | Friends Activity"
101
+
102
+ #: bp-activity/bp-activity-actions.php:499
103
+ msgid "%1$s | %2$s | Friends Activity"
104
+ msgstr ""
105
+
106
+ #: bp-activity/bp-activity-actions.php:502
107
+ msgid "Activity feed for %s' friends."
108
+ msgstr ""
109
+
110
+ #. translators: Member groups activity RSS title - "[Site Name] | [User Display
111
+ #. Name] | Groups Activity"
112
+
113
+ #: bp-activity/bp-activity-actions.php:537
114
+ msgid "%1$s | %2$s | Group Activity"
115
+ msgstr ""
116
+
117
+ #: bp-activity/bp-activity-actions.php:540
118
+ msgid "Public group activity feed of which %s is a member of."
119
+ msgstr ""
120
+
121
+ #. translators: User activity favorites RSS title - "[Site Name] | [User
122
+ #. Display Name] | Favorites"
123
+
124
+ #: bp-activity/bp-activity-actions.php:608
125
+ msgid "%1$s | %2$s | Favorites"
126
+ msgstr ""
127
+
128
+ #: bp-activity/bp-activity-actions.php:611
129
+ msgid "Activity feed of %s' favorites."
130
+ msgstr ""
131
 
132
  #: bp-activity/bp-activity-admin.php:35 bp-activity/bp-activity-admin.php:36
133
  #: bp-activity/bp-activity-admin.php:852 bp-activity/bp-activity-admin.php:1167
134
  #: bp-activity/bp-activity-loader.php:118
135
+ #: bp-activity/bp-activity-loader.php:246
136
+ #: bp-activity/bp-activity-screens.php:284
137
+ #: bp-activity/bp-activity-screens.php:451 bp-core/bp-core-admin.php:409
 
 
138
  msgid "Activity"
139
  msgstr ""
140
 
147
  msgstr ""
148
 
149
  #: bp-activity/bp-activity-admin.php:197 bp-activity/bp-activity-admin.php:244
150
+ #: bp-core/admin/bp-core-functions.php:414
151
+ #: bp-core/admin/bp-core-functions.php:432
152
+ #: bp-core/admin/bp-core-functions.php:451
153
+ #: bp-core/admin/bp-core-functions.php:470 bp-groups/bp-groups-admin.php:107
154
  #: bp-groups/bp-groups-admin.php:143
155
  msgid "Overview"
156
  msgstr ""
188
  msgstr ""
189
 
190
  #: bp-activity/bp-activity-admin.php:216 bp-activity/bp-activity-admin.php:261
191
+ #: bp-core/admin/bp-core-functions.php:420
192
+ #: bp-core/admin/bp-core-functions.php:438
193
+ #: bp-core/admin/bp-core-functions.php:457
194
+ #: bp-core/admin/bp-core-functions.php:476 bp-groups/bp-groups-admin.php:115
195
  #: bp-groups/bp-groups-admin.php:159
196
  msgid "For more information:"
197
  msgstr ""
201
  msgstr ""
202
 
203
  #: bp-activity/bp-activity-admin.php:218 bp-activity/bp-activity-admin.php:262
204
+ #: bp-core/admin/bp-core-functions.php:422
205
+ #: bp-core/admin/bp-core-functions.php:440
206
+ #: bp-core/admin/bp-core-functions.php:459
207
+ #: bp-core/admin/bp-core-functions.php:478 bp-groups/bp-groups-admin.php:160
208
  msgid "<a href=\"http://buddypress.org/support/\">Support Forums</a>"
209
  msgstr ""
210
 
299
  msgstr ""
300
 
301
  #: bp-activity/bp-activity-admin.php:665 bp-activity/bp-activity-admin.php:1281
302
+ #: bp-forums/bp-forums-template.php:1270 bp-groups/bp-groups-admin.php:1338
303
+ #: bp-themes/bp-default/functions.php:508 bp-xprofile/bp-xprofile-admin.php:456
304
  #: bp-xprofile/bp-xprofile-loader.php:185
305
  #: bp-xprofile/bp-xprofile-loader.php:245
306
  msgid "Edit"
374
  msgid "Activity related to ID #%s"
375
  msgstr ""
376
 
377
+ #: bp-activity/bp-activity-admin.php:856 bp-groups/bp-groups-admin.php:630
378
  msgid "Search results for &#8220;%s&#8221;"
379
  msgstr ""
380
 
386
  msgid "Reply to Activity"
387
  msgstr ""
388
 
389
+ #: bp-activity/bp-activity-admin.php:884 bp-groups/bp-groups-admin.php:586
390
  #: bp-templates/bp-legacy/buddypress/activity/entry.php:102
391
  #: bp-templates/bp-legacy/buddypress/forums/index.php:116
392
  #: bp-themes/bp-default/forums/index.php:134
393
  #: bp-xprofile/bp-xprofile-classes.php:406
394
+ #: bp-xprofile/bp-xprofile-classes.php:928
395
  msgid "Cancel"
396
  msgstr ""
397
 
407
  msgid "No activities found."
408
  msgstr ""
409
 
410
+ #: bp-activity/bp-activity-admin.php:1133 bp-groups/bp-groups-admin.php:1219
411
  #: bp-messages/bp-messages-template.php:434
412
  msgid "All"
413
  msgstr ""
426
  msgstr ""
427
 
428
  #: bp-activity/bp-activity-admin.php:1151
429
+ #: bp-activity/bp-activity-admin.php:1291 bp-groups/bp-groups-admin.php:585
430
  msgid "Delete Permanently"
431
  msgstr ""
432
 
446
  msgid "Filter"
447
  msgstr ""
448
 
449
+ #: bp-activity/bp-activity-admin.php:1227
450
+ msgid "Select activity item %1$d"
451
+ msgstr ""
452
+
453
  #: bp-activity/bp-activity-admin.php:1291 bp-core/bp-core-cssjs.php:20
454
  msgid "Are you sure?"
455
  msgstr ""
520
  msgstr ""
521
 
522
  #: bp-activity/bp-activity-classes.php:120
523
+ #: bp-activity/bp-activity-template.php:120 bp-groups/bp-groups-classes.php:318
524
  #: bp-groups/bp-groups-template.php:114
525
  msgid "Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details."
526
  msgstr ""
527
 
528
+ #: bp-activity/bp-activity-classes.php:844
529
+ msgid "RSS feed 'id' must be defined"
530
+ msgstr ""
531
+
532
+ #: bp-activity/bp-activity-classes.php:941
533
+ msgid "In reply to"
534
+ msgstr ""
535
+
536
+ #: bp-activity/bp-activity-filters.php:363
537
  msgid "[Read more]"
538
  msgstr ""
539
 
540
+ #: bp-activity/bp-activity-filters.php:368
541
  msgid "&hellip;"
542
  msgstr ""
543
 
544
+ #: bp-activity/bp-activity-functions.php:223
545
  msgid "@%s Mentions"
546
  msgstr ""
547
 
548
+ #: bp-activity/bp-activity-functions.php:226
549
  msgid "You have %1$d new mentions"
550
  msgstr ""
551
 
552
+ #: bp-activity/bp-activity-functions.php:230
553
  msgid "%1$s mentioned you"
554
  msgstr ""
555
 
556
+ #: bp-activity/bp-activity-functions.php:867
557
  msgid "Posted a status update"
558
  msgstr ""
559
 
560
+ #: bp-activity/bp-activity-functions.php:868
561
  msgid "Replied to a status update"
562
  msgstr ""
563
 
564
+ #: bp-activity/bp-activity-functions.php:1119
565
  msgid "%s posted an update"
566
  msgstr ""
567
 
568
+ #: bp-activity/bp-activity-functions.php:1188
569
+ #: tests/testcases/activity/class.BP_Activity_Activity.php:167
570
  msgid "%s posted a new activity comment"
571
  msgstr ""
572
 
573
+ #: bp-activity/bp-activity-functions.php:1563
574
  msgid "Thumbnail"
575
  msgstr ""
576
 
584
  msgstr ""
585
 
586
  #: bp-activity/bp-activity-loader.php:144
587
+ #: bp-activity/bp-activity-loader.php:264
588
  msgid "Personal"
589
  msgstr ""
590
 
591
+ #: bp-activity/bp-activity-loader.php:155
592
+ #: bp-activity/bp-activity-loader.php:238
593
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:59
594
+ #: bp-themes/bp-default/activity/index.php:79
 
 
 
 
595
  msgid "Mentions"
596
  msgstr ""
597
 
598
+ #: bp-activity/bp-activity-loader.php:167
599
+ #: bp-activity/bp-activity-loader.php:272
600
  msgid "Favorites"
601
  msgstr ""
602
 
603
+ #: bp-activity/bp-activity-loader.php:179
604
+ #: bp-activity/bp-activity-loader.php:281 bp-friends/bp-friends-loader.php:164
605
  #: bp-friends/bp-friends-screens.php:83
606
  msgid "Friends"
607
  msgstr ""
608
 
609
+ #: bp-activity/bp-activity-loader.php:192
610
+ #: bp-activity/bp-activity-loader.php:291 bp-core/bp-core-template.php:246
611
  #: bp-groups/bp-groups-activity.php:150 bp-groups/bp-groups-activity.php:186
612
  #: bp-groups/bp-groups-activity.php:222 bp-groups/bp-groups-activity.php:258
613
  #: bp-groups/bp-groups-admin.php:35 bp-groups/bp-groups-admin.php:36
614
+ #: bp-groups/bp-groups-admin.php:623 bp-groups/bp-groups-loader.php:517
615
+ #: bp-groups/bp-groups-screens.php:895 bp-groups/bp-groups-screens.php:1027
616
+ #: bp-groups/bp-groups-screens.php:1029 bp-groups/bp-groups-screens.php:1088
617
+ #: bp-groups/bp-groups-screens.php:1090 bp-groups/bp-groups-widgets.php:48
618
+ #: bp-groups/bp-groups-widgets.php:119
619
  msgid "Groups"
620
  msgstr ""
621
 
622
+ #: bp-activity/bp-activity-loader.php:236
623
  msgid "Mentions <span class=\"count\">%s</span>"
624
  msgstr ""
625
 
626
+ #: bp-activity/bp-activity-loader.php:316
627
  msgid "My Activity"
628
  msgstr ""
629
 
630
+ #: bp-activity/bp-activity-loader.php:321
631
+ #: bp-activity/bp-activity-template.php:985
632
+ #: bp-activity/bp-activity-template.php:1121
633
+ #: bp-activity/bp-activity-template.php:1132 bp-blogs/bp-blogs-loader.php:218
634
+ #: bp-forums/bp-forums-loader.php:218 bp-forums/bp-forums-template.php:487
635
  #: bp-forums/bp-forums-template.php:604 bp-forums/bp-forums-template.php:1200
636
+ #: bp-friends/bp-friends-loader.php:212 bp-groups/bp-groups-loader.php:582
637
+ #: bp-groups/bp-groups-template.php:770 bp-groups/bp-groups-template.php:793
638
+ #: bp-groups/bp-groups-template.php:1222 bp-groups/bp-groups-template.php:1238
639
+ #: bp-groups/bp-groups-template.php:1287 bp-groups/bp-groups-template.php:1303
640
+ #: bp-groups/bp-groups-template.php:2012 bp-groups/bp-groups-template.php:2021
641
+ #: bp-groups/bp-groups-template.php:2030 bp-groups/bp-groups-template.php:2778
642
  #: bp-members/bp-members-buddybar.php:90 bp-members/bp-members-loader.php:198
643
+ #: bp-members/bp-members-template.php:520
644
+ #: bp-members/bp-members-template.php:820
645
+ #: bp-members/bp-members-template.php:839
646
  #: bp-messages/bp-messages-loader.php:264
647
  #: bp-messages/bp-messages-template.php:326
648
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:185
727
  msgid "You do not have access to this activity."
728
  msgstr ""
729
 
730
+ #: bp-activity/bp-activity-screens.php:285 bp-blogs/bp-blogs-template.php:683
731
+ #: bp-friends/bp-friends-screens.php:84 bp-groups/bp-groups-screens.php:896
732
  #: bp-messages/bp-messages-screens.php:169
 
733
  #: bp-templates/bp-legacy/buddypress/members/register.php:223
 
734
  #: bp-themes/bp-default/registration/register.php:228
735
  msgid "Yes"
736
  msgstr ""
737
 
738
+ #: bp-activity/bp-activity-screens.php:286 bp-blogs/bp-blogs-template.php:687
739
+ #: bp-friends/bp-friends-screens.php:85 bp-groups/bp-groups-screens.php:897
740
  #: bp-messages/bp-messages-screens.php:170
 
741
  #: bp-templates/bp-legacy/buddypress/members/register.php:224
 
742
  #: bp-themes/bp-default/registration/register.php:229
743
  msgid "No"
744
  msgstr ""
745
 
746
+ #: bp-activity/bp-activity-screens.php:294
747
  msgid "A member mentions you in an update using \"@%s\""
748
  msgstr ""
749
 
750
+ #: bp-activity/bp-activity-screens.php:302
751
  msgid "A member replies to an update or comment you've posted"
752
  msgstr ""
753
 
754
+ #: bp-activity/bp-activity-screens.php:398
755
  msgid "Sitewide Activity"
756
  msgstr ""
757
 
758
+ #: bp-activity/bp-activity-template.php:221
759
  msgctxt "Activity pagination previous text"
760
  msgid "&larr;"
761
  msgstr ""
762
 
763
+ #: bp-activity/bp-activity-template.php:222
764
  msgctxt "Activity pagination next text"
765
  msgid "&rarr;"
766
  msgstr ""
767
 
768
+ #: bp-activity/bp-activity-template.php:536
769
  msgid "Viewing item %1$s to %2$s (of %3$s items)"
770
  msgstr ""
771
 
772
+ #: bp-activity/bp-activity-template.php:985
773
  msgid "Profile picture"
774
  msgstr ""
775
 
776
+ #: bp-activity/bp-activity-template.php:1097
777
  msgid "Group logo"
778
  msgstr ""
779
 
780
+ #: bp-activity/bp-activity-template.php:1100 bp-groups/bp-groups-admin.php:1352
781
+ #: bp-groups/bp-groups-template.php:516
782
  msgid "Group logo of %s"
783
  msgstr ""
784
 
785
+ #: bp-activity/bp-activity-template.php:1111
786
  msgid "Profile picture of the author of the site %s"
787
  msgstr ""
788
 
789
+ #: bp-activity/bp-activity-template.php:1336
790
  msgid "View Discussion"
791
  msgstr ""
792
 
793
+ #: bp-activity/bp-activity-template.php:2205
794
+ #: bp-forums/bp-forums-template.php:1271 bp-groups/bp-groups-admin.php:1237
795
+ #: bp-groups/bp-groups-admin.php:1341 bp-groups/bp-groups-template.php:1486
796
  #: bp-templates/bp-legacy/buddypress/activity/comment.php:43
797
  #: bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php:51
798
  #: bp-templates/bp-legacy/buddypress/members/single/messages/single.php:24
803
  msgid "Delete"
804
  msgstr ""
805
 
806
+ #: bp-activity/bp-activity-template.php:2252
807
  #: bp-core/admin/bp-core-slugs.php:109 bp-core/admin/bp-core-slugs.php:172
808
+ #: bp-core/bp-core-loader.php:226 bp-members/bp-members-loader.php:172
809
+ #: bp-members/bp-members-template.php:625
810
+ #: bp-templates/bp-legacy/buddypress-functions.php:237
811
  #: bp-themes/bp-default/activity/entry.php:37
812
+ #: bp-themes/bp-default/functions.php:166
813
  #: bp-xprofile/bp-xprofile-loader.php:175
814
  #: bp-xprofile/bp-xprofile-loader.php:237
815
  msgid "View"
816
  msgstr ""
817
 
818
+ #: bp-activity/bp-activity-template.php:2346
819
  msgid "Clear Filter"
820
  msgstr ""
821
 
822
+ #: bp-activity/bp-activity-template.php:2537
823
  msgid "a user"
824
  msgstr ""
825
 
826
+ #: bp-activity/bp-activity-template.php:2577
827
  msgid "Send a public message on your activity stream."
828
  msgstr ""
829
 
830
+ #: bp-activity/bp-activity-template.php:2578
831
  msgid "Public Message"
832
  msgstr ""
833
 
834
+ #: bp-activity/bp-activity-template.php:3000
835
  msgid "Site Wide Activity RSS Feed"
836
  msgstr ""
837
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
838
  #: bp-blogs/bp-blogs-activity.php:31
839
  msgid "New site created"
840
  msgstr ""
848
  msgstr ""
849
 
850
  #: bp-blogs/bp-blogs-buddybar.php:43 bp-blogs/bp-blogs-loader.php:131
851
+ #: bp-blogs/bp-blogs-loader.php:179 bp-blogs/bp-blogs-loader.php:209
852
  msgid "My Sites"
853
  msgstr ""
854
 
855
+ #: bp-blogs/bp-blogs-buddybar.php:55 bp-core/bp-core-buddybar.php:545
856
  msgid "Dashboard"
857
  msgstr ""
858
 
859
+ #: bp-blogs/bp-blogs-buddybar.php:56 bp-core/bp-core-buddybar.php:549
860
  msgid "New Post"
861
  msgstr ""
862
 
863
+ #: bp-blogs/bp-blogs-buddybar.php:57 bp-core/bp-core-buddybar.php:550
864
  msgid "Manage Posts"
865
  msgstr ""
866
 
867
+ #: bp-blogs/bp-blogs-buddybar.php:58 bp-core/bp-core-buddybar.php:551
868
  msgid "Manage Comments"
869
  msgstr ""
870
 
884
  msgid "%1$s wrote a new post, %2$s"
885
  msgstr ""
886
 
887
+ #: bp-blogs/bp-blogs-functions.php:360
888
  msgid "%1$s commented on the post, %2$s, on the site %3$s"
889
  msgstr ""
890
 
891
+ #: bp-blogs/bp-blogs-functions.php:362
892
  msgid "%1$s commented on the post, %2$s"
893
  msgstr ""
894
 
908
  msgid "Sites"
909
  msgstr ""
910
 
911
+ #: bp-blogs/bp-blogs-loader.php:188 bp-blogs/bp-blogs-screens.php:135
912
+ #: bp-blogs/bp-blogs-screens.php:196
913
+ msgid "Create a Blog"
 
914
  msgstr ""
915
 
916
+ #: bp-blogs/bp-blogs-screens.php:135 bp-blogs/bp-blogs-screens.php:137
917
+ #: bp-blogs/bp-blogs-screens.php:196 bp-blogs/bp-blogs-screens.php:198
918
+ #: bp-core/bp-core-template.php:249
919
+ msgid "Blogs"
920
  msgstr ""
921
 
922
  #: bp-blogs/bp-blogs-template.php:136
937
  msgid "Profile picture of site author %s"
938
  msgstr ""
939
 
940
+ #: bp-blogs/bp-blogs-template.php:403 bp-core/bp-core-classes.php:774
941
+ #: bp-groups/bp-groups-widgets.php:80 bp-groups/bp-groups-widgets.php:183
942
+ #: bp-members/bp-members-template.php:596
943
+ #: bp-members/bp-members-template.php:871
944
  #: bp-templates/bp-legacy/buddypress/groups/groups-loop.php:47
945
  #: bp-templates/bp-legacy/buddypress/groups/single/group-header.php:42
946
  #: bp-themes/bp-default/groups/groups-loop.php:47
1033
  msgstr ""
1034
 
1035
  #: bp-blogs/bp-blogs-template.php:803 bp-core/deprecated/1.5.php:417
1036
+ #: bp-forums/bp-forums-template.php:1321 bp-groups/bp-groups-template.php:2503
1037
+ #: bp-members/bp-members-template.php:710
1038
  #: bp-messages/bp-messages-template.php:367 bp-themes/bp-default/header.php:30
1039
  #: bp-themes/bp-default/searchform.php:5
1040
  msgid "Search"
1044
  msgid "Visit Site"
1045
  msgstr ""
1046
 
1047
+ #: bp-blogs/bp-blogs-widgets.php:29
1048
+ msgid "A list of recently published posts from across your network."
1049
+ msgstr ""
1050
+
1051
+ #: bp-blogs/bp-blogs-widgets.php:32
1052
  msgctxt "widget name"
1053
  msgid "(BuddyPress) Recent Networkwide Posts"
1054
  msgstr ""
1055
 
1056
+ #: bp-blogs/bp-blogs-widgets.php:37 bp-blogs/bp-blogs-widgets.php:97
1057
+ msgid "Recent Networkwide Posts"
1058
+ msgstr ""
1059
+
1060
+ #: bp-blogs/bp-blogs-widgets.php:78
1061
  msgid "Sorry, there were no posts found. Why not write one?"
1062
  msgstr ""
1063
 
1064
+ #: bp-blogs/bp-blogs-widgets.php:108
1065
+ msgctxt "Label for the Title field of the Recent Networkwide Posts widget"
1066
+ msgid "Title:"
1067
+ msgstr ""
1068
+
1069
+ #: bp-blogs/bp-blogs-widgets.php:109
1070
+ msgid "Link widget title to Blogs directory"
1071
+ msgstr ""
1072
+
1073
+ #: bp-blogs/bp-blogs-widgets.php:110
1074
  msgid "Max posts to show:"
1075
  msgstr ""
1076
 
1264
 
1265
  #: bp-core/admin/bp-core-functions.php:364
1266
  #: bp-core/admin/bp-core-settings.php:258 bp-core/bp-core-admin.php:331
1267
+ #: bp-groups/bp-groups-loader.php:302 bp-groups/bp-groups-template.php:1468
1268
  #: bp-settings/bp-settings-loader.php:23 bp-settings/bp-settings-loader.php:73
1269
  #: bp-settings/bp-settings-loader.php:165
1270
  msgid "Settings"
1271
  msgstr ""
1272
 
1273
+ #: bp-core/admin/bp-core-functions.php:376 bp-core/bp-core-template.php:252
1274
+ #: bp-forums/bp-forums-loader.php:109 bp-forums/bp-forums-loader.php:172
1275
+ #: bp-forums/bp-forums-loader.php:213 bp-forums/bp-forums-screens.php:188
1276
+ #: bp-forums/bp-forums-screens.php:190 bp-forums/deprecated/1.6.php:42
1277
+ #: bp-forums/deprecated/1.7.php:25 bp-forums/deprecated/1.7.php:100
1278
+ msgid "Forums"
1279
+ msgstr ""
1280
+
1281
+ #: bp-core/admin/bp-core-functions.php:421
1282
  msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-components\">Managing Components</a>"
1283
  msgstr ""
1284
 
1285
+ #: bp-core/admin/bp-core-functions.php:439
1286
  msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-pages\">Managing Pages</a>"
1287
  msgstr ""
1288
 
1289
+ #: bp-core/admin/bp-core-functions.php:458
1290
  msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#settings-buddypress-settings\">Managing Settings</a>"
1291
  msgstr ""
1292
 
1293
+ #: bp-core/admin/bp-core-functions.php:477
1294
  msgid "<a href=\"http://codex.buddypress.org/getting-started/configure-buddypress-components/#users-profile-fields\">Managing Profile Fields</a>"
1295
  msgstr ""
1296
 
1297
+ #: bp-core/admin/bp-core-functions.php:495
1298
  msgid "By default, all BuddyPress components are enabled. You can selectively disable any of the components by using the form. Your BuddyPress installation will continue to function. However, the features of the disabled components will no longer be accessible to anyone using the site."
1299
  msgstr ""
1300
 
1301
+ #: bp-core/admin/bp-core-functions.php:499
1302
  msgid "BuddyPress Components use WordPress Pages for their root directory/archive pages. Here you can change the page associations for each active component."
1303
  msgstr ""
1304
 
1305
+ #: bp-core/admin/bp-core-functions.php:503
1306
  msgid "Extra configuration settings."
1307
  msgstr ""
1308
 
1309
+ #: bp-core/admin/bp-core-functions.php:507
1310
  msgid "Your users will distinguish themselves through their profile page. Create relevant profile fields that will show on each users profile.</br></br>Note: Any fields in the first group will appear on the signup page."
1311
  msgstr ""
1312
 
1389
  msgstr ""
1390
 
1391
  #: bp-core/admin/bp-core-slugs.php:105 bp-core/admin/bp-core-slugs.php:168
1392
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:13
1393
  #: bp-themes/bp-default/members/single/settings/capabilities.php:61
1394
  #: bp-xprofile/bp-xprofile-classes.php:401
1395
+ #: bp-xprofile/bp-xprofile-classes.php:927
1396
  msgid "Save"
1397
  msgstr ""
1398
 
1527
  msgstr ""
1528
 
1529
  #: bp-core/bp-core-admin.php:408 bp-core/bp-core-template.php:243
1530
+ #: bp-core/bp-core-widgets.php:113 bp-groups/bp-groups-admin.php:759
1531
+ #: bp-groups/bp-groups-template.php:1476 bp-members/bp-members-loader.php:24
1532
+ #: bp-members/bp-members-screens.php:354
1533
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:231
1534
  #: bp-themes/bp-default/groups/single/admin.php:231
1535
  msgid "Members"
1552
  msgstr ""
1553
 
1554
  #: bp-core/bp-core-admin.php:425
1555
+ msgid "BuddyPress is now compatible with <strong>any WordPress theme</strong>. If your theme has BuddyPress-specific templates and styling, we&#8217;ll use them. If not, we provide what you need to make your BuddyPress content look great. Still want to customize? No problem - you can override our templates just like you would in a WordPress child theme. <a href=\"http://codex.buddypress.org/developer-and-designer-information/\">Learn more about theme compatibility</a>."
1556
  msgstr ""
1557
 
1558
  #: bp-core/bp-core-admin.php:430
1655
  msgid "Core Contributors to BuddyPress 1.7"
1656
  msgstr ""
1657
 
1658
+ #: bp-core/bp-core-adminbar.php:36 bp-core/bp-core-buddybar.php:495
1659
  msgid "My Account"
1660
  msgstr ""
1661
 
1703
  msgid "Upload failed! Error was: %s"
1704
  msgstr ""
1705
 
1706
+ #: bp-core/bp-core-avatars.php:733 bp-core/bp-core-classes.php:771
1707
+ #: bp-core/bp-core-classes.php:772 bp-core/bp-core-classes.php:773
1708
  #: bp-core/bp-core-template.php:98 bp-core/bp-core-template.php:107
1709
  msgid "Avatar of %s"
1710
  msgstr ""
1711
 
1712
+ #: bp-core/bp-core-buddybar.php:302
1713
  msgid "You do not have access to this page."
1714
  msgstr ""
1715
 
1716
+ #: bp-core/bp-core-buddybar.php:479 bp-themes/bp-default/sidebar.php:53
1717
  msgid "Log In"
1718
  msgstr ""
1719
 
1720
+ #: bp-core/bp-core-buddybar.php:483
1721
  msgid "Sign Up"
1722
  msgstr ""
1723
 
1724
+ #: bp-core/bp-core-buddybar.php:537 bp-core/deprecated/1.5.php:307
1725
+ #: bp-members/bp-members-template.php:774 bp-themes/bp-default/sidebar.php:18
1726
  msgid "Log Out"
1727
  msgstr ""
1728
 
1729
+ #: bp-core/bp-core-buddybar.php:566 bp-groups/bp-groups-admin.php:1335
1730
  msgid "Visit"
1731
  msgstr ""
1732
 
1733
+ #: bp-core/bp-core-buddybar.php:568
1734
  msgid "Random Member"
1735
  msgstr ""
1736
 
1737
+ #: bp-core/bp-core-buddybar.php:572
1738
  msgid "Random Group"
1739
  msgstr ""
1740
 
1741
+ #: bp-core/bp-core-buddybar.php:578
1742
  msgid "Random Site"
1743
  msgstr ""
1744
 
1755
  msgid "You must log in to access the page you requested."
1756
  msgstr ""
1757
 
1758
+ #: bp-core/bp-core-classes.php:788
1759
  msgid "%d group"
1760
  msgid_plural "%d groups"
1761
  msgstr[0] ""
1786
  msgid "Activate %s"
1787
  msgstr ""
1788
 
1789
+ #: bp-core/bp-core-filters.php:285 bp-members/bp-members-functions.php:1396
1790
  msgid ""
1791
  "Thanks for registering! To complete the activation of your account please click the following link:\n"
1792
  "\n"
1794
  "\n"
1795
  msgstr ""
1796
 
1797
+ #: bp-core/bp-core-filters.php:286 bp-members/bp-members-functions.php:1397
1798
  msgid "Activate Your Account"
1799
  msgstr ""
1800
 
1820
  msgid "%s Directory"
1821
  msgstr ""
1822
 
1823
+ #: bp-core/bp-core-filters.php:365 bp-members/bp-members-screens.php:511
1824
  #: bp-themes/bp-default/registration/register.php:23
1825
  msgid "Create an Account"
1826
  msgstr ""
1827
 
1828
+ #: bp-core/bp-core-filters.php:369 bp-members/bp-members-screens.php:519
1829
  #: bp-themes/bp-default/registration/activate.php:13
1830
  msgid "Activate your Account"
1831
  msgstr ""
1832
 
1833
+ #: bp-core/bp-core-filters.php:373 bp-groups/bp-groups-loader.php:554
1834
+ #: bp-groups/bp-groups-screens.php:1027 bp-groups/bp-groups-screens.php:1088
1835
  #: bp-themes/bp-default/groups/create.php:18
1836
  #: bp-themes/bp-default/groups/index.php:21
1837
  msgid "Create a Group"
1838
  msgstr ""
1839
 
1840
+ #: bp-core/bp-core-functions.php:322
1841
  msgctxt "Page title for the Activity directory."
1842
  msgid "Activity"
1843
  msgstr ""
1844
 
1845
+ #: bp-core/bp-core-functions.php:323
1846
  msgctxt "Page title for the Groups directory."
1847
  msgid "Groups"
1848
  msgstr ""
1849
 
1850
+ #: bp-core/bp-core-functions.php:324
1851
  msgctxt "Page title for the Sites directory."
1852
  msgid "Sites"
1853
  msgstr ""
1854
 
1855
+ #: bp-core/bp-core-functions.php:325
1856
  msgctxt "Page title for the user account activation screen."
1857
  msgid "Activate"
1858
  msgstr ""
1859
 
1860
+ #: bp-core/bp-core-functions.php:326
1861
  msgctxt "Page title for the Members directory."
1862
  msgid "Members"
1863
  msgstr ""
1864
 
1865
+ #: bp-core/bp-core-functions.php:327
1866
  msgctxt "Page title for the user registration screen."
1867
  msgid "Register"
1868
  msgstr ""
1869
 
1870
+ #: bp-core/bp-core-functions.php:592
1871
  msgid "sometime"
1872
  msgstr ""
1873
 
1874
+ #: bp-core/bp-core-functions.php:593
1875
  msgid "right now"
1876
  msgstr ""
1877
 
1878
+ #: bp-core/bp-core-functions.php:594
1879
  msgid "%s ago"
1880
  msgstr ""
1881
 
1882
+ #: bp-core/bp-core-functions.php:655
1883
+ msgid "%s year"
1884
+ msgid_plural "%s years"
1885
+ msgstr[0] ""
1886
+ msgstr[1] ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1887
 
1888
+ #: bp-core/bp-core-functions.php:658 bp-core/bp-core-functions.php:692
1889
+ msgid "%s month"
1890
+ msgid_plural "%s months"
1891
+ msgstr[0] ""
1892
+ msgstr[1] ""
1893
 
1894
+ #: bp-core/bp-core-functions.php:661 bp-core/bp-core-functions.php:695
1895
+ msgid "%s week"
1896
+ msgid_plural "%s weeks"
1897
+ msgstr[0] ""
1898
+ msgstr[1] ""
1899
 
1900
+ #: bp-core/bp-core-functions.php:664 bp-core/bp-core-functions.php:698
1901
+ msgid "%s day"
1902
+ msgid_plural "%s days"
1903
+ msgstr[0] ""
1904
+ msgstr[1] ""
1905
 
1906
+ #: bp-core/bp-core-functions.php:667 bp-core/bp-core-functions.php:701
1907
+ msgid "%s hour"
1908
+ msgid_plural "%s hours"
1909
+ msgstr[0] ""
1910
+ msgstr[1] ""
1911
 
1912
+ #: bp-core/bp-core-functions.php:670 bp-core/bp-core-functions.php:704
1913
+ msgid "%s minute"
1914
+ msgid_plural "%s minutes"
1915
+ msgstr[0] ""
1916
+ msgstr[1] ""
1917
 
1918
+ #: bp-core/bp-core-functions.php:673 bp-core/bp-core-functions.php:707
1919
+ msgid "%s second"
1920
+ msgid_plural "%s seconds"
1921
+ msgstr[0] ""
1922
+ msgstr[1] ""
1923
 
1924
+ #: bp-core/bp-core-functions.php:688
1925
  msgctxt "Separator in time since"
1926
  msgid ","
1927
  msgstr ""
1928
 
1929
+ #: bp-core/bp-core-functions.php:865
1930
  msgid "Not recently active"
1931
  msgstr ""
1932
 
1933
+ #: bp-core/bp-core-loader.php:215 bp-members/bp-members-loader.php:158
1934
  #: bp-xprofile/bp-xprofile-loader.php:154
1935
  #: bp-xprofile/bp-xprofile-loader.php:229
1936
  msgid "Profile"
1944
  msgid "%1$s at %2$s"
1945
  msgstr ""
1946
 
 
 
 
 
 
 
 
 
1947
  #: bp-core/bp-core-template.php:254
1948
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:83
1949
  #: bp-templates/bp-legacy/buddypress/forums/forums-loop.php:40
1950
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:27
1951
+ #: bp-themes/bp-default/activity/index.php:103
1952
  #: bp-themes/bp-default/forums/forums-loop.php:40
1953
  #: bp-themes/bp-default/members/single/activity.php:27
1954
  msgid "Posts"
1979
  msgid "(BuddyPress) Members"
1980
  msgstr ""
1981
 
1982
+ #: bp-core/bp-core-widgets.php:49 bp-core/bp-core-widgets.php:135
1983
  #: bp-core/deprecated/1.6.php:129 bp-core/deprecated/1.6.php:152
1984
+ #: bp-groups/bp-groups-widgets.php:60 bp-groups/bp-groups-widgets.php:141
1985
  #: bp-templates/bp-legacy/buddypress/blogs/index.php:39
1986
  #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:22
1987
  #: bp-themes/bp-default/blogs/index.php:56
1989
  msgid "Newest"
1990
  msgstr ""
1991
 
1992
+ #: bp-core/bp-core-widgets.php:50 bp-core/bp-core-widgets.php:136
1993
+ #: bp-groups/bp-groups-widgets.php:61 bp-groups/bp-groups-widgets.php:142
1994
  msgid "Active"
1995
  msgstr ""
1996
 
1997
+ #: bp-core/bp-core-widgets.php:54 bp-core/bp-core-widgets.php:137
1998
+ #: bp-groups/bp-groups-widgets.php:62 bp-groups/bp-groups-widgets.php:143
1999
  msgid "Popular"
2000
  msgstr ""
2001
 
2002
+ #: bp-core/bp-core-widgets.php:91
2003
  msgid "No one has signed up yet!"
2004
  msgstr ""
2005
 
2006
+ #: bp-core/bp-core-widgets.php:126 bp-core/bp-core-widgets.php:208
2007
+ #: bp-core/bp-core-widgets.php:277 bp-groups/bp-groups-widgets.php:132
2008
  #: bp-templates/bp-legacy/buddypress/forums/index.php:86
2009
  #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:47
2010
  #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:75
2014
  msgid "Title:"
2015
  msgstr ""
2016
 
2017
+ #: bp-core/bp-core-widgets.php:128
2018
  msgid "Link widget title to Members directory"
2019
  msgstr ""
2020
 
2021
+ #: bp-core/bp-core-widgets.php:130
2022
  msgid "Max members to show:"
2023
  msgstr ""
2024
 
2025
+ #: bp-core/bp-core-widgets.php:133
2026
  msgid "Default members to show:"
2027
  msgstr ""
2028
 
2029
+ #: bp-core/bp-core-widgets.php:152
2030
  msgid "Avatars of users who are currently online"
2031
  msgstr ""
2032
 
2033
+ #: bp-core/bp-core-widgets.php:155
2034
  msgctxt "widget name"
2035
  msgid "(BuddyPress) Who's Online"
2036
  msgstr ""
2037
 
2038
+ #: bp-core/bp-core-widgets.php:180
2039
  msgid "There are no users currently online"
2040
  msgstr ""
2041
 
2042
+ #: bp-core/bp-core-widgets.php:199
2043
  msgid "Who's Online"
2044
  msgstr ""
2045
 
2046
+ #: bp-core/bp-core-widgets.php:210 bp-core/bp-core-widgets.php:279
2047
  msgid "Max Members to show:"
2048
  msgstr ""
2049
 
2050
+ #: bp-core/bp-core-widgets.php:221
2051
  msgid "Avatars of recently active members"
2052
  msgstr ""
2053
 
2054
+ #: bp-core/bp-core-widgets.php:224
2055
  msgctxt "widget name"
2056
  msgid "(BuddyPress) Recently Active Members"
2057
  msgstr ""
2058
 
2059
+ #: bp-core/bp-core-widgets.php:249
2060
  msgid "There are no recently active members"
2061
  msgstr ""
2062
 
2063
+ #: bp-core/bp-core-widgets.php:331
2064
  msgid "There were no members found, please try another filter."
2065
  msgstr ""
2066
 
2075
 
2076
  #: bp-core/deprecated/1.5.php:149
2077
  #: bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php:15
2078
+ #: bp-themes/bp-default/functions.php:642
2079
  #: bp-themes/bp-default/members/single/profile/profile-wp.php:15
2080
  msgid "Name"
2081
  msgstr ""
2088
 
2089
  #: bp-core/deprecated/1.5.php:167
2090
  #: bp-templates/bp-legacy/buddypress/members/single/profile/profile-wp.php:33
2091
+ #: bp-themes/bp-default/functions.php:646
2092
  #: bp-themes/bp-default/members/single/profile/profile-wp.php:33
2093
  msgid "Website"
2094
  msgstr ""
2116
  msgstr ""
2117
 
2118
  #: bp-core/deprecated/1.6.php:128 bp-core/deprecated/1.6.php:149
2119
+ #: bp-groups/bp-groups-template.php:2518 bp-groups/bp-groups-template.php:2540
2120
  msgid "Recently Active"
2121
  msgstr ""
2122
 
2123
  #: bp-core/deprecated/1.6.php:130 bp-core/deprecated/1.6.php:155
2124
+ #: bp-groups/bp-groups-template.php:2523 bp-groups/bp-groups-template.php:2555
2125
  msgid "Alphabetically"
2126
  msgstr ""
2127
 
2133
  msgid "Search Forums..."
2134
  msgstr ""
2135
 
2136
+ #: bp-forums/bp-forums-loader.php:131 bp-forums/bp-forums-loader.php:180
2137
  msgid "Topics Started"
2138
  msgstr ""
2139
 
2140
+ #: bp-forums/bp-forums-loader.php:142
2141
  msgid "Replied To"
2142
  msgstr ""
2143
 
2144
+ #: bp-forums/bp-forums-loader.php:188
2145
  msgid "Replies"
2146
  msgstr ""
2147
 
2148
+ #: bp-forums/bp-forums-loader.php:196
2149
  msgid "Favorite Topics"
2150
  msgstr ""
2151
 
2173
  msgid "Please pick the group forum where you would like to post this topic."
2174
  msgstr ""
2175
 
2176
+ #: bp-forums/bp-forums-screens.php:188 bp-groups/bp-groups-template.php:1712
2177
+ #: bp-groups/bp-groups-template.php:1713
2178
  #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:19
2179
  #: bp-themes/bp-default/forums/index.php:23
2180
  #: bp-themes/bp-default/groups/single/forum.php:19
2194
  #: bp-forums/bp-forums-template.php:505 bp-forums/bp-forums-template.php:567
2195
  #: bp-forums/bp-forums-template.php:1216
2196
  #: bp-messages/bp-messages-classes.php:269
2197
+ #: bp-messages/bp-messages-template.php:843
2198
+ #: bp-messages/bp-messages-template.php:904
2199
  msgid "Deleted User"
2200
  msgstr ""
2201
 
2203
  msgid "Group logo for %s"
2204
  msgstr ""
2205
 
2206
+ #: bp-forums/bp-forums-template.php:683 bp-groups/bp-groups-template.php:1035
2207
  msgid "%d post"
2208
  msgstr ""
2209
 
2210
+ #: bp-forums/bp-forums-template.php:685 bp-groups/bp-groups-template.php:1037
2211
  msgid "%d posts"
2212
  msgstr ""
2213
 
2257
  msgid "Viewing post %1$s to %2$s (%3$s total posts)"
2258
  msgstr ""
2259
 
2260
+ #: bp-forums/deprecated/1.6.php:31 bp-forums/deprecated/1.6.php:133
2261
+ msgid "Configure bbPress"
2262
+ msgstr ""
2263
+
2264
+ #: bp-forums/deprecated/1.6.php:34 bp-forums/deprecated/1.6.php:136
2265
+ msgid "Install bbPress"
2266
+ msgstr ""
2267
+
2268
+ #: bp-forums/deprecated/1.6.php:47
2269
  msgid "Settings Saved."
2270
  msgstr ""
2271
 
2272
+ #: bp-forums/deprecated/1.6.php:68
2273
+ msgid "(Installed)"
2274
+ msgstr ""
2275
+
2276
+ #: bp-forums/deprecated/1.6.php:68 bp-forums/deprecated/1.6.php:210
2277
  msgid "Forums for Groups"
2278
  msgstr ""
2279
 
2280
+ #: bp-forums/deprecated/1.6.php:70 bp-forums/deprecated/1.6.php:212
 
2281
  msgid "Give each individual group its own discussion forum. Choose this if you'd like to keep your members' conversations separated into distinct areas."
2282
  msgstr ""
2283
 
2284
+ #: bp-forums/deprecated/1.6.php:72 bp-forums/deprecated/1.6.php:214
2285
+ msgid "Note: This component is retired and will not be receiving any updates in the future. Only use this component if your current site relies on it."
 
2286
  msgstr ""
2287
 
2288
+ #: bp-forums/deprecated/1.6.php:74 bp-forums/deprecated/1.6.php:216
 
 
2289
  msgid "Features"
2290
  msgstr ""
2291
 
2292
+ #: bp-forums/deprecated/1.6.php:76 bp-forums/deprecated/1.6.php:218
 
2293
  msgid "Group Integration"
2294
  msgstr ""
2295
 
2296
+ #: bp-forums/deprecated/1.6.php:77 bp-forums/deprecated/1.6.php:219
 
2297
  msgid "Member Profile Integration"
2298
  msgstr ""
2299
 
2300
+ #: bp-forums/deprecated/1.6.php:78 bp-forums/deprecated/1.6.php:220
 
 
2301
  msgid "Activity Stream Integration"
2302
  msgstr ""
2303
 
2304
+ #: bp-forums/deprecated/1.6.php:79 bp-forums/deprecated/1.6.php:221
 
 
2305
  msgid "@ Mention Integration"
2306
  msgstr ""
2307
 
2308
+ #: bp-forums/deprecated/1.6.php:83
2309
+ msgid "Uninstall Group Forums"
2310
  msgstr ""
2311
 
2312
+ #: bp-forums/deprecated/1.6.php:88 bp-forums/deprecated/1.6.php:231
2313
+ msgid "New! bbPress"
2314
  msgstr ""
2315
 
2316
+ #: bp-forums/deprecated/1.6.php:89 bp-forums/deprecated/1.6.php:232
2317
+ msgid "bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress."
2318
  msgstr ""
2319
 
2320
+ #: bp-forums/deprecated/1.6.php:91 bp-forums/deprecated/1.6.php:234
2321
+ msgid "It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:"
2322
  msgstr ""
2323
 
2324
+ #: bp-forums/deprecated/1.6.php:94 bp-forums/deprecated/1.6.php:237
2325
+ msgid "Non-group specific forum creation"
2326
  msgstr ""
2327
 
2328
+ #: bp-forums/deprecated/1.6.php:95 bp-forums/deprecated/1.6.php:238
2329
+ msgid "Moderation via the WP admin dashboard"
2330
  msgstr ""
2331
 
2332
+ #: bp-forums/deprecated/1.6.php:96 bp-forums/deprecated/1.6.php:239
2333
+ msgid "Topic splitting"
 
2334
  msgstr ""
2335
 
2336
+ #: bp-forums/deprecated/1.6.php:97 bp-forums/deprecated/1.6.php:240
2337
+ msgid "Revisions"
2338
  msgstr ""
2339
 
2340
+ #: bp-forums/deprecated/1.6.php:98 bp-forums/deprecated/1.6.php:241
2341
+ msgid "Spam management"
2342
  msgstr ""
2343
 
2344
+ #: bp-forums/deprecated/1.6.php:99 bp-forums/deprecated/1.6.php:242
2345
+ msgid "Subscriptions"
2346
  msgstr ""
2347
 
2348
+ #: bp-forums/deprecated/1.6.php:100 bp-forums/deprecated/1.6.php:243
2349
+ msgid "And more!"
 
 
2350
  msgstr ""
2351
 
2352
+ #: bp-forums/deprecated/1.6.php:103 bp-forums/deprecated/1.6.php:246
2353
+ msgid "If you decide to use bbPress, you will need to deactivate the legacy group forum component. For more info, <a href=\"%s\">read this codex article</a>."
2354
  msgstr ""
2355
 
2356
+ #: bp-forums/deprecated/1.6.php:143
2357
+ msgid "The bb-config.php file was not found at that location, please try again."
2358
  msgstr ""
2359
 
2360
+ #: bp-forums/deprecated/1.6.php:146
2361
+ msgid "Forums were set up correctly using your existing bbPress install!"
2362
  msgstr ""
2363
 
2364
+ #: bp-forums/deprecated/1.6.php:147
2365
+ msgid "BuddyPress will now use its internal copy of bbPress to run the forums on your site. If you wish, you can remove your old bbPress installation files, as long as you keep the bb-config.php file in the same location."
2366
  msgstr ""
2367
 
2368
+ #: bp-forums/deprecated/1.6.php:152
2369
+ msgid "Existing bbPress Installation"
2370
  msgstr ""
2371
 
2372
+ #: bp-forums/deprecated/1.6.php:153
2373
+ msgid "BuddyPress can make use of your existing bbPress install. Just provide the location of your <code>bb-config.php</code> file, and BuddyPress will do the rest."
2374
  msgstr ""
2375
 
2376
+ #: bp-forums/deprecated/1.6.php:155 bp-forums/deprecated/1.6.php:187
2377
+ msgid "Complete Installation"
2378
  msgstr ""
2379
 
2380
+ #: bp-forums/deprecated/1.6.php:171
2381
+ msgid "<p>All done! Configuration settings have been saved to the file <code>bb-config.php</code> in the root of your WordPress install.</p>"
2382
+ msgstr ""
2383
+
2384
+ #: bp-forums/deprecated/1.6.php:175
2385
+ msgid "<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>"
2386
  msgstr ""
2387
 
2388
+ #: bp-forums/deprecated/1.6.php:184
2389
+ msgid "New bbPress Installation"
2390
  msgstr ""
2391
 
2392
+ #: bp-forums/deprecated/1.6.php:185
2393
+ msgid ""
2394
+ "You've decided to set up a new installation of bbPress for forum management in BuddyPress. This is very simple and is usually just a one click\n"
2395
+ "\t\t\t\tprocess. When you're ready, hit the link below."
2396
  msgstr ""
2397
 
2398
+ #: bp-forums/deprecated/1.6.php:197
2399
+ msgid "bbPress files were not found. To install the forums component you must download a copy of bbPress and make sure it is in the folder: \"%s\""
2400
  msgstr ""
2401
 
2402
+ #: bp-forums/deprecated/1.6.php:225
2403
+ msgid "Install Group Forums"
2404
  msgstr ""
2405
 
2406
+ #: bp-forums/deprecated/1.6.php:226
2407
+ msgid "Use Existing Installation"
2408
  msgstr ""
2409
 
2410
  #: bp-friends/bp-friends-actions.php:35
2424
  msgstr ""
2425
 
2426
  #: bp-friends/bp-friends-actions.php:70
2427
+ #: bp-templates/bp-legacy/buddypress-functions.php:956
2428
+ #: bp-themes/bp-default/_inc/ajax.php:618
2429
  msgid "Friendship could not be canceled."
2430
  msgstr ""
2431
 
2470
  msgid "You have a friendship request from %s"
2471
  msgstr ""
2472
 
2473
+ #: bp-friends/bp-friends-functions.php:104
2474
+ #: bp-friends/bp-friends-functions.php:113
2475
  msgid "%1$s and %2$s are now friends"
2476
  msgstr ""
2477
 
2485
 
2486
  #: bp-friends/bp-friends-loader.php:118 bp-friends/bp-friends-loader.php:180
2487
  #: bp-friends/bp-friends-loader.php:207
2488
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:104
2489
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:35
2490
+ #: bp-themes/bp-default/activity/index.php:124
2491
  #: bp-themes/bp-default/members/single/activity.php:35
2492
  msgid "Friendships"
2493
  msgstr ""
2494
 
2495
+ #: bp-friends/bp-friends-loader.php:128 bp-groups/bp-groups-template.php:1480
2496
  msgid "Requests"
2497
  msgstr ""
2498
 
2601
  msgstr ""
2602
 
2603
  #: bp-friends/bp-friends-template.php:285
2604
+ #: bp-templates/bp-legacy/buddypress-functions.php:968
2605
+ #: bp-themes/bp-default/_inc/ajax.php:630
2606
  msgid "Cancel Friendship Request"
2607
  msgstr ""
2608
 
2617
 
2618
  #: bp-friends/bp-friends-template.php:319
2619
  #: bp-friends/bp-friends-template.php:320
2620
+ #: bp-templates/bp-legacy/buddypress-functions.php:958
2621
+ #: bp-templates/bp-legacy/buddypress-functions.php:976
2622
+ #: bp-themes/bp-default/_inc/ajax.php:620
2623
+ #: bp-themes/bp-default/_inc/ajax.php:638
2624
  msgid "Add Friend"
2625
  msgstr ""
2626
 
2636
  msgid "Please fill in all of the required fields"
2637
  msgstr ""
2638
 
2639
+ #: bp-groups/bp-groups-actions.php:79 bp-groups/bp-groups-actions.php:103
2640
  msgid "There was an error saving group details, please try again."
2641
  msgstr ""
2642
 
2643
+ #: bp-groups/bp-groups-actions.php:142
2644
  msgid "%1$s created the group %2$s"
2645
  msgstr ""
2646
 
2647
+ #: bp-groups/bp-groups-actions.php:194
2648
  msgid "There was an error saving the group avatar, please try uploading again."
2649
  msgstr ""
2650
 
2651
+ #: bp-groups/bp-groups-actions.php:196
2652
  msgid "The group avatar was uploaded successfully!"
2653
  msgstr ""
2654
 
2655
+ #: bp-groups/bp-groups-actions.php:220 bp-groups/bp-groups-actions.php:227
2656
  msgid "There was an error joining the group."
2657
  msgstr ""
2658
 
2659
+ #: bp-groups/bp-groups-actions.php:229
2660
  msgid "You joined the group!"
2661
  msgstr ""
2662
 
2663
+ #: bp-groups/bp-groups-actions.php:255 bp-groups/bp-groups-screens.php:711
2664
  msgid "This group must have at least one admin"
2665
  msgstr ""
2666
 
2667
+ #: bp-groups/bp-groups-actions.php:258
2668
  msgid "There was an error leaving the group."
2669
  msgstr ""
2670
 
2671
+ #: bp-groups/bp-groups-actions.php:260 bp-groups/bp-groups-functions.php:309
2672
  msgid "You successfully left the group."
2673
  msgstr ""
2674
 
2675
+ #: bp-groups/bp-groups-actions.php:334
2676
+ msgid "Activity feed for the group, %s."
2677
+ msgstr ""
2678
+
2679
  #: bp-groups/bp-groups-activity.php:23
2680
  msgid "Created a group"
2681
  msgstr ""
2809
  msgid "Start typing a username to add a new member."
2810
  msgstr ""
2811
 
2812
+ #: bp-groups/bp-groups-admin.php:170
2813
+ msgid "If you leave this page, you will lose any unsaved changes you have made to the group."
2814
+ msgstr ""
2815
+
2816
+ #: bp-groups/bp-groups-admin.php:444
2817
  msgid "You cannot remove all administrators from a group."
2818
  msgstr ""
2819
 
2820
+ #: bp-groups/bp-groups-admin.php:448
2821
  msgid "An error occurred when trying to update your group details."
2822
  msgstr ""
2823
 
2824
+ #: bp-groups/bp-groups-admin.php:450
2825
  msgid "The group has been updated successfully."
2826
  msgstr ""
2827
 
2828
+ #: bp-groups/bp-groups-admin.php:454
2829
  msgid "The following users could not be added to the group: <em>%s</em>"
2830
  msgstr ""
2831
 
2832
+ #: bp-groups/bp-groups-admin.php:458
2833
  msgid "The following users were successfully added to the group: <em>%s</em>"
2834
  msgstr ""
2835
 
2836
+ #: bp-groups/bp-groups-admin.php:463
2837
  msgid "An error occurred when trying to modify the following members: <em>%s</em>"
2838
  msgstr ""
2839
 
2840
+ #: bp-groups/bp-groups-admin.php:468
2841
  msgid "The following members were successfully modified: <em>%s</em>"
2842
  msgstr ""
2843
 
2844
+ #: bp-groups/bp-groups-admin.php:487 bp-groups/bp-groups-adminbar.php:40
2845
  #: bp-xprofile/bp-xprofile-admin.php:114
2846
  msgid "Edit Group"
2847
  msgstr ""
2848
 
2849
+ #: bp-groups/bp-groups-admin.php:490 bp-groups/bp-groups-admin.php:626
2850
  msgid "Add New"
2851
  msgstr ""
2852
 
2853
+ #: bp-groups/bp-groups-admin.php:509
2854
  msgid "Name and Description"
2855
  msgstr ""
2856
 
2857
+ #: bp-groups/bp-groups-admin.php:536
2858
  msgid "No group found with this ID. <a href=\"%s\">Go back and try again</a>."
2859
  msgstr ""
2860
 
2861
+ #: bp-groups/bp-groups-admin.php:574
2862
  msgid "Delete Groups"
2863
  msgstr ""
2864
 
2865
+ #: bp-groups/bp-groups-admin.php:575
2866
  msgid "You are about to delete the following groups:"
2867
  msgstr ""
2868
 
2869
+ #: bp-groups/bp-groups-admin.php:583
2870
  msgid "This action cannot be undone."
2871
  msgstr ""
2872
 
2873
+ #: bp-groups/bp-groups-admin.php:610
2874
  msgid "%s group has been permanently deleted."
2875
  msgid_plural "%s groups have been permanently deleted."
2876
  msgstr[0] ""
2877
  msgstr[1] ""
2878
 
2879
+ #: bp-groups/bp-groups-admin.php:643
2880
  msgid "Search all Groups"
2881
  msgstr ""
2882
 
2883
+ #: bp-groups/bp-groups-admin.php:665
2884
  #: bp-templates/bp-legacy/buddypress/groups/create.php:112
2885
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:47
2886
  #: bp-themes/bp-default/groups/create.php:119
2888
  msgid "Enable discussion forum"
2889
  msgstr ""
2890
 
2891
+ #: bp-groups/bp-groups-admin.php:670
2892
  msgid "Privacy"
2893
  msgstr ""
2894
 
2895
+ #: bp-groups/bp-groups-admin.php:673 bp-groups/bp-groups-admin.php:1385
2896
+ #: bp-groups/bp-groups-template.php:647
2897
  msgid "Public"
2898
  msgstr ""
2899
 
2900
+ #: bp-groups/bp-groups-admin.php:674 bp-groups/bp-groups-admin.php:1388
2901
+ #: bp-groups/bp-groups-template.php:649
2902
  msgid "Private"
2903
  msgstr ""
2904
 
2905
+ #: bp-groups/bp-groups-admin.php:675 bp-groups/bp-groups-admin.php:1391
2906
  msgid "Hidden"
2907
  msgstr ""
2908
 
2909
+ #: bp-groups/bp-groups-admin.php:679
2910
  msgid "Who can invite others to this group?"
2911
  msgstr ""
2912
 
2913
+ #: bp-groups/bp-groups-admin.php:682
2914
  #: bp-templates/bp-legacy/buddypress/groups/create.php:89
2915
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:99
2916
  #: bp-themes/bp-default/groups/create.php:96
2918
  msgid "All group members"
2919
  msgstr ""
2920
 
2921
+ #: bp-groups/bp-groups-admin.php:683
2922
  #: bp-templates/bp-legacy/buddypress/groups/create.php:94
2923
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:104
2924
  #: bp-themes/bp-default/groups/create.php:101
2926
  msgid "Group admins and mods only"
2927
  msgstr ""
2928
 
2929
+ #: bp-groups/bp-groups-admin.php:684
2930
  #: bp-templates/bp-legacy/buddypress/groups/create.php:99
2931
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:109
2932
  #: bp-themes/bp-default/groups/create.php:106
2934
  msgid "Group admins only"
2935
  msgstr ""
2936
 
2937
+ #: bp-groups/bp-groups-admin.php:699
2938
  msgid "Enter a comma-separated list of user logins."
2939
  msgstr ""
2940
 
2941
+ #: bp-groups/bp-groups-admin.php:757
2942
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:177
2943
  #: bp-themes/bp-default/groups/single/admin.php:177
2944
  msgid "Administrators"
2945
  msgstr ""
2946
 
2947
+ #: bp-groups/bp-groups-admin.php:758
2948
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:205
2949
  #: bp-themes/bp-default/groups/single/admin.php:205
2950
  msgid "Moderators"
2951
  msgstr ""
2952
 
2953
+ #: bp-groups/bp-groups-admin.php:760
2954
  msgid "Banned Users"
2955
  msgstr ""
2956
 
2957
+ #: bp-groups/bp-groups-admin.php:773
2958
  msgctxt "Group member user_id in group admin"
2959
  msgid "ID"
2960
  msgstr ""
2961
 
2962
+ #: bp-groups/bp-groups-admin.php:774
2963
  msgctxt "Group member name in group admin"
2964
  msgid "Name"
2965
  msgstr ""
2966
 
2967
+ #: bp-groups/bp-groups-admin.php:775
2968
  msgctxt "Group member role in group admin"
2969
  msgid "Group Role"
2970
  msgstr ""
2971
 
2972
+ #: bp-groups/bp-groups-admin.php:797
2973
  msgid "Administrator"
2974
  msgstr ""
2975
 
2976
+ #: bp-groups/bp-groups-admin.php:798
2977
  msgid "Moderator"
2978
  msgstr ""
2979
 
2980
+ #: bp-groups/bp-groups-admin.php:799
2981
  msgid "Member"
2982
  msgstr ""
2983
 
2984
+ #: bp-groups/bp-groups-admin.php:800
2985
  msgid "Banned"
2986
  msgstr ""
2987
 
2988
+ #: bp-groups/bp-groups-admin.php:801
2989
  msgid "Remove From Group"
2990
  msgstr ""
2991
 
2992
+ #: bp-groups/bp-groups-admin.php:834
2993
  msgid "No members of this type"
2994
  msgstr ""
2995
 
2996
+ #: bp-groups/bp-groups-admin.php:859 bp-groups/bp-groups-adminbar.php:102
2997
  #: bp-groups/bp-groups-buddybar.php:58
2998
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:360
2999
  #: bp-themes/bp-default/groups/single/admin.php:360
3001
  msgid "Delete Group"
3002
  msgstr ""
3003
 
3004
+ #: bp-groups/bp-groups-admin.php:863 bp-groups/bp-groups-classes.php:2058
3005
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:32
3006
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:117
3007
  #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:58
3008
  #: bp-templates/bp-legacy/buddypress/groups/single/forum/edit.php:74
3009
  #: bp-templates/bp-legacy/buddypress/members/single/profile/edit.php:148
3010
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:22
3011
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:11
3012
  #: bp-themes/bp-default/groups/single/admin.php:32
3013
  #: bp-themes/bp-default/groups/single/admin.php:117
3014
  #: bp-themes/bp-default/groups/single/forum/edit.php:58
3020
  msgid "Save Changes"
3021
  msgstr ""
3022
 
3023
+ #: bp-groups/bp-groups-admin.php:910
3024
+ msgid "&laquo;"
3025
+ msgstr ""
3026
+
3027
+ #: bp-groups/bp-groups-admin.php:911
3028
+ msgid "&raquo;"
3029
+ msgstr ""
3030
+
3031
+ #: bp-groups/bp-groups-admin.php:917
3032
+ msgid "Viewing %1$s - %2$s of %3$s"
3033
+ msgstr ""
3034
+
3035
+ #: bp-groups/bp-groups-admin.php:920 bp-groups/bp-groups-template.php:960
3036
+ msgid "%s member"
3037
+ msgid_plural "%s members"
3038
+ msgstr[0] ""
3039
+ msgstr[1] ""
3040
+
3041
  #. translators: 1: user_login, 2: user_email
3042
 
3043
+ #: bp-groups/bp-groups-admin.php:983
3044
  msgid "%1$s (%2$s)"
3045
  msgstr ""
3046
 
3047
+ #: bp-groups/bp-groups-admin.php:1155
3048
  msgid "No groups found."
3049
  msgstr ""
3050
 
3051
+ #: bp-groups/bp-groups-admin.php:1220
3052
  msgid "Public <span class=\"count\">(%s)</span>"
3053
  msgstr ""
3054
 
3055
+ #: bp-groups/bp-groups-admin.php:1221
3056
  msgid "Private <span class=\"count\">(%s)</span>"
3057
  msgstr ""
3058
 
3059
+ #: bp-groups/bp-groups-admin.php:1222
3060
  msgid "Hidden <span class=\"count\">(%s)</span>"
3061
  msgstr ""
3062
 
3063
+ #: bp-groups/bp-groups-admin.php:1251
3064
  msgctxt "Groups admin Group Name column header"
3065
  msgid "Name"
3066
  msgstr ""
3067
 
3068
+ #: bp-groups/bp-groups-admin.php:1252
3069
  msgctxt "Groups admin Group Description column header"
3070
  msgid "Description"
3071
  msgstr ""
3072
 
3073
+ #: bp-groups/bp-groups-admin.php:1253
3074
  msgctxt "Groups admin Privacy Status column header"
3075
  msgid "Status"
3076
  msgstr ""
3077
 
3078
+ #: bp-groups/bp-groups-admin.php:1254
3079
  msgctxt "Groups admin Members column header"
3080
  msgid "# Members"
3081
  msgstr ""
3082
 
3083
+ #: bp-groups/bp-groups-admin.php:1255
3084
  msgctxt "Groups admin Last Active column header"
3085
  msgid "Last Active"
3086
  msgstr ""
3087
 
3088
+ #: bp-groups/bp-groups-admin.php:1291
3089
+ msgid "Select group %1$d"
3090
+ msgstr ""
3091
+
3092
  #: bp-groups/bp-groups-adminbar.php:48 bp-groups/bp-groups-buddybar.php:34
3093
  msgid "Edit Details"
3094
  msgstr ""
3121
  msgid "Group Settings"
3122
  msgstr ""
3123
 
3124
+ #: bp-groups/bp-groups-buddybar.php:40 bp-groups/bp-groups-loader.php:595
3125
+ #: bp-groups/bp-groups-template.php:2606
3126
  msgid "Group Avatar"
3127
  msgstr ""
3128
 
3129
+ #: bp-groups/bp-groups-classes.php:1240
3130
  msgid "Group Mod"
3131
  msgstr ""
3132
 
3133
+ #: bp-groups/bp-groups-classes.php:1246 bp-groups/bp-groups-functions.php:121
3134
  msgid "Group Admin"
3135
  msgstr ""
3136
 
3146
  msgid "%1$s edited the forum topic %2$s in the group %3$s"
3147
  msgstr ""
3148
 
3149
+ #: bp-groups/bp-groups-functions.php:290
3150
  msgid "As the only Admin, you cannot leave the group."
3151
  msgstr ""
3152
 
3153
+ #: bp-groups/bp-groups-functions.php:353 bp-groups/bp-groups-functions.php:920
3154
  #: bp-groups/bp-groups-screens.php:62
3155
  msgid "%1$s joined the group %2$s"
3156
  msgstr ""
3157
 
3158
+ #: bp-groups/bp-groups-functions.php:614
3159
  msgid "%1$s posted an update in the group %2$s"
3160
  msgstr ""
3161
 
3171
  msgid "You are not an admin of this group."
3172
  msgstr ""
3173
 
3174
+ #: bp-groups/bp-groups-loader.php:298 bp-groups/bp-groups-template.php:1461
3175
  msgid "Details"
3176
  msgstr ""
3177
 
3178
+ #: bp-groups/bp-groups-loader.php:310 bp-groups/bp-groups-template.php:1472
3179
  msgid "Avatar"
3180
  msgstr ""
3181
 
3188
  msgstr ""
3189
 
3190
  #: bp-groups/bp-groups-loader.php:368 bp-groups/bp-groups-loader.php:398
3191
+ #: bp-groups/bp-groups-loader.php:537 bp-groups/bp-groups-loader.php:575
3192
  msgid "Memberships"
3193
  msgstr ""
3194
 
3201
  msgid "Home"
3202
  msgstr ""
3203
 
3204
+ #: bp-groups/bp-groups-loader.php:427 bp-groups/bp-groups-template.php:1793
3205
+ #: bp-groups/bp-groups-template.php:1794
3206
+ #: bp-templates/bp-legacy/buddypress-functions.php:1075
3207
+ #: bp-themes/bp-default/_inc/ajax.php:737
3208
  msgid "Request Membership"
3209
  msgstr ""
3210
 
3445
  msgid "Your membership request was sent to the group administrator successfully. You will be notified when the group administrator responds to your request."
3446
  msgstr ""
3447
 
3448
+ #: bp-groups/bp-groups-screens.php:529
3449
  msgid "There was an error updating group details, please try again."
3450
  msgstr ""
3451
 
3452
+ #: bp-groups/bp-groups-screens.php:531
3453
  msgid "Group details were successfully updated."
3454
  msgstr ""
3455
 
3456
+ #: bp-groups/bp-groups-screens.php:573
3457
  msgid "There was an error updating group settings, please try again."
3458
  msgstr ""
3459
 
3460
+ #: bp-groups/bp-groups-screens.php:575
3461
  msgid "Group settings were successfully updated."
3462
  msgstr ""
3463
 
3464
+ #: bp-groups/bp-groups-screens.php:607 bp-xprofile/bp-xprofile-actions.php:39
3465
  msgid "Your avatar was deleted successfully!"
3466
  msgstr ""
3467
 
3468
+ #: bp-groups/bp-groups-screens.php:609 bp-xprofile/bp-xprofile-actions.php:41
3469
  msgid "There was a problem deleting that avatar, please try again."
3470
  msgstr ""
3471
 
3472
+ #: bp-groups/bp-groups-screens.php:652
3473
  msgid "There was a problem cropping the avatar."
3474
  msgstr ""
3475
 
3476
+ #: bp-groups/bp-groups-screens.php:654
3477
  msgid "The new group avatar was uploaded successfully."
3478
  msgstr ""
3479
 
3480
+ #: bp-groups/bp-groups-screens.php:690
3481
  msgid "There was an error when promoting that user, please try again"
3482
  msgstr ""
3483
 
3484
+ #: bp-groups/bp-groups-screens.php:692
3485
  msgid "User promoted successfully"
3486
  msgstr ""
3487
 
3488
+ #: bp-groups/bp-groups-screens.php:715
3489
  msgid "There was an error when demoting that user, please try again"
3490
  msgstr ""
3491
 
3492
+ #: bp-groups/bp-groups-screens.php:717
3493
  msgid "User demoted successfully"
3494
  msgstr ""
3495
 
3496
+ #: bp-groups/bp-groups-screens.php:733
3497
  msgid "There was an error when banning that user, please try again"
3498
  msgstr ""
3499
 
3500
+ #: bp-groups/bp-groups-screens.php:735
3501
  msgid "User banned successfully"
3502
  msgstr ""
3503
 
3504
+ #: bp-groups/bp-groups-screens.php:751
3505
  msgid "There was an error when unbanning that user, please try again"
3506
  msgstr ""
3507
 
3508
+ #: bp-groups/bp-groups-screens.php:753
3509
  msgid "User ban removed successfully"
3510
  msgstr ""
3511
 
3512
+ #: bp-groups/bp-groups-screens.php:769
3513
  msgid "There was an error removing that user from the group, please try again"
3514
  msgstr ""
3515
 
3516
+ #: bp-groups/bp-groups-screens.php:771
3517
  msgid "User removed successfully"
3518
  msgstr ""
3519
 
3520
+ #: bp-groups/bp-groups-screens.php:809
3521
  msgid "There was an error accepting the membership request, please try again."
3522
  msgstr ""
3523
 
3524
+ #: bp-groups/bp-groups-screens.php:811
3525
  msgid "Group membership request accepted"
3526
  msgstr ""
3527
 
3528
+ #: bp-groups/bp-groups-screens.php:820
3529
  msgid "There was an error rejecting the membership request, please try again."
3530
  msgstr ""
3531
 
3532
+ #: bp-groups/bp-groups-screens.php:822
3533
  msgid "Group membership request rejected"
3534
  msgstr ""
3535
 
3536
+ #: bp-groups/bp-groups-screens.php:854
3537
  msgid "There was an error deleting the group, please try again."
3538
  msgstr ""
3539
 
3540
+ #: bp-groups/bp-groups-screens.php:856
3541
  msgid "The group was deleted successfully"
3542
  msgstr ""
3543
 
3544
+ #: bp-groups/bp-groups-screens.php:904
3545
  msgid "A member invites you to join a group"
3546
  msgstr ""
3547
 
3548
+ #: bp-groups/bp-groups-screens.php:910
3549
  msgid "Group information is updated"
3550
  msgstr ""
3551
 
3552
+ #: bp-groups/bp-groups-screens.php:916
3553
  msgid "You are promoted to a group administrator or moderator"
3554
  msgstr ""
3555
 
3556
+ #: bp-groups/bp-groups-screens.php:922
3557
  msgid "A member requests to join a private group for which you are an admin"
3558
  msgstr ""
3559
 
3560
+ #: bp-groups/bp-groups-template.php:218
3561
  msgctxt "Group pagination previous text"
3562
  msgid "&larr;"
3563
  msgstr ""
3564
 
3565
+ #: bp-groups/bp-groups-template.php:219
3566
  msgctxt "Group pagination next text"
3567
  msgid "&rarr;"
3568
  msgstr ""
3569
 
3570
+ #: bp-groups/bp-groups-template.php:480
3571
  msgid "Public Group"
3572
  msgstr ""
3573
 
3574
+ #: bp-groups/bp-groups-template.php:482
3575
  msgid "Hidden Group"
3576
  msgstr ""
3577
 
3578
+ #: bp-groups/bp-groups-template.php:484
3579
  msgid "Private Group"
3580
  msgstr ""
3581
 
3582
+ #: bp-groups/bp-groups-template.php:486
3583
  msgid "Group"
3584
  msgstr ""
3585
 
3586
+ #: bp-groups/bp-groups-template.php:558
3587
  msgid "not yet active"
3588
  msgstr ""
3589
 
3590
+ #: bp-groups/bp-groups-template.php:740
3591
  msgid "Group creator avatar of %s"
3592
  msgstr ""
3593
 
3594
+ #: bp-groups/bp-groups-template.php:775
3595
  msgid "No Admins"
3596
  msgstr ""
3597
 
3598
+ #: bp-groups/bp-groups-template.php:802
3599
  msgid "No Mods"
3600
  msgstr ""
3601
 
3602
+ #: bp-groups/bp-groups-template.php:884
3603
  msgid "Filter Groups"
3604
  msgstr ""
3605
 
3606
+ #: bp-groups/bp-groups-template.php:932
3607
  msgid "Viewing group %1$s to %2$s (of %3$s groups)"
3608
  msgstr ""
3609
 
3610
+ #: bp-groups/bp-groups-template.php:962
 
 
 
 
3611
  #: bp-templates/bp-legacy/buddypress/members/single/groups/invites.php:14
3612
  #: bp-themes/bp-default/members/single/groups/invites.php:14
3613
  msgid "%s members"
3614
  msgstr ""
3615
 
3616
+ #: bp-groups/bp-groups-template.php:1001
3617
  msgid "%d topic"
3618
  msgstr ""
3619
 
3620
+ #: bp-groups/bp-groups-template.php:1003
3621
  msgid "%d topics"
3622
  msgstr ""
3623
 
3624
+ #: bp-groups/bp-groups-template.php:1229 bp-groups/bp-groups-template.php:1294
3625
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:190
3626
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:217
3627
  #: bp-themes/bp-default/groups/single/admin.php:190
3629
  msgid "Demote to Member"
3630
  msgstr ""
3631
 
3632
+ #: bp-groups/bp-groups-template.php:1242 bp-groups/bp-groups-template.php:1307
3633
+ #: bp-groups/bp-groups-template.php:2105
3634
  msgid "joined %s"
3635
  msgstr ""
3636
 
3637
+ #: bp-groups/bp-groups-template.php:1265
3638
  msgid "This group has no administrators"
3639
  msgstr ""
3640
 
3641
+ #: bp-groups/bp-groups-template.php:1293
3642
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:216
3643
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:272
3644
  #: bp-themes/bp-default/groups/single/admin.php:216
3646
  msgid "Promote to Admin"
3647
  msgstr ""
3648
 
3649
+ #: bp-groups/bp-groups-template.php:1327
3650
  msgid "This group has no moderators"
3651
  msgstr ""
3652
 
3653
+ #: bp-groups/bp-groups-template.php:1752 bp-groups/bp-groups-template.php:1753
3654
+ #: bp-templates/bp-legacy/buddypress-functions.php:1054
3655
+ #: bp-themes/bp-default/_inc/ajax.php:716
3656
  msgid "Leave Group"
3657
  msgstr ""
3658
 
3659
+ #: bp-groups/bp-groups-template.php:1775 bp-groups/bp-groups-template.php:1776
3660
+ #: bp-templates/bp-legacy/buddypress-functions.php:1073
3661
+ #: bp-themes/bp-default/_inc/ajax.php:735
3662
  msgid "Join Group"
3663
  msgstr ""
3664
 
3665
+ #: bp-groups/bp-groups-template.php:1808 bp-groups/bp-groups-template.php:1809
3666
  msgid "Request Sent"
3667
  msgstr ""
3668
 
3669
+ #: bp-groups/bp-groups-template.php:1839
3670
  msgid "This is a private group and you must request group membership in order to join."
3671
  msgstr ""
3672
 
3673
+ #: bp-groups/bp-groups-template.php:1841
3674
  msgid "This is a private group. To join you must be a registered site member and request group membership."
3675
  msgstr ""
3676
 
3677
+ #: bp-groups/bp-groups-template.php:1844
3678
  msgid "This is a private group. Your membership request is awaiting approval from the group administrator."
3679
  msgstr ""
3680
 
3681
+ #: bp-groups/bp-groups-template.php:1848
3682
  msgid "This is a hidden group and only invited members can join."
3683
  msgstr ""
3684
 
3685
+ #: bp-groups/bp-groups-template.php:2153
3686
  msgid "Viewing members %1$s to %2$s (of %3$s members)"
3687
  msgstr ""
3688
 
3689
+ #: bp-groups/bp-groups-template.php:2379
3690
  msgid "Group avatar"
3691
  msgstr ""
3692
 
3693
+ #: bp-groups/bp-groups-template.php:2519 bp-groups/bp-groups-template.php:2543
3694
  msgid "Recently Joined"
3695
  msgstr ""
3696
 
3697
+ #: bp-groups/bp-groups-template.php:2520 bp-groups/bp-groups-template.php:2546
3698
  msgid "Most Popular"
3699
  msgstr ""
3700
 
3701
+ #: bp-groups/bp-groups-template.php:2521 bp-groups/bp-groups-template.php:2549
3702
  msgid "Administrator Of"
3703
  msgstr ""
3704
 
3705
+ #: bp-groups/bp-groups-template.php:2522 bp-groups/bp-groups-template.php:2552
3706
  msgid "Moderator Of"
3707
  msgstr ""
3708
 
3709
+ #: bp-groups/bp-groups-template.php:2610
3710
  msgid "No Group Avatar"
3711
  msgstr ""
3712
 
3713
+ #: bp-groups/bp-groups-template.php:2811
3714
  msgid "requested %s"
3715
  msgstr ""
3716
 
3717
+ #: bp-groups/bp-groups-template.php:2986
3718
  msgid "Group Activity RSS Feed"
3719
  msgstr ""
3720
 
3727
  msgid "(BuddyPress) Groups"
3728
  msgstr ""
3729
 
3730
+ #: bp-groups/bp-groups-widgets.php:78 bp-groups/bp-groups-widgets.php:181
3731
  msgid "created %s"
3732
  msgstr ""
3733
 
3734
+ #: bp-groups/bp-groups-widgets.php:97
3735
  msgid "There are no groups to display."
3736
  msgstr ""
3737
 
3738
+ #: bp-groups/bp-groups-widgets.php:134
3739
  msgid "Link widget title to Groups directory"
3740
  msgstr ""
3741
 
3742
+ #: bp-groups/bp-groups-widgets.php:136
3743
  msgid "Max groups to show:"
3744
  msgstr ""
3745
 
3746
+ #: bp-groups/bp-groups-widgets.php:139
3747
  msgid "Default groups to show:"
3748
  msgstr ""
3749
 
3750
+ #: bp-groups/bp-groups-widgets.php:199
3751
  msgid "No groups matched the current filter."
3752
  msgstr ""
3753
 
3755
  msgid "Cheatin&#8217; huh?"
3756
  msgstr ""
3757
 
3758
+ #: bp-loader.php:547
3759
  msgid "BuddyPress Default"
3760
  msgstr ""
3761
 
3788
  msgstr ""
3789
 
3790
  #: bp-members/bp-members-adminbar.php:99
3791
+ #: bp-xprofile/bp-xprofile-template.php:927
3792
+ #: bp-xprofile/bp-xprofile-template.php:928
3793
  msgid "Edit Profile"
3794
  msgstr ""
3795
 
3801
  #: bp-members/bp-members-adminbar.php:123
3802
  #: bp-settings/bp-settings-loader.php:130
3803
  #: bp-settings/bp-settings-loader.php:190
3804
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:27
3805
  #: bp-themes/bp-default/members/single/settings/delete-account.php:50
3806
  #: bp-themes/bp-default/members/single/settings/delete-account.php:76
3807
  msgid "Delete Account"
3836
  msgid "Delete %s's Account"
3837
  msgstr ""
3838
 
3839
+ #: bp-members/bp-members-functions.php:933
3840
+ #: bp-members/bp-members-functions.php:1517
3841
  msgid "<strong>ERROR</strong>: Your account has been marked as a spammer."
3842
  msgstr ""
3843
 
3844
+ #: bp-members/bp-members-functions.php:1107
3845
  msgid "Please check your email address."
3846
  msgstr ""
3847
 
3848
+ #: bp-members/bp-members-functions.php:1110
3849
+ #: bp-members/bp-members-functions.php:1113
3850
  msgid "Sorry, that email address is not allowed!"
3851
  msgstr ""
3852
 
3853
+ #: bp-members/bp-members-functions.php:1116
3854
  msgid "Sorry, that email address is already used!"
3855
  msgstr ""
3856
 
3857
+ #: bp-members/bp-members-functions.php:1134
3858
  msgid "Please enter a username"
3859
  msgstr ""
3860
 
3861
+ #: bp-members/bp-members-functions.php:1142
3862
+ msgid "That username is not allowed"
3863
+ msgstr ""
3864
+
3865
+ #: bp-members/bp-members-functions.php:1145
3866
+ msgid "Usernames can contain only letters, numbers, ., -, *, and @"
3867
  msgstr ""
3868
 
3869
+ #: bp-members/bp-members-functions.php:1148
3870
  msgid "Username must be at least 4 characters"
3871
  msgstr ""
3872
 
3873
+ #: bp-members/bp-members-functions.php:1151
3874
  msgid "Sorry, usernames may not contain the character \"_\"!"
3875
  msgstr ""
3876
 
3877
+ #: bp-members/bp-members-functions.php:1158
3878
  msgid "Sorry, usernames must have letters too!"
3879
  msgstr ""
3880
 
3881
+ #: bp-members/bp-members-functions.php:1162
3882
  msgid "Sorry, that username already exists!"
3883
  msgstr ""
3884
 
3885
+ #: bp-members/bp-members-functions.php:1207
3886
  msgid "<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href=\"mailto:%s\">webmaster</a> !"
3887
  msgstr ""
3888
 
3889
+ #: bp-members/bp-members-functions.php:1305
3890
+ #: bp-members/bp-members-functions.php:1309
3891
  msgid "Invalid activation key"
3892
  msgstr ""
3893
 
3894
+ #: bp-members/bp-members-functions.php:1346
3895
  msgid "%s became a registered member"
3896
  msgstr ""
3897
 
3898
+ #: bp-members/bp-members-functions.php:1430
3899
  msgid "<strong>ERROR</strong>: Your account has not been activated. Check your email for the activation link."
3900
  msgstr ""
3901
 
3923
  msgid "Your account is now active!"
3924
  msgstr ""
3925
 
3926
+ #: bp-members/bp-members-screens.php:514
3927
  #: bp-themes/bp-default/registration/register.php:253
3928
+ msgid "Check Your Email To Activate Your Account!"
3929
  msgstr ""
3930
 
3931
+ #: bp-members/bp-members-screens.php:522
3932
  #: bp-themes/bp-default/registration/activate.php:11
3933
  msgid "Account Activated"
3934
  msgstr ""
3943
  msgid "&rarr;"
3944
  msgstr ""
3945
 
3946
+ #: bp-members/bp-members-template.php:347
3947
  msgid "Viewing member %1$s to %2$s (of %3$s active members)"
3948
  msgstr ""
3949
 
3950
+ #: bp-members/bp-members-template.php:349
3951
  msgid "Viewing member %1$s to %2$s (of %3$s members with friends)"
3952
  msgstr ""
3953
 
3954
+ #: bp-members/bp-members-template.php:351
3955
  msgid "Viewing member %1$s to %2$s (of %3$s members online)"
3956
  msgstr ""
3957
 
3958
+ #: bp-members/bp-members-template.php:353
3959
  msgid "Viewing member %1$s to %2$s (of %3$s members)"
3960
  msgstr ""
3961
 
3962
+ #: bp-members/bp-members-template.php:598
3963
  msgid "Never active"
3964
  msgstr ""
3965
 
3966
+ #: bp-members/bp-members-template.php:620
3967
  msgctxt "member latest update in member directory"
3968
  msgid "- &quot;%s &quot;"
3969
  msgstr ""
3970
 
3971
+ #: bp-members/bp-members-template.php:677
3972
  msgctxt "Records the timestamp that the user registered into the activy stream"
3973
  msgid "registered %s"
3974
  msgstr ""
3975
 
3976
+ #: bp-members/bp-members-template.php:1146
3977
  msgid "Your Avatar"
3978
  msgstr ""
3979
 
3980
+ #: bp-members/bp-members-template.php:1216
3981
  msgid "Activity RSS Feed"
3982
  msgstr ""
3983
 
4002
  msgstr ""
4003
 
4004
  #: bp-messages/bp-messages-actions.php:91
4005
+ #: bp-templates/bp-legacy/buddypress-functions.php:1234
4006
+ #: bp-themes/bp-default/_inc/ajax.php:884
4007
  msgid "Messages deleted."
4008
  msgstr ""
4009
 
4192
  #: bp-messages/bp-messages-template.php:607
4193
  #: bp-templates/bp-legacy/buddypress/members/register.php:166
4194
  #: bp-templates/bp-legacy/buddypress/members/single/profile/edit.php:130
4195
+ #: bp-templates/bp-legacy/buddypress-functions.php:236
4196
+ #: bp-themes/bp-default/functions.php:165
4197
  #: bp-themes/bp-default/members/single/profile/edit.php:130
4198
  #: bp-themes/bp-default/registration/register.php:171
4199
  msgid "Close"
4200
  msgstr ""
4201
 
4202
+ #: bp-messages/bp-messages-template.php:652
4203
  msgid "Send a private message to this user."
4204
  msgstr ""
4205
 
4206
+ #: bp-messages/bp-messages-template.php:653
4207
  msgid "Private Message"
4208
  msgstr ""
4209
 
4210
+ #: bp-messages/bp-messages-template.php:836
4211
  msgid "%d Recipients"
4212
  msgstr ""
4213
 
4214
+ #: bp-messages/bp-messages-template.php:924
4215
+ #: bp-templates/bp-legacy/buddypress-functions.php:1140
4216
+ #: bp-themes/bp-default/_inc/ajax.php:790
4217
  msgid "Sent %s"
4218
  msgstr ""
4219
 
4311
  msgstr ""
4312
 
4313
  #: bp-templates/bp-legacy/buddypress/activity/entry.php:66
4314
+ #: bp-templates/bp-legacy/buddypress-functions.php:238
4315
+ #: bp-templates/bp-legacy/buddypress-functions.php:831
4316
+ #: bp-templates/bp-legacy/buddypress-functions.php:848
4317
+ #: bp-themes/bp-default/_inc/ajax.php:494
4318
+ #: bp-themes/bp-default/_inc/ajax.php:511
4319
  #: bp-themes/bp-default/activity/entry.php:68
4320
+ #: bp-themes/bp-default/functions.php:167
4321
  msgid "Favorite"
4322
  msgstr ""
4323
 
4324
  #: bp-templates/bp-legacy/buddypress/activity/entry.php:70
4325
+ #: bp-templates/bp-legacy/buddypress-functions.php:239
4326
+ #: bp-templates/bp-legacy/buddypress-functions.php:829
4327
+ #: bp-templates/bp-legacy/buddypress-functions.php:850
4328
+ #: bp-themes/bp-default/_inc/ajax.php:492
4329
+ #: bp-themes/bp-default/_inc/ajax.php:513
4330
  #: bp-themes/bp-default/activity/entry.php:72
4331
+ #: bp-themes/bp-default/functions.php:168
4332
  msgid "Remove Favorite"
4333
  msgstr ""
4334
 
4343
  msgstr ""
4344
 
4345
  #: bp-templates/bp-legacy/buddypress/activity/index.php:19
4346
+ #: bp-templates/bp-legacy/buddypress/members/index.php:19
4347
  #: bp-themes/bp-default/activity/index.php:39
4348
+ #: bp-themes/bp-default/members/index.php:35
4349
  msgid "All Members <span>%s</span>"
4350
  msgstr ""
4351
 
4355
  msgstr ""
4356
 
4357
  #: bp-templates/bp-legacy/buddypress/activity/index.php:29
4358
+ #: bp-templates/bp-legacy/buddypress/members/index.php:22
4359
  #: bp-themes/bp-default/activity/index.php:49
4360
+ #: bp-themes/bp-default/members/index.php:39
4361
  msgid "My Friends <span>%s</span>"
4362
  msgstr ""
4363
 
4383
  msgid "My Favorites <span>%s</span>"
4384
  msgstr ""
4385
 
4386
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:59
4387
+ #: bp-themes/bp-default/activity/index.php:79
4388
  msgid "Activity that I have been mentioned in."
4389
  msgstr ""
4390
 
4391
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:59
4392
+ #: bp-themes/bp-default/activity/index.php:79
4393
+ msgctxt "Number of new activity mentions"
4394
+ msgid "%s new"
4395
+ msgid_plural "%s new"
4396
+ msgstr[0] ""
4397
+ msgstr[1] ""
4398
 
4399
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:71
4400
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:3
4401
+ #: bp-themes/bp-default/activity/index.php:91
4402
  #: bp-themes/bp-default/groups/single/activity.php:3
4403
  msgid "RSS Feed"
4404
  msgstr ""
4405
 
4406
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:71
4407
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:3
4408
+ #: bp-themes/bp-default/activity/index.php:91
4409
  #: bp-themes/bp-default/groups/single/activity.php:3
4410
  msgid "RSS"
4411
  msgstr ""
4412
 
4413
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:76
4414
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:8
4415
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:18
4416
+ #: bp-themes/bp-default/activity/index.php:96
4417
  #: bp-themes/bp-default/groups/single/activity.php:8
4418
  #: bp-themes/bp-default/members/single/activity.php:18
4419
  msgid "Show:"
4420
  msgstr ""
4421
 
4422
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:78
4423
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:10
4424
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:20
4425
+ #: bp-themes/bp-default/activity/index.php:98
4426
  #: bp-themes/bp-default/groups/single/activity.php:10
4427
  #: bp-themes/bp-default/members/single/activity.php:20
4428
  msgid "Everything"
4429
  msgstr ""
4430
 
4431
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:79
4432
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:11
4433
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:21
4434
+ #: bp-themes/bp-default/activity/index.php:99
4435
  #: bp-themes/bp-default/groups/single/activity.php:11
4436
  #: bp-themes/bp-default/members/single/activity.php:21
4437
  msgid "Updates"
4438
  msgstr ""
4439
 
4440
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:84
4441
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:28
4442
+ #: bp-themes/bp-default/activity/index.php:104
4443
  #: bp-themes/bp-default/members/single/activity.php:28
4444
  msgid "Comments"
4445
  msgstr ""
4446
 
4447
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:90
4448
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:14
4449
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:43
4450
+ #: bp-themes/bp-default/activity/index.php:110
4451
  #: bp-themes/bp-default/groups/single/activity.php:14
4452
  #: bp-themes/bp-default/members/single/activity.php:43
4453
  msgid "Forum Topics"
4454
  msgstr ""
4455
 
4456
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:91
4457
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:15
4458
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:44
4459
+ #: bp-themes/bp-default/activity/index.php:111
4460
  #: bp-themes/bp-default/groups/single/activity.php:15
4461
  #: bp-themes/bp-default/members/single/activity.php:44
4462
  msgid "Forum Replies"
4463
  msgstr ""
4464
 
4465
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:97
4466
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:50
4467
+ #: bp-themes/bp-default/activity/index.php:117
4468
  #: bp-themes/bp-default/members/single/activity.php:50
4469
  msgid "New Groups"
4470
  msgstr ""
4471
 
4472
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:98
4473
  #: bp-templates/bp-legacy/buddypress/groups/single/activity.php:18
4474
  #: bp-templates/bp-legacy/buddypress/members/single/activity.php:51
4475
+ #: bp-themes/bp-default/activity/index.php:118
4476
  #: bp-themes/bp-default/groups/single/activity.php:18
4477
  #: bp-themes/bp-default/members/single/activity.php:51
4478
  msgid "Group Memberships"
4479
  msgstr ""
4480
 
4481
+ #: bp-templates/bp-legacy/buddypress/activity/index.php:108
4482
+ #: bp-themes/bp-default/activity/index.php:128
4483
  msgid "New Members"
4484
  msgstr ""
4485
 
4527
  #: bp-templates/bp-legacy/buddypress/forums/index.php:42
4528
  #: bp-templates/bp-legacy/buddypress/groups/index.php:36
4529
  #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:36
4530
+ #: bp-templates/bp-legacy/buddypress/members/index.php:35
4531
  #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:19
4532
  #: bp-templates/bp-legacy/buddypress/members/single/forums.php:18
4533
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:20
4536
  #: bp-themes/bp-default/forums/index.php:60
4537
  #: bp-themes/bp-default/groups/index.php:55
4538
  #: bp-themes/bp-default/groups/single/forum.php:36
4539
+ #: bp-themes/bp-default/members/index.php:55
4540
  #: bp-themes/bp-default/members/single/blogs.php:19
4541
  #: bp-themes/bp-default/members/single/forums.php:18
4542
  #: bp-themes/bp-default/members/single/friends.php:20
4548
  #: bp-templates/bp-legacy/buddypress/forums/index.php:44
4549
  #: bp-templates/bp-legacy/buddypress/groups/index.php:39
4550
  #: bp-templates/bp-legacy/buddypress/groups/single/forum.php:38
4551
+ #: bp-templates/bp-legacy/buddypress/members/index.php:37
4552
  #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:21
4553
  #: bp-templates/bp-legacy/buddypress/members/single/forums.php:20
4554
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:22
4557
  #: bp-themes/bp-default/forums/index.php:62
4558
  #: bp-themes/bp-default/groups/index.php:57
4559
  #: bp-themes/bp-default/groups/single/forum.php:38
4560
+ #: bp-themes/bp-default/members/index.php:57
4561
  #: bp-themes/bp-default/members/single/blogs.php:21
4562
  #: bp-themes/bp-default/members/single/forums.php:20
4563
  #: bp-themes/bp-default/members/single/friends.php:22
4567
 
4568
  #: bp-templates/bp-legacy/buddypress/blogs/index.php:40
4569
  #: bp-templates/bp-legacy/buddypress/groups/index.php:42
4570
+ #: bp-templates/bp-legacy/buddypress/members/index.php:41
4571
  #: bp-templates/bp-legacy/buddypress/members/single/blogs.php:23
4572
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:24
4573
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:25
4574
  #: bp-themes/bp-default/blogs/index.php:57
4575
  #: bp-themes/bp-default/groups/index.php:60
4576
+ #: bp-themes/bp-default/members/index.php:62
4577
  #: bp-themes/bp-default/members/single/blogs.php:23
4578
  #: bp-themes/bp-default/members/single/friends.php:24
4579
  #: bp-themes/bp-default/members/single/groups.php:25
4676
 
4677
  #: bp-templates/bp-legacy/buddypress/forums/index.php:98
4678
  #: bp-themes/bp-default/forums/index.php:116
4679
+ #: bp-xprofile/bp-xprofile-template.php:476
4680
  msgid "----"
4681
  msgstr ""
4682
 
4877
 
4878
  #: bp-templates/bp-legacy/buddypress/groups/create.php:222
4879
  #: bp-templates/bp-legacy/buddypress/groups/single/send-invites.php:42
4880
+ #: bp-templates/bp-legacy/buddypress-functions.php:920
4881
+ #: bp-themes/bp-default/_inc/ajax.php:583
4882
  #: bp-themes/bp-default/groups/create.php:229
4883
  #: bp-themes/bp-default/groups/single/send-invites.php:42
4884
  msgid "Remove Invite"
4935
  msgid "Newly Created"
4936
  msgstr ""
4937
 
4938
+ #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:26
4939
+ #: bp-themes/bp-default/groups/single/admin.php:26
4940
+ msgid "Notify group members of these changes via email"
4941
  msgstr ""
4942
 
4943
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:137
5138
 
5139
  #: bp-templates/bp-legacy/buddypress/members/activate.php:16
5140
  #: bp-themes/bp-default/registration/activate.php:25
5141
+ msgid "Your account was activated successfully! You can now <a href=\"%s\">log in</a> with the username and password you provided when you signed up."
5142
  msgstr ""
5143
 
5144
  #: bp-templates/bp-legacy/buddypress/members/activate.php:21
5151
  msgid "Activation Key:"
5152
  msgstr ""
5153
 
5154
+ #: bp-templates/bp-legacy/buddypress/members/index.php:38
5155
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:23
5156
+ #: bp-themes/bp-default/members/index.php:58
5157
  #: bp-themes/bp-default/members/single/friends.php:23
5158
  msgid "Newest Registered"
5159
  msgstr ""
5462
  msgid "%s's Profile"
5463
  msgstr ""
5464
 
5465
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:9
5466
  #: bp-themes/bp-default/members/single/settings/capabilities.php:57
5467
  msgid "This user is a spammer."
5468
  msgstr ""
5469
 
5470
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:7
5471
  #: bp-themes/bp-default/members/single/settings/delete-account.php:56
5472
  msgid "Deleting your account will delete all of the content you have created. It will be completely irrecoverable."
5473
  msgstr ""
5474
 
5475
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:11
5476
  #: bp-themes/bp-default/members/single/settings/delete-account.php:60
5477
  msgid "Deleting this account will delete all of the content it has created. It will be completely irrecoverable."
5478
  msgstr ""
5479
 
5480
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:23
5481
  #: bp-themes/bp-default/members/single/settings/delete-account.php:72
5482
  msgid "I understand the consequences."
5483
  msgstr ""
5484
 
5485
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:7
5486
  #: bp-themes/bp-default/members/single/settings/general.php:57
5487
  msgid "Current Password <span>(required to update email or change current password)</span>"
5488
  msgstr ""
5489
 
5490
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:8
5491
  #: bp-themes/bp-default/members/single/settings/general.php:58
5492
  msgid "Password Lost and Found"
5493
  msgstr ""
5494
 
5495
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:8
5496
  #: bp-themes/bp-default/members/single/settings/general.php:58
5497
  msgid "Lost your password?"
5498
  msgstr ""
5499
 
5500
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:12
5501
  #: bp-themes/bp-default/members/single/settings/general.php:62
5502
  msgid "Account Email"
5503
  msgstr ""
5504
 
5505
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:15
5506
  #: bp-themes/bp-default/members/single/settings/general.php:65
5507
  msgid "Change Password <span>(leave blank for no change)</span>"
5508
  msgstr ""
5509
 
5510
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:16
5511
  #: bp-themes/bp-default/members/single/settings/general.php:66
5512
  msgid "New Password"
5513
  msgstr ""
5514
 
5515
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:17
5516
  #: bp-themes/bp-default/members/single/settings/general.php:67
5517
  msgid "Repeat New Password"
5518
  msgstr ""
5519
 
5520
+ #: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:4
5521
  #: bp-themes/bp-default/members/single/settings/notifications.php:54
5522
  msgid "Send a notification by email when:"
5523
  msgstr ""
5526
  msgid "BuddyPress Legacy"
5527
  msgstr ""
5528
 
5529
+ #: bp-templates/bp-legacy/buddypress-functions.php:229
5530
  #: bp-themes/bp-default/functions.php:158
5531
  msgid "My Favorites"
5532
  msgstr ""
5533
 
5534
+ #: bp-templates/bp-legacy/buddypress-functions.php:230
5535
  #: bp-themes/bp-default/functions.php:159
5536
  msgid "Accepted"
5537
  msgstr ""
5538
 
5539
+ #: bp-templates/bp-legacy/buddypress-functions.php:231
5540
  #: bp-themes/bp-default/functions.php:160
5541
  msgid "Rejected"
5542
  msgstr ""
5543
 
5544
+ #: bp-templates/bp-legacy/buddypress-functions.php:232
5545
  #: bp-themes/bp-default/functions.php:161
5546
  msgid "Show all comments for this thread"
5547
  msgstr ""
5548
 
5549
+ #: bp-templates/bp-legacy/buddypress-functions.php:233
5550
  #: bp-themes/bp-default/functions.php:162
5551
+ msgid "Show all %d comments"
5552
  msgstr ""
5553
 
5554
+ #: bp-templates/bp-legacy/buddypress-functions.php:234
5555
  #: bp-themes/bp-default/functions.php:163
5556
+ msgid "Show all"
5557
+ msgstr ""
5558
+
5559
+ #: bp-templates/bp-legacy/buddypress-functions.php:235
5560
+ #: bp-themes/bp-default/functions.php:164
5561
  msgid "comments"
5562
  msgstr ""
5563
 
5564
+ #: bp-templates/bp-legacy/buddypress-functions.php:240
5565
+ msgid "Your profile has unsaved changes. If you leave the page, the changes will be lost."
5566
+ msgstr ""
5567
+
5568
+ #: bp-templates/bp-legacy/buddypress-functions.php:636
5569
+ #: bp-themes/bp-default/_inc/ajax.php:291
5570
  msgid "There was a problem posting your update, please try again."
5571
  msgstr ""
5572
 
5573
+ #: bp-templates/bp-legacy/buddypress-functions.php:730
5574
+ #: bp-templates/bp-legacy/buddypress-functions.php:766
5575
+ #: bp-themes/bp-default/_inc/ajax.php:393
5576
+ #: bp-themes/bp-default/_inc/ajax.php:429
5577
  msgid "There was a problem when deleting. Please try again."
5578
  msgstr ""
5579
 
5580
+ #: bp-templates/bp-legacy/buddypress-functions.php:966
5581
+ #: bp-themes/bp-default/_inc/ajax.php:628
5582
  msgid " Friendship could not be requested."
5583
  msgstr ""
5584
 
5585
+ #: bp-templates/bp-legacy/buddypress-functions.php:978
5586
+ #: bp-themes/bp-default/_inc/ajax.php:640
5587
  msgid "Friendship request could not be cancelled."
5588
  msgstr ""
5589
 
5590
+ #: bp-templates/bp-legacy/buddypress-functions.php:983
5591
+ #: bp-themes/bp-default/_inc/ajax.php:645
5592
  msgid "Request Pending"
5593
  msgstr ""
5594
 
5595
+ #: bp-templates/bp-legacy/buddypress-functions.php:1003
5596
+ #: bp-themes/bp-default/_inc/ajax.php:665
5597
  msgid "There was a problem accepting that request. Please try again."
5598
  msgstr ""
5599
 
5600
+ #: bp-templates/bp-legacy/buddypress-functions.php:1022
5601
+ #: bp-themes/bp-default/_inc/ajax.php:684
5602
  msgid "There was a problem rejecting that request. Please try again."
5603
  msgstr ""
5604
 
5605
+ #: bp-templates/bp-legacy/buddypress-functions.php:1052
5606
+ #: bp-themes/bp-default/_inc/ajax.php:714
5607
  msgid "Error joining group"
5608
  msgstr ""
5609
 
5610
+ #: bp-templates/bp-legacy/buddypress-functions.php:1061
5611
+ #: bp-themes/bp-default/_inc/ajax.php:723
5612
  msgid "Error requesting membership"
5613
  msgstr ""
5614
 
5615
+ #: bp-templates/bp-legacy/buddypress-functions.php:1063
5616
+ #: bp-themes/bp-default/_inc/ajax.php:725
5617
  msgid "Membership Requested"
5618
  msgstr ""
5619
 
5620
+ #: bp-templates/bp-legacy/buddypress-functions.php:1071
5621
+ #: bp-themes/bp-default/_inc/ajax.php:733
5622
  msgid "Error leaving group"
5623
  msgstr ""
5624
 
5625
+ #: bp-templates/bp-legacy/buddypress-functions.php:1094
5626
+ #: bp-themes/bp-default/_inc/ajax.php:756
5627
  msgid "There was a problem closing the notice."
5628
  msgstr ""
5629
 
5630
+ #: bp-templates/bp-legacy/buddypress-functions.php:1157
5631
+ #: bp-themes/bp-default/_inc/ajax.php:807
5632
  msgid "There was a problem sending that reply. Please try again."
5633
  msgstr ""
5634
 
5635
+ #: bp-templates/bp-legacy/buddypress-functions.php:1175
5636
+ #: bp-themes/bp-default/_inc/ajax.php:825
5637
  msgid "There was a problem marking messages as unread."
5638
  msgstr ""
5639
 
5640
+ #: bp-templates/bp-legacy/buddypress-functions.php:1200
5641
+ #: bp-themes/bp-default/_inc/ajax.php:850
5642
  msgid "There was a problem marking messages as read."
5643
  msgstr ""
5644
 
5645
+ #: bp-templates/bp-legacy/buddypress-functions.php:1225
5646
+ #: bp-themes/bp-default/_inc/ajax.php:875
5647
  msgid "There was a problem deleting messages."
5648
  msgstr ""
5649
 
5788
  msgid "Primary Navigation"
5789
  msgstr ""
5790
 
5791
+ #: bp-themes/bp-default/functions.php:390
5792
  msgid "The sidebar widget area"
5793
  msgstr ""
5794
 
5795
+ #: bp-themes/bp-default/functions.php:399
5796
  msgid "First Footer Widget Area"
5797
  msgstr ""
5798
 
5799
+ #: bp-themes/bp-default/functions.php:401
5800
  msgid "The first footer widget area"
5801
  msgstr ""
5802
 
5803
+ #: bp-themes/bp-default/functions.php:410
5804
  msgid "Second Footer Widget Area"
5805
  msgstr ""
5806
 
5807
+ #: bp-themes/bp-default/functions.php:412
5808
  msgid "The second footer widget area"
5809
  msgstr ""
5810
 
5811
+ #: bp-themes/bp-default/functions.php:421
5812
  msgid "Third Footer Widget Area"
5813
  msgstr ""
5814
 
5815
+ #: bp-themes/bp-default/functions.php:423
5816
  msgid "The third footer widget area"
5817
  msgstr ""
5818
 
5819
+ #: bp-themes/bp-default/functions.php:432
5820
  msgid "Fourth Footer Widget Area"
5821
  msgstr ""
5822
 
5823
+ #: bp-themes/bp-default/functions.php:434
5824
  msgid "The fourth footer widget area"
5825
  msgstr ""
5826
 
5827
  #. translators: 1: comment author url, 2: comment author name, 3: comment
5828
  #. permalink, 4: comment date/timestamp
5829
 
5830
+ #: bp-themes/bp-default/functions.php:489
5831
  msgid "<a href=\"%1$s\" rel=\"nofollow\">%2$s</a> said on <a href=\"%3$s\"><span class=\"time-since\">%4$s</span></a>"
5832
  msgstr ""
5833
 
5834
+ #: bp-themes/bp-default/functions.php:496
5835
  msgid "Your comment is awaiting moderation."
5836
  msgstr ""
5837
 
5838
+ #: bp-themes/bp-default/functions.php:508
5839
  msgid "Edit comment"
5840
  msgstr ""
5841
 
5842
+ #: bp-themes/bp-default/functions.php:578
5843
  msgid "Theme activated! This theme contains <a href=\"%s\">custom header image</a> support and <a href=\"%s\">sidebar widgets</a>."
5844
  msgstr ""
5845
 
5846
+ #: bp-themes/bp-default/functions.php:644
5847
  msgid "Email"
5848
  msgstr ""
5849
 
5850
+ #: bp-themes/bp-default/functions.php:654
5851
  msgid "You must be <a href=\"%1$s\">logged in</a> to post a comment."
5852
  msgstr ""
5853
 
5854
+ #: bp-themes/bp-default/functions.php:655
5855
  msgid "Leave a reply"
5856
  msgstr ""
5857
 
5858
+ #: bp-themes/bp-default/functions.php:742
5859
  msgid "&larr; Previous Entries"
5860
  msgstr ""
5861
 
5862
+ #: bp-themes/bp-default/functions.php:743
5863
  msgid "Next Entries &rarr;"
5864
  msgstr ""
5865
 
6064
  msgid "Group Description"
6065
  msgstr ""
6066
 
6067
+ #: bp-xprofile/bp-xprofile-classes.php:752
6068
  msgid "Please enter options for this Field:"
6069
  msgstr ""
6070
 
6071
+ #: bp-xprofile/bp-xprofile-classes.php:754
6072
  msgid "Sort Order:"
6073
  msgstr ""
6074
 
6075
+ #: bp-xprofile/bp-xprofile-classes.php:756
6076
  msgid "Custom"
6077
  msgstr ""
6078
 
6079
+ #: bp-xprofile/bp-xprofile-classes.php:757
6080
  msgid "Ascending"
6081
  msgstr ""
6082
 
6083
+ #: bp-xprofile/bp-xprofile-classes.php:758
6084
  msgid "Descending"
6085
  msgstr ""
6086
 
6087
+ #: bp-xprofile/bp-xprofile-classes.php:786
6088
+ #: bp-xprofile/bp-xprofile-classes.php:803
6089
  msgid "Default Value"
6090
  msgstr ""
6091
 
6092
+ #: bp-xprofile/bp-xprofile-classes.php:810
6093
  msgid "Add Another Option"
6094
  msgstr ""
6095
 
6096
+ #: bp-xprofile/bp-xprofile-classes.php:818
6097
  msgid "Add Field"
6098
  msgstr ""
6099
 
6100
+ #: bp-xprofile/bp-xprofile-classes.php:830
6101
  msgid "Edit Field"
6102
  msgstr ""
6103
 
6104
+ #: bp-xprofile/bp-xprofile-classes.php:837
6105
  msgid "Fields marked * are required"
6106
  msgstr ""
6107
 
6108
+ #: bp-xprofile/bp-xprofile-classes.php:850
6109
  msgid "Field Title"
6110
  msgstr ""
6111
 
6112
+ #: bp-xprofile/bp-xprofile-classes.php:857
6113
  msgid "Field Description"
6114
  msgstr ""
6115
 
6116
+ #: bp-xprofile/bp-xprofile-classes.php:866
6117
  msgid "Is This Field Required?"
6118
  msgstr ""
6119
 
6120
+ #: bp-xprofile/bp-xprofile-classes.php:868
6121
  msgid "Not Required"
6122
  msgstr ""
6123
 
6124
+ #: bp-xprofile/bp-xprofile-classes.php:869
6125
  msgid "Required"
6126
  msgstr ""
6127
 
6128
+ #: bp-xprofile/bp-xprofile-classes.php:874
6129
  msgid "Field Type"
6130
  msgstr ""
6131
 
6132
+ #: bp-xprofile/bp-xprofile-classes.php:876
6133
  msgid "Text Box"
6134
  msgstr ""
6135
 
6136
+ #: bp-xprofile/bp-xprofile-classes.php:877
6137
  msgid "Multi-line Text Box"
6138
  msgstr ""
6139
 
6140
+ #: bp-xprofile/bp-xprofile-classes.php:878
6141
  msgid "Date Selector"
6142
  msgstr ""
6143
 
6144
+ #: bp-xprofile/bp-xprofile-classes.php:879
6145
  msgid "Radio Buttons"
6146
  msgstr ""
6147
 
6148
+ #: bp-xprofile/bp-xprofile-classes.php:880
6149
  msgid "Drop Down Select Box"
6150
  msgstr ""
6151
 
6152
+ #: bp-xprofile/bp-xprofile-classes.php:881
6153
  msgid "Multi Select Box"
6154
  msgstr ""
6155
 
6156
+ #: bp-xprofile/bp-xprofile-classes.php:882
6157
  msgid "Checkboxes"
6158
  msgstr ""
6159
 
6160
+ #: bp-xprofile/bp-xprofile-classes.php:902
6161
  msgid "Default Visibility"
6162
  msgstr ""
6163
 
6164
+ #: bp-xprofile/bp-xprofile-classes.php:915
6165
  msgid "Per-Member Visibility"
6166
  msgstr ""
6167
 
6168
+ #: bp-xprofile/bp-xprofile-classes.php:917
6169
  msgid "Let members change this field's visibility"
6170
  msgstr ""
6171
 
6172
+ #: bp-xprofile/bp-xprofile-classes.php:918
6173
  msgid "Enforce the default visibility for all members"
6174
  msgstr ""
6175
 
6176
+ #: bp-xprofile/bp-xprofile-classes.php:928
6177
  msgid "or"
6178
  msgstr ""
6179
 
6180
+ #: bp-xprofile/bp-xprofile-classes.php:946
6181
  msgid "Please make sure you fill out all required fields."
6182
  msgstr ""
6183
 
6184
+ #: bp-xprofile/bp-xprofile-classes.php:949
6185
  msgid "Radio button field types require at least one option. Please add options below."
6186
  msgstr ""
6187
 
6188
+ #: bp-xprofile/bp-xprofile-classes.php:952
6189
+ #: bp-xprofile/bp-xprofile-classes.php:955
6190
  msgid "Select box field types require at least one option. Please add options below."
6191
  msgstr ""
6192
 
6193
+ #: bp-xprofile/bp-xprofile-classes.php:958
6194
  msgid "Checkbox field types require at least one option. Please add options below."
6195
  msgstr ""
6196
 
6226
  msgid "Your new avatar was uploaded successfully."
6227
  msgstr ""
6228
 
6229
+ #: bp-xprofile/bp-xprofile-template.php:681
6230
  msgid "January"
6231
  msgstr ""
6232
 
6233
+ #: bp-xprofile/bp-xprofile-template.php:682
6234
  msgid "February"
6235
  msgstr ""
6236
 
6237
+ #: bp-xprofile/bp-xprofile-template.php:683
6238
  msgid "March"
6239
  msgstr ""
6240
 
6241
+ #: bp-xprofile/bp-xprofile-template.php:684
6242
  msgid "April"
6243
  msgstr ""
6244
 
6245
+ #: bp-xprofile/bp-xprofile-template.php:685
6246
  msgid "May"
6247
  msgstr ""
6248
 
6249
+ #: bp-xprofile/bp-xprofile-template.php:686
6250
  msgid "June"
6251
  msgstr ""
6252
 
6253
+ #: bp-xprofile/bp-xprofile-template.php:687
6254
  msgid "July"
6255
  msgstr ""
6256
 
6257
+ #: bp-xprofile/bp-xprofile-template.php:688
6258
  msgid "August"
6259
  msgstr ""
6260
 
6261
+ #: bp-xprofile/bp-xprofile-template.php:689
6262
  msgid "September"
6263
  msgstr ""
6264
 
6265
+ #: bp-xprofile/bp-xprofile-template.php:690
6266
  msgid "October"
6267
  msgstr ""
6268
 
6269
+ #: bp-xprofile/bp-xprofile-template.php:691
6270
  msgid "November"
6271
  msgstr ""
6272
 
6273
+ #: bp-xprofile/bp-xprofile-template.php:692
6274
  msgid "December"
6275
  msgstr ""
6276
 
6277
+ #: bp-xprofile/bp-xprofile-template.php:875
6278
  msgid "Avatar uploads are currently disabled. Why not use a <a href=\"http://gravatar.com\" target=\"_blank\">gravatar</a> instead?"
6279
  msgstr ""
6280
 
6281
+ #: bp-xprofile/bp-xprofile-template.php:883
6282
  msgid "Profile not recently updated"
6283
  msgstr ""
6284
 
6285
+ #: bp-xprofile/bp-xprofile-template.php:893
6286
  msgid "Profile updated %s"
6287
  msgstr ""
bp-loader.php CHANGED
@@ -16,7 +16,7 @@
16
  * Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
17
  * Author: The BuddyPress Community
18
  * Author URI: http://buddypress.org/community/members/
19
- * Version: 1.7.2
20
  * Text Domain: buddypress
21
  * Domain Path: /bp-languages/
22
  * License: GPLv2 or later (license.txt)
@@ -207,7 +207,7 @@ class BuddyPress {
207
 
208
  /**
209
  * Bootstrap constants
210
- *
211
  * @since BuddyPress (1.6)
212
  *
213
  * @uses is_multisite()
@@ -223,30 +223,12 @@ class BuddyPress {
223
  if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) )
224
  require( WP_PLUGIN_DIR . '/bp-custom.php' );
225
 
226
- // Define on which blog ID BuddyPress should run
227
- if ( !defined( 'BP_ROOT_BLOG' ) ) {
228
-
229
- // Default to 1
230
- $root_blog_id = 1;
231
-
232
- // Root blog is the main site on this network
233
- if ( is_multisite() && !defined( 'BP_ENABLE_MULTIBLOG' ) ) {
234
- $current_site = get_current_site();
235
- $root_blog_id = $current_site->blog_id;
236
-
237
- // Root blog is every site on this network
238
- } elseif ( is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) ) {
239
- $root_blog_id = get_current_blog_id();
240
- }
241
-
242
- define( 'BP_ROOT_BLOG', $root_blog_id );
243
- }
244
-
245
  // Path and URL
246
- if ( !defined( 'BP_PLUGIN_DIR' ) )
247
  define( 'BP_PLUGIN_DIR', trailingslashit( WP_PLUGIN_DIR . '/buddypress' ) );
 
248
 
249
- if ( !defined( 'BP_PLUGIN_URL' ) ) {
250
  $plugin_url = plugin_dir_url( __FILE__ );
251
 
252
  // If we're using https, update the protocol. Workaround for WP13941, WP15928, WP19037.
@@ -256,6 +238,40 @@ class BuddyPress {
256
  define( 'BP_PLUGIN_URL', $plugin_url );
257
  }
258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  // The search slug has to be defined nice and early because of the way
260
  // search requests are loaded
261
  //
@@ -278,7 +294,7 @@ class BuddyPress {
278
 
279
  /** Versions **********************************************************/
280
 
281
- $this->version = '1.7.2';
282
  $this->db_version = 6080;
283
 
284
  /** Loading ***********************************************************/
@@ -424,6 +440,7 @@ class BuddyPress {
424
 
425
  // Skip or load deprecated content
426
  if ( false !== $this->load_deprecated ) {
 
427
  require( $this->plugin_dir . 'bp-core/deprecated/1.5.php' );
428
  require( $this->plugin_dir . 'bp-core/deprecated/1.6.php' );
429
  require( $this->plugin_dir . 'bp-core/deprecated/1.7.php' );
16
  * Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
17
  * Author: The BuddyPress Community
18
  * Author URI: http://buddypress.org/community/members/
19
+ * Version: 1.8-beta1
20
  * Text Domain: buddypress
21
  * Domain Path: /bp-languages/
22
  * License: GPLv2 or later (license.txt)
207
 
208
  /**
209
  * Bootstrap constants
210
+ *
211
  * @since BuddyPress (1.6)
212
  *
213
  * @uses is_multisite()
223
  if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) )
224
  require( WP_PLUGIN_DIR . '/bp-custom.php' );
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  // Path and URL
227
+ if ( ! defined( 'BP_PLUGIN_DIR' ) ) {
228
  define( 'BP_PLUGIN_DIR', trailingslashit( WP_PLUGIN_DIR . '/buddypress' ) );
229
+ }
230
 
231
+ if ( ! defined( 'BP_PLUGIN_URL' ) ) {
232
  $plugin_url = plugin_dir_url( __FILE__ );
233
 
234
  // If we're using https, update the protocol. Workaround for WP13941, WP15928, WP19037.
238
  define( 'BP_PLUGIN_URL', $plugin_url );
239
  }
240
 
241
+ // Define on which blog ID BuddyPress should run
242
+ if ( ! defined( 'BP_ROOT_BLOG' ) ) {
243
+
244
+ // Default to use current blog ID
245
+ // Fulfills non-network installs and BP_ENABLE_MULTIBLOG installs
246
+ $root_blog_id = get_current_blog_id();
247
+
248
+ // Multisite check
249
+ if ( is_multisite() ) {
250
+
251
+ // Multiblog isn't enabled
252
+ if ( ! defined( 'BP_ENABLE_MULTIBLOG' ) || ( defined( 'BP_ENABLE_MULTIBLOG' ) && (int) constant( 'BP_ENABLE_MULTIBLOG' ) === 0 ) ) {
253
+ // Check to see if BP is network-activated
254
+ // We're not using is_plugin_active_for_network() b/c you need to include the
255
+ // /wp-admin/includes/plugin.php file in order to use that function.
256
+
257
+ // get network-activated plugins
258
+ $plugins = get_site_option( 'active_sitewide_plugins');
259
+
260
+ // basename
261
+ $basename = plugin_basename( constant( 'BP_PLUGIN_DIR' ) . 'bp-loader.php' );
262
+
263
+ // plugin is network-activated; use main site ID instead
264
+ if ( isset( $plugins[ $basename ] ) ) {
265
+ $current_site = get_current_site();
266
+ $root_blog_id = $current_site->blog_id;
267
+ }
268
+ }
269
+
270
+ }
271
+
272
+ define( 'BP_ROOT_BLOG', $root_blog_id );
273
+ }
274
+
275
  // The search slug has to be defined nice and early because of the way
276
  // search requests are loaded
277
  //
294
 
295
  /** Versions **********************************************************/
296
 
297
+ $this->version = '1.8-beta1';
298
  $this->db_version = 6080;
299
 
300
  /** Loading ***********************************************************/
440
 
441
  // Skip or load deprecated content
442
  if ( false !== $this->load_deprecated ) {
443
+ require( $this->plugin_dir . 'bp-core/deprecated/1.2.php' );
444
  require( $this->plugin_dir . 'bp-core/deprecated/1.5.php' );
445
  require( $this->plugin_dir . 'bp-core/deprecated/1.6.php' );
446
  require( $this->plugin_dir . 'bp-core/deprecated/1.7.php' );
bp-members/bp-members-functions.php CHANGED
@@ -209,7 +209,7 @@ function bp_core_get_userid_from_nicename( $user_nicename ) {
209
  if ( empty( $user_nicename ) )
210
  return false;
211
 
212
- return apply_filters( 'bp_core_get_userid_from_nicename', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->users} WHERE user_nicename = %s", $user_nicename ) ) );
213
  }
214
 
215
  /**
@@ -654,11 +654,29 @@ function bp_is_user_spammer( $user_id = 0 ) {
654
  if ( empty( $user_id ) )
655
  return false;
656
 
 
 
657
  // Assume user is not spam
658
  $is_spammer = false;
659
 
660
- // Get user data
661
- $user = get_userdata( $user_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
662
 
663
  // No user found
664
  if ( empty( $user ) ) {
@@ -691,11 +709,29 @@ function bp_is_user_deleted( $user_id = 0 ) {
691
  if ( empty( $user_id ) )
692
  return false;
693
 
 
 
694
  // Assume user is not deleted
695
  $is_deleted = false;
696
 
697
- // Get user data
698
- $user = get_userdata( $user_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
699
 
700
  // No user found
701
  if ( empty( $user ) ) {
@@ -1102,8 +1138,11 @@ function bp_core_validate_user_signup( $user_name, $user_email ) {
1102
 
1103
  $illegal_names = get_site_option( 'illegal_names' );
1104
 
1105
- if ( !validate_username( $user_name ) || in_array( $user_name, (array) $illegal_names ) )
1106
- $errors->add( 'user_name', __( 'Only lowercase letters and numbers allowed', 'buddypress' ) );
 
 
 
1107
 
1108
  if( strlen( $user_name ) < 4 )
1109
  $errors->add( 'user_name', __( 'Username must be at least 4 characters', 'buddypress' ) );
@@ -1413,3 +1452,71 @@ function bp_core_wpsignup_redirect() {
1413
  bp_core_redirect( bp_get_signup_page() );
1414
  }
1415
  add_action( 'bp_init', 'bp_core_wpsignup_redirect' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  if ( empty( $user_nicename ) )
210
  return false;
211
 
212
+ return apply_filters( 'bp_core_get_userid_from_nicename', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->users} WHERE user_nicename = %s", $user_nicename ) ), $user_nicename );
213
  }
214
 
215
  /**
654
  if ( empty( $user_id ) )
655
  return false;
656
 
657
+ $bp = buddypress();
658
+
659
  // Assume user is not spam
660
  $is_spammer = false;
661
 
662
+ // Setup our user
663
+ $user = false;
664
+
665
+ // Get locally-cached data if available
666
+ switch ( $user_id ) {
667
+ case bp_loggedin_user_id() :
668
+ $user = ! empty( $bp->loggedin_user->userdata ) ? $bp->loggedin_user->userdata : false;
669
+ break;
670
+
671
+ case bp_displayed_user_id() :
672
+ $user = ! empty( $bp->displayed_user->userdata ) ? $bp->displayed_user->userdata : false;
673
+ break;
674
+ }
675
+
676
+ // Manually get userdata if still empty
677
+ if ( empty( $user ) ) {
678
+ $user = get_userdata( $user_id );
679
+ }
680
 
681
  // No user found
682
  if ( empty( $user ) ) {
709
  if ( empty( $user_id ) )
710
  return false;
711
 
712
+ $bp = buddypress();
713
+
714
  // Assume user is not deleted
715
  $is_deleted = false;
716
 
717
+ // Setup our user
718
+ $user = false;
719
+
720
+ // Get locally-cached data if available
721
+ switch ( $user_id ) {
722
+ case bp_loggedin_user_id() :
723
+ $user = ! empty( $bp->loggedin_user->userdata ) ? $bp->loggedin_user->userdata : false;
724
+ break;
725
+
726
+ case bp_displayed_user_id() :
727
+ $user = ! empty( $bp->displayed_user->userdata ) ? $bp->displayed_user->userdata : false;
728
+ break;
729
+ }
730
+
731
+ // Manually get userdata if still empty
732
+ if ( empty( $user ) ) {
733
+ $user = get_userdata( $user_id );
734
+ }
735
 
736
  // No user found
737
  if ( empty( $user ) ) {
1138
 
1139
  $illegal_names = get_site_option( 'illegal_names' );
1140
 
1141
+ if ( in_array( $user_name, (array) $illegal_names ) )
1142
+ $errors->add( 'user_name', __( 'That username is not allowed', 'buddypress' ) );
1143
+
1144
+ if ( ! validate_username( $user_name ) )
1145
+ $errors->add( 'user_name', __( 'Usernames can contain only letters, numbers, ., -, *, and @', 'buddypress' ) );
1146
 
1147
  if( strlen( $user_name ) < 4 )
1148
  $errors->add( 'user_name', __( 'Username must be at least 4 characters', 'buddypress' ) );
1452
  bp_core_redirect( bp_get_signup_page() );
1453
  }
1454
  add_action( 'bp_init', 'bp_core_wpsignup_redirect' );
1455
+
1456
+ /**
1457
+ * Stop a logged-in user who is marked as a spammer.
1458
+ *
1459
+ * When an admin marks a live user as a spammer, that user can still surf
1460
+ * around and cause havoc on the site until that person is logged out.
1461
+ *
1462
+ * This code checks to see if a logged-in user is marked as a spammer. If so,
1463
+ * we redirect the user back to wp-login.php with the 'reauth' parameter.
1464
+ *
1465
+ * This clears the logged-in spammer's cookies and will ask the spammer to
1466
+ * reauthenticate.
1467
+ *
1468
+ * Note: A spammer cannot log back in - {@see bp_core_boot_spammer()}.
1469
+ *
1470
+ * Runs on 'bp_init' at priority 5 so the members component globals are setup
1471
+ * before we do our spammer checks.
1472
+ *
1473
+ * This is important as the $bp->loggedin_user object is setup at priority 4.
1474
+ *
1475
+ * @since BuddyPress (v1.8)
1476
+ */
1477
+ function bp_stop_live_spammer() {
1478
+ // if we're on the login page, stop now to prevent redirect loop
1479
+ if ( strpos( $GLOBALS['pagenow'], 'wp-login.php' ) !== false ) {
1480
+ return;
1481
+ }
1482
+
1483
+ // user isn't logged in, so stop!
1484
+ if ( ! is_user_logged_in() ) {
1485
+ return;
1486
+ }
1487
+
1488
+ // if spammer, redirect to wp-login.php and reauthorize
1489
+ if ( bp_is_user_spammer( bp_loggedin_user_id() ) ) {
1490
+ // setup login args
1491
+ $args = array(
1492
+ // custom action used to throw an error message
1493
+ 'action' => 'bp-spam',
1494
+
1495
+ // reauthorize user to login
1496
+ 'reauth' => 1
1497
+ );
1498
+
1499
+ // setup login URL
1500
+ $login_url = apply_filters( 'bp_live_spammer_redirect', add_query_arg( $args, wp_login_url() ) );
1501
+
1502
+ // redirect user to login page
1503
+ wp_redirect( $login_url );
1504
+ die();
1505
+ }
1506
+ }
1507
+ add_action( 'bp_init', 'bp_stop_live_spammer', 5 );
1508
+
1509
+ /**
1510
+ * Show a custom error message when a logged-in user is marked as a spammer.
1511
+ *
1512
+ * @since BuddyPress (v1.8)
1513
+ */
1514
+ function bp_live_spammer_login_error() {
1515
+ global $error;
1516
+
1517
+ $error = __( '<strong>ERROR</strong>: Your account has been marked as a spammer.', 'buddypress' );
1518
+
1519
+ // shake shake shake!
1520
+ add_action( 'login_head', 'wp_shake_js', 12 );
1521
+ }
1522
+ add_action( 'login_form_bp-spam', 'bp_live_spammer_login_error' );
bp-members/bp-members-notifications.php CHANGED
@@ -119,7 +119,7 @@ function bp_core_get_notifications_for_user( $user_id, $format = 'simple' ) {
119
  continue;
120
 
121
  // Callback function exists
122
- if ( isset( $bp->{$component_name}->notification_callback ) && function_exists( $bp->{$component_name}->notification_callback ) ) {
123
 
124
  // Function should return an object
125
  if ( 'object' == $format ) {
119
  continue;
120
 
121
  // Callback function exists
122
+ if ( isset( $bp->{$component_name}->notification_callback ) && is_callable( $bp->{$component_name}->notification_callback ) ) {
123
 
124
  // Function should return an object
125
  if ( 'object' == $format ) {
bp-members/bp-members-screens.php CHANGED
@@ -266,7 +266,7 @@ add_action( 'bp_screens', 'bp_core_screen_activation' );
266
  * The main theme compat class for BuddyPress Members.
267
  *
268
  * This class sets up the necessary theme compatability actions to safely output
269
- * group template parts to the_title and the_content areas of a theme.
270
  *
271
  * @since BuddyPress (1.7)
272
  */
@@ -298,6 +298,7 @@ class BP_Members_Theme_Compat {
298
 
299
  do_action( 'bp_members_screen_index' );
300
 
 
301
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
302
  add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
303
 
@@ -310,6 +311,7 @@ class BP_Members_Theme_Compat {
310
 
311
  do_action( 'bp_members_screen_display_profile' );
312
 
 
313
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
314
  add_filter( 'bp_replace_the_content', array( $this, 'single_dummy_content' ) );
315
 
@@ -318,6 +320,29 @@ class BP_Members_Theme_Compat {
318
 
319
  /** Directory *************************************************************/
320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  /**
322
  * Update the global $post with directory data
323
  *
@@ -348,6 +373,36 @@ class BP_Members_Theme_Compat {
348
 
349
  /** Single ****************************************************************/
350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  /**
352
  * Update the global $post with the displayed user's data
353
  *
@@ -413,12 +468,38 @@ class BP_Registration_Theme_Compat {
413
  bp_update_is_directory( false, 'register' );
414
 
415
  // Setup actions
 
416
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'dummy_post' ) );
417
  add_filter( 'bp_replace_the_content', array( $this, 'dummy_content' ) );
418
  }
419
 
420
  /** Template ***********************************************************/
421
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  /**
423
  * Update the global $post with dummy data
424
  *
@@ -430,7 +511,7 @@ class BP_Registration_Theme_Compat {
430
  $title = __( 'Create an Account', 'buddypress' );
431
 
432
  if ( 'completed-confirmation' == bp_get_current_signup_step() ) {
433
- $title = __( 'Sign Up Complete!', 'buddypress' );
434
  }
435
 
436
  // Activation page
266
  * The main theme compat class for BuddyPress Members.
267
  *
268
  * This class sets up the necessary theme compatability actions to safely output
269
+ * member template parts to the_title and the_content areas of a theme.
270
  *
271
  * @since BuddyPress (1.7)
272
  */
298
 
299
  do_action( 'bp_members_screen_index' );
300
 
301
+ add_filter( 'bp_get_buddypress_template', array( $this, 'directory_template_hierarchy' ) );
302
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
303
  add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
304
 
311
 
312
  do_action( 'bp_members_screen_display_profile' );
313
 
314
+ add_filter( 'bp_get_buddypress_template', array( $this, 'single_template_hierarchy' ) );
315
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
316
  add_filter( 'bp_replace_the_content', array( $this, 'single_dummy_content' ) );
317
 
320
 
321
  /** Directory *************************************************************/
322
 
323
+ /**
324
+ * Add template hierarchy to theme compat for the members directory page.
325
+ *
326
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
327
+ *
328
+ * @since BuddyPress (1.8)
329
+ *
330
+ * @param string $templates The templates from bp_get_theme_compat_templates()
331
+ * @return array $templates Array of custom templates to look for.
332
+ */
333
+ public function directory_template_hierarchy( $templates ) {
334
+ // Setup our templates based on priority
335
+ $new_templates = apply_filters( 'bp_template_hierarchy_members_directory', array(
336
+ 'members/single/index-directory.php'
337
+ ) );
338
+
339
+ // Merge new templates with existing stack
340
+ // @see bp_get_theme_compat_templates()
341
+ $templates = array_merge( (array) $new_templates, $templates );
342
+
343
+ return $templates;
344
+ }
345
+
346
  /**
347
  * Update the global $post with directory data
348
  *
373
 
374
  /** Single ****************************************************************/
375
 
376
+ /**
377
+ * Add custom template hierarchy to theme compat for member pages.
378
+ *
379
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
380
+ *
381
+ * @since BuddyPress (1.8)
382
+ *
383
+ * @param string $templates The templates from bp_get_theme_compat_templates()
384
+ * @return array $templates Array of custom templates to look for.
385
+ */
386
+ public function single_template_hierarchy( $templates ) {
387
+ // Setup some variables we're going to reference in our custom templates
388
+ $user_nicename = buddypress()->displayed_user->userdata->user_nicename;
389
+
390
+ // Setup our templates based on priority
391
+ $new_templates = apply_filters( 'bp_template_hierarchy_members_single_item', array(
392
+ 'members/single/index-id-' . sanitize_file_name( bp_displayed_user_id() ) . '.php',
393
+ 'members/single/index-nicename-' . sanitize_file_name( $user_nicename ) . '.php',
394
+ 'members/single/index-action-' . sanitize_file_name( bp_current_action() ) . '.php',
395
+ 'members/single/index-component-' . sanitize_file_name( bp_current_component() ) . '.php',
396
+ 'members/single/index.php'
397
+ ) );
398
+
399
+ // Merge new templates with existing stack
400
+ // @see bp_get_theme_compat_templates()
401
+ $templates = array_merge( (array) $new_templates, $templates );
402
+
403
+ return $templates;
404
+ }
405
+
406
  /**
407
  * Update the global $post with the displayed user's data
408
  *
468
  bp_update_is_directory( false, 'register' );
469
 
470
  // Setup actions
471
+ add_filter( 'bp_get_buddypress_template', array( $this, 'template_hierarchy' ) );
472
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'dummy_post' ) );
473
  add_filter( 'bp_replace_the_content', array( $this, 'dummy_content' ) );
474
  }
475
 
476
  /** Template ***********************************************************/
477
 
478
+ /**
479
+ * Add template hierarchy to theme compat for registration / activation pages.
480
+ *
481
+ * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
482
+ *
483
+ * @since BuddyPress (1.8)
484
+ *
485
+ * @param string $templates The templates from bp_get_theme_compat_templates()
486
+ * @return array $templates Array of custom templates to look for.
487
+ */
488
+ public function template_hierarchy( $templates ) {
489
+ $component = sanitize_file_name( bp_current_component() );
490
+
491
+ // Setup our templates based on priority
492
+ $new_templates = apply_filters( "bp_template_hierarchy_{$component}", array(
493
+ "members/index-{$component}.php"
494
+ ) );
495
+
496
+ // Merge new templates with existing stack
497
+ // @see bp_get_theme_compat_templates()
498
+ $templates = array_merge( (array) $new_templates, $templates );
499
+
500
+ return $templates;
501
+ }
502
+
503
  /**
504
  * Update the global $post with dummy data
505
  *
511
  $title = __( 'Create an Account', 'buddypress' );
512
 
513
  if ( 'completed-confirmation' == bp_get_current_signup_step() ) {
514
+ $title = __( 'Check Your Email To Activate Your Account!', 'buddypress' );
515
  }
516
 
517
  // Activation page
bp-members/bp-members-template.php CHANGED
@@ -275,8 +275,9 @@ function bp_has_members( $args = '' ) {
275
  $search_terms = null;
276
 
277
  // User filtering
278
- if ( bp_displayed_user_id() )
279
  $user_id = bp_displayed_user_id();
 
280
 
281
  // type: active ( default ) | random | newest | popular | online | alphabetical
282
  $defaults = array(
@@ -383,8 +384,8 @@ function bp_member_user_id() {
383
  */
384
  function bp_get_member_user_id() {
385
  global $members_template;
386
-
387
- return apply_filters( 'bp_get_member_user_id', $members_template->member->id );
388
  }
389
 
390
  /**
275
  $search_terms = null;
276
 
277
  // User filtering
278
+ if ( bp_is_user_friends() && ! bp_is_user_friend_requests() ) {
279
  $user_id = bp_displayed_user_id();
280
+ }
281
 
282
  // type: active ( default ) | random | newest | popular | online | alphabetical
283
  $defaults = array(
384
  */
385
  function bp_get_member_user_id() {
386
  global $members_template;
387
+ $member_id = isset( $members_template->member->id ) ? (int) $members_template->member->id : false;
388
+ return apply_filters( 'bp_get_member_user_id', $member_id );
389
  }
390
 
391
  /**
bp-messages/bp-messages-template.php CHANGED
@@ -639,8 +639,10 @@ function bp_send_message_button() {
639
  echo bp_get_send_message_button();
640
  }
641
  function bp_get_send_message_button() {
 
 
642
  return apply_filters( 'bp_get_send_message_button',
643
- bp_get_button( array(
644
  'id' => 'private_message',
645
  'component' => 'messages',
646
  'must_be_logged_in' => true,
@@ -650,7 +652,7 @@ function bp_send_message_button() {
650
  'link_title' => __( 'Send a private message to this user.', 'buddypress' ),
651
  'link_text' => __( 'Private Message', 'buddypress' ),
652
  'link_class' => 'send-message',
653
- ) )
654
  );
655
  }
656
 
639
  echo bp_get_send_message_button();
640
  }
641
  function bp_get_send_message_button() {
642
+ // Note: 'bp_get_send_message_button' is a legacy filter. Use
643
+ // 'bp_get_send_message_button_args' instead. See #4536
644
  return apply_filters( 'bp_get_send_message_button',
645
+ bp_get_button( apply_filters( 'bp_get_send_message_button_args', array(
646
  'id' => 'private_message',
647
  'component' => 'messages',
648
  'must_be_logged_in' => true,
652
  'link_title' => __( 'Send a private message to this user.', 'buddypress' ),
653
  'link_text' => __( 'Private Message', 'buddypress' ),
654
  'link_class' => 'send-message',
655
+ ) ) )
656
  );
657
  }
658
 
bp-messages/js/autocomplete/jquery.autocompletefb.js CHANGED
@@ -38,8 +38,8 @@ jQuery.fn.autoCompletefb = function(options)
38
  return tmp.acfb;
39
  },
40
  removeUsername: function(o){
41
- var newID = o.parentNode.id.split('-');
42
- jQuery('#send-to-usernames').removeClass(newID[1]);
43
  }
44
  }
45
 
38
  return tmp.acfb;
39
  },
40
  removeUsername: function(o){
41
+ var newID = o.parentNode.id.substr( o.parentNode.id.indexOf('-')+1 );
42
+ jQuery('#send-to-usernames').removeClass(newID);
43
  }
44
  }
45
 
bp-messages/js/autocomplete/jquery.autocompletefb.min.js CHANGED
@@ -13,4 +13,4 @@
13
  * http://www.opensource.org/licenses/mit-license.php
14
  * http://www.gnu.org/licenses/gpl.html
15
  */
16
- jQuery.fn.autoCompletefb=function(b){var c=this;var d={ul:c,urlLookup:[""],acOptions:{},foundClass:".friend-tab",inputClass:".send-to-input"};if(b){jQuery.extend(d,b)}var a={params:d,removeFind:function(e){a.removeUsername(e);jQuery(e).unbind("click").parent().remove();jQuery(d.inputClass,c).focus();return c.acfb},removeUsername:function(f){var e=f.parentNode.id.split("-");jQuery("#send-to-usernames").removeClass(e[1])}};jQuery(d.foundClass+" img.p").click(function(){a.removeFind(this)});jQuery(d.inputClass,c).autocomplete(d.urlLookup,d.acOptions);jQuery(d.inputClass,c).result(function(n,o,m){var m=d.foundClass.replace(/\./,"");var o=String(o).split(" (");var j=o[1].substr(0,o[1].length-1);if(0===jQuery(d.inputClass).siblings("#un-"+j).length){var k="#link-"+j;var h=jQuery(k).attr("href");var i='<li class="'+m+'" id="un-'+j+'"><span><a href="'+h+'">'+o[0]+'</a></span> <span class="p">X</span></li>';var g=jQuery(d.inputClass,c).before(i);jQuery("#send-to-usernames").addClass(j);jQuery(".p",g[0].previousSibling).click(function(){a.removeFind(this)})}jQuery(d.inputClass,c).val("")});jQuery(d.inputClass,c).focus();return a};
13
  * http://www.opensource.org/licenses/mit-license.php
14
  * http://www.gnu.org/licenses/gpl.html
15
  */
16
+ jQuery.fn.autoCompletefb=function(b){var c=this;var d={ul:c,urlLookup:[""],acOptions:{},foundClass:".friend-tab",inputClass:".send-to-input"};if(b){jQuery.extend(d,b)}var a={params:d,removeFind:function(e){a.removeUsername(e);jQuery(e).unbind("click").parent().remove();jQuery(d.inputClass,c).focus();return c.acfb},removeUsername:function(f){var e=f.parentNode.id.substr(f.parentNode.id.indexOf("-")+1);jQuery("#send-to-usernames").removeClass(e)}};jQuery(d.foundClass+" img.p").click(function(){a.removeFind(this)});jQuery(d.inputClass,c).autocomplete(d.urlLookup,d.acOptions);jQuery(d.inputClass,c).result(function(n,o,m){var m=d.foundClass.replace(/\./,"");var o=String(o).split(" (");var j=o[1].substr(0,o[1].length-1);if(0===jQuery(d.inputClass).siblings("#un-"+j).length){var k="#link-"+j;var h=jQuery(k).attr("href");var i='<li class="'+m+'" id="un-'+j+'"><span><a href="'+h+'">'+o[0]+'</a></span> <span class="p">X</span></li>';var g=jQuery(d.inputClass,c).before(i);jQuery("#send-to-usernames").addClass(j);jQuery(".p",g[0].previousSibling).click(function(){a.removeFind(this)})}jQuery(d.inputClass,c).val("")});jQuery(d.inputClass,c).focus();return a};
bp-templates/bp-legacy/buddypress-functions.php CHANGED
@@ -99,7 +99,7 @@ class BP_Legacy extends BP_Theme_Compat {
99
  add_action( 'bp_member_header_actions', 'bp_add_friend_button', 5 );
100
 
101
  // Activity button
102
- if ( bp_is_active( 'activity' ) )
103
  add_action( 'bp_member_header_actions', 'bp_send_public_message_button', 20 );
104
 
105
  // Messages button
@@ -195,26 +195,15 @@ class BP_Legacy extends BP_Theme_Compat {
195
  public function enqueue_styles() {
196
 
197
  // LTR or RTL
198
- $file = is_rtl() ? 'css/buddypress-rtl.css' : 'css/buddypress.css';
199
 
200
- // Check child theme
201
- if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $file ) ) {
202
- $location = trailingslashit( get_stylesheet_directory_uri() );
203
- $handle = 'bp-child-css';
204
 
205
- // Check parent theme
206
- } elseif ( file_exists( trailingslashit( get_template_directory() ) . $file ) ) {
207
- $location = trailingslashit( get_template_directory_uri() );
208
- $handle = 'bp-parent-css';
209
-
210
- // BuddyPress Theme Compatibility
211
- } else {
212
- $location = trailingslashit( $this->url );
213
- $handle = 'bp-legacy-css';
214
  }
215
-
216
- // Enqueue the BuddyPress styling
217
- wp_enqueue_style( $handle, $location . $file, array(), $this->version, 'screen' );
218
  }
219
 
220
  /**
@@ -224,42 +213,33 @@ class BP_Legacy extends BP_Theme_Compat {
224
  */
225
  public function enqueue_scripts() {
226
 
227
- // LTR or RTL
228
- $file = 'js/buddypress.js';
229
-
230
- // Check child theme
231
- if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $file ) ) {
232
- $location = trailingslashit( get_stylesheet_directory_uri() );
233
- $handle = 'bp-child-js';
234
 
235
- // Check parent theme
236
- } elseif ( file_exists( trailingslashit( get_template_directory() ) . $file ) ) {
237
- $location = trailingslashit( get_template_directory_uri() );
238
- $handle = 'bp-parent-js';
239
 
240
- // BuddyPress Theme Compatibility
241
- } else {
242
- $location = trailingslashit( $this->url );
243
- $handle = 'bp-legacy-js';
244
  }
245
 
246
- // Enqueue the global JS - Ajax will not work without it
247
- wp_enqueue_script( $handle, $location . $file, array( 'jquery' ), $this->version );
248
-
249
  // Add words that we need to use in JS to the end of the page so they can be translated and still used.
250
  $params = array(
251
  'my_favs' => __( 'My Favorites', 'buddypress' ),
252
  'accepted' => __( 'Accepted', 'buddypress' ),
253
  'rejected' => __( 'Rejected', 'buddypress' ),
254
  'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
 
255
  'show_all' => __( 'Show all', 'buddypress' ),
256
  'comments' => __( 'comments', 'buddypress' ),
257
  'close' => __( 'Close', 'buddypress' ),
258
  'view' => __( 'View', 'buddypress' ),
259
  'mark_as_fav' => __( 'Favorite', 'buddypress' ),
260
- 'remove_fav' => __( 'Remove Favorite', 'buddypress' )
 
261
  );
262
- wp_localize_script( $handle, 'BP_DTheme', $params );
263
 
264
  // Maybe enqueue comment reply JS
265
  if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) {
@@ -267,6 +247,80 @@ class BP_Legacy extends BP_Theme_Compat {
267
  }
268
  }
269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  /**
271
  * Put some scripts in the header, like AJAX url for wp-lists
272
  *
@@ -416,6 +470,12 @@ function bp_legacy_theme_ajax_querystring( $query_string, $object ) {
416
  if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
417
  $qs[] = 'page=' . absint( $_POST['page'] );
418
 
 
 
 
 
 
 
419
  $object_search_text = bp_get_search_default_text( $object );
420
  if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
421
  $qs[] = 'search_terms=' . $_POST['search_terms'];
@@ -457,19 +517,26 @@ function bp_legacy_theme_object_template_loader() {
457
  if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
458
  return;
459
 
 
 
 
 
 
 
 
 
 
 
 
460
  /**
461
  * AJAX requests happen too early to be seen by bp_update_is_directory()
462
  * so we do it manually here to ensure templates load with the correct
463
  * context. Without this check, templates will load the 'single' version
464
  * of themselves rather than the directory version.
465
  */
466
-
467
  if ( ! bp_current_action() )
468
  bp_update_is_directory( true, bp_current_component() );
469
 
470
- // Sanitize the post object
471
- $object = esc_attr( $_POST['object'] );
472
-
473
  // Locate the object template
474
  bp_get_template_part( "$object/$object-loop" );
475
  exit();
99
  add_action( 'bp_member_header_actions', 'bp_add_friend_button', 5 );
100
 
101
  // Activity button
102
+ if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() )
103
  add_action( 'bp_member_header_actions', 'bp_send_public_message_button', 20 );
104
 
105
  // Messages button
195
  public function enqueue_styles() {
196
 
197
  // LTR or RTL
198
+ $file = is_rtl() ? 'buddypress-rtl.css' : 'buddypress.css';
199
 
200
+ // Locate the BP stylesheet
201
+ $asset = $this->locate_asset_in_stack( $file, 'css' );
 
 
202
 
203
+ // Enqueue BuddyPress-specific styling, if found
204
+ if ( isset( $asset['location'], $asset['handle'] ) ) {
205
+ wp_enqueue_style( $asset['handle'], $asset['location'], array(), $this->version, 'screen' );
 
 
 
 
 
 
206
  }
 
 
 
207
  }
208
 
209
  /**
213
  */
214
  public function enqueue_scripts() {
215
 
216
+ $file = 'buddypress.js';
 
 
 
 
 
 
217
 
218
+ // Locate the BP JS file
219
+ $asset = $this->locate_asset_in_stack( $file, 'js' );
 
 
220
 
221
+ // Enqueue the global JS, if found - AJAX will not work
222
+ // without it
223
+ if ( isset( $asset['location'], $asset['handle'] ) ) {
224
+ wp_enqueue_script( $asset['handle'], $asset['location'], array( 'jquery' ), $this->version );
225
  }
226
 
 
 
 
227
  // Add words that we need to use in JS to the end of the page so they can be translated and still used.
228
  $params = array(
229
  'my_favs' => __( 'My Favorites', 'buddypress' ),
230
  'accepted' => __( 'Accepted', 'buddypress' ),
231
  'rejected' => __( 'Rejected', 'buddypress' ),
232
  'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
233
+ 'show_x_comments' => __( 'Show all %d comments', 'buddypress' ),
234
  'show_all' => __( 'Show all', 'buddypress' ),
235
  'comments' => __( 'comments', 'buddypress' ),
236
  'close' => __( 'Close', 'buddypress' ),
237
  'view' => __( 'View', 'buddypress' ),
238
  'mark_as_fav' => __( 'Favorite', 'buddypress' ),
239
+ 'remove_fav' => __( 'Remove Favorite', 'buddypress' ),
240
+ 'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ),
241
  );
242
+ wp_localize_script( $asset['handle'], 'BP_DTheme', $params );
243
 
244
  // Maybe enqueue comment reply JS
245
  if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) {
247
  }
248
  }
249
 
250
+ /**
251
+ * Get the URL and handle of a web-accessible CSS or JS asset
252
+ *
253
+ * We provide two levels of customizability with respect to where CSS
254
+ * and JS files can be stored: (1) the child theme/parent theme/theme
255
+ * compat hierarchy, and (2) the "template stack" of /buddypress/css/,
256
+ * /community/css/, and /css/. In this way, CSS and JS assets can be
257
+ * overloaded, and default versions provided, in exactly the same way
258
+ * as corresponding PHP templates.
259
+ *
260
+ * We are duplicating some of the logic that is currently found in
261
+ * bp_locate_template() and the _template_stack() functions. Those
262
+ * functions were built with PHP templates in mind, and will require
263
+ * refactoring in order to provide "stack" functionality for assets
264
+ * that must be accessible both using file_exists() (the file path)
265
+ * and at a public URI.
266
+ *
267
+ * This method is marked private, with the understanding that the
268
+ * implementation is subject to change or removal in an upcoming
269
+ * release, in favor of a unified _template_stack() system. Plugin
270
+ * and theme authors should not attempt to use what follows.
271
+ *
272
+ * @since BuddyPress (1.8)
273
+ * @access private
274
+ * @param string $file A filename like buddypress.cs
275
+ * @param string $type css|js
276
+ * @return array An array of data for the wp_enqueue_* function:
277
+ * 'handle' (eg 'bp-child-css') and a 'location' (the URI of the
278
+ * asset)
279
+ */
280
+ private function locate_asset_in_stack( $file, $type = 'css' ) {
281
+ // Child, parent, theme compat
282
+ $locations = array();
283
+
284
+ // No need to check child if template == stylesheet
285
+ if ( is_child_theme() ) {
286
+ $locations['bp-child'] = array(
287
+ 'dir' => get_stylesheet_directory(),
288
+ 'uri' => get_stylesheet_directory_uri(),
289
+ );
290
+ }
291
+
292
+ $locations['bp-parent'] = array(
293
+ 'dir' => get_template_directory(),
294
+ 'uri' => get_template_directory_uri(),
295
+ );
296
+
297
+ $locations['bp-legacy'] = array(
298
+ 'dir' => bp_get_theme_compat_dir(),
299
+ 'uri' => bp_get_theme_compat_url(),
300
+ );
301
+
302
+ // Subdirectories within the top-level $locations directories
303
+ $subdirs = array(
304
+ 'buddypress/' . $type,
305
+ 'community/' . $type,
306
+ $type,
307
+ );
308
+
309
+ $retval = array();
310
+
311
+ foreach ( $locations as $location_type => $location ) {
312
+ foreach ( $subdirs as $subdir ) {
313
+ if ( file_exists( trailingslashit( $location['dir'] ) . trailingslashit( $subdir ) . $file ) ) {
314
+ $retval['location'] = trailingslashit( $location['uri'] ) . trailingslashit( $subdir ) . $file;
315
+ $retval['handle'] = $location_type . '-' . $type;
316
+ break 2;
317
+ }
318
+ }
319
+ }
320
+
321
+ return $retval;
322
+ }
323
+
324
  /**
325
  * Put some scripts in the header, like AJAX url for wp-lists
326
  *
470
  if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
471
  $qs[] = 'page=' . absint( $_POST['page'] );
472
 
473
+ // exludes activity just posted and avoids duplicate ids
474
+ if ( ! empty( $_POST['exclude_just_posted'] ) ) {
475
+ $just_posted = wp_parse_id_list( $_POST['exclude_just_posted'] );
476
+ $qs[] = 'exclude=' . implode( ',', $just_posted );
477
+ }
478
+
479
  $object_search_text = bp_get_search_default_text( $object );
480
  if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
481
  $qs[] = 'search_terms=' . $_POST['search_terms'];
517
  if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
518
  return;
519
 
520
+ // Bail if no object passed
521
+ if ( empty( $_POST['object'] ) )
522
+ return;
523
+
524
+ // Sanitize the object
525
+ $object = sanitize_title( $_POST['object'] );
526
+
527
+ // Bail if object is not an active component to prevent arbitrary file inclusion
528
+ if ( ! bp_is_active( $object ) )
529
+ return;
530
+
531
  /**
532
  * AJAX requests happen too early to be seen by bp_update_is_directory()
533
  * so we do it manually here to ensure templates load with the correct
534
  * context. Without this check, templates will load the 'single' version
535
  * of themselves rather than the directory version.
536
  */
 
537
  if ( ! bp_current_action() )
538
  bp_update_is_directory( true, bp_current_component() );
539
 
 
 
 
540
  // Locate the object template
541
  bp_get_template_part( "$object/$object-loop" );
542
  exit();
bp-templates/bp-legacy/buddypress/activity/comment.php CHANGED
@@ -24,7 +24,7 @@
24
  <div class="acomment-meta">
25
  <?php
26
  /* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
27
- printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded() );
28
  ?>
29
  </div>
30
 
24
  <div class="acomment-meta">
25
  <?php
26
  /* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
27
+ printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_comment_permalink(), bp_get_activity_comment_date_recorded() );
28
  ?>
29
  </div>
30
 
bp-templates/bp-legacy/buddypress/activity/index.php CHANGED
@@ -16,7 +16,7 @@
16
  <ul>
17
  <?php do_action( 'bp_before_activity_type_tab_all' ); ?>
18
 
19
- <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
20
 
21
  <?php if ( is_user_logged_in() ) : ?>
22
 
@@ -26,7 +26,7 @@
26
 
27
  <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
28
 
29
- <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
30
 
31
  <?php endif; ?>
32
 
@@ -38,7 +38,7 @@
38
 
39
  <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
40
 
41
- <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
42
 
43
  <?php endif; ?>
44
 
@@ -48,13 +48,17 @@
48
 
49
  <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
50
 
51
- <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php _e( "The activity I've marked as a favorite.", 'buddypress' ); ?>"><?php printf( __( 'My Favorites <span>%s</span>', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
52
 
53
  <?php endif; ?>
54
 
55
- <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
56
 
57
- <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '<span>%s new</span>', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></strong><?php endif; ?></a></li>
 
 
 
 
58
 
59
  <?php endif; ?>
60
 
16
  <ul>
17
  <?php do_action( 'bp_before_activity_type_tab_all' ); ?>
18
 
19
+ <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), number_format_i18n( bp_get_total_member_count() ) ); ?></a></li>
20
 
21
  <?php if ( is_user_logged_in() ) : ?>
22
 
26
 
27
  <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
28
 
29
+ <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), number_format_i18n( bp_get_total_friend_count( bp_loggedin_user_id() ) ) ); ?></a></li>
30
 
31
  <?php endif; ?>
32
 
38
 
39
  <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
40
 
41
+ <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), number_format_i18n( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ); ?></a></li>
42
 
43
  <?php endif; ?>
44
 
48
 
49
  <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
50
 
51
+ <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php _e( "The activity I've marked as a favorite.", 'buddypress' ); ?>"><?php printf( __( 'My Favorites <span>%s</span>', 'buddypress' ), number_format_i18n( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) ); ?></a></li>
52
 
53
  <?php endif; ?>
54
 
55
+ <?php if ( bp_activity_do_mentions() ) : ?>
56
 
57
+ <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
58
+
59
+ <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), number_format_i18n( bp_get_total_mention_count_for_user( bp_loggedin_user_id() )) ); ?></span></strong><?php endif; ?></a></li>
60
+
61
+ <?php endif; ?>
62
 
63
  <?php endif; ?>
64
 
bp-templates/bp-legacy/buddypress/groups/single/admin.php CHANGED
@@ -22,9 +22,9 @@
22
  <?php do_action( 'groups_custom_group_fields_editable' ); ?>
23
 
24
  <p>
25
- <label for="group-notifiy-members"><?php _e( 'Notify group members of changes via email', 'buddypress' ); ?></label>
26
- <input type="radio" name="group-notify-members" value="1" /> <?php _e( 'Yes', 'buddypress' ); ?>&nbsp;
27
- <input type="radio" name="group-notify-members" value="0" checked="checked" /> <?php _e( 'No', 'buddypress' ); ?>&nbsp;
28
  </p>
29
 
30
  <?php do_action( 'bp_after_group_details_admin' ); ?>
@@ -87,30 +87,30 @@
87
  </label>
88
  </div>
89
 
90
- <hr />
91
-
92
- <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
93
 
94
- <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
95
 
96
- <div class="radio">
97
- <label>
98
- <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
99
- <strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
100
- </label>
101
 
102
- <label>
103
- <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
104
- <strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
 
105
  </label>
106
-
107
- <label>
108
- <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
109
- <strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
110
- </label>
111
- </div>
112
 
113
- <hr />
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  <?php do_action( 'bp_after_group_settings_admin' ); ?>
116
 
@@ -172,14 +172,14 @@
172
  <?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?>
173
 
174
  <?php do_action( 'bp_before_group_manage_members_admin' ); ?>
175
-
176
  <div class="bp-widget">
177
  <h4><?php _e( 'Administrators', 'buddypress' ); ?></h4>
178
 
179
  <?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
180
-
181
  <ul id="admins-list" class="item-list single-line">
182
-
183
  <?php while ( bp_members() ) : bp_the_member(); ?>
184
  <li>
185
  <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
@@ -188,26 +188,26 @@
188
  <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
189
  <span class="small">
190
  <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
191
- </span>
192
  <?php endif; ?>
193
- </h5>
194
  </li>
195
  <?php endwhile; ?>
196
-
197
  </ul>
198
-
199
  <?php endif; ?>
200
 
201
  </div>
202
-
203
  <?php if ( bp_group_has_moderators() ) : ?>
204
  <div class="bp-widget">
205
- <h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>
206
-
207
  <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
208
  <ul id="mods-list" class="item-list single-line">
209
-
210
- <?php while ( bp_members() ) : bp_the_member(); ?>
211
  <li>
212
  <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
213
  <h5>
@@ -215,13 +215,13 @@
215
  <span class="small">
216
  <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
217
  <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
218
- </span>
219
- </h5>
220
- </li>
221
- <?php endwhile; ?>
222
-
223
  </ul>
224
-
225
  <?php endif; ?>
226
  </div>
227
  <?php endif ?>
22
  <?php do_action( 'groups_custom_group_fields_editable' ); ?>
23
 
24
  <p>
25
+ <label for="group-notifiy-members">
26
+ <input type="checkbox" name="group-notify-members" value="1" /> <?php _e( 'Notify group members of these changes via email', 'buddypress' ); ?>
27
+ </label>
28
  </p>
29
 
30
  <?php do_action( 'bp_after_group_details_admin' ); ?>
87
  </label>
88
  </div>
89
 
90
+ <hr />
 
 
91
 
92
+ <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
93
 
94
+ <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
 
 
 
 
95
 
96
+ <div class="radio">
97
+ <label>
98
+ <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
99
+ <strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
100
  </label>
 
 
 
 
 
 
101
 
102
+ <label>
103
+ <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
104
+ <strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
105
+ </label>
106
+
107
+ <label>
108
+ <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
109
+ <strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
110
+ </label>
111
+ </div>
112
+
113
+ <hr />
114
 
115
  <?php do_action( 'bp_after_group_settings_admin' ); ?>
116
 
172
  <?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?>
173
 
174
  <?php do_action( 'bp_before_group_manage_members_admin' ); ?>
175
+
176
  <div class="bp-widget">
177
  <h4><?php _e( 'Administrators', 'buddypress' ); ?></h4>
178
 
179
  <?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
180
+
181
  <ul id="admins-list" class="item-list single-line">
182
+
183
  <?php while ( bp_members() ) : bp_the_member(); ?>
184
  <li>
185
  <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
188
  <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
189
  <span class="small">
190
  <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
191
+ </span>
192
  <?php endif; ?>
193
+ </h5>
194
  </li>
195
  <?php endwhile; ?>
196
+
197
  </ul>
198
+
199
  <?php endif; ?>
200
 
201
  </div>
202
+
203
  <?php if ( bp_group_has_moderators() ) : ?>
204
  <div class="bp-widget">
205
+ <h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>
206
+
207
  <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
208
  <ul id="mods-list" class="item-list single-line">
209
+
210
+ <?php while ( bp_members() ) : bp_the_member(); ?>
211
  <li>
212
  <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
213
  <h5>
215
  <span class="small">
216
  <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
217
  <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
218
+ </span>
219
+ </h5>
220
+ </li>
221
+ <?php endwhile; ?>
222
+
223
  </ul>
224
+
225
  <?php endif; ?>
226
  </div>
227
  <?php endif ?>
bp-templates/bp-legacy/buddypress/members/activate.php CHANGED
@@ -13,7 +13,7 @@
13
  <?php if ( isset( $_GET['e'] ) ) : ?>
14
  <p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p>
15
  <?php else : ?>
16
- <p><?php _e( 'Your account was activated successfully! You can now log in with the username and password you provided when you signed up.', 'buddypress' ); ?></p>
17
  <?php endif; ?>
18
 
19
  <?php else : ?>
13
  <?php if ( isset( $_GET['e'] ) ) : ?>
14
  <p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p>
15
  <?php else : ?>
16
+ <p><?php printf( __( 'Your account was activated successfully! You can now <a href="%s">log in</a> with the username and password you provided when you signed up.', 'buddypress' ), wp_login_url( bp_get_root_domain() ) ); ?></p>
17
  <?php endif; ?>
18
 
19
  <?php else : ?>
bp-templates/bp-legacy/buddypress/members/index.php CHANGED
@@ -10,6 +10,8 @@
10
  <?php bp_directory_members_search_form(); ?>
11
  </div><!-- #members-dir-search -->
12
 
 
 
13
  <form action="" method="post" id="members-directory-form" class="dir-form">
14
 
15
  <div class="item-list-tabs" role="navigation">
10
  <?php bp_directory_members_search_form(); ?>
11
  </div><!-- #members-dir-search -->
12
 
13
+ <?php do_action( 'bp_before_directory_members_tabs' ); ?>
14
+
15
  <form action="" method="post" id="members-directory-form" class="dir-form">
16
 
17
  <div class="item-list-tabs" role="navigation">
bp-templates/bp-legacy/buddypress/members/register.php CHANGED
@@ -69,7 +69,7 @@
69
  <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
70
 
71
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
72
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
73
  <input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" />
74
 
75
  <?php endif; ?>
@@ -77,7 +77,7 @@
77
  <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
78
 
79
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
80
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
81
  <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea>
82
 
83
  <?php endif; ?>
@@ -85,7 +85,7 @@
85
  <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
86
 
87
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
88
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
89
  <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
90
  <?php bp_the_profile_field_options(); ?>
91
  </select>
@@ -95,7 +95,7 @@
95
  <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
96
 
97
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
98
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
99
  <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple">
100
  <?php bp_the_profile_field_options(); ?>
101
  </select>
@@ -107,7 +107,7 @@
107
  <div class="radio">
108
  <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
109
 
110
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
111
  <?php bp_the_profile_field_options(); ?>
112
 
113
  <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
@@ -122,7 +122,7 @@
122
  <div class="checkbox">
123
  <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
124
 
125
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
126
  <?php bp_the_profile_field_options(); ?>
127
  </div>
128
 
@@ -132,7 +132,7 @@
132
 
133
  <div class="datebox">
134
  <label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
135
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
136
 
137
  <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day">
138
  <?php bp_the_profile_field_options( 'type=day' ); ?>
@@ -210,7 +210,7 @@
210
  <?php if ( is_subdomain_install() ) : ?>
211
  http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
212
  <?php else : ?>
213
- <?php echo site_url(); ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
214
  <?php endif; ?>
215
 
216
  <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
69
  <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
70
 
71
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
72
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
73
  <input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" />
74
 
75
  <?php endif; ?>
77
  <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
78
 
79
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
80
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
81
  <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea>
82
 
83
  <?php endif; ?>
85
  <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
86
 
87
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
88
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
89
  <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
90
  <?php bp_the_profile_field_options(); ?>
91
  </select>
95
  <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
96
 
97
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
98
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
99
  <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple">
100
  <?php bp_the_profile_field_options(); ?>
101
  </select>
107
  <div class="radio">
108
  <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
109
 
110
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
111
  <?php bp_the_profile_field_options(); ?>
112
 
113
  <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
122
  <div class="checkbox">
123
  <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
124
 
125
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
126
  <?php bp_the_profile_field_options(); ?>
127
  </div>
128
 
132
 
133
  <div class="datebox">
134
  <label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
135
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
136
 
137
  <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day">
138
  <?php bp_the_profile_field_options( 'type=day' ); ?>
210
  <?php if ( is_subdomain_install() ) : ?>
211
  http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
212
  <?php else : ?>
213
+ <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
214
  <?php endif; ?>
215
 
216
  <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
bp-templates/bp-legacy/buddypress/members/single/home.php CHANGED
@@ -20,7 +20,7 @@
20
  </div>
21
  </div><!-- #item-nav -->
22
 
23
- <div id="item-body">
24
 
25
  <?php do_action( 'bp_before_member_body' );
26
 
20
  </div>
21
  </div><!-- #item-nav -->
22
 
23
+ <div id="item-body" role="main">
24
 
25
  <?php do_action( 'bp_before_member_body' );
26
 
bp-templates/bp-legacy/buddypress/members/single/profile.php CHANGED
@@ -9,17 +9,11 @@
9
 
10
  ?>
11
 
12
- <?php if ( bp_is_my_profile() ) : ?>
13
-
14
- <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
15
- <ul>
16
-
17
- <?php bp_get_options_nav(); ?>
18
-
19
- </ul>
20
- </div><!-- .item-list-tabs -->
21
-
22
- <?php endif; ?>
23
 
24
  <?php do_action( 'bp_before_profile_content' ); ?>
25
 
9
 
10
  ?>
11
 
12
+ <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
13
+ <ul>
14
+ <?php bp_get_options_nav(); ?>
15
+ </ul>
16
+ </div><!-- .item-list-tabs -->
 
 
 
 
 
 
17
 
18
  <?php do_action( 'bp_before_profile_content' ); ?>
19
 
bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php CHANGED
@@ -1,34 +1,22 @@
1
- <div id="buddypress">
2
 
3
- <?php do_action( 'bp_before_member_settings_template' ); ?>
4
 
5
- <div id="item-body" role="main">
6
 
7
- <?php do_action( 'bp_before_member_body' ); ?>
 
 
 
8
 
9
- <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/capabilities/'; ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post">
 
 
10
 
11
- <?php do_action( 'bp_members_capabilities_account_before_submit' ); ?>
12
 
13
- <label>
14
- <input type="checkbox" name="user-spammer" id="user-spammer" value="1" <?php checked( bp_is_user_spammer( bp_displayed_user_id() ) ); ?> />
15
- <?php _e( 'This user is a spammer.', 'buddypress' ); ?>
16
- </label>
17
 
18
- <div class="submit">
19
- <input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" id="capabilities-submit" name="capabilities-submit" />
20
- </div>
21
 
22
- <?php do_action( 'bp_members_capabilities_account_after_submit' ); ?>
23
-
24
- <?php wp_nonce_field( 'capabilities' ); ?>
25
-
26
- </form>
27
-
28
- <?php do_action( 'bp_after_member_body' ); ?>
29
-
30
- </div><!-- #item-body -->
31
-
32
- <?php do_action( 'bp_after_member_settings_template' ); ?>
33
-
34
- </div><!-- #buddypress -->
1
+ <?php do_action( 'bp_before_member_settings_template' ); ?>
2
 
3
+ <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/capabilities/'; ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post">
4
 
5
+ <?php do_action( 'bp_members_capabilities_account_before_submit' ); ?>
6
 
7
+ <label>
8
+ <input type="checkbox" name="user-spammer" id="user-spammer" value="1" <?php checked( bp_is_user_spammer( bp_displayed_user_id() ) ); ?> />
9
+ <?php _e( 'This user is a spammer.', 'buddypress' ); ?>
10
+ </label>
11
 
12
+ <div class="submit">
13
+ <input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" id="capabilities-submit" name="capabilities-submit" />
14
+ </div>
15
 
16
+ <?php do_action( 'bp_members_capabilities_account_after_submit' ); ?>
17
 
18
+ <?php wp_nonce_field( 'capabilities' ); ?>
 
 
 
19
 
20
+ </form>
 
 
21
 
22
+ <?php do_action( 'bp_after_member_settings_template' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php CHANGED
@@ -1,48 +1,36 @@
1
- <div id="buddypress">
2
 
3
- <?php do_action( 'bp_before_member_settings_template' ); ?>
4
 
5
- <div id="item-body" role="main">
6
 
7
- <?php do_action( 'bp_before_member_body' ); ?>
8
 
9
- <div id="message" class="info">
10
 
11
- <?php if ( bp_is_my_profile() ) : ?>
12
 
13
- <p><?php _e( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
14
 
15
- <?php else : ?>
16
 
17
- <p><?php _e( 'Deleting this account will delete all of the content it has created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
18
 
19
- <?php endif; ?>
20
 
21
- </div>
 
 
 
22
 
23
- <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account'; ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post">
 
 
24
 
25
- <?php do_action( 'bp_members_delete_account_before_submit' ); ?>
26
 
27
- <label>
28
- <input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" />
29
- <?php _e( 'I understand the consequences.', 'buddypress' ); ?>
30
- </label>
31
 
32
- <div class="submit">
33
- <input type="submit" disabled="disabled" value="<?php _e( 'Delete Account', 'buddypress' ); ?>" id="delete-account-button" name="delete-account-button" />
34
- </div>
35
 
36
- <?php do_action( 'bp_members_delete_account_after_submit' ); ?>
37
-
38
- <?php wp_nonce_field( 'delete-account' ); ?>
39
-
40
- </form>
41
-
42
- <?php do_action( 'bp_after_member_body' ); ?>
43
-
44
- </div><!-- #item-body -->
45
-
46
- <?php do_action( 'bp_after_member_settings_template' ); ?>
47
-
48
- </div><!-- #buddypress -->
1
+ <?php do_action( 'bp_before_member_settings_template' ); ?>
2
 
3
+ <div id="message" class="info">
4
 
5
+ <?php if ( bp_is_my_profile() ) : ?>
6
 
7
+ <p><?php _e( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
8
 
9
+ <?php else : ?>
10
 
11
+ <p><?php _e( 'Deleting this account will delete all of the content it has created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
12
 
13
+ <?php endif; ?>
14
 
15
+ </div>
16
 
17
+ <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account'; ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post">
18
 
19
+ <?php do_action( 'bp_members_delete_account_before_submit' ); ?>
20
 
21
+ <label>
22
+ <input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" />
23
+ <?php _e( 'I understand the consequences.', 'buddypress' ); ?>
24
+ </label>
25
 
26
+ <div class="submit">
27
+ <input type="submit" disabled="disabled" value="<?php _e( 'Delete Account', 'buddypress' ); ?>" id="delete-account-button" name="delete-account-button" />
28
+ </div>
29
 
30
+ <?php do_action( 'bp_members_delete_account_after_submit' ); ?>
31
 
32
+ <?php wp_nonce_field( 'delete-account' ); ?>
 
 
 
33
 
34
+ </form>
 
 
35
 
36
+ <?php do_action( 'bp_after_member_settings_template' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
bp-templates/bp-legacy/buddypress/members/single/settings/general.php CHANGED
@@ -1,45 +1,31 @@
1
- <div id="buddypress">
2
 
3
- <?php do_action( 'bp_before_member_settings_template' ); ?>
4
 
5
- <div id="item-body" role="main">
6
 
7
- <?php do_action( 'bp_before_member_body' ); ?>
 
8
 
9
- <?php do_action( 'bp_template_content' ); ?>
10
 
11
- <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/general'; ?>" method="post" class="standard-form" id="settings-form">
 
12
 
13
- <?php if ( !is_super_admin() ) : ?>
 
 
14
 
15
- <label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
16
- <input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo site_url( add_query_arg( array( 'action' => 'lostpassword' ), 'wp-login.php' ), 'login' ); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
17
 
18
- <?php endif; ?>
 
 
19
 
20
- <label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label>
21
- <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" />
22
 
23
- <label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ); ?></label>
24
- <input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'New Password', 'buddypress' ); ?><br />
25
- <input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'Repeat New Password', 'buddypress' ); ?>
26
 
27
- <?php do_action( 'bp_core_general_settings_before_submit' ); ?>
28
 
29
- <div class="submit">
30
- <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
31
- </div>
32
-
33
- <?php do_action( 'bp_core_general_settings_after_submit' ); ?>
34
-
35
- <?php wp_nonce_field( 'bp_settings_general' ); ?>
36
-
37
- </form>
38
-
39
- <?php do_action( 'bp_after_member_body' ); ?>
40
-
41
- </div><!-- #item-body -->
42
-
43
- <?php do_action( 'bp_after_member_settings_template' ); ?>
44
-
45
- </div><!-- #buddypress -->
1
+ <?php do_action( 'bp_before_member_settings_template' ); ?>
2
 
3
+ <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/general'; ?>" method="post" class="standard-form" id="settings-form">
4
 
5
+ <?php if ( !is_super_admin() ) : ?>
6
 
7
+ <label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
8
+ <input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo wp_lostpassword_url(); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
9
 
10
+ <?php endif; ?>
11
 
12
+ <label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label>
13
+ <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" />
14
 
15
+ <label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ); ?></label>
16
+ <input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'New Password', 'buddypress' ); ?><br />
17
+ <input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'Repeat New Password', 'buddypress' ); ?>
18
 
19
+ <?php do_action( 'bp_core_general_settings_before_submit' ); ?>
 
20
 
21
+ <div class="submit">
22
+ <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
23
+ </div>
24
 
25
+ <?php do_action( 'bp_core_general_settings_after_submit' ); ?>
 
26
 
27
+ <?php wp_nonce_field( 'bp_settings_general' ); ?>
 
 
28
 
29
+ </form>
30
 
31
+ <?php do_action( 'bp_after_member_settings_template' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php CHANGED
@@ -1,34 +1,20 @@
1
- <div id="buddypress">
2
 
3
- <?php do_action( 'bp_before_member_settings_template' ); ?>
 
4
 
5
- <div id="item-body" role="main">
6
 
7
- <?php do_action( 'bp_before_member_body' ); ?>
8
 
9
- <?php do_action( 'bp_template_content' ); ?>
 
 
10
 
11
- <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/notifications'; ?>" method="post" class="standard-form" id="settings-form">
12
- <p><?php _e( 'Send a notification by email when:', 'buddypress' ); ?></p>
13
 
14
- <?php do_action( 'bp_notification_settings' ); ?>
15
 
16
- <?php do_action( 'bp_members_notification_settings_before_submit' ); ?>
17
 
18
- <div class="submit">
19
- <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
20
- </div>
21
-
22
- <?php do_action( 'bp_members_notification_settings_after_submit' ); ?>
23
-
24
- <?php wp_nonce_field('bp_settings_notifications' ); ?>
25
-
26
- </form>
27
-
28
- <?php do_action( 'bp_after_member_body' ); ?>
29
-
30
- </div><!-- #item-body -->
31
-
32
- <?php do_action( 'bp_after_member_settings_template' ); ?>
33
-
34
- </div><!-- #buddypress -->
1
+ <?php do_action( 'bp_before_member_settings_template' ); ?>
2
 
3
+ <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/notifications'; ?>" method="post" class="standard-form" id="settings-form">
4
+ <p><?php _e( 'Send a notification by email when:', 'buddypress' ); ?></p>
5
 
6
+ <?php do_action( 'bp_notification_settings' ); ?>
7
 
8
+ <?php do_action( 'bp_members_notification_settings_before_submit' ); ?>
9
 
10
+ <div class="submit">
11
+ <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
12
+ </div>
13
 
14
+ <?php do_action( 'bp_members_notification_settings_after_submit' ); ?>
 
15
 
16
+ <?php wp_nonce_field('bp_settings_notifications' ); ?>
17
 
18
+ </form>
19
 
20
+ <?php do_action( 'bp_after_member_settings_template' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bp-templates/bp-legacy/css/buddypress.css CHANGED
@@ -4,36 +4,35 @@ Hello, this is the BuddyPress Legacy stylesheet.
4
  ----------------------------------------------------------------
5
  >>> TABLE OF CONTENTS:
6
  ----------------------------------------------------------------
7
- 4.0 - Navigation
8
- 4.1 - Pagination
9
- 5.0 - WordPress
10
- 5.1 - Alignments
11
- 5.2 - Comments
12
- 5.3 - Gallery
13
- 5.4 - Images
14
- 5.5 - Posts
15
- 6.0 - BuddyPress
16
- 6.1 - Activity
17
- 6.1.1 - Activity Listing
18
- 6.1.2 - Activity Comments
19
- 6.2 - Toolbar
20
- 6.3 - Directories - Members, Groups, Blogs, Forums
21
- 6.4 - Error / Success Messages
22
- 6.5 - Forms
23
- 6.6 - Ajax Loading
24
- 6.7 - Topics and Tables - Forums and General
25
- 6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
26
- 6.9 - Private Messaging Threads
27
- 6.10 - Extended Profiles
28
- 6.11 - Widgets
29
- 7.0 - Media Queries
30
- 7.1 - Smartphones Landscape
31
- 7.2 - Smartphones Portrait
32
- 7.3 - Smartphones - smaller screen sizes
33
  --------------------------------------------------------------*/
34
 
35
  /*--------------------------------------------------------------
36
- 4.1 - Pagination
 
 
 
37
  --------------------------------------------------------------*/
38
  #buddypress div.pagination {
39
  background: transparent;
@@ -72,9 +71,11 @@ Hello, this is the BuddyPress Legacy stylesheet.
72
  #buddypress .paged #nav-above {
73
  display: block;
74
  }
75
-
76
  /*--------------------------------------------------------------
77
- 5.4 - Images
 
 
 
78
  --------------------------------------------------------------*/
79
  #buddypress img.wp-smiley {
80
  border: none !important;
@@ -85,10 +86,10 @@ Hello, this is the BuddyPress Legacy stylesheet.
85
  }
86
 
87
  /*--------------------------------------------------------------
88
- 6.0 - BuddyPress
89
  --------------------------------------------------------------*/
90
  /*--------------------------------------------------------------
91
- 6.1 - Activity
92
  --------------------------------------------------------------*/
93
  #buddypress #activity-stream {
94
  margin-top: -5px;
@@ -120,10 +121,6 @@ Hello, this is the BuddyPress Legacy stylesheet.
120
  }
121
  #buddypress form#whats-new-form textarea {
122
  background: #fff;
123
- border: 1px inset #ccc;
124
- -moz-border-radius: 3px;
125
- -webkit-border-radius: 3px;
126
- border-radius: 3px;
127
  color: #555;
128
  font-family: inherit;
129
  font-size: 90%;
@@ -152,13 +149,10 @@ body.no-js #buddypress #whats-new-options {
152
  #buddypress #whats-new:focus {
153
  border-color: rgba(31, 179, 221, 0.9) !important;
154
  outline-color: rgba(31, 179, 221, 0.9);
155
- box-shadow: 0 0 7px rgba(31, 179, 221, 0.7);
156
- -moz-box-shadow: 0 0 7px rgba(31, 179, 221, 0.7);
157
- -webkit-box-shadow: 0 0 7px rgba(31, 179, 221, 0.7);
158
  }
159
 
160
  /*--------------------------------------------------------------
161
- 6.1.1 - Activity Listing
162
  --------------------------------------------------------------*/
163
  #buddypress ul.activity-list li {
164
  overflow: hidden;
@@ -309,7 +303,7 @@ body.activity-permalink #buddypress .activity-content blockquote {
309
 
310
 
311
  /*--------------------------------------------------------------
312
- 6.1.2 - Activity Comments
313
  --------------------------------------------------------------*/
314
  #buddypress div.activity-meta {
315
  margin: 18px 0 0;
@@ -318,7 +312,6 @@ body.activity-permalink #buddypress div.activity-meta {
318
  margin-bottom: 6px;
319
  }
320
  #buddypress div.activity-meta a {
321
- font: normal 11px/20px Arial, Tahoma, Verdana, sans-serif;
322
  padding: 4px 8px;
323
  }
324
  #buddypress a.activity-time-since {
@@ -338,7 +331,6 @@ body.activity-permalink #buddypress div.activity-meta {
338
  #buddypress a.bp-primary-action span,
339
  #buddypress #reply-title small a span {
340
  background: #999;
341
- border-radius: 3px;
342
  color: #fff;
343
  font-size: 90%;
344
  margin-left: 2px;
@@ -443,7 +435,6 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
443
  #buddypress div.activity-comments form .ac-textarea {
444
  background: #fff;
445
  border: 1px inset #ccc;
446
- border-radius: 3px;
447
  margin-bottom: 10px;
448
  padding: 8px;
449
  }
@@ -489,7 +480,7 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
489
  }
490
 
491
  /*--------------------------------------------------------------
492
- 6.3 - Directories - Members, Groups, Blogs, Forums
493
  --------------------------------------------------------------*/
494
  #buddypress div.dir-search {
495
  float: right;
@@ -505,7 +496,7 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
505
  }
506
 
507
  /*--------------------------------------------------------------
508
- 6.4 - Errors / Success Messages
509
  --------------------------------------------------------------*/
510
  #buddypress div#message {
511
  margin: 0 0 15px;
@@ -523,21 +514,15 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
523
  padding: 10px 15px;
524
  }
525
  #buddypress div#message.error p {
526
- background-color: #db1717;
527
- border-color: #a71a1a;
528
  clear: left;
529
  color: #fff;
530
  }
531
  #buddypress div#message.updated p {
532
- background-color: #8ff57a;
533
- border-color: #80cf70;
534
- color: #1a6a00;
535
  }
536
  #buddypress .standard-form#signup_form div div.error {
537
- background: #e41717;
538
- -moz-border-radius: 3px;
539
- -webkit-border-radius: 3px;
540
- border-radius: 3px;
541
  color: #fff;
542
  margin: 0 0 10px 0;
543
  padding: 6px;
@@ -572,15 +557,29 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
572
  }
573
 
574
  /*--------------------------------------------------------------
575
- 6.5 - Forms
576
  --------------------------------------------------------------*/
577
  #buddypress .standard-form textarea,
578
  #buddypress .standard-form input[type=text],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  #buddypress .standard-form select,
580
  #buddypress .standard-form input[type=password],
581
- #buddypress .dir-search input[type=text] {
 
582
  border: 1px inset #ccc;
583
- border-radius: 3px;
584
  color: #888;
585
  font: inherit;
586
  font-size: 100%;
@@ -710,25 +709,14 @@ body.activity-permalink #buddypress div.activity-comments div.acomment-content {
710
  #buddypress .comment-reply-link,
711
  a.bp-title-button {
712
  background: #fff; /* Old browsers */
713
- background: -moz-linear-gradient(top, #ffffff 0%, #ededed 100%); /* FF3.6+ */
714
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
715
- background: -webkit-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Chrome10+,Safari5.1+ */
716
- background: -o-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Opera11.10+ */
717
- background: -ms-linear-gradient(top, #ffffff 0%,#ededed 100%); /* IE10+ */
718
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
719
- background: linear-gradient(top, #ffffff 0%,#ededed 100%); /* W3C */
720
  border: 1px solid #ccc;
721
- -moz-border-radius: 3px;
722
- -webkit-border-radius: 3px;
723
- border-radius: 3px;
724
  color: #777;
 
725
  cursor: pointer;
726
- font: normal 12px/20px Arial, Tahoma, Verdana, sans-serif;
727
  outline: none;
728
  padding: 4px 10px;
729
  text-align: center;
730
  text-decoration: none;
731
- line-height: 14px;
732
  }
733
  #buddypress button:hover,
734
  #buddypress a.button:hover,
@@ -741,30 +729,45 @@ a.bp-title-button {
741
  #buddypress div.generic-button a:hover,
742
  #buddypress .comment-reply-link:hover {
743
  background: #ededed;
744
- background: -moz-linear-gradient(top, #ffffff 0%, #e0e0e0 100%); /* FF3.6+ */
745
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e0e0e0)); /* Chrome,Safari4+ */
746
- background: -webkit-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* Chrome10+,Safari5.1+ */
747
- background: -o-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* Opera11.10+ */
748
- background: -ms-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* IE10+ */
749
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */
750
- background: linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* W3C */
751
  border: 1px solid #bbb;
752
  color: #555;
753
  outline: none;
754
  text-decoration: none;
755
  }
756
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
757
  /*--------------------------------------------------------------
758
- 6.6 - Ajax Loading
759
  --------------------------------------------------------------*/
760
  #buddypress a.loading,
761
  #buddypress input.loading {
762
  -webkit-animation: loader-pulsate .5s infinite ease-in-out alternate;
763
  -moz-animation: loader-pulsate .5s infinite ease-in-out alternate;
764
  border-color: #aaa;
765
- -moz-box-shadow: 0 0 6px #ccc;
766
- -webkit-box-shadow: 0 0 6px #ccc;
767
- box-shadow: 0 0 6px #ccc;
768
  }
769
  @-webkit-keyframes loader-pulsate {
770
  from {
@@ -819,19 +822,12 @@ a.bp-title-button {
819
  #buddypress button.disabled:hover,
820
  #buddypress div.pending a:hover,
821
  #buddypress a.disabled:hover {
822
- background: -moz-linear-gradient(top, #ffffff 0%, #ededed 100%); /* FF3.6+ */
823
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
824
- background: -webkit-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Chrome10+,Safari5.1+ */
825
- background: -o-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Opera11.10+ */
826
- background: -ms-linear-gradient(top, #ffffff 0%,#ededed 100%); /* IE10+ */
827
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
828
- background: linear-gradient(top, #ffffff 0%,#ededed 100%); /* W3C */
829
- border-color: #eee;
830
  color: #bbb;
831
  }
832
 
833
  /*--------------------------------------------------------------
834
- 6.7 - Forums, Tables and Topics
835
  --------------------------------------------------------------*/
836
  #buddypress ul#topic-post-list {
837
  margin: 0;
@@ -1011,7 +1007,7 @@ a.bp-title-button {
1011
  }
1012
 
1013
  /*-------------------------------------------------------------------------
1014
- 6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums, Profiles
1015
  -------------------------------------------------------------------------*/
1016
  #buddypress .item-body {
1017
  margin: 20px 0;
@@ -1030,20 +1026,10 @@ a.bp-title-button {
1030
  }
1031
  #buddypress div#message p,
1032
  #sitewide-notice p {
1033
- border: 1px solid #e1ca82;
1034
- -moz-border-radius: 3px;
1035
- -webkit-border-radius: 3px;
1036
- border-radius: 3px;
1037
  font-weight: normal;
1038
  margin-top: 3px;
1039
  text-decoration: none;
1040
- background: #ffeaa6;
1041
- background-image: -webkit-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
1042
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255, 255, 255, .5)), color-stop(100%,rgba(255, 255, 255, 0))); /* Chrome,Safari4+ */
1043
- background-image: -moz-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
1044
- background-image: -ms-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
1045
- background-image: -o-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
1046
- background-image: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
1047
  }
1048
  #buddypress div#item-header {
1049
  overflow: hidden;
@@ -1076,9 +1062,6 @@ a.bp-title-button {
1076
  }
1077
  #buddypress div#item-header h2 span.highlight span {
1078
  background: #a1dcfa;
1079
- -moz-border-radius: 3px;
1080
- -webkit-border-radius: 3px;
1081
- border-radius: 3px;
1082
  color: #fff;
1083
  cursor: pointer;
1084
  font-weight: bold;
@@ -1274,7 +1257,7 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
1274
 
1275
 
1276
  /*--------------------------------------------------------------
1277
- 6.9 - Private Messaging Threads
1278
  --------------------------------------------------------------*/
1279
  #buddypress table#message-threads tr.unread td {
1280
  background: #fff9db;
@@ -1285,7 +1268,6 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
1285
  #buddypress li span.unread-count,
1286
  #buddypress tr.unread span.unread-count {
1287
  background: #dd0000;
1288
- border-radius: 3px;
1289
  color: #fff;
1290
  font-weight: bold;
1291
  padding: 2px 8px;
@@ -1344,7 +1326,7 @@ body.activity-permalink #buddypress ul.item-list li.activity-item {
1344
  }
1345
 
1346
  /*--------------------------------------------------------------
1347
- 6.10 - Extended Profiles
1348
  --------------------------------------------------------------*/
1349
 
1350
  #buddypress div.profile h4 {
@@ -1391,7 +1373,7 @@ body.register #buddypress div.page ul {
1391
  }
1392
 
1393
  /*--------------------------------------------------------------
1394
- 6.11 - Widgets
1395
  --------------------------------------------------------------*/
1396
 
1397
  .widget.buddypress div.item-avatar img.avatar {
@@ -1438,10 +1420,10 @@ body.register #buddypress div.page ul {
1438
  }
1439
 
1440
  /*--------------------------------------------------------------
1441
- 7.0 - Media Queries
1442
  --------------------------------------------------------------*/
1443
  /*--------------------------------------------------------------
1444
- 7.1 - Smartphones - landscape
1445
  --------------------------------------------------------------*/
1446
  @media screen and (max-device-width: 480px), screen and (-webkit-min-device-pixel-ratio: 2) {
1447
  -webkit-text-size-adjust: none;
@@ -1459,10 +1441,17 @@ body.register #buddypress div.page ul {
1459
  a.bp-title-button {
1460
  margin-left: 10px;
1461
  }
 
 
 
 
 
 
 
1462
  }
1463
 
1464
  /*--------------------------------------------------------------
1465
- 7.2 - Smartphones - portrait
1466
  --------------------------------------------------------------*/
1467
  @media only screen and (max-width: 320px) {
1468
  #buddypress div.dir-search {
@@ -1507,7 +1496,7 @@ body.register #buddypress div.page ul {
1507
  }
1508
 
1509
  /*--------------------------------------------------------------
1510
- 7.2 - Smartphones - smaller screen sizes
1511
  --------------------------------------------------------------*/
1512
  @media only screen and (max-width: 240px) {
1513
  #buddypress div.dir-search {
@@ -1525,7 +1514,7 @@ body.register #buddypress div.page ul {
1525
  height: auto;
1526
  }
1527
  #buddypress ul.item-list li div.action,
1528
- #buddypress li div.item{
1529
  margin-left: 45px;
1530
  }
1531
  h1 a.bp-title-button {
@@ -1533,4 +1522,4 @@ body.register #buddypress div.page ul {
1533
  float: left;
1534
  margin: 10px 0 20px;
1535
  }
1536
- }
4
  ----------------------------------------------------------------
5
  >>> TABLE OF CONTENTS:
6
  ----------------------------------------------------------------
7
+ 1.0 - Navigation
8
+ 1.1 - Pagination
9
+ 2.0 - WordPress
10
+ 2.1 - Images
11
+ 3.0 - BuddyPress
12
+ 3.1 - Activity
13
+ 3.1.1 - Activity Listing
14
+ 3.1.2 - Activity Comments
15
+ 3.2 - Toolbar
16
+ 3.3 - Directories - Members, Groups, Blogs, Forums
17
+ 3.4 - Error / Success Messages
18
+ 3.5 - Forms
19
+ 3.6 - Ajax Loading
20
+ 3.7 - Topics and Tables - Forums and General
21
+ 3.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
22
+ 3.9 - Private Messaging Threads
23
+ 3.10 - Extended Profiles
24
+ 3.11 - Widgets
25
+ 4.0 - Media Queries
26
+ 4.1 - Smartphones Landscape
27
+ 4.2 - Smartphones Portrait
28
+ 4.3 - Smartphones - smaller screen sizes
 
 
 
 
29
  --------------------------------------------------------------*/
30
 
31
  /*--------------------------------------------------------------
32
+ 1 - Navigation
33
+ --------------------------------------------------------------*/
34
+ /*--------------------------------------------------------------
35
+ 1.1 - Pagination
36
  --------------------------------------------------------------*/
37
  #buddypress div.pagination {
38
  background: transparent;
71
  #buddypress .paged #nav-above {
72
  display: block;
73
  }
 
74
  /*--------------------------------------------------------------
75
+ 2 - WordPress
76
+ --------------------------------------------------------------*/
77
+ /*--------------------------------------------------------------
78
+ 2.1 - Images
79
  --------------------------------------------------------------*/
80
  #buddypress img.wp-smiley {
81
  border: none !important;
86
  }
87
 
88
  /*--------------------------------------------------------------
89
+ 3.0 - BuddyPress
90
  --------------------------------------------------------------*/
91
  /*--------------------------------------------------------------
92
+ 3.1 - Activity
93
  --------------------------------------------------------------*/
94
  #buddypress #activity-stream {
95
  margin-top: -5px;
121
  }
122
  #buddypress form#whats-new-form textarea {
123
  background: #fff;
 
 
 
 
124
  color: #555;
125
  font-family: inherit;
126
  font-size: 90%;
149
  #buddypress #whats-new:focus {
150
  border-color: rgba(31, 179, 221, 0.9) !important;
151
  outline-color: rgba(31, 179, 221, 0.9);
 
 
 
152
  }
153
 
154
  /*--------------------------------------------------------------
155
+ 3.1.1 - Activity Listing
156
  --------------------------------------------------------------*/
157
  #buddypress ul.activity-list li {
158
  overflow: hidden;
303
 
304
 
305
  /*--------------------------------------------------------------
306
+ 3.1.2 - Activity Comments
307
  --------------------------------------------------------------*/
308
  #buddypress div.activity-meta {
309
  margin: 18px 0 0;
312
  margin-bottom: 6px;
313
  }
314
  #buddypress div.activity-meta a {
 
315
  padding: 4px 8px;
316
  }
317
  #buddypress a.activity-time-since {
331
  #buddypress a.bp-primary-action span,
332
  #buddypress #reply-title small a span {
333
  background: #999;
 
334
  color: #fff;
335
  font-size: 90%;
336
  margin-left: 2px;
435
  #buddypress div.activity-comments form .ac-textarea {
436
  background: #fff;
437
  border: 1px inset #ccc;
 
438
  margin-bottom: 10px;
439
  padding: 8px;
440
  }
480
  }
481
 
482
  /*--------------------------------------------------------------
483
+ 3.3 - Directories - Members, Groups, Blogs, Forums
484
  --------------------------------------------------------------*/
485
  #buddypress div.dir-search {
486
  float: right;
496
  }
497
 
498
  /*--------------------------------------------------------------
499
+ 3.4 - Errors / Success Messages
500
  --------------------------------------------------------------*/
501
  #buddypress div#message {
502
  margin: 0 0 15px;
514
  padding: 10px 15px;
515
  }
516
  #buddypress div#message.error p {
517
+ background-color: #ff0000;
 
518
  clear: left;
519
  color: #fff;
520
  }
521
  #buddypress div#message.updated p {
522
+ background-color: #99ff33;
 
 
523
  }
524
  #buddypress .standard-form#signup_form div div.error {
525
+ background: #ff0000;
 
 
 
526
  color: #fff;
527
  margin: 0 0 10px 0;
528
  padding: 6px;
557
  }
558
 
559
  /*--------------------------------------------------------------
560
+ 3.5 - Forms
561
  --------------------------------------------------------------*/
562
  #buddypress .standard-form textarea,
563
  #buddypress .standard-form input[type=text],
564
+ #buddypress .standard-form input[type=text],
565
+ #buddypress .standard-form input[type=color],
566
+ #buddypress .standard-form input[type=date],
567
+ #buddypress .standard-form input[type=datetime],
568
+ #buddypress .standard-form input[type=datetime-local],
569
+ #buddypress .standard-form input[type=email],
570
+ #buddypress .standard-form input[type=month],
571
+ #buddypress .standard-form input[type=number],
572
+ #buddypress .standard-form input[type=range],
573
+ #buddypress .standard-form input[type=search],
574
+ #buddypress .standard-form input[type=tel],
575
+ #buddypress .standard-form input[type=time],
576
+ #buddypress .standard-form input[type=url],
577
+ #buddypress .standard-form input[type=week],
578
  #buddypress .standard-form select,
579
  #buddypress .standard-form input[type=password],
580
+ #buddypress .dir-search input[type=search],
581
+ #buddypress .dir-search input[type=text]{
582
  border: 1px inset #ccc;
 
583
  color: #888;
584
  font: inherit;
585
  font-size: 100%;
709
  #buddypress .comment-reply-link,
710
  a.bp-title-button {
711
  background: #fff; /* Old browsers */
 
 
 
 
 
 
 
712
  border: 1px solid #ccc;
 
 
 
713
  color: #777;
714
+ font-size: .8rem;
715
  cursor: pointer;
 
716
  outline: none;
717
  padding: 4px 10px;
718
  text-align: center;
719
  text-decoration: none;
 
720
  }
721
  #buddypress button:hover,
722
  #buddypress a.button:hover,
729
  #buddypress div.generic-button a:hover,
730
  #buddypress .comment-reply-link:hover {
731
  background: #ededed;
 
 
 
 
 
 
 
732
  border: 1px solid #bbb;
733
  color: #555;
734
  outline: none;
735
  text-decoration: none;
736
  }
737
 
738
+ #buddypress form.standard-form .left-menu {
739
+ float: left;
740
+ }
741
+
742
+ #buddypress form.standard-form .left-menu #invite-list ul{
743
+ margin:1%;
744
+ list-style: none;
745
+ }
746
+
747
+ #buddypress form.standard-form .left-menu #invite-list ul li {
748
+ margin:0 0 0 1%;
749
+ }
750
+
751
+ #buddypress form.standard-form .main-column {
752
+ margin-left: 190px;
753
+ }
754
+
755
+ #buddypress form.standard-form .main-column ul#friend-list {
756
+ clear:none;
757
+ }
758
+
759
+ #buddypress form.standard-form .main-column ul#friend-list h4 {
760
+ clear:none;
761
+ }
762
+
763
  /*--------------------------------------------------------------
764
+ 3.6 - Ajax Loading
765
  --------------------------------------------------------------*/
766
  #buddypress a.loading,
767
  #buddypress input.loading {
768
  -webkit-animation: loader-pulsate .5s infinite ease-in-out alternate;
769
  -moz-animation: loader-pulsate .5s infinite ease-in-out alternate;
770
  border-color: #aaa;
 
 
 
771
  }
772
  @-webkit-keyframes loader-pulsate {
773
  from {
822
  #buddypress button.disabled:hover,
823
  #buddypress div.pending a:hover,
824
  #buddypress a.disabled:hover {
825
+ border-color: #eee;
 
 
 
 
 
 
 
826
  color: #bbb;
827
  }
828
 
829
  /*--------------------------------------------------------------
830
+ 3.7 - Forums, Tables and Topics
831
  --------------------------------------------------------------*/
832
  #buddypress ul#topic-post-list {
833
  margin: 0;
1007
  }
1008
 
1009
  /*-------------------------------------------------------------------------
1010
+ 3.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums, Profiles
1011
  -------------------------------------------------------------------------*/
1012
  #buddypress .item-body {
1013
  margin: 20px 0;
1026
  }
1027
  #buddypress div#message p,
1028
  #sitewide-notice p {
 
 
 
 
1029
  font-weight: normal;
1030
  margin-top: 3px;
1031
  text-decoration: none;
1032
+ background: #ffff00;
 
 
 
 
 
 
1033
  }
1034
  #buddypress div#item-header {
1035
  overflow: hidden;
1062
  }
1063
  #buddypress div#item-header h2 span.highlight span {
1064
  background: #a1dcfa;
 
 
 
1065
  color: #fff;
1066
  cursor: pointer;
1067
  font-weight: bold;
1257
 
1258
 
1259
  /*--------------------------------------------------------------
1260
+ 3.9 - Private Messaging Threads
1261
  --------------------------------------------------------------*/
1262
  #buddypress table#message-threads tr.unread td {
1263
  background: #fff9db;
1268
  #buddypress li span.unread-count,
1269
  #buddypress tr.unread span.unread-count {
1270
  background: #dd0000;
 
1271
  color: #fff;
1272
  font-weight: bold;
1273
  padding: 2px 8px;
1326
  }
1327
 
1328
  /*--------------------------------------------------------------
1329
+ 3.10 - Extended Profiles
1330
  --------------------------------------------------------------*/
1331
 
1332
  #buddypress div.profile h4 {
1373
  }
1374
 
1375
  /*--------------------------------------------------------------
1376
+ 3.11 - Widgets
1377
  --------------------------------------------------------------*/
1378
 
1379
  .widget.buddypress div.item-avatar img.avatar {
1420
  }
1421
 
1422
  /*--------------------------------------------------------------
1423
+ 4.0 - Media Queries
1424
  --------------------------------------------------------------*/
1425
  /*--------------------------------------------------------------
1426
+ 4.1 - Smartphones - landscape
1427
  --------------------------------------------------------------*/
1428
  @media screen and (max-device-width: 480px), screen and (-webkit-min-device-pixel-ratio: 2) {
1429
  -webkit-text-size-adjust: none;
1441
  a.bp-title-button {
1442
  margin-left: 10px;
1443
  }
1444
+ #buddypress form.standard-form .main-column div.action{
1445
+ position: relative;
1446
+ margin-bottom:1em;
1447
+ }
1448
+ #buddypress form.standard-form .main-column ul#friend-list h4{
1449
+ width:100%;
1450
+ }
1451
  }
1452
 
1453
  /*--------------------------------------------------------------
1454
+ 4.2 - Smartphones - portrait
1455
  --------------------------------------------------------------*/
1456
  @media only screen and (max-width: 320px) {
1457
  #buddypress div.dir-search {
1496
  }
1497
 
1498
  /*--------------------------------------------------------------
1499
+ 4.2 - Smartphones - smaller screen sizes
1500
  --------------------------------------------------------------*/
1501
  @media only screen and (max-width: 240px) {
1502
  #buddypress div.dir-search {
1514
  height: auto;
1515
  }
1516
  #buddypress ul.item-list li div.action,
1517
+ #buddypress li div.item{
1518
  margin-left: 45px;
1519
  }
1520
  h1 a.bp-title-button {
1522
  float: left;
1523
  margin: 10px 0 20px;
1524
  }
1525
+ }
bp-templates/bp-legacy/js/buddypress.js CHANGED
@@ -21,24 +21,26 @@ jq(document).ready( function() {
21
  bp_init_objects( objects );
22
 
23
  /* @mention Compose Scrolling */
24
- if ( jq.query.get('r') && jq('#whats-new').length ) {
 
25
  jq('#whats-new-options').animate({
26
  height:'40px'
27
  });
28
  jq("#whats-new-form textarea").animate({
29
  height:'50px'
30
  });
31
- jq.scrollTo( jq('#whats-new'), 500, {
32
  offset:-125,
33
  easing:'easeOutQuad'
34
  } );
35
- jq('#whats-new').focus();
 
36
  }
37
 
38
  /**** Activity Posting ********************************************************/
39
 
40
  /* Textarea focus */
41
- jq('#whats-new').focus( function(){
42
  jq("#whats-new-options").animate({
43
  height:'40px'
44
  });
@@ -46,12 +48,31 @@ jq(document).ready( function() {
46
  height:'50px'
47
  });
48
  jq("#aw-whats-new-submit").prop("disabled", false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  });
50
 
51
  /* New posts */
52
  jq("#aw-whats-new-submit").on( 'click', function() {
53
  var button = jq(this);
54
- var form = button.parent().parent().parent().parent();
55
 
56
  form.children().each( function() {
57
  if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
@@ -62,6 +83,7 @@ jq(document).ready( function() {
62
  jq('div.error').remove();
63
  button.addClass('loading');
64
  button.prop('disabled', true);
 
65
 
66
  /* Default POST values */
67
  var object = '';
@@ -75,7 +97,7 @@ jq(document).ready( function() {
75
 
76
  jq.post( ajaxurl, {
77
  action: 'post_update',
78
- 'cookie': encodeURIComponent(document.cookie),
79
  '_wpnonce_post_update': jq("#_wpnonce_post_update").val(),
80
  'content': content,
81
  'object': object,
@@ -102,7 +124,7 @@ jq(document).ready( function() {
102
  }
103
 
104
  jq("#activity-stream").prepend(response);
105
- jq("#activity-stream li:first").addClass('new-update');
106
 
107
  if ( 0 != jq("#latest-update").length ) {
108
  var l = jq("#activity-stream li.new-update .activity-content .activity-inner p").html();
@@ -195,7 +217,7 @@ jq(document).ready( function() {
195
 
196
  jq.post( ajaxurl, {
197
  action: 'activity_mark_' + type,
198
- 'cookie': encodeURIComponent(document.cookie),
199
  'id': parent_id
200
  },
201
  function(response) {
@@ -252,7 +274,7 @@ jq(document).ready( function() {
252
 
253
  jq.post( ajaxurl, {
254
  action: 'delete_activity',
255
- 'cookie': encodeURIComponent(document.cookie),
256
  'id': id,
257
  '_wpnonce': nonce
258
  },
@@ -304,10 +326,17 @@ jq(document).ready( function() {
304
 
305
  var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
306
 
 
 
 
 
 
 
307
  jq.post( ajaxurl, {
308
  action: 'activity_get_older_updates',
309
- 'cookie': encodeURIComponent(document.cookie),
310
- 'page': oldest_page
 
311
  },
312
  function(response)
313
  {
@@ -422,7 +451,7 @@ jq(document).ready( function() {
422
 
423
  var ajaxdata = {
424
  action: 'new_activity_comment',
425
- 'cookie': encodeURIComponent(document.cookie),
426
  '_wpnonce_new_activity_comment': jq("#_wpnonce_new_activity_comment").val(),
427
  'comment_id': comment_id,
428
  'form_id': form_id[2],
@@ -443,26 +472,34 @@ jq(document).ready( function() {
443
  if ( response[0] + response[1] == '-1' ) {
444
  form.append( jq( response.substr( 2, response.length ) ).hide().fadeIn( 200 ) );
445
  } else {
 
446
  form.fadeOut( 200, function() {
447
- if ( 0 == form.parent().children('ul').length ) {
448
- if ( form.parent().hasClass('activity-comments') ) {
449
- form.parent().prepend('<ul></ul>');
450
  } else {
451
- form.parent().append('<ul></ul>');
452
  }
453
  }
454
 
455
  /* Preceeding whitespace breaks output with jQuery 1.9.0 */
456
  var the_comment = jq.trim( response );
457
 
458
- form.parent().children('ul').append( jq( the_comment ).hide().fadeIn( 200 ) );
459
  form.children('textarea').val('');
460
- form.parent().parent().addClass('has-comments');
461
  } );
462
  jq( '#' + form.attr('id') + ' textarea').val('');
463
 
464
  /* Increase the "Reply (X)" button count */
465
  jq('#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
 
 
 
 
 
 
 
466
  }
467
 
468
  jq(target).prop("disabled", false);
@@ -495,7 +532,7 @@ jq(document).ready( function() {
495
 
496
  jq.post( ajaxurl, {
497
  action: 'delete_activity_comment',
498
- 'cookie': encodeURIComponent(document.cookie),
499
  '_wpnonce': nonce,
500
  'id': comment_id
501
  },
@@ -510,12 +547,20 @@ jq(document).ready( function() {
510
  if ( !jq(this).is(':hidden') )
511
  child_count++;
512
  });
513
- comment_li.fadeOut(200);
 
 
514
 
515
  /* Decrease the "Reply (X)" button count */
516
  var count_span = jq('#' + comment_li.parents('#activity-stream > li').attr('id') + ' a.acomment-reply span');
517
  var new_count = count_span.html() - ( 1 + child_count );
518
  count_span.html(new_count);
 
 
 
 
 
 
519
 
520
  /* If that was the last comment for the item, remove the has-comments class to clean up the styling */
521
  if ( 0 == new_count ) {
@@ -772,7 +817,7 @@ jq(document).ready( function() {
772
  jq.post( ajaxurl, {
773
  action: 'groups_invite_user',
774
  'friend_action': friend_action,
775
- 'cookie': encodeURIComponent(document.cookie),
776
  '_wpnonce': jq("#_wpnonce_invite_uninvite_user").val(),
777
  'friend_id': friend_id,
778
  'group_id': jq("#group_id").val()
@@ -805,7 +850,7 @@ jq(document).ready( function() {
805
  jq.post( ajaxurl, {
806
  action: 'groups_invite_user',
807
  'friend_action': 'uninvite',
808
- 'cookie': encodeURIComponent(document.cookie),
809
  '_wpnonce': jq("#_wpnonce_invite_uninvite_user").val(),
810
  'friend_id': friend_id,
811
  'group_id': jq("#group_id").val()
@@ -834,14 +879,29 @@ jq(document).ready( function() {
834
 
835
  jq('.field-visibility-settings-close').on( 'click', function() {
836
  var settings_div = jq(this).parent();
 
837
 
838
- jq(settings_div).slideUp( 400, function(){
839
- jq(settings_div).siblings('.field-visibility-settings-toggle').fadeIn(800);
840
- });
 
841
 
842
  return false;
843
  } );
844
 
 
 
 
 
 
 
 
 
 
 
 
 
 
845
 
846
  /** Friendship Requests **************************************/
847
 
@@ -872,7 +932,7 @@ jq(document).ready( function() {
872
 
873
  jq.post( ajaxurl, {
874
  action: action,
875
- 'cookie': encodeURIComponent(document.cookie),
876
  'id': id,
877
  '_wpnonce': nonce
878
  },
@@ -914,7 +974,7 @@ jq(document).ready( function() {
914
 
915
  jq.post( ajaxurl, {
916
  action: 'addremove_friend',
917
- 'cookie': encodeURIComponent(document.cookie),
918
  'fid': fid,
919
  '_wpnonce': nonce
920
  },
@@ -963,7 +1023,7 @@ jq(document).ready( function() {
963
 
964
  jq.post( ajaxurl, {
965
  action: 'joinleave_group',
966
- 'cookie': encodeURIComponent(document.cookie),
967
  'gid': gid,
968
  '_wpnonce': nonce
969
  },
@@ -986,7 +1046,7 @@ jq(document).ready( function() {
986
 
987
  /** Button disabling ************************************************/
988
 
989
- jq('.pending').click(function() {
990
  return false;
991
  });
992
 
@@ -1020,7 +1080,7 @@ jq(document).ready( function() {
1020
 
1021
  jq.post( ajaxurl, {
1022
  action: 'messages_send_reply',
1023
- 'cookie': encodeURIComponent(document.cookie),
1024
  '_wpnonce': jq("#send_message_nonce").val(),
1025
 
1026
  'content': jq("#message_content").val(),
@@ -1306,7 +1366,7 @@ function bp_filter_request( object, filter, scope, target, search_terms, page, e
1306
 
1307
  bp_ajax_request = jq.post( ajaxurl, {
1308
  action: object + '_filter',
1309
- 'cookie': encodeURIComponent(document.cookie),
1310
  'object': object,
1311
  'filter': filter,
1312
  'search_terms': search_terms,
@@ -1354,7 +1414,7 @@ function bp_activity_request(scope, filter) {
1354
 
1355
  bp_ajax_request = jq.post( ajaxurl, {
1356
  action: 'activity_widget_filter',
1357
- 'cookie': encodeURIComponent(document.cookie),
1358
  '_wpnonce_activity_filter': jq("#_wpnonce_activity_filter").val(),
1359
  'scope': scope,
1360
  'filter': filter
@@ -1404,8 +1464,8 @@ function bp_legacy_theme_hide_comments() {
1404
  jq(this).addClass('hidden');
1405
  jq(this).toggle();
1406
 
1407
- if ( !i )
1408
- jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_all + ' ' + comment_count + ' ' + BP_DTheme.comments + '</a></li>' );
1409
  }
1410
  });
1411
 
@@ -1448,6 +1508,31 @@ function clear(container) {
1448
  return;
1449
  }
1450
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1451
  /* ScrollTo plugin - just inline and minified */
1452
  ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
1453
 
21
  bp_init_objects( objects );
22
 
23
  /* @mention Compose Scrolling */
24
+ var $whats_new = jq('#whats-new');
25
+ if ( jq.query.get('r') && $whats_new.length ) {
26
  jq('#whats-new-options').animate({
27
  height:'40px'
28
  });
29
  jq("#whats-new-form textarea").animate({
30
  height:'50px'
31
  });
32
+ jq.scrollTo( $whats_new, 500, {
33
  offset:-125,
34
  easing:'easeOutQuad'
35
  } );
36
+ var whats_new_content = $whats_new.val();
37
+ $whats_new.val('').focus().val(whats_new_content);
38
  }
39
 
40
  /**** Activity Posting ********************************************************/
41
 
42
  /* Textarea focus */
43
+ $whats_new.focus( function(){
44
  jq("#whats-new-options").animate({
45
  height:'40px'
46
  });
48
  height:'50px'
49
  });
50
  jq("#aw-whats-new-submit").prop("disabled", false);
51
+
52
+ var $whats_new_form = jq("form#whats-new-form");
53
+ if ( $whats_new_form.hasClass("submitted") ) {
54
+ $whats_new_form.removeClass("submitted");
55
+ }
56
+ });
57
+
58
+ /* On blur, shrink if it's empty */
59
+ $whats_new.blur( function(){
60
+ if (!this.value.match(/\S+/)) {
61
+ this.value = "";
62
+ jq("#whats-new-options").animate({
63
+ height:'40px'
64
+ });
65
+ jq("form#whats-new-form textarea").animate({
66
+ height:'20px'
67
+ });
68
+ jq("#aw-whats-new-submit").prop("disabled", true);
69
+ }
70
  });
71
 
72
  /* New posts */
73
  jq("#aw-whats-new-submit").on( 'click', function() {
74
  var button = jq(this);
75
+ var form = button.closest("form#whats-new-form");
76
 
77
  form.children().each( function() {
78
  if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
83
  jq('div.error').remove();
84
  button.addClass('loading');
85
  button.prop('disabled', true);
86
+ form.addClass("submitted");
87
 
88
  /* Default POST values */
89
  var object = '';
97
 
98
  jq.post( ajaxurl, {
99
  action: 'post_update',
100
+ 'cookie': bp_get_cookies(),
101
  '_wpnonce_post_update': jq("#_wpnonce_post_update").val(),
102
  'content': content,
103
  'object': object,
124
  }
125
 
126
  jq("#activity-stream").prepend(response);
127
+ jq("#activity-stream li:first").addClass('new-update just-posted');
128
 
129
  if ( 0 != jq("#latest-update").length ) {
130
  var l = jq("#activity-stream li.new-update .activity-content .activity-inner p").html();
217
 
218
  jq.post( ajaxurl, {
219
  action: 'activity_mark_' + type,
220
+ 'cookie': bp_get_cookies(),
221
  'id': parent_id
222
  },
223
  function(response) {
274
 
275
  jq.post( ajaxurl, {
276
  action: 'delete_activity',
277
+ 'cookie': bp_get_cookies(),
278
  'id': id,
279
  '_wpnonce': nonce
280
  },
326
 
327
  var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
328
 
329
+ var just_posted = [];
330
+
331
+ jq('.activity-list li.just-posted').each( function(){
332
+ just_posted.push( jq(this).attr('id').replace( 'activity-','' ) );
333
+ });
334
+
335
  jq.post( ajaxurl, {
336
  action: 'activity_get_older_updates',
337
+ 'cookie': bp_get_cookies(),
338
+ 'page': oldest_page,
339
+ 'exclude_just_posted': just_posted.join(',')
340
  },
341
  function(response)
342
  {
451
 
452
  var ajaxdata = {
453
  action: 'new_activity_comment',
454
+ 'cookie': bp_get_cookies(),
455
  '_wpnonce_new_activity_comment': jq("#_wpnonce_new_activity_comment").val(),
456
  'comment_id': comment_id,
457
  'form_id': form_id[2],
472
  if ( response[0] + response[1] == '-1' ) {
473
  form.append( jq( response.substr( 2, response.length ) ).hide().fadeIn( 200 ) );
474
  } else {
475
+ var activity_comments = form.parent();
476
  form.fadeOut( 200, function() {
477
+ if ( 0 == activity_comments.children('ul').length ) {
478
+ if ( activity_comments.hasClass('activity-comments') ) {
479
+ activity_comments.prepend('<ul></ul>');
480
  } else {
481
+ activity_comments.append('<ul></ul>');
482
  }
483
  }
484
 
485
  /* Preceeding whitespace breaks output with jQuery 1.9.0 */
486
  var the_comment = jq.trim( response );
487
 
488
+ activity_comments.children('ul').append( jq( the_comment ).hide().fadeIn( 200 ) );
489
  form.children('textarea').val('');
490
+ activity_comments.parent().addClass('has-comments');
491
  } );
492
  jq( '#' + form.attr('id') + ' textarea').val('');
493
 
494
  /* Increase the "Reply (X)" button count */
495
  jq('#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
496
+
497
+ // Increment the 'Show all x comments' string, if present
498
+ var show_all_a = activity_comments.find('.show-all').find('a');
499
+ if ( show_all_a ) {
500
+ var new_count = jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html();
501
+ show_all_a.html( BP_DTheme.show_x_comments.replace( '%d', new_count ) );
502
+ }
503
  }
504
 
505
  jq(target).prop("disabled", false);
532
 
533
  jq.post( ajaxurl, {
534
  action: 'delete_activity_comment',
535
+ 'cookie': bp_get_cookies(),
536
  '_wpnonce': nonce,
537
  'id': comment_id
538
  },
547
  if ( !jq(this).is(':hidden') )
548
  child_count++;
549
  });
550
+ comment_li.fadeOut(200, function() {
551
+ comment_li.remove();
552
+ });
553
 
554
  /* Decrease the "Reply (X)" button count */
555
  var count_span = jq('#' + comment_li.parents('#activity-stream > li').attr('id') + ' a.acomment-reply span');
556
  var new_count = count_span.html() - ( 1 + child_count );
557
  count_span.html(new_count);
558
+
559
+ // Change the 'Show all x comments' text
560
+ var show_all_a = comment_li.siblings('.show-all').find('a');
561
+ if ( show_all_a ) {
562
+ show_all_a.html( BP_DTheme.show_x_comments.replace( '%d', new_count ) );
563
+ }
564
 
565
  /* If that was the last comment for the item, remove the has-comments class to clean up the styling */
566
  if ( 0 == new_count ) {
817
  jq.post( ajaxurl, {
818
  action: 'groups_invite_user',
819
  'friend_action': friend_action,
820
+ 'cookie': bp_get_cookies(),
821
  '_wpnonce': jq("#_wpnonce_invite_uninvite_user").val(),
822
  'friend_id': friend_id,
823
  'group_id': jq("#group_id").val()
850
  jq.post( ajaxurl, {
851
  action: 'groups_invite_user',
852
  'friend_action': 'uninvite',
853
+ 'cookie': bp_get_cookies(),
854
  '_wpnonce': jq("#_wpnonce_invite_uninvite_user").val(),
855
  'friend_id': friend_id,
856
  'group_id': jq("#group_id").val()
879
 
880
  jq('.field-visibility-settings-close').on( 'click', function() {
881
  var settings_div = jq(this).parent();
882
+ var vis_setting_text = settings_div.find('input:checked').parent().text();
883
 
884
+ settings_div.slideUp( 400, function() {
885
+ settings_div.siblings('.field-visibility-settings-toggle').fadeIn(800);
886
+ settings_div.siblings('.field-visibility-settings-toggle').children('.current-visibility-level').html(vis_setting_text);
887
+ } );
888
 
889
  return false;
890
  } );
891
 
892
+ jq("#profile-edit-form input:not(:submit), #profile-edit-form textarea, #profile-edit-form select, #signup_form input:not(:submit), #signup_form textarea, #signup_form select").change( function() {
893
+ var shouldconfirm = true;
894
+
895
+ jq('#profile-edit-form input:submit, #signup_form input:submit').on( 'click', function() {
896
+ shouldconfirm = false;
897
+ });
898
+
899
+ window.onbeforeunload = function(e) {
900
+ if ( shouldconfirm ) {
901
+ return BP_DTheme.unsaved_changes;
902
+ }
903
+ };
904
+ });
905
 
906
  /** Friendship Requests **************************************/
907
 
932
 
933
  jq.post( ajaxurl, {
934
  action: action,
935
+ 'cookie': bp_get_cookies(),
936
  'id': id,
937
  '_wpnonce': nonce
938
  },
974
 
975
  jq.post( ajaxurl, {
976
  action: 'addremove_friend',
977
+ 'cookie': bp_get_cookies(),
978
  'fid': fid,
979
  '_wpnonce': nonce
980
  },
1023
 
1024
  jq.post( ajaxurl, {
1025
  action: 'joinleave_group',
1026
+ 'cookie': bp_get_cookies(),
1027
  'gid': gid,
1028
  '_wpnonce': nonce
1029
  },
1046
 
1047
  /** Button disabling ************************************************/
1048
 
1049
+ jq('#buddypress').on( 'click', '.pending', function() {
1050
  return false;
1051
  });
1052
 
1080
 
1081
  jq.post( ajaxurl, {
1082
  action: 'messages_send_reply',
1083
+ 'cookie': bp_get_cookies(),
1084
  '_wpnonce': jq("#send_message_nonce").val(),
1085
 
1086
  'content': jq("#message_content").val(),
1366
 
1367
  bp_ajax_request = jq.post( ajaxurl, {
1368
  action: object + '_filter',
1369
+ 'cookie': bp_get_cookies(),
1370
  'object': object,
1371
  'filter': filter,
1372
  'search_terms': search_terms,
1414
 
1415
  bp_ajax_request = jq.post( ajaxurl, {
1416
  action: 'activity_widget_filter',
1417
+ 'cookie': bp_get_cookies(),
1418
  '_wpnonce_activity_filter': jq("#_wpnonce_activity_filter").val(),
1419
  'scope': scope,
1420
  'filter': filter
1464
  jq(this).addClass('hidden');
1465
  jq(this).toggle();
1466
 
1467
+ if ( !i )
1468
+ jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_x_comments.replace( '%d', comment_count ) + '</a></li>' );
1469
  }
1470
  });
1471
 
1508
  return;
1509
  }
1510
 
1511
+ /* Returns a querystring of BP cookies (cookies beginning with 'bp-') */
1512
+ function bp_get_cookies() {
1513
+ // get all cookies and split into an array
1514
+ var allCookies = document.cookie.split(";");
1515
+
1516
+ var bpCookies = {};
1517
+ var cookiePrefix = 'bp-';
1518
+
1519
+ // loop through cookies
1520
+ for (var i = 0; i < allCookies.length; i++) {
1521
+ var cookie = allCookies[i];
1522
+ var delimiter = cookie.indexOf("=");
1523
+ var name = unescape( cookie.slice(0, delimiter) ).trim();
1524
+ var value = unescape( cookie.slice(delimiter + 1) );
1525
+
1526
+ // if BP cookie, store it
1527
+ if ( name.indexOf(cookiePrefix) == 0 ) {
1528
+ bpCookies[name] = value;
1529
+ }
1530
+ }
1531
+
1532
+ // returns BP cookies as querystring
1533
+ return encodeURIComponent( jq.param(bpCookies) );
1534
+ }
1535
+
1536
  /* ScrollTo plugin - just inline and minified */
1537
  ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
1538
 
bp-themes/bp-default/_inc/ajax.php CHANGED
@@ -126,6 +126,12 @@ function bp_dtheme_ajax_querystring( $query_string, $object ) {
126
  if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
127
  $qs[] = 'page=' . absint( $_POST['page'] );
128
 
 
 
 
 
 
 
129
  $object_search_text = bp_get_search_default_text( $object );
130
  if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
131
  $qs[] = 'search_terms=' . $_POST['search_terms'];
@@ -168,19 +174,26 @@ function bp_dtheme_object_template_loader() {
168
  if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
169
  return;
170
 
 
 
 
 
 
 
 
 
 
 
 
171
  /**
172
  * AJAX requests happen too early to be seen by bp_update_is_directory()
173
  * so we do it manually here to ensure templates load with the correct
174
  * context. Without this check, templates will load the 'single' version
175
  * of themselves rather than the directory version.
176
  */
177
-
178
  if ( ! bp_current_action() )
179
  bp_update_is_directory( true, bp_current_component() );
180
 
181
- // Sanitize the post object
182
- $object = esc_attr( $_POST['object'] );
183
-
184
  // Locate the object template
185
  locate_template( array( "$object/$object-loop.php" ), true );
186
  exit;
126
  if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
127
  $qs[] = 'page=' . absint( $_POST['page'] );
128
 
129
+ // exludes activity just posted and avoids duplicate ids
130
+ if ( ! empty( $_POST['exclude_just_posted'] ) ) {
131
+ $just_posted = wp_parse_id_list( $_POST['exclude_just_posted'] );
132
+ $qs[] = 'exclude=' . implode( ',', $just_posted );
133
+ }
134
+
135
  $object_search_text = bp_get_search_default_text( $object );
136
  if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
137
  $qs[] = 'search_terms=' . $_POST['search_terms'];
174
  if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
175
  return;
176
 
177
+ // Bail if no object passed
178
+ if ( empty( $_POST['object'] ) )
179
+ return;
180
+
181
+ // Sanitize the object
182
+ $object = sanitize_title( $_POST['object'] );
183
+
184
+ // Bail if object is not an active component
185
+ if ( ! bp_is_active( $object ) )
186
+ return;
187
+
188
  /**
189
  * AJAX requests happen too early to be seen by bp_update_is_directory()
190
  * so we do it manually here to ensure templates load with the correct
191
  * context. Without this check, templates will load the 'single' version
192
  * of themselves rather than the directory version.
193
  */
 
194
  if ( ! bp_current_action() )
195
  bp_update_is_directory( true, bp_current_component() );
196
 
 
 
 
197
  // Locate the object template
198
  locate_template( array( "$object/$object-loop.php" ), true );
199
  exit;
bp-themes/bp-default/_inc/css/default.css CHANGED
@@ -1573,8 +1573,22 @@ ul.button-nav li.current a {
1573
  --------------------------------------------------------------*/
1574
  .standard-form textarea,
1575
  .standard-form input[type=text],
 
 
 
 
 
 
 
 
 
 
 
 
 
1576
  .standard-form select,
1577
  .standard-form input[type=password],
 
1578
  .dir-search input[type=text] {
1579
  border: 1px inset #ccc;
1580
  -moz-border-radius: 3px;
1573
  --------------------------------------------------------------*/
1574
  .standard-form textarea,
1575
  .standard-form input[type=text],
1576
+ .standard-form input[type=color],
1577
+ .standard-form input[type=date],
1578
+ .standard-form input[type=datetime],
1579
+ .standard-form input[type=datetime-local],
1580
+ .standard-form input[type=email],
1581
+ .standard-form input[type=month],
1582
+ .standard-form input[type=number],
1583
+ .standard-form input[type=range],
1584
+ .standard-form input[type=search],
1585
+ .standard-form input[type=tel],
1586
+ .standard-form input[type=time],
1587
+ .standard-form input[type=url],
1588
+ .standard-form input[type=week],
1589
  .standard-form select,
1590
  .standard-form input[type=password],
1591
+ .dir-search input[type=search]
1592
  .dir-search input[type=text] {
1593
  border: 1px inset #ccc;
1594
  -moz-border-radius: 3px;
bp-themes/bp-default/_inc/global.js CHANGED
@@ -46,12 +46,31 @@ jq(document).ready( function() {
46
  height:'50px'
47
  });
48
  jq("#aw-whats-new-submit").prop("disabled", false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  });
50
 
51
  /* New posts */
52
  jq("input#aw-whats-new-submit").click( function() {
53
  var button = jq(this);
54
- var form = button.parent().parent().parent().parent();
55
 
56
  form.children().each( function() {
57
  if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
@@ -62,6 +81,7 @@ jq(document).ready( function() {
62
  jq('div.error').remove();
63
  button.addClass('loading');
64
  button.prop('disabled', true);
 
65
 
66
  /* Default POST values */
67
  var object = '';
@@ -75,7 +95,7 @@ jq(document).ready( function() {
75
 
76
  jq.post( ajaxurl, {
77
  action: 'post_update',
78
- 'cookie': encodeURIComponent(document.cookie),
79
  '_wpnonce_post_update': jq("input#_wpnonce_post_update").val(),
80
  'content': content,
81
  'object': object,
@@ -102,7 +122,7 @@ jq(document).ready( function() {
102
  }
103
 
104
  jq("ul#activity-stream").prepend(response);
105
- jq("ul#activity-stream li:first").addClass('new-update');
106
 
107
  if ( 0 != jq("#latest-update").length ) {
108
  var l = jq("ul#activity-stream li.new-update .activity-content .activity-inner p").html();
@@ -195,7 +215,7 @@ jq(document).ready( function() {
195
 
196
  jq.post( ajaxurl, {
197
  action: 'activity_mark_' + type,
198
- 'cookie': encodeURIComponent(document.cookie),
199
  'id': parent_id
200
  },
201
  function(response) {
@@ -249,7 +269,7 @@ jq(document).ready( function() {
249
 
250
  jq.post( ajaxurl, {
251
  action: 'delete_activity',
252
- 'cookie': encodeURIComponent(document.cookie),
253
  'id': id,
254
  '_wpnonce': nonce
255
  },
@@ -301,10 +321,17 @@ jq(document).ready( function() {
301
 
302
  var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
303
 
 
 
 
 
 
 
304
  jq.post( ajaxurl, {
305
  action: 'activity_get_older_updates',
306
- 'cookie': encodeURIComponent(document.cookie),
307
- 'page': oldest_page
 
308
  },
309
  function(response)
310
  {
@@ -416,7 +443,7 @@ jq(document).ready( function() {
416
 
417
  var ajaxdata = {
418
  action: 'new_activity_comment',
419
- 'cookie': encodeURIComponent(document.cookie),
420
  '_wpnonce_new_activity_comment': jq("input#_wpnonce_new_activity_comment").val(),
421
  'comment_id': comment_id,
422
  'form_id': form_id[2],
@@ -436,27 +463,35 @@ jq(document).ready( function() {
436
  if ( response[0] + response[1] == '-1' ) {
437
  form.append( jq( response.substr( 2, response.length ) ).hide().fadeIn( 200 ) );
438
  } else {
 
439
  form.fadeOut( 200, function() {
440
- if ( 0 == form.parent().children('ul').length ) {
441
- if ( form.parent().hasClass('activity-comments') ) {
442
- form.parent().prepend('<ul></ul>');
443
  } else {
444
- form.parent().append('<ul></ul>');
445
  }
446
  }
447
 
448
  /* Preceeding whitespace breaks output with jQuery 1.9.0 */
449
  var the_comment = jq.trim( response );
450
 
451
- form.parent().children('ul').append( jq( the_comment ).hide().fadeIn( 200 ) );
452
  form.children('textarea').val('');
453
- form.parent().parent().addClass('has-comments');
454
  } );
455
 
456
  jq( 'form#' + form.attr('id') + ' textarea').val('');
457
 
458
  /* Increase the "Reply (X)" button count */
459
  jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
 
 
 
 
 
 
 
460
  }
461
 
462
  jq(target).prop("disabled", false);
@@ -488,7 +523,7 @@ jq(document).ready( function() {
488
 
489
  jq.post( ajaxurl, {
490
  action: 'delete_activity_comment',
491
- 'cookie': encodeURIComponent(document.cookie),
492
  '_wpnonce': nonce,
493
  'id': comment_id
494
  },
@@ -504,12 +539,20 @@ jq(document).ready( function() {
504
  if ( !jq(this).is(':hidden') )
505
  child_count++;
506
  });
507
- comment_li.fadeOut(200);
 
 
508
 
509
  /* Decrease the "Reply (X)" button count */
510
  var count_span = jq('li#' + comment_li.parents('ul#activity-stream > li').attr('id') + ' a.acomment-reply span');
511
  var new_count = count_span.html() - ( 1 + child_count );
512
  count_span.html(new_count);
 
 
 
 
 
 
513
 
514
  /* If that was the last comment for the item, remove the has-comments class to clean up the styling */
515
  if ( 0 == new_count ) {
@@ -760,7 +803,7 @@ jq(document).ready( function() {
760
  jq.post( ajaxurl, {
761
  action: 'groups_invite_user',
762
  'friend_action': friend_action,
763
- 'cookie': encodeURIComponent(document.cookie),
764
  '_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
765
  'friend_id': friend_id,
766
  'group_id': jq("input#group_id").val()
@@ -783,7 +826,7 @@ jq(document).ready( function() {
783
  });
784
 
785
  /* Remove a user from the list of users to invite to a group */
786
- jq("#friend-list li a.remove").on('click', function() {
787
  jq('.ajax-loader').toggle();
788
 
789
  var friend_id = jq(this).attr('id');
@@ -793,7 +836,7 @@ jq(document).ready( function() {
793
  jq.post( ajaxurl, {
794
  action: 'groups_invite_user',
795
  'friend_action': 'uninvite',
796
- 'cookie': encodeURIComponent(document.cookie),
797
  '_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
798
  'friend_id': friend_id,
799
  'group_id': jq("input#group_id").val()
@@ -860,7 +903,7 @@ jq(document).ready( function() {
860
 
861
  jq.post( ajaxurl, {
862
  action: action,
863
- 'cookie': encodeURIComponent(document.cookie),
864
  'id': id,
865
  '_wpnonce': nonce
866
  },
@@ -902,7 +945,7 @@ jq(document).ready( function() {
902
 
903
  jq.post( ajaxurl, {
904
  action: 'addremove_friend',
905
- 'cookie': encodeURIComponent(document.cookie),
906
  'fid': fid,
907
  '_wpnonce': nonce
908
  },
@@ -951,7 +994,7 @@ jq(document).ready( function() {
951
 
952
  jq.post( ajaxurl, {
953
  action: 'joinleave_group',
954
- 'cookie': encodeURIComponent(document.cookie),
955
  'gid': gid,
956
  '_wpnonce': nonce
957
  },
@@ -1008,7 +1051,7 @@ jq(document).ready( function() {
1008
 
1009
  jq.post( ajaxurl, {
1010
  action: 'messages_send_reply',
1011
- 'cookie': encodeURIComponent(document.cookie),
1012
  '_wpnonce': jq("input#send_message_nonce").val(),
1013
 
1014
  'content': jq("#message_content").val(),
@@ -1289,7 +1332,7 @@ function bp_filter_request( object, filter, scope, target, search_terms, page, e
1289
 
1290
  bp_ajax_request = jq.post( ajaxurl, {
1291
  action: object + '_filter',
1292
- 'cookie': encodeURIComponent(document.cookie),
1293
  'object': object,
1294
  'filter': filter,
1295
  'search_terms': search_terms,
@@ -1337,7 +1380,7 @@ function bp_activity_request(scope, filter) {
1337
 
1338
  bp_ajax_request = jq.post( ajaxurl, {
1339
  action: 'activity_widget_filter',
1340
- 'cookie': encodeURIComponent(document.cookie),
1341
  '_wpnonce_activity_filter': jq("input#_wpnonce_activity_filter").val(),
1342
  'scope': scope,
1343
  'filter': filter
@@ -1388,7 +1431,7 @@ function bp_dtheme_hide_comments() {
1388
  jq(this).toggle();
1389
 
1390
  if ( !i )
1391
- jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_all + ' ' + comment_count + ' ' + BP_DTheme.comments + '</a></li>' );
1392
  }
1393
  });
1394
 
@@ -1431,6 +1474,31 @@ function clear(container) {
1431
  return;
1432
  }
1433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1434
  /* ScrollTo plugin - just inline and minified */
1435
  ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
1436
 
46
  height:'50px'
47
  });
48
  jq("#aw-whats-new-submit").prop("disabled", false);
49
+
50
+ var $whats_new_form = jq("form#whats-new-form");
51
+ if ( $whats_new_form.hasClass("submitted") ) {
52
+ $whats_new_form.removeClass("submitted");
53
+ }
54
+ });
55
+
56
+ /* On blur, shrink if it's empty */
57
+ jq('#whats-new').blur( function(){
58
+ if (!this.value.match(/\S+/)) {
59
+ this.value = "";
60
+ jq("#whats-new-options").animate({
61
+ height:'40px'
62
+ });
63
+ jq("form#whats-new-form textarea").animate({
64
+ height:'20px'
65
+ });
66
+ jq("#aw-whats-new-submit").prop("disabled", true);
67
+ }
68
  });
69
 
70
  /* New posts */
71
  jq("input#aw-whats-new-submit").click( function() {
72
  var button = jq(this);
73
+ var form = button.closest("form#whats-new-form");
74
 
75
  form.children().each( function() {
76
  if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
81
  jq('div.error').remove();
82
  button.addClass('loading');
83
  button.prop('disabled', true);
84
+ form.addClass("submitted");
85
 
86
  /* Default POST values */
87
  var object = '';
95
 
96
  jq.post( ajaxurl, {
97
  action: 'post_update',
98
+ 'cookie': bp_get_cookies(),
99
  '_wpnonce_post_update': jq("input#_wpnonce_post_update").val(),
100
  'content': content,
101
  'object': object,
122
  }
123
 
124
  jq("ul#activity-stream").prepend(response);
125
+ jq("ul#activity-stream li:first").addClass('new-update just-posted');
126
 
127
  if ( 0 != jq("#latest-update").length ) {
128
  var l = jq("ul#activity-stream li.new-update .activity-content .activity-inner p").html();
215
 
216
  jq.post( ajaxurl, {
217
  action: 'activity_mark_' + type,
218
+ 'cookie': bp_get_cookies(),
219
  'id': parent_id
220
  },
221
  function(response) {
269
 
270
  jq.post( ajaxurl, {
271
  action: 'delete_activity',
272
+ 'cookie': bp_get_cookies(),
273
  'id': id,
274
  '_wpnonce': nonce
275
  },
321
 
322
  var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
323
 
324
+ var just_posted = [];
325
+
326
+ jq('.activity-list li.just-posted').each( function(){
327
+ just_posted.push( jq(this).attr('id').replace( 'activity-','' ) );
328
+ });
329
+
330
  jq.post( ajaxurl, {
331
  action: 'activity_get_older_updates',
332
+ 'cookie': bp_get_cookies(),
333
+ 'page': oldest_page,
334
+ 'exclude_just_posted': just_posted.join(',')
335
  },
336
  function(response)
337
  {
443
 
444
  var ajaxdata = {
445
  action: 'new_activity_comment',
446
+ 'cookie': bp_get_cookies(),
447
  '_wpnonce_new_activity_comment': jq("input#_wpnonce_new_activity_comment").val(),
448
  'comment_id': comment_id,
449
  'form_id': form_id[2],
463
  if ( response[0] + response[1] == '-1' ) {
464
  form.append( jq( response.substr( 2, response.length ) ).hide().fadeIn( 200 ) );
465
  } else {
466
+ var activity_comments = form.parent();
467
  form.fadeOut( 200, function() {
468
+ if ( 0 == activity_comments.children('ul').length ) {
469
+ if ( activity_comments.hasClass('activity-comments') ) {
470
+ activity_comments.prepend('<ul></ul>');
471
  } else {
472
+ activity_comments.append('<ul></ul>');
473
  }
474
  }
475
 
476
  /* Preceeding whitespace breaks output with jQuery 1.9.0 */
477
  var the_comment = jq.trim( response );
478
 
479
+ activity_comments.children('ul').append( jq( the_comment ).hide().fadeIn( 200 ) );
480
  form.children('textarea').val('');
481
+ activity_comments.parent().addClass('has-comments');
482
  } );
483
 
484
  jq( 'form#' + form.attr('id') + ' textarea').val('');
485
 
486
  /* Increase the "Reply (X)" button count */
487
  jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
488
+
489
+ // Increment the 'Show all x comments' string, if present
490
+ var show_all_a = activity_comments.find('.show-all').find('a');
491
+ if ( show_all_a ) {
492
+ var new_count = jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html();
493
+ show_all_a.html( BP_DTheme.show_x_comments.replace( '%d', new_count ) );
494
+ }
495
  }
496
 
497
  jq(target).prop("disabled", false);
523
 
524
  jq.post( ajaxurl, {
525
  action: 'delete_activity_comment',
526
+ 'cookie': bp_get_cookies(),
527
  '_wpnonce': nonce,
528
  'id': comment_id
529
  },
539
  if ( !jq(this).is(':hidden') )
540
  child_count++;
541
  });
542
+ comment_li.fadeOut(200, function() {
543
+ comment_li.remove();
544
+ });
545
 
546
  /* Decrease the "Reply (X)" button count */
547
  var count_span = jq('li#' + comment_li.parents('ul#activity-stream > li').attr('id') + ' a.acomment-reply span');
548
  var new_count = count_span.html() - ( 1 + child_count );
549
  count_span.html(new_count);
550
+
551
+ // Change the 'Show all x comments' text
552
+ var show_all_a = comment_li.siblings('.show-all').find('a');
553
+ if ( show_all_a ) {
554
+ show_all_a.html( BP_DTheme.show_x_comments.replace( '%d', new_count ) );
555
+ }
556
 
557
  /* If that was the last comment for the item, remove the has-comments class to clean up the styling */
558
  if ( 0 == new_count ) {
803
  jq.post( ajaxurl, {
804
  action: 'groups_invite_user',
805
  'friend_action': friend_action,
806
+ 'cookie': bp_get_cookies(),
807
  '_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
808
  'friend_id': friend_id,
809
  'group_id': jq("input#group_id").val()
826
  });
827
 
828
  /* Remove a user from the list of users to invite to a group */
829
+ jq("#friend-list").on('click', 'li a.remove', function() {
830
  jq('.ajax-loader').toggle();
831
 
832
  var friend_id = jq(this).attr('id');
836
  jq.post( ajaxurl, {
837
  action: 'groups_invite_user',
838
  'friend_action': 'uninvite',
839
+ 'cookie': bp_get_cookies(),
840
  '_wpnonce': jq("input#_wpnonce_invite_uninvite_user").val(),
841
  'friend_id': friend_id,
842
  'group_id': jq("input#group_id").val()
903
 
904
  jq.post( ajaxurl, {
905
  action: action,
906
+ 'cookie': bp_get_cookies(),
907
  'id': id,
908
  '_wpnonce': nonce
909
  },
945
 
946
  jq.post( ajaxurl, {
947
  action: 'addremove_friend',
948
+ 'cookie': bp_get_cookies(),
949
  'fid': fid,
950
  '_wpnonce': nonce
951
  },
994
 
995
  jq.post( ajaxurl, {
996
  action: 'joinleave_group',
997
+ 'cookie': bp_get_cookies(),
998
  'gid': gid,
999
  '_wpnonce': nonce
1000
  },
1051
 
1052
  jq.post( ajaxurl, {
1053
  action: 'messages_send_reply',
1054
+ 'cookie': bp_get_cookies(),
1055
  '_wpnonce': jq("input#send_message_nonce").val(),
1056
 
1057
  'content': jq("#message_content").val(),
1332
 
1333
  bp_ajax_request = jq.post( ajaxurl, {
1334
  action: object + '_filter',
1335
+ 'cookie': bp_get_cookies(),
1336
  'object': object,
1337
  'filter': filter,
1338
  'search_terms': search_terms,
1380
 
1381
  bp_ajax_request = jq.post( ajaxurl, {
1382
  action: 'activity_widget_filter',
1383
+ 'cookie': bp_get_cookies(),
1384
  '_wpnonce_activity_filter': jq("input#_wpnonce_activity_filter").val(),
1385
  'scope': scope,
1386
  'filter': filter
1431
  jq(this).toggle();
1432
 
1433
  if ( !i )
1434
+ jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_x_comments.replace( '%d', comment_count ) + '</a></li>' );
1435
  }
1436
  });
1437
 
1474
  return;
1475
  }
1476
 
1477
+ /* Returns a querystring of BP cookies (cookies beginning with 'bp-') */
1478
+ function bp_get_cookies() {
1479
+ // get all cookies and split into an array
1480
+ var allCookies = document.cookie.split(";");
1481
+
1482
+ var bpCookies = {};
1483
+ var cookiePrefix = 'bp-';
1484
+
1485
+ // loop through cookies
1486
+ for (var i = 0; i < allCookies.length; i++) {
1487
+ var cookie = allCookies[i];
1488
+ var delimiter = cookie.indexOf("=");
1489
+ var name = unescape( cookie.slice(0, delimiter) ).trim();
1490
+ var value = unescape( cookie.slice(delimiter + 1) );
1491
+
1492
+ // if BP cookie, store it
1493
+ if ( name.indexOf(cookiePrefix) == 0 ) {
1494
+ bpCookies[name] = value;
1495
+ }
1496
+ }
1497
+
1498
+ // returns BP cookies as querystring
1499
+ return encodeURIComponent( jq.param(bpCookies) );
1500
+ }
1501
+
1502
  /* ScrollTo plugin - just inline and minified */
1503
  ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
1504
 
bp-themes/bp-default/activity/comment.php CHANGED
@@ -27,7 +27,7 @@
27
  <div class="acomment-meta">
28
  <?php
29
  /* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
30
- printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded() );
31
  ?>
32
  </div>
33
 
27
  <div class="acomment-meta">
28
  <?php
29
  /* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
30
+ printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_comment_permalink(), bp_get_activity_comment_date_recorded() );
31
  ?>
32
  </div>
33
 
bp-themes/bp-default/activity/index.php CHANGED
@@ -72,9 +72,13 @@ get_header( 'buddypress' ); ?>
72
 
73
  <?php endif; ?>
74
 
75
- <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
76
 
77
- <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '<span>%s new</span>', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></strong><?php endif; ?></a></li>
 
 
 
 
78
 
79
  <?php endif; ?>
80
 
72
 
73
  <?php endif; ?>
74
 
75
+ <?php if ( bp_activity_do_mentions() ) : ?>
76
 
77
+ <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
78
+
79
+ <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li>
80
+
81
+ <?php endif; ?>
82
 
83
  <?php endif; ?>
84
 
bp-themes/bp-default/comments.php CHANGED
@@ -52,7 +52,7 @@
52
  <?php if ( ! comments_open() ) : ?>
53
  <?php if ( pings_open() ) : ?>
54
  <p class="comments-closed pings-open">
55
- <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'buddypress' ), trackback_url( '0' ) ); ?>
56
  </p>
57
  <?php else : ?>
58
  <p class="comments-closed">
52
  <?php if ( ! comments_open() ) : ?>
53
  <?php if ( pings_open() ) : ?>
54
  <p class="comments-closed pings-open">
55
+ <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'buddypress' ), get_trackback_url() ); ?>
56
  </p>
57
  <?php else : ?>
58
  <p class="comments-closed">
bp-themes/bp-default/functions.php CHANGED
@@ -119,7 +119,7 @@ function bp_dtheme_setup() {
119
  add_action( 'bp_member_header_actions', 'bp_add_friend_button', 5 );
120
 
121
  // Activity button
122
- if ( bp_is_active( 'activity' ) )
123
  add_action( 'bp_member_header_actions', 'bp_send_public_message_button', 20 );
124
 
125
  // Messages button
@@ -159,6 +159,7 @@ function bp_dtheme_enqueue_scripts() {
159
  'accepted' => __( 'Accepted', 'buddypress' ),
160
  'rejected' => __( 'Rejected', 'buddypress' ),
161
  'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
 
162
  'show_all' => __( 'Show all', 'buddypress' ),
163
  'comments' => __( 'comments', 'buddypress' ),
164
  'close' => __( 'Close', 'buddypress' ),
119
  add_action( 'bp_member_header_actions', 'bp_add_friend_button', 5 );
120
 
121
  // Activity button
122
+ if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() )
123
  add_action( 'bp_member_header_actions', 'bp_send_public_message_button', 20 );
124
 
125
  // Messages button
159
  'accepted' => __( 'Accepted', 'buddypress' ),
160
  'rejected' => __( 'Rejected', 'buddypress' ),
161
  'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
162
+ 'show_x_comments' => __( 'Show all %d comments', 'buddypress' ),
163
  'show_all' => __( 'Show all', 'buddypress' ),
164
  'comments' => __( 'comments', 'buddypress' ),
165
  'close' => __( 'Close', 'buddypress' ),
bp-themes/bp-default/groups/single/admin.php CHANGED
@@ -22,9 +22,9 @@
22
  <?php do_action( 'groups_custom_group_fields_editable' ); ?>
23
 
24
  <p>
25
- <label for="group-notifiy-members"><?php _e( 'Notify group members of changes via email', 'buddypress' ); ?></label>
26
- <input type="radio" name="group-notify-members" value="1" /> <?php _e( 'Yes', 'buddypress' ); ?>&nbsp;
27
- <input type="radio" name="group-notify-members" value="0" checked="checked" /> <?php _e( 'No', 'buddypress' ); ?>&nbsp;
28
  </p>
29
 
30
  <?php do_action( 'bp_after_group_details_admin' ); ?>
@@ -87,30 +87,30 @@
87
  </label>
88
  </div>
89
 
90
- <hr />
91
-
92
- <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
93
 
94
- <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
95
 
96
- <div class="radio">
97
- <label>
98
- <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
99
- <strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
100
- </label>
101
 
102
- <label>
103
- <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
104
- <strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
 
105
  </label>
106
-
107
- <label>
108
- <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
109
- <strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
110
- </label>
111
- </div>
112
 
113
- <hr />
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  <?php do_action( 'bp_after_group_settings_admin' ); ?>
116
 
@@ -172,14 +172,14 @@
172
  <?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?>
173
 
174
  <?php do_action( 'bp_before_group_manage_members_admin' ); ?>
175
-
176
  <div class="bp-widget">
177
  <h4><?php _e( 'Administrators', 'buddypress' ); ?></h4>
178
 
179
  <?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
180
-
181
  <ul id="admins-list" class="item-list single-line">
182
-
183
  <?php while ( bp_members() ) : bp_the_member(); ?>
184
  <li>
185
  <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
@@ -188,26 +188,26 @@
188
  <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
189
  <span class="small">
190
  <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
191
- </span>
192
  <?php endif; ?>
193
- </h5>
194
  </li>
195
  <?php endwhile; ?>
196
-
197
  </ul>
198
-
199
  <?php endif; ?>
200
 
201
  </div>
202
-
203
  <?php if ( bp_group_has_moderators() ) : ?>
204
  <div class="bp-widget">
205
- <h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>
206
-
207
  <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
208
  <ul id="mods-list" class="item-list single-line">
209
-
210
- <?php while ( bp_members() ) : bp_the_member(); ?>
211
  <li>
212
  <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
213
  <h5>
@@ -215,13 +215,13 @@
215
  <span class="small">
216
  <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
217
  <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
218
- </span>
219
- </h5>
220
- </li>
221
- <?php endwhile; ?>
222
-
223
  </ul>
224
-
225
  <?php endif; ?>
226
  </div>
227
  <?php endif ?>
22
  <?php do_action( 'groups_custom_group_fields_editable' ); ?>
23
 
24
  <p>
25
+ <label for="group-notifiy-members">
26
+ <input type="checkbox" name="group-notify-members" value="1" /> <?php _e( 'Notify group members of these changes via email', 'buddypress' ); ?>
27
+ </label>
28
  </p>
29
 
30
  <?php do_action( 'bp_after_group_details_admin' ); ?>
87
  </label>
88
  </div>
89
 
90
+ <hr />
 
 
91
 
92
+ <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
93
 
94
+ <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
 
 
 
 
95
 
96
+ <div class="radio">
97
+ <label>
98
+ <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
99
+ <strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
100
  </label>
 
 
 
 
 
 
101
 
102
+ <label>
103
+ <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
104
+ <strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
105
+ </label>
106
+
107
+ <label>
108
+ <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
109
+ <strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
110
+ </label>
111
+ </div>
112
+
113
+ <hr />
114
 
115
  <?php do_action( 'bp_after_group_settings_admin' ); ?>
116
 
172
  <?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?>
173
 
174
  <?php do_action( 'bp_before_group_manage_members_admin' ); ?>
175
+
176
  <div class="bp-widget">
177
  <h4><?php _e( 'Administrators', 'buddypress' ); ?></h4>
178
 
179
  <?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
180
+
181
  <ul id="admins-list" class="item-list single-line">
182
+
183
  <?php while ( bp_members() ) : bp_the_member(); ?>
184
  <li>
185
  <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
188
  <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
189
  <span class="small">
190
  <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
191
+ </span>
192
  <?php endif; ?>
193
+ </h5>
194
  </li>
195
  <?php endwhile; ?>
196
+
197
  </ul>
198
+
199
  <?php endif; ?>
200
 
201
  </div>
202
+
203
  <?php if ( bp_group_has_moderators() ) : ?>
204
  <div class="bp-widget">
205
+ <h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>
206
+
207
  <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
208
  <ul id="mods-list" class="item-list single-line">
209
+
210
+ <?php while ( bp_members() ) : bp_the_member(); ?>
211
  <li>
212
  <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
213
  <h5>
215
  <span class="small">
216
  <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
217
  <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
218
+ </span>
219
+ </h5>
220
+ </li>
221
+ <?php endwhile; ?>
222
+
223
  </ul>
224
+
225
  <?php endif; ?>
226
  </div>
227
  <?php endif ?>
bp-themes/bp-default/members/index.php CHANGED
@@ -28,6 +28,8 @@ get_header( 'buddypress' ); ?>
28
 
29
  </div><!-- #members-dir-search -->
30
 
 
 
31
  <div class="item-list-tabs" role="navigation">
32
  <ul>
33
  <li class="selected" id="members-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
28
 
29
  </div><!-- #members-dir-search -->
30
 
31
+ <?php do_action( 'bp_before_directory_members_tabs' ); ?>
32
+
33
  <div class="item-list-tabs" role="navigation">
34
  <ul>
35
  <li class="selected" id="members-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
bp-themes/bp-default/members/single/profile.php CHANGED
@@ -9,17 +9,11 @@
9
 
10
  ?>
11
 
12
- <?php if ( bp_is_my_profile() ) : ?>
13
-
14
- <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
15
- <ul>
16
-
17
- <?php bp_get_options_nav(); ?>
18
-
19
- </ul>
20
- </div><!-- .item-list-tabs -->
21
-
22
- <?php endif; ?>
23
 
24
  <?php do_action( 'bp_before_profile_content' ); ?>
25
 
9
 
10
  ?>
11
 
12
+ <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
13
+ <ul>
14
+ <?php bp_get_options_nav(); ?>
15
+ </ul>
16
+ </div><!-- .item-list-tabs -->
 
 
 
 
 
 
17
 
18
  <?php do_action( 'bp_before_profile_content' ); ?>
19
 
bp-themes/bp-default/members/single/settings/general.php CHANGED
@@ -55,7 +55,7 @@ get_header( 'buddypress' ); ?>
55
  <?php if ( !is_super_admin() ) : ?>
56
 
57
  <label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
58
- <input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo site_url( add_query_arg( array( 'action' => 'lostpassword' ), 'wp-login.php' ), 'login' ); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
59
 
60
  <?php endif; ?>
61
 
55
  <?php if ( !is_super_admin() ) : ?>
56
 
57
  <label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
58
+ <input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo wp_lostpassword_url(); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
59
 
60
  <?php endif; ?>
61
 
bp-themes/bp-default/registration/activate.php CHANGED
@@ -22,7 +22,7 @@
22
  <?php if ( isset( $_GET['e'] ) ) : ?>
23
  <p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p>
24
  <?php else : ?>
25
- <p><?php _e( 'Your account was activated successfully! You can now log in with the username and password you provided when you signed up.', 'buddypress' ); ?></p>
26
  <?php endif; ?>
27
 
28
  <?php else : ?>
22
  <?php if ( isset( $_GET['e'] ) ) : ?>
23
  <p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p>
24
  <?php else : ?>
25
+ <p><?php printf( __( 'Your account was activated successfully! You can now <a href="%s">log in</a> with the username and password you provided when you signed up.', 'buddypress' ), wp_login_url( bp_get_root_domain() ) ); ?></p>
26
  <?php endif; ?>
27
 
28
  <?php else : ?>
bp-themes/bp-default/registration/register.php CHANGED
@@ -74,7 +74,7 @@
74
  <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
75
 
76
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
77
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
78
  <input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" />
79
 
80
  <?php endif; ?>
@@ -82,7 +82,7 @@
82
  <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
83
 
84
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
85
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
86
  <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea>
87
 
88
  <?php endif; ?>
@@ -90,7 +90,7 @@
90
  <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
91
 
92
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
93
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
94
  <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
95
  <?php bp_the_profile_field_options(); ?>
96
  </select>
@@ -100,7 +100,7 @@
100
  <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
101
 
102
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
103
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
104
  <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple">
105
  <?php bp_the_profile_field_options(); ?>
106
  </select>
@@ -112,7 +112,7 @@
112
  <div class="radio">
113
  <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
114
 
115
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
116
  <?php bp_the_profile_field_options(); ?>
117
 
118
  <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
@@ -127,7 +127,7 @@
127
  <div class="checkbox">
128
  <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
129
 
130
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
131
  <?php bp_the_profile_field_options(); ?>
132
  </div>
133
 
@@ -137,7 +137,7 @@
137
 
138
  <div class="datebox">
139
  <label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
140
- <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
141
 
142
  <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day">
143
  <?php bp_the_profile_field_options( 'type=day' ); ?>
@@ -215,7 +215,7 @@
215
  <?php if ( is_subdomain_install() ) : ?>
216
  http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
217
  <?php else : ?>
218
- <?php echo site_url(); ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
219
  <?php endif; ?>
220
 
221
  <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
@@ -250,7 +250,7 @@
250
 
251
  <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
252
 
253
- <h2><?php _e( 'Sign Up Complete!', 'buddypress' ); ?></h2>
254
 
255
  <?php do_action( 'template_notices' ); ?>
256
  <?php do_action( 'bp_before_registration_confirmed' ); ?>
74
  <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
75
 
76
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
77
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
78
  <input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" />
79
 
80
  <?php endif; ?>
82
  <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
83
 
84
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
85
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
86
  <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea>
87
 
88
  <?php endif; ?>
90
  <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
91
 
92
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
93
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
94
  <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
95
  <?php bp_the_profile_field_options(); ?>
96
  </select>
100
  <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
101
 
102
  <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
103
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
104
  <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple">
105
  <?php bp_the_profile_field_options(); ?>
106
  </select>
112
  <div class="radio">
113
  <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
114
 
115
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
116
  <?php bp_the_profile_field_options(); ?>
117
 
118
  <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
127
  <div class="checkbox">
128
  <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
129
 
130
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
131
  <?php bp_the_profile_field_options(); ?>
132
  </div>
133
 
137
 
138
  <div class="datebox">
139
  <label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
140
+ <?php do_action( bp_get_the_profile_field_errors_action() ); ?>
141
 
142
  <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day">
143
  <?php bp_the_profile_field_options( 'type=day' ); ?>
215
  <?php if ( is_subdomain_install() ) : ?>
216
  http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
217
  <?php else : ?>
218
+ <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
219
  <?php endif; ?>
220
 
221
  <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
250
 
251
  <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
252
 
253
+ <h2><?php _e( 'Check Your Email To Activate Your Account!', 'buddypress' ); ?></h2>
254
 
255
  <?php do_action( 'template_notices' ); ?>
256
  <?php do_action( 'bp_before_registration_confirmed' ); ?>
bp-themes/bp-default/rtl.css CHANGED
@@ -2,7 +2,7 @@
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
- * Version: 1.7.2
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
@@ -21,4 +21,4 @@
21
  *
22
  * This file intentionally left blank. CSS is enqueued in functions.php
23
  *
24
- */
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
+ * Version: 1.8-beta1
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
21
  *
22
  * This file intentionally left blank. CSS is enqueued in functions.php
23
  *
24
+ */
bp-themes/bp-default/style.css CHANGED
@@ -2,7 +2,7 @@
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
- * Version: 1.7.2
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
@@ -21,4 +21,4 @@
21
  *
22
  * This file intentionally left blank. CSS is enqueued in functions.php
23
  *
24
- */
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
+ * Version: 1.8-beta1
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
21
  *
22
  * This file intentionally left blank. CSS is enqueued in functions.php
23
  *
24
+ */
bp-xprofile/admin/js/admin.js CHANGED
@@ -48,6 +48,9 @@ function add_option(forWhat) {
48
  // re-initialize the sorable ui
49
  enableSortableFieldOptions( forWhat );
50
 
 
 
 
51
  theId++;
52
 
53
  document.getElementById(forWhat + "_option_number").value = theId;
@@ -106,6 +109,9 @@ function destroySortableFieldOptions() {
106
 
107
  jQuery( document ).ready( function() {
108
 
 
 
 
109
  // Set up deleting options ajax
110
  jQuery( 'a.ajax-option-delete' ).on( 'click', function() {
111
  var theId = this.id.split( '-' );
48
  // re-initialize the sorable ui
49
  enableSortableFieldOptions( forWhat );
50
 
51
+ // set focus on newly created element
52
+ document.getElementById(forWhat + "_option" + theId).focus();
53
+
54
  theId++;
55
 
56
  document.getElementById(forWhat + "_option_number").value = theId;
109
 
110
  jQuery( document ).ready( function() {
111
 
112
+ // Set focus in Field Title, if we're on the right page
113
+ jQuery( '#bp-xprofile-add-field #title' ).focus();
114
+
115
  // Set up deleting options ajax
116
  jQuery( 'a.ajax-option-delete' ).on( 'click', function() {
117
  var theId = this.id.split( '-' );
bp-xprofile/admin/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- function add_option(g){var j=document.getElementById(g+"_more");var l=document.getElementById(g+"_option_number").value;var a=document.createElement("p");var h=document.createElement("input");var k=document.createElement("span");var e=document.createTextNode("\u00A0\u039E\u00A0");var b=document.createElement("input");var f=document.createElement("span");var d=document.createTextNode(" Default Value ");a.setAttribute("id",g+"_div"+l);a.setAttribute("class","sortable");h.setAttribute("type","text");h.setAttribute("name",g+"_option["+l+"]");h.setAttribute("id",g+"_option"+l);k.appendChild(e);if(g=="checkbox"||g=="multiselectbox"){b.setAttribute("type","checkbox");b.setAttribute("name","isDefault_"+g+"_option["+l+"]")}else{b.setAttribute("type","radio");b.setAttribute("name","isDefault_"+g+"_option")}b.setAttribute("value",l);f.appendChild(d);var c=document.createElement("a");var i=document.createTextNode("[x]");c.setAttribute("href","javascript:hide('"+g+"_div"+l+"')");c.setAttribute("class","delete");c.appendChild(i);a.appendChild(k);a.appendChild(h);a.appendChild(document.createTextNode(" "));a.appendChild(b);a.appendChild(f);a.appendChild(c);j.appendChild(a);enableSortableFieldOptions(g);l++;document.getElementById(g+"_option_number").value=l}function show_options(a){document.getElementById("radio").style.display="none";document.getElementById("selectbox").style.display="none";document.getElementById("multiselectbox").style.display="none";document.getElementById("checkbox").style.display="none";if(a=="radio"){document.getElementById("radio").style.display=""}if(a=="selectbox"){document.getElementById("selectbox").style.display=""}if(a=="multiselectbox"){document.getElementById("multiselectbox").style.display=""}if(a=="checkbox"){document.getElementById("checkbox").style.display=""}}function hide(a){if(!document.getElementById(a)){return false}document.getElementById(a).style.display="none";document.getElementById(a).value=""}var fixHelper=function(b,a){a.children().each(function(){jQuery(this).width(jQuery(this).width())});return a};function enableSortableFieldOptions(a){if(jQuery("#"+a+" p.sortable").length>1){jQuery(".options-box").sortable({items:"p.sortable",tolerance:"pointer",axis:"y",handle:"span"});jQuery(".sortable span").css("cursor","move")}}function destroySortableFieldOptions(){jQuery(".options-box").sortable("destroy");jQuery(".sortable span").css("cursor","default")}jQuery(document).ready(function(){jQuery("a.ajax-option-delete").on("click",function(){var d=this.id.split("-");d=d[1];jQuery.post(ajaxurl,{action:"xprofile_delete_option",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce").val(),option_id:d},function(e){})});jQuery('[id^="sort_order_"]').change(function(){if(jQuery(this).val()!="custom"){destroySortableFieldOptions()}else{enableSortableFieldOptions(jQuery("#fieldtype :selected").val())}});jQuery("ul#field-group-tabs").show();jQuery("ul#field-group-tabs").sortable({cursor:"move",axis:"x",opacity:0.6,items:"li",tolerance:"pointer",update:function(){jQuery.post(ajaxurl,{action:"xprofile_reorder_groups",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_groups:jQuery("input#_wpnonce_reorder_groups").val(),group_order:jQuery(this).sortable("serialize")},function(d){})}}).disableSelection();jQuery("fieldset.field-group").sortable({cursor:"move",opacity:0.3,items:"fieldset",tolerance:"pointer",update:function(){jQuery.post(ajaxurl,{action:"xprofile_reorder_fields",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_fields:jQuery("input#_wpnonce_reorder_fields").val(),field_order:jQuery(this).sortable("serialize"),field_group_id:jQuery(this).attr("id")},function(d){})}}).disableSelection().css("cursor","move");enableSortableFieldOptions(jQuery("#fieldtype :selected").val());var b;var a=jQuery("#tabs").tabs();c(a);function c(d){b=jQuery("ul:first li",d).droppable({accept:".connectedSortable fieldset",hoverClass:"ui-state-hover",activeClass:"ui-state-acceptable",touch:"pointer",tolerance:"pointer",drop:function(g,h){var e=jQuery(this);var f=jQuery(e.find("a").attr("href")).find(".connectedSortable");jQuery(e).removeClass("drop-candidate");h.draggable.hide("slow",function(){d.tabs("option","active",b.index(e));jQuery(this).appendTo(f).show("slow").animate({opacity:"1"},500);f=jQuery(e.find("a").attr("href")).find(".connectedSortable");jQuery(f).find("p.nofields").hide("slow");jQuery.post(ajaxurl,{action:"xprofile_reorder_fields",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_fields:jQuery("input#_wpnonce_reorder_fields").val(),field_order:jQuery(f).sortable("serialize"),field_group_id:jQuery(f).attr("id")},function(i){})})},over:function(e,f){jQuery(this).addClass("drop-candidate")},out:function(e,f){jQuery(this).removeClass("drop-candidate")}})}});
1
+ function add_option(g){var j=document.getElementById(g+"_more");var l=document.getElementById(g+"_option_number").value;var a=document.createElement("p");var h=document.createElement("input");var k=document.createElement("span");var e=document.createTextNode("\u00A0\u039E\u00A0");var b=document.createElement("input");var f=document.createElement("span");var d=document.createTextNode(" Default Value ");a.setAttribute("id",g+"_div"+l);a.setAttribute("class","sortable");h.setAttribute("type","text");h.setAttribute("name",g+"_option["+l+"]");h.setAttribute("id",g+"_option"+l);k.appendChild(e);if(g=="checkbox"||g=="multiselectbox"){b.setAttribute("type","checkbox");b.setAttribute("name","isDefault_"+g+"_option["+l+"]")}else{b.setAttribute("type","radio");b.setAttribute("name","isDefault_"+g+"_option")}b.setAttribute("value",l);f.appendChild(d);var c=document.createElement("a");var i=document.createTextNode("[x]");c.setAttribute("href","javascript:hide('"+g+"_div"+l+"')");c.setAttribute("class","delete");c.appendChild(i);a.appendChild(k);a.appendChild(h);a.appendChild(document.createTextNode(" "));a.appendChild(b);a.appendChild(f);a.appendChild(c);j.appendChild(a);enableSortableFieldOptions(g);document.getElementById(g+"_option"+l).focus();l++;document.getElementById(g+"_option_number").value=l}function show_options(a){document.getElementById("radio").style.display="none";document.getElementById("selectbox").style.display="none";document.getElementById("multiselectbox").style.display="none";document.getElementById("checkbox").style.display="none";if(a=="radio"){document.getElementById("radio").style.display=""}if(a=="selectbox"){document.getElementById("selectbox").style.display=""}if(a=="multiselectbox"){document.getElementById("multiselectbox").style.display=""}if(a=="checkbox"){document.getElementById("checkbox").style.display=""}}function hide(a){if(!document.getElementById(a)){return false}document.getElementById(a).style.display="none";document.getElementById(a).value=""}var fixHelper=function(b,a){a.children().each(function(){jQuery(this).width(jQuery(this).width())});return a};function enableSortableFieldOptions(a){if(jQuery("#"+a+" p.sortable").length>1){jQuery(".options-box").sortable({items:"p.sortable",tolerance:"pointer",axis:"y",handle:"span"});jQuery(".sortable span").css("cursor","move")}}function destroySortableFieldOptions(){jQuery(".options-box").sortable("destroy");jQuery(".sortable span").css("cursor","default")}jQuery(document).ready(function(){jQuery("#bp-xprofile-add-field #title").focus();jQuery("a.ajax-option-delete").on("click",function(){var d=this.id.split("-");d=d[1];jQuery.post(ajaxurl,{action:"xprofile_delete_option",cookie:encodeURIComponent(document.cookie),_wpnonce:jQuery("input#_wpnonce").val(),option_id:d},function(e){})});jQuery('[id^="sort_order_"]').change(function(){if(jQuery(this).val()!="custom"){destroySortableFieldOptions()}else{enableSortableFieldOptions(jQuery("#fieldtype :selected").val())}});jQuery("ul#field-group-tabs").show();jQuery("ul#field-group-tabs").sortable({cursor:"move",axis:"x",opacity:0.6,items:"li",tolerance:"pointer",update:function(){jQuery.post(ajaxurl,{action:"xprofile_reorder_groups",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_groups:jQuery("input#_wpnonce_reorder_groups").val(),group_order:jQuery(this).sortable("serialize")},function(d){})}}).disableSelection();jQuery("fieldset.field-group").sortable({cursor:"move",opacity:0.3,items:"fieldset",tolerance:"pointer",update:function(){jQuery.post(ajaxurl,{action:"xprofile_reorder_fields",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_fields:jQuery("input#_wpnonce_reorder_fields").val(),field_order:jQuery(this).sortable("serialize"),field_group_id:jQuery(this).attr("id")},function(d){})}}).disableSelection().css("cursor","move");enableSortableFieldOptions(jQuery("#fieldtype :selected").val());var b;var a=jQuery("#tabs").tabs();c(a);function c(d){b=jQuery("ul:first li",d).droppable({accept:".connectedSortable fieldset",hoverClass:"ui-state-hover",activeClass:"ui-state-acceptable",touch:"pointer",tolerance:"pointer",drop:function(g,h){var e=jQuery(this);var f=jQuery(e.find("a").attr("href")).find(".connectedSortable");jQuery(e).removeClass("drop-candidate");h.draggable.hide("slow",function(){d.tabs("option","active",b.index(e));jQuery(this).appendTo(f).show("slow").animate({opacity:"1"},500);f=jQuery(e.find("a").attr("href")).find(".connectedSortable");jQuery(f).find("p.nofields").hide("slow");jQuery.post(ajaxurl,{action:"xprofile_reorder_fields",cookie:encodeURIComponent(document.cookie),_wpnonce_reorder_fields:jQuery("input#_wpnonce_reorder_fields").val(),field_order:jQuery(f).sortable("serialize"),field_group_id:jQuery(f).attr("id")},function(i){})})},over:function(e,f){jQuery(this).addClass("drop-candidate")},out:function(e,f){jQuery(this).removeClass("drop-candidate")}})}});
bp-xprofile/bp-xprofile-admin.php CHANGED
@@ -115,7 +115,7 @@ function xprofile_admin( $message = '', $type = 'error' ) {
115
 
116
  <?php if ( $group->can_delete ) : ?>
117
 
118
- <a class="submitdelete deletion ajax-option-delete" href="admin.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
119
 
120
  <?php endif; ?>
121
 
@@ -457,7 +457,7 @@ function xprofile_admin_field( $admin_field, $admin_group, $class = '' ) {
457
 
458
  <?php if ( $field->can_delete ) : ?>
459
 
460
- <a class="submit-delete deletion" href="admin.php?page=bp-profile-setup&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a>
461
 
462
  <?php endif; ?>
463
  </div>
115
 
116
  <?php if ( $group->can_delete ) : ?>
117
 
118
+ <a class="confirm submitdelete deletion ajax-option-delete" href="admin.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
119
 
120
  <?php endif; ?>
121
 
457
 
458
  <?php if ( $field->can_delete ) : ?>
459
 
460
+ <a class="confirm submit-delete deletion" href="admin.php?page=bp-profile-setup&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a>
461
 
462
  <?php endif; ?>
463
  </div>
bp-xprofile/bp-xprofile-classes.php CHANGED
@@ -386,7 +386,7 @@ class BP_XProfile_Group {
386
  </div>
387
  </div>
388
 
389
- <div id="postdiv" class="postarea">
390
  <div class="postbox">
391
  <div id="titlediv"><h3 class="hndle"><?php _e( 'Group Description', 'buddypress' ); ?></h3></div>
392
  <div class="inside">
@@ -453,10 +453,9 @@ class BP_XProfile_Field {
453
  function populate( $id, $user_id, $get_data ) {
454
  global $wpdb, $userdata, $bp;
455
 
456
- // @todo Why are we nooping the user_id ?
457
- $user_id = 0;
458
- if ( is_null( $user_id ) )
459
- $user_id = $userdata->ID;
460
 
461
  $sql = $wpdb->prepare( "SELECT * FROM {$bp->profile->table_name_fields} WHERE id = %d", $id );
462
 
@@ -845,7 +844,7 @@ class BP_XProfile_Field {
845
 
846
  <?php endif; ?>
847
 
848
- <form action="<?php echo esc_url( $action ); ?>" method="post">
849
  <div id="poststuff">
850
  <div id="titlediv">
851
  <h3><label for="title"><?php _e( 'Field Title', 'buddypress' ); ?> *</label></h3>
386
  </div>
387
  </div>
388
 
389
+ <div id="postdiv">
390
  <div class="postbox">
391
  <div id="titlediv"><h3 class="hndle"><?php _e( 'Group Description', 'buddypress' ); ?></h3></div>
392
  <div class="inside">
453
  function populate( $id, $user_id, $get_data ) {
454
  global $wpdb, $userdata, $bp;
455
 
456
+ if ( empty( $user_id ) ) {
457
+ $user_id = isset( $userdata->ID ) ? $userdata->ID : 0;
458
+ }
 
459
 
460
  $sql = $wpdb->prepare( "SELECT * FROM {$bp->profile->table_name_fields} WHERE id = %d", $id );
461
 
844
 
845
  <?php endif; ?>
846
 
847
+ <form id="bp-xprofile-add-field" action="<?php echo esc_url( $action ); ?>" method="post">
848
  <div id="poststuff">
849
  <div id="titlediv">
850
  <h3><label for="title"><?php _e( 'Field Title', 'buddypress' ); ?> *</label></h3>
bp-xprofile/bp-xprofile-template.php CHANGED
@@ -387,6 +387,23 @@ function bp_the_profile_field_input_name() {
387
  return apply_filters( 'bp_get_the_profile_field_input_name', 'field_' . $field->id . $array_box );
388
  }
389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  /**
391
  * bp_the_profile_field_options()
392
  *
@@ -731,7 +748,14 @@ function bp_the_profile_field_visibility_level() {
731
  function bp_get_the_profile_field_visibility_level() {
732
  global $field;
733
 
734
- $retval = !empty( $field->visibility_level ) ? $field->visibility_level : 'public';
 
 
 
 
 
 
 
735
 
736
  return apply_filters( 'bp_get_the_profile_field_visibility_level', $retval );
737
  }
@@ -748,7 +772,15 @@ function bp_the_profile_field_visibility_level_label() {
748
  function bp_get_the_profile_field_visibility_level_label() {
749
  global $field;
750
 
751
- $level = !empty( $field->visibility_level ) ? $field->visibility_level : 'public';
 
 
 
 
 
 
 
 
752
  $fields = bp_xprofile_get_visibility_levels();
753
 
754
  return apply_filters( 'bp_get_the_profile_field_visibility_level_label', $fields[$level]['label'] );
387
  return apply_filters( 'bp_get_the_profile_field_input_name', 'field_' . $field->id . $array_box );
388
  }
389
 
390
+ /**
391
+ * Returns the action name for any signup errors related to this profile field
392
+ *
393
+ * In the registration templates, signup errors are pulled from the global
394
+ * object and rendered at actions that look like 'bp_field_12_errors'. This
395
+ * function allows the action name to be easily concatenated and called in the
396
+ * following fashion:
397
+ * do_action( bp_get_the_profile_field_errors_action() );
398
+ *
399
+ * @since BuddyPress (1.8)
400
+ * @return string The _errors action name corresponding to this profile field
401
+ */
402
+ function bp_get_the_profile_field_errors_action() {
403
+ global $field;
404
+ return 'bp_field_' . $field->id . '_errors';
405
+ }
406
+
407
  /**
408
  * bp_the_profile_field_options()
409
  *
748
  function bp_get_the_profile_field_visibility_level() {
749
  global $field;
750
 
751
+ // On the registration page, values stored in POST should take
752
+ // precedence over default visibility, so that submitted values
753
+ // are not lost on failure
754
+ if ( bp_is_register_page() && ! empty( $_POST['field_' . $field->id . '_visibility'] ) ) {
755
+ $retval = esc_attr( $_POST['field_' . $field->id . '_visibility'] );
756
+ } else {
757
+ $retval = ! empty( $field->visibility_level ) ? $field->visibility_level : 'public';
758
+ }
759
 
760
  return apply_filters( 'bp_get_the_profile_field_visibility_level', $retval );
761
  }
772
  function bp_get_the_profile_field_visibility_level_label() {
773
  global $field;
774
 
775
+ // On the registration page, values stored in POST should take
776
+ // precedence over default visibility, so that submitted values
777
+ // are not lost on failure
778
+ if ( bp_is_register_page() && ! empty( $_POST['field_' . $field->id . '_visibility'] ) ) {
779
+ $level = esc_html( $_POST['field_' . $field->id . '_visibility'] );
780
+ } else {
781
+ $level = ! empty( $field->visibility_level ) ? $field->visibility_level : 'public';
782
+ }
783
+
784
  $fields = bp_xprofile_get_visibility_levels();
785
 
786
  return apply_filters( 'bp_get_the_profile_field_visibility_level_label', $fields[$level]['label'] );