Skip to:
Content

BuddyPress.org

Changeset 11300


Ignore:
Timestamp:
12/15/2016 06:40:21 PM (10 years ago)
Author:
boonebgorges
Message:

Activity: Filter the return value of bp_activity_do_heartbeat().

Props wordpressrene.
Fixes #7374.

File:
1 edited

Legend:

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

    r11280 r11300  
    37693769        $retval = false;
    37703770
    3771         if ( ! bp_is_activity_heartbeat_active() ) {
    3772                 return $retval;
    3773         }
    3774 
    3775         if ( bp_is_activity_directory() || bp_is_group_activity() ) {
     3771        if ( bp_is_activity_heartbeat_active() && ( bp_is_activity_directory() || bp_is_group_activity() ) ) {
    37763772                $retval = true;
    37773773        }
    37783774
    3779         return $retval;
    3780 }
     3775        /**
     3776         * Filters whether the heartbeat feature in the activity stream should be active.
     3777         *
     3778         * @since 2.8.0
     3779         *
     3780         * @param bool $retval Whether or not activity heartbeat is active.
     3781         */
     3782        return (bool) apply_filters( 'bp_activity_do_heartbeat', $retval );
     3783}
Note: See TracChangeset for help on using the changeset viewer.