Skip to content

Commit a929acb

Browse files
authored
Apply suggestions from code review
1 parent 15f206b commit a929acb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/EvalFile_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function __invoke( $args, $assoc_args ) {
6666
}
6767

6868
if ( $hook ) {
69-
add_action(
69+
WP_CLI::add_wp_hook(
7070
$hook,
7171
function () use ( $file, $args, $use_include ) {
7272
self::execute_eval( $file, $args, $use_include );

src/Eval_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __invoke( $args, $assoc_args ) {
4848

4949
if ( $hook ) {
5050
$code = $args[0];
51-
add_action(
51+
WP_CLI::add_wp_hook(
5252
$hook,
5353
function () use ( $code ) {
5454
eval( $code );

0 commit comments

Comments
 (0)