Changeset 29344 for trunk/src/wp-includes/general-template.php
- Timestamp:
- 08/01/2014 06:39:22 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r29244 r29344 1726 1726 * @param string $d Optional. PHP date format defaults to the date_format option if not specified. 1727 1727 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. 1728 * @return string Date the current post was written.1728 * @return string|bool Date the current post was written. False on failure. 1729 1729 */ 1730 1730 function get_the_date( $d = '', $post = null ) { 1731 1731 $post = get_post( $post ); 1732 1733 if ( ! $post ) { 1734 return false; 1735 } 1732 1736 1733 1737 if ( '' == $d ) { … … 1840 1844 * to the value specified in the time_format option. Default empty. 1841 1845 * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. 1842 * @return string|int Formatted date string, or Unix timestamp.1846 * @return string|int|bool Formatted date string or Unix timestamp. False on failure. 1843 1847 */ 1844 1848 function get_the_time( $d = '', $post = null ) { 1845 1849 $post = get_post($post); 1850 1851 if ( ! $post ) { 1852 return false; 1853 } 1846 1854 1847 1855 if ( '' == $d ) … … 1874 1882 * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. 1875 1883 * @param bool $translate Whether to translate the time string. Default false. 1876 * @return string|int Formatted date string, or Unix timestamp.1884 * @return string|int|bool Formatted date string or Unix timestamp. False on failure. 1877 1885 */ 1878 1886 function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { 1879 1887 $post = get_post($post); 1888 1889 if ( ! $post ) { 1890 return false; 1891 } 1880 1892 1881 1893 if ( $gmt ) … … 1952 1964 * @since 2.0.0 1953 1965 * 1954 * @param string $d Optional, default is 'U'. Either 'G', 'U', or php date format. 1955 * @param bool $gmt Optional, default is false. Whether to return the gmt time. 1956 * @param int|object $post Optional, default is global post object. A post_id or post object 1957 * @param bool $translate Optional, default is false. Whether to translate the result 1958 * @return string Returns timestamp 1966 * @param string $d Optional. Format to use for retrieving the time the post 1967 * was modified. Either 'G', 'U', or php date format. Default 'U'. 1968 * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. 1969 * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. 1970 * @param bool $translate Whether to translate the time string. Default false. 1971 * @return string|int|bool Formatted date string or Unix timestamp. False on failure. 1959 1972 */ 1960 1973 function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { 1961 1974 $post = get_post($post); 1975 1976 if ( ! $post ) { 1977 return false; 1978 } 1962 1979 1963 1980 if ( $gmt )
Note: See TracChangeset
for help on using the changeset viewer.