title: How to add user defined CSS class to my custom widget rendering code?
body: <p>I created a widget by extending <code>WP_Widget</code>, works well.
  Also added a field to the admin called <code>className</code>.</p>
  
  <p>But I can't find any hook where I can inject the custom CSS class name into the rendering code of the widget (I want the class to be applied to the whole widget of course).</p>
  
  <pre><code>// Before widget.
  echo $before_widget;
  
  if ($title)
  { echo $before_title.$title.$after_title; }
  
      if ($headline)
      { echo '&lt;h4&gt;'.$headline.'&lt;/h4&gt;'; }
  
      if ($description)
      { echo '&lt;p&gt;'.$description.'&lt;/p&gt;'; }
  
      if ($className)
      { echo '&lt;p&gt;Class name: '.$className.'&lt;/p&gt;'; }
  
  // After widget.
  echo $after_widget;
  </code></pre>
  
  <p>The HTML output for this goes like:</p>
  
  <pre><code>&lt;aside id="eppz-page-widget-2" class="widget widget_eppz-page-widget"&gt;
      &lt;h3 class="widget-title"&gt;Title&lt;/h3&gt;
      &lt;h4&gt;Headline!&lt;/h4&gt;
      &lt;p&gt;Some description that can be added optionally to the widget.&lt;/p&gt;
      &lt;p&gt;Class name: featuredPageWidget&lt;/p&gt;
  &lt;/aside&gt;
  </code></pre>
  
  <p>Now I really want to append the <code>className</code> variable after all the classes applied to <code>aside</code>. I could do it with some string functions, but I'd really hope that there is a simple WordPressy way to do this.</p>