Forums

Join
bbPress Support ForumsPluginsLooking for the right hook

Info

Tags

Looking for the right hook

  1. I am fleshing out my plugin Graphic-display-ranks and I'm looking for the right hook to use to do the following:

    I want to find out if a topic author is the Key Master or a moderator. Here is what I have so far --

    function get_special_rank () {
    global $special_rank, $use_special_rank, $bbdb;

    if ($use_special_rank==1)
    {$title_for_rank=<strong>I NEED THIS HOOK</strong>( get_post_author_id() );
    switch ($title_for_rank) {
    case "keymaster" :
    $special_rank=1;
    break;
    case "moderator" :
    $special_rank=2;
    break;
    default :
    $special_rank=0;
    }
    }
    else
    {
    $special_rank = 0;
    }
    return $special_rank;

    }

    Can anyone point me in the right directon?

  2. I don't think you want a hook, you want get_user_type($id)

  3. That's got it. Thanks. I'll be uploading the updated version in a few minutes.

  4. You must log in to post.