Skip to content
This repository has been archived by the owner on Dec 8, 2018. It is now read-only.

Indirect access to plugin file #2

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Indirect access to plugin file #2

wants to merge 20 commits into from

Conversation

yuttadhammo
Copy link
Contributor

I was just alerted to the fact that the client needs to know the location of the php file in order to connect to the service - since the plugin directory could be anything, this makes it harder for the user to set up. Also, as per this post:

http://ottopress.com/2010/dont-include-wp-load-please/

including wp-load.php is a bad idea...

So, here is a proposed change that solves both issues - it accesses the plugin file from bp-xmlrpc-loader.php directly, which eliminates the need for calling wp-load.php. It does this by checking for a GET parameter of "bp_xmlrpc=true", as follows:

http://www.mysite.com/index.php?bp_xmlrpc=true

If this url is accessed, it will include the bp-xmlrpc.php file and exit();

The best part from my end is I can still hardcode the location and have the user only input the base site url. Please let me know what you think.

@eduardoweiland
Copy link
Owner

I was planning to change the way the plugin works to use the default Wordpress XMLRPC implementarion. This way will make all the URL to be always known ("/xmlrpc.php").

But about including or not wp-load.php, I need to think about this. Maybe this can solve some compatibility issues I'm having with some plugins, or maybe it can be worst.

@yuttadhammo
Copy link
Contributor Author

I think the point is wp-load is already called, so no need to go looking
for it...
On Jan 18, 2013 10:31 PM, "Eduardo Weiland" notifications@github.com
wrote:

I was planning to change the way the plugin works to use the default
Wordpress XMLRPC implementarion. This way will make all the URL to be
always known ("/xmlrpc.php").

But about including or not wp-load.php, I need to think about this. Maybe
this can solve some compatibility issues I'm having with some plugins, or
maybe it can be worst.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2#issuecomment-12426844.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants