Reputation::select_answer( object $_post )

Description #

Award reputation when best answer selected.

Parameters #

  • $_post
    object (Required) Post object.

Source #

File: addons/reputation/reputation.php

	public function select_answer( $_post ) {
		ap_insert_reputation( 'best_answer', $_post->ID, $_post->post_author );
		$question = get_post( $_post->post_parent );

		// Award select answer points to question author only.
		if ( get_current_user_id() === (int) $_post->post_author ) {
			ap_insert_reputation( 'select_answer', $_post->ID );

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