You are here

function styles_ui_preview_ajax in Styles 7

Same name and namespace in other branches
  1. 6.2 contrib/styles_ui/includes/styles_ui.admin.inc \styles_ui_preview_ajax()
  2. 6 contrib/styles_ui/includes/styles_ui.admin.inc \styles_ui_preview_ajax()
  3. 7.2 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 157
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,
      'preset_name' => $preset_name,
    )),
  ));
  die;
}