Media: Call update_post_parent_caches function in WP_Media_List_Table class.

Call the `update_post_parent_caches` in `WP_Media_List_Table` class to prime parent caches in a single database request.

Props spacedmonkey, antpb, hellofromTonya, jeawhanlee, peterwilsoncc, alaca. 
Fixes #56036.

git-svn-id: https://develop.svn.wordpress.org/trunk@54098 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonny Harris
2022-09-08 09:35:32 +00:00
parent d119ff711d
commit b7421980bb

View File

@@ -111,6 +111,8 @@ class WP_Media_List_Table extends WP_List_Table {
'per_page' => $wp_query->query_vars['posts_per_page'],
)
);
update_post_parent_caches( $wp_query->posts );
}
/**