Created
January 16, 2020 14:16
-
-
Save duoeg/c545d71eaf43b8b8fb57965670365453 to your computer and use it in GitHub Desktop.
List of Font Awesome icons for PHP
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
/** | |
* Returns a list of icons for the desired type. | |
* Supported values: "all" (default) | "brands" | "light" | "regular" | "solid" | "duotone" | |
* At the time of writing this function, current version is 5.12.0. | |
*/ | |
function font_awesome($type = "all") { | |
$fa = array(); | |
$brands = array( "fa-500px","fa-accessible-icon","fa-accusoft","fa-acquisitions-incorporated","fa-adn","fa-adobe","fa-adversal","fa-affiliatetheme","fa-airbnb","fa-algolia","fa-alipay","fa-amazon","fa-amazon-pay","fa-amilia","fa-android","fa-angellist","fa-angrycreative","fa-angular","fa-app-store","fa-app-store-ios","fa-apper","fa-apple","fa-apple-pay","fa-artstation","fa-asymmetrik","fa-atlassian","fa-audible","fa-autoprefixer","fa-avianex","fa-aviato","fa-aws","fa-bandcamp","fa-battle-net","fa-behance","fa-behance-square","fa-bimobject","fa-bitbucket","fa-bitcoin","fa-bity","fa-black-tie","fa-blackberry","fa-blogger","fa-blogger-b","fa-bluetooth","fa-bluetooth-b","fa-bootstrap","fa-btc","fa-buffer","fa-buromobelexperte","fa-buy-n-large","fa-buysellads","fa-canadian-maple-leaf","fa-cc-amazon-pay","fa-cc-amex","fa-cc-apple-pay","fa-cc-diners-club","fa-cc-discover","fa-cc-jcb","fa-cc-mastercard","fa-cc-paypal","fa-cc-stripe","fa-cc-visa","fa-centercode","fa-centos","fa-chrome","fa-chromecast","fa-cloudscale","fa-cloudsmith","fa-cloudversify","fa-codepen","fa-codiepie","fa-confluence","fa-connectdevelop","fa-contao","fa-cotton-bureau","fa-cpanel","fa-creative-commons","fa-creative-commons-by","fa-creative-commons-nc","fa-creative-commons-nc-eu","fa-creative-commons-nc-jp","fa-creative-commons-nd","fa-creative-commons-pd","fa-creative-commons-pd-alt","fa-creative-commons-remix","fa-creative-commons-sa","fa-creative-commons-sampling","fa-creative-commons-sampling-plus","fa-creative-commons-share","fa-creative-commons-zero","fa-critical-role","fa-css3","fa-css3-alt","fa-cuttlefish","fa-d-and-d","fa-d-and-d-beyond","fa-dashcube","fa-delicious","fa-deploydog","fa-deskpro","fa-dev","fa-deviantart","fa-dhl","fa-diaspora","fa-digg","fa-digital-ocean","fa-discord","fa-discourse","fa-dochub","fa-docker","fa-draft2digital","fa-dribbble","fa-dribbble-square","fa-dropbox","fa-drupal","fa-dyalog","fa-earlybirds","fa-ebay","fa-edge","fa-elementor","fa-ello","fa-ember","fa-empire","fa-envira","fa-erlang","fa-ethereum","fa-etsy","fa-evernote","fa-expeditedssl","fa-facebook","fa-facebook-f","fa-facebook-messenger","fa-facebook-square","fa-fantasy-flight-games","fa-fedex","fa-fedora","fa-figma","fa-firefox","fa-firefox-browser","fa-first-order","fa-first-order-alt","fa-firstdraft","fa-flickr","fa-flipboard","fa-fly","fa-font-awesome","fa-font-awesome-alt","fa-font-awesome-flag","fa-fonticons","fa-fonticons-fi","fa-fort-awesome","fa-fort-awesome-alt","fa-forumbee","fa-foursquare","fa-free-code-camp","fa-freebsd","fa-fulcrum","fa-galactic-republic","fa-galactic-senate","fa-get-pocket","fa-gg","fa-gg-circle","fa-git","fa-git-alt","fa-git-square","fa-github","fa-github-alt","fa-github-square","fa-gitkraken","fa-gitlab","fa-gitter","fa-glide","fa-glide-g","fa-gofore","fa-goodreads","fa-goodreads-g","fa-google","fa-google-drive","fa-google-play","fa-google-plus","fa-google-plus-g","fa-google-plus-square","fa-google-wallet","fa-gratipay","fa-grav","fa-gripfire","fa-grunt","fa-gulp","fa-hacker-news","fa-hacker-news-square","fa-hackerrank","fa-hips","fa-hire-a-helper","fa-hooli","fa-hornbill","fa-hotjar","fa-houzz","fa-html5","fa-hubspot","fa-ideal","fa-imdb","fa-instagram","fa-intercom","fa-internet-explorer","fa-invision","fa-ioxhost","fa-itch-io","fa-itunes","fa-itunes-note","fa-java","fa-jedi-order","fa-jenkins","fa-jira","fa-joget","fa-joomla","fa-js","fa-js-square","fa-jsfiddle","fa-kaggle","fa-keybase","fa-keycdn","fa-kickstarter","fa-kickstarter-k","fa-korvue","fa-laravel","fa-lastfm","fa-lastfm-square","fa-leanpub","fa-less","fa-line","fa-linkedin","fa-linkedin-in","fa-linode","fa-linux","fa-lyft","fa-magento","fa-mailchimp","fa-mandalorian","fa-markdown","fa-mastodon","fa-maxcdn","fa-mdb","fa-medapps","fa-medium","fa-medium-m","fa-medrt","fa-meetup","fa-megaport","fa-mendeley","fa-microblog","fa-microsoft","fa-mix","fa-mixcloud","fa-mizuni","fa-modx","fa-monero","fa-napster","fa-neos","fa-nimblr","fa-node","fa-node-js","fa-npm","fa-ns8","fa-nutritionix","fa-odnoklassniki","fa-odnoklassniki-square","fa-old-republic","fa-opencart","fa-openid","fa-opera","fa-optin-monster","fa-orcid","fa-osi","fa-page4","fa-pagelines","fa-palfed","fa-patreon","fa-paypal","fa-penny-arcade","fa-periscope","fa-phabricator","fa-phoenix-framework","fa-phoenix-squadron","fa-php","fa-pied-piper","fa-pied-piper-alt","fa-pied-piper-hat","fa-pied-piper-pp","fa-pied-piper-square","fa-pinterest","fa-pinterest-p","fa-pinterest-square","fa-playstation","fa-product-hunt","fa-pushed","fa-python","fa-qq","fa-quinscape","fa-quora","fa-r-project","fa-raspberry-pi","fa-ravelry","fa-react","fa-reacteurope","fa-readme","fa-rebel","fa-red-river","fa-reddit","fa-reddit-alien","fa-reddit-square","fa-redhat","fa-renren","fa-replyd","fa-researchgate","fa-resolving","fa-rev","fa-rocketchat","fa-rockrms","fa-safari","fa-salesforce","fa-sass","fa-schlix","fa-scribd","fa-searchengin","fa-sellcast","fa-sellsy","fa-servicestack","fa-shirtsinbulk","fa-shopware","fa-simplybuilt","fa-sistrix","fa-sith","fa-sketch","fa-skyatlas","fa-skype","fa-slack","fa-slack-hash","fa-slideshare","fa-snapchat","fa-snapchat-ghost","fa-snapchat-square","fa-soundcloud","fa-sourcetree","fa-speakap","fa-speaker-deck","fa-spotify","fa-squarespace","fa-stack-exchange","fa-stack-overflow","fa-stackpath","fa-staylinked","fa-steam","fa-steam-square","fa-steam-symbol","fa-sticker-mule","fa-strava","fa-stripe","fa-stripe-s","fa-studiovinari","fa-stumbleupon","fa-stumbleupon-circle","fa-superpowers","fa-supple","fa-suse","fa-swift","fa-symfony","fa-teamspeak","fa-telegram","fa-telegram-plane","fa-tencent-weibo","fa-the-red-yeti","fa-themeco","fa-themeisle","fa-think-peaks","fa-trade-federation","fa-trello","fa-tripadvisor","fa-tumblr","fa-tumblr-square","fa-twitch","fa-twitter","fa-twitter-square","fa-typo3","fa-uber","fa-ubuntu","fa-uikit","fa-umbraco","fa-uniregistry","fa-unity","fa-untappd","fa-ups","fa-usb","fa-usps","fa-ussunnah","fa-vaadin","fa-viacoin","fa-viadeo","fa-viadeo-square","fa-viber","fa-vimeo","fa-vimeo-square","fa-vimeo-v","fa-vine","fa-vk","fa-vnv","fa-vuejs","fa-waze","fa-weebly","fa-weibo","fa-weixin","fa-whatsapp","fa-whatsapp-square","fa-whmcs","fa-wikipedia-w","fa-windows","fa-wix","fa-wizards-of-the-coast","fa-wolf-pack-battalion","fa-wordpress","fa-wordpress-simple","fa-wpbeginner","fa-wpexplorer","fa-wpforms","fa-wpressr","fa-xbox","fa-xing","fa-xing-square","fa-y-combinator","fa-yahoo","fa-yammer","fa-yandex","fa-yandex-international","fa-yarn","fa-yelp","fa-yoast","fa-youtube","fa-youtube-square","fa-zhihu" ); | |
$duotones = array( "fa-abacus","fa-acorn","fa-ad","fa-address-book","fa-address-card","fa-adjust","fa-air-conditioner","fa-air-freshener","fa-alarm-clock","fa-alarm-exclamation","fa-alarm-plus","fa-alarm-snooze","fa-album","fa-album-collection","fa-alicorn","fa-alien","fa-alien-monster","fa-align-center","fa-align-justify","fa-align-left","fa-align-right","fa-align-slash","fa-allergies","fa-ambulance","fa-american-sign-language-interpreting","fa-amp-guitar","fa-analytics","fa-anchor","fa-angel","fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up","fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-angry","fa-ankh","fa-apple-alt","fa-apple-crate","fa-archive","fa-archway","fa-arrow-alt-circle-down","fa-arrow-alt-circle-left","fa-arrow-alt-circle-right","fa-arrow-alt-circle-up","fa-arrow-alt-down","fa-arrow-alt-from-bottom","fa-arrow-alt-from-left","fa-arrow-alt-from-right","fa-arrow-alt-from-top","fa-arrow-alt-left","fa-arrow-alt-right","fa-arrow-alt-square-down","fa-arrow-alt-square-left","fa-arrow-alt-square-right","fa-arrow-alt-square-up","fa-arrow-alt-to-bottom","fa-arrow-alt-to-left","fa-arrow-alt-to-right","fa-arrow-alt-to-top","fa-arrow-alt-up","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-from-bottom","fa-arrow-from-left","fa-arrow-from-right","fa-arrow-from-top","fa-arrow-left","fa-arrow-right","fa-arrow-square-down","fa-arrow-square-left","fa-arrow-square-right","fa-arrow-square-up","fa-arrow-to-bottom","fa-arrow-to-left","fa-arrow-to-right","fa-arrow-to-top","fa-arrow-up","fa-arrows","fa-arrows-alt","fa-arrows-alt-h","fa-arrows-alt-v","fa-arrows-h","fa-arrows-v","fa-assistive-listening-systems","fa-asterisk","fa-at","fa-atlas","fa-atom","fa-atom-alt","fa-audio-description","fa-award","fa-axe","fa-axe-battle","fa-baby","fa-baby-carriage","fa-backpack","fa-backspace","fa-backward","fa-bacon","fa-badge","fa-badge-check","fa-badge-dollar","fa-badge-percent","fa-badge-sheriff","fa-badger-honey","fa-bags-shopping","fa-bahai","fa-balance-scale","fa-balance-scale-left","fa-balance-scale-right","fa-ball-pile","fa-ballot","fa-ballot-check","fa-ban","fa-band-aid","fa-banjo","fa-barcode","fa-barcode-alt","fa-barcode-read","fa-barcode-scan","fa-bars","fa-baseball","fa-baseball-ball","fa-basketball-ball","fa-basketball-hoop","fa-bat","fa-bath","fa-battery-bolt","fa-battery-empty","fa-battery-full","fa-battery-half","fa-battery-quarter","fa-battery-slash","fa-battery-three-quarters","fa-bed","fa-bed-alt","fa-bed-bunk","fa-bed-empty","fa-beer","fa-bell","fa-bell-exclamation","fa-bell-on","fa-bell-plus","fa-bell-school","fa-bell-school-slash","fa-bell-slash","fa-bells","fa-betamax","fa-bezier-curve","fa-bible","fa-bicycle","fa-biking","fa-biking-mountain","fa-binoculars","fa-biohazard","fa-birthday-cake","fa-blanket","fa-blender","fa-blender-phone","fa-blind","fa-blinds","fa-blinds-open","fa-blinds-raised","fa-blog","fa-bold","fa-bolt","fa-bomb","fa-bone","fa-bone-break","fa-bong","fa-book","fa-book-alt","fa-book-dead","fa-book-heart","fa-book-medical","fa-book-open","fa-book-reader","fa-book-spells","fa-book-user","fa-bookmark","fa-books","fa-books-medical","fa-boombox","fa-boot","fa-booth-curtain","fa-border-all","fa-border-bottom","fa-border-center-h","fa-border-center-v","fa-border-inner","fa-border-left","fa-border-none","fa-border-outer","fa-border-right","fa-border-style","fa-border-style-alt","fa-border-top","fa-bow-arrow","fa-bowling-ball","fa-bowling-pins","fa-box","fa-box-alt","fa-box-ballot","fa-box-check","fa-box-fragile","fa-box-full","fa-box-heart","fa-box-open","fa-box-up","fa-box-usd","fa-boxes","fa-boxes-alt","fa-boxing-glove","fa-brackets","fa-brackets-curly","fa-braille","fa-brain","fa-bread-loaf","fa-bread-slice","fa-briefcase","fa-briefcase-medical","fa-bring-forward","fa-bring-front","fa-broadcast-tower","fa-broom","fa-browser","fa-brush","fa-bug","fa-building","fa-bullhorn","fa-bullseye","fa-bullseye-arrow","fa-bullseye-pointer","fa-burger-soda","fa-burn","fa-burrito","fa-bus","fa-bus-alt","fa-bus-school","fa-business-time","fa-cabinet-filing","fa-cactus","fa-calculator","fa-calculator-alt","fa-calendar","fa-calendar-alt","fa-calendar-check","fa-calendar-day","fa-calendar-edit","fa-calendar-exclamation","fa-calendar-minus","fa-calendar-plus","fa-calendar-star","fa-calendar-times","fa-calendar-week","fa-camcorder","fa-camera","fa-camera-alt","fa-camera-home","fa-camera-movie","fa-camera-polaroid","fa-camera-retro","fa-campfire","fa-campground","fa-candle-holder","fa-candy-cane","fa-candy-corn","fa-cannabis","fa-capsules","fa-car","fa-car-alt","fa-car-battery","fa-car-building","fa-car-bump","fa-car-bus","fa-car-crash","fa-car-garage","fa-car-mechanic","fa-car-side","fa-car-tilt","fa-car-wash","fa-caravan","fa-caravan-alt","fa-caret-circle-down","fa-caret-circle-left","fa-caret-circle-right","fa-caret-circle-up","fa-caret-down","fa-caret-left","fa-caret-right","fa-caret-square-down","fa-car" ); | |
$lights = array( "fa-abacus","fa-acorn","fa-ad","fa-address-book","fa-address-card","fa-adjust","fa-air-conditioner","fa-air-freshener","fa-alarm-clock","fa-alarm-exclamation","fa-alarm-plus","fa-alarm-snooze","fa-album","fa-album-collection","fa-alicorn","fa-alien","fa-alien-monster","fa-align-center","fa-align-justify","fa-align-left","fa-align-right","fa-align-slash","fa-allergies","fa-ambulance","fa-american-sign-language-interpreting","fa-amp-guitar","fa-analytics","fa-anchor","fa-angel","fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up","fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-angry","fa-ankh","fa-apple-alt","fa-apple-crate","fa-archive","fa-archway","fa-arrow-alt-circle-down","fa-arrow-alt-circle-left","fa-arrow-alt-circle-right","fa-arrow-alt-circle-up","fa-arrow-alt-down","fa-arrow-alt-from-bottom","fa-arrow-alt-from-left","fa-arrow-alt-from-right","fa-arrow-alt-from-top","fa-arrow-alt-left","fa-arrow-alt-right","fa-arrow-alt-square-down","fa-arrow-alt-square-left","fa-arrow-alt-square-right","fa-arrow-alt-square-up","fa-arrow-alt-to-bottom","fa-arrow-alt-to-left","fa-arrow-alt-to-right","fa-arrow-alt-to-top","fa-arrow-alt-up","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-from-bottom","fa-arrow-from-left","fa-arrow-from-right","fa-arrow-from-top","fa-arrow-left","fa-arrow-right","fa-arrow-square-down","fa-arrow-square-left","fa-arrow-square-right","fa-arrow-square-up","fa-arrow-to-bottom","fa-arrow-to-left","fa-arrow-to-right","fa-arrow-to-top","fa-arrow-up","fa-arrows","fa-arrows-alt","fa-arrows-alt-h","fa-arrows-alt-v","fa-arrows-h","fa-arrows-v","fa-assistive-listening-systems","fa-asterisk","fa-at","fa-atlas","fa-atom","fa-atom-alt","fa-audio-description","fa-award","fa-axe","fa-axe-battle","fa-baby","fa-baby-carriage","fa-backpack","fa-backspace","fa-backward","fa-bacon","fa-badge","fa-badge-check","fa-badge-dollar","fa-badge-percent","fa-badge-sheriff","fa-badger-honey","fa-bags-shopping","fa-bahai","fa-balance-scale","fa-balance-scale-left","fa-balance-scale-right","fa-ball-pile","fa-ballot","fa-ballot-check","fa-ban","fa-band-aid","fa-banjo","fa-barcode","fa-barcode-alt","fa-barcode-read","fa-barcode-scan","fa-bars","fa-baseball","fa-baseball-ball","fa-basketball-ball","fa-basketball-hoop","fa-bat","fa-bath","fa-battery-bolt","fa-battery-empty","fa-battery-full","fa-battery-half","fa-battery-quarter","fa-battery-slash","fa-battery-three-quarters","fa-bed","fa-bed-alt","fa-bed-bunk","fa-bed-empty","fa-beer","fa-bell","fa-bell-exclamation","fa-bell-on","fa-bell-plus","fa-bell-school","fa-bell-school-slash","fa-bell-slash","fa-bells","fa-betamax","fa-bezier-curve","fa-bible","fa-bicycle","fa-biking","fa-biking-mountain","fa-binoculars","fa-biohazard","fa-birthday-cake","fa-blanket","fa-blender","fa-blender-phone","fa-blind","fa-blinds","fa-blinds-open","fa-blinds-raised","fa-blog","fa-bold","fa-bolt","fa-bomb","fa-bone","fa-bone-break","fa-bong","fa-book","fa-book-alt","fa-book-dead","fa-book-heart","fa-book-medical","fa-book-open","fa-book-reader","fa-book-spells","fa-book-user","fa-bookmark","fa-books","fa-books-medical","fa-boombox","fa-boot","fa-booth-curtain","fa-border-all","fa-border-bottom","fa-border-center-h","fa-border-center-v","fa-border-inner","fa-border-left","fa-border-none","fa-border-outer","fa-border-right","fa-border-style","fa-border-style-alt","fa-border-top","fa-bow-arrow","fa-bowling-ball","fa-bowling-pins","fa-box","fa-box-alt","fa-box-ballot","fa-box-check","fa-box-fragile","fa-box-full","fa-box-heart","fa-box-open","fa-box-up","fa-box-usd","fa-boxes","fa-boxes-alt","fa-boxing-glove","fa-brackets","fa-brackets-curly","fa-braille","fa-brain","fa-bread-loaf","fa-bread-slice","fa-briefcase","fa-briefcase-medical","fa-bring-forward","fa-bring-front","fa-broadcast-tower","fa-broom","fa-browser","fa-brush","fa-bug","fa-building","fa-bullhorn","fa-bullseye","fa-bullseye-arrow","fa-bullseye-pointer","fa-burger-soda","fa-burn","fa-burrito","fa-bus","fa-bus-alt","fa-bus-school","fa-business-time","fa-cabinet-filing","fa-cactus","fa-calculator","fa-calculator-alt","fa-calendar","fa-calendar-alt","fa-calendar-check","fa-calendar-day","fa-calendar-edit","fa-calendar-exclamation","fa-calendar-minus","fa-calendar-plus","fa-calendar-star","fa-calendar-times","fa-calendar-week","fa-camcorder","fa-camera","fa-camera-alt","fa-camera-home","fa-camera-movie","fa-camera-polaroid","fa-camera-retro","fa-campfire","fa-campground","fa-candle-holder","fa-candy-cane","fa-candy-corn","fa-cannabis","fa-capsules","fa-car","fa-car-alt","fa-car-battery","fa-car-building","fa-car-bump","fa-car-bus","fa-car-crash","fa-car-garage","fa-car-mechanic","fa-car-side","fa-car-tilt","fa-car-wash","fa-caravan","fa-caravan-alt","fa-caret-circle-down","fa-caret-circle-left","fa-caret-circle-right","fa-caret-circle-up","fa-caret-down","fa-caret-left","fa-caret-right","fa-caret-square-down","fa-car" ); | |
$regulars = array( "fa-abacus","fa-acorn","fa-ad","fa-address-book","fa-address-card","fa-adjust","fa-air-conditioner","fa-air-freshener","fa-alarm-clock","fa-alarm-exclamation","fa-alarm-plus","fa-alarm-snooze","fa-album","fa-album-collection","fa-alicorn","fa-alien","fa-alien-monster","fa-align-center","fa-align-justify","fa-align-left","fa-align-right","fa-align-slash","fa-allergies","fa-ambulance","fa-american-sign-language-interpreting","fa-amp-guitar","fa-analytics","fa-anchor","fa-angel","fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up","fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-angry","fa-ankh","fa-apple-alt","fa-apple-crate","fa-archive","fa-archway","fa-arrow-alt-circle-down","fa-arrow-alt-circle-left","fa-arrow-alt-circle-right","fa-arrow-alt-circle-up","fa-arrow-alt-down","fa-arrow-alt-from-bottom","fa-arrow-alt-from-left","fa-arrow-alt-from-right","fa-arrow-alt-from-top","fa-arrow-alt-left","fa-arrow-alt-right","fa-arrow-alt-square-down","fa-arrow-alt-square-left","fa-arrow-alt-square-right","fa-arrow-alt-square-up","fa-arrow-alt-to-bottom","fa-arrow-alt-to-left","fa-arrow-alt-to-right","fa-arrow-alt-to-top","fa-arrow-alt-up","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-from-bottom","fa-arrow-from-left","fa-arrow-from-right","fa-arrow-from-top","fa-arrow-left","fa-arrow-right","fa-arrow-square-down","fa-arrow-square-left","fa-arrow-square-right","fa-arrow-square-up","fa-arrow-to-bottom","fa-arrow-to-left","fa-arrow-to-right","fa-arrow-to-top","fa-arrow-up","fa-arrows","fa-arrows-alt","fa-arrows-alt-h","fa-arrows-alt-v","fa-arrows-h","fa-arrows-v","fa-assistive-listening-systems","fa-asterisk","fa-at","fa-atlas","fa-atom","fa-atom-alt","fa-audio-description","fa-award","fa-axe","fa-axe-battle","fa-baby","fa-baby-carriage","fa-backpack","fa-backspace","fa-backward","fa-bacon","fa-badge","fa-badge-check","fa-badge-dollar","fa-badge-percent","fa-badge-sheriff","fa-badger-honey","fa-bags-shopping","fa-bahai","fa-balance-scale","fa-balance-scale-left","fa-balance-scale-right","fa-ball-pile","fa-ballot","fa-ballot-check","fa-ban","fa-band-aid","fa-banjo","fa-barcode","fa-barcode-alt","fa-barcode-read","fa-barcode-scan","fa-bars","fa-baseball","fa-baseball-ball","fa-basketball-ball","fa-basketball-hoop","fa-bat","fa-bath","fa-battery-bolt","fa-battery-empty","fa-battery-full","fa-battery-half","fa-battery-quarter","fa-battery-slash","fa-battery-three-quarters","fa-bed","fa-bed-alt","fa-bed-bunk","fa-bed-empty","fa-beer","fa-bell","fa-bell-exclamation","fa-bell-on","fa-bell-plus","fa-bell-school","fa-bell-school-slash","fa-bell-slash","fa-bells","fa-betamax","fa-bezier-curve","fa-bible","fa-bicycle","fa-biking","fa-biking-mountain","fa-binoculars","fa-biohazard","fa-birthday-cake","fa-blanket","fa-blender","fa-blender-phone","fa-blind","fa-blinds","fa-blinds-open","fa-blinds-raised","fa-blog","fa-bold","fa-bolt","fa-bomb","fa-bone","fa-bone-break","fa-bong","fa-book","fa-book-alt","fa-book-dead","fa-book-heart","fa-book-medical","fa-book-open","fa-book-reader","fa-book-spells","fa-book-user","fa-bookmark","fa-books","fa-books-medical","fa-boombox","fa-boot","fa-booth-curtain","fa-border-all","fa-border-bottom","fa-border-center-h","fa-border-center-v","fa-border-inner","fa-border-left","fa-border-none","fa-border-outer","fa-border-right","fa-border-style","fa-border-style-alt","fa-border-top","fa-bow-arrow","fa-bowling-ball","fa-bowling-pins","fa-box","fa-box-alt","fa-box-ballot","fa-box-check","fa-box-fragile","fa-box-full","fa-box-heart","fa-box-open","fa-box-up","fa-box-usd","fa-boxes","fa-boxes-alt","fa-boxing-glove","fa-brackets","fa-brackets-curly","fa-braille","fa-brain","fa-bread-loaf","fa-bread-slice","fa-briefcase","fa-briefcase-medical","fa-bring-forward","fa-bring-front","fa-broadcast-tower","fa-broom","fa-browser","fa-brush","fa-bug","fa-building","fa-bullhorn","fa-bullseye","fa-bullseye-arrow","fa-bullseye-pointer","fa-burger-soda","fa-burn","fa-burrito","fa-bus","fa-bus-alt","fa-bus-school","fa-business-time","fa-cabinet-filing","fa-cactus","fa-calculator","fa-calculator-alt","fa-calendar","fa-calendar-alt","fa-calendar-check","fa-calendar-day","fa-calendar-edit","fa-calendar-exclamation","fa-calendar-minus","fa-calendar-plus","fa-calendar-star","fa-calendar-times","fa-calendar-week","fa-camcorder","fa-camera","fa-camera-alt","fa-camera-home","fa-camera-movie","fa-camera-polaroid","fa-camera-retro","fa-campfire","fa-campground","fa-candle-holder","fa-candy-cane","fa-candy-corn","fa-cannabis","fa-capsules","fa-car","fa-car-alt","fa-car-battery","fa-car-building","fa-car-bump","fa-car-bus","fa-car-crash","fa-car-garage","fa-car-mechanic","fa-car-side","fa-car-tilt","fa-car-wash","fa-caravan","fa-caravan-alt","fa-caret-circle-down","fa-caret-circle-left","fa-caret-circle-right","fa-caret-circle-up","fa-caret-down","fa-caret-left","fa-caret-right","fa-caret-square-down","fa-car" ); | |
$solids = array( "fa-abacus","fa-acorn","fa-ad","fa-address-book","fa-address-card","fa-adjust","fa-air-conditioner","fa-air-freshener","fa-alarm-clock","fa-alarm-exclamation","fa-alarm-plus","fa-alarm-snooze","fa-album","fa-album-collection","fa-alicorn","fa-alien","fa-alien-monster","fa-align-center","fa-align-justify","fa-align-left","fa-align-right","fa-align-slash","fa-allergies","fa-ambulance","fa-american-sign-language-interpreting","fa-amp-guitar","fa-analytics","fa-anchor","fa-angel","fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up","fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-angry","fa-ankh","fa-apple-alt","fa-apple-crate","fa-archive","fa-archway","fa-arrow-alt-circle-down","fa-arrow-alt-circle-left","fa-arrow-alt-circle-right","fa-arrow-alt-circle-up","fa-arrow-alt-down","fa-arrow-alt-from-bottom","fa-arrow-alt-from-left","fa-arrow-alt-from-right","fa-arrow-alt-from-top","fa-arrow-alt-left","fa-arrow-alt-right","fa-arrow-alt-square-down","fa-arrow-alt-square-left","fa-arrow-alt-square-right","fa-arrow-alt-square-up","fa-arrow-alt-to-bottom","fa-arrow-alt-to-left","fa-arrow-alt-to-right","fa-arrow-alt-to-top","fa-arrow-alt-up","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-from-bottom","fa-arrow-from-left","fa-arrow-from-right","fa-arrow-from-top","fa-arrow-left","fa-arrow-right","fa-arrow-square-down","fa-arrow-square-left","fa-arrow-square-right","fa-arrow-square-up","fa-arrow-to-bottom","fa-arrow-to-left","fa-arrow-to-right","fa-arrow-to-top","fa-arrow-up","fa-arrows","fa-arrows-alt","fa-arrows-alt-h","fa-arrows-alt-v","fa-arrows-h","fa-arrows-v","fa-assistive-listening-systems","fa-asterisk","fa-at","fa-atlas","fa-atom","fa-atom-alt","fa-audio-description","fa-award","fa-axe","fa-axe-battle","fa-baby","fa-baby-carriage","fa-backpack","fa-backspace","fa-backward","fa-bacon","fa-badge","fa-badge-check","fa-badge-dollar","fa-badge-percent","fa-badge-sheriff","fa-badger-honey","fa-bags-shopping","fa-bahai","fa-balance-scale","fa-balance-scale-left","fa-balance-scale-right","fa-ball-pile","fa-ballot","fa-ballot-check","fa-ban","fa-band-aid","fa-banjo","fa-barcode","fa-barcode-alt","fa-barcode-read","fa-barcode-scan","fa-bars","fa-baseball","fa-baseball-ball","fa-basketball-ball","fa-basketball-hoop","fa-bat","fa-bath","fa-battery-bolt","fa-battery-empty","fa-battery-full","fa-battery-half","fa-battery-quarter","fa-battery-slash","fa-battery-three-quarters","fa-bed","fa-bed-alt","fa-bed-bunk","fa-bed-empty","fa-beer","fa-bell","fa-bell-exclamation","fa-bell-on","fa-bell-plus","fa-bell-school","fa-bell-school-slash","fa-bell-slash","fa-bells","fa-betamax","fa-bezier-curve","fa-bible","fa-bicycle","fa-biking","fa-biking-mountain","fa-binoculars","fa-biohazard","fa-birthday-cake","fa-blanket","fa-blender","fa-blender-phone","fa-blind","fa-blinds","fa-blinds-open","fa-blinds-raised","fa-blog","fa-bold","fa-bolt","fa-bomb","fa-bone","fa-bone-break","fa-bong","fa-book","fa-book-alt","fa-book-dead","fa-book-heart","fa-book-medical","fa-book-open","fa-book-reader","fa-book-spells","fa-book-user","fa-bookmark","fa-books","fa-books-medical","fa-boombox","fa-boot","fa-booth-curtain","fa-border-all","fa-border-bottom","fa-border-center-h","fa-border-center-v","fa-border-inner","fa-border-left","fa-border-none","fa-border-outer","fa-border-right","fa-border-style","fa-border-style-alt","fa-border-top","fa-bow-arrow","fa-bowling-ball","fa-bowling-pins","fa-box","fa-box-alt","fa-box-ballot","fa-box-check","fa-box-fragile","fa-box-full","fa-box-heart","fa-box-open","fa-box-up","fa-box-usd","fa-boxes","fa-boxes-alt","fa-boxing-glove","fa-brackets","fa-brackets-curly","fa-braille","fa-brain","fa-bread-loaf","fa-bread-slice","fa-briefcase","fa-briefcase-medical","fa-bring-forward","fa-bring-front","fa-broadcast-tower","fa-broom","fa-browser","fa-brush","fa-bug","fa-building","fa-bullhorn","fa-bullseye","fa-bullseye-arrow","fa-bullseye-pointer","fa-burger-soda","fa-burn","fa-burrito","fa-bus","fa-bus-alt","fa-bus-school","fa-business-time","fa-cabinet-filing","fa-cactus","fa-calculator","fa-calculator-alt","fa-calendar","fa-calendar-alt","fa-calendar-check","fa-calendar-day","fa-calendar-edit","fa-calendar-exclamation","fa-calendar-minus","fa-calendar-plus","fa-calendar-star","fa-calendar-times","fa-calendar-week","fa-camcorder","fa-camera","fa-camera-alt","fa-camera-home","fa-camera-movie","fa-camera-polaroid","fa-camera-retro","fa-campfire","fa-campground","fa-candle-holder","fa-candy-cane","fa-candy-corn","fa-cannabis","fa-capsules","fa-car","fa-car-alt","fa-car-battery","fa-car-building","fa-car-bump","fa-car-bus","fa-car-crash","fa-car-garage","fa-car-mechanic","fa-car-side","fa-car-tilt","fa-car-wash","fa-caravan","fa-caravan-alt","fa-caret-circle-down","fa-caret-circle-left","fa-caret-circle-right","fa-caret-circle-up","fa-caret-down","fa-caret-left","fa-caret-right","fa-caret-square-down","fa-car" ); | |
switch($type) { | |
default: | |
case "all": { | |
foreach($brands as $brand) { | |
$fa[] = "fab ".$brand; | |
} | |
foreach($duotones as $duotone) { | |
$fa[] = "fab ".$duotone; | |
} | |
foreach($lights as $light) { | |
$fa[] = "fab ".$light; | |
} | |
foreach($regulars as $regular) { | |
$fa[] = "fab ".$regular; | |
} | |
foreach($solids as $solid) { | |
$fa[] = "fab ".$solid; | |
} | |
break; | |
} | |
case "brands": { | |
$fa = $duotone; | |
break; | |
} | |
case "duotone": { | |
$fa = $duotone; | |
break; | |
} | |
case "light": { | |
$fa = $light; | |
break; | |
} | |
case "regular": { | |
$fa = $regular; | |
break; | |
} | |
case "solid": { | |
$fa = $solid; | |
break; | |
} | |
} | |
return $fa; | |
} |
how to use it in code?
I've defined this function is a plugin, so if you I to use in a theme, I would do like this :
if( function_exists("font_awesome") ) { // Make sure the function exists if called within my theme
$regular_icons = font_awesome('regular');
if( !empty( $regular_icons ) ) { // foreach can produce errors if it returns an empty set
foreach($regular_icons as $regular) {
echo "<i class='{$regular}'></a>";
// Alternatively, like this :
// echo '<i class="'. $regular .'"></a>';
}
}
} // END everything
Hope this helps !
This is probably the worst snippet ever...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to use it in code?