[wp-trac] Re: [WordPress Trac] #6938: Allow wp-content directory to
exist in a custom location (relative to ABSPATH)
WordPress Trac
wp-trac at lists.automattic.com
Fri May 9 17:16:47 GMT 2008
#6938: Allow wp-content directory to exist in a custom location (relative to
ABSPATH)
-------------------------+--------------------------------------------------
Reporter: sambauers | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.6
Component: General | Version: 2.5.1
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+--------------------------------------------------
Comment (by ryan):
Can we make WP_CONTENT_DIR be an absolute path so that we don't have to
worry with ".."? Things like PLUGINDIR that expect it to be relative to
root will need to be changed around. Something like:
{{{
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
define( 'WP_CONTENT_URL', 'wp-content'); // Relative to
get_option('home'), not ABSPATH
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins'); // Used for
plugin_basename()
define( 'PLUGINDIR', 'wp-content/plugins'); // Relative to ABSPATH. For
back compat.
}}}
Calculating WP_CONTENT_URL will require stripping get_home_path() from
ABSPATH to get a path relative to home rather than siteurl.
--
Ticket URL: <http://trac.wordpress.org/ticket/6938#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list