[wp-trac] [WordPress Trac] #62658: Use WP_Query in wp_get_post_autosave

WordPress Trac noreply at wordpress.org
Mon Jan 27 23:05:40 UTC 2025


#62658: Use WP_Query in wp_get_post_autosave
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.8
Component:  Revisions                            |     Version:  2.6
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:
  tests commit                                   |  performance
-------------------------------------------------+-------------------------
Changes (by spacedmonkey):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59715" 59715]:
 {{{
 #!CommitTicketReference repository="" revision="59715"
 Revisions: Use WP_Query in wp_get_post_autosave.

 Replaced the raw SQL query in the `wp_get_post_autosave` function with a
 `WP_Query` call. This change improves code maintainability and replaces
 the raw SQL query with a cacheable query via `WP_Query`.

 Props narenin, swissspidy, mukesh27, spacedmonkey, im3dabasia1.
 Fixes #62658.
 }}}

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


More information about the wp-trac mailing list