prefix = framework_get_prefix(); /* Set up the widget options. */ $widget_options = array( 'classname' => 'ads-125x125', 'description' => esc_html__( 'Display 125x125 advertisements.', 'wordsmith' ) ); /* Set up the widget control options. */ $control_options = array( 'width' => 525, 'height' => 350 ); /* Create the widget. */ $this->WP_Widget( "{$this->prefix}-ads-125x125", __( '125x125 Advertisements', '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. */ $ad1 = $instance['ad1']; $ad2 = $instance['ad2']; $ad3 = $instance['ad3']; $ad4 = $instance['ad4']; $ad5 = $instance['ad5']; $ad6 = $instance['ad6']; /* Output the theme's $before_widget wrapper. */ echo $before_widget; ?> 'Advert', 'ad2' => 'Advert', 'ad3' => 'Advert', 'ad4' => 'Advert', 'ad5' => '', 'ad6' => '' ); /* Merge the user-selected arguments with the defaults. */ $instance = wp_parse_args( (array) $instance, $defaults ); ?>