Reputation::__construct()

Description #

Init class.

Changelog #

VersionDescription
unknownunknown
4.2.0Introduced.

Source #

File: addons/reputation/reputation.php

	protected function __construct() {
		$this->register_default_events();

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

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