Try more ways of getting wp-admin URL in wp_die(). props Nazgul. fixes #4006
git-svn-id: https://develop.svn.wordpress.org/trunk@6057 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1b56625a0d
commit
d065fe3cb8
@ -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/';
|
||||
|
Loading…
Reference in New Issue
Block a user