How to build the WP_Query using the code?

$continent_query =  array(
   'taxonomy' => 'continent',
   'field' => 'term_id',
   'terms' => 0 != $continent ? $continent : get_terms('continent', array('fields'=>'ids'))
);