Changeset 6502
- Timestamp:
- 06/08/2017 04:13:07 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/users.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/users.php
r6498 r6502 58 58 add_action( 'restrict_manage_users', array( __CLASS__, 'user_role_bulk_dropdown' ) ); 59 59 } else { 60 add_action( 'restrict_manage_users', array( $this, 'user_role_bulk_dropdown' ) );61 } 62 add_filter( 'manage_users_columns', array( $this, 'user_role_column' ) );60 add_action( 'restrict_manage_users', array( $this, 'user_role_bulk_dropdown' ), 10, 1 ); 61 } 62 add_filter( 'manage_users_columns', array( $this, 'user_role_column' ), 10, 1 ); 63 63 add_filter( 'manage_users_custom_column', array( $this, 'user_role_row' ), 10, 3 ); 64 64 … … 68 68 } 69 69 70 // Process bulk role change 71 add_action( 'load-users.php', array( $this, 'user_role_bulk_change' ) ); 70 // User List Table 71 add_action( 'load-users.php', array( $this, 'user_role_bulk_change' ), 10, 1 ); 72 add_action( 'user_row_actions', array( $this, 'user_row_actions' ), 10, 2 ); 72 73 } 73 74 … … 251 252 252 253 /** 254 * Add a "View" link for each user 255 * 256 * @since 2.6.0 bbPress (r6502) 257 * 258 * @param array $actions 259 * @param WP_User $user 260 * 261 * @return array Actions with 'view' link added to them 262 */ 263 public function user_row_actions( $actions = array(), $user = false ) { 264 265 // Reverse 266 $actions = array_reverse( $actions ); 267 268 // Add the view action link 269 $actions['view'] = '<a href="' . esc_url( bbp_get_user_profile_url( $user->ID ) ) . '" class="bbp-user-profile-link">' . esc_html__( 'View', 'bbpress' ) . '</a>'; 270 271 // Re-reverse 272 return array_reverse( $actions ); 273 } 274 275 /** 253 276 * Add Forum Role column to the WordPress Users table, and change the 254 277 * core role title to "Site Role"
Note: See TracChangeset
for help on using the changeset viewer.