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

buddypress-trac noreply at wordpress.org
Sat Nov 15 22:54:07 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 imath):

 Replying to [comment:24 boonebgorges]:

 Thanks a lot for your feedback :)

 > I would like for the other leads to weigh in, so let's make a note to
 talk about it during the next dev chat.

 Yes, i agree.

 > * It would probably be better to make sure that
 `bp_legacy_theme_group_create_button()` etc continue to echo the same
 value as before. Changing the echoed value so that it's wrapped in an
 `<li>` will wreak havoc for others using the button. Maybe a different
 function name altogether?

 Ok, i guess it's something i haven't thought of. You mean that even if we
 would no more add the link in the title, someone could have created a
 specific template for the site's directory with let's say :
 {{{
 <h1><?php echo apply_filters( 'bp_blogs_directory_header', __( 'Sites',
 'buddypress' ) );?></h1>
 }}}

 or

 {{{
 <h1><?php echo bp_legacy_theme_blog_create_button( __( 'Sites',
 'buddypress' )  );?></h1>
 }}}

 I only thought of themes that could have created a template pack using the
 filters :
 {{{
 add_filter( 'bp_groups_directory_header',
 'bp_specific_theme_group_create_button' );
 add_filter( 'bp_blogs_directory_header',
 'bp_specific_theme_blog_create_button' );
 }}}

 Because in this case the two functions
 {{{bp_groups_backcompat_create_group()}}} and
 {{{bp_blogs_backcompat_create_blog()}}} would move the 'create' button in
 the item navs

 > * How about making this change directly in the template instead of using
 the bp_groups_directory_group_filter hook? What are the considerations on
 each side?

 Why not. But then the two functions i was talking about would not be
 necessary anymore i think. So we would need to be sure no template packs
 are using the filters, because it would not be possible to do backcompat i
 think.
 I also thought at the eventuality someone created a specific template in
 his theme with the 2.1 markup. In this case, if we directly insert the
 change in the template, i think the user won't have any link to create the
 group or blog as soon as the user upgrade to 2.2.

 > * You changed the section `// Title based on ability to create blogs `
 but I don't get the change - why would the page title ever be 'Create a
 Site' on the Sites directory?

 Yes i was surprised too at the beginning :) But It's the page used to
 display the form to create the new site. So it's not the directory dummy
 post but the {{{BP_Blogs_Theme_Compat->create_dummy_post()}}} one.

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


More information about the buddypress-trac mailing list