Skip to content

Instantly share code, notes, and snippets.

@dasginganinja
dasginganinja / sh_drupal_language.php
Last active May 10, 2016 11:30
Drupal Bulk Language Changer (Uses Views Bulk Options)
$view = new view();
$view->name = 'sh_drupal_languages';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'sh_drupal_languages';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@phile
phile / content
Created November 15, 2012 21:23
Drupal 7: How to remove a HTML class from a form item using hook form_alter
// remove html class from form item
function theme_name_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
case 'form_id':
$classes = &$form['actions']['item_name']['#attributes']['class'];
$classes = array_filter($classes , function($e){
return $e != 'class_to_remove';
});
break;
}