title: If wordpress widget is not active, show message
body: <p>I'm writing plugin and in there I need to check if one widget in use or not. If the widget is in use that's great, but if it isn't I want to show error message.</p>
  
  <p>The code what I tried is like this, but it isn't working. I don't get either message.</p>
  
  <pre><code>function my_widgie_detect()  {
    if ( false === is_active_widget( 'testimonial' )) {
      // do something here if the widget isn't active;
      echo '&lt;div id="message" class="updated fade"&gt;&lt;p&gt;No active&lt;/p&gt;&lt;/div&gt;';
    } else {
      echo '&lt;div id="message" class="updated fade"&gt;&lt;p&gt;Active&lt;/p&gt;&lt;/div&gt;';
     }
  }
  add_action( 'wp_head', 'my_widgie_detect' );
  </code></pre>
  
  <p>So how to recognize whether the widget is on, and if not wordpress will show a message?</p>