| @@ -119,12 +119,8 @@ | ||
| 119 | 119 | public function get_script_depends() { |
| 120 | 120 | return $this->depended_scripts; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - public function get_global_scripts() { | |
| 124 | - return [ 'elementor-frontend' ]; | |
| 125 | - } | |
| 126 | - | |
| 127 | 123 | /** |
| 128 | 124 | * Enqueue scripts. |
| 129 | 125 | * |
| 130 | 126 | * Registers all the scripts defined as element dependencies and enqueues |
| @@ -134,9 +130,9 @@ | ||
| 134 | 130 | * @access public |
| 135 | 131 | */ |
| 136 | 132 | final public function enqueue_scripts() { |
| 137 | 133 | $deprecated_scripts = [ |
| 138 | - // Insert here when you have a deprecated script. | |
| 134 | + //Insert here when you have a deprecated script | |
| 139 | 135 | ]; |
| 140 | 136 | |
| 141 | 137 | foreach ( $this->get_script_depends() as $script ) { |
| 142 | 138 | if ( isset( $deprecated_scripts[ $script ] ) ) { |
| @@ -144,16 +140,10 @@ | ||
| 144 | 140 | } |
| 145 | 141 | |
| 146 | 142 | wp_enqueue_script( $script ); |
| 147 | 143 | } |
| 148 | - | |
| 149 | - foreach ( $this->get_global_scripts() as $script ) { | |
| 150 | - wp_enqueue_script( $script ); | |
| 151 | - } | |
| 152 | 144 | } |
| 153 | 145 | |
| 154 | - public function register_frontend_handlers() {} | |
| 155 | - | |
| 156 | 146 | /** |
| 157 | 147 | * Get style dependencies. |
| 158 | 148 | * |
| 159 | 149 | * Retrieve the list of style dependencies the element requires. |
| @@ -295,22 +285,8 @@ | ||
| 295 | 285 | return true; |
| 296 | 286 | } |
| 297 | 287 | |
| 298 | 288 | /** |
| 299 | - * Whether the element returns dynamic content. | |
| 300 | - * | |
| 301 | - * Set to determine whether to cache the element output or not. | |
| 302 | - * | |
| 303 | - * @since 3.22.0 | |
| 304 | - * @access protected | |
| 305 | - * | |
| 306 | - * @return bool Whether to cache the element output. | |
| 307 | - */ | |
| 308 | - protected function is_dynamic_content(): bool { | |
| 309 | - return true; | |
| 310 | - } | |
| 311 | - | |
| 312 | - /** | |
| 313 | 289 | * Get child elements. |
| 314 | 290 | * |
| 315 | 291 | * Retrieve all the child elements of this element. |
| 316 | 292 | * |
| @@ -326,28 +302,8 @@ | ||
| 326 | 302 | |
| 327 | 303 | return $this->children; |
| 328 | 304 | } |
| 329 | 305 | |
| 330 | - public function render_markdown(): string { | |
| 331 | - $children = $this->get_children(); | |
| 332 | - | |
| 333 | - if ( empty( $children ) ) { | |
| 334 | - return ''; | |
| 335 | - } | |
| 336 | - | |
| 337 | - $parts = []; | |
| 338 | - | |
| 339 | - foreach ( $children as $child ) { | |
| 340 | - $md = $child->render_markdown(); | |
| 341 | - | |
| 342 | - if ( ! empty( trim( $md ) ) ) { | |
| 343 | - $parts[] = $md; | |
| 344 | - } | |
| 345 | - } | |
| 346 | - | |
| 347 | - return implode( "\n\n", $parts ); | |
| 348 | - } | |
| 349 | - | |
| 350 | 306 | /** |
| 351 | 307 | * Get default arguments. |
| 352 | 308 | * |
| 353 | 309 | * Retrieve the element default arguments. Used to return all the default |
| @@ -426,14 +382,15 @@ | ||
| 426 | 382 | * @since 2.8.0 |
| 427 | 383 | * @access public |
| 428 | 384 | * |
| 429 | 385 | * @param array|string $element The HTML element. |
| 430 | - * @param array $url_control Array of link settings. | |
| 431 | - * @param bool $overwrite Optional. Whether to overwrite existing | |
| 432 | - * attribute. Default is false, not to overwrite. | |
| 386 | + * @param array $url_control Array of link settings. | |
| 387 | + * @param bool $overwrite Optional. Whether to overwrite existing | |
| 388 | + * attribute. Default is false, not to overwrite. | |
| 433 | 389 | * |
| 434 | 390 | * @return Element_Base Current instance of the element. |
| 435 | 391 | */ |
| 392 | + | |
| 436 | 393 | public function add_link_attributes( $element, array $url_control, $overwrite = false ) { |
| 437 | 394 | $attributes = []; |
| 438 | 395 | |
| 439 | 396 | if ( ! empty( $url_control['url'] ) ) { |
| @@ -450,9 +407,9 @@ | ||
| 450 | 407 | $attributes['rel'] = 'nofollow'; |
| 451 | 408 | } |
| 452 | 409 | |
| 453 | 410 | if ( ! empty( $url_control['custom_attributes'] ) ) { |
| 454 | - // Custom URL attributes should come as a string of comma-delimited key|value pairs. | |
| 411 | + // Custom URL attributes should come as a string of comma-delimited key|value pairs | |
| 455 | 412 | $attributes = array_merge( $attributes, Utils::parse_custom_attributes( $url_control['custom_attributes'] ) ); |
| 456 | 413 | } |
| 457 | 414 | |
| 458 | 415 | if ( $attributes ) { |
| @@ -461,16 +418,8 @@ | ||
| 461 | 418 | |
| 462 | 419 | return $this; |
| 463 | 420 | } |
| 464 | 421 | |
| 465 | - public function reset_descendant_render_state(): void { | |
| 466 | - $this->reset_render_state(); | |
| 467 | - | |
| 468 | - foreach ( $this->get_children() as $child ) { | |
| 469 | - $child->reset_descendant_render_state(); | |
| 470 | - } | |
| 471 | - } | |
| 472 | - | |
| 473 | 422 | /** |
| 474 | 423 | * Print element. |
| 475 | 424 | * |
| 476 | 425 | * Used to generate the element final HTML on the frontend and the editor. |
| @@ -480,15 +429,8 @@ | ||
| 480 | 429 | */ |
| 481 | 430 | public function print_element() { |
| 482 | 431 | $element_type = $this->get_type(); |
| 483 | 432 | |
| 484 | - if ( $this->should_render_shortcode() ) { | |
| 485 | - $unique_id = apply_filters( 'elementor/element_cache/unique_id', '' ); | |
| 486 | - | |
| 487 | - echo '[elementor-element k="' . esc_attr( $unique_id ) . '" data="' . esc_attr( base64_encode( wp_json_encode( $this->get_raw_data() ) ) ) . '"]'; | |
| 488 | - return; | |
| 489 | - } | |
| 490 | - | |
| 491 | 433 | /** |
| 492 | 434 | * Before frontend element render. |
| 493 | 435 | * |
| 494 | 436 | * Fires before Elementor element is rendered in the frontend. |
| @@ -551,10 +493,8 @@ | ||
| 551 | 493 | // PHPCS - The content has already been escaped by the `render` method. |
| 552 | 494 | echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 553 | 495 | $this->after_render(); |
| 554 | 496 | |
| 555 | - // TODO: Remove this in the future | |
| 556 | - // Since version 3.24.0 page scripts/styles are handled by `page_assets`. | |
| 557 | 497 | $this->enqueue_scripts(); |
| 558 | 498 | $this->enqueue_styles(); |
| 559 | 499 | } |
| 560 | 500 | |
| @@ -582,54 +522,8 @@ | ||
| 582 | 522 | */ |
| 583 | 523 | do_action( 'elementor/frontend/after_render', $this ); |
| 584 | 524 | } |
| 585 | 525 | |
| 586 | - protected function should_render_shortcode() { | |
| 587 | - $should_render_shortcode = apply_filters( 'elementor/element/should_render_shortcode', false ); | |
| 588 | - | |
| 589 | - if ( ! $should_render_shortcode ) { | |
| 590 | - return false; | |
| 591 | - } | |
| 592 | - | |
| 593 | - $raw_data = $this->get_raw_data(); | |
| 594 | - | |
| 595 | - if ( ! empty( $raw_data['settings']['_element_cache'] ) ) { | |
| 596 | - return 'yes' === $raw_data['settings']['_element_cache']; | |
| 597 | - } | |
| 598 | - | |
| 599 | - if ( $this->is_dynamic_content() ) { | |
| 600 | - return true; | |
| 601 | - } | |
| 602 | - | |
| 603 | - $is_dynamic_content = apply_filters( 'elementor/element/is_dynamic_content', false, $raw_data, $this ); | |
| 604 | - | |
| 605 | - $has_dynamic_tag = $this->has_element_dynamic_tag( $raw_data['settings'] ); | |
| 606 | - | |
| 607 | - if ( $is_dynamic_content || $has_dynamic_tag ) { | |
| 608 | - return true; | |
| 609 | - } | |
| 610 | - | |
| 611 | - return false; | |
| 612 | - } | |
| 613 | - | |
| 614 | - private function has_element_dynamic_tag( $element_settings ): bool { | |
| 615 | - if ( is_array( $element_settings ) ) { | |
| 616 | - if ( ! empty( $element_settings['__dynamic__'] ) ) { | |
| 617 | - return true; | |
| 618 | - } | |
| 619 | - | |
| 620 | - foreach ( $element_settings as $value ) { | |
| 621 | - $has_dynamic = $this->has_element_dynamic_tag( $value ); | |
| 622 | - | |
| 623 | - if ( $has_dynamic ) { | |
| 624 | - return true; | |
| 625 | - } | |
| 626 | - } | |
| 627 | - } | |
| 628 | - | |
| 629 | - return false; | |
| 630 | - } | |
| 631 | - | |
| 632 | 526 | /** |
| 633 | 527 | * Get the element raw data. |
| 634 | 528 | * |
| 635 | 529 | * Retrieve the raw element data, including the id, type, settings, child |
| @@ -732,9 +626,9 @@ | ||
| 732 | 626 | * @param array|null $controls The available controls. |
| 733 | 627 | * |
| 734 | 628 | * @return array Element data. |
| 735 | 629 | */ |
| 736 | - public static function on_import_update_dynamic_content( array $config, array $data, $controls = null ): array { | |
| 630 | + public static function on_import_update_dynamic_content( array $config, array $data, $controls = null ) : array { | |
| 737 | 631 | $tags_manager = Plugin::$instance->dynamic_tags; |
| 738 | 632 | |
| 739 | 633 | if ( empty( $config['settings'][ $tags_manager::DYNAMIC_SETTING_KEY ] ) ) { |
| 740 | 634 | return $config; |
| @@ -797,9 +691,8 @@ | ||
| 797 | 691 | 'elementor-element-' . $id, |
| 798 | 692 | ], |
| 799 | 693 | 'data-id' => $id, |
| 800 | 694 | 'data-element_type' => $this->get_type(), |
| 801 | - 'data-e-type' => $this->get_type(), | |
| 802 | 695 | ] ); |
| 803 | 696 | |
| 804 | 697 | $class_settings = []; |
| 805 | 698 | |
| @@ -824,15 +717,15 @@ | ||
| 824 | 717 | } |
| 825 | 718 | |
| 826 | 719 | $_animation = ! empty( $settings['_animation'] ); |
| 827 | 720 | $animation = ! empty( $settings['animation'] ); |
| 828 | - $has_animation = ( $_animation && 'none' !== $settings['_animation'] ) || ( $animation && 'none' !== $settings['animation'] ); | |
| 721 | + $has_animation = $_animation && 'none' !== $settings['_animation'] || $animation && 'none' !== $settings['animation']; | |
| 829 | 722 | |
| 830 | 723 | if ( $has_animation ) { |
| 831 | 724 | $is_static_render_mode = Plugin::$instance->frontend->is_static_render_mode(); |
| 832 | 725 | |
| 833 | 726 | if ( ! $is_static_render_mode ) { |
| 834 | - // Hide the element until the animation begins. | |
| 727 | + // Hide the element until the animation begins | |
| 835 | 728 | $this->add_render_attribute( '_wrapper', 'class', 'elementor-invisible' ); |
| 836 | 729 | } |
| 837 | 730 | } |
| 838 | 731 | |
| @@ -860,15 +753,13 @@ | ||
| 860 | 753 | * Register the Transform controls in the advanced tab of the element. |
| 861 | 754 | * |
| 862 | 755 | * Previously registered under the Widget_Common class, but registered a more fundamental level now to enable access from other widgets. |
| 863 | 756 | * |
| 864 | - * @param string $element_selector | |
| 865 | - * @param string $transform_selector_class | |
| 866 | - * @return void | |
| 867 | 757 | * @since 3.9.0 |
| 868 | 758 | * @access protected |
| 759 | + * @return void | |
| 869 | 760 | */ |
| 870 | - protected function register_transform_section( $element_selector = '', $transform_selector_class = ' > .elementor-widget-container' ) { | |
| 761 | + protected function register_transform_section( $element_selector = '' ) { | |
| 871 | 762 | $default_unit_values_deg = []; |
| 872 | 763 | $default_unit_values_ms = []; |
| 873 | 764 | |
| 874 | 765 | // Set the default unit sizes for all active breakpoints. |
| @@ -897,8 +788,9 @@ | ||
| 897 | 788 | $this->start_controls_tabs( '_tabs_positioning' ); |
| 898 | 789 | |
| 899 | 790 | $transform_prefix_class = 'e-'; |
| 900 | 791 | $transform_return_value = 'transform'; |
| 792 | + $transform_selector_class = ' > .elementor-widget-container'; | |
| 901 | 793 | $transform_css_modifier = ''; |
| 902 | 794 | |
| 903 | 795 | if ( 'con' === $element_selector ) { |
| 904 | 796 | $transform_selector_class = '.e-' . $element_selector; |
| @@ -929,9 +821,9 @@ | ||
| 929 | 821 | |
| 930 | 822 | $this->add_responsive_control( |
| 931 | 823 | "_transform_rotateZ_effect{$tab}", |
| 932 | 824 | [ |
| 933 | - 'label' => esc_html__( 'Rotate', 'elementor' ) . ' (deg)', | |
| 825 | + 'label' => esc_html__( 'Rotate', 'elementor' ), | |
| 934 | 826 | 'type' => Controls_Manager::SLIDER, |
| 935 | 827 | 'device_args' => $default_unit_values_deg, |
| 936 | 828 | 'range' => [ |
| 937 | 829 | 'px' => [ |
| @@ -961,9 +853,8 @@ | ||
| 961 | 853 | ], |
| 962 | 854 | 'condition' => [ |
| 963 | 855 | "_transform_rotate_popover{$tab}!" => '', |
| 964 | 856 | ], |
| 965 | - 'frontend_available' => true, | |
| 966 | 857 | ] |
| 967 | 858 | ); |
| 968 | 859 | |
| 969 | 860 | $this->add_responsive_control( |
| @@ -968,9 +859,9 @@ | ||
| 968 | 859 | |
| 969 | 860 | $this->add_responsive_control( |
| 970 | 861 | "_transform_rotateX_effect{$tab}", |
| 971 | 862 | [ |
| 972 | - 'label' => esc_html__( 'Rotate X', 'elementor' ) . ' (deg)', | |
| 863 | + 'label' => esc_html__( 'Rotate X', 'elementor' ), | |
| 973 | 864 | 'type' => Controls_Manager::SLIDER, |
| 974 | 865 | 'device_args' => $default_unit_values_deg, |
| 975 | 866 | 'range' => [ |
| 976 | 867 | 'px' => [ |
| @@ -991,9 +882,9 @@ | ||
| 991 | 882 | |
| 992 | 883 | $this->add_responsive_control( |
| 993 | 884 | "_transform_rotateY_effect{$tab}", |
| 994 | 885 | [ |
| 995 | - 'label' => esc_html__( 'Rotate Y', 'elementor' ) . ' (deg)', | |
| 886 | + 'label' => esc_html__( 'Rotate Y', 'elementor' ), | |
| 996 | 887 | 'type' => Controls_Manager::SLIDER, |
| 997 | 888 | 'device_args' => $default_unit_values_deg, |
| 998 | 889 | 'range' => [ |
| 999 | 890 | 'px' => [ |
| @@ -1014,12 +905,13 @@ | ||
| 1014 | 905 | |
| 1015 | 906 | $this->add_responsive_control( |
| 1016 | 907 | "_transform_perspective_effect{$tab}", |
| 1017 | 908 | [ |
| 1018 | - 'label' => esc_html__( 'Perspective', 'elementor' ) . ' (px)', | |
| 909 | + 'label' => esc_html__( 'Perspective', 'elementor' ), | |
| 1019 | 910 | 'type' => Controls_Manager::SLIDER, |
| 1020 | 911 | 'range' => [ |
| 1021 | 912 | 'px' => [ |
| 913 | + 'min' => 0, | |
| 1022 | 914 | 'max' => 1000, |
| 1023 | 915 | ], |
| 1024 | 916 | ], |
| 1025 | 917 | 'condition' => [ |
| @@ -1130,8 +1022,9 @@ | ||
| 1130 | 1022 | 'label' => esc_html__( 'Scale', 'elementor' ), |
| 1131 | 1023 | 'type' => Controls_Manager::SLIDER, |
| 1132 | 1024 | 'range' => [ |
| 1133 | 1025 | 'px' => [ |
| 1026 | + 'min' => 0, | |
| 1134 | 1027 | 'max' => 2, |
| 1135 | 1028 | 'step' => 0.1, |
| 1136 | 1029 | ], |
| 1137 | 1030 | ], |
| @@ -1152,8 +1045,9 @@ | ||
| 1152 | 1045 | 'label' => esc_html__( 'Scale X', 'elementor' ), |
| 1153 | 1046 | 'type' => Controls_Manager::SLIDER, |
| 1154 | 1047 | 'range' => [ |
| 1155 | 1048 | 'px' => [ |
| 1049 | + 'min' => 0, | |
| 1156 | 1050 | 'max' => 2, |
| 1157 | 1051 | 'step' => 0.1, |
| 1158 | 1052 | ], |
| 1159 | 1053 | ], |
| @@ -1174,8 +1068,9 @@ | ||
| 1174 | 1068 | 'label' => esc_html__( 'Scale Y', 'elementor' ), |
| 1175 | 1069 | 'type' => Controls_Manager::SLIDER, |
| 1176 | 1070 | 'range' => [ |
| 1177 | 1071 | 'px' => [ |
| 1072 | + 'min' => 0, | |
| 1178 | 1073 | 'max' => 2, |
| 1179 | 1074 | 'step' => 0.1, |
| 1180 | 1075 | ], |
| 1181 | 1076 | ], |
| @@ -1206,9 +1101,9 @@ | ||
| 1206 | 1101 | |
| 1207 | 1102 | $this->add_responsive_control( |
| 1208 | 1103 | "_transform_skewX_effect{$tab}", |
| 1209 | 1104 | [ |
| 1210 | - 'label' => esc_html__( 'Skew X', 'elementor' ) . ' (deg)', | |
| 1105 | + 'label' => esc_html__( 'Skew X', 'elementor' ), | |
| 1211 | 1106 | 'type' => Controls_Manager::SLIDER, |
| 1212 | 1107 | 'device_args' => $default_unit_values_deg, |
| 1213 | 1108 | 'range' => [ |
| 1214 | 1109 | 'px' => [ |
| @@ -1228,9 +1123,9 @@ | ||
| 1228 | 1123 | |
| 1229 | 1124 | $this->add_responsive_control( |
| 1230 | 1125 | "_transform_skewY_effect{$tab}", |
| 1231 | 1126 | [ |
| 1232 | - 'label' => esc_html__( 'Skew Y', 'elementor' ) . ' (deg)', | |
| 1127 | + 'label' => esc_html__( 'Skew Y', 'elementor' ), | |
| 1233 | 1128 | 'type' => Controls_Manager::SLIDER, |
| 1234 | 1129 | 'device_args' => $default_unit_values_deg, |
| 1235 | 1130 | 'range' => [ |
| 1236 | 1131 | 'px' => [ |
| @@ -1296,11 +1191,10 @@ | ||
| 1296 | 1191 | 'type' => Controls_Manager::SLIDER, |
| 1297 | 1192 | 'device_args' => $default_unit_values_ms, |
| 1298 | 1193 | 'range' => [ |
| 1299 | 1194 | 'px' => [ |
| 1300 | - 'min' => 0, | |
| 1195 | + 'min' => 100, | |
| 1301 | 1196 | 'max' => 10000, |
| 1302 | - 'step' => 100, | |
| 1303 | 1197 | ], |
| 1304 | 1198 | ], |
| 1305 | 1199 | 'selectors' => [ |
| 1306 | 1200 | '{{WRAPPER}}' => '--e-' . $transform_css_modifier . 'transform-transition-duration: {{SIZE}}ms', |
| @@ -1341,9 +1235,9 @@ | ||
| 1341 | 1235 | 'relation' => 'or', |
| 1342 | 1236 | 'terms' => array_merge( $transform_origin_conditions, $transform_origin_conditions_hover ), |
| 1343 | 1237 | ]; |
| 1344 | 1238 | |
| 1345 | - // Will override motion effect transform-origin. | |
| 1239 | + // Will override motion effect transform-origin | |
| 1346 | 1240 | $this->add_responsive_control( |
| 1347 | 1241 | 'motion_fx_transform_x_anchor_point', |
| 1348 | 1242 | [ |
| 1349 | 1243 | 'label' => esc_html__( 'X Anchor Point', 'elementor' ), |
| @@ -1369,9 +1263,9 @@ | ||
| 1369 | 1263 | ], |
| 1370 | 1264 | ] |
| 1371 | 1265 | ); |
| 1372 | 1266 | |
| 1373 | - // Will override motion effect transform-origin. | |
| 1267 | + // Will override motion effect transform-origin | |
| 1374 | 1268 | $this->add_responsive_control( |
| 1375 | 1269 | 'motion_fx_transform_y_anchor_point', |
| 1376 | 1270 | [ |
| 1377 | 1271 | 'label' => esc_html__( 'Y Anchor Point', 'elementor' ), |
| @@ -1418,13 +1312,10 @@ | ||
| 1418 | 1312 | |
| 1419 | 1313 | $this->add_control( |
| 1420 | 1314 | 'hide_' . $breakpoint_key, |
| 1421 | 1315 | [ |
| 1422 | - 'label' => sprintf( | |
| 1423 | - /* translators: %s: Device name. */ | |
| 1424 | - esc_html__( 'Hide On %s', 'elementor' ), | |
| 1425 | - $label | |
| 1426 | - ), | |
| 1316 | + /* translators: %s: Device name. */ | |
| 1317 | + 'label' => sprintf( __( 'Hide On %s', 'elementor' ), $label ), | |
| 1427 | 1318 | 'type' => Controls_Manager::SWITCHER, |
| 1428 | 1319 | 'default' => '', |
| 1429 | 1320 | 'prefix_class' => 'elementor-', |
| 1430 | 1321 | 'label_on' => esc_html__( 'Hide', 'elementor' ), |
| @@ -1522,11 +1413,8 @@ | ||
| 1522 | 1413 | |
| 1523 | 1414 | /** |
| 1524 | 1415 | * A Base method for sanitizing the settings before save. |
| 1525 | 1416 | * This method is meant to be overridden by the element. |
| 1526 | - * | |
| 1527 | - * @param array $settings | |
| 1528 | - * @return array | |
| 1529 | 1417 | */ |
| 1530 | 1418 | protected function on_save( array $settings ) { |
| 1531 | 1419 | return $settings; |
| 1532 | 1420 | } |
| @@ -1545,9 +1433,9 @@ | ||
| 1545 | 1433 | */ |
| 1546 | 1434 | private function get_child_type( $element_data ) { |
| 1547 | 1435 | $child_type = $this->_get_default_child_type( $element_data ); |
| 1548 | 1436 | |
| 1549 | - // If it's not a valid widget ( like a deactivated plugin ). | |
| 1437 | + // If it's not a valid widget ( like a deactivated plugin ) | |
| 1550 | 1438 | if ( ! $child_type ) { |
| 1551 | 1439 | return false; |
| 1552 | 1440 | } |
| 1553 | 1441 | |
| @@ -1592,12 +1480,8 @@ | ||
| 1592 | 1480 | $this->add_child( $child_data ); |
| 1593 | 1481 | } |
| 1594 | 1482 | } |
| 1595 | 1483 | |
| 1596 | - public function has_widget_inner_wrapper(): bool { | |
| 1597 | - return true; | |
| 1598 | - } | |
| 1599 | - | |
| 1600 | 1484 | /** |
| 1601 | 1485 | * Element base constructor. |
| 1602 | 1486 | * |
| 1603 | 1487 | * Initializing the element base class using `$data` and `$args`. |
| @@ -1610,9 +1494,9 @@ | ||
| 1610 | 1494 | * |
| 1611 | 1495 | * @param array $data Optional. Element data. Default is an empty array. |
| 1612 | 1496 | * @param array|null $args Optional. Element default arguments. Default is null. |
| 1613 | 1497 | **/ |
| 1614 | - public function __construct( array $data = [], ?array $args = null ) { | |
| 1498 | + public function __construct( array $data = [], array $args = null ) { | |
| 1615 | 1499 | if ( $data ) { |
| 1616 | 1500 | $this->is_type_instance = false; |
| 1617 | 1501 | } elseif ( $args ) { |
| 1618 | 1502 | $this->default_args = $args; |