You are here

function media_browser_plus_enable in Media Browser Plus 7.2

Same name and namespace in other branches
  1. 7.3 media_browser_plus.install \media_browser_plus_enable()
  2. 7 media_browser_plus.install \media_browser_plus_enable()

Implements hook_enable().

File

./media_browser_plus.install, line 162
Install file for media_browser_plus.

Code

function media_browser_plus_enable() {

  // Save default settings.
  variable_set('media_media_per_page', 30);
  variable_set('media_grid_window_height', 400);
  variable_set('media_page_items_per_page', 10);
  variable_set('media_browser_plus_thumbnails_as_default_browser', TRUE);

  // Create the media folder.
  media_browser_plus_get_media_root_folder(TRUE);
  $dir = variable_get('file_default_scheme', 'public') . '://' . variable_get('media_root_folder') . '/';
  file_prepare_directory($dir, FILE_CREATE_DIRECTORY);
}