Skip to content

Instantly share code, notes, and snippets.

View mattie02's full-sized avatar

Matthew Hansen mattie02

View GitHub Profile
@mattie02
mattie02 / getWorkingDays.php
Last active August 29, 2015 14:27 — forked from quawn/getWorkingDays.php
PHP: GetWorkingDays excluding weekend and holidays
<?php
function getWorkingDays($startDate,$endDate,$holidays) {
// do strtotime calculations just once
$endDate = strtotime($endDate);
$startDate = strtotime($startDate);
//The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24
//We add one to inlude both dates in the interval.
$days = ($endDate - $startDate) / 86400 + 1;
@mattie02
mattie02 / child.js
Last active August 29, 2015 14:15 — forked from anonymous/child.js
.maps iframe{
pointer-events: none;
}
jQuery( document ).ready(function($) {
$('.maps').click(function () {
$('.maps iframe').css("pointer-events", "auto");
});
});
@mattie02
mattie02 / main.css
Last active August 29, 2015 14:11 — forked from anonymous/main.css
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
<?php
/* Add Image Upload to Series Taxonomy */
// Add Upload fields to "Add New Taxonomy" form
function add_series_image_field() {
// this will add the custom meta field to the add new term page
?>
<div class="form-field">
<label for="series_image"><?php _e( 'Series Image:', 'journey' ); ?></label>
@mattie02
mattie02 / woocommerce-remove-virtual-billing-fields.php
Last active January 2, 2016 03:49 — forked from BFTrick/woocommerce-remove-virtual-billing-fields.php
For items that are downloadable and have a cost of zero only collects name / email / company
<?php
/**
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products
* Plugin URI: https://gist.github.com/BFTrick/7873168
* Description: Remove the billing address fields for free virtual orders
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify