Opened 7 years ago
Closed 7 years ago
#42175 closed defect (bug) (fixed)
Customize: Remove call to `wp_trash_post()`
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Customize | Keywords: | has-patch |
Focuses: | Cc: |
Description
WP_Customize_Manager::handle_changeset_trash_request()
includes a call to wp_trash_post()
, which was purposefully not called in _wp_customize_publish_changeset()
because it "will mutate the post_content and the post_name."
As discussed in Slack, the logic for trashing a changeset could be moved to a method in WP_Customize_Manager
that both functions can use: https://wordpress.slack.com/archives/C0381N237/p1507503461000055.
Note that it might make sense for this logic to one day be moved again to a dedicated WP_Customize_Changeset
class. The method in the attached patch is largely borrowed from the latest patch in #40527.
The patch also adds the 'pre_trash_post'
filter from [41638].
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
In 41824: