<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
- <title><?php bloginfo('name'); ?> › <?php echo $title; ?></title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+ <title><?php bloginfo('name'); ?> › <?php echo $title; ?></title>
<?php
wp_admin_css( 'login', true );
wp_admin_css( 'colors-fresh', true );
$message = apply_filters('login_message', $message);
if ( !empty( $message ) ) echo $message . "\n";
- // Incase a plugin uses $error rather than the $errors object
+ // In case a plugin uses $error rather than the $wp_errors object
if ( !empty( $error ) ) {
$wp_error->add('error', $error);
unset($error);
* @param string $input_id Which input to auto-focus
*/
function login_footer($input_id = '') {
- echo "</div>\n";
+ ?>
+ <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
+ </div>
- if ( !empty($input_id) ) {
-?>
+<?php if ( !empty($input_id) ) : ?>
<script type="text/javascript">
try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
if(typeof wpOnload=='function')wpOnload();
</script>
-<?php
- }
-?>
-<p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
+<?php endif; ?>
+
<?php do_action('login_footer'); ?>
</body>
</html>
if ( ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) {
// If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
- if ( is_multisite() && !get_active_blog_for_user($user->id) )
+ if ( is_multisite() && !get_active_blog_for_user($user->id) && !is_super_admin( $user->id ) )
$redirect_to = user_admin_url();
elseif ( is_multisite() && !$user->has_cap('read') )
$redirect_to = get_dashboard_url( $user->id );
<a href="<?php echo site_url('wp-login.php?action=lostpassword', 'login') ?>" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a>
<?php endif; ?>
</p>
-</div>
-<p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
-<?php } else { ?>
-</div>
<?php } ?>
<script type="text/javascript">
<?php } ?>
if(typeof wpOnload=='function')wpOnload();
</script>
-<?php do_action( 'login_footer' ); ?>
-</body>
-</html>
-<?php
+<?php
+login_footer();
break;
} // end action switch
?>