# canvas/2.4.9/components/basic-elements/block-progress/render.php

Canvas, version 2.4.9. 31 lines.

- Page: https://pluginprobe.com/plugins/canvas/2.4.9/code/components/basic-elements/block-progress/render.php
- Raw: https://pluginprobe.com/plugins/canvas/2.4.9/raw/components/basic-elements/block-progress/render.php
- Modified: 2025-05-27T05:50:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/canvas/2.4.9/code/components/basic-elements/block-progress/render.php#L10-L20`.

```php
<?php
/**
 * Progress block template
 *
 * @var     $attributes - block attributes
 * @var     $options - layout options
 *
 * @package Canvas
 */

if ( $attributes['striped'] ) {
	$attributes['className'] .= ' cnvs-block-progress-striped';

	if ( isset( $attributes['animated'] ) && $attributes['animated'] ) {
		$attributes['className'] .= ' cnvs-block-progress-animated';
	}
}

?>

<div class="<?php echo esc_attr( $attributes['className'] ); ?>" <?php echo ( isset( $attributes['anchor'] ) ? ' id="' . esc_attr( $attributes['anchor'] ) . '"' : '' ); ?>>

	<div class="cnvs-block-progress-bar" role="progressbar" aria-valuenow="<?php echo esc_attr( $attributes['width'] ); ?>" aria-valuemin="0" aria-valuemax="<?php echo esc_attr( $attributes['width'] ); ?>">
		<?php
		if ( $attributes['displayPercent'] ) {
			echo esc_html( $attributes['width'] . '%' );
		}
		?>
	</div>
</div>

```
