WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 7 weeks 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:

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 7 months ago.
Deprecates formt_to_post. Adds docs for hook within deprecated function.

Download all attachments as: .zip

Change History (8)

comment:1 simonwheatley7 months ago

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

comment:2 simonwheatley7 months ago

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

comment:3 simonwheatley7 months ago

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

simonwheatley7 months ago

Deprecates formt_to_post. Adds docs for hook within deprecated function.

comment:4 simonwheatley7 months ago

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

comment:5 SergeyBiryukov5 months ago

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

comment:6 nacin3 months 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.

comment:7 johnbillion7 weeks 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.