bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Looking for the right hook

(3 posts)
  • Started 1 year ago by actorjiml
  • Latest reply from actorjiml
  • This topic is not a support question

No tags yet.

  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?

    Posted 1 year ago #
  2. I don't think you want a hook, you want get_user_type($id)

    Posted 1 year ago #
  3. That's got it. Thanks. I'll be uploading the updated version in a few minutes.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.