WP-Ban - Version 1.68

Version Description

N/A

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-Ban
Version 1.68
Comparing to
See all releases

Code changes from version 1.67 to 1.68

Files changed (3) hide show
  1. ban-options.php +1 -1
  2. readme.txt +7 -2
  3. wp-ban.php +5 -5
ban-options.php CHANGED
@@ -197,7 +197,7 @@ $banned_options = get_option( 'banned_options' );
197
  var default_template;
198
  switch(template) {
199
  case "message":
200
- default_template = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" <?php echo str_replace('"', '\"', get_language_attributes()); ?>>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=<?php echo get_option('blog_charset'); ?>\" />\n<title>%SITE_NAME% - %SITE_URL%</title>\n</head>\n<body>\n<div id=\"wp-ban-container\">\n<p style=\"text-align: center; font-weight: bold;\"><?php _e('You Are Banned.', 'wp-ban'); ?></p>\n</div>\n</body>\n</html>";
201
  break;
202
  }
203
  jQuery("#banned_template_" + template).val(default_template);
197
  var default_template;
198
  switch(template) {
199
  case "message":
200
+ default_template = "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>%SITE_NAME% - %SITE_URL%</title>\n</head>\n<body>\n<div id=\"wp-ban-container\">\n<p style=\"text-align: center; font-weight: bold;\"><?php _e('You Are Banned.', 'wp-ban'); ?></p>\n</div>\n</body>\n</html>";
201
  break;
202
  }
203
  jQuery("#banned_template_" + template).val(default_template);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: GamerZ
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: banned, ban, deny, denied, permission, ip, hostname, host, spam, bots, bot, exclude, referrer, url, referral, range
5
  Requires at least: 4.3
6
- Tested up to: 4.4
7
- Stable tag: 1.67
8
 
9
  Ban users by IP, IP Range, host name, user agent and referrer url from visiting your WordPress's blog.
10
 
@@ -27,6 +27,11 @@ It will display a custom ban message when the banned IP, IP range, host name or
27
  * I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
28
 
29
  == Changelog ==
 
 
 
 
 
30
  = Version 1.67 =
31
  * FIXED: Notices
32
 
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: banned, ban, deny, denied, permission, ip, hostname, host, spam, bots, bot, exclude, referrer, url, referral, range
5
  Requires at least: 4.3
6
+ Tested up to: 4.5
7
+ Stable tag: 1.68
8
 
9
  Ban users by IP, IP Range, host name, user agent and referrer url from visiting your WordPress's blog.
10
 
27
  * I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
28
 
29
  == Changelog ==
30
+ = Version 1.68 =
31
+ * NEW: Use translate.wordpress.org to translate the plugin
32
+ * NEW: Use HTML DOCTYPE
33
+ * FIXED: Remove get_language_attributes()
34
+
35
  = Version 1.67 =
36
  * FIXED: Notices
37
 
wp-ban.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP-Ban
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Ban users by IP, IP Range, host name, user agent and referer url from visiting your WordPress's blog. It will display a custom ban message when the banned IP, IP range, host name, user agent or referer url tries to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
6
- Version: 1.67
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-ban
@@ -32,7 +32,7 @@ Text Domain: wp-ban
32
  ### Create Text Domain For Translation
33
  add_action( 'plugins_loaded', 'ban_textdomain' );
34
  function ban_textdomain() {
35
- load_plugin_textdomain( 'wp-ban', false, dirname( plugin_basename( __FILE__ ) ) );
36
  }
37
 
38
 
@@ -279,10 +279,10 @@ function ban_activate() {
279
  add_option('banned_ips', array());
280
  add_option('banned_hosts',array());
281
  add_option('banned_stats', array('users' => array(), 'count' => 0));
282
- add_option('banned_message', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n".
283
- '<html xmlns="http://www.w3.org/1999/xhtml" '.get_language_attributes().'>'."\n".
284
  '<head>'."\n".
285
- '<meta http-equiv="Content-Type" content="text/html; charset='.get_option('blog_charset').'" />'."\n".
286
  '<title>%SITE_NAME% - %SITE_URL%</title>'."\n".
287
  '</head>'."\n".
288
  '<body>'."\n".
3
  Plugin Name: WP-Ban
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Ban users by IP, IP Range, host name, user agent and referer url from visiting your WordPress's blog. It will display a custom ban message when the banned IP, IP range, host name, user agent or referer url tries to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.
6
+ Version: 1.68
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-ban
32
  ### Create Text Domain For Translation
33
  add_action( 'plugins_loaded', 'ban_textdomain' );
34
  function ban_textdomain() {
35
+ load_plugin_textdomain( 'wp-ban' );
36
  }
37
 
38
 
279
  add_option('banned_ips', array());
280
  add_option('banned_hosts',array());
281
  add_option('banned_stats', array('users' => array(), 'count' => 0));
282
+ add_option('banned_message', '<!DOCTYPE html>'."\n".
283
+ '<html>'."\n".
284
  '<head>'."\n".
285
+ '<meta charset="utf-8">'."\n".
286
  '<title>%SITE_NAME% - %SITE_URL%</title>'."\n".
287
  '</head>'."\n".
288
  '<body>'."\n".