mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Clarify that get_the_date(), get_the_time(), get_post_time() and get_post_modified_time() should return false when get_post() is null.
Adds unit tests. Props GaryJ, SergeyBiryukov, tollmanz. Fixes #28310. git-svn-id: https://develop.svn.wordpress.org/trunk@29344 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -21,7 +21,7 @@ require( ABSPATH . WPINC . '/option.php' );
|
||||
* @param string $format Format of the date to return.
|
||||
* @param string $date Date string to convert.
|
||||
* @param bool $translate Whether the return date should be translated. Default true.
|
||||
* @return string|int Formatted date string, or Unix timestamp.
|
||||
* @return string|int|bool Formatted date string or Unix timestamp. False if $date is empty.
|
||||
*/
|
||||
function mysql2date( $format, $date, $translate = true ) {
|
||||
if ( empty( $date ) )
|
||||
|
||||
Reference in New Issue
Block a user