function theme_progress_bar

7.x theme.inc theme_progress_bar($variables)
5.x theme.inc theme_progress_bar($percent, $message)
6.x theme.inc theme_progress_bar($percent, $message)

Returns HTML for a progress bar.

Note that the core Batch API uses this only for non-JavaScript batch jobs.

Parameters

$variables: An associative array containing:

  • percent: The percentage of the progress.
  • message: A string containing information to be displayed.

Related topics

1 theme call to theme_progress_bar()
_batch_progress_page_nojs in drupal/includes/batch.inc
Outputs a batch processing page without JavaScript support.
2 string references to the theme hook from theme_progress_bar()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

drupal_common_theme in drupal/includes/common.inc
Provides theme registration for themes across .inc files.
_batch_progress_page_nojs in drupal/includes/batch.inc
Outputs a batch processing page without JavaScript support.

File

drupal/includes/theme.inc, line 2353
The theme system, which controls the output of Drupal.

Code

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

  return $output;
}