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 // Do not include this if already open! | |
/** | |
* Code goes in theme functions.php. | |
*/ | |
add_action( 'woocommerce_created_customer', 'woocommerce_created_customer_admin_notification' ); | |
function woocommerce_created_customer_admin_notification( $customer_id ) { | |
wp_send_new_user_notifications( $customer_id, 'admin' ); | |
} |
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( 'woocommerce_after_add_to_cart_form', 'dropdown_waitlist_label' ); | |
function dropdown_waitlist_label() { | |
echo " | |
<script> | |
jQuery(document).ready(function($) { | |
var variation_data = $('form.variations_form').attr('data-product_variations'); | |
var variation_data = JSON.parse(variation_data); |
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 custom_wc_ajax_variation_threshold( $qty, $product ) { | |
return 10; | |
} | |
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 ); |
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 | |
if( function_exists('acf_add_local_field_group') ): | |
acf_add_local_field_group(array ( | |
'key' => 'acf_product_options', | |
'title' => 'Product Options', | |
'fields' => array ( | |
array ( | |
'key' => 'acf_product_options_tabbedcontent_label', | |
'label' => 'Tabbed Content', |
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 | |
/** | |
* @package Reverse Proxy | |
*/ | |
/* | |
Plugin Name: Reverse Proxy | |
Plugin URI: https://instrumentalapp.com/ | |
Description: Reverse proxy setup for Instrumental blog | |
Version: 1.0 | |
Author: James Paden |
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 | |
// First, make sure Jetpack doesn't concatenate all its CSS | |
add_filter( 'jetpack_implode_frontend_css', '__return_false' ); | |
// Then, remove each CSS file, one at a time | |
// You probably won't need them all, unless you use all the modules, and all the themes! :) | |
// Some of these are also only loaded on specific admin pages, so it wouldn't affect your readers | |
function jeherve_remove_all_jp_css() { | |
wp_deregister_style( 'AtD_style' ); // After the Deadline |
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( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
function enqueue_my_styles() { | |
global $wp_styles; | |
// Load the main stylesheet | |
wp_enqueue_style( 'my-theme', get_stylesheet_directory_uri() . '/style.css' ); |
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
# Originally from http://www.benlog.org/2008/6/29/bare-bones-date-picker-for-merb | |
# Modified for new Merb 0.9.6 helpers | |
module Merb::Helpers::Form | |
def date_field(*args) | |
if bound?(*args) | |
current_form_context.bound_date_field(*args) | |
else | |
current_form_context.unbound_date_field(*args) | |
end | |
end |