PluginProbe
The WP Remote WordPress Plugin / 5.68
The WP Remote WordPress Plugin v5.68
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
wpremote / protect / ipstore.php

ipstore.php in The WP Remote WordPress Plugin 5.68, at protect/ipstore.php

53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH') && !defined('MCDATAPATH')) exit;
3
4 if (!class_exists('WPRProtectIpstore_V568')) :
5 require_once dirname( __FILE__ ) . '/request.php';
6 require_once dirname( __FILE__ ) . '/ipstore/fs.php';
7 require_once dirname( __FILE__ ) . '/ipstore/db.php';
8
9 class WPRProtectIpstore_V568 {
10 private $storage;
11 private $storage_type;
12
13 const STORAGE_TYPE_FS = 0;
14 const STORAGE_TYPE_DB = 1;
15
16 function __construct($storage_type = WPRProtectIpstore_V568::STORAGE_TYPE_DB) {
17 $this->storage_type = $storage_type;
18 if ($this->storage_type == WPRProtectIpstore_V568::STORAGE_TYPE_FS) {
19 $this->storage = new WPRProtectIpstoreFS_V568();
20 } else {
21 $this->storage = new WPRProtectIpstoreDB_V568();
22 }
23 }
24
25 public static function uninstall() {
26 WPRProtectIpstoreDB_V568::uninstall();
27 }
28
29 public function isLPIPBlacklisted($ip) {
30 if ($this->storage_type == WPRProtectIpstore_V568::STORAGE_TYPE_DB) {
31 return $this->storage->isLPIPBlacklisted($ip);
32 }
33 }
34
35 public function isLPIPWhitelisted($ip) {
36 if ($this->storage_type == WPRProtectIpstore_V568::STORAGE_TYPE_DB) {
37 return $this->storage->isLPIPWhitelisted($ip);
38 }
39 }
40
41 public function getTypeIfBlacklistedIP($ip) {
42 return $this->storage->getTypeIfBlacklistedIP($ip);
43 }
44
45 public function isFWIPBlacklisted($ip) {
46 return $this->storage->isFWIPBlacklisted($ip);
47 }
48
49 public function isFWIPWhitelisted($ip) {
50 return $this->storage->isFWIPWhitelisted($ip);
51 }
52 }
53 endif;