Wordpress theme standard is… Uhmm… How should I put it? Stupid as !@#$. Don’t use global, except inside functions or classes? Oh ok, fine, seems justifiable, but there is an inci tinci tiny problem. The footer.php file for example is included from WITHIN A FUNCTION called get_footer. Thus does it make any sense to you? Cause it sure doesn’t to me…
Meeh fine, lets take another example…
Hook me up baby… o.O
No really, use an overloaded action / filter system, so that you can hook up together and dance a bit and just break someone else’s ( !@#$ ) code, while your at it. A classic do{ } while(); in terms of php.
God I’m pissed… Do any of these reviewers actually have any idea about code optimization and PHP itself? I mean I’m no expert on all of the matters, but some of the things that are required by WordPress to make a theme are just plain old stupid.
I didn’t mean to trash anyone, but god I had to get it out.
Regarding your original question… I did it with a do action and made the logic inside the function.