WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#28462 closed defect (bug) (fixed)

Improved inline documentation for get_transient() in wp-includes/options.php.

Reported by: ruud@… Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Options, Meta APIs Keywords: has-patch dev-feedback
Focuses: docs Cc:
PR Number:

Description

I noticed that the inline documentation for get_transient() doesn't reflect the possibility that it's value is False if the transient is expired.

Since using transients is tightly coupled to expirations, I thought it makes sense to add that to the inline documentation.

Attachments (1)

get_transient.patch (717 bytes) - added by ruud@… 5 years ago.
Patch for inline documentation

Download all attachments as: .zip

Change History (4)

@ruud@…
5 years ago

Patch for inline documentation

#1 @ruud@…
5 years ago

  • Keywords has-patch dev-feedback added

#2 @SergeyBiryukov
5 years ago

  • Component changed from Text Changes to Options, Meta APIs
  • Milestone changed from Awaiting Review to 4.0

#3 @SergeyBiryukov
5 years ago

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

In 28676:

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

props ruud@joyo.
fixes #28462.

Note: See TracTickets for help on using tickets.