Skip to content

Instantly share code, notes, and snippets.

@SemBur
SemBur / gist:bb1fb30083cbfb007e12
Created December 24, 2015 10:07 — forked from kloon/gist:4228021
WooCommerce variations custom field
//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>
@SemBur
SemBur / bootstrap-square.css
Last active August 29, 2015 14:27
Square bootstrap columns
.square-100{
position: relative;
width: 100%;
padding-bottom : 100%; /* = width for a 1:1 aspect ratio */
margin:1.66%;
background-position:center center;
background-repeat:no-repeat;
background-size:cover; /* you change this to "contain" if you don't want the images to be cropped */
overflow: hidden
}
@SemBur
SemBur / config.json
Created August 4, 2015 17:44 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#262626",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#000000",
"@brand-success": "#01642e",