function add_listener_actions_and_filters()
{
add_action('admin_bar_menu', array($this, 'toolbar'), 999);
add_action('admin_bar_init', array($this, 'styles'));
// Comments
add_action('delete_comment', array($this, 'comment_action_handler'));
add_action('wp_set_comment_status', array($this, 'comment_action_handler'));
add_action('trashed_comment', array($this, 'comment_action_handler'));
add_action('untrashed_comment', array($this, 'comment_action_handler'));
add_action('wp_insert_comment', array($this, 'comment_action_handler'));
add_action('comment_post', array($this, 'comment_action_handler'));
add_action('edit_comment', array($this, 'comment_action_handler'));
// Commentmeta
add_action('added_comment_meta', array($this, 'commentmeta_insert_handler'), 10, 2);
add_action('updated_comment_meta', array($this, 'commentmeta_modification_handler'), 10, 4);
add_action('deleted_comment_meta', array($this, 'commentmeta_modification_handler'), 10, 4);
// Users
if ($this->is_main_site()) {
add_action('user_register', array($this, 'userid_action_handler'));
add_action('password_reset', array($this, 'userid_action_handler'));
add_action('profile_update', array($this, 'userid_action_handler'));
add_action('user_register', array($this, 'userid_action_handler'));
add_action('deleted_user', array($this, 'userid_action_handler'));
}
// Usermeta
if ($this->is_main_site()) {
add_action('added_usermeta', array($this, 'usermeta_action_handler'), 10, 4);
add_action('update_usermeta', array($this, 'usermeta_action_handler'), 10, 4);
add_action('delete_usermeta', array($this, 'usermeta_action_handler'), 10, 4);
}
// Posts
add_action('delete_post', array($this, 'post_action_handler'));
add_action('trash_post', array($this, 'post_action_handler'));
add_action('untrash_post', array($this, 'post_action_handler'));
add_action('edit_post', array($this, 'post_action_handler'));
add_action('save_post', array($this, 'post_action_handler'));
add_action('wp_insert_post', array($this, 'post_action_handler'));
add_action('edit_attachment', array($this, 'post_action_handler'));
add_action('add_attachment', array($this, 'post_action_handler'));
add_action('delete_attachment', array($this, 'post_action_handler'));
add_action('private_to_published', array($this, 'post_action_handler'));
add_action('wp_restore_post_revision', array($this, 'post_action_handler'));
// Postmeta
add_action('added_post_meta', array($this, 'postmeta_insert_handler'), 10, 4);
add_action('update_post_meta', array($this, 'postmeta_modification_handler'), 10, 4);
add_action('updated_post_meta', array($this, 'postmeta_modification_handler'), 10, 4);
add_action('delete_post_meta', array($this, 'postmeta_modification_handler'), 10, 4);
add_action('deleted_post_meta', array($this, 'postmeta_modification_handler'), 10, 4);
add_action('added_postmeta', array($this, 'postmeta_action_handler'), 10, 3);
add_action('update_postmeta', array($this, 'postmeta_action_handler'), 10, 3);
add_action('delete_postmeta', array($this, 'postmeta_action_handler'), 10, 3);
// Links
add_action('edit_link', array($this, 'link_action_handler'));
add_action('add_link', array($this, 'link_action_handler'));
add_action('delete_link', array($this, 'link_action_handler'));
// Taxonomy
add_action('created_term', array($this, 'term_handler'), 2);
add_action('edited_terms', array($this, 'term_handler'), 2);
add_action('delete_term', array($this, 'term_handler'), 2);
add_action('edit_term_taxonomy', array($this, 'term_taxonomy_handler'));
add_action('delete_term_taxonomy', array($this, 'term_taxonomy_handler'));
add_action('edit_term_taxonomies', array($this, 'term_taxonomies_handler'));
add_action('add_term_relationship', array($this, 'term_relationship_handler'), 10, 2);
add_action('delete_term_relationships', array($this, 'term_relationships_handler'), 10, 2);
add_action('set_object_terms', array($this, 'set_object_terms_handler'), 10, 3);
// Files
if ($this->is_main_site()) {
add_action('switch_theme', array($this, 'theme_action_handler'));
add_action('activate_plugin', array($this, 'plugin_action_handler'));
add_action('deactivate_plugin', array($this, 'plugin_action_handler'));
}
add_action('wp_handle_upload', array($this, 'upload_handler'));
// Options
add_action('deleted_option', array($this, 'option_handler'), 1);
add_action('updated_option', array($this, 'option_handler'), 1);
add_action('added_option', array($this, 'option_handler'), 1);
$this->add_woocommerce_actions();
$this->add_vp_required_filters();
}