Skip to content
Snippets Groups Projects
Commit 1c14761e authored by Erick Hitter's avatar Erick Hitter
Browse files

First round of review feedback

parent 626c3f7c
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ Provides a WP-CLI command to schedule these events. A UI is under consideration.
### Where is command output captured? ###
`error_log()` is used to store WP-CLI's output (`STDOUT`, `STDERR`, and the exit code), along with basic timing information and the command that was executed.
The actions `wp_cli_cron_control_offload_run_success` and `wp_cli_cron_control_offload_run_error` are fired, allowing you to capture command output as your environment allows.
### Can this be used with commands that manipulate files? ###
......@@ -51,8 +51,10 @@ Regardless of whether the constant or filter is used, either should provide an a
```
array(
'post',
'site',
'cli',
'core',
'eval',
'eval-file',
)
```
......@@ -64,10 +66,8 @@ Regardless of whether the constant or filter is used, either should provide an a
```
array(
'cli',
'core',
'eval',
'eval-file',
'post',
'site',
)
```
......
<?php
/**
* Class CLI
* Class Command
*
* @package WP_CLI_Cron_Control_Offload
*/
......@@ -8,7 +8,7 @@
namespace Automattic\WP\WP_CLI_Cron_Control_Offload;
if ( ! defined( 'WP_CLI' ) || ! \WP_CLI ) {
return false;
return;
}
use WP_CLI;
......@@ -17,7 +17,7 @@ use WP_CLI_Command;
/**
* Offload WP-CLI commands to cron
*/
class CLI extends WP_CLI_Command {
class Command extends WP_CLI_Command {
/**
* Create an event to run a given WP-CLI command
*
......@@ -50,4 +50,4 @@ class CLI extends WP_CLI_Command {
}
}
WP_CLI::add_command( CLI_NAMESPACE, __NAMESPACE__ . '\CLI' );
WP_CLI::add_command( CLI_NAMESPACE, __NAMESPACE__ . '\Command' );
......@@ -5,7 +5,7 @@ msgstr ""
"Project-Id-Version: WP-CLI Cron Control Offload 0.1.0\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/wp-cli-cron-control-offload\n"
"POT-Creation-Date: 2017-09-14 02:19:58+00:00\n"
"POT-Creation-Date: 2017-09-25 20:14:10+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
......@@ -25,7 +25,7 @@ msgstr ""
"X-Poedit-Bookmarks: \n"
"X-Textdomain-Support: yes\n"
#: includes/class-cli.php:49
#: includes/class-command.php:49
#. translators: 1: Human time difference, 2. Timestamp in UTC
msgid "Command scheduled for %1$s from now (%2$s)"
msgstr ""
......
......@@ -25,7 +25,7 @@ Provides a WP-CLI command to schedule these events. A UI is under consideration.
= Where is command output captured? =
`error_log()` is used to store WP-CLI's output (`STDOUT`, `STDERR`, and the exit code), along with basic timing information and the command that was executed.
The actions `wp_cli_cron_control_offload_run_success` and `wp_cli_cron_control_offload_run_error` are fired, allowing you to capture command output as your environment allows.
= Can this be used with commands that manipulate files? =
......@@ -51,8 +51,10 @@ Regardless of whether the constant or filter is used, either should provide an a
```
array(
'post',
'site',
'cli',
'core',
'eval',
'eval-file',
)
```
......@@ -64,10 +66,8 @@ Regardless of whether the constant or filter is used, either should provide an a
```
array(
'cli',
'core',
'eval',
'eval-file',
'post',
'site',
)
```
......
......@@ -19,5 +19,5 @@ const CLI_NAMESPACE = 'cli-cron-offload';
const MESSAGE_PREFIX = 'WP-CLI via Cron';
require_once __DIR__ . '/includes/functions.php';
require_once __DIR__ . '/includes/class-cli.php';
require_once __DIR__ . '/includes/class-command.php';
require_once __DIR__ . '/includes/run.php';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment