Changeset 12016
- Timestamp:
- 04/30/2018 08:48:59 AM (8 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 3 edited
-
buddypress/activity/entry.php (modified) (1 diff)
-
includes/activity/template-tags.php (modified) (1 diff)
-
js/buddypress-activity.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress/activity/entry.php
r11899 r12016 11 11 bp_nouveau_activity_hook( 'before', 'entry' ); ?> 12 12 13 <li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>" data-bp-activity-id="<?php bp_activity_id(); ?>" >13 <li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>" data-bp-activity-id="<?php bp_activity_id(); ?>" data-bp-timestamp="<?php bp_nouveau_activity_timestamp(); ?>"> 14 14 15 15 <div class="activity-avatar item-avatar"> -
trunk/src/bp-templates/bp-nouveau/includes/activity/template-tags.php
r12008 r12016 180 180 do_action( 'bp_activity_entry_content' ); 181 181 } 182 183 /** 184 * Output the Activity timestamp into the bp-timestamp attribute. 185 * 186 * @since 3.0.0 187 */ 188 function 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 } 182 209 183 210 /** -
trunk/src/bp-templates/bp-nouveau/js/buddypress-activity.js
r12002 r12016 83 83 */ 84 84 heartbeatSend: function( event, data ) { 85 this.heartbeat_data.first_recorded = $( '#buddypress [data-bp-list] [data-bp-activity-id] time' ).first().data( 'bp-timestamp' ) || 0;85 this.heartbeat_data.first_recorded = $( '#buddypress [data-bp-list] [data-bp-activity-id]' ).first().data( 'bp-timestamp' ) || 0; 86 86 87 87 if ( 0 === this.heartbeat_data.last_recorded || this.heartbeat_data.first_recorded > this.heartbeat_data.last_recorded ) { … … 588 588 589 589 // reset vars to get newest activities when an activity is deleted 590 if ( ! activity_comment_id && activity_item. find( 'time' ).first().data( 'bp-timestamp' ) === parent.Activity.heartbeat_data.last_recorded ) {590 if ( ! activity_comment_id && activity_item.data( 'bp-timestamp' ) === parent.Activity.heartbeat_data.last_recorded ) { 591 591 parent.Activity.heartbeat_data.newest = ''; 592 592 parent.Activity.heartbeat_data.last_recorded = 0;
Note: See TracChangeset
for help on using the changeset viewer.