| @@ -235,35 +235,24 @@ | ||
| 235 | 235 | 'position', |
| 236 | 236 | [ |
| 237 | 237 | 'label' => esc_html__( 'Icon Position', 'elementor' ), |
| 238 | 238 | 'type' => Controls_Manager::CHOOSE, |
| 239 | - 'default' => 'block-start', | |
| 240 | - 'mobile_default' => 'block-start', | |
| 239 | + 'default' => 'top', | |
| 240 | + 'mobile_default' => 'top', | |
| 241 | 241 | 'options' => [ |
| 242 | - 'inline-start' => [ | |
| 243 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 242 | + 'left' => [ | |
| 243 | + 'title' => esc_html__( 'Left', 'elementor' ), | |
| 244 | 244 | 'icon' => 'eicon-h-align-left', |
| 245 | 245 | ], |
| 246 | - 'inline-end' => [ | |
| 247 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 248 | - 'icon' => 'eicon-h-align-right', | |
| 249 | - ], | |
| 250 | - 'block-start' => [ | |
| 246 | + 'top' => [ | |
| 251 | 247 | 'title' => esc_html__( 'Top', 'elementor' ), |
| 252 | 248 | 'icon' => 'eicon-v-align-top', |
| 253 | 249 | ], |
| 254 | - 'block-end' => [ | |
| 255 | - 'title' => esc_html__( 'Bottom', 'elementor' ), | |
| 256 | - 'icon' => 'eicon-v-align-bottom', | |
| 250 | + 'right' => [ | |
| 251 | + 'title' => esc_html__( 'Right', 'elementor' ), | |
| 252 | + 'icon' => 'eicon-h-align-right', | |
| 257 | 253 | ], |
| 258 | 254 | ], |
| 259 | - 'classes' => 'elementor-control-start-end', | |
| 260 | - 'classes_dictionary' => [ | |
| 261 | - 'left' => is_rtl() ? 'inline-end' : 'inline-start', | |
| 262 | - 'right' => is_rtl() ? 'inline-start' : 'inline-end', | |
| 263 | - 'top' => 'block-start', | |
| 264 | - 'bottom' => 'block-end', | |
| 265 | - ], | |
| 266 | 255 | 'prefix_class' => 'elementor%s-position-', |
| 267 | 256 | 'condition' => [ |
| 268 | 257 | 'selected_icon[value]!' => '', |
| 269 | 258 | ], |
| @@ -289,19 +278,12 @@ | ||
| 289 | 278 | 'icon' => 'eicon-v-align-bottom', |
| 290 | 279 | ], |
| 291 | 280 | ], |
| 292 | 281 | 'default' => 'top', |
| 293 | - 'selectors_dictionary' => [ | |
| 294 | - 'top' => 'start', | |
| 295 | - 'middle' => 'center', | |
| 296 | - 'bottom' => 'end', | |
| 297 | - ], | |
| 298 | - 'selectors' => [ | |
| 299 | - '{{WRAPPER}} .elementor-icon-box-wrapper' => 'align-items: {{VALUE}};', | |
| 300 | - ], | |
| 282 | + 'toggle' => false, | |
| 283 | + 'prefix_class' => 'elementor-vertical-align-', | |
| 301 | 284 | 'condition' => [ |
| 302 | - 'selected_icon[value]!' => '', | |
| 303 | - 'position' => [ 'left', 'right', 'inline-start', 'inline-end' ], | |
| 285 | + 'position!' => 'top', | |
| 304 | 286 | ], |
| 305 | 287 | ] |
| 306 | 288 | ); |
| 307 | 289 | |
| @@ -310,10 +292,10 @@ | ||
| 310 | 292 | [ |
| 311 | 293 | 'label' => esc_html__( 'Alignment', 'elementor' ), |
| 312 | 294 | 'type' => Controls_Manager::CHOOSE, |
| 313 | 295 | 'options' => [ |
| 314 | - 'start' => [ | |
| 315 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 296 | + 'left' => [ | |
| 297 | + 'title' => esc_html__( 'Left', 'elementor' ), | |
| 316 | 298 | 'icon' => 'eicon-text-align-left', |
| 317 | 299 | ], |
| 318 | 300 | 'center' => [ |
| 319 | 301 | 'title' => esc_html__( 'Center', 'elementor' ), |
| @@ -318,10 +300,10 @@ | ||
| 318 | 300 | 'center' => [ |
| 319 | 301 | 'title' => esc_html__( 'Center', 'elementor' ), |
| 320 | 302 | 'icon' => 'eicon-text-align-center', |
| 321 | 303 | ], |
| 322 | - 'end' => [ | |
| 323 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 304 | + 'right' => [ | |
| 305 | + 'title' => esc_html__( 'Right', 'elementor' ), | |
| 324 | 306 | 'icon' => 'eicon-text-align-right', |
| 325 | 307 | ], |
| 326 | 308 | 'justify' => [ |
| 327 | 309 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| @@ -327,13 +309,8 @@ | ||
| 327 | 309 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| 328 | 310 | 'icon' => 'eicon-text-align-justify', |
| 329 | 311 | ], |
| 330 | 312 | ], |
| 331 | - 'classes' => 'elementor-control-start-end', | |
| 332 | - 'selectors_dictionary' => [ | |
| 333 | - 'left' => is_rtl() ? 'end' : 'start', | |
| 334 | - 'right' => is_rtl() ? 'start' : 'end', | |
| 335 | - ], | |
| 336 | 313 | 'selectors' => [ |
| 337 | 314 | '{{WRAPPER}} .elementor-icon-box-wrapper' => 'text-align: {{VALUE}};', |
| 338 | 315 | ], |
| 339 | 316 | 'separator' => 'after', |
| @@ -360,9 +337,9 @@ | ||
| 360 | 337 | 'max' => 10, |
| 361 | 338 | ], |
| 362 | 339 | ], |
| 363 | 340 | 'selectors' => [ |
| 364 | - '{{WRAPPER}} .elementor-icon-box-wrapper' => 'gap: {{SIZE}}{{UNIT}};', | |
| 341 | + '{{WRAPPER}}' => '--icon-box-icon-margin: {{SIZE}}{{UNIT}}', | |
| 365 | 342 | ], |
| 366 | 343 | 'condition' => [ |
| 367 | 344 | 'selected_icon[value]!' => '', |
| 368 | 345 | ], |
| @@ -388,9 +365,9 @@ | ||
| 388 | 365 | 'max' => 10, |
| 389 | 366 | ], |
| 390 | 367 | ], |
| 391 | 368 | 'selectors' => [ |
| 392 | - '{{WRAPPER}} .elementor-icon-box-title' => 'margin-block-end: {{SIZE}}{{UNIT}};', | |
| 369 | + '{{WRAPPER}} .elementor-icon-box-title' => 'margin-bottom: {{SIZE}}{{UNIT}};', | |
| 393 | 370 | ], |
| 394 | 371 | ] |
| 395 | 372 | ); |
| 396 | 373 | |
| @@ -865,9 +842,9 @@ | ||
| 865 | 842 | |
| 866 | 843 | <?php if ( ! Utils::is_empty( $settings['title_text'] ) ) : ?> |
| 867 | 844 | <<?php Utils::print_validated_html_tag( $settings['title_size'] ); ?> class="elementor-icon-box-title"> |
| 868 | 845 | <<?php Utils::print_validated_html_tag( $html_tag ); ?> <?php $this->print_render_attribute_string( 'link' ); ?> <?php $this->print_render_attribute_string( 'title_text' ); ?>> |
| 869 | - <?php echo wp_kses_post( $settings['title_text'] ); ?> | |
| 846 | + <?php $this->print_unescaped_setting( 'title_text' ); ?> | |
| 870 | 847 | </<?php Utils::print_validated_html_tag( $html_tag ); ?>> |
| 871 | 848 | </<?php Utils::print_validated_html_tag( $settings['title_size'] ); ?>> |
| 872 | 849 | <?php endif; ?> |
| 873 | 850 | |
| @@ -872,9 +849,9 @@ | ||
| 872 | 849 | <?php endif; ?> |
| 873 | 850 | |
| 874 | 851 | <?php if ( ! Utils::is_empty( $settings['description_text'] ) ) : ?> |
| 875 | 852 | <p <?php $this->print_render_attribute_string( 'description_text' ); ?>> |
| 876 | - <?php echo wp_kses_post( $settings['description_text'] ); ?> | |
| 853 | + <?php $this->print_unescaped_setting( 'description_text' ); ?> | |
| 877 | 854 | </p> |
| 878 | 855 | <?php endif; ?> |
| 879 | 856 | |
| 880 | 857 | </div> |
| @@ -902,9 +879,9 @@ | ||
| 902 | 879 | if ( ! hasIcon && ! hasContent ) { |
| 903 | 880 | return; |
| 904 | 881 | } |
| 905 | 882 | |
| 906 | - var hasLink = settings.link?.url, | |
| 883 | + var hasLink = settings.link.url, | |
| 907 | 884 | htmlTag = hasLink ? 'a' : 'span', |
| 908 | 885 | iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ), |
| 909 | 886 | migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' ), |
| 910 | 887 | titleSizeTag = elementor.helpers.validateHTMLTag( settings.title_size ); |
| @@ -915,9 +892,9 @@ | ||
| 915 | 892 | view.addRenderAttribute( 'icon', 'class', 'elementor-animation-' + settings.hover_animation ); |
| 916 | 893 | } |
| 917 | 894 | |
| 918 | 895 | if ( hasLink ) { |
| 919 | - view.addRenderAttribute( 'link', 'href', elementor.helpers.sanitizeUrl( settings.link?.url ) ); | |
| 896 | + view.addRenderAttribute( 'link', 'href', elementor.helpers.sanitizeUrl( settings.link.url ) ); | |
| 920 | 897 | view.addRenderAttribute( 'icon', 'tabindex', '-1' ); |
| 921 | 898 | if ( '' !== settings.title_text ) { |
| 922 | 899 | view.addRenderAttribute( 'icon', 'aria-label', settings.title_text ); |
| 923 | 900 | } |
| @@ -965,27 +942,6 @@ | ||
| 965 | 942 | } |
| 966 | 943 | |
| 967 | 944 | public function on_import( $element ) { |
| 968 | 945 | return Icons_Manager::on_import_migration( $element, 'icon', 'selected_icon', true ); |
| 969 | - } | |
| 970 | - | |
| 971 | - public function render_markdown(): string { | |
| 972 | - $settings = $this->get_settings_for_display(); | |
| 973 | - $title = Utils::html_to_plain_text( $settings['title_text'] ?? '' ); | |
| 974 | - $description = Utils::html_to_plain_text( $settings['description_text'] ?? '' ); | |
| 975 | - if ( empty( $title ) && empty( $description ) ) { | |
| 976 | - return ''; | |
| 977 | - } | |
| 978 | - $parts = []; | |
| 979 | - if ( ! empty( $title ) ) { | |
| 980 | - if ( ! empty( $settings['link']['url'] ) ) { | |
| 981 | - $parts[] = '### [' . $title . '](' . esc_url( $settings['link']['url'] ) . ')'; | |
| 982 | - } else { | |
| 983 | - $parts[] = '### ' . $title; | |
| 984 | - } | |
| 985 | - } | |
| 986 | - if ( ! empty( $description ) ) { | |
| 987 | - $parts[] = $description; | |
| 988 | - } | |
| 989 | - return implode( "\n\n", $parts ); | |
| 990 | 946 | } |
| 991 | 947 | } |