Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12708 closed defect (bug) (fixed)

get_delete_post_link() doesn't check EMPTY_TRASH_DAYS

Reported by: scribu's profile scribu Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

get_delete_post_link() always generates a link for moving a post to the trash, even when trash is disabled.

Attachments (2)

get_delete_post_link.diff (3.8 KB) - added by scribu 15 years ago.
get_delete_post_link.2.diff (4.2 KB) - added by scribu 15 years ago.
deprecate $context arg

Download all attachments as: .zip

Change History (7)

#1 @scribu
15 years ago

  • Keywords commit added

get_delete_post_link.diff:

  • check EMPTY_POST_DAYS
  • add a $force_delete parameter
  • use in more places in the admin

#2 @nacin
15 years ago

  • Keywords commit removed

Looks fine to me. Removing commit as I'm noticing that the manual $context/&/& juggling is unnecessary, as wp_nonce_url replaces & with & anyway.

So, unless I'm missing something, I think we can thus deprecate $context and further simplify this.

#3 @scribu
15 years ago

  • Keywords needs-refresh added; has-patch removed

#4 @scribu
15 years ago

  • Keywords has-patch commit added; needs-refresh removed

get_delete_post_link.2.diff:

  • deprecate $context arg
  • use add_query_arg()

@scribu
15 years ago

deprecate $context arg

#5 @nacin
15 years ago

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

(In [14099]) Add $force_delete to get_delete_post_link(). Remove unnecessary argument. props scribu, fixes #12708

Note: See TracTickets for help on using tickets.