function fonts_com_ajax_render_alter in @font-your-face 7.2
Implements hook_ajax_render_alter(). Adds inline CSS for fonts loaded via AJAX.
File
- modules/
fonts_com/ fonts_com.module, line 1264
Code
function fonts_com_ajax_render_alter(&$commands) {
$css = fonts_com_ajax_css_registry();
$styles = array(
'#type' => 'styles',
'#items' => array(
array(
'type' => 'inline',
'data' => $css,
'browsers' => array(),
'media' => 'all',
'preprocess' => TRUE,
),
),
);
$rendered = drupal_render($styles);
$commands[] = ajax_command_prepend('head', $rendered);
}