Skip to content

Instantly share code, notes, and snippets.

View eliasfaical's full-sized avatar
🏠
Working from home

Elias Faiçal eliasfaical

🏠
Working from home
View GitHub Profile
@eliasfaical
eliasfaical / ajax-load.js
Last active August 29, 2015 13:56
Carregando conteúdo com ajax no wordpress
window.onload = function() {
$.ajaxSetup({ cache: false });
$(".galery").on('click', function(event) {
event.preventDefault();
var post_id = $(this).attr("rel");
$("#lightbox").fadeIn("fast");
// class dos links que vão receber o click
$(".link-menu").on("click", function(event){
// a animação vai ocorrer no html, body
$('html, body').animate({
// pega o atributo href do this (link que recebeu o click)
// e faz a animação com velocidade 1000 para o destino do href;
scrollTop: $($(this).attr("href")).offset().top
@eliasfaical
eliasfaical / preferencia.sublime
Created February 12, 2014 18:44
Preferences.sublime-settings
{
"bold_folder_labels" : true,
"caret_style" : "phase",
"color_scheme" : "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"fade_fold_buttons" : false,
"find_selected_text" : true,
"font_size" : 13,
"highlight_line" : true,
"highlight_modified_tabs": true,
"ignored_packages":
@eliasfaical
eliasfaical / estados_cidades.json
Created February 14, 2014 19:24
Popular combo JSON
[{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
"Capixaba",
"Cruzeiro do Sul",
@eliasfaical
eliasfaical / form.php
Created March 17, 2014 16:16
wp-mail-smtp
<?php if ( $_SERVER['REQUEST_METHOD'] == "POST" ){
send_contact_form(); # envia o form
} else {
?>
<form action="" method="post" id="form-contato" class="form">
<div class="col-md-4">
<div class="input-group"><input type="text" name="nome" class="form-control" placeholder="Nome"></div>
<div class="input-group"><input type="text" name="email" class="form-control" placeholder="E-mail"></div>
<div class="input-group"><input type="text" name="telefone" class="form-control" placeholder="Telefone" id="telefone" maxlength="15"></div>
<div class="input-group"><input type="text" name="cpf_cnpj" class="form-control" placeholder="CPF ou CNPJ"></div>
/* Simulador */
#wc-correios-simulator {
}
/* Título do simulador */
#wc-correios-simulator strong {
}
@eliasfaical
eliasfaical / grid.less
Last active August 29, 2015 14:04
Grid - Urucum Digital
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* CLEAR */
.clearfix() {
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Facebook -->
<a href="http://www.facebook.com/sharer.php?u=http://www.simplesharebuttons.com" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/facebook.png" alt="Facebook" /></a>
<!-- Twitter -->
<a href="http://twitter.com/share?url=http://www.simplesharebuttons.com&text=Simple Share Buttons&hashtags=simplesharebuttons" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/twitter.png" alt="Twitter" /></a>
<!-- Google+ -->
<?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(
<?php
$loop = new WP_Query(
array(
'post_type' => 'evento',
'ignore_sticky_posts' => 1,
'posts_per_page' => 2,
'paged' => $paged
)
);