AnsPress_Reputation_Hooks::register_default_events()

Description #

Register default reputation events.

Source #

File: addons/free/reputation.php

	public static function register_default_events() {
		ap_register_reputation_event( 'register', array(
			'points'      => 10,
			'label'       => __( 'Registration', 'anspress-question-answer' ),
			'description' => __( 'Points awarded when user account is created', 'anspress-question-answer' ),
			'icon'        => 'apicon-question',
			'activity'    => __( 'Registered', 'anspress-question-answer' ),
			'parent' 			=> 'question',
		) );

		ap_register_reputation_event( 'ask', array(
			'points'      => 2,
			'label'       => __( 'Asking', 'anspress-question-answer' ),
			'description' => __( 'Points awarded when user asks a question', 'anspress-question-answer' ),
			'icon'        => 'apicon-question',
			'activity'    => __( 'Asked a question', 'anspress-question-answer' ),
			'parent' 			=> 'question',
		) );

		ap_register_reputation_event( 'answer', array(
			'points'      => 5,
			'label'       => __( 'Answering', 'anspress-question-answer' ),
			'description' => __( 'Points awarded when user answer a question', 'anspress-question-answer' ),
			'icon'        => 'apicon-answer',
			'activity'    => __( 'Posted an answer', 'anspress-question-answer' ),
			'parent' 			=> 'answer',
		) );

		ap_register_reputation_event( 'comment', array(
			'points'      => 2,
			'label'       => __( 'Commenting', 'anspress-question-answer' ),
			'description' => __( 'Points awarded when user comment on question or answer', 'anspress-question-answer' ),
			'icon'        => 'apicon-comments',
			'activity'    => __( 'Commented on a post', 'anspress-question-answer' ),
			'parent' 			=> 'comment',
		) );

		ap_register_reputation_event( 'select_answer', array(
			'points'      => 2,
			'label'       => __( 'Selecting an Answer', 'anspress-question-answer' ),
			'description' => __( 'Points awarded when user select an answer for thier question', 'anspress-question-answer' ),
			'icon'        => 'apicon-check',
			'activity'    => __( 'Selected an answer as best', 'anspress-question-answer' ),
			'parent' 			=> 'question',
		) );

		ap_register_reputation_event( 'best_answer', array(
			'points'      => 10,
			'label'       => __( 'Answer selected as best', 'anspress-question-answer' ),
			'description' => __( 'Points awarded when user\'s answer selected as best', 'anspress-question-answer' ),
			'icon'        => 'apicon-check',
			'activity'    => __( 'Answer was selected as best', 'anspress-question-answer' ),
			'parent' 			=> 'answer',
		) );

		ap_register_reputation_event( 'received_vote_up', array(
			'points'      => 10,
			'label'       => __( 'Received up vote', 'anspress-question-answer' ),
			'description' => __( 'Points awarded when user receive an upvote', 'anspress-question-answer' ),
			'icon'        => 'apicon-thumb-up',
			'activity'    => __( 'Received an upvote', 'anspress-question-answer' ),
		) );

		ap_register_reputation_event( 'received_vote_down', array(
			'points'      => -2,
			'label'       => __( 'Received down vote', 'anspress-question-answer' ),
			'description' => __( 'Points awarded when user receive a down vote', 'anspress-question-answer' ),
			'icon'        => 'apicon-thumb-down',
			'activity'    => __( 'Received a down vote', 'anspress-question-answer' ),
		) );

		ap_register_reputation_event( 'given_vote_up', array(
			'points'      => 0,
			'label'       => __( 'Gives an up vote', 'anspress-question-answer' ),
			'description' => __( 'Points taken from user when they give a vote up', 'anspress-question-answer' ),
			'icon'        => 'apicon-thumb-up',
			'activity'    => __( 'Given an up vote', 'anspress-question-answer' ),
		) );

		ap_register_reputation_event( 'given_vote_down', array(
			'points'      => 0,
			'label'       => __( 'Gives down vote', 'anspress-question-answer' ),
			'description' => __( 'Points taken from user when user give a down vote', 'anspress-question-answer' ),
			'icon'        => 'apicon-thumb-down',
			'activity'    => __( 'Given a down vote', 'anspress-question-answer' ),
		) );
	}

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