LLMS_Admin_Table::output_progress_bar_html( float $percentage, string $text = '' )

Output the HTML to output a progress bar within a td.


Description Description

Improve ugly tables with a small visual flourish.
Useful when displaying a percentage within a table! Bonus if the table sorts by that percentage column.


Top ↑

Parameters Parameters

$percentage

(float) (Required) The percentage to be displayed.

$text

(string) (Optional) Text to display over the progress bar, defaults to $percentage.

Default value: ''


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.admin.table.php

	public function output_progress_bar_html( $percentage, $text = '' ) {
		$text = $text ? $text : $percentage . '%';
		?>
		<div class="llms-table-progress">
			<div class="llms-table-progress-bar"><div class="llms-table-progress-inner" style="width:<?php echo esc_attr( $percentage ); ?>%"></div></div>
			<span class="llms-table-progress-text"><?php echo esc_html( $text ); ?></span>
		</div>
		<?php
	}


Top ↑

Changelog Changelog

Changelog
Version Description
7.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.