/** * Return count of net vote of a answer * @return integer * @since 2.1 */ function ap_answer_get_the_net_vote() { return ap_net_vote(ap_answer_the_object()); }
function get_question_id() { if (is_question() && get_query_var('question_id')) { return (int) get_query_var('question_id'); } elseif (is_question() && get_query_var('question')) { return get_query_var('question'); } elseif (is_question() && get_query_var('question_name')) { $post = get_page_by_path(get_query_var('question_name'), OBJECT, 'question'); return $post->ID; } elseif (get_query_var('edit_q')) { return get_query_var('edit_q'); } elseif (ap_answer_the_object()) { return ap_answer_get_the_question_id(); } return false; }