I am using SHS for a Views Exposed Filter only, there are no SHS fields on any content types, so this may be the root of the issue. Using your excellent documentation provided by shs.api.php, I added some code to a custom module ('term' is my field name):

function MYMODULE_shs_js_settings_alter(&$settings_js, $field_name, $vocabulary_identifier) {
dpm($field_name, 'field_name');
  if ($field_name == 'term') {
    foreach ($settings_js['shs'] as $field => $container) {
      foreach ($container as $identifier => $settings) {
        $settings['any_label'] = 'TEST';
        $settings['any_value'] = 'TESTING';
        dpm($settings, 'settings');
      }
    }
  }
}

You can see from my screenshot that the any_label and any_value are indeed being changed in the $settings array, but nothing is actually being changed in the views exposed filters (this is for the exposed filter that doesn't have any label, the exposed filter 'Type' is a standard views exposed filter, not using SHS).
dpm
I exported my view, but here are the basics of what I'm trying to accomplish:
I have a taxonomy called 'Self Help Tools' that is 2 levels (this is for a legal website) ie:

Courts
-Basics
-Fees
Family
-Divorce
-Child Support
Finances
-Bankruptcy
-Payday loans

All content types on the site are tagged with these terms, and people can choose multiple terms when creating content.

I am using views to create a search page where people can use SHS to first narrow down to the first level of the taxonomy tree, and then further narrow down to the second level of the taxonomy tree. So the SHS filter is exposed to the site's visitors. That said, I am not using the SHS widget for the taxonomy selection in the content types, I am only using SHS as the Selection Type for the Vocabulary for the exposed filter Content: Has Taxonomy Terms (with depth).

More screenshots to demonstrate the view config:

SHS exposed filter in view:
filter

SHS exposed filter settings:
filter settings

SHS exposed filter config:
filter config

And more screenshots to show how the view is working so far:

Search view - no terms selected
no filter

Search view - first term selected
first level selected

Search view - second term selected
second term selected

What I'd like to do is add a label to the first and second level filters for the taxonomy, as well as change the delay time for the filters appearing.

I saw Cannot get Api Hook to add labels to views field but despite using the correct field name, I am not seeing any changes in the output. Also, I don't see the 'labels' key in the settings array per $settings['labels'], so I think maybe if you have a view that uses SHS without using SHS in the content types, the hooks provided by the API don't work? Likewise, I don't see anything in the $settings array in terms of ['display']['animationSpeed'] per shs.api.php

      // Small speed-up for anmiations (defaults to 400ms).
      $settings['display']['animationSpeed'] = 100;

So right now I don't think I can use the hooks to add labels or adjust load time. Any suggestions?

Comments

kbrinner created an issue.