Version Description
Download this release
Release Info
Developer | niteoweb |
Plugin | Spider Blocker |
Version | 1.0.14 |
Comparing to | |
See all releases |
Code changes from version 1.0.13 to 1.0.14
- index.php +236 -19
- readme.txt +2 -2
index.php
CHANGED
@@ -3,7 +3,7 @@ namespace Niteoweb\SpiderBlocker;
|
|
3 |
/**
|
4 |
* Plugin Name: Spider Blocker
|
5 |
* Description: Spider Blocker will block most common bots that consume bandwidth and slow down your server.
|
6 |
-
* Version: 1.0.
|
7 |
* Runtime: 5.3+
|
8 |
* Author: Easy Blog Networks
|
9 |
* Author URI: www.easyblognetworks.com
|
@@ -36,10 +36,239 @@ if (version_compare(PHP_VERSION, '5.3.0', '<')) {
|
|
36 |
class SpiderBlocker
|
37 |
{
|
38 |
|
39 |
-
public $default_bots = 'a:36:{i:0;O:8:"stdClass":4:{s:4:"name";s:10:"Ahrefs Bot";s:2:"re";s:9:"AhrefsBot";s:4:"desc";s:25:"https://ahrefs.com/robot/";s:5:"state";b:1;}i:1;O:8:"stdClass":4:{s:4:"name";s:8:"MJ12 bot";s:2:"re";s:7:"MJ12bot";s:4:"desc";s:56:"http://www.majestic12.co.uk/projects/dsearch/mj12bot.php";s:5:"state";b:1;}i:2;O:8:"stdClass":4:{s:4:"name";s:9:"Roger Bot";s:2:"re";s:8:"Rogerbot";s:4:"desc";s:40:"http://moz.com/help/pro/rogerbot-crawler";s:5:"state";b:1;}i:3;O:8:"stdClass":4:{s:4:"name";s:11:"Semrush Bot";s:2:"re";s:10:"SemrushBot";s:4:"desc";s:31:"http://www.semrush.com/bot.html";s:5:"state";b:1;}i:4;O:8:"stdClass":4:{s:4:"name";s:11:"ia_archiver";s:2:"re";s:11:"ia_archiver";s:4:"desc";s:36:"http://archive.org/about/exclude.php";s:5:"state";b:1;}i:5;O:8:"stdClass":4:{s:4:"name";s:8:"ScoutJet";s:2:"re";s:8:"ScoutJet";s:4:"desc";s:19:"http://scoutjet.com";s:5:"state";b:1;}i:6;O:8:"stdClass":4:{s:4:"name";s:7:"sistrix";s:2:"re";s:7:"sistrix";s:4:"desc";s:26:"http://crawler.sistrix.net";s:5:"state";b:1;}i:7;O:8:"stdClass":4:{s:4:"name";s:16:"SearchmetricsBot";s:2:"re";s:16:"SearchmetricsBot";s:4:"desc";s:50:"http://www.searchmetrics.com/en/searchmetrics-bot/";s:5:"state";b:1;}i:8;O:8:"stdClass":4:{s:4:"name";s:14:"SEOkicks-Robot";s:2:"re";s:14:"SEOkicks-Robot";s:4:"desc";s:33:"http://www.seokicks.de/robot.html";s:5:"state";b:1;}i:9;O:8:"stdClass":4:{s:4:"name";s:16:"Lipperhey Spider";s:2:"re";s:16:"Lipperhey Spider";s:4:"desc";s:43:"http://www.lipperhey.com/en/website-spider/";s:5:"state";b:1;}i:10;O:8:"stdClass":4:{s:4:"name";s:6:"Exabot";s:2:"re";s:6:"Exabot";s:4:"desc";s:44:"http://www.exalead.com/search/webmasterguide";s:5:"state";b:1;}i:11;O:8:"stdClass":4:{s:4:"name";s:6:"NC Bot";s:2:"re";s:5:"NCBot";s:4:"desc";s:55:"https://twitter.com/NetComber/status/334476871691550721";s:5:"state";b:1;}i:12;O:8:"stdClass":4:{s:4:"name";s:15:"BacklinkCrawler";s:2:"re";s:15:"BacklinkCrawler";s:4:"desc";s:40:"http://www.backlinktest.com/crawler.html";s:5:"state";b:1;}i:13;O:8:"stdClass":4:{s:4:"name";s:15:"archive.org Bot";s:2:"re";s:15:"archive.org_bot";s:4:"desc";s:42:"http://archive.org/details/archive.org_bot";s:5:"state";b:1;}i:14;O:8:"stdClass":4:{s:4:"name";s:12:"MeanPath Bot";s:2:"re";s:11:"meanpathbot";s:4:"desc";s:37:"https://meanpath.com/meanpathbot.html";s:5:"state";b:1;}i:15;O:8:"stdClass":4:{s:4:"name";s:18:"PagesInventory Bot";s:2:"re";s:14:"PagesInventory";s:4:"desc";s:56:"http://www.botsvsbrowsers.com/details/1002332/index.html";s:5:"state";b:1;}i:16;O:8:"stdClass":4:{s:4:"name";s:12:"Aboundex Bot";s:2:"re";s:11:"Aboundexbot";s:4:"desc";s:32:"http://www.aboundex.com/crawler/";s:5:"state";b:1;}i:17;O:8:"stdClass":4:{s:4:"name";s:15:"SeoProfiler Bot";s:2:"re";s:5:"spbot";s:4:"desc";s:31:"http://www.seoprofiler.com/bot/";s:5:"state";b:1;}i:18;O:8:"stdClass":4:{s:4:"name";s:11:"Linkdex Bot";s:2:"re";s:10:"linkdexbot";s:4:"desc";s:34:"http://www.linkdex.com/about/bots/";s:5:"state";b:1;}i:19;O:8:"stdClass":4:{s:4:"name";s:7:"Gigabot";s:2:"re";s:7:"Gigabot";s:4:"desc";s:45:"http://www.useragentstring.com/pages/Gigabot/";s:5:"state";b:1;}i:20;O:8:"stdClass":4:{s:4:"name";s:6:"DotBot";s:2:"re";s:6:"dotbot";s:4:"desc";s:35:"http://en.wikipedia.org/wiki/DotBot";s:5:"state";b:1;}i:21;O:8:"stdClass":4:{s:4:"name";s:5:"Nutch";s:2:"re";s:5:"Nutch";s:4:"desc";s:32:"http://nutch.apache.org/bot.html";s:5:"state";b:1;}i:22;O:8:"stdClass":4:{s:4:"name";s:8:"BLEX Bot";s:2:"re";s:7:"BLEXBot";s:4:"desc";s:27:"http://webmeup-crawler.com/";s:5:"state";b:1;}i:23;O:8:"stdClass":4:{s:4:"name";s:6:"Ezooms";s:2:"re";s:6:"Ezooms";s:4:"desc";s:49:"http://graphicline.co.za/blogs/what-is-ezooms-bot";s:5:"state";b:1;}i:24;O:8:"stdClass":4:{s:4:"name";s:11:"Majestic 12";s:2:"re";s:11:"Majestic-12";s:4:"desc";s:56:"http://www.majestic12.co.uk/projects/dsearch/mj12bot.php";s:5:"state";b:1;}i:25;O:8:"stdClass":4:{s:4:"name";s:12:"Majestic SEO";s:2:"re";s:12:"Majestic-SEO";s:4:"desc";s:56:"http://www.majestic12.co.uk/projects/dsearch/mj12bot.php";s:5:"state";b:1;}i:26;O:8:"stdClass":4:{s:4:"name";s:7:"DSearch";s:2:"re";s:7:"DSearch";s:4:"desc";s:56:"http://www.majestic12.co.uk/projects/dsearch/mj12bot.php";s:5:"state";b:1;}i:27;O:8:"stdClass":4:{s:4:"name";s:10:"Blekko Bot";s:2:"re";s:9:"BlekkoBot";s:4:"desc";s:33:"http://blekko.com/about/blekkobot";s:5:"state";b:1;}i:28;O:8:"stdClass":4:{s:4:"name";s:6:"Yandex";s:2:"re";s:6:"Yandex";s:4:"desc";s:41:"http://help.yandex.com/search/?id=1112030";s:5:"state";b:0;}i:29;O:8:"stdClass":4:{s:4:"name";s:10:"Google Bot";s:2:"re";s:9:"googlebot";s:4:"desc";s:57:"https://support.google.com/webmasters/answer/182072?hl=en";s:5:"state";b:0;}i:30;O:8:"stdClass":4:{s:4:"name";s:18:"Feedfetcher Google";s:2:"re";s:18:"Feedfetcher-Google";s:4:"desc";s:51:"https://support.google.com/webmasters/answer/178852";s:5:"state";b:0;}i:31;O:8:"stdClass":4:{s:4:"name";s:8:"Bing Bot";s:2:"re";s:7:"BingBot";s:4:"desc";s:36:"http://en.wikipedia.org/wiki/Bingbot";s:5:"state";b:0;}i:32;O:8:"stdClass":4:{s:4:"name";s:9:"Nerdy Bot";s:2:"re";s:8:"NerdyBot";s:4:"desc";s:20:"http://nerdybot.com/";s:5:"state";b:1;}i:33;O:8:"stdClass":4:{s:4:"name";s:9:"James BOT";s:2:"re";s:8:"JamesBOT";s:4:"desc";s:32:"http://cognitiveseo.com/bot.html";s:5:"state";b:1;}i:34;O:8:"stdClass":4:{s:4:"name";s:7:"Tin Eye";s:2:"re";s:6:"TinEye";s:4:"desc";s:34:"http://www.tineye.com/crawler.html";s:5:"state";b:1;}i:35;O:8:"stdClass":4:{s:5:"state";b:1;s:2:"re";s:11:"Baiduspider";s:4:"name";s:5:"Baidu";s:4:"desc";s:47:"http://www.baidu.com/search/robots_english.html";}}';
|
40 |
const OptionName = 'Niteoweb.SpiderBlocker.Bots';
|
41 |
const nonce = 'Niteoweb.SpiderBlocker.Nonce';
|
42 |
const CheckHook = 'Niteoweb.SpiderBlocker.CheckHook';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
function __construct()
|
45 |
{
|
@@ -51,10 +280,6 @@ class SpiderBlocker
|
|
51 |
add_action('wp_ajax_NSB-reset_list', array(&$this, 'resetList'));
|
52 |
}
|
53 |
add_action('generate_rewrite_rules', array(&$this, "generateRewriteRules"));
|
54 |
-
add_action(self::CheckHook, array(&$this, "htaccessCheckHook"));
|
55 |
-
if (!wp_next_scheduled(self::CheckHook)) {
|
56 |
-
wp_schedule_event(time(), 'daily', self::CheckHook);
|
57 |
-
}
|
58 |
|
59 |
}
|
60 |
|
@@ -98,7 +323,7 @@ class SpiderBlocker
|
|
98 |
?>
|
99 |
<div class="notice notice-success">
|
100 |
<p>SpiderBlocker plugin has enabled blocking of some bots, please review settings by visiting <a
|
101 |
-
|
102 |
</div>
|
103 |
<?php
|
104 |
}
|
@@ -138,15 +363,6 @@ class SpiderBlocker
|
|
138 |
|
139 |
}
|
140 |
|
141 |
-
/**
|
142 |
-
* @codeCoverageIgnore
|
143 |
-
*/
|
144 |
-
public function htaccessCheckHook()
|
145 |
-
{
|
146 |
-
|
147 |
-
}
|
148 |
-
|
149 |
-
|
150 |
/**
|
151 |
* @codeCoverageIgnore
|
152 |
* @return bool
|
@@ -231,6 +447,7 @@ class SpiderBlocker
|
|
231 |
return maybe_unserialize(get_option(self::OptionName, $this->default_bots));
|
232 |
}
|
233 |
|
|
|
234 |
function loadList()
|
235 |
{
|
236 |
check_ajax_referer(self::nonce, 'nonce');
|
@@ -481,7 +698,7 @@ class SpiderBlocker
|
|
481 |
<th scope="col" class="manage-column column-state">
|
482 |
<a href=""
|
483 |
ng-click="predicate = 'state'; reverse=false">State <span
|
484 |
-
|
485 |
</th>
|
486 |
<th scope="col" id="action" class="manage-column column-action">Action</th>
|
487 |
</tr>
|
@@ -526,8 +743,8 @@ class SpiderBlocker
|
|
526 |
</table>
|
527 |
<div id="rules-export-import" style="display:none;">
|
528 |
<textarea
|
529 |
-
|
530 |
-
|
531 |
</div>
|
532 |
<p class="submit">
|
533 |
<input type="button" class="button button-primary" ng-click="save()" value="Save">
|
3 |
/**
|
4 |
* Plugin Name: Spider Blocker
|
5 |
* Description: Spider Blocker will block most common bots that consume bandwidth and slow down your server.
|
6 |
+
* Version: 1.0.14
|
7 |
* Runtime: 5.3+
|
8 |
* Author: Easy Blog Networks
|
9 |
* Author URI: www.easyblognetworks.com
|
36 |
class SpiderBlocker
|
37 |
{
|
38 |
|
|
|
39 |
const OptionName = 'Niteoweb.SpiderBlocker.Bots';
|
40 |
const nonce = 'Niteoweb.SpiderBlocker.Nonce';
|
41 |
const CheckHook = 'Niteoweb.SpiderBlocker.CheckHook';
|
42 |
+
private $default_bots = array(
|
43 |
+
array(
|
44 |
+
'name' => 'Ahrefs Bot',
|
45 |
+
're' => 'AhrefsBot',
|
46 |
+
'desc' => 'https://ahrefs.com/robot/',
|
47 |
+
'state' => true,
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
'name' => 'MJ12 bot',
|
51 |
+
're' => 'MJ12bot',
|
52 |
+
'desc' => 'http://www.majestic12.co.uk/projects/dsearch/mj12bot.php',
|
53 |
+
'state' => true,
|
54 |
+
),
|
55 |
+
array(
|
56 |
+
'name' => 'Roger Bot',
|
57 |
+
're' => 'Rogerbot',
|
58 |
+
'desc' => 'http://moz.com/help/pro/rogerbot-crawler',
|
59 |
+
'state' => true,
|
60 |
+
),
|
61 |
+
array(
|
62 |
+
'name' => 'Semrush Bot',
|
63 |
+
're' => 'SemrushBot',
|
64 |
+
'desc' => 'http://www.semrush.com/bot.html',
|
65 |
+
'state' => true,
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'name' => 'ia_archiver',
|
69 |
+
're' => 'ia_archiver',
|
70 |
+
'desc' => 'http://archive.org/about/exclude.php',
|
71 |
+
'state' => true,
|
72 |
+
),
|
73 |
+
array(
|
74 |
+
'name' => 'ScoutJet',
|
75 |
+
're' => 'ScoutJet',
|
76 |
+
'desc' => 'http://scoutjet.com',
|
77 |
+
'state' => true,
|
78 |
+
),
|
79 |
+
array(
|
80 |
+
'name' => 'sistrix',
|
81 |
+
're' => 'sistrix',
|
82 |
+
'desc' => 'http://crawler.sistrix.net',
|
83 |
+
'state' => true,
|
84 |
+
),
|
85 |
+
array(
|
86 |
+
'name' => 'SearchmetricsBot',
|
87 |
+
're' => 'SearchmetricsBot',
|
88 |
+
'desc' => 'http://www.searchmetrics.com/en/searchmetrics-bot/',
|
89 |
+
'state' => true,
|
90 |
+
),
|
91 |
+
array(
|
92 |
+
'name' => 'SEOkicks-Robot',
|
93 |
+
're' => 'SEOkicks-Robot',
|
94 |
+
'desc' => 'http://www.seokicks.de/robot.html',
|
95 |
+
'state' => true,
|
96 |
+
),
|
97 |
+
array(
|
98 |
+
'name' => 'Lipperhey Spider',
|
99 |
+
're' => 'Lipperhey Spider',
|
100 |
+
'desc' => 'http://www.lipperhey.com/en/website-spider/',
|
101 |
+
'state' => true,
|
102 |
+
),
|
103 |
+
array(
|
104 |
+
'name' => 'Exabot',
|
105 |
+
're' => 'Exabot',
|
106 |
+
'desc' => 'http://www.exalead.com/search/webmasterguide',
|
107 |
+
'state' => true,
|
108 |
+
),
|
109 |
+
array(
|
110 |
+
'name' => 'NC Bot',
|
111 |
+
're' => 'NCBot',
|
112 |
+
'desc' => 'https://twitter.com/NetComber/status/334476871691550721',
|
113 |
+
'state' => true,
|
114 |
+
),
|
115 |
+
array(
|
116 |
+
'name' => 'BacklinkCrawler',
|
117 |
+
're' => 'BacklinkCrawler',
|
118 |
+
'desc' => 'http://www.backlinktest.com/crawler.html',
|
119 |
+
'state' => true,
|
120 |
+
),
|
121 |
+
array(
|
122 |
+
'name' => 'archive.org Bot',
|
123 |
+
're' => 'archive.org_bot',
|
124 |
+
'desc' => 'http://archive.org/details/archive.org_bot',
|
125 |
+
'state' => true,
|
126 |
+
),
|
127 |
+
array(
|
128 |
+
'name' => 'MeanPath Bot',
|
129 |
+
're' => 'meanpathbot',
|
130 |
+
'desc' => 'https://meanpath.com/meanpathbot.html',
|
131 |
+
'state' => true,
|
132 |
+
),
|
133 |
+
array(
|
134 |
+
'name' => 'PagesInventory Bot',
|
135 |
+
're' => 'PagesInventory',
|
136 |
+
'desc' => 'http://www.botsvsbrowsers.com/details/1002332/index.html',
|
137 |
+
'state' => true,
|
138 |
+
),
|
139 |
+
array(
|
140 |
+
'name' => 'Aboundex Bot',
|
141 |
+
're' => 'Aboundexbot',
|
142 |
+
'desc' => 'http://www.aboundex.com/crawler/',
|
143 |
+
'state' => true,
|
144 |
+
),
|
145 |
+
array(
|
146 |
+
'name' => 'SeoProfiler Bot',
|
147 |
+
're' => 'spbot',
|
148 |
+
'desc' => 'http://www.seoprofiler.com/bot/',
|
149 |
+
'state' => true,
|
150 |
+
),
|
151 |
+
array(
|
152 |
+
'name' => 'Linkdex Bot',
|
153 |
+
're' => 'linkdexbot',
|
154 |
+
'desc' => 'http://www.linkdex.com/about/bots/',
|
155 |
+
'state' => true,
|
156 |
+
),
|
157 |
+
array(
|
158 |
+
'name' => 'Gigabot',
|
159 |
+
're' => 'Gigabot',
|
160 |
+
'desc' => 'http://www.useragentstring.com/pages/Gigabot/',
|
161 |
+
'state' => true,
|
162 |
+
),
|
163 |
+
array(
|
164 |
+
'name' => 'DotBot',
|
165 |
+
're' => 'dotbot',
|
166 |
+
'desc' => 'http://en.wikipedia.org/wiki/DotBot',
|
167 |
+
'state' => true,
|
168 |
+
),
|
169 |
+
array(
|
170 |
+
'name' => 'Nutch',
|
171 |
+
're' => 'Nutch',
|
172 |
+
'desc' => 'http://nutch.apache.org/bot.html',
|
173 |
+
'state' => true,
|
174 |
+
),
|
175 |
+
array(
|
176 |
+
'name' => 'BLEX Bot',
|
177 |
+
're' => 'BLEXBot',
|
178 |
+
'desc' => 'http://webmeup-crawler.com/',
|
179 |
+
'state' => true,
|
180 |
+
),
|
181 |
+
array(
|
182 |
+
'name' => 'Ezooms',
|
183 |
+
're' => 'Ezooms',
|
184 |
+
'desc' => 'http://graphicline.co.za/blogs/what-is-ezooms-bot',
|
185 |
+
'state' => true,
|
186 |
+
),
|
187 |
+
array(
|
188 |
+
'name' => 'Majestic 12',
|
189 |
+
're' => 'Majestic-12',
|
190 |
+
'desc' => 'http://www.majestic12.co.uk/projects/dsearch/mj12bot.php',
|
191 |
+
'state' => true,
|
192 |
+
),
|
193 |
+
array(
|
194 |
+
'name' => 'Majestic SEO',
|
195 |
+
're' => 'Majestic-SEO',
|
196 |
+
'desc' => 'http://www.majestic12.co.uk/projects/dsearch/mj12bot.php',
|
197 |
+
'state' => true,
|
198 |
+
),
|
199 |
+
array(
|
200 |
+
'name' => 'DSearch',
|
201 |
+
're' => 'DSearch',
|
202 |
+
'desc' => 'http://www.majestic12.co.uk/projects/dsearch/mj12bot.php',
|
203 |
+
'state' => true,
|
204 |
+
),
|
205 |
+
array(
|
206 |
+
'name' => 'Blekko Bot',
|
207 |
+
're' => 'BlekkoBot',
|
208 |
+
'desc' => 'http://blekko.com/about/blekkobot',
|
209 |
+
'state' => true,
|
210 |
+
),
|
211 |
+
array(
|
212 |
+
'name' => 'Yandex',
|
213 |
+
're' => 'Yandex',
|
214 |
+
'desc' => 'http://help.yandex.com/search/?id=1112030',
|
215 |
+
'state' => false,
|
216 |
+
),
|
217 |
+
array(
|
218 |
+
'name' => 'Google Bot',
|
219 |
+
're' => 'googlebot',
|
220 |
+
'desc' => 'https://support.google.com/webmasters/answer/182072?hl=en',
|
221 |
+
'state' => false,
|
222 |
+
),
|
223 |
+
array(
|
224 |
+
'name' => 'Feedfetcher Google',
|
225 |
+
're' => 'Feedfetcher-Google',
|
226 |
+
'desc' => 'https://support.google.com/webmasters/answer/178852',
|
227 |
+
'state' => false,
|
228 |
+
),
|
229 |
+
array(
|
230 |
+
'name' => 'Bing Bot',
|
231 |
+
're' => 'BingBot',
|
232 |
+
'desc' => 'http://en.wikipedia.org/wiki/Bingbot',
|
233 |
+
'state' => false,
|
234 |
+
),
|
235 |
+
array(
|
236 |
+
'name' => 'Nerdy Bot',
|
237 |
+
're' => 'NerdyBot',
|
238 |
+
'desc' => 'http://nerdybot.com/',
|
239 |
+
'state' => true,
|
240 |
+
),
|
241 |
+
array(
|
242 |
+
'name' => 'James BOT',
|
243 |
+
're' => 'JamesBOT',
|
244 |
+
'desc' => 'http://cognitiveseo.com/bot.html',
|
245 |
+
'state' => true,
|
246 |
+
),
|
247 |
+
array(
|
248 |
+
'name' => 'Tin Eye',
|
249 |
+
're' => 'TinEye',
|
250 |
+
'desc' => 'http://www.tineye.com/crawler.html',
|
251 |
+
'state' => true,
|
252 |
+
),
|
253 |
+
array(
|
254 |
+
'state' => true,
|
255 |
+
're' => 'Baiduspider',
|
256 |
+
'name' => 'Baidu',
|
257 |
+
'desc' => 'http://www.baidu.com/search/robots_english.html',
|
258 |
+
),
|
259 |
+
array(
|
260 |
+
'state' => true,
|
261 |
+
're' => 'serpstat',
|
262 |
+
'name' => 'Serpstat',
|
263 |
+
'desc' => 'https://serpstat.com/',
|
264 |
+
),
|
265 |
+
array(
|
266 |
+
'state' => true,
|
267 |
+
'desc' => 'https://www.spyfu.com/',
|
268 |
+
're' => 'spyfu',
|
269 |
+
'name' => 'SpyFu',
|
270 |
+
),
|
271 |
+
);
|
272 |
|
273 |
function __construct()
|
274 |
{
|
280 |
add_action('wp_ajax_NSB-reset_list', array(&$this, 'resetList'));
|
281 |
}
|
282 |
add_action('generate_rewrite_rules', array(&$this, "generateRewriteRules"));
|
|
|
|
|
|
|
|
|
283 |
|
284 |
}
|
285 |
|
323 |
?>
|
324 |
<div class="notice notice-success">
|
325 |
<p>SpiderBlocker plugin has enabled blocking of some bots, please review settings by visiting <a
|
326 |
+
href="<?php echo admin_url('tools.php?page=ni_spider_block'); ?>">Setting page</a>!</p>
|
327 |
</div>
|
328 |
<?php
|
329 |
}
|
363 |
|
364 |
}
|
365 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
/**
|
367 |
* @codeCoverageIgnore
|
368 |
* @return bool
|
447 |
return maybe_unserialize(get_option(self::OptionName, $this->default_bots));
|
448 |
}
|
449 |
|
450 |
+
|
451 |
function loadList()
|
452 |
{
|
453 |
check_ajax_referer(self::nonce, 'nonce');
|
698 |
<th scope="col" class="manage-column column-state">
|
699 |
<a href=""
|
700 |
ng-click="predicate = 'state'; reverse=false">State <span
|
701 |
+
class="dashicons dashicons-sort"></span></a>
|
702 |
</th>
|
703 |
<th scope="col" id="action" class="manage-column column-action">Action</th>
|
704 |
</tr>
|
743 |
</table>
|
744 |
<div id="rules-export-import" style="display:none;">
|
745 |
<textarea
|
746 |
+
style="-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;width: 100%;height: 99%;"
|
747 |
+
json-text ng-model="bots"></textarea>
|
748 |
</div>
|
749 |
<p class="submit">
|
750 |
<input type="button" class="button button-primary" ng-click="save()" value="Save">
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: niteoweb
|
3 |
Tags: seo, block, bots, htaccess, apache, secure
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.0.
|
7 |
|
8 |
SpiderBlocker will block most common bots that consume bandwidth and slow down your server.
|
9 |
|
2 |
Contributors: niteoweb
|
3 |
Tags: seo, block, bots, htaccess, apache, secure
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 4.7.3
|
6 |
+
Stable tag: 1.0.14
|
7 |
|
8 |
SpiderBlocker will block most common bots that consume bandwidth and slow down your server.
|
9 |
|