[wp-hackers] Re: substitutes for hook wp_footer ?

DD32 wordpress at dd32.id.au
Fri Jan 25 04:36:58 GMT 2008

On Fri, 25 Jan 2008 15:28:40 +1100, Kaf Oseo <kaf at szub.net> wrote:

> DD32 wrote:
>> On Fri, 25 Jan 2008 11:11:10 +1100, Chris Poteet <cpoteet at siolon.com> wrote:
>>>> On the other hand, if you have a config screen, you could search the
>>>> currently active theme's footer.php file for the "wp_footer" text and
>>>> warn the user if the theme doesn't have it. Bit of a long way to go,
>>>> but it would work.
>>> How could you even do that?
>> $source = file_get_contents(THEMEPATH . '/footer.php');
>> if( strpos($source, 'wp_footer') === false ) {
>> //No footer action in theme
>> }
> And if the theme doesn't sport a footer.php? Yes most do, but it's not a
> required template.

Well you'd add a check in first to see if the file exists.. But that was just to show how its done -- i woudn't do something like that.
Shoot the theme author if its a problem, and tell your users who have the problem to edit their theme i guess.

More information about the wp-hackers mailing list