bbp_forum_class('clearfix') doesn't work
-
bbPress 2.4
WP 3.6.1
running on localhostI need to add a class to bb_forum_class and since 2.1 I thought that this should work:
<?php bbp_forum_class('clearfix'); ?>
But it’s not adding the class, can anyone tell me what I’m doing wrong please?
I think the relevant bit of core for this is:
function bbp_get_forum_class( $forum_id = 0, $classes = array() ) { $bbp = bbpress(); $forum_id = bbp_get_forum_id( $forum_id ); $count = isset( $bbp->forum_query->current_post ) ? $bbp->forum_query->current_post : 1; $classes = (array) $classes; // Get some classes $classes[] = 'loop-item-' . $count; $classes[] = ( (int) $count % 2 ) ? 'even' : 'odd'; $classes[] = bbp_is_forum_category( $forum_id ) ? 'status-category' : ''; $classes[] = bbp_get_forum_subforum_count( $forum_id ) ? 'bbp-has-subforums' : ''; $classes[] = bbp_get_forum_parent_id( $forum_id ) ? 'bbp-parent-forum-' . bbp_get_forum_parent_id( $forum_id ) : ''; $classes[] = 'bbp-forum-status-' . bbp_get_forum_status( $forum_id ); $classes[] = 'bbp-forum-visibility-' . bbp_get_forum_visibility( $forum_id ); // Ditch the empties $classes = array_filter( $classes ); $classes = get_post_class( $classes, $forum_id ); // Filter the results $classes = apply_filters( 'bbp_get_forum_class', $classes, $forum_id ); $retval = 'class="' . implode( ' ', $classes ) . '"'; return $retval; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.