<?php 
/**
 * The Content Hook
 * 
 * Altering content results or displays.
 * @since 1.0.0
 * 
 */

// Exit if accessed directly
if( !defined( 'ABSPATH' ) ) exit;


/**
 * Add Meta Data for Post Type Dealer
 * 
 * @since 1.0.0
 * 
 */
function dst_the_content_hook($content){
	global $post;
	$post_id = $post->ID;

	// If this isn't a 'dealer' post type, just return the default results.
	if ( get_post_type( $post_id ) != 'dealer' ) 
		return $content;
	
	$friendly_html = "";
	$meta_key='dst_postmeta_input_key';
	$post_title = $post->post_title;
	$get_postmeta = get_post_meta($post_id, $meta_key);

	if ( !is_archive() ) {

		$get_postmeta  = DST()->db->get_meta($post_id);
		$friendly_html .= DST()->html->dealer_profile($post_title, $get_postmeta);
		echo $friendly_html;
    	
	}
	

}
add_filter('the_content', 'dst_the_content_hook');