This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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]'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
NewerOlder