✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.102
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/public_html/wp-content/plugins/forminator/library/fields//consent.php
<?php
/**
 * The Forminator_Consent class.
 *
 * @package Forminator
 */

if ( ! defined( 'ABSPATH' ) ) {
	die();
}

/**
 * Class Forminator_Consent
 *
 * @since 1.0.5
 */
class Forminator_Consent extends Forminator_Field {

	/**
	 * Name
	 *
	 * @var string
	 */
	public $name = '';

	/**
	 * Slug
	 *
	 * @var string
	 */
	public $slug = 'consent';

	/**
	 * Type
	 *
	 * @var string
	 */
	public $type = 'consent';

	/**
	 * Position
	 *
	 * @var int
	 */
	public $position = 21;

	/**
	 * Options
	 *
	 * @var array
	 */
	public $options = array();

	/**
	 * Icon
	 *
	 * @var string
	 */
	public $icon = 'sui-icon-gdpr';

	/**
	 * Forminator_Consent constructor.
	 *
	 * @since 1.0.5
	 */
	public function __construct() {
		parent::__construct();

		$this->name = esc_html__( 'Consent', 'forminator' );
		$required   = __( 'This field is required. Please check it.', 'forminator' );

		self::$default_required_messages[ $this->type ] = $required;
	}

	/**
	 * Field defaults
	 *
	 * @since 1.0.5
	 * @return array
	 */
	public function defaults() {

		$privacy_url = get_privacy_policy_url();
		$privacy_url = ! empty( $privacy_url ) ? $privacy_url : '#';

		return array(
			'required'            => 'true',
			'field_label'         => 'Consent',
			'consent_description' => sprintf(
			/* Translators: 1. Opening <a> tag with link to the privacy url, 2. closing <a> tag 3. Opening <a> tag with # href, 4. closing <a> tag. */
				esc_html__( 'Yes, I agree with the %1$sprivacy policy%2$s and %3$sterms and conditions%4$s.', 'forminator' ),
				'<a href="' . esc_url( $privacy_url ) . '" target="_blank">',
				'</a>',
				'<a href="#" target="_blank">',
				'</a>'
			),
		);
	}

	/**
	 * Autofill Setting
	 *
	 * @since 1.0.5
	 *
	 * @param array $settings Settings.
	 *
	 * @return array
	 */
	public function autofill_settings( $settings = array() ) {
		// Unsupported Autofill.
		$autofill_settings = array();

		return $autofill_settings;
	}

	/**
	 * Field front-end markup
	 *
	 * @since 1.0.5
	 *
	 * @param array                  $field Field.
	 * @param Forminator_Render_Form $views_obj Forminator_Render_Form object.
	 *
	 * @return mixed
	 */
	public function markup( $field, $views_obj ) {

		$settings    = $views_obj->model->settings;
		$this->field = $field;

		$html        = '';
		$id          = self::get_property( 'element_id', $field );
		$name        = $id;
		$form_id     = isset( $settings['form_id'] ) ? $settings['form_id'] : false;
		$description = wp_kses_post( forminator_replace_variables( self::get_property( 'consent_description', $field ), $form_id ) );
		$id          = self::get_field_id( $id );
		$label       = esc_html( self::get_property( 'field_label', $field ) );
		$required    = self::get_property( 'required', $field, true );
		$ariareq     = $required ? 'true' : 'false';

		$html .= '<div class="forminator-field">';

		$html .= self::get_field_label( $label, $id, $required );

			$html .= '<div class="forminator-checkbox__wrapper">';

				$html .= sprintf( '<label id="%s__label" class="forminator-checkbox forminator-consent" aria-labelledby="%s" aria-hidden="true">', $id, $id . '-label' );

					$html .= sprintf(
						'<input type="checkbox" name="%1$s" id="%2$s" value="%3$s" aria-labelledby="%4$s"%5$s data-required="%6$s" aria-required="%7$s" />',
						$name,
						$id,
						'checked',
						$id . '-label',
						( ! empty( $description ) ? ' aria-describedby="' . esc_attr( $id . '__description' ) . '"' : '' ),
						$ariareq,
						$ariareq
					);

					$html .= '<span class="forminator-checkbox-box" aria-hidden="true"></span>';

				$html .= '</label>';

				$html .= sprintf( '<div id="%s__description" class="forminator-checkbox__label forminator-consent__label">%s</div>', $id, $description );

			$html .= '</div>';

		$html .= '</div>';

		return apply_filters( 'forminator_field_consent_markup', $html, $id, $description );
	}

	/**
	 * Return field inline validation rules
	 *
	 * @since 1.0.5
	 * @return string
	 */
	public function get_validation_rules() {
		$field       = $this->field;
		$id          = self::get_property( 'element_id', $field );
		$is_required = $this->is_required( $field );
		$rules       = $is_required ? '"' . $this->get_id( $field ) . '":{"required":true},' : '';

		return apply_filters( 'forminator_field_consent_validation_rules', $rules, $id, $field );
	}

	/**
	 * Return field inline validation errors
	 *
	 * @since 1.0.5
	 * @return string
	 */
	public function get_validation_messages() {
		$field            = $this->field;
		$id               = $this->get_id( $field );
		$is_required      = $this->is_required( $field );
		$required_message = self::get_property( 'required_message', $field, self::$default_required_messages[ $this->type ] );
		$required_message = apply_filters(
			'forminator_consent_field_required_validation_message',
			$required_message,
			$id,
			$field
		);
		$messages         = $is_required
							? '"' . $this->get_id( $field ) . '": {"required":"' . forminator_addcslashes( $required_message ) . '"},' . "\n"
							: '';

		return $messages;
	}

	/**
	 * Field back-end validation
	 *
	 * @since 1.15.3
	 *
	 * @param array        $field Field.
	 * @param array|string $data Data.
	 */
	public function validate( $field, $data ) {
		// value of consent checkbox is `string` *checked*.
		$id = $this->get_id( $field );
		if ( $this->is_required( $field ) && ( empty( $data ) || 'checked' !== $data ) ) {
			$required_message                = self::get_property( 'required_message', $field, self::$default_required_messages[ $this->type ] );
			$this->validation_message[ $id ] = apply_filters(
				'forminator_consent_field_required_validation_message',
				$required_message,
				$id,
				$field
			);
		}
	}

	/**
	 * Sanitize data
	 *
	 * @since 1.0.5
	 *
	 * @param array        $field Field.
	 * @param array|string $data - the data to be sanitized.
	 *
	 * @return array|string $data - the data after sanitization
	 */
	public function sanitize( $field, $data ) {
		$original_data = $data;
		// Sanitize.
		$data = forminator_sanitize_field( $data );

		return apply_filters( 'forminator_field_consent_sanitize', $data, $field, $original_data );
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
20 Aug 2025 10.03 AM
tdhomesa / tdhomesa
0755
address.php
27.192 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
calculation.php
8.076 KB
3 Mar 2025 4.08 PM
tdhomesa / tdhomesa
0644
captcha.php
9.159 KB
14 Apr 2025 2.55 PM
tdhomesa / tdhomesa
0644
consent.php
6.063 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
currency.php
12.942 KB
18 Aug 2025 3.48 PM
tdhomesa / tdhomesa
0644
custom.php
7.134 KB
3 Mar 2025 4.08 PM
tdhomesa / tdhomesa
0644
date.php
44.481 KB
18 Aug 2025 3.48 PM
tdhomesa / tdhomesa
0644
email.php
14.274 KB
18 Aug 2025 3.48 PM
tdhomesa / tdhomesa
0644
gdprcheckbox.php
5.305 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
group.php
7.063 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
hidden.php
4.893 KB
14 Apr 2025 2.55 PM
tdhomesa / tdhomesa
0644
html.php
2.412 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
multivalue.php
16.597 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
name.php
22.025 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
number.php
13.171 KB
18 Aug 2025 3.48 PM
tdhomesa / tdhomesa
0644
page-break.php
1.479 KB
24 Dec 2024 8.31 PM
tdhomesa / tdhomesa
0644
password.php
18.627 KB
18 Aug 2025 3.48 PM
tdhomesa / tdhomesa
0644
paypal.php
13.385 KB
24 Dec 2024 8.31 PM
tdhomesa / tdhomesa
0644
phone.php
15.398 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
postdata.php
35.895 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
radio.php
17.066 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
rating.php
5.614 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
section.php
3.119 KB
24 Dec 2024 8.31 PM
tdhomesa / tdhomesa
0644
select.php
23.246 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
slider.php
14.014 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
stripe-payment-element.php
3.98 KB
14 Apr 2025 2.55 PM
tdhomesa / tdhomesa
0644
stripe.php
45.783 KB
18 Aug 2025 3.48 PM
tdhomesa / tdhomesa
0644
text.php
11.221 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
textarea.php
11.608 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644
time.php
28.9 KB
18 Aug 2025 3.48 PM
tdhomesa / tdhomesa
0644
upload.php
33.154 KB
18 Aug 2025 3.48 PM
tdhomesa / tdhomesa
0644
website.php
8.129 KB
14 Jul 2025 3.42 PM
tdhomesa / tdhomesa
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF