PluginProbe
Elementor Website Builder – more than just a page builder / 3.31.4
Elementor Website Builder – more than just a page builder v3.31.4
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 +14 -10 4.2.43.31.4 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 ],
@@ -272,8 +274,11 @@
272 274 'condition' => $args['section_condition'],
273 275 ]
274 276 );
275 277
278 + $start = is_rtl() ? 'right' : 'left';
279 + $end = is_rtl() ? 'left' : 'right';
280 +
276 281 $this->add_responsive_control(
277 282 'content_align',
278 283 [
279 284 'label' => esc_html__( 'Alignment', 'elementor' ),
@@ -280,9 +285,9 @@
280 285 'type' => Controls_Manager::CHOOSE,
281 286 'options' => [
282 287 'start' => [
283 288 'title' => esc_html__( 'Start', 'elementor' ),
284 - 'icon' => 'eicon-text-align-left',
289 + 'icon' => "eicon-text-align-{$start}",
285 290 ],
286 291 'center' => [
287 292 'title' => esc_html__( 'Center', 'elementor' ),
288 293 'icon' => 'eicon-text-align-center',
@@ -288,9 +293,9 @@
288 293 'icon' => 'eicon-text-align-center',
289 294 ],
290 295 'end' => [
291 296 'title' => esc_html__( 'End', 'elementor' ),
292 - 'icon' => 'eicon-text-align-right',
297 + 'icon' => "eicon-text-align-{$end}",
293 298 ],
294 299 'space-between' => [
295 300 'title' => esc_html__( 'Space between', 'elementor' ),
296 301 'icon' => 'eicon-text-align-justify',
@@ -296,9 +301,8 @@
296 301 'icon' => 'eicon-text-align-justify',
297 302 ],
298 303 ],
299 304 'default' => $args['content_alignment_default'],
300 - 'classes' => 'elementor-control-start-end',
301 305 'selectors' => [
302 306 '{{WRAPPER}} .elementor-button .elementor-button-content-wrapper' => 'justify-content: {{VALUE}};',
303 307 ],
304 308 'condition' => array_merge( $args['section_condition'], [ 'align' => 'justify' ] ),
@@ -516,9 +520,9 @@
516 520 *
517 521 * @since 3.4.0
518 522 * @access protected
519 523 */
520 - protected function render_button( ?Widget_Base $instance = null ) {
524 + protected function render_button( Widget_Base $instance = null ) {
521 525 if ( empty( $instance ) ) {
522 526 $instance = $this;
523 527 }
524 528
@@ -587,10 +591,10 @@
587 591 view.addRenderAttribute( 'wrapper', 'class', 'elementor-button-wrapper' );
588 592
589 593 view.addRenderAttribute( 'button', 'class', 'elementor-button' );
590 594
591 - if ( '' !== settings.link?.url ) {
592 - view.addRenderAttribute( 'button', 'href', elementor.helpers.sanitizeUrl( settings.link?.url ) );
595 + if ( '' !== settings.link.url ) {
596 + view.addRenderAttribute( 'button', 'href', elementor.helpers.sanitizeUrl( settings.link.url ) );
593 597 view.addRenderAttribute( 'button', 'class', 'elementor-button-link' );
594 598 } else {
595 599 view.addRenderAttribute( 'button', 'role', 'button' );
596 600 }
@@ -647,9 +651,9 @@
647 651 *
648 652 * @since 3.4.0
649 653 * @access protected
650 654 */
651 - protected function render_text( ?Widget_Base $instance = null ) {
655 + protected function render_text( Widget_Base $instance = null ) {
652 656 // 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 657 if ( empty( $instance ) ) {
654 658 $instance = $this;
655 659 }