[wp-trac] [WordPress Trac] #30188: Introduce utility functions to check constants

WordPress Trac noreply at wordpress.org
Mon Sep 22 11:13:50 UTC 2025


#30188: Introduce utility functions to check constants
-------------------------+------------------------
 Reporter:  rzen         |       Owner:  chriscct7
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Editor       |     Version:
 Severity:  normal       |  Resolution:  wontfix
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------------
Changes (by SirLouen):

 * status:  assigned => closed
 * focuses:  administration =>
 * component:  Posts, Post Types => Editor
 * milestone:  Awaiting Review =>
 * keywords:  has-patch dev-feedback needs-testing => has-patch
 * resolution:   => wontfix


Comment:

 As @nacin suggested 10 years ago, this is unnecessary, and you should not
 bail all of this contants always, specially nowadays with the Editor being
 the current standard

 For example, don't bail early in `save_post` because `DOING_AJAX` is true,
 the block editor can save via AJAX/REST and this might skip real saves.

 I'm closing this because it has not aged very well and using these
 constants are nowadays are pretty standard. Also the save logic in Editor
 has changed massively, and this was only relevant back in the days of the
 old Editor which is not bringing any traction regarding this topic anymore
 (as we can see, has not brought any additional conversation, for more than
 8 years)

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


More information about the wp-trac mailing list