This file contains hidden or 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
<?php | |
/* | |
Plugin Name: Nome do plugin | |
Plugin URI: Link para a página do plugin (preencha com o endereço do seu blog ou de onde você pegou o código) | |
Description: Uma breve descrição do que o plugin faz | |
Version: Versão do plugin, por exemplo 1.0 | |
Author: Nome do Autor do plugin | |
Author URI: Link do autor (Coloque o endereço do seu blog por exemplo) | |
*/ |
This file contains hidden or 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
<?php | |
/* | |
Plugin Name: Adicionar favicon no blog | |
Plugin URI: http://www.ferramentasblog.com/2010/02/como-trocar-favicon-blogger-wordpress.html | |
Description: Adiciona facilmente um favicon no Wordpress | |
Version: 1.0 | |
Author: Marcos Lemos, Claudio Sanches | |
Author URI: http://www.ferramentasblog.com/ | |
*/ |
This file contains hidden or 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
<?php | |
/* | |
Plugin Name: Galeria com paginação | |
Plugin URI: http://www.phil-barker.com/ | |
Description: Adds pages to the wordpress gallery | |
Version: 0.2 | |
Author: Claudio Sanches | |
Author URI: http://www.claudiosmweb.com/ | |
License: GPL2 |
This file contains hidden or 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
<?php | |
// Manipulate Child Pages to Use Parent Page Templates Automatically | |
function switch_page_template() { | |
global $post; | |
// Checks if current post type is a page, rather than a post | |
if (is_page()) { | |
$current_page_template = get_post_meta($post->ID, '_wp_page_template', true); | |
if (!$current_page_template) { |
This file contains hidden or 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
<?php if (is_home() || is_front_page()): ?> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('.content').hide(); | |
}); | |
</script> | |
<?php endif; ?> |
This file contains hidden or 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
<?php | |
$current_user = wp_get_current_user(); | |
if (isset($current_user->caps['administrator'])) { | |
echo 'Olá administrador'; | |
} | |
if (isset($current_user->caps['editor'])) { | |
echo 'Olá editor'; | |
} |
This file contains hidden or 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
<?php | |
/** | |
* Verifica o papel do usuário. | |
* | |
* Exempo de uso: | |
* if (is_current_user('administrator')) { | |
* echo 'Olá administrador'; | |
* } | |
* | |
* @param string $user |
This file contains hidden or 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
<?php | |
$author = get_the_author_meta('ID'); | |
if ($author == 1) { | |
echo 'faça isso'; | |
} | |
?> |
This file contains hidden or 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
<?php | |
/** | |
* Automatically sets the post thumbnail. | |
* | |
* @global array $post WP post object. | |
*/ | |
function odin_autoset_featured() { | |
global $post; | |
if ( isset( $post->ID ) ) { |
This file contains hidden or 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
Show hidden characters
{ | |
"cmd": ["grunt", "default", "--no-color"], | |
"working_dir": "${project_path:${folder}}/src" | |
} |