[this is not a Multisite question]
Update: this question is a logical impossibility, or a mind loop if you will, check update bellow.
The technique is laid out here in WPEngineer.
It allows having a single plugins folder to serve many WordPress sites running in the same server.
So, all my development sites have this in wp-config.php
define( 'WP_PLUGIN_DIR', '/www_dev/base-site/wp-content/plugins' ); define( 'WP_PLUGIN_URL', 'http://base-site.dev/wp-content/plugins');
Only the base-site has a plugins folder and don't have this constants set in its wp-config.
I found a situation where I am in other-site.dev and the plugin tries to call base-site.dev, as follows:
- the plugin in question is Advanced Custom Fields, but I guess it can happen in any other
- the Export XML function of the plugin calls this address
- in theory, it should be
http://other-site.dev/wp-content/plugins/advanced-custom-fields/core/actions/export.php, but this address doesn't exist
The plugin builds the form action that executes the export function using this variable
$this->dir = plugins_url('',__FILE__);
The question is: could we make an htaccess rule or apply a filter to overcome this issue?
After anmari input and taking a closer look, I think there's no solution for this.
The plugins_url uses
The plugin is rendering the following html:
<form action="http://base-site.dev/wp-content/plugins/advanced-custom-fields/core/actions/export.php" method="post">
and there is no, and never will be, anything like:
<form action="http://other-site.dev/wp-content/plugins/advanced-custom-fields/core/actions/export.php" method="post">