Add a note about return value in case of an expired transient to get_transient() and get_site_transient().

props ruud@joyo.
fixes #28462.
Built from https://develop.svn.wordpress.org/trunk@28676


git-svn-id: http://core.svn.wordpress.org/trunk@28494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-06-05 15:34:14 +00:00
parent 5d89ee4b3b
commit c8a55d08e6

View File

@ -551,13 +551,13 @@ function delete_transient( $transient ) {
/** /**
* Get the value of a transient. * Get the value of a transient.
* *
* If the transient does not exist or does not have a value, then the return value * If the transient does not exist, does not have a value, or has expired,
* will be false. * then the return value will be false.
* *
* @since 2.8.0 * @since 2.8.0
* *
* @param string $transient Transient name. Expected to not be SQL-escaped * @param string $transient Transient name. Expected to not be SQL-escaped.
* @return mixed Value of transient * @return mixed Value of transient.
*/ */
function get_transient( $transient ) { function get_transient( $transient ) {
@ -1287,15 +1287,15 @@ function delete_site_transient( $transient ) {
/** /**
* Get the value of a site transient. * Get the value of a site transient.
* *
* If the transient does not exist or does not have a value, then the return value * If the transient does not exist, does not have a value, or has expired,
* will be false. * then the return value will be false.
* *
* @since 2.9.0 * @since 2.9.0
* *
* @see get_transient() * @see get_transient()
* *
* @param string $transient Transient name. Expected to not be SQL-escaped. * @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 ) { function get_site_transient( $transient ) {