#A BADASS list for faster Web Development!
Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!
Frameworks | Weapons | Checklist | Docs | Community | Learning | For The Win
/* Novo formato da galeria de imagens */ | |
remove_shortcode('gallery'); | |
add_shortcode('gallery','nova_galeria'); | |
function nova_galeria($atts, $content = null) { | |
extract(shortcode_atts(array( | |
'small_image' => 'thumbnail', | |
'large_image' => 'large', | |
'captions' => 'figcaption', | |
'link' => '', |
#--------------------------# | |
# Global Files Types # | |
#--------------------------# | |
.modgit/ | |
.svn* | |
*.bkp | |
*.old | |
js_bkp/ | |
js.old/ | |
sitemap.xml |
// 0. Carrega os scripts no wp_head() | |
function carrega_scripts() { | |
if(is_home() || !is_admin()) { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', get_bloginfo('template_url') . '/scripts/jquery.js' , false, '1.6.2', true); | |
wp_enqueue_script('functions', get_bloginfo('template_url') . '/scripts/functions.js', array('jquery'), '1.0', true); | |
} | |
if(is_single() || is_page()) { | |
wp_deregister_script('jquery'); |
// Adicionar codigo abaixo dentro do functions do template em uso | |
// Contagem de caracteres do excerpt | |
function excerpt_count_js(){ | |
echo ' <script> | |
jQuery(function($) { | |
$("#postexcerpt textarea").after("<div style=\"float: rigth;margin: 10px;;color:#666;\"><small>Quantidade de caracteres: </small><input type=\"text\" value=\"0\" maxlength=\"3\" size=\"3\" id=\"excerpt_counter\" readonly=\"\" style=\"background:#fff;\">.</div>"); | |
$("#excerpt_counter").val($("#excerpt").val().length); | |
$("#excerpt").keyup( function() { | |
$("#excerpt_counter").val($("#excerpt").val().length); | |
}); |
// img unautop, Courtesy of Interconnectit http://interconnectit.com/2175/how-to-remove-p-tags-from-images-in-wordpress/ | |
// add img class and alignment to figure by @_RickBenetti | |
function img_unautop($pee) { | |
$class = apply_filters('get_image_tag_class', $class, $id, $align, $size); | |
$pee = preg_replace('/<p>\\s*?(<a .*?><img.*?><\\/a>|<img.*?>)?\\s*<\\/p>/s', '<figure class="'. $class+$align .'">$1</figure>', $pee); | |
return $pee; | |
} | |
add_filter( 'the_content', 'img_unautop', 30 ); |
#A BADASS list for faster Web Development!
Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!
Frameworks | Weapons | Checklist | Docs | Community | Learning | For The Win
Atualizado em: 11/07/2012
Entre nós [nome da empresa] e você [nome do cliente]
Nós faremos o melhor para satisfazer suas necessidades e atender suas expectativas, mas é importante registrar tudo por escrito para que todos conheçam suas responsabilidades (quem faz o quê) e saibam o que acontece quando algo dá errado. Neste contrato você não encontrará termos jurídicos complicados ou textos longos e incompreensíveis. Nós não temos interesse em fazê-lo assinar algo que poderá se arrepender depois. O que nós queremos é o melhor para os dois lados, agora e no futuro.
############################################ | |
## Fonts Support - for Apache Server ## | |
############################################ | |
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$"> | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "*" | |
</IfModule> | |
</FilesMatch> | |
# webfont mime types |
for file in `find . -name "*.xml"`; do xmllint --noout $file; done | |
fará uma busca por todos os arquivos xml recursivamente e mostrará se houver algum com erro de sintaxe, tags nao fechadas, etc |