How to alter an existing Views display? I know in order to create views displays you simply declare it as:

  $view = views_get_view('AN_EXISING_VIEW', TRUE);


  $handler = $view-&gt;new_display('page', 'YOUR_DISPLAY_NAME', 'YOUR_DISPLAY_MACHINE_NAME');
  $handler-&gt;display-&gt;display_options['title'] = 'TITLE';
  ...
  views_save_view($view);


You can do this in hook_enable in your install file or using hook_views_default_views

All I need is however to programatically alter an existing view display of a Workbench Moderation module (workbench_moderation): 'YOUR_DISPLAY_NAME' and 'DEFAULT' in order add other fields and permissions on those fields.

My questions are:


How do I effectivelly get the specific display: e.g. $views-&gt;get_display?
How do I save it so that will not mess the views caches?
Views provided by a module are defined using hook_views_default_views - and as almost anything, they can be modified using &quot;alter&quot; version of this hook, namely hook_views_default_views_alter:
Alter default views defined by other modules.

This hook is called right before all default views are cached to the database. It takes a keyed array of views by reference.
Example usage to add a field to a view:

$handler =&amp; $view-&gt;display['DISPLAY_ID']-&gt;handler;
// Add the user name field to the view.
$handler-&gt;display-&gt;display_options['fields']['name']['id'] = 'name';
$handler-&gt;display-&gt;display_options['fields']['name']['table'] = 'users';
$handler-&gt;display-&gt;display_options['fields']['name']['field'] = 'name';
$handler-&gt;display-&gt;display_options['fields']['name']['label'] = 'Author';
$handler-&gt;display-&gt;display_options['fields']['name']['link_to_user'] = 1;

Source code from API help page linked above.