Skip to:
Content
Pages
Categories
Search
Top
Bottom

No filter for bbp_current_user_can_publish_topics() ?


  • Michael
    Participant

    @michaelhpdx

    Hi — I’m using v2.2.2 and hooking into a few of the bbp_current_user_* permissions checks in template-tags.php, and I noticed what I think may be a bug. Or maybe it’s a feature. ;-)

    The function bbp_current_user_can_publish_forums() applies a filter of ‘bbp_current_user_can_publish_forums’ on the last line of the function.

    I noticed that function bbp_current_user_can_publish_topics() applies the same filter of ‘bbp_current_user_can_publish_forums’ — is that what is intended?

    All of the other bbp_current_user_can_* functions have their own respective filters, so  bbp_current_user_can_publish_topics() looks like the odd man out.  Shouldn’t the last line in the function look like:

    // Allow access to be filtered
    return (bool) apply_filters( 'bbp_current_user_can_publish_topics', $retval );

    Michael

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.