nk-o / brand-svg-please

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Brand SVG Please

Work with brand SVG icons in WordPress themes and plugins.

Examples

Get brand SVG string

$icon = Brand_SVG_Please::get( 'facebook' );

Get brand name string

$name = Brand_SVG_Please::get_name( 'facebook' );
// returns 'Facebook'

Check if brand exists

if ( Brand_SVG_Please::exists( 'facebook' ) ) {
    ...
}

Print brand SVG icon

Auto:

Brand_SVG_Please::get_e( 'facebook' );

Manual:

if ( Brand_SVG_Please::exists( 'facebook' ) ) {
    $icon = Brand_SVG_Please::get( 'facebook' );
    echo wp_kses( $icon, Brand_SVG_Please::kses() );
}

Get all available brands

$brands = Brand_SVG_Please::get_all_brands();

Thanks

Thanks to FontAwesome team for the great SVG icons https://github.com/FortAwesome/Font-Awesome/tree/master/svgs/brands

About


Languages

Language:PHP 100.0%