Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Get Profile Links

function bb_get_admin_link( $args = '' ) {
if ( !bb_current_user_can( 'moderate' ) )
return;
if ( $args && is_string($args) && false === strpos($args, '=') )
$args = array( 'text' => $args );

$defaults = array('text' => __('Admin'), 'before' => '', 'after' => '');
$args = wp_parse_args( $args, $defaults );
extract($args, EXTR_SKIP);

$uri = esc_attr( bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN) );

return apply_filters( 'bb_get_admin_link', $before . '<a href="' . $uri . '">' . $text . '</a>' . $after, $args );
}

So if you don’t mind bypassing the moderation ability check, just use

esc_attr( bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN) );

or

bb_get_uri('bb-admin/', null, BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_ADMIN);

depending if you’ll be escaping the URL later.

To keep the check, use if ( bb_current_user_can( 'moderate' ) )

Skip to toolbar