Here is an example for deactivation hook
//bb_register_deactivation_hook(__FILE__, 'GADeactivate'); // Bug in bbPress 0.8.3, do same thing using next line
add_action('bb_deactivate_plugin_' . bb_plugin_basename(__FILE__), 'GADeactivate');
just remove “de” from above, that should work. For example,
bb_register_activation_hook(__FILE__, 'hook_fct');
However, I haven’t used activation hook, therefore I don’t know is there a problem with it.
Euuh ok, still not sure how to use this.
Let’s say I want to ad a tabel in the db called ‘test’, but only if it doesn’t excist.
So on plugin activation:
1- check if the table ‘test’ excists
2- if not, insert the tabel ‘test’
3- else die
You don’t have to check the existence of the table you need
http://dev.mysql.com/doc/refman/4.1/en/create-table.html
Just create a table with IF NOT EXISTS
.
Without the [ ]
I presume. Thx going to try that!