[wp-hackers] Is WP_INSTALLING constant here to stay?

Dobri dyordan1 at ramapo.edu
Tue Jan 22 14:26:02 UTC 2013


Dino,

All I'm saying is, at least make sure you are doing it right. If you're absolutely sure there is no way you could make your code work without disabling plugins, then by all means, go right ahead. But if there's even the slightest possibility you are doing something wrong, if I was you, I'd download some similar plugins and take a look at the code. What if more than one plugin attempts to do that shut down trick and say, just one of the two succeeds? Can you imagine how confusing something like this would be to debug for anyone but the developer(s) of those exact plugins? At least I'm glad you see my point and are not taking offense in this. Cheers!

On Tue, 22 Jan 2013, at 9:15 AM, Dino Termini wrote:

> Dobri,
> 
> just to clarify, I agree with you 100%. Unfortunately once I loaded WordPress that way, I started getting a bunch of fatal errors from plugins assuming who knows what. FeedWordpress was one of them, but the list could go on. Since I can't expect that every plugin or theme out there does things the right way, and given that I only need to access core functionality, my temporary workaround is to simply disable everything and take care of my "business".
> 
> But I'm always open to hear from the community if a cleaner approach is possible, so feel free to chime in.
> 
> Thanks,
> Dino.
> 
> On 1/22/2013 9:07 AM, Dobri wrote:
>> Hey Dino,
>> 
>> I'm pretty sure that the solution you came up with (assuming it works now) will be pretty stable for the "foreseeable future". However, I'll be the first one to say, you're probably doing it wrong if you need to run just core. Or, for that matter, one of the other plugins installed is doing it wrong. Wordpress plugins (and themes) are meant to work together in unison, not shut down each other. I'd first try to disable (through /wp-admin/) some of the plugins that you suspect might be breaking your code and if it's just one - you've got your culprit, take it from there. If it's more than one, chances are your code is acting weird. Download some plugins that have functionality similar to the one you're aiming for and see how they coded it in, maybe you're missing something? No harsh feelings, just trying to go for the cleanest approach, right? Cheers!
>> 
>> On Tue, 22 Jan 2013, at 8:17 AM, Dino Termini 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?
>>> 
>>> Thank you,
>>> Dino
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> ~Dobri
>> 
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

~Dobri



More information about the wp-hackers mailing list