Skip to content

Instantly share code, notes, and snippets.

View keeneyemedia's full-sized avatar

Keenan Flogerzi keeneyemedia

View GitHub Profile
@sarahdayan
sarahdayan / modifiers.scss
Last active October 31, 2023 18:28
Sass Modifiers Mixin
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Sass modifiers mixin by Sarah Dayan
// Generate All Your Utility Classes with Sass Maps: frontstuff.io/generate-all-your-utility-classes-with-sass-maps
// http://frontstuff.io
// https://github.com/sarahdayan
/**
* Hide shipping rates when free shipping is available.
* Updated to support WooCommerce 2.6 Shipping Zones.
*
* @param array $rates Array of rates found for the package.
* @return array
*/
function my_hide_shipping_when_free_is_available( $rates ) {
$free = array();
foreach ( $rates as $rate_id => $rate ) {
@nickcernis
nickcernis / mailchimp-popup-for-wordpress.md
Last active July 28, 2022 14:49
MailChimp Popup Script that works with WordPress sites

MailChimp's default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.

Including them in this way isn't always possible or easy with WordPress.

The code below is an alternative implementation of the loader that forces MailChimp's popup scripts to appear below all other scripts upon page load.

To use it, modify the baseUrl, uuid, and lid attributes with the ones from the original popup script that MailChimp supplies.

@mikemanger
mikemanger / reposition-gform-blog-templates.php
Last active August 29, 2015 14:03
(WordPress) Reposition New Blog Templates
<?php
/*
Plugin Name: Reposition New Blog Templates
Description: Move New Blog Template selection to a different Gravity Form page.
Author: Mike Manger
Author URI:
*/
function mm_rnbt_get_form_filter( $form_html, $form ) {
// Let's check if the option for New Blog Templates is activated in this form
@greguly
greguly / WooCommerce Dynamic Price View
Last active August 16, 2021 08:41
Woocommerce Dynamic Pricing table price view
add_filter( 'woocommerce_get_price_html', 'omniwp_credit_dollars_price', 10, 2 );
function omniwp_credit_dollars_price( $price, $product ) {
$pricing_rule_sets = get_post_meta( $product->post->ID, '_pricing_rules', true );
$pricing_rule_sets = array_shift( $pricing_rule_sets );
if ( $pricing_rule_sets
&& is_array( $pricing_rule_sets )
&& sizeof( $pricing_rule_sets ) ) {
ob_start();