[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor-pro
/
modules
/
atomic-form
/
actions
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 action-base.php
2,278 B
SET
[ EDIT ]
|
[ DEL ]
📄 action-runner.php
3,434 B
SET
[ EDIT ]
|
[ DEL ]
📄 action-type.php
693 B
SET
[ EDIT ]
|
[ DEL ]
📄 collect-submissions-action.php
4,232 B
SET
[ EDIT ]
|
[ DEL ]
📄 email-action.php
4,309 B
SET
[ EDIT ]
|
[ DEL ]
📄 email-settings.php
1,277 B
SET
[ EDIT ]
|
[ DEL ]
📄 webhook-action.php
3,496 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: action-base.php
<?php namespace ElementorPro\Modules\AtomicForm\Actions; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } abstract class Action_Base { /** * Get the action type identifier. * * @return string Action type (e.g., 'email', 'webhook', 'collect-submissions') */ abstract public function get_type(): string; /** * Execute the action with the provided form data and widget settings. * * @param array $form_data Sanitized form data submitted by the user. * Example: ['name' => 'John', 'email' => 'john@example.com'] * @param array $widget_settings Full widget settings - action extracts what it needs. * Example: ['email_to' => 'admin@site.com', 'email_subject' => 'New form', ...] * @param array $context Additional context (post_id, form_id, form_name). * Example: ['post_id' => 123, 'form_id' => 'contact', 'form_name' => 'Contact Form'] * @return array Result array with 'status' and optional data. * Success: ['status' => 'success', 'message' => '...', ...] * Failure: ['status' => 'failed', 'error' => '...', ...] */ abstract public function execute( array $form_data, array $widget_settings, array $context ): array; /** * Validate widget settings for this action. * * @param array $widget_settings Widget settings to validate. * @return bool|\WP_Error True if valid, WP_Error otherwise. */ protected function validate_settings( array $widget_settings ) { return true; } /** * Format a success result. * * @param string $message Success message. * @param array $additional_data Additional data to include. * @return array */ protected function success( string $message, array $additional_data = [] ): array { return array_merge( [ 'status' => 'success', 'message' => $message, ], $additional_data ); } /** * Format a failure result. * * @param string $error Error message. * @param array $additional_data Additional data to include. * @return array */ protected function failure( string $error, array $additional_data = [] ): array { return array_merge( [ 'status' => 'failed', 'error' => $error, ], $additional_data ); } }