[wp-hackers] WPMU VHOST constant

Otto otto at ottodestruct.com
Tue Aug 4 20:18:09 UTC 2009


On Tue, Aug 4, 2009 at 2:50 PM, Will
Anderson<wp-hackers at itsananderson.com> wrote:
> Unfortunately I'm not terribly familiar with WPMU, but I can tell you from a
> PHP perspective that the code you posted won't work. The constant should
> already be defined in wp-config.php (from what I understand) so you
> shouldn't try defining it again (which is what the "constant" function
> does). Instead, do something like this...

No, the constant function returns the value, so checking for
(constant("VHOST") == 'yes') is perfectly acceptable.

http://www.php.net/manual/en/function.constant.php

"constant — Returns the value of a constant"

-Otto
Sent from Memphis, TN, United States


More information about the wp-hackers mailing list