Skip to content

Commit 837f01f

Browse files
authored
Merge pull request #1 from norcross/develop
initial release
2 parents a7c3db5 + cd95dbf commit 837f01f

File tree

5 files changed

+15
-30
lines changed

5 files changed

+15
-30
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
#### Version 0.0.1 - 2019/05/10
2+
#### Version 1.0.0 - 2024/11/12
33
* initial release

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Scrub Comment Author IP
88

99
Make sure no real IP addresses are stored in WP comments.
1010

11+
### Features
12+
13+
* a CLI command to bulk convert existing comment IP addresses to the masked
14+
* auto-filtering of new comments to use masked IP.
15+
1116
### To Do
12-
* this readme file, clearly.
13-
* add a CLI command to update in batch?
17+
18+
* add admin UI piece to bulk convert existing comments
19+
* add whitelisting of IPs

includes/activate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
function activate() {
2020

2121
// Set our initial option.
22-
update_option( Core\OPTION_KEY, 'yes' );
22+
update_option( Core\OPTION_KEY, 'yes', false );
2323

2424
// Include our action so that we may add to this later.
2525
do_action( Core\HOOK_PREFIX . 'activate_process' );

includes/cli-commands.php

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,6 @@
2222
*/
2323
class ScrubCLICommands extends WP_CLI_Command {
2424

25-
/**
26-
* Get the array of arguments for the runcommand function.
27-
*
28-
* @param array $custom Any custom args to pass.
29-
*
30-
* @return array
31-
*/
32-
protected function get_command_args( $custom = array() ) {
33-
34-
// Set my base args.
35-
$args = array(
36-
'return' => true, // Return 'STDOUT'; use 'all' for full object.
37-
'parse' => 'json', // Parse captured STDOUT to JSON array.
38-
'launch' => false, // Reuse the current process.
39-
'exit_error' => false, // Halt script execution on error.
40-
);
41-
42-
// Return either the base args, or the merged item.
43-
return ! empty( $custom ) ? wp_parse_args( $args, $custom ) : $args;
44-
}
45-
4625
/**
4726
* Swap out any existing IP data with our default.
4827
*
@@ -135,7 +114,7 @@ function cleanup() {
135114
function enable() {
136115

137116
// Set our option key.
138-
update_option( Core\OPTION_KEY, 'yes' );
117+
update_option( Core\OPTION_KEY, 'yes', false );
139118

140119
// Show the result and bail.
141120
WP_CLI::success( __( 'The plugin setting has been enabled.', 'scrub-comment-author-ip' ) );
@@ -154,7 +133,7 @@ function enable() {
154133
function disable() {
155134

156135
// Just set it to "no" for this.
157-
update_option( Core\OPTION_KEY, 'no' );
136+
update_option( Core\OPTION_KEY, 'no', false );
158137

159138
// Show the result and bail.
160139
WP_CLI::success( __( 'The plugin setting has been disabled.', 'scrub-comment-author-ip' ) );

scrub-comment-author-ip.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* Plugin URI: https://github.com/norcross/scrub-comment-author-ip
55
* Description: Make sure no real IP addresses are stored in WP comments.
66
* Author: Andrew Norcross
7-
* Author URI: http://andrewnorcross.com
7+
* Author URI: https://andrewnorcross.com
88
* Text Domain: scrub-comment-author-ip
99
* Domain Path: /languages
10-
* Version: 0.0.1
10+
* Version: 1.0.0
1111
*
1212
* @package ScrubCommentAuthorIP
1313
*/
@@ -22,7 +22,7 @@
2222
if ( ! defined( 'ABSPATH' ) ) exit;
2323

2424
// Define our version.
25-
define( __NAMESPACE__ . '\VERS', '0.0.1' );
25+
define( __NAMESPACE__ . '\VERS', '1.0.0' );
2626

2727
// Plugin root file.
2828
define( __NAMESPACE__ . '\FILE', __FILE__ );

0 commit comments

Comments
 (0)