title: remove empty <p> tags from wordpress shortcodes via a php functon
body: <p>Looking for a php function (non-jQuery or wpautop modification) approach to remove <code>&lt;p&gt;&lt;/p&gt;</code> from within wordpress.</p>
  
  <p>I tried this but it does not work:</p>
  
  <pre><code>        function cleanup_shortcode_fix($content) {   
            $array = array (
              '&lt;p&gt;[' =&gt; '[', 
              ']&lt;/p&gt;' =&gt; ']', 
              ']&lt;br /&gt;' =&gt; ']',
              ']&lt;br&gt;' =&gt; ']'
            );
            $content = strtr($content, $array);
              return $content;
          }
          add_filter('the_content', 'cleanup_shortcode_fix');
  </code></pre>