<?php
/**
*
* Post type icons
*
* @package Articled
* @subpackage parts
* @since Articled 1.0
*
*/


// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
  exit( '<div style="font-family: monospace;color: red;display: flex;justify-content: center;
  align-items: center;width: 100%;height: 100%;font-size: 40px;font-weight: 600;">' . __( 'Direct script access denied.', 'articled') . '</div>' );
}




/*
* This code is for showing Post Type icon
* Don't Modify it. If, You haven't create new Post Type.
*/
global $post;
$post_type_icon = get_post_format( $post->ID );
switch ($post_type_icon) {
    case "status":
        $articled_post_type = 'far fa-comment-dots';
        $post_type_title = __( 'Status', 'articled' );
        break;
    case "quote":
        $articled_post_type = 'fas fa-quote-left';
        $post_type_title = __( 'Quote', 'articled' );
        break;
    case "gallery":
        $articled_post_type = "fas fa-images";
        $post_type_title = __( 'Gallery', 'articled' );
        break;
    case "image":
        $articled_post_type = "far fa-image";
        $post_type_title = __( 'Image', 'articled' );
        break;
    case "video":
        $articled_post_type = "fas fa-video";
        $post_type_title = __( 'Video', 'articled' );
        break;
    case "audio":
        $articled_post_type = "fas fa-music";
        $post_type_title = __( 'Audio', 'articled' );
        break;
    case "link":
        $articled_post_type = "fas fa-link";
        $post_type_title = __( 'Link', 'articled' );
        break;
    case "aside":
        $articled_post_type = "fas fa-sticky-note";
        $post_type_title = __( 'Aside', 'articled' );
        break;
    case "chat":
        $articled_post_type = "fas fa-comments";
        $post_type_title = __( 'Chat', 'articled' );
        break;
    default :
      $articled_post_type = 'fas fa-thumbtack';
      $post_type_title = __( 'Standard', 'articled' );
}

echo '<i class="' . esc_attr( $articled_post_type ) . '" title="' . esc_attr( $post_type_title ) . '"></i>';

?>
