[wp-hackers] Check for wp_footer

Matt Martz matt at sivel.net
Sun Apr 25 14:51:53 UTC 2010


> I want to check on a plugin's interface, so the theme won't be loaded
> for me to check if did_action('wp_footer').
>
> I guess I'll have to read the `footer.php` file, then. I just don't
> see it as a good manner of doing it.

Keep in mind that wp_footer doesn't necessarily need to be called from
footer.php so checking there isn't terribly reliable.

> > The other way to do it is to do a http request based test which a special query arg on which you output a string on wp_footer.

This idea intrigued me so I wrote a small proof of concept plugin to
test this.  If you are interested check it out here:
http://gist.github.com/378450

Perhaps not the best or cleanest way, but off the top of my head I
couldn't think of a better way to do it.

-- 
Matt Martz
matt at sivel.net
http://sivel.net/


More information about the wp-hackers mailing list