Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 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     * Instance of the class.
30     *
31     * @param string $ip_address IP address.
32     *
33     * @return Waf_Blocked_Login_Page
34     */
35    public static function instance( $ip_address ) {
36        if ( ! self::$instance ) {
37            self::$instance = new self( $ip_address );
38        }
39
40        return self::$instance;
41    }
42
43    /**
44     * Provide the help URL for the WAF.
45     *
46     * @return string
47     */
48    public function get_help_url() {
49        return Redirect::get_url( 'jetpack-support-protect-troubleshooting-protect' );
50    }
51}