Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#31757 closed defect (bug) (fixed)

misleading phpdoc for wp_scheduled_delete

Reported by: ctalkington's profile ctalkington Owned by: drewapicture's profile DrewAPicture
Milestone: 4.2 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch
Focuses: docs Cc:

Description

In wp-includes/functions.php on line 4122, wp_scheduled_delete phpdoc mentions:

Permanently delete posts, pages, attachments, and comments which have been in the trash for EMPTY_TRASH_DAYS.

This is a bit misleading as it never says custom post types are effected by such but it specifically mentions various post types so it seems exclusive of custom ones.

Attachments (1)

31757.diff (506 bytes) - added by dkotter 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
10 years ago

  • Component changed from General to Posts, Post Types
  • Keywords needs-patch added

@dkotter
10 years ago

#2 @dkotter
10 years ago

  • Keywords has-patch added; needs-patch removed

Added a patch that adjusts the phpdoc to make it clear this function also deletes custom post types.

Note that in looking at this, investigated some of the other delete functions and most of them only mention posts and pages, so not sure if worth fixing all of those but just wanted to note the documentation on those is also lacking.

#3 @DrewAPicture
10 years ago

  • Milestone changed from Awaiting Review to 4.2
  • Owner set to DrewAPicture
  • Status changed from new to reviewing
  • Type changed from enhancement to defect (bug)

#4 @DrewAPicture
10 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 31891:

Clarify the DocBlock summary for wp_scheduled_delete() to mention that it includes posts of any type where the 'trash' status is used.

Props dkotter for the initial patch.
Fixes #31757.

Note: See TracTickets for help on using tickets.