Version Description
Download this release
Release Info
Developer | niteoweb |
Plugin | Spider Blocker |
Version | 1.0.19 |
Comparing to | |
See all releases |
Code changes from version 1.0.18 to 1.0.19
- index.php +9 -10
- readme.txt +2 -2
index.php
CHANGED
@@ -5,7 +5,7 @@ namespace Niteoweb\SpiderBlocker;
|
|
5 |
/**
|
6 |
* Plugin Name: Spider Blocker
|
7 |
* Description: Spider Blocker will block most common bots that consume bandwidth and slow down your server.
|
8 |
-
* Version: 1.0.
|
9 |
* Runtime: 5.3+
|
10 |
* Author: Easy Blog Networks
|
11 |
* Text Domain: spiderblocker
|
@@ -592,16 +592,15 @@ class SpiderBlocker {
|
|
592 |
* @param bool $public Blog's public status fetched from the database.
|
593 |
*/
|
594 |
public function robots_file( $output, $public ) {
|
595 |
-
|
596 |
-
|
|
|
|
|
597 |
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
$output .= "Disallow: /\n";
|
603 |
-
$output .= "\n";
|
604 |
-
}
|
605 |
}
|
606 |
}
|
607 |
|
5 |
/**
|
6 |
* Plugin Name: Spider Blocker
|
7 |
* Description: Spider Blocker will block most common bots that consume bandwidth and slow down your server.
|
8 |
+
* Version: 1.0.19
|
9 |
* Runtime: 5.3+
|
10 |
* Author: Easy Blog Networks
|
11 |
* Text Domain: spiderblocker
|
592 |
* @param bool $public Blog's public status fetched from the database.
|
593 |
*/
|
594 |
public function robots_file( $output, $public ) {
|
595 |
+
foreach ( $this->get_bots() as $bot ) {
|
596 |
+
if ( is_array( $bot ) ) {
|
597 |
+
$bot = (object) $bot;
|
598 |
+
}
|
599 |
|
600 |
+
if ( ! empty( $bot->state ) ) {
|
601 |
+
$output .= sprintf( "User-agent: %s\n", $bot->re );
|
602 |
+
$output .= "Disallow: /\n";
|
603 |
+
$output .= "\n";
|
|
|
|
|
|
|
604 |
}
|
605 |
}
|
606 |
|
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.9.
|
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.9.8
|
6 |
+
Stable tag: 1.0.19
|
7 |
|
8 |
SpiderBlocker will block most common bots that consume bandwidth and slow down your server.
|
9 |
|