[buddypress-trac] [BuddyPress Trac] #5477: Allow bp_has_groups to return all groups

buddypress-trac noreply at wordpress.org
Wed Jul 23 14:50:59 UTC 2014


#5477: Allow bp_has_groups to return all groups
-----------------------------------------------------+------------------
 Reporter:  dcavins                                  |       Owner:
     Type:  enhancement                              |      Status:  new
 Priority:  normal                                   |   Milestone:  2.1
Component:  Groups                                   |     Version:
 Severity:  minor                                    |  Resolution:
 Keywords:  has-patch needs-unit-tests dev-feedback  |
-----------------------------------------------------+------------------

Comment (by boonebgorges):

 > -1 pagination doesn't scale

 Since we're not using -1 pagination in BP core, I say that this is a
 consequence that we leave up to those who are implementing (plugin devs,
 etc). `WP_Query` allows posts_per_page=-1, with the same performance
 implications. Yet I've used posts_per_page=-1 countless times in building
 tools for clients, etc. So I think it's a reasonable API enhancement.

 > this looks like the wrong place to be preventing the LIMIT logic being
 added to the query.

 It's not too dissimilar from what WP does (via the 'nopaging' bridge):
 https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
 includes/query.php#L2260
 https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
 includes/query.php#L2866

 I'd like to see a unit test, but otherwise this seems OK to me personally.

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


More information about the buddypress-trac mailing list