Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 4 years ago

#7999 closed enhancement (fixed)

Support 'user_ids' argument in 'bp_has_members()`

Reported by: mamaduka's profile Mamaduka Owned by: boonebgorges's profile boonebgorges
Milestone: 7.0.0 Priority: normal
Severity: normal Version: 1.7
Component: Members Keywords:
Cc:

Description

This task requires BP_Core_Members_Template::construct() refactoring to use array-style arguments. Patch is provided in #3797.

Changes will also affect following classes/functions:

  • BP_Core_Members_Template
  • bp_core_get_users()

Attachments (1)

7999.diff (4.8 KB) - added by Mamaduka 6 years ago.

Download all attachments as: .zip

Change History (8)

@Mamaduka
6 years ago

#1 @boonebgorges
6 years ago

  • Milestone changed from Awaiting Review to 4.0

This looks like a good and easy improvement.

#2 follow-up: @boonebgorges
6 years ago

  • Milestone changed from 4.0 to Up Next

Oh, I see now that we have to change the function signature of BP_Core_Members_Template first. This is more work that should be supported by tests. Let's do it next.

#3 in reply to: ↑ 2 @Mamaduka
6 years ago

Replying to boonebgorges:

Oh, I see now that we have to change the function signature of BP_Core_Members_Template first. This is more work that should be supported by tests. Let's do it next.

Thanks for Boone.

Should I add unit test for user_ids argument?

#4 @boonebgorges
6 years ago

Thanks, George! I'm more concerned about having tests for the changes in https://buddypress.trac.wordpress.org/attachment/ticket/3797/3797.core-members-template.2.diff. I see that you changed the way that the functions are used in the tests, which is a good start, but I'll want to have a closer look to make sure that we're properly converting deprecated arguments. This might mean one or two tests that pass the deprecated arguments (with @expectedDeprecated) that then check things like pagination, etc on the results.

#5 @imath
5 years ago

  • Milestone changed from Up Next to 7.0.0

#6 @boonebgorges
4 years ago

In 12692:

Convert BP_Core_Members_Template to accept array of arguments.

This changeset also eliminates the use of extract() in
BP_Core_Members_Template::__construct().

Props Mamaduka.

See #3797, #7999.

#7 @boonebgorges
4 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 12693:

Add user_ids parameter to bp_has_members() and related functions.

Props Mamaduka.

Fixes #7999.

Note: See TracTickets for help on using tickets.