[wp-hackers] Is WP_INSTALLING constant here to stay?
dyordan1 at ramapo.edu
Tue Jan 22 14:47:55 UTC 2013
You're very welcome, I'm glad I helped! For future reference, whenever everything starts crashing down and you have to go out of your way to fix it, that's probably the time for that bulb over your head to light up and tell you something's wrong in your method and it's time for a fresh approach. Not just Wordpress, programming in general. Good luck with your plugin!
On Tue, 22 Jan 2013, at 9:38 AM, Dino Termini wrote:
> Thank you, Dobri,
> it looks like I was doing something wrong, after all. I was doing the whole wp-load business inside a function, thus jacking up the scope of most WP objects, which are assumed to be global (who knew!). Like explained here
> I'm rewriting my code to move the include somewhere else, we'll see how it goes! So no offense at all in making your point. Actually thank you for pointing me in the right direction!
> On 1/22/2013 9:26 AM, Dobri wrote:
>> 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:
>>> 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.
>>> 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,
>>>>> wp-hackers mailing list
>>>>> wp-hackers at lists.automattic.com
>>>> wp-hackers mailing list
>>>> wp-hackers at lists.automattic.com
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers