function facetapi_form_block_admin_display_form_alter in Facet API 6
Implementation of hook_FORM_ID_form_alter().
Allows the "destination" query string variable to be used with the core block admin form so we can automatically redirect users back to the facet settings page when the form is submitted.
See also
File
- ./
facetapi.module, line 1322 - An abstracted facet API that can be used by various search backens.
Code
function facetapi_form_block_admin_display_form_alter(&$form, &$form_state) {
if (!empty($_REQUEST['destination'])) {
global $theme_key;
$path = 'admin/build/block';
$options = array(
'query' => array(
'destination' => $_REQUEST['destination'],
),
);
$form['#action'] = arg(4) ? url("{$path}/list/{$theme_key}", $options) : url($path, $options);
}
}