Don't show admin bar on login screen. Props nacin. fixes #16588 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@17508 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b08c4772fa
commit
65ecd2daaa
@ -337,14 +337,14 @@ function show_admin_bar( $show ) {
|
|||||||
* @return bool Whether the admin bar should be showing.
|
* @return bool Whether the admin bar should be showing.
|
||||||
*/
|
*/
|
||||||
function is_admin_bar_showing() {
|
function is_admin_bar_showing() {
|
||||||
global $show_admin_bar;
|
global $show_admin_bar, $pagenow;
|
||||||
|
|
||||||
/* For all these types of request we never want an admin bar period */
|
/* For all these types of request we never want an admin bar period */
|
||||||
if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
|
if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( ! isset( $show_admin_bar ) ) {
|
if ( ! isset( $show_admin_bar ) ) {
|
||||||
if ( ! is_user_logged_in() ) {
|
if ( ! is_user_logged_in() || 'wp-login.php' == $pagenow ) {
|
||||||
$show_admin_bar = false;
|
$show_admin_bar = false;
|
||||||
} else {
|
} else {
|
||||||
$context = is_admin() ? 'admin' : 'front';
|
$context = is_admin() ? 'admin' : 'front';
|
||||||
|
Loading…
Reference in New Issue
Block a user