Skip to content

Instantly share code, notes, and snippets.

@Taiger
Taiger / gist:234e69275f3104915e4b
Created May 19, 2014 16:38
Print or render Drupal user account profile form anywhere
$account = user_load(UID);
module_load_include('inc', 'user', 'user.pages');
$form_state = array();
$form_state['build_info']['args'] = array($account);
form_load_include($form_state, 'inc', 'user', 'user.pages');
print render(drupal_build_form('user_profile_form', $form_state));
@Taiger
Taiger / gist:7148066
Created October 25, 2013 01:24
Conditional Compilation is the fix for Conditional Comments being disabled in IE10 and up. Lets face it, IE still sucks!! (ie10 and ie11 is still horrid!)
/* ie10 and up classes */
/*@cc_on
(function(){
console.log('Conditonals Rock!');
});
document.documentElement.classList += ' ie' + document.documentMode});
@*/