AnsPress_Reputation_Hooks::init()

Description #

Init class.

Source #

File: addons/free/reputation.php

	public static function init() {
		SELF::register_default_events();

		ap_add_default_options([
			'user_page_title_reputations'  => __( 'Reputations', 'anspress-question-answer' ),
			'user_page_slug_reputations'   => 'reputations',
		]);

		anspress()->add_action( 'ap_form_addon-free_reputation', __CLASS__, 'load_options', 20 );
		anspress()->add_action( 'wp_ajax_ap_save_events', __CLASS__, 'ap_save_events' );
		anspress()->add_action( 'ap_after_new_question', __CLASS__, 'new_question', 10, 2 );
		anspress()->add_action( 'ap_after_new_answer', __CLASS__, 'new_answer', 10, 2 );
		anspress()->add_action( 'ap_untrash_question', __CLASS__, 'new_question', 10, 2 );
		anspress()->add_action( 'ap_trash_question', __CLASS__, 'trash_question', 10, 2 );
		anspress()->add_action( 'ap_before_delete_question', __CLASS__, 'trash_question', 10, 2 );
		anspress()->add_action( 'ap_untrash_answer', __CLASS__, 'new_answer', 10, 2 );
		anspress()->add_action( 'ap_trash_answer', __CLASS__, 'trash_answer', 10, 2 );
		anspress()->add_action( 'ap_before_delete_answer', __CLASS__, 'trash_answer', 10, 2 );
		anspress()->add_action( 'ap_select_answer', __CLASS__, 'select_answer' );
		anspress()->add_action( 'ap_unselect_answer', __CLASS__, 'unselect_answer' );
		anspress()->add_action( 'ap_vote_up', __CLASS__, 'vote_up' );
		anspress()->add_action( 'ap_vote_down', __CLASS__, 'vote_down' );
		anspress()->add_action( 'ap_undo_vote_up', __CLASS__, 'undo_vote_up' );
		anspress()->add_action( 'ap_undo_vote_down', __CLASS__, 'undo_vote_down' );
		anspress()->add_action( 'ap_publish_comment', __CLASS__, 'new_comment' );
		anspress()->add_action( 'ap_unpublish_comment', __CLASS__, 'delete_comment' );
		anspress()->add_filter( 'user_register', __CLASS__, 'user_register' );
		anspress()->add_action( 'delete_user', __CLASS__, 'delete_user' );
		anspress()->add_filter( 'ap_user_display_name', __CLASS__, 'display_name', 10, 2 );
		anspress()->add_filter( 'ap_pre_fetch_question_data', __CLASS__, 'pre_fetch_post' );
		anspress()->add_filter( 'ap_pre_fetch_answer_data', __CLASS__, 'pre_fetch_post' );
		anspress()->add_filter( 'bp_before_member_header_meta', __CLASS__, 'bp_profile_header_meta' );
		anspress()->add_filter( 'ap_user_pages', __CLASS__, 'ap_user_pages' );
		anspress()->add_filter( 'ap_ajax_load_more_reputation', __CLASS__, 'load_more_reputation' );
		anspress()->add_filter( 'ap_bp_nav', __CLASS__, 'ap_bp_nav' );
		anspress()->add_filter( 'ap_bp_page', __CLASS__, 'ap_bp_page', 10, 2 );
		anspress()->add_filter( 'ap_all_options', __CLASS__, 'ap_all_options', 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