Passed
Push — master ( a72540...ae7108 )
by Joseph
30:49 queued 11:38
created

field-subway-lock-wp-admin.php ➔ subway_lock_wp_admin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 12
nc 1
nop 0
dl 0
loc 19
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the Subway WordPress Plugin Package.
4
 *
5
 * (c) Joseph Gabito <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @package Subway
11
 */
12
13
if ( ! defined( 'ABSPATH' ) ) {
14
	return;
15
}
16
17
function subway_lock_wp_admin() { ?>
18
19
	<label for="subway_redirect_wp_admin">
20
		<input <?php echo checked( 1, get_option( 'subway_redirect_wp_admin' ), false ) ;?> value="1" name="subway_redirect_wp_admin" 
21
		id="subway_redirect_wp_admin" type="checkbox" class="code" /> 
22
		<?php esc_html_e( 'Check to hide /wp-admin or /wp-login.php to logged out users and redirect them to Subway custom login form.', 'subway' ); ?>
23
		
24
	</label>
25
26
	<p class="description">
27
		<?php 
28
			echo sprintf( __( "<br/>In case, you were locked out. Use the link below to bypass the log-in page and go directly 
29
			to your website's wp-login URL (http://yoursiteurl.com/wp-login.php):
30
			<br> <strong>%s</strong>", 'subway' ), site_url( 'wp-login.php?no_redirect=true' ) ); 
31
		?>
32
	</p>
33
<?php
34
return;
35
}