Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > forminator > library > fields > >
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
address.php | File | 27845 bytes | July 14 2025 15:42:34. | |
calculation.php | File | 8270 bytes | March 03 2025 16:08:12. | |
captcha.php | File | 9379 bytes | April 14 2025 14:55:34. | |
consent.php | File | 6209 bytes | July 14 2025 15:42:34. | |
currency.php | File | 13254 bytes | July 14 2025 15:42:34. | |
custom.php | File | 7305 bytes | March 03 2025 16:08:12. | |
date.php | File | 45471 bytes | July 14 2025 15:42:34. | |
email.php | File | 14373 bytes | July 14 2025 15:42:34. | |
gdprcheckbox.php | File | 5432 bytes | July 14 2025 15:42:34. | |
group.php | File | 7233 bytes | July 14 2025 15:42:34. | |
hidden.php | File | 5010 bytes | April 14 2025 14:55:34. | |
html.php | File | 2470 bytes | July 14 2025 15:42:34. | |
multivalue.php | File | 16995 bytes | July 14 2025 15:42:34. | |
name.php | File | 22554 bytes | July 14 2025 15:42:34. | |
number.php | File | 13488 bytes | July 14 2025 15:42:34. | |
page-break.php | File | 1514 bytes | December 24 2024 20:31:58. | |
password.php | File | 18982 bytes | July 14 2025 15:42:34. | |
paypal.php | File | 13706 bytes | December 24 2024 20:31:58. | |
phone.php | File | 15768 bytes | July 14 2025 15:42:34. | |
postdata.php | File | 36756 bytes | July 14 2025 15:42:34. | |
radio.php | File | 17476 bytes | July 14 2025 15:42:34. | |
rating.php | File | 5749 bytes | July 14 2025 15:42:34. | |
section.php | File | 3194 bytes | December 24 2024 20:31:58. | |
select.php | File | 23804 bytes | July 14 2025 15:42:34. | |
slider.php | File | 14350 bytes | July 14 2025 15:42:34. | |
stripe-payment-element.php | File | 4076 bytes | April 14 2025 14:55:34. | |
stripe.php | File | 46882 bytes | April 16 2025 18:18:24. | |
text.php | File | 11490 bytes | July 14 2025 15:42:34. | |
textarea.php | File | 11887 bytes | July 14 2025 15:42:34. | |
time.php | File | 29459 bytes | July 14 2025 15:42:34. | |
upload.php | File | 34058 bytes | July 14 2025 15:42:34. | |
website.php | File | 8324 bytes | July 14 2025 15:42:34. |
<?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 ); } }
SILENT KILLER Tool