Make WordPress Core


Ignore:
Timestamp:
06/11/2014 04:32:06 PM (11 years ago)
Author:
DrewAPicture
Message:

Improve inline documention for set_transient() and set_site_transient() to specify the 45- and 40-character limits for their respective transient name values.

Props edwin-at-studiojoyo.com for the original patch.
See #15058, #13310. Fixes #28467.

File:
1 edited

Legend:

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

    r28676 r28735  
    621621 * @since 2.8.0
    622622 *
    623  * @param string $transient Transient name. Expected to not be SQL-escaped.
    624  * @param mixed $value Transient value. Must be serializable if non-scalar. Expected to not be SQL-escaped.
    625  * @param int $expiration Time until expiration in seconds, default 0
     623 * @param string $transient  Transient name. Expected to not be SQL-escaped. Must be
     624 *                           45 characters or fewer in length.
     625 * @param mixed  $value      Transient value. Must be serializable if non-scalar.
     626 *                           Expected to not be SQL-escaped.
     627 * @param int    $expiration Optional. Time until expiration in seconds. Default 0.
    626628 * @return bool False if value was not set and true if value was set.
    627629 */
     
    13611363 * @see set_transient()
    13621364 *
    1363  * @param string $transient Transient name. Expected to not be SQL-escaped.
    1364  * @param mixed $value Transient value. Expected to not be SQL-escaped.
    1365  * @param int $expiration Time until expiration in seconds, default 0
     1365 * @param string $transient  Transient name. Expected to not be SQL-escaped. Must be
     1366 *                           40 characters or fewer in length.
     1367 * @param mixed  $value      Transient value. Expected to not be SQL-escaped.
     1368 * @param int    $expiration Optional. Time until expiration in seconds. Default 0.
    13661369 * @return bool False if value was not set and true if value was set.
    13671370 */
Note: See TracChangeset for help on using the changeset viewer.