function _field_label_is_valid_style in Field Label 8
Ensure a style selector is still available in the configured class list.
Parameters
string $selector: The CSS selector to check.
Return value
array An array with valid values, or empty array if invalid
3 calls to _field_label_is_valid_style()
- field_label_field_formatter_settings_summary_alter in ./
field_label.module - Implements hook_field_formatter_settings_summary_alter().
- field_label_field_formatter_third_party_settings_form in ./
field_label.module - Implements hook_field_formatter_third_party_settings_form().
- field_label_preprocess_field in ./
field_label.module - Implements hook_preprocess_HOOK() for field templates.
File
- ./
field_label.module, line 253 - Provides custom settings to format field labels.
Code
function _field_label_is_valid_style($selector) {
$styles = _field_label_generate_styles();
if (isset($styles[$selector])) {
return [
'selector' => $selector,
'label' => $styles[$selector],
];
}
return [];
}