Ticket #2874: 2874.2.diff
| File 2874.2.diff, 1.9 KB (added by , 10 years ago) |
|---|
-
src/includes/admin/users.php
56 56 add_filter( 'manage_users_columns', array( $this, 'user_role_column' ) ); 57 57 add_filter( 'manage_users_custom_column', array( $this, 'user_role_row' ), 10, 3 ); 58 58 59 // Only list bbPress roles under Forum Role, remove from WordPress' > 4.4 Site Role list. 60 if ( bbp_get_major_wp_version() >= 4.4 ) { 61 add_filter( 'get_role_list', array( $this, 'user_role_list_filter' ), 10, 2 ); 62 } 63 59 64 // Process bulk role change 60 65 add_action( 'load-users.php', array( $this, 'user_role_bulk_change' ) ); 61 66 } … … 262 267 // Pass retval through 263 268 return $retval; 264 269 } 270 271 /** 272 * Filter the list of roles included in the WordPress site role list 273 * 274 * This ensures bbPress' roles are only displayed under the Forum Role list 275 * in the WordPRess USers list table 276 * 277 * @since 2.6.0 bbPress (rXXXX) 278 * 279 * @return array $roles 280 */ 281 public static function user_role_list_filter( $roles, $user ) { 282 283 // Get the users role 284 $user_role = bbp_get_user_role( $user->ID ); 285 286 if ( ! empty( $user_role ) ) { 287 unset( $roles[ $user_role ] ); 288 } 289 return $roles; 290 } 265 291 } 266 292 new BBP_Users_Admin(); 267 293 endif; // class exists -
src/includes/core/abstraction.php
128 128 // Filter & return 129 129 return apply_filters( 'bbp_pretty_urls', $retval ); 130 130 } 131 132 /** 133 * Parse the WordPress core version number 134 * 135 * @since 2.6.0 136 * 137 * @global string $wp_version 138 * 139 * @return string $wp_version 140 */ 141 function bbp_get_major_wp_version() { 142 global $wp_version; 143 144 return (float) $wp_version; 145 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)