Skip to content

Instantly share code, notes, and snippets.

View webaware's full-sized avatar

Ross McKay webaware

View GitHub Profile
@webaware
webaware / autoprefix-browsers.js
Created May 19, 2016 22:12
Example of limiting Autoprefixer scope with exceptions for specific platforms
// @link https://github.com/ai/browserslist#queries
browsers: [
"last 3 versions",
"ie 11",
"ios >= 7",
"android >= 4"
]
@webaware
webaware / flxmap-traffic-layer.php
Created May 18, 2016 23:40
Add a traffic layer to maps in Flexible Map; specify an ID so that the code can match the map requiring traffic layer. e.g. `[flexiblemap address="Wickham train station, Wickham NSW Australia" width="100%" region="au" id="with_traffic"]`
<?php
/*
Plugin Name: Flxmap Traffic Layer example
Plugin URI: https://gist.github.com/webaware/3393b3ec78af8b302135bfb1d4956dd8
Description: add a traffic layer to map that has id="with_traffic"
Version: 1
Author: WebAware
Author URI: http://webaware.com.au/
*/
@webaware
webaware / woocommerce-notices-shortcode.php
Last active March 17, 2022 17:45
display WooCommerce notices in any page by shortcode [woocommerce_notices]
<?php
/*
Plugin Name: WooCommerce Notices Shortcode
Plugin URI: https://gist.github.com/webaware/c6a6286026eb6a89e5a3
Description: display WooCommerce notices in any page by shortcode [woocommerce_notices]
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
if (!defined('ABSPATH')) {
@webaware
webaware / ofw-referer-hash.php
Created January 4, 2016 23:15
Modify the wp_http_referer to include the hash for an accordian tab for a set of Order Form for WooCommerce forms.
<?php
/**
* append hash to referrer URI
* @param array $attrs
*/
add_action('orderform_woocommerce_form_before', function($attrs) {
// remove any existing hash
$_SERVER['REQUEST_URI'] = preg_replace('/#.*$/', '', $_SERVER['REQUEST_URI']);
@webaware
webaware / gf-aussie-address.php
Last active January 4, 2016 05:47 — forked from thewebprincess/gravity-au.php
Australian address fields in Gravity Forms
<?php
/*
Plugin Name: Gravity Forms Aussie Addresses
Plugin URI: https://gist.github.com/webaware/f445808d0475ea0e02f2
Description: Australian address fields in Gravity Forms
Author: thewebprincess
Author URI: https://thewebprincess.com/
Version: 0.0.1
@link https://gist.github.com/thewebprincess/7855509
@webaware
webaware / wp-migrate-db-exclude-sessions.php
Last active June 29, 2018 19:19
Exclude WooCommerce sessions from WP Migrate DB Pro migration
<?php
/*
Plugin Name: WP Migrate DB Exclude Woo Sessions
Plugin URI: https://gist.github.com/webaware/17be2cb59f2cfe1313d6
Description: Exclude WooCommerce sessions from migration
Version: 0.0.1
Author: WebAware
Author URI: http://webaware.com.au/
*/
@webaware
webaware / gallery-download-all.php
Last active August 30, 2015 07:31
Strip away the thumbnails and just have a Download All button. [NextGEN Download Gallery](https://wordpress.org/plugins/nextgen-download-gallery/)
<?php
/*
Plugin Name: Flxmap Events Manager
Plugin URI: https://gist.github.com/webaware/a030ffad554d536a907b
Description: Events Manager locations map with directions
Version: 2
Author: WebAware
Author URI: http://snippets.webaware.com.au/snippets/events-manager-locations-map-with-directions/
*/
@webaware
webaware / flxmap-ignore-bad-address.php
Last active August 29, 2015 14:26
ignore maps with invalid addresses in Flexible Map plugin -- http://flexible-map.webaware.net.au/
<?php
/*
Plugin Name: Flxmap Igore Bad Address
Plugin URI: https://gist.github.com/webaware/3ffe9c2bb9aeb0517714
Description: ignore maps with invalid addresses
Version: 1
Author: WebAware
Author URI: http://webaware.com.au/
*/
@webaware
webaware / orderform-woo-extend-form.php
Last active September 27, 2015 19:59
Extend an Order Form for WooCommerce form with WordPress hooks, instead of hacking templates. Requires version 1.4.0 or higher. Save this file as a simple plugin in the WordPress plugins folder. http://orderform-woo.webaware.net.au/
<?php
/*
Plugin Name: Order Form for WooCommerce extend form
Plugin URI: https://gist.github.com/webaware/1fe598e60f9ad9a912ee
Description: example form extras using hooks
Author: WebAware
Author URI: http://webaware.com.au/
*/