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_FORM_ID_alter() for premium_plus_order_entityform_edit_form(). | |
* | |
* Replace the options with images from the taxonomy term | |
*/ | |
function sh_member_signup_form_premium_plus_order_entityform_edit_form_alter(&$form, &$form_state, $form_id) { | |
foreach ($form as $formitem_name => $formitem) { | |
if (isset($formitem['#attributes']['class']) && in_array('field-type-taxonomy-term-reference', $formitem['#attributes']['class'])) { | |
foreach ($formitem['und']['#options'] as $tid => $option) { | |
$term = taxonomy_term_load($tid); |
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
##Vagrant Front-end Stack Setup | |
1. Install Curl | |
1. sudo apt-get install curl | |
2. Install RVM | |
1. \curl -sSL https://get.rvm.io | bash -s stable --ruby | |
2. source /home/vagrant/.rvm/scripts/rvm | |
4. rvm requirements |
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
{ | |
"installed_packages": | |
[ | |
"AdvancedNewFile", | |
"Auto Semi-Colon", | |
"BracketHighlighter", | |
"ColorPick", | |
"Compass", | |
"DocBlockr", | |
"Drupal Snippets", |
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
name = Kickstart Custom | |
description = "This module contains some cool examples of the Drupal API" | |
package = Drupal Kickstart | |
core = 7.x |
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
@mixin respond-to($breakpoint) { | |
@media only screen and (min-width: $breakpoint) { @content; } | |
} |
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
<article id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>> | |
<?php print render($title_prefix); ?> | |
<?php if (!$page): ?> | |
<?php if (!$page): ?> | |
<h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php print render($title_suffix); ?> | |
<?php if ($display_submitted): ?> |
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
$view = new view(); | |
$view->name = 'schedule'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'node'; | |
$view->human_name = 'Schedule'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
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
/** | |
* An interface for pluggable mail back-ends. | |
*/ | |
class MaillogMailSystem implements MailSystemInterface { | |
/** | |
* Format a message composed by drupal_mail() prior sending. | |
* | |
* @param $message | |
* A message array, as described in hook_mail_alter(). | |
* |
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
$array = array(0 => 'one', 1 => 'two', 2 => 'three'); | |
$values = array_values($array); | |
$first_value = array_shift($values); | |
print $first_value; | |
// prints 'one' |
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
#!/bin/bash | |
read -p "Pulling Current Prod down to IT News Local. Are you sure? " -n 1 -r | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo "Current Prod down to IT News Local" | |
drush @itnews.local sql-drop -y | |
drush sql-sync @current.prod @itnews.local -y | |
drush @itnews.local vset --yes file_temporary_path "sites/default/files/tmp" | |
drush @itnews.local dis securepages -y |