Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#28467 closed defect (bug) (fixed)

Improved inline docs for set_transient & set_site_transient in options.php

Reported by: edwin-at-studiojoyocom's profile Owned by: drewapicture's profile DrewAPicture
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Options, Meta APIs Keywords: has-patch dev-feedback
Focuses: docs Cc:

Description (last modified by SergeyBiryukov)

The maximal length for the string $transient is not defined in the inline documentation. This patch adds this for set_transient and set_site_transient.

In the Codex (#15058) there is already a discussion about this topic; however, that is about validation. And as this discussion is still ongoing, this addition to the inline documentation is helpful to the developers and users.

Attachments (3)

set_transient.patch (1.2 KB) - added by 10 years ago.
set_transient.2.patch (1.2 KB) - added by 10 years ago.
Changed 'should' to 'must'
set_transient.3.patch (1.7 KB) - added by DrewAPicture 10 years ago.

Download all attachments as: .zip

Change History (10)

10 years ago

  • Keywords has-patch dev-feedback added

#2 @SergeyBiryukov
10 years ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to 4.0

#3 @DrewAPicture
10 years ago

  • Keywords reporter-feedback added

Is the 45 character limit a suggestion or a requirement? If it's a requirement, we should use "must" rather than "should".

10 years ago

The maximal length is a requirement, as the transient name will fail if maximal length is exceeded. Thus, "should" must be changed to "must":

MUST: This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification. (see

Will attach newly corrected patch.

As an addition, the Codex ( and must also use the word "must", in stead of "should".
10 years ago

Changed 'should' to 'must'

10 years ago

  • Keywords reporter-feedback removed

#6 @DrewAPicture
10 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 28735:

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 for the original patch.
See #15058, #13310. Fixes #28467.

#7 @DrewAPicture
10 years ago

  • Type changed from enhancement to defect (bug)
Note: See TracTickets for help on using tickets.