This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.2', '>=' ) ) { | |
} else { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function custom_woocommerce_paypal_ap_payment_args( $args ) { | |
$args['feesPayer'] = 'SENDER'; | |
return $args; | |
} | |
add_filter( 'woocommerce_paypal_ap_payment_args', 'custom_woocommerce_paypal_ap_payment_args' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_woocommerce_default_address_fields( $fields ) { | |
if ( isset( $fields['state']['placeholder'] ) ) { | |
unset( $fields['state']['placeholder'] ); | |
} | |
return $fields; | |
} | |
add_filter( 'woocommerce_default_address_fields', 'custom_woocommerce_default_address_fields' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wc_mercadopago_exclude_ticket( $args ) { | |
$args['payment_methods'] = array( array( 'excluded_payment_types' => array( 'id' => 'ticket' ) ) ); | |
return $args; | |
} | |
add_filter( 'woocommerce_mercadopago_args', 'wc_mercadopago_exclude_ticket' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www | |
<Directory /var/www/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The libxml entity loader is disabled by default | |
// even setting the libxml_disable_entity_loader to false doesn't works! | |
// | |
// @see http://uk3.php.net/manual/en/function.libxml-disable-entity-loader.php | |
// @see http://stackoverflow.com/a/10213239 | |
$dir = __DIR__; | |
$content = 'This is a remote content!'; | |
file_put_contents('content.txt', $content); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Coloque isso no functions.php | |
if ( !function_exists('my_new_gravatar') ) { | |
function cs_new_gravatar( $avatar_defaults ) { | |
// Suba a imagem para a pasta images do tema | |
$myavatar = get_bloginfo('template_directory').'/images/SUAIMAGEM.jpg'; | |
// Inseria o nome do gravar que vai aparecer em Configurações > Discussão | |
$avatar_defaults[$myavatar] = 'NOME DO GRAVATAR'; | |
return $avatar_defaults;} | |
add_filter( 'avatar_defaults', 'cs_new_gravatar' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
// Placeholder para browsers antigos | |
// Importante usar o placeholder="" corretamente para o script rodar | |
$('input[placeholder]').each(function(){ | |
var ph = $(this).attr('placeholder'); | |
$(this).val(ph).focus(function(){ | |
if($(this).val() == ph) $(this).val(''); | |
}).blur(function(){ | |
if(!$(this).val()) $(this).val(ph); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Text elements */ | |
p {margin-bottom:1.625em;} | |
ul, ol {margin:0 0 1.625em 2.5em;} | |
ul {list-style:circle;} | |
ol {list-style-type:decimal;} | |
ol ol {list-style:upper-alpha;} | |
ol ol ol {list-style:lower-roman;} | |
ol ol ol ol {list-style:lower-alpha;} | |
ul ul, ol ol, ul ol, ol ul {margin-bottom:0;} | |
dl {margin:0 1.625em;} |