If you want to hook into multiple actions, you have to call add_action
multiple times. However, this is not so hard. Let’s take your plugin class as an example:
class WPSE6526_getStatic // Always prefix your plugin with something unique, like your name. Here I used the question number
{
var $_renderTasksOn = array( 'wp_insert_post', 'wp_insert_comment', ... );
function WPSE6526_getStatic()
{
// The constructor of this class, which will hook up everything
// This is the 'trick' to this question: a loop on your list and `add_action` for each item
foreach ( $this->_renderTasksOn as $hookname ) {
add_action( $hookname, array( &$this, 'getStatic' ) );
}
}
function getStatic()
{
// Your code
}
}
add_action( 'plugins_loaded', 'wpse6526_getStatic_init' );
function wpse6526_getStatic_init()
{
$GLOBALS['wpse6526_getStatic_instance'] = new WPSE6526_getStatic();
}