Created
May 4, 2013 22:46
-
-
Save fdaciuk/5519024 to your computer and use it in GitHub Desktop.
Funções para minimizar o caminho das pedras no WP :P (Na real, só pra não ficar chamando as funções gigantes do WP pra pegar o caminho dos arquivos)
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
<?php | |
/* | |
Use para chamar qualquer arquivo dentro do tema. | |
Ex: echo theme_url( 'assets/images/logo.png' ); | |
*/ | |
function theme_url( $path = null ) { | |
return get_template_directory_uri() . '/' . $path; | |
} | |
/* | |
Use para fazer includes no lugar de get_template_part(); | |
*/ | |
function inc( $slug, $name = null ) { | |
get_template_part( $slug, $name ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment