[wp-hackers] Is WP_INSTALLING constant here to stay?
dino at duechiacchiere.it
Tue Jan 22 17:07:04 UTC 2013
you are correct, I didn't elaborate enough on what I'm trying to do, and
I understand the confusion. My plugin includes a file that is called via
Ajax, and performs some basic tasks depending on the data it receives.
For most tasks I don't need to load WP, as I can take care of that
directly, thus avoiding to increase the load on people's servers (like
your post says). In some specific cases, I need WP, and that's when I
load it. My 'mistake' was to do the include inside the method, this
messing up the scope of WP's variables. It's fixed now.
On 1/22/2013 11:25 AM, Otto wrote:
> On Tue, Jan 22, 2013 at 9:00 AM, Dino Termini <dino at duechiacchiere.it> wrote:
>> you make a very good point, indeed. Unfortunately Otto's advice doesn't
>> apply to my plugin, I'm trying to do something completely different than
>> what's described in that article. But it's always good to keep that in mind.
> My advice in that article applies across the board, to all plugins.
> If you are a WordPress plugin, and you ever try to include the
> wp-load.php file directly, then you have messed up somewhere, somehow.
> There is no valid case for ever having to do this.
> If you are a piece of code that is not running as a WordPress plugin,
> or something that is entirely separate and simply accessing the WP
> database, then there is a valid case to include wp-load.php.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers