Skip to content

Commit defe6e0

Browse files
committed
Merge pull request #292 from Automattic/fix/unused-query
Remove unused query
2 parents e21258d + 7cf9091 commit defe6e0

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

class-post-public.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,12 +550,9 @@ public function the_posts( array $posts, WP_Query & $wp_query ) {
550550
if ( ! $subs_index )
551551
return $posts;
552552

553-
$subs_posts = get_posts( array( 'include' => array_values( $subs_index ), 'post_status' => 'publish' ) );
554-
// @FIXME: Check the above get_posts call results are cached somewhere… I think they are
555553
// @FIXME: Alternative approach: hook on save_post to save the current value to the translation, BUT content could get out of date – in post_content_filtered
556554
foreach ( $posts as & $post ) {
557555
// @TODO why does this only override the title/excerpt/content? Why not override the post object entirely?
558-
// @FIXME: I'm assuming this get_post call is cached, which it seems to be
559556
if( isset( $subs_index[ $post->ID ] ) ) {
560557
$default_post = get_post( $subs_index[ $post->ID ] );
561558
if ( empty( $post->post_title ) )

0 commit comments

Comments
 (0)