[buddypress-trac] [BuddyPress Trac] #6426: 'fields' => 'ids' for activity queries
buddypress-trac
noreply at wordpress.org
Tue Aug 18 19:57:48 UTC 2015
#6426: 'fields' => 'ids' for activity queries
----------------------------------+------------------
Reporter: boonebgorges | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.4
Component: Component - Activity | Version:
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------------+------------------
Comment (by boonebgorges):
> If we do not bypass pagination, I think we'll need to add back the
'has_more_items' marker, so developers know there might be more items.
Hm. The purpose of 'has_more_items' was (originally, at least) to support
our AJAX-powered "Load More" button. Anyone fetching only `ids` is surely
not using this interface. That being said, maybe we should standardize on
this format for all return values, as you suggest:
{{{
Array(
['activities'] => array(
[0] => // whatever activity format you asked for
)
['has_more_items'] => BOOL
)
}}}
> Had to add a bunch of isset checks everywhere to avoid notices
(particularly the activity action callbacks) since a dev might not be
fetching all fields.
Ugh, yeah, that's clunky, but I think it's the right thing to do.
This approach is looking good to me, but it'd be nice to hear from someone
else before applying it here and elsewhere. DJPaul, do you have thoughts
about it?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6426#comment:7>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list