Passed
Push — master ( d5eda6...f93275 )
by Joseph
23s
created
templates/login-form.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @link     github.com/codehaiku/subway The Plugin Repository
18 18
  */
19 19
 
20
-if ( ! defined( 'ABSPATH' ) ) {
20
+if ( ! defined('ABSPATH')) {
21 21
 	return;
22 22
 }
23 23
 
@@ -25,100 +25,100 @@  discard block
 block discarded – undo
25 25
 
26 26
 $message_types = array();
27 27
 
28
-$http_request_login = filter_input( INPUT_GET, 'login', FILTER_SANITIZE_SPECIAL_CHARS );
28
+$http_request_login = filter_input(INPUT_GET, 'login', FILTER_SANITIZE_SPECIAL_CHARS);
29 29
 
30
-$http_request_type = filter_input( INPUT_GET, 'type', FILTER_SANITIZE_SPECIAL_CHARS );
30
+$http_request_type = filter_input(INPUT_GET, 'type', FILTER_SANITIZE_SPECIAL_CHARS);
31 31
 
32
-$http_request_logout = filter_input( INPUT_GET, 'loggedout', FILTER_SANITIZE_SPECIAL_CHARS );
32
+$http_request_logout = filter_input(INPUT_GET, 'loggedout', FILTER_SANITIZE_SPECIAL_CHARS);
33 33
 
34
-if ( isset( $http_request_login ) ) {
34
+if (isset($http_request_login)) {
35 35
 
36
-	if ( 'failed' === $http_request_login ) {
36
+	if ('failed' === $http_request_login) {
37 37
 
38
-		if ( isset( $http_request_type ) ) {
38
+		if (isset($http_request_type)) {
39 39
 
40 40
 			$message_types = array(
41 41
 
42 42
 				'default' => array(
43
-						'message' => __( 'There was an error trying to sign-in to your account. Make sure the credentials below are correct.', 'subway' ),
43
+						'message' => __('There was an error trying to sign-in to your account. Make sure the credentials below are correct.', 'subway'),
44 44
 					),
45 45
 				'__blank' => array(
46
-						'message' => __( 'Required: Username and Password cannot be empty.', 'subway' ),
46
+						'message' => __('Required: Username and Password cannot be empty.', 'subway'),
47 47
 					),
48 48
 				'__userempty' => array(
49
-						'message' => __( 'Required: Username cannot be empty.', 'subway' ),
49
+						'message' => __('Required: Username cannot be empty.', 'subway'),
50 50
 					),
51 51
 				'__passempty' => array(
52
-						'message' => __( 'Required: Password cannot be empty.', 'subway' ),
52
+						'message' => __('Required: Password cannot be empty.', 'subway'),
53 53
 					),
54 54
 				'fb_invalid_email' => array(
55
-						'message' => __( 'Facebook email address is invalid or is not yet verified.', 'subway' ),
55
+						'message' => __('Facebook email address is invalid or is not yet verified.', 'subway'),
56 56
 					),
57 57
 				'fb_error' => array(
58
-						'message' => __( 'Facebook Application Error. Misconfigured or App is rejected.', 'subway' ),
58
+						'message' => __('Facebook Application Error. Misconfigured or App is rejected.', 'subway'),
59 59
 					),
60 60
 				'app_not_live' => array(
61
-						'message' => __( 'Unable to fetch your Facebook Profile.', 'subway' ),
61
+						'message' => __('Unable to fetch your Facebook Profile.', 'subway'),
62 62
 					),
63 63
 				'gears_username_or_email_exists' => array(
64
-						'message' => __( 'Username or email address already exists', 'subway' ),
64
+						'message' => __('Username or email address already exists', 'subway'),
65 65
 					),
66 66
 				'gp_error_authentication' => array(
67
-						'message' => __( 'Google Plus Authentication Error. Invalid Client ID or Secret.', 'subway' ),
67
+						'message' => __('Google Plus Authentication Error. Invalid Client ID or Secret.', 'subway'),
68 68
 					),
69 69
 			);
70 70
 
71 71
 			$message = $message_types['default']['message'];
72 72
 
73
-			if ( array_key_exists( $http_request_type, $message_types ) ) {
73
+			if (array_key_exists($http_request_type, $message_types)) {
74 74
 
75
-				$message = $message_types[ $http_request_type ]['message'];
75
+				$message = $message_types[$http_request_type]['message'];
76 76
 
77 77
 			}
78 78
 
79
-			$error_login_message = '<div id="message" class="error">' . esc_html( $message ) . '</div>';
79
+			$error_login_message = '<div id="message" class="error">' . esc_html($message) . '</div>';
80 80
 
81 81
 		} else {
82 82
 
83
-			$error_login_message = '<div id="message" class="error">' . esc_html__( 'Error: Invalid username and password combination.', 'subway' ) . '</div>';
83
+			$error_login_message = '<div id="message" class="error">' . esc_html__('Error: Invalid username and password combination.', 'subway') . '</div>';
84 84
 
85 85
 		}
86 86
 	}
87 87
 }
88 88
 
89
-if ( isset( $http_request_logout ) ) {
90
-	$error_login_message = '<div id="message" class="success">' . esc_html__( 'You have logged out successfully.', 'subway' ) . '</div>';
89
+if (isset($http_request_logout)) {
90
+	$error_login_message = '<div id="message" class="success">' . esc_html__('You have logged out successfully.', 'subway') . '</div>';
91 91
 }
92 92
 
93
-$http_request_redirected = filter_input( INPUT_GET, '_redirected', FILTER_SANITIZE_SPECIAL_CHARS );
93
+$http_request_redirected = filter_input(INPUT_GET, '_redirected', FILTER_SANITIZE_SPECIAL_CHARS);
94 94
 
95
-if ( isset( $http_request_redirected ) ) {
96
-	$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
+if (isset($http_request_redirected)) {
96
+	$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>';
97 97
 }
98 98
 
99 99
 ?>
100
-<?php if ( ! is_user_logged_in() ) { ?>
100
+<?php if ( ! is_user_logged_in()) { ?>
101 101
 	<div class="mg-top-35 mg-bottom-35 subway-login-form">
102 102
 		<div class="subway-login-form-form">
103 103
 			<div class="subway-login-form__actions">
104 104
 				<h3>
105
-					<?php esc_html_e( 'Account Sign-in', 'subway' ); ?>
105
+					<?php esc_html_e('Account Sign-in', 'subway'); ?>
106 106
 				</h3>
107
-				<?php do_action( 'gears_login_form' ); ?>
107
+				<?php do_action('gears_login_form'); ?>
108 108
 			</div>
109 109
 			<div class="subway-login-form-message">
110
-				<?php echo wp_kses_post( $error_login_message ); ?>
110
+				<?php echo wp_kses_post($error_login_message); ?>
111 111
 			</div>
112 112
 			<div class="subway-login-form__form">
113
-				<?php echo wp_login_form( $atts ); ?>
113
+				<?php echo wp_login_form($atts); ?>
114 114
 			</div>
115 115
 		</div>
116 116
 	</div>
117 117
 <?php } else { ?>
118 118
 	<div class="mg-top-35 mg-bottom-35 subway-login-sucessfull" style="background: #CDDC39; padding: 15px 15px 15px 15px;border-radius: 4px;color: #616161;">
119 119
 		<p style="margin-bottom: 0px;">
120
-			<?php $success_message = apply_filters( 'subway_login_message_success', esc_html__( 'Great! You have succesfully logged in.', 'subway' ) ); ?>
121
-			<?php echo esc_html( $success_message ); ?>
120
+			<?php $success_message = apply_filters('subway_login_message_success', esc_html__('Great! You have succesfully logged in.', 'subway')); ?>
121
+			<?php echo esc_html($success_message); ?>
122 122
 		</p>
123 123
 	</div>
124 124
 <?php } ?>
Please login to merge, or discard this patch.