Skip to content

Instantly share code, notes, and snippets.

@bMinaise
bMinaise / base.css
Created December 7, 2017 22:17
SH-Base-CSS
/*
SH - Base CSS
** import SH brand fonts
** apply class names to each font
** apply class names to header sizes
** apply class names to colors used
*/
@bMinaise
bMinaise / designer.html
Last active August 29, 2015 14:16
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
//Display Fields
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 );
//JS to add fields for new variations
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' );
//Save variation fields
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 );
function variable_fields( $loop, $variation_data ) {
?>
<tr>
@bMinaise
bMinaise / hex-form.html
Last active December 28, 2015 03:59
HEX to RGBa - Script //source http://hex2rgba.devoth.com
<form>
<fieldset>
<legend>Convert your color:</legend>
<ol class="fieldsList column1">
<li>
<label for="f_hex_value">HEX value (e.g. #f00, #812dd3, ba3, F924A4, red)</label>
</li>
<li>
<input type="text" name="f_hex_value" value="" id="f_hex_value">
</li>
@bMinaise
bMinaise / multipage-navigation.php
Created November 11, 2013 17:57
Gravity Forms - Multi page navigation
/**
* Multi-page Navigation
* http://gravitywiz.com/
**/
class GWMultipageNavigation {
private $script_displayed;
function __construct( $args = array() ) {
@bMinaise
bMinaise / age-verification.php
Created November 7, 2013 03:15
Gravity Form - Age Verification Function
<?php
// 1 - Tie our validation function to the 'gform_validation' hook
add_filter('gform_validation_47', 'validate_vin');
function validate_vin($validation_result) {
// 2 - Get the form object from the validation result
$form = $validation_result["form"];
// 3 - Get the current page being validated
@bMinaise
bMinaise / .htaccess
Created November 6, 2013 21:19
optimized .htaccess // May be a bit extreme ... Reduce time span if case.
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
@bMinaise
bMinaise / javascript-bp.md
Created November 6, 2013 06:12
JavaScript Style Guide
@bMinaise
bMinaise / thumbs.css
Created November 6, 2013 06:10
Bootstrap 3 - Thumbnail Caption Hover Snippet by: sevenx.de
body {
padding-top: 50px;
}
.thumbnail {
position:relative;
overflow:hidden;
}
.caption {
@bMinaise
bMinaise / footer.html
Created November 6, 2013 06:08
Bootstrap 3 - Footer Example