theme_progress_bar

Definition

theme_progress_bar($percent, $message)
drupal/includes/theme.inc, line 1705

Description

Return a themed progress bar.

Parameters

$percent The percentage of the progress.

$message A string containing information to be displayed.

Return value

A themed HTML string representing the progress bar.

Related topics

Namesort iconDescription
Default theme implementationsFunctions and templates that present output to the user, and can be implemented by themes.

Code

function theme_progress_bar($percent, $message) {
  $output = '<div id="progress" class="progress">';
  $output .= '<div class="bar"><div class="filled" style="width: ' . $percent . '%"></div></div>';
  $output .= '<div class="percentage">' . $percent . '%</div>';
  $output .= '<div class="message">' . $message . '</div>';
  $output .= '</div>';

  return $output;
}