You are here

function media_update_7007 in D7 Media 7

Same name and namespace in other branches
  1. 7.4 media.install \media_update_7007()
  2. 7.2 media.install \media_update_7007()
  3. 7.3 media.install \media_update_7007()

Changes the preview formatter for non-image types to the icon view.

File

./media.install, line 409
Install, update and uninstall functions for the Media module.

Code

function media_update_7007() {

  // @todo media_type_configure_formatters() is a deprecated function, so remove
  //   this code entirely?
  drupal_load('module', 'media');
  drupal_load('module', 'field');
  foreach (media_type_get_types() as $type => $info) {
    if ($type != 'image') {
      media_type_configure_formatters($type, array(
        'media_preview' => 'media_large_icon',
      ));
    }
  }
}