Opened 12 years ago
Closed 10 years ago
#2760 closed enhancement (fixed)
topics/forums/subforums/replies hentries (and links)... CSS classes should not be hardcoded
| Reported by: | grosbouff | Owned by: | johnjamesjacoby |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6 |
| Component: | API - Actions/Filters | Version: | trunk |
| Severity: | normal | Keywords: | |
| Cc: | gordie.lachance@… |
Description
Hi,
I posted yesterday this bug (https://bbpress.trac.wordpress.org/ticket/2759) but the problem is bigger than that.
I think that it is an absolute necessity (for creating bbPress plugins) that CSS classes for topics/forums/subforums/... entries and links are not hardcoded (eg. bbp-forum-title, bbp-topic-permalink, bbp-reply-permalink, bbp-reply-header, bbp-lead-topic, and others)
This is a real barrier for plugins creator.
Classes for those items should be set like in Wordpress, using the function post_class (http://codex.wordpress.org/Function_Reference/post_class) or a similar one.
We should be able to filter the classes set for topics / forums / subforums / replies, ...
Attachments (1)
Change History (4)
#1
@
12 years ago
- Milestone Awaiting Review
- Priority high → normal
- Resolution → worksforme
- Status new → closed
#2
@
10 years ago
- Cc added
- Milestone → 2.6
- Resolution worksforme
- Status closed → reopened
- Version → trunk
Hi @netweb, the classes still are hardcoded in some places, for example in function bbp_list_forums() :
<?php // Build this sub forums link $output .= $r['link_before'] . '<a href="' . esc_url( $permalink ) . '" class="bbp-forum-link">' . $title . $counts . '</a>' . $show_sep . $r['link_after'];
I made a patch for this one, it is attached to this ticket.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You can already use the following filters:
bbp_get_forum_class,bbp_get_topic_class&bbp_get_reply_classEach of them do mirror WordPress'
post_classfilter: https://codex.wordpress.org/Function_Reference/post_classe.g.
Related: #2759