[wp-hackers] wp-config.php, wp-load.php, and ABSPATH
Otto
otto at ottodestruct.com
Fri Sep 11 15:43:41 UTC 2009
Well, like I said, my problem with that is that you shouldn't do the
other one either.
If you wanted to put something in there like "you shouldn't include
this file directly, go read this documentation for the right way
instead" then I'd be more okay with it.
-Otto
On Thu, Sep 10, 2009 at 8:51 PM, Stephen Rider
<wp-hackers at striderweb.com> wrote:
>
> On Sep 10, 2009, at 9:25 AM, Otto wrote:
>
>> So, you're asking if we should instantly and intentionally break every
>> plugin that includes wp-config.php?
>>
>> Yeah, I'm fine with it. ;)
>
> Heh. Okay, to rephrase the question (via quoting myself):
>
>> Here is my proposal: We should assert, in documentation and in code, that
>> any time a plugin or process wants to access parts of WP (including the
>> database), it should call wp-load.php.
>
> ...
>>
>> [W]e should put a "deprecated" call with the define() in wp-config (inside
>> the "if it doesn't already exist" clause), so that if it does happen, there
>> is a notice to the log that "You should not call wp-config.php directly.
>> Call wp-load.php instead." Then somewhere down the road we can get rid of
>> the troublesome define.
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list