ap_post_attach_pre_fetch( array $ids )

Description #

Pre fetch and cache all question and answer attachments.

Parameters #

  • $ids
    array (Required) Post IDs.

Source #

File: includes/upload.php

function ap_post_attach_pre_fetch( $ids ) {
	if ( $ids && is_user_logged_in() ) {
		$args = array(
			'post_type' => 'attachment',
			'include'   => $ids,
		);

		$posts = get_posts( $args );// @codingStandardsIgnoreLine
		update_post_cache( $posts );
	}
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment