2222 */
2323class 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 ' ) );
0 commit comments