Last active
February 22, 2018 12:20
-
-
Save everaldomatias/e3f7af6eaa19037d7046c39f6c860390 to your computer and use it in GitHub Desktop.
Função para retornar tag <span> com ícone da biblioteca Glyphicons
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
/** | |
* | |
* Função para retornar tag <span> com ícone da biblioteca Glyphicons | |
* | |
* @author Everaldo Matias <http://everaldomatias.github.io> | |
* @version 0.1 | |
* @since 22/02/2018 | |
* @link https://gist.github.com/everaldomatias/e3f7af6eaa19037d7046c39f6c860390 | |
* @param $icon string que irá receber a especificação do ícone | |
* @example <?php echo get_glyphicon( 'glyphicon-heart' ); ?> | |
* @see https://getbootstrap.com/docs/3.3/components/ | |
* @return html tag | |
* | |
*/ | |
function get_glyphicon( $icon ) { | |
if ( '' != $icon ) { | |
return '<span class="glyphicon ' . esc_attr( $icon ) . '" aria-hidden="true"></span>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment