Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#12708 closed defect (bug) (fixed)

get_delete_post_link() doesn't check EMPTY_TRASH_DAYS

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

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 16 years ago.
get_delete_post_link.2.diff (4.2 KB ) - added by scribu 16 years ago.
deprecate $context arg

Download all attachments as: .zip

Change History (7)

#1 @scribu
16 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
16 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
16 years ago

  • Keywords needs-refresh added; has-patch removed

#4 @scribu
16 years ago

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

get_delete_post_link.2.diff:

  • deprecate $context arg
  • use add_query_arg()

@scribu
16 years ago

deprecate $context arg

#5 @nacin
16 years ago

  • Resolutionfixed
  • Status newclosed

(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.