[wp-trac] [WordPress Trac] #14774: Incorrect sub-directory multisite URL constants (was: Incorrect multisite URL constants)

WordPress Trac wp-trac at lists.automattic.com
Sat Nov 13 01:39:47 UTC 2010


#14774: Incorrect sub-directory multisite URL constants
--------------------------+-------------------------------------------------
 Reporter:  jfarthing84   |        Owner:          
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:          
Component:  Multisite     |      Version:  3.0.1   
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by ev3rywh3re):

  * status:  closed => reopened
  * resolution:  invalid =>


Comment:

 I thought I would reopen this ticket rather than making a new one since
 the summary is correct. Since the WP_CONTENT_URI defined in
 wp_plugin_directory_constants() in default-constants.php uses
 get_option('siteurl'), everything that uses WP_CONTENT_URI will produce
 bad URIs for multisite sub-directory installations.

 To reproduce create a multisite installation, create a sub-blog and use
 some of the *_uri functions.

 examples:


 {{{
 get_stylesheet_directory_uri() - http://site.com/sub-blog/wp-
 content/themes/stylesheet
 get_template_directory_uri() - http://site.com/sub-blog/wp-
 content/themes/template
 }}}

 I've just realized this as I started working to make some themes more
 portable for some of my sub-directory projects. I was planning to start
 using the *_uri functions because I already knew WP_CONTENT_URI was
 defined like that. I might use the filters for those functions since this
 might be a little sticky. In the past I've been using something like:


 {{{
 define( CUSTOM_WP_CONTENT_URI,'http://' . $current_site->domain .
 $current_site->path . 'wp-content');
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14774#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list