[wp-trac] [WordPress Trac] #27683: wp_insert_post_empty_content filter issues with auto-drafts and/or fix auto-draft duplicates
WordPress Trac
noreply at wordpress.org
Thu Jul 3 09:41:33 UTC 2025
#27683: wp_insert_post_empty_content filter issues with auto-drafts and/or fix
auto-draft duplicates
------------------------------------+----------------------
Reporter: hexalys | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version: 3.5.1
Severity: normal | Resolution: wontfix
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+----------------------
Changes (by callumbw95):
* status: new => closed
* resolution: => wontfix
Comment:
Hi all,
After reviewing the full history of the discussion, it's clear that the
initially proposed solution of changing the return value for the
`wp_insert_post_empty_content` filter introduces a significant backward-
compatibility issue. As noted by @dd32, many existing plugins will be
expecting a boolean return, and altering this to return a post ID would
cause unexpected behavior and break sites.
While the underlying issue of managing auto-draft creation is valid, the
consensus is that modifying this filter is not the correct approach. A
solution for preventing duplicate auto-drafts would need to be implemented
higher in the stack to avoid these conflicts.
Given the significant backward-compatibility concerns and the lack of a
viable alternative proposal within this ticket for many years, I am
closing this ticket as `wontfix`. However, please feel free to reopen this
ticket if you wish to discuss this further or propose a new, backward-
compatible patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27683#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list