PluginProbe
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce / 2.0.1
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce v2.0.1
2.15.0 trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 All 62 releases
hurrytimer / includes / css.php

css.php in HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce 2.0.1, at includes/css.php

43 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Dyanmically apply user CSS.
5 */
6
7 namespace Hurrytimer;
8
9 $posts = get_posts([
10 'post_type' => HURRYT_POST_TYPE,
11 'posts_per_page' => -1,
12 'post_status' => 'publish',
13 ]);
14
15 foreach ($posts as $post):
16 $campaign = new Campaign($post->ID);
17 $campaign->loadSettings();
18 $campaignClass = ".hurrytimer-campaign-{$campaign->getId()}";
19 ?>
20 <?php echo "$campaignClass .hurrytimer-timer-digit" ?>,
21 <?php echo "$campaignClass .hurrytimer-timer-sep" ?>
22 {
23 color: <?php echo $campaign->digitColor ?>;
24 font-size: <?php echo $campaign->digitSize ?>px;
25 }
26 <?php echo "$campaignClass .hurrytimer-timer-label" ?>
27 {
28 font-size: <?php echo $campaign->labelSize ?>px;
29 color: <?php echo $campaign->labelColor ?>;
30 text-transform: <?php echo $campaign->labelCase ?>;
31 }
32 <?php ?>
33 <?php echo "$campaignClass .hurrytimer-headline"; ?>
34 {
35 font-size: <?php echo $campaign->headlineSize ?>px;
36 color: <?php echo $campaign->headlineColor ?>;
37 }
38 <?php
39 endforeach;
40 ?>
41
42
43