Skip to content

Instantly share code, notes, and snippets.

View smartcatdev's full-sized avatar

Bilal Hassan smartcatdev

  • Bilal Hassan
  • Kingston, Ontario
  • 02:15 (UTC -05:00)
View GitHub Profile
@smartcatdev
smartcatdev / fontawesome5-php-array.php
Created April 27, 2018 18:40
Font Awesome 5 - Icon PHP Array
function fa_icons() {
return array (
'fab fa-500px' => __( '500px', 'buildr' ),
'fab fa-accessible-icon' => __( 'accessible-icon', 'buildr' ),
'fab fa-accusoft' => __( 'accusoft', 'buildr' ),
'fas fa-address-book' => __( 'address-book', 'buildr' ),
'far fa-address-book' => __( 'address-book', 'buildr' ),
'fas fa-address-card' => __( 'address-card', 'buildr' ),
'far fa-address-card' => __( 'address-card', 'buildr' ),
var icons=""
$('ul.icon-list > li').each( function() {
icons += "'" + $('i', this ).attr('class') + "' => __('" + $('span', this ).html() + "', 'buildr' ),";
/* console.log( $('i', this ).attr('class') ) */
})
console.log( icons )