[wp-trac] [WordPress Trac] #35151: New constant `WP_CONTENT_DIR_NAME`

WordPress Trac noreply at wordpress.org
Wed Apr 27 14:04:11 UTC 2016


#35151: New constant `WP_CONTENT_DIR_NAME`
-----------------------------------------+----------------------
 Reporter:  sebastian.pisula             |       Owner:
     Type:  enhancement                  |      Status:  closed
 Priority:  normal                       |   Milestone:
Component:  General                      |     Version:
 Severity:  normal                       |  Resolution:  wontfix
 Keywords:  has-patch 2nd-opinion close  |     Focuses:
-----------------------------------------+----------------------
Changes (by aaroncampbell):

 * status:  reopened => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 I agree with @dd32 that the common use case of `WP_CONTENT_DIR` and
 `WP_CONTENT_URL` is to move the content directory rather than just rename
 it (usually to keep WP in it's own directory to be pulled in as an
 external). I'm honestly not sure what the benefit would be of renaming it
 where it sits.

 Having said all that, you '''can''' define these constants in a way that
 works as you push from dev to staging to live. I often use separate config
 files for those environments, but if you want to keep them all the same,
 try something like this:
 {{{
 define( 'WP_CONTENT_DIR', __DIR__ . '/content' );
 define( 'WP_CONTENT_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/content'
 );
 }}}

 I really don't think we need another constant here.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35151#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list