Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/27/2024 08:16:17 PM (2 years ago)
Author:
espellcaste
Message:

Core: Add cache_results flag to the BP_Optout::get getter.

When performing a request with cache_results, it stops the optout information retrieved from being added to the cache.

See #8552
Closes https://github.com/buddypress/buddypress/pull/344/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-functions.php

    r13983 r13991  
    48244824 */
    48254825function bp_add_optout( $args = array() ) {
    4826         $optout = new BP_Optout();
    4827         $r      = bp_parse_args(
    4828                 $args, array(
     4826        $r = bp_parse_args(
     4827                $args,
     4828                array(
    48294829                        'email_address' => '',
    48304830                        'user_id'       => 0,
     
    48394839                return false;
    48404840        }
     4841
     4842        $optout = new BP_Optout();
    48414843
    48424844        // Avoid creating duplicate opt-outs.
     
    48734875 */
    48744876function bp_get_optouts( $args = array() ) {
    4875         $optout_class = new BP_Optout();
    4876         return $optout_class::get( $args );
     4877        return BP_Optout::get( $args );
    48774878}
    48784879
Note: See TracChangeset for help on using the changeset viewer.