Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
16.67% covered (danger)
16.67%
1 / 6
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
Waf_Blocked_Login_Page
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 2
12
0.00% covered (danger)
0.00%
0 / 1
 instance
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 get_help_url
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * Class used to define WAF Blocked Login Page.
4 *
5 * @package automattic/jetpack-waf
6 */
7
8namespace Automattic\Jetpack\Waf;
9
10use Automattic\Jetpack\Redirect;
11
12if ( ! defined( 'ABSPATH' ) ) {
13    exit( 0 );
14}
15
16/**
17 * WAF Blocked Login Page class.
18 */
19class Waf_Blocked_Login_Page extends Blocked_Login_Page {
20
21    /**
22     * Instance of the class.
23     *
24     * @var Waf_Blocked_Login_Page
25     */
26    private static $instance;
27
28    /**
29     * The IP block list blocks the whole site, set-password link included.
30     *
31     * @var bool
32     */
33    protected $check_unfinished_registrations = false;
34
35    /**
36     * Instance of the class.
37     *
38     * @param string $ip_address IP address.
39     *
40     * @return Waf_Blocked_Login_Page
41     */
42    public static function instance( $ip_address ) {
43        if ( ! self::$instance ) {
44            self::$instance = new self( $ip_address );
45        }
46
47        return self::$instance;
48    }
49
50    /**
51     * Provide the help URL for the WAF.
52     *
53     * @return string
54     */
55    public function get_help_url() {
56        return Redirect::get_url( 'jetpack-support-protect-troubleshooting-protect' );
57    }
58}