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
// remove unncessary header info | |
function frq_remove_header_info() { | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'start_post_rel_link'); | |
remove_action('wp_head', 'index_rel_link'); | |
remove_action('wp_head', 'adjacent_posts_rel_link'); | |
} | |
add_action('init', 'frq_remove_header_info'); |
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
add_filter('oembed_result', 'custom_oembed_result', 10, 3); | |
function custom_oembed_result($html, $url, $args) { | |
if ($args) { | |
$newargs = $args; | |
$parameters = http_build_query($newargs); | |
$html = preg_replace('/(player.vimeo.com\/video\/[0-9]*)/i', '$1?' . $parameters, $html); | |
} | |
return $html; | |
} |
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
.video{ | |
width: 100%; | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; | |
height: 0; | |
overflow: hidden; | |
margin-bottom: 15px; | |
} |
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
// ================ | |
// G R A D I E N T | |
// M I X I N | |
// ================ | |
// from http://codepen.io/Hornebom/pen/epqmGx/ | |
// Built upon the logic found in a ps file | |
// element has a solid background | |
// background is covered by a gradient of one color | |
// one can define the opacity of the two color stops + the gradient angle |
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
// Hierarchaly ordered array of terms | |
function sort_terms_hierarchicaly( Array &$cats, Array &$into, $parentId = 0 ) { | |
foreach ( $cats as $i => $cat ) { | |
if ( $cat->parent == $parentId ) { | |
$into[$cat->term_id] = $cat; | |
unset( $cats[$i] ); | |
} | |
} | |
foreach ( $into as $topCat ) { |
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
jQuery.validator.addMethod("cnpj", function(cnpj, element) { | |
var numeros, digitos, soma, resultado, pos, tamanho, | |
digitos_iguais = true; | |
if (cnpj.length < 14 && cnpj.length > 15) | |
return false; | |
for (var i = 0; i < cnpj.length - 1; i++) | |
if (cnpj.charAt(i) != cnpj.charAt(i + 1)) { |
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
<select name="uf" id="uf"> | |
<option value="">Selecione</option> | |
<option value="AC">AC</option> | |
<option value="AL">AL</option> | |
<option value="AM">AM</option> | |
<option value="AP">AP</option> | |
<option value="BA">BA</option> | |
<option value="CE">CE</option> | |
<option value="DF">DF</option> | |
<option value="ES">ES</option> |
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
Log level set to 287 | |
GNU LilyPond 2.18.2 | |
Relocation: from PATH=/home/tacensi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/tacensi/bin:/usr/lib/wine/bin:/sbin:/usr/sbin:/usr/local/bin:/home/tacensi/.composer/vendor/bin | |
argv0=lilypond | |
PATH=/usr/bin (prepend) | |
Setting PATH to /usr/bin:/home/tacensi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/tacensi/bin:/usr/lib/wine/bin:/sbin:/usr/sbin:/usr/local/bin:/home/tacensi/.composer/vendor/bin | |
Relocation: compile datadir=, new datadir=/usr/share/lilypond//2.18.2 | |
Relocation: framework_prefix=/usr/bin/.. | |
Setting INSTALLER_PREFIX to /usr/bin/.. | |
PATH=/usr/bin/../bin (prepend) |
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
// Alterando o texto da blank line do Contact form 7 | |
function my_wpcf7_form_elements($html) { | |
$text = 'Selecione o departamento'; | |
$html = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $html); | |
return $html; | |
} | |
add_filter('wpcf7_form_elements', 'my_wpcf7_form_elements'); |