否则如果不工作,如果总是返回true,则选择其他选项

I make a function to return int based on COUNT, but else if not working. Could I miss something?

   function kv_get_task_count() {
    global $wpdb;


            if (filter_status('new')):
                $count_post = (int) $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'posts
                                            WHERE post_type ="screening"
                                                AND post_status ="new"
                                            ' );
            elseif (filter_status('pending_review')): 
                $count_post =  (int) $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'posts
                                            WHERE post_type ="screening"
                                                AND post_status ="pending_review"
                                            ' );
            else:
                $count_post =  (int) $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'posts
                                            WHERE post_type ="screening"
                                                AND post_status ="new"
                                                OR post_status ="pending_review"
                                            ' );
            endif;  

            return $count_post;
}

QUESTION CLOSE !!

I change my code to:

   function kv_get_task_count() {
    global $wpdb;


            if ($_REQUEST['post_status'] == 'new'):
                $count_post = (int) $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'posts
                                            WHERE post_type ="screening"
                                                AND post_status ="new"
                                            ' );
            elseif ($_REQUEST['post_status'] == 'pending_review'): 
                $count_post =  (int) $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'posts
                                            WHERE post_type ="screening"
                                                AND post_status ="pending_review"
                                            ' );
            else:
                $count_post =  (int) $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'posts
                                            WHERE post_type ="screening"
                                                AND post_status ="new"
                                                OR post_status ="pending_review"
                                            ' );
            endif;  

            return $count_post;
}