From ff3f4e888fa9e69b5baad55d1dccbe55f5dbb1c4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 5 Jun 2014 15:33:30 +0000 Subject: [PATCH] Add a note about return value in case of an expired transient to get_transient() and get_site_transient(). props ruud@joyo. fixes #28462. git-svn-id: https://develop.svn.wordpress.org/trunk@28676 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 4cc8c28fa0..1cf3e66c12 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -551,13 +551,13 @@ function delete_transient( $transient ) { /** * Get the value of a transient. * - * If the transient does not exist or does not have a value, then the return value - * will be false. + * If the transient does not exist, does not have a value, or has expired, + * then the return value will be false. * * @since 2.8.0 * - * @param string $transient Transient name. Expected to not be SQL-escaped - * @return mixed Value of transient + * @param string $transient Transient name. Expected to not be SQL-escaped. + * @return mixed Value of transient. */ function get_transient( $transient ) { @@ -1287,15 +1287,15 @@ function delete_site_transient( $transient ) { /** * Get the value of a site transient. * - * If the transient does not exist or does not have a value, then the return value - * will be false. + * If the transient does not exist, does not have a value, or has expired, + * then the return value will be false. * * @since 2.9.0 * * @see get_transient() * * @param string $transient Transient name. Expected to not be SQL-escaped. - * @return mixed Value of transient + * @return mixed Value of transient. */ function get_site_transient( $transient ) {