diff --git wp-includes/formatting.php wp-includes/formatting.php
index 919336d..45b5b77 100644
|
|
function sanitize_email( $email ) { |
2291 | 2291 | * @return string Human readable time difference. |
2292 | 2292 | */ |
2293 | 2293 | function human_time_diff( $from, $to = '' ) { |
2294 | | if ( empty( $to ) ) |
| 2294 | if ( empty( $to ) ) { |
2295 | 2295 | $to = time(); |
| 2296 | } |
2296 | 2297 | |
2297 | 2298 | $diff = (int) abs( $to - $from ); |
2298 | 2299 | |
… |
… |
function human_time_diff( $from, $to = '' ) { |
2329 | 2330 | $since = sprintf( _n( '%s year', '%s years', $years ), $years ); |
2330 | 2331 | } |
2331 | 2332 | |
2332 | | return $since; |
| 2333 | /** |
| 2334 | * Filter the human readable difference between two timestamps. |
| 2335 | * |
| 2336 | * @since x.x.x |
| 2337 | * |
| 2338 | * @param string $since The difference in human readable text. |
| 2339 | * @param string $diff The difference in seconds. |
| 2340 | * @param string $from Unix timestamp from which the difference begins. |
| 2341 | * @param string $to Unix timestamp to end the time difference. |
| 2342 | */ |
| 2343 | return apply_filters( 'human_time_diff', $since, $diff, $from, $to ); |
2333 | 2344 | } |
2334 | 2345 | |
2335 | 2346 | /** |