Skip to content

Instantly share code, notes, and snippets.

View espellcaste's full-sized avatar

Renato Alves espellcaste

View GitHub Profile
// Custom Logo Link
function wpc_url_login() {
return "http://twentycms.com/";
}
add_filter('login_headerurl', 'wpc_url_login');
// Custom Login Styles (including logo)
function login_css() {
wp_enqueue_style( 'login_css', get_template_directory_uri() . '/css/login.css' );
}
@espellcaste
espellcaste / script.js
Created August 30, 2013 20:39 — forked from claudiosanches/script.js
Responsive WP Video
jQuery(document).ready(function($) {
// Responsive wp_video_shortcode().
$(".wp-video-shortcode")
.css("max-width", "100%")
.parent("div")
.css("width", "auto");
});
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
<?php
/*
* Plugin Name: Category Image Field
* Plugin URI: http://claudiosmweb.com/
* Description: Adds image field in category description.
* Version: 0.1
* Author: Claudio Sanches
* Author URI: http://claudiosmweb.com/
* License: GPLv2 or later
*/
<?php
/**
* Plugin Name: WooCommerce Correios - Envelope
* Plugin URI: http://claudiosmweb.com/
* Description: Este plugin ajuda a usar uma taxa fixa para ser usada como preço de envelope
* Author: claudiosanches
* Author URI: http://claudiosmweb.com/
* Version: 1.0
* License: GPLv2 or later
*/
<?php
/**
* Plugin Name: WooCommerce Correios - Envelope
* Plugin URI: http://claudiosmweb.com/
* Description: Este plugin ajuda a usar uma taxa fixa para ser usada como preço de envelope
* Author: claudiosanches
* Author URI: http://claudiosmweb.com/
* Version: 1.0
* License: GPLv2 or later
*/
<?php
/*
* Plugin Name: wpMandrill MS
* Plugin URI: trepmal.com
* Description: Network-wide settings for wpMandrill.
* Version: 2013.04.01
* Author: Kailey Lampert
* Author URI: kaileylampert.com
* License: GPLv2 or later
* TextDomain: wpmandrill-ms
@espellcaste
espellcaste / functions.php
Last active December 19, 2015 09:09 — forked from claudiosanches/functions.php
WooCommerce - Não permitir usuário comprar o mesmo produto mais de uma vez.
<?php
function cs_woocommere_buy_once() {
global $woocommerce;
if ( is_checkout() ) {
if ( ! is_user_logged_in() ) {
$woocommerce->add_error(
sprintf(
__( 'Desculpe, mas você deve estar logado para finalizar esta compra. <a href="%s">Fazer login &rarr;</a>', 'woocommerce'),
get_permalink( woocommerce_get_page_id( 'myaccount' ) )
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }