diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index 01e7fa72d1..7625aa3fef 100644
|
a
|
b
|
function the_date_xml() { |
| 2454 | 2454 | } |
| 2455 | 2455 | |
| 2456 | 2456 | /** |
| 2457 | | * Display or Retrieve the date the current post was written (once per date) |
| | 2457 | * Display or Retrieve the date the current post was published (once per date) |
| 2458 | 2458 | * |
| 2459 | 2459 | * Will only output the date if the current post's date is different from the |
| 2460 | 2460 | * previous one output. |
| … |
… |
function the_date( $format = '', $before = '', $after = '', $echo = true ) { |
| 2506 | 2506 | } |
| 2507 | 2507 | |
| 2508 | 2508 | /** |
| 2509 | | * Retrieve the date on which the post was written. |
| | 2509 | * Retrieve the date on which the post was published. |
| 2510 | 2510 | * |
| 2511 | 2511 | * Unlike the_date() this function will always return the date. |
| 2512 | 2512 | * Modify output with the {@see 'get_the_date'} filter. |
| … |
… |
function the_date( $format = '', $before = '', $after = '', $echo = true ) { |
| 2515 | 2515 | * |
| 2516 | 2516 | * @param string $format Optional. PHP date format. Defaults to the 'date_format' option. |
| 2517 | 2517 | * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. |
| 2518 | | * @return string|false Date the current post was written. False on failure. |
| | 2518 | * @return string|false Date the current post was published. False on failure. |
| 2519 | 2519 | */ |
| 2520 | 2520 | function get_the_date( $format = '', $post = null ) { |
| 2521 | 2521 | $post = get_post( $post ); |
| … |
… |
function get_the_modified_date( $format = '', $post = null ) { |
| 2610 | 2610 | } |
| 2611 | 2611 | |
| 2612 | 2612 | /** |
| 2613 | | * Display the time at which the post was written. |
| | 2613 | * Display the time at which the post was published. |
| 2614 | 2614 | * |
| 2615 | 2615 | * @since 0.71 |
| 2616 | 2616 | * |
| 2617 | 2617 | * @param string $format Optional. Format to use for retrieving the time the post |
| 2618 | | * was written. Accepts 'G', 'U', or PHP date format. |
| | 2618 | * was published. Accepts 'G', 'U', or PHP date format. |
| 2619 | 2619 | * Defaults to the 'time_format' option. |
| 2620 | 2620 | */ |
| 2621 | 2621 | function the_time( $format = '' ) { |
| 2622 | 2622 | /** |
| 2623 | | * Filters the time a post was written for display. |
| | 2623 | * Filters the time a post was published for display. |
| 2624 | 2624 | * |
| 2625 | 2625 | * @since 0.71 |
| 2626 | 2626 | * |
| 2627 | 2627 | * @param string $get_the_time The formatted time. |
| 2628 | 2628 | * @param string $format Format to use for retrieving the time the post |
| 2629 | | * was written. Accepts 'G', 'U', or PHP date format. |
| | 2629 | * was published. Accepts 'G', 'U', or PHP date format. |
| 2630 | 2630 | */ |
| 2631 | 2631 | echo apply_filters( 'the_time', get_the_time( $format ), $format ); |
| 2632 | 2632 | } |
| 2633 | 2633 | |
| 2634 | 2634 | /** |
| 2635 | | * Retrieve the time at which the post was written. |
| | 2635 | * Retrieve the time at which the post was published. |
| 2636 | 2636 | * |
| 2637 | 2637 | * @since 1.5.0 |
| 2638 | 2638 | * |
| 2639 | 2639 | * @param string $format Optional. Format to use for retrieving the time the post |
| 2640 | | * was written. Accepts 'G', 'U', or PHP date format. |
| | 2640 | * was published. Accepts 'G', 'U', or PHP date format. |
| 2641 | 2641 | * Defaults to the 'time_format' option. |
| 2642 | 2642 | * @param int|WP_Post $post WP_Post object or ID. Default is global `$post` object. |
| 2643 | 2643 | * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. |
| … |
… |
function get_the_time( $format = '', $post = null ) { |
| 2655 | 2655 | $the_time = get_post_time( $_format, false, $post, true ); |
| 2656 | 2656 | |
| 2657 | 2657 | /** |
| 2658 | | * Filters the time a post was written. |
| | 2658 | * Filters the time a post was published. |
| 2659 | 2659 | * |
| 2660 | 2660 | * @since 1.5.0 |
| 2661 | 2661 | * |
| 2662 | 2662 | * @param string $the_time The formatted time. |
| 2663 | 2663 | * @param string $format Format to use for retrieving the time the post |
| 2664 | | * was written. Accepts 'G', 'U', or PHP date format. |
| | 2664 | * was published. Accepts 'G', 'U', or PHP date format. |
| 2665 | 2665 | * @param int|WP_Post $post WP_Post object or ID. |
| 2666 | 2666 | */ |
| 2667 | 2667 | return apply_filters( 'get_the_time', $the_time, $format, $post ); |
| 2668 | 2668 | } |
| 2669 | 2669 | |
| 2670 | 2670 | /** |
| 2671 | | * Retrieve the time at which the post was written. |
| | 2671 | * Retrieve the time at which the post was published. |
| 2672 | 2672 | * |
| 2673 | 2673 | * @since 2.0.0 |
| 2674 | 2674 | * |
| 2675 | 2675 | * @param string $format Optional. Format to use for retrieving the time the post |
| 2676 | | * was written. Accepts 'G', 'U', or PHP date format. Default 'U'. |
| | 2676 | * was published. Accepts 'G', 'U', or PHP date format. Default 'U'. |
| 2677 | 2677 | * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. |
| 2678 | 2678 | * @param int|WP_Post $post WP_Post object or ID. Default is global `$post` object. |
| 2679 | 2679 | * @param bool $translate Whether to translate the time string. Default false. |
| … |
… |
function get_post_time( $format = 'U', $gmt = false, $post = null, $translate = |
| 2712 | 2712 | } |
| 2713 | 2713 | |
| 2714 | 2714 | /** |
| 2715 | | * Filters the localized time a post was written. |
| | 2715 | * Filters the localized time a post was published. |
| 2716 | 2716 | * |
| 2717 | 2717 | * @since 2.6.0 |
| 2718 | 2718 | * |
| 2719 | 2719 | * @param string $time The formatted time. |
| 2720 | | * @param string $format Format to use for retrieving the time the post was written. |
| | 2720 | * @param string $format Format to use for retrieving the time the post was published. |
| 2721 | 2721 | * Accepts 'G', 'U', or PHP date format. Default 'U'. |
| 2722 | 2722 | * @param bool $gmt Whether to retrieve the GMT time. Default false. |
| 2723 | 2723 | */ |
| … |
… |
function get_post_modified_time( $format = 'U', $gmt = false, $post = null, $tra |
| 2914 | 2914 | } |
| 2915 | 2915 | |
| 2916 | 2916 | /** |
| 2917 | | * Display the weekday on which the post was written. |
| | 2917 | * Display the weekday on which the post was published. |
| 2918 | 2918 | * |
| 2919 | 2919 | * @since 0.71 |
| 2920 | 2920 | * |
| … |
… |
function the_weekday() { |
| 2932 | 2932 | $the_weekday = $wp_locale->get_weekday( get_post_time( 'w', false, $post ) ); |
| 2933 | 2933 | |
| 2934 | 2934 | /** |
| 2935 | | * Filters the weekday on which the post was written, for display. |
| | 2935 | * Filters the weekday on which the post was published, for display. |
| 2936 | 2936 | * |
| 2937 | 2937 | * @since 0.71 |
| 2938 | 2938 | * |
| … |
… |
function the_weekday() { |
| 2942 | 2942 | } |
| 2943 | 2943 | |
| 2944 | 2944 | /** |
| 2945 | | * Display the weekday on which the post was written. |
| | 2945 | * Display the weekday on which the post was published. |
| 2946 | 2946 | * |
| 2947 | 2947 | * Will only output the weekday if the current post's weekday is different from |
| 2948 | 2948 | * the previous one output. |
| … |
… |
function the_weekday_date( $before = '', $after = '' ) { |
| 2975 | 2975 | } |
| 2976 | 2976 | |
| 2977 | 2977 | /** |
| 2978 | | * Filters the localized date on which the post was written, for display. |
| | 2978 | * Filters the localized date on which the post was published, for display. |
| 2979 | 2979 | * |
| 2980 | 2980 | * @since 0.71 |
| 2981 | 2981 | * |
| 2982 | | * @param string $the_weekday_date The weekday on which the post was written. |
| | 2982 | * @param string $the_weekday_date The weekday on which the post was published. |
| 2983 | 2983 | * @param string $before The HTML to output before the date. |
| 2984 | 2984 | * @param string $after The HTML to output after the date. |
| 2985 | 2985 | */ |