[wp-trac] [WordPress Trac] #23483: Incorrect image URL for subsites when using UPLOADS constant on multisite subdirectory installation
WordPress Trac
noreply at wordpress.org
Fri Feb 15 19:02:02 UTC 2013
#23483: Incorrect image URL for subsites when using UPLOADS constant on multisite
subdirectory installation
------------------------------+------------------------------
Reporter: creativeinfusion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.5.1
Severity: normal | Resolution:
Keywords: |
------------------------------+------------------------------
Comment (by creativeinfusion):
Tentative fix - check if multisite and not using subdomain install and use
network_site_url instead
{{{
if ( defined( 'UPLOADS' ) && ! ( is_multisite() &&
get_site_option( 'ms_files_rewriting' ) ) ) {
$dir = ABSPATH . UPLOADS;
if ( is_multsite() && is_subdomain_install() ) {
$url = trailingslashit( $siteurl ) . UPLOADS;
} else {
$url = trailingslashit( network_site_url() ) .
UPLOADS;
}
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23483#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list