diff --git src/wp-includes/general-template.php src/wp-includes/general-template.php
index f88a5f7..db2cdc0 100644
|
|
|
function the_date( $d = '', $before = '', $after = '', $echo = true ) {
|
| 1718 | 1718 | * |
| 1719 | 1719 | * @param string $d Optional. PHP date format defaults to the date_format option if not specified. |
| 1720 | 1720 | * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. |
| 1721 | | * @return string Date the current post was written. |
| | 1721 | * @return string Date the current post was written or empty string if post could not be determined. |
| 1722 | 1722 | */ |
| 1723 | 1723 | function get_the_date( $d = '', $post = null ) { |
| 1724 | 1724 | $post = get_post( $post ); |
| 1725 | 1725 | |
| | 1726 | if ( ! $post ) { |
| | 1727 | return ''; |
| | 1728 | } |
| | 1729 | |
| 1726 | 1730 | if ( '' == $d ) { |
| 1727 | 1731 | $the_date = mysql2date( get_option( 'date_format' ), $post->post_date ); |
| 1728 | 1732 | } else { |
| … |
… |
function the_time( $d = '' ) {
|
| 1832 | 1836 | * was written. Either 'G', 'U', or php date format defaults |
| 1833 | 1837 | * to the value specified in the time_format option. Default empty. |
| 1834 | 1838 | * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. |
| 1835 | | * @return string|int Formatted date string, or Unix timestamp. |
| | 1839 | * @return string|int Formatted date string, Unix timestamp or empty string if post |
| | 1840 | * could not be determined. |
| 1836 | 1841 | */ |
| 1837 | 1842 | function get_the_time( $d = '', $post = null ) { |
| 1838 | 1843 | $post = get_post($post); |
| 1839 | 1844 | |
| | 1845 | if ( ! $post ) { |
| | 1846 | return ''; |
| | 1847 | } |
| | 1848 | |
| 1840 | 1849 | if ( '' == $d ) |
| 1841 | 1850 | $the_time = get_post_time(get_option('time_format'), false, $post, true); |
| 1842 | 1851 | else |
| … |
… |
function get_the_time( $d = '', $post = null ) {
|
| 1866 | 1875 | * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. |
| 1867 | 1876 | * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. |
| 1868 | 1877 | * @param bool $translate Whether to translate the time string. Default false. |
| 1869 | | * @return string|int Formatted date string, or Unix timestamp. |
| | 1878 | * @return string|int Formatted date string, Unix timestamp or empty string if post |
| | 1879 | * could not be determined. |
| 1870 | 1880 | */ |
| 1871 | 1881 | function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { |
| 1872 | 1882 | $post = get_post($post); |
| 1873 | 1883 | |
| | 1884 | if ( ! $post ) { |
| | 1885 | return ''; |
| | 1886 | } |
| | 1887 | |
| 1874 | 1888 | if ( $gmt ) |
| 1875 | 1889 | $time = $post->post_date_gmt; |
| 1876 | 1890 | else |
| … |
… |
function get_the_modified_time($d = '') {
|
| 1948 | 1962 | * @param bool $gmt Optional, default is false. Whether to return the gmt time. |
| 1949 | 1963 | * @param int|object $post Optional, default is global post object. A post_id or post object |
| 1950 | 1964 | * @param bool $translate Optional, default is false. Whether to translate the result |
| 1951 | | * @return string Returns timestamp |
| | 1965 | * @return string Returns timestamp or empty string if post could not be determined. |
| 1952 | 1966 | */ |
| 1953 | 1967 | function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { |
| 1954 | 1968 | $post = get_post($post); |
| 1955 | 1969 | |
| | 1970 | if ( ! $post ) { |
| | 1971 | return ''; |
| | 1972 | } |
| | 1973 | |
| 1956 | 1974 | if ( $gmt ) |
| 1957 | 1975 | $time = $post->post_modified_gmt; |
| 1958 | 1976 | else |