Skip to:
Content

BuddyPress.org

Ticket #7374: 7374-2.patch

File 7374-2.patch, 866 bytes (added by wordpressrene, 9 years ago)

add second patch according to @boonebgorges comment

  • bp-activity-functions.php

     
    37683768function bp_activity_do_heartbeat() {
    37693769        $retval = false;
    37703770
    3771         if ( ! bp_is_activity_heartbeat_active() ) {
    3772                 return $retval;
     3771        if ( bp_is_activity_heartbeat_active() ) {
     3772                if ( bp_is_activity_directory() || bp_is_group_activity() ) {
     3773                        $retval = true;
     3774                }
    37733775        }
    37743776
    3775         if ( bp_is_activity_directory() || bp_is_group_activity() ) {
    3776                 $retval = true;
    3777         }
    3778 
    3779         return $retval;
     3777        /**
     3778         * Filters whether the heartbeat function in the activity stream should be active.
     3779         *
     3780         * @since 2.8
     3781         *
     3782         * @param bool $retval Whether or not the heartbeat function should be active.
     3783         */
     3784        return apply_filters( 'bp_activity_do_heartbeat', $retval );
    37803785}