Changes to work in multisite installation
-
I am working at moving a site I built using Download Manager to become part of a multi-site installation. In doing so, I found out that part of the code was not written to work on multisite installations. Please make the following updates to download-manager.php to work on multisite installations. These changes will also work in single site setups.
define('UPLOAD_DIR', wp_upload_dir()['basedir'].'/download-manager-files/'); define('WPDM_CACHE_DIR',dirname(__FILE__).'/cache/'); define('_DEL_DIR',wp_upload_dir()['basedir'].'/download-manager-files'); define('UPLOAD_BASE',wp_upload_dir()['basedir']);
Basically, use the wp_upload_dir function instead of trying to create these paths from the Content directory. This is needed since each sub-site in a multisite installation gets assigned its own upload directory.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Changes to work in multisite installation’ is closed to new replies.