ap_count_other_answer( false|int $question_id = false )

Description #

Count all answers excluding best answer.

Parameters #

  • $question_id
    false | int (Optional) Question id. Default value: false

Source #

File: includes/answer-loop.php

function ap_count_other_answer( $question_id = false ) {
	if ( ! $question_id ) {
		$question_id = get_question_id();
	}

	$count = ap_get_answers_count( $question_id );

	if ( ap_have_answer_selected( $question_id ) ) {
		return (int) ( $count - 1 );
	}

	return (int) $count;
}

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