[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 15:32:44 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 hnla):

 Only issues I see here are...

 Ordinarily I get the notion of 'get' and 'echo' functions, however in this
 context where we are running code from a template  or site files level do
 we really need a get function, the web dev has direct access to the
 function and can do whatever they like with it, or are we concerned that a
 plugin can go grab the get function, but can't think why a plugin would
 need to grab a function of this nature which is only a simple link;
 regardless accepting a plugin might need to and adding a filter into the
 get function to be safer rather than sorry, the next thing I don't really
 get is...

 `__( 'Groups', buddypress ) . bp_get_group_create_button()`

 If this is done in the core function `directory_dummy_post()` what
 prevents, or how do we prevent the button being 'injected' into the
 heading tag again for new templates. The approach I outlined for the
 template functions meant that in bp-legacy functions.php we ran the
 function but using add_filter to force the old behaviour but in new
 templates we would use an add_action to push to a template file.

 I'm hoping I'm missing something obvious, I'm re-factoring along your get
 & echo functions as I do prefer the notion of templates directly running
 bp_group_create_button() (do_actions to my mind should be re-usuable
 points for passing  content/functions through to where a do_action
 'bp_group_create_button' limits the do_actions purpose)

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

More information about the buddypress-trac mailing list