[wp-trac] [WordPress Trac] #24572: Should be able to unlock a post outside of ajax handler

WordPress Trac noreply at wordpress.org
Tue Jul 22 10:45:13 UTC 2025


#24572: Should be able to unlock a post outside of ajax handler
--------------------------------------------+-----------------------------
 Reporter:  bbrooks                         |       Owner:  (none)
     Type:  enhancement                     |      Status:  new
 Priority:  normal                          |   Milestone:
Component:  Posts, Post Types               |     Version:
 Severity:  normal                          |  Resolution:
 Keywords:  needs-patch dev-feedback close  |     Focuses:  administration
--------------------------------------------+-----------------------------
Changes (by callumbw95):

 * keywords:  needs-patch dev-feedback => needs-patch dev-feedback close


Comment:

 Hi everyone,

 I have just taken a quick look into this now, and implementing a
 `wp_delete_post_lock()` function does make a lot of sense from an API
 perspective, as it would provide a symmetrical counterpart to
 `wp_set_post_lock()`. This would certainly be useful for developers
 building custom admin tooling or headless integrations.

 However, I am concerned around the potential risk to the user experience
 and the increased potential for data loss through adding this function.
 The current post-locking mechanism is intrinsically tied to the user's
 session in the editor, with the heartbeat acting as a "still editing"
 signal. The "Take Over" feature is a deliberate, user-initiated action
 that makes it clear someone else's work might be interrupted.

 Introducing a way to programmatically remove a lock from the backend could
 break this user-facing contract. A user could be actively typing in the
 editor, believing they hold the lock, while a background process silently
 removes it, only to discover this upon their next save attempt, which
 could result in their changes being unexpectedly overwritten.

 I think there is potential for more conversation here around this topic,
 but seeing as this ticket is so old, and the lack of feedback on this in
 the last decade, I am going to add the `close` tag. But do please feel
 free to continue this conversation further and remove the tag. 😃

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/24572#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list