[buddypress-trac] [BuddyPress Trac] #6570: Add UI for adding Profile Header Images for Users and Groups

buddypress-trac noreply at wordpress.org
Sun Sep 27 15:41:07 UTC 2015

#6570: Add UI for adding Profile Header Images for Users and Groups
 Reporter:  mercime                        |       Owner:
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  2.4
Component:  API                            |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  dev-feedback has-patch commit  |

Comment (by imath):

 I did some tests with specific cases :

 1- BP Default, or `add_theme_support( 'buddypress' )` themes
 It behaves like it should: meaning no support for the Cover image, so
 we're playing nice with these themes :)

 FYI: here is an example of how to get cover image for users using BP
 Default and i guess themes using `add_theme_support( 'buddypress' )` :

 2- A standalone BuddyPress theme using the Legacy template pack (e.g.:
 I had one trouble with this case. Swifter is using specific templates but
 is also using Theme compatibility. So the feature is on even if templates
 are not ready yet (Admin Bar & User nav / Group nav / Group creation steps
 < this last one is annoying) So i guess it's a good example of the
 problems some themes (Using custom templates and BP Legacy) will have to
 deal with.
 For themes like swifter, i've edited the check on the theme compat id to
 use `bp_get_theme_compat_id()`. So swifter should tell to BuddyPress it is
 the current theme compat id doing at least something like this:
 add_filter( 'bp_get_theme_compat_id', function( $theme_id = '' ) {
         return 'swifter';
 }, 10, 1 );

 If so, the cover image feature won't load because `'legacy' !==

 For other custom themes using the Legacy templates pack with some custom
 templates. The most annoying case is when the theme is overriding `src/bp-
 templates/bp-legacy/buddypress/groups/create.php`. In this case the last
 group creation step is "Cover Image" and the custom template is not
 containing the corresponding nonce field, so it's not possible to create a
 group :(

 Depending on the users need, if they wish to have time before implementing
 the feature, they can
 - deactivate the corresponding BuddyPress settings (easy)
 - use `add_filter( 'bp_is_groups_cover_image_active', '__return_false' )`
 and `add_filter( 'bp_is_profile_cover_image_active', '__return_false' )`

 Of course, by simply updating (or removing!) the overrided templates
 everything will work fine :)

 This last case is the illustration of what @jjj was saying a month ago:
 "''and no one else gets broken anything, other than maybe some themes that
 are already using theme compatibility out of the box''"

 I thought it was important that we were all aware of this potential edge
 case ;)

 So I've updated the patch to latest trunk and applied @DJPaul's suggestion
 about the message. See 07.patch (you can check it easily by using our test

 Now i'm going to split the patch into smaller parts and i will soon begin
 to commit them ;)

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

More information about the buddypress-trac mailing list