function styles_ui_preview_ajax in Styles 7.2
Same name and namespace in other branches
- 6.2 contrib/styles_ui/includes/styles_ui.admin.inc \styles_ui_preview_ajax()
- 6 contrib/styles_ui/includes/styles_ui.admin.inc \styles_ui_preview_ajax()
- 7 contrib/styles_ui/styles_ui.admin.inc \styles_ui_preview_ajax()
1 string reference to 'styles_ui_preview_ajax'
- styles_ui_menu in contrib/
styles_ui/ styles_ui.module - Implements hook_menu().
File
- contrib/
styles_ui/ styles_ui.admin.inc, line 298 - Administrative page callbacks for the Styles UI module.
Code
function styles_ui_preview_ajax($field_type, $container_name, $preset_name) {
$styles_containers = styles_default_containers();
$containers = $styles_containers[$field_type]['containers'];
drupal_json_output(array(
'id' => '#styles-ui-preview-wrapper-' . check_plain($container_name),
'preview' => theme($containers[$container_name]['themes']['preview'], array(
'field_type' => $field_type,
'container_name' => $container_name,
'style_name' => $preset_name,
)),
));
die;
}