Make WordPress Core

Changeset 28676


Ignore:
Timestamp:
06/05/2014 03:33:30 PM (11 years ago)
Author:
SergeyBiryukov
Message:

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

props ruud@joyo.
fixes #28462.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r27815 r28676  
    552552 * Get the value of a transient.
    553553 *
    554  * If the transient does not exist or does not have a value, then the return value
    555  * will be false.
     554 * If the transient does not exist, does not have a value, or has expired,
     555 * then the return value will be false.
    556556 *
    557557 * @since 2.8.0
    558558 *
    559  * @param string $transient Transient name. Expected to not be SQL-escaped
    560  * @return mixed Value of transient
     559 * @param string $transient Transient name. Expected to not be SQL-escaped.
     560 * @return mixed Value of transient.
    561561 */
    562562function get_transient( $transient ) {
     
    12881288 * Get the value of a site transient.
    12891289 *
    1290  * If the transient does not exist or does not have a value, then the return value
    1291  * will be false.
     1290 * If the transient does not exist, does not have a value, or has expired,
     1291 * then the return value will be false.
    12921292 *
    12931293 * @since 2.9.0
     
    12961296 *
    12971297 * @param string $transient Transient name. Expected to not be SQL-escaped.
    1298  * @return mixed Value of transient
     1298 * @return mixed Value of transient.
    12991299 */
    13001300function get_site_transient( $transient ) {
Note: See TracChangeset for help on using the changeset viewer.