function custom_formatters_preview in Custom Formatters 6
Menu callback; Retrieve a JSON object containing Custom Formatter preview.
1 string reference to 'custom_formatters_preview'
- custom_formatters_menu in ./
custom_formatters.module - Implements hook_menu().
File
- ./
custom_formatters.admin.inc, line 885 - Contains administration functions for the Custom Formatters module.
Code
function custom_formatters_preview() {
$_POST['field_types'] = serialize(explode(', ', $_POST['field_types']));
$_POST['mode'] = $_POST['mode_value'];
unset($_POST['form_build_id'], $_POST['form_token'], $_POST['form_id'], $_POST['op'], $_POST['mode_value']);
$output = theme('custom_formatters_preview', (object) $_POST);
drupal_json(array(
'status' => TRUE,
'data' => theme('status_messages') . $output,
));
}