'recent_works', 'description' => 'Recent works from the portfolio.', ); $control_ops = array( 'id_base' => 'recent_works-widget', ); parent::__construct( 'recent_works-widget', 'Avada: Recent Works', $widget_ops, $control_ops ); } /** * Echoes the widget content. * * @access public * @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 ); $title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' ); $number = isset( $instance['number'] ) ? $instance['number'] : 6; echo $before_widget; // WPCS: XSS ok. if ( $title ) { echo $before_title . $title . $after_title; // WPCS: XSS ok. } ?>