diff --git a/includes/functions.php b/includes/functions.php index 7a3fce4a8b2c1b989a486b8bfe3f59d451dad2e8..8ea93c84d91da8d10d7f45784718556532d78bb2 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -18,6 +18,7 @@ function is_command_allowed( $command ) { * @return array */ function get_command_whitelist() { + // TODO: constant! // Supported built-in commands $whitelist = array( 'cache', @@ -54,6 +55,7 @@ function get_command_whitelist() { * @return array */ function get_command_blacklist() { + // TODO: constant! return array( 'cli', 'config', diff --git a/includes/run.php b/includes/run.php index 4377f8d75079e12c42124512f0b5eee8cd231838..f49859e7bfb818486d2419b0bcc3c5e32ff80c55 100644 --- a/includes/run.php +++ b/includes/run.php @@ -32,6 +32,7 @@ function run_event( $command ) { // Command failed if ( ! is_object( $output ) || is_wp_error( $output ) ) { + // TODO: message consistency, revisit using ACTION as the "key", seems wrong trigger_error( 'WP-CLI command failed. (' . var_export( $command, true ) . ')', E_USER_WARNING ); trigger_error( var_export( $output, true ), E_USER_WARNING ); return;