Skip to content

Instantly share code, notes, and snippets.

View intrigue's full-sized avatar

Chad intrigue

  • Intrigue
  • New York, NY
View GitHub Profile
@strangerstudios
strangerstudios / gist:1389944
Created November 23, 2011 21:17
Paid Memberships Pro Extra Checkout/Profile Fields Example
<?php
/*
Adding First and Last Name to Checkout Form
*/
//add the fields to the form
function my_pmpro_checkout_after_password()
{
if(!empty($_REQUEST['firstname']))
$firstname = $_REQUEST['firstname'];
@malarkey
malarkey / Contract Killer 3.md
Last active April 12, 2024 02:24
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@jackie
jackie / breakpoints.json
Last active December 19, 2015 15:28
Sass Script function to get breakpoint values from a JSON file.
{
"phone" : "all and (max-width: 603px)",
"desktop": "all and (min-width: 1025px)",
"tablet" : "all and (min-width: 604px) and (max-width: 1024px)"
}
@strangerstudios
strangerstudios / is_user_logged_in_required.php
Last active April 3, 2020 07:12
Make PMPro Register Helper fields required for logged out users only.
if(is_user_logged_in())
$required = false;
else
$required = true;
$fields[] = new PMProRH_Field(
"company", // input name, will also be used as meta key
"text", // type of field
array(
"size"=>40, // input size
@amboutwe
amboutwe / yoast_seo_opengraph_change_image_size.php
Last active January 11, 2024 20:48
Code snippet to change or remove OpenGraph output in Yoast SEO. There are multiple snippets in this code.
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change size for Yoast SEO OpenGraph image for all content
* Credit: Yoast Development team
* Last Tested: May 19 2020 using Yoast SEO 14.1 on WordPress 5.4.1
* Accepts WordPress reserved image size names: 'thumb', 'thumbnail', 'medium', 'large', 'post-thumbnail'
* Accepts custom image size names: https://developer.wordpress.org/reference/functions/add_image_size/
*/
@greathmaster
greathmaster / pmpro-rh-dob-check.php
Last active June 15, 2021 10:50
Checks birthday on checkout to confirm member is over 21 years.
function my_pmprorh_init()
{
//don't break if Register Helper is not loaded
if(!function_exists( 'pmprorh_add_registration_field' )) {
return false;
}
//define the fields
$fields = array();
$fields[] = new PMProRH_Field(
@pbrocks
pbrocks / date-check.js
Created September 8, 2018 14:17
Add hidden PMPro registration field that shows a message when a checkbox is ticked.
jQuery(document).ready(function($) {
var label = $('label[for=hidden_check]');
$(label).hide();
$('#date_check').click(function() {
if($('#date_check').is(':checked')) {
$(label).css('color','salmon').show();
$('input[name=hidden_check]').val('1');
} else {
$(label).hide();
$('input[name=hidden_check]').val('0');
@andrewlimaza
andrewlimaza / register-helper.php
Created October 29, 2018 08:29
Register Helper Example For Paid Memberships Pro.
<?php
/**
* Copy this code (below) into your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmprorh_init()
{
//don't break if Register Helper is not loaded
if(!function_exists( 'pmprorh_add_registration_field' )) {
return false;