Insert a view with a context using php? I know I can insert a view using the following code:   

 &lt;?php
    $view = views_get_view('VIEWNAME');
    print $view-&gt;preview('default');
 ?&gt;


In my view I have a contextual filter of user: name 

When I insert this view using the Display Suite module I have this option from Display Suite:



I was wondering if there is a way to pass this context to the view, like Display Suite does, using php code only.
You can set the default value for the contextual filter through URL and then in your code use $view-&gt;set_arguments() to pass the argument.