Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../public_h...
File: wp-login.php
'type' => 'info',
[1000] Fix | Delete
'additional_classes' => array( 'message', 'reset-pass' ),
[1001] Fix | Delete
)
[1002] Fix | Delete
)
[1003] Fix | Delete
);
[1004] Fix | Delete
login_footer();
[1005] Fix | Delete
exit;
[1006] Fix | Delete
}
[1007] Fix | Delete
[1008] Fix | Delete
wp_enqueue_script( 'utils' );
[1009] Fix | Delete
wp_enqueue_script( 'user-profile' );
[1010] Fix | Delete
[1011] Fix | Delete
login_header(
[1012] Fix | Delete
__( 'Reset Password' ),
[1013] Fix | Delete
wp_get_admin_notice(
[1014] Fix | Delete
__( 'Enter your new password below or generate one.' ),
[1015] Fix | Delete
array(
[1016] Fix | Delete
'type' => 'info',
[1017] Fix | Delete
'additional_classes' => array( 'message', 'reset-pass' ),
[1018] Fix | Delete
)
[1019] Fix | Delete
),
[1020] Fix | Delete
$errors
[1021] Fix | Delete
);
[1022] Fix | Delete
[1023] Fix | Delete
?>
[1024] Fix | Delete
<form name="resetpassform" id="resetpassform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=resetpass', 'login_post' ) ); ?>" method="post" autocomplete="off">
[1025] Fix | Delete
<input type="hidden" id="user_login" value="<?php echo esc_attr( $rp_login ); ?>" autocomplete="off" />
[1026] Fix | Delete
[1027] Fix | Delete
<div class="user-pass1-wrap">
[1028] Fix | Delete
<p>
[1029] Fix | Delete
<label for="pass1"><?php _e( 'New password' ); ?></label>
[1030] Fix | Delete
</p>
[1031] Fix | Delete
[1032] Fix | Delete
<div class="wp-pwd">
[1033] Fix | Delete
<input type="password" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" aria-describedby="pass-strength-result" />
[1034] Fix | Delete
[1035] Fix | Delete
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
[1036] Fix | Delete
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
[1037] Fix | Delete
</button>
[1038] Fix | Delete
<div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div>
[1039] Fix | Delete
</div>
[1040] Fix | Delete
<div class="pw-weak">
[1041] Fix | Delete
<input type="checkbox" name="pw_weak" id="pw-weak" class="pw-checkbox" />
[1042] Fix | Delete
<label for="pw-weak"><?php _e( 'Confirm use of weak password' ); ?></label>
[1043] Fix | Delete
</div>
[1044] Fix | Delete
</div>
[1045] Fix | Delete
[1046] Fix | Delete
<p class="user-pass2-wrap">
[1047] Fix | Delete
<label for="pass2"><?php _e( 'Confirm new password' ); ?></label>
[1048] Fix | Delete
<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="new-password" spellcheck="false" />
[1049] Fix | Delete
</p>
[1050] Fix | Delete
[1051] Fix | Delete
<p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
[1052] Fix | Delete
[1053] Fix | Delete
<?php
[1054] Fix | Delete
[1055] Fix | Delete
/**
[1056] Fix | Delete
* Fires following the 'Strength indicator' meter in the user password reset form.
[1057] Fix | Delete
*
[1058] Fix | Delete
* @since 3.9.0
[1059] Fix | Delete
*
[1060] Fix | Delete
* @param WP_User $user User object of the user whose password is being reset.
[1061] Fix | Delete
*/
[1062] Fix | Delete
do_action( 'resetpass_form', $user );
[1063] Fix | Delete
[1064] Fix | Delete
?>
[1065] Fix | Delete
<input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
[1066] Fix | Delete
<p class="submit reset-pass-submit">
[1067] Fix | Delete
<button type="button" class="button wp-generate-pw hide-if-no-js skip-aria-expanded"><?php _e( 'Generate Password' ); ?></button>
[1068] Fix | Delete
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Save Password' ); ?>" />
[1069] Fix | Delete
</p>
[1070] Fix | Delete
</form>
[1071] Fix | Delete
[1072] Fix | Delete
<p id="nav">
[1073] Fix | Delete
<a class="wp-login-log-in" href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
[1074] Fix | Delete
<?php
[1075] Fix | Delete
[1076] Fix | Delete
if ( get_option( 'users_can_register' ) ) {
[1077] Fix | Delete
$registration_url = sprintf( '<a class="wp-login-register" href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
[1078] Fix | Delete
[1079] Fix | Delete
echo esc_html( $login_link_separator );
[1080] Fix | Delete
[1081] Fix | Delete
/** This filter is documented in wp-includes/general-template.php */
[1082] Fix | Delete
echo apply_filters( 'register', $registration_url );
[1083] Fix | Delete
}
[1084] Fix | Delete
[1085] Fix | Delete
?>
[1086] Fix | Delete
</p>
[1087] Fix | Delete
<?php
[1088] Fix | Delete
[1089] Fix | Delete
login_footer( 'pass1' );
[1090] Fix | Delete
break;
[1091] Fix | Delete
[1092] Fix | Delete
case 'register':
[1093] Fix | Delete
if ( is_multisite() ) {
[1094] Fix | Delete
/**
[1095] Fix | Delete
* Filters the Multisite sign up URL.
[1096] Fix | Delete
*
[1097] Fix | Delete
* @since 3.0.0
[1098] Fix | Delete
*
[1099] Fix | Delete
* @param string $sign_up_url The sign up URL.
[1100] Fix | Delete
*/
[1101] Fix | Delete
wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) );
[1102] Fix | Delete
exit;
[1103] Fix | Delete
}
[1104] Fix | Delete
[1105] Fix | Delete
if ( ! get_option( 'users_can_register' ) ) {
[1106] Fix | Delete
wp_redirect( site_url( 'wp-login.php?registration=disabled' ) );
[1107] Fix | Delete
exit;
[1108] Fix | Delete
}
[1109] Fix | Delete
[1110] Fix | Delete
$user_login = '';
[1111] Fix | Delete
$user_email = '';
[1112] Fix | Delete
[1113] Fix | Delete
if ( $http_post ) {
[1114] Fix | Delete
if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) {
[1115] Fix | Delete
$user_login = wp_unslash( $_POST['user_login'] );
[1116] Fix | Delete
}
[1117] Fix | Delete
[1118] Fix | Delete
if ( isset( $_POST['user_email'] ) && is_string( $_POST['user_email'] ) ) {
[1119] Fix | Delete
$user_email = wp_unslash( $_POST['user_email'] );
[1120] Fix | Delete
}
[1121] Fix | Delete
[1122] Fix | Delete
$errors = register_new_user( $user_login, $user_email );
[1123] Fix | Delete
[1124] Fix | Delete
if ( ! is_wp_error( $errors ) ) {
[1125] Fix | Delete
$redirect_to = ! empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
[1126] Fix | Delete
wp_safe_redirect( $redirect_to );
[1127] Fix | Delete
exit;
[1128] Fix | Delete
}
[1129] Fix | Delete
}
[1130] Fix | Delete
[1131] Fix | Delete
$registration_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
[1132] Fix | Delete
[1133] Fix | Delete
/**
[1134] Fix | Delete
* Filters the registration redirect URL.
[1135] Fix | Delete
*
[1136] Fix | Delete
* @since 3.0.0
[1137] Fix | Delete
* @since 5.9.0 Added the `$errors` parameter.
[1138] Fix | Delete
*
[1139] Fix | Delete
* @param string $registration_redirect The redirect destination URL.
[1140] Fix | Delete
* @param int|WP_Error $errors User id if registration was successful,
[1141] Fix | Delete
* WP_Error object otherwise.
[1142] Fix | Delete
*/
[1143] Fix | Delete
$redirect_to = apply_filters( 'registration_redirect', $registration_redirect, $errors );
[1144] Fix | Delete
[1145] Fix | Delete
login_header(
[1146] Fix | Delete
__( 'Registration Form' ),
[1147] Fix | Delete
wp_get_admin_notice(
[1148] Fix | Delete
__( 'Register For This Site' ),
[1149] Fix | Delete
array(
[1150] Fix | Delete
'type' => 'info',
[1151] Fix | Delete
'additional_classes' => array( 'message', 'register' ),
[1152] Fix | Delete
)
[1153] Fix | Delete
),
[1154] Fix | Delete
$errors
[1155] Fix | Delete
);
[1156] Fix | Delete
[1157] Fix | Delete
?>
[1158] Fix | Delete
<form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
[1159] Fix | Delete
<p>
[1160] Fix | Delete
<label for="user_login"><?php _e( 'Username' ); ?></label>
[1161] Fix | Delete
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" autocapitalize="off" autocomplete="username" required="required" />
[1162] Fix | Delete
</p>
[1163] Fix | Delete
<p>
[1164] Fix | Delete
<label for="user_email"><?php _e( 'Email' ); ?></label>
[1165] Fix | Delete
<input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" autocomplete="email" required="required" />
[1166] Fix | Delete
</p>
[1167] Fix | Delete
<?php
[1168] Fix | Delete
[1169] Fix | Delete
/**
[1170] Fix | Delete
* Fires following the 'Email' field in the user registration form.
[1171] Fix | Delete
*
[1172] Fix | Delete
* @since 2.1.0
[1173] Fix | Delete
*/
[1174] Fix | Delete
do_action( 'register_form' );
[1175] Fix | Delete
[1176] Fix | Delete
?>
[1177] Fix | Delete
<p id="reg_passmail">
[1178] Fix | Delete
<?php _e( 'Registration confirmation will be emailed to you.' ); ?>
[1179] Fix | Delete
</p>
[1180] Fix | Delete
<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
[1181] Fix | Delete
<p class="submit">
[1182] Fix | Delete
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Register' ); ?>" />
[1183] Fix | Delete
</p>
[1184] Fix | Delete
</form>
[1185] Fix | Delete
[1186] Fix | Delete
<p id="nav">
[1187] Fix | Delete
<a class="wp-login-log-in" href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
[1188] Fix | Delete
<?php
[1189] Fix | Delete
[1190] Fix | Delete
echo esc_html( $login_link_separator );
[1191] Fix | Delete
[1192] Fix | Delete
$html_link = sprintf( '<a class="wp-login-lost-password" href="%s">%s</a>', esc_url( wp_lostpassword_url() ), __( 'Lost your password?' ) );
[1193] Fix | Delete
[1194] Fix | Delete
/** This filter is documented in wp-login.php */
[1195] Fix | Delete
echo apply_filters( 'lost_password_html_link', $html_link );
[1196] Fix | Delete
[1197] Fix | Delete
?>
[1198] Fix | Delete
</p>
[1199] Fix | Delete
<?php
[1200] Fix | Delete
[1201] Fix | Delete
login_footer( 'user_login' );
[1202] Fix | Delete
break;
[1203] Fix | Delete
[1204] Fix | Delete
case 'checkemail':
[1205] Fix | Delete
$redirect_to = admin_url();
[1206] Fix | Delete
$errors = new WP_Error();
[1207] Fix | Delete
[1208] Fix | Delete
if ( 'confirm' === $_GET['checkemail'] ) {
[1209] Fix | Delete
$errors->add(
[1210] Fix | Delete
'confirm',
[1211] Fix | Delete
sprintf(
[1212] Fix | Delete
/* translators: %s: Link to the login page. */
[1213] Fix | Delete
__( 'Check your email for the confirmation link, then visit the <a href="%s">login page</a>.' ),
[1214] Fix | Delete
wp_login_url()
[1215] Fix | Delete
),
[1216] Fix | Delete
'message'
[1217] Fix | Delete
);
[1218] Fix | Delete
} elseif ( 'registered' === $_GET['checkemail'] ) {
[1219] Fix | Delete
$errors->add(
[1220] Fix | Delete
'registered',
[1221] Fix | Delete
sprintf(
[1222] Fix | Delete
/* translators: %s: Link to the login page. */
[1223] Fix | Delete
__( 'Registration complete. Please check your email, then visit the <a href="%s">login page</a>.' ),
[1224] Fix | Delete
wp_login_url()
[1225] Fix | Delete
),
[1226] Fix | Delete
'message'
[1227] Fix | Delete
);
[1228] Fix | Delete
}
[1229] Fix | Delete
[1230] Fix | Delete
/** This action is documented in wp-login.php */
[1231] Fix | Delete
$errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
[1232] Fix | Delete
[1233] Fix | Delete
login_header( __( 'Check your email' ), '', $errors );
[1234] Fix | Delete
login_footer();
[1235] Fix | Delete
break;
[1236] Fix | Delete
[1237] Fix | Delete
case 'confirmaction':
[1238] Fix | Delete
if ( ! isset( $_GET['request_id'] ) ) {
[1239] Fix | Delete
wp_die( __( 'Missing request ID.' ) );
[1240] Fix | Delete
}
[1241] Fix | Delete
[1242] Fix | Delete
if ( ! isset( $_GET['confirm_key'] ) ) {
[1243] Fix | Delete
wp_die( __( 'Missing confirm key.' ) );
[1244] Fix | Delete
}
[1245] Fix | Delete
[1246] Fix | Delete
$request_id = (int) $_GET['request_id'];
[1247] Fix | Delete
$key = sanitize_text_field( wp_unslash( $_GET['confirm_key'] ) );
[1248] Fix | Delete
$result = wp_validate_user_request_key( $request_id, $key );
[1249] Fix | Delete
[1250] Fix | Delete
if ( is_wp_error( $result ) ) {
[1251] Fix | Delete
wp_die( $result );
[1252] Fix | Delete
}
[1253] Fix | Delete
[1254] Fix | Delete
/**
[1255] Fix | Delete
* Fires an action hook when the account action has been confirmed by the user.
[1256] Fix | Delete
*
[1257] Fix | Delete
* Using this you can assume the user has agreed to perform the action by
[1258] Fix | Delete
* clicking on the link in the confirmation email.
[1259] Fix | Delete
*
[1260] Fix | Delete
* After firing this action hook the page will redirect to wp-login a callback
[1261] Fix | Delete
* redirects or exits first.
[1262] Fix | Delete
*
[1263] Fix | Delete
* @since 4.9.6
[1264] Fix | Delete
*
[1265] Fix | Delete
* @param int $request_id Request ID.
[1266] Fix | Delete
*/
[1267] Fix | Delete
do_action( 'user_request_action_confirmed', $request_id );
[1268] Fix | Delete
[1269] Fix | Delete
$message = _wp_privacy_account_request_confirmed_message( $request_id );
[1270] Fix | Delete
[1271] Fix | Delete
login_header( __( 'User action confirmed.' ), $message );
[1272] Fix | Delete
login_footer();
[1273] Fix | Delete
exit;
[1274] Fix | Delete
[1275] Fix | Delete
case 'login':
[1276] Fix | Delete
default:
[1277] Fix | Delete
$secure_cookie = '';
[1278] Fix | Delete
$customize_login = isset( $_REQUEST['customize-login'] );
[1279] Fix | Delete
[1280] Fix | Delete
if ( $customize_login ) {
[1281] Fix | Delete
wp_enqueue_script( 'customize-base' );
[1282] Fix | Delete
}
[1283] Fix | Delete
[1284] Fix | Delete
// If the user wants SSL but the session is not SSL, force a secure cookie.
[1285] Fix | Delete
if ( ! empty( $_POST['log'] ) && ! force_ssl_admin() ) {
[1286] Fix | Delete
$user_name = sanitize_user( wp_unslash( $_POST['log'] ) );
[1287] Fix | Delete
$user = get_user_by( 'login', $user_name );
[1288] Fix | Delete
[1289] Fix | Delete
if ( ! $user && strpos( $user_name, '@' ) ) {
[1290] Fix | Delete
$user = get_user_by( 'email', $user_name );
[1291] Fix | Delete
}
[1292] Fix | Delete
[1293] Fix | Delete
if ( $user ) {
[1294] Fix | Delete
if ( get_user_option( 'use_ssl', $user->ID ) ) {
[1295] Fix | Delete
$secure_cookie = true;
[1296] Fix | Delete
force_ssl_admin( true );
[1297] Fix | Delete
}
[1298] Fix | Delete
}
[1299] Fix | Delete
}
[1300] Fix | Delete
[1301] Fix | Delete
if ( isset( $_REQUEST['redirect_to'] ) && is_string( $_REQUEST['redirect_to'] ) ) {
[1302] Fix | Delete
$redirect_to = $_REQUEST['redirect_to'];
[1303] Fix | Delete
// Redirect to HTTPS if user wants SSL.
[1304] Fix | Delete
if ( $secure_cookie && str_contains( $redirect_to, 'wp-admin' ) ) {
[1305] Fix | Delete
$redirect_to = preg_replace( '|^http://|', 'https://', $redirect_to );
[1306] Fix | Delete
}
[1307] Fix | Delete
} else {
[1308] Fix | Delete
$redirect_to = admin_url();
[1309] Fix | Delete
}
[1310] Fix | Delete
[1311] Fix | Delete
$reauth = empty( $_REQUEST['reauth'] ) ? false : true;
[1312] Fix | Delete
[1313] Fix | Delete
$user = wp_signon( array(), $secure_cookie );
[1314] Fix | Delete
[1315] Fix | Delete
if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
[1316] Fix | Delete
if ( headers_sent() ) {
[1317] Fix | Delete
$user = new WP_Error(
[1318] Fix | Delete
'test_cookie',
[1319] Fix | Delete
sprintf(
[1320] Fix | Delete
/* translators: 1: Browser cookie documentation URL, 2: Support forums URL. */
[1321] Fix | Delete
__( '<strong>Error:</strong> Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
[1322] Fix | Delete
__( 'https://developer.wordpress.org/advanced-administration/wordpress/cookies/' ),
[1323] Fix | Delete
__( 'https://wordpress.org/support/forums/' )
[1324] Fix | Delete
)
[1325] Fix | Delete
);
[1326] Fix | Delete
} elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
[1327] Fix | Delete
// If cookies are disabled, the user can't log in even with a valid username and password.
[1328] Fix | Delete
$user = new WP_Error(
[1329] Fix | Delete
'test_cookie',
[1330] Fix | Delete
sprintf(
[1331] Fix | Delete
/* translators: %s: Browser cookie documentation URL. */
[1332] Fix | Delete
__( '<strong>Error:</strong> Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
[1333] Fix | Delete
__( 'https://developer.wordpress.org/advanced-administration/wordpress/cookies/#enable-cookies-in-your-browser' )
[1334] Fix | Delete
)
[1335] Fix | Delete
);
[1336] Fix | Delete
}
[1337] Fix | Delete
}
[1338] Fix | Delete
[1339] Fix | Delete
$requested_redirect_to = isset( $_REQUEST['redirect_to'] ) && is_string( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
[1340] Fix | Delete
[1341] Fix | Delete
/**
[1342] Fix | Delete
* Filters the login redirect URL.
[1343] Fix | Delete
*
[1344] Fix | Delete
* @since 3.0.0
[1345] Fix | Delete
*
[1346] Fix | Delete
* @param string $redirect_to The redirect destination URL.
[1347] Fix | Delete
* @param string $requested_redirect_to The requested redirect destination URL passed as a parameter.
[1348] Fix | Delete
* @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise.
[1349] Fix | Delete
*/
[1350] Fix | Delete
$redirect_to = apply_filters( 'login_redirect', $redirect_to, $requested_redirect_to, $user );
[1351] Fix | Delete
[1352] Fix | Delete
if ( ! is_wp_error( $user ) && ! $reauth ) {
[1353] Fix | Delete
if ( $interim_login ) {
[1354] Fix | Delete
$message = '<p class="message">' . __( 'You have logged in successfully.' ) . '</p>';
[1355] Fix | Delete
$interim_login = 'success';
[1356] Fix | Delete
login_header( '', $message );
[1357] Fix | Delete
[1358] Fix | Delete
?>
[1359] Fix | Delete
</div>
[1360] Fix | Delete
<?php
[1361] Fix | Delete
[1362] Fix | Delete
/** This action is documented in wp-login.php */
[1363] Fix | Delete
do_action( 'login_footer' );
[1364] Fix | Delete
[1365] Fix | Delete
if ( $customize_login ) {
[1366] Fix | Delete
ob_start();
[1367] Fix | Delete
?>
[1368] Fix | Delete
<script>setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script>
[1369] Fix | Delete
<?php
[1370] Fix | Delete
wp_print_inline_script_tag( wp_remove_surrounding_empty_script_tags( ob_get_clean() ) );
[1371] Fix | Delete
}
[1372] Fix | Delete
[1373] Fix | Delete
?>
[1374] Fix | Delete
</body></html>
[1375] Fix | Delete
<?php
[1376] Fix | Delete
[1377] Fix | Delete
exit;
[1378] Fix | Delete
}
[1379] Fix | Delete
[1380] Fix | Delete
// Check if it is time to add a redirect to the admin email confirmation screen.
[1381] Fix | Delete
if ( $user instanceof WP_User && $user->exists() && $user->has_cap( 'manage_options' ) ) {
[1382] Fix | Delete
$admin_email_lifespan = (int) get_option( 'admin_email_lifespan' );
[1383] Fix | Delete
[1384] Fix | Delete
/*
[1385] Fix | Delete
* If `0` (or anything "falsey" as it is cast to int) is returned, the user will not be redirected
[1386] Fix | Delete
* to the admin email confirmation screen.
[1387] Fix | Delete
*/
[1388] Fix | Delete
/** This filter is documented in wp-login.php */
[1389] Fix | Delete
$admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS );
[1390] Fix | Delete
[1391] Fix | Delete
if ( $admin_email_check_interval > 0 && time() > $admin_email_lifespan ) {
[1392] Fix | Delete
$redirect_to = add_query_arg(
[1393] Fix | Delete
array(
[1394] Fix | Delete
'action' => 'confirm_admin_email',
[1395] Fix | Delete
'wp_lang' => get_user_locale( $user ),
[1396] Fix | Delete
),
[1397] Fix | Delete
wp_login_url( $redirect_to )
[1398] Fix | Delete
);
[1399] Fix | Delete
}
[1400] Fix | Delete
}
[1401] Fix | Delete
[1402] Fix | Delete
if ( ( empty( $redirect_to ) || 'wp-admin/' === $redirect_to || admin_url() === $redirect_to ) ) {
[1403] Fix | Delete
// 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.
[1404] Fix | Delete
if ( is_multisite() && ! get_active_blog_for_user( $user->ID ) && ! is_super_admin( $user->ID ) ) {
[1405] Fix | Delete
$redirect_to = user_admin_url();
[1406] Fix | Delete
} elseif ( is_multisite() && ! $user->has_cap( 'read' ) ) {
[1407] Fix | Delete
$redirect_to = get_dashboard_url( $user->ID );
[1408] Fix | Delete
} elseif ( ! $user->has_cap( 'edit_posts' ) ) {
[1409] Fix | Delete
$redirect_to = $user->has_cap( 'read' ) ? admin_url( 'profile.php' ) : home_url();
[1410] Fix | Delete
}
[1411] Fix | Delete
[1412] Fix | Delete
wp_redirect( $redirect_to );
[1413] Fix | Delete
exit;
[1414] Fix | Delete
}
[1415] Fix | Delete
[1416] Fix | Delete
wp_safe_redirect( $redirect_to );
[1417] Fix | Delete
exit;
[1418] Fix | Delete
}
[1419] Fix | Delete
[1420] Fix | Delete
$errors = $user;
[1421] Fix | Delete
// Clear errors if loggedout is set.
[1422] Fix | Delete
if ( ! empty( $_GET['loggedout'] ) || $reauth ) {
[1423] Fix | Delete
$errors = new WP_Error();
[1424] Fix | Delete
}
[1425] Fix | Delete
[1426] Fix | Delete
if ( empty( $_POST ) && $errors->get_error_codes() === array( 'empty_username', 'empty_password' ) ) {
[1427] Fix | Delete
$errors = new WP_Error( '', '' );
[1428] Fix | Delete
}
[1429] Fix | Delete
[1430] Fix | Delete
if ( $interim_login ) {
[1431] Fix | Delete
if ( ! $errors->has_errors() ) {
[1432] Fix | Delete
$errors->add( 'expired', __( 'Your session has expired. Please log in to continue where you left off.' ), 'message' );
[1433] Fix | Delete
}
[1434] Fix | Delete
} else {
[1435] Fix | Delete
// Some parts of this script use the main login form to display a message.
[1436] Fix | Delete
if ( isset( $_GET['loggedout'] ) && $_GET['loggedout'] ) {
[1437] Fix | Delete
$errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' );
[1438] Fix | Delete
} elseif ( isset( $_GET['registration'] ) && 'disabled' === $_GET['registration'] ) {
[1439] Fix | Delete
$errors->add( 'registerdisabled', __( '<strong>Error:</strong> User registration is currently not allowed.' ) );
[1440] Fix | Delete
} elseif ( str_contains( $redirect_to, 'about.php?updated' ) ) {
[1441] Fix | Delete
$errors->add( 'updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what&#8217;s new.' ), 'message' );
[1442] Fix | Delete
} elseif ( WP_Recovery_Mode_Link_Service::LOGIN_ACTION_ENTERED === $action ) {
[1443] Fix | Delete
$errors->add( 'enter_recovery_mode', __( 'Recovery Mode Initialized. Please log in to continue.' ), 'message' );
[1444] Fix | Delete
} elseif ( isset( $_GET['redirect_to'] ) && is_string( $_GET['redirect_to'] )
[1445] Fix | Delete
&& str_contains( $_GET['redirect_to'], 'wp-admin/authorize-application.php' )
[1446] Fix | Delete
) {
[1447] Fix | Delete
$query_component = wp_parse_url( $_GET['redirect_to'], PHP_URL_QUERY );
[1448] Fix | Delete
$query = array();
[1449] Fix | Delete
if ( $query_component ) {
[1450] Fix | Delete
parse_str( $query_component, $query );
[1451] Fix | Delete
}
[1452] Fix | Delete
[1453] Fix | Delete
if ( ! empty( $query['app_name'] ) ) {
[1454] Fix | Delete
/* translators: 1: Website name, 2: Application name. */
[1455] Fix | Delete
$message = sprintf( 'Please log in to %1$s to authorize %2$s to connect to your account.', get_bloginfo( 'name', 'display' ), '<strong>' . esc_html( $query['app_name'] ) . '</strong>' );
[1456] Fix | Delete
} else {
[1457] Fix | Delete
/* translators: %s: Website name. */
[1458] Fix | Delete
$message = sprintf( 'Please log in to %s to proceed with authorization.', get_bloginfo( 'name', 'display' ) );
[1459] Fix | Delete
}
[1460] Fix | Delete
[1461] Fix | Delete
$errors->add( 'authorize_application', $message, 'message' );
[1462] Fix | Delete
}
[1463] Fix | Delete
}
[1464] Fix | Delete
[1465] Fix | Delete
/**
[1466] Fix | Delete
* Filters the login page errors.
[1467] Fix | Delete
*
[1468] Fix | Delete
* @since 3.6.0
[1469] Fix | Delete
*
[1470] Fix | Delete
* @param WP_Error $errors WP Error object.
[1471] Fix | Delete
* @param string $redirect_to Redirect destination URL.
[1472] Fix | Delete
*/
[1473] Fix | Delete
$errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
[1474] Fix | Delete
[1475] Fix | Delete
// Clear any stale cookies.
[1476] Fix | Delete
if ( $reauth ) {
[1477] Fix | Delete
wp_clear_auth_cookie();
[1478] Fix | Delete
}
[1479] Fix | Delete
[1480] Fix | Delete
login_header( __( 'Log In' ), '', $errors );
[1481] Fix | Delete
[1482] Fix | Delete
if ( isset( $_POST['log'] ) ) {
[1483] Fix | Delete
$user_login = ( 'incorrect_password' === $errors->get_error_code() || 'empty_password' === $errors->get_error_code() ) ? esc_attr( wp_unslash( $_POST['log'] ) ) : '';
[1484] Fix | Delete
}
[1485] Fix | Delete
[1486] Fix | Delete
$rememberme = ! empty( $_POST['rememberme'] );
[1487] Fix | Delete
[1488] Fix | Delete
$aria_describedby = '';
[1489] Fix | Delete
$has_errors = $errors->has_errors();
[1490] Fix | Delete
[1491] Fix | Delete
if ( $has_errors ) {
[1492] Fix | Delete
$aria_describedby = ' aria-describedby="login_error"';
[1493] Fix | Delete
}
[1494] Fix | Delete
[1495] Fix | Delete
if ( $has_errors && 'message' === $errors->get_error_data() ) {
[1496] Fix | Delete
$aria_describedby = ' aria-describedby="login-message"';
[1497] Fix | Delete
}
[1498] Fix | Delete
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function