Ticket #18489: 18489.patch
File 18489.patch, 2.9 KB (added by , 12 years ago) |
---|
-
wp-includes/default-constants.php
# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /Applications/MAMP/htdocs/WordPressCore/trunk # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process.
298 298 299 299 } 300 300 301 /** 302 * Defines uploads directory WordPress constants 303 * 304 * @since 3.3 305 */ 306 function wp_uploads_constants() { 307 /** 308 * Allows for the uploads directory to be moved from the default location. 309 * 310 * @since 3.3 311 */ 312 if ( !defined('WP_UPLOADS_DIR') ) 313 define('WP_UPLOADS_DIR', WP_CONTENT_DIR . '/uploads'); 314 315 /** 316 * Allows for the uploads directory to be moved from the default location. 317 * 318 * @since 3.3 319 */ 320 if ( !defined('WP_UPLOADS_URL') ) 321 define('WP_UPLOADS_URL', WP_CONTENT_URL . '/uploads'); 322 } 323 301 324 ?> -
wp-includes/functions.php
2220 2220 $siteurl = get_option( 'siteurl' ); 2221 2221 $upload_path = get_option( 'upload_path' ); 2222 2222 $upload_path = trim($upload_path); 2223 $main_override = is_multisite() && defined( 'MULTISITE') && is_main_site();2224 if ( empty($upload_path) ) { 2225 $dir = WP_CONTENT_DIR . '/uploads'; 2226 } else{2223 $main_override = is_multisite() && defined('MULTISITE') && is_main_site(); 2224 $dir = WP_UPLOADS_DIR; 2225 2226 if (!empty($upload_path)) { 2227 2227 $dir = $upload_path; 2228 if ( 'wp-content/uploads' == $upload_path ) { 2229 $dir = WP_CONTENT_DIR . '/uploads'; 2230 } elseif ( 0 !== strpos($dir, ABSPATH) ) { 2228 if ('wp-content/uploads' != $upload_path || 0 !== strpos($dir, ABSPATH)) { 2231 2229 // $dir is absolute, $upload_path is (maybe) relative to ABSPATH 2232 $dir = path_join( ABSPATH, $dir);2230 $dir = path_join(ABSPATH, $dir); 2233 2231 } 2234 2232 } 2235 2233 2236 2234 if ( !$url = get_option( 'upload_url_path' ) ) { 2237 2235 if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) 2238 $url = WP_ CONTENT_URL . '/uploads';2236 $url = WP_UPLOADS_URL; 2239 2237 else 2240 2238 $url = trailingslashit( $siteurl ) . $upload_path; 2241 2239 } -
wp-settings.php
153 153 // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in. 154 154 wp_plugin_directory_constants( ); 155 155 156 //Define the uploads directory constants - must be after wp_plugin_directory_constants() because it defines WP_CONTENT_URL 157 wp_uploads_constants(); 158 156 159 // Load must-use plugins. 157 160 foreach ( wp_get_mu_plugins() as $mu_plugin ) { 158 161 include_once( $mu_plugin );