Changeset 13065
- Timestamp:
- 02/12/2010 08:22:34 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-default-constants.php
r12936 r13065 8 8 9 9 /** 10 * Defines Multisite defaultconstants.10 * Defines Multisite upload constants. 11 11 * 12 12 * @since 3.0.0 13 * @param $context14 13 */ 15 function ms_default_constants( $context ) { 16 switch( $context ) { 17 case 'uploads' : 18 global $wpdb; 19 /** @since 3.0.0 */ 20 if ( !defined( 'UPLOADBLOGSDIR' ) ) 21 define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' ); 22 /** @since 3.0.0 */ 23 if ( !defined( 'UPLOADS' ) ) 24 define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" ); 25 /** @since 3.0.0 */ 26 if ( !defined( 'BLOGUPLOADDIR' ) ) 27 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" ); 28 break; 29 case 'cookies' : 30 global $current_site; 31 /** 32 * @since 1.2.0 33 */ 34 if ( !defined( 'COOKIEPATH' ) ) 35 define( 'COOKIEPATH', $current_site->path ); 36 /** 37 * @since 1.5.0 38 */ 39 if ( !defined( 'SITECOOKIEPATH' ) ) 40 define( 'SITECOOKIEPATH', $current_site->path ); 41 /** 42 * @since 2.6.0 43 */ 44 if ( !defined( 'ADMIN_COOKIE_PATH' ) ) { 45 if( !is_subdomain_install() ) { 46 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); 47 } else { 48 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); 49 } 50 } 51 /** 52 * @since 2.0.0 53 */ 54 if ( !defined('COOKIE_DOMAIN') ) 55 define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain); 56 break; 57 case 'ms-files' : 58 /** 59 * Optional support for X-Sendfile header 60 * @since 3.0.0 61 */ 62 if ( !defined( 'WPMU_SENDFILE' ) ) 63 define( 'WPMU_SENDFILE', false ); 64 /** 65 * Optional support for X-Accel-Redirect header 66 * @since 3.0.0 67 */ 68 if ( !defined( 'WPMU_ACCEL_REDIRECT' ) ) 69 define( 'WPMU_ACCEL_REDIRECT', false ); 70 break; 14 function ms_upload_constants( ) { 15 global $wpdb; 16 17 /** @since 3.0.0 */ 18 if ( !defined( 'UPLOADBLOGSDIR' ) ) 19 define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' ); 20 21 /** @since 3.0.0 */ 22 if ( !defined( 'UPLOADS' ) ) 23 define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" ); 24 25 /** @since 3.0.0 */ 26 if ( !defined( 'BLOGUPLOADDIR' ) ) 27 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" ); 28 } 29 30 /** 31 * Defines Multisite cookie constants. 32 * 33 * @since 3.0.0 34 */ 35 function ms_cookie_constants( ) { 36 global $current_site; 37 38 /** 39 * @since 1.2.0 40 */ 41 if ( !defined( 'COOKIEPATH' ) ) 42 define( 'COOKIEPATH', $current_site->path ); 43 44 /** 45 * @since 1.5.0 46 */ 47 if ( !defined( 'SITECOOKIEPATH' ) ) 48 define( 'SITECOOKIEPATH', $current_site->path ); 49 50 /** 51 * @since 2.6.0 52 */ 53 if ( !defined( 'ADMIN_COOKIE_PATH' ) ) { 54 if( !is_subdomain_install() ) { 55 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); 56 } else { 57 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); 58 } 71 59 } 60 61 /** 62 * @since 2.0.0 63 */ 64 if ( !defined('COOKIE_DOMAIN') ) 65 define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain); 66 } 67 68 /** 69 * Defines Multisite file constants. 70 * 71 * @since 3.0.0 72 */ 73 function ms_file_constants( ) { 74 /** 75 * Optional support for X-Sendfile header 76 * @since 3.0.0 77 */ 78 if ( !defined( 'WPMU_SENDFILE' ) ) 79 define( 'WPMU_SENDFILE', false ); 80 81 /** 82 * Optional support for X-Accel-Redirect header 83 * @since 3.0.0 84 */ 85 if ( !defined( 'WPMU_ACCEL_REDIRECT' ) ) 86 define( 'WPMU_ACCEL_REDIRECT', false ); 72 87 } 73 88 ?> -
trunk/wp-includes/ms-files.php
r13040 r13065 14 14 } 15 15 16 ms_ default_constants( 'ms-files');16 ms_file_constants( ); 17 17 18 18 error_reporting( 0 ); -
trunk/wp-includes/ms-settings.php
r12921 r13065 125 125 126 126 // Define upload directory constants 127 ms_ default_constants( 'uploads');127 ms_upload_constants( ); 128 128 129 129 ?> -
trunk/wp-settings.php
r13064 r13065 151 151 } 152 152 unset($file); 153 ms_default_constants( 'cookies' ); 153 154 ms_cookie_constants( ); 154 155 } 155 156
Note: See TracChangeset
for help on using the changeset viewer.