Ticket #29849: 29849-codebase-replacements.diff
File 29849-codebase-replacements.diff, 4.7 KB (added by , 10 years ago) |
---|
-
src/wp-admin/includes/class-wp-media-list-table.php
402 402 $m_time = $post->post_date; 403 403 $time = get_post_time( 'G', true, $post, false ); 404 404 if ( ( abs( $t_diff = time() - $time ) ) < DAY_IN_SECONDS ) { 405 if ( $t_diff < 0 ) { 406 $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) ); 407 } else { 408 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); 409 } 405 $h_time = wp_natural_time( $time ); 410 406 } else { 411 407 $h_time = mysql2date( __( 'Y/m/d' ), $m_time ); 412 408 } -
src/wp-admin/includes/class-wp-plugin-install-list-table.php
514 514 </div> 515 515 <div class="column-updated"> 516 516 <strong><?php _e( 'Last Updated:' ); ?></strong> <span title="<?php echo esc_attr( date_i18n( $date_format, $last_updated_timestamp ) ); ?>"> 517 <?php printf( __( '%s ago' ), human_time_diff( $last_updated_timestamp )); ?>517 <?php echo wp_natural_time( $last_updated_timestamp ); ?> 518 518 </span> 519 519 </div> 520 520 <div class="column-downloaded"> -
src/wp-admin/includes/class-wp-posts-list-table.php
792 792 $time_diff = time() - $time; 793 793 794 794 if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) { 795 $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ));795 $h_time = wp_natural_time( $time ); 796 796 } else { 797 797 $h_time = mysql2date( __( 'Y/m/d' ), $m_time ); 798 798 } -
src/wp-admin/includes/plugin-install.php
463 463 <li><strong><?php _e( 'Author:' ); ?></strong> <?php echo links_add_target( $api->author, '_blank' ); ?></li> 464 464 <?php } if ( ! empty( $api->last_updated ) ) { ?> 465 465 <li><strong><?php _e( 'Last Updated:' ); ?></strong> <span title="<?php echo esc_attr( date_i18n( $date_format, $last_updated_timestamp ) ); ?>"> 466 <?php printf( __( '%s ago' ), human_time_diff( $last_updated_timestamp )); ?>466 <?php echo wp_natural_time( $last_updated_timestamp ); ?> 467 467 </span></li> 468 468 <?php } if ( ! empty( $api->requires ) ) { ?> 469 469 <li><strong><?php _e( 'Requires WordPress Version:' ); ?></strong> <?php printf( __( '%s or higher' ), $api->requires ); ?></li> -
src/wp-admin/includes/revision.php
205 205 'author' => $authors[ $revision->post_author ], 206 206 'date' => date_i18n( __( 'M j, Y @ H:i' ), $modified ), 207 207 'dateShort' => date_i18n( _x( 'j M @ H:i', 'revision date short format' ), $modified ), 208 'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $now_gmt )),208 'timeAgo' => wp_natural_time( $modified_gmt, $now_gmt ), 209 209 'autosave' => $autosave, 210 210 'current' => $current, 211 211 'restoreUrl' => $can_restore ? $restore_link : false, … … 223 223 'author' => $authors[ $post->post_author ], 224 224 'date' => date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_modified ) ), 225 225 'dateShort' => date_i18n( _x( 'j M @ H:i', 'revision date short format' ), strtotime( $post->post_modified ) ), 226 'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( strtotime( $post->post_modified_gmt ), $now_gmt )),226 'timeAgo' => wp_natural_time( $post->post_modified_gmt, $now_gmt ), 227 227 'autosave' => false, 228 228 'current' => true, 229 229 'restoreUrl' => false, … … 375 375 <# }); #> 376 376 </div> 377 377 </script><?php 378 } 379 No newline at end of file 378 } -
src/wp-includes/post-template.php
1803 1803 _x( '%1$s %2$s, %3$s ago (%4$s)', 'post revision title' ), 1804 1804 $gravatar, 1805 1805 $author, 1806 human_time_diff( strtotime( $revision->post_modified ), current_time( 'timestamp' ) ),1806 wp_natural_time( $revision->post_modified, current_time( 'timestamp' ) ), 1807 1807 $date 1808 1808 ); 1809 1809