Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Minion macbookandrew

View GitHub Profile
@macbookandrew
macbookandrew / give-get-goal-fix.php
Created Feb 25, 2019
Returns false if goal is disabled
View give-get-goal-fix.php
<?php
/**
* Plugin Name: Give - <code>get_goal()</code> fix
* Plugin URI: https://luminfire.com
* Description: Forces <code>get_goal()</code> to return false if goal is disabled for the form.
* Version: 1.0.0
* Author: LuminFire (Andrew Minion)
* Author URI: https://luminfire.com/
*
* @package give-get-goal-fix
View menu-image-devdmbootstrap3-fix.php
<?php
/**
* Plugin Name: Menu Image + DevDMBootstrap3 Fix
* Plugin URI: https://gist.github.com/macbookandrew/d40a416c65c615e0e15e1b6fd0645a67
* Description: Fixes Menu Image PLugin used with DevDMBootstrap3 themes
* Author: Andrew Minion/Pressed Solutions
* Author URI: https://pressedsolutions.com/
* Requires WP: 4.4.0
* Requires PHP: 7.0
* Version: 1.0.0
@macbookandrew
macbookandrew / navigation.js
Created Apr 18, 2018
_s theme: multiple menus on a page
View navigation.js
/**
* Handle multiple menus on one page
*/
(function($){
$('document').ready(function(){
$('.main-navigation .menu-toggle').on('click', function(){
$(this).toggleClass('toggled');
var $nav = $(this).parents('.main-navigation'),
$ul = $nav.find('ul.menu');
@macbookandrew
macbookandrew / WP-theme-version-filename.php
Last active Apr 25, 2018
WordPress theme stylesheet auto cache-busting
View WP-theme-version-filename.php
<?php
/**
* Autocalculate and define theme version constant for use in multiple stylesheets/scripts
*/
define( 'MY_THEME_VERSION', wp_get_theme()->get( 'Version' ) );
/**
* Enqueue stylesheet
*
@macbookandrew
macbookandrew / wp-amplify-ga-tracking.php
Last active Sep 11, 2017
Basic Google Analytics tracking for mailto: links
View wp-amplify-ga-tracking.php
<?php
/**
* Plugin Name: WPAmplify GA Tracking
* Plugin URI: https://gist.github.com/macbookandrew/84ce54d73713d82b390fc9dc29b19e12/
* Description: Basic Google Analytics tracking for mailto: links
* Version: 1.0.0
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
* Copyright: 2017 AndrewRMinion Design
@macbookandrew
macbookandrew / sermon-manager-tax-archives.php
Last active Aug 16, 2017
WP plugin: shortcodes to create faux archive pages for all custom Sermon Manager taxonomies
View sermon-manager-tax-archives.php
<?php
/**
* Plugin Name: Sermon Manager Taxonomy Archives
* Plugin URI: https://gist.github.com/macbookandrew/62733a780899bb61773188641f4813de
* Description: Shortcode to create faux custom taxonomy archives; example: [sermon_tax_archive taxonomy="wpfc_preacher"]
* Version: 1.0.0
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
* Copyright: 2017 AndrewRMinion Design
@macbookandrew
macbookandrew / tribe-events-the_grid.php
Last active Jun 1, 2017
Adds dates to [the_grid] shortcode output for Modern Tribe’s The Events Calendar
View tribe-events-the_grid.php
<?php
/*
* Plugin Name: The Events Calendar + The Grid
* Version: 1.0
* Description: Adds dates to [the_grid] shortcode output for Tribe Events
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
* Plugin URI: https://gist.github.com/macbookandrew/8aedd7809ddf89fabb6fc66a19bd0318
* License: GPL2
*/
@macbookandrew
macbookandrew / wpforms-recaptcha-async.php
Created May 11, 2017
Force the WPForms Google Recaptcha script to load asynchronously to improve site performance
View wpforms-recaptcha-async.php
<?php
/*
* Plugin Name: WPForms: Force Async Scripts
* Plugin URL: https://gist.github.com/macbookandrew/30eb660833192066e5ea7691fc735e9f
* Description: Force the WPForms Google Recaptcha script to load asynchronously to improve site performance
* Version: 1.0.0
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
*/
@macbookandrew
macbookandrew / merge-minify-refresh-async.php
Last active May 11, 2017
Force merged scripts created by “Merge + Minify + Refresh” to load asynchronously to improve site performance
View merge-minify-refresh-async.php
<?php
/*
* Plugin Name: Merge + Minify + Refresh: Force Async Scripts
* Plugin URL: https://gist.github.com/macbookandrew/0bb0c29b2321c166845cea0b7cdb5d15
* Description: Forces merged scripts created by “Merge + Minify + Refresh” to load asynchronously to improve site performance
* Version: 1.0.0
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
*/
You can’t perform that action at this time.