Skip to content

Instantly share code, notes, and snippets.

View mircobabini's full-sized avatar

Mirco Babini mircobabini

View GitHub Profile
.widget-first.contact-info{
margin-bottom: 0;
padding-bottom: 0;
}
.contact-info.slide-up-widget{
margin-top: 0;
padding-top: 0;
}
.contact-info.slide-up-widget .sidebar-nav{
margin-top: 0;
.top0{
margin-top: 0;
}
.top10{
margin-top: 10px;
}
.top20{
margin-top: 20px;
}
.top40{
<?php
/**
* Cart Page
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.1.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
À È É Ì Ò Ù
@mircobabini
mircobabini / Product Categories to Product Types.php
Created May 23, 2014 13:35
Product Categories to Product Types (WPML Support)
<?php
/**
* put into:
* woocommerce/archive-product.php
*
* foreach product category (slug) must exists a product type with the same slug ending in '-type'
* example:
* product category: shoes, product type: shoes-type )
*
* License: GPLv2
<?php
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 );
<?php
function textdomain_localization() {
$theme_textdomain = 'yit';
load_theme_textdomain($theme_textdomain, get_stylesheet_directory() . '/languages');
load_textdomain('woocommerce', get_stylesheet_directory() . '/woocommerce/i18n/languages');
}
add_action('init', 'textdomain_localization');
// useless tests
// unload_textdomain('yit');
@mircobabini
mircobabini / plugins_dir_path.php
Created May 30, 2014 16:27
Better ways to get the plugins dir path in WordPress?
<?php
/*
* @author mircobabini
* @license GPLv2
*/
function plugins_dir_path(){
return untrailingslashit( ABSPATH ) . str_replace( get_site_url(), '', plugins_url() );
}
convert -deskew 40% in.jpg out.jpg
@mircobabini
mircobabini / template.zone.txt
Created June 19, 2014 10:45
Manually edit the SPF and DKIM records and add the MX record if it doesn't load automatically
;; Domain: example.org
;; Exported: 2014-06-19 02:01:32
;;
;; This file is intended for use for informational and archival
;; purposes ONLY and MUST be edited before use on a production
;; DNS server. In particular, you must:
;; -- update the SOA record with the correct authoritative name server
;; -- update the SOA record with the contact e-mail address information
;; -- update the NS record(s) with the authoritative name servers for this domain.
;;