| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?> |
| 2 |
<?php |
| 3 |
// Define an array of color palettes for random selection |
| 4 |
$palettes = [ |
| 5 |
['bg' => '#FFF3E0', 'text' => '#D81B60', 'button' => '#F06292', 'button_text' => '#FFFFFF'], |
| 6 |
['bg' => '#E3F2FD', 'text' => '#1976D2', 'button' => '#42A5F5', 'button_text' => '#FFFFFF'], |
| 7 |
['bg' => '#E8F5E9', 'text' => '#2E7D32', 'button' => '#66BB6A', 'button_text' => '#FFFFFF'], |
| 8 |
['bg' => '#F3E5F5', 'text' => '#6A1B9A', 'button' => '#AB47BC', 'button_text' => '#FFFFFF'], |
| 9 |
['bg' => '#FFFDE7', 'text' => '#F57F17', 'button' => '#FFCA28', 'button_text' => '#000000'] |
| 10 |
]; |
| 11 |
|
| 12 |
// Select a random palette |
| 13 |
$palette = $palettes[array_rand($palettes)]; |
| 14 |
?> |
| 15 |
|
| 16 |
<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="text-align:center;margin-bottom:32px; background-color: <?php echo esc_attr($palette['bg']); ?>; padding: 20px; border-radius: 8px; border: 0px solid <?php echo esc_attr($palette['text']); ?>;"> |
| 17 |
<tbody> |
| 18 |
<tr> |
| 19 |
<td> |
| 20 |
<h1 style="color: <?php echo esc_attr($palette['text']); ?>; font-size: 20px; margin: 0;"> |
| 21 |
<?php echo esc_html($text); ?> |
| 22 |
</h1> |
| 23 |
</td> |
| 24 |
</tr> |
| 25 |
</tbody> |
| 26 |
</table> |
| 27 |
|