Skip to:
Content
Pages
Categories
Search
Top
Bottom

display reply author role


  • Lyelle
    Participant

    @lyelle

    Hi,

    im using worpdress 3.2.1 de_DE with bbpress plugin 2.0.

    I found a way to display the reply author’s role below its avatar/name url link.

    i’m using the following funtions:

    function get_the_author_role() {

    global $wpdb, $wp_roles, $authordata;

    if ( !isset($wp_roles) )

    $wp_roles = new WP_Roles();

    foreach($wp_roles->role_names as $role => $Role) {

    $caps = $wpdb->prefix . ‘capabilities’;

    if (array_key_exists($role, $authordata->$caps))

    return $Role;

    }

    }

    function the_author_role() {

    echo get_the_author_role();

    }

    My problem is, that the translation takes no effect here.

    Anyone with a workaround?

  • You must be logged in to reply to this topic.
Skip to toolbar