Opened 11 years ago
Closed 10 years ago
#2557 closed defect (bug) (fixed)
Allow customized HTML elements in bbp_get_topic_author_role
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | Component - Users | Keywords: | has-patch |
Cc: |
Description
Previously the <div>
HTML element was hardcoded and you could only change the CSS class with bbp_parse_args
<?php bbp_topic_author_role( array( 'before' => '<p>', 'class' => 'bbp-author-role', 'after' => '</p>' ) ); ?>
The above would render as <p><div class="bbp-author-role">Keymaster</div></p>
Now before
defaults to <div class="bbp-author-role">
and after
defaults to </div>
Thus now:
<?php bbp_topic_author_role( array( 'before' => '<p>', 'after' => '</p>' ) ); ?>
Now the above renders as <p>Keymaster</p>
and brings bbp_get_topic_author_role
before/after functionality similar to other (majority) bbPress functions.
Attachments (1)
Change History (5)
This ticket was mentioned in IRC in #bbpress-dev by netweb. View the logs.
11 years ago
Note: See
TracTickets for help on using
tickets.
Just did something similar for
bbp_author_ip
in #2519, moving to 2.6