Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Implements hook_preprocess_HOOK().
*
*/
function MYTHEME_preprocess_html(&$vars) {
// Fixes page titles for login, register & password.
switch (current_path()) {
case 'user':
$vars['head_title_array']['title'] = t('Login');
@waako
waako / merge item_list items.php
Created November 29, 2012 18:21 — forked from rupertj/merge item_list items.php
merge two items to be rendered in item_list
$variables['planning'] = array(
'#theme' => 'item_list',
'#items' => array(),
'#attributes' => array(
'class' => 'icons-info unstyled floated',
)
);
$all_terms = array_merge($variables['field_bbcgf_planning'], $variables['field_bbcgf_diet'], $variables['field_bbcgf_healthy']);
<?php
/**
* Implements hook_form_alter().
To Replace the -Any- value in filters by it's label text
*/
function mp_form_alter(&$form, &$form_state, $form_id) {
kpr($form);
if ($form['#id'] == 'views-exposed-form-admin-people-block-1') {
// $my_label = 'label name';
<?php
/**
* Implements hook_form_alter().
To Replace the -Any- value in filters by it's label text
*/
function theme_form_alter(&$form, &$form_state, $form_id) {
kpr($form);
if ($form['#id'] == 'views-exposed-form-admin-people-block-1') {
// $my_label = 'label name';
<?php
/**
* Implements hook_form_alter().
To Replace the -Any- value in filters by it's label text
*/
function theme_form_alter(&$form, &$form_state, $form_id) {
kpr($form);
if ($form['#id'] == 'views-exposed-form-admin-people-block-1') {
// $my_label = 'label name';