name = wp_get_theme(); /* Get the theme prefix. */ $this->prefix = framework_get_prefix(); /* Set up the widget options. */ $widget_options = array( 'classname' => 'dribbble', 'description' => esc_html__( 'Display your latest Dribbble shots.', 'wordsmith' ) ); /* Set up the widget control options. */ $control_options = array( 'width' => 200, 'height' => 350 ); /* Create the widget. */ $this->WP_Widget( "{$this->prefix}-dribbble", __( 'Dribbble', 'wordsmith' ), $widget_options, $control_options ); } /* Outputs the widget based on the arguments input through the widget controls. */ function widget( $args, $instance ) { extract( $args ); /* Arguments for the widget. */ $args['dribbble_username'] = strip_tags( $instance['dribbble_username'] ); $args['dribbble_feed_count'] = strip_tags( $instance['dribbble_feed_count'] ); /* Output the theme's $before_widget wrapper. */ echo $before_widget; /* If a title was input by the user, display it. */ if ( !empty( $instance['title'] ) ) echo $before_title . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $after_title; ?> get_items( 0, $rss->get_item_quantity( $instance['dribbble_feed_count'] ) ); endif; endif; ?>