[Resolved] [help] sink plugin hooks for $this references in WordPress 2.0 ?
Hej people, what am I doing wrong on this one:
In the Codex it says:
You can also sink plugin hooks to object instances. Here is an example of how to do this using the class above:
$mailer = new emailer();
add_action(‘publish_post’, array(&$mailer, ‘send’));
Whenever a post’s status is set to “Publish”, WordPress will execute the send() method of the $mailer object. Used this way, the class can make use of $this-> references, whereas the static calling method above can only call the class methods statically using the scope resolution operator.
I am doing this
$lbnh_installer_reference = new loadbalancer();
And I am also getting a confirmation that the constructor of the loadbalancer class has been run, however it doesn’t run the installer function.
I am doing this, because I am wanting to use $this references within the class.
Help would be nice or maybe this isn’t possible in WordPress 2.0 anymore?
- The topic ‘[Resolved] [help] sink plugin hooks for $this references in WordPress 2.0 ?’ is closed to new replies.