[wp-trac] [WordPress Trac] #36738: No validation for $post_date_gmt parameter

WordPress Trac noreply at wordpress.org
Tue Sep 2 11:12:30 UTC 2025


#36738: No validation for $post_date_gmt parameter
-------------------------------------------------+-------------------------
 Reporter:  Latz                                 |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Posts, Post Types                    |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-test-info good-first-bug needs-  |     Focuses:
  patch                                          |
-------------------------------------------------+-------------------------
Changes (by SirLouen):

 * keywords:  needs-testing has-test-info good-first-bug => has-test-info
     good-first-bug needs-patch
 * milestone:   => Future Release


Comment:

 Hey @paulbonneau thanks for reporting

 I think I explained it wrongly. What I really meant is that most of the
 logic within `wp_resolve_post_date` is going to be using the same logic
 that we might need for a patch for this.

 We should keep the logic you comment for back compat, but at the same
 time, I think we should abstract part of the current logic within
 `wp_resolve_post_date` and use it to target both scenarios (`$post_date`
 and `$post_date_gmt`).

 In other words: Let's try to avoid repeating any line of code twice.

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


More information about the wp-trac mailing list