mh_magazine_lite_featured_image

The MH Magazine lite mh magazine lite featured image function.

Description

mh_magazine_lite_featured_image(); 

Usage

  1. if ( !function_exists( 'mh_magazine_lite_featured_image' ) ) { 
  2. require_once '/includes/mh-custom-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = mh_magazine_lite_featured_image(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/mh-custom-functions.php  
  1. function mh_magazine_lite_featured_image() { 
  2. global $page, $post; 
  3. if (has_post_thumbnail() && $page == '1' && !is_attachment()) { 
  4. $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'mh-magazine-lite-content'); 
  5. echo "\n" . '<figure class="entry-thumbnail">' . "\n"; 
  6. echo '<img src="' . esc_url($thumbnail[0]) . '" alt="' . esc_attr(get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) . '" title="' . esc_attr(get_post(get_post_thumbnail_id())->post_title) . '" />' . "\n"; 
  7. if (get_post(get_post_thumbnail_id())->post_excerpt) { 
  8. echo '<figcaption class="wp-caption-text">' . wp_kses_post(get_post(get_post_thumbnail_id())->post_excerpt) . '</figcaption>' . "\n"; 
  9. echo '</figure>' . "\n";