'; // WPCS: XSS OK.
// Default value if there is no first image
$image = '';
if ( $media_id = get_post_meta( $post->ID, 'ect-alt-featured-image', true ) ) {
// Get alternate thumbnail from CPT meta.
$image = wp_get_attachment_image( $media_id, 'catch-fullscreen-featured', false, array( 'title' => $title_attribute, 'alt' => $title_attribute ) );
} elseif ( has_post_thumbnail() ) {
$image = get_the_post_thumbnail( $post->ID, 'catch-fullscreen-featured', array( 'title' => $title_attribute, 'alt' => $title_attribute ) );
} else {
// Get the first image in page, returns false if there is no image.
$first_image = catch_fullscreen_get_first_image( $post->ID, 'catch-fullscreen-featured', array( 'title' => $title_attribute, 'alt' => $title_attribute ) );
// Set value of image as first image if there is an image present in the page.
if ( $first_image ) {
$image = $first_image;
}
}
$output .= '
'. $image . '
';
$output .= the_title( ' ', false );
$output .= '
';
$output .= '
', '
' . get_the_excerpt() . '