REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.97 KB
Close
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/lib/Form/Block/Divider.php
Text
Base64
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing namespace MailPoet\Form\Block; if (!defined('ABSPATH')) exit; use MailPoet\WP\Functions as WPFunctions; class Divider { /** @var WPFunctions */ private $wp; public function __construct( WPFunctions $wp ) { $this->wp = $wp; } const DEFAULT_ATTRIBUTES = [ 'height' => 1, 'type' => 'divider', 'style' => 'solid', 'dividerHeight' => 1, 'dividerWidth' => 100, 'color' => 'black', ]; public function render($block): string { $classes = ['mailpoet_spacer']; if (isset($block['params']['type']) && $block['params']['type'] === 'divider') { $classes[] = 'mailpoet_has_divider'; } if (!empty($block['params']['class_name'])) { $classes[] = $block['params']['class_name']; } $classAttr = $this->wp->escAttr(join(' ', $classes)); $height = $this->wp->escAttr($block['params']['height'] ?? self::DEFAULT_ATTRIBUTES['height']); return "<div class='{$classAttr}' style='height: {$height}px;'>" . $this->renderDivider($block) . '</div>'; } private function renderDivider(array $block): string { if (isset($block['params']['type']) && $block['params']['type'] === 'spacer') { return ''; } $width = $block['params']['divider_width'] ?? self::DEFAULT_ATTRIBUTES['dividerWidth']; $style = $block['params']['style'] ?? self::DEFAULT_ATTRIBUTES['style']; $dividerHeight = $block['params']['divider_height'] ?? self::DEFAULT_ATTRIBUTES['dividerHeight']; $color = $block['params']['color'] ?? self::DEFAULT_ATTRIBUTES['color']; $dividerStyles = [ "border-top-style: $style", "border-top-width: {$dividerHeight}px", "border-top-color: $color", "height: {$dividerHeight}px", "width: $width%", ]; $style = $this->wp->escAttr(implode(";", $dividerStyles)); return "<div class='mailpoet_divider' data-automation-id='form_divider' style='$style'></div>"; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 17
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
BlockRendererHelper.php
9.24 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Checkbox.php
2.25 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Column.php
1.95 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Columns.php
2.12 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Date.php
7.63 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Divider.php
1.97 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Heading.php
2.99 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Html.php
1022 B
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Image.php
3.15 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.php
0 B
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Paragraph.php
2.69 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Radio.php
2.24 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Segment.php
2.75 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Select.php
2.96 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Submit.php
1.68 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Text.php
2.64 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Textarea.php
1.93 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).