[buddypress-trac] [BuddyPress Trac] #6008: Remove HTML from post_title for groups

buddypress-trac noreply at wordpress.org
Fri Nov 14 13:30:45 UTC 2014


#6008: Remove HTML from post_title for groups
-------------------------------+------------------------------
 Reporter:  alexander.rohmann  |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  high               |   Milestone:  Awaiting Review
Component:  Groups             |     Version:  2.1
 Severity:  major              |  Resolution:
 Keywords:                     |
-------------------------------+------------------------------

Comment (by boonebgorges):

 Thanks, imath. I appreciate your point, but I still think that we'd be
 better off with a simple filter than with what we have now. If our filters
 looked like this:

 {{{
 function bp_groups_directory_page_title_filter( $title ) {
     if ( ! bp_is_directory() || ! bp_is_groups_component() ) {
         return $title;
     }

     return __( 'Groups Directory', 'buddypress' ) . '<a href="whatever">'
 . __( 'Create a group', 'buddypress' ) . '</a>';
 }
 add_filter( 'the_title', 'bp_groups_directory_page_title_filter' );
 }}}

 it would have the same effect as what we're doing now, but at least
 plugins would be able to use `remove_filter()` to remove our mods if they
 want to use `the_title()` for other stuff on the page.

 That being said, if others think that removing all HTML from the page
 title is the best way to go, I won't argue - I agree that it's the best
 choice in many ways, but we do have to figure out how to deal with
 concerns like
 [https://buddypress.trac.wordpress.org/ticket/6008#comment:11 DJPaul's].
 IMHO, adding yet another filter as in [attachment:6008.patch] is no better
 than the filter strategy I suggest above - theme authors will have to
 `remove_filter()` in one case, `add_filter()` in another.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6008#comment:15>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list