WordPress.org

Make WordPress Core

Changes between Initial Version and Version 7 of Ticket #20177


Ignore:
Timestamp:
09/11/12 23:14:28 (3 years ago)
Author:
scribu
Comment:

Actually, update_post_caches() already does this if you pass $post_type = 'any' and that's the other proposed solution. Nevermind; patch looks good.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20177

    • Property Keywords has-patch added
    • Property Version changed from to 1.5
    • Property Milestone changed from Awaiting Review to 3.5
  • Ticket #20177 – Description

    initial v7  
    55Since pages don't have taxonomies (at least not in a default setup), we're simply wasting a query. But even if they ''did'' have, we wouldn't even be caching the right ones (unless of course pages were assigned the same taxes as posts). 
    66 
    7 I would say there's two options here; review {{{WP_Query::get_posts()}}} to ensure the local variable {{{$post_type}}} is set correctly, or simply pass the string {{{any}}} to {{{update_post_caches()}}} (which will then correctly determine the post type(s)) - thoughts? 
     7I would say there's two options here; review {{{WP_Query::get_posts()}}} to ensure the local variable {{{$post_type}}} is set correctly, or simply pass the string {{{'any'}}} to {{{update_post_caches()}}} (which will then correctly determine the post type(s)) - thoughts? 
    88 
    99