Skip to content

Instantly share code, notes, and snippets.

View RafaelFunchal's full-sized avatar

Rafael Funchal RafaelFunchal

View GitHub Profile
@jgarber
jgarber / MIT-LICENSE.txt
Created April 4, 2012 14:57
Responsive video
Copyright (c) 2011 ZURB, http://www.zurb.com/
@claudiosanches
claudiosanches / bom-finder.php
Created December 28, 2012 21:56
BOM Finder
<?php
// Tell me the root folder path.
// You can also try this one
// $HOME = $_SERVER["DOCUMENT_ROOT"];
// Or this
// dirname(__FILE__)
$HOME = dirname( __FILE__ );
// Is this a Windows host ? If it is, change this line to $WIN = 1;
$WIN = 0;
@claudiosanches
claudiosanches / category-image-field.php
Last active November 18, 2017 19:23
Adds image field in category description.
<?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
*/
@fdaciuk
fdaciuk / send_mail_post_pending.php
Last active May 12, 2020 23:43
Envia um e-mail para o administrador do site/blog se houver algum post para revisão. PS.: Configurar a conta que receberá o e-mail na variável $email. Por padrão, está configurado o e-mail do administrador do blog.
<?php
/*
Enviar e-mail para o administrador se houver posts para revisão
Dicas do @GugaAlves (@tudoparawp):
- Adicionar link para enviar e-mail diretamente para o administrador;
- Incluir link para a edição do post no admin, facilitando a vida do admin que receber este email.
Dicas do Gustavo Bordoni (@webord):
- incluir na função o $post (objeto para WP_Query) para não ficar passando o $post_id a cada save;
@claudiosanches
claudiosanches / adsense-by-author.php
Last active December 14, 2015 13:49
Adsense by author with middle content.
<?php
/**
* Plugin Name: Adsense by Author
* Plugin URI: http://claudiosmweb.com/
* Description: Adsense by Author.
* Author: claudiosanches
* Author URI: http://claudiosmweb.com/
* Version: 1.1
* License: GPLv2 or later
* Text Domain: adbyauthor
@jasonsanjose
jasonsanjose / README.md
Last active February 16, 2017 08:11
brackets-shell linux debian/ubuntu setup

Choose a directory to download both brackets-shell and brackets git respositories. The following script will setup the repositories and download required dependencies.

wget https://gist.github.com/jasonsanjose/5514813/raw/6215f3b73ff41f51e20bc94a9faa3e453402ce06/setup.sh; chmod +x setup.sh; bash setup.sh; rm setup.sh
@vitorbritto
vitorbritto / responsive-test.md
Last active December 20, 2015 17:39
Teste para projetos responsivos - Método para capturar telas utilizando o PhantomJS.

Teste para projetos responsivos

Problema

Testar/verificar a disposição dos elementos de uma determinada página em determinadas resoluções de tela.

Solução

Executar captura de telas de acordo com os viewports definidos em um script, com a ajuda do PhantomJS.

Necessário ter o NodeJS instalado.

@fdaciuk
fdaciuk / Adicionar novo campo (custom field) a uma taxonomia (categoria, tag, etc) no WordPress.md
Last active June 21, 2024 16:20
Adicionar novo campo (custom field) a uma taxonomia no WordPress (Incluir esse código no functions.php)Nas action_hooks, no lugar de "category" é só incluir o slug da sua taxonomia :)

Adicionar novo campo (custom field) a uma taxonomia (categoria, tag, etc) no WordPress

Incluir esse código no functions.php.

Nas action_hooks, no lugar de "category" é só incluir o slug da sua taxonomia :)

IMPORTANT
Please duplicate this radar for a Safari fix!
This will clean up a 50-line workaround.
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072)
//////////////////////////////////////////////////////////////////////////////
(Now available as a standalone repo.)
@guwordpressbrasil
guwordpressbrasil / bbt.php
Created October 16, 2013 19:01
Plugin para mudar o tema de acordo com o Browser, usado para temas mobile
<?php
/*
Plugin Name: Browser-Based Themes
Plugin URI: http://code.kuederle.com/browserbasedthemes
Description: This plugin will serve a different theme to specific browsers.
Author: Oliver Kuederle
Author URI: http://www.kuederle.com/
Version: 1.0
*/