Try more ways of getting wp-admin URL in wp_die(). props Nazgul. fixes #4006

git-svn-id: http://svn.automattic.com/wordpress/trunk@6057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-09-07 02:25:54 +00:00
parent 6ecaec3d1f
commit ead6bfebf7
1 changed files with 5 additions and 1 deletions

View File

@ -1182,7 +1182,11 @@ function wp_die( $message, $title = '' ) {
$message = "<p>$message</p>";
}
if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
if ( defined('WP_SITEURL') && '' != WP_SITEURL )
$admin_dir = WP_SITEURL.'/wp-admin/';
elseif (function_exists('get_bloginfo') && '' != get_bloginfo('wpurl'))
$admin_dir = get_bloginfo('wpurl').'/wp-admin/';
elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
$admin_dir = '';
else
$admin_dir = 'wp-admin/';