AbandonedCartContent.php
1 year ago
AutomatedLatestContentBlock.php
3 years ago
Button.php
1 year ago
Coupon.php
3 years ago
Divider.php
2 years ago
DynamicProductsBlock.php
11 months ago
Footer.php
2 months ago
Header.php
2 months ago
Image.php
3 years ago
Placeholder.php
4 years ago
Renderer.php
2 months ago
Social.php
2 months ago
Spacer.php
3 years ago
Text.php
2 months ago
index.php
3 years ago
Placeholder.php
32 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Newsletter\Renderer\Blocks; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\WP\Functions as WPFunctions; |
| 9 | |
| 10 | class Placeholder { |
| 11 | /** @var WPFunctions */ |
| 12 | private $wp; |
| 13 | |
| 14 | public function __construct( |
| 15 | WPFunctions $wp |
| 16 | ) { |
| 17 | $this->wp = $wp; |
| 18 | } |
| 19 | |
| 20 | public function render($element): string { |
| 21 | $placeholder = $element['placeholder']; |
| 22 | $class = $element['class'] ?? ''; |
| 23 | $style = $element['style'] ?? ''; |
| 24 | return ' |
| 25 | <tr> |
| 26 | <td class="' . $this->wp->escAttr($class) . '" style="' . $this->wp->escAttr($style) . '"> |
| 27 | ' . $this->wp->escHtml($placeholder) . ' |
| 28 | </td> |
| 29 | </tr>'; |
| 30 | } |
| 31 | } |
| 32 |