Skip to content

Instantly share code, notes, and snippets.

@mglaman
Created June 27, 2014 20:00
Show Gist options
  • Save mglaman/fb1b2646f6f075c8e7c8 to your computer and use it in GitHub Desktop.
Save mglaman/fb1b2646f6f075c8e7c8 to your computer and use it in GitHub Desktop.
Customizes the media edit modal.
<?php
/**
* Implements hook_element_info_alter().
*/
function mymodule_element_info_alter(&$type) {
if ($type['media']) {
$type['media']['#attached']['js'][] = array(
'data' => array(
'media-file-edit' => array(
'modalSize' => array(
'width' => 0.7,
'height' => 0.7,
),
'modalOptions' => array(
'background-color' => '#000',
'opacity' => .55,
),
),
),
'type' => 'setting',
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment