| @@ -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 |
| @@ -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. |
| @@ -326,28 +316,8 @@ | ||
| 326 | 316 | |
| 327 | 317 | return $this->children; |
| 328 | 318 | } |
| 329 | 319 | |
| 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 | 320 | /** |
| 351 | 321 | * Get default arguments. |
| 352 | 322 | * |
| 353 | 323 | * Retrieve the element default arguments. Used to return all the default |
| @@ -473,11 +443,9 @@ | ||
| 473 | 443 | public function print_element() { |
| 474 | 444 | $element_type = $this->get_type(); |
| 475 | 445 | |
| 476 | 446 | if ( $this->should_render_shortcode() ) { |
| 477 | - $unique_id = apply_filters( 'elementor/element_cache/unique_id', '' ); | |
| 478 | - | |
| 479 | - echo '[elementor-element k="' . esc_attr( $unique_id ) . '" data="' . esc_attr( base64_encode( wp_json_encode( $this->get_raw_data() ) ) ) . '"]'; | |
| 447 | + echo '[elementor-element data="' . esc_attr( base64_encode( wp_json_encode( $this->get_raw_data() ) ) ) . '"]'; | |
| 480 | 448 | return; |
| 481 | 449 | } |
| 482 | 450 | |
| 483 | 451 | /** |
| @@ -789,9 +757,8 @@ | ||
| 789 | 757 | 'elementor-element-' . $id, |
| 790 | 758 | ], |
| 791 | 759 | 'data-id' => $id, |
| 792 | 760 | 'data-element_type' => $this->get_type(), |
| 793 | - 'data-e-type' => $this->get_type(), | |
| 794 | 761 | ] ); |
| 795 | 762 | |
| 796 | 763 | $class_settings = []; |
| 797 | 764 | |
| @@ -1602,9 +1569,9 @@ | ||
| 1602 | 1569 | * |
| 1603 | 1570 | * @param array $data Optional. Element data. Default is an empty array. |
| 1604 | 1571 | * @param array|null $args Optional. Element default arguments. Default is null. |
| 1605 | 1572 | **/ |
| 1606 | - public function __construct( array $data = [], ?array $args = null ) { | |
| 1573 | + public function __construct( array $data = [], array $args = null ) { | |
| 1607 | 1574 | if ( $data ) { |
| 1608 | 1575 | $this->is_type_instance = false; |
| 1609 | 1576 | } elseif ( $args ) { |
| 1610 | 1577 | $this->default_args = $args; |