I have the following view being called in my code with views_get_view() and I then try to modify the filter called usershare to admin instead of the default that I have set in my view. But it doesn't seem to override my view output. What am I doing wrong here? I noticed that some examples use pre_execute() and some just use excute(). I'm not sure if that has anything to do with it.
$view2 = views_get_view('flag_lists_user_lists_public', FALSE); $view2->set_display('default'); $view2->display_handler->display->display_options['filters']['usershare']['value'] = 'admin'; $view2->pre_execute(); $output .= $view2->render();