[wp-hackers] How do filters access variables outside of their function?
wp at andrewnacin.com
Thu Aug 26 20:27:09 UTC 2010
On Thu, Aug 26, 2010 at 4:13 PM, Ken <Ken at adcstudio.com> wrote:
> For example a function Nacin put together on a thread back in May (found on
> Calls both $post_ID and $post->post_date, both of which thro notices with
> wp_debug turned on.
> The thing that has me stumpt is that I didn't think variables outside of
> the function were accessible unless global'd.
You'll need to global both of those. I didn't test, I just copy/pasted from
core where this runs in global scope.
More information about the wp-hackers