title: Convert two wordpress function to one
body: <p>I'm using the following function:</p>
  
  <pre><code>function shortcode_title($params = array(), $content) {
  extract(shortcode_atts(array(
  'type' =&gt; ''
  ), $params));
  
  return
  '&lt;div class="item js-item"&gt;&lt;div class="header js-header"&gt;' .
  ($type ? " class=\"$type\"" : '') .
  do_shortcode($content) .
  '&lt;/div&gt;';
  }
  add_shortcode('acc_title', 'shortcode_title');
  </code></pre>
  
  <p>And</p>
  
  <pre><code>function shortcode_content($params = array(), $content) {
  extract(shortcode_atts(array(
  'type' =&gt; ''
  ), $params));
  
  return
  '&lt;div class="body js-body"&gt;&lt;div class="body__contents"&gt;' .
  ($type ? " class=\"$type\"" : '') .
  do_shortcode($content) .
  '&lt;/div&gt; &lt;/div&gt;&lt;/div&gt;';
  }
  add_shortcode('acc_content', 'shortcode_content');
  </code></pre>
  
  <p>In post editor :</p>
  
  <pre><code>[acc_title] Custom Title [/acc_title]&lt;br/&gt;
  [acc_content] Custom Content [acc_content]
  </code></pre>
  
  <p>So result is :</p>
  
  <pre><code>Custom Title
  Custom content
  </code></pre>
  
  <p>How can I change the function to get the below shortcode?</p>
  
  <pre><code>[acc title="Custom Title"] Custom Content [/acc]
  </code></pre>