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
git add -A | |
git commit -a -m "My commit message" |
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
$person = get_field('persona'); | |
$thumb = get_field('photo', $person->ID)['id']; | |
$thumb = wp_get_attachment_image_src($thumb, 'small', true)[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
<?php | |
$post_objects = get_field('post_objects'); | |
if( $post_objects ): ?> | |
<ul> | |
<?php foreach( $post_objects as $post_object): ?> | |
<li> | |
<a href="<?php echo get_permalink($post_object->ID); ?>"><?php echo get_the_title($post_object->ID); ?></a> | |
<span>Post Object Custom Field: <?php the_field('field_name', $post_object->ID); ?></span> |
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 :input").each(function(index, elem) { | |
var eId = $(elem).attr("id"); | |
var label = null; | |
if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) { | |
$(elem).attr("placeholder", $(label).html()); | |
$(label).remove(); | |
} | |
}); |
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
zip -r drupal.zip * |
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
function selectClass(){ | |
$('.f-formstack select, .webform-client-form select').each(function(){ | |
var t = $(this).parent(); | |
if (!t.hasClass('has-select')){ | |
t.addClass('has-select'); | |
} else{ | |
clearTimeout(startClass); | |
} | |
}); | |
} |
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
$('.f-video .field-item').addClass('embed-responsive embed-responsive-16by9').find('iframe').addClass('embed-responsive-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
$('.block').on({ | |
mouseenter: function () { | |
var t = $(this); | |
$('.block:visible').not(t).addClass('hover'); | |
}, | |
mouseleave: function () { | |
var t = $(this); | |
$('.block:visible').not(t).removeClass('hover'); | |
} | |
}); |