/** * Inserts Post Image * * @param array $instance The settings for the particular instance of the widget. */ public static function do_post_image($instance) { //* Bail if empty show param if (empty($instance['show_image'])) { return; } $align = $instance['image_alignment'] ? esc_attr($instance['image_alignment']) : 'alignnone'; $link = $instance['link_image_field'] ? $instance['link_image_field'] : get_permalink(); $link = '' !== genesis_get_custom_field('thememix_featured_content_link_image_field') ? genesis_get_custom_field('thememix_featured_content_link_image_field') : $link; $image = genesis_get_image(array('format' => 'html', 'size' => $instance['image_size'], 'context' => 'featured-post-widget', 'attr' => genesis_parse_attr('thememix-featured-content-entry-image-widget', array('align' => $align)))); $image = $instance['link_image'] == 1 ? sprintf('<a href="%s" title="%s" class="%s">%s</a>', $link, the_title_attribute('echo=0'), $align, $image) : $image; ThemeMix_Featured_Content::maybe_echo($instance, 'thememix_featured_content_before_post_content', 'image_position', 'before-title', $image); ThemeMix_Featured_Content::maybe_echo($instance, 'thememix_featured_content_post_content', 'image_position', 'after-title', $image); ThemeMix_Featured_Content::maybe_echo($instance, 'thememix_featured_content_after_post_content', 'image_position', 'after-content', $image); }