Skip to content

Instantly share code, notes, and snippets.

View JoelEadeDesign's full-sized avatar

Joel Eade JoelEadeDesign

View GitHub Profile
@kloon
kloon / gist:4331540
Created December 18, 2012 20:14
WooCommerce Change Bacs sort code text
add_filter( 'woocommerce_bacs_fields', 'woocommerce_bacs_custom_sort_code_text', 10, 1 );
function woocommerce_bacs_custom_sort_code_text( $fields ) {
$fields['sort_code'] = 'BSB';
return $fields;
}
@karlhorky
karlhorky / grayscale-disable.css
Created August 26, 2012 12:17
Cross-Browser CSS Grayscale
img.grayscale.disabled {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale");
-webkit-filter: grayscale(0%);
}
@jancbeck
jancbeck / wp-role-bodyclass.php
Last active January 15, 2022 19:34
WordPress: Add user role class to body tag
<?php
// Add role class to body
function add_role_to_body($classes) {
foreach (wp_get_current_user()->roles as $user_role) {
$classes[] = 'role-'. $user_role;
}
return $classes;
});
add_filter('body_class','add_role_to_body');