PluginProbe
bbPress / 2.6.19
bbPress v2.6.19
2.6.19 2.6.18 2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 All 74 releases
← All changes | includes/admin/users.php +22 -24 trunk → 2.6.19 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2
3 3 /**
4 - * bbPress Users Admin Class.
4 + * bbPress Users Admin Class
5 5 *
6 6 * @package bbPress
7 7 * @subpackage Administration
8 8 */
@@ -11,9 +11,9 @@
11 11 defined( 'ABSPATH' ) || exit;
12 12
13 13 if ( ! class_exists( 'BBP_Users_Admin' ) ) :
14 14 /**
15 - * Loads bbPress users admin area.
15 + * Loads bbPress users admin area
16 16 *
17 17 * @package bbPress
18 18 * @subpackage Administration
19 19 * @since 2.0.0 bbPress (r3095)
@@ -20,9 +20,9 @@
20 20 */
21 21 class BBP_Users_Admin {
22 22
23 23 /**
24 - * The bbPress users admin loader.
24 + * The bbPress users admin loader
25 25 *
26 26 * @since 2.0.0 bbPress (r3095)
27 27 */
28 28 public function __construct() {
@@ -29,9 +29,9 @@
29 29 $this->setup_actions();
30 30 }
31 31
32 32 /**
33 - * Setup the admin hooks, actions and filters.
33 + * Setup the admin hooks, actions and filters
34 34 *
35 35 * @since 2.0.0 bbPress (r3376)
36 36 *
37 37 * @access private
@@ -46,9 +46,9 @@
46 46 // User profile edit/display actions
47 47 add_action( 'edit_user_profile', array( $this, 'secondary_role_display' ) );
48 48
49 49 // WordPress user screen
50 - // Remove the bottom list table "change forum role" dropdown from WordPress < 4.6.
50 + // Remvove the bottom list table "change forum role" dropdown from WordPress < 4.6.
51 51 // See https://bbpress.trac.wordpress.org/ticket/2906.
52 52 if ( bbp_get_major_wp_version() < 4.6 ) {
53 53 add_action( 'restrict_manage_users', array( __CLASS__, 'user_role_bulk_dropdown' ) );
54 54 } else {
@@ -64,20 +64,15 @@
64 64
65 65 // User List Table
66 66 add_action( 'load-users.php', array( $this, 'user_role_bulk_change' ), 10, 1 );
67 67 add_action( 'user_row_actions', array( $this, 'user_row_actions' ), 10, 2 );
68 -
69 - /** Dependencies ******************************************************/
70 -
71 - // Allow plugins to modify these actions
72 - do_action_ref_array( 'bbp_admin_users_loaded', array( &$this ) );
73 68 }
74 69
75 70 /**
76 - * Default interface for setting a forum role.
71 + * Default interface for setting a forum role
77 72 *
78 73 * @since 2.2.0 bbPress (r4301)
79 - * @since 2.6.19 bbPress (r7685) Show only assignable roles.
74 + * @since 2.6.19 bbPress (r7686) Show only assignable roles.
80 75 *
81 76 * @param WP_User $profileuser User data
82 77 * @return bool Always false
83 78 */
@@ -129,13 +124,13 @@
129 124 <?php
130 125 }
131 126
132 127 /**
133 - * Add bulk forums role dropdown to the WordPress users table.
128 + * Add bulk forums role dropdown to the WordPress users table
134 129 *
135 130 * @since 2.2.0 bbPress (r4365)
136 131 * @since 2.6.0 bbPress (r6055) Introduced the `$which` parameter.
137 - * @since 2.6.19 bbPress (r7685) Show only assignable roles.
132 + * @since 2.6.19 bbPress (r7686) Show only assignable roles.
138 133 *
139 134 * @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
140 135 */
141 136 public static function user_role_bulk_dropdown( $which ) {
@@ -169,12 +164,15 @@
169 164 wp_nonce_field( 'bbp-bulk-users', 'bbp-bulk-users-nonce' );
170 165 }
171 166
172 167 /**
173 - * Process bulk dropdown form submission from the WordPress Users Table.
168 + * Process bulk dropdown form submission from the WordPress Users
169 + * Table
174 170 *
175 171 * @since 2.2.0 bbPress (r4365)
176 - * @since 2.6.19 bbPress (r7685) Check each user and assignable role.
172 + * @since 2.6.19 bbPress (r7686) Check each user and assignable role.
173 + *
174 + * @return bool Always false
177 175 */
178 176 public function user_role_bulk_change() {
179 177
180 178 // Bail if no users specified
@@ -246,9 +244,9 @@
246 244 }
247 245 }
248 246
249 247 /**
250 - * Add a "View" link for each user.
248 + * Add a "View" link for each user
251 249 *
252 250 * @since 2.6.0 bbPress (r6502)
253 251 *
254 252 * @param array $actions
@@ -253,9 +251,9 @@
253 251 *
254 252 * @param array $actions
255 253 * @param WP_User $user
256 254 *
257 - * @return array Actions with 'view' link added to them.
255 + * @return array Actions with 'view' link added to them
258 256 */
259 257 public function user_row_actions( $actions = array(), $user = false ) {
260 258
261 259 // Reverse
@@ -269,13 +267,13 @@
269 267 }
270 268
271 269 /**
272 270 * Add Forum Role column to the WordPress Users table, and change the
273 - * core role title to "Site Role".
271 + * core role title to "Site Role"
274 272 *
275 273 * @since 2.2.0 bbPress (r4338)
276 274 *
277 - * @param array $columns Users table columns.
275 + * @param array $columns Users table columns
278 276 * @return array $columns
279 277 */
280 278 public static function user_role_column( $columns = array() ) {
281 279
@@ -296,9 +294,9 @@
296 294 return array_merge( $result, array_slice( $columns, $role_pos ) );
297 295 }
298 296
299 297 /**
300 - * Return user's forums role for display in the WordPress Users list table.
298 + * Return user's forums role for display in the WordPress Users list table
301 299 *
302 300 * @since 2.2.0 bbPress (r4338)
303 301 *
304 302 * @param string $retval
@@ -304,9 +302,9 @@
304 302 * @param string $retval
305 303 * @param string $column_name
306 304 * @param int $user_id
307 305 *
308 - * @return string Displayable bbPress user role.
306 + * @return string Displayable bbPress user role
309 307 */
310 308 public static function user_role_row( $retval = '', $column_name = '', $user_id = 0 ) {
311 309
312 310 // User role column
@@ -327,12 +325,12 @@
327 325 return $retval;
328 326 }
329 327
330 328 /**
331 - * Filter the list of roles included in the WordPress site role list.
329 + * Filter the list of roles included in the WordPress site role list
332 330 *
333 331 * Ensures forum roles are only displayed under the Forum Role list in the
334 - * WordPress Users list table.
332 + * WordPress Users list table
335 333 *
336 334 * @since 2.6.0 bbPress (r6052)
337 335 *
338 336 * @return array $roles