Reputation::select_answer( object $_post )
Description #
Award reputation when best answer selected.
Parameters #
- $_postobject (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) $question->post_author ) { ap_insert_reputation( 'select_answer', $_post->ID ); } }
Expand full source code Collapse full source code View on GitHub: addons/reputation/reputation.php:330
Add your comment