public function generateCustomizerPreviewJS()
{
?>
for ( var fontName in data.google_fonts ) {
if ( document.querySelector( '#tf-preview-' + fontName ) ) {
continue;
}
var link = document.createElement('LINK');
link.setAttribute( 'rel', 'stylesheet' );
link.setAttribute( 'type', 'text/css' );
link.setAttribute( 'media', 'all' );
link.setAttribute( 'id', 'tf-preview' + fontName );
link.setAttribute( 'href', data.google_fonts[ fontName ] );
document.head.appendChild( link );
}
<?php
}