Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/30/2018 08:48:59 AM (8 years ago)
Author:
imath
Message:

BP Nouveau: bring back Heartbeat Activities

r12002 introduced a regression in Heartbeat Activities since BP Nouveau was using the removed bp-timestamp data attribute. This data attribute is back and so is the auto-refreshing activities feature.

Fixes #7782

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/activity/template-tags.php

    r12008 r12016  
    180180        do_action( 'bp_activity_entry_content' );
    181181}
     182
     183/**
     184 * Output the Activity timestamp into the bp-timestamp attribute.
     185 *
     186 * @since 3.0.0
     187 */
     188function bp_nouveau_activity_timestamp() {
     189        echo esc_attr( bp_nouveau_get_activity_timestamp() );
     190}
     191
     192        /**
     193         * Get the Activity timestamp.
     194         *
     195         * @since 3.0.0
     196         *
     197         * @return integer The Activity timestamp.
     198         */
     199        function bp_nouveau_get_activity_timestamp() {
     200                /**
     201                 * Filter here to edit the activity timestamp.
     202                 *
     203                 * @since 3.0.0
     204                 *
     205                 * @param integer $value The Activity timestamp.
     206                 */
     207                return apply_filters( 'bp_nouveau_get_activity_timestamp', strtotime( bp_get_activity_date_recorded() ) );
     208        }
    182209
    183210/**
Note: See TracChangeset for help on using the changeset viewer.