Changeset 11019
- Timestamp:
- 08/19/2016 06:18:07 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r11008 r11019 1443 1443 1444 1444 // Get current time. 1445 $current_time = bp_core_current_time( );1445 $current_time = bp_core_current_time( true, 'timestamp' ); 1446 1446 1447 1447 // Use this action to detect the very first activity for a given member. … … 1461 1461 1462 1462 // If it's been more than 5 minutes, record a newer last-activity time. 1463 if ( empty( $activity ) || ( strtotime( $current_time )>= strtotime( '+5 minutes', $activity ) ) ) {1463 if ( empty( $activity ) || ( $current_time >= strtotime( '+5 minutes', $activity ) ) ) { 1464 1464 bp_update_user_last_activity( $user_id, $current_time ); 1465 1465 } -
trunk/src/bp-groups/bp-groups-template.php
r11008 r11019 1118 1118 * @param object $group Group object. 1119 1119 */ 1120 return apply_filters( 'bp_get_group_date_created', bp_core_time_since( strtotime( $group->date_created )), $group );1120 return apply_filters( 'bp_get_group_date_created', bp_core_time_since( $group->date_created ), $group ); 1121 1121 } 1122 1122 … … 5435 5435 * @param string $value Formatted time since membership was requested. 5436 5436 */ 5437 echo apply_filters( 'bp_group_request_time_since_requested', sprintf( __( 'requested %s', 'buddypress' ), bp_core_time_since( strtotime( $requests_template->request->date_modified )) ) );5437 echo apply_filters( 'bp_group_request_time_since_requested', sprintf( __( 'requested %s', 'buddypress' ), bp_core_time_since( $requests_template->request->date_modified ) ) ); 5438 5438 } 5439 5439 -
trunk/src/bp-members/bp-members-template.php
r11011 r11019 611 611 612 612 // Calculate some times. 613 $current_time = strtotime( bp_core_current_time());613 $current_time = bp_core_current_time( true, 'timestamp' ); 614 614 $last_activity = strtotime( $members_template->member->last_activity ); 615 615 $still_online = strtotime( '+5 minutes', $last_activity ); -
trunk/src/bp-xprofile/bp-xprofile-activity.php
r10825 r11019 308 308 $throttle_period = apply_filters( 'bp_xprofile_updated_profile_activity_throttle_time', HOUR_IN_SECONDS * 2 ); 309 309 $then = strtotime( $existing['activities'][0]->date_recorded ); 310 $now = strtotime( bp_core_current_time());310 $now = bp_core_current_time( true, 'timestamp' ); 311 311 312 312 // Bail if throttled. -
trunk/tests/phpunit/testcases/core/functions.php
r10972 r11019 601 601 602 602 /** 603 * @group bp_core_time_since 604 */ 605 public function test_bp_core_time_since_mysql_and_unix_timestamp_return_same_value() { 606 $mysql_date = '2008-03-25 17:13:55'; 607 608 $ts_mysql = bp_core_time_since( $mysql_date ); 609 $ts_timestamp = bp_core_time_since( strtotime( $mysql_date ) ); 610 611 $this->assertSame( $ts_mysql, $ts_timestamp ); 612 } 613 614 /** 603 615 * @group bp_attachments 604 616 * @group bp_upload_dir
Note: See TracChangeset
for help on using the changeset viewer.