Skip to content

Instantly share code, notes, and snippets.

View joedooley's full-sized avatar

Joe Dooley joedooley

  • Florida
  • 21:12 (UTC -04:00)
View GitHub Profile
@joedooley
joedooley / Three Wise Monkeys.md
Created July 14, 2019 18:11 — forked from jesgs/Three Wise Monkeys.md
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@joedooley
joedooley / functions.php
Created April 30, 2019 14:45 — forked from tripflex/functions.php
WordPress Remove Filter (remove_filter converted to remove_class_filter) to remove Filter/Action without Class Object access. Works with WordPress 1.2+ (4.7+ support added 9-19-2016)
<?php
/**
* Make sure the function does not exist before defining it
*/
if( ! function_exists( 'remove_class_filter' ) ){
/**
* Remove Class Filter Without Access to Class Object
*
* In order to use the core WordPress remove_filter() on a filter added with the callback
@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 / 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'];
<?php
class ACF_File_Custom {
private static $instance;
public static function register() {
if ( self::$instance == null ) {
self::$instance = new ACF_File_Custom();
}
}
@joedooley
joedooley / acf-post-type-model-example.php
Created February 19, 2016 12:33 — forked from lucasstark/acf-post-type-model-example.php
Example of wrapping a custom post type inside of a model
<?php
class AWP_CTP_Model_Contact {
/**
* Gets an array of data for the object. Use this to get data to pass to the constructor.
* @param int $id
* @return array
*/
public static function get_data( $id ) {
@joedooley
joedooley / acf-post-type-model-example-template.php
Created February 19, 2016 12:33 — forked from lucasstark/acf-post-type-model-example-template.php
Example template using a model representing the post.
<?php
$contact = AWP_CTP_Model_Contact::get_instance( get_the_ID() );
?>
<article id="post-<?php echo $contact->get_ID(); ?>">
<?php if ( $contact->get_featured_image_url() ) : ?>
<div class="ecc-contact-image">
<img class="th" src="<?php echo $contact->get_featured_image_url(); ?>" alt="<?php echo $contact->get_display_title(); ?>" title="<?php echo $contact->get_display_title(); ?>" />
@joedooley
joedooley / .bash_profile
Created February 10, 2016 01:53 — forked from davidneedham/.bash_profile
Pantheon Development Workflow (pdw): Commands to improve your Pantheon to local development experience. Just copy these commands into your .bash_profile or .bashrc, update the pdw-auth command to use your credentials, install Terminus (https://github.com/pantheon-systems/cli/wiki/Installation), and go!
#------------------------------------------
# PANTHEON DEVELOPMENT WORKFLOW v1.01
# Using the Pantheon CLI (terminus) v0.71
#------------------------------------------
# Authenticate with Pantheon. The first step, most of the time.
# This is a little insecure, as it lists your password here. But it's convenient.
alias pdw-auth='terminus auth login YOURPANTHEONEMAILADDRESS --password=YOURPANTHEONPASSWORD'
# Update your local Pantheon site aliases