Skip to content

Instantly share code, notes, and snippets.

View teledirigido's full-sized avatar

Miguel Garrido teledirigido

View GitHub Profile
@teledirigido
teledirigido / functions.php
Last active April 19, 2020 18:30 — forked from Willem-Siebe/functions.php
Replace the 'x' in WooCommerce cart.php with text because 'x' is not helpfull at all for screenreader users. I give a extra class to the text so that it can be hidden with CSS for visual browsers, because I replace that link with Font Awesome icon using :before. See also: https://github.com/woothemes/woocommerce/issues/5725.
// Replace the 'x' in WooCommerce cart.php with text because 'x' is not helpfull at all for screenreader users.
// https://gist.github.com/teledirigido/a859a1f0b954fc3f20cf44ef11d5718e/edit
function woocommerce_remove_item( $html, $cart_item_key ) {
$cart_item_key = $cart_item_key;
$html = sprintf( '<a href="%s" class="remove" title="%s"><span class="wsis-remove-item">%s</span></a>',
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
__( 'Remove', 'woocommerce' ),
__( 'Remove', 'woocommerce' ));
return $html;
}
@teledirigido
teledirigido / gruntfile.js
Last active March 23, 2016 23:02
Grunt file configuration example
/*
GRUNTFILE JS WORKING EXAMPLE
----------------------------
- Babel
- Uglify
- Browser Sync
- Sass
- Watch
@teledirigido
teledirigido / fontloader.js
Last active September 17, 2015 03:11
Font loader
/*
Webfontloader
-------------
Based on: https://github.com/typekit/webfontloader#typekit
DESCRIPTION
-----------
@teledirigido
teledirigido / animate_svg.js
Last active August 29, 2015 14:24
Animate SVG with javascript
/*
USAGE:
var svg = new animate_svg({
id: '#svg-logo',
frames: 100
});
svg.init();
@teledirigido
teledirigido / cs_select.scss
Created July 7, 2015 05:14
CS Select (SCSS)
/*
*
* NOTE: There're some css3 features using @include and I'm not including (dumb I know).
* You can find all the css3 properties in here:
* https://gist.github.com/teledirigido/e7d346cc05b4d95b8c97
*
* This file has been created to work with the following script:
* https://gist.github.com/teledirigido/fec00d9e9ae3ac46b79c (cs_select.js)
*
*
@teledirigido
teledirigido / import_files.php
Created July 6, 2015 01:44
Create post, add attachment and update field via ACF
<?php
/*
*
* This small scripts creates a post and attaches a file using Advanced custom field.
*
* Created by Miguel Garrido
* miguel.co.nz | [email protected]
*
* Notes:
@teledirigido
teledirigido / post_type_register.php
Last active January 15, 2017 00:13
Post type register
<?php
/**
* PARAMETERS
* ----------
*
*
* Required (Array)
*
@teledirigido
teledirigido / animation.js
Created May 25, 2015 04:11
Animate element with jQuery
/*
# Usage for your Javascript
$(document).ready(function(){
var animate_squared = new animation({
obj: '#your-tag .item',
});
@teledirigido
teledirigido / commands.sh
Last active August 29, 2015 14:21
Useful commands on shell
# Find .htaccess and do chmod
sudo find / -type f -name '.htaccess' -exec chmod 604 {} \;
# Find wp-config.php and do chmod
sudo find / -type f -name 'wp-config.php' -exec chmod 644 {} \;
@teledirigido
teledirigido / .bash_profile
Last active August 29, 2015 14:21
Useful alias for your bash_profile
# Open your bashprofile
alias openbash="subl ~/.bash_profile";
# Thanks to [email protected]
alias showFiles="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app";
alias hideFiles="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app";