Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/20/2024 06:48:57 PM (14 months ago)
Author:
espellcaste
Message:

While pulling XProfile group fields objects from cache with the BP_XProfile_Group::get method,
avoid unnecessary queries for the cached bp_xprofile_get_signup_field_ids() function.

See #8976

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php

    r13494 r13797  
    347347        }
    348348
     349        $signup_fields_order = bp_xprofile_get_signup_field_ids();
     350
    349351        // Pull field objects from the cache.
    350352        $fields = array();
    351353        foreach ( $field_ids as $field_id ) {
    352             if ( true === $r['signup_fields_only'] && ! in_array( $field_id, bp_xprofile_get_signup_field_ids(), true ) ) {
     354            if ( true === $r['signup_fields_only'] && ! in_array( $field_id, $signup_fields_order, true ) ) {
    353355                continue;
    354356            }
Note: See TracChangeset for help on using the changeset viewer.