Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 25
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * WordPress.com Site Helper Private Site Template.
4 *
5 * @package private-site
6 */
7
8namespace Private_Site;
9
10nocache_headers();
11header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) );
12
13?><!DOCTYPE html>
14<!--[if IE 8]>
15<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>>
16<![endif]-->
17<!--[if !(IE 8) ]><!-->
18<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
19<!--<![endif]-->
20<head>
21    <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
22    <meta name="viewport" content="width=device-width, initial-scale=1">
23    <title><?php bloginfo( 'name' ); ?></title>
24    <?php
25    // Use styles from wp-login.
26    wp_enqueue_style( 'login' );
27    do_action( 'login_enqueue_scripts' );
28    do_action( 'login_head' );
29
30    $classes = array( 'wp-core-ui' );
31    if ( is_rtl() ) {
32        $classes[] = 'rtl';
33    }
34    $classes[] = ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
35
36    $login_link = site_url() . '/wp-login.php?redirect_to=' . set_url_scheme( original_request_url() );
37    ?>
38
39</head>
40<body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
41<div id="login">
42    <h1><a href="<?php echo esc_url( $login_link ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
43    <div class="message" style="overflow: auto;">
44        <p>
45            <?php esc_html_e( 'You need to be logged in as a user who has permission to view this site.', 'wpcomsh' ); ?><br>
46            <br>
47            <a class="button-primary" href="<?php echo esc_url( $login_link ); ?>"><?php is_user_logged_in() ? esc_html_e( 'Switch user', 'wpcomsh' ) : esc_html_e( 'Log in', 'wpcomsh' ); ?></a>
48        </p>
49    </div>
50    <?php wp_footer(); ?>
51</div>
52</body>
53</html>