BuddyPress - Version 1.9

Version Description

See: http://codex.buddypress.org/releases/version-1-9/

Download this release

Release Info

Developer johnjamesjacoby
Plugin Icon 128x128 BuddyPress
Version 1.9
Comparing to
See all releases

Code changes from version 1.9-beta2 to 1.9

Files changed (65) hide show
  1. .travis.yml +0 -52
  2. bp-activity/bp-activity-classes.php +6 -1
  3. bp-core/admin/bp-core-functions.php +12 -2
  4. bp-core/admin/css/common.css +277 -68
  5. bp-core/admin/css/common.min.css +1 -1
  6. bp-core/bp-core-admin.php +69 -39
  7. bp-core/bp-core-classes.php +8 -0
  8. bp-core/bp-core-functions.php +10 -5
  9. bp-core/bp-core-template.php +6 -0
  10. bp-core/bp-core-theme-compatibility.php +1 -1
  11. bp-friends/bp-friends-functions.php +6 -0
  12. bp-friends/bp-friends-widgets.php +2 -3
  13. bp-groups/bp-groups-buddybar.php +3 -2
  14. bp-groups/bp-groups-cache.php +30 -15
  15. bp-groups/bp-groups-classes.php +1007 -181
  16. bp-groups/bp-groups-notifications.php +34 -12
  17. bp-languages/buddypress.pot +229 -221
  18. bp-loader.php +2 -2
  19. bp-members/bp-members-functions.php +12 -5
  20. bp-messages/bp-messages-notifications.php +7 -5
  21. bp-notifications/bp-notifications-functions.php +2 -1
  22. bp-templates/bp-legacy/buddypress/members/single/groups/invites.php +1 -1
  23. bp-templates/bp-legacy/css/buddypress.css +2 -0
  24. bp-themes/bp-default/rtl.css +1 -1
  25. bp-themes/bp-default/style.css +1 -1
  26. bp-xprofile/bp-xprofile-template.php +1 -1
  27. readme.txt +10 -4
  28. tests/assets/group-extensions.php +0 -148
  29. tests/bootstrap.php +0 -55
  30. tests/includes/factory.php +0 -165
  31. tests/includes/install.php +0 -74
  32. tests/includes/loader.php +0 -6
  33. tests/includes/testcase.php +0 -317
  34. tests/multisite.xml +0 -17
  35. tests/phpunit.xml +0 -14
  36. tests/testcases/activity/class.BP_Activity_Activity.php +0 -308
  37. tests/testcases/activity/functions.php +0 -208
  38. tests/testcases/activity/template.php +0 -256
  39. tests/testcases/admin/functions.php +0 -123
  40. tests/testcases/blogs/class-bp-blogs-blog.php +0 -67
  41. tests/testcases/core/avatars.php +0 -56
  42. tests/testcases/core/class-bp-core-user.php +0 -124
  43. tests/testcases/core/class-bp-user-query.php +0 -301
  44. tests/testcases/core/functions.php +0 -258
  45. tests/testcases/friends/class-bp-friends-friendship.php +0 -126
  46. tests/testcases/groups/class-bp-group-extension.php +0 -225
  47. tests/testcases/groups/class-bp-group-member-query.php +0 -337
  48. tests/testcases/groups/class-bp-groups-group.php +0 -657
  49. tests/testcases/groups/class-bp-groups-member.php +0 -131
  50. tests/testcases/groups/functions.php +0 -288
  51. tests/testcases/groups/template.php +0 -410
  52. tests/testcases/members/functions.php +0 -79
  53. tests/testcases/members/template.php +0 -102
  54. tests/testcases/routing/activity.php +0 -68
  55. tests/testcases/routing/anonymous.php +0 -29
  56. tests/testcases/routing/core.php +0 -31
  57. tests/testcases/routing/friends.php +0 -30
  58. tests/testcases/routing/groups.php +0 -30
  59. tests/testcases/routing/members.php +0 -30
  60. tests/testcases/routing/messages.php +0 -40
  61. tests/testcases/routing/settings.php +0 -40
  62. tests/testcases/routing/xprofile.php +0 -35
  63. tests/testcases/url/url.php +0 -65
  64. tests/testcases/xprofile/class-bp-xprofile-field.php +0 -29
  65. tests/testcases/xprofile/functions.php +0 -83
.travis.yml DELETED
@@ -1,52 +0,0 @@
1
- language: php
2
-
3
- php:
4
- - 5.2
5
- - 5.3
6
- - 5.4
7
- - 5.5
8
-
9
- env:
10
- - WP_VERSION=master WP_MULTISITE=0
11
- - WP_VERSION=3.7.1 WP_MULTISITE=0
12
- - WP_VERSION=3.6.1 WP_MULTISITE=0
13
- - WP_VERSION=3.5.2 WP_MULTISITE=0
14
- - WP_VERSION=master WP_MULTISITE=1
15
- - WP_VERSION=3.7.1 WP_MULTISITE=1
16
- - WP_VERSION=3.6.1 WP_MULTISITE=1
17
- - WP_VERSION=3.5.2 WP_MULTISITE=1
18
-
19
- before_script:
20
- # set up WP install
21
- - WP_CORE_DIR=/tmp/wordpress/
22
- - wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/$WP_VERSION
23
- - mkdir -p $WP_CORE_DIR
24
- - tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR
25
- - plugin_slug=$(basename $(pwd))
26
- - plugin_dir=$WP_CORE_DIR/wp-content/plugins/$plugin_slug
27
- - cd ..
28
- - mv $plugin_slug $plugin_dir
29
- # set up testing suite
30
- - export WP_TESTS_DIR=/tmp/wordpress-tests/
31
- - svn co --ignore-externals http://unit-tests.svn.wordpress.org/trunk/ $WP_TESTS_DIR
32
- - cd $WP_TESTS_DIR
33
- - cp wp-tests-config-sample.php wp-tests-config.php
34
- - sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_CORE_DIR':" wp-tests-config.php
35
- - sed -i "s/yourdbnamehere/wordpress_test/" wp-tests-config.php
36
- - sed -i "s/yourusernamehere/root/" wp-tests-config.php
37
- - sed -i "s/yourpasswordhere//" wp-tests-config.php
38
- # set up database
39
- - mysql -e 'CREATE DATABASE wordpress_test;' -uroot
40
- # prepare for running the tests
41
- - cd $plugin_dir/tests
42
-
43
- script: phpunit
44
-
45
- notifications:
46
- email: false
47
-
48
- irc:
49
- channels:
50
- - "irc.freenode.net#buddypress-dev"
51
- template:
52
- - "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}"
bp-activity/bp-activity-classes.php CHANGED
@@ -351,9 +351,14 @@ class BP_Activity_Activity {
351
// Alter the query based on whether we want to show activity item
352
// comments in the stream like normal comments or threaded below
353
// the activity.
354
- if ( false === $display_comments || 'threaded' === $display_comments )
355
$where_conditions[] = "a.type != 'activity_comment'";
356
357
$where_sql = 'WHERE ' . join( ' AND ', $where_conditions );
358
359
// Define the preferred order for indexes
351
// Alter the query based on whether we want to show activity item
352
// comments in the stream like normal comments or threaded below
353
// the activity.
354
+ if ( false === $display_comments || 'threaded' === $display_comments ) {
355
$where_conditions[] = "a.type != 'activity_comment'";
356
+ }
357
+
358
+ // Filter the where conditions
359
+ $where_conditions = apply_filters( 'bp_activity_get_where_conditions', $where_conditions, $r, $select_sql, $from_sql, $join_sql );
360
361
+ // Join the where conditions together
362
$where_sql = 'WHERE ' . join( ' AND ', $where_conditions );
363
364
// Define the preferred order for indexes
bp-core/admin/bp-core-functions.php CHANGED
@@ -209,6 +209,16 @@ function bp_core_activation_notice() {
209
return;
210
}
211
212
/**
213
* Check to make sure that the blog setup routine has run. This can't happen during the
214
* wizard because of the order which the components are loaded. We check for multisite here
@@ -285,7 +295,7 @@ function bp_core_activation_notice() {
285
286
if ( !empty( $orphaned_components ) ) {
287
$admin_url = bp_get_admin_url( add_query_arg( array( 'page' => 'bp-page-settings' ), 'admin.php' ) );
288
- $notice = sprintf( __( 'The following active BuddyPress Components do not have associated WordPress Pages: %2$s. <a href="%1$s" class="button-secondary">Repair</a>', 'buddypress' ), $admin_url, '<strong>' . implode( '</strong>, <strong>', $orphaned_components ) . '</strong>' );
289
290
bp_core_add_admin_notice( $notice );
291
}
@@ -307,7 +317,7 @@ function bp_core_activation_notice() {
307
// If there are duplicates, post a message about them
308
if ( !empty( $dupe_names ) ) {
309
$admin_url = bp_get_admin_url( add_query_arg( array( 'page' => 'bp-page-settings' ), 'admin.php' ) );
310
- $notice = sprintf( __( 'Each BuddyPress Component needs its own WordPress page. The following WordPress Pages have more than one component associated with them: %2$s. <a href="%1$s" class="button-secondary">Repair</a>', 'buddypress' ), $admin_url, '<strong>' . implode( '</strong>, <strong>', $dupe_names ) . '</strong>' );
311
312
bp_core_add_admin_notice( $notice );
313
}
209
return;
210
}
211
212
+ // Bail if in network admin, and BuddyPress is not network activated
213
+ if ( is_network_admin() && ! bp_is_network_activated() ) {
214
+ return;
215
+ }
216
+
217
+ // Bail in network admin
218
+ if ( is_user_admin() ) {
219
+ return;
220
+ }
221
+
222
/**
223
* Check to make sure that the blog setup routine has run. This can't happen during the
224
* wizard because of the order which the components are loaded. We check for multisite here
295
296
if ( !empty( $orphaned_components ) ) {
297
$admin_url = bp_get_admin_url( add_query_arg( array( 'page' => 'bp-page-settings' ), 'admin.php' ) );
298
+ $notice = sprintf( __( 'The following active BuddyPress Components do not have associated WordPress Pages: %2$s. <a href="%1$s">Repair</a>', 'buddypress' ), $admin_url, '<strong>' . implode( '</strong>, <strong>', $orphaned_components ) . '</strong>' );
299
300
bp_core_add_admin_notice( $notice );
301
}
317
// If there are duplicates, post a message about them
318
if ( !empty( $dupe_names ) ) {
319
$admin_url = bp_get_admin_url( add_query_arg( array( 'page' => 'bp-page-settings' ), 'admin.php' ) );
320
+ $notice = sprintf( __( 'Each BuddyPress Component needs its own WordPress page. The following WordPress Pages have more than one component associated with them: %2$s. <a href="%1$s">Repair</a>', 'buddypress' ), $admin_url, '<strong>' . implode( '</strong>, <strong>', $dupe_names ) . '</strong>' );
321
322
bp_core_add_admin_notice( $notice );
323
}
bp-core/admin/css/common.css CHANGED
@@ -7,15 +7,18 @@
7
/* Icon 32's
8
------------------------------------------------------------------------------*/
9
10
- div#icon-buddypress {
11
background: url('../images/icons32.png') no-repeat -370px -6px;
12
}
13
14
- div#icon-buddypress-activity {
15
background: url('../images/icons32.png') no-repeat -10px -6px;
16
}
17
18
- div#icon-buddypress-groups {
19
background: url('../images/icons32.png') no-repeat -250px -6px;
20
}
21
@@ -23,46 +26,68 @@ div#icon-buddypress-groups {
23
------------------------------------------------------------------------------*/
24
25
/* Backpat */
26
- ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,
27
- ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image {
28
background-image: url('../images/menu.png') !important;
29
background-position: -178px -34px;
30
}
31
32
- ul#adminmenu li.toplevel_page_bp-components:hover .wp-menu-image,
33
- ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image,
34
- ul#adminmenu li.toplevel_page_bp-components.wp-has-current-submenu .wp-menu-image,
35
- ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image {
36
background-position: -178px -2px;
37
}
38
39
/* Activity */
40
- ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,
41
- ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image {
42
background-image: url('../images/menu.png');
43
background-position: 0 -34px;
44
}
45
- ul#adminmenu li.toplevel_page_bp-activity:hover .wp-menu-image,
46
- ul#adminmenu li.toplevel_page_bp-activity.current .wp-menu-image,
47
- ul#adminmenu li.toplevel_page_bp-activity.wp-has-current-submenu .wp-menu-image,
48
- ul#adminmenu li.toplevel_page_bp-activity_network:hover .wp-menu-image,
49
- ul#adminmenu li.toplevel_page_bp-activity_network.current .wp-menu-image,
50
- ul#adminmenu li.toplevel_page_bp-activity_network.wp-has-current-submenu .wp-menu-image {
51
background-position: 0 -2px;
52
}
53
54
/* Groups */
55
- ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,
56
- ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image {
57
background-image: url('../images/menu.png');
58
background-position: -61px -34px;
59
}
60
- ul#adminmenu li.toplevel_page_bp-groups:hover .wp-menu-image,
61
- ul#adminmenu li.toplevel_page_bp-groups.current .wp-menu-image,
62
- ul#adminmenu li.toplevel_page_bp-groups.wp-has-current-submenu .wp-menu-image,
63
- ul#adminmenu li.toplevel_page_bp-groups_network:hover .wp-menu-image,
64
- ul#adminmenu li.toplevel_page_bp-groups_network.current .wp-menu-image,
65
- ul#adminmenu li.toplevel_page_bp-groups_network.wp-has-current-submenu .wp-menu-image {
66
background-position: -61px -2px;
67
}
68
th.column-gid {
@@ -90,73 +115,248 @@ table.bp-group-members .urole-column {
90
/* Components
91
------------------------------------------------------------------------------*/
92
93
- .dashboard_page_bp-wizard td.plugin-title span,
94
.settings_page_bp-components td.plugin-title span {
95
float: left;
96
width: 18px;
97
height: 18px;
98
background-image: url('../images/menu.png');
99
background-position: -4px -40px;
100
background-repeat: no-repeat;
101
- margin-right: 5px;
102
}
103
104
- .dashboard_page_bp-wizard tr.active td.plugin-title span,
105
- .settings_page_bp-components tr.active td.plugin-title span {
106
background-position-y: -7px;
107
}
108
109
- .dashboard_page_bp-wizard tr.activity td.plugin-title span,
110
- .settings_page_bp-components tr.activity td.plugin-title span {
111
- background-position-x: -4px;
112
}
113
114
- .dashboard_page_bp-wizard tr.xprofile td.plugin-title span,
115
- .settings_page_bp-components tr.xprofile td.plugin-title span {
116
background-image: url('../images/menu-wp.png');
117
- background-position-x: -305px;
118
}
119
120
- .dashboard_page_bp-wizard tr.settings td.plugin-title span,
121
- .settings_page_bp-components tr.settings td.plugin-title span {
122
background-image: url('../images/menu-wp.png');
123
- background-position-x: -334px;
124
}
125
126
- .dashboard_page_bp-wizard tr.groups td.plugin-title span,
127
- .settings_page_bp-components tr.groups td.plugin-title span {
128
- background-position-x: -66px;
129
}
130
131
- .dashboard_page_bp-wizard tr.messages td.plugin-title span,
132
- .settings_page_bp-components tr.messages td.plugin-title span {
133
- background-position-x: -154px;
134
}
135
136
- .dashboard_page_bp-wizard tr.forums td.plugin-title span,
137
- .settings_page_bp-components tr.forums td.plugin-title span {
138
background-image: url('../images/menu-wp.png');
139
- background-position-x: -36px;
140
}
141
142
- .dashboard_page_bp-wizard tr.blogs td.plugin-title span,
143
- .settings_page_bp-components tr.blogs td.plugin-title span {
144
- background-position-x: -125px;
145
}
146
147
- .dashboard_page_bp-wizard tr.friends td.plugin-title span,
148
- .settings_page_bp-components tr.friends td.plugin-title span {
149
- background-position-x: -95px;
150
}
151
152
- .dashboard_page_bp-wizard tr.core td.plugin-title span,
153
- .settings_page_bp-components tr.core td.plugin-title span {
154
- background-position-x: -184px;
155
}
156
157
- .dashboard_page_bp-wizard tr.members td.plugin-title span,
158
- .settings_page_bp-components tr.members td.plugin-title span {
159
- background-position-x: -36px;
160
}
161
162
#bp-admin-component-form .widefat th {
@@ -194,20 +394,29 @@ table.bp-group-members .urole-column {
194
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
195
196
/* Icon 32 */
197
- div#icon-buddypress,
198
- div#icon-buddypress-activity,
199
- div#icon-buddypress-groups {
200
background-image: url('../images/icons64.png');
201
background-size: 419px 45px;
202
}
203
204
/* Backpat */
205
- ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,
206
- ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,
207
- ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,
208
- ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image,
209
- ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,
210
- ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image {
211
background-image: url('../images/menu-2x.png') !important;
212
background-size: 209px 64px;
213
}
7
/* Icon 32's
8
------------------------------------------------------------------------------*/
9
10
+ body.branch-3-6 div#icon-buddypress,
11
+ body.branch-3-7 div#icon-buddypress {
12
background: url('../images/icons32.png') no-repeat -370px -6px;
13
}
14
15
+ body.branch-3-6 div#icon-buddypress-activity,
16
+ body.branch-3-7 div#icon-buddypress-activity {
17
background: url('../images/icons32.png') no-repeat -10px -6px;
18
}
19
20
+ body.branch-3-6 div#icon-buddypress-groups,
21
+ body.branch-3-7 div#icon-buddypress-groups {
22
background: url('../images/icons32.png') no-repeat -250px -6px;
23
}
24
26
------------------------------------------------------------------------------*/
27
28
/* Backpat */
29
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,
30
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,
31
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,
32
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image {
33
background-image: url('../images/menu.png') !important;
34
background-position: -178px -34px;
35
}
36
37
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-components:hover .wp-menu-image,
38
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image,
39
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-components.wp-has-current-submenu .wp-menu-image,
40
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image,
41
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-components:hover .wp-menu-image,
42
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image,
43
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-components.wp-has-current-submenu .wp-menu-image,
44
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image {
45
background-position: -178px -2px;
46
}
47
48
/* Activity */
49
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,
50
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image,
51
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,
52
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image {
53
background-image: url('../images/menu.png');
54
background-position: 0 -34px;
55
}
56
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity:hover .wp-menu-image,
57
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity.current .wp-menu-image,
58
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity.wp-has-current-submenu .wp-menu-image,
59
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network:hover .wp-menu-image,
60
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network.current .wp-menu-image,
61
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network.wp-has-current-submenu .wp-menu-image,
62
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity:hover .wp-menu-image,
63
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity.current .wp-menu-image,
64
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity.wp-has-current-submenu .wp-menu-image,
65
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network:hover .wp-menu-image,
66
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network.current .wp-menu-image,
67
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network.wp-has-current-submenu .wp-menu-image {
68
background-position: 0 -2px;
69
}
70
71
/* Groups */
72
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,
73
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image,
74
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,
75
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image {
76
background-image: url('../images/menu.png');
77
background-position: -61px -34px;
78
}
79
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups:hover .wp-menu-image,
80
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups.current .wp-menu-image,
81
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups.wp-has-current-submenu .wp-menu-image,
82
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network:hover .wp-menu-image,
83
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network.current .wp-menu-image,
84
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network.wp-has-current-submenu .wp-menu-image,
85
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups:hover .wp-menu-image,
86
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups.current .wp-menu-image,
87
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups.wp-has-current-submenu .wp-menu-image,
88
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network:hover .wp-menu-image,
89
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network.current .wp-menu-image,
90
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network.wp-has-current-submenu .wp-menu-image {
91
background-position: -61px -2px;
92
}
93
th.column-gid {
115
/* Components
116
------------------------------------------------------------------------------*/
117
118
+ /* Dashicons */
119
+ #adminmenu #toplevel_page_bp-activity .wp-menu-image:before,
120
+ #adminmenu #toplevel_page_bp-activity_user .wp-menu-image:before,
121
+ #adminmenu #toplevel_page_bp-activity_network .wp-menu-image:before {
122
+ content: "\f452";
123
+ }
124
+
125
+ #adminmenu #toplevel_page_bp-groups .wp-menu-image:before,
126
+ #adminmenu #toplevel_page_bp-groups_user .wp-menu-image:before,
127
+ #adminmenu #toplevel_page_bp-groups_network .wp-menu-image:before {
128
+ content: "\f456";
129
+ }
130
+
131
+ #adminmenu #toplevel_page_bp-notifications .wp-menu-image:before,
132
+ #adminmenu #toplevel_page_bp-notifications_user .wp-menu-image:before,
133
+ #adminmenu #toplevel_page_bp-notifications_network .wp-menu-image:before {
134
+ content: "\f439";
135
+ }
136
+
137
+ #adminmenu #toplevel_page_bp-messages .wp-menu-image:before,
138
+ #adminmenu #toplevel_page_bp-messages_user .wp-menu-image:before,
139
+ #adminmenu #toplevel_page_bp-messages_network .wp-menu-image:before {
140
+ content: "\f457";
141
+ }
142
+
143
+ #adminmenu #toplevel_page_bp-friends .wp-menu-image:before,
144
+ #adminmenu #toplevel_page_bp-friends_user .wp-menu-image:before,
145
+ #adminmenu #toplevel_page_bp-friends_network .wp-menu-image:before{
146
+ content: "\f454";
147
+ }
148
+
149
+ #adminmenu #toplevel_page_bp-settings .wp-menu-image:before,
150
+ #adminmenu #toplevel_page_bp-settings_user .wp-menu-image:before,
151
+ #adminmenu #toplevel_page_bp-settings_network .wp-menu-image:before {
152
+ content: "\f108";
153
+ }
154
+
155
+ #adminmenu li.toplevel_page_bp-components .wp-menu-image,
156
+ #adminmenu li.toplevel_page_bp-general-settings .wp-menu-image {
157
+ content: "\f448";
158
+ }
159
+
160
+ /* Dashicons overrides for backward compatibility */
161
+ body.branch-3-6 #adminmenu #toplevel_page_bp-activity .wp-menu-image:before,
162
+ body.branch-3-6 #adminmenu #toplevel_page_bp-activity_network .wp-menu-image:before,
163
+ body.branch-3-6 #adminmenu #toplevel_page_bp-groups .wp-menu-image:before,
164
+ body.branch-3-6 #adminmenu #toplevel_page_bp-groups_network .wp-menu-image:before,
165
+ body.branch-3-6 #adminmenu li.toplevel_page_bp-components .wp-menu-image,
166
+ body.branch-3-6 #adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,
167
+ body.branch-3-7 #adminmenu #toplevel_page_bp-activity .wp-menu-image:before,
168
+ body.branch-3-7 #adminmenu #toplevel_page_bp-activity_network .wp-menu-image:before,
169
+ body.branch-3-7 #adminmenu #toplevel_page_bp-groups .wp-menu-image:before,
170
+ body.branch-3-7 #adminmenu #toplevel_page_bp-groups_network .wp-menu-image:before,
171
+ body.branch-3-7 #adminmenu li.toplevel_page_bp-components .wp-menu-image,
172
+ body.branch-3-7 #adminmenu li.toplevel_page_bp-general-settings .wp-menu-image {
173
+ content: "";
174
+ }
175
+
176
+ /* Settings - Dashicons (WP 3.8+) */
177
.settings_page_bp-components td.plugin-title span {
178
float: left;
179
width: 18px;
180
height: 18px;
181
+ margin-right: 5px;
182
+ }
183
+
184
+ .settings_page_bp-components td.plugin-title span:before {
185
+ font-family: 'dashicons';
186
+ font-size: 18px;
187
+ }
188
+
189
+ .settings_page_bp-components tr.activity td.plugin-title span:before {
190
+ content: "\f452";
191
+ }
192
+
193
+ .settings_page_bp-components tr.notifications td.plugin-title span:before {
194
+ content: "\f339";
195
+ }
196
+
197
+ .settings_page_bp-components tr.xprofile td.plugin-title span:before {
198
+ content: "\f336";
199
+ }
200
+
201
+ .settings_page_bp-components tr.settings td.plugin-title span:before {
202
+ content: "\f108";
203
+ }
204
+
205
+ .settings_page_bp-components tr.groups td.plugin-title span:before {
206
+ content: "\f456";
207
+ }
208
+
209
+ .settings_page_bp-components tr.messages td.plugin-title span:before {
210
+ content: "\f457";
211
+ }
212
+
213
+ .settings_page_bp-components tr.forums td.plugin-title span:before {
214
+ content: "\f452";
215
+ }
216
+
217
+ .settings_page_bp-components tr.blogs td.plugin-title span:before {
218
+ content: "\f120";
219
+ }
220
+
221
+ .settings_page_bp-components tr.friends td.plugin-title span:before {
222
+ content: "\f454";
223
+ }
224
+
225
+ /* Settings - Legacy (< WP 3.8) */
226
+ body.branch-3-6.settings_page_bp-components tr.activity td.plugin-title span:before,
227
+ body.branch-3-6.settings_page_bp-components tr.notifications td.plugin-title span:before,
228
+ body.branch-3-6.settings_page_bp-components tr.xprofile td.plugin-title span:before,
229
+ body.branch-3-6.settings_page_bp-components tr.settings td.plugin-title span:before,
230
+ body.branch-3-6.settings_page_bp-components tr.groups td.plugin-title span:before,
231
+ body.branch-3-6.settings_page_bp-components tr.messages td.plugin-title span:before,
232
+ body.branch-3-6.settings_page_bp-components tr.forums td.plugin-title span:before,
233
+ body.branch-3-6.settings_page_bp-components tr.blogs td.plugin-title span:before,
234
+ body.branch-3-6.settings_page_bp-components tr.friends td.plugin-title span:before,
235
+ body.branch-3-7.settings_page_bp-components tr.activity td.plugin-title span:before,
236
+ body.branch-3-7.settings_page_bp-components tr.notifications td.plugin-title span:before,
237
+ body.branch-3-7.settings_page_bp-components tr.xprofile td.plugin-title span:before,
238
+ body.branch-3-7.settings_page_bp-components tr.settings td.plugin-title span:before,
239
+ body.branch-3-7.settings_page_bp-components tr.groups td.plugin-title span:before,
240
+ body.branch-3-7.settings_page_bp-components tr.messages td.plugin-title span:before,
241
+ body.branch-3-7.settings_page_bp-components tr.forums td.plugin-title span:before,
242
+ body.branch-3-7.settings_page_bp-components tr.blogs td.plugin-title span:before,
243
+ body.branch-3-7.settings_page_bp-components tr.friends td.plugin-title span:before {
244
+ content: "";
245
+ }
246
+
247
+ body.branch-3-6.settings_page_bp-components td.plugin-title span,
248
+ body.branch-3-7.settings_page_bp-components td.plugin-title span {
249
background-image: url('../images/menu.png');
250
background-position: -4px -40px;
251
background-repeat: no-repeat;
252
}
253
254
+ body.branch-3-6.settings_page_bp-components tr.active td.plugin-title span,
255
+ body.branch-3-7.settings_page_bp-components tr.active td.plugin-title span {
256
background-position-y: -7px;
257
}
258
259
+ body.branch-3-6.settings_page_bp-components tr.activity td.plugin-title span,
260
+ body.branch-3-7.settings_page_bp-components tr.activity td.plugin-title span {
261
+ background-position: -4px -40px;
262
+ }
263
+
264
+ body.branch-3-6.settings_page_bp-components tr.activity.active td.plugin-title span,
265
+ body.branch-3-7.settings_page_bp-components tr.activity.active td.plugin-title span {
266
+ background-position: -4px -7px;
267
}
268
269
+ body.branch-3-6.settings_page_bp-components tr.xprofile td.plugin-title span,
270
+ body.branch-3-7.settings_page_bp-components tr.xprofile td.plugin-title span {
271
background-image: url('../images/menu-wp.png');
272
+ background-position: -305px -40px;
273
+ }
274
+
275
+ body.branch-3-6.settings_page_bp-components tr.xprofile.active td.plugin-title span,
276
+ body.branch-3-7.settings_page_bp-components tr.xprofile.active td.plugin-title span {
277
+ background-position: -305px -7px;
278
}
279
280
+ body.branch-3-6.settings_page_bp-components tr.settings td.plugin-title span,
281
+ body.branch-3-7.settings_page_bp-components tr.settings td.plugin-title span {
282
background-image: url('../images/menu-wp.png');
283
+ background-position: -334px -40px;
284
}
285
286
+ body.branch-3-6.settings_page_bp-components tr.settings.active td.plugin-title span,
287
+ body.branch-3-7.settings_page_bp-components tr.settings.active td.plugin-title span {
288
+ background-position: -334px -7px;
289
}
290
291
+ body.branch-3-6.settings_page_bp-components tr.groups td.plugin-title span,
292
+ body.branch-3-7.settings_page_bp-components tr.groups td.plugin-title span {
293
+ background-position: -66px -40px;
294
}
295
296
+ body.branch-3-6.settings_page_bp-components tr.groups.active td.plugin-title span,
297
+ body.branch-3-7.settings_page_bp-components tr.groups.active td.plugin-title span {
298
+ background-position: -66px -7px;
299
+ }
300
+
301
+ body.branch-3-6.settings_page_bp-components tr.messages td.plugin-title span,
302
+ body.branch-3-7.settings_page_bp-components tr.messages td.plugin-title span {
303
+ background-position: -154px -40px;
304
+ }
305
+
306
+ body.branch-3-6.settings_page_bp-components tr.messages.active td.plugin-title span,
307
+ body.branch-3-7.settings_page_bp-components tr.messages.active td.plugin-title span {
308
+ background-position: -154px -7px;
309
+ }
310
+
311
+ body.branch-3-6.settings_page_bp-components tr.forums td.plugin-title span,
312
+ body.branch-3-7.settings_page_bp-components tr.forums td.plugin-title span {
313
background-image: url('../images/menu-wp.png');
314
+ background-position: -36px -40px;
315
+ }
316
+
317
+ body.branch-3-6.settings_page_bp-components tr.forums.active td.plugin-title span,
318
+ body.branch-3-7.settings_page_bp-components tr.forums.active td.plugin-title span {
319
+ background-position: -36px -7px;
320
+ }
321
+
322
+ body.branch-3-6.settings_page_bp-components tr.blogs td.plugin-title span,
323
+ body.branch-3-7.settings_page_bp-components tr.blogs td.plugin-title span {
324
+ background-position: -125px -40px;
325
+ }
326
+
327
+ body.branch-3-6.settings_page_bp-components tr.blogs.active td.plugin-title span,
328
+ body.branch-3-7.settings_page_bp-components tr.blogs.active td.plugin-title span {
329
+ background-position: -125px -7px;
330
+ }
331
+
332
+ body.branch-3-6.settings_page_bp-components tr.friends td.plugin-title span,
333
+ body.branch-3-7.settings_page_bp-components tr.friends td.plugin-title span {
334
+ background-position: -95px -40px;
335
+ }
336
+
337
+ body.branch-3-6.settings_page_bp-components tr.friends.active td.plugin-title span,
338
+ body.branch-3-7.settings_page_bp-components tr.friends.active td.plugin-title span {
339
+ background-position: -95px -7px;
340
}
341
342
+ body.branch-3-6.settings_page_bp-components tr.core td.plugin-title span,
343
+ body.branch-3-7.settings_page_bp-components tr.core td.plugin-title span {
344
+ background-position: -184px -40px;
345
}
346
347
+ body.branch-3-6.settings_page_bp-components tr.core.active td.plugin-title span,
348
+ body.branch-3-7.settings_page_bp-components tr.core.active td.plugin-title span {
349
+ background-position: -184px -7px;
350
}
351
352
+ body.branch-3-6.settings_page_bp-components tr.members td.plugin-title span,
353
+ body.branch-3-7.settings_page_bp-components tr.members td.plugin-title span {
354
+ background-position: -36px -40px;
355
}
356
357
+ body.branch-3-6.settings_page_bp-components tr.members.active td.plugin-title span,
358
+ body.branch-3-7.settings_page_bp-components tr.members.active td.plugin-title span {
359
+ background-position: -36px -7px;
360
}
361
362
#bp-admin-component-form .widefat th {
394
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
395
396
/* Icon 32 */
397
+ body.branch-3-6 div#icon-buddypress,
398
+ body.branch-3-6 div#icon-buddypress-activity,
399
+ body.branch-3-6 div#icon-buddypress-groups,
400
+ body.branch-3-7 div#icon-buddypress,
401
+ body.branch-3-7 div#icon-buddypress-activity,
402
+ body.branch-3-7 div#icon-buddypress-groups {
403
background-image: url('../images/icons64.png');
404
background-size: 419px 45px;
405
}
406
407
/* Backpat */
408
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,
409
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,
410
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,
411
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image,
412
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,
413
+ body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image,
414
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,
415
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,
416
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,
417
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image,
418
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,
419
+ body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image {
420
background-image: url('../images/menu-2x.png') !important;
421
background-size: 209px 64px;
422
}
bp-core/admin/css/common.min.css CHANGED
@@ -1 +1 @@
1
- div#icon-buddypress{background:url('../images/icons32.png') no-repeat -370px -6px}div#icon-buddypress-activity{background:url('../images/icons32.png') no-repeat -10px -6px}div#icon-buddypress-groups{background:url('../images/icons32.png') no-repeat -250px -6px}ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image{background-image:url('../images/menu.png')!important;background-position:-178px -34px}ul#adminmenu li.toplevel_page_bp-components:hover .wp-menu-image,ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image,ul#adminmenu li.toplevel_page_bp-components.wp-has-current-submenu .wp-menu-image,ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image{background-position:-178px -2px}ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image{background-image:url('../images/menu.png');background-position:0 -34px}ul#adminmenu li.toplevel_page_bp-activity:hover .wp-menu-image,ul#adminmenu li.toplevel_page_bp-activity.current .wp-menu-image,ul#adminmenu li.toplevel_page_bp-activity.wp-has-current-submenu .wp-menu-image,ul#adminmenu li.toplevel_page_bp-activity_network:hover .wp-menu-image,ul#adminmenu li.toplevel_page_bp-activity_network.current .wp-menu-image,ul#adminmenu li.toplevel_page_bp-activity_network.wp-has-current-submenu .wp-menu-image{background-position:0 -2px}ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image{background-image:url('../images/menu.png');background-position:-61px -34px}ul#adminmenu li.toplevel_page_bp-groups:hover .wp-menu-image,ul#adminmenu li.toplevel_page_bp-groups.current .wp-menu-image,ul#adminmenu li.toplevel_page_bp-groups.wp-has-current-submenu .wp-menu-image,ul#adminmenu li.toplevel_page_bp-groups_network:hover .wp-menu-image,ul#adminmenu li.toplevel_page_bp-groups_network.current .wp-menu-image,ul#adminmenu li.toplevel_page_bp-groups_network.wp-has-current-submenu .wp-menu-image{background-position:-61px -2px}th.column-gid{width:60px}td.column-gid{vertical-align:middle}table.bp-group-members th,table.bp-group-members td{padding:5px 0}table.bp-group-members .uid-column{padding-left:20px;padding-right:20px}table.bp-group-members .uname-column{width:70%}table.bp-group-members .urole-column{padding-left:20px;padding-right:20px}.dashboard_page_bp-wizard td.plugin-title span,.settings_page_bp-components td.plugin-title span{float:left;width:18px;height:18px;background-image:url('../images/menu.png');background-position:-4px -40px;background-repeat:no-repeat;margin-right:5px}.dashboard_page_bp-wizard tr.active td.plugin-title span,.settings_page_bp-components tr.active td.plugin-title span{background-position-y:-7px}.dashboard_page_bp-wizard tr.activity td.plugin-title span,.settings_page_bp-components tr.activity td.plugin-title span{background-position-x:-4px}.dashboard_page_bp-wizard tr.xprofile td.plugin-title span,.settings_page_bp-components tr.xprofile td.plugin-title span{background-image:url('../images/menu-wp.png');background-position-x:-305px}.dashboard_page_bp-wizard tr.settings td.plugin-title span,.settings_page_bp-components tr.settings td.plugin-title span{background-image:url('../images/menu-wp.png');background-position-x:-334px}.dashboard_page_bp-wizard tr.groups td.plugin-title span,.settings_page_bp-components tr.groups td.plugin-title span{background-position-x:-66px}.dashboard_page_bp-wizard tr.messages td.plugin-title span,.settings_page_bp-components tr.messages td.plugin-title span{background-position-x:-154px}.dashboard_page_bp-wizard tr.forums td.plugin-title span,.settings_page_bp-components tr.forums td.plugin-title span{background-image:url('../images/menu-wp.png');background-position-x:-36px}.dashboard_page_bp-wizard tr.blogs td.plugin-title span,.settings_page_bp-components tr.blogs td.plugin-title span{background-position-x:-125px}.dashboard_page_bp-wizard tr.friends td.plugin-title span,.settings_page_bp-components tr.friends td.plugin-title span{background-position-x:-95px}.dashboard_page_bp-wizard tr.core td.plugin-title span,.settings_page_bp-components tr.core td.plugin-title span{background-position-x:-184px}.dashboard_page_bp-wizard tr.members td.plugin-title span,.settings_page_bp-components tr.members td.plugin-title span{background-position-x:-36px}#bp-admin-component-form .widefat th{display:table-cell;vertical-align:top}.bp-badge{padding-top:142px;height:50px;width:173px;color:#fafafa;font-weight:bold;font-size:14px;text-align:center;margin:0 -5px;background:url('../images/badge.png') no-repeat}.about-wrap .bp-badge{position:absolute;top:0;right:0}body.rtl .about-wrap .bp-badge{right:auto;left:0}@media only screen and (-webkit-min-device-pixel-ratio:1.5){div#icon-buddypress,div#icon-buddypress-activity,div#icon-buddypress-groups{background-image:url('../images/icons64.png');background-size:419px 45px}ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image,ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image{background-image:url('../images/menu-2x.png')!important;background-size:209px 64px}.bp-badge{background-image:url('../images/badge-2x.png');background-size:173px 194px}}
1
+ body.branch-3-6 div#icon-buddypress,body.branch-3-7 div#icon-buddypress{background:url('../images/icons32.png') no-repeat -370px -6px}body.branch-3-6 div#icon-buddypress-activity,body.branch-3-7 div#icon-buddypress-activity{background:url('../images/icons32.png') no-repeat -10px -6px}body.branch-3-6 div#icon-buddypress-groups,body.branch-3-7 div#icon-buddypress-groups{background:url('../images/icons32.png') no-repeat -250px -6px}body.branch-3-6 ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image{background-image:url('../images/menu.png') !important;background-position:-178px -34px}body.branch-3-6 ul#adminmenu li.toplevel_page_bp-components:hover .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-components.wp-has-current-submenu .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-components:hover .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-general-settings:hover .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-components.wp-has-current-submenu .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-general-settings.wp-has-current-submenu .wp-menu-image{background-position:-178px -2px}body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image{background-image:url('../images/menu.png');background-position:0 -34px}body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity:hover .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity.current .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity.wp-has-current-submenu .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network:hover .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network.current .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network.wp-has-current-submenu .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity:hover .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity.current .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity.wp-has-current-submenu .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network:hover .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network.current .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network.wp-has-current-submenu .wp-menu-image{background-position:0 -2px}body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image{background-image:url('../images/menu.png');background-position:-61px -34px}body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups:hover .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups.current .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups.wp-has-current-submenu .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network:hover .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network.current .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network.wp-has-current-submenu .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups:hover .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups.current .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups.wp-has-current-submenu .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network:hover .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network.current .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network.wp-has-current-submenu .wp-menu-image{background-position:-61px -2px}th.column-gid{width:60px}td.column-gid{vertical-align:middle}table.bp-group-members th,table.bp-group-members td{padding:5px 0}table.bp-group-members .uid-column{padding-left:20px;padding-right:20px}table.bp-group-members .uname-column{width:70%}table.bp-group-members .urole-column{padding-left:20px;padding-right:20px}#adminmenu #toplevel_page_bp-activity .wp-menu-image:before,#adminmenu #toplevel_page_bp-activity_user .wp-menu-image:before,#adminmenu #toplevel_page_bp-activity_network .wp-menu-image:before{content:"\f452"}#adminmenu #toplevel_page_bp-groups .wp-menu-image:before,#adminmenu #toplevel_page_bp-groups_user .wp-menu-image:before,#adminmenu #toplevel_page_bp-groups_network .wp-menu-image:before{content:"\f456"}#adminmenu #toplevel_page_bp-notifications .wp-menu-image:before,#adminmenu #toplevel_page_bp-notifications_user .wp-menu-image:before,#adminmenu #toplevel_page_bp-notifications_network .wp-menu-image:before{content:"\f439"}#adminmenu #toplevel_page_bp-messages .wp-menu-image:before,#adminmenu #toplevel_page_bp-messages_user .wp-menu-image:before,#adminmenu #toplevel_page_bp-messages_network .wp-menu-image:before{content:"\f457"}#adminmenu #toplevel_page_bp-friends .wp-menu-image:before,#adminmenu #toplevel_page_bp-friends_user .wp-menu-image:before,#adminmenu #toplevel_page_bp-friends_network .wp-menu-image:before{content:"\f454"}#adminmenu #toplevel_page_bp-settings .wp-menu-image:before,#adminmenu #toplevel_page_bp-settings_user .wp-menu-image:before,#adminmenu #toplevel_page_bp-settings_network .wp-menu-image:before{content:"\f108"}#adminmenu li.toplevel_page_bp-components .wp-menu-image,#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image{content:"\f448"}body.branch-3-6 #adminmenu #toplevel_page_bp-activity .wp-menu-image:before,body.branch-3-6 #adminmenu #toplevel_page_bp-activity_network .wp-menu-image:before,body.branch-3-6 #adminmenu #toplevel_page_bp-groups .wp-menu-image:before,body.branch-3-6 #adminmenu #toplevel_page_bp-groups_network .wp-menu-image:before,body.branch-3-6 #adminmenu li.toplevel_page_bp-components .wp-menu-image,body.branch-3-6 #adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,body.branch-3-7 #adminmenu #toplevel_page_bp-activity .wp-menu-image:before,body.branch-3-7 #adminmenu #toplevel_page_bp-activity_network .wp-menu-image:before,body.branch-3-7 #adminmenu #toplevel_page_bp-groups .wp-menu-image:before,body.branch-3-7 #adminmenu #toplevel_page_bp-groups_network .wp-menu-image:before,body.branch-3-7 #adminmenu li.toplevel_page_bp-components .wp-menu-image,body.branch-3-7 #adminmenu li.toplevel_page_bp-general-settings .wp-menu-image{content:""}.settings_page_bp-components td.plugin-title span{float:left;width:18px;height:18px;margin-right:5px}.settings_page_bp-components td.plugin-title span:before{font-family:'dashicons';font-size:18px}.settings_page_bp-components tr.activity td.plugin-title span:before{content:"\f452"}.settings_page_bp-components tr.notifications td.plugin-title span:before{content:"\f339"}.settings_page_bp-components tr.xprofile td.plugin-title span:before{content:"\f336"}.settings_page_bp-components tr.settings td.plugin-title span:before{content:"\f108"}.settings_page_bp-components tr.groups td.plugin-title span:before{content:"\f456"}.settings_page_bp-components tr.messages td.plugin-title span:before{content:"\f457"}.settings_page_bp-components tr.forums td.plugin-title span:before{content:"\f452"}.settings_page_bp-components tr.blogs td.plugin-title span:before{content:"\f120"}.settings_page_bp-components tr.friends td.plugin-title span:before{content:"\f454"}body.branch-3-6.settings_page_bp-components tr.activity td.plugin-title span:before,body.branch-3-6.settings_page_bp-components tr.notifications td.plugin-title span:before,body.branch-3-6.settings_page_bp-components tr.xprofile td.plugin-title span:before,body.branch-3-6.settings_page_bp-components tr.settings td.plugin-title span:before,body.branch-3-6.settings_page_bp-components tr.groups td.plugin-title span:before,body.branch-3-6.settings_page_bp-components tr.messages td.plugin-title span:before,body.branch-3-6.settings_page_bp-components tr.forums td.plugin-title span:before,body.branch-3-6.settings_page_bp-components tr.blogs td.plugin-title span:before,body.branch-3-6.settings_page_bp-components tr.friends td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.activity td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.notifications td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.xprofile td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.settings td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.groups td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.messages td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.forums td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.blogs td.plugin-title span:before,body.branch-3-7.settings_page_bp-components tr.friends td.plugin-title span:before{content:""}body.branch-3-6.settings_page_bp-components td.plugin-title span,body.branch-3-7.settings_page_bp-components td.plugin-title span{background-image:url('../images/menu.png');background-position:-4px -40px;background-repeat:no-repeat}body.branch-3-6.settings_page_bp-components tr.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.active td.plugin-title span{background-position-y:-7px}body.branch-3-6.settings_page_bp-components tr.activity td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.activity td.plugin-title span{background-position:-4px -40px}body.branch-3-6.settings_page_bp-components tr.activity.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.activity.active td.plugin-title span{background-position:-4px -7px}body.branch-3-6.settings_page_bp-components tr.xprofile td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.xprofile td.plugin-title span{background-image:url('../images/menu-wp.png');background-position:-305px -40px}body.branch-3-6.settings_page_bp-components tr.xprofile.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.xprofile.active td.plugin-title span{background-position:-305px -7px}body.branch-3-6.settings_page_bp-components tr.settings td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.settings td.plugin-title span{background-image:url('../images/menu-wp.png');background-position:-334px -40px}body.branch-3-6.settings_page_bp-components tr.settings.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.settings.active td.plugin-title span{background-position:-334px -7px}body.branch-3-6.settings_page_bp-components tr.groups td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.groups td.plugin-title span{background-position:-66px -40px}body.branch-3-6.settings_page_bp-components tr.groups.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.groups.active td.plugin-title span{background-position:-66px -7px}body.branch-3-6.settings_page_bp-components tr.messages td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.messages td.plugin-title span{background-position:-154px -40px}body.branch-3-6.settings_page_bp-components tr.messages.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.messages.active td.plugin-title span{background-position:-154px -7px}body.branch-3-6.settings_page_bp-components tr.forums td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.forums td.plugin-title span{background-image:url('../images/menu-wp.png');background-position:-36px -40px}body.branch-3-6.settings_page_bp-components tr.forums.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.forums.active td.plugin-title span{background-position:-36px -7px}body.branch-3-6.settings_page_bp-components tr.blogs td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.blogs td.plugin-title span{background-position:-125px -40px}body.branch-3-6.settings_page_bp-components tr.blogs.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.blogs.active td.plugin-title span{background-position:-125px -7px}body.branch-3-6.settings_page_bp-components tr.friends td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.friends td.plugin-title span{background-position:-95px -40px}body.branch-3-6.settings_page_bp-components tr.friends.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.friends.active td.plugin-title span{background-position:-95px -7px}body.branch-3-6.settings_page_bp-components tr.core td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.core td.plugin-title span{background-position:-184px -40px}body.branch-3-6.settings_page_bp-components tr.core.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.core.active td.plugin-title span{background-position:-184px -7px}body.branch-3-6.settings_page_bp-components tr.members td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.members td.plugin-title span{background-position:-36px -40px}body.branch-3-6.settings_page_bp-components tr.members.active td.plugin-title span,body.branch-3-7.settings_page_bp-components tr.members.active td.plugin-title span{background-position:-36px -7px}#bp-admin-component-form .widefat th{display:table-cell;vertical-align:top}.bp-badge{padding-top:142px;height:50px;width:173px;color:#fafafa;font-weight:bold;font-size:14px;text-align:center;margin:0 -5px;background:url('../images/badge.png') no-repeat}.about-wrap .bp-badge{position:absolute;top:0;right:0}body.rtl .about-wrap .bp-badge{right:auto;left:0}@media only screen and (-webkit-min-device-pixel-ratio:1.5){body.branch-3-6 div#icon-buddypress,body.branch-3-6 div#icon-buddypress-activity,body.branch-3-6 div#icon-buddypress-groups,body.branch-3-7 div#icon-buddypress,body.branch-3-7 div#icon-buddypress-activity,body.branch-3-7 div#icon-buddypress-groups{background-image:url('../images/icons64.png');background-size:419px 45px}body.branch-3-6 ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,body.branch-3-6 ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-components .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-general-settings .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-activity_network .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups .wp-menu-image,body.branch-3-7 ul#adminmenu li.toplevel_page_bp-groups_network .wp-menu-image{background-image:url('../images/menu-2x.png') !important;background-size:209px 64px}.bp-badge{background-image:url('../images/badge-2x.png');background-size:173px 194px}}
bp-core/bp-core-admin.php CHANGED
@@ -150,6 +150,9 @@ class BP_Admin {
150
// Add settings
151
add_action( 'bp_register_admin_settings', array( $this, 'register_admin_settings' ) );
152
153
/** Filters ***********************************************************/
154
155
// Add link to settings page
@@ -334,6 +337,24 @@ class BP_Admin {
334
}
335
}
336
337
/**
338
* Add Settings link to plugins area.
339
*
@@ -406,11 +427,22 @@ class BP_Admin {
406
<h1><?php printf( __( 'Welcome to BuddyPress %s', 'buddypress' ), $display_version ); ?></h1>
407
<div class="about-text">
408
<?php if ( $is_new_install ) : ?>
409
- <?php printf( __( 'BuddyPress %s is our safest, fastest, most flexible version ever.', 'buddypress' ), $display_version ); ?>
410
<?php else : ?>
411
- <?php printf( __( 'Thank you for updating! BuddyPress %s is our safest, fastest, most flexible version ever.', 'buddypress' ), $display_version ); ?>
412
<?php endif; ?>
413
</div>
414
<div class="bp-badge"><?php printf( __( 'Version %s', 'buddypress' ), $display_version ); ?></div>
415
416
<h2 class="nav-tab-wrapper">
@@ -450,62 +482,57 @@ class BP_Admin {
450
451
<?php endif; ?>
452
453
<div class="changelog">
454
- <h3><?php _e( 'Improved Theme Integration', 'buddypress' ); ?></h3>
455
456
<div class="feature-section">
457
- <h4><?php _e( 'Hey, Good Lookin&#8217;', 'buddypress' ); ?></h4>
458
- <p><?php _e( 'We&#8217;ve streamlined our stylesheets, so that BuddyPress content looks more at home in your theme. And theme developers will love BP&#8217;s new hierarchies that make it easy to override specific top-level templates, stylesheets, and JavaScript files.', 'buddypress' ) ?></p>
459
</div>
460
</div>
461
462
<div class="changelog">
463
- <h3><?php _e( 'Better Group Member Management', 'buddypress' ); ?></h3>
464
465
<div class="feature-section">
466
- <h4><?php _e( '<em>Add</em>, <em>Remove</em>, and More, in a Snap', 'buddypress' ); ?></h4>
467
-
468
- <?php
469
- $group_admin_text = __( 'Groups administration panel', 'buddypress' );
470
- if ( bp_is_active( 'groups' ) ) {
471
- $group_admin_text = '<a href="' . bp_get_admin_url( add_query_arg( array( 'page' => 'bp-groups' ), 'admin.php' ) ) . '">' . $group_admin_text . '</a>';
472
- }
473
- ?>
474
-
475
- <p><?php printf(
476
- __( 'The Manage Members section of the %s has been rewritten, to make it easier to handle groups with many members. We&#8217;ve also made the interface nicer to use, to ensure that you don&#8217;t make changes and then forget to save them.', 'buddypress' ),
477
- $group_admin_text
478
- ); ?></p>
479
</div>
480
</div>
481
482
<div class="changelog">
483
- <h3><?php _e( 'Under the Hood', 'buddypress' ); ?></h3>
484
485
- <div class="feature-section three-col">
486
- <div>
487
- <h4><?php _e( 'Superpowered Group Extensions', 'buddypress' ); ?></h4>
488
- <p><?php _e( '<code>BP_Group_Extension</code> has been overhauled, making it easier than ever before to add custom functionality to groups.', 'buddypress' ); ?></p>
489
490
- <h4><?php _e( 'Filter Groups or Activity by Metadata', 'buddypress' ); ?></h4>
491
- <p><?php _e( '<code>bp_has_groups()</code> and <code>bp_has_activities()</code> now accept a <code>meta_query</code> paramater, for more powerful directory queries.', 'buddypress' ); ?></p>
492
- </div>
493
494
- <div>
495
- <h4><?php _e( 'Feed Me, Seymour', 'buddypress' ); ?></h4>
496
- <p><?php _e( 'The new <code>BP_Activity_Feed</code> class centralizes BP&#8217;s RSS logic, making our feeds more standards-compliant, and giving developers more tools for building custom feeds.', 'buddypress' ); ?></p>
497
498
- <h4><?php _e( 'Disable @-Mentions', 'buddypress' ); ?></h4>
499
- <p><?php _e( "Not using @-mentions? Disable them with <code>add_filter( 'bp_activity_do_mentions', '__return_false' );</code>", 'buddypress' ); ?></p>
500
- </div>
501
- </div>
502
503
- <div class="return-to-dashboard">
504
- <a href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-components' ), $this->settings_page ) ) ); ?>"><?php _e( 'Go to the BuddyPress Settings page', 'buddypress' ); ?></a>
505
</div>
506
507
- </div>
508
-
509
<?php
510
}
511
@@ -523,7 +550,7 @@ class BP_Admin {
523
524
<div class="wrap about-wrap">
525
<h1><?php printf( __( 'Welcome to BuddyPress %s', 'buddypress' ), $display_version ); ?></h1>
526
- <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>
527
<div class="bp-badge"><?php printf( __( 'Version %s', 'buddypress' ), $display_version ); ?></div>
528
529
<h2 class="nav-tab-wrapper">
@@ -598,11 +625,14 @@ class BP_Admin {
598
<a href="http://profiles.wordpress.org/ddean/">ddean</a>,
599
<a href="http://profiles.wordpress.org/DennisSmolek/">DennisSmolek</a>,
600
<a href="http://profiles.wordpress.org/dimensionmedia/">dimensionmedia</a>,
601
<a href="http://profiles.wordpress.org/dtc7240/">dtc7240</a>,
602
<a href="http://profiles.wordpress.org/ericlewis/">ericlewis</a>,
603
<a href="http://profiles.wordpress.org/gametako/">gametako</a>,
604
<a href="http://profiles.wordpress.org/geoffroycochard/">geoffroycochard</a>,
605
<a href="http://profiles.wordpress.org/hanni/">hanni</a>,
606
<a href="http://profiles.wordpress.org/henrywright/">henrywright</a>,
607
<a href="http://profiles.wordpress.org/hnla/">hnla</a>,
608
<a href="http://profiles.wordpress.org/imath/">imath</a>,
150
// Add settings
151
add_action( 'bp_register_admin_settings', array( $this, 'register_admin_settings' ) );
152
153
+ // Add a link to BuddyPress About page to the admin bar
154
+ add_action( 'admin_bar_menu', array( $this, 'admin_bar_about_link' ), 15 );
155
+
156
/** Filters ***********************************************************/
157
158
// Add link to settings page
337
}
338
}
339
340
+ /**
341
+ * Add a link to BuddyPress About page to the admin bar.
342
+ *
343
+ * @since BuddyPress (1.9.0)
344
+ *
345
+ * @param WP_Admin_Bar $wp_admin_bar As passed to 'admin_bar_menu'.
346
+ */
347
+ public function admin_bar_about_link( $wp_admin_bar ) {
348
+ if ( is_user_logged_in() ) {
349
+ $wp_admin_bar->add_menu( array(
350
+ 'parent' => 'wp-logo',
351
+ 'id' => 'bp-about',
352
+ 'title' => esc_html__( 'About BuddyPress', 'buddypress' ),
353
+ 'href' => add_query_arg( array( 'page' => 'bp-about' ), bp_get_admin_url( 'index.php' ) ),
354
+ ) );
355
+ }
356
+ }
357
+
358
/**
359
* Add Settings link to plugins area.
360
*
427
<h1><?php printf( __( 'Welcome to BuddyPress %s', 'buddypress' ), $display_version ); ?></h1>
428
<div class="about-text">
429
<?php if ( $is_new_install ) : ?>
430
+ <?php printf( __( 'It&#8217;s a great time to use BuddyPress! %s is our first version with a new component in over two years. Not only that, there are plenty of new features, enhancements, and bug fixes.', 'buddypress' ), $display_version ); ?>
431
<?php else : ?>
432
+ <?php printf( __( 'Thanks for updating! BuddyPress %s is our first version with a new component in over two years. Not only that, there are plenty of new features, enhancements, and bug fixes.', 'buddypress' ), $display_version ); ?>
433
<?php endif; ?>
434
</div>
435
+
436
+ <div class="changelog">
437
+ <h3><?php _e( 'Check out the highlights:', 'buddypress' ); ?></h3>
438
+
439
+ <ul>
440
+ <li><strong><?php _e( 'You can now add dynamic BuddyPress links to custom navigation menus.', 'buddypress' ); ?></strong></li>
441
+ <li><strong><?php _e( 'Notifications have been moved into their own component.', 'buddypress' ); ?></strong></li>
442
+ <li><strong><?php _e( 'Three new widgets, allowing easier site customization.', 'buddypress' ); ?></strong></li>
443
+ <ul>
444
+ </div>
445
+
446
<div class="bp-badge"><?php printf( __( 'Version %s', 'buddypress' ), $display_version ); ?></div>
447
448
<h2 class="nav-tab-wrapper">
482
483
<?php endif; ?>
484
485
+ <hr />
486
<div class="changelog">
487
+ <h3><?php _e( 'Dynamic links for custom navigation menus', 'buddypress' ); ?></h3>
488
489
<div class="feature-section">
490
+ <p><?php printf( __( 'It&#8217;s now easy to add BuddyPress-specific links to your menus through <a href="%s">Appearance &gt; Menus</a>. For example, you can now add a link to a specific user profile screen, and each person will end up at that screen inside their own user profile.', 'buddypress' ), admin_url( 'nav-menus.php' ) ); ?></p>
491
</div>
492
</div>
493
494
+ <hr />
495
<div class="changelog">
496
+ <h3><?php _e( 'Notifications component', 'buddypress' ); ?></h3>
497
498
<div class="feature-section">
499
+ <p><?php _e( 'The notification features have been promoted into a new component. Use it to keep your site&#8217;s members abreast of the latest connections and @mentions within the site, via email notifications and Toolbar alerts.', 'buddypress' ); ?></p>
500
+
501
</div>
502
</div>
503
504
+ <hr />
505
<div class="changelog">
506
+ <h3><?php _e( 'Widgets', 'buddypress' ); ?></h3>
507
508
+ <div class="feature-section">
509
+ <ul>
510
+ <li><?php _e( '<strong>Friends Widget</strong>: a list of recently active, popular, and newest friends of the displayed member.', 'buddypress' ); ?></li>
511
+ <li><?php _e( '<strong>Log In Widget</strong>: adds a simple &ldquo;Log In&rdquo; form to your site.', 'buddypress' ); ?></li>
512
+ <li><?php _e( '<strong>Sitewide Notices Widget</strong>: display Sitewide Notices from the Private Messaging component.', 'buddypress' ); ?></li>
513
+ </ul>
514
+ </div>
515
+ </div>
516
517
+ <hr />
518
+ <div class="changelog">
519
+ <h3><?php _e( 'Developer changes', 'buddypress' ); ?></h3>
520
521
+ <div class="feature-section">
522
+ <ul>
523
+ <li><?php _e( '<code>bp_redirect_canonical()</code> functionality has been reinstated', 'buddypress' ); ?></li>
524
+ <li><?php _e( 'Improved phpDoc inline documentation', 'buddypress' ); ?></li>
525
+ <li><?php printf( __( 'Improved compatibility with <a href="%s">develop.svn.wordpress.org</a> unit-test suite', 'buddypress' ), 'https://develop.svn.wordpress.org/' ); ?></li>
526
+ <li><?php printf( __( '<a href="%s">&hellip;and lots more!</a>' ), 'http://codex.buddypress.org/releases/version-1-9' ); ?></li>
527
+ </ul>
528
+ </div>
529
530
+ <div class="return-to-dashboard">
531
+ <a href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-components' ), $this->settings_page ) ) ); ?>"><?php _e( 'Go to the BuddyPress Settings page', 'buddypress' ); ?></a>
532
+ </div>
533
534
</div>
535
536
<?php
537
}
538
550
551
<div class="wrap about-wrap">
552
<h1><?php printf( __( 'Welcome to BuddyPress %s', 'buddypress' ), $display_version ); ?></h1>
553
+ <div class="about-text"><?php printf( __( 'BuddyPress %s is our first version with a new component in over two years. Not only that, there are plenty of new features, enhancements, and bug fixes.', 'buddypress' ), $display_version ); ?></div>
554
<div class="bp-badge"><?php printf( __( 'Version %s', 'buddypress' ), $display_version ); ?></div>
555
556
<h2 class="nav-tab-wrapper">
625
<a href="http://profiles.wordpress.org/ddean/">ddean</a>,
626
<a href="http://profiles.wordpress.org/DennisSmolek/">DennisSmolek</a>,
627
<a href="http://profiles.wordpress.org/dimensionmedia/">dimensionmedia</a>,
628
+ <a href="http://profiles.wordpress.org/djpaul/">DJPaul</a>,
629
<a href="http://profiles.wordpress.org/dtc7240/">dtc7240</a>,
630
<a href="http://profiles.wordpress.org/ericlewis/">ericlewis</a>,
631
<a href="http://profiles.wordpress.org/gametako/">gametako</a>,
632
<a href="http://profiles.wordpress.org/geoffroycochard/">geoffroycochard</a>,
633
+ <a href="http://profiles.wordpress.org/graham-washbrook/">graham-washbrook</a>,
634
<a href="http://profiles.wordpress.org/hanni/">hanni</a>,
635
+ <a href="http://profiles.wordpress.org/haykayltduk/">haykayltduk</a>,
636
<a href="http://profiles.wordpress.org/henrywright/">henrywright</a>,
637
<a href="http://profiles.wordpress.org/hnla/">hnla</a>,
638
<a href="http://profiles.wordpress.org/imath/">imath</a>,
bp-core/bp-core-classes.php CHANGED
@@ -460,6 +460,14 @@ class BP_User_Query {
460
461
), $this ) );
462
463
// Reindex for easier matching
464
$r = array();
465
foreach ( $wp_user_query->results as $u ) {
460
461
), $this ) );
462
463
+ // We calculate total_users using a standalone query, except
464
+ // when a whitelist of user_ids is passed to the constructor.
465
+ // This clause covers the latter situation, and ensures that
466
+ // pagination works when querying by $user_ids.
467
+ if ( empty( $this->total_users ) ) {
468
+ $this->total_users = count( $wp_user_query->results );
469
+ }
470
+
471
// Reindex for easier matching
472
$r = array();
473
foreach ( $wp_user_query->results as $u ) {
bp-core/bp-core-functions.php CHANGED
@@ -476,22 +476,27 @@ function bp_core_component_slug_from_root_slug( $root_slug ) {
476
* WordPress pages and this function is now a convenience for compatibility
477
* with the new method.
478
*
479
- * @global $bp BuddyPress global settings.
480
- *
481
* @param string $slug The slug of the component being added to the root list.
482
*/
483
function bp_core_add_root_component( $slug ) {
484
- global $bp;
485
486
- if ( empty( $bp->pages ) )
487
$bp->pages = bp_core_get_directory_pages();
488
489
$match = false;
490
491
// Check if the slug is registered in the $bp->pages global
492
foreach ( (array) $bp->pages as $key => $page ) {
493
- if ( $key == $slug || $page->slug == $slug )
494
$match = true;
495
}
496
497
// If there was no match, add a page for this root component
476
* WordPress pages and this function is now a convenience for compatibility
477
* with the new method.
478
*
479
* @param string $slug The slug of the component being added to the root list.
480
*/
481
function bp_core_add_root_component( $slug ) {
482
+ $bp = buddypress();
483
484
+ if ( empty( $bp->pages ) ) {
485
$bp->pages = bp_core_get_directory_pages();
486
+ }
487
488
$match = false;
489
490
// Check if the slug is registered in the $bp->pages global
491
foreach ( (array) $bp->pages as $key => $page ) {
492
+ if ( $key == $slug || $page->slug == $slug ) {
493
$match = true;
494
+ }
495
+ }
496
+
497
+ // Maybe create the add_root array
498
+ if ( empty( $bp->add_root ) ) {
499
+ $bp->add_root = array();
500
}
501
502
// If there was no match, add a page for this root component
bp-core/bp-core-template.php CHANGED
@@ -2365,6 +2365,12 @@ function bp_the_body_class() {
2365
if ( in_array( 'custom-background', (array) $wp_classes ) )
2366
$bp_classes[] = 'custom-background';
2367
2368
// Preserve any custom classes already set
2369
if ( !empty( $custom_classes ) ) {
2370
$wp_classes = (array) $custom_classes;
2365
if ( in_array( 'custom-background', (array) $wp_classes ) )
2366
$bp_classes[] = 'custom-background';
2367
2368
+ // Observe WP admin bar body classes
2369
+ if ( in_array( 'admin-bar', (array) $wp_classes ) )
2370
+ $bp_classes[] = 'admin-bar';
2371
+ if ( in_array( 'no-customize-support', (array) $wp_classes ) )
2372
+ $bp_classes[] = 'no-customize-support';
2373
+
2374
// Preserve any custom classes already set
2375
if ( !empty( $custom_classes ) ) {
2376
$wp_classes = (array) $custom_classes;
bp-core/bp-core-theme-compatibility.php CHANGED
@@ -249,7 +249,7 @@ function bp_use_theme_compat_with_current_theme() {
249
bp_detect_theme_compat_with_current_theme();
250
}
251
252
- return buddypress()->theme_compat->use_with_current_theme;
253
}
254
255
/**
249
bp_detect_theme_compat_with_current_theme();
250
}
251
252
+ return apply_filters( 'bp_use_theme_compat_with_current_theme', buddypress()->theme_compat->use_with_current_theme );
253
}
254
255
/**
bp-friends/bp-friends-functions.php CHANGED
@@ -159,7 +159,13 @@ function friends_withdraw_friendship( $initiator_userid, $friend_userid ) {
159
$friendship = new BP_Friends_Friendship( $friendship_id, true, false );
160
161
if ( empty( $friendship->is_confirmed ) && BP_Friends_Friendship::withdraw( $friendship_id ) ) {
162
do_action_ref_array( 'friends_friendship_whithdrawn', array( $friendship_id, &$friendship ) );
163
return true;
164
}
165
159
$friendship = new BP_Friends_Friendship( $friendship_id, true, false );
160
161
if ( empty( $friendship->is_confirmed ) && BP_Friends_Friendship::withdraw( $friendship_id ) ) {
162
+
163
+ // @deprecated Since 1.9
164
do_action_ref_array( 'friends_friendship_whithdrawn', array( $friendship_id, &$friendship ) );
165
+
166
+ // @since 1.9
167
+ do_action_ref_array( 'friends_friendship_withdrawn', array( $friendship_id, &$friendship ) );
168
+
169
return true;
170
}
171
bp-friends/bp-friends-widgets.php CHANGED
@@ -4,7 +4,7 @@
4
*
5
* @package BuddyPress
6
* @subpackage Friends
7
- * @since 1.9.0
8
*/
9
10
// Exit if accessed directly
@@ -187,7 +187,7 @@ class BP_Core_Friends_Widget extends WP_Widget {
187
}
188
}
189
190
- /** Widget AJAX ******************/
191
192
/**
193
* Process AJAX pagination or filtering for the Friends widget.
@@ -248,4 +248,3 @@ function bp_core_ajax_widget_friends() {
248
}
249
add_action( 'wp_ajax_widget_friends', 'bp_core_ajax_widget_friends' );
250
add_action( 'wp_ajax_nopriv_widget_friends', 'bp_core_ajax_widget_friends' );
251
-
4
*
5
* @package BuddyPress
6
* @subpackage Friends
7
+ * @since BuddyPress (1.9.0)
8
*/
9
10
// Exit if accessed directly
187
}
188
}
189
190
+ /** Widget AJAX ***************************************************************/
191
192
/**
193
* Process AJAX pagination or filtering for the Friends widget.
248
}
249
add_action( 'wp_ajax_widget_friends', 'bp_core_ajax_widget_friends' );
250
add_action( 'wp_ajax_nopriv_widget_friends', 'bp_core_ajax_widget_friends' );
bp-groups/bp-groups-buddybar.php CHANGED
@@ -11,9 +11,10 @@
11
if ( !defined( 'ABSPATH' ) ) exit;
12
13
/**
14
- * Adds menu items to the BuddyBar
15
*
16
- * @since BuddyPress (1.0)
17
* @global BuddyPress $bp
18
*/
19
function bp_groups_adminbar_admin_menu() {
11
if ( !defined( 'ABSPATH' ) ) exit;
12
13
/**
14
+ * Add menu items to the BuddyBar.
15
+ *
16
+ * @since BuddyPress (1.0.0)
17
*
18
* @global BuddyPress $bp
19
*/
20
function bp_groups_adminbar_admin_menu() {
bp-groups/bp-groups-cache.php CHANGED
@@ -14,17 +14,18 @@
14
if ( !defined( 'ABSPATH' ) ) exit;
15
16
/**
17
- * Slurps up groupmeta
18
*
19
* This function is called in two places in the BP_Groups_Group class:
20
* - in the populate() method, when single group objects are populated
21
* - in the get() method, when multiple groups are queried
22
*
23
- * It grabs all groupmeta associated with all of the groups passed in $group_ids and adds it to
24
- * the WP cache. This improves efficiency when using groupmeta inline
25
*
26
- * @param int|str|array $group_ids Accepts a single group_id, or a comma-separated list or array of
27
- * group ids
28
*/
29
function bp_groups_update_meta_cache( $group_ids = false ) {
30
global $bp;
@@ -40,6 +41,11 @@ function bp_groups_update_meta_cache( $group_ids = false ) {
40
bp_update_meta_cache( $cache_args );
41
}
42
43
function groups_clear_group_object_cache( $group_id ) {
44
wp_cache_delete( 'bp_total_group_count', 'bp' );
45
}
@@ -50,10 +56,11 @@ add_action( 'groups_group_avatar_updated', 'groups_clear_group_object_cach
50
add_action( 'groups_create_group_step_complete', 'groups_clear_group_object_cache' );
51
52
/**
53
- * Bust group caches when editing or deleting
54
*
55
- * @since BuddyPress (1.7)
56
- * @param int $group_id The group being edited
57
*/
58
function bp_groups_delete_group_cache( $group_id = 0 ) {
59
wp_cache_delete( 'bp_groups_group_' . $group_id . '_load_users', 'bp' );
@@ -65,11 +72,12 @@ add_action( 'groups_details_updated', 'bp_groups_delete_group_cache' );
65
add_action( 'groups_settings_updated', 'bp_groups_delete_group_cache' );
66
67
/**
68
- * Clears caches for the group creator when a group is created
69
*
70
- * @param int $group_id
71
- * @param BP_Groups_Group $group_obj
72
- * @since BuddyPress (1.6)
73
*/
74
function bp_groups_clear_group_creator_cache( $group_id, $group_obj ) {
75
// Clears the 'total groups' for this user
@@ -80,9 +88,10 @@ add_action( 'groups_created_group', 'bp_groups_clear_group_creator_cache', 10, 2
80
/**
81
* Clears caches for all members in a group when a group is deleted
82
*
83
- * @param BP_Groups_Group $group_obj
84
- * @param array User IDs who were in this group
85
- * @since BuddyPress (1.6)
86
*/
87
function bp_groups_clear_group_members_caches( $group_obj, $user_ids ) {
88
// Clears the 'total groups' cache for each member in a group
@@ -91,6 +100,12 @@ function bp_groups_clear_group_members_caches( $group_obj, $user_ids ) {
91
}
92
add_action( 'bp_groups_delete_group', 'bp_groups_clear_group_members_caches', 10, 2 );
93
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
}
14
if ( !defined( 'ABSPATH' ) ) exit;
15
16
/**
17
+ * Slurp up metadata for a set of groups.
18
*
19
* This function is called in two places in the BP_Groups_Group class:
20
* - in the populate() method, when single group objects are populated
21
* - in the get() method, when multiple groups are queried
22
*
23
+ * It grabs all groupmeta associated with all of the groups passed in
24
+ * $group_ids and adds it to WP cache. This improves efficiency when using
25
+ * groupmeta within a loop context.
26
*
27
+ * @param int|str|array $group_ids Accepts a single group_id, or a
28
+ * comma-separated list or array of group ids.
29
*/
30
function bp_groups_update_meta_cache( $group_ids = false ) {
31
global $bp;
41
bp_update_meta_cache( $cache_args );
42
}
43
44
+ /**
45
+ * Clear the cached group count.
46
+ *
47
+ * @param $group_id Not used.
48
+ */
49
function groups_clear_group_object_cache( $group_id ) {
50
wp_cache_delete( 'bp_total_group_count', 'bp' );
51
}
56
add_action( 'groups_create_group_step_complete', 'groups_clear_group_object_cache' );
57
58
/**
59
+ * Bust group caches when editing or deleting.
60
*
61
+ * @since BuddyPress (1.7.0)
62
+ *
63
+ * @param int $group_id The group being edited.
64
*/
65
function bp_groups_delete_group_cache( $group_id = 0 ) {
66
wp_cache_delete( 'bp_groups_group_' . $group_id . '_load_users', 'bp' );
72
add_action( 'groups_settings_updated', 'bp_groups_delete_group_cache' );
73
74
/**
75
+ * Clear caches for the group creator when a group is created.
76
+ *
77
+ * @since BuddyPress (1.6.0)
78
*
79
+ * @param int $group_id ID of the group.
80
+ * @param BP_Groups_Group $group_obj Group object.
81
*/
82
function bp_groups_clear_group_creator_cache( $group_id, $group_obj ) {
83
// Clears the 'total groups' for this user
88
/**
89
* Clears caches for all members in a group when a group is deleted
90
*
91
+ * @since BuddyPress (1.6.0)
92
+ *
93
+ * @param BP_Groups_Group $group_obj Group object.
94
+ * @param array User IDs who were in this group.
95
*/
96
function bp_groups_clear_group_members_caches( $group_obj, $user_ids ) {
97
// Clears the 'total groups' cache for each member in a group
100
}
101
add_action( 'bp_groups_delete_group', 'bp_groups_clear_group_members_caches', 10, 2 );
102
103
+ /**
104
+ * Clear a user's cached group count.
105
+ *
106
+ * @param int $group_id ID of the group. Not used in this function.
107
+ * @param int $user_id ID of the user whose group count is being changed.
108
+ */
109
function groups_clear_group_user_object_cache( $group_id, $user_id ) {
110
wp_cache_delete( 'bp_total_groups_for_user_' . $user_id, 'bp' );
111
}
bp-groups/bp-groups-classes.php CHANGED
@@ -10,24 +10,105 @@
10
// Exit if accessed directly
11
if ( !defined( 'ABSPATH' ) ) exit;
12
13
class BP_Groups_Group {
14
public $id;
15
public $creator_id;
16
public $name;
17
public $slug;
18
public $description;
19
public $status;
20
public $enable_forum;
21
public $date_created;
22
23
public $admins;
24
public $mods;
25
public $total_member_count;
26
27
/**
28
* Is the current user a member of this group?
29
*
30
- * @since BuddyPress (1.2)
31
* @var bool
32
*/
33
public $is_member;
@@ -51,7 +132,7 @@ class BP_Groups_Group {
51
/**
52
* Timestamp of the last activity that happened in this group.
53
*
54
- * @since BuddyPress (1.2)
55
* @var string
56
*/
57
public $last_activity;
@@ -59,11 +140,17 @@ class BP_Groups_Group {
59
/**
60
* If this is a private or hidden group, does the current user have access?
61
*
62
- * @since BuddyPress (1.6)
63
* @var bool
64
*/
65
public $user_has_access;
66
67
public function __construct( $id = null ) {
68
if ( !empty( $id ) ) {
69
$this->id = $id;
@@ -71,6 +158,9 @@ class BP_Groups_Group {
71
}
72
}
73
74
public function populate() {
75
global $wpdb, $bp;
76
@@ -114,6 +204,11 @@ class BP_Groups_Group {
114
}
115
}
116
117
public function save() {
118
global $wpdb, $bp;
119
@@ -185,6 +280,11 @@ class BP_Groups_Group {
185
return true;
186
}
187
188
public function delete() {
189
global $wpdb, $bp;
190
@@ -212,8 +312,16 @@ class BP_Groups_Group {
212
return true;
213
}
214
215
- /** Static Methods ********************************************************/
216
217
public static function group_exists( $slug, $table_name = false ) {
218
global $wpdb, $bp;
219
@@ -226,15 +334,48 @@ class BP_Groups_Group {
226
return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$table_name} WHERE slug = %s", strtolower( $slug ) ) );
227
}
228
229
public static function get_id_from_slug( $slug ) {
230
return BP_Groups_Group::group_exists( $slug );
231
}
232
233
public static function get_invites( $user_id, $group_id ) {
234
global $wpdb, $bp;
235
return $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->groups->table_name_members} WHERE group_id = %d and is_confirmed = 0 AND inviter_id = %d", $group_id, $user_id ) );
236
}
237
238
public static function filter_user_groups( $filter, $user_id = 0, $order = false, $limit = null, $page = null ) {
239
global $wpdb, $bp;
240
@@ -263,7 +404,21 @@ class BP_Groups_Group {
263
}
264
265
/**
266
- * @todo Deprecate in favor of get()
267
*/
268
public static function search_groups( $filter, $limit = null, $page = null, $sort_by = false, $order = false ) {
269
global $wpdb, $bp;
@@ -290,18 +445,36 @@ class BP_Groups_Group {
290
return array( 'groups' => $paged_groups, 'total' => $total_groups );
291
}
292
293
public static function check_slug( $slug ) {
294
global $wpdb, $bp;
295
296
return $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM {$bp->groups->table_name} WHERE slug = %s", $slug ) );
297
}
298
299
public static function get_slug( $group_id ) {
300
global $wpdb, $bp;
301
302
return $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM {$bp->groups->table_name} WHERE id = %d", $group_id ) );
303
}
304
305
public static function has_members( $group_id ) {
306
global $wpdb, $bp;
307
@@ -313,12 +486,33 @@ class BP_Groups_Group {
313
return true;
314
}
315
316
public static function has_membership_requests( $group_id ) {
317
global $wpdb, $bp;
318
319
return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 0", $group_id ) );
320
}
321
322
public static function get_membership_requests( $group_id, $limit = null, $page = null ) {
323
global $wpdb, $bp;
324
@@ -332,6 +526,55 @@ class BP_Groups_Group {
332
return array( 'requests' => $paged_requests, 'total' => $total_requests );
333
}
334
335
public static function get( $args = array() ) {
336
global $wpdb, $bp;
337
@@ -546,12 +789,12 @@ class BP_Groups_Group {
546
* WP_Query, we have to alter the return value (stripping the leading
547
* AND keyword from the 'where' clause).
548
*
549
- * @since BuddyPress (1.8)
550
* @access protected
551
*
552
* @param array $meta_query An array of meta_query filters. See the
553
- * documentation for WP_Meta_Query for details.
554
- * @return array $sql_array 'join' and 'where' clauses
555
*/
556
protected static function get_meta_query_sql( $meta_query = array() ) {
557
global $wpdb;
@@ -598,12 +841,16 @@ class BP_Groups_Group {
598
}
599
600
/**
601
- * Convert the 'type' parameter to 'order' and 'orderby'
602
*
603
- * @since BuddyPress (1.8)
604
* @access protected
605
- * @param string $type The 'type' shorthand param
606
- * @return array 'order' and 'orderby'
607
*/
608
protected static function convert_type_to_order_orderby( $type = '' ) {
609
$order = $orderby = '';
@@ -639,12 +886,13 @@ class BP_Groups_Group {
639
}
640
641
/**
642
- * Convert the 'orderby' param into a proper SQL term/column
643
*
644
- * @since BuddyPress (1.8)
645
* @access protected
646
- * @param string $orderby
647
- * @return string $order_by_term
648
*/
649
protected static function convert_orderby_to_order_by_term( $orderby ) {
650
$order_by_term = '';
@@ -675,6 +923,28 @@ class BP_Groups_Group {
675
return $order_by_term;
676
}
677
678
public static function get_by_most_forum_topics( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
679
global $wpdb, $bp, $bbdb;
680
@@ -717,6 +987,28 @@ class BP_Groups_Group {
717
return array( 'groups' => $paged_groups, 'total' => $total_groups );
718
}
719
720
public static function get_by_most_forum_posts( $limit = null, $page = null, $search_terms = false, $populate_extras = true, $exclude = false ) {
721
global $wpdb, $bp, $bbdb;
722
@@ -759,6 +1051,25 @@ class BP_Groups_Group {
759
return array( 'groups' => $paged_groups, 'total' => $total_groups );
760
}
761
762
public static function get_by_letter( $letter, $limit = null, $page = null, $populate_extras = true, $exclude = false ) {
763
global $wpdb, $bp;
764
@@ -803,6 +1114,30 @@ class BP_Groups_Group {
803
return array( 'groups' => $paged_groups, 'total' => $total_groups );
804
}
805
806
public static function get_random( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
807
global $wpdb, $bp;
808
@@ -844,6 +1179,23 @@ class BP_Groups_Group {
844
return array( 'groups' => $paged_groups, 'total' => $total_groups );
845
}
846
847
public static function get_group_extras( &$paged_groups, &$group_ids, $type = false ) {
848
global $bp, $wpdb;
849
@@ -901,12 +1253,28 @@ class BP_Groups_Group {
901
return $paged_groups;
902
}
903
904
public static function delete_all_invites( $group_id ) {
905
global $wpdb, $bp;
906
907
return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE group_id = %d AND invite_sent = 1", $group_id ) );
908
}
909
910
public static function get_total_group_count() {
911
global $wpdb, $bp;
912
@@ -917,6 +1285,13 @@ class BP_Groups_Group {
917
return $wpdb->get_var( "SELECT COUNT(id) FROM {$bp->groups->table_name} {$hidden_sql}" );
918
}
919
920
public static function get_global_forum_topic_count( $type ) {
921
global $bbdb, $wpdb, $bp;
922
@@ -933,6 +1308,12 @@ class BP_Groups_Group {
933
return $wpdb->get_var( "SELECT COUNT(t.topic_id) FROM {$bbdb->topics} AS t, {$bp->groups->table_name} AS g LEFT JOIN {$bp->groups->table_name_groupmeta} AS gm ON g.id = gm.group_id WHERE (gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id) AND g.status = 'public' AND t.topic_status = '0' AND t.topic_sticky != '2' {$extra_sql} " );
934
}
935
936
public static function get_total_member_count( $group_id ) {
937
global $wpdb, $bp;
938
@@ -942,10 +1323,10 @@ class BP_Groups_Group {
942
/**
943
* Get a total count of all topics of a given status, across groups/forums
944
*
945
- * @package BuddyPress
946
- * @since BuddyPress (1.5)
947
*
948
- * @param string $status 'public', 'private', 'hidden', 'all' Which group types to count
949
* @return int The topic count
950
*/
951
public static function get_global_topic_count( $status = 'public', $search_terms = false ) {
@@ -985,12 +1366,12 @@ class BP_Groups_Group {
985
}
986
987
/**
988
- * Get an array containing ids for each group type
989
*
990
* A bit of a kludge workaround for some issues
991
- * with bp_has_groups()
992
*
993
- * @since BuddyPress (1.7)
994
*
995
* @return array
996
*/
@@ -1009,23 +1390,24 @@ class BP_Groups_Group {
1009
}
1010
1011
/**
1012
- * Query for the members of a group
1013
*
1014
- * @since BuddyPress (1.8)
1015
*/
1016
class BP_Group_Member_Query extends BP_User_Query {
1017
/**
1018
- * Array of group member ids, cached to prevent redundant lookups
1019
*
1020
- * @var null|array Null if not yet defined, otherwise an array of ints
1021
* @since BuddyPress (1.8.1)
1022
*/
1023
protected $group_member_ids;
1024
1025
/**
1026
- * Set up action hooks
1027
*
1028
- * @since BuddyPress (1.8)
1029
*/
1030
public function setup_hooks() {
1031
// Take this early opportunity to set the default 'type' param
@@ -1043,13 +1425,15 @@ class BP_Group_Member_Query extends BP_User_Query {
1043
}
1044
1045
/**
1046
- * Get a list of user_ids to include in the IN clause of the main query
1047
*
1048
* Overrides BP_User_Query::get_include_ids(), adding our additional
1049
* group-member logic.
1050
*
1051
- * @since BuddyPress (1.8)
1052
- * @param array
1053
* @return array
1054
*/
1055
public function get_include_ids( $include = array() ) {
@@ -1080,10 +1464,11 @@ class BP_Group_Member_Query extends BP_User_Query {
1080
}
1081
1082
/**
1083
- * Get the members of the queried group
1084
*
1085
- * @since BuddyPress (1.8)
1086
- * @return array $ids User IDs of relevant group member ids
1087
*/
1088
protected function get_group_member_ids() {
1089
global $wpdb;
@@ -1176,12 +1561,12 @@ class BP_Group_Member_Query extends BP_User_Query {
1176
}
1177
1178
/**
1179
- * Tell BP_User_Query to order by the order of our query results
1180
*
1181
* This implementation assumes the 'last_modified' sort order
1182
* hardcoded in BP_Group_Member_Query::get_group_member_ids().
1183
*
1184
- * @param object $query BP_User_Query object
1185
*/
1186
public function set_orderby( $query ) {
1187
$gm_ids = $this->get_group_member_ids();
@@ -1201,9 +1586,15 @@ class BP_Group_Member_Query extends BP_User_Query {
1201
}
1202
1203
/**
1204
- * Fetch additional data required in bp_group_has_members() loops
1205
*
1206
- * @since BuddyPress (1.8)
1207
* @param object $query BP_User_Query object. Because we're filtering
1208
* the current object, we use $this inside of the method instead
1209
* @param string $user_ids_sql Sanitized, comma-separated string of
@@ -1229,21 +1620,138 @@ class BP_Group_Member_Query extends BP_User_Query {
1229
}
1230
}
1231
1232
class BP_Groups_Member {
1233
var $id;
1234
var $group_id;
1235
var $user_id;
1236
var $inviter_id;
1237
var $is_admin;
1238
var $is_mod;
1239
var $is_banned;
1240
var $user_title;
1241
var $date_modified;
1242
var $is_confirmed;
1243
var $comments;
1244
var $invite_sent;
1245
var $user;
1246
1247
public function __construct( $user_id = 0, $group_id = 0, $id = false, $populate = true ) {
1248
1249
// User and group are not empty, and ID is
@@ -1266,6 +1774,9 @@ class BP_Groups_Member {
1266
}
1267
}
1268
1269
public function populate() {
1270
global $wpdb, $bp;
1271
@@ -1295,6 +1806,11 @@ class BP_Groups_Member {
1295
}
1296
}
1297
1298
public function save() {
1299
global $wpdb, $bp;
1300
@@ -1339,6 +1855,12 @@ class BP_Groups_Member {
1339
return true;
1340
}
1341
1342
public function promote( $status = 'mod' ) {
1343
if ( 'mod' == $status ) {
1344
$this->is_admin = 0;
@@ -1355,6 +1877,11 @@ class BP_Groups_Member {
1355
return $this->save();
1356
}
1357
1358
public function demote() {
1359
$this->is_mod = 0;
1360
$this->is_admin = 0;
@@ -1363,6 +1890,11 @@ class BP_Groups_Member {
1363
return $this->save();
1364
}
1365
1366
public function ban() {
1367
if ( !empty( $this->is_admin ) )
1368
return false;
@@ -1373,6 +1905,11 @@ class BP_Groups_Member {
1373
return $this->save();
1374
}
1375
1376
public function unban() {
1377
if ( !empty( $this->is_admin ) )
1378
return false;
@@ -1382,17 +1919,28 @@ class BP_Groups_Member {
1382
return $this->save();
1383
}
1384
1385
public function accept_invite() {
1386
$this->inviter_id = 0;
1387
$this->is_confirmed = 1;
1388
$this->date_modified = bp_core_current_time();
1389
}
1390
1391
public function accept_request() {
1392
$this->is_confirmed = 1;
1393
$this->date_modified = bp_core_current_time();
1394
}
1395
1396
public function remove() {
1397
global $wpdb, $bp;
1398
@@ -1410,30 +1958,39 @@ class BP_Groups_Member {
1410
return $result;
1411
}
1412
1413
- /** Static Methods ********************************************************/
1414
1415
/**
1416
- * Refresh the total_group_count for a user
1417
*
1418
- * @since BuddyPress (1.8)
1419
- * @param int $user_id
1420
- * @return bool True on success
1421
*/
1422
public static function refresh_total_group_count_for_user( $user_id ) {
1423
return bp_update_user_meta( $user_id, 'total_group_count', (int) self::total_group_count( $user_id ) );
1424
}
1425
1426
/**
1427
- * Refresh the total_member_count for a group
1428
*
1429
- * @since BuddyPress (1.8)
1430
- * @param int $group_id
1431
- * @return bool True on success
1432
*/
1433
public static function refresh_total_member_count_for_group( $group_id ) {
1434
return groups_update_groupmeta( $group_id, 'total_member_count', (int) BP_Groups_Group::get_total_member_count( $group_id ) );
1435
}
1436
1437
public static function delete( $user_id, $group_id ) {
1438
global $wpdb, $bp;
1439
@@ -1448,6 +2005,19 @@ class BP_Groups_Member {
1448
return $remove;
1449
}
1450
1451
public static function get_group_ids( $user_id, $limit = false, $page = false ) {
1452
global $wpdb, $bp;
1453
@@ -1469,6 +2039,21 @@ class BP_Groups_Member {
1469
return array( 'groups' => $groups, 'total' => (int) $total_groups );
1470
}
1471
1472
public static function get_recently_joined( $user_id, $limit = false, $page = false, $filter = false ) {
1473
global $wpdb, $bp;
1474
@@ -1491,6 +2076,21 @@ class BP_Groups_Member {
1491
return array( 'groups' => $paged_groups, 'total' => $total_groups );
1492
}
1493
1494
public static function get_is_admin_of( $user_id, $limit = false, $page = false, $filter = false ) {
1495
global $wpdb, $bp;
1496
@@ -1513,6 +2113,21 @@ class BP_Groups_Member {
1513
return array( 'groups' => $paged_groups, 'total' => $total_groups );
1514
}
1515
1516
public static function get_is_mod_of( $user_id, $limit = false, $page = false, $filter = false ) {
1517
global $wpdb, $bp;
1518
@@ -1535,6 +2150,12 @@ class BP_Groups_Member {
1535
return array( 'groups' => $paged_groups, 'total' => $total_groups );
1536
}
1537
1538
public static function total_group_count( $user_id = 0 ) {
1539
global $bp, $wpdb;
1540
@@ -1548,6 +2169,21 @@ class BP_Groups_Member {
1548
}
1549
}
1550
1551
public static function get_invites( $user_id, $limit = false, $page = false, $exclude = false ) {
1552
global $wpdb, $bp;
1553
@@ -1566,6 +2202,16 @@ class BP_Groups_Member {
1566
return array( 'groups' => $paged_groups, 'total' => $total_groups );
1567
}
1568
1569
public static function check_has_invite( $user_id, $group_id, $type = 'sent' ) {
1570
global $wpdb, $bp;
1571
@@ -1580,6 +2226,13 @@ class BP_Groups_Member {
1580
return $wpdb->get_var( $wpdb->prepare( $sql, $user_id, $group_id ) );
1581
}
1582
1583
public static function delete_invite( $user_id, $group_id ) {
1584
global $wpdb, $bp;
1585
@@ -1589,6 +2242,13 @@ class BP_Groups_Member {
1589
return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND inviter_id != 0 AND invite_sent = 1", $user_id, $group_id ) );
1590
}
1591
1592
public static function delete_request( $user_id, $group_id ) {
1593
global $wpdb, $bp;
1594
@@ -1598,6 +2258,14 @@ class BP_Groups_Member {
1598
return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND inviter_id = 0 AND invite_sent = 0", $user_id, $group_id ) );
1599
}
1600
1601
public static function check_is_admin( $user_id, $group_id ) {
1602
global $wpdb, $bp;
1603
@@ -1607,6 +2275,14 @@ class BP_Groups_Member {
1607
return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_admin = 1 AND is_banned = 0", $user_id, $group_id ) );
1608
}
1609
1610
public static function check_is_mod( $user_id, $group_id ) {
1611
global $wpdb, $bp;
1612
@@ -1616,6 +2292,14 @@ class BP_Groups_Member {
1616
return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_mod = 1 AND is_banned = 0", $user_id, $group_id ) );
1617
}
1618
1619
public static function check_is_member( $user_id, $group_id ) {
1620
global $wpdb, $bp;
1621
@@ -1625,6 +2309,14 @@ class BP_Groups_Member {
1625
return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 1 AND is_banned = 0", $user_id, $group_id ) );
1626
}
1627
1628
public static function check_is_banned( $user_id, $group_id ) {
1629
global $wpdb, $bp;
1630
@@ -1637,11 +2329,12 @@ class BP_Groups_Member {
1637
/**
1638
* Is the specified user the creator of the group?
1639
*
1640
- * @global object $bp BuddyPress global settings
1641
- * @global wpdb $wpdb WordPress database object
1642
- * @param int $user_id
1643
- * @param int $group_id
1644
* @since BuddyPress (1.2.6)
1645
*/
1646
public static function check_is_creator( $user_id, $group_id ) {
1647
global $bp, $wpdb;
@@ -1652,6 +2345,13 @@ class BP_Groups_Member {
1652
return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name} WHERE creator_id = %d AND id = %d", $user_id, $group_id ) );
1653
}
1654
1655
public static function check_for_membership_request( $user_id, $group_id ) {
1656
global $wpdb, $bp;
1657
@@ -1661,6 +2361,13 @@ class BP_Groups_Member {
1661
return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND is_banned = 0 AND inviter_id = 0", $user_id, $group_id ) );
1662
}
1663
1664
public static function get_random_groups( $user_id = 0, $total_groups = 5 ) {
1665
global $wpdb, $bp;
1666
@@ -1672,30 +2379,59 @@ class BP_Groups_Member {
1672
}
1673
}
1674
1675
public static function get_group_member_ids( $group_id ) {
1676
global $bp, $wpdb;
1677
1678
return $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0", $group_id ) );
1679
}
1680
1681
public static function get_group_administrator_ids( $group_id ) {
1682
global $bp, $wpdb;
1683
1684
return $wpdb->get_results( $wpdb->prepare( "SELECT user_id, date_modified FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_admin = 1 AND is_banned = 0", $group_id ) );
1685
}
1686
1687
public static function get_group_moderator_ids( $group_id ) {
1688
global $bp, $wpdb;
1689
1690
return $wpdb->get_results( $wpdb->prepare( "SELECT user_id, date_modified FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_mod = 1 AND is_banned = 0", $group_id ) );
1691
}
1692
1693
public static function get_all_membership_request_user_ids( $group_id ) {
1694
global $bp, $wpdb;
1695
1696
return $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 0 AND inviter_id = 0", $group_id ) );
1697
}
1698
1699
public static function get_all_for_group( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) {
1700
global $bp, $wpdb;
1701
@@ -1755,6 +2491,12 @@ class BP_Groups_Member {
1755
return array( 'members' => $members, 'count' => $total_member_count );
1756
}
1757
1758
public static function delete_all( $group_id ) {
1759
global $wpdb, $bp;
1760
@@ -1762,13 +2504,11 @@ class BP_Groups_Member {
1762
}
1763
1764
/**
1765
- * Delete all group membership information for the specified user
1766
*
1767
- * @global object $bp BuddyPress global settings
1768
- * @global wpdb $wpdb WordPress database object
1769
- * @param int $user_id
1770
- * @since BuddyPress (1.0)
1771
- * @uses BP_Groups_Member
1772
*/
1773
public static function delete_all_for_user( $user_id ) {
1774
global $bp, $wpdb;
@@ -1861,115 +2601,152 @@ class BP_Groups_Member {
1861
*
1862
* @package BuddyPress
1863
* @subpackage Groups
1864
- * @since BuddyPress (1.1)
1865
*/
1866
class BP_Group_Extension {
1867
1868
- /** Public ****************************************************************/
1869
1870
/**
1871
- * @var array Information about this extension's screens
1872
- * @since BuddyPress (1.8)
1873
*/
1874
public $screens = array();
1875
1876
/**
1877
- * @var string The name of the extending class
1878
- * @since BuddyPress (1.8)
1879
*/
1880
public $class_name = '';
1881
1882
/**
1883
- * @var object A ReflectionClass object of the current extension
1884
- * @since BuddyPress (1.8)
1885
*/
1886
public $class_reflection = null;
1887
1888
/**
1889
- * @var array Parsed configuration paramaters for the extension
1890
- * @since BuddyPress (1.8)
1891
*/
1892
public $params = array();
1893
1894
/**
1895
- * @var int The id of the current group
1896
- * @since BuddyPress (1.8)
1897
*/
1898
public $group_id = 0;
1899
1900
/**
1901
- * @var string The slug of the current extension
1902
*/
1903
public $slug = '';
1904
1905
/**
1906
- * @var string The translatable name of the current extension
1907
*/
1908
public $name = '';
1909
1910
/**
1911
- * @var string Whether the extension tab is visible. 'public'
1912
- * or 'private'
1913
*/
1914
public $visibility = 'public';
1915
1916
/**
1917
- * @var int The numeric position of the main nav item
1918
*/
1919
public $nav_item_position = 81;
1920
1921
/**
1922
- * @var bool Whether to show the nav item
1923
*/
1924
public $enable_nav_item = true;
1925
1926
/**
1927
- * @var string The text of the nav item. Defaults to self::name
1928
*/
1929
public $nav_item_name = '';
1930
1931
/**
1932
- * @var string The WP action that self::widget_display() is attached to.
1933
- * Defaults to 'groups_custom_group_boxes'
1934
*/
1935
public $display_hook = 'groups_custom_group_boxes';
1936
1937
/**
1938
- * @var string The template file used to load the plugin content.
1939
- * Defaults to 'groups/single/plugins'
1940
*/
1941
public $template_file = 'groups/single/plugins';
1942
1943
- /** Protected *************************************************************/
1944
1945
/**
1946
- * @var bool Has the extension been initialized?
1947
- * @since BuddyPress (1.8)
1948
*/
1949
protected $initialized = false;
1950
1951
/**
1952
- * @var array Extension properties as set by legacy extensions
1953
- * @since BuddyPress (1.8)
1954
*/
1955
protected $legacy_properties = array();
1956
1957
/**
1958
- * @var array Extension properties as set by legacy extensions, but
1959
- * converted to match the new format for params
1960
- * @since BuddyPress (1.8)
1961
*/
1962
protected $legacy_properties_converted = array();
1963
1964
/**
1965
- * @var array Miscellaneous data as set by the __set() magic method
1966
- * @since BuddyPress (1.8)
1967
*/
1968
protected $data = array();
1969
1970
- /** Screen Overrides ******************************************************/
1971
1972
- /**
1973
* Screen override methods are how your extension will display content
1974
* and handle form submits. Your extension should only override those
1975
* methods that it needs for its purposes.
@@ -2014,7 +2791,33 @@ class BP_Group_Extension {
2014
* }
2015
*
2016
* @since BuddyPress (1.8)
2017
- * @param array $args See inline definition below for arguments
2018
*/
2019
public function init( $args = array() ) {
2020
@@ -2043,7 +2846,7 @@ class BP_Group_Extension {
2043
}
2044
2045
/**
2046
- * The main setup routine for the extension
2047
*
2048
* This method contains the primary logic for setting up an extension's
2049
* configuration, setting up backward compatibility for legacy plugins,
@@ -2054,7 +2857,7 @@ class BP_Group_Extension {
2054
* is called automatically at the right point in the load order by
2055
* bp_register_group_extension().
2056
*
2057
- * @since BuddyPress (1.1)
2058
*/
2059
public function _register() {
2060
@@ -2092,13 +2895,13 @@ class BP_Group_Extension {
2092
}
2093
2094
/**
2095
- * Set up some basic info about the Extension
2096
*
2097
* Here we collect the name of the extending class, as well as a
2098
* ReflectionClass that is used in get_screen_callback() to determine
2099
* whether your extension overrides certain callback methods.
2100
*
2101
- * @since BuddyPress (1.8)
2102
*/
2103
protected function setup_class_info() {
2104
if ( empty( $this->class_name ) ) {
@@ -2111,14 +2914,14 @@ class BP_Group_Extension {
2111
}
2112
2113
/**
2114
- * Get the current group id
2115
*
2116
* Check for:
2117
* - current group
2118
* - new group
2119
* - group admin
2120
*
2121
- * @since BuddyPress (1.8)
2122
*/
2123
public static function get_group_id() {
2124
@@ -2147,9 +2950,9 @@ class BP_Group_Extension {
2147
}
2148
2149
/**
2150
- * Gather configuration data about your screens
2151
*
2152
- * @since BuddyPress (1.8)
2153
*/
2154
protected function get_default_screens() {
2155
$this->setup_class_info();
@@ -2180,9 +2983,9 @@ class BP_Group_Extension {
2180
}
2181
2182
/**
2183
- * Set up screens array based on params
2184
*
2185
- * @since BuddyPress (1.8)
2186
*/
2187
protected function setup_screens() {
2188
foreach ( (array) $this->params['screens'] as $context => $screen ) {
@@ -2198,12 +3001,12 @@ class BP_Group_Extension {
2198
}
2199
}
2200
2201
- /** Display ***************************************************************/
2202
2203
/**
2204
- * Hook this extension's group tab into BuddyPress, if necessary
2205
*
2206
- * @since BuddyPress (1.8)
2207
*/
2208
protected function setup_display_hooks() {
2209
@@ -2243,19 +3046,19 @@ class BP_Group_Extension {
2243
}
2244
2245
/**
2246
- * Hooks the main display method, and loads the template file
2247
*/
2248
public function _display_hook() {
2249
add_action( 'bp_template_content', array( &$this, 'display' ) );
2250
bp_core_load_template( apply_filters( 'bp_core_template_plugin', $this->template_file ) );
2251
}
2252
2253
- /** Create ****************************************************************/
2254
2255
/**
2256
- * Hook this extension's Create step into BuddyPress, if necessary
2257
*
2258
- * @since BuddyPress (1.8)
2259
*/
2260
protected function setup_create_hooks() {
2261
if ( ! $this->is_screen_enabled( 'create' ) ) {
@@ -2281,9 +3084,9 @@ class BP_Group_Extension {
2281
}
2282
2283
/**
2284
- * Call the create_screen() method, if we're on the right page
2285
*
2286
- * @since BuddyPress (1.8)
2287
*/
2288
public function maybe_create_screen() {
2289
if ( ! bp_is_group_creation_step( $this->screens['create']['slug'] ) ) {
@@ -2299,9 +3102,9 @@ class BP_Group_Extension {
2299
}
2300
2301
/**
2302
- * Call the create_screen_save() method, if we're on the right page
2303
*
2304
- * @since BuddyPress (1.8)
2305
*/
2306
public function maybe_create_screen_save() {
2307
if ( ! bp_is_group_creation_step( $this->screens['create']['slug'] ) ) {
@@ -2312,12 +3115,12 @@ class BP_Group_Extension {
2312
call_user_func( $this->screens['create']['screen_save_callback'], $this->group_id );
2313
}
2314
2315
- /** Edit ******************************************************************/
2316
2317
/**
2318
- * Hook this extension's Edit panel into BuddyPress, if necessary
2319
*
2320
- * @since BuddyPress (1.8)
2321
*/
2322
protected function setup_edit_hooks() {
2323
@@ -2362,7 +3165,7 @@ class BP_Group_Extension {
2362
}
2363
2364
/**
2365
- * Call the edit_screen() method
2366
*
2367
* Previous versions of BP_Group_Extension required plugins to provide
2368
* their own Submit button and nonce fields when building markup. In
@@ -2374,7 +3177,7 @@ class BP_Group_Extension {
2374
* button, as would be present in legacy plugins; if one is found, we
2375
* do not auto-add our own button.
2376
*
2377
- * @since BuddyPress (1.8)
2378
*/
2379
public function call_edit_screen() {
2380
ob_start();
@@ -2388,9 +3191,9 @@ class BP_Group_Extension {
2388
}
2389
2390
/**
2391
- * Check the nonce, and call the edit_screen_save() method
2392
*
2393
- * @since BuddyPress (1.8)
2394
*/
2395
public function call_edit_screen_save() {
2396
if ( empty( $_POST ) ) {
@@ -2408,7 +3211,7 @@ class BP_Group_Extension {
2408
}
2409
2410
/**
2411
- * Load the template that houses the Edit screen
2412
*
2413
* Separated out into a callback so that it can run after all other
2414
* Group Extensions have had a chance to register their navigation, to
@@ -2416,16 +3219,17 @@ class BP_Group_Extension {
2416
*
2417
* Hooked to 'bp_screens'.
2418
*
2419
- * @see BP_Group_Extension::setup_edit_hooks()
2420
* @access public So that do_action() has access. Do not call directly.
2421
- * @since BuddyPress (1.8)
2422
*/
2423
public function call_edit_screen_template_loader() {
2424
bp_core_load_template( $this->edit_screen_template );
2425
}
2426
2427
/**
2428
- * Add a submit button to the edit form, if it needs one
2429
*
2430
* There's an inconsistency in the way that the group Edit and Create
2431
* screens are rendered: the Create screen has a submit button built
@@ -2434,9 +3238,11 @@ class BP_Group_Extension {
2434
* use on both the Create and Edit screens - BP will provide the button
2435
* if one is not found.
2436
*
2437
- * @since BuddyPress (1.8)
2438
- * @param string $screen The screen markup, captured in the output buffer
2439
- * @param string $screen The same markup, with a submit button added
2440
*/
2441
protected function maybe_add_submit_button( $screen = '' ) {
2442
if ( $this->has_submit_button( $screen ) ) {
@@ -2454,9 +3260,10 @@ class BP_Group_Extension {
2454
/**
2455
* Does the given markup have a submit button?
2456
*
2457
- * @since BuddyPress (1.8)
2458
- * @param string $screen The markup to check
2459
- * @return bool
2460
*/
2461
public static function has_submit_button( $screen = '' ) {
2462
$pattern = "/<input[^>]+type=[\'\"]submit[\'\"]/";
@@ -2464,12 +3271,12 @@ class BP_Group_Extension {
2464
return ! empty( $matches[0] );
2465
}
2466
2467
- /** Admin *****************************************************************/
2468
2469
/**
2470
- * Hook this extension's Admin metabox into BuddyPress, if necessary
2471
*
2472
- * @since BuddyPress (1.8)
2473
*/
2474
protected function setup_admin_hooks() {
2475
if ( ! $this->is_screen_enabled( 'admin' ) || ! is_admin() ) {
@@ -2487,9 +3294,9 @@ class BP_Group_Extension {
2487
}
2488
2489
/**
2490
- * Call the admin_screen() method, and add a nonce field
2491
*
2492
- * @since BuddyPress (1.8)
2493
*/
2494
public function call_admin_screen() {
2495
call_user_func( $this->screens['admin']['screen_callback'], $this->group_id );
@@ -2499,7 +3306,7 @@ class BP_Group_Extension {
2499