title: How can I use preg_replace in wordpress theme settings panel to get post title or tags
body: <p>I don't understand how do you use the preg_replace command in php</p>
  
  <p>I created a text area in theme settings panel to display a default description for every post and would be nice if I can mix the description using {tags} or {title} to grab the post title or post tags.</p>
  
  <p>I have tried using the following code but got some errors.</p>
  
  <p>description code</p>
  
  <pre><code>$description = get_post_meta($post-&gt;ID, 'field_description', true); if(!empty($description)) {
  
  $seo_desc = get_option('mytheme_seo_description');
  
  echo $description; 
  
  } else if(!empty($seo_desc)) {
  
  echo $seo_desc;
  </code></pre>
  
  <p>setting panel</p>
  
  <pre><code>$options[] = array( "name" =&gt; __('SEO DESCRIPTION','mytheme'),
  "desc" =&gt; __('Mix {title} {tags} {categories} in a default description to grab post title, tags and categories','mytheme'),
  "id" =&gt; $shortname."_seo_description",
  "std" =&gt; "",
  "type" =&gt; "textarea");
  </code></pre>
  
  <p>Is it possible to use {title} {tags} {categories} for grabbing the post title,tags and categories using any function?</p>