You don’t have to hack anything, it’s done via a filter.
ie.
add_filter('bb_topic_labels', 'bb_closed_label', 10);
add_filter('bb_topic_labels', 'bb_sticky_label', 20);
simply remove the filter via a plugin and replace it with your own routine.
remove_filter('bb_topic_labels', 'bb_closed_label');
add_filter('bb_topic_labels', 'my_closed_label');
function my_closed_label( $label ) {
global $topic;
if ( '0' === $topic->topic_open )
return sprintf(__('[Read Only] %s'), $label);
return $label;
}
Doy!
I put that in functions.php in my theme and it works. Thanks!
I need to thaw my brain out.
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…
remove_filter('bb_topic_labels', 'bb_sticky_label', 20);
worked.
Now it has images