PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.1
Elementor Website Builder – more than just a page builder v3.0.1
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/controls/url.php +19 -23 4.2.0-dev23.0.1 View file →
@@ -64,9 +64,9 @@
64 64 */
65 65 protected function get_default_settings() {
66 66 return [
67 67 'label_block' => true,
68 - 'placeholder' => esc_html__( 'Type or paste your URL', 'elementor' ),
68 + 'placeholder' => __( 'Paste URL or type', 'elementor' ),
69 69 'autocomplete' => true,
70 70 'options' => [ 'is_external', 'nofollow', 'custom_attributes' ],
71 71 'dynamic' => [
72 72 'categories' => [ TagsModule::URL_CATEGORY ],
@@ -71,13 +71,10 @@
71 71 'dynamic' => [
72 72 'categories' => [ TagsModule::URL_CATEGORY ],
73 73 'property' => 'url',
74 74 ],
75 - 'custom_attributes_description' => sprintf(
76 - '%1$s <a target="_blank" href="https://go.elementor.com/panel-link-custom-attributes/">%2$s</a>',
77 - esc_html__( 'Set custom attributes for the link element. Separate attribute keys from values using the | (pipe) character. Separate key-value pairs with a comma.', 'elementor' ),
78 - esc_html__( 'Learn more', 'elementor' )
79 - ),
75 + 'custom_attributes_description' => __( 'Set custom attributes for the link element. Separate attribute keys from values using the | (pipe) character. Separate key-value pairs with a comma.', 'elementor' )
76 + . ' <a href="https://go.elementor.com/panel-link-custom-attributes/" target="_blank">' . __( 'Learn More', 'elementor' ) . '</a>',
80 77 ];
81 78 }
82 79
83 80 /**
@@ -90,41 +87,40 @@
90 87 * @since 1.0.0
91 88 * @access public
92 89 */
93 90 public function content_template() {
91 + $control_uid = $this->get_control_uid();
92 + $is_external_control_uid = $this->get_control_uid( 'is_external' );
93 + $nofollow_control_uid = $this->get_control_uid( 'nofollow' );
94 + $custom_attributes_uid = $this->get_control_uid( 'custom_attributes' );
94 95 ?>
95 96 <div class="elementor-control-field elementor-control-url-external-{{{ ( data.options.length || data.show_external ) ? 'show' : 'hide' }}}">
96 - <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label>
97 + <label for="<?php echo $control_uid; ?>" class="elementor-control-title">{{{ data.label }}}</label>
97 98 <div class="elementor-control-input-wrapper elementor-control-dynamic-switcher-wrapper">
98 99 <i class="elementor-control-url-autocomplete-spinner eicon-loading eicon-animation-spin" aria-hidden="true"></i>
99 - <input id="<?php $this->print_control_uid(); ?>" class="elementor-control-tag-area elementor-input" data-setting="url" placeholder="{{ view.getControlPlaceholder() }}" />
100 - <?php // PHPCS - Nonces don't require escaping. ?>
101 - <input id="_ajax_linking_nonce" type="hidden" value="<?php echo wp_create_nonce( 'internal-linking' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" />
102 - <# if ( !! data.options ) { #>
103 - <button class="elementor-control-url-more tooltip-target elementor-control-unit-1" data-tooltip="<?php echo esc_attr__( 'Link Options', 'elementor' ); ?>" aria-label="<?php echo esc_attr__( 'Link Options', 'elementor' ); ?>">
100 + <input id="<?php echo $control_uid; ?>" class="elementor-control-tag-area elementor-input" data-setting="url" placeholder="{{ data.placeholder }}" />
101 + <input id="_ajax_linking_nonce" type="hidden" value="<?php echo wp_create_nonce( 'internal-linking' ); ?>" />
102 + <div class="elementor-control-url-more tooltip-target elementor-control-unit-1" data-tooltip="<?php echo __( 'Link Options', 'elementor' ); ?>">
104 103 <i class="eicon-cog" aria-hidden="true"></i>
105 - </button>
106 - <# } #>
104 + </div>
107 105 </div>
108 - <# if ( !! data.options ) { #>
109 106 <div class="elementor-control-url-more-options">
110 107 <div class="elementor-control-url-option">
111 - <input id="<?php $this->print_control_uid( 'is_external' ); ?>" type="checkbox" class="elementor-control-url-option-input" data-setting="is_external">
112 - <label for="<?php $this->print_control_uid( 'is_external' ); ?>"><?php echo esc_html__( 'Open in new window', 'elementor' ); ?></label>
108 + <input id="<?php echo $is_external_control_uid; ?>" type="checkbox" class="elementor-control-url-option-input" data-setting="is_external">
109 + <label for="<?php echo $is_external_control_uid; ?>"><?php echo __( 'Open in new window', 'elementor' ); ?></label>
113 110 </div>
114 111 <div class="elementor-control-url-option">
115 - <input id="<?php $this->print_control_uid( 'nofollow' ); ?>" type="checkbox" class="elementor-control-url-option-input" data-setting="nofollow">
116 - <label for="<?php $this->print_control_uid( 'nofollow' ); ?>"><?php echo esc_html__( 'Add nofollow', 'elementor' ); ?></label>
112 + <input id="<?php echo $nofollow_control_uid; ?>" type="checkbox" class="elementor-control-url-option-input" data-setting="nofollow">
113 + <label for="<?php echo $nofollow_control_uid; ?>"><?php echo __( 'Add nofollow', 'elementor' ); ?></label>
117 114 </div>
118 - <div class="elementor-control-url__custom-attributes elementor-control-direction-ltr">
119 - <label for="<?php $this->print_control_uid( 'custom_attributes' ); ?>" class="elementor-control-url__custom-attributes-label"><?php echo esc_html__( 'Custom Attributes', 'elementor' ); ?></label>
120 - <input type="text" id="<?php $this->print_control_uid( 'custom_attributes' ); ?>" class="elementor-control-unit-5" placeholder="key|value" data-setting="custom_attributes">
115 + <div class="elementor-control-url__custom-attributes">
116 + <label for="<?php echo $custom_attributes_uid; ?>" class="elementor-control-url__custom-attributes-label"><?php echo __( 'Custom Attributes', 'elementor' ); ?></label>
117 + <input type="text" id="<?php echo $custom_attributes_uid; ?>" class="elementor-control-unit-5" placeholder="key|value" data-setting="custom_attributes">
121 118 </div>
122 119 <# if ( ( data.options && -1 !== data.options.indexOf( 'custom_attributes' ) ) && data.custom_attributes_description ) { #>
123 120 <div class="elementor-control-field-description">{{{ data.custom_attributes_description }}}</div>
124 121 <# } #>
125 122 </div>
126 - <# } #>
127 123 </div>
128 124 <# if ( data.description ) { #>
129 125 <div class="elementor-control-field-description">{{{ data.description }}}</div>
130 126 <# } #>