Changeset 9824
- Timestamp:
- 04/30/2015 06:42:58 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r9819 r9824 2480 2480 2481 2481 /** 2482 * Output the date_recorded of the activity comment currently being displayed.2482 * Output the formatted date_recorded of the activity comment currently being displayed. 2483 2483 * 2484 2484 * @since BuddyPress (1.5.0) … … 2491 2491 2492 2492 /** 2493 * Return the formatted date_recorded for the activity comment currently being displayed. 2494 * 2495 * @since BuddyPress (1.5.0) 2496 * 2497 * @uses bp_core_time_since() 2498 * @uses apply_filters() To call the 'bp_activity_comment_date_recorded' hook 2499 * 2500 * @return string|bool $date_recorded Time since the activity was recorded, 2501 * in the form "%s ago". False on failure. 2502 */ 2503 function bp_get_activity_comment_date_recorded() { 2504 2505 /** 2506 * Filters the recorded date of the activity comment currently being displayed. 2507 * 2508 * @since BuddyPress (1.5.0) 2509 * 2510 * @param string|bool Date for the activity comment currently being displayed. 2511 */ 2512 return apply_filters( 'bp_activity_comment_date_recorded', bp_core_time_since( bp_get_activity_comment_date_recorded_raw() ) ); 2513 } 2514 2515 /** 2516 * Output the date_recorded of the activity comment currently being displayed. 2517 * 2518 * @since BuddyPress (2.3.0) 2519 * 2520 * @uses bp_get_activity_comment_date_recorded() 2521 */ 2522 function bp_activity_comment_date_recorded_raw() { 2523 echo bp_get_activity_comment_date_recorded_raw(); 2524 } 2525 2526 /** 2493 2527 * Return the date_recorded for the activity comment currently being displayed. 2494 2528 * 2495 * @since BuddyPress ( 1.5.0)2529 * @since BuddyPress (2.3.0) 2496 2530 * 2497 2531 * @global object $activities_template {@link BP_Activity_Template} … … 2502 2536 * in the form "%s ago". False on failure. 2503 2537 */ 2504 function bp_get_activity_comment_date_recorded () {2538 function bp_get_activity_comment_date_recorded_raw() { 2505 2539 global $activities_template; 2506 2540 2507 if ( empty( $activities_template->activity->current_comment->date_recorded ) ) { 2508 return false; 2509 } 2510 2511 $date_recorded = bp_core_time_since( $activities_template->activity->current_comment->date_recorded ); 2512 2513 /** 2514 * Filters the recorded date of the activity comment currently being displayed. 2515 * 2516 * @since BuddyPress (1.5.0) 2517 * 2518 * @param string|bool Date for the activity comment currently being displayed. 2519 */ 2520 return apply_filters( 'bp_activity_comment_date_recorded', $date_recorded ); 2541 /** 2542 * Filters the raw recorded date of the activity comment currently being displayed. 2543 * 2544 * @since BuddyPress (2.3.0) 2545 * 2546 * @param string|bool Raw date for the activity comment currently being displayed. 2547 */ 2548 return apply_filters( 'bp_activity_comment_date_recorded', $activities_template->activity->current_comment->date_recorded ); 2521 2549 } 2522 2550
Note: See TracChangeset
for help on using the changeset viewer.