store->counts(); $ids = $this->candidates->missing( $this->post_types->enabled(), self::LIMIT ); $missing = 0; foreach ( $ids as $id ) { $post = get_post( $id ); if ( $post instanceof \WP_Post && $this->eligibility->is_eligible( $post ) ) { ++$missing; } } return array( 'fresh' => $counts['fresh'], 'stale' => $counts['stale'], 'missing' => $missing, 'capped' => count( $ids ) >= self::LIMIT, ); } }