Get taxonomy term ID from standard URL and then pass it to a View as a contextual filter is a simple question, I whant get the term ID (tid) from standard drupal taxonomy url taxonomy/term/167 ou 167 is my tid and use as argument on views.  

I found this code to get the tid:

$term_path=drupal_get_normal_path('position/'.arg(1));
$tid = basename($term_url);
$$here_is_my_tid = taxonomy_term_load($tid);


How to get taxonomy by URL alias? 

I try also :

$here_is_my_tid = drupal_lookup_path('source', 'taxonomy/term/'.$tid);


$here_is_my_tid = drupal_get_path_alias('taxonomy/term/' . $tid);


But I try many combination without success.

Here is my views with the tid from url I try to pass "$here_is_my_tid"

$view1 = views_embed_view('mavue','page',$here_is_my_tid);

 if(arg(0) == 'taxonomy' &amp;&amp; arg(1) == 'term') {
            $tid = (int)arg(2);
            $term = taxonomy_term_load($tid);

      }
    $view1 = views_embed_view('mavue','page',$term);


By advance thanks
You do not have to write any code to achieve that.

Just go to the views edit page, add a contextual filter named as Has taxonomy term ID and select Provide default value, see screenshot for more options



However, you can also do it pragmatically

function HOOK_views_query_alter($view, $query) {
   $term = menu_get_object('taxonomy_term', 2);
   if ($term &amp;&amp; $term-&gt;vocabulary_machine_name == 'VOCABULARY_NAME') {
     if ($view-&gt;name=='VIEWS_MACHINE_NAME') {
       $view-&gt;query-&gt;where['0']['conditions']['0']['value']= $term-&gt;tid;
     }
   }
}


I hope it helps.