AnsPress_Email_Hooks::init()

Description #

Initialize the class.

Source #

File: addons/free/email.php

	public static function init() {
		SELF::ap_default_options();
		anspress()->add_filter( 'ap_form_addon-free_email', __CLASS__, 'register_option' );
		anspress()->add_filter( 'ap_form_email_template', __CLASS__, 'register_email_template' );
		anspress()->add_filter( 'ap_all_options', __CLASS__, 'ap_all_options', 10, 2 );
		anspress()->add_action( 'wp_ajax_ap_email_template', __CLASS__, 'ap_email_template' );
		anspress()->add_action( 'ap_ajax_form_email_template', __CLASS__, 'save_email_template_form', 11 );
		anspress()->add_action( 'ap_email_default_template_new_question', __CLASS__, 'template_new_question' );
		anspress()->add_action( 'ap_email_default_template_new_answer', __CLASS__, 'template_new_answer' );
		anspress()->add_action( 'ap_email_default_template_select_answer', __CLASS__, 'template_select_answer' );
		anspress()->add_action( 'ap_email_default_template_new_comment', __CLASS__, 'template_new_comment' );
		anspress()->add_action( 'ap_email_default_template_edit_question', __CLASS__, 'template_edit_question' );
		anspress()->add_action( 'ap_email_default_template_edit_answer', __CLASS__, 'template_edit_answer' );
		anspress()->add_action( 'ap_email_default_template_trash_question', __CLASS__, 'template_trash_question' );
		anspress()->add_action( 'ap_email_default_template_trash_answer', __CLASS__, 'template_trash_answer' );
		anspress()->add_action( 'ap_email_form_allowed_tags', __CLASS__, 'form_allowed_tags' );

		anspress()->add_filter( 'comment_notification_recipients', __CLASS__, 'default_recipients', 10, 2 );

		anspress()->add_action( 'ap_after_new_question', __CLASS__, 'ap_after_new_question' );
		anspress()->add_action( 'ap_after_new_answer', __CLASS__, 'ap_after_new_answer' );
		anspress()->add_action( 'ap_select_answer', __CLASS__, 'select_answer' );
		anspress()->add_action( 'ap_publish_comment', __CLASS__, 'new_comment' );
		anspress()->add_action( 'ap_processed_update_question', __CLASS__, 'ap_after_update_question', 10, 2 );
		anspress()->add_action( 'ap_processed_update_answer', __CLASS__, 'ap_after_update_answer', 10, 2 );
		anspress()->add_action( 'ap_trash_question', __CLASS__, 'ap_trash_question', 10, 2 );
		anspress()->add_action( 'ap_trash_answer', __CLASS__, 'ap_trash_answer', 10, 2 );
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment