'auktionsscroller', 'description' => __('Visar och länkar till en traderasäljares auktioner på Tradera.', 'auktionsscroller') ); /* Widget control settings. */ $control_ops = array( 'width' => 200, 'height' => 350, 'id_base' => 'auktionsscroller_widget' ); /* Create the widget. */ $this->WP_Widget( 'auktionsscroller_widget', __('Auktionsscroller widget', 'auktionsscroller'), $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 = apply_filters('widget_title', $instance['title'] ); $ftg = $instance['ftg']; $riktning = $instance['riktning']; $nrofauctions = $instance['nrofauctions']; $alias = $instance['alias']; $vertikalscroll=false; $scrollonoff = isset( $instance['scrollonoff'] ) ? $instance['scrollonoff'] : 'off'; if ($scrollonoff=='on') { $scrollonoff=1; } else { $scrollonoff=0; } if ($riktning=='Vertikal'){ $vertikalscroll=1; } else { $vertikalscroll=0; } /* Before widget (defined by themes). */ echo $before_widget; /* Display the widget title if one was input (before and after defined by themes). */ if ( $title ) echo $before_title . $title . $after_title; $unique = genRandomString(); echo ''; echo ''; echo '
id="get_field_id( 'scrollonoff' ); ?>" name="get_field_name( 'scrollonoff' ); ?>" />