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:
parent
6ecaec3d1f
commit
ead6bfebf7
|
@ -1182,7 +1182,11 @@ function wp_die( $message, $title = '' ) {
|
||||||
$message = "<p>$message</p>";
|
$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 = '';
|
$admin_dir = '';
|
||||||
else
|
else
|
||||||
$admin_dir = 'wp-admin/';
|
$admin_dir = 'wp-admin/';
|
||||||
|
|
Loading…
Reference in New Issue