<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>

<?php
	$template_args['post_ID'] = $ID;
	$template_args['post_Style'] = $Post_Style;
	$template_args = array_merge( $template_args, advenx_archive_blog_post_params() );

	foreach ( $archive_post_elements as $key => $value ) {

		switch( $value ) {

			case 'content':
			case 'meta_group':
			case 'likes_views':
			case 'social':
				advenx_template_part( 'blog', 'templates/post-extra/'.$value, '', $template_args );
				break;

            case 'author':
            case 'title':
            case 'date':
            case 'category':
			case 'read_more':
            break;

			default:
				$path = advenx_get_template_part( 'blog', 'templates/'.$Post_Style.'/parts/'.$value, '', $template_args );
				$path = !empty( $path ) ? $path : advenx_get_template_part( 'blog', 'templates/post-extra/'.$value, '', $template_args );
				echo advenx_html_output($path);
				break;
		}

		if( 'meta_group' == $value ) :
			echo '<div class="entry-meta-group">';
				foreach ( $archive_meta_elements as $key => $value ) {

					switch( $value ) {
						case 'likes_views':
						case 'social':
							advenx_template_part( 'blog', 'templates/post-extra/'.$value, '', $template_args );
							break;

						default:
							$path = advenx_get_template_part( 'blog', 'templates/'.$Post_Style.'/parts/'.$value, '', $template_args );
							$path = !empty( $path ) ? $path : advenx_get_template_part( 'blog', 'templates/post-extra/'.$value, '', $template_args );
							echo advenx_html_output($path);
							break;
					}
				}
			echo '</div>';
		endif;
	}

	do_action( 'advenx_blog_post_entry_details_close_wrap' );