'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 } ?>
'avada_portfolio', 'posts_per_page' => $number, 'has_password' => false, ]; $portfolio = fusion_cached_query( $args ); ?> have_posts() && '0' !== fusion_get_option( 'status_fusion_portfolio' ) ) : ?> have_posts() ) : ?> the_post(); ?>
__( 'Recent Works', 'Avada' ), 'number' => 6, ]; $instance = wp_parse_args( (array) $instance, $defaults ); ?>