This file contains 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 | |
$allevents = wp_get_recent_posts(array( | |
'showposts' => '-1', | |
'post_type' => 'events' | |
)); | |
$start = strtotime("10 October 2018"); | |
//End point of our date range. | |
$end = strtotime("22 November 2020"); |
This file contains 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
/** | |
* A collection of helper prototype for everyday DOM traversal, manipulation, | |
* and event binding. Sort of a minimalist jQuery, mainly for demonstration | |
* purposes. MIT @ m3g4p0p | |
*/ | |
window.$ = (function (undefined) { | |
/** | |
* Duration constants | |
* @type {Object} |
This file contains 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 | |
function ex_project_archive_options($cptmenu) { | |
$cptmenu['page_title'] = 'Projects Archive'; | |
$cptmenu['menu_title'] = 'Projects Archive'; | |
$cptmenu['slug'] = 'my-projects-archive'; | |
return $cptmenu; | |
} | |
add_filter('cpt_project_acf_page_args', 'ex_project_archive_options'); | |
/* |
This file contains 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
.is-current-cat { | |
color: red !important | |
} | |
.cat-parent > li > ul { | |
padding-left: 20px; | |
display: none | |
} | |
.cat-parent > li > .is-current-cat + ul { | |
display: block | |
} |
This file contains 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 $gallery_instance = 1; | |
if($tpl === 'horizontal_gallery' && $flex['gallery']) { $g = 1; ?> | |
<div class="horizontal-gallery row"> | |
<div class="swiper-container"> | |
<div class="swiper-wrapper"> | |
<?php foreach ($flex['gallery'] as $img) { ?> | |
<div class="swiper-slide <?php echo ($g % 3) == 0?'swiper-slide-fh':''; ?>"> | |
<a class="cover" href="<?php echo $img['url']; ?>" data-fancybox="gallery-<?php echo $gallery_instance++; ?>" style="<?php echo image_src($img['ID'], 'large', true); ?>"></a> | |
<div class="e-space"></div> | |
<?php echo ($g % 3) == 0?'</div><div class="swiper-slide swiper-slide-empty">':''; ?> |
This file contains 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).ajaxComplete(function(){ | |
$('.selectric-wrapper').each(function () { | |
var t = $(this), | |
s = $('select', t), | |
Selectric = s.data('selectric'); | |
if($('input.input-text', t).length > 0) { | |
$('input.input-text', t).clone().appendTo('#billing_state_field'); | |
t.remove(); | |
} | |
if(typeof Selectric !== 'undefined') { |
This file contains 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 threshold = 3; | |
function distancer(s1, s2) { | |
// sift3: http://siderite.blogspot.com/2007/04/super-fast-and-accurate-string-distance.html | |
if (s1 == null || s1.length === 0) { | |
if (s2 == null || s2.length === 0) { | |
return 0; | |
} else { | |
return s2.length; | |
} |
This file contains 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
$('.mod-fmslider').each(function(i){ | |
var t = this; | |
setTimeout(function(){ | |
window.FMSlider[i] = new Swiper( t, { | |
navigation: { | |
nextEl : $('.swiper-btn-prev', t)[0], | |
prevEl : $('.swiper-btn-next', t)[0] | |
}, | |
slidesPerView : 'auto', | |
freeModeSticky : true, |
This file contains 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 | |
$file = file_get_contents('/wp-content/themes/themename/analyzers.csv'); | |
$lines = explode(PHP_EOL, $file); | |
$array = array(); | |
foreach ($lines as $line) { | |
$l = str_getcsv($line); | |
$array[] = array( | |
'brand' => $l[1], | |
'model' => $l[0], | |
); |
This file contains 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
//JS | |
var ajaxcontent = $('.products'); | |
$.ajax({ | |
type: 'POST', | |
url: window.wp_data.ajax_url, | |
data: { | |
action: "loadPosts", | |
}, | |
success: function (html) { |