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 EML 2.7.2 WP 5.3 Compatibility Fix Download Info.md
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 = {};
@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 jobs-customize.php
$shortcode = '[jobs ';
if(isset($_GET['job_listing_category']) && $_GET['job_listing_category'] != ''){
echo '<p><a href="'. get_permalink(get_option('job_manager_jobs_page_id')).'" class="button btn">&larr; Back to All Job Listings</a></p>';
echo '<h3>'.ucwords(str_replace('-',' ',sanitize_text_field($_GET['job_listing_category']))).'</h3>';
$shortcode.= 'categories="'.sanitize_text_field($_GET['job_listing_category']).'" ';
}
$shortcode.= ']';
echo do_shortcode($shortcode);
echo "
<script>
View job-aggregate-category-list.php
ob_start();
?>
<div class="job-browse-block">
<?php
$count_posts = wp_count_posts( 'job_listing' )->publish;
$today = getdate();
//$query = new WP_Query( 'year=' . $today['year'] . '&monthnum=' . $today['mon'] . '&day=' . $today['mday'] );
$args = array(
'post_type' => 'job_listing',
'date_query' => array(
You can’t perform that action at this time.