[wp-hackers] WPMU VHOST constant
thenbrent at gmail.com
Tue Aug 4 20:35:22 UTC 2009
Thanks for the quick responses.
Otto, I was a little confused about the constant function not being OK,
especially having read the php manual entry on it, so thanks for confirming
Will, thanks for reminding me I should be checking that VHOST is defined
before trying to get its value.
Beau, thanks for letting me know this is the acceptable method. :)
On Tue, Aug 4, 2009 at 10:18 PM, Otto
<otto at ottodestruct.com> wrote:
> 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.
> "constant — Returns the value of a constant"
> Sent from Memphis, TN, United States
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers