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

buddypress-trac noreply at wordpress.org
Tue Sep 29 22:03:54 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):

 In [changeset:"10152"]:
 {{{
 #!CommitTicketReference repository="" revision="10152"
 Allow Administrators to disable/enable the Cover Image Feature from the
 BuddyPress settings (Administration screen)

 - Create two new options for targeted components (xProfile & Groups)
 - Generate two new setting fields into the components setting sections as
 soon as the feature is active. By default, the two new checkboxes are
 enabled.
 - Introduce two new functions to check if the Administrator disallowed
 cover image uploads for Users (`bp_disable_cover_image_uploads()`) and
 Groups (`bp_disable_group_cover_image_uploads()`).
 - Edit the `bp_is_active()` function to take in account the particularity
 of the xProfile component. See below for a detailled explanation.
 - Introduce a new conditional tag to check if the current page is the
 profile "change-cover-image" screen.

 The `bp_is_active()` function first checks into the "bp-active-components"
 database option to see if the component is active. In this option the
 xProfile component is keyed "xprofile". But the component global holding
 the extended BP_Component class is keyed "profile" and features are inside
 a property of this component global. So to be able to check if a feature
 attached to the xProfile component is active, we needed to edit this
 function changing the component key from "xprofile" to "profile". As a
 result, the xProfile filter to deactivate/activate the cover image is
 `bp_is_profile_cover_image_active`. For the Groups component, the filter
 is `bp_is_groups_cover_image_active`.

 Props mercime, r-a-y

 See #6570
 }}}

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


More information about the buddypress-trac mailing list