[buddypress-trac] [BuddyPress Trac] #8378: Calls to `xprofile_get_field()` can result in unnecessary database queries
buddypress-trac
noreply at wordpress.org
Wed Oct 21 21:50:07 UTC 2020
#8378: Calls to `xprofile_get_field()` can result in unnecessary database queries
------------------------------+------------------------------
Reporter: boonebgorges | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Extended Profile | Version:
Severity: normal | Resolution:
Keywords: |
------------------------------+------------------------------
Comment (by boonebgorges):
[attachment:"8378.diff"] proposes changes to the way that
`xprofile_get_field()` is called throughout BP. Note that I have changed
all but one calls to `xprofile_get_field()`. The only one I didn't change
is here https://buddypress.trac.wordpress.org/browser/tags/6.3.0/src/bp-
xprofile/bp-xprofile-functions.php?marks=415#L403. I only excluded this
one because the filters may expect the data to be populated.
But I think that this patch shows how the current behavior of
`xprofile_get_field()` is a little crazy. IMHO we could safely switch the
default value of `$get_data` to `false`. It's technically possible for
this to break functionality for someone, somewhere, but I would be very
surprised if this were the case.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8378#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list