You are here

function theme_signup_custom_data in Signup 5

Same name and namespace in other branches
  1. 5.2 signup.module \theme_signup_custom_data()
  2. 6.2 theme/node.admin.inc \theme_signup_custom_data()
  3. 6 theme/node.admin.inc \theme_signup_custom_data()
  4. 7 theme/node.admin.inc \theme_signup_custom_data()

Renders custom signup user data into a human-readable format.

WARNING: This theme function is recursive (it calls itself for nested data), so if you override it, be sure not to change the part where it does "call_user_func(__FUNCTION__)".

Parameters

$data: Array of custom user signup data.

Return value

User data directly formatted in divs.

See also

theme_signup_user_form()

2 theme calls to theme_signup_custom_data()
signup_build_signup_data in ./signup.module
Deprecated function to render signup data in a human-readable form.
signup_user_signups_form in ./signup.module
Prints the signup details for a single node when the signups tab is clicked

File

./signup.module, line 1493

Code

function theme_signup_custom_data($data) {
  $output = '';

  // Loop through each first level element.
  foreach ($data as $key => $value) {
    $output .= '<div id="' . signup_id_safe($key) . '">';
    if (is_array($value)) {

      // Element is nested, render it recursively.
      // Instead of the overhead of theme(), just call ourself directly.
      $output .= call_user_func(__FUNCTION__, $value);
    }
    else {
      $output .= $key . ': ' . check_plain($value);
    }
    $output .= "</div>\n";
  }
  return $output;
}