I have created a plugin where I want to call two different functions on activation.
Is there a best way to do this?
Should I use register_activation_hook
twice? As in:
register_activation_hook( __FILE__, 'function_1' );
register_activation_hook( __FILE__, 'function_1' );
Or call the two functions from within an activation function, as in:
register_activation_hook( __FILE__, 'my_activation_function' );
function my_activation_function () {
function_1();
function_2();
}
Any ideas? Thanks.
register_activation_hook
does work - though it may not be the right way to do it.