Skip to content

Commit 40e8991

Browse files
committed
Add args and assoc_args in hook
Signed-off-by: Riddhesh Sanghvi <[email protected]>
1 parent 5eb29eb commit 40e8991

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

php/EE/Dispatcher/Subcommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,14 @@ public function invoke( $args, $assoc_args, $extra_args ) {
413413
unset( $assoc_args[ $key ] );
414414
}
415415

416-
$path = get_path( $this->get_parent() );
416+
$path = get_path( $this->get_parent() );
417417
$parent = implode( ' ', array_slice( $path, 1 ) );
418-
$cmd = $this->name;
418+
$cmd = $this->name;
419419
if ( $parent ) {
420-
EE::do_hook( "before_invoke:{$parent}" );
420+
EE::do_hook( "before_invoke:{$parent}", $args, $assoc_args );
421421
$cmd = $parent . ' ' . $cmd;
422422
}
423-
EE::do_hook( "before_invoke:{$cmd}" );
423+
EE::do_hook( "before_invoke:{$cmd}", $args, $assoc_args );
424424

425425
call_user_func( $this->when_invoked, $args, array_merge( $extra_args, $assoc_args ) );
426426

0 commit comments

Comments
 (0)