Skip to content

Instantly share code, notes, and snippets.

Ross McKay webaware

Block or report user

Report or block webaware

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
@webaware
webaware / Gruntfile.js
Created Jul 5, 2019
Our favicon / site tile cheat sheet for WordPress themes
View Gruntfile.js
// add task to Gruntfile.js
shell: {
// @link https://github.com/sindresorhus/grunt-shell
favicon: {
options: {
execOptions: {
cwd: "./images/favicons"
}
},
command: [
@webaware
webaware / edd-additional-api-info.php
Last active Dec 31, 2018
Supply some additional info in the EDD Software Licensing API update info packet, specifically: Requires WordPress Version, Compatible up to, Requires PHP Version
View edd-additional-api-info.php
<?php
/*
Plugin Name: EDD Additional API Info
Plugin URI: https://gist.github.com/webaware/ccc2a77a8375da9ff02404b1fc033d05
Description: supply additional info in the EDD Software Licensing API update info packet
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / code-excerpt.php
Created Dec 31, 2018
code excerpt for restoring the FAQ section to responses in EDD Software Licensing API calls
View code-excerpt.php
<?php
//...
add_filter('edd_sl_license_readme_response', array($this, 'eddMaybeRestoreFAQ'), 10, 3);
/**
* maybe restore the FAQ section to the update info package
* @param array $response
@webaware
webaware / em-extra-fee.php
Created Jul 12, 2018
Add an extra fee for eWAY transactions in Events Manager
View em-extra-fee.php
<?php
/*
Plugin Name: Events Manager eWAY Extra Fee
Plugin URI: https://gist.github.com/webaware/ea1261d9aae60f86bb7d8b7ea7fea589
Description: Add a fee to booking for eWAY transactions
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / gf-paypal-billing-page.php
Last active Mar 23, 2018
Get Gravity Forms to select a better landing page with PayPal Standard, and make your credit card customers happier. https://snippets.webaware.com.au/snippets/select-paypal-landing-page-for-easy-digital-downloads/
View gf-paypal-billing-page.php
<?php
/*
Plugin Name: GF PayPal Standard billing Page
Plugin URI: https://gist.github.com/webaware/a3172f7f81ff56cd844d7adca92726a6
Description: Get Gravity Forms to select a better landing page with PayPal Standard, and make your credit card customers happier.
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / edd-paypal-billing-page.php
Last active Feb 19, 2018
Get Easy Digital Downloads to select a better landing page with PayPal Standard, and make your credit card customers happier. https://snippets.webaware.com.au/snippets/select-paypal-landing-page-for-easy-digital-downloads/
View edd-paypal-billing-page.php
<?php
/*
Plugin Name: EDD PayPal Standard billing page
Plugin URI: https://gist.github.com/webaware/8751f3e4923ef5e24b322c89e04d385a
Description: Get Easy Digital Downloads to select a better landing page with PayPal Standard, and make your credit card customers happier.
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / plugin-template-functions.php
Created Feb 17, 2018
I have these functions in the plugin class that accesses templates, or break them out into simple functions if I'm using a namespace
View plugin-template-functions.php
<?php
/**
* load template from theme or plugin
* @param string $template name of template to load
* @param array $templateData data to make available to templates
*/
public function loadTemplate($template, $templateData = []) {
extract($templateData);
@webaware
webaware / lurking-minicart-conditional.php
Last active Nov 27, 2017
Only show the Lurking Minicart when required. This code tests for WooCommerce shop, product, and product taxonomy pages (categories/tags/etc.) but you can also test for individual pages with `is_page()`
View lurking-minicart-conditional.php
<?php
/*
Plugin Name: Lurking Minicart Conditional Display
Plugin URI: https://gist.github.com/webaware/2210f8a70fc4ee3bfd13eb22c3d32ebd
Description: Only show the Lurking Minicart when required
Author: WebAware
Author URI: https://lurking-minicart.webaware.net.au/
*/
if (!defined('ABSPATH')) {
@webaware
webaware / event-tickets-woo-select2-fix.php
Last active Jul 9, 2018
Stop Event Tickets from breaking WooCommerce product pages with an old select2 script
View event-tickets-woo-select2-fix.php
<?php
/*
Plugin Name: Fix Events vs WooCommerce select2
Plugin URI: https://gist.github.com/webaware/f7c8ba642b7a12a1ea8c74277e5af084
Description: Stop Event Tickets and The Events Calendar from breaking WooCommerce product pages with an old select2 script
Version: 1.2
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
@webaware
webaware / visual-editor-ngg-fix.php
Last active Jan 31, 2018
Stop NextGEN Gallery from breaking the Visual Editor in IE11 (which it does by switching it to IE10 emulation) Raw
View visual-editor-ngg-fix.php
<?php
/*
Plugin Name: Visual Editor Fix for NGG
Plugin URI: https://gist.github.com/webaware/66abf3366aae6f86db8770c4ec7ddd16
Description: Stop NextGEN Gallery from breaking the Visual Editor in IE11
Version: 1
Author: WebAware
Author URI: https://shop.webaware.com.au/
*/
You can’t perform that action at this time.