title: How Do I Detect A WordPress Admin Panel in my Plugin?
body: <p>I've got two events in my plugin. One is run for the front-end. The other is run for the admin panel. Both call the same function in one particular situation, and this echoes stuff to the screen. How do I make it such that the function is smart, calls something in WordPress, and detects whether it's being loaded in the front-end versus the admin panel? I don't want it to echo stuff to the screen on the front-end, but do want it to do so on the admin panel. Right now, it's echoing on both, which is not what I want.</p>
  
  <p><em>Background</em></p>
  
  <p>For the front end (the side of the site that the visitor sees), I'm intercepting the 'wp' event and checking for:</p>
  
  <pre><code>( is_single() || is_page() || is_home() || is_archive() || is_category() || is_tag())
  </code></pre>
  
  <p>For the admin panel, I'm intercepting the 'admin_menu' event. I tried intercepting the is_*() stuff above, but it seems to somehow answer TRUE or something, not giving me a difference between front-end and admin panel.</p>