Skip to:
Content
Pages
Categories
Search
Top
Bottom

Filtering bbp_get_forum_class()


  • unisphere
    Member

    @unisphere

    Hi, I’ve been trying to append a class to bbp_get_forum_class by filtering it but I’m not sure if I’m doing it the right way since the result is not the expected.

    For demonstration purposes here’s the code a bit simplified:

    function unisphere_bbp_get_forum_class( $classes ) {

    $classes[] = 'appended-class';

    return $classes;

    }

    add_filter( 'bbp_get_forum_class', 'unisphere_bbp_get_forum_class' );

    The expected result would be something like:

    <tr id="bbp-forum-6" class="post-6 forum type-forum status-publish hentry odd appended-class">

    But instead it outputs this:

    <tr id="bbp-forum-6" class="post-6 forum type-forum status-publish hentry odd"Array>

    Anyone has any idea why this is happening? Is it a bug or am I doing something wrong?

    Cheers

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