This file contains hidden or 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 = views_get_view('opengraph'); | |
$display_id = 'default'; | |
$view->set_display($display_id); | |
//$view->set_arguments(array($element['#object']->nid)); | |
$view->execute(); | |
//print dpr($view->result); | |
print $view->result[0]->node_title; |
This file contains hidden or 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
$('img').each(function () { | |
var $this = $(this); | |
var parentH = $this.parent().height(); | |
var H = parentH - $this.height(); | |
$this.css('margin-top',H / 2); | |
}); |
This file contains hidden or 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
/* parent */ | |
.youtube-url .field-item { | |
height: 0; | |
padding-bottom: 53.25%; | |
padding-top: 25px; | |
position: relative; | |
} | |
/* video iframe */ | |
.youtube-url iframe { |
This file contains hidden or 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
// remove second password field (Confirm password) on registration page | |
function tmplt_form_user_register_form_alter(&$form, &$form_state, $form_id) { | |
$form['account']['pass']['#type'] = 'password'; | |
$form['account']['pass']['#title'] = 'Password'; | |
} |
This file contains hidden or 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
.form-control::-webkit-input-placeholder { | |
color: #000; | |
} | |
.form-control:-moz-placeholder { | |
color: #000; | |
} | |
.form-control::-moz-placeholder { | |
color: #000; | |
} | |
.form-control:-ms-input-placeholder { |
This file contains hidden or 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
.sticky-nav { | |
-webkit-transform: translateZ(0); | |
} |
This file contains hidden or 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
$formatter = new stdClass(); | |
$formatter->disabled = FALSE; /* Edit this to true to make a default formatter disabled initially */ | |
$formatter->api_version = 2; | |
$formatter->name = 'h2_from_field'; | |
$formatter->label = 'H2 from field'; | |
$formatter->description = ''; | |
$formatter->mode = 'php'; | |
$formatter->field_types = 'text, computed'; | |
$formatter->code = '$output = \'\'; | |
foreach ($variables[\'#items\'] as $item) { |
This file contains hidden or 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
// scroller for h2 titles | |
$('.f-faqs h2').each(function() { | |
$this = $(this); | |
$this.attr('id',$this.text().split(' ').join('').toLowerCase()); | |
}); | |
var curUrl = window.location.pathname; | |
$('a.mm-scroll').each(function() { |
This file contains hidden or 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
$(document).on( 'shown.bs.tab', 'a[data-toggle="tab"]', function (e) { | |
//do.stuff | |
document.getElementById('yt-vid-1').stopVideo(); | |
}); |