OOP Plugin – Exposing Class Functions
-
I’m trying to build a plugin in OOP fashion using Tom McFarlin’s excellent plugin boilerplate.
In the constructor I have:
add_action( 'end_loop', array( $this, 'hereman1' ) );In the core funtion area I have:
public function hereman1() {It is my understanding that a public function should be callable from outside the object, but when my single page template trys to call the function I get a Fatal Error that says the function is undefined.
I can call the function if my template calls
myobj::hereman1()What am I doing wrong?
The topic ‘OOP Plugin – Exposing Class Functions’ is closed to new replies.