'corpo_recent_posts_widget', 'description' => __('Displays a list of recent posts', 'corpo') ); /* Widget control settings. */ $control_ops = array( 'width' => 250, 'height' => 350, 'id_base' => 'corpo_recent_posts_widget' ); /* Create the widget. */ $this->WP_Widget( 'corpo_recent_posts_widget', __('Corpo: Recent posts list', 'corpo'), $widget_ops, $control_ops ); } /** * How to display the widget on the screen. */ function widget( $args, $instance ) { extract( $args ); /* Our variables from the widget settings. */ $title = $instance['title']; $number = $instance['number']; /* Before widget (defined by themes). */ echo $before_widget; ?>
'', 'number' => 3); $instance = wp_parse_args( (array) $instance, $defaults ); ?>