'widget adore-widget express-list-widget style-2', 'description' => __( 'Retrive Express List Widgets', 'archive-news' ), ); parent::__construct( 'archive_news_express_list_widget', __( 'Adore Widget: Express List Widget', 'archive-news' ), $express_list_widget ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { if ( ! isset( $args['widget_id'] ) ) { $args['widget_id'] = $this->id; } $express_list_title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : ''; $express_list_title = apply_filters( 'widget_title', $express_list_title, $instance, $this->id_base ); $viewall_button_label = ( ! empty( $instance['view_all_button_label'] ) ) ? $instance['view_all_button_label'] : ''; $express_list_post_offset = isset( $instance['offset'] ) ? absint( $instance['offset'] ) : ''; $express_list_category = isset( $instance['category'] ) ? absint( $instance['category'] ) : ''; $viewall_button_link = ( ! empty( $instance['view_all_button_link'] ) ) ? $instance['view_all_button_link'] : esc_url( get_category_link( $express_list_category ) ); echo $args['before_widget']; if ( ! empty( $express_list_title || $viewall_button_label ) ) { ?>
'post', 'posts_per_page' => absint( 5 ), 'offset' => absint( $express_list_post_offset ), 'cat' => absint( $express_list_category ), ); $query = new WP_Query( $express_list_widgets_args ); if ( $query->have_posts() ) : $i = 1; while ( $query->have_posts() ) : $query->the_post(); $class = ( $i === 1 ? 'overlay-post' : 'post-list' ); $cat_bg_color = ( $i === 1 ) ? '' : 'no-bg'; ?>

/i', '', $content ); // Remove image tags with alt attributes $content = wp_kses_post( wp_trim_words( $content, 15 ) ); ?>