Skip to content

Instantly share code, notes, and snippets.

@josephfusco
Last active October 29, 2016 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephfusco/52efd68e5cabd4d7a7917f9300608de7 to your computer and use it in GitHub Desktop.
Save josephfusco/52efd68e5cabd4d7a7917f9300608de7 to your computer and use it in GitHub Desktop.
// generates Upfront child theme icon font code from https://icomoon.io/app/#/select/font
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
setTimeout(function(){
var $=jQuery.noConflict();
var icons = [];
$(".glyph .unitRight input").each(function(){icons.push($(this).val());});
var iconsString = '\'font_icons\' => \'["'+icons.join('", "')+'"]\',';
console.log('%c Copy & paste everything below in red into your child themes settings.php array: ', 'color: #69c07b');
console.log('%c'+iconsString, 'color: red');
console.log('%c Total Icon Count: '+icons.length, 'color: #156dff');
}, 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment