[wp-hackers] edit comment form

Dougal Campbell dougal at gunters.org
Fri Apr 27 19:38:00 GMT 2007


Will Norris wrote:
> I maintain a port of Alan Castonguay's openid plugin at
> <http://wordpress.org/extend/plugins/openid/> and was recently made
> aware of a problem when using the plugin with PHP 5.2.  Part of what
> the plugin does is to modify the comment form to include an additional
> input field for a user's OpenID.  To do this, it uses output buffering
> to capture the form, then some regex magic to make the necessary
> changes.  The problem is that it appears the callback method specified
> in ob_start() no longer has access to global variables in recent
> versions of PHP; this is not considered a bug
> <http://bugs.php.net/bug.php?id=40104>.  So I'm now looking for
> suggestions for how one might modify the comment form.

Have you tried using the superglobal, $GLOBALS['myvar']?

http://us.php.net/manual/en/reserved.variables.php
http://us.php.net/manual/en/language.references.spot.php#references.global

-- 
Dougal Campbell <dougal at gunters.org>
http://dougal.gunters.org/



More information about the wp-hackers mailing list