Convert your views into a custom module
When the Bulk Export module (part of the Chaos Tools Suite module) is enabled, it exposes a page (admin/structure/bulk-export) where views can be exported.

What you need to do is selecting the views you want to export, enter the short name of the module that will contain the views, and click on the "Export" button.



The page that will appear next contains three text area fields (&lt;module name&gt; is the short name you entered in the previous page):


One is for the content to place in &lt;module name&gt;.info
The second is the content to place in &lt;module name&gt;.module
The last is the content to place in &lt;module name&gt;.views_default.inc


The differences I can see between the code the module tells me to use, and the one you are showing are:


The implementation of hook_views_api() is the following.

/**
 * Implements hook_views_api().
 */
function sitetheme_views_api($module, $api) {
  if ($module == 'views' &amp;&amp; $api == 'views_default') {
    return array('version' =&gt; 2);
  }
}

The implementation of hook_views_default_views() is the following.

/**
 * Implements hook_views_default_views().
 */
function sitetheme_views_default_views() {
  $views = array();

  $view = new view();

  // …

  return $views;
}



$views is an array of objects of the view class.