| Server IP : 104.21.13.219 / Your IP : 162.159.115.10 Web Server : nginx/1.26.1 System : Linux HE9229 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 User : www ( 1000) PHP Version : 8.0.26 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/jl3_ph_com/wp-content/plugins/elementor-pro/modules/forms/classes/ |
Upload File : |
<?php
namespace ElementorPro\Modules\Forms\Classes;
use Elementor\Controls_Manager;
use Elementor\Repeater;
use Elementor\Settings;
use ElementorPro\Modules\Forms\Controls\Fields_Map;
use ElementorPro\Modules\Forms\Widgets\Form;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
abstract class Integration_Base extends Action_Base {
public function handle_panel_request( array $data ) {}
public static function global_api_control( $widget, $api_key = '', $label = '', $condition = [], $id = '' ) {
if ( empty( $api_key ) ) {
$content = sprintf(
/* translators: 1: Integration label, 2: Link opening tag, 3: Link closing tag. */
esc_html__( 'Set your %1$s in the %2$sIntegrations Settings%3$s.', 'elementor-pro' ),
$label,
sprintf( '<a href="%s" target="_blank">', Settings::get_settings_tab_url( 'integrations' ) ),
'</a>'
);
$alert_type = 'warning';
} else {
$content = sprintf(
/* translators: 1: Integration label, 2: Link opening tag, 3: Link closing tag. */
esc_html__( 'You are using %1$s set in the %2$sIntegrations Settings%3$s.', 'elementor-pro' ),
$label,
sprintf( '<a href="%s" target="_blank">', Settings::get_settings_tab_url( 'integrations' ) ),
'</a>'
);
$alert_type = 'info';
}
/* translators: %s: Integration label. */
$content .= ' ' . sprintf( esc_html__( 'You can also set a different %s by choosing "Custom".', 'elementor-pro' ), $label );
$widget->add_control(
$id . '_api_key_msg',
[
'type' => Controls_Manager::ALERT,
'alert_type' => $alert_type,
'content' => $content,
'condition' => $condition,
]
);
}
protected function get_fields_map_control_options() {
return [];
}
final protected function register_fields_map_control( Form $form ) {
$repeater = new Repeater();
$repeater->add_control( 'remote_id', [ 'type' => Controls_Manager::HIDDEN ] );
$repeater->add_control( 'local_id', [ 'type' => Controls_Manager::SELECT ] );
$fields_map_control_options = [
'label' => esc_html__( 'Field Mapping', 'elementor-pro' ),
'type' => Fields_Map::CONTROL_TYPE,
'separator' => 'before',
'fields' => $repeater->get_controls(),
];
$fields_map_control_options = array_merge( $fields_map_control_options, $this->get_fields_map_control_options() );
$form->add_control( $this->get_name() . '_fields_map', $fields_map_control_options );
}
}