Skip to:
Content
Pages
Categories
Search
Top
Bottom

what is bb_topic_labels()?

  • @finalwebsites

    Participant

    Hello,

    just updated my forum to the latest version (0.831) and found this new function in several template files:

    bb_topic_labels();

    after uploading the file I can’t see what’s changed, what is this for a function?

    Olaf

Viewing 6 replies - 1 through 6 (of 6 total)
  • @fel64

    Member

    The best way to find out is to look in the files really.

    https://trac.bbpress.org/browser/trunk/bb-includes/template-functions.php?rev=1076#L758

    @finalwebsites

    Participant

    this what I did, I can’t see something related to the bbpress main files.

    Actually the value of the function is empty..

    @fel64

    Member

    Try using a grepping utility. After a while you’ll also got a feel for which functions are where (template functions are usually in bb-includes/template-functions.php).

    The value of the function is not necessarily empty. It provides a hook for plugins and gives stickies the css sticky class.

    @_ck_

    Participant

    In plain english it essentially replaces the need for things like “Sticky:” to be hard coded into templates. Long overdue but at least it got put in there finally.

    However when making templates for backwards compatibility, you’d have to detect if that function exists before relying on it.

    The only themes I’ve seen that uses it already outside of the built-in default is “K2 for bbPress” (and now my “FutureKind”).

    It allows tricks like I’ve done to replace “sticky” with a post-it-note-like yellow rectangle. But it also could be filtered via plugin to change it to a little graphic icon, etc. which was impossible before the function existed.

    @finalwebsites

    Participant

    Sure this “upgrade” is not for current functionality. To make this function clear it would be useful to have a working example in the default template ;)

    there are so many unused functions in the include map, why is this unused function included in the default template (makes no sense to me)

    @fel64, believe me I know the bbpress files maybe a little too much, hehe…

    @sambauers

    Participant
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar