Make WordPress Core

Opened 13 years ago

Closed 8 years ago

Last modified 8 years ago

#18067 closed enhancement (duplicate)

update_post_thumbnail_cache - accept WP_Query instance

Reported by: thedeadmedic's profile TheDeadMedic Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.2
Component: Post Thumbnails Keywords:
Focuses: Cc:


Following what scribu said in another ticket;

...What would be nice would be to allow update_thumbnail_cache() to be used for custom loops too.

I'm thinking of adding an optional $_wp_query parameter. Then, knowledgeable developers could call it before rolling their custom loop.

I agree - it would be dead handy to be able to just call update_post_thumbnail_cache( $my_query ) - see revision.

Attachments (1)

post-thumbnail-template.php.diff (944 bytes) - added by TheDeadMedic 13 years ago.

Download all attachments as: .zip

Change History (6)

#1 @chriscct7
10 years ago

  • Keywords needs-refresh added; has-patch removed

#2 @chriscct7
8 years ago

  • Keywords dev-feedback added

#3 @flixos90
8 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

This was fixed a while ago, in 20646, so it's possible to pass a custom WP_Query object as parameter to the function.

Let's continue any remaining discussion in #19949.

#4 @flixos90
8 years ago

  • Keywords needs-refresh dev-feedback removed

#5 @netweb
8 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.