View david-walsh-debounce.js
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
// https://davidwalsh.name/javascript-debounce-function | |
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
function debounce(n,t,u){var e;return function(){var i=this,o=arguments,a=function(){e=null,u||n.apply(i,o)},c=u&&!e;clearTimeout(e),e=setTimeout(a,t),c&&n.apply(i,o)}} |
View cloudSettings
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
{"lastUpload":"2020-09-03T03:26:35.403Z","extensionVersion":"v3.4.3"} |
View instagram-feeds.php
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
<!-- Helper Funcion --> | |
function get_instagram_feed( $max_images = 10 ) { // max 33 allowed https://rudrastyh.com/instagram/more-than-33.html | |
//Variables cannot be empty. Replace with app details | |
$user_id = '2796811886'; | |
$access_token = '2796811886.1677ed0.f30b6326b0474fd79447aac899d2a167'; | |
$max_images = $max_images; //image count | |
$instaResult = get_transient( 'instagram_feed_trans' ); | |
if ( false === $instaResult || $instaResult == "") { |
View list-grid-view-posts.js
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 listPosts = $('.list-post-cards'); | |
$('.filters__item--view button').click(function(e) { | |
e.preventDefault(); | |
$('.filters__item--view button').removeClass('js-active'); | |
$(this).addClass('js-active'); | |
var selectedView = $(this).data('view'); | |
if ( $(listPosts).hasClass('list-view') && selectedView == 'list-view' ) { | |
return; | |
} else if ( $(listPosts).hasClass('grid-view') && selectedView == 'grid-view' ) { | |
return; |
View slick-carousel.js
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
function capabilitiesCarousel() { | |
$( '.capabilities-carousel' ).each( function() { | |
$( this ).slick( { | |
mobileFirst: true, | |
touchThreshold: 30, | |
speed: 500, | |
centerMode: true, | |
slidesToShow: 3, | |
arrows: false, | |
} ); |
View single-slide-progress-bar.js
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
function cswvnSlider() { | |
$( '.cswvn-slider' ).each( function() { | |
var $cswvnSliderInstance = $( this ).slick({ | |
mobileFirst: true, | |
autoplay: true, | |
autoplaySpeed: 5000, | |
touchThreshold: 30, | |
infinite: false, | |
speed: 500, | |
arrows: false, |
View slick-custom.js
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
$( '.list-map-clients' ).slick( { | |
mobileFirst: true, | |
centerMode: true, | |
centerPadding: '0px', | |
touchThreshold: 20, | |
speed: 500, | |
slidesToShow: 1, | |
arrows: true, | |
responsive: [ | |
{ |
View slick-custom.js
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
$slick_slider = $('.slider'); | |
settings = { | |
// some settings | |
} | |
$slick_slider.slick(settings); | |
// reslick only if it's not slick() | |
$(window).on('resize', function() { | |
if ($(window).width() < 768) { | |
if ($slick_slider.hasClass('slick-initialized')) { |
View any.php
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 | |
/*============================================================================= | |
= WPML Get posts from each terms in accordion style for = | |
=============================================================================*/ | |
$args = array( | |
'taxonomy' => 'TAXONOMY', // defaults to 'category' | |
'parent' => 0, // top level only | |
); | |
$terms = get_terms( $args ); | |
?> |
View functions.php
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 | |
/*========================================================= | |
= WPML language switcher only flags = | |
=========================================================*/ | |
function language_selector_flags() { | |
$languages = icl_get_languages( 'skip_missing=0&orderby=code' ); | |
if ( ! empty($languages) ) { | |
foreach ( $languages as $l ) { | |
if ( ! $l['active'] ) echo '<a href="'.$l['url'].'">'; | |
echo '<img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" />'; |
NewerOlder