title: Wordpress: Site Specific Plugins & Widgets
body: <p>I created a site specific plugin with some php that i want to be executed for the whole site, but the code doesnt seem to be applying to the PHP variables that I have in the sidebar. I'm using the PHP Widget plugin to create a widget that can execute PHP within a widget.</p>
  
  <p><strong>In the site specific plugin I have:</strong></p>
  
  <pre><code>&lt;?php    
  $domain = ($_SERVER["HTTP_HOST"]);
  $cdn="http://www.domain.com";
  </code></pre>
  
  <p><strong>And in the sidebar PHP Widget I have:</strong></p>
  
  <pre><code>&lt;img src="&lt;?php echo $cdn; ?&gt;/image1.png" width="300" height="250"&gt;
  </code></pre>
  
  <p>The plugin is loaded, and a quick <code>echo $cdn;</code> added the the bottom of the site specific plugin displays te URL at the very top of the page</p>
  
  <p>When I define <code>$cdn;</code> within the PHP Widget it works fine, but I want to define the variables at the top of the site if possible.  What am I doing wrong?</p>