TubePress ignores custom content settings (WP_CONTENT_DIR, WP_CONTENT_URL))
-
For security and safety reasons, I keep my WordPress content folder separate from my WordPress Core files. It seems TubePress doesn’t respect the use of
WP_CONTENT_DIR
andWP_CONTENT_URL
in thewp-config.php
file, thus prevents it from rendering properly (both in the admin and front-end).To fix this problem, you will need to change the following code
File:tubepress/sys/classes/org/tubepress/impl/bootstrap/FreeWordPressPluginBootstrapper.class.php
Line: 46
From:$tubepress_base_url = get_option('siteurl') . "/wp-content/plugins/$baseName";
To:if (!defined('WP_CONTENT_URL')) define('WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content'); if (!defined('WP_CONTENT_DIR')) define('WP_CONTENT_DIR', ABSPATH . 'wp-content'); if (!defined('WP_PLUGIN_URL')) define('WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins'); if (!defined('WP_PLUGIN_DIR')) define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins'); $tubepress_base_url = WP_PLUGIN_URL . "/$baseName";
There is another line of code in
tubepress/sys/classes/org/tubepress/impl/environment/SimpleEnvironmentDetector.class.php
that also haswp-content
hardcoded, but I’m not sure how this is being called and what it’s being used for, so I’m not sure how this could be fixed.Question: Will these issues be fixed in a later version of TubePress? I think I had to do something similar with a previous version of TubePress too (which is probably where I got the original fix from).
- The topic ‘TubePress ignores custom content settings (WP_CONTENT_DIR, WP_CONTENT_URL))’ is closed to new replies.