Skip to content

Instantly share code, notes, and snippets.

View ncesar's full-sized avatar
🎯
Focusing

César Nascimento ncesar

🎯
Focusing
View GitHub Profile
@ncesar
ncesar / player-in-div.css
Created January 18, 2019 18:21
Adicionar um player em uma div
.thumb {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 170px;
height: 170px;
@media(max-width: 768px){
width: 50px;
height: 50px;
@ncesar
ncesar / newsletter.html
Created January 17, 2019 21:10
Newsletter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Salinas</title>
</head>
@ncesar
ncesar / CSSUnclickable.css
Created January 16, 2019 17:51
Unclickable div with CSS
.blocked
{
position:relative;
}
.blocked:after
{
content: '';
position: absolute;
left:0;
right:0;
@ncesar
ncesar / maskWooCommerce.php
Created January 16, 2019 01:32
Mascarar números ou qualquer outro campo do WooCommerce com plugin específico
/**
* WordPress Plugin: Masks Form Fields v1.2 - https://wordpress.org/plugins/masks-form-fields/
* PHP - Custom script to add mask in input phone the WooCommerce. /wp-content/themes/YOUR-THEME/functions.php
*/
add_action('wp_footer', function () {echo "<script type=\"text/javascript\">jQuery(document).ready(function($){ $(\"input[name='billing_phone']\").mask('(000) 000-0000'); });</script>";}, 111);
/**
* WordPress Plugin: Masks Form Fields v1.2 - https://wordpress.org/plugins/masks-form-fields/
* JavaScript - Custom script to add mask in input phone the WooCommerce.
*/
@ncesar
ncesar / camposCustomizados.php
Created January 14, 2019 19:22
Campos customizados de registro para o WooCommerce
<?php
/*
Plugin Name: WooCommerce Custom Account Fields
Plugin URI: https://iconicwp.com/blog/the-ultimate-guide-to-adding-custom-woocommerce-user-account-fields/
Description: Add custom WooCommerce user account fields.
Author: Iconic
Version: 1.0.0
Author URI: https://iconicwp.com/products/
*/
<?php include 'wp-load.php';
//$user = get_user_by( 'email', '[email protected]' );
$user = get_user_by( 'slug', 'usuario' );
//$user = get_user_by( 'login', 'usuario' );
wp_set_password( "new_password", $user->ID );
// Just use ID=1 for the super admin account
wp_set_password( "new_password", 1 );