PluginProbe
Elementor Website Builder – more than just a page builder / 3.30.1
Elementor Website Builder – more than just a page builder v3.30.1
4.3.0-beta3 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 All 452 releases
← All changes | includes/widgets/traits/button-trait.php +17 -14 4.1.0-dev23.30.1 View file →
@@ -132,8 +132,11 @@
132 132 'icon_exclude_inline_options' => $args['icon_exclude_inline_options'],
133 133 ]
134 134 );
135 135
136 + $start = is_rtl() ? 'right' : 'left';
137 + $end = is_rtl() ? 'left' : 'right';
138 +
136 139 $this->add_control(
137 140 'icon_align',
138 141 [
139 142 'label' => esc_html__( 'Icon Position', 'elementor' ),
@@ -141,16 +144,15 @@
141 144 'default' => is_rtl() ? 'row-reverse' : 'row',
142 145 'options' => [
143 146 'row' => [
144 147 'title' => esc_html__( 'Start', 'elementor' ),
145 - 'icon' => 'eicon-h-align-left',
148 + 'icon' => "eicon-h-align-{$start}",
146 149 ],
147 150 'row-reverse' => [
148 151 'title' => esc_html__( 'End', 'elementor' ),
149 - 'icon' => 'eicon-h-align-right',
152 + 'icon' => "eicon-h-align-{$end}",
150 153 ],
151 154 ],
152 - 'classes' => 'elementor-control-start-end',
153 155 'selectors_dictionary' => [
154 156 'left' => is_rtl() ? 'row-reverse' : 'row',
155 157 'right' => is_rtl() ? 'row' : 'row-reverse',
156 158 ],
@@ -210,10 +212,9 @@
210 212 ],
211 213 'default' => '',
212 214 'title' => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'elementor' ),
213 215 'description' => sprintf(
214 - /* translators: 1: `<code>` opening tag, 2: `</code>` closing tag. */
215 - esc_html__( 'Please make sure the ID is unique and not used elsewhere on the page. This field allows %1$sA-z 0-9%2$s & underscore chars without spaces.', 'elementor' ),
216 + esc_html__( 'Please make sure the ID is unique and not used elsewhere on the page this form is displayed. This field allows %1$sA-z 0-9%2$s & underscore chars without spaces.', 'elementor' ),
216 217 '<code>',
217 218 '</code>'
218 219 ),
219 220 'separator' => 'before',
@@ -272,8 +273,11 @@
272 273 'condition' => $args['section_condition'],
273 274 ]
274 275 );
275 276
277 + $start = is_rtl() ? 'right' : 'left';
278 + $end = is_rtl() ? 'left' : 'right';
279 +
276 280 $this->add_responsive_control(
277 281 'content_align',
278 282 [
279 283 'label' => esc_html__( 'Alignment', 'elementor' ),
@@ -280,9 +284,9 @@
280 284 'type' => Controls_Manager::CHOOSE,
281 285 'options' => [
282 286 'start' => [
283 287 'title' => esc_html__( 'Start', 'elementor' ),
284 - 'icon' => 'eicon-text-align-left',
288 + 'icon' => "eicon-text-align-{$start}",
285 289 ],
286 290 'center' => [
287 291 'title' => esc_html__( 'Center', 'elementor' ),
288 292 'icon' => 'eicon-text-align-center',
@@ -288,9 +292,9 @@
288 292 'icon' => 'eicon-text-align-center',
289 293 ],
290 294 'end' => [
291 295 'title' => esc_html__( 'End', 'elementor' ),
292 - 'icon' => 'eicon-text-align-right',
296 + 'icon' => "eicon-text-align-{$end}",
293 297 ],
294 298 'space-between' => [
295 299 'title' => esc_html__( 'Space between', 'elementor' ),
296 300 'icon' => 'eicon-text-align-justify',
@@ -296,9 +300,8 @@
296 300 'icon' => 'eicon-text-align-justify',
297 301 ],
298 302 ],
299 303 'default' => $args['content_alignment_default'],
300 - 'classes' => 'elementor-control-start-end',
301 304 'selectors' => [
302 305 '{{WRAPPER}} .elementor-button .elementor-button-content-wrapper' => 'justify-content: {{VALUE}};',
303 306 ],
304 307 'condition' => array_merge( $args['section_condition'], [ 'align' => 'justify' ] ),
@@ -516,9 +519,9 @@
516 519 *
517 520 * @since 3.4.0
518 521 * @access protected
519 522 */
520 - protected function render_button( ?Widget_Base $instance = null ) {
523 + protected function render_button( Widget_Base $instance = null ) {
521 524 if ( empty( $instance ) ) {
522 525 $instance = $this;
523 526 }
524 527
@@ -587,10 +590,10 @@
587 590 view.addRenderAttribute( 'wrapper', 'class', 'elementor-button-wrapper' );
588 591
589 592 view.addRenderAttribute( 'button', 'class', 'elementor-button' );
590 593
591 - if ( '' !== settings.link?.url ) {
592 - view.addRenderAttribute( 'button', 'href', elementor.helpers.sanitizeUrl( settings.link?.url ) );
594 + if ( '' !== settings.link.url ) {
595 + view.addRenderAttribute( 'button', 'href', elementor.helpers.sanitizeUrl( settings.link.url ) );
593 596 view.addRenderAttribute( 'button', 'class', 'elementor-button-link' );
594 597 } else {
595 598 view.addRenderAttribute( 'button', 'role', 'button' );
596 599 }
@@ -627,9 +630,9 @@
627 630 <# } #>
628 631 </span>
629 632 <# } #>
630 633 <# if ( settings.text ) { #>
631 - <span {{{ view.getRenderAttributeString( 'text' ) }}}>{{ settings.text }}</span>
634 + <span {{{ view.getRenderAttributeString( 'text' ) }}}>{{{ settings.text }}}</span>
632 635 <# } #>
633 636 </span>
634 637 </a>
635 638 <# if ( ! optimized_markup ) { #>
@@ -647,9 +650,9 @@
647 650 *
648 651 * @since 3.4.0
649 652 * @access protected
650 653 */
651 - protected function render_text( ?Widget_Base $instance = null ) {
654 + protected function render_text( Widget_Base $instance = null ) {
652 655 // The default instance should be `$this` (a Button widget), unless the Trait is being used from outside of a widget (e.g. `Skin_Base`) which should pass an `$instance`.
653 656 if ( empty( $instance ) ) {
654 657 $instance = $this;
655 658 }
@@ -684,9 +687,9 @@
684 687 <?php endif; ?>
685 688 </span>
686 689 <?php endif; ?>
687 690 <?php if ( ! empty( $settings['text'] ) ) : ?>
688 - <span <?php $instance->print_render_attribute_string( 'text' ); ?>><?php echo wp_kses_post( $settings['text'] ); ?></span>
691 + <span <?php $instance->print_render_attribute_string( 'text' ); ?>><?php $this->print_unescaped_setting( 'text' ); ?></span>
689 692 <?php endif; ?>
690 693 </span>
691 694 <?php
692 695 }