PluginProbe
Canvas / 2.4.9
Canvas v2.4.9
2.5.5 2.5.4 trunk 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 All 54 releases
canvas / components / basic-elements / block-progress / render.php

render.php in Canvas 2.4.9, at components/basic-elements/block-progress/render.php

31 lines 884 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Progress block template
4 *
5 * @var $attributes - block attributes
6 * @var $options - layout options
7 *
8 * @package Canvas
9 */
10
11 if ( $attributes['striped'] ) {
12 $attributes['className'] .= ' cnvs-block-progress-striped';
13
14 if ( isset( $attributes['animated'] ) && $attributes['animated'] ) {
15 $attributes['className'] .= ' cnvs-block-progress-animated';
16 }
17 }
18
19 ?>
20
21 <div class="<?php echo esc_attr( $attributes['className'] ); ?>" <?php echo ( isset( $attributes['anchor'] ) ? ' id="' . esc_attr( $attributes['anchor'] ) . '"' : '' ); ?>>
22
23 <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'] ); ?>">
24 <?php
25 if ( $attributes['displayPercent'] ) {
26 echo esc_html( $attributes['width'] . '%' );
27 }
28 ?>
29 </div>
30 </div>
31