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
$('select').each(function() { | |
var $t = $(this); | |
if (!$t.parent().hasClass('custom-select')) { | |
$t.wrap('<div class="custom-select" />').before('<div class="display-copy empty"></div>'); | |
} | |
}).on('change faux_change', function() { | |
var $t = $(this); | |
$t.siblings('.displayCopy').text($t.find('option:selected').text()); | |
//toggle "empty" class | |
if ($t.prop('selectedIndex') > 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
getTempImage : function(t, blob, cropData){ | |
// get the CSRF token, or get out if we can't find it | |
var csrfToken = $("body").attr("data-csrf-token"), | |
ajaxArgs = {}; | |
// show loading indicator - wait for response to continue | |
radius.loading.show(); | |
//DO WE HAVE WHAT WE NEED? If we dont have a blob or csrf token get out | |
if (!csrfToken || typeof blob == 'undefined') return {}; |
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
#set( $currentPageURL = "http://$request.getServerName()${request.getAttribute('javax.servlet.forward.request_uri')}" )## | |
#set( $adWords = $dotcontent.pull("+structureName:AdwordsConversionCodes +AdwordsConversionCodes.targetPageUrl:${currentPageURL} +languageId:${currentLang}", 1, '') )## | |
#if( $adWords.size() < 1 )## | |
#set( $currentPageURL = $currentPageURL.replaceAll("((http)s?://)|(www\.)", '') )## | |
#set( $adWords = $dotcontent.pull("+structureName:AdwordsConversionCodes +AdwordsConversionCodes.targetPageUrl:${currentPageURL} +languageId:${currentLang}", 1, '') )## | |
#end## | |
#if( $adWords.size() > 0 )## | |
#set( $adWords = $adWords.get(0) )## | |
<input type="hidden" name="ga_ppc_conversion_id" id="ga_ppc_conversion_id" value="${adWords.conversionId}" /> | |
<input type="hidden" name="ga_ppc_conversion_label" id="ga_ppc_conversion_label" value="${adWords.conversionLabel}" /> |
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
$desiredOrder = array('post', 'cpt1', 'cpt2', 'etc'); | |
function reorder( $a, $b ) { | |
global $posts; | |
$ap = array_search( $a->post_type, $desiredOrder ); | |
$bp = array_search( $b->post_type, $desiredOrder ); | |
return ( $ap < $bp ) ? -1 : 1; | |
} | |
usort( $wp_query->posts, "reorder" ); |
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
<script> | |
jQuery(function($){ | |
$('#contactForm') | |
.off() | |
.on('honeypotBeforeSend', function(e, xhr, s){ | |
comments = $(this).find('textarea[name="comments"]'); | |
s.data = s.data.replace( /comments=(.|\s)*?&/, 'comments='+encodeURIComponent(comments.val()+' \n\n '+ window.YOUR_VAR + ' (Request from this page: http://${request.getServerName()}${VTLSERVLET_URI}) ')+'&' ); | |
}) | |
.honeypot({ |
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
//CUSTOM SELECT - prevent double wrap incase this script is include in multiple locations... | |
$('select').each(function(){ | |
var t = $(this); | |
if( !t.parent().hasClass('customSelect') ){ | |
t.wrap('<div class="customSelect" />').before('<div class="displayCopy empty"></div>'); | |
} | |
}).on('change fauxChange', function(){ | |
var t = $(this); | |
t.siblings('.displayCopy').text( t.find('option:selected').text() ); | |
//toggle "empty" class |
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
#* | |
ADD SCRIPT MACRO | |
@use #addScript( $scriptPath ) | |
*# | |
#set( $scriptArray = [] )## | |
#macro( addScript $src )## | |
## CHECK TO MAKE SURE THAT VARS HAVE BEEN SET | |
#if( $UtilMethods.isSet($src) )## | |
#set( $scriptInMap = 'false' )## |