Passed
Push — master ( ae7108...58dda0 )
by Joseph
69:36 queued 35:36
created
templates/login-form.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@  discard block
 block discarded – undo
10 10
  * @package Subway
11 11
  */
12 12
 
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	return;
15 15
 }
16 16
 
17 17
 $args = array(
18 18
 	'echo'           => true,
19 19
 	'form_id'        => 'loginform',
20
-	'label_username' => __( 'Username', 'subway' ),
21
-	'label_password' => __( 'Password', 'subway' ),
22
-	'label_remember' => __( 'Remember Me', 'subway' ),
23
-	'label_log_in'   => __( 'Log In', 'subway' ),
20
+	'label_username' => __('Username', 'subway'),
21
+	'label_password' => __('Password', 'subway'),
22
+	'label_remember' => __('Remember Me', 'subway'),
23
+	'label_log_in'   => __('Log In', 'subway'),
24 24
 	'id_username'    => 'user_login',
25 25
 	'id_password'    => 'user_pass',
26 26
 	'id_remember'    => 'rememberme',
@@ -35,87 +35,87 @@  discard block
 block discarded – undo
35 35
 
36 36
 $message_types = array();
37 37
 
38
-if ( isset( $_GET['login'] ) ) {
38
+if (isset($_GET['login'])) {
39 39
 
40
-	if ( 'failed' === $_GET['login'] ) {
40
+	if ('failed' === $_GET['login']) {
41 41
 
42
-		if ( isset( $_GET['type'] ) ) {
42
+		if (isset($_GET['type'])) {
43 43
 
44 44
 			$message_types = array(
45 45
 
46 46
 				'default' => array(
47
-						'message' => __( 'There was an error trying to sign-in to your account. Make sure the credentials below are correct.', 'subway' ),
47
+						'message' => __('There was an error trying to sign-in to your account. Make sure the credentials below are correct.', 'subway'),
48 48
 					),
49 49
 				'__blank' => array(
50
-						'message' => __( 'Required: Username and Password cannot be empty.', 'subway' ),
50
+						'message' => __('Required: Username and Password cannot be empty.', 'subway'),
51 51
 					),
52 52
 				'__userempty' => array(
53
-						'message' => __( 'Required: Username cannot be empty.', 'subway' ),
53
+						'message' => __('Required: Username cannot be empty.', 'subway'),
54 54
 					),
55 55
 				'__passempty' => array(
56
-						'message' => __( 'Required: Password cannot be empty.', 'subway' ),
56
+						'message' => __('Required: Password cannot be empty.', 'subway'),
57 57
 					),
58 58
 				'fb_invalid_email' => array(
59
-						'message' => __( 'Facebook email address is invalid or is not yet verified.', 'subway' ),
59
+						'message' => __('Facebook email address is invalid or is not yet verified.', 'subway'),
60 60
 					),
61 61
 				'fb_error' => array(
62
-						'message' => __( 'Facebook Application Error. Misconfigured or App is rejected.', 'subway' ),
62
+						'message' => __('Facebook Application Error. Misconfigured or App is rejected.', 'subway'),
63 63
 					),
64 64
 				'app_not_live' => array(
65
-						'message' => __( 'Unable to fetch your Facebook Profile.', 'subway' ),
65
+						'message' => __('Unable to fetch your Facebook Profile.', 'subway'),
66 66
 					),
67 67
 				'gears_username_or_email_exists' => array(
68
-						'message' => __( 'Username or email address already exists', 'subway' ),
68
+						'message' => __('Username or email address already exists', 'subway'),
69 69
 					),
70 70
 				'gp_error_authentication' => array(
71
-						'message' => __( 'Google Plus Authentication Error. Invalid Client ID or Secret.', 'subway' ),
71
+						'message' => __('Google Plus Authentication Error. Invalid Client ID or Secret.', 'subway'),
72 72
 					),
73 73
 			);
74 74
 
75 75
 			$message = $message_types['default']['message'];
76 76
 
77
-			if ( array_key_exists( $_GET['type'], $message_types ) ) {
77
+			if (array_key_exists($_GET['type'], $message_types)) {
78 78
 
79
-				$message = $message_types[ $_GET['type'] ]['message'];
79
+				$message = $message_types[$_GET['type']]['message'];
80 80
 
81 81
 			}
82 82
 
83
-			$error_login_message = '<div id="message" class="error">'. esc_html( $message ) .'</div>';
83
+			$error_login_message = '<div id="message" class="error">' . esc_html($message) . '</div>';
84 84
 
85 85
 		} else {
86 86
 
87
-			$error_login_message = '<div id="message" class="error">'. esc_html__ ( 'Error: Invalid username and password combination.', 'subway' ).'</div>';
87
+			$error_login_message = '<div id="message" class="error">' . esc_html__('Error: Invalid username and password combination.', 'subway') . '</div>';
88 88
 
89 89
 		}
90 90
 	}
91 91
 }
92 92
 
93
-if ( isset( $_GET['_redirected'] ) ) {
94
-	$error_login_message = '<div id="message" class="success">' . esc_html__( 'Members only page. Please use the login form below to access the page.', 'subway' ) . '</div>';
93
+if (isset($_GET['_redirected'])) {
94
+	$error_login_message = '<div id="message" class="success">' . esc_html__('Members only page. Please use the login form below to access the page.', 'subway') . '</div>';
95 95
 }
96 96
 
97 97
 ?>
98
-<?php if ( ! is_user_logged_in() ) { ?>
98
+<?php if ( ! is_user_logged_in()) { ?>
99 99
 	<div class="mg-top-35 mg-bottom-35 subway-login-form">
100 100
 		<div class="subway-login-form-form">
101 101
 			<div class="subway-login-form__actions">
102 102
 				<h3>
103
-					<?php esc_html_e( 'Account Sign-in', 'subway' ); ?>
103
+					<?php esc_html_e('Account Sign-in', 'subway'); ?>
104 104
 				</h3>
105
-				<?php do_action( 'gears_login_form' ); ?>
105
+				<?php do_action('gears_login_form'); ?>
106 106
 			</div>
107 107
 			<div class="subway-login-form-message">
108 108
 				<?php echo $error_login_message; ?>
109 109
 			</div>
110 110
 			<div class="subway-login-form__form">
111
-				<?php echo wp_login_form( $args ); ?>
111
+				<?php echo wp_login_form($args); ?>
112 112
 			</div>
113 113
 		</div>
114 114
 	</div>
115 115
 <?php } else { ?>
116 116
 	<div class="mg-top-35 mg-bottom-35 subway-login-sucessfull" style="background: #CDDC39; padding: 15px 15px 15px 15px;border-radius: 4px;color: #616161;">
117 117
 		<p style="margin-bottom: 0px;">
118
-			<?php echo esc_html__( apply_filters( 'subway_login_message', 'Great! You have succesfully login.' ), 'subway' ); ?>
118
+			<?php echo esc_html__(apply_filters('subway_login_message', 'Great! You have succesfully login.'), 'subway'); ?>
119 119
 		</p>
120 120
 	</div>
121 121
 <?php } ?>
Please login to merge, or discard this patch.