Skip to content

Instantly share code, notes, and snippets.

View webprom's full-sized avatar

Iggy Pritzker webprom

View GitHub Profile
@webprom
webprom / filters.php
Created October 23, 2021 07:17 — forked from dkjensen/filters.php
WordPress Gutenberg Query Loop View More AJAX
<?php
/**
* Add data attributes to the query block to describe the block query.
*
* @param string $block_content Default query content.
* @param array $block Parsed block.
* @return string
*/
function query_render_block( $block_content, $block ) {
if ( 'core/query' === $block['blockName'] ) {
@webprom
webprom / .htaccess
Created April 24, 2019 22:21 — forked from tavy315/.htaccess
Enable GZip compression & Leverage browser caching
AddDefaultCharset UTF-8
Options -Indexes
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
@webprom
webprom / waypoints-init.js
Created November 17, 2016 18:54 — forked from srikat/waypoints-init.js
Using Waypoints jQuery to animate and fade in elements as they come in focus in WordPress. http://sridharkatakam.com/using-waypoints-jquery-animate-fade-elements-scrolled-wordpress/
.home-featured .simple-social-icons ul li a.animate {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
@webprom
webprom / theme.template.js
Created June 19, 2016 05:05 — forked from vagnerolliver2/theme.template.js
Javascript do Template Zendesk
/*
* jQuery v1.9.1 included
*/
$(document).ready(function() {
// social share popups
$(".share a").click(function(e) {
e.preventDefault();
window.open(this.href, "", "height = 500, width = 500");
@webprom
webprom / ipn-test.php
Created March 10, 2016 11:37 — forked from mikejolley/ipn-test.php
Quick snippet/plugin/dropin to test IPN support
<?php
/**
* Plugin Name: PayPal Sandbox IPN Tester
* Description: Pings the IPN endpoint to see if your server can connect. Just head to <a href="/?ipn-test=1">yoursite.com/?ipn-test=1</a> whilst logged in as admin.
* Version: 1.0.0
* Author: WooThemes
* Requires at least: 4.1
* Tested up to: 4.3
*/
if ( ! defined( 'ABSPATH' ) ) {
add_filter( 'woocommerce_dynamic_pricing_process_product_discounts', 'is_product_eligible', 10, 4 );
function is_product_eligible( $eligible, $product, $discounter_name, $discounter_object ) {
remove_filter( 'woocommerce_dynamic_pricing_process_product_discounts', 'is_product_eligible', 10, 4 );
if ( $product->is_on_sale() ) {
$eligible = false;
}
add_filter( 'woocommerce_dynamic_pricing_process_product_discounts', 'is_product_eligible', 10, 4 );