[wp-hackers] Is WP_INSTALLING constant here to stay?
dino at duechiacchiere.it
Tue Jan 22 15:00:37 UTC 2013
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.
On 1/22/2013 9:47 AM, John Blackbourn wrote:
> On 22 January 2013 13:17, Dino Termini <dino at duechiacchiere.it> wrote:
>> Good morning, all,
>> for a plugin I'm working on, I need to user some WordPress functions in an
>> external file. I'm loading it with the usual wp-load.php include, but
>> apparently some plugins don't like that, and throw a fatal error, breaking
>> my code. Thanks to St. Google, I found out that there's a constant that can
>> be used to tell Wordpress to not load any plugins:
>> define('WP_INSTALLING', true);
>> Now my question to core developers is if this approach is correct and if I
>> can rely on it for the foreseeable future. Otherwise, my question becomes:
>> what is the best way to load just the CORE without all the stuff added by
>> plugins and themes?
> Rather than trying to solve your problem by preventing other plugins
> from loading, you should instead solve it by finding the correct
> method to do what it is you want to do. In other words, you should
> treat the cause of your problem, not the symptoms.
> Your main issue is that you're manually including wp-load.php, which
> you should avoid. There are better methods. Otto has a good blog post
> on the subject . One thing that Otto didn't touch on is using
> admin-ajax.php too, for loading resources or fulfilling requests. This
> is worth looking in to.
> Secondly, your post is a prime example of the XY problem . You're
> concentrating on your attempted solution rather than asking advice
> about your actual problem. It might be worth starting another thread
> detailing your actual problem, then hopefully someone can help out!
>  http://ottopress.com/2010/dont-include-wp-load-please
>  http://meta.stackoverflow.com/questions/66377/what-is-the-xy-problem
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers