Skip to content

Instantly share code, notes, and snippets.

View joedooley's full-sized avatar

Joe Dooley joedooley

  • Florida
  • 07:28 (UTC -04:00)
View GitHub Profile
@joedooley
joedooley / wp-config.php
Created June 19, 2018 16:16
Standardize on HTTPS for all Pantheon Environments
<?php
/**
* Require HTTPS across all Pantheon environments.
* Does not run during wp-cli requests.
*
* This will redirect all pantheon environments redirect to https.
*
* @link https://pantheon.io/docs/redirects/#redirect-to-https
*/
@joedooley
joedooley / gw-gravity-forms-manual-entries.php
Created February 8, 2018 02:33 — forked from spivurno/gw-gravity-forms-manual-entries.php
Gravity Wiz // Gravity Forms // Manual Entries
<?php
/**
* Gravity Wiz // Gravity Forms // Manual Entries
*
* Create entries manually for Gravity Forms. Adds an "Add New" button next to the page title on all entry-related pages.
*
* @version 1.2
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/...
@joedooley
joedooley / gform_stripe_api_mode.php
Created February 5, 2018 21:19
Change Stripe API mode for targeted form.
<?php
/**
* Filters the API mode for a specific form to 'test'.
*
* @param $api_mode string Either 'test' or 'live'
*
* @return string Returns 'test' for targeted form. Otherwise,
* will return the value for the $api_mode setting.
*/
@joedooley
joedooley / wp-mailhog.php
Created January 14, 2018 00:26 — forked from bishless/wp-mailhog.php
Configure WordPress on Valet to use MailHog
<?php
/**
* @link
* @since 1.0.0
* @package TODO
*
* @wordpress-plugin
* Plugin Name: Use MailHog
* Description: Configure WordPress on Valet to use MailHog
* Version: 1.0.0
@joedooley
joedooley / .gitignore
Created October 22, 2017 02:38 — forked from esamattis/.gitignore
.gitignore file for WordPress - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@joedooley
joedooley / gist:43dc50adab4c39d140f0d7cd86524078
Created December 10, 2016 00:28
FacetWP - variable products test
<?php
// Example - check for "in_stock" with a "Size" attribute
function show_instock_product_variations( $params, $class ) {
if ( 'tax/pa_size' == $params['facet_source'] && 'product' == get_post_type( $params['post_id'] ) ) {
WC()->api->includes();
WC()->api->register_resources( new WC_API_Server( '/' ) );
$response = WC()->api->WC_API_Products->get_product( $params['post_id'] );
$product = $response['product'];

Keybase proof

I hereby claim:

  • I am joedooley on github.
  • I am joedooley (https://keybase.io/joedooley) on keybase.
  • I have a public key ASBd3iVlT20ecY3cgyQTT3620FpJBCJSq7q4C68k1daNLgo

To claim this, I am signing this object:

@joedooley
joedooley / gravity-forms-reset-bourbon.scss
Last active April 18, 2016 06:23
Gravity Forms reset using Bourbon. Includes compiled code.
@import "bourbon";
@import "neat";
ul,
li {
@include margin(0);
@include padding(0);
}
ul {
@joedooley
joedooley / phpstorm-scss-file-watcher-settings.txt
Last active March 16, 2016 23:51
Instructions and file paths needed to set up SCSS file watcher in PhpStorm.
PhpStorm SCSS File Watcher Settings
Directions: Create File Watcher in Tools -> File Watchers. Add the information below changing the
path to match your theme or plugins path.
File type: SCSS
Scope: Project SASS Directory
Program: /Users/joe/.rvm/gems/ruby-2.0.0-p643/bin/scss
@joedooley
joedooley / default-thumbnail.php
Last active March 8, 2016 22:37
Use a default thumbnail If a post thumbnail isn't set Outputs /images/default-thumbnail.png in its place.
<?php
add_filter( 'post_thumbnail_html', 'default_post_thumbnail_html' );
/**
* Use a default thumbnail If a post thumbnail isn't set
* Will output /images/default-thumbnail.png in its place.
*
* @param $html
* @return string
* @author Joe Dooley