post_rows

Definition:
function post_rows( $posts = array() {}

Parameters

  • unknown_type $posts

Source code

function post_rows( $posts = array() ) {

	global $wp_query, $post, $mode;



	add_filter('the_title','esc_html');



	// Create array of post IDs.

	$post_ids = array();



	if ( empty($posts) )

		$posts = &$wp_query->posts;



	foreach ( $posts as $a_post )

		$post_ids[] = $a_post->ID;



	$comment_pending_count = get_pending_comments_num($post_ids);



	foreach ( $posts as $post ) {

		if ( empty($comment_pending_count[$post->ID]) )

			$comment_pending_count[$post->ID] = 0;



		_post_row($post, $comment_pending_count[$post->ID], $mode);

	}

}

2583

No comments yet... Be the first to leave a reply!

Leave a comment