Commit 6b9c4672 authored by DYdave's avatar DYdave Committed by Neslee
Browse files

Issue #3176648 by DYdave: Allow reorder options in "Filter rewrite values"...

Issue #3176648 by DYdave: Allow reorder options in "Filter rewrite values" when alphabetical sort is disabled
parent b5fdfe82
......@@ -183,7 +183,8 @@ abstract class FilterWidgetBase extends BetterExposedFiltersWidgetBase implement
// Handle filter value rewrites.
if ($this->configuration['advanced']['rewrite']['filter_rewrite_values']) {
$form[$field_id]['#options'] = BetterExposedFiltersHelper::rewriteOptions($form[$field_id]['#options'], $this->configuration['advanced']['rewrite']['filter_rewrite_values']);
// Reorder options based on rewrite values, if sort options is disabled.
$form[$field_id]['#options'] = BetterExposedFiltersHelper::rewriteOptions($form[$field_id]['#options'], $this->configuration['advanced']['rewrite']['filter_rewrite_values'], !$this->configuration['advanced']['sort_options']);
// @todo what is $selected?
// if (isset($selected) &&
// !isset($form[$field_id]['#options'][$selected])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment