Skip to content

Instantly share code, notes, and snippets.

{% assign rightNow = 'now' %}
{% assign good_morning = "Enjoy the rest of your the_day!+++Have an awesome the_day name! 🤘+++Make today your best the_day name!+++Take care, name! 😊+++Thanks for reading, name! Have a great day 🌅+++Have a good one, name!" | split: "+++" %}
{% assign good_day = "Catch you later name 😎+++Have a great day! 🤘+++Today is your day name!+++Until next time, name!+++Alright, I'm out!+++That's it from me, have a great the_day! 🙌+++As always, name — thanks for reading 🙏🤘+++All the best 🤘" | split: "+++" %}
{% assign good_night = "Hope you had a great day, name! 😊+++Cheers name, have a nice evening! 🌛+++Thanks, name! Have a good night! 😊+++What was a win you had today, name? 🌜" | split: "+++" %}
{% assign randomMorning = rightNow | date: "%s" | modulo: good_morning.size %}
{% assign randomDay = rightNow | date: "%s" | modulo: good_day.size %}
{% assign randomEvening = rightNow | date: "%s" | modulo: good_night.size %}
{% assign subname = subscriber.first_name | capitalize %}
{% assign the_h
Twitter Share: https://twitter.com/intent/tweet?text=[url]
FB Share: https://www.facebook.com/sharer/sharer.php?u=[url]
LI Share: https://www.linkedin.com/shareArticle?mini=true&url=[url]&title=&summary=&source=
Pinterest Share: http://pinterest.com/pin/create/button/?url=[url]&media=&description=
Facebook Share: https://www.facebook.com/sharer/sharer.php?u={{archive_url}}
Twitter Share: https://twitter.com/intent/tweet?text={{archive_url}}
Linkedin Share: https://www.linkedin.com/shareArticle?mini=true&url={{archive_url}}&title=&summary=&source=
Pinterets Share: http://pinterest.com/pin/create/button/?url={{archive_url}}&media=&description=
@rezzz-dev
rezzz-dev / ext-ck.js
Last active August 4, 2020 18:58
Injecting a hidden field into a ConvertKit form
<script>
// NOTES:
// 1. This only works for ConvertKit Forms that are embedded with HTML (not the JS method)
// 2. In order to save this as a cookie in the browser so that you can carry the across multiple pages, you'll need to include js-cookie (https://github.com/js-cookie/js-cookie). Otherwise it will only work on the page the visitor lands on.
// TIP: Create the custom field (in this example it's called trackingCode) in ConvertKit prior to running this, if not, CK will do it's best to create it, but may not be ideal case-sensitive or it may use spaces
jQuery(document).ready(function($) {
var hiddenField = Cookies.get('hiddenField') ? Cookies.get('hiddenField') : "";
if ( ! hiddenField ) {
hiddenField = ckGetQueryVariable('[val to store in custom field]');
@rezzz-dev
rezzz-dev / rcp_discount.php
Created July 16, 2018 16:00
Restrict Content Pro Automated Discount Creation
function gre_rcp_discount_offer( $entry, $form ) {
$exp_date = date("Y-m-d", strtotime("+ 2 day"));
$code = substr(str_shuffle(MD5(microtime())), 0, 10);
$discount = new RCP_Discounts();
$args = array(
'name' => 'Welcome Offer',
'description' => 'FL Sales OTO: '.$code,
'amount' => '30.00',
@rezzz-dev
rezzz-dev / peb.php
Created August 10, 2016 16:16
Plugin Extension Boilerplate
<?php
/**
* Plugin Name: Plugin Extension Boilerplate
* Plugin URI: https://rezzz.com/
* Description: Extend an existing plugin with more functionality (based: https://codeable.io/community/how-to-extend-a-wordpress-plugin-my-plugin-boilerplate/)
* Version: 1.0.0
* Author: Jason Resnick
* Author URI: https://rezzz.com/
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@rezzz-dev
rezzz-dev / functions.php
Created May 4, 2016 16:19
Remove the conflict of select2 versions between ACF and LifterLMS
<?php
add_action( 'admin_enqueue_scripts', 'custom_admin_scripts_styles' );
function custom_admin_scripts_styles() {
global $post_type;
if ( 'course' == $post_type ) {
global $post_type;
wp_dequeue_script( 'select2' );
wp_dequeue_style( 'select2' );
@rezzz-dev
rezzz-dev / functions.php
Created February 25, 2016 13:29
Re-order WooCommerce Checkout Fields
<?php
/*
* Re-order Checkout Fields
*/
add_filter( 'woocommerce_checkout_fields', 'rez_move_checkout_fields' );
function rez_move_checkout_fields( $fields ) {
$fields2['billing']['billing_email'] = $fields['billing']['billing_email'];
@rezzz-dev
rezzz-dev / functions.php
Last active January 20, 2016 14:35
Filter Recent Posts Widget by current categories, but excluding current post
<?php
/*
* Filter Recent Posts based around the categories of the post being displayed
*/
function rez_widget_posts_args( $args ) {
if ( is_single() ) { // Only want to appear on blog posts.
$post = get_queried_object();
$categories = wp_get_post_categories( $post->ID );
$cats = implode( ',',$categories );
@rezzz-dev
rezzz-dev / CLI.sh
Created January 7, 2016 14:58
PHP Code Sniffer with WordPress Coding Standards and Atom
#Install PHP CodeSniffer
brew install homebrew/php/php-code-sniffer #if using Homebrew
git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs #if you want to do it directly
#Install WordPress Coding Standards
git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs
#Add WordPress standards to PHPCS config
phpcs -i #shows the libraries installed
phpcs --config-set installed_paths <path to dir that you cloned>/wpcs