'widget_welcart_post',
'description' => __( 'Display recent posts.', 'usces' ),
);
parent::__construct( 'welcart_post', 'Welcart ' . __( 'Post', '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 ) {
extract( $args );
$wid = str_replace( '-', '_', $this->id );
$title = $instance['title'];
$rows_num = ( ! isset( $instance['rows_num'] ) || WCUtils::is_blank( $instance['rows_num'] ) ) ? 3 : $instance['rows_num'];
$category = ( ! isset( $instance['category'] ) || WCUtils::is_blank( $instance['category'] ) ) ? '' : $instance['category'];
$icon = ( ! isset( $instance['icon'] ) || WCUtils::is_blank( $instance['icon'] ) ) ? 1 : (int) $instance['icon'];
$img_path = file_exists( get_stylesheet_directory() . '/images/post.png' ) ? get_stylesheet_directory_uri() . '/images/post.png' : USCES_FRONT_PLUGIN_URL . '/images/post.png';
if ( 1 === $icon ) {
$before_title .= '';
}
wel_esc_script_e( $before_widget );
if ( ! empty( $title ) ) {
wel_esc_script_e( $before_title . apply_filters( 'usces_filter_post_widget_title', esc_html( $title ), $instance ) . $after_title );
}
?>
ID :