Skip to content

Instantly share code, notes, and snippets.

View teledirigido's full-sized avatar

Miguel Garrido teledirigido

View GitHub Profile
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@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;
}