[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
Tue May 27 18:14:04 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    |  
-------------------------+--------------------------------------------------
Old description:

> This enhancement is related to ticket #6933, with similar reasoning.
>
>  1. It's a little more secure if wp-content happens to also be outside
> the webroot
>  2. It allows us to add WordPress as an external repository in other
> projects with plugins/themes/cache engines/database classes that sit
> outside that external repository (we do some of this with bbPress)
>
> WordPress requires a few changes as there are a few hard-coded references
> to wp-content.
>
> If we don't like the constant name I chose ( WP_CONTENT_DIR ), then that
> can be easily changed in the patch.
>
> Relative paths are OK, e.g.
>
> {{{
> define('WP_CONTENT_DIR', '../wp-content');
> }}}
>
> This will almost certainly break a few plugins where wp-config is hard-
> coded, but only when the blog owner chooses to use this feature. Naughty
> plugins should use API calls anyway :)

New description:

 This enhancement is related to ticket #6933, with similar reasoning.

  1. It's a little more secure if wp-content happens to also be outside the
 webroot
  2. It allows us to add WordPress as an external repository in other
 projects with plugins/themes/cache engines/database classes that sit
 outside that external repository (we do some of this with bbPress)

 WordPress requires a few changes as there are a few hard-coded references
 to wp-content.

 If we don't like the constant name I chose ( WP_CONTENT_DIR ), then that
 can be easily changed in the patch.

 This will almost certainly break a few plugins where wp-config is hard-
 coded, but only when the blog owner chooses to use this feature. Naughty
 plugins should use API calls anyway :)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6938#comment:9>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list