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 | |
add_action( 'wp_ajax_send_email', 'callback_send_email' ); | |
add_action( 'wp_ajax_nopriv_send_email', 'callback_send_email' ); | |
function callback_send_email() { | |
$forms = '[email protected]'; | |
$name = $_REQUEST['name']; | |
$email_add = $_REQUEST['email_add']; | |
$business = $_REQUEST['business']; | |
$business_address = $_REQUEST['business_address']; |
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
# Goes in your .git/config file | |
[alias] | |
# Temporarily stop tracking a file in git. | |
# usage: git unwatch path/to/file | |
unwatch = update-index --assume-unchanged | |
# Resume tracking a file in git. | |
# usage: git watch path/to/file | |
watch = update-index --no-assume-unchanged | |
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
# Goes in your .git/config file | |
[alias] | |
# Temporarily stop tracking a file in git. | |
# usage: git unwatch path/to/file | |
unwatch = update-index --assume-unchanged | |
# Resume tracking a file in git. | |
# usage: git watch path/to/file | |
watch = update-index --no-assume-unchanged | |
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 | |
$code = get_field('ng_gallery_code'); | |
if ($code): | |
?> | |
<?php | |
global $nggdb; | |
$gallery = $nggdb->get_gallery($code, 'sortorder', 'ASC', true, 0, 0); | |
if ($gallery): | |
?> | |
<div class="trip-gallery"> |
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 | |
$thumbnail_id = get_post_thumbnail_id($post->ID); | |
$alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); | |
echo $post->ID; | |
echo $alt; | |
?> |
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).ready(function(){ | |
// Add smooth scrolling to all links | |
$("a").on('click', function(event) { | |
// Make sure this.hash has a value before overriding default behavior | |
if (this.hash !== "") { | |
// Prevent default anchor click behavior | |
event.preventDefault(); | |
// Store hash |
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
$.fn.inView = function () { | |
if (!this.length) return false; | |
var rect = this.get(0).getBoundingClientRect(); | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && | |
rect.right <= (window.innerWidth || document.documentElement.clientWidth) | |
); |
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
var lastScrollTop = 0; | |
$(window).scroll(function (event) { | |
var st = $(this).scrollTop(); | |
if (st > lastScrollTop) { | |
// downscroll code | |
} else { | |
// upscroll code | |
NewerOlder