Registering Class methods as hook callbacks
-
I’m not sure if I have done this correctly.
As I understand it:
if I have a class foo and a static method bar I can register that as the callback by passing the array
array("foo","bar")
as the function name.If I have an instance of a class in $foo and want to call the method bar I pass the array
array($foo,'bar')
.If I need to register an action inside the class itself would it work with
array($this,'bar')
?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Registering Class methods as hook callbacks’ is closed to new replies.