Skip to content

Instantly share code, notes, and snippets.

View hectorcarranza's full-sized avatar

Héctor Carranza hectorcarranza

View GitHub Profile
function all_woocommerce_cart_expire_timeout(){
global $prod_ids;
global $product_timeout;
function action_woocommerce_add_to_cart( $array, $int, $int ) {
function perform_task() {
$start_time = time();
return $start_time;
}
@hectorcarranza
hectorcarranza / wp-query-ref.php
Created October 27, 2015 01:41 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?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(
@hectorcarranza
hectorcarranza / css_resources.md
Created March 14, 2014 00:15 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@hectorcarranza
hectorcarranza / 0_reuse_code.js
Created March 14, 2014 00:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hectorcarranza
hectorcarranza / functions.php
Created March 19, 2012 03:02
WooCommerce - Change number of related products and # products per row
// Redefine woocommerce_output_related_products()
function woocommerce_output_related_products() {
woocommerce_related_products(3,3); // Display 3 products in rows of 3
}
@hectorcarranza
hectorcarranza / gist:2064037
Created March 17, 2012 18:49
WP - WooCommerce - Notes
///////////////////////////////////////////////////////////////////
// //
// WORDPRESS //
// PLUGIN: WOOCOMMERCE //
// NOTAS SOBRE PROBLEMAS Y SOLUCIONES //
// //
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
@hectorcarranza
hectorcarranza / functions.php
Created March 15, 2012 14:12
WP - Functions.php - Hide secctions from WP-Admin
// FUNCTION THAT HIDES PAGES FROM THE WP-ADMIN
function quitar_paginas_de_administrador()
{
remove_menu_page('update-core.php'); // Update WP
remove_menu_page('edit.php'); // Posts
remove_menu_page('edit.php?post_type=page'); // Pages
remove_menu_page('upload.php'); // Multimedia
remove_menu_page('link-manager.php'); // Links
remove_menu_page('edit-comments.php'); // Comments
@hectorcarranza
hectorcarranza / gist:2017763
Created March 11, 2012 19:25 — forked from html/gist:1698093
Sequential images loading with jquery
function eachStep(collection, callback, endcallback){
if(collection.length == 0){
return endcallback && endcallback();
}
jQuery.when(callback(collection[0])).always(function(){
eachStep(collection.slice(1), callback, endcallback);
});
}