+
+ // Default to zero pending for all posts in request
+ foreach ( $post_id_array as $id )
+ $pending_keyed[$id] = 0;
+
+ if ( !empty($pending) )
+ foreach ( $pending as $pend )
+ $pending_keyed[$pend['comment_post_ID']] = absint($pend['num_comments']);