Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Style Keymaster's posts

@_ck_

Participant

This would be fairly straightforward to do via a plugin.

Sam recently modified a filter for a post class based on my suggestion in 1.0

https://trac.bbpress.org/ticket/1091

https://trac.bbpress.org/changeset/2093

All you would have to do is hook the filter and examine the user for the post, then add a class based on role.

So the framework you need is something like this:

add_filter( 'post_del_class', 'post_class_by_role',10,2);
function post_class_by_role($classes, $post_id ) {
$post=bb_get_post($post_id);
// do stuff here, add class to $classes if necessary
return $classes;
}

This won’t work in 0.9 however, you would need a template modification instead.

Skip to toolbar