[buddypress-trac] [BuddyPress Trac] #5144: Don't set 'Create a Group' button as part of the title

buddypress-trac noreply at wordpress.org
Thu Feb 20 18:33:26 UTC 2014


#5144: Don't set 'Create a Group' button as part of the title
--------------------------+------------------
 Reporter:  rogercoathup  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.0
Component:  Theme         |     Version:  1.7
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by boonebgorges):

 > what prevents, or how do we prevent the button being 'injected' into the
 heading tag again for new templates

 You're right, my mistake.

 > in this context where we are running code from a template or site files
 level do we really need a get function

 Yes. If you use `apply_filters()`, then you have to return a value from
 your callback. And in order to append a button to that value, you have to
 have a _get_ function - an echo function won't work.

 See 5144.02.patch for my idea of how this could work. It uses your basic
 idea, but rearranges the way that filters are laid out so that they make a
 bit more sense (IMO). I like this technique better than r-a-y's original
 suggestion that we have a one-off filter for the purpose.

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


More information about the buddypress-trac mailing list