Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#40845 closed defect (bug) (fixed)

Incomplete `get_the_modified_(date|time)` filter docs

Reported by: dlh's profile dlh Owned by: drewapicture's profile DrewAPicture
Milestone: 4.9 Priority: normal
Severity: normal Version: 4.6
Component: General Keywords: has-patch
Focuses: docs Cc:

Description

Both get_the_modified_date() and get_the_modified_time() set the $post variable to the return value of get_post(). As noted in code comments within each function, For backward compatibility, failures go through the filter below (see [37866]). However, the "official" filter docs don't specify that null is a possible type for $post. The attached patch would amend the filter docs to include that note.

Attachments (2)

40845.diff (1.8 KB) - added by dlh 8 years ago.
40845.2.diff (1.8 KB) - added by dlh 8 years ago.

Download all attachments as: .zip

Change History (5)

@dlh
8 years ago

@dlh
8 years ago

#1 @dlh
8 years ago

40845.2.diff also amends docs for $the_time to note the possible bool value.

#2 @DrewAPicture
7 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.9

@dlh Thanks buddy, looks good :-)

#3 @DrewAPicture
7 years ago

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

In 40946:

Docs: Clarify that the $post parameters for the get_the_modified_date and get_the_modified_time filters can also be of type null.

Props dlh.
Fixes #40845.

Note: See TracTickets for help on using tickets.