Current Path: > home > transcarter > public_html > wp-content > plugins > elementor-pro > > modules > forms > actions
Operation : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Software : Apache Server IP : 198.54.126.42 | Your IP: 216.73.216.135 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
activecampaign.php | File | 9186 bytes | March 09 2023 22:15:58. | |
activity-log.php | File | 972 bytes | March 09 2023 22:15:58. | |
cf7db.php | File | 713 bytes | March 09 2023 22:15:58. | |
convertkit.php | File | 7286 bytes | March 09 2023 22:15:58. | |
discord.php | File | 5744 bytes | March 09 2023 22:15:58. | |
drip.php | File | 8760 bytes | March 09 2023 22:15:58. | |
email.php | File | 11154 bytes | March 09 2023 22:15:58. | |
email2.php | File | 1006 bytes | March 09 2023 22:15:58. | |
getresponse.php | File | 8795 bytes | March 09 2023 22:15:58. | |
mailchimp.php | File | 12972 bytes | March 09 2023 22:15:58. | |
mailerlite.php | File | 7920 bytes | March 09 2023 22:15:58. | |
mailpoet.php | File | 2982 bytes | March 09 2023 22:15:58. | |
mailpoet3.php | File | 3576 bytes | March 09 2023 22:15:58. | |
redirect.php | File | 1741 bytes | March 09 2023 22:15:58. | |
slack.php | File | 5918 bytes | March 09 2023 22:15:58. | |
webhook.php | File | 3148 bytes | March 09 2023 22:15:58. |
<?php namespace ElementorPro\Modules\Forms\Actions; use Elementor\Controls_Manager; use ElementorPro\Modules\Forms\Classes\Form_Record; use ElementorPro\Modules\Forms\Classes\Integration_Base; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Mailpoet extends Integration_Base { public function get_name() { return 'mailpoet'; } public function get_label() { return 'MailPoet'; } public function register_settings_section( $widget ) { $widget->start_controls_section( 'section_mailpoet', [ 'label' => esc_html__( 'MailPoet', 'elementor-pro' ), 'condition' => [ 'submit_actions' => $this->get_name(), ], ] ); /** @var \WYSIJA_model_list $model_list */ $model_list = \WYSIJA::get( 'list', 'model' ); $mailpoet_lists = $model_list->get( [ 'name', 'list_id' ], [ 'is_enabled' => 1 ] ); $options = []; foreach ( $mailpoet_lists as $list ) { $options[ $list['list_id'] ] = $list['name']; } $widget->add_control( 'mailpoet_lists', [ 'label' => esc_html__( 'List', 'elementor-pro' ), 'type' => Controls_Manager::SELECT2, 'label_block' => true, 'options' => $options, 'render_type' => 'none', ] ); $this->register_fields_map_control( $widget ); $widget->end_controls_section(); } public function on_export( $element ) { unset( $element['mailpoet_lists'] ); return $element; } public function run( $record, $ajax_handler ) { $subscriber = $this->map_fields( $record ); /** @var \WYSIJA_help_user $helper_user */ $helper_user = \WYSIJA::get( 'user', 'helper' ); $helper_user->addSubscriber( $subscriber ); } /** * @param Form_Record $record * * @return array */ private function map_fields( $record ) { $settings = $record->get( 'form_settings' ); $fields = $record->get( 'fields' ); $subscriber = [ 'user' => [ 'email' => '', ], 'user_list' => [ 'list_ids' => (array) $settings['mailpoet_lists'] ], ]; foreach ( $settings['mailpoet_fields_map'] as $map_item ) { if ( empty( $fields[ $map_item['local_id'] ]['value'] ) ) { continue; } $value = $fields[ $map_item['local_id'] ]['value']; if ( 'email' === $map_item['remote_id'] ) { $subscriber['user']['email'] = $value; } else { $subscriber['user'][ $map_item['remote_id'] ] = $value; } } return $subscriber; } protected function get_fields_map_control_options() { return [ 'default' => [ [ 'remote_id' => 'firstname', 'remote_label' => esc_html__( 'First Name', 'elementor-pro' ), 'remote_type' => 'text', ], [ 'remote_id' => 'lastname', 'remote_label' => esc_html__( 'Last Name', 'elementor-pro' ), 'remote_type' => 'text', ], [ 'remote_id' => 'email', 'remote_label' => esc_html__( 'Email', 'elementor-pro' ), 'remote_type' => 'email', 'remote_required' => true, ], ], 'condition' => [ 'mailpoet_lists!' => '', ], ]; } }
SILENT KILLER Tool