Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| Brute_Force_Protection_Blocked_Login_Page | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 1 |
| instance | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| get_help_url | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Class used to define Brute Force Protection Blocked Login Page. |
| 4 | * |
| 5 | * @package automattic/jetpack-waf |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\Jetpack\Waf\Brute_Force_Protection; |
| 9 | |
| 10 | use Automattic\Jetpack\Redirect; |
| 11 | use Automattic\Jetpack\Waf\Blocked_Login_Page; |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit( 0 ); |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Brute Force Protection Blocked Login Page class. |
| 19 | */ |
| 20 | class Brute_Force_Protection_Blocked_Login_Page extends Blocked_Login_Page { |
| 21 | |
| 22 | /** |
| 23 | * Instance of the class. |
| 24 | * |
| 25 | * @var Brute_Force_Protection_Blocked_Login_Page |
| 26 | */ |
| 27 | private static $instance; |
| 28 | |
| 29 | /** |
| 30 | * Instance of the class. |
| 31 | * |
| 32 | * @param string $ip_address IP address. |
| 33 | * |
| 34 | * @return Brute_Force_Protection_Blocked_Login_Page |
| 35 | */ |
| 36 | public static function instance( $ip_address ) { |
| 37 | if ( ! self::$instance ) { |
| 38 | self::$instance = new self( $ip_address ); |
| 39 | } |
| 40 | |
| 41 | return self::$instance; |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Provide the help URL for Brute Force Protection. |
| 46 | * |
| 47 | * @return string |
| 48 | */ |
| 49 | public function get_help_url() { |
| 50 | return Redirect::get_url( 'jetpack-support-jetpack-waf', array( 'anchor' => 'troubleshooting' ) ); |
| 51 | } |
| 52 | } |