[buddypress-trac] [BuddyPress Trac] #5958: Add object parameter to bp_core_fetch_avatar_no_grav
buddypress-trac
noreply at wordpress.org
Thu Oct 23 21:25:46 UTC 2014
#5958: Add object parameter to bp_core_fetch_avatar_no_grav
-------------------------+------------------------------
Reporter: dcavins | Owner:
Type: enhancement | Status: new
Priority: low | Milestone: Awaiting Review
Component: Avatars | Version: 2.1
Severity: minor | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by boonebgorges):
How about if we pass all the args?
`apply_filters( 'bp_core_fetch_avatar_no_grav', $no_grav, $params )`
This would be much more flexible, and seems much better to me.
The problem with this is that we `extract()` these params near the top of
the function, and do some mods on the extracted values before they get
passed to the filter. So to make this work, we'd probably want to do the
following: (a) Stop extracting; (b) all the modifications that take place
to the variables should happen to the $param values instead; (c) pass the
function $args to the filter in addition to the $params.
What do you think? Can you write this patch? :)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5958#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list