WordPress.org

Make WordPress Core

Changeset 35149


Ignore:
Timestamp:
10/13/2015 09:30:41 PM (4 years ago)
Author:
johnbillion
Message:

Improve the docs for the $expiration parameter in set_transient(), set_site_transient(), and associated filters.

See #32246

File:
1 edited

Legend:

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

    r35082 r35149  
    674674 * @param mixed  $value      Transient value. Must be serializable if non-scalar.
    675675 *                           Expected to not be SQL-escaped.
    676  * @param int    $expiration Optional. Time until expiration in seconds. Default 0.
     676 * @param int    $expiration Optional. Time until expiration in seconds. Default 0 (no expiration).
    677677 * @return bool False if value was not set and true if value was set.
    678678 */
     
    703703     * @since 4.4.0
    704704     *
    705      * @param int    $expiration Time until expiration in seconds.
     705     * @param int    $expiration Time until expiration in seconds. Use 0 for no expiration.
    706706     * @param mixed  $value      New value of transient.
    707707     * @param string $transient  Transient name.
     
    753753         *
    754754         * @param mixed  $value      Transient value.
    755          * @param int    $expiration Time until expiration in seconds. Default 0.
     755         * @param int    $expiration Time until expiration in seconds.
    756756         * @param string $transient  The name of the transient.
    757757         */
     
    766766         * @param string $transient  The name of the transient.
    767767         * @param mixed  $value      Transient value.
    768          * @param int    $expiration Time until expiration in seconds. Default 0.
     768         * @param int    $expiration Time until expiration in seconds.
    769769         */
    770770        do_action( 'setted_transient', $transient, $value, $expiration );
     
    16031603 *                           40 characters or fewer in length.
    16041604 * @param mixed  $value      Transient value. Expected to not be SQL-escaped.
    1605  * @param int    $expiration Optional. Time until expiration in seconds. Default 0.
     1605 * @param int    $expiration Optional. Time until expiration in seconds. Default 0 (no expiration).
    16061606 * @return bool False if value was not set and true if value was set.
    16071607 */
     
    16301630     * @since 4.4.0
    16311631     *
    1632      * @param int    $expiration Time until expiration in seconds.
     1632     * @param int    $expiration Time until expiration in seconds. Use 0 for no expiration.
    16331633     * @param mixed  $value      New value of site transient.
    16341634     * @param string $transient  Transient name.
     
    16621662         *
    16631663         * @param mixed  $value      Site transient value.
    1664          * @param int    $expiration Time until expiration in seconds. Default 0.
     1664         * @param int    $expiration Time until expiration in seconds.
    16651665         * @param string $transient  Transient name.
    16661666         */
     
    16741674         * @param string $transient  The name of the site transient.
    16751675         * @param mixed  $value      Site transient value.
    1676          * @param int    $expiration Time until expiration in seconds. Default 0.
     1676         * @param int    $expiration Time until expiration in seconds.
    16771677         */
    16781678        do_action( 'setted_site_transient', $transient, $value, $expiration );
Note: See TracChangeset for help on using the changeset viewer.