[buddypress-trac] [BuddyPress Trac] #7126: [BP Nouveau Request] create functions to get the component's button args
buddypress-trac
noreply at wordpress.org
Thu Oct 19 14:45:20 UTC 2017
#7126: [BP Nouveau Request] create functions to get the component's button args
-------------------------+-----------------------
Reporter: imath | Owner: imath
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Core | Version: 1.2
Severity: normal | Resolution:
Keywords: |
-------------------------+-----------------------
Changes (by hnla):
* status: closed => reopened
Comment:
Re-opening this ticket.
The issue remains valid .
if we look at the bp-friends template tag & functions changes in patch
what we're attempting to do is separate the $args required for the friends
buttons from the bp_get_button() return in `bp_get_add_friend_button()`.
In Nouveau the buttons are built by fetching those args but this has the
unintended effect of running bp_get_button() not desired! so Nouveau hacks
a solution adding an empty array filtered to `bp_get_add_friend_button`
runs the function then unsets the filter, a tad ugly? Another consequence,
maybe an edge case however... run the Nouveau files as a standalone theme
or site and the late priority set on the filters fails and we get a
duplicate button generated.
It seems to make sense to have the friend button args and switch as a
separate function as the patch demonstrates, it's certainly more
flexible than as currently setup!
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7126#comment:11>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list