$terms = wp_get_post_terms($post->ID, 'category');
$term_slugs = array();
if (count($terms) > 0):
foreach ($terms as $term):
$term_slugs[] = $term->slug;
endforeach;
endif;$post_class = array('post', 'blog_post');
if (get_post_format()) {
$post_class[] = 'format-'.get_post_format();
}
if (count($term_slugs) > 0) {
$post_class = array_merge($post_class, $term_slugs);
}
?>