Open westonruter opened 11 years ago
We can avoid having to always write out:
add_action( 'foo', array( $this, 'action_foo' ), 10, 3 );
And instead have something like this:
$this->addAction( 'foo', 'action_foo' );
We can use Reflection API to discern the argument count for the action_foo method, and just assume the callback will be a method of the current object.
action_foo
We can avoid having to always write out:
And instead have something like this:
We can use Reflection API to discern the argument count for the
action_foo
method, and just assume the callback will be a method of the current object.