Created
May 3, 2013 19:47
-
-
Save ezra-g/5513346 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_form_alter(). | |
*/ | |
function commons_soundcloud_audio_form_alter(&$form, &$form_state, $form_id) { | |
if ($form_id == 'soundcloud_audio_node_form') { | |
dpm($form, 'form'); | |
} | |
} | |
function commons_soundcloud_audio_element_info_alter(&$type) { | |
dpm("altering"); | |
// Decrease the default size of textfields. | |
if (is_array($type['media']['#process'])) { | |
dpm($type['media'], 'ima let you finish but this is an array'); | |
$type['media']['#process'][] = 'commons_soundcloud_media_element_process'; | |
} | |
else { | |
dpm("whoa, we have else"); | |
$type['media']['#process'] = array($type['media']['#process'], 'commons_soundcloud_media_element_process'); | |
} | |
} | |
function commons_soundcloud_media_element_process(&$element, &$form_state, $form) { | |
dpm("eh eh eh?"); | |
$a = func_get_args(); | |
dpm($a, 'args'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment