WordPress.org

Forums

TubePress
TubePress ignores custom content settings (WP_CONTENT_DIR, WP_CONTENT_URL)) (1 post)

  1. Travis Tubbs
    Member
    Posted 3 years ago #

    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 and WP_CONTENT_URL in the wp-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 has wp-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).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TubePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic