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
/* Add a line break before the @ in email addresses if longer than n characters to help legibility and prevent widows */ | |
jQuery('.contact-information-box a.email:contains("@")').each(function() { | |
var getContent=$(this).text(); | |
if( $(this).text().length > 31) { | |
var newString=getContent.replace('@','<br />@'); | |
} | |
jQuery(this).html(newString); | |
}); |
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
<?php | |
function theme_preprocess_page(&$variables) { | |
drupal_add_js('jQuery.extend(Drupal.settings, { "pathToTheme": "' . path_to_theme() . '" });', 'inline'); | |
} | |
?> |
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
<!-- Trying to print title value of :last li.nested.one in the closest div.header --> | |
<ul> | |
<li class="parent"> | |
<div class="header"></div> | |
<ul> | |
<li class="nested one"> | |
<li class="nested one"> | |
<li class="nested one" title="first"> | |
<li class="nested two"> |
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
# Ignore configuration files that may contain sensitive information. | |
sites/*/settings*.php | |
sites/sites.php | |
# Ignore paths that contain user-generated content. | |
sites/*/files | |
sites/*/private | |
# Ignore Sublime Text 2 local project files | |
*.sublime-project |
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
<?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'; |
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
<?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'; |
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
<?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'; |
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
// Prepare a renderable array to hold items. | |
$variables['planning'] = array( | |
'#theme' => 'item_list', | |
'#items' => array(), | |
); | |
// Add the term as a new renderable item in the list. | |
foreach(($variables['field_planning'] + $variables['field_diet'] + $variables['field_healthy']) as $taxon_term_field) { | |
$term_name = $taxon_term_field['taxonomy_term']->name; | |
$variables['planning']['#items'][] = $term_name; |
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
$variables['planning'] = array( | |
'#theme' => 'item_list', | |
'#items' => array(), | |
'#attributes' => array( | |
'class' => 'icons-info unstyled floated', | |
) | |
); | |
foreach(array_merge($variables['field_bbcgf_planning'], $variables['field_bbcgf_diet'], $variables['field_bbcgf_healthy']) as $taxon_term_field) { | |
$term_name = $taxon_term_field['taxonomy_term']->name; |
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
$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']); |
OlderNewer