attribute['sg_image_content_style'] ); $hover_animation = esc_attr( $this->attribute['st_container_hover_animation'] ); return $this->render_wrapper( 'image-box', $this->render_image() . $this->render_body(), array( 'style-' . $style, 'elementor-animation-' . $hover_animation ) ); } /** * Render Image * * @return mixed */ private function render_image() { $link = $this->attribute['sg_image_link']; $link_enable = $this->attribute['sg_image_link_enable']; $image_size = $this->attribute['sg_image_image_size_imagesize_size']; $image_attachment = $this->attribute['sg_image_choose']; $image_hover_animation = esc_attr( $this->attribute['st_image_hover_animation'] ); $image = $this->render_image_element( $image_attachment, $image_size ); $image = '
' . $image . '
'; $image = 'yes' === $link_enable ? $this->render_url_element( $link, null, null, $image ) : $image; return $image; } /** * Render Body * * @return mixed */ private function render_body() { $title = esc_attr( $this->attribute['sg_body_title'] ); $title_tag = \Elementor\Utils::validate_html_tag( $this->attribute['sg_body_title_tag'] ); $title_icon_position = esc_attr( $this->attribute['sg_body_title_icon_position'] ); $description = $this->attribute['sg_body_description']; $button = $this->render_button(); $border_bottom = $this->render_border_bottom(); $title_icon = $this->render_icon_element( $this->attribute['sg_body_title_icon'] ); if ( 'before' === $title_icon_position ) { $title = '<' . $title_tag . ' class="body-title icon-position-' . $title_icon_position . '">' . $title_icon . $title . ''; } else { $title = '<' . $title_tag . ' class="body-title icon-position-' . $title_icon_position . '">' . $title . $title_icon . ''; } $body = '
' . $title . '
' . $description . '
' . $button . '
' . $border_bottom . '
'; return $body; } /** * Render Button * * @return mixed */ private function render_button() { $button = null; if ( 'yes' === $this->attribute['sg_button_enable'] ) { $icon_position = $this->attribute['sg_button_icon_position']; $link = $this->attribute['sg_button_link']; $label = esc_attr( $this->attribute['sg_button_label'] ); $icon = $this->render_icon_element( $this->attribute['sg_button_icon'] ); $link_class = ''; $item = ''; if ( 'before' === $icon_position ) { $item = $icon . $label; } else { $item = $label . $icon; } if ( 'gradient' === $this->attribute['st_button_normal_background_background_background'] || 'gradient' === $this->attribute['st_button_hover_background_background_background'] ) { $link_class .= 'hover-gradient'; $item = '' . $item . ''; } $button = $this->render_url_element( $link, null, $link_class, $item ); $button = '
' . $button . '
'; } return $button; } /** * Render Border Bottom * * @return mixed */ private function render_border_bottom() { $border_bottom = null; if ( 'yes' === $this->attribute['sg_body_enable_hover_border_bottom'] ) { $border_bottom = '
'; } return $border_bottom; } }