'recent_works', 'description' => __( 'Recent works from the portfolio.', 'Avada' ), ]; $control_ops = [ 'id_base' => 'recent_works-widget', ]; parent::__construct( 'recent_works-widget', __( 'Avada: Recent Works', 'Avada' ), $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 ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract $title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '', $instance, $this->id_base ); $number = isset( $instance['number'] ) ? $instance['number'] : 6; echo $before_widget; // phpcs:ignore WordPress.Security.EscapeOutput if ( $title ) { echo $before_title . $title . $after_title; // phpcs:ignore WordPress.Security.EscapeOutput } ?>