[buddypress-trac] [BuddyPress Trac] #7529: Groups member loop missing bp_parse_args

buddypress-trac noreply at wordpress.org
Tue Oct 17 19:38:38 UTC 2017


#7529: Groups member loop missing bp_parse_args
--------------------------+--------------------
 Reporter:  modemlooper   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  3.0
Component:  Members       |     Version:  2.8.2
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by dcavins):

 I've added a patch that uses `bp_parse_args()` instead of
 `wp_parse_args()` in the groups component. I'm not sure that every
 instance needs a `bp_parse_args`, though. For instance, args are parsed in
 `groups_get_groups()`, then those args are passed to
 `BP_Groups_Group::get()` where they are parsed again. It seems like we
 should use one or the other, unless someone can come up with a use case
 where both would be needed. (And if we only use `bp_parse_args()` in one
 or the other, I'm assuming we'd add it to the "deep" function,
 `BP_Groups_Group::get()`, and add a note above the `wp_parse_args()` call
 in `groups_get_groups()`.)

 If we can come up with some general guidance for when we want to use
 `bp_parse_args()` generally, I'll refine this patch. Thanks!

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7529#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list