Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Can’t add additional tags to post

Tracked down the problem in Use Display Name. Basically, it’s a bit overzealous in replacing the user name with the display name throughout the code… including for a function that’s used to check for capabilities. Since the name doesn’t match, the capability check fails.

Quick partial fix: comment out the following line in display-name.php:

// add_filter( ‘get_user_name’, ‘bb_use_display_name’, 1, 2 );

The Display Name will now be used instead of the User Name in some places, but not in others.

A more complete fix:

1. In display-name.php, replace:

add_filter( ‘get_user_name’, ‘bb_use_display_name’, 1, 2 );

WITH

add_filter( ‘get_display_name’, ‘bb_use_display_name’, 1, 2 );

2. In template-functions.php, add the following function:

function get_display_name( $id = 0 ) {

$user = bb_get_user( bb_get_user_id( $id ) );

return apply_filters( ‘get_display_name’, $user->user_login, $user->ID );

}

3. In template-functions.php, find function bb_get_title(), replace the call to get_user_name() with get_display_name()

4. In template-functions.php, find function get_full_user_link(), replace both calls to get_user_name() with get_display_name()

5. In profile.php, replace the call to get_user_name() with get_display_name()

Enjoy :-)

— scott

Skip to toolbar