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
This commit is contained in:
parent
60a49287f6
commit
ff3f4e888f
@ -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 ) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user