Ticket #1972: meta-1972.2.patch
File meta-1972.2.patch, 2.5 KB (added by , 7 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin.php
33 33 */ 34 34 private function __construct() { 35 35 $this->performance = new Performance_Optimizations; 36 $this->users = new Users;37 36 $this->moderators = new Moderators; 38 37 $this->hooks = new Hooks; 39 38 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-users.php
1 <?php2 3 namespace WordPressdotorg\Forums;4 5 class Users {6 7 public function __construct() {8 add_filter( 'bbp_get_user_display_role', array( $this, 'display_role' ), 10, 2 );9 }10 11 /**12 * If the user has a custom title, use that instead of the forum role.13 *14 * @param string $role The user's forum role15 * @param int $user_id The user id16 * @return string The user's custom forum title, or their forum role17 */18 public function display_role( $role, $user_id ) {19 $title = get_user_option( 'title', $user_id );20 if ( ! empty( $title ) ) {21 return esc_html( $title );22 }23 24 return $role;25 }26 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/support-forums.php
Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-users.php ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property
15 15 16 16 // General includes. 17 17 include( dirname( __FILE__ ) . '/inc/class-plugin.php' ); 18 include( dirname( __FILE__ ) . '/inc/class-users.php' );19 18 include( dirname( __FILE__ ) . '/inc/class-moderators.php' ); 20 19 include( dirname( __FILE__ ) . '/inc/class-hooks.php' ); 21 20