'500',
'height' => '383',
'url' => wp_get_attachment_url( $post_thumbnail_id ),
'path' => get_attached_file( $post_thumbnail_id ),
'retina' => false,
'id' => $post_thumbnail_id,
]
);
$image_args['retina'] = false;
$image = Fusion_Image_Resizer::image_resize( $image_args );
$image_retina_args = $image_args;
$image_retina_args['retina'] = true;
$image_retina = Fusion_Image_Resizer::image_resize( $image_retina_args );
$scrset = '';
if ( isset( $image_retina['url'] ) && $image_retina['url'] ) {
$scrset = ' srcset="' . esc_attr( $image['url'] . ' 1x, ' . $image_retina['url'] . ' 2x' ) . '"';
}
?>
width="" height="" alt="" />
';
$image_markup .= apply_filters( 'privacy_iframe_embed', fusion_get_page_option( 'video', $post_id ) ); // phpcs:ignore WordPress.Security.EscapeOutput
$image_markup .= '';
} elseif ( ( null !== $current_object = get_queried_object() ) && isset( $current_object->term_id ) && $post_id === $current_object->term_id ) { // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.Found, Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
$image_id = fusion_get_term_image( 'id' );
if ( $image_id ) {
$image_markup = wp_get_attachment_image( $image_id, $post_featured_image_size );
}
} elseif ( 'attachment' === $type ) {
$image_markup = wp_get_attachment_image( $post_id, $post_featured_image_size );
}
if ( $image_markup ) {
echo $image_markup; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} elseif ( ! $image_markup && ( 'product' === get_post_type( $post_id ) || ( ! empty( $current_object ) && isset( $current_object->taxonomy ) && 'product_cat' === $current_object->taxonomy ) ) && function_exists( 'wc_placeholder_img_src' ) && wc_placeholder_img_src() ) {
echo wc_placeholder_img( $post_featured_image_size ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} elseif ( $display_placeholder_image ) {
/**
* The avada_placeholder_image hook.
*
* @hooked avada_render_placeholder_image - 10 (outputs the HTML for the placeholder image).
*/
do_action( 'avada_placeholder_image', $post_featured_image_size, $aspect_ratio );
}
}
/**
* Set the markup generated above as a variable.
* Depending on the use case we'll be echoing this markup in a wrapper or followed by an action.
*/
$featured_image = ob_get_clean();
$image_wrapper_attributes = '';
$attributes['class'] = ( isset( $attributes['class'] ) ) ? $attributes['class'] . ' fusion-image-wrapper' . $image_size_class : 'fusion-image-wrapper' . $image_size_class;
foreach ( $attributes as $key => $value ) {
$image_wrapper_attributes .= ' ' . $key . '="' . esc_attr( $value ) . '"';
}
?>