Skip to content

Instantly share code, notes, and snippets.

View wbobeirne's full-sized avatar

Will O'Beirne wbobeirne

View GitHub Profile
a,
a:link,
a:visited {
color: #4c7bd9;
text-decoration: none;
}
a:hover,
a:active {
color: #9dbaf2;
}
.wrapper-main {
max-width: 660px;
width: 100%;
margin: auto;
}
.container {
width: 100%;
/* You have to remove width: 40em; */
}
# Provides functions that help with scrolling
# -----------------------------------------------------------------------------
Ok.ScrollHelpers = {
# Check if an element has a scrollbar.
checkScroll: (element, dir) ->
if dir == 'horizontal'
# Half pixels on innerWidth get rounded down. Better way to handle this?
return element.prop('scrollWidth') > (element.innerWidth() + 1)
else
return element.prop('scrollHeight') > element.innerHeight()
<?php
/**
* Copy the data from one field to another, and delete the old field.
*/
function merge_fields($old_field, $new_field, $entity_type = '', $bundle = '') {
$prefixes = array(
'field_data_',
'field_revision_',
);