find /path/to/your/wordpress/install/ -type d -exec chmod 755 {} \;
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 | |
| // source: http://cubiq.org/the-perfect-php-clean-url-generator | |
| // author: Matteo Spinelli | |
| // MIT License / http://creativecommons.org/licenses/by-sa/3.0/ (please re-check at source) | |
| setlocale(LC_ALL, 'en_US.UTF8'); | |
| function toAscii($str, $replace=array(), $delimiter='-') { | |
| if( !empty($replace) ) { | |
| $str = str_replace((array)$replace, ' ', $str); | |
| } |
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
| function theme_autoset_featured_image($post_ID) { | |
| // Verifica se o arquivo enviado e uma imagem | |
| if (!wp_attachment_is_image($post_ID)) | |
| return; | |
| // Vamos pegar os dados do arquivo para | |
| // termos acesso à ID do post ao qual foi enviado | |
| $post = get_post($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
| git checkout master | |
| git branch | |
| echo '### PRODUÇÃO REPORT ###' | |
| git status | |
| echo '++++++++++++++++++++++' | |
| echo 'Deseja fazer o deploy [s/n]?' | |
| read deploy | |
| echo '++++++++++++++++++++++' |
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 | |
| function depois_the_content( $content ) { | |
| global $post; | |
| $content .= 'Isso vai aparecer depois do conteúdo'; | |
| return $content; | |
| } | |
| add_filter( 'the_content', 'depois_the_content' ); |
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 | |
| /** | |
| * Arquivo para criação de CPTs e Taxonomias | |
| * | |
| */ | |
| // CPT Labs | |
| $create_cpt->cpt( array( | |
| 'slug' => 'labs', | |
| 'name' => 'Labs', |
OlderNewer