[buddypress-trac] [BuddyPress Trac] #8498: Suggestion for unsettling some attributes in BP_Button instead of all other places

buddypress-trac noreply at wordpress.org
Tue Jun 29 18:47:51 UTC 2021


#8498: Suggestion for unsettling some attributes in BP_Button instead of all other
places
-------------------------+-----------------------------
 Reporter:  sbrajesh     |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  low          |  Milestone:  Awaiting Review
Component:  Core         |    Version:  8.0.0
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 Hi,
 At the moment, while adding a button code, we are using  various
 conditions to detect if the button element is 'button' then we set 'data-
 bp-nonce' in 'button_attr' array otherwise we set the href attribute.

 Instead of setting it conditionally at the time we are registering the
 buttons(It is being repeated at many places), a better solution will be
 add both of these attribute while registering button and then checking if
 the button element is 'button' and reset the 'href' in the BP_Button
 class.

 That will save too many conditions for core as well as 3rd party
 developers. The 'data-bp-nonce' is a harmless attribute for anchor
 element, so no need to do anything about that.

 I am proposing a patch for it, Please let me know if it is feasible to
 have it in the core.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8498>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list