[buddypress-trac] [BuddyPress Trac] #6060: Display and filter by member type on Dashboard > Users
buddypress-trac
noreply at wordpress.org
Wed Sep 7 21:39:50 UTC 2016
#6060: Display and filter by member type on Dashboard > Users
--------------------------------------+-----------------------
Reporter: boonebgorges | Owner: slaFFik
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 2.7
Component: Members | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch |
--------------------------------------+-----------------------
Comment (by dcavins):
I've gone through this patch again, switching the calls to
`buddypress()->types` to use the member types fetching functions. I also
changed some function names to be more descriptive and filled out the
descriptions a bit more. There are two `@TODO`s marked that I'd especially
like feedback on.
• What's the best way to find all the users of a particular type? The code
currently uses `get_objects_in_term()` but maybe doing a `BP_User_Query`
would be better?
• The general WP function `translate_user_role()` is used on the member
type name at output, but I'm not sure it will have an effect.
My note from above is still an open question:
> The function users_type_change_to() relies on a passed parameter $which
to know whether the control is above or below the table. This parameter
wasn't passed to the action hook until WP 4.6, so in 4.5 and earlier, the
upper dropdown's input never works (it has the same name as the lower, so
it's overwritten in the $_REQUEST). Is there anything we can do to make
this work in 4.5 and earlier? Short of a global variable, I'm not sure how
to output the control only once in earlier versions.
Thanks for your feedback!
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6060#comment:16>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list