How to avoid repeatedly calling a function in this case?
<p>I wrote a function to display an object on each wordpress post:</p>

<pre><code>function pod(){
global $post,$pod;
$id = get_the_ID();
$pod = new WP_POD( $id );
return $pod;
}
</code></pre>

<p>I thought $pod is global, so, I can use $pod->stuffs when need, but it doesn't work.
So, in each function I need to use stuffs in the object, I have to add one line:</p>

<pre><code>$pod = pod()
</code></pre>

<p>I think repeatedly calling this function might not good for performence. Is there a way to make this global and accessable by other functions?</p>
