title: How to delegate to a shortcode function in order to filter pod items created by the current user using Pods Framework in Wordpress
body: <p>I want to list some pod items on front end. To do this I am normally using <code>pods</code> shortcode. To filter the data I use <code>where</code> attribute inside pods shortcode. For example:</p>
  
  <pre><code>[pods name="salon" where="author.ID = '2'"]
      &lt;li&gt;{@name}&lt;/li&gt;
  [/pods]
  </code></pre>
  
  <p>I want to filter pod items by the <code>author.ID</code>. The user should see the pod items that are created by himself. It is possible to access the current user by wordpress api 
  <code>global $current_user;</code>. Also it is possible to get it by using magic tags of Pods <code>{@user.ID}</code>. </p>
  
  <p>But the problem is I cannot use php code or magic tags inside shortcode such as this:</p>
  
  <pre><code>[pods name="salon" where="author.ID = '{@user.ID}'"]
  </code></pre>
  
  <p>I am looking for a way to overcome this problem. </p>
  
  <p>I thought maybe I can write a new shortcode function where I can get the current user's id and then call the <code>pods</code> shortcode function such as this:</p>
  
  <pre><code>function pods_by_current_user($atts) {
      $current_user = wp_get_current_user();
      $user_id = $current_user-&gt;ID;
      // put it into 'where' attribute and delegate to the "pods" function
  </code></pre>
  
  <p>Do you think that this is the right way to solve this problem? And do you know how to  put <code>$user_id</code> into <code>$atts</code> and delegate the rest to the actual <code>pods</code> shortcode function?</p>