Ticket #15289: 15289.1.diff
| File 15289.1.diff, 2.4 KB (added by , 15 years ago) |
|---|
-
wp-includes/default-constants.php
126 126 */ 127 127 if ( !defined( 'MUPLUGINDIR' ) ) 128 128 define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); // Relative to ABSPATH. For back compat. 129 130 /** 131 * Allows for a different path to be used to access the wp-admin directory, without renaming the directory. 132 * 133 * @since 3.1.0 134 */ 135 if ( !defined('WP_ADMIN_URL') ) 136 define( 'WP_ADMIN_URL', 'wp-admin' ); 129 137 } 130 138 131 139 /** -
wp-includes/link-template.php
2054 2054 * @return string Admin url link with optional path appended 2055 2055 */ 2056 2056 function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) { 2057 $url = get_site_url($blog_id, 'wp-admin/', $scheme);2057 $url = get_site_url($blog_id, WP_ADMIN_URL.'/', $scheme); 2058 2058 2059 2059 if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) 2060 2060 $url .= ltrim($path, '/'); … … 2223 2223 * @return string Admin url link with optional path appended 2224 2224 */ 2225 2225 function network_admin_url( $path = '', $scheme = 'admin' ) { 2226 $url = network_site_url( 'wp-admin/network/', $scheme);2226 $url = network_site_url(WP_ADMIN_URL.'/network/', $scheme); 2227 2227 2228 2228 if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) 2229 2229 $url .= ltrim($path, '/'); … … 2242 2242 * @return string Admin url link with optional path appended 2243 2243 */ 2244 2244 function user_admin_url( $path = '', $scheme = 'admin' ) { 2245 $url = network_site_url( 'wp-admin/user/', $scheme);2245 $url = network_site_url(WP_ADMIN_URL.'/user/', $scheme); 2246 2246 2247 2247 if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) 2248 2248 $url .= ltrim($path, '/'); -
wp-admin/admin.php
29 29 30 30 require_once(dirname(dirname(__FILE__)) . '/wp-load.php'); 31 31 32 $request_path = array_shift(explode('/',$_SERVER['REQUEST_URI'])); 33 if (array_shift($request_path) != WP_ADMIN_URL) { 34 wp_redirect(admin_url(implode('/', $request_path))); 35 exit; 36 } 37 32 38 if ( get_option('db_upgraded') ) { 33 39 $wp_rewrite->flush_rules(); 34 40 update_option( 'db_upgraded', false );