WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#25526 closed defect (bug) (fixed)

Deprecate format_to_post

Reported by: simonwheatley Owned by: johnbillion
Milestone: 3.9 Priority: normal
Severity: normal Version: 1.2
Component: Formatting Keywords: has-patch dev-feedback
Focuses: Cc:
PR Number:

Description

While documenting the hooks in formatting.php (#25518) I noticed format_to_post which is unused except for 25 or so plugins in the repo. The description is generic, and useless.

WAY back in the day it seems it was used to add slashes before stuff got put into the database.

After asking around, I think we should deprecate it.

Attachments (1)

25526.diff (1.7 KB) - added by simonwheatley 6 years ago.
Deprecates formt_to_post. Adds docs for hook within deprecated function.

Download all attachments as: .zip

Change History (8)

#1 @simonwheatley
6 years ago

(I checked, and format_to_post is not used in core.)

#2 @simonwheatley
6 years ago

  • Component changed from General to Formatting
  • Version set to 1.2

#3 @simonwheatley
6 years ago

Can't set the version low enough, should be 0.71, so went as low as I could. :)

@simonwheatley
6 years ago

Deprecates formt_to_post. Adds docs for hook within deprecated function.

#4 @simonwheatley
6 years ago

Added docs for hook within deprecated function. Add alternative suggestion.

#5 @SergeyBiryukov
6 years ago

  • Keywords 3.9-early added
  • Milestone changed from Awaiting Review to Future Release

#6 @nacin
6 years ago

  • Keywords 3.9-early removed
  • Milestone changed from Future Release to 3.9

I think it's safe to just kill the hook while we're at it. (Or not bother documenting it?)

I found the function definition from a ways back. Here's it being changed at one point: [1021]. Scary stuff, right there.

#7 @johnbillion
6 years ago

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

In 27424:

Deprecate format_to_post() and remove its filter. Fixes #25526. Props simonwheatley

Note: See TracTickets for help on using tickets.