PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / trunk
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster vtrunk
2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 1.8.1 All 42 releases
sellkit / includes / elementor / modules / optin / fields / address.php

address.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster trunk, at includes/elementor/modules/optin/fields/address.php

60 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) || die();
4
5 class Sellkit_Elementor_Optin_Field_Address extends Sellkit_Elementor_Optin_Field_Base {
6
7 public static function get_field_type() {
8 return 'address';
9 }
10
11 public function get_input_type() {
12 return 'text';
13 }
14
15 public function render_content() {
16 ?>
17 <input <?php echo $this->widget->get_render_attribute_string( 'field-' . esc_attr( $this->get_id() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor-generated attributes. ?>>
18 <?php
19
20 $attributes = [
21 'type' => 'hidden',
22 'name' => 'fields[hidden_' . $this->get_id() . ']',
23 'id' => 'optin-field-hidden-' . $this->get_id(),
24 'class' => $this->get_class(),
25 'data-type' => 'hidden',
26 ];
27
28 $this->widget->add_render_attribute( 'field-hidden-' . $this->get_id(), $attributes );
29 ?>
30 <input <?php echo $this->widget->get_render_attribute_string( 'field-hidden-' . $this->get_id() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor-generated attributes. ?>>
31 <?php
32 }
33
34 public static function get_additional_controls() {
35 $commons = parent::get_common_controls();
36
37 $subtext1 = esc_html__( 'Set your google API key in ', 'sellkit' );
38 $subtext2 = esc_html__( 'Sellkit Settings ', 'sellkit' );
39 $setting_url = admin_url() . 'admin.php?page=sellkit-settings#/';
40
41 return [
42 'address_google_api_key_help' => [
43 'type' => 'raw_html',
44 'conditions' => [ 'terms' => [ parent::get_type_condition() ] ],
45 'raw' => sprintf(
46 '<small>%1$s<a target="_blank" href="%2$s">%3$s<i class="fa fa-external-link-square"></i></a></small>.',
47 $subtext1,
48 $setting_url,
49 $subtext2
50 ),
51 ],
52 'label' => $commons['label'],
53 'field_value' => $commons['field_value'],
54 'placeholder' => $commons['placeholder'],
55 'required' => $commons['required'],
56 'width_responsive' => $commons['width_responsive'],
57 ];
58 }
59 }
60