Spider Blocker - Version v1.2.0

Version Description

  • Code clean-up
  • Support for the latest version of WordPress

=

Download this release

Release Info

Developer niteoweb
Plugin Icon 128x128 Spider Blocker
Version v1.2.0
Comparing to
See all releases

Code changes from version 1.0.22 to v1.2.0

Files changed (4) hide show
  1. i18n/spiderblocker.pot +127 -0
  2. index.php +17 -12
  3. langs/spiderblocker.pot +0 -140
  4. readme.txt +15 -2
i18n/spiderblocker.pot ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020 Easy Blog Networks
2
+ # This file is distributed under the same license as the Spider Blocker plugin.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Spider Blocker 1.2.0\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/src\n"
7
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
+ "Language-Team: LANGUAGE <LL@li.org>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-01-13T09:39:59+05:30\n"
13
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
+ "X-Generator: WP-CLI 2.3.0\n"
15
+ "X-Domain: spiderblocker\n"
16
+
17
+ #. Plugin Name of the plugin
18
+ #: index.php:752
19
+ msgid "Spider Blocker"
20
+ msgstr ""
21
+
22
+ #. Description of the plugin
23
+ msgid "Spider Blocker will block most common bots that consume bandwidth and slow down your server."
24
+ msgstr ""
25
+
26
+ #. Author of the plugin
27
+ msgid "Easy Blog Networks"
28
+ msgstr ""
29
+
30
+ #. Author URI of the plugin
31
+ msgid "www.easyblognetworks.com"
32
+ msgstr ""
33
+
34
+ #: index.php:41
35
+ msgid ""
36
+ "This plugin requires PHP 5.6.0 or higher. Please contact your hosting provider about upgrading your\n"
37
+ "\t\t\tserver software. Your PHP version is"
38
+ msgstr ""
39
+
40
+ #: index.php:374
41
+ msgid "SpiderBlocker plugin has enabled blocking of some bots, please review settings by visiting"
42
+ msgstr ""
43
+
44
+ #: index.php:374
45
+ msgid "Setting page"
46
+ msgstr ""
47
+
48
+ #: index.php:399
49
+ msgid "This plugin requires Apache2 server with mod_rewrite support. Please contact your hosting provider about upgrading your server software. Your Apache version is"
50
+ msgstr ""
51
+
52
+ #: index.php:413
53
+ msgid "%1$s %2$s %3$s"
54
+ msgstr ""
55
+
56
+ #: index.php:414
57
+ msgid "This plugin requires"
58
+ msgstr ""
59
+
60
+ #: index.php:416
61
+ msgid "file that is writable by the server. Please enable write access for file"
62
+ msgstr ""
63
+
64
+ #: index.php:574
65
+ msgid "Failed parsing JSON"
66
+ msgstr ""
67
+
68
+ #: index.php:588
69
+ msgid "Unable to process the request as no data has been received."
70
+ msgstr ""
71
+
72
+ #: index.php:766
73
+ msgid "Add New Bot"
74
+ msgstr ""
75
+
76
+ #: index.php:772
77
+ #: index.php:800
78
+ #: index.php:812
79
+ msgid "User Agent"
80
+ msgstr ""
81
+
82
+ #: index.php:776
83
+ msgid "Bot Name"
84
+ msgstr ""
85
+
86
+ #: index.php:781
87
+ msgid "Bot Description URL"
88
+ msgstr ""
89
+
90
+ #: index.php:788
91
+ msgid "Add Bot"
92
+ msgstr ""
93
+
94
+ #: index.php:791
95
+ msgid "List of bots"
96
+ msgstr ""
97
+
98
+ #: index.php:793
99
+ msgid "Filter..."
100
+ msgstr ""
101
+
102
+ #: index.php:802
103
+ #: index.php:813
104
+ msgid "Name"
105
+ msgstr ""
106
+
107
+ #: index.php:804
108
+ #: index.php:814
109
+ msgid "State"
110
+ msgstr ""
111
+
112
+ #: index.php:806
113
+ #: index.php:816
114
+ msgid "Action"
115
+ msgstr ""
116
+
117
+ #: index.php:841
118
+ msgid "Save"
119
+ msgstr ""
120
+
121
+ #: index.php:842
122
+ msgid "Reset to Defaults"
123
+ msgstr ""
124
+
125
+ #: index.php:843
126
+ msgid "Import/Export Definitions"
127
+ msgstr ""
index.php CHANGED
@@ -5,11 +5,11 @@ 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.22
9
- * Runtime: 5.3+
10
  * Author: Easy Blog Networks
11
  * Text Domain: spiderblocker
12
- * Domain Path: /langs/
13
  * Author URI: www.easyblognetworks.com
14
  */
15
 
@@ -31,16 +31,17 @@ if ( ! function_exists( 'apache_get_version' ) ) {
31
  }
32
 
33
  /**
34
- * Checks for PHP version and stop the plugin if the version is < 5.3.0.
35
  */
36
- if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
37
  ?>
38
  <div id="error-page">
39
  <p>
40
  <?php
41
  esc_html_e(
42
- 'This plugin requires PHP 5.3.0 or higher. Please contact your hosting provider about upgrading your
43
- server software. Your PHP version is', 'spiderblocker'
 
44
  );
45
  ?>
46
  <b><?php echo sanitize_text_field( PHP_VERSION ); ?></b></p>
@@ -350,7 +351,11 @@ class SpiderBlocker {
350
  */
351
  public function admin_menu() {
352
  $menu = add_management_page(
353
- 'SpiderBlocker', 'SpiderBlocker', 'manage_options', 'ni_spider_block', array( &$this, 'view_handler' )
 
 
 
 
354
  );
355
 
356
  add_action( 'load-' . $menu, array( &$this, 'view_handler_load' ) );
@@ -397,9 +402,9 @@ class SpiderBlocker {
397
  die();
398
  }
399
 
400
- if ( ! SpiderBlocker::is_htaccess_writable() ) {
401
- $state = SpiderBlocker::chmod_htaccess();
402
- if ( ! SpiderBlocker::is_htaccess_writable() || ! $state ) {
403
  ?>
404
  <div id="error-page">
405
  <p>
@@ -428,7 +433,7 @@ class SpiderBlocker {
428
  * @codeCoverageIgnore
429
  */
430
  private static function is_htaccess_writable() {
431
- $htaccess_file = SpiderBlocker::join_paths( ABSPATH, '.htaccess' );
432
  return is_writable( $htaccess_file );
433
  }
434
 
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.2.0
9
+ * Runtime: 5.6+
10
  * Author: Easy Blog Networks
11
  * Text Domain: spiderblocker
12
+ * Domain Path: i18n
13
  * Author URI: www.easyblognetworks.com
14
  */
15
 
31
  }
32
 
33
  /**
34
+ * Checks for PHP version and stop the plugin if the version is < 5.6.0.
35
  */
36
+ if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
37
  ?>
38
  <div id="error-page">
39
  <p>
40
  <?php
41
  esc_html_e(
42
+ 'This plugin requires PHP 5.6.0 or higher. Please contact your hosting provider about upgrading your
43
+ server software. Your PHP version is',
44
+ 'spiderblocker'
45
  );
46
  ?>
47
  <b><?php echo sanitize_text_field( PHP_VERSION ); ?></b></p>
351
  */
352
  public function admin_menu() {
353
  $menu = add_management_page(
354
+ 'SpiderBlocker',
355
+ 'SpiderBlocker',
356
+ 'manage_options',
357
+ 'ni_spider_block',
358
+ array( &$this, 'view_handler' )
359
  );
360
 
361
  add_action( 'load-' . $menu, array( &$this, 'view_handler_load' ) );
402
  die();
403
  }
404
 
405
+ if ( ! self::is_htaccess_writable() ) {
406
+ $state = self::chmod_htaccess();
407
+ if ( ! self::is_htaccess_writable() || ! $state ) {
408
  ?>
409
  <div id="error-page">
410
  <p>
433
  * @codeCoverageIgnore
434
  */
435
  private static function is_htaccess_writable() {
436
+ $htaccess_file = self::join_paths( ABSPATH, '.htaccess' );
437
  return is_writable( $htaccess_file );
438
  }
439
 
langs/spiderblocker.pot DELETED
@@ -1,140 +0,0 @@
1
- #, fuzzy
2
- msgid ""
3
- msgstr ""
4
- "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
- "Project-Id-Version: Spider Blocker\n"
6
- "POT-Creation-Date: 2018-07-19 02:04+0530\n"
7
- "PO-Revision-Date: 2018-07-19 02:04+0530\n"
8
- "Last-Translator: \n"
9
- "Language-Team: \n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 2.0.4\n"
14
- "X-Poedit-Basepath: ..\n"
15
- "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
- "X-Poedit-WPHeader: spiderblocker.php\n"
17
- "X-Poedit-SourceCharset: UTF-8\n"
18
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
- "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
20
- "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
- "X-Poedit-SearchPath-0: .\n"
22
- "X-Poedit-SearchPathExcluded-0: *.js\n"
23
-
24
- #: classes/class-spiderblocker.php:323
25
- msgid ""
26
- "SpiderBlocker plugin has enabled blocking of some bots, please review "
27
- "settings by visiting"
28
- msgstr ""
29
-
30
- #: classes/class-spiderblocker.php:323
31
- msgid "Setting page"
32
- msgstr ""
33
-
34
- #: classes/class-spiderblocker.php:348
35
- msgid ""
36
- "This plugin requires Apache2 server with mod_rewrite support. Please contact "
37
- "your hosting provider about upgrading your server software. Your Apache "
38
- "version is"
39
- msgstr ""
40
-
41
- #: classes/class-spiderblocker.php:362
42
- #, php-format
43
- msgid "%1$s %2$s %3$s"
44
- msgstr ""
45
-
46
- #: classes/class-spiderblocker.php:363
47
- msgid "This plugin requires"
48
- msgstr ""
49
-
50
- #: classes/class-spiderblocker.php:365
51
- msgid ""
52
- "file that is writable by the server. Please enable write access for file"
53
- msgstr ""
54
-
55
- #: classes/class-spiderblocker.php:523
56
- msgid "Failed parsing JSON"
57
- msgstr ""
58
-
59
- #: classes/class-spiderblocker.php:537
60
- msgid "Unable to process the request as no data has been received."
61
- msgstr ""
62
-
63
- #. Plugin Name of the plugin/theme
64
- #: classes/class-spiderblocker.php:702
65
- msgid "Spider Blocker"
66
- msgstr ""
67
-
68
- #: classes/class-spiderblocker.php:716
69
- msgid "Add New Bot"
70
- msgstr ""
71
-
72
- #: classes/class-spiderblocker.php:722 classes/class-spiderblocker.php:750
73
- #: classes/class-spiderblocker.php:762
74
- msgid "User Agent"
75
- msgstr ""
76
-
77
- #: classes/class-spiderblocker.php:726
78
- msgid "Bot Name"
79
- msgstr ""
80
-
81
- #: classes/class-spiderblocker.php:731
82
- msgid "Bot Description URL"
83
- msgstr ""
84
-
85
- #: classes/class-spiderblocker.php:738
86
- msgid "Add Bot"
87
- msgstr ""
88
-
89
- #: classes/class-spiderblocker.php:741
90
- msgid "List of bots"
91
- msgstr ""
92
-
93
- #: classes/class-spiderblocker.php:743
94
- msgid "Filter..."
95
- msgstr ""
96
-
97
- #: classes/class-spiderblocker.php:752 classes/class-spiderblocker.php:763
98
- msgid "Name"
99
- msgstr ""
100
-
101
- #: classes/class-spiderblocker.php:754 classes/class-spiderblocker.php:764
102
- msgid "State"
103
- msgstr ""
104
-
105
- #: classes/class-spiderblocker.php:756 classes/class-spiderblocker.php:766
106
- msgid "Action"
107
- msgstr ""
108
-
109
- #: classes/class-spiderblocker.php:791
110
- msgid "Save"
111
- msgstr ""
112
-
113
- #: classes/class-spiderblocker.php:792
114
- msgid "Reset to Defaults"
115
- msgstr ""
116
-
117
- #: classes/class-spiderblocker.php:793
118
- msgid "Import/Export Definitions"
119
- msgstr ""
120
-
121
- #: spiderblocker.php:46
122
- msgid ""
123
- "This plugin requires PHP 5.3.0 or higher. Please contact your hosting "
124
- "provider about upgrading your\n"
125
- "\t\t\tserver software. Your PHP version is"
126
- msgstr ""
127
-
128
- #. Description of the plugin/theme
129
- msgid ""
130
- "Spider Blocker will block most common bots that consume bandwidth and slow "
131
- "down your server."
132
- msgstr ""
133
-
134
- #. Author of the plugin/theme
135
- msgid "Easy Blog Networks"
136
- msgstr ""
137
-
138
- #. Author URI of the plugin/theme
139
- msgid "www.easyblognetworks.com"
140
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 5.1.1
6
- Stable tag: 1.0.22
7
 
8
  SpiderBlocker will block most common bots that consume bandwidth and slow down your server.
9
 
@@ -24,3 +24,16 @@ with Apache server and mod_rewrite enabled.
24
  2. Activate the plugin through the 'Plugins' menu in WordPress
25
  3. Go to **Tools** menu and then **SpiderBlocker* to configure
26
  4. If you use any other plugin to edit .htaccess file, make sure that content of file is valid
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  Contributors: niteoweb
3
  Tags: seo, block, bots, htaccess, apache, secure
4
  Requires at least: 4.0
5
+ Tested up to: 5.3.2
6
+ Stable tag: 1.2.0
7
 
8
  SpiderBlocker will block most common bots that consume bandwidth and slow down your server.
9
 
24
  2. Activate the plugin through the 'Plugins' menu in WordPress
25
  3. Go to **Tools** menu and then **SpiderBlocker* to configure
26
  4. If you use any other plugin to edit .htaccess file, make sure that content of file is valid
27
+
28
+ == Frequently Asked Questions ==
29
+
30
+
31
+ == Screenshots ==
32
+
33
+
34
+ == Changelog ==
35
+ = v1.2.0 =
36
+ - Code clean-up
37
+ - Support for the latest version of WordPress
38
+
39
+ == Upgrade Notice ==