'widget_welcart_featured',
'description' => __( 'Display recommended items.', 'usces' ),
);
parent::__construct( 'welcart_featured', 'Welcart ' . __( 'Items recommended', 'usces' ), $widget_ops );
}
/**
* Echoes the widget content.
*
* @see WP_Widget::widget
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
* @param array $instance The settings for the particular instance of the widget.
*/
public function widget( $args, $instance ) {
global $usces;
extract( $args );
$title = $instance['title'];
$icon = ( ! isset( $instance['icon'] ) || WCUtils::is_blank( $instance['icon'] ) ) ? 1 : (int) $instance['icon'];
$num = ( ! isset( $instance['num'] ) || WCUtils::is_blank( $instance['num'] ) ) ? 1 : (int) $instance['num'];
$img_path = file_exists( get_stylesheet_directory() . '/images/osusume.png' ) ? get_stylesheet_directory_uri() . '/images/osusume.png' : USCES_FRONT_PLUGIN_URL . '/images/osusume.png';
if ( 1 === $icon ) {
$before_title .= '';
}
wel_esc_script_e( $before_widget );
if ( ! empty( $title ) ) {
wel_esc_script_e( $before_title . esc_html( $title ) . $after_title );
}
?>