[buddypress-trac] [BuddyPress Trac] #7548: bp_button_class needs to know what $container value is to set correct $parent_element

buddypress-trac noreply at wordpress.org
Wed Jun 21 15:02:45 UTC 2017


#7548: bp_button_class needs to know what $container value is to set correct
$parent_element
-------------------------+-------------------------
 Reporter:  hnla         |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  2.9
Component:  Core         |    Version:
 Severity:  normal       |   Keywords:  needs-patch
-------------------------+-------------------------
 This follows on from #7532

 With Nouveau able to set args for button elements parent wrappers e.g ul,
 div etc, nouveau hardcoded the $parent_element for the button or anchor to
 one of 'li' if $container had a value of 'ul'

 The problem arises that third party plugins may filter directly to the
 button class in BP without any means to know  their anchor is rendering in
 a list construct and thus break that construct with an illegal element in
 the UL.

 Proposal & patch to follow as time allows is to pass into the Nouveau args
 array that $container value so that the BP class has it available then to
 run a similar check as in Nouveau to replace the 'div' wrapper with a 'li'
 one if that $container has a value of 'UL' this way we avoid issues such
 as the 'User Switcher' plugin has.

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


More information about the buddypress-trac mailing list