function styles_ui_preview_ajax in Styles 6
Same name and namespace in other branches
- 6.2 contrib/styles_ui/includes/styles_ui.admin.inc \styles_ui_preview_ajax()
- 7.2 contrib/styles_ui/styles_ui.admin.inc \styles_ui_preview_ajax()
- 7 contrib/styles_ui/styles_ui.admin.inc \styles_ui_preview_ajax()
Page callback for styles-ui/preview.
1 string reference to 'styles_ui_preview_ajax'
- styles_ui_menu in contrib/
styles_ui/ styles_ui.module - Implementation of hook_menu().
File
- contrib/
styles_ui/ includes/ styles_ui.admin.inc, line 149 - styles/contrib/styles_ui/includes/styles_ui.admin.inc Administrative page callbacks for the Styles UI module.
Code
function styles_ui_preview_ajax($field_type, $container_name, $preset_name) {
$styles_containers = styles_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;
}