REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 3.24 KB
Close
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/lib/AdminPages/Pages/AutomationEditor.php
Text
Base64
<?php declare(strict_types = 1); namespace MailPoet\AdminPages\Pages; if (!defined('ABSPATH')) exit; use MailPoet\AdminPages\PageRenderer; use MailPoet\Automation\Engine\Data\Automation; use MailPoet\Automation\Engine\Hooks; use MailPoet\Automation\Engine\Mappers\AutomationMapper; use MailPoet\Automation\Engine\Registry; use MailPoet\Automation\Engine\Storage\AutomationStorage; use MailPoet\Form\AssetsController; use MailPoet\WP\Functions as WPFunctions; use MailPoet\WP\Notice as WPNotice; class AutomationEditor { /** @var AssetsController */ private $assetsController; /** @var AutomationMapper */ private $automationMapper; /** @var AutomationStorage */ private $automationStorage; /** @var PageRenderer */ private $pageRenderer; /** @var Registry */ private $registry; /** @var WPFunctions */ private $wp; public function __construct( AssetsController $assetsController, AutomationMapper $automationMapper, AutomationStorage $automationStorage, PageRenderer $pageRenderer, Registry $registry, WPFunctions $wp ) { $this->assetsController = $assetsController; $this->automationMapper = $automationMapper; $this->automationStorage = $automationStorage; $this->pageRenderer = $pageRenderer; $this->registry = $registry; $this->wp = $wp; } public function render() { $this->assetsController->setupAutomationEditorDependencies(); $id = isset($_GET['id']) ? (int)$_GET['id'] : null; $this->wp->doAction(Hooks::EDITOR_BEFORE_LOAD, (int)$id); $automation = $id ? $this->automationStorage->getAutomation($id) : null; if (!$automation) { $notice = new WPNotice( WPNotice::TYPE_ERROR, __('Automation not found.', 'mailpoet') ); $notice->displayWPNotice(); $this->pageRenderer->displayPage('blank.html'); return; } if ($automation->getStatus() === Automation::STATUS_TRASH) { $this->wp->wpSafeRedirect($this->wp->adminUrl('admin.php?page=mailpoet-automation&status=trash')); exit(); } $roles = new \WP_Roles(); $this->pageRenderer->displayPage('automation/editor.html', [ 'registry' => $this->buildRegistry(), 'context' => $this->buildContext(), 'automation' => $this->automationMapper->buildAutomation($automation), 'sub_menu' => 'mailpoet-automation', 'locale_full' => $this->wp->getLocale(), 'api' => [ 'root' => rtrim($this->wp->escUrlRaw($this->wp->restUrl()), '/'), 'nonce' => $this->wp->wpCreateNonce('wp_rest'), ], 'jsonapi' => [ 'root' => rtrim($this->wp->escUrlRaw(admin_url('admin-ajax.php')), '/'), ], 'user_roles' => $roles->get_names(), ]); } private function buildRegistry(): array { $steps = []; foreach ($this->registry->getSteps() as $key => $step) { $steps[$key] = [ 'key' => $step->getKey(), 'name' => $step->getName(), 'subject_keys' => $step->getSubjectKeys(), 'args_schema' => $step->getArgsSchema()->toArray(), ]; } return ['steps' => $steps]; } private function buildContext(): array { $data = []; foreach ($this->registry->getContextFactories() as $key => $factory) { $data[$key] = $factory(); } return $data; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 21
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Automation.php
1.74 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
AutomationEditor.php
3.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
AutomationTemplates.php
1.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
ExperimentalFeatures.php
514 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
FormEditor.php
13.37 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
Forms.php
2.08 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
Help.php
5.72 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
Homepage.php
1010 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
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
Landingpage.php
707 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
Logs.php
1.70 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
NewsletterEditor.php
7.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
Newsletters.php
5.94 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
Segments.php
5.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
Settings.php
3.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
Subscribers.php
2.51 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
SubscribersExport.php
740 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
SubscribersImport.php
1.17 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
Upgrade.php
707 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
WelcomeWizard.php
2.48 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
WooCommerceSetup.php
1.06 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).