attribute['sg_progress_title'] ); $percentage = esc_attr( $this->attribute['sg_progress_percentage']['size'] ); $animation_duration = esc_attr( $this->attribute['sg_progress_duration']['size'] ); if ( 'switch' === $this->attribute['sg_progress_style'] ) { $progress_bar = '
' . $title . '
' . $percentage . '%
'; } else { $progress_bar = '
' . $title . '
' . $this->render_icon() . '
' . $percentage . '%
'; } $output = '
' . $progress_bar . '
'; return $this->render_wrapper( 'progress-bar', $output ); } /** * Render Icon */ private function render_icon() { $icon = null; $icon_html = $this->render_icon_element( $this->attribute['sg_progress_icon'] ); if ( 'inner-content' === $this->attribute['sg_progress_style'] && ! empty( $icon_html ) ) { $icon = '' . $icon_html . ''; } return $icon; } }