Skip to content

Instantly share code, notes, and snippets.

View gspice's full-sized avatar

Ginger Coolidge gspice

  • GSC Solutions LLC
  • Lincoln City, Oregon
View GitHub Profile
@gspice
gspice / 1.php
Created April 4, 2019 20:33 — forked from amdrew/1.php
AffiliateWP - Send the affiliate registration admin email to different email address, or multiple email addresses.
<?php
/**
* Send admin notification to a different email address
*/
function affwp_custom_registration_admin_email( $email ) {
// add the email here
$email = '[email protected]';
return $email;
@gspice
gspice / gist:f90fc70372a74a14fddaabbfcba64d81
Created March 12, 2019 20:13 — forked from pippinsplugins/gist:d973776836ab984aea06
Sets an affiliate user's role to a specific role when being added as an affiliate
<?php
/*
* Plugin name: Affiliate role on registration
*/
function pw_affwp_set_role_on_registration( $affiliate_id = 0 ) {
$user_id = affwp_get_affiliate_user_id( $affiliate_id );
$user = new WP_User( $user_id );
$user->add_role( 'affiliate' );
@gspice
gspice / affwp-pms-restrict-referral.php
Created November 8, 2018 17:34 — forked from tubiz/affwp-pms-restrict-referral.php
Allows you to restrict referral creation to specific PMS subscription plans
<?php
/**
* Plugin Name: AffiliateWP - Restrict Referral Creation To Specific PMS Subscription Plans
* Plugin URI: http://affiliatewp.com
* Description: Allows you to restrict referral creation to specific PMS subscription plans
* Author: Tunbosun Ayinla, tubiz
* Author URI: https://bosun.me
* Version: 1.0
*/
@gspice
gspice / _header-scss
Created March 6, 2017 00:41 — forked from jdelia/_header-scss
Adding SVG Logo to Utility Pro theme
.header-image .site-title a {
background: url(images/logo.svg) center center no-repeat;
float: left;
min-height: 60px;
width: 100%;
@include media($medium-screen-up) {
background-position: left center;
}
}
<?php
/**
* Genesis Sample.
*
* This file adds functions to the Genesis Sample Theme.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0+
* @link http://www.studiopress.com/
@gspice
gspice / if-resolution.scss
Created February 9, 2016 20:51 — forked from ffdead/if-resolution.scss
SASS resolution media query mixin
/* @author 14islands.com
* SASS mixins for future proof resolution media query
*/
@mixin if-min-resolution($dppx) {
@include if-resolution(min, $dppx) {
@content;
}
}
@gspice
gspice / Contract Killer 3.md
Last active November 17, 2016 17:44
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

<?php
add_filter( 'pre_get_posts', 'tgm_io_cpt_search' );
/**
* This function modifies the main WordPress query to include an array of
* post types instead of the default 'post' post type.
*
* @param object $query The original query.
* @return object $query The amended query.
*/
function tgm_io_cpt_search( $query ) {

Contract Killer 3

Revised date: 07/11/2012

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

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@gspice
gspice / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console