]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-login.php
Wordpress 3.2
[autoinstalls/wordpress.git] / wp-login.php
index 0f471b0d7b7b14d0fe2b7715c381c41649cbf3f1..ffa00ab070472057220def18486eb532a3f0a5e0 100644 (file)
@@ -59,8 +59,8 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
 <!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'); ?> &rsaquo; <?php echo $title; ?></title>
        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+       <title><?php bloginfo('name'); ?> &rsaquo; <?php echo $title; ?></title>
 <?php
        wp_admin_css( 'login', true );
        wp_admin_css( 'colors-fresh', true );
@@ -92,7 +92,7 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
        $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);
@@ -123,18 +123,17 @@ function login_header($title = 'Log In', $message = '', $wp_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(__('&larr; 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(__('&larr; Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
+<?php endif; ?>
+
 <?php do_action('login_footer'); ?>
 </body>
 </html>
@@ -587,7 +586,7 @@ default:
 
                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 );
@@ -664,10 +663,6 @@ default:
 <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(__('&larr; Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
-<?php } else { ?>
-</div>
 <?php } ?>
 
 <script type="text/javascript">
@@ -695,11 +690,9 @@ wp_attempt_focus();
 <?php } ?>
 if(typeof wpOnload=='function')wpOnload();
 </script>
-<?php do_action( 'login_footer' ); ?>
-</body>
-</html>
-<?php
 
+<?php
+login_footer();
 break;
 } // end action switch
 ?>