Skip to content

Instantly share code, notes, and snippets.

Kurt Zenisek KZeni

Block or report user

Report or block KZeni

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View html-audio-gtm-tracking-script.html
<script>
// This listener is based on David Vallejo's HTML5 video listener, thyngster.com/tracking-html5-videos-gtm/
// Edited by Julius Fedorovicius, analyticsmania.com
// Let's wrap everything inside a function so variables are not defined as globals
(function() {
// This is gonna our percent buckets ( 10%-90% )
var divisor = 10;
// We're going to save our players status on this object.
var audios_status = {};
View EML 2.7.2 WP 5.3 Compatibility Fix Download Info.md
@KZeni
KZeni / modernizr.3.8.0.touchevents.js
Last active Dec 21, 2019
Extracted from Modernizr 3.8.0's touch events / touchevents support detection code.
View modernizr.3.8.0.touchevents.js
var supportsTouch;
if (('ontouchstart' in window) || window.TouchEvent || window.DocumentTouch && document instanceof DocumentTouch) {
supportsTouch = true;
}
View pages-widget.php
<?php
/* Pages Widget */
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action( 'widgets_init', 'pagesinwidgets_pages' );
function pagesinwidgets_pages() {
register_widget( 'pagesinwidgets_page_section' );
}
View eml-media-views.js
window.wp = window.wp || {};
window.eml = window.eml || { l10n: {} };
( function( $, _ ) {
var media = wp.media,
l10n = media.view.l10n,
l10n_defaults = { media_orderby: 'date', media_order: 'DESC' },
mediaTrash = media.view.settings.mediaTrash,
View wp-google-maps-marker-event-addlistener-behavior.js
// Customize the map's marker behavior on the homepage
function customizeHomepageMapMarkerBehavior(){
if($('body.home').length > 0 && typeof WPGMZA !== 'undefined'){
$(WPGMZA.maps).each(function(){
$(this.markers).each(function(){
// Clear out previous googleMarker listener events
google.maps.event.clearListeners(this.googleMarker, 'mouseover');
google.maps.event.clearListeners(this.googleMarker, 'click');
// Create our own marker event listeners (note: `this.googleMarker` is for the Google Maps Marker itself while `this` is the WPGM marker [includes title & other info])
google.maps.event.addListener(this.googleMarker, 'mouseover', function(event) {
View SASS, JS, and other precompiling + preprocessing + minification tools.md

Tools to choose from

The official SASS site has a list of possible options here: https://sass-lang.com/install

There are paid options, free options, and even open source options. These are then available on Windows, Mac, and/or Linux. They’re also inter-operable so it’s not a requirement that we use the same tool (though some consistency might be nice when it comes to sharing settings, discussing things, etc.)

I’ve personally used https://codekitapp.com (paid & Mac only; my current app of choice), and http://livereload.com (has paid options for helping further development & support, but it is provided 100% free per it being fully open source [Windows option is fully free even from the main download option]).

There’s then also http://koala-app.com (free & open source), https://prepros.io (paid), https://scout-app.io (free & open source), and others.

What’s nice is that you can really use the tool of your choice and it should play nice (I know Kaitlyn uses a different tool from me) since it’s still just

View WPGM-polygon-line-interaction-styling-workaround.js
function disableWPGMPolygonLineOpacityOnInteraction(){
if(window.location.href.indexOf("communities") > -1 || window.location.href.indexOf("community") > -1){
$(WPGM_Path_Polygon).each(function(i){
if(this !== window){
google.maps.event.addListener(WPGM_Path_Polygon[i], "mouseover", function(event) {
this.setOptions({strokeOpacity: 0});
});
google.maps.event.addListener(WPGM_Path_Polygon[i], "click", function(event) {
this.setOptions({strokeOpacity: 0});
});
View fancybox-trigger.js
// Fancybox Lightbox
$('a[href*="youtu"]').each(function(){
if($(this).attr('href').indexOf('somna') !== -1 || $(this).attr('href').indexOf('band') !== -1 || $(this).attr('href').indexOf('/channel/') !== -1 || $(this).attr('href').indexOf('/user/') !== -1){
// Don't affect links to channel/user pages
}else{
$(this).attr('data-fancybox','video-gallery');
}
});
$('a[href*="vimeo"]').each(function(){
if($(this).attr('href').indexOf('somna') !== -1 || $(this).attr('href').indexOf('band') !== -1 || $(this).attr('href').indexOf('/channel/') !== -1 || $(this).attr('href').indexOf('/user/') !== -1){
View zillow-widget.php
if(isset($_GET['location']) && $_GET['location'] != ''){
$location = sanitize_text_field($_GET['location']);
}else{
$location = 'Wausau';
}
$output = '
<div id="zillow-large-search-box-widget-container" style="width:432px;overflow:hidden;background-color:#e7f1fd;color:#555; font: normal normal normal 13px verdana,arial,sans-serif;line-height:13px;margin:0 auto;padding:0;text-align:center;border:1px solid #adcfff;letter-spacing:0;text-transform:none;">
<h2 style="color:#d61;text-align:left;font-size:20px;line-height:20px;font-weight:normal;float:left;width:200px;margin-left:10px;margin-top:5px;letter-spacing:0;text-transform:none;">Find Homes</h2>
<div style="float:right;">
<a href="https://www.zillow.com/" target="_blank" rel="nofollow"><img alt="Zillow Real Estate Information" style="border:0;" src="https://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif"></img>
You can’t perform that action at this time.