You are here

function _ip_geoloc_plugin_style_add_label in IP Geolocation Views & Maps 8

Same name and namespace in other branches
  1. 7 views/ip_geoloc_plugin_style.inc \_ip_geoloc_plugin_style_add_label()

Prefix the field value with its label, where requested. No styling.

Parameters

string $field: The field.

string $field_content: The content of the field.

Return value

string $field_content prefixed with the label defined for the field

1 call to _ip_geoloc_plugin_style_add_label()
_ip_geoloc_plugin_style_decorate in src/Plugin/views/style/ip_geoloc_plugin_style.inc
Call to decoration functions for marker.

File

src/Plugin/views/style/ip_geoloc_plugin_style.inc, line 1048
ip_geoloc_plugin_style.inc

Code

function _ip_geoloc_plugin_style_add_label($field, $field_content) {
  $label = $field
    ->label();
  if ($label && $field->options['element_label_colon']) {
    $label .= ': ';
  }
  return $label . $field_content;
}