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