You are here

function views_theme_field in Views (for Drupal 7) 5

Easily theme any item to a field name. field name will be in the format of TABLENAME_FIELDNAME You have to understand a bit about the views data to utilize this.

Parameters

$function: The name of the function to call.

$field_name: The field being themed.

4 calls to views_theme_field()
theme_views_view_list in ./views.module
Display the nodes of a view as a list.
theme_views_view_list_popular_alltime in modules/views_statistics.inc
theme_views_view_list_popular_recent in modules/views_statistics.inc
theme_views_view_table in ./views.module
Display the nodes of a view as a table.

File

./views.module, line 663

Code

function views_theme_field() {
  $args = func_get_args();
  $function = array_shift($args);
  $field_name = array_shift($args);
  $view = array_pop($args);
  if (!($func = theme_get_function($function . '_' . $view->name . '_' . $field_name))) {
    if (!($func = theme_get_function($function . '_' . $field_name))) {
      $func = theme_get_function($function);
    }
  }
  if ($func) {
    return call_user_func_array($func, $args);
  }
}