get( 'featured_image' );
if( $featured_image || ( ampforwp_is_custom_field_featured_image() && ampforwp_cf_featured_image_src() ) || true == $redux_builder_amp['ampforwp-featured-image-from-content'] || (class_exists('Bunyad') && Bunyad::posts()->meta('featured_video')) ) {
$get_webp = $get_webp_type = "";
$get_webp = get_post_thumbnail_id($post->ID);
if ($get_webp ){
$get_webp_type = get_post_mime_type( $get_webp );
}
if(strpos($get_webp_type, "webp") !== false ){
ampforwp_webp_featured_image();
}
// Featured Video SmartMag theme Compatibility #2559
if(class_exists('Bunyad') && Bunyad::posts()->meta('featured_video') ){
global $wp_embed;
$videoContent = Bunyad::posts()->meta('featured_video');
$featured_video = $wp_embed->autoembed($videoContent);
$amp_html = ampforwp_content_sanitizer($featured_video);
}elseif ( $featured_image ) {
$amp_html = $featured_image['amp_html'];
$caption = $featured_image['caption'];
}
elseif ( ampforwp_is_custom_field_featured_image() ) {
$amp_img_src = ampforwp_cf_featured_image_src();
$amp_img_width = ampforwp_cf_featured_image_src('width');
$amp_img_height = ampforwp_cf_featured_image_src('height');
if( $amp_img_src ){
$amp_html = "