Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0 with localization, declare WP 5.7 compatibility #20

Merged
merged 7 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Directories
/.github export-ignore
/.wordpress-org export-ignore
/vendor export-ignore

# Files
/.gitattributes export-ignore
/.gitignore export-ignore
/composer.json export-ignore
/composer.lock export-ignore
/phpcs.xml export-ignore
6 changes: 3 additions & 3 deletions .github/workflows/wordpress-plugin-asset-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
name: Push to master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@master
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
README_NAME: README.md
README_NAME: README.md
4 changes: 2 additions & 2 deletions .github/workflows/wordpress-plugin-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
name: New tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
vendor/
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# Blacklist Updater #
# Block List Updater #
* Contributors: pluginkollektiv
* Tags: spam, antispam, comments, discussion, disallowed comment keys, blocklist, blacklist
* Tags: spam, antispam, comments, discussion, disallowed comment keys, block list
* Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
* Requires at least: 3.8
* Tested up to: 5.6
* Stable tag: trunk
* Tested up to: 5.7
* Requires PHP: 5.2
* Stable tag: 1.0.0
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html

Automatic updating of the comment blocklist in WordPress with antispam keys from GitHub.
Automatic updating of the comment block list in WordPress with antispam keys from GitHub.

## Description ##
Few users are familiar with the comment blocklist built into WordPress. Located in the WordPress admin area under “Settings”—“Discussion”, that blocklist for incoming comments accepts values (words) to identify spam by.
Few users are familiar with the comment block list built into WordPress. Located in the WordPress admin area under “Settings”—“Discussion”, that block list for incoming comments accepts values (words) to identify spam by.

Additionally to plugins like [Antispam Bee](https://wordpress.org/plugins/antispam-bee/) in order to fight spam successfully a curated comment blocklist is recommendable. You can either update the list manually, or utilize a very detailed global [comment blocklist](https://github.com/splorp/wordpress-comment-blacklist) that gets updated on a regular basis.
Additionally to plugins like [Antispam Bee](https://wordpress.org/plugins/antispam-bee/) in order to fight spam successfully a curated comment block list is recommendable. You can either update the list manually, or utilize a very detailed global [comment block list](https://github.com/splorp/wordpress-comment-blacklist) that gets updated on a regular basis.

Blacklist Updater has been developed to keep your comment blocklist in your WordPress installation up to speed with the curated global list on GitHub.
Block List Updater has been developed to keep your comment block list in your WordPress installation up to speed with the curated global list on GitHub.

The plugin will check the global comment blocklist on GitHub multiple times a day. Whenever new anti-spam values have been added to the global list, Blacklist Updater will read the global list and update your WordPress database accordingly. While the check-up process will run several times a day, the plugin will only update the database when it detects an actual change of the global comment blocklist on GitHub.
The plugin will check the global comment block list on GitHub multiple times a day. Whenever new anti-spam values have been added to the global list, Block List Updater will read the global list and update your WordPress database accordingly. While the check-up process will run several times a day, the plugin will only update the database when it detects an actual change of the global comment block list on GitHub.

### Support ###
* Community support via the [support forums on wordpress.org](https://wordpress.org/support/plugin/blacklist-updater)
Expand All @@ -33,15 +34,14 @@ The plugin will check the global comment blocklist on GitHub multiple times a da
* Author: [Sergej Müller](https://sergejmueller.github.io/)
* Maintainers: [pluginkollektiv](https://pluginkollektiv.org/)

## Installation ##
* If you don’t know how to install a plugin for WordPress, [here’s how](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).

### Requirements ###
* PHP 5.2.4 or greater
* WordPress 3.8 or greater

## Changelog ##

### 1.0.0 ###
* Localize the plugin via Translate WordPress
* Add code style check and make code compatible with WP CS
* Rename plugin to *Block List Updater*

### 0.0.6 ###
* WordPress 5.5/5.6 compatibility
* Updated description with more inclusive wording
Expand Down
52 changes: 28 additions & 24 deletions blacklist-updater.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<?php
/*
Plugin Name: Blacklist Updater
Text Domain: blacklist-updater
Domain Path: /lang
Description: Automatic updating of the <a href='options-discussion.php'>comment blacklist</a> in WordPress with antispam keys from <a href='https://github.com/splorp/wordpress-comment-blacklist' target='_blank'>GitHub</a>.
Author: pluginkollektiv
Author URI: https://pluginkollektiv.org
Plugin URI: https://wordpress.org/plugins/blacklist-updater/
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html für
Version: 0.0.6
*/
/**
* Plugin Name: Block List Updater
* Description: Automatic updating of the <a href='options-discussion.php'>comment block list</a> in WordPress with antispam keys from <a href='https://github.com/splorp/wordpress-comment-blacklist' target='_blank'>GitHub</a>.
* Author: pluginkollektiv
* Author URI: https://pluginkollektiv.org
* Plugin URI: https://wordpress.org/plugins/blacklist-updater/
* Text Domain: blacklist-updater
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html für
* Version: 1.0.0
*
* @package BlockListUpdater
*/

/*
Copyright (C) 2014-2015 Sergej Müller
Expand All @@ -30,10 +31,8 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/


/* Quit */
defined('ABSPATH') OR exit;

defined( 'ABSPATH' ) || exit;

/* Constants */
define(
Expand All @@ -45,60 +44,65 @@
'blacklist_updater_refresh_data'
);

/* Initialize the plugin. */
add_action( 'plugins_loaded', array( 'Blacklist_Updater', 'init' ), 99 );

/* Register */
register_activation_hook(
__FILE__,
array(
'Blacklist_Updater',
'activation_hook'
'activation_hook',
)
);
register_deactivation_hook(
__FILE__,
array(
'Blacklist_Updater',
'deactivation_hook'
'deactivation_hook',
)
);
register_uninstall_hook(
__FILE__,
array(
'Blacklist_Updater',
'uninstall_hook'
'uninstall_hook',
)
);


/* Hooks */
add_action(
BLACKLIST_UPDATER_EVENT,
array(
'Blacklist_Updater',
'refresh_data'
'refresh_data',
)
);
add_filter(
'plugin_row_meta',
array(
'Blacklist_Updater',
'plugin_meta'
'plugin_meta',
),
10,
2
);


/* Autoload */
spl_autoload_register( 'blacklist_updater_autoload' );

/**
* Plugin autoloader.
*
* @param string $class The classname.
*/
function blacklist_updater_autoload( $class ) {
if ( in_array( $class, array( 'Blacklist_Updater' ) ) ) {
require_once(
sprintf(
'%s/inc/%s.class.php',
'%s/inc/class-%s.php',
dirname( __FILE__ ),
strtolower( $class )
strtolower( str_replace( '_', '-', $class ) )
)
);
}
Expand Down
24 changes: 24 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "pluginkollektiv/blacklist-updater",
"description": "Automatic updating of the comment block list in WordPress with antispam keys from GitHub.",
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=5.2"
},
"require-dev": {
"php": ">=7.3",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"squizlabs/php_codesniffer": "^3.5",
"wp-coding-standards/wpcs": "^2.3"
},
"scripts": {
"cs": [
"phpcs --standard=phpcs.xml -s"
],
"csfix": [
"phpcbf --standard=phpcs.xml"
]
}
}
Loading