Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Customize Topic Labels

Okay, now it’s weird. It works perfect for bb_closed_label, but remove_filter('bb_topic_labels', 'bb_sticky_label'); does nothing.

What I tried was

remove_filter('bb_topic_labels', 'bb_sticky_label');
function my_sticky_label( $label ) {
global $topic;
if (is_front()) {
if ( '2' === $topic->topic_sticky ) {
return sprintf(__('<img src="/images/sticky.png" /> %s'), $label);
}
} else {
if ( '1' === $topic->topic_sticky || '2' === $topic->topic_sticky ) {
return sprintf(__('<img src="/images/sticky.png" /> %s'), $label);
}
}
return $label;
}
add_filter('bb_topic_labels', 'my_sticky_label');

When I do that I get [sticky] and then my image. Which is close…

Skip to toolbar