attribute['sg_image_size_imagesize_size'] ); if ( empty( $image ) && jeg_is_editor_elementor() ) { $image_sizes = wp_get_registered_image_subsizes(); $size = isset( $image_sizes[ $this->attribute['sg_image_size_imagesize_size'] ] ) ? $image_sizes[ $this->attribute['sg_image_size_imagesize_size'] ] : $image_sizes['large']; $image = ''; } if ( ! empty( $image ) ) { $link_to = $this->attribute['sg_image_link_to']; $animation = ! empty( $this->attribute['st_image_hover_animation'] ) ? 'elementor-animation-' . esc_attr( $this->attribute['st_image_hover_animation'] ) : ''; switch ( $link_to ) { case 'home': $content = sprintf( '%2$s', esc_url( get_home_url() ), $image ); break; case 'post': $content = sprintf( '%2$s', esc_url( get_the_permalink() ), $image ); break; case 'media': $content = sprintf( '%2$s', esc_url( get_the_post_thumbnail_url() ), $image ); break; case 'custom': $content = $this->render_url_element( $this->attribute['sg_image_link_to_custom'], null, null, $image ); break; default: $content = $image; break; } $content = sprintf( '
%2$s
', $animation, $content ); } return $this->render_wrapper( 'post-featured-image', $content ); } }