Hello everyone, i'm used to php but i'm pretty new to WP, and Object Oriented Programming (using classes and stuff :D ).
i get more or less the concepts but i lack practice and maybe class design logic.
I wish to write a plugin, the best practice way possible.
This is just the skeleton, but i can't get it work.
I want my plugin to do things :D on activation, deactivation and uninstall
The problem is how to pass object stuff inside.
I used the skeleton used here :
as advised in http://codex.wordpress.org/Function_Reference/register_activation_hook
If you take the time to look at my code sofar, obviously i got an error when i call class method do_activate() because i call $this
But my noob question would be then, what's the use of doing class if i have to use only static methods ?
So my questions :
- how can i add options / create tables on activation based on this class ?
- Is it possible to have (non static) properties i can use inside my class, like table names, plugin version, options ? If yes, how. I mean for instance, my plugin tables names should be properties and not global since they are intended to be used only in the plugin.
Thanks in advance for any help or advice.