Skip to content

Instantly share code, notes, and snippets.

View KZeni's full-sized avatar

Kurt Zenisek KZeni

View GitHub Profile
@KZeni
KZeni / jquery-html5-file-upload.php
Created April 3, 2014 01:14
Swap the jqhfu_enqueue_scripts() function out (found in jquery-html5-file-upload.php) with this new one to get https://wordpress.org/plugins/jquery-html5-file-upload/ working as of version 1.3 of that WordPress plugin.
function jqhfu_enqueue_scripts() {
$stylepath=JQHFUPLUGINDIRURL.'css/';
$scriptpath=JQHFUPLUGINDIRURL.'js/';
wp_enqueue_style ( 'jquery-ui-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css' );
wp_enqueue_style ( 'jquery-image-gallery-style', '//blueimp.github.io/Gallery/css/blueimp-gallery.min.css');
wp_enqueue_style ( 'jquery-fileupload-ui-style', $stylepath . 'jquery.fileupload-ui.css');
wp_enqueue_script ( 'enable-html5-script', '//html5shim.googlecode.com/svn/trunk/html5.js');
if(!wp_script_is('jquery')) {
wp_enqueue_script ( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js',array(),'',false);
@KZeni
KZeni / tabby.js
Last active May 7, 2019 12:50
Tabby Responsive Tabs (Add Browser History Support)
/* ----------------
Tabby.js 1.2.0
based on ResponsiveTabs.js 1.10
by Pete Love
------------------- */
var RESPONSIVEUI = {};
(function($) {
@KZeni
KZeni / tabby.css
Last active August 29, 2015 14:10
Tabby Responsive Tabs (Add Browser History Support)
/* ------ wordpress.org/plugins/tabby-responsive-tabs/ ------ */
.responsive-tabs .responsive-tabs__heading {
display: none;
}
.responsive-tabs .responsive-tabs__list__item {
display: inline;
cursor: pointer;
}
@KZeni
KZeni / adrotate-cookie.php
Created December 4, 2014 21:33
Fix JavaScript error when visitors are using an Ad Blocker
@KZeni
KZeni / material design blogger template.xml
Created December 15, 2014 20:23
Material Design Blogger Template
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<b:include data='blog' name='all-head-content'/>
<meta content='width=device-width, initial-scale=1, minimum-scale=1' name='viewport'/>
<title>
<data:blog.pageTitle/>
</title>
<b:skin><![CDATA[
@KZeni
KZeni / getting-started.md
Last active August 29, 2015 14:15
Beginner's Getting Started Guide for jQuery Smart Web App Banner

1. Add jQuery by adding the following to the <head> of your page/site:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>

Note: You don't need to add this if jQuery is already being called on the page.

2. Add the banner’s CSS by adding the following to the <head> of your page/site:

<link href="//cdnjs.cloudflare.com/ajax/libs/jquery-smart-web-app-banner/1.4/jquery.smartwebbanner.min.css" rel="stylesheet" type="text/css" />

3. Add the banner’s JavaScript by adding the following before the closing </body> tag (making it so it lets the main part of your site load first):

@KZeni
KZeni / functions.php
Created March 10, 2015 19:36
Auto-Activate WordPress Multi-Site/Network Users After Registration (disable activation)
// Auto-activate users after registration
function my_disable_activation( $user, $user_email, $key, $meta = '' ){
// Activate the user
$user_id = wpmu_activate_signup( $key );
wp_set_auth_cookie( $user_id, true, is_ssl() );
wp_redirect( /*redirect to */ site_url() );
exit;
}
add_filter( 'wpmu_signup_user_notification', 'my_disable_activation', 10, 4 );
@KZeni
KZeni / postcode_shipping.php
Created August 27, 2015 21:27
Updated Postcode Shipping plugin for WordPress that supports Shipping Multiple Addresses in one cart.
<?php
/**
* Plugin Name: Postcode Shipping
* Description: This plugin allows you to set a flat shipping rate per country or state or postcode per Quantity/Order on WooCommerce.
* Version: 2.1.2

Keybase proof

I hereby claim:

  • I am kzeni on github.
  • I am kzeni (https://keybase.io/kzeni) on keybase.
  • I have a public key ASALVl6MMeTe7CtQcT7p3cC4IfZeYAZDUg3J_cwgVB9Eiwo

To claim this, I am signing this object:

@KZeni
KZeni / cf7-success-page-redirects.php
Last active September 20, 2018 06:19
Contact Form 7 - Success Page Redirects version 1.2.0 plugin fix (fixes conflict with Flamingo add-on and also makes it work with & without AJAX enabled on the form) as mentioned on https://wordpress.org/support/topic/compatibility-issue-with-flamingo-official-plugin-for-storing-cf7-submissions/
<?php
/**
* Plugin Name: Contact Form 7 - Success Page Redirects
* Description: An add-on for Contact Form 7 that provides a straightforward method to redirect visitors to success pages or thank you pages.
* Version: 1.2.0
* Author: Ryan Nevius
* Author URI: http://www.ryannevius.com
* License: GPLv3
*/