[buddypress-trac] [BuddyPress Trac] #7226: Update BP_buttons class to accept new arg param for $element_type
buddypress-trac
noreply at wordpress.org
Thu Aug 25 08:44:30 UTC 2016
#7226: Update BP_buttons class to accept new arg param for $element_type
-------------------------+------------------
Reporter: hnla | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.7
Component: Core | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------
Comment (by hnla):
@r-a-y
looking at your code block suggestion above I'm not sure how that would be
implemented - I question not the fact it's undeniably better and cleaner
- just how quite that improves the readability / code structure of
BP_Button() I/we still need that logic to build the final element to
return which means those if/else blocks to construct elements, add tokens
etc ?
>BP_Button is starting to get hard to read.
I agree however I'm just extending what existed and to some extent
although slightly more complex also slightly easier to grasp, I thought,
regardless if it can be better written great but I hope we don't pass this
update over simply as we haven't!
As to what I'm attempting to accommodate I'm working with:
`/bp-templates/bp-nouveau/includes/classes.php (BP_Buttons_Group)
and:
`/bp-templates/bp-nouveau/includes/activity/template-tags.php
(bp_nouveau_get_activity_entry_buttons( $args ))
Manipulating the $buttons args being passed to the nouveau class which in
turn calls bp_get_button()
As found in the Nouveau template pack on bp github.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7226#comment:14>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list