PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
give / src / Views / Form / Templates / Sequoia / sections / progress-bar.php

progress-bar.php in GiveWP – Donation Plugin and Fundraising Platform 4.18.0, at src/Views/Form/Templates/Sequoia/sections/progress-bar.php

26 lines 846 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * @since 4.16.3 Escaped the goal color when rendering the progress bar.
5 *
6 * @var int $formId
7 */
8 if ($form->has_goal()) : ?>
9 <?php
10 $color = give_get_meta($formId, '_give_goal_color', true);
11 $goalStats = give_goal_progress_stats($formId);
12
13 $style = "width:{$goalStats['progress']}%;";
14 if ( ! empty($color)) {
15 $style .= ";background: linear-gradient(180deg, {$color} 0%, {$color} 100%), linear-gradient(180deg, #fff 0%, #ccc 100%); background-blend-mode: multiply;";
16 }
17 ?>
18 <div class="progress-bar">
19 <div class="give-progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="<?php
20 echo $goalStats['progress']; ?>">
21 <span style="<?php echo esc_attr($style); ?>"></span>
22 </div><!-- /.give-progress-bar -->
23 </div>
24 <?php
25 endif; ?>
26